var __typeError=msg=>{throw TypeError(msg)};var __accessCheck=(obj,member,msg)=>member.has(obj)||__typeError("Cannot "+msg);var __privateGet=(obj,member,getter)=>(__accessCheck(obj,member,"read from private field"),getter?getter.call(obj):member.get(obj)),__privateAdd=(obj,member,value)=>member.has(obj)?__typeError("Cannot add the same private member more than once"):member instanceof WeakSet?member.add(obj):member.set(obj,value),__privateSet=(obj,member,value,setter)=>(__accessCheck(obj,member,"write to private field"),setter?setter.call(obj,value):member.set(obj,value),value),__privateMethod=(obj,member,method)=>(__accessCheck(
obj,member,"access private method"),method);var __privateWrapper=(obj,member,setter,getter)=>({set _(value){__privateSet(obj,member,value,setter)},get _(){return __privateGet(obj,member,getter)}});var is_array=Array.isArray,index_of=Array.prototype.indexOf,includes=Array.prototype.includes,array_from=Array.from,define_property=Object.defineProperty,get_descriptor=Object.getOwnPropertyDescriptor,get_descriptors=Object.getOwnPropertyDescriptors,object_prototype=Object.prototype,array_prototype=Array.prototype,get_prototype_of=Object.getPrototypeOf,is_extensible=Object.isExtensible;function is_function(thing){return typeof thing=="function"}const noop$3=()=>{};function run(fn){return fn()}function run_all(arr){
for(var i=0;i<arr.length;i++)arr[i]()}function deferred(){var resolve2,reject,promise=new Promise((res,rej)=>{resolve2=res,reject=rej});return{promise,resolve:resolve2,reject}}function fallback(value,fallback2,lazy=!1){return value===void 0?lazy?fallback2():fallback2:value}function to_array(value,n){if(Array.isArray(value))return value;if(!(Symbol.iterator in value))return Array.from(value);const array2=[];for(const element2 of value)if(array2.push(element2),array2.length===n)break;return array2}
const DERIVED=2,EFFECT=4,RENDER_EFFECT=8,MANAGED_EFFECT=1<<24,BLOCK_EFFECT=16,BRANCH_EFFECT=32,ROOT_EFFECT=64,BOUNDARY_EFFECT=128,CONNECTED=512,CLEAN=1024,DIRTY=2048,MAYBE_DIRTY=4096,INERT=8192,DESTROYED=16384,REACTION_RAN=32768,DESTROYING=1<<25,EFFECT_TRANSPARENT=65536,EAGER_EFFECT=1<<17,HEAD_EFFECT=1<<18,EFFECT_PRESERVED=1<<19,USER_EFFECT=1<<20,EFFECT_OFFSCREEN=1<<25,WAS_MARKED=65536,REACTION_IS_UPDATING=1<<21,ASYNC=1<<22,ERROR_VALUE=1<<23,STATE_SYMBOL=Symbol("$state"),LEGACY_PROPS=Symbol("leg\
acy props"),LOADING_ATTR_SYMBOL=Symbol(""),STALE_REACTION=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},IS_XHTML=!!globalThis.document?.contentType&&globalThis.document.contentType.includes("xml"),ELEMENT_NODE$1=1,TEXT_NODE=3,COMMENT_NODE=8;function lifecycle_outside_component(name){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function async_derived_orphan(){throw new Error("https://svelte.d\
ev/e/async_derived_orphan")}function each_key_duplicate(a,b,value){throw new Error("https://svelte.dev/e/each_key_duplicate")}function effect_in_teardown(rune){throw new Error("https://svelte.dev/e/effect_in_teardown")}function effect_in_unowned_derived(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function effect_orphan(rune){throw new Error("https://svelte.dev/e/effect_orphan")}function effect_update_depth_exceeded(){throw new Error("https://svelte.dev/e/effect_update_dep\
th_exceeded")}function hydration_failed(){throw new Error("https://svelte.dev/e/hydration_failed")}function props_invalid_value(key2){throw new Error("https://svelte.dev/e/props_invalid_value")}function state_descriptors_fixed(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function state_prototype_fixed(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function state_unsafe_mutation(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function svelte_boundary_reset_onerror(){
throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}const EACH_ITEM_REACTIVE=1,EACH_INDEX_REACTIVE=2,EACH_IS_CONTROLLED=4,EACH_IS_ANIMATED=8,EACH_ITEM_IMMUTABLE=16,PROPS_IS_IMMUTABLE=1,PROPS_IS_RUNES=2,PROPS_IS_UPDATED=4,PROPS_IS_BINDABLE=8,PROPS_IS_LAZY_INITIAL=16,TRANSITION_IN=1,TRANSITION_OUT=2,TRANSITION_GLOBAL=4,TEMPLATE_FRAGMENT=1,TEMPLATE_USE_IMPORT_NODE=2,HYDRATION_START="[",HYDRATION_START_ELSE="[!",HYDRATION_START_FAILED="[?",HYDRATION_END="]",HYDRATION_ERROR={},UNINITIALIZED=Symbol(),
NAMESPACE_HTML="http://www.w3.org/1999/xhtml",NAMESPACE_SVG="http://www.w3.org/2000/svg",NAMESPACE_MATHML="http://www.w3.org/1998/Math/MathML",ATTACHMENT_KEY="@attach";function hydration_mismatch(location2){console.warn("https://svelte.dev/e/hydration_mismatch")}function select_multiple_invalid_value(){console.warn("https://svelte.dev/e/select_multiple_invalid_value")}function svelte_boundary_reset_noop(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}let hydrating=!1;function set_hydrating(value){
hydrating=value}let hydrate_node;function set_hydrate_node(node2){if(node2===null)throw hydration_mismatch(),HYDRATION_ERROR;return hydrate_node=node2}function hydrate_next(){return set_hydrate_node(get_next_sibling(hydrate_node))}function reset(node2){if(hydrating){if(get_next_sibling(hydrate_node)!==null)throw hydration_mismatch(),HYDRATION_ERROR;hydrate_node=node2}}function next$1(count=1){if(hydrating){for(var i=count,node2=hydrate_node;i--;)node2=get_next_sibling(node2);hydrate_node=node2}}
function skip_nodes(remove2=!0){for(var depth=0,node2=hydrate_node;;){if(node2.nodeType===COMMENT_NODE){var data=node2.data;if(data===HYDRATION_END){if(depth===0)return node2;depth-=1}else(data===HYDRATION_START||data===HYDRATION_START_ELSE||data[0]==="["&&!isNaN(Number(data.slice(1))))&&(depth+=1)}var next2=get_next_sibling(node2);remove2&&node2.remove(),node2=next2}}function read_hydration_instruction(node2){if(!node2||node2.nodeType!==COMMENT_NODE)throw hydration_mismatch(),HYDRATION_ERROR;return node2.
data}function equals(value){return value===this.v}function safe_not_equal(a,b){return a!=a?b==b:a!==b||a!==null&&typeof a=="object"||typeof a=="function"}function safe_equals(value){return!safe_not_equal(value,this.v)}let legacy_mode_flag=!1;function enable_legacy_mode_flag(){legacy_mode_flag=!0}const empty$2=[];function snapshot(value,skip_warning=!1,no_tojson=!1){return clone$1(value,new Map,"",empty$2,null,no_tojson)}function clone$1(value,cloned,path2,paths,original=null,no_tojson=!1){if(typeof value=="object"&&value!==null){var unwrapped=cloned.get(value);if(unwrapped!==void 0)return unwrapped;if(value instanceof Map)return new Map(value);if(value instanceof Set)return new Set(value);if(is_array(value)){var copy=Array(value.length);
cloned.set(value,copy),original!==null&&cloned.set(original,copy);for(var i=0;i<value.length;i+=1){var element2=value[i];i in value&&(copy[i]=clone$1(element2,cloned,path2,paths,null,no_tojson))}return copy}if(get_prototype_of(value)===object_prototype){copy={},cloned.set(value,copy),original!==null&&cloned.set(original,copy);for(var key2 of Object.keys(value))copy[key2]=clone$1(value[key2],cloned,path2,paths,null,no_tojson);return copy}if(value instanceof Date)return structuredClone(value);if(typeof value.
toJSON=="function"&&!no_tojson)return clone$1(value.toJSON(),cloned,path2,paths,value)}if(value instanceof EventTarget)return value;try{return structuredClone(value)}catch{return value}}let component_context=null;function set_component_context(context){component_context=context}function getContext(key2){return get_or_init_context_map().get(key2)}function setContext(key2,context){return get_or_init_context_map().set(key2,context),context}function hasContext(key2){return get_or_init_context_map().
has(key2)}function getAllContexts(){return get_or_init_context_map()}function push$1(props,runes=!1,fn){component_context={p:component_context,i:!1,c:null,e:null,s:props,x:null,r:active_effect,l:legacy_mode_flag&&!runes?{s:null,u:null,$:[]}:null}}function pop(component2){var context=component_context,effects=context.e;if(effects!==null){context.e=null;for(var fn of effects)create_user_effect(fn)}return component2!==void 0&&(context.x=component2),context.i=!0,component_context=context.p,component2??
{}}function is_runes(){return!legacy_mode_flag||component_context!==null&&component_context.l===null}function get_or_init_context_map(name){return component_context===null&&lifecycle_outside_component(),component_context.c??=new Map(get_parent_context(component_context)||void 0)}function get_parent_context(component_context2){let parent=component_context2.p;for(;parent!==null;){const context_map=parent.c;if(context_map!==null)return context_map;parent=parent.p}return null}let micro_tasks=[];function run_micro_tasks(){
var tasks=micro_tasks;micro_tasks=[],run_all(tasks)}function queue_micro_task(fn){if(micro_tasks.length===0&&!is_flushing_sync){var tasks=micro_tasks;queueMicrotask(()=>{tasks===micro_tasks&&run_micro_tasks()})}micro_tasks.push(fn)}function flush_tasks(){for(;micro_tasks.length>0;)run_micro_tasks()}function handle_error$1(error2){var effect2=active_effect;if(effect2===null)return active_reaction.f|=ERROR_VALUE,error2;if((effect2.f&REACTION_RAN)===0&&(effect2.f&EFFECT)===0)throw error2;invoke_error_boundary(
error2,effect2)}function invoke_error_boundary(error2,effect2){for(;effect2!==null;){if((effect2.f&BOUNDARY_EFFECT)!==0){if((effect2.f&REACTION_RAN)===0)throw error2;try{effect2.b.error(error2);return}catch(e){error2=e}}effect2=effect2.parent}throw error2}const STATUS_MASK=-7169;function set_signal_status(signal,status){signal.f=signal.f&STATUS_MASK|status}function update_derived_status(derived2){(derived2.f&CONNECTED)!==0||derived2.deps===null?set_signal_status(derived2,CLEAN):set_signal_status(
derived2,MAYBE_DIRTY)}function clear_marked(deps){if(deps!==null)for(const dep of deps)(dep.f&DERIVED)===0||(dep.f&WAS_MARKED)===0||(dep.f^=WAS_MARKED,clear_marked(dep.deps))}function defer_effect(effect2,dirty_effects,maybe_dirty_effects){(effect2.f&DIRTY)!==0?dirty_effects.add(effect2):(effect2.f&MAYBE_DIRTY)!==0&&maybe_dirty_effects.add(effect2),clear_marked(effect2.deps),set_signal_status(effect2,CLEAN)}function subscribe_to_store(store,run2,invalidate){if(store==null)return run2(void 0),noop$3;
const unsub=untrack$1(()=>store.subscribe(run2,invalidate));return unsub.unsubscribe?()=>unsub.unsubscribe():unsub}const subscriber_queue=[];function writable(value,start2=noop$3){let stop=null;const subscribers=new Set;function set2(new_value){if(safe_not_equal(value,new_value)&&(value=new_value,stop)){const run_queue=!subscriber_queue.length;for(const subscriber of subscribers)subscriber[1](),subscriber_queue.push(subscriber,value);if(run_queue){for(let i=0;i<subscriber_queue.length;i+=2)subscriber_queue[i][0](
subscriber_queue[i+1]);subscriber_queue.length=0}}}function update2(fn){set2(fn(value))}function subscribe(run2,invalidate=noop$3){const subscriber=[run2,invalidate];return subscribers.add(subscriber),subscribers.size===1&&(stop=start2(set2,update2)||noop$3),run2(value),()=>{subscribers.delete(subscriber),subscribers.size===0&&stop&&(stop(),stop=null)}}return{set:set2,update:update2,subscribe}}function get$4(store){let value;return subscribe_to_store(store,_=>value=_)(),value}let is_store_binding=!1,
IS_UNMOUNTED=Symbol();function store_get(store,store_name,stores2){const entry=stores2[store_name]??={store:null,source:mutable_source(void 0),unsubscribe:noop$3};if(entry.store!==store&&!(IS_UNMOUNTED in stores2))if(entry.unsubscribe(),entry.store=store??null,store==null)entry.source.v=void 0,entry.unsubscribe=noop$3;else{var is_synchronous_callback=!0;entry.unsubscribe=subscribe_to_store(store,v=>{is_synchronous_callback?entry.source.v=v:set$1(entry.source,v)}),is_synchronous_callback=!1}return store&&
IS_UNMOUNTED in stores2?get$4(store):get$3(entry.source)}function setup_stores(){const stores2={};function cleanup(){teardown(()=>{for(var store_name in stores2)stores2[store_name].unsubscribe();define_property(stores2,IS_UNMOUNTED,{enumerable:!1,value:!0})})}return[stores2,cleanup]}function capture_store_binding(fn){var previous_is_store_binding=is_store_binding;try{return is_store_binding=!1,[fn(),is_store_binding]}finally{is_store_binding=previous_is_store_binding}}const batches=new Set;let current_batch=null,
batch_values=null,last_scheduled_effect=null,is_flushing_sync=!1,is_processing=!1,collected_effects=null,legacy_updates=null;var flush_count=0;let uid=1;class Batch{id=uid++;current=new Map;previous=new Map;#commit_callbacks=new Set;#discard_callbacks=new Set;#pending=new Map;#blocking_pending=new Map;#deferred=null;#roots=[];#new_effects=[];#dirty_effects=new Set;#maybe_dirty_effects=new Set;#skipped_branches=new Map;is_fork=!1;#decrement_queued=!1;#blockers=new Set;#is_deferred(){return this.is_fork||
this.#blocking_pending.size>0}#is_blocked(){for(const batch of this.#blockers)for(const effect2 of batch.#blocking_pending.keys()){for(var skipped=!1,e=effect2;e.parent!==null;){if(this.#skipped_branches.has(e)){skipped=!0;break}e=e.parent}if(!skipped)return!0}return!1}skip_effect(effect2){this.#skipped_branches.has(effect2)||this.#skipped_branches.set(effect2,{d:[],m:[]})}unskip_effect(effect2){var tracked=this.#skipped_branches.get(effect2);if(tracked){this.#skipped_branches.delete(effect2);for(var e of tracked.
d)set_signal_status(e,DIRTY),this.schedule(e);for(e of tracked.m)set_signal_status(e,MAYBE_DIRTY),this.schedule(e)}}#process(){if(flush_count++>1e3&&(batches.delete(this),infinite_loop_guard()),!this.#is_deferred()){for(const e of this.#dirty_effects)this.#maybe_dirty_effects.delete(e),set_signal_status(e,DIRTY),this.schedule(e);for(const e of this.#maybe_dirty_effects)set_signal_status(e,MAYBE_DIRTY),this.schedule(e)}const roots=this.#roots;this.#roots=[],this.apply();var effects=collected_effects=
[],render_effects=[],updates=legacy_updates=[];for(const root2 of roots)try{this.#traverse(root2,effects,render_effects)}catch(e){throw reset_all(root2),e}if(current_batch=null,updates.length>0){var batch=Batch.ensure();for(const e of updates)batch.schedule(e)}if(collected_effects=null,legacy_updates=null,this.#is_deferred()||this.#is_blocked()){this.#defer_effects(render_effects),this.#defer_effects(effects);for(const[e,t]of this.#skipped_branches)reset_branch(e,t)}else{this.#pending.size===0&&
batches.delete(this),this.#dirty_effects.clear(),this.#maybe_dirty_effects.clear();for(const fn of this.#commit_callbacks)fn(this);this.#commit_callbacks.clear(),flush_queued_effects(render_effects),flush_queued_effects(effects),this.#deferred?.resolve()}var next_batch=current_batch;if(this.#roots.length>0){const batch2=next_batch??=this;batch2.#roots.push(...this.#roots.filter(r2=>!batch2.#roots.includes(r2)))}next_batch!==null&&(batches.add(next_batch),next_batch.#process()),batches.has(this)||
this.#commit()}#traverse(root2,effects,render_effects){root2.f^=CLEAN;for(var effect2=root2.first;effect2!==null;){var flags2=effect2.f,is_branch=(flags2&(BRANCH_EFFECT|ROOT_EFFECT))!==0,is_skippable_branch=is_branch&&(flags2&CLEAN)!==0,skip=is_skippable_branch||(flags2&INERT)!==0||this.#skipped_branches.has(effect2);if(!skip&&effect2.fn!==null){is_branch?effect2.f^=CLEAN:(flags2&EFFECT)!==0?effects.push(effect2):is_dirty(effect2)&&((flags2&BLOCK_EFFECT)!==0&&this.#maybe_dirty_effects.add(effect2),
update_effect(effect2));var child2=effect2.first;if(child2!==null){effect2=child2;continue}}for(;effect2!==null;){var next2=effect2.next;if(next2!==null){effect2=next2;break}effect2=effect2.parent}}}#defer_effects(effects){for(var i=0;i<effects.length;i+=1)defer_effect(effects[i],this.#dirty_effects,this.#maybe_dirty_effects)}capture(source2,old_value,is_derived=!1){old_value!==UNINITIALIZED&&!this.previous.has(source2)&&this.previous.set(source2,old_value),(source2.f&ERROR_VALUE)===0&&(this.current.
set(source2,[source2.v,is_derived]),batch_values?.set(source2,source2.v))}activate(){current_batch=this}deactivate(){current_batch=null,batch_values=null}flush(){try{is_processing=!0,current_batch=this,this.#process()}finally{flush_count=0,last_scheduled_effect=null,collected_effects=null,legacy_updates=null,is_processing=!1,current_batch=null,batch_values=null,old_values.clear()}}discard(){for(const fn of this.#discard_callbacks)fn(this);this.#discard_callbacks.clear(),batches.delete(this)}register_created_effect(effect2){
this.#new_effects.push(effect2)}#commit(){for(const batch of batches){var is_earlier=batch.id<this.id,sources=[];for(const[source3,[value,is_derived]]of this.current){if(batch.current.has(source3)){var batch_value=batch.current.get(source3)[0];if(is_earlier&&value!==batch_value)batch.current.set(source3,[value,is_derived]);else continue}sources.push(source3)}var others=[...batch.current.keys()].filter(s2=>!this.current.has(s2));if(others.length===0)is_earlier&&batch.discard();else if(sources.length>
0){batch.activate();var marked=new Set,checked=new Map;for(var source2 of sources)mark_effects(source2,others,marked,checked);checked=new Map;var current_unequal=[...batch.current.keys()].filter(c2=>this.current.has(c2)?this.current.get(c2)[0]!==c2:!0);for(const effect2 of this.#new_effects)(effect2.f&(DESTROYED|INERT|EAGER_EFFECT))===0&&depends_on(effect2,current_unequal,checked)&&((effect2.f&(ASYNC|BLOCK_EFFECT))!==0?(set_signal_status(effect2,DIRTY),batch.schedule(effect2)):batch.#dirty_effects.
add(effect2));if(batch.#roots.length>0){batch.apply();for(var root2 of batch.#roots)batch.#traverse(root2,[],[]);batch.#roots=[]}batch.deactivate()}}for(const batch of batches)batch.#blockers.has(this)&&(batch.#blockers.delete(this),batch.#blockers.size===0&&!batch.#is_deferred()&&(batch.activate(),batch.#process()))}increment(blocking,effect2){let pending_count=this.#pending.get(effect2)??0;if(this.#pending.set(effect2,pending_count+1),blocking){let blocking_pending_count=this.#blocking_pending.
get(effect2)??0;this.#blocking_pending.set(effect2,blocking_pending_count+1)}}decrement(blocking,effect2,skip){let pending_count=this.#pending.get(effect2)??0;if(pending_count===1?this.#pending.delete(effect2):this.#pending.set(effect2,pending_count-1),blocking){let blocking_pending_count=this.#blocking_pending.get(effect2)??0;blocking_pending_count===1?this.#blocking_pending.delete(effect2):this.#blocking_pending.set(effect2,blocking_pending_count-1)}this.#decrement_queued||skip||(this.#decrement_queued=
!0,queue_micro_task(()=>{this.#decrement_queued=!1,this.flush()}))}transfer_effects(dirty_effects,maybe_dirty_effects){for(const e of dirty_effects)this.#dirty_effects.add(e);for(const e of maybe_dirty_effects)this.#maybe_dirty_effects.add(e);dirty_effects.clear(),maybe_dirty_effects.clear()}oncommit(fn){this.#commit_callbacks.add(fn)}ondiscard(fn){this.#discard_callbacks.add(fn)}settled(){return(this.#deferred??=deferred()).promise}static ensure(){if(current_batch===null){const batch=current_batch=
new Batch;is_processing||(batches.add(current_batch),is_flushing_sync||queue_micro_task(()=>{current_batch===batch&&batch.flush()}))}return current_batch}apply(){{batch_values=null;return}}schedule(effect2){if(last_scheduled_effect=effect2,effect2.b?.is_pending&&(effect2.f&(EFFECT|RENDER_EFFECT|MANAGED_EFFECT))!==0&&(effect2.f&REACTION_RAN)===0){effect2.b.defer_effect(effect2);return}for(var e=effect2;e.parent!==null;){e=e.parent;var flags2=e.f;if(collected_effects!==null&&e===active_effect&&(active_reaction===
null||(active_reaction.f&DERIVED)===0))return;if((flags2&(ROOT_EFFECT|BRANCH_EFFECT))!==0){if((flags2&CLEAN)===0)return;e.f^=CLEAN}}this.#roots.push(e)}}function flushSync(fn){var was_flushing_sync=is_flushing_sync;is_flushing_sync=!0;try{for(var result;;){if(flush_tasks(),current_batch===null)return result;current_batch.flush()}}finally{is_flushing_sync=was_flushing_sync}}function infinite_loop_guard(){try{effect_update_depth_exceeded()}catch(error2){invoke_error_boundary(error2,last_scheduled_effect)}}
let eager_block_effects=null;function flush_queued_effects(effects){var length=effects.length;if(length!==0){for(var i=0;i<length;){var effect2=effects[i++];if((effect2.f&(DESTROYED|INERT))===0&&is_dirty(effect2)&&(eager_block_effects=new Set,update_effect(effect2),effect2.deps===null&&effect2.first===null&&effect2.nodes===null&&effect2.teardown===null&&effect2.ac===null&&unlink_effect(effect2),eager_block_effects?.size>0)){old_values.clear();for(const e of eager_block_effects){if((e.f&(DESTROYED|
INERT))!==0)continue;const ordered_effects=[e];let ancestor=e.parent;for(;ancestor!==null;)eager_block_effects.has(ancestor)&&(eager_block_effects.delete(ancestor),ordered_effects.push(ancestor)),ancestor=ancestor.parent;for(let j=ordered_effects.length-1;j>=0;j--){const e2=ordered_effects[j];(e2.f&(DESTROYED|INERT))===0&&update_effect(e2)}}eager_block_effects.clear()}}eager_block_effects=null}}function mark_effects(value,sources,marked,checked){if(!marked.has(value)&&(marked.add(value),value.reactions!==
null))for(const reaction of value.reactions){const flags2=reaction.f;(flags2&DERIVED)!==0?mark_effects(reaction,sources,marked,checked):(flags2&(ASYNC|BLOCK_EFFECT))!==0&&(flags2&DIRTY)===0&&depends_on(reaction,sources,checked)&&(set_signal_status(reaction,DIRTY),schedule_effect(reaction))}}function depends_on(reaction,sources,checked){const depends=checked.get(reaction);if(depends!==void 0)return depends;if(reaction.deps!==null)for(const dep of reaction.deps){if(includes.call(sources,dep))return!0;
if((dep.f&DERIVED)!==0&&depends_on(dep,sources,checked))return checked.set(dep,!0),!0}return checked.set(reaction,!1),!1}function schedule_effect(effect2){current_batch.schedule(effect2)}function reset_branch(effect2,tracked){if(!((effect2.f&BRANCH_EFFECT)!==0&&(effect2.f&CLEAN)!==0)){(effect2.f&DIRTY)!==0?tracked.d.push(effect2):(effect2.f&MAYBE_DIRTY)!==0&&tracked.m.push(effect2),set_signal_status(effect2,CLEAN);for(var e=effect2.first;e!==null;)reset_branch(e,tracked),e=e.next}}function reset_all(effect2){
set_signal_status(effect2,CLEAN);for(var e=effect2.first;e!==null;)reset_all(e),e=e.next}function createSubscriber(start2){let subscribers=0,version2=source$2(0),stop;return()=>{effect_tracking()&&(get$3(version2),render_effect(()=>(subscribers===0&&(stop=untrack$1(()=>start2(()=>increment$1(version2)))),subscribers+=1,()=>{queue_micro_task(()=>{subscribers-=1,subscribers===0&&(stop?.(),stop=void 0,increment$1(version2))})})))}}var flags=EFFECT_TRANSPARENT|EFFECT_PRESERVED;function boundary(node2,props,children,transform_error){
new Boundary(node2,props,children,transform_error)}class Boundary{parent;is_pending=!1;transform_error;#anchor;#hydrate_open=hydrating?hydrate_node:null;#props;#children;#effect;#main_effect=null;#pending_effect=null;#failed_effect=null;#offscreen_fragment=null;#local_pending_count=0;#pending_count=0;#pending_count_update_queued=!1;#dirty_effects=new Set;#maybe_dirty_effects=new Set;#effect_pending=null;#effect_pending_subscriber=createSubscriber(()=>(this.#effect_pending=source$2(this.#local_pending_count),
()=>{this.#effect_pending=null}));constructor(node2,props,children,transform_error){this.#anchor=node2,this.#props=props,this.#children=anchor=>{var effect2=active_effect;effect2.b=this,effect2.f|=BOUNDARY_EFFECT,children(anchor)},this.parent=active_effect.b,this.transform_error=transform_error??this.parent?.transform_error??(e=>e),this.#effect=block(()=>{if(hydrating){const comment2=this.#hydrate_open;hydrate_next();const server_rendered_pending=comment2.data===HYDRATION_START_ELSE;if(comment2.
data.startsWith(HYDRATION_START_FAILED)){const serialized_error=JSON.parse(comment2.data.slice(HYDRATION_START_FAILED.length));this.#hydrate_failed_content(serialized_error)}else server_rendered_pending?this.#hydrate_pending_content():this.#hydrate_resolved_content()}else this.#render()},flags),hydrating&&(this.#anchor=hydrate_node)}#hydrate_resolved_content(){try{this.#main_effect=branch(()=>this.#children(this.#anchor))}catch(error2){this.error(error2)}}#hydrate_failed_content(error2){const failed=this.#props.
failed;failed&&(this.#failed_effect=branch(()=>{failed(this.#anchor,()=>error2,()=>()=>{})}))}#hydrate_pending_content(){const pending=this.#props.pending;pending&&(this.is_pending=!0,this.#pending_effect=branch(()=>pending(this.#anchor)),queue_micro_task(()=>{var fragment=this.#offscreen_fragment=document.createDocumentFragment(),anchor=create_text();fragment.append(anchor),this.#main_effect=this.#run(()=>branch(()=>this.#children(anchor))),this.#pending_count===0&&(this.#anchor.before(fragment),
this.#offscreen_fragment=null,pause_effect(this.#pending_effect,()=>{this.#pending_effect=null}),this.#resolve(current_batch))}))}#render(){try{if(this.is_pending=this.has_pending_snippet(),this.#pending_count=0,this.#local_pending_count=0,this.#main_effect=branch(()=>{this.#children(this.#anchor)}),this.#pending_count>0){var fragment=this.#offscreen_fragment=document.createDocumentFragment();move_effect(this.#main_effect,fragment);const pending=this.#props.pending;this.#pending_effect=branch(()=>pending(
this.#anchor))}else this.#resolve(current_batch)}catch(error2){this.error(error2)}}#resolve(batch){this.is_pending=!1,batch.transfer_effects(this.#dirty_effects,this.#maybe_dirty_effects)}defer_effect(effect2){defer_effect(effect2,this.#dirty_effects,this.#maybe_dirty_effects)}is_rendered(){return!this.is_pending&&(!this.parent||this.parent.is_rendered())}has_pending_snippet(){return!!this.#props.pending}#run(fn){var previous_effect=active_effect,previous_reaction=active_reaction,previous_ctx=component_context;
set_active_effect(this.#effect),set_active_reaction(this.#effect),set_component_context(this.#effect.ctx);try{return Batch.ensure(),fn()}catch(e){return handle_error$1(e),null}finally{set_active_effect(previous_effect),set_active_reaction(previous_reaction),set_component_context(previous_ctx)}}#update_pending_count(d2,batch){if(!this.has_pending_snippet()){this.parent&&this.parent.#update_pending_count(d2,batch);return}this.#pending_count+=d2,this.#pending_count===0&&(this.#resolve(batch),this.#pending_effect&&
pause_effect(this.#pending_effect,()=>{this.#pending_effect=null}),this.#offscreen_fragment&&(this.#anchor.before(this.#offscreen_fragment),this.#offscreen_fragment=null))}update_pending_count(d2,batch){this.#update_pending_count(d2,batch),this.#local_pending_count+=d2,!(!this.#effect_pending||this.#pending_count_update_queued)&&(this.#pending_count_update_queued=!0,queue_micro_task(()=>{this.#pending_count_update_queued=!1,this.#effect_pending&&internal_set(this.#effect_pending,this.#local_pending_count)}))}get_effect_pending(){
return this.#effect_pending_subscriber(),get$3(this.#effect_pending)}error(error2){var onerror=this.#props.onerror;let failed=this.#props.failed;if(!onerror&&!failed)throw error2;this.#main_effect&&(destroy_effect(this.#main_effect),this.#main_effect=null),this.#pending_effect&&(destroy_effect(this.#pending_effect),this.#pending_effect=null),this.#failed_effect&&(destroy_effect(this.#failed_effect),this.#failed_effect=null),hydrating&&(set_hydrate_node(this.#hydrate_open),next$1(),set_hydrate_node(
skip_nodes()));var did_reset=!1,calling_on_error=!1;const reset2=()=>{if(did_reset){svelte_boundary_reset_noop();return}did_reset=!0,calling_on_error&&svelte_boundary_reset_onerror(),this.#failed_effect!==null&&pause_effect(this.#failed_effect,()=>{this.#failed_effect=null}),this.#run(()=>{this.#render()})},handle_error_result=transformed_error=>{try{calling_on_error=!0,onerror?.(transformed_error,reset2),calling_on_error=!1}catch(error3){invoke_error_boundary(error3,this.#effect&&this.#effect.parent)}
failed&&(this.#failed_effect=this.#run(()=>{try{return branch(()=>{var effect2=active_effect;effect2.b=this,effect2.f|=BOUNDARY_EFFECT,failed(this.#anchor,()=>transformed_error,()=>reset2)})}catch(error3){return invoke_error_boundary(error3,this.#effect.parent),null}}))};queue_micro_task(()=>{var result;try{result=this.transform_error(error2)}catch(e){invoke_error_boundary(e,this.#effect&&this.#effect.parent);return}result!==null&&typeof result=="object"&&typeof result.then=="function"?result.then(
handle_error_result,e=>invoke_error_boundary(e,this.#effect&&this.#effect.parent)):handle_error_result(result)})}}function flatten(blockers,sync,async,fn){const d2=is_runes()?derived:derived_safe_equal;var pending=blockers.filter(b=>!b.settled);if(async.length===0&&pending.length===0){fn(sync.map(d2));return}var parent=active_effect,restore=capture(),blocker_promise=pending.length===1?pending[0].promise:pending.length>1?Promise.all(pending.map(b=>b.promise)):null;function finish(values){restore();
try{fn(values)}catch(error2){(parent.f&DESTROYED)===0&&invoke_error_boundary(error2,parent)}unset_context()}if(async.length===0){blocker_promise.then(()=>finish(sync.map(d2)));return}var decrement_pending=increment_pending();function run2(){Promise.all(async.map(expression=>async_derived(expression))).then(result=>finish([...sync.map(d2),...result])).catch(error2=>invoke_error_boundary(error2,parent)).finally(()=>decrement_pending())}blocker_promise?blocker_promise.then(()=>{restore(),run2(),unset_context()}):
run2()}function capture(){var previous_effect=active_effect,previous_reaction=active_reaction,previous_component_context=component_context,previous_batch=current_batch;return function(activate_batch=!0){set_active_effect(previous_effect),set_active_reaction(previous_reaction),set_component_context(previous_component_context),activate_batch&&(previous_effect.f&DESTROYED)===0&&(previous_batch?.activate(),previous_batch?.apply())}}function unset_context(deactivate_batch=!0){set_active_effect(null),
set_active_reaction(null),set_component_context(null),deactivate_batch&&current_batch?.deactivate()}function increment_pending(){var effect2=active_effect,boundary2=effect2.b,batch=current_batch,blocking=boundary2.is_rendered();return boundary2.update_pending_count(1,batch),batch.increment(blocking,effect2),(skip=!1)=>{boundary2.update_pending_count(-1,batch),batch.decrement(blocking,effect2,skip)}}function derived(fn){var flags2=DERIVED|DIRTY,parent_derived=active_reaction!==null&&(active_reaction.
f&DERIVED)!==0?active_reaction:null;return active_effect!==null&&(active_effect.f|=EFFECT_PRESERVED),{ctx:component_context,deps:null,effects:null,equals,f:flags2,fn,reactions:null,rv:0,v:UNINITIALIZED,wv:0,parent:parent_derived??active_effect,ac:null}}function async_derived(fn,label,location2){let parent=active_effect;parent===null&&async_derived_orphan();var promise=void 0,signal=source$2(UNINITIALIZED),should_suspend=!active_reaction,deferreds=new Map;return async_effect(()=>{var effect2=active_effect,
d2=deferred();promise=d2.promise;try{Promise.resolve(fn()).then(d2.resolve,d2.reject).finally(unset_context)}catch(error2){d2.reject(error2),unset_context()}var batch=current_batch;if(should_suspend){if((effect2.f&REACTION_RAN)!==0)var decrement_pending=increment_pending();if(parent.b.is_rendered())deferreds.get(batch)?.reject(STALE_REACTION),deferreds.delete(batch);else{for(const d3 of deferreds.values())d3.reject(STALE_REACTION);deferreds.clear()}deferreds.set(batch,d2)}const handler=(value,error2=void 0)=>{
if(decrement_pending){var skip=error2===STALE_REACTION;decrement_pending(skip)}if(!(error2===STALE_REACTION||(effect2.f&DESTROYED)!==0)){if(batch.activate(),error2)signal.f|=ERROR_VALUE,internal_set(signal,error2);else{(signal.f&ERROR_VALUE)!==0&&(signal.f^=ERROR_VALUE),internal_set(signal,value);for(const[b,d3]of deferreds){if(deferreds.delete(b),b===batch)break;d3.reject(STALE_REACTION)}}batch.deactivate()}};d2.promise.then(handler,e=>handler(null,e||"unknown"))}),teardown(()=>{for(const d2 of deferreds.
values())d2.reject(STALE_REACTION)}),new Promise(fulfil=>{function next2(p2){function go2(){p2===promise?fulfil(signal):next2(promise)}p2.then(go2,go2)}next2(promise)})}function user_derived(fn){const d2=derived(fn);return push_reaction_value(d2),d2}function derived_safe_equal(fn){const signal=derived(fn);return signal.equals=safe_equals,signal}function destroy_derived_effects(derived2){var effects=derived2.effects;if(effects!==null){derived2.effects=null;for(var i=0;i<effects.length;i+=1)destroy_effect(
effects[i])}}function get_derived_parent_effect(derived2){for(var parent=derived2.parent;parent!==null;){if((parent.f&DERIVED)===0)return(parent.f&DESTROYED)===0?parent:null;parent=parent.parent}return null}function execute_derived(derived2){var value,prev_active_effect=active_effect;set_active_effect(get_derived_parent_effect(derived2));try{derived2.f&=~WAS_MARKED,destroy_derived_effects(derived2),value=update_reaction(derived2)}finally{set_active_effect(prev_active_effect)}return value}function update_derived(derived2){
var old_value=derived2.v,value=execute_derived(derived2);if(!derived2.equals(value)&&(derived2.wv=increment_write_version(),(!current_batch?.is_fork||derived2.deps===null)&&(derived2.v=value,current_batch?.capture(derived2,old_value,!0),derived2.deps===null))){set_signal_status(derived2,CLEAN);return}is_destroying_effect||(batch_values!==null?(effect_tracking()||current_batch?.is_fork)&&batch_values.set(derived2,value):update_derived_status(derived2))}function freeze_derived_effects(derived2){if(derived2.
effects!==null)for(const e of derived2.effects)(e.teardown||e.ac)&&(e.teardown?.(),e.ac?.abort(STALE_REACTION),e.teardown=noop$3,e.ac=null,remove_reactions(e,0),destroy_effect_children(e))}function unfreeze_derived_effects(derived2){if(derived2.effects!==null)for(const e of derived2.effects)e.teardown&&update_effect(e)}let eager_effects=new Set;const old_values=new Map;let eager_effects_deferred=!1;function source$2(v,stack){var signal={f:0,v,reactions:null,equals,rv:0,wv:0};return signal}function state$1(v,stack){
const s2=source$2(v);return push_reaction_value(s2),s2}function mutable_source(initial_value,immutable=!1,trackable=!0){const s2=source$2(initial_value);return immutable||(s2.equals=safe_equals),legacy_mode_flag&&trackable&&component_context!==null&&component_context.l!==null&&(component_context.l.s??=[]).push(s2),s2}function set$1(source2,value,should_proxy=!1){active_reaction!==null&&(!untracking||(active_reaction.f&EAGER_EFFECT)!==0)&&is_runes()&&(active_reaction.f&(DERIVED|BLOCK_EFFECT|ASYNC|
EAGER_EFFECT))!==0&&(current_sources===null||!includes.call(current_sources,source2))&&state_unsafe_mutation();let new_value=should_proxy?proxy(value):value;return internal_set(source2,new_value,legacy_updates)}function internal_set(source2,value,updated_during_traversal=null){if(!source2.equals(value)){var old_value=source2.v;is_destroying_effect?old_values.set(source2,value):old_values.set(source2,old_value),source2.v=value;var batch=Batch.ensure();if(batch.capture(source2,old_value),(source2.
f&DERIVED)!==0){const derived2=source2;(source2.f&DIRTY)!==0&&execute_derived(derived2),batch_values===null&&update_derived_status(derived2)}source2.wv=increment_write_version(),mark_reactions(source2,DIRTY,updated_during_traversal),is_runes()&&active_effect!==null&&(active_effect.f&CLEAN)!==0&&(active_effect.f&(BRANCH_EFFECT|ROOT_EFFECT))===0&&(untracked_writes===null?set_untracked_writes([source2]):untracked_writes.push(source2)),!batch.is_fork&&eager_effects.size>0&&!eager_effects_deferred&&flush_eager_effects()}
return value}function flush_eager_effects(){eager_effects_deferred=!1;for(const effect2 of eager_effects)(effect2.f&CLEAN)!==0&&set_signal_status(effect2,MAYBE_DIRTY),is_dirty(effect2)&&update_effect(effect2);eager_effects.clear()}function update$1(source2,d2=1){var value=get$3(source2),result=d2===1?value++:value--;return set$1(source2,value),result}function increment$1(source2){set$1(source2,source2.v+1)}function mark_reactions(signal,status,updated_during_traversal){var reactions=signal.reactions;
if(reactions!==null)for(var runes=is_runes(),length=reactions.length,i=0;i<length;i++){var reaction=reactions[i],flags2=reaction.f;if(!(!runes&&reaction===active_effect)){var not_dirty=(flags2&DIRTY)===0;if(not_dirty&&set_signal_status(reaction,status),(flags2&DERIVED)!==0){var derived2=reaction;batch_values?.delete(derived2),(flags2&WAS_MARKED)===0&&(flags2&CONNECTED&&(reaction.f|=WAS_MARKED),mark_reactions(derived2,MAYBE_DIRTY,updated_during_traversal))}else if(not_dirty){var effect2=reaction;
(flags2&BLOCK_EFFECT)!==0&&eager_block_effects!==null&&eager_block_effects.add(effect2),updated_during_traversal!==null?updated_during_traversal.push(effect2):schedule_effect(effect2)}}}}function proxy(value){if(typeof value!="object"||value===null||STATE_SYMBOL in value)return value;const prototype=get_prototype_of(value);if(prototype!==object_prototype&&prototype!==array_prototype)return value;var sources=new Map,is_proxied_array=is_array(value),version2=state$1(0),parent_version=update_version,
with_parent=fn=>{if(update_version===parent_version)return fn();var reaction=active_reaction,version3=update_version;set_active_reaction(null),set_update_version(parent_version);var result=fn();return set_active_reaction(reaction),set_update_version(version3),result};return is_proxied_array&&sources.set("length",state$1(value.length)),new Proxy(value,{defineProperty(_,prop2,descriptor){(!("value"in descriptor)||descriptor.configurable===!1||descriptor.enumerable===!1||descriptor.writable===!1)&&
state_descriptors_fixed();var s2=sources.get(prop2);return s2===void 0?with_parent(()=>{var s3=state$1(descriptor.value);return sources.set(prop2,s3),s3}):set$1(s2,descriptor.value,!0),!0},deleteProperty(target2,prop2){var s2=sources.get(prop2);if(s2===void 0){if(prop2 in target2){const s3=with_parent(()=>state$1(UNINITIALIZED));sources.set(prop2,s3),increment$1(version2)}}else set$1(s2,UNINITIALIZED),increment$1(version2);return!0},get(target2,prop2,receiver){if(prop2===STATE_SYMBOL)return value;
var s2=sources.get(prop2),exists=prop2 in target2;if(s2===void 0&&(!exists||get_descriptor(target2,prop2)?.writable)&&(s2=with_parent(()=>{var p2=proxy(exists?target2[prop2]:UNINITIALIZED),s3=state$1(p2);return s3}),sources.set(prop2,s2)),s2!==void 0){var v=get$3(s2);return v===UNINITIALIZED?void 0:v}return Reflect.get(target2,prop2,receiver)},getOwnPropertyDescriptor(target2,prop2){var descriptor=Reflect.getOwnPropertyDescriptor(target2,prop2);if(descriptor&&"value"in descriptor){var s2=sources.
get(prop2);s2&&(descriptor.value=get$3(s2))}else if(descriptor===void 0){var source2=sources.get(prop2),value2=source2?.v;if(source2!==void 0&&value2!==UNINITIALIZED)return{enumerable:!0,configurable:!0,value:value2,writable:!0}}return descriptor},has(target2,prop2){if(prop2===STATE_SYMBOL)return!0;var s2=sources.get(prop2),has=s2!==void 0&&s2.v!==UNINITIALIZED||Reflect.has(target2,prop2);if(s2!==void 0||active_effect!==null&&(!has||get_descriptor(target2,prop2)?.writable)){s2===void 0&&(s2=with_parent(
()=>{var p2=has?proxy(target2[prop2]):UNINITIALIZED,s3=state$1(p2);return s3}),sources.set(prop2,s2));var value2=get$3(s2);if(value2===UNINITIALIZED)return!1}return has},set(target2,prop2,value2,receiver){var s2=sources.get(prop2),has=prop2 in target2;if(is_proxied_array&&prop2==="length")for(var i=value2;i<s2.v;i+=1){var other_s=sources.get(i+"");other_s!==void 0?set$1(other_s,UNINITIALIZED):i in target2&&(other_s=with_parent(()=>state$1(UNINITIALIZED)),sources.set(i+"",other_s))}if(s2===void 0)
(!has||get_descriptor(target2,prop2)?.writable)&&(s2=with_parent(()=>state$1(void 0)),set$1(s2,proxy(value2)),sources.set(prop2,s2));else{has=s2.v!==UNINITIALIZED;var p2=with_parent(()=>proxy(value2));set$1(s2,p2)}var descriptor=Reflect.getOwnPropertyDescriptor(target2,prop2);if(descriptor?.set&&descriptor.set.call(receiver,value2),!has){if(is_proxied_array&&typeof prop2=="string"){var ls=sources.get("length"),n=Number(prop2);Number.isInteger(n)&&n>=ls.v&&set$1(ls,n+1)}increment$1(version2)}return!0},
ownKeys(target2){get$3(version2);var own_keys=Reflect.ownKeys(target2).filter(key3=>{var source3=sources.get(key3);return source3===void 0||source3.v!==UNINITIALIZED});for(var[key2,source2]of sources)source2.v!==UNINITIALIZED&&!(key2 in target2)&&own_keys.push(key2);return own_keys},setPrototypeOf(){state_prototype_fixed()}})}function get_proxied_value(value){try{if(value!==null&&typeof value=="object"&&STATE_SYMBOL in value)return value[STATE_SYMBOL]}catch{}return value}function is(a,b){return Object.
is(get_proxied_value(a),get_proxied_value(b))}var $window,$document,is_firefox,first_child_getter,next_sibling_getter;function init_operations(){if($window===void 0){$window=window,$document=document,is_firefox=/Firefox/.test(navigator.userAgent);var element_prototype=Element.prototype,node_prototype=Node.prototype,text_prototype=Text.prototype;first_child_getter=get_descriptor(node_prototype,"firstChild").get,next_sibling_getter=get_descriptor(node_prototype,"nextSibling").get,is_extensible(element_prototype)&&
(element_prototype.__click=void 0,element_prototype.__className=void 0,element_prototype.__attributes=null,element_prototype.__style=void 0,element_prototype.__e=void 0),is_extensible(text_prototype)&&(text_prototype.__t=void 0)}}function create_text(value=""){return document.createTextNode(value)}function get_first_child(node2){return first_child_getter.call(node2)}function get_next_sibling(node2){return next_sibling_getter.call(node2)}function child(node2,is_text){if(!hydrating)return get_first_child(
node2);var child2=get_first_child(hydrate_node);if(child2===null)child2=hydrate_node.appendChild(create_text());else if(is_text&&child2.nodeType!==TEXT_NODE){var text2=create_text();return child2?.before(text2),set_hydrate_node(text2),text2}return is_text&&merge_text_nodes(child2),set_hydrate_node(child2),child2}function first_child(node2,is_text=!1){if(!hydrating){var first=get_first_child(node2);return first instanceof Comment&&first.data===""?get_next_sibling(first):first}if(is_text){if(hydrate_node?.
nodeType!==TEXT_NODE){var text2=create_text();return hydrate_node?.before(text2),set_hydrate_node(text2),text2}merge_text_nodes(hydrate_node)}return hydrate_node}function sibling(node2,count=1,is_text=!1){let next_sibling=hydrating?hydrate_node:node2;for(var last_sibling;count--;)last_sibling=next_sibling,next_sibling=get_next_sibling(next_sibling);if(!hydrating)return next_sibling;if(is_text){if(next_sibling?.nodeType!==TEXT_NODE){var text2=create_text();return next_sibling===null?last_sibling?.
after(text2):next_sibling.before(text2),set_hydrate_node(text2),text2}merge_text_nodes(next_sibling)}return set_hydrate_node(next_sibling),next_sibling}function clear_text_content(node2){node2.textContent=""}function should_defer_append(){return!1}function create_element(tag,namespace,is2){return document.createElementNS(namespace??NAMESPACE_HTML,tag,void 0)}function merge_text_nodes(text2){if(text2.nodeValue.length<65536)return;let next2=text2.nextSibling;for(;next2!==null&&next2.nodeType===TEXT_NODE;)
next2.remove(),text2.nodeValue+=next2.nodeValue,next2=text2.nextSibling}function autofocus(dom,value){if(value){const body2=document.body;dom.autofocus=!0,queue_micro_task(()=>{document.activeElement===body2&&dom.focus()})}}function remove_textarea_child(dom){hydrating&&get_first_child(dom)!==null&&clear_text_content(dom)}let listening_to_form_reset=!1;function add_form_reset_listener(){listening_to_form_reset||(listening_to_form_reset=!0,document.addEventListener("reset",evt=>{Promise.resolve().
then(()=>{if(!evt.defaultPrevented)for(const e of evt.target.elements)e.__on_r?.()})},{capture:!0}))}function listen(target2,events,handler,call_handler_immediately=!0){call_handler_immediately&&handler();for(var name of events)target2.addEventListener(name,handler);teardown(()=>{for(var name2 of events)target2.removeEventListener(name2,handler)})}function without_reactive_context(fn){var previous_reaction=active_reaction,previous_effect=active_effect;set_active_reaction(null),set_active_effect(
null);try{return fn()}finally{set_active_reaction(previous_reaction),set_active_effect(previous_effect)}}function listen_to_event_and_reset_event(element2,event2,handler,on_reset=handler){element2.addEventListener(event2,()=>without_reactive_context(handler));const prev2=element2.__on_r;prev2?element2.__on_r=()=>{prev2(),on_reset(!0)}:element2.__on_r=()=>on_reset(!0),add_form_reset_listener()}function validate_effect(rune){active_effect===null&&(active_reaction===null&&effect_orphan(),effect_in_unowned_derived()),
is_destroying_effect&&effect_in_teardown()}function push_effect(effect2,parent_effect){var parent_last=parent_effect.last;parent_last===null?parent_effect.last=parent_effect.first=effect2:(parent_last.next=effect2,effect2.prev=parent_last,parent_effect.last=effect2)}function create_effect(type2,fn){var parent=active_effect;parent!==null&&(parent.f&INERT)!==0&&(type2|=INERT);var effect2={ctx:component_context,deps:null,nodes:null,f:type2|DIRTY|CONNECTED,first:null,fn,last:null,next:null,parent,b:parent&&
parent.b,prev:null,teardown:null,wv:0,ac:null};current_batch?.register_created_effect(effect2);var e=effect2;if((type2&EFFECT)!==0)collected_effects!==null?collected_effects.push(effect2):Batch.ensure().schedule(effect2);else if(fn!==null){try{update_effect(effect2)}catch(e2){throw destroy_effect(effect2),e2}e.deps===null&&e.teardown===null&&e.nodes===null&&e.first===e.last&&(e.f&EFFECT_PRESERVED)===0&&(e=e.first,(type2&BLOCK_EFFECT)!==0&&(type2&EFFECT_TRANSPARENT)!==0&&e!==null&&(e.f|=EFFECT_TRANSPARENT))}
if(e!==null&&(e.parent=parent,parent!==null&&push_effect(e,parent),active_reaction!==null&&(active_reaction.f&DERIVED)!==0&&(type2&ROOT_EFFECT)===0)){var derived2=active_reaction;(derived2.effects??=[]).push(e)}return effect2}function effect_tracking(){return active_reaction!==null&&!untracking}function teardown(fn){const effect2=create_effect(RENDER_EFFECT,null);return set_signal_status(effect2,CLEAN),effect2.teardown=fn,effect2}function user_effect(fn){validate_effect();var flags2=active_effect.
f,defer=!active_reaction&&(flags2&BRANCH_EFFECT)!==0&&(flags2&REACTION_RAN)===0;if(defer){var context=component_context;(context.e??=[]).push(fn)}else return create_user_effect(fn)}function create_user_effect(fn){return create_effect(EFFECT|USER_EFFECT,fn)}function user_pre_effect(fn){return validate_effect(),create_effect(RENDER_EFFECT|USER_EFFECT,fn)}function effect_root(fn){Batch.ensure();const effect2=create_effect(ROOT_EFFECT|EFFECT_PRESERVED,fn);return()=>{destroy_effect(effect2)}}function component_root(fn){
Batch.ensure();const effect2=create_effect(ROOT_EFFECT|EFFECT_PRESERVED,fn);return(options={})=>new Promise(fulfil=>{options.outro?pause_effect(effect2,()=>{destroy_effect(effect2),fulfil(void 0)}):(destroy_effect(effect2),fulfil(void 0))})}function effect(fn){return create_effect(EFFECT,fn)}function async_effect(fn){return create_effect(ASYNC|EFFECT_PRESERVED,fn)}function render_effect(fn,flags2=0){return create_effect(RENDER_EFFECT|flags2,fn)}function template_effect(fn,sync=[],async=[],blockers=[]){
flatten(blockers,sync,async,values=>{create_effect(RENDER_EFFECT,()=>fn(...values.map(get$3)))})}function deferred_template_effect(fn,sync=[],async=[],blockers=[]){if(async.length>0||blockers.length>0)var decrement_pending=increment_pending();flatten(blockers,sync,async,values=>{create_effect(EFFECT,()=>fn(...values.map(get$3))),decrement_pending&&decrement_pending()})}function block(fn,flags2=0){var effect2=create_effect(BLOCK_EFFECT|flags2,fn);return effect2}function managed(fn,flags2=0){var effect2=create_effect(
MANAGED_EFFECT|flags2,fn);return effect2}function branch(fn){return create_effect(BRANCH_EFFECT|EFFECT_PRESERVED,fn)}function execute_effect_teardown(effect2){var teardown2=effect2.teardown;if(teardown2!==null){const previously_destroying_effect=is_destroying_effect,previous_reaction=active_reaction;set_is_destroying_effect(!0),set_active_reaction(null);try{teardown2.call(null)}finally{set_is_destroying_effect(previously_destroying_effect),set_active_reaction(previous_reaction)}}}function destroy_effect_children(signal,remove_dom=!1){
var effect2=signal.first;for(signal.first=signal.last=null;effect2!==null;){const controller=effect2.ac;controller!==null&&without_reactive_context(()=>{controller.abort(STALE_REACTION)});var next2=effect2.next;(effect2.f&ROOT_EFFECT)!==0?effect2.parent=null:destroy_effect(effect2,remove_dom),effect2=next2}}function destroy_block_effect_children(signal){for(var effect2=signal.first;effect2!==null;){var next2=effect2.next;(effect2.f&BRANCH_EFFECT)===0&&destroy_effect(effect2),effect2=next2}}function destroy_effect(effect2,remove_dom=!0){
var removed=!1;(remove_dom||(effect2.f&HEAD_EFFECT)!==0)&&effect2.nodes!==null&&effect2.nodes.end!==null&&(remove_effect_dom(effect2.nodes.start,effect2.nodes.end),removed=!0),set_signal_status(effect2,DESTROYING),destroy_effect_children(effect2,remove_dom&&!removed),remove_reactions(effect2,0);var transitions=effect2.nodes&&effect2.nodes.t;if(transitions!==null)for(const transition2 of transitions)transition2.stop();execute_effect_teardown(effect2),effect2.f^=DESTROYING,effect2.f|=DESTROYED;var parent=effect2.
parent;parent!==null&&parent.first!==null&&unlink_effect(effect2),effect2.next=effect2.prev=effect2.teardown=effect2.ctx=effect2.deps=effect2.fn=effect2.nodes=effect2.ac=effect2.b=null}function remove_effect_dom(node2,end){for(;node2!==null;){var next2=node2===end?null:get_next_sibling(node2);node2.remove(),node2=next2}}function unlink_effect(effect2){var parent=effect2.parent,prev2=effect2.prev,next2=effect2.next;prev2!==null&&(prev2.next=next2),next2!==null&&(next2.prev=prev2),parent!==null&&(parent.
first===effect2&&(parent.first=next2),parent.last===effect2&&(parent.last=prev2))}function pause_effect(effect2,callback,destroy=!0){var transitions=[];pause_children(effect2,transitions,!0);var fn=()=>{destroy&&destroy_effect(effect2),callback&&callback()},remaining=transitions.length;if(remaining>0){var check=()=>--remaining||fn();for(var transition2 of transitions)transition2.out(check)}else fn()}function pause_children(effect2,transitions,local){if((effect2.f&INERT)===0){effect2.f^=INERT;var t=effect2.
nodes&&effect2.nodes.t;if(t!==null)for(const transition2 of t)(transition2.is_global||local)&&transitions.push(transition2);for(var child2=effect2.first;child2!==null;){var sibling2=child2.next,transparent=(child2.f&EFFECT_TRANSPARENT)!==0||(child2.f&BRANCH_EFFECT)!==0&&(effect2.f&BLOCK_EFFECT)!==0;pause_children(child2,transitions,transparent?local:!1),child2=sibling2}}}function resume_effect(effect2){resume_children(effect2,!0)}function resume_children(effect2,local){if((effect2.f&INERT)!==0){
effect2.f^=INERT,(effect2.f&CLEAN)===0&&(set_signal_status(effect2,DIRTY),Batch.ensure().schedule(effect2));for(var child2=effect2.first;child2!==null;){var sibling2=child2.next,transparent=(child2.f&EFFECT_TRANSPARENT)!==0||(child2.f&BRANCH_EFFECT)!==0;resume_children(child2,transparent?local:!1),child2=sibling2}var t=effect2.nodes&&effect2.nodes.t;if(t!==null)for(const transition2 of t)(transition2.is_global||local)&&transition2.in()}}function move_effect(effect2,fragment){if(effect2.nodes)for(var node2=effect2.
nodes.start,end=effect2.nodes.end;node2!==null;){var next2=node2===end?null:get_next_sibling(node2);fragment.append(node2),node2=next2}}let is_updating_effect=!1,is_destroying_effect=!1;function set_is_destroying_effect(value){is_destroying_effect=value}let active_reaction=null,untracking=!1;function set_active_reaction(reaction){active_reaction=reaction}let active_effect=null;function set_active_effect(effect2){active_effect=effect2}let current_sources=null;function push_reaction_value(value){active_reaction!==
null&&(current_sources===null?current_sources=[value]:current_sources.push(value))}let new_deps=null,skipped_deps=0,untracked_writes=null;function set_untracked_writes(value){untracked_writes=value}let write_version=1,read_version=0,update_version=read_version;function set_update_version(value){update_version=value}function increment_write_version(){return++write_version}function is_dirty(reaction){var flags2=reaction.f;if((flags2&DIRTY)!==0)return!0;if(flags2&DERIVED&&(reaction.f&=~WAS_MARKED),
(flags2&MAYBE_DIRTY)!==0){for(var dependencies2=reaction.deps,length=dependencies2.length,i=0;i<length;i++){var dependency=dependencies2[i];if(is_dirty(dependency)&&update_derived(dependency),dependency.wv>reaction.wv)return!0}(flags2&CONNECTED)!==0&&batch_values===null&&set_signal_status(reaction,CLEAN)}return!1}function schedule_possible_effect_self_invalidation(signal,effect2,root2=!0){var reactions=signal.reactions;if(reactions!==null&&!(current_sources!==null&&includes.call(current_sources,
signal)))for(var i=0;i<reactions.length;i++){var reaction=reactions[i];(reaction.f&DERIVED)!==0?schedule_possible_effect_self_invalidation(reaction,effect2,!1):effect2===reaction&&(root2?set_signal_status(reaction,DIRTY):(reaction.f&CLEAN)!==0&&set_signal_status(reaction,MAYBE_DIRTY),schedule_effect(reaction))}}function update_reaction(reaction){var previous_deps=new_deps,previous_skipped_deps=skipped_deps,previous_untracked_writes=untracked_writes,previous_reaction=active_reaction,previous_sources=current_sources,
previous_component_context=component_context,previous_untracking=untracking,previous_update_version=update_version,flags2=reaction.f;new_deps=null,skipped_deps=0,untracked_writes=null,active_reaction=(flags2&(BRANCH_EFFECT|ROOT_EFFECT))===0?reaction:null,current_sources=null,set_component_context(reaction.ctx),untracking=!1,update_version=++read_version,reaction.ac!==null&&(without_reactive_context(()=>{reaction.ac.abort(STALE_REACTION)}),reaction.ac=null);try{reaction.f|=REACTION_IS_UPDATING;var fn=reaction.
fn,result=fn();reaction.f|=REACTION_RAN;var deps=reaction.deps,is_fork=current_batch?.is_fork;if(new_deps!==null){var i;if(is_fork||remove_reactions(reaction,skipped_deps),deps!==null&&skipped_deps>0)for(deps.length=skipped_deps+new_deps.length,i=0;i<new_deps.length;i++)deps[skipped_deps+i]=new_deps[i];else reaction.deps=deps=new_deps;if(effect_tracking()&&(reaction.f&CONNECTED)!==0)for(i=skipped_deps;i<deps.length;i++)(deps[i].reactions??=[]).push(reaction)}else!is_fork&&deps!==null&&skipped_deps<
deps.length&&(remove_reactions(reaction,skipped_deps),deps.length=skipped_deps);if(is_runes()&&untracked_writes!==null&&!untracking&&deps!==null&&(reaction.f&(DERIVED|MAYBE_DIRTY|DIRTY))===0)for(i=0;i<untracked_writes.length;i++)schedule_possible_effect_self_invalidation(untracked_writes[i],reaction);if(previous_reaction!==null&&previous_reaction!==reaction){if(read_version++,previous_reaction.deps!==null)for(let i2=0;i2<previous_skipped_deps;i2+=1)previous_reaction.deps[i2].rv=read_version;if(previous_deps!==
null)for(const dep of previous_deps)dep.rv=read_version;untracked_writes!==null&&(previous_untracked_writes===null?previous_untracked_writes=untracked_writes:previous_untracked_writes.push(...untracked_writes))}return(reaction.f&ERROR_VALUE)!==0&&(reaction.f^=ERROR_VALUE),result}catch(error2){return handle_error$1(error2)}finally{reaction.f^=REACTION_IS_UPDATING,new_deps=previous_deps,skipped_deps=previous_skipped_deps,untracked_writes=previous_untracked_writes,active_reaction=previous_reaction,
current_sources=previous_sources,set_component_context(previous_component_context),untracking=previous_untracking,update_version=previous_update_version}}function remove_reaction(signal,dependency){let reactions=dependency.reactions;if(reactions!==null){var index2=index_of.call(reactions,signal);if(index2!==-1){var new_length=reactions.length-1;new_length===0?reactions=dependency.reactions=null:(reactions[index2]=reactions[new_length],reactions.pop())}}if(reactions===null&&(dependency.f&DERIVED)!==
0&&(new_deps===null||!includes.call(new_deps,dependency))){var derived2=dependency;(derived2.f&CONNECTED)!==0&&(derived2.f^=CONNECTED,derived2.f&=~WAS_MARKED),update_derived_status(derived2),freeze_derived_effects(derived2),remove_reactions(derived2,0)}}function remove_reactions(signal,start_index){var dependencies2=signal.deps;if(dependencies2!==null)for(var i=start_index;i<dependencies2.length;i++)remove_reaction(signal,dependencies2[i])}function update_effect(effect2){var flags2=effect2.f;if((flags2&
DESTROYED)===0){set_signal_status(effect2,CLEAN);var previous_effect=active_effect,was_updating_effect=is_updating_effect;active_effect=effect2,is_updating_effect=!0;try{(flags2&(BLOCK_EFFECT|MANAGED_EFFECT))!==0?destroy_block_effect_children(effect2):destroy_effect_children(effect2),execute_effect_teardown(effect2);var teardown2=update_reaction(effect2);effect2.teardown=typeof teardown2=="function"?teardown2:null,effect2.wv=write_version;var dep}finally{is_updating_effect=was_updating_effect,active_effect=
previous_effect}}}async function tick(){await Promise.resolve(),flushSync()}function settled(){return Batch.ensure().settled()}function get$3(signal){var flags2=signal.f,is_derived=(flags2&DERIVED)!==0;if(active_reaction!==null&&!untracking){var destroyed=active_effect!==null&&(active_effect.f&DESTROYED)!==0;if(!destroyed&&(current_sources===null||!includes.call(current_sources,signal))){var deps=active_reaction.deps;if((active_reaction.f&REACTION_IS_UPDATING)!==0)signal.rv<read_version&&(signal.
rv=read_version,new_deps===null&&deps!==null&&deps[skipped_deps]===signal?skipped_deps++:new_deps===null?new_deps=[signal]:new_deps.push(signal));else{(active_reaction.deps??=[]).push(signal);var reactions=signal.reactions;reactions===null?signal.reactions=[active_reaction]:includes.call(reactions,active_reaction)||reactions.push(active_reaction)}}}if(is_destroying_effect&&old_values.has(signal))return old_values.get(signal);if(is_derived){var derived2=signal;if(is_destroying_effect){var value=derived2.
v;return((derived2.f&CLEAN)===0&&derived2.reactions!==null||depends_on_old_values(derived2))&&(value=execute_derived(derived2)),old_values.set(derived2,value),value}var should_connect=(derived2.f&CONNECTED)===0&&!untracking&&active_reaction!==null&&(is_updating_effect||(active_reaction.f&CONNECTED)!==0),is_new=(derived2.f&REACTION_RAN)===0;is_dirty(derived2)&&(should_connect&&(derived2.f|=CONNECTED),update_derived(derived2)),should_connect&&!is_new&&(unfreeze_derived_effects(derived2),reconnect(
derived2))}if(batch_values?.has(signal))return batch_values.get(signal);if((signal.f&ERROR_VALUE)!==0)throw signal.v;return signal.v}function reconnect(derived2){if(derived2.f|=CONNECTED,derived2.deps!==null)for(const dep of derived2.deps)(dep.reactions??=[]).push(derived2),(dep.f&DERIVED)!==0&&(dep.f&CONNECTED)===0&&(unfreeze_derived_effects(dep),reconnect(dep))}function depends_on_old_values(derived2){if(derived2.v===UNINITIALIZED)return!0;if(derived2.deps===null)return!1;for(const dep of derived2.
deps)if(old_values.has(dep)||(dep.f&DERIVED)!==0&&depends_on_old_values(dep))return!0;return!1}function untrack$1(fn){var previous_untracking=untracking;try{return untracking=!0,fn()}finally{untracking=previous_untracking}}function deep_read_state(value){if(!(typeof value!="object"||!value||value instanceof EventTarget)){if(STATE_SYMBOL in value)deep_read(value);else if(!Array.isArray(value))for(let key2 in value){const prop2=value[key2];typeof prop2=="object"&&prop2&&STATE_SYMBOL in prop2&&deep_read(
prop2)}}}function deep_read(value,visited=new Set){if(typeof value=="object"&&value!==null&&!(value instanceof EventTarget)&&!visited.has(value)){visited.add(value),value instanceof Date&&value.getTime();for(let key2 in value)try{deep_read(value[key2],visited)}catch{}const proto=get_prototype_of(value);if(proto!==Object.prototype&&proto!==Array.prototype&&proto!==Map.prototype&&proto!==Set.prototype&&proto!==Date.prototype){const descriptors=get_descriptors(proto);for(let key2 in descriptors){const get2=descriptors[key2].
get;if(get2)try{get2.call(value)}catch{}}}}}function createAttachmentKey(){return Symbol(ATTACHMENT_KEY)}function is_capture_event(name){return name.endsWith("capture")&&name!=="gotpointercapture"&&name!=="lostpointercapture"}const DELEGATED_EVENTS=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove",
"touchstart"];function can_delegate_event(event_name){return DELEGATED_EVENTS.includes(event_name)}const ATTRIBUTE_ALIASES={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject",novalidate:"noValidate",allowfullscreen:"allowFullscreen",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback"};function normalize_attribute(name){
return name=name.toLowerCase(),ATTRIBUTE_ALIASES[name]??name}const PASSIVE_EVENTS=["touchstart","touchmove"];function is_passive_event(name){return PASSIVE_EVENTS.includes(name)}const RAW_TEXT_ELEMENTS=["textarea","script","style","title"];function is_raw_text_element(name){return RAW_TEXT_ELEMENTS.includes(name)}const event_symbol=Symbol("events"),all_registered_events=new Set,root_event_handles=new Set;function replay_events(dom){if(!hydrating)return;dom.removeAttribute("onload"),dom.removeAttribute(
"onerror");const event2=dom.__e;event2!==void 0&&(dom.__e=void 0,queueMicrotask(()=>{dom.isConnected&&dom.dispatchEvent(event2)}))}function create_event(event_name,dom,handler,options={}){function target_handler(event2){if(options.capture||handle_event_propagation.call(dom,event2),!event2.cancelBubble)return without_reactive_context(()=>handler?.call(this,event2))}return event_name.startsWith("pointer")||event_name.startsWith("touch")||event_name==="wheel"?queue_micro_task(()=>{dom.addEventListener(
event_name,target_handler,options)}):dom.addEventListener(event_name,target_handler,options),target_handler}function on(element2,type2,handler,options={}){var target_handler=create_event(type2,element2,handler,options);return()=>{element2.removeEventListener(type2,target_handler,options)}}function event(event_name,dom,handler,capture2,passive){var options={capture:capture2,passive},target_handler=create_event(event_name,dom,handler,options);(dom===document.body||dom===window||dom===document||dom instanceof
HTMLMediaElement)&&teardown(()=>{dom.removeEventListener(event_name,target_handler,options)})}function delegated(event_name,element2,handler){(element2[event_symbol]??={})[event_name]=handler}function delegate(events){for(var i=0;i<events.length;i++)all_registered_events.add(events[i]);for(var fn of root_event_handles)fn(events)}let last_propagated_event=null;function handle_event_propagation(event2){var handler_element=this,owner_document=handler_element.ownerDocument,event_name=event2.type,path2=event2.
composedPath?.()||[],current_target=path2[0]||event2.target;last_propagated_event=event2;var path_idx=0,handled_at=last_propagated_event===event2&&event2[event_symbol];if(handled_at){var at_idx=path2.indexOf(handled_at);if(at_idx!==-1&&(handler_element===document||handler_element===window)){event2[event_symbol]=handler_element;return}var handler_idx=path2.indexOf(handler_element);if(handler_idx===-1)return;at_idx<=handler_idx&&(path_idx=at_idx)}if(current_target=path2[path_idx]||event2.target,current_target!==
handler_element){define_property(event2,"currentTarget",{configurable:!0,get(){return current_target||owner_document}});var previous_reaction=active_reaction,previous_effect=active_effect;set_active_reaction(null),set_active_effect(null);try{for(var throw_error,other_errors=[];current_target!==null;){var parent_element2=current_target.assignedSlot||current_target.parentNode||current_target.host||null;try{var delegated2=current_target[event_symbol]?.[event_name];delegated2!=null&&(!current_target.
disabled||event2.target===current_target)&&delegated2.call(current_target,event2)}catch(error2){throw_error?other_errors.push(error2):throw_error=error2}if(event2.cancelBubble||parent_element2===handler_element||parent_element2===null)break;current_target=parent_element2}if(throw_error){for(let error2 of other_errors)queueMicrotask(()=>{throw error2});throw throw_error}}finally{event2[event_symbol]=handler_element,delete event2.currentTarget,set_active_reaction(previous_reaction),set_active_effect(
previous_effect)}}}const policy=globalThis?.window?.trustedTypes&&globalThis.window.trustedTypes.createPolicy("svelte-trusted-html",{createHTML:html2=>html2});function create_trusted_html(html2){return policy?.createHTML(html2)??html2}function create_fragment_from_html(html2){var elem=create_element("template");return elem.innerHTML=create_trusted_html(html2.replaceAll("<!>","<!---->")),elem.content}function assign_nodes(start2,end){var effect2=active_effect;effect2.nodes===null&&(effect2.nodes=
{start:start2,end,a:null,t:null})}function from_html(content2,flags2){var is_fragment=(flags2&TEMPLATE_FRAGMENT)!==0,use_import_node=(flags2&TEMPLATE_USE_IMPORT_NODE)!==0,node2,has_start=!content2.startsWith("<!>");return()=>{if(hydrating)return assign_nodes(hydrate_node,null),hydrate_node;node2===void 0&&(node2=create_fragment_from_html(has_start?content2:"<!>"+content2),is_fragment||(node2=get_first_child(node2)));var clone2=use_import_node||is_firefox?document.importNode(node2,!0):node2.cloneNode(
!0);if(is_fragment){var start2=get_first_child(clone2),end=clone2.lastChild;assign_nodes(start2,end)}else assign_nodes(clone2,clone2);return clone2}}function from_namespace(content2,flags2,ns="svg"){var has_start=!content2.startsWith("<!>"),wrapped=`<${ns}>${has_start?content2:"<!>"+content2}</${ns}>`,node2;return()=>{if(hydrating)return assign_nodes(hydrate_node,null),hydrate_node;if(!node2){var fragment=create_fragment_from_html(wrapped),root2=get_first_child(fragment);node2=get_first_child(root2)}
var clone2=node2.cloneNode(!0);return assign_nodes(clone2,clone2),clone2}}function from_svg(content2,flags2){return from_namespace(content2,flags2,"svg")}function text$8(value=""){if(!hydrating){var t=create_text(value+"");return assign_nodes(t,t),t}var node2=hydrate_node;return node2.nodeType!==TEXT_NODE?(node2.before(node2=create_text()),set_hydrate_node(node2)):merge_text_nodes(node2),assign_nodes(node2,node2),node2}function comment$2(){if(hydrating)return assign_nodes(hydrate_node,null),hydrate_node;
var frag=document.createDocumentFragment(),start2=document.createComment(""),anchor=create_text();return frag.append(start2,anchor),assign_nodes(start2,anchor),frag}function append(anchor,dom){if(hydrating){var effect2=active_effect;((effect2.f&REACTION_RAN)===0||effect2.nodes.end===null)&&(effect2.nodes.end=hydrate_node),hydrate_next();return}anchor!==null&&anchor.before(dom)}function props_id(){if(hydrating&&hydrate_node&&hydrate_node.nodeType===COMMENT_NODE&&hydrate_node.textContent?.startsWith(
"$")){const id2=hydrate_node.textContent.substring(1);return hydrate_next(),id2}return(window.__svelte??={}).uid??=1,`c${window.__svelte.uid++}`}let should_intro=!0;function set_should_intro(value){should_intro=value}function set_text(text2,value){var str=value==null?"":typeof value=="object"?`${value}`:value;str!==(text2.__t??=text2.nodeValue)&&(text2.__t=str,text2.nodeValue=`${str}`)}function mount(component2,options){return _mount(component2,options)}function hydrate(component2,options){init_operations(),
options.intro=options.intro??!1;const target2=options.target,was_hydrating=hydrating,previous_hydrate_node=hydrate_node;try{for(var anchor=get_first_child(target2);anchor&&(anchor.nodeType!==COMMENT_NODE||anchor.data!==HYDRATION_START);)anchor=get_next_sibling(anchor);if(!anchor)throw HYDRATION_ERROR;set_hydrating(!0),set_hydrate_node(anchor);const instance=_mount(component2,{...options,anchor});return set_hydrating(!1),instance}catch(error2){if(error2 instanceof Error&&error2.message.split(`
`).some(line=>line.startsWith("https://svelte.dev/e/")))throw error2;return error2!==HYDRATION_ERROR&&console.warn("Failed to hydrate: ",error2),options.recover===!1&&hydration_failed(),init_operations(),clear_text_content(target2),set_hydrating(!1),mount(component2,options)}finally{set_hydrating(was_hydrating),set_hydrate_node(previous_hydrate_node)}}const listeners=new Map;function _mount(Component,{target:target2,anchor,props={},events,context,intro=!0,transformError}){init_operations();var component2=void 0,
unmount2=component_root(()=>{var anchor_node=anchor??target2.appendChild(create_text());boundary(anchor_node,{pending:()=>{}},anchor_node2=>{push$1({});var ctx=component_context;if(context&&(ctx.c=context),events&&(props.$$events=events),hydrating&&assign_nodes(anchor_node2,null),should_intro=intro,component2=Component(anchor_node2,props)||{},should_intro=!0,hydrating&&(active_effect.nodes.end=hydrate_node,hydrate_node===null||hydrate_node.nodeType!==COMMENT_NODE||hydrate_node.data!==HYDRATION_END))
throw hydration_mismatch(),HYDRATION_ERROR;pop()},transformError);var registered_events=new Set,event_handle=events2=>{for(var i=0;i<events2.length;i++){var event_name=events2[i];if(!registered_events.has(event_name)){registered_events.add(event_name);var passive=is_passive_event(event_name);for(const node2 of[target2,document]){var counts=listeners.get(node2);counts===void 0&&(counts=new Map,listeners.set(node2,counts));var count=counts.get(event_name);count===void 0?(node2.addEventListener(event_name,
handle_event_propagation,{passive}),counts.set(event_name,1)):counts.set(event_name,count+1)}}}};return event_handle(array_from(all_registered_events)),root_event_handles.add(event_handle),()=>{for(var event_name of registered_events)for(const node2 of[target2,document]){var counts=listeners.get(node2),count=counts.get(event_name);--count==0?(node2.removeEventListener(event_name,handle_event_propagation),counts.delete(event_name),counts.size===0&&listeners.delete(node2)):counts.set(event_name,count)}
root_event_handles.delete(event_handle),anchor_node!==anchor&&anchor_node.parentNode?.removeChild(anchor_node)}});return mounted_components.set(component2,unmount2),component2}let mounted_components=new WeakMap;function unmount(component2,options){const fn=mounted_components.get(component2);return fn?(mounted_components.delete(component2),fn(options)):Promise.resolve()}class BranchManager{anchor;#batches=new Map;#onscreen=new Map;#offscreen=new Map;#outroing=new Set;#transition=!0;constructor(anchor,transition2=!0){
this.anchor=anchor,this.#transition=transition2}#commit=batch=>{if(this.#batches.has(batch)){var key2=this.#batches.get(batch),onscreen=this.#onscreen.get(key2);if(onscreen)resume_effect(onscreen),this.#outroing.delete(key2);else{var offscreen=this.#offscreen.get(key2);offscreen&&(this.#onscreen.set(key2,offscreen.effect),this.#offscreen.delete(key2),offscreen.fragment.lastChild.remove(),this.anchor.before(offscreen.fragment),onscreen=offscreen.effect)}for(const[b,k]of this.#batches){if(this.#batches.
delete(b),b===batch)break;const offscreen2=this.#offscreen.get(k);offscreen2&&(destroy_effect(offscreen2.effect),this.#offscreen.delete(k))}for(const[k,effect2]of this.#onscreen){if(k===key2||this.#outroing.has(k))continue;const on_destroy=()=>{if(Array.from(this.#batches.values()).includes(k)){var fragment=document.createDocumentFragment();move_effect(effect2,fragment),fragment.append(create_text()),this.#offscreen.set(k,{effect:effect2,fragment})}else destroy_effect(effect2);this.#outroing.delete(
k),this.#onscreen.delete(k)};this.#transition||!onscreen?(this.#outroing.add(k),pause_effect(effect2,on_destroy,!1)):on_destroy()}}};#discard=batch=>{this.#batches.delete(batch);const keys2=Array.from(this.#batches.values());for(const[k,branch2]of this.#offscreen)keys2.includes(k)||(destroy_effect(branch2.effect),this.#offscreen.delete(k))};ensure(key2,fn){var batch=current_batch,defer=should_defer_append();if(fn&&!this.#onscreen.has(key2)&&!this.#offscreen.has(key2))if(defer){var fragment=document.
createDocumentFragment(),target2=create_text();fragment.append(target2),this.#offscreen.set(key2,{effect:branch(()=>fn(target2)),fragment})}else this.#onscreen.set(key2,branch(()=>fn(this.anchor)));if(this.#batches.set(batch,key2),defer){for(const[k,effect2]of this.#onscreen)k===key2?batch.unskip_effect(effect2):batch.skip_effect(effect2);for(const[k,branch2]of this.#offscreen)k===key2?batch.unskip_effect(branch2.effect):batch.skip_effect(branch2.effect);batch.oncommit(this.#commit),batch.ondiscard(
this.#discard)}else hydrating&&(this.anchor=hydrate_node),this.#commit(batch)}}function if_block(node2,fn,elseif=!1){var marker;hydrating&&(marker=hydrate_node,hydrate_next());var branches=new BranchManager(node2),flags2=elseif?EFFECT_TRANSPARENT:0;function update_branch(key2,fn2){if(hydrating){var data=read_hydration_instruction(marker);if(key2!==parseInt(data.substring(1))){var anchor=skip_nodes();set_hydrate_node(anchor),branches.anchor=anchor,set_hydrating(!1),branches.ensure(key2,fn2),set_hydrating(
!0);return}}branches.ensure(key2,fn2)}block(()=>{var has_branch=!1;fn((fn2,key2=0)=>{has_branch=!0,update_branch(key2,fn2)}),has_branch||update_branch(-1,null)},flags2)}const NAN=Symbol("NaN");function key$1(node2,get_key,render_fn){hydrating&&hydrate_next();var branches=new BranchManager(node2),legacy=!is_runes();block(()=>{var key2=get_key();key2!==key2&&(key2=NAN),legacy&&key2!==null&&typeof key2=="object"&&(key2={}),branches.ensure(key2,render_fn)})}function index$2(_,i){return i}function pause_effects(state2,to_destroy,controlled_anchor){
for(var transitions=[],length=to_destroy.length,group,remaining=to_destroy.length,i=0;i<length;i++){let effect2=to_destroy[i];pause_effect(effect2,()=>{if(group){if(group.pending.delete(effect2),group.done.add(effect2),group.pending.size===0){var groups=state2.outrogroups;destroy_effects(state2,array_from(group.done)),groups.delete(group),groups.size===0&&(state2.outrogroups=null)}}else remaining-=1},!1)}if(remaining===0){var fast_path=transitions.length===0&&controlled_anchor!==null;if(fast_path){
var anchor=controlled_anchor,parent_node=anchor.parentNode;clear_text_content(parent_node),parent_node.append(anchor),state2.items.clear()}destroy_effects(state2,to_destroy,!fast_path)}else group={pending:new Set(to_destroy),done:new Set},(state2.outrogroups??=new Set).add(group)}function destroy_effects(state2,to_destroy,remove_dom=!0){var preserved_effects;if(state2.pending.size>0){preserved_effects=new Set;for(const keys2 of state2.pending.values())for(const key2 of keys2)preserved_effects.add(
state2.items.get(key2).e)}for(var i=0;i<to_destroy.length;i++){var e=to_destroy[i];if(preserved_effects?.has(e)){e.f|=EFFECT_OFFSCREEN;const fragment=document.createDocumentFragment();move_effect(e,fragment)}else destroy_effect(to_destroy[i],remove_dom)}}var offscreen_anchor;function each(node2,flags2,get_collection,get_key,render_fn,fallback_fn=null){var anchor=node2,items2=new Map,is_controlled=(flags2&EACH_IS_CONTROLLED)!==0;if(is_controlled){var parent_node=node2;anchor=hydrating?set_hydrate_node(
get_first_child(parent_node)):parent_node.appendChild(create_text())}hydrating&&hydrate_next();var fallback2=null,each_array=derived_safe_equal(()=>{var collection=get_collection();return is_array(collection)?collection:collection==null?[]:array_from(collection)}),array2,pending=new Map,first_run=!0;function commit(batch){(state2.effect.f&DESTROYED)===0&&(state2.pending.delete(batch),state2.fallback=fallback2,reconcile(state2,array2,anchor,flags2,get_key),fallback2!==null&&(array2.length===0?(fallback2.
f&EFFECT_OFFSCREEN)===0?resume_effect(fallback2):(fallback2.f^=EFFECT_OFFSCREEN,move(fallback2,null,anchor)):pause_effect(fallback2,()=>{fallback2=null})))}function discard(batch){state2.pending.delete(batch)}var effect2=block(()=>{array2=get$3(each_array);var length=array2.length;let mismatch=!1;if(hydrating){var is_else=read_hydration_instruction(anchor)===HYDRATION_START_ELSE;is_else!==(length===0)&&(anchor=skip_nodes(),set_hydrate_node(anchor),set_hydrating(!1),mismatch=!0)}for(var keys2=new Set,
batch=current_batch,defer=should_defer_append(),index2=0;index2<length;index2+=1){hydrating&&hydrate_node.nodeType===COMMENT_NODE&&hydrate_node.data===HYDRATION_END&&(anchor=hydrate_node,mismatch=!0,set_hydrating(!1));var value=array2[index2],key2=get_key(value,index2),item=first_run?null:items2.get(key2);item?(item.v&&internal_set(item.v,value),item.i&&internal_set(item.i,index2),defer&&batch.unskip_effect(item.e)):(item=create_item(items2,first_run?anchor:offscreen_anchor??=create_text(),value,
key2,index2,render_fn,flags2,get_collection),first_run||(item.e.f|=EFFECT_OFFSCREEN),items2.set(key2,item)),keys2.add(key2)}if(length===0&&fallback_fn&&!fallback2&&(first_run?fallback2=branch(()=>fallback_fn(anchor)):(fallback2=branch(()=>fallback_fn(offscreen_anchor??=create_text())),fallback2.f|=EFFECT_OFFSCREEN)),length>keys2.size&&each_key_duplicate(),hydrating&&length>0&&set_hydrate_node(skip_nodes()),!first_run)if(pending.set(batch,keys2),defer){for(const[key3,item2]of items2)keys2.has(key3)||
batch.skip_effect(item2.e);batch.oncommit(commit),batch.ondiscard(discard)}else commit(batch);mismatch&&set_hydrating(!0),get$3(each_array)}),state2={effect:effect2,items:items2,pending,outrogroups:null,fallback:fallback2};first_run=!1,hydrating&&(anchor=hydrate_node)}function skip_to_branch(effect2){for(;effect2!==null&&(effect2.f&BRANCH_EFFECT)===0;)effect2=effect2.next;return effect2}function reconcile(state2,array2,anchor,flags2,get_key){var is_animated=(flags2&EACH_IS_ANIMATED)!==0,length=array2.
length,items2=state2.items,current2=skip_to_branch(state2.effect.first),seen2,prev2=null,to_animate,matched=[],stashed=[],value,key2,effect2,i;if(is_animated)for(i=0;i<length;i+=1)value=array2[i],key2=get_key(value,i),effect2=items2.get(key2).e,(effect2.f&EFFECT_OFFSCREEN)===0&&(effect2.nodes?.a?.measure(),(to_animate??=new Set).add(effect2));for(i=0;i<length;i+=1){if(value=array2[i],key2=get_key(value,i),effect2=items2.get(key2).e,state2.outrogroups!==null)for(const group of state2.outrogroups)
group.pending.delete(effect2),group.done.delete(effect2);if((effect2.f&INERT)!==0&&(resume_effect(effect2),is_animated&&(effect2.nodes?.a?.unfix(),(to_animate??=new Set).delete(effect2))),(effect2.f&EFFECT_OFFSCREEN)!==0)if(effect2.f^=EFFECT_OFFSCREEN,effect2===current2)move(effect2,null,anchor);else{var next2=prev2?prev2.next:current2;effect2===state2.effect.last&&(state2.effect.last=effect2.prev),effect2.prev&&(effect2.prev.next=effect2.next),effect2.next&&(effect2.next.prev=effect2.prev),link$2(
state2,prev2,effect2),link$2(state2,effect2,next2),move(effect2,next2,anchor),prev2=effect2,matched=[],stashed=[],current2=skip_to_branch(prev2.next);continue}if(effect2!==current2){if(seen2!==void 0&&seen2.has(effect2)){if(matched.length<stashed.length){var start2=stashed[0],j;prev2=start2.prev;var a=matched[0],b=matched[matched.length-1];for(j=0;j<matched.length;j+=1)move(matched[j],start2,anchor);for(j=0;j<stashed.length;j+=1)seen2.delete(stashed[j]);link$2(state2,a.prev,b.next),link$2(state2,
prev2,a),link$2(state2,b,start2),current2=start2,prev2=b,i-=1,matched=[],stashed=[]}else seen2.delete(effect2),move(effect2,current2,anchor),link$2(state2,effect2.prev,effect2.next),link$2(state2,effect2,prev2===null?state2.effect.first:prev2.next),link$2(state2,prev2,effect2),prev2=effect2;continue}for(matched=[],stashed=[];current2!==null&&current2!==effect2;)(seen2??=new Set).add(current2),stashed.push(current2),current2=skip_to_branch(current2.next);if(current2===null)continue}(effect2.f&EFFECT_OFFSCREEN)===
0&&matched.push(effect2),prev2=effect2,current2=skip_to_branch(effect2.next)}if(state2.outrogroups!==null){for(const group of state2.outrogroups)group.pending.size===0&&(destroy_effects(state2,array_from(group.done)),state2.outrogroups?.delete(group));state2.outrogroups.size===0&&(state2.outrogroups=null)}if(current2!==null||seen2!==void 0){var to_destroy=[];if(seen2!==void 0)for(effect2 of seen2)(effect2.f&INERT)===0&&to_destroy.push(effect2);for(;current2!==null;)(current2.f&INERT)===0&&current2!==
state2.fallback&&to_destroy.push(current2),current2=skip_to_branch(current2.next);var destroy_length=to_destroy.length;if(destroy_length>0){var controlled_anchor=(flags2&EACH_IS_CONTROLLED)!==0&&length===0?anchor:null;if(is_animated){for(i=0;i<destroy_length;i+=1)to_destroy[i].nodes?.a?.measure();for(i=0;i<destroy_length;i+=1)to_destroy[i].nodes?.a?.fix()}pause_effects(state2,to_destroy,controlled_anchor)}}is_animated&&queue_micro_task(()=>{if(to_animate!==void 0)for(effect2 of to_animate)effect2.
nodes?.a?.apply()})}function create_item(items2,anchor,value,key2,index2,render_fn,flags2,get_collection){var v=(flags2&EACH_ITEM_REACTIVE)!==0?(flags2&EACH_ITEM_IMMUTABLE)===0?mutable_source(value,!1,!1):source$2(value):null,i=(flags2&EACH_INDEX_REACTIVE)!==0?source$2(index2):null;return{v,i,e:branch(()=>(render_fn(anchor,v??value,i??index2,get_collection),()=>{items2.delete(key2)}))}}function move(effect2,next2,anchor){if(effect2.nodes)for(var node2=effect2.nodes.start,end=effect2.nodes.end,dest=next2&&
(next2.f&EFFECT_OFFSCREEN)===0?next2.nodes.start:anchor;node2!==null;){var next_node=get_next_sibling(node2);if(dest.before(node2),node2===end)return;node2=next_node}}function link$2(state2,prev2,next2){prev2===null?state2.effect.first=next2:prev2.next=next2,next2===null?state2.effect.last=prev2:next2.prev=prev2}function html$6(node2,get_value,is_controlled=!1,svg2=!1,mathml=!1,skip_warning=!1){var anchor=node2,value="";if(is_controlled){var parent_node=node2;hydrating&&(anchor=set_hydrate_node(
get_first_child(parent_node)))}template_effect(()=>{var effect2=active_effect;if(value===(value=get_value()??"")){hydrating&&hydrate_next();return}if(is_controlled&&!hydrating){effect2.nodes=null,parent_node.innerHTML=value,value!==""&&assign_nodes(get_first_child(parent_node),parent_node.lastChild);return}if(effect2.nodes!==null&&(remove_effect_dom(effect2.nodes.start,effect2.nodes.end),effect2.nodes=null),value!==""){if(hydrating){hydrate_node.data;for(var next2=hydrate_next(),last=next2;next2!==
null&&(next2.nodeType!==COMMENT_NODE||next2.data!=="");)last=next2,next2=get_next_sibling(next2);if(next2===null)throw hydration_mismatch(),HYDRATION_ERROR;assign_nodes(hydrate_node,last),anchor=set_hydrate_node(next2);return}var ns=svg2?NAMESPACE_SVG:mathml?NAMESPACE_MATHML:void 0,wrapper=create_element(svg2?"svg":mathml?"math":"template",ns);wrapper.innerHTML=value;var node3=svg2||mathml?wrapper:wrapper.content;if(assign_nodes(get_first_child(node3),node3.lastChild),svg2||mathml)for(;get_first_child(
node3);)anchor.before(get_first_child(node3));else anchor.before(node3)}})}function snippet(node2,get_snippet,...args){var branches=new BranchManager(node2);block(()=>{const snippet2=get_snippet()??null;branches.ensure(snippet2,snippet2&&(anchor=>snippet2(anchor,...args)))},EFFECT_TRANSPARENT)}function component(node2,get_component,render_fn){var hydration_start_node;hydrating&&(hydration_start_node=hydrate_node,hydrate_next());var branches=new BranchManager(node2);block(()=>{var component2=get_component()??
null;if(hydrating){var data=read_hydration_instruction(hydration_start_node),server_had_component=data===HYDRATION_START,client_has_component=component2!==null;if(server_had_component!==client_has_component){var anchor=skip_nodes();set_hydrate_node(anchor),branches.anchor=anchor,set_hydrating(!1),branches.ensure(component2,component2&&(target2=>render_fn(target2,component2))),set_hydrating(!0);return}}branches.ensure(component2,component2&&(target2=>render_fn(target2,component2)))},EFFECT_TRANSPARENT)}
const now=()=>performance.now(),raf={tick:_=>requestAnimationFrame(_),now:()=>now(),tasks:new Set};function run_tasks(){const now2=raf.now();raf.tasks.forEach(task=>{task.c(now2)||(raf.tasks.delete(task),task.f())}),raf.tasks.size!==0&&raf.tick(run_tasks)}function loop(callback){let task;return raf.tasks.size===0&&raf.tick(run_tasks),{promise:new Promise(fulfill=>{raf.tasks.add(task={c:callback,f:fulfill})}),abort(){raf.tasks.delete(task)}}}function dispatch_event(element2,type2){without_reactive_context(
()=>{element2.dispatchEvent(new CustomEvent(type2))})}function css_property_to_camelcase(style2){if(style2==="float")return"cssFloat";if(style2==="offset")return"cssOffset";if(style2.startsWith("--"))return style2;const parts=style2.split("-");return parts.length===1?parts[0]:parts[0]+parts.slice(1).map(word=>word[0].toUpperCase()+word.slice(1)).join("")}function css_to_keyframe(css2){const keyframe={},parts=css2.split(";");for(const part of parts){const[property,value]=part.split(":");if(!property||
value===void 0)break;const formatted_property=css_property_to_camelcase(property.trim());keyframe[formatted_property]=value.trim()}return keyframe}const linear$1=t=>t;function transition(flags2,element2,get_fn,get_params){var is_intro=(flags2&TRANSITION_IN)!==0,is_outro=(flags2&TRANSITION_OUT)!==0,is_both=is_intro&&is_outro,is_global=(flags2&TRANSITION_GLOBAL)!==0,direction=is_both?"both":is_intro?"in":"out",current_options,inert=element2.inert,overflow=element2.style.overflow,intro,outro;function get_options(){
return without_reactive_context(()=>current_options??=get_fn()(element2,get_params?.()??{},{direction}))}var transition2={is_global,in(){if(element2.inert=inert,!is_intro){outro?.abort(),outro?.reset?.();return}is_outro||intro?.abort(),intro=animate(element2,get_options(),outro,1,()=>{dispatch_event(element2,"introend"),intro?.abort(),intro=current_options=void 0,element2.style.overflow=overflow})},out(fn){if(!is_outro){fn?.(),current_options=void 0;return}element2.inert=!0,outro=animate(element2,
get_options(),intro,0,()=>{dispatch_event(element2,"outroend"),fn?.()})},stop:()=>{intro?.abort(),outro?.abort()}},e=active_effect;if((e.nodes.t??=[]).push(transition2),is_intro&&should_intro){var run2=is_global;if(!run2){for(var block2=e.parent;block2&&(block2.f&EFFECT_TRANSPARENT)!==0;)for(;(block2=block2.parent)&&(block2.f&BLOCK_EFFECT)===0;);run2=!block2||(block2.f&REACTION_RAN)!==0}run2&&effect(()=>{untrack$1(()=>transition2.in())})}}function animate(element2,options,counterpart,t2,on_finish){
var is_intro=t2===1;if(is_function(options)){var a,aborted2=!1;return queue_micro_task(()=>{if(!aborted2){var o=options({direction:is_intro?"in":"out"});a=animate(element2,o,counterpart,t2,on_finish)}}),{abort:()=>{aborted2=!0,a?.abort()},deactivate:()=>a.deactivate(),reset:()=>a.reset(),t:()=>a.t()}}if(counterpart?.deactivate(),!options?.duration&&!options?.delay)return dispatch_event(element2,is_intro?"introstart":"outrostart"),on_finish(),{abort:noop$3,deactivate:noop$3,reset:noop$3,t:()=>t2};
const{delay=0,css:css2,tick:tick2,easing=linear$1}=options;var keyframes=[];if(is_intro&&counterpart===void 0&&(tick2&&tick2(0,1),css2)){var styles2=css_to_keyframe(css2(0,1));keyframes.push(styles2,styles2)}var get_t=()=>1-t2,animation=element2.animate(keyframes,{duration:delay,fill:"forwards"});return animation.onfinish=()=>{animation.cancel(),dispatch_event(element2,is_intro?"introstart":"outrostart");var t1=counterpart?.t()??1-t2;counterpart?.abort();var delta=t2-t1,duration2=options.duration*
Math.abs(delta),keyframes2=[];if(duration2>0){var needs_overflow_hidden=!1;if(css2)for(var n=Math.ceil(duration2/16.666666666666668),i=0;i<=n;i+=1){var t=t1+delta*easing(i/n),styles3=css_to_keyframe(css2(t,1-t));keyframes2.push(styles3),needs_overflow_hidden||=styles3.overflow==="hidden"}needs_overflow_hidden&&(element2.style.overflow="hidden"),get_t=()=>{var time2=animation.currentTime;return t1+delta*easing(time2/duration2)},tick2&&loop(()=>{if(animation.playState!=="running")return!1;var t3=get_t();
return tick2(t3,1-t3),!0})}animation=element2.animate(keyframes2,{duration:duration2,fill:"forwards"}),animation.onfinish=()=>{get_t=()=>t2,tick2?.(t2,1-t2),on_finish()}},{abort:()=>{animation&&(animation.cancel(),animation.effect=null,animation.onfinish=noop$3)},deactivate:()=>{on_finish=noop$3},reset:()=>{t2===0&&tick2?.(1,0)},t:()=>get_t()}}function element$4(node2,get_tag,is_svg,render_fn,get_namespace,location2){let was_hydrating=hydrating;hydrating&&hydrate_next();var element2=null;hydrating&&
hydrate_node.nodeType===ELEMENT_NODE$1&&(element2=hydrate_node,hydrate_next());var anchor=hydrating?hydrate_node:node2,branches=new BranchManager(anchor,!1);block(()=>{const next_tag=get_tag()||null;var ns=is_svg||next_tag==="svg"?NAMESPACE_SVG:void 0;if(next_tag===null){branches.ensure(null,null),set_should_intro(!0);return}return branches.ensure(next_tag,anchor2=>{if(next_tag){if(element2=hydrating?element2:create_element(next_tag,ns),assign_nodes(element2,element2),render_fn){hydrating&&is_raw_text_element(
next_tag)&&element2.append(document.createComment(""));var child_anchor=hydrating?get_first_child(element2):element2.appendChild(create_text());hydrating&&(child_anchor===null?set_hydrating(!1):set_hydrate_node(child_anchor)),render_fn(element2,child_anchor)}active_effect.nodes.end=element2,anchor2.before(element2)}hydrating&&set_hydrate_node(anchor2)}),set_should_intro(!0),()=>{next_tag&&set_should_intro(!1)}},EFFECT_TRANSPARENT),teardown(()=>{set_should_intro(!0)}),was_hydrating&&(set_hydrating(
!0),set_hydrate_node(anchor))}function head$1(hash2,render_fn){let previous_hydrate_node=null,was_hydrating=hydrating;var anchor;if(hydrating){previous_hydrate_node=hydrate_node;for(var head_anchor=get_first_child(document.head);head_anchor!==null&&(head_anchor.nodeType!==COMMENT_NODE||head_anchor.data!==hash2);)head_anchor=get_next_sibling(head_anchor);if(head_anchor===null)set_hydrating(!1);else{var start2=get_next_sibling(head_anchor);head_anchor.remove(),set_hydrate_node(start2)}}hydrating||
(anchor=document.head.appendChild(create_text()));try{block(()=>render_fn(anchor),HEAD_EFFECT|EFFECT_PRESERVED)}finally{was_hydrating&&(set_hydrating(!0),set_hydrate_node(previous_hydrate_node))}}function action(dom,action2,get_value){effect(()=>{var payload=untrack$1(()=>action2(dom,get_value?.())||{});if(get_value&&payload?.update){var inited2=!1,prev2={};render_effect(()=>{var value=get_value();deep_read_state(value),inited2&&safe_not_equal(prev2,value)&&(prev2=value,payload.update(value))}),
inited2=!0}if(payload?.destroy)return()=>payload.destroy()})}function attach(node2,get_fn){var fn=void 0,e;managed(()=>{fn!==(fn=get_fn())&&(e&&(destroy_effect(e),e=null),fn&&(e=branch(()=>{effect(()=>fn(node2))})))})}function r$1(e){var t,f,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r$1(e[t]))&&(n&&(n+=" "),n+=f)}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx$1(){for(var e,t,f=0,n="",
o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r$1(e))&&(n&&(n+=" "),n+=t);return n}function clsx(value){return typeof value=="object"?clsx$1(value):value??""}const whitespace$1=[...` 	
\r\f \v\uFEFF`];function to_class(value,hash2,directives){var classname=value==null?"":""+value;if(hash2&&(classname=classname?classname+" "+hash2:hash2),directives){for(var key2 of Object.keys(directives))if(directives[key2])classname=classname?classname+" "+key2:key2;else if(classname.length)for(var len=key2.length,a=0;(a=classname.indexOf(key2,a))>=0;){var b=a+len;(a===0||whitespace$1.includes(classname[a-1]))&&(b===classname.length||whitespace$1.includes(classname[b]))?classname=(a===0?"":classname.
substring(0,a))+classname.substring(b+1):a=b}}return classname===""?null:classname}function append_styles(styles2,important=!1){var separator=important?" !important;":";",css2="";for(var key2 of Object.keys(styles2)){var value=styles2[key2];value!=null&&value!==""&&(css2+=" "+key2+": "+value+separator)}return css2}function to_css_name(name){return name[0]!=="-"||name[1]!=="-"?name.toLowerCase():name}function to_style(value,styles2){if(styles2){var new_style="",normal_styles,important_styles;if(Array.
isArray(styles2)?(normal_styles=styles2[0],important_styles=styles2[1]):normal_styles=styles2,value){value=String(value).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var in_str=!1,in_apo=0,in_comment=!1,reserved_names=[];normal_styles&&reserved_names.push(...Object.keys(normal_styles).map(to_css_name)),important_styles&&reserved_names.push(...Object.keys(important_styles).map(to_css_name));var start_index=0,name_index=-1;const len=value.length;for(var i=0;i<len;i++){var c2=value[i];if(in_comment?c2===
"/"&&value[i-1]==="*"&&(in_comment=!1):in_str?in_str===c2&&(in_str=!1):c2==="/"&&value[i+1]==="*"?in_comment=!0:c2==='"'||c2==="'"?in_str=c2:c2==="("?in_apo++:c2===")"&&in_apo--,!in_comment&&in_str===!1&&in_apo===0){if(c2===":"&&name_index===-1)name_index=i;else if(c2===";"||i===len-1){if(name_index!==-1){var name=to_css_name(value.substring(start_index,name_index).trim());if(!reserved_names.includes(name)){c2!==";"&&i++;var property=value.substring(start_index,i).trim();new_style+=" "+property+
";"}}start_index=i+1,name_index=-1}}}}return normal_styles&&(new_style+=append_styles(normal_styles)),important_styles&&(new_style+=append_styles(important_styles,!0)),new_style=new_style.trim(),new_style===""?null:new_style}return value==null?null:String(value)}function set_class(dom,is_html,value,hash2,prev_classes,next_classes){var prev2=dom.__className;if(hydrating||prev2!==value||prev2===void 0){var next_class_name=to_class(value,hash2,next_classes);(!hydrating||next_class_name!==dom.getAttribute(
"class"))&&(next_class_name==null?dom.removeAttribute("class"):is_html?dom.className=next_class_name:dom.setAttribute("class",next_class_name)),dom.__className=value}else if(next_classes&&prev_classes!==next_classes)for(var key2 in next_classes){var is_present=!!next_classes[key2];(prev_classes==null||is_present!==!!prev_classes[key2])&&dom.classList.toggle(key2,is_present)}return next_classes}function update_styles(dom,prev2={},next2,priority){for(var key2 in next2){var value=next2[key2];prev2[key2]!==
value&&(next2[key2]==null?dom.style.removeProperty(key2):dom.style.setProperty(key2,value,priority))}}function set_style(dom,value,prev_styles,next_styles){var prev2=dom.__style;if(hydrating||prev2!==value){var next_style_attr=to_style(value,next_styles);(!hydrating||next_style_attr!==dom.getAttribute("style"))&&(next_style_attr==null?dom.removeAttribute("style"):dom.style.cssText=next_style_attr),dom.__style=value}else next_styles&&(Array.isArray(next_styles)?(update_styles(dom,prev_styles?.[0],
next_styles[0]),update_styles(dom,prev_styles?.[1],next_styles[1],"important")):update_styles(dom,prev_styles,next_styles));return next_styles}function select_option(select,value,mounting=!1){if(select.multiple){if(value==null)return;if(!is_array(value))return select_multiple_invalid_value();for(var option2 of select.options)option2.selected=value.includes(get_option_value(option2));return}for(option2 of select.options){var option_value=get_option_value(option2);if(is(option_value,value)){option2.
selected=!0;return}}(!mounting||value!==void 0)&&(select.selectedIndex=-1)}function init_select(select){var observer=new MutationObserver(()=>{select_option(select,select.__value)});observer.observe(select,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),teardown(()=>{observer.disconnect()})}function get_option_value(option2){return"__value"in option2?option2.__value:option2.value}const CLASS=Symbol("class"),STYLE=Symbol("style"),IS_CUSTOM_ELEMENT=Symbol("is custom element"),IS_HTML=Symbol(
"is html"),LINK_TAG=IS_XHTML?"link":"LINK",INPUT_TAG=IS_XHTML?"input":"INPUT",OPTION_TAG=IS_XHTML?"option":"OPTION",SELECT_TAG=IS_XHTML?"select":"SELECT",PROGRESS_TAG=IS_XHTML?"progress":"PROGRESS";function remove_input_defaults(input){if(hydrating){var already_removed=!1,remove_defaults=()=>{if(!already_removed){if(already_removed=!0,input.hasAttribute("value")){var value=input.value;set_attribute(input,"value",null),input.value=value}if(input.hasAttribute("checked")){var checked=input.checked;
set_attribute(input,"checked",null),input.checked=checked}}};input.__on_r=remove_defaults,queue_micro_task(remove_defaults),add_form_reset_listener()}}function set_value(element2,value){var attributes=get_attributes(element2);attributes.value===(attributes.value=value??void 0)||element2.value===value&&(value!==0||element2.nodeName!==PROGRESS_TAG)||(element2.value=value??"")}function set_selected(element2,selected){selected?element2.hasAttribute("selected")||element2.setAttribute("selected",""):element2.
removeAttribute("selected")}function set_attribute(element2,attribute,value,skip_warning){var attributes=get_attributes(element2);hydrating&&(attributes[attribute]=element2.getAttribute(attribute),attribute==="src"||attribute==="srcset"||attribute==="href"&&element2.nodeName===LINK_TAG)||attributes[attribute]!==(attributes[attribute]=value)&&(attribute==="loading"&&(element2[LOADING_ATTR_SYMBOL]=value),value==null?element2.removeAttribute(attribute):typeof value!="string"&&get_setters(element2).
includes(attribute)?element2[attribute]=value:element2.setAttribute(attribute,value))}function set_attributes(element2,prev2,next2,css_hash,should_remove_defaults=!1,skip_warning=!1){if(hydrating&&should_remove_defaults&&element2.nodeName===INPUT_TAG){var input=element2,attribute=input.type==="checkbox"?"defaultChecked":"defaultValue";attribute in next2||remove_input_defaults(input)}var attributes=get_attributes(element2),is_custom_element=attributes[IS_CUSTOM_ELEMENT],preserve_attribute_case=!attributes[IS_HTML];
let is_hydrating_custom_element=hydrating&&is_custom_element;is_hydrating_custom_element&&set_hydrating(!1);var current2=prev2||{},is_option_element=element2.nodeName===OPTION_TAG;for(var key2 in prev2)key2 in next2||(next2[key2]=null);next2.class?next2.class=clsx(next2.class):(css_hash||next2[CLASS])&&(next2.class=null),next2[STYLE]&&(next2.style??=null);var setters=get_setters(element2);for(const key3 in next2){let value=next2[key3];if(is_option_element&&key3==="value"&&value==null){element2.value=
element2.__value="",current2[key3]=value;continue}if(key3==="class"){var is_html=element2.namespaceURI==="http://www.w3.org/1999/xhtml";set_class(element2,is_html,value,css_hash,prev2?.[CLASS],next2[CLASS]),current2[key3]=value,current2[CLASS]=next2[CLASS];continue}if(key3==="style"){set_style(element2,value,prev2?.[STYLE],next2[STYLE]),current2[key3]=value,current2[STYLE]=next2[STYLE];continue}var prev_value=current2[key3];if(!(value===prev_value&&!(value===void 0&&element2.hasAttribute(key3)))){
current2[key3]=value;var prefix=key3[0]+key3[1];if(prefix!=="$$")if(prefix==="on"){const opts={},event_handle_key="$$"+key3;let event_name=key3.slice(2);var is_delegated=can_delegate_event(event_name);if(is_capture_event(event_name)&&(event_name=event_name.slice(0,-7),opts.capture=!0),!is_delegated&&prev_value){if(value!=null)continue;element2.removeEventListener(event_name,current2[event_handle_key],opts),current2[event_handle_key]=null}if(is_delegated)delegated(event_name,element2,value),delegate(
[event_name]);else if(value!=null){let handle2=function(evt){current2[key3].call(this,evt)};current2[event_handle_key]=create_event(event_name,element2,handle2,opts)}}else if(key3==="style")set_attribute(element2,key3,value);else if(key3==="autofocus")autofocus(element2,!!value);else if(!is_custom_element&&(key3==="__value"||key3==="value"&&value!=null))element2.value=element2.__value=value;else if(key3==="selected"&&is_option_element)set_selected(element2,value);else{var name=key3;preserve_attribute_case||
(name=normalize_attribute(name));var is_default=name==="defaultValue"||name==="defaultChecked";if(value==null&&!is_custom_element&&!is_default)if(attributes[key3]=null,name==="value"||name==="checked"){let input2=element2;const use_default=prev2===void 0;if(name==="value"){let previous2=input2.defaultValue;input2.removeAttribute(name),input2.defaultValue=previous2,input2.value=input2.__value=use_default?previous2:null}else{let previous2=input2.defaultChecked;input2.removeAttribute(name),input2.defaultChecked=
previous2,input2.checked=use_default?previous2:!1}}else element2.removeAttribute(key3);else is_default||setters.includes(name)&&(is_custom_element||typeof value!="string")?(element2[name]=value,name in attributes&&(attributes[name]=UNINITIALIZED)):typeof value!="function"&&set_attribute(element2,name,value)}}}return is_hydrating_custom_element&&set_hydrating(!0),current2}function attribute_effect(element2,fn,sync=[],async=[],blockers=[],css_hash,should_remove_defaults=!1,skip_warning=!1){flatten(
blockers,sync,async,values=>{var prev2=void 0,effects={},is_select=element2.nodeName===SELECT_TAG,inited2=!1;if(managed(()=>{var next2=fn(...values.map(get$3)),current2=set_attributes(element2,prev2,next2,css_hash,should_remove_defaults,skip_warning);inited2&&is_select&&"value"in next2&&select_option(element2,next2.value);for(let symbol of Object.getOwnPropertySymbols(effects))next2[symbol]||destroy_effect(effects[symbol]);for(let symbol of Object.getOwnPropertySymbols(next2)){var n=next2[symbol];
symbol.description===ATTACHMENT_KEY&&(!prev2||n!==prev2[symbol])&&(effects[symbol]&&destroy_effect(effects[symbol]),effects[symbol]=branch(()=>attach(element2,()=>n))),current2[symbol]=n}prev2=current2}),is_select){var select=element2;effect(()=>{select_option(select,prev2.value,!0),init_select(select)})}inited2=!0})}function get_attributes(element2){return element2.__attributes??={[IS_CUSTOM_ELEMENT]:element2.nodeName.includes("-"),[IS_HTML]:element2.namespaceURI===NAMESPACE_HTML}}var setters_cache=new Map;
function get_setters(element2){var cache_key=element2.getAttribute("is")||element2.nodeName,setters=setters_cache.get(cache_key);if(setters)return setters;setters_cache.set(cache_key,setters=[]);for(var descriptors,proto=element2,element_proto=Element.prototype;element_proto!==proto;){descriptors=get_descriptors(proto);for(var key2 in descriptors)descriptors[key2].set&&setters.push(key2);proto=get_prototype_of(proto)}return setters}function bind_value(input,get2,set2=get2){var batches2=new WeakSet;
listen_to_event_and_reset_event(input,"input",async is_reset=>{var value=is_reset?input.defaultValue:input.value;if(value=is_numberlike_input(input)?to_number(value):value,set2(value),current_batch!==null&&batches2.add(current_batch),await tick(),value!==(value=get2())){var start2=input.selectionStart,end=input.selectionEnd,length=input.value.length;if(input.value=value??"",end!==null){var new_length=input.value.length;start2===end&&end===length&&new_length>length?(input.selectionStart=new_length,
input.selectionEnd=new_length):(input.selectionStart=start2,input.selectionEnd=Math.min(end,new_length))}}}),(hydrating&&input.defaultValue!==input.value||untrack$1(get2)==null&&input.value)&&(set2(is_numberlike_input(input)?to_number(input.value):input.value),current_batch!==null&&batches2.add(current_batch)),render_effect(()=>{var value=get2();if(input===document.activeElement){var batch=current_batch;if(batches2.has(batch))return}is_numberlike_input(input)&&value===to_number(input.value)||input.
type==="date"&&!value&&!input.value||value!==input.value&&(input.value=value??"")})}function is_numberlike_input(input){var type2=input.type;return type2==="number"||type2==="range"}function to_number(value){return value===""?null:+value}function bind_files(input,get2,set2=get2){listen_to_event_and_reset_event(input,"change",()=>{set2(input.files)}),hydrating&&input.files&&set2(input.files),render_effect(()=>{input.files=get2()})}function is_bound_this(bound_value,element_or_component){return bound_value===
element_or_component||bound_value?.[STATE_SYMBOL]===element_or_component}function bind_this(element_or_component={},update2,get_value,get_parts){var component_effect=component_context.r,parent=active_effect;return effect(()=>{var old_parts,parts;return render_effect(()=>{old_parts=parts,parts=[],untrack$1(()=>{element_or_component!==get_value(...parts)&&(update2(element_or_component,...parts),old_parts&&is_bound_this(get_value(...old_parts),element_or_component)&&update2(null,...old_parts))})}),
()=>{let p2=parent;for(;p2!==component_effect&&p2.parent!==null&&p2.parent.f&DESTROYING;)p2=p2.parent;const teardown2=()=>{parts&&is_bound_this(get_value(...parts),element_or_component)&&update2(null,...parts)},original_teardown=p2.teardown;p2.teardown=()=>{teardown2(),original_teardown?.()}}}),element_or_component}function bind_window_size(type2,set2){listen(window,["resize"],()=>without_reactive_context(()=>set2(window[type2])))}function init(immutable=!1){const context=component_context,callbacks=context.
l.u;if(!callbacks)return;let props=()=>deep_read_state(context.s);if(immutable){let version2=0,prev2={};const d2=derived(()=>{let changed=!1;const props2=context.s;for(const key2 in props2)props2[key2]!==prev2[key2]&&(prev2[key2]=props2[key2],changed=!0);return changed&&version2++,version2});props=()=>get$3(d2)}callbacks.b.length&&user_pre_effect(()=>{observe_all(context,props),run_all(callbacks.b)}),user_effect(()=>{const fns=untrack$1(()=>callbacks.m.map(run));return()=>{for(const fn of fns)typeof fn==
"function"&&fn()}}),callbacks.a.length&&user_effect(()=>{observe_all(context,props),run_all(callbacks.a)})}function observe_all(context,props){if(context.l.s)for(const signal of context.l.s)get$3(signal);props()}const rest_props_handler={get(target2,key2){if(!target2.exclude.includes(key2))return target2.props[key2]},set(target2,key2){return!1},getOwnPropertyDescriptor(target2,key2){if(!target2.exclude.includes(key2)&&key2 in target2.props)return{enumerable:!0,configurable:!0,value:target2.props[key2]}},
has(target2,key2){return target2.exclude.includes(key2)?!1:key2 in target2.props},ownKeys(target2){return Reflect.ownKeys(target2.props).filter(key2=>!target2.exclude.includes(key2))}};function rest_props(props,exclude,name){return new Proxy({props,exclude},rest_props_handler)}const spread_props_handler={get(target2,key2){let i=target2.props.length;for(;i--;){let p2=target2.props[i];if(is_function(p2)&&(p2=p2()),typeof p2=="object"&&p2!==null&&key2 in p2)return p2[key2]}},set(target2,key2,value){
let i=target2.props.length;for(;i--;){let p2=target2.props[i];is_function(p2)&&(p2=p2());const desc=get_descriptor(p2,key2);if(desc&&desc.set)return desc.set(value),!0}return!1},getOwnPropertyDescriptor(target2,key2){let i=target2.props.length;for(;i--;){let p2=target2.props[i];if(is_function(p2)&&(p2=p2()),typeof p2=="object"&&p2!==null&&key2 in p2){const descriptor=get_descriptor(p2,key2);return descriptor&&!descriptor.configurable&&(descriptor.configurable=!0),descriptor}}},has(target2,key2){
if(key2===STATE_SYMBOL||key2===LEGACY_PROPS)return!1;for(let p2 of target2.props)if(is_function(p2)&&(p2=p2()),p2!=null&&key2 in p2)return!0;return!1},ownKeys(target2){const keys2=[];for(let p2 of target2.props)if(is_function(p2)&&(p2=p2()),!!p2){for(const key2 in p2)keys2.includes(key2)||keys2.push(key2);for(const key2 of Object.getOwnPropertySymbols(p2))keys2.includes(key2)||keys2.push(key2)}return keys2}};function spread_props(...props){return new Proxy({props},spread_props_handler)}function prop(props,key2,flags2,fallback2){
var runes=!legacy_mode_flag||(flags2&PROPS_IS_RUNES)!==0,bindable=(flags2&PROPS_IS_BINDABLE)!==0,lazy=(flags2&PROPS_IS_LAZY_INITIAL)!==0,fallback_value=fallback2,fallback_dirty=!0,get_fallback=()=>(fallback_dirty&&(fallback_dirty=!1,fallback_value=lazy?untrack$1(fallback2):fallback2),fallback_value);let setter;if(bindable){var is_entry_props=STATE_SYMBOL in props||LEGACY_PROPS in props;setter=get_descriptor(props,key2)?.set??(is_entry_props&&key2 in props?v=>props[key2]=v:void 0)}var initial_value,
is_store_sub=!1;bindable?[initial_value,is_store_sub]=capture_store_binding(()=>props[key2]):initial_value=props[key2],initial_value===void 0&&fallback2!==void 0&&(initial_value=get_fallback(),setter&&(runes&&props_invalid_value(),setter(initial_value)));var getter;if(runes?getter=()=>{var value=props[key2];return value===void 0?get_fallback():(fallback_dirty=!0,value)}:getter=()=>{var value=props[key2];return value!==void 0&&(fallback_value=void 0),value===void 0?fallback_value:value},runes&&(flags2&
PROPS_IS_UPDATED)===0)return getter;if(setter){var legacy_parent=props.$$legacy;return(function(value,mutation){return arguments.length>0?((!runes||!mutation||legacy_parent||is_store_sub)&&setter(mutation?getter():value),value):getter()})}var overridden=!1,d2=((flags2&PROPS_IS_IMMUTABLE)!==0?derived:derived_safe_equal)(()=>(overridden=!1,getter()));bindable&&get$3(d2);var parent_effect=active_effect;return(function(value,mutation){if(arguments.length>0){const new_value=mutation?get$3(d2):runes&&
bindable?proxy(value):value;return set$1(d2,new_value),overridden=!0,fallback_value!==void 0&&(fallback_value=new_value),value}return is_destroying_effect&&overridden||(parent_effect.f&DESTROYED)!==0?d2.v:get$3(d2)})}function asClassComponent(component2){return class extends Svelte4Component{constructor(options){super({component:component2,...options})}}}class Svelte4Component{#events;#instance;constructor(options){var sources=new Map,add_source=(key2,value)=>{var s2=mutable_source(value,!1,!1);
return sources.set(key2,s2),s2};const props=new Proxy({...options.props||{},$$events:{}},{get(target2,prop2){return get$3(sources.get(prop2)??add_source(prop2,Reflect.get(target2,prop2)))},has(target2,prop2){return prop2===LEGACY_PROPS?!0:(get$3(sources.get(prop2)??add_source(prop2,Reflect.get(target2,prop2))),Reflect.has(target2,prop2))},set(target2,prop2,value){return set$1(sources.get(prop2)??add_source(prop2,value),value),Reflect.set(target2,prop2,value)}});this.#instance=(options.hydrate?hydrate:
mount)(options.component,{target:options.target,anchor:options.anchor,props,context:options.context,intro:options.intro??!1,recover:options.recover,transformError:options.transformError}),(!options?.props?.$$host||options.sync===!1)&&flushSync(),this.#events=props.$$events;for(const key2 of Object.keys(this.#instance))key2==="$set"||key2==="$destroy"||key2==="$on"||define_property(this,key2,{get(){return this.#instance[key2]},set(value){this.#instance[key2]=value},enumerable:!0});this.#instance.
$set=next2=>{Object.assign(props,next2)},this.#instance.$destroy=()=>{unmount(this.#instance)}}$set(props){this.#instance.$set(props)}$on(event2,callback){this.#events[event2]=this.#events[event2]||[];const cb=(...args)=>callback.call(this,...args);return this.#events[event2].push(cb),()=>{this.#events[event2]=this.#events[event2].filter(fn=>fn!==cb)}}$destroy(){this.#instance.$destroy()}}function onMount$1(fn){component_context===null&&lifecycle_outside_component(),legacy_mode_flag&&component_context.
l!==null?init_update_callbacks(component_context).m.push(fn):user_effect(()=>{const cleanup=untrack$1(fn);if(typeof cleanup=="function")return cleanup})}function onDestroy(fn){component_context===null&&lifecycle_outside_component(),onMount$1(()=>()=>untrack$1(fn))}function init_update_callbacks(context){var l=context.l;return l.u??={a:[],b:[],m:[]}}const svelte=Object.freeze(Object.defineProperty({__proto__:null,flushSync,getAllContexts,getContext,hasContext,hydrate,mount,onDestroy,onMount:onMount$1,
setContext,settled,tick,unmount,untrack:untrack$1},Symbol.toStringTag,{value:"Module"}));class HttpError{constructor(status,body2){this.status=status,typeof body2=="string"?this.body={message:body2}:body2?this.body=body2:this.body={message:`Error: ${status}`}}toString(){return JSON.stringify(this.body)}}class Redirect{constructor(status,location2){try{new Headers({location:location2})}catch{throw new Error(`Invalid redirect location ${JSON.stringify(location2)}: this string contains characters t\
hat cannot be used in HTTP headers`)}this.status=status,this.location=location2}}class SvelteKitError extends Error{constructor(status,text2,message){super(message),this.status=status,this.text=text2}}new URL("sveltekit-internal://");function normalize_path(path2,trailing_slash){return path2==="/"||trailing_slash==="ignore"?path2:trailing_slash==="never"?path2.endsWith("/")?path2.slice(0,-1):path2:trailing_slash==="always"&&!path2.endsWith("/")?path2+"/":path2}function decode_pathname(pathname){
return pathname.split("%25").map(decodeURI).join("%25")}function decode_params(params){for(const key2 in params)params[key2]=decodeURIComponent(params[key2]);return params}function strip_hash({href}){return href.split("#")[0]}function make_trackable(url2,callback,search_params_callback,allow_hash=!1){const tracked=new URL(url2);Object.defineProperty(tracked,"searchParams",{value:new Proxy(tracked.searchParams,{get(obj,key2){if(key2==="get"||key2==="getAll"||key2==="has")return(param,...rest)=>(search_params_callback(
param),obj[key2](param,...rest));callback();const value=Reflect.get(obj,key2);return typeof value=="function"?value.bind(obj):value}}),enumerable:!0,configurable:!0});const tracked_url_properties=["href","pathname","search","toString","toJSON"];allow_hash&&tracked_url_properties.push("hash");for(const property of tracked_url_properties)Object.defineProperty(tracked,property,{get(){return callback(),url2[property]},enumerable:!0,configurable:!0});return tracked}function noop$2(){}function hash$1(...values){
let hash2=5381;for(const value of values)if(typeof value=="string"){let i=value.length;for(;i;)hash2=hash2*33^value.charCodeAt(--i)}else if(ArrayBuffer.isView(value)){const buffer=new Uint8Array(value.buffer,value.byteOffset,value.byteLength);let i=buffer.length;for(;i;)hash2=hash2*33^buffer[--i]}else throw new TypeError("value must be a string or TypedArray");return(hash2>>>0).toString(36)}new TextEncoder;new TextDecoder;function base64_decode(encoded){const binary=atob(encoded),bytes=new Uint8Array(
binary.length);for(let i=0;i<binary.length;i++)bytes[i]=binary.charCodeAt(i);return bytes}const native_fetch=window.fetch;window.fetch=(input,init2)=>((input instanceof Request?input.method:init2?.method||"GET")!=="GET"&&cache.delete(build_selector(input)),native_fetch(input,init2));const cache=new Map;function initial_fetch(resource,opts){const selector=build_selector(resource,opts),script=document.querySelector(selector);if(script?.textContent){script.remove();let{body:body2,...init2}=JSON.parse(
script.textContent);const ttl=script.getAttribute("data-ttl");return ttl&&cache.set(selector,{body:body2,init:init2,ttl:1e3*Number(ttl)}),script.getAttribute("data-b64")!==null&&(body2=base64_decode(body2)),Promise.resolve(new Response(body2,init2))}return window.fetch(resource,opts)}function subsequent_fetch(resource,resolved,opts){if(cache.size>0){const selector=build_selector(resource,opts),cached2=cache.get(selector);if(cached2){if(performance.now()<cached2.ttl&&["default","force-cache","onl\
y-if-cached",void 0].includes(opts?.cache))return new Response(cached2.body,cached2.init);cache.delete(selector)}}return window.fetch(resolved,opts)}function build_selector(resource,opts){let selector=`script[data-sveltekit-fetched][data-url=${JSON.stringify(resource instanceof Request?resource.url:resource)}]`;if(opts?.headers||opts?.body){const values=[];opts.headers&&values.push([...new Headers(opts.headers)].join(",")),opts.body&&(typeof opts.body=="string"||ArrayBuffer.isView(opts.body))&&values.
push(opts.body),selector+=`[data-hash="${hash$1(...values)}"]`}return selector}const param_pattern=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function parse_route_id(id2){const params=[];return{pattern:id2==="/"?/^\/$/:new RegExp(`^${get_route_segments(id2).map(segment=>{const rest_match=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(segment);if(rest_match)return params.push({name:rest_match[1],matcher:rest_match[2],optional:!1,rest:!0,chained:!0}),"(?:/([^]*))?";const optional_match=/^\[\[(\w+)(?:=(\w+))?\]\]$/.
exec(segment);if(optional_match)return params.push({name:optional_match[1],matcher:optional_match[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!segment)return;const parts=segment.split(/\[(.+?)\](?!\])/);return"/"+parts.map((content2,i)=>{if(i%2){if(content2.startsWith("x+"))return escape$3(String.fromCharCode(parseInt(content2.slice(2),16)));if(content2.startsWith("u+"))return escape$3(String.fromCharCode(...content2.slice(2).split("-").map(code2=>parseInt(code2,16))));const match=param_pattern.
exec(content2),[,is_optional,is_rest,name,matcher]=match;return params.push({name,matcher,optional:!!is_optional,rest:!!is_rest,chained:is_rest?i===1&&parts[0]==="":!1}),is_rest?"([^]*?)":is_optional?"([^/]*)?":"([^/]+?)"}return escape$3(content2)}).join("")}).join("")}/?$`),params}}function affects_path(segment){return segment!==""&&!/^\([^)]+\)$/.test(segment)}function get_route_segments(route){return route.slice(1).split("/").filter(affects_path)}function exec(match,params,matchers2){const result={},
values=match.slice(1),values_needing_match=values.filter(value=>value!==void 0);let buffered=0;for(let i=0;i<params.length;i+=1){const param=params[i];let value=values[i-buffered];if(param.chained&&param.rest&&buffered&&(value=values.slice(i-buffered,i+1).filter(s2=>s2).join("/"),buffered=0),value===void 0)if(param.rest)value="";else continue;if(!param.matcher||matchers2[param.matcher](value)){result[param.name]=value;const next_param=params[i+1],next_value=values[i+1];next_param&&!next_param.rest&&
next_param.optional&&next_value&&param.chained&&(buffered=0),!next_param&&!next_value&&Object.keys(result).length===values_needing_match.length&&(buffered=0);continue}if(param.optional&&param.chained){buffered++;continue}return}if(!buffered)return result}function escape$3(str){return str.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function parse$5({nodes:nodes2,server_loads:server_loads2,
dictionary:dictionary2,matchers:matchers2}){const layouts_with_server_load=new Set(server_loads2);return Object.entries(dictionary2).map(([id2,[leaf2,layouts,errors2]])=>{const{pattern:pattern2,params}=parse_route_id(id2),route={id:id2,exec:path2=>{const match=pattern2.exec(path2);if(match)return exec(match,params,matchers2)},errors:[1,...errors2||[]].map(n=>nodes2[n]),layouts:[0,...layouts||[]].map(create_layout_loader),leaf:create_leaf_loader(leaf2)};return route.errors.length=route.layouts.length=
Math.max(route.errors.length,route.layouts.length),route});function create_leaf_loader(id2){const uses_server_data=id2<0;return uses_server_data&&(id2=~id2),[uses_server_data,nodes2[id2]]}function create_layout_loader(id2){return id2===void 0?id2:[layouts_with_server_load.has(id2),nodes2[id2]]}}function get$2(key2,parse2=JSON.parse){try{return parse2(sessionStorage[key2])}catch{}}function set(key2,value,stringify2=JSON.stringify){const data=stringify2(value);try{sessionStorage[key2]=data}catch{}}
const base=globalThis.__sveltekit__?.base??"",assets=globalThis.__sveltekit__?.assets??base??"",version$3="llama-server-webui",SNAPSHOT_KEY="sveltekit:snapshot",SCROLL_KEY="sveltekit:scroll",STATES_KEY="sveltekit:states",PAGE_URL_KEY="sveltekit:pageurl",HISTORY_INDEX="sveltekit:history",NAVIGATION_INDEX="sveltekit:navigation",PRELOAD_PRIORITIES={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},origin=location.origin;function resolve_url(url2){if(url2 instanceof URL)return url2;let baseURI=document.
baseURI;if(!baseURI){const baseTags=document.getElementsByTagName("base");baseURI=baseTags.length?baseTags[0].href:document.URL}return new URL(url2,baseURI)}function scroll_state(){return{x:pageXOffset,y:pageYOffset}}function link_option(element2,name){return element2.getAttribute(`data-sveltekit-${name}`)}const levels={...PRELOAD_PRIORITIES,"":PRELOAD_PRIORITIES.hover};function parent_element(element2){let parent=element2.assignedSlot??element2.parentNode;return parent?.nodeType===11&&(parent=parent.
host),parent}function find_anchor(element2,target2){for(;element2&&element2!==target2;){if(element2.nodeName.toUpperCase()==="A"&&element2.hasAttribute("href"))return element2;element2=parent_element(element2)}}function get_link_info(a,base2,uses_hash_router){let url2;try{if(url2=new URL(a instanceof SVGAElement?a.href.baseVal:a.href,document.baseURI),uses_hash_router&&url2.hash.match(/^#[^/]/)){const route=location.hash.split("#")[1]||"/";url2.hash=`#${route}${url2.hash}`}}catch{}const target2=a instanceof
SVGAElement?a.target.baseVal:a.target,external=!url2||!!target2||is_external_url(url2,base2,uses_hash_router)||(a.getAttribute("rel")||"").split(/\s+/).includes("external"),download=url2?.origin===origin&&a.hasAttribute("download");return{url:url2,external,target:target2,download}}function get_router_options(element2){let keepfocus=null,noscroll=null,preload_code=null,preload_data=null,reload=null,replace_state=null,el=element2;for(;el&&el!==document.documentElement;)preload_code===null&&(preload_code=
link_option(el,"preload-code")),preload_data===null&&(preload_data=link_option(el,"preload-data")),keepfocus===null&&(keepfocus=link_option(el,"keepfocus")),noscroll===null&&(noscroll=link_option(el,"noscroll")),reload===null&&(reload=link_option(el,"reload")),replace_state===null&&(replace_state=link_option(el,"replacestate")),el=parent_element(el);function get_option_state(value){switch(value){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:levels[preload_code??
"off"],preload_data:levels[preload_data??"off"],keepfocus:get_option_state(keepfocus),noscroll:get_option_state(noscroll),reload:get_option_state(reload),replace_state:get_option_state(replace_state)}}function notifiable_store(value){const store=writable(value);let ready=!0;function notify(){ready=!0,store.update(val=>val)}function set2(new_value){ready=!1,store.set(new_value)}function subscribe(run2){let old_value;return store.subscribe(new_value=>{(old_value===void 0||ready&&new_value!==old_value)&&
run2(old_value=new_value)})}return{notify,set:set2,subscribe}}const updated_listener={v:noop$2};function create_updated_store(){const{set:set2,subscribe}=writable(!1);let timeout;async function check(){clearTimeout(timeout);try{const res=await fetch(`${assets}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!res.ok)return!1;const updated2=(await res.json()).version!==version$3;return updated2&&(set2(!0),updated_listener.v(),clearTimeout(timeout)),updated2}catch{return!1}}
return{subscribe,check}}function is_external_url(url2,base2,hash_routing){return url2.origin!==origin||!url2.pathname.startsWith(base2)?!0:hash_routing?url2.pathname!==location.pathname:!1}const valid_layout_exports=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...valid_layout_exports];const valid_layout_server_exports=new Set([...valid_layout_exports]);[...valid_layout_server_exports];function compact(arr){return arr.filter(val=>val!=null)}function get_status(error2){return error2 instanceof
HttpError||error2 instanceof SvelteKitError?error2.status:500}function get_message(error2){return error2 instanceof SvelteKitError?error2.text:"Internal Error"}let page$3,navigating,updated;const is_legacy=onMount$1.toString().includes("$$")||/function \w+\(\) \{\}/.test(onMount$1.toString()),placeholder_url="a:";is_legacy?(page$3={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL(placeholder_url)},navigating={current:null},updated={current:!1}):(page$3=new class{#data=state$1(
{});get data(){return get$3(this.#data)}set data(value){set$1(this.#data,value)}#form=state$1(null);get form(){return get$3(this.#form)}set form(value){set$1(this.#form,value)}#error=state$1(null);get error(){return get$3(this.#error)}set error(value){set$1(this.#error,value)}#params=state$1({});get params(){return get$3(this.#params)}set params(value){set$1(this.#params,value)}#route=state$1({id:null});get route(){return get$3(this.#route)}set route(value){set$1(this.#route,value)}#state=state$1(
{});get state(){return get$3(this.#state)}set state(value){set$1(this.#state,value)}#status=state$1(-1);get status(){return get$3(this.#status)}set status(value){set$1(this.#status,value)}#url=state$1(new URL(placeholder_url));get url(){return get$3(this.#url)}set url(value){set$1(this.#url,value)}},navigating=new class{#current=state$1(null);get current(){return get$3(this.#current)}set current(value){set$1(this.#current,value)}},updated=new class{#current=state$1(!1);get current(){return get$3(
this.#current)}set current(value){set$1(this.#current,value)}},updated_listener.v=()=>updated.current=!0);function update(new_page){Object.assign(page$3,new_page)}const noop_span={spanContext(){return noop_span_context},setAttribute(){return this},setAttributes(){return this},addEvent(){return this},setStatus(){return this},updateName(){return this},end(){return this},isRecording(){return!1},recordException(){return this},addLink(){return this},addLinks(){return this}},noop_span_context={traceId:"",
spanId:"",traceFlags:0},{onMount}=svelte,untrack=untrack$1??(value=>value()),ICON_REL_ATTRIBUTES=new Set(["icon","shortcut icon","apple-touch-icon"]);let rendering_error=null;const scroll_positions=get$2(SCROLL_KEY)??{},snapshots=get$2(SNAPSHOT_KEY)??{},stores={url:notifiable_store({}),page:notifiable_store({}),navigating:writable(null),updated:create_updated_store()};function update_scroll_positions(index2){scroll_positions[index2]=scroll_state()}function clear_onward_history(current_history_index2,current_navigation_index2){
let i=current_history_index2+1;for(;scroll_positions[i];)delete scroll_positions[i],i+=1;for(i=current_navigation_index2+1;snapshots[i];)delete snapshots[i],i+=1}function native_navigation(url2,replace2=!1){return replace2?location.replace(url2.href):location.href=url2.href,new Promise(noop$2)}async function update_service_worker(){if("serviceWorker"in navigator){const registration=await navigator.serviceWorker.getRegistration(base||"/");registration&&await registration.update()}}let routes,default_layout_loader,
default_error_loader,container,target,app$1;const invalidated=[],components=[];let load_cache=null;function discard_load_cache(){load_cache?.fork?.then(f=>f?.discard()),load_cache=null}const reroute_cache=new Map,before_navigate_callbacks=new Set,on_navigate_callbacks=new Set,after_navigate_callbacks=new Set;let current={branch:[],error:null,url:null},hydrated=!1,started=!1,autoscroll=!0,is_navigating=!1,hash_navigating=!1,has_navigated=!1,force_invalidation=!1,root$21,current_history_index,current_navigation_index,
token;const preload_tokens=new Set,query_map=new Map;async function start$1(_app,_target,hydrate2){globalThis.__sveltekit__&&(globalThis.__sveltekit__.query,globalThis.__sveltekit__.prerender),document.URL!==location.href&&(location.href=location.href),app$1=_app,await _app.hooks.init?.(),routes=parse$5(_app),container=document.documentElement,target=_target,default_layout_loader=_app.nodes[0],default_error_loader=_app.nodes[1],default_layout_loader(),default_error_loader(),current_history_index=
history.state?.[HISTORY_INDEX],current_navigation_index=history.state?.[NAVIGATION_INDEX],current_history_index||(current_history_index=current_navigation_index=Date.now(),history.replaceState({...history.state,[HISTORY_INDEX]:current_history_index,[NAVIGATION_INDEX]:current_navigation_index},""));const scroll=scroll_positions[current_history_index];function restore_scroll(){scroll&&(history.scrollRestoration="manual",scrollTo(scroll.x,scroll.y))}hydrate2?(restore_scroll(),await _hydrate(target,
hydrate2)):(await navigate({type:"enter",url:resolve_url(app$1.hash?decode_hash(new URL(location.href)):location.href),replace_state:!0}),restore_scroll()),_start_router()}function reset_invalidation(){invalidated.length=0,force_invalidation=!1}function capture_snapshot(index2){components.some(c2=>c2?.snapshot)&&(snapshots[index2]=components.map(c2=>c2?.snapshot?.capture()))}function restore_snapshot(index2){snapshots[index2]?.forEach((value,i)=>{components[i]?.snapshot?.restore(value)})}function persist_state(){
update_scroll_positions(current_history_index),set(SCROLL_KEY,scroll_positions),capture_snapshot(current_navigation_index),set(SNAPSHOT_KEY,snapshots)}async function _goto(url2,options,redirect_count,nav_token){let query_keys;options.invalidateAll&&discard_load_cache(),await navigate({type:"goto",url:resolve_url(url2),keepfocus:options.keepFocus,noscroll:options.noScroll,replace_state:options.replaceState,state:options.state,redirect_count,nav_token,accept:()=>{options.invalidateAll&&(force_invalidation=
!0,query_keys=[],query_map.forEach((entries,id2)=>{for(const payload of entries.keys())query_keys.push(id2+"/"+payload)})),options.invalidate&&options.invalidate.forEach(push_invalidated)}}),options.invalidateAll&&tick().then(tick).then(()=>{query_map.forEach((entries,id2)=>{entries.forEach(({resource},payload)=>{query_keys?.includes(id2+"/"+payload)&&resource.refresh?.()})})})}async function _preload_data(intent){if(intent.id!==load_cache?.id){discard_load_cache();const preload2={};preload_tokens.
add(preload2),load_cache={id:intent.id,token:preload2,promise:load_route({...intent,preload:preload2}).then(result=>(preload_tokens.delete(preload2),result.type==="loaded"&&result.state.error&&discard_load_cache(),result)),fork:null}}return load_cache.promise}async function _preload_code(url2){const route=(await get_navigation_intent(url2,!1))?.route;route&&await Promise.all([...route.layouts,route.leaf].filter(Boolean).map(load2=>load2[1]()))}async function initialize(result,target2,hydrate2){const nav={
params:current.params,route:{id:current.route?.id??null},url:new URL(location.href)};current={...result.state,nav};const style2=document.querySelector("style[data-sveltekit]");if(style2&&style2.remove(),Object.assign(page$3,result.props.page),root$21=new app$1.root({target:target2,props:{...result.props,stores,components},hydrate:hydrate2,sync:!1,transformError:void 0}),await Promise.resolve(),restore_snapshot(current_navigation_index),hydrate2){const navigation={from:null,to:{...nav,scroll:scroll_positions[current_history_index]??
scroll_state()},willUnload:!1,type:"enter",complete:Promise.resolve()};after_navigate_callbacks.forEach(fn=>fn(navigation))}started=!0}async function get_navigation_result_from_branch({url:url2,params,branch:branch2,errors:errors2,status,error:error2,route,form}){let slash="never";if(base&&(url2.pathname===base||url2.pathname===base+"/"))slash="always";else for(const node2 of branch2)node2?.slash!==void 0&&(slash=node2.slash);url2.pathname=normalize_path(url2.pathname,slash),url2.search=url2.search;
const result={type:"loaded",state:{url:url2,params,branch:branch2,error:error2,route},props:{constructors:compact(branch2).map(branch_node=>branch_node.node.component),page:clone_page(page$3)}};form!==void 0&&(result.props.form=form);let data={},data_changed=!page$3,p2=0;for(let i=0;i<Math.max(branch2.length,current.branch.length);i+=1){const node2=branch2[i],prev2=current.branch[i];node2?.data!==prev2?.data&&(data_changed=!0),node2&&(data={...data,...node2.data},data_changed&&(result.props[`dat\
a_${p2}`]=data),p2+=1)}return(!current.url||url2.href!==current.url.href||current.error!==error2||form!==void 0&&form!==page$3.form||data_changed)&&(result.props.page={error:error2,params,route:{id:route?.id??null},state:{},status,url:new URL(url2),form:form??null,data:data_changed?data:page$3.data}),result}async function load_node({loader,parent,url:url2,params,route,server_data_node}){let data=null,is_tracking=!0;const uses={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},
node2=await loader();if(node2.universal?.load){let depends=function(...deps){for(const dep of deps){const{href}=new URL(dep,url2);uses.dependencies.add(href)}};const load_input={tracing:{enabled:!1,root:noop_span,current:noop_span},route:new Proxy(route,{get:(target2,key2)=>(is_tracking&&(uses.route=!0),target2[key2])}),params:new Proxy(params,{get:(target2,key2)=>(is_tracking&&uses.params.add(key2),target2[key2])}),data:server_data_node?.data??null,url:make_trackable(url2,()=>{is_tracking&&(uses.
url=!0)},param=>{is_tracking&&uses.search_params.add(param)},app$1.hash),async fetch(resource,init2){resource instanceof Request&&(init2={body:resource.method==="GET"||resource.method==="HEAD"?void 0:await resource.blob(),cache:resource.cache,credentials:resource.credentials,headers:[...resource.headers].length>0?resource?.headers:void 0,integrity:resource.integrity,keepalive:resource.keepalive,method:resource.method,mode:resource.mode,redirect:resource.redirect,referrer:resource.referrer,referrerPolicy:resource.
referrerPolicy,signal:resource.signal,...init2});const{resolved,promise}=resolve_fetch_url(resource,init2,url2);return is_tracking&&depends(resolved.href),promise},setHeaders:noop$2,depends,parent(){return is_tracking&&(uses.parent=!0),parent()},untrack(fn){is_tracking=!1;try{return fn()}finally{is_tracking=!0}}};data=await node2.universal.load.call(null,load_input)??null}return{node:node2,loader,server:server_data_node,universal:node2.universal?.load?{type:"data",data,uses}:null,data:data??server_data_node?.
data??null,slash:node2.universal?.trailingSlash??server_data_node?.slash}}function resolve_fetch_url(input,init2,url2){let requested=input instanceof Request?input.url:input;const resolved=new URL(requested,url2);resolved.origin===url2.origin&&(requested=resolved.href.slice(url2.origin.length));const promise=started?subsequent_fetch(requested,resolved.href,init2):initial_fetch(requested,init2);return{resolved,promise}}function has_changed(parent_changed,route_changed,url_changed,search_params_changed,uses,params){
if(force_invalidation)return!0;if(!uses)return!1;if(uses.parent&&parent_changed||uses.route&&route_changed||uses.url&&url_changed)return!0;for(const tracked_params of uses.search_params)if(search_params_changed.has(tracked_params))return!0;for(const param of uses.params)if(params[param]!==current.params[param])return!0;for(const href of uses.dependencies)if(invalidated.some(fn=>fn(new URL(href))))return!0;return!1}function create_data_node(node2,previous2){return node2?.type==="data"?node2:node2?.
type==="skip"?previous2??null:null}function diff_search_params(old_url,new_url){if(!old_url)return new Set(new_url.searchParams.keys());const changed=new Set([...old_url.searchParams.keys(),...new_url.searchParams.keys()]);for(const key2 of changed){const old_values2=old_url.searchParams.getAll(key2),new_values=new_url.searchParams.getAll(key2);old_values2.every(value=>new_values.includes(value))&&new_values.every(value=>old_values2.includes(value))&&changed.delete(key2)}return changed}function preload_error({
error:error2,url:url2,route,params}){return{type:"loaded",state:{error:error2,url:url2,route,params,branch:[]},props:{page:clone_page(page$3),constructors:[]}}}async function load_route({id:id2,invalidating,url:url2,params,route,preload:preload2}){if(load_cache?.id===id2)return preload_tokens.delete(load_cache.token),load_cache.promise;const{errors:errors2,layouts,leaf:leaf2}=route,loaders=[...layouts,leaf2];errors2.forEach(loader=>loader?.().catch(noop$2)),loaders.forEach(loader=>loader?.[1]().
catch(noop$2));const url_changed=current.url?id2!==get_page_key(current.url):!1,route_changed=current.route?route.id!==current.route.id:!1,search_params_changed=diff_search_params(current.url,url2);let parent_changed=!1;const branch_promises=loaders.map(async(loader,i)=>{if(!loader)return;const previous2=current.branch[i];return loader[1]===previous2?.loader&&!has_changed(parent_changed,route_changed,url_changed,search_params_changed,previous2.universal?.uses,params)?previous2:(parent_changed=!0,
load_node({loader:loader[1],url:url2,params,route,parent:async()=>{const data={};for(let j=0;j<i;j+=1)Object.assign(data,(await branch_promises[j])?.data);return data},server_data_node:create_data_node(loader[0]?{type:"skip"}:null,loader[0]?previous2?.server:void 0)}))});for(const p2 of branch_promises)p2.catch(noop$2);const branch2=[];for(let i=0;i<loaders.length;i+=1)if(loaders[i])try{branch2.push(await branch_promises[i])}catch(err){if(err instanceof Redirect)return{type:"redirect",location:err.
location};if(preload_tokens.has(preload2))return preload_error({error:await handle_error(err,{params,url:url2,route:{id:route.id}}),url:url2,params,route});let status=get_status(err),error2;if(err instanceof HttpError)error2=err.body;else{if(await stores.updated.check())return await update_service_worker(),await native_navigation(url2);error2=await handle_error(err,{params,url:url2,route:{id:route.id}})}const error_load=await load_nearest_error_page(i,branch2,errors2);return error_load?get_navigation_result_from_branch(
{url:url2,params,branch:branch2.slice(0,error_load.idx).concat(error_load.node),errors:errors2,status,error:error2,route}):await server_fallback(url2,{id:route.id},error2,status)}else branch2.push(void 0);return get_navigation_result_from_branch({url:url2,params,branch:branch2,errors:errors2,status:200,error:null,route,form:invalidating?void 0:null})}async function load_nearest_error_page(i,branch2,errors2){for(;i--;)if(errors2[i]){let j=i;for(;!branch2[j];)j-=1;try{return{idx:j+1,node:{node:await errors2[i](),
loader:errors2[i],data:{},server:null,universal:null}}}catch{continue}}}async function load_root_error_page({status,error:error2,url:url2,route}){const params={};let server_data_node=null;try{const root_layout=await load_node({loader:default_layout_loader,url:url2,params,route,parent:()=>Promise.resolve({}),server_data_node:create_data_node(server_data_node)}),root_error={node:await default_error_loader(),loader:default_error_loader,universal:null,server:null,data:null};return get_navigation_result_from_branch(
{url:url2,params,branch:[root_layout,root_error],status,error:error2,errors:[],route:null})}catch(error22){if(error22 instanceof Redirect)return _goto(new URL(error22.location,location.href),{},0);throw error22}}async function get_rerouted_url(url2){const href=url2.href;if(reroute_cache.has(href))return reroute_cache.get(href);let rerouted;try{const promise=(async()=>{let rerouted2=await app$1.hooks.reroute({url:new URL(url2),fetch:async(input,init2)=>resolve_fetch_url(input,init2,url2).promise})??
url2;if(typeof rerouted2=="string"){const tmp=new URL(url2);app$1.hash?tmp.hash=rerouted2:tmp.pathname=rerouted2,rerouted2=tmp}return rerouted2})();reroute_cache.set(href,promise),rerouted=await promise}catch{reroute_cache.delete(href);return}return rerouted}async function get_navigation_intent(url2,invalidating){if(url2&&!is_external_url(url2,base,app$1.hash)){const rerouted=await get_rerouted_url(url2);if(!rerouted)return;const path2=get_url_path(rerouted);for(const route of routes){const params=route.
exec(path2);if(params)return{id:get_page_key(url2),invalidating,route,params:decode_params(params),url:url2}}}}function get_url_path(url2){return decode_pathname(app$1.hash?url2.hash.replace(/^#/,"").replace(/[?#].+/,""):url2.pathname.slice(base.length))||"/"}function get_page_key(url2){return(app$1.hash?url2.hash.replace(/^#/,""):url2.pathname)+url2.search}function _before_navigate({url:url2,type:type2,intent,delta,event:event2,scroll}){let should_block=!1;const nav=create_navigation(current,intent,
url2,type2,scroll??null);delta!==void 0&&(nav.navigation.delta=delta),event2!==void 0&&(nav.navigation.event=event2);const cancellable={...nav.navigation,cancel:()=>{should_block=!0,nav.reject(new Error("navigation cancelled"))}};return is_navigating||before_navigate_callbacks.forEach(fn=>fn(cancellable)),should_block?null:nav}async function navigate({type:type2,url:url2,popped,keepfocus,noscroll,replace_state,state:state2={},redirect_count=0,nav_token={},accept=noop$2,block:block2=noop$2,event:event2}){
const prev_token=token;token=nav_token;const intent=await get_navigation_intent(url2,!1),nav=type2==="enter"?create_navigation(current,intent,url2,type2):_before_navigate({url:url2,type:type2,delta:popped?.delta,intent,scroll:popped?.scroll,event:event2});if(!nav){block2(),token===nav_token&&(token=prev_token);return}const previous_history_index=current_history_index,previous_navigation_index=current_navigation_index;accept(),is_navigating=!0,started&&nav.navigation.type!=="enter"&&stores.navigating.
set(navigating.current=nav.navigation);let navigation_result=intent&&await load_route(intent);if(!navigation_result){if(is_external_url(url2,base,app$1.hash))return await native_navigation(url2,replace_state);navigation_result=await server_fallback(url2,{id:null},await handle_error(new SvelteKitError(404,"Not Found",`Not found: ${url2.pathname}`),{url:url2,params:{},route:{id:null}}),404,replace_state)}if(url2=intent?.url||url2,token!==nav_token)return nav.reject(new Error("navigation aborted")),
!1;if(navigation_result.type==="redirect"){if(redirect_count<20){await navigate({type:type2,url:new URL(navigation_result.location,url2),popped,keepfocus,noscroll,replace_state,state:state2,redirect_count:redirect_count+1,nav_token}),nav.fulfil(void 0);return}navigation_result=await load_root_error_page({status:500,error:await handle_error(new Error("Redirect loop"),{url:url2,params:{},route:{id:null}}),url:url2,route:{id:null}})}else navigation_result.props.page.status>=400&&await stores.updated.
check()&&(await update_service_worker(),await native_navigation(url2,replace_state));if(reset_invalidation(),update_scroll_positions(previous_history_index),capture_snapshot(previous_navigation_index),navigation_result.props.page.url.pathname!==url2.pathname&&(url2.pathname=navigation_result.props.page.url.pathname),state2=popped?popped.state:state2,!popped){const change=replace_state?0:1,entry={[HISTORY_INDEX]:current_history_index+=change,[NAVIGATION_INDEX]:current_navigation_index+=change,[STATES_KEY]:state2};
(replace_state?history.replaceState:history.pushState).call(history,entry,"",url2),replace_state||clear_onward_history(current_history_index,current_navigation_index)}const load_cache_fork=intent&&load_cache?.id===intent.id?load_cache.fork:null;load_cache?.fork&&!load_cache_fork&&discard_load_cache(),load_cache=null,navigation_result.props.page.state=state2;let commit_promise;if(started){const after_navigate=(await Promise.all(Array.from(on_navigate_callbacks,fn=>fn(nav.navigation)))).filter(value=>typeof value==
"function");if(after_navigate.length>0){let cleanup=function(){after_navigate.forEach(fn=>{after_navigate_callbacks.delete(fn)})};after_navigate.push(cleanup),after_navigate.forEach(fn=>{after_navigate_callbacks.add(fn)})}const target2=nav.navigation.to;current={...navigation_result.state,nav:{params:target2.params,route:target2.route,url:target2.url}},navigation_result.props.page&&(navigation_result.props.page.url=url2);const fork=load_cache_fork&&await load_cache_fork;fork?commit_promise=fork.
commit():(rendering_error=null,root$21.$set(navigation_result.props),rendering_error&&Object.assign(navigation_result.props.page,rendering_error),update(navigation_result.props.page),commit_promise=settled?.()),has_navigated=!0}else await initialize(navigation_result,target,!1);const{activeElement}=document;await commit_promise,await tick(),await tick();let deep_linked=null;if(autoscroll){const scroll=popped?popped.scroll:noscroll?scroll_state():null;scroll?scrollTo(scroll.x,scroll.y):(deep_linked=
url2.hash&&document.getElementById(get_id(url2)))?deep_linked.scrollIntoView():scrollTo(0,0)}const changed_focus=document.activeElement!==activeElement&&document.activeElement!==document.body;!keepfocus&&!changed_focus&&reset_focus(url2,!deep_linked),autoscroll=!0,navigation_result.props.page&&(rendering_error&&Object.assign(navigation_result.props.page,rendering_error),Object.assign(page$3,navigation_result.props.page)),is_navigating=!1,type2==="popstate"&&restore_snapshot(current_navigation_index),
nav.fulfil(void 0),nav.navigation.to&&(nav.navigation.to.scroll=scroll_state()),after_navigate_callbacks.forEach(fn=>fn(nav.navigation)),stores.navigating.set(navigating.current=null)}async function server_fallback(url2,route,error2,status,replace_state){return url2.origin===origin&&url2.pathname===location.pathname&&!hydrated?await load_root_error_page({status,error:error2,url:url2,route}):await native_navigation(url2,replace_state)}function setup_preload(){let mousemove_timeout,current_a={element:void 0,
href:void 0},current_priority;container.addEventListener("mousemove",event2=>{const target2=event2.target;clearTimeout(mousemove_timeout),mousemove_timeout=setTimeout(()=>{preload2(target2,PRELOAD_PRIORITIES.hover)},20)});function tap2(event2){event2.defaultPrevented||preload2(event2.composedPath()[0],PRELOAD_PRIORITIES.tap)}container.addEventListener("mousedown",tap2),container.addEventListener("touchstart",tap2,{passive:!0});const observer=new IntersectionObserver(entries=>{for(const entry of entries)
entry.isIntersecting&&(_preload_code(new URL(entry.target.href)),observer.unobserve(entry.target))},{threshold:0});async function preload2(element2,priority){const a=find_anchor(element2,container),interacted=a===current_a.element&&a?.href===current_a.href&&priority>=current_priority;if(!a||interacted)return;const{url:url2,external,download}=get_link_info(a,base,app$1.hash);if(external||download)return;const options=get_router_options(a),same_url=url2&&get_page_key(current.url)===get_page_key(url2);
if(!(options.reload||same_url))if(priority<=options.preload_data){current_a={element:a,href:a.href},current_priority=PRELOAD_PRIORITIES.tap;const intent=await get_navigation_intent(url2,!1);if(!intent)return;_preload_data(intent)}else priority<=options.preload_code&&(current_a={element:a,href:a.href},current_priority=priority,_preload_code(url2))}function after_navigate(){observer.disconnect();for(const a of container.querySelectorAll("a")){const{url:url2,external,download}=get_link_info(a,base,
app$1.hash);if(external||download)continue;const options=get_router_options(a);options.reload||(options.preload_code===PRELOAD_PRIORITIES.viewport&&observer.observe(a),options.preload_code===PRELOAD_PRIORITIES.eager&&_preload_code(url2))}}after_navigate_callbacks.add(after_navigate),after_navigate()}function handle_error(error2,event2){if(error2 instanceof HttpError)return error2.body;const status=get_status(error2),message=get_message(error2);return app$1.hooks.handleError({error:error2,event:event2,
status,message})??{message}}function add_navigation_callback(callbacks,callback){onMount(()=>(callbacks.add(callback),()=>{callbacks.delete(callback)}))}function afterNavigate(callback){add_navigation_callback(after_navigate_callbacks,callback)}function beforeNavigate(callback){add_navigation_callback(before_navigate_callbacks,callback)}function goto(url2,opts={}){return url2=new URL(resolve_url(url2)),url2.origin!==origin?Promise.reject(new Error("goto: invalid URL")):_goto(url2,opts,0)}function push_invalidated(resource){
if(typeof resource=="function")invalidated.push(resource);else{const{href}=new URL(resource,location.href);invalidated.push(url2=>url2.href===href)}}function replaceState(url2,state2){const opts={[HISTORY_INDEX]:current_history_index,[NAVIGATION_INDEX]:current_navigation_index,[PAGE_URL_KEY]:page$3.url.href,[STATES_KEY]:state2};history.replaceState(opts,"",resolve_url(url2)),page$3.state=state2,root$21.$set({page:untrack(()=>clone_page(page$3))})}function _start_router(){history.scrollRestoration=
"manual",addEventListener("beforeunload",e=>{let should_block=!1;if(persist_state(),!is_navigating){const nav=create_navigation(current,void 0,null,"leave"),navigation={...nav.navigation,cancel:()=>{should_block=!0,nav.reject(new Error("navigation cancelled"))}};before_navigate_callbacks.forEach(fn=>fn(navigation))}should_block?(e.preventDefault(),e.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&persist_state()}),navigator.
connection?.saveData||setup_preload(),container.addEventListener("click",async event2=>{if(event2.button||event2.which!==1||event2.metaKey||event2.ctrlKey||event2.shiftKey||event2.altKey||event2.defaultPrevented)return;const a=find_anchor(event2.composedPath()[0],container);if(!a)return;const{url:url2,external,target:target2,download}=get_link_info(a,base,app$1.hash);if(!url2)return;if(target2==="_parent"||target2==="_top"){if(window.parent!==window)return}else if(target2&&target2!=="_self")return;
const options=get_router_options(a);if(!(a instanceof SVGAElement)&&url2.protocol!==location.protocol&&!(url2.protocol==="https:"||url2.protocol==="http:")||download)return;const[nonhash,hash2]=(app$1.hash?url2.hash.replace(/^#/,""):url2.href).split("#"),same_pathname=nonhash===strip_hash(location);if(external||options.reload&&(!same_pathname||!hash2)){_before_navigate({url:url2,type:"link",event:event2})?is_navigating=!0:event2.preventDefault();return}if(hash2!==void 0&&same_pathname){const[,current_hash]=current.
url.href.split("#");if(current_hash===hash2){if(event2.preventDefault(),hash2===""||hash2==="top"&&a.ownerDocument.getElementById("top")===null)scrollTo({top:0});else{const element2=a.ownerDocument.getElementById(decodeURIComponent(hash2));element2&&(element2.scrollIntoView(),element2.focus())}return}if(hash_navigating=!0,update_scroll_positions(current_history_index),update_url(url2),!options.replace_state)return;hash_navigating=!1}event2.preventDefault(),await new Promise(fulfil=>{requestAnimationFrame(
()=>{setTimeout(fulfil,0)}),setTimeout(fulfil,100)}),await navigate({type:"link",url:url2,keepfocus:options.keepfocus,noscroll:options.noscroll,replace_state:options.replace_state??url2.href===location.href,event:event2})}),container.addEventListener("submit",event2=>{if(event2.defaultPrevented)return;const form=HTMLFormElement.prototype.cloneNode.call(event2.target),submitter=event2.submitter;if((submitter?.formTarget||form.target)==="_blank"||(submitter?.formMethod||form.method)!=="get")return;
const url2=new URL(submitter?.hasAttribute("formaction")&&submitter?.formAction||form.action);if(is_external_url(url2,base,!1))return;const event_form=event2.target,options=get_router_options(event_form);if(options.reload)return;event2.preventDefault(),event2.stopPropagation();const data=new FormData(event_form,submitter);url2.search=new URLSearchParams(data).toString(),navigate({type:"form",url:url2,keepfocus:options.keepfocus,noscroll:options.noscroll,replace_state:options.replace_state??url2.
href===location.href,event:event2})}),addEventListener("popstate",async event2=>{if(!resetting_focus){if(event2.state?.[HISTORY_INDEX]){const history_index=event2.state[HISTORY_INDEX];if(token={},history_index===current_history_index)return;const scroll=scroll_positions[history_index],state2=event2.state[STATES_KEY]??{},url2=new URL(event2.state[PAGE_URL_KEY]??location.href),navigation_index=event2.state[NAVIGATION_INDEX],is_hash_change=current.url?strip_hash(location)===strip_hash(current.url):
!1;if(navigation_index===current_navigation_index&&(has_navigated||is_hash_change)){state2!==page$3.state&&(page$3.state=state2),update_url(url2),scroll_positions[current_history_index]=scroll_state(),scroll&&scrollTo(scroll.x,scroll.y),current_history_index=history_index;return}const delta=history_index-current_history_index;await navigate({type:"popstate",url:url2,popped:{state:state2,scroll,delta},accept:()=>{current_history_index=history_index,current_navigation_index=navigation_index},block:()=>{
history.go(-delta)},nav_token:token,event:event2})}else if(!hash_navigating){const url2=new URL(location.href);update_url(url2),app$1.hash&&location.reload()}}}),addEventListener("hashchange",()=>{hash_navigating&&(hash_navigating=!1,history.replaceState({...history.state,[HISTORY_INDEX]:++current_history_index,[NAVIGATION_INDEX]:current_navigation_index},"",location.href))});for(const link2 of document.querySelectorAll("link"))ICON_REL_ATTRIBUTES.has(link2.rel)&&(link2.href=link2.href);addEventListener(
"pageshow",event2=>{event2.persisted&&stores.navigating.set(navigating.current=null)});function update_url(url2){current.url=page$3.url=url2,stores.page.set(clone_page(page$3)),stores.page.notify()}}async function _hydrate(target2,{status=200,error:error2,node_ids,params,route,server_route,data:server_data_nodes,form}){hydrated=!0;const url2=new URL(location.href);let parsed_route;({params={},route={id:null}}=await get_navigation_intent(url2,!1)||{}),parsed_route=routes.find(({id:id2})=>id2===route.
id);let result,hydrate2=!0;try{const branch_promises=node_ids.map(async(n,i)=>{const server_data_node=server_data_nodes[i];return server_data_node?.uses&&(server_data_node.uses=deserialize_uses(server_data_node.uses)),load_node({loader:app$1.nodes[n],url:url2,params,route,parent:async()=>{const data={};for(let j=0;j<i;j+=1)Object.assign(data,(await branch_promises[j]).data);return data},server_data_node:create_data_node(server_data_node)})}),branch2=await Promise.all(branch_promises);if(parsed_route){
const layouts=parsed_route.layouts;for(let i=0;i<layouts.length;i++)layouts[i]||branch2.splice(i,0,void 0)}result=await get_navigation_result_from_branch({url:url2,params,branch:branch2,status,error:error2,errors:parsed_route?.errors,form,route:parsed_route??null})}catch(error22){if(error22 instanceof Redirect){await native_navigation(new URL(error22.location,location.href));return}result=await load_root_error_page({status:get_status(error22),error:await handle_error(error22,{url:url2,params,route}),
url:url2,route}),target2.textContent="",hydrate2=!1}result.props.page&&(result.props.page.state={}),await initialize(result,target2,hydrate2)}function deserialize_uses(uses){return{dependencies:new Set(uses?.dependencies??[]),params:new Set(uses?.params??[]),parent:!!uses?.parent,route:!!uses?.route,url:!!uses?.url,search_params:new Set(uses?.search_params??[])}}let resetting_focus=!1;function reset_focus(url2,scroll=!0){const autofocus2=document.querySelector("[autofocus]");if(autofocus2)autofocus2.
focus();else{const id2=get_id(url2);if(id2&&document.getElementById(id2)){const{x,y}=scroll_state();setTimeout(()=>{const history_state=history.state;resetting_focus=!0,location.replace(new URL(`#${id2}`,location.href)),history.replaceState(history_state,"",url2),scroll&&scrollTo(x,y),resetting_focus=!1})}else{const root2=document.body,tabindex=root2.getAttribute("tabindex");root2.tabIndex=-1,root2.focus({preventScroll:!0,focusVisible:!1}),tabindex!==null?root2.setAttribute("tabindex",tabindex):
root2.removeAttribute("tabindex")}const selection=getSelection();if(selection&&selection.type!=="None"){const ranges=[];for(let i=0;i<selection.rangeCount;i+=1)ranges.push(selection.getRangeAt(i));setTimeout(()=>{if(selection.rangeCount===ranges.length){for(let i=0;i<selection.rangeCount;i+=1){const a=ranges[i],b=selection.getRangeAt(i);if(a.commonAncestorContainer!==b.commonAncestorContainer||a.startContainer!==b.startContainer||a.endContainer!==b.endContainer||a.startOffset!==b.startOffset||a.
endOffset!==b.endOffset)return}selection.removeAllRanges()}})}}}function create_navigation(current2,intent,url2,type2,target_scroll=null){let fulfil,reject;const complete=new Promise((f,r2)=>{fulfil=f,reject=r2});return complete.catch(noop$2),{navigation:{from:{params:current2.params,route:{id:current2.route?.id??null},url:current2.url,scroll:scroll_state()},to:url2&&{params:intent?.params??null,route:{id:intent?.route?.id??null},url:url2,scroll:target_scroll},willUnload:!intent,type:type2,complete},
fulfil,reject}}function clone_page(page2){return{data:page2.data,error:page2.error,form:page2.form,params:page2.params,route:page2.route,state:page2.state,status:page2.status,url:page2.url}}function decode_hash(url2){const new_url=new URL(url2);return new_url.hash=decodeURIComponent(url2.hash),new_url}function get_id(url2){let id2;if(app$1.hash){const[,,second]=url2.hash.split("#",3);id2=second??""}else id2=url2.hash.slice(1);return decodeURIComponent(id2)}const scriptRel="modulepreload",assetsURL=function(dep,importerUrl){
return new URL(dep,importerUrl).href},seen={},__vitePreload=function(baseModule,deps,importerUrl){let promise=Promise.resolve();if(deps&&deps.length>0){let allSettled=function(promises$2){return Promise.all(promises$2.map(p2=>Promise.resolve(p2).then(value$1=>({status:"fulfilled",value:value$1}),reason=>({status:"rejected",reason}))))};const links=document.getElementsByTagName("link"),cspNonceMeta=document.querySelector("meta[property=csp-nonce]"),cspNonce=cspNonceMeta?.nonce||cspNonceMeta?.getAttribute(
"nonce");promise=allSettled(deps.map(dep=>{if(dep=assetsURL(dep,importerUrl),dep in seen)return;seen[dep]=!0;const isCss=dep.endsWith(".css"),cssSelector=isCss?'[rel="stylesheet"]':"";if(importerUrl)for(let i$1=links.length-1;i$1>=0;i$1--){const link$12=links[i$1];if(link$12.href===dep&&(!isCss||link$12.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${dep}"]${cssSelector}`))return;const link2=document.createElement("link");if(link2.rel=isCss?"stylesheet":scriptRel,isCss||(link2.
as="script"),link2.crossOrigin="",link2.href=dep,cspNonce&&link2.setAttribute("nonce",cspNonce),document.head.appendChild(link2),isCss)return new Promise((res,rej)=>{link2.addEventListener("load",res),link2.addEventListener("error",()=>rej(new Error(`Unable to preload CSS for ${dep}`)))})}))}function handlePreloadError(err$2){const e$1=new Event("vite:preloadError",{cancelable:!0});if(e$1.payload=err$2,window.dispatchEvent(e$1),!e$1.defaultPrevented)throw err$2}return promise.then(res=>{for(const item of res||
[])item.status==="rejected"&&handlePreloadError(item.reason);return baseModule().catch(handlePreloadError)})},matchers={},PUBLIC_VERSION="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(PUBLIC_VERSION);var root_7$w=from_html('<div id="svelte-announcer" aria-live="assertive" aria-atomic="true" style="position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px"><!></div>'),root$20=from_html("<!> <!>",
1);function Root$6($$anchor,$$props){push$1($$props,!0);let components2=prop($$props,"components",23,()=>[]),data_0=prop($$props,"data_0",3,null),data_1=prop($$props,"data_1",3,null),data_2=prop($$props,"data_2",3,null);user_pre_effect(()=>$$props.stores.page.set($$props.page)),user_effect(()=>{$$props.stores,$$props.page,$$props.constructors,components2(),$$props.form,data_0(),data_1(),data_2(),$$props.stores.page.notify()});let mounted=state$1(!1),navigated=state$1(!1),title2=state$1(null);onMount$1(
()=>{const unsubscribe=$$props.stores.page.subscribe(()=>{get$3(mounted)&&(set$1(navigated,!0),tick().then(()=>{set$1(title2,document.title||"untitled page",!0)}))});return set$1(mounted,!0),unsubscribe});const Pyramid_2=user_derived(()=>$$props.constructors[2]);var fragment=root$20(),node2=first_child(fragment);{var consequent_1=$$anchor2=>{const Pyramid_0=user_derived(()=>$$props.constructors[0]);var fragment_1=comment$2(),node_1=first_child(fragment_1);component(node_1,()=>get$3(Pyramid_0),($$anchor3,Pyramid_0_1)=>{
bind_this(Pyramid_0_1($$anchor3,{get data(){return data_0()},get form(){return $$props.form},get params(){return $$props.page.params},children:($$anchor4,$$slotProps)=>{var fragment_2=comment$2(),node_2=first_child(fragment_2);{var consequent=$$anchor5=>{const Pyramid_1=user_derived(()=>$$props.constructors[1]);var fragment_3=comment$2(),node_3=first_child(fragment_3);component(node_3,()=>get$3(Pyramid_1),($$anchor6,Pyramid_1_1)=>{bind_this(Pyramid_1_1($$anchor6,{get data(){return data_1()},get form(){
return $$props.form},get params(){return $$props.page.params},children:($$anchor7,$$slotProps2)=>{var fragment_4=comment$2(),node_4=first_child(fragment_4);component(node_4,()=>get$3(Pyramid_2),($$anchor8,Pyramid_2_1)=>{bind_this(Pyramid_2_1($$anchor8,{get data(){return data_2()},get form(){return $$props.form},get params(){return $$props.page.params}}),$$value=>components2()[2]=$$value,()=>components2()?.[2])}),append($$anchor7,fragment_4)},$$slots:{default:!0}}),$$value=>components2()[1]=$$value,
()=>components2()?.[1])}),append($$anchor5,fragment_3)},alternate=$$anchor5=>{const Pyramid_1=user_derived(()=>$$props.constructors[1]);var fragment_5=comment$2(),node_5=first_child(fragment_5);component(node_5,()=>get$3(Pyramid_1),($$anchor6,Pyramid_1_2)=>{bind_this(Pyramid_1_2($$anchor6,{get data(){return data_1()},get form(){return $$props.form},get params(){return $$props.page.params}}),$$value=>components2()[1]=$$value,()=>components2()?.[1])}),append($$anchor5,fragment_5)};if_block(node_2,
$$render=>{$$props.constructors[2]?$$render(consequent):$$render(alternate,-1)})}append($$anchor4,fragment_2)},$$slots:{default:!0}}),$$value=>components2()[0]=$$value,()=>components2()?.[0])}),append($$anchor2,fragment_1)},alternate_1=$$anchor2=>{const Pyramid_0=user_derived(()=>$$props.constructors[0]);var fragment_6=comment$2(),node_6=first_child(fragment_6);component(node_6,()=>get$3(Pyramid_0),($$anchor3,Pyramid_0_2)=>{bind_this(Pyramid_0_2($$anchor3,{get data(){return data_0()},get form(){
return $$props.form},get params(){return $$props.page.params}}),$$value=>components2()[0]=$$value,()=>components2()?.[0])}),append($$anchor2,fragment_6)};if_block(node2,$$render=>{$$props.constructors[1]?$$render(consequent_1):$$render(alternate_1,-1)})}var node_7=sibling(node2,2);{var consequent_3=$$anchor2=>{var div=root_7$w(),node_8=child(div);{var consequent_2=$$anchor3=>{var text2=text$8();template_effect(()=>set_text(text2,get$3(title2))),append($$anchor3,text2)};if_block(node_8,$$render=>{
get$3(navigated)&&$$render(consequent_2)})}reset(div),append($$anchor2,div)};if_block(node_7,$$render=>{get$3(mounted)&&$$render(consequent_3)})}append($$anchor,fragment),pop()}const root$1$=asClassComponent(Root$6),nodes=[()=>__vitePreload(()=>Promise.resolve().then(()=>_0),void 0,import.meta.url),()=>__vitePreload(()=>Promise.resolve().then(()=>_1),void 0,import.meta.url),()=>__vitePreload(()=>Promise.resolve().then(()=>_2),void 0,import.meta.url),()=>__vitePreload(
()=>Promise.resolve().then(()=>_3),void 0,import.meta.url),()=>__vitePreload(()=>Promise.resolve().then(()=>_4),void 0,import.meta.url),()=>__vitePreload(()=>Promise.resolve().then(()=>_5),void 0,import.meta.url),()=>__vitePreload(()=>Promise.resolve().then(()=>_6),void 0,import.meta.url),()=>__vitePreload(()=>Promise.resolve().then(()=>_7),void 0,import.meta.url)],server_loads=[],dictionary={"/(chat)":[4,[2]],"/(chat)/chat/[id]":[5,[2]],"/mcp-se\
rvers":[6],"/settings/[[section]]":[7,[3]]},hooks={handleError:(({error:error2})=>{console.error(error2)}),reroute:(()=>{}),transport:{}},decoders=Object.fromEntries(Object.entries(hooks.transport).map(([k,v])=>[k,v.decode])),encoders=Object.fromEntries(Object.entries(hooks.transport).map(([k,v])=>[k,v.encode])),hash=!0,decode$2=(type2,value)=>decoders[type2](value),app=Object.freeze(Object.defineProperty({__proto__:null,decode:decode$2,decoders,dictionary,encoders,hash,hooks,matchers,nodes,root:root$1$,
server_loads},Symbol.toStringTag,{value:"Module"}));function start(element2,options){start$1(app,element2,options)}const page$2={get params(){return page$3.params},get route(){return page$3.route},get status(){return page$3.status},get url(){return page$3.url}};stores.updated.check;const page$1=page$2,linear=x=>x;function cubic_out(t){const f=t-1;return f*f*f+1}function split_css_unit(value){const split=typeof value=="string"&&value.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return split?[parseFloat(split[1]),
split[2]||"px"]:[value,"px"]}function fade(node2,{delay=0,duration:duration2=400,easing=linear}={}){const o=+getComputedStyle(node2).opacity;return{delay,duration:duration2,easing,css:t=>`opacity: ${t*o}`}}function fly(node2,{delay=0,duration:duration2=400,easing=cubic_out,x=0,y=0,opacity=0}={}){const style2=getComputedStyle(node2),target_opacity=+style2.opacity,transform2=style2.transform==="none"?"":style2.transform,od=target_opacity*(1-opacity),[x_value,x_unit]=split_css_unit(x),[y_value,y_unit]=split_css_unit(
y);return{delay,duration:duration2,easing,css:(t,u)=>`
			transform: ${transform2} translate(${(1-t)*x_value}${x_unit}, ${(1-t)*y_value}${y_unit});
			opacity: ${target_opacity-od*u}`}}function scale(node2,{delay=0,duration:duration2=400,easing=cubic_out,start:start2=0,opacity=0}={}){const style2=getComputedStyle(node2),target_opacity=+style2.opacity,transform2=style2.transform==="none"?"":style2.transform,sd=1-start2,od=target_opacity*(1-opacity);return{delay,duration:duration2,easing,css:(_t,u)=>`
			transform: ${transform2} scale(${1-sd*u});
			opacity: ${target_opacity-od*u}
		`}}const CLASS_PART_SEPARATOR="-",createClassGroupUtils=config2=>{const classMap=createClassMap(config2),{conflictingClassGroups,conflictingClassGroupModifiers}=config2;return{getClassGroupId:className=>{const classParts=className.split(CLASS_PART_SEPARATOR);return classParts[0]===""&&classParts.length!==1&&classParts.shift(),getGroupRecursive(classParts,classMap)||getGroupIdForArbitraryProperty(className)},getConflictingClassGroupIds:(classGroupId,hasPostfixModifier)=>{const conflicts=conflictingClassGroups[classGroupId]||
[];return hasPostfixModifier&&conflictingClassGroupModifiers[classGroupId]?[...conflicts,...conflictingClassGroupModifiers[classGroupId]]:conflicts}}},getGroupRecursive=(classParts,classPartObject)=>{if(classParts.length===0)return classPartObject.classGroupId;const currentClassPart=classParts[0],nextClassPartObject=classPartObject.nextPart.get(currentClassPart),classGroupFromNextClassPart=nextClassPartObject?getGroupRecursive(classParts.slice(1),nextClassPartObject):void 0;if(classGroupFromNextClassPart)
return classGroupFromNextClassPart;if(classPartObject.validators.length===0)return;const classRest=classParts.join(CLASS_PART_SEPARATOR);return classPartObject.validators.find(({validator})=>validator(classRest))?.classGroupId},arbitraryPropertyRegex=/^\[(.+)\]$/,getGroupIdForArbitraryProperty=className=>{if(arbitraryPropertyRegex.test(className)){const arbitraryPropertyClassName=arbitraryPropertyRegex.exec(className)[1],property=arbitraryPropertyClassName?.substring(0,arbitraryPropertyClassName.
indexOf(":"));if(property)return"arbitrary.."+property}},createClassMap=config2=>{const{theme,classGroups}=config2,classMap={nextPart:new Map,validators:[]};for(const classGroupId in classGroups)processClassesRecursively(classGroups[classGroupId],classMap,classGroupId,theme);return classMap},processClassesRecursively=(classGroup,classPartObject,classGroupId,theme)=>{classGroup.forEach(classDefinition=>{if(typeof classDefinition=="string"){const classPartObjectToEdit=classDefinition===""?classPartObject:
getPart(classPartObject,classDefinition);classPartObjectToEdit.classGroupId=classGroupId;return}if(typeof classDefinition=="function"){if(isThemeGetter(classDefinition)){processClassesRecursively(classDefinition(theme),classPartObject,classGroupId,theme);return}classPartObject.validators.push({validator:classDefinition,classGroupId});return}Object.entries(classDefinition).forEach(([key2,classGroup2])=>{processClassesRecursively(classGroup2,getPart(classPartObject,key2),classGroupId,theme)})})},getPart=(classPartObject,path2)=>{
let currentClassPartObject=classPartObject;return path2.split(CLASS_PART_SEPARATOR).forEach(pathPart=>{currentClassPartObject.nextPart.has(pathPart)||currentClassPartObject.nextPart.set(pathPart,{nextPart:new Map,validators:[]}),currentClassPartObject=currentClassPartObject.nextPart.get(pathPart)}),currentClassPartObject},isThemeGetter=func=>func.isThemeGetter,createLruCache=maxCacheSize=>{if(maxCacheSize<1)return{get:()=>{},set:()=>{}};let cacheSize=0,cache2=new Map,previousCache=new Map;const update2=(key2,value)=>{
cache2.set(key2,value),cacheSize++,cacheSize>maxCacheSize&&(cacheSize=0,previousCache=cache2,cache2=new Map)};return{get(key2){let value=cache2.get(key2);if(value!==void 0)return value;if((value=previousCache.get(key2))!==void 0)return update2(key2,value),value},set(key2,value){cache2.has(key2)?cache2.set(key2,value):update2(key2,value)}}},IMPORTANT_MODIFIER="!",MODIFIER_SEPARATOR=":",MODIFIER_SEPARATOR_LENGTH=MODIFIER_SEPARATOR.length,createParseClassName=config2=>{const{prefix,experimentalParseClassName}=config2;
let parseClassName=className=>{const modifiers=[];let bracketDepth=0,parenDepth=0,modifierStart=0,postfixModifierPosition;for(let index2=0;index2<className.length;index2++){let currentCharacter=className[index2];if(bracketDepth===0&&parenDepth===0){if(currentCharacter===MODIFIER_SEPARATOR){modifiers.push(className.slice(modifierStart,index2)),modifierStart=index2+MODIFIER_SEPARATOR_LENGTH;continue}if(currentCharacter==="/"){postfixModifierPosition=index2;continue}}currentCharacter==="["?bracketDepth++:
currentCharacter==="]"?bracketDepth--:currentCharacter==="("?parenDepth++:currentCharacter===")"&&parenDepth--}const baseClassNameWithImportantModifier=modifiers.length===0?className:className.substring(modifierStart),baseClassName=stripImportantModifier(baseClassNameWithImportantModifier),hasImportantModifier=baseClassName!==baseClassNameWithImportantModifier,maybePostfixModifierPosition=postfixModifierPosition&&postfixModifierPosition>modifierStart?postfixModifierPosition-modifierStart:void 0;
return{modifiers,hasImportantModifier,baseClassName,maybePostfixModifierPosition}};if(prefix){const fullPrefix=prefix+MODIFIER_SEPARATOR,parseClassNameOriginal=parseClassName;parseClassName=className=>className.startsWith(fullPrefix)?parseClassNameOriginal(className.substring(fullPrefix.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:className,maybePostfixModifierPosition:void 0}}if(experimentalParseClassName){const parseClassNameOriginal=parseClassName;parseClassName=
className=>experimentalParseClassName({className,parseClassName:parseClassNameOriginal})}return parseClassName},stripImportantModifier=baseClassName=>baseClassName.endsWith(IMPORTANT_MODIFIER)?baseClassName.substring(0,baseClassName.length-1):baseClassName.startsWith(IMPORTANT_MODIFIER)?baseClassName.substring(1):baseClassName,createSortModifiers=config2=>{const orderSensitiveModifiers=Object.fromEntries(config2.orderSensitiveModifiers.map(modifier=>[modifier,!0]));return modifiers=>{if(modifiers.
length<=1)return modifiers;const sortedModifiers=[];let unsortedModifiers=[];return modifiers.forEach(modifier=>{modifier[0]==="["||orderSensitiveModifiers[modifier]?(sortedModifiers.push(...unsortedModifiers.sort(),modifier),unsortedModifiers=[]):unsortedModifiers.push(modifier)}),sortedModifiers.push(...unsortedModifiers.sort()),sortedModifiers}},createConfigUtils=config2=>({cache:createLruCache(config2.cacheSize),parseClassName:createParseClassName(config2),sortModifiers:createSortModifiers(config2),
...createClassGroupUtils(config2)}),SPLIT_CLASSES_REGEX=/\s+/,mergeClassList=(classList,configUtils)=>{const{parseClassName,getClassGroupId,getConflictingClassGroupIds,sortModifiers}=configUtils,classGroupsInConflict=[],classNames=classList.trim().split(SPLIT_CLASSES_REGEX);let result="";for(let index2=classNames.length-1;index2>=0;index2-=1){const originalClassName=classNames[index2],{isExternal,modifiers,hasImportantModifier,baseClassName,maybePostfixModifierPosition}=parseClassName(originalClassName);
if(isExternal){result=originalClassName+(result.length>0?" "+result:result);continue}let hasPostfixModifier=!!maybePostfixModifierPosition,classGroupId=getClassGroupId(hasPostfixModifier?baseClassName.substring(0,maybePostfixModifierPosition):baseClassName);if(!classGroupId){if(!hasPostfixModifier){result=originalClassName+(result.length>0?" "+result:result);continue}if(classGroupId=getClassGroupId(baseClassName),!classGroupId){result=originalClassName+(result.length>0?" "+result:result);continue}
hasPostfixModifier=!1}const variantModifier=sortModifiers(modifiers).join(":"),modifierId=hasImportantModifier?variantModifier+IMPORTANT_MODIFIER:variantModifier,classId=modifierId+classGroupId;if(classGroupsInConflict.includes(classId))continue;classGroupsInConflict.push(classId);const conflictGroups=getConflictingClassGroupIds(classGroupId,hasPostfixModifier);for(let i=0;i<conflictGroups.length;++i){const group=conflictGroups[i];classGroupsInConflict.push(modifierId+group)}result=originalClassName+
(result.length>0?" "+result:result)}return result};function twJoin(){let index2=0,argument,resolvedValue,string2="";for(;index2<arguments.length;)(argument=arguments[index2++])&&(resolvedValue=toValue(argument))&&(string2&&(string2+=" "),string2+=resolvedValue);return string2}const toValue=mix=>{if(typeof mix=="string")return mix;let resolvedValue,string2="";for(let k=0;k<mix.length;k++)mix[k]&&(resolvedValue=toValue(mix[k]))&&(string2&&(string2+=" "),string2+=resolvedValue);return string2};function createTailwindMerge(createConfigFirst,...createConfigRest){
let configUtils,cacheGet,cacheSet,functionToCall=initTailwindMerge;function initTailwindMerge(classList){const config2=createConfigRest.reduce((previousConfig,createConfigCurrent)=>createConfigCurrent(previousConfig),createConfigFirst());return configUtils=createConfigUtils(config2),cacheGet=configUtils.cache.get,cacheSet=configUtils.cache.set,functionToCall=tailwindMerge,tailwindMerge(classList)}function tailwindMerge(classList){const cachedResult=cacheGet(classList);if(cachedResult)return cachedResult;
const result=mergeClassList(classList,configUtils);return cacheSet(classList,result),result}return function(){return functionToCall(twJoin.apply(null,arguments))}}const fromTheme=key2=>{const themeGetter=theme=>theme[key2]||[];return themeGetter.isThemeGetter=!0,themeGetter},arbitraryValueRegex=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,arbitraryVariableRegex=/^\((?:(\w[\w-]*):)?(.+)\)$/i,fractionRegex=/^\d+\/\d+$/,tshirtUnitRegex=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,lengthUnitRegex=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,
colorFunctionRegex=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,shadowRegex=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,imageRegex=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,isFraction=value=>fractionRegex.test(value),isNumber=value=>!!value&&!Number.isNaN(Number(value)),isInteger=value=>!!value&&Number.isInteger(Number(value)),isPercent=value=>value.endsWith("%")&&isNumber(value.slice(0,-1)),isTshirtSize=value=>tshirtUnitRegex.
test(value),isAny=()=>!0,isLengthOnly=value=>lengthUnitRegex.test(value)&&!colorFunctionRegex.test(value),isNever=()=>!1,isShadow=value=>shadowRegex.test(value),isImage=value=>imageRegex.test(value),isAnyNonArbitrary=value=>!isArbitraryValue(value)&&!isArbitraryVariable(value),isArbitrarySize=value=>getIsArbitraryValue(value,isLabelSize,isNever),isArbitraryValue=value=>arbitraryValueRegex.test(value),isArbitraryLength=value=>getIsArbitraryValue(value,isLabelLength,isLengthOnly),isArbitraryNumber=value=>getIsArbitraryValue(
value,isLabelNumber,isNumber),isArbitraryPosition=value=>getIsArbitraryValue(value,isLabelPosition,isNever),isArbitraryImage=value=>getIsArbitraryValue(value,isLabelImage,isImage),isArbitraryShadow=value=>getIsArbitraryValue(value,isLabelShadow,isShadow),isArbitraryVariable=value=>arbitraryVariableRegex.test(value),isArbitraryVariableLength=value=>getIsArbitraryVariable(value,isLabelLength),isArbitraryVariableFamilyName=value=>getIsArbitraryVariable(value,isLabelFamilyName),isArbitraryVariablePosition=value=>getIsArbitraryVariable(
value,isLabelPosition),isArbitraryVariableSize=value=>getIsArbitraryVariable(value,isLabelSize),isArbitraryVariableImage=value=>getIsArbitraryVariable(value,isLabelImage),isArbitraryVariableShadow=value=>getIsArbitraryVariable(value,isLabelShadow,!0),getIsArbitraryValue=(value,testLabel,testValue)=>{const result=arbitraryValueRegex.exec(value);return result?result[1]?testLabel(result[1]):testValue(result[2]):!1},getIsArbitraryVariable=(value,testLabel,shouldMatchNoLabel=!1)=>{const result=arbitraryVariableRegex.
exec(value);return result?result[1]?testLabel(result[1]):shouldMatchNoLabel:!1},isLabelPosition=label=>label==="position"||label==="percentage",isLabelImage=label=>label==="image"||label==="url",isLabelSize=label=>label==="length"||label==="size"||label==="bg-size",isLabelLength=label=>label==="length",isLabelNumber=label=>label==="number",isLabelFamilyName=label=>label==="family-name",isLabelShadow=label=>label==="shadow",getDefaultConfig=()=>{const themeColor=fromTheme("color"),themeFont=fromTheme(
"font"),themeText=fromTheme("text"),themeFontWeight=fromTheme("font-weight"),themeTracking=fromTheme("tracking"),themeLeading=fromTheme("leading"),themeBreakpoint=fromTheme("breakpoint"),themeContainer=fromTheme("container"),themeSpacing=fromTheme("spacing"),themeRadius=fromTheme("radius"),themeShadow=fromTheme("shadow"),themeInsetShadow=fromTheme("inset-shadow"),themeTextShadow=fromTheme("text-shadow"),themeDropShadow=fromTheme("drop-shadow"),themeBlur=fromTheme("blur"),themePerspective=fromTheme(
"perspective"),themeAspect=fromTheme("aspect"),themeEase=fromTheme("ease"),themeAnimate=fromTheme("animate"),scaleBreak=()=>["auto","avoid","all","avoid-page","page","left","right","column"],scalePosition=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],scalePositionWithArbitrary=()=>[...scalePosition(),isArbitraryVariable,isArbitraryValue],scaleOverflow=()=>["auto","hidden","clip","visible","scro\
ll"],scaleOverscroll=()=>["auto","contain","none"],scaleUnambiguousSpacing=()=>[isArbitraryVariable,isArbitraryValue,themeSpacing],scaleInset=()=>[isFraction,"full","auto",...scaleUnambiguousSpacing()],scaleGridTemplateColsRows=()=>[isInteger,"none","subgrid",isArbitraryVariable,isArbitraryValue],scaleGridColRowStartAndEnd=()=>["auto",{span:["full",isInteger,isArbitraryVariable,isArbitraryValue]},isInteger,isArbitraryVariable,isArbitraryValue],scaleGridColRowStartOrEnd=()=>[isInteger,"auto",isArbitraryVariable,
isArbitraryValue],scaleGridAutoColsRows=()=>["auto","min","max","fr",isArbitraryVariable,isArbitraryValue],scaleAlignPrimaryAxis=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],scaleAlignSecondaryAxis=()=>["start","end","center","stretch","center-safe","end-safe"],scaleMargin=()=>["auto",...scaleUnambiguousSpacing()],scaleSizing=()=>[isFraction,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...scaleUnambiguousSpacing()],
scaleColor=()=>[themeColor,isArbitraryVariable,isArbitraryValue],scaleBgPosition=()=>[...scalePosition(),isArbitraryVariablePosition,isArbitraryPosition,{position:[isArbitraryVariable,isArbitraryValue]}],scaleBgRepeat=()=>["no-repeat",{repeat:["","x","y","space","round"]}],scaleBgSize=()=>["auto","cover","contain",isArbitraryVariableSize,isArbitrarySize,{size:[isArbitraryVariable,isArbitraryValue]}],scaleGradientStopPosition=()=>[isPercent,isArbitraryVariableLength,isArbitraryLength],scaleRadius=()=>[
"","none","full",themeRadius,isArbitraryVariable,isArbitraryValue],scaleBorderWidth=()=>["",isNumber,isArbitraryVariableLength,isArbitraryLength],scaleLineStyle=()=>["solid","dashed","dotted","double"],scaleBlendMode=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],scaleMaskImagePosition=()=>[isNumber,isPercent,isArbitraryVariablePosition,isArbitraryPosition],scaleBlur=()=>[
"","none",themeBlur,isArbitraryVariable,isArbitraryValue],scaleRotate=()=>["none",isNumber,isArbitraryVariable,isArbitraryValue],scaleScale=()=>["none",isNumber,isArbitraryVariable,isArbitraryValue],scaleSkew=()=>[isNumber,isArbitraryVariable,isArbitraryValue],scaleTranslate=()=>[isFraction,"full",...scaleUnambiguousSpacing()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[isTshirtSize],breakpoint:[isTshirtSize],color:[isAny],container:[isTshirtSize],
"drop-shadow":[isTshirtSize],ease:["in","out","in-out"],font:[isAnyNonArbitrary],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[isTshirtSize],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[isTshirtSize],shadow:[isTshirtSize],spacing:["px",isNumber],text:[isTshirtSize],"text-shadow":[isTshirtSize],tracking:["tighter","tight","normal","wide",
"wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",isFraction,isArbitraryValue,isArbitraryVariable,themeAspect]}],container:["container"],columns:[{columns:[isNumber,isArbitraryValue,isArbitraryVariable,themeContainer]}],"break-after":[{"break-after":scaleBreak()}],"break-before":[{"break-before":scaleBreak()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:[
"block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cove\
r","fill","none","scale-down"]}],"object-position":[{object:scalePositionWithArbitrary()}],overflow:[{overflow:scaleOverflow()}],"overflow-x":[{"overflow-x":scaleOverflow()}],"overflow-y":[{"overflow-y":scaleOverflow()}],overscroll:[{overscroll:scaleOverscroll()}],"overscroll-x":[{"overscroll-x":scaleOverscroll()}],"overscroll-y":[{"overscroll-y":scaleOverscroll()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:scaleInset()}],"inset-x":[{"inset-x":scaleInset()}],"inset\
-y":[{"inset-y":scaleInset()}],start:[{start:scaleInset()}],end:[{end:scaleInset()}],top:[{top:scaleInset()}],right:[{right:scaleInset()}],bottom:[{bottom:scaleInset()}],left:[{left:scaleInset()}],visibility:["visible","invisible","collapse"],z:[{z:[isInteger,"auto",isArbitraryVariable,isArbitraryValue]}],basis:[{basis:[isFraction,"full","auto",themeContainer,...scaleUnambiguousSpacing()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","w\
rap-reverse"]}],flex:[{flex:[isNumber,isFraction,"auto","initial","none",isArbitraryValue]}],grow:[{grow:["",isNumber,isArbitraryVariable,isArbitraryValue]}],shrink:[{shrink:["",isNumber,isArbitraryVariable,isArbitraryValue]}],order:[{order:[isInteger,"first","last","none",isArbitraryVariable,isArbitraryValue]}],"grid-cols":[{"grid-cols":scaleGridTemplateColsRows()}],"col-start-end":[{col:scaleGridColRowStartAndEnd()}],"col-start":[{"col-start":scaleGridColRowStartOrEnd()}],"col-end":[{"col-end":scaleGridColRowStartOrEnd()}],
"grid-rows":[{"grid-rows":scaleGridTemplateColsRows()}],"row-start-end":[{row:scaleGridColRowStartAndEnd()}],"row-start":[{"row-start":scaleGridColRowStartOrEnd()}],"row-end":[{"row-end":scaleGridColRowStartOrEnd()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":scaleGridAutoColsRows()}],"auto-rows":[{"auto-rows":scaleGridAutoColsRows()}],gap:[{gap:scaleUnambiguousSpacing()}],"gap-x":[{"gap-x":scaleUnambiguousSpacing()}],"gap-y":[{"gap-y":scaleUnambiguousSpacing()}],
"justify-content":[{justify:[...scaleAlignPrimaryAxis(),"normal"]}],"justify-items":[{"justify-items":[...scaleAlignSecondaryAxis(),"normal"]}],"justify-self":[{"justify-self":["auto",...scaleAlignSecondaryAxis()]}],"align-content":[{content:["normal",...scaleAlignPrimaryAxis()]}],"align-items":[{items:[...scaleAlignSecondaryAxis(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...scaleAlignSecondaryAxis(),{baseline:["","last"]}]}],"place-content":[{"place-content":scaleAlignPrimaryAxis()}],
"place-items":[{"place-items":[...scaleAlignSecondaryAxis(),"baseline"]}],"place-self":[{"place-self":["auto",...scaleAlignSecondaryAxis()]}],p:[{p:scaleUnambiguousSpacing()}],px:[{px:scaleUnambiguousSpacing()}],py:[{py:scaleUnambiguousSpacing()}],ps:[{ps:scaleUnambiguousSpacing()}],pe:[{pe:scaleUnambiguousSpacing()}],pt:[{pt:scaleUnambiguousSpacing()}],pr:[{pr:scaleUnambiguousSpacing()}],pb:[{pb:scaleUnambiguousSpacing()}],pl:[{pl:scaleUnambiguousSpacing()}],m:[{m:scaleMargin()}],mx:[{mx:scaleMargin()}],
my:[{my:scaleMargin()}],ms:[{ms:scaleMargin()}],me:[{me:scaleMargin()}],mt:[{mt:scaleMargin()}],mr:[{mr:scaleMargin()}],mb:[{mb:scaleMargin()}],ml:[{ml:scaleMargin()}],"space-x":[{"space-x":scaleUnambiguousSpacing()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":scaleUnambiguousSpacing()}],"space-y-reverse":["space-y-reverse"],size:[{size:scaleSizing()}],w:[{w:[themeContainer,"screen",...scaleSizing()]}],"min-w":[{"min-w":[themeContainer,"screen","none",...scaleSizing()]}],"max-w":[
{"max-w":[themeContainer,"screen","none","prose",{screen:[themeBreakpoint]},...scaleSizing()]}],h:[{h:["screen","lh",...scaleSizing()]}],"min-h":[{"min-h":["screen","lh","none",...scaleSizing()]}],"max-h":[{"max-h":["screen","lh",...scaleSizing()]}],"font-size":[{text:["base",themeText,isArbitraryVariableLength,isArbitraryLength]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[themeFontWeight,isArbitraryVariable,isArbitraryNumber]}],
"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",isPercent,isArbitraryValue]}],"font-family":[{font:[isArbitraryVariableFamilyName,isArbitraryValue,themeFont]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractio\
ns","stacked-fractions"],tracking:[{tracking:[themeTracking,isArbitraryVariable,isArbitraryValue]}],"line-clamp":[{"line-clamp":[isNumber,"none",isArbitraryVariable,isArbitraryNumber]}],leading:[{leading:[themeLeading,...scaleUnambiguousSpacing()]}],"list-image":[{"list-image":["none",isArbitraryVariable,isArbitraryValue]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",isArbitraryVariable,isArbitraryValue]}],"text-alignment":[{text:["left",
"center","right","justify","start","end"]}],"placeholder-color":[{placeholder:scaleColor()}],"text-color":[{text:scaleColor()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...scaleLineStyle(),"wavy"]}],"text-decoration-thickness":[{decoration:[isNumber,"from-font","auto",isArbitraryVariable,isArbitraryLength]}],"text-decoration-color":[{decoration:scaleColor()}],"underline-offset":[{"underline-offset":[isNumber,"auto",isArbitraryVariable,
isArbitraryValue]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:scaleUnambiguousSpacing()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",isArbitraryVariable,isArbitraryValue]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal",
"words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",isArbitraryVariable,isArbitraryValue]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:scaleBgPosition()}],"bg-repeat":[{bg:scaleBgRepeat()}],"bg-size":[{bg:scaleBgSize()}],"bg-image":[{bg:["none",{linear:[{to:["t",
"tr","r","br","b","bl","l","tl"]},isInteger,isArbitraryVariable,isArbitraryValue],radial:["",isArbitraryVariable,isArbitraryValue],conic:[isInteger,isArbitraryVariable,isArbitraryValue]},isArbitraryVariableImage,isArbitraryImage]}],"bg-color":[{bg:scaleColor()}],"gradient-from-pos":[{from:scaleGradientStopPosition()}],"gradient-via-pos":[{via:scaleGradientStopPosition()}],"gradient-to-pos":[{to:scaleGradientStopPosition()}],"gradient-from":[{from:scaleColor()}],"gradient-via":[{via:scaleColor()}],
"gradient-to":[{to:scaleColor()}],rounded:[{rounded:scaleRadius()}],"rounded-s":[{"rounded-s":scaleRadius()}],"rounded-e":[{"rounded-e":scaleRadius()}],"rounded-t":[{"rounded-t":scaleRadius()}],"rounded-r":[{"rounded-r":scaleRadius()}],"rounded-b":[{"rounded-b":scaleRadius()}],"rounded-l":[{"rounded-l":scaleRadius()}],"rounded-ss":[{"rounded-ss":scaleRadius()}],"rounded-se":[{"rounded-se":scaleRadius()}],"rounded-ee":[{"rounded-ee":scaleRadius()}],"rounded-es":[{"rounded-es":scaleRadius()}],"rou\
nded-tl":[{"rounded-tl":scaleRadius()}],"rounded-tr":[{"rounded-tr":scaleRadius()}],"rounded-br":[{"rounded-br":scaleRadius()}],"rounded-bl":[{"rounded-bl":scaleRadius()}],"border-w":[{border:scaleBorderWidth()}],"border-w-x":[{"border-x":scaleBorderWidth()}],"border-w-y":[{"border-y":scaleBorderWidth()}],"border-w-s":[{"border-s":scaleBorderWidth()}],"border-w-e":[{"border-e":scaleBorderWidth()}],"border-w-t":[{"border-t":scaleBorderWidth()}],"border-w-r":[{"border-r":scaleBorderWidth()}],"bord\
er-w-b":[{"border-b":scaleBorderWidth()}],"border-w-l":[{"border-l":scaleBorderWidth()}],"divide-x":[{"divide-x":scaleBorderWidth()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":scaleBorderWidth()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...scaleLineStyle(),"hidden","none"]}],"divide-style":[{divide:[...scaleLineStyle(),"hidden","none"]}],"border-color":[{border:scaleColor()}],"border-color-x":[{"border-x":scaleColor()}],"border-color-y":[{"border-y":scaleColor()}],
"border-color-s":[{"border-s":scaleColor()}],"border-color-e":[{"border-e":scaleColor()}],"border-color-t":[{"border-t":scaleColor()}],"border-color-r":[{"border-r":scaleColor()}],"border-color-b":[{"border-b":scaleColor()}],"border-color-l":[{"border-l":scaleColor()}],"divide-color":[{divide:scaleColor()}],"outline-style":[{outline:[...scaleLineStyle(),"none","hidden"]}],"outline-offset":[{"outline-offset":[isNumber,isArbitraryVariable,isArbitraryValue]}],"outline-w":[{outline:["",isNumber,isArbitraryVariableLength,
isArbitraryLength]}],"outline-color":[{outline:scaleColor()}],shadow:[{shadow:["","none",themeShadow,isArbitraryVariableShadow,isArbitraryShadow]}],"shadow-color":[{shadow:scaleColor()}],"inset-shadow":[{"inset-shadow":["none",themeInsetShadow,isArbitraryVariableShadow,isArbitraryShadow]}],"inset-shadow-color":[{"inset-shadow":scaleColor()}],"ring-w":[{ring:scaleBorderWidth()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:scaleColor()}],"ring-offset-w":[{"ring-offset":[isNumber,isArbitraryLength]}],
"ring-offset-color":[{"ring-offset":scaleColor()}],"inset-ring-w":[{"inset-ring":scaleBorderWidth()}],"inset-ring-color":[{"inset-ring":scaleColor()}],"text-shadow":[{"text-shadow":["none",themeTextShadow,isArbitraryVariableShadow,isArbitraryShadow]}],"text-shadow-color":[{"text-shadow":scaleColor()}],opacity:[{opacity:[isNumber,isArbitraryVariable,isArbitraryValue]}],"mix-blend":[{"mix-blend":[...scaleBlendMode(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":scaleBlendMode()}],"mask-c\
lip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[isNumber]}],"mask-image-linear-from-pos":[{"mask-linear-from":scaleMaskImagePosition()}],"mask-image-linear-to-pos":[{"mask-linear-to":scaleMaskImagePosition()}],"mask-image-linear-from-color":[{"mask-linear-from":scaleColor()}],"mask-image-linear-to-color":[{"mask-linear-to":scaleColor()}],"mask-imag\
e-t-from-pos":[{"mask-t-from":scaleMaskImagePosition()}],"mask-image-t-to-pos":[{"mask-t-to":scaleMaskImagePosition()}],"mask-image-t-from-color":[{"mask-t-from":scaleColor()}],"mask-image-t-to-color":[{"mask-t-to":scaleColor()}],"mask-image-r-from-pos":[{"mask-r-from":scaleMaskImagePosition()}],"mask-image-r-to-pos":[{"mask-r-to":scaleMaskImagePosition()}],"mask-image-r-from-color":[{"mask-r-from":scaleColor()}],"mask-image-r-to-color":[{"mask-r-to":scaleColor()}],"mask-image-b-from-pos":[{"mas\
k-b-from":scaleMaskImagePosition()}],"mask-image-b-to-pos":[{"mask-b-to":scaleMaskImagePosition()}],"mask-image-b-from-color":[{"mask-b-from":scaleColor()}],"mask-image-b-to-color":[{"mask-b-to":scaleColor()}],"mask-image-l-from-pos":[{"mask-l-from":scaleMaskImagePosition()}],"mask-image-l-to-pos":[{"mask-l-to":scaleMaskImagePosition()}],"mask-image-l-from-color":[{"mask-l-from":scaleColor()}],"mask-image-l-to-color":[{"mask-l-to":scaleColor()}],"mask-image-x-from-pos":[{"mask-x-from":scaleMaskImagePosition()}],
"mask-image-x-to-pos":[{"mask-x-to":scaleMaskImagePosition()}],"mask-image-x-from-color":[{"mask-x-from":scaleColor()}],"mask-image-x-to-color":[{"mask-x-to":scaleColor()}],"mask-image-y-from-pos":[{"mask-y-from":scaleMaskImagePosition()}],"mask-image-y-to-pos":[{"mask-y-to":scaleMaskImagePosition()}],"mask-image-y-from-color":[{"mask-y-from":scaleColor()}],"mask-image-y-to-color":[{"mask-y-to":scaleColor()}],"mask-image-radial":[{"mask-radial":[isArbitraryVariable,isArbitraryValue]}],"mask-imag\
e-radial-from-pos":[{"mask-radial-from":scaleMaskImagePosition()}],"mask-image-radial-to-pos":[{"mask-radial-to":scaleMaskImagePosition()}],"mask-image-radial-from-color":[{"mask-radial-from":scaleColor()}],"mask-image-radial-to-color":[{"mask-radial-to":scaleColor()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":scalePosition()}],"mas\
k-image-conic-pos":[{"mask-conic":[isNumber]}],"mask-image-conic-from-pos":[{"mask-conic-from":scaleMaskImagePosition()}],"mask-image-conic-to-pos":[{"mask-conic-to":scaleMaskImagePosition()}],"mask-image-conic-from-color":[{"mask-conic-from":scaleColor()}],"mask-image-conic-to-color":[{"mask-conic-to":scaleColor()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:scaleBgPosition()}],"\
mask-repeat":[{mask:scaleBgRepeat()}],"mask-size":[{mask:scaleBgSize()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",isArbitraryVariable,isArbitraryValue]}],filter:[{filter:["","none",isArbitraryVariable,isArbitraryValue]}],blur:[{blur:scaleBlur()}],brightness:[{brightness:[isNumber,isArbitraryVariable,isArbitraryValue]}],contrast:[{contrast:[isNumber,isArbitraryVariable,isArbitraryValue]}],"drop-shadow":[{"drop-shadow":["","none",themeDropShadow,isArbitraryVariableShadow,
isArbitraryShadow]}],"drop-shadow-color":[{"drop-shadow":scaleColor()}],grayscale:[{grayscale:["",isNumber,isArbitraryVariable,isArbitraryValue]}],"hue-rotate":[{"hue-rotate":[isNumber,isArbitraryVariable,isArbitraryValue]}],invert:[{invert:["",isNumber,isArbitraryVariable,isArbitraryValue]}],saturate:[{saturate:[isNumber,isArbitraryVariable,isArbitraryValue]}],sepia:[{sepia:["",isNumber,isArbitraryVariable,isArbitraryValue]}],"backdrop-filter":[{"backdrop-filter":["","none",isArbitraryVariable,
isArbitraryValue]}],"backdrop-blur":[{"backdrop-blur":scaleBlur()}],"backdrop-brightness":[{"backdrop-brightness":[isNumber,isArbitraryVariable,isArbitraryValue]}],"backdrop-contrast":[{"backdrop-contrast":[isNumber,isArbitraryVariable,isArbitraryValue]}],"backdrop-grayscale":[{"backdrop-grayscale":["",isNumber,isArbitraryVariable,isArbitraryValue]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[isNumber,isArbitraryVariable,isArbitraryValue]}],"backdrop-invert":[{"backdrop-invert":["",isNumber,
isArbitraryVariable,isArbitraryValue]}],"backdrop-opacity":[{"backdrop-opacity":[isNumber,isArbitraryVariable,isArbitraryValue]}],"backdrop-saturate":[{"backdrop-saturate":[isNumber,isArbitraryVariable,isArbitraryValue]}],"backdrop-sepia":[{"backdrop-sepia":["",isNumber,isArbitraryVariable,isArbitraryValue]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":scaleUnambiguousSpacing()}],"border-spacing-x":[{"border-spacing-x":scaleUnambiguousSpacing()}],"bor\
der-spacing-y":[{"border-spacing-y":scaleUnambiguousSpacing()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",isArbitraryVariable,isArbitraryValue]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[isNumber,"initial",isArbitraryVariable,isArbitraryValue]}],ease:[{ease:["linear","initial",themeEase,isArbitraryVariable,isArbitraryValue]}],delay:[{delay:[
isNumber,isArbitraryVariable,isArbitraryValue]}],animate:[{animate:["none",themeAnimate,isArbitraryVariable,isArbitraryValue]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[themePerspective,isArbitraryVariable,isArbitraryValue]}],"perspective-origin":[{"perspective-origin":scalePositionWithArbitrary()}],rotate:[{rotate:scaleRotate()}],"rotate-x":[{"rotate-x":scaleRotate()}],"rotate-y":[{"rotate-y":scaleRotate()}],"rotate-z":[{"rotate-z":scaleRotate()}],scale:[{scale:scaleScale()}],
"scale-x":[{"scale-x":scaleScale()}],"scale-y":[{"scale-y":scaleScale()}],"scale-z":[{"scale-z":scaleScale()}],"scale-3d":["scale-3d"],skew:[{skew:scaleSkew()}],"skew-x":[{"skew-x":scaleSkew()}],"skew-y":[{"skew-y":scaleSkew()}],transform:[{transform:[isArbitraryVariable,isArbitraryValue,"","none","gpu","cpu"]}],"transform-origin":[{origin:scalePositionWithArbitrary()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:scaleTranslate()}],"translate-x":[{"translate-x":scaleTranslate()}],
"translate-y":[{"translate-y":scaleTranslate()}],"translate-z":[{"translate-z":scaleTranslate()}],"translate-none":["translate-none"],accent:[{accent:scaleColor()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:scaleColor()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","cop\
y","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",isArbitraryVariable,isArbitraryValue]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":scaleUnambiguousSpacing()}],
"scroll-mx":[{"scroll-mx":scaleUnambiguousSpacing()}],"scroll-my":[{"scroll-my":scaleUnambiguousSpacing()}],"scroll-ms":[{"scroll-ms":scaleUnambiguousSpacing()}],"scroll-me":[{"scroll-me":scaleUnambiguousSpacing()}],"scroll-mt":[{"scroll-mt":scaleUnambiguousSpacing()}],"scroll-mr":[{"scroll-mr":scaleUnambiguousSpacing()}],"scroll-mb":[{"scroll-mb":scaleUnambiguousSpacing()}],"scroll-ml":[{"scroll-ml":scaleUnambiguousSpacing()}],"scroll-p":[{"scroll-p":scaleUnambiguousSpacing()}],"scroll-px":[{"s\
croll-px":scaleUnambiguousSpacing()}],"scroll-py":[{"scroll-py":scaleUnambiguousSpacing()}],"scroll-ps":[{"scroll-ps":scaleUnambiguousSpacing()}],"scroll-pe":[{"scroll-pe":scaleUnambiguousSpacing()}],"scroll-pt":[{"scroll-pt":scaleUnambiguousSpacing()}],"scroll-pr":[{"scroll-pr":scaleUnambiguousSpacing()}],"scroll-pb":[{"scroll-pb":scaleUnambiguousSpacing()}],"scroll-pl":[{"scroll-pl":scaleUnambiguousSpacing()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["nor\
mal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",isArbitraryVariable,isArbitraryValue]}],fill:[{fill:["none",...scaleColor()]}],"stroke-w":[{stroke:[
isNumber,isArbitraryVariableLength,isArbitraryLength,isArbitraryNumber]}],stroke:[{stroke:["none",...scaleColor()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","p\
b","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","ro\
unded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r",
"border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"s\
croll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{
"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},mergeConfigs=(baseConfig,{cacheSize,prefix,experimentalParseClassName,extend:extend2={},override={}})=>(overrideProperty(baseConfig,"cacheSize",cacheSize),overrideProperty(baseConfig,"prefix",prefix),overrideProperty(baseConfig,"experimentalParseClassName",experimentalParseClassName),overrideConfigProperties(baseConfig.theme,
override.theme),overrideConfigProperties(baseConfig.classGroups,override.classGroups),overrideConfigProperties(baseConfig.conflictingClassGroups,override.conflictingClassGroups),overrideConfigProperties(baseConfig.conflictingClassGroupModifiers,override.conflictingClassGroupModifiers),overrideProperty(baseConfig,"orderSensitiveModifiers",override.orderSensitiveModifiers),mergeConfigProperties(baseConfig.theme,extend2.theme),mergeConfigProperties(baseConfig.classGroups,extend2.classGroups),mergeConfigProperties(
baseConfig.conflictingClassGroups,extend2.conflictingClassGroups),mergeConfigProperties(baseConfig.conflictingClassGroupModifiers,extend2.conflictingClassGroupModifiers),mergeArrayProperties(baseConfig,extend2,"orderSensitiveModifiers"),baseConfig),overrideProperty=(baseObject,overrideKey,overrideValue)=>{overrideValue!==void 0&&(baseObject[overrideKey]=overrideValue)},overrideConfigProperties=(baseObject,overrideObject)=>{if(overrideObject)for(const key2 in overrideObject)overrideProperty(baseObject,
key2,overrideObject[key2])},mergeConfigProperties=(baseObject,mergeObject)=>{if(mergeObject)for(const key2 in mergeObject)mergeArrayProperties(baseObject,mergeObject,key2)},mergeArrayProperties=(baseObject,mergeObject,key2)=>{const mergeValue=mergeObject[key2];mergeValue!==void 0&&(baseObject[key2]=baseObject[key2]?baseObject[key2].concat(mergeValue):mergeValue)},extendTailwindMerge=(configExtension,...createConfig)=>typeof configExtension=="function"?createTailwindMerge(getDefaultConfig,configExtension,
...createConfig):createTailwindMerge(()=>mergeConfigs(getDefaultConfig(),configExtension),...createConfig),twMerge=createTailwindMerge(getDefaultConfig);function cn$1(...inputs){return twMerge(clsx$1(inputs))}var SPACE_REGEX=/\s+/g,removeExtraSpaces=str=>typeof str!="string"||!str?str:str.replace(SPACE_REGEX," ").trim(),cx=(...classnames)=>{const classList=[],buildClassString=input=>{if(!input&&input!==0&&input!==0n)return;if(Array.isArray(input)){for(let i=0,len=input.length;i<len;i++)buildClassString(
input[i]);return}const type2=typeof input;if(type2==="string"||type2==="number"||type2==="bigint"){if(type2==="number"&&input!==input)return;classList.push(String(input))}else if(type2==="object"){const keys2=Object.keys(input);for(let i=0,len=keys2.length;i<len;i++){const key2=keys2[i];input[key2]&&classList.push(key2)}}};for(let i=0,len=classnames.length;i<len;i++){const c2=classnames[i];c2!=null&&buildClassString(c2)}return classList.length>0?removeExtraSpaces(classList.join(" ")):void 0},falsyToString=value=>value===
!1?"false":value===!0?"true":value===0?"0":value,isEmptyObject=obj=>{if(!obj||typeof obj!="object")return!0;for(const _ in obj)return!1;return!0},isEqual=(obj1,obj2)=>{if(obj1===obj2)return!0;if(!obj1||!obj2)return!1;const keys1=Object.keys(obj1),keys2=Object.keys(obj2);if(keys1.length!==keys2.length)return!1;for(let i=0;i<keys1.length;i++){const key2=keys1[i];if(!keys2.includes(key2)||obj1[key2]!==obj2[key2])return!1}return!0},joinObjects=(obj1,obj2)=>{for(const key2 in obj2)if(Object.prototype.
hasOwnProperty.call(obj2,key2)){const val2=obj2[key2];key2 in obj1?obj1[key2]=cx(obj1[key2],val2):obj1[key2]=val2}return obj1},flat=(arr,target2)=>{for(let i=0;i<arr.length;i++){const el=arr[i];Array.isArray(el)?flat(el,target2):el&&target2.push(el)}},flatMergeArrays=(...arrays)=>{const result=[];flat(arrays,result);const filtered=[];for(let i=0;i<result.length;i++)result[i]&&filtered.push(result[i]);return filtered},mergeObjects=(obj1,obj2)=>{const result={};for(const key2 in obj1){const val1=obj1[key2];
if(key2 in obj2){const val2=obj2[key2];Array.isArray(val1)||Array.isArray(val2)?result[key2]=flatMergeArrays(val2,val1):typeof val1=="object"&&typeof val2=="object"&&val1&&val2?result[key2]=mergeObjects(val1,val2):result[key2]=val2+" "+val1}else result[key2]=val1}for(const key2 in obj2)key2 in obj1||(result[key2]=obj2[key2]);return result},defaultConfig={twMerge:!0,twMergeConfig:{}};function createState$1(){let cachedTwMerge=null,cachedTwMergeConfig={},didTwMergeConfigChange=!1;return{get cachedTwMerge(){
return cachedTwMerge},set cachedTwMerge(value){cachedTwMerge=value},get cachedTwMergeConfig(){return cachedTwMergeConfig},set cachedTwMergeConfig(value){cachedTwMergeConfig=value},get didTwMergeConfigChange(){return didTwMergeConfigChange},set didTwMergeConfigChange(value){didTwMergeConfigChange=value},reset(){cachedTwMerge=null,cachedTwMergeConfig={},didTwMergeConfigChange=!1}}}var state=createState$1(),getTailwindVariants=cn2=>{const tv2=(options,configProp)=>{const{extend:extend2=null,slots:slotProps={},
variants:variantsProps={},compoundVariants:compoundVariantsProps=[],compoundSlots=[],defaultVariants:defaultVariantsProps={}}=options,config2={...defaultConfig,...configProp},base2=extend2?.base?cx(extend2.base,options?.base):options?.base,variants2=extend2?.variants&&!isEmptyObject(extend2.variants)?mergeObjects(variantsProps,extend2.variants):variantsProps,defaultVariants=extend2?.defaultVariants&&!isEmptyObject(extend2.defaultVariants)?{...extend2.defaultVariants,...defaultVariantsProps}:defaultVariantsProps;
!isEmptyObject(config2.twMergeConfig)&&!isEqual(config2.twMergeConfig,state.cachedTwMergeConfig)&&(state.didTwMergeConfigChange=!0,state.cachedTwMergeConfig=config2.twMergeConfig);const isExtendedSlotsEmpty=isEmptyObject(extend2?.slots),componentSlots=isEmptyObject(slotProps)?{}:{base:cx(options?.base,isExtendedSlotsEmpty&&extend2?.base),...slotProps},slots=isExtendedSlotsEmpty?componentSlots:joinObjects({...extend2?.slots},isEmptyObject(componentSlots)?{base:options?.base}:componentSlots),compoundVariants=isEmptyObject(
extend2?.compoundVariants)?compoundVariantsProps:flatMergeArrays(extend2?.compoundVariants,compoundVariantsProps),component2=props=>{if(isEmptyObject(variants2)&&isEmptyObject(slotProps)&&isExtendedSlotsEmpty)return cn2(base2,props?.class,props?.className)(config2);if(compoundVariants&&!Array.isArray(compoundVariants))throw new TypeError(`The "compoundVariants" prop must be an array. Received: ${typeof compoundVariants}`);if(compoundSlots&&!Array.isArray(compoundSlots))throw new TypeError(`The "\
compoundSlots" prop must be an array. Received: ${typeof compoundSlots}`);const getVariantValue=(variant,vrs=variants2,_slotKey=null,slotProps2=null)=>{const variantObj=vrs[variant];if(!variantObj||isEmptyObject(variantObj))return null;const variantProp=slotProps2?.[variant]??props?.[variant];if(variantProp===null)return null;const variantKey=falsyToString(variantProp);if(typeof variantKey=="object")return null;const defaultVariantProp=defaultVariants?.[variant],key2=variantKey??falsyToString(defaultVariantProp);
return variantObj[key2||"false"]},getVariantClassNames=()=>{if(!variants2)return null;const keys2=Object.keys(variants2),result=[];for(let i=0;i<keys2.length;i++){const value=getVariantValue(keys2[i],variants2);value&&result.push(value)}return result},getVariantClassNamesBySlotKey=(slotKey,slotProps2)=>{if(!variants2||typeof variants2!="object")return null;const result=[];for(const variant in variants2){const variantValue=getVariantValue(variant,variants2,slotKey,slotProps2),value=slotKey==="bas\
e"&&typeof variantValue=="string"?variantValue:variantValue&&variantValue[slotKey];value&&result.push(value)}return result},propsWithoutUndefined={};for(const prop2 in props){const value=props[prop2];value!==void 0&&(propsWithoutUndefined[prop2]=value)}const getCompleteProps=(key2,slotProps2)=>{const initialProp=typeof props?.[key2]=="object"?{[key2]:props[key2]?.initial}:{};return{...defaultVariants,...propsWithoutUndefined,...initialProp,...slotProps2}},getCompoundVariantsValue=(cv=[],slotProps2)=>{
const result=[],cvLength=cv.length;for(let i=0;i<cvLength;i++){const{class:tvClass,className:tvClassName,...compoundVariantOptions}=cv[i];let isValid=!0;const completeProps=getCompleteProps(null,slotProps2);for(const key2 in compoundVariantOptions){const value=compoundVariantOptions[key2],completePropsValue=completeProps[key2];if(Array.isArray(value)){if(!value.includes(completePropsValue)){isValid=!1;break}}else{if((value==null||value===!1)&&(completePropsValue==null||completePropsValue===!1))continue;
if(completePropsValue!==value){isValid=!1;break}}}isValid&&(tvClass&&result.push(tvClass),tvClassName&&result.push(tvClassName))}return result},getCompoundVariantClassNamesBySlot=slotProps2=>{const compoundClassNames=getCompoundVariantsValue(compoundVariants,slotProps2);if(!Array.isArray(compoundClassNames))return compoundClassNames;const result={},cnFn=cn2;for(let i=0;i<compoundClassNames.length;i++){const className=compoundClassNames[i];if(typeof className=="string")result.base=cnFn(result.base,
className)(config2);else if(typeof className=="object")for(const slot in className)result[slot]=cnFn(result[slot],className[slot])(config2)}return result},getCompoundSlotClassNameBySlot=slotProps2=>{if(compoundSlots.length<1)return null;const result={},completeProps=getCompleteProps(null,slotProps2);for(let i=0;i<compoundSlots.length;i++){const{slots:slots2=[],class:slotClass,className:slotClassName,...slotVariants}=compoundSlots[i];if(!isEmptyObject(slotVariants)){let isValid=!0;for(const key2 in slotVariants){
const completePropsValue=completeProps[key2],slotVariantValue=slotVariants[key2];if(completePropsValue===void 0||(Array.isArray(slotVariantValue)?!slotVariantValue.includes(completePropsValue):slotVariantValue!==completePropsValue)){isValid=!1;break}}if(!isValid)continue}for(let j=0;j<slots2.length;j++){const slotName=slots2[j];result[slotName]||(result[slotName]=[]),result[slotName].push([slotClass,slotClassName])}}return result};if(!isEmptyObject(slotProps)||!isExtendedSlotsEmpty){const slotsFns={};
if(typeof slots=="object"&&!isEmptyObject(slots)){const cnFn=cn2;for(const slotKey in slots)slotsFns[slotKey]=slotProps2=>{const compoundVariantClasses=getCompoundVariantClassNamesBySlot(slotProps2),compoundSlotClasses=getCompoundSlotClassNameBySlot(slotProps2);return cnFn(slots[slotKey],getVariantClassNamesBySlotKey(slotKey,slotProps2),compoundVariantClasses?compoundVariantClasses[slotKey]:void 0,compoundSlotClasses?compoundSlotClasses[slotKey]:void 0,slotProps2?.class,slotProps2?.className)(config2)}}
return slotsFns}return cn2(base2,getVariantClassNames(),getCompoundVariantsValue(compoundVariants),props?.class,props?.className)(config2)},getVariantKeys=()=>{if(!(!variants2||typeof variants2!="object"))return Object.keys(variants2)};return component2.variantKeys=getVariantKeys(),component2.extend=extend2,component2.base=base2,component2.slots=slots,component2.variants=variants2,component2.defaultVariants=defaultVariants,component2.compoundSlots=compoundSlots,component2.compoundVariants=compoundVariants,
component2};return{tv:tv2,createTV:configProp=>(options,config2)=>tv2(options,config2?mergeObjects(configProp,config2):configProp)}},createTwMerge=cachedTwMergeConfig=>isEmptyObject(cachedTwMergeConfig)?twMerge:extendTailwindMerge({...cachedTwMergeConfig,extend:{theme:cachedTwMergeConfig.theme,classGroups:cachedTwMergeConfig.classGroups,conflictingClassGroupModifiers:cachedTwMergeConfig.conflictingClassGroupModifiers,conflictingClassGroups:cachedTwMergeConfig.conflictingClassGroups,...cachedTwMergeConfig.
extend}}),executeMerge=(classnames,config2)=>{const base2=cx(classnames);return!base2||!(config2?.twMerge??!0)?base2:((!state.cachedTwMerge||state.didTwMergeConfigChange)&&(state.didTwMergeConfigChange=!1,state.cachedTwMerge=createTwMerge(state.cachedTwMergeConfig)),state.cachedTwMerge(base2)||void 0)},cnMerge=(...classnames)=>config2=>executeMerge(classnames,config2),{tv}=getTailwindVariants(cnMerge);const buttonVariants=tv({base:"focus-visible:border-ring focus-visible:ring-ring/50 aria-invali\
d:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive inline-flex shrink-0 items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium outline-none transition-all focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none [&_svg]:shrink-0",variants:{variant:{default:"bg-primary text-primary-foregrou\
nd shadow-sm hover:bg-primary/90",destructive:"bg-destructive shadow-sm hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60 text-white!",outline:"shadow-sm hover:text-accent-foreground hover:bg-muted-foreground/10 backdrop-blur-sm dark:border-input border",secondary:"bg-background dark:bg-muted-foreground/15 dark:text-secondary-foreground shadow-sm text-foreground hover:bg-muted-foreground/20 dark:hover:bg-muted-foreground/25",ghost:"\
hover:text-accent-foreground hover:bg-muted-foreground/10 backdrop-blur-sm",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2 has-[>svg]:px-3",sm:"h-8 gap-1.5 rounded-md px-3 has-[>svg]:px-2.5",lg:"h-10 rounded-md px-6 has-[>svg]:px-4","icon-lg":"size-10",icon:"size-9","icon-sm":"size-5 rounded-sm"}},defaultVariants:{variant:"default",size:"default"}});var root_1$1e=from_html("<a><!></a>"),root_2$1E=from_html("<button><!></button>");function Button($$anchor,$$props){
push$1($$props,!0);let variant=prop($$props,"variant",3,"default"),size2=prop($$props,"size",3,"default"),ref2=prop($$props,"ref",15,null),href=prop($$props,"href",3,void 0),type2=prop($$props,"type",3,"button"),restProps=rest_props($$props,["$$slots","$$events","$$legacy","class","variant","size","ref","href","type","disabled","children"]);var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{var a=root_1$1e();attribute_effect(a,$0=>({"data-slot":"button",class:$0,href:$$props.
disabled?void 0:href(),"aria-disabled":$$props.disabled,role:$$props.disabled?"link":void 0,tabindex:$$props.disabled?-1:void 0,...restProps}),[()=>cn$1(buttonVariants({variant:variant(),size:size2()}),$$props.class)],void 0,void 0,"svelte-1q39rn8");var node_1=child(a);snippet(node_1,()=>$$props.children??noop$3),reset(a),bind_this(a,$$value=>ref2($$value),()=>ref2()),append($$anchor2,a)},alternate=$$anchor2=>{var button=root_2$1E();attribute_effect(button,$0=>({"data-slot":"button",class:$0,type:type2(),
disabled:$$props.disabled,...restProps}),[()=>cn$1(buttonVariants({variant:variant(),size:size2()}),$$props.class)],void 0,void 0,"svelte-1q39rn8");var node_2=child(button);snippet(node_2,()=>$$props.children??noop$3),reset(button),bind_this(button,$$value=>ref2($$value),()=>ref2()),append($$anchor2,button)};if_block(node2,$$render=>{href()?$$render(consequent):$$render(alternate,-1)})}append($$anchor,fragment),pop()}function isFunction$2(value){return typeof value=="function"}function isObject$2(value){
return value!==null&&typeof value=="object"}const CLASS_VALUE_PRIMITIVE_TYPES=["string","number","bigint","boolean"];function isClassValue(value){return value==null||CLASS_VALUE_PRIMITIVE_TYPES.includes(typeof value)?!0:Array.isArray(value)?value.every(item=>isClassValue(item)):typeof value=="object"?Object.getPrototypeOf(value)===Object.prototype:!1}const BoxSymbol$1=Symbol("box"),isWritableSymbol$1=Symbol("is-writable");function boxWith$1(getter,setter){const derived2=user_derived(getter);return setter?
{[BoxSymbol$1]:!0,[isWritableSymbol$1]:!0,get current(){return get$3(derived2)},set current(v){setter(v)}}:{[BoxSymbol$1]:!0,get current(){return getter()}}}function isBox$1(value){return isObject$2(value)&&BoxSymbol$1 in value}function isWritableBox$1(value){return isBox$1(value)&&isWritableSymbol$1 in value}function boxFrom$1(value){return isBox$1(value)?value:isFunction$2(value)?boxWith$1(value):simpleBox(value)}function boxFlatten$1(boxes){return Object.entries(boxes).reduce((acc,[key2,b])=>isBox$1(
b)?(isWritableBox$1(b)?Object.defineProperty(acc,key2,{get(){return b.current},set(v){b.current=v}}):Object.defineProperty(acc,key2,{get(){return b.current}}),acc):Object.assign(acc,{[key2]:b}),{})}function toReadonlyBox$1(b){return isWritableBox$1(b)?{[BoxSymbol$1]:!0,get current(){return b.current}}:b}function simpleBox(initialValue){let current2=state$1(proxy(initialValue));return{[BoxSymbol$1]:!0,[isWritableSymbol$1]:!0,get current(){return get$3(current2)},set current(v){set$1(current2,v,!0)}}}
function box$1(initialValue){let current2=state$1(proxy(initialValue));return{[BoxSymbol$1]:!0,[isWritableSymbol$1]:!0,get current(){return get$3(current2)},set current(v){set$1(current2,v,!0)}}}box$1.from=boxFrom$1;box$1.with=boxWith$1;box$1.flatten=boxFlatten$1;box$1.readonly=toReadonlyBox$1;box$1.isBox=isBox$1;box$1.isWritableBox=isWritableBox$1;function composeHandlers(...handlers2){return function(e){for(const handler of handlers2)if(handler){if(e.defaultPrevented)return;typeof handler=="fu\
nction"?handler.call(this,e):handler.current?.call(this,e)}}}var commonjsGlobal=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function getDefaultExportFromCjs(x){return x&&x.__esModule&&Object.prototype.hasOwnProperty.call(x,"default")?x.default:x}var cjs={},inlineStyleParser,hasRequiredInlineStyleParser;function requireInlineStyleParser(){if(hasRequiredInlineStyleParser)return inlineStyleParser;hasRequiredInlineStyleParser=1;var COMMENT_REGEX=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,
NEWLINE_REGEX=/\n/g,WHITESPACE_REGEX=/^\s*/,PROPERTY_REGEX=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,COLON_REGEX=/^:\s*/,VALUE_REGEX=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,SEMICOLON_REGEX=/^[;\s]*/,TRIM_REGEX=/^\s+|\s+$/g,NEWLINE2=`
`,FORWARD_SLASH="/",ASTERISK="*",EMPTY_STRING="",TYPE_COMMENT="comment",TYPE_DECLARATION="declaration";inlineStyleParser=function(style2,options){if(typeof style2!="string")throw new TypeError("First argument must be a string");if(!style2)return[];options=options||{};var lineno=1,column=1;function updatePosition(str){var lines=str.match(NEWLINE_REGEX);lines&&(lineno+=lines.length);var i=str.lastIndexOf(NEWLINE2);column=~i?str.length-i:column+str.length}function position2(){var start2={line:lineno,
column};return function(node2){return node2.position=new Position(start2),whitespace2(),node2}}function Position(start2){this.start=start2,this.end={line:lineno,column},this.source=options.source}Position.prototype.content=style2;function error2(msg){var err=new Error(options.source+":"+lineno+":"+column+": "+msg);if(err.reason=msg,err.filename=options.source,err.line=lineno,err.column=column,err.source=style2,!options.silent)throw err}function match(re2){var m=re2.exec(style2);if(m){var str=m[0];
return updatePosition(str),style2=style2.slice(str.length),m}}function whitespace2(){match(WHITESPACE_REGEX)}function comments(rules2){var c2;for(rules2=rules2||[];c2=comment2();)c2!==!1&&rules2.push(c2);return rules2}function comment2(){var pos=position2();if(!(FORWARD_SLASH!=style2.charAt(0)||ASTERISK!=style2.charAt(1))){for(var i=2;EMPTY_STRING!=style2.charAt(i)&&(ASTERISK!=style2.charAt(i)||FORWARD_SLASH!=style2.charAt(i+1));)++i;if(i+=2,EMPTY_STRING===style2.charAt(i-1))return error2("End o\
f comment missing");var str=style2.slice(2,i-2);return column+=2,updatePosition(str),style2=style2.slice(i),column+=2,pos({type:TYPE_COMMENT,comment:str})}}function declaration(){var pos=position2(),prop2=match(PROPERTY_REGEX);if(prop2){if(comment2(),!match(COLON_REGEX))return error2("property missing ':'");var val=match(VALUE_REGEX),ret=pos({type:TYPE_DECLARATION,property:trim(prop2[0].replace(COMMENT_REGEX,EMPTY_STRING)),value:val?trim(val[0].replace(COMMENT_REGEX,EMPTY_STRING)):EMPTY_STRING});
return match(SEMICOLON_REGEX),ret}}function declarations(){var decls=[];comments(decls);for(var decl;decl=declaration();)decl!==!1&&(decls.push(decl),comments(decls));return decls}return whitespace2(),declarations()};function trim(str){return str?str.replace(TRIM_REGEX,EMPTY_STRING):EMPTY_STRING}return inlineStyleParser}var hasRequiredCjs;function requireCjs(){if(hasRequiredCjs)return cjs;hasRequiredCjs=1;var __importDefault=cjs&&cjs.__importDefault||function(mod){return mod&&mod.__esModule?mod:
{default:mod}};Object.defineProperty(cjs,"__esModule",{value:!0}),cjs.default=StyleToObject2;var inline_style_parser_1=__importDefault(requireInlineStyleParser());function StyleToObject2(style2,iterator){var styleObject=null;if(!style2||typeof style2!="string")return styleObject;var declarations=(0,inline_style_parser_1.default)(style2),hasIterator=typeof iterator=="function";return declarations.forEach(function(declaration){if(declaration.type==="declaration"){var property=declaration.property,
value=declaration.value;hasIterator?iterator(property,value,declaration):value&&(styleObject=styleObject||{},styleObject[property]=value)}}),styleObject}return cjs}var cjsExports=requireCjs();const StyleToObject=getDefaultExportFromCjs(cjsExports),parse$4=StyleToObject.default||StyleToObject,NUMBER_CHAR_RE=/\d/,STR_SPLITTERS=["-","_","/","."];function isUppercase(char=""){if(!NUMBER_CHAR_RE.test(char))return char!==char.toLowerCase()}function splitByCase(str){const parts=[];let buff="",previousUpper,
previousSplitter;for(const char of str){const isSplitter=STR_SPLITTERS.includes(char);if(isSplitter===!0){parts.push(buff),buff="",previousUpper=void 0;continue}const isUpper=isUppercase(char);if(previousSplitter===!1){if(previousUpper===!1&&isUpper===!0){parts.push(buff),buff=char,previousUpper=isUpper;continue}if(previousUpper===!0&&isUpper===!1&&buff.length>1){const lastChar=buff.at(-1);parts.push(buff.slice(0,Math.max(0,buff.length-1))),buff=lastChar+char,previousUpper=isUpper;continue}}buff+=
char,previousUpper=isUpper,previousSplitter=isSplitter}return parts.push(buff),parts}function pascalCase(str){return str?splitByCase(str).map(p2=>upperFirst(p2)).join(""):""}function camelCase(str){return lowerFirst(pascalCase(str||""))}function upperFirst(str){return str?str[0].toUpperCase()+str.slice(1):""}function lowerFirst(str){return str?str[0].toLowerCase()+str.slice(1):""}function cssToStyleObj(css2){if(!css2)return{};const styleObj={};function iterator(name,value){if(name.startsWith("-m\
oz-")||name.startsWith("-webkit-")||name.startsWith("-ms-")||name.startsWith("-o-")){styleObj[pascalCase(name)]=value;return}if(name.startsWith("--")){styleObj[name]=value;return}styleObj[camelCase(name)]=value}return parse$4(css2,iterator),styleObj}function executeCallbacks(...callbacks){return(...args)=>{for(const callback of callbacks)typeof callback=="function"&&callback(...args)}}function createParser$2(matcher,replacer){const regex=RegExp(matcher,"g");return str=>{if(typeof str!="string")throw new TypeError(
`expected an argument of type string, but got ${typeof str}`);return str.match(regex)?str.replace(regex,replacer):str}}const camelToKebab$1=createParser$2(/[A-Z]/,match=>`-${match.toLowerCase()}`);function styleToCSS$1(styleObj){if(!styleObj||typeof styleObj!="object"||Array.isArray(styleObj))throw new TypeError(`expected an argument of type object, but got ${typeof styleObj}`);return Object.keys(styleObj).map(property=>`${camelToKebab$1(property)}: ${styleObj[property]};`).join(`
`)}function styleToString$1(style2={}){return styleToCSS$1(style2).replace(`
`," ")}const EVENT_LIST=["onabort","onanimationcancel","onanimationend","onanimationiteration","onanimationstart","onauxclick","onbeforeinput","onbeforetoggle","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncompositionend","oncompositionstart","oncompositionupdate","oncontextlost","oncontextmenu","oncontextrestored","oncopy","oncuechange","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchan\
ge","onemptied","onended","onerror","onfocus","onfocusin","onfocusout","onformdata","ongotpointercapture","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onlostpointercapture","onmousedown","onmouseenter","onmouseleave","onmousemove","onmouseout","onmouseover","onmouseup","onpaste","onpause","onplay","onplaying","onpointercancel","onpointerdown","onpointerenter","onpointerleave","onpointermove","onpointerout","onpointerover","onp\
ointerup","onprogress","onratechange","onreset","onresize","onscroll","onscrollend","onsecuritypolicyviolation","onseeked","onseeking","onselect","onselectionchange","onselectstart","onslotchange","onstalled","onsubmit","onsuspend","ontimeupdate","ontoggle","ontouchcancel","ontouchend","ontouchmove","ontouchstart","ontransitioncancel","ontransitionend","ontransitionrun","ontransitionstart","onvolumechange","onwaiting","onwebkitanimationend","onwebkitanimationiteration","onwebkitanimationstart","\
onwebkittransitionend","onwheel"],EVENT_LIST_SET=new Set(EVENT_LIST);function isEventHandler(key2){return EVENT_LIST_SET.has(key2)}function mergeProps(...args){const result={...args[0]};for(let i=1;i<args.length;i++){const props=args[i];if(props){for(const key2 of Object.keys(props)){const a=result[key2],b=props[key2],aIsFunction=typeof a=="function",bIsFunction=typeof b=="function";if(aIsFunction&&isEventHandler(key2)){const aHandler=a,bHandler=b;result[key2]=composeHandlers(aHandler,bHandler)}else if(aIsFunction&&
bIsFunction)result[key2]=executeCallbacks(a,b);else if(key2==="class"){const aIsClassValue=isClassValue(a),bIsClassValue=isClassValue(b);aIsClassValue&&bIsClassValue?result[key2]=clsx$1(a,b):aIsClassValue?result[key2]=clsx$1(a):bIsClassValue&&(result[key2]=clsx$1(b))}else if(key2==="style"){const aIsObject=typeof a=="object",bIsObject=typeof b=="object",aIsString=typeof a=="string",bIsString=typeof b=="string";if(aIsObject&&bIsObject)result[key2]={...a,...b};else if(aIsObject&&bIsString){const parsedStyle=cssToStyleObj(
b);result[key2]={...a,...parsedStyle}}else if(aIsString&&bIsObject){const parsedStyle=cssToStyleObj(a);result[key2]={...parsedStyle,...b}}else if(aIsString&&bIsString){const parsedStyleA=cssToStyleObj(a),parsedStyleB=cssToStyleObj(b);result[key2]={...parsedStyleA,...parsedStyleB}}else aIsObject?result[key2]=a:bIsObject?result[key2]=b:aIsString?result[key2]=a:bIsString&&(result[key2]=b)}else result[key2]=b!==void 0?b:a}for(const key2 of Object.getOwnPropertySymbols(props)){const a=result[key2],b=props[key2];
result[key2]=b!==void 0?b:a}}}return typeof result.style=="object"&&(result.style=styleToString$1(result.style).replaceAll(`
`," ")),result.hidden===!1&&(result.hidden=void 0,delete result.hidden),result.disabled===!1&&(result.disabled=void 0,delete result.disabled),result}const srOnlyStyles$1={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",transform:"translateX(-100%)"};styleToString$1(srOnlyStyles$1);const defaultWindow$3=typeof window<"u"?window:void 0;function getActiveElement$4(document2){let activeElement=document2.
activeElement;for(;activeElement?.shadowRoot;){const node2=activeElement.shadowRoot.activeElement;if(node2===activeElement)break;activeElement=node2}return activeElement}var read_methods=["forEach","isDisjointFrom","isSubsetOf","isSupersetOf"],set_like_methods=["difference","intersection","symmetricDifference","union"],inited=!1;class SvelteSet extends Set{#sources=new Map;#version=state$1(0);#size=state$1(0);#update_version=update_version||-1;constructor(value){if(super(),value){for(var element2 of value)
super.add(element2);this.#size.v=super.size}inited||this.#init()}#source(value){return update_version===this.#update_version?state$1(value):source$2(value)}#init(){inited=!0;var proto=SvelteSet.prototype,set_proto=Set.prototype;for(const method of read_methods)proto[method]=function(...v){return get$3(this.#version),set_proto[method].apply(this,v)};for(const method of set_like_methods)proto[method]=function(...v){get$3(this.#version);var set2=set_proto[method].apply(this,v);return new SvelteSet(
set2)}}has(value){var has=super.has(value),sources=this.#sources,s2=sources.get(value);if(s2===void 0){if(!has)return get$3(this.#version),!1;s2=this.#source(!0),sources.set(value,s2)}return get$3(s2),has}add(value){return super.has(value)||(super.add(value),set$1(this.#size,super.size),increment$1(this.#version)),this}delete(value){var deleted=super.delete(value),sources=this.#sources,s2=sources.get(value);return s2!==void 0&&(sources.delete(value),set$1(s2,!1)),deleted&&(set$1(this.#size,super.
size),increment$1(this.#version)),deleted}clear(){if(super.size!==0){super.clear();var sources=this.#sources;for(var s2 of sources.values())set$1(s2,!1);sources.clear(),set$1(this.#size,0),increment$1(this.#version)}}keys(){return this.values()}values(){return get$3(this.#version),super.values()}entries(){return get$3(this.#version),super.entries()}[Symbol.iterator](){return this.keys()}get size(){return get$3(this.#size)}}class SvelteMap extends Map{#sources=new Map;#version=state$1(0);#size=state$1(
0);#update_version=update_version||-1;constructor(value){if(super(),value){for(var[key2,v]of value)super.set(key2,v);this.#size.v=super.size}}#source(value){return update_version===this.#update_version?state$1(value):source$2(value)}has(key2){var sources=this.#sources,s2=sources.get(key2);if(s2===void 0)if(super.has(key2))s2=this.#source(0),sources.set(key2,s2);else return get$3(this.#version),!1;return get$3(s2),!0}forEach(callbackfn,this_arg){this.#read_all(),super.forEach(callbackfn,this_arg)}get(key2){
var sources=this.#sources,s2=sources.get(key2);if(s2===void 0)if(super.has(key2))s2=this.#source(0),sources.set(key2,s2);else{get$3(this.#version);return}return get$3(s2),super.get(key2)}set(key2,value){var sources=this.#sources,s2=sources.get(key2),prev_res=super.get(key2),res=super.set(key2,value),version2=this.#version;if(s2===void 0)s2=this.#source(0),sources.set(key2,s2),set$1(this.#size,super.size),increment$1(version2);else if(prev_res!==value){increment$1(s2);var v_reactions=version2.reactions===
null?null:new Set(version2.reactions),needs_version_increase=v_reactions===null||!s2.reactions?.every(r2=>v_reactions.has(r2));needs_version_increase&&increment$1(version2)}return res}delete(key2){var sources=this.#sources,s2=sources.get(key2),res=super.delete(key2);return s2!==void 0&&(sources.delete(key2),set$1(s2,-1)),res&&(set$1(this.#size,super.size),increment$1(this.#version)),res}clear(){if(super.size!==0){super.clear();var sources=this.#sources;set$1(this.#size,0);for(var s2 of sources.values())
set$1(s2,-1);increment$1(this.#version),sources.clear()}}#read_all(){get$3(this.#version);var sources=this.#sources;if(this.#size.v!==sources.size){for(var key2 of super.keys())if(!sources.has(key2)){var s2=this.#source(0);sources.set(key2,s2)}}for([,s2]of this.#sources)get$3(s2)}keys(){return get$3(this.#version),super.keys()}values(){return this.#read_all(),super.values()}entries(){return this.#read_all(),super.entries()}[Symbol.iterator](){return this.entries()}get size(){return get$3(this.#size),
super.size}}class ReactiveValue{#fn;#subscribe;constructor(fn,onsubscribe){this.#fn=fn,this.#subscribe=createSubscriber(onsubscribe)}get current(){return this.#subscribe(),this.#fn()}}const parenthesis_regex=/\(.+\)/,non_parenthesized_keywords=new Set(["all","print","screen","and","or","not","only"]);class MediaQuery extends ReactiveValue{constructor(query,fallback2){let final_query=parenthesis_regex.test(query)||query.split(/[\s,]+/).some(keyword2=>non_parenthesized_keywords.has(keyword2.trim()))?
query:`(${query})`;const q2=window.matchMedia(final_query);super(()=>q2.matches,update2=>on(q2,"change",update2))}}let ActiveElement$3=class{#document;#subscribe;constructor(options={}){const{window:window2=defaultWindow$3,document:document2=window2?.document}=options;window2!==void 0&&(this.#document=document2,this.#subscribe=createSubscriber(update2=>{const cleanupFocusIn=on(window2,"focusin",update2),cleanupFocusOut=on(window2,"focusout",update2);return()=>{cleanupFocusIn(),cleanupFocusOut()}}))}get current(){
return this.#subscribe?.(),this.#document?getActiveElement$4(this.#document):null}};new ActiveElement$3;function isFunction$1(value){return typeof value=="function"}function extract(value,defaultValue){if(isFunction$1(value)){const gotten=value();return gotten===void 0?defaultValue:gotten}return value===void 0?defaultValue:value}let Context$1=class{#name;#key;constructor(name){this.#name=name,this.#key=Symbol(name)}get key(){return this.#key}exists(){return hasContext(this.#key)}get(){const context=getContext(
this.#key);if(context===void 0)throw new Error(`Context "${this.#name}" not found`);return context}getOr(fallback2){const context=getContext(this.#key);return context===void 0?fallback2:context}set(context){return setContext(this.#key,context)}};function useDebounce(callback,wait){let context=state$1(null);const wait$=user_derived(()=>extract(wait,250));function debounced(...args){if(get$3(context))get$3(context).timeout&&clearTimeout(get$3(context).timeout);else{let resolve2,reject;const promise=new Promise(
(res,rej)=>{resolve2=res,reject=rej});set$1(context,{timeout:null,runner:null,promise,resolve:resolve2,reject},!0)}return get$3(context).runner=async()=>{if(!get$3(context))return;const ctx=get$3(context);set$1(context,null);try{ctx.resolve(await callback.apply(this,args))}catch(error2){ctx.reject(error2)}},get$3(context).timeout=setTimeout(get$3(context).runner,get$3(wait$)),get$3(context).promise}return debounced.cancel=async()=>{(!get$3(context)||get$3(context).timeout===null)&&(await new Promise(
resolve2=>setTimeout(resolve2,0)),!get$3(context)||get$3(context).timeout===null)||(clearTimeout(get$3(context).timeout),get$3(context).reject("Cancelled"),set$1(context,null))},debounced.runScheduledNow=async()=>{(!get$3(context)||!get$3(context).timeout)&&(await new Promise(resolve2=>setTimeout(resolve2,0)),!get$3(context)||!get$3(context).timeout)||(clearTimeout(get$3(context).timeout),get$3(context).timeout=null,await get$3(context).runner?.())},Object.defineProperty(debounced,"pending",{enumerable:!0,
get(){return!!get$3(context)?.timeout}}),debounced}function runEffect$1(flush,effect2){switch(flush){case"post":user_effect(effect2);break;case"pre":user_pre_effect(effect2);break}}function runWatcher$1(sources,flush,effect2,options={}){const{lazy=!1}=options;let active=!lazy,previousValues=Array.isArray(sources)?[]:void 0;runEffect$1(flush,()=>{const values=Array.isArray(sources)?sources.map(source2=>source2()):sources();if(!active){active=!0,previousValues=values;return}const cleanup=untrack$1(
()=>effect2(values,previousValues));return previousValues=values,cleanup})}function watch$1(sources,effect2,options){runWatcher$1(sources,"post",effect2,options)}function watchPre$1(sources,effect2,options){runWatcher$1(sources,"pre",effect2,options)}watch$1.pre=watchPre$1;function get$1(value){return isFunction$1(value)?value():value}class ElementSize{#size={width:0,height:0};#observed=!1;#options;#node;#window;#width=user_derived(()=>(get$3(this.#subscribe)?.(),this.getSize().width));#height=user_derived(
()=>(get$3(this.#subscribe)?.(),this.getSize().height));#subscribe=user_derived(()=>{const node$=get$1(this.#node);if(node$)return createSubscriber(update2=>{if(!this.#window)return;const observer=new this.#window.ResizeObserver(entries=>{this.#observed=!0;for(const entry of entries){const boxSize=this.#options.box==="content-box"?entry.contentBoxSize:entry.borderBoxSize,boxSizeArr=Array.isArray(boxSize)?boxSize:[boxSize];this.#size.width=boxSizeArr.reduce((acc,size2)=>Math.max(acc,size2.inlineSize),
0),this.#size.height=boxSizeArr.reduce((acc,size2)=>Math.max(acc,size2.blockSize),0)}update2()});return observer.observe(node$),()=>{this.#observed=!1,observer.disconnect()}})});constructor(node2,options={box:"border-box"}){this.#window=options.window??defaultWindow$3,this.#options=options,this.#node=node2,this.#size={width:0,height:0}}calculateSize(){const element2=get$1(this.#node);if(!element2||!this.#window)return;const offsetWidth=element2.offsetWidth,offsetHeight=element2.offsetHeight;if(this.#options.
box==="border-box")return{width:offsetWidth,height:offsetHeight};const style2=this.#window.getComputedStyle(element2),paddingWidth=parseFloat(style2.paddingLeft)+parseFloat(style2.paddingRight),paddingHeight=parseFloat(style2.paddingTop)+parseFloat(style2.paddingBottom),borderWidth=parseFloat(style2.borderLeftWidth)+parseFloat(style2.borderRightWidth),borderHeight=parseFloat(style2.borderTopWidth)+parseFloat(style2.borderBottomWidth),contentWidth=offsetWidth-paddingWidth-borderWidth,contentHeight=offsetHeight-
paddingHeight-borderHeight;return{width:contentWidth,height:contentHeight}}getSize(){return this.#observed?this.#size:this.calculateSize()??this.#size}get current(){return get$3(this.#subscribe)?.(),this.getSize()}get width(){return get$3(this.#width)}get height(){return get$3(this.#height)}}class IsMounted{#isMounted=state$1(!1);constructor(){user_effect(()=>(untrack$1(()=>set$1(this.#isMounted,!0)),()=>{set$1(this.#isMounted,!1)}))}get current(){return get$3(this.#isMounted)}}class Previous{#previousCallback=()=>{};#previous=user_derived(
()=>this.#previousCallback());constructor(getter,initialValue){let actualPrevious;initialValue!==void 0&&(actualPrevious=initialValue),this.#previousCallback=()=>{try{return actualPrevious}finally{actualPrevious=getter()}}}get current(){return get$3(this.#previous)}}function onDestroyEffect(fn){user_effect(()=>()=>{fn()})}function onMountEffect(fn){user_effect(()=>untrack$1(()=>fn()))}function afterSleep(ms,cb){return setTimeout(cb,ms)}function afterTick(fn){tick().then(fn)}const ELEMENT_NODE=1,
DOCUMENT_NODE=9,DOCUMENT_FRAGMENT_NODE=11;function isHTMLElement$2(node2){return isObject$2(node2)&&node2.nodeType===ELEMENT_NODE&&typeof node2.nodeName=="string"}function isDocument(node2){return isObject$2(node2)&&node2.nodeType===DOCUMENT_NODE}function isWindow(node2){return isObject$2(node2)&&node2.constructor?.name==="VisualViewport"}function isNode$1(node2){return isObject$2(node2)&&node2.nodeType!==void 0}function isShadowRoot$1(node2){return isNode$1(node2)&&node2.nodeType===DOCUMENT_FRAGMENT_NODE&&
"host"in node2}function contains$3(parent,child2){if(!parent||!child2||!isHTMLElement$2(parent)||!isHTMLElement$2(child2))return!1;const rootNode=child2.getRootNode?.();if(parent===child2||parent.contains(child2))return!0;if(rootNode&&isShadowRoot$1(rootNode)){let next2=child2;for(;next2;){if(parent===next2)return!0;next2=next2.parentNode||next2.host}}return!1}function getDocument$1(node2){return isDocument(node2)?node2:isWindow(node2)?node2.document:node2?.ownerDocument??document}function getWindow$1(node2){
return isShadowRoot$1(node2)?getWindow$1(node2.host):isDocument(node2)?node2.defaultView??window:isHTMLElement$2(node2)?node2.ownerDocument?.defaultView??window:window}function getActiveElement$3(rootNode){let activeElement=rootNode.activeElement;for(;activeElement?.shadowRoot;){const el=activeElement.shadowRoot.activeElement;if(el===activeElement)break;activeElement=el}return activeElement}class DOMContext{element;#root=user_derived(()=>this.element.current?this.element.current.getRootNode()??document:
document);get root(){return get$3(this.#root)}set root(value){set$1(this.#root,value)}constructor(element2){typeof element2=="function"?this.element=boxWith$1(element2):this.element=element2}getDocument=()=>getDocument$1(this.root);getWindow=()=>this.getDocument().defaultView??window;getActiveElement=()=>getActiveElement$3(this.root);isActiveElement=node2=>node2===this.getActiveElement();getElementById(id2){return this.root.getElementById(id2)}querySelector=selector=>this.root?this.root.querySelector(
selector):null;querySelectorAll=selector=>this.root?this.root.querySelectorAll(selector):[];setTimeout=(callback,delay)=>this.getWindow().setTimeout(callback,delay);clearTimeout=timeoutId=>this.getWindow().clearTimeout(timeoutId)}function attachRef(ref2,onChange){return{[createAttachmentKey()]:node2=>isBox$1(ref2)?(ref2.current=node2,untrack$1(()=>onChange?.(node2)),()=>{"isConnected"in node2&&node2.isConnected||(ref2.current=null,onChange?.(null))}):(ref2(node2),untrack$1(()=>onChange?.(node2)),
()=>{"isConnected"in node2&&node2.isConnected||(ref2(null),onChange?.(null))})}}function boolToStr(condition){return condition?"true":"false"}function boolToStrTrueOrUndef(condition){return condition?"true":void 0}function boolToEmptyStrOrUndef(condition){return condition?"":void 0}function boolToTrueOrUndef(condition){return condition?!0:void 0}function getDataOpenClosed(condition){return condition?"open":"closed"}function getDataChecked(condition){return condition?"checked":"unchecked"}function getDataTransitionAttrs(state2){
return state2==="starting"?{"data-starting-style":""}:state2==="ending"?{"data-ending-style":""}:{}}function getAriaChecked(checked,indeterminate){return indeterminate?"mixed":checked?"true":"false"}class BitsAttrs{#variant;#prefix;attrs;constructor(config2){this.#variant=config2.getVariant?config2.getVariant():null,this.#prefix=this.#variant?`data-${this.#variant}-`:`data-${config2.component}-`,this.getAttr=this.getAttr.bind(this),this.selector=this.selector.bind(this),this.attrs=Object.fromEntries(
config2.parts.map(part=>[part,this.getAttr(part)]))}getAttr(part,variantOverride){return variantOverride?`data-${variantOverride}-${part}`:`${this.#prefix}${part}`}selector(part,variantOverride){return`[${this.getAttr(part,variantOverride)}]`}}function createBitsAttrs(config2){const bitsAttrs=new BitsAttrs(config2);return{...bitsAttrs.attrs,selector:bitsAttrs.selector,getAttr:bitsAttrs.getAttr}}const ARROW_DOWN="ArrowDown",ARROW_LEFT="ArrowLeft",ARROW_RIGHT="ArrowRight",ARROW_UP="ArrowUp",END="E\
nd",ENTER="Enter",ESCAPE="Escape",HOME="Home",PAGE_DOWN="PageDown",PAGE_UP="PageUp",SPACE=" ",TAB="Tab";function getElemDirection(elem){return window.getComputedStyle(elem).getPropertyValue("direction")}function getNextKey(dir="ltr",orientation="horizontal"){return{horizontal:dir==="rtl"?ARROW_LEFT:ARROW_RIGHT,vertical:ARROW_DOWN}[orientation]}function getPrevKey(dir="ltr",orientation="horizontal"){return{horizontal:dir==="rtl"?ARROW_RIGHT:ARROW_LEFT,vertical:ARROW_UP}[orientation]}function getDirectionalKeys(dir="\
ltr",orientation="horizontal"){return["ltr","rtl"].includes(dir)||(dir="ltr"),["horizontal","vertical"].includes(orientation)||(orientation="horizontal"),{nextKey:getNextKey(dir,orientation),prevKey:getPrevKey(dir,orientation)}}const isBrowser$2=typeof document<"u",isIOS=getIsIOS();function getIsIOS(){return isBrowser$2&&window?.navigator?.userAgent&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||window?.navigator?.maxTouchPoints>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function isHTMLElement$1(element2){
return element2 instanceof HTMLElement}function isElement$1(element2){return element2 instanceof Element}function isElementOrSVGElement(element2){return element2 instanceof Element||element2 instanceof SVGElement}function isTouch(e){return e.pointerType==="touch"}function isFocusVisible(element2){return element2.matches(":focus-visible")}function isNotNull(value){return value!==null}function isSelectableInput(element2){return element2 instanceof HTMLInputElement&&"select"in element2}class RovingFocusGroup{#opts;#currentTabStopId=box$1(
null);constructor(opts){this.#opts=opts}getCandidateNodes(){return this.#opts.rootNode.current?this.#opts.candidateSelector?Array.from(this.#opts.rootNode.current.querySelectorAll(this.#opts.candidateSelector)):this.#opts.candidateAttr?Array.from(this.#opts.rootNode.current.querySelectorAll(`[${this.#opts.candidateAttr}]:not([data-disabled])`)):[]:[]}focusFirstCandidate(){const items2=this.getCandidateNodes();items2.length&&items2[0]?.focus()}handleKeydown(node2,e,both=!1){const rootNode=this.#opts.
rootNode.current;if(!rootNode||!node2)return;const items2=this.getCandidateNodes();if(!items2.length)return;const currentIndex=items2.indexOf(node2),dir=getElemDirection(rootNode),{nextKey,prevKey}=getDirectionalKeys(dir,this.#opts.orientation.current),loop2=this.#opts.loop.current,keyToIndex={[nextKey]:currentIndex+1,[prevKey]:currentIndex-1,[HOME]:0,[END]:items2.length-1};if(both){const altNextKey=nextKey===ARROW_DOWN?ARROW_RIGHT:ARROW_DOWN,altPrevKey=prevKey===ARROW_UP?ARROW_LEFT:ARROW_UP;keyToIndex[altNextKey]=
currentIndex+1,keyToIndex[altPrevKey]=currentIndex-1}let itemIndex=keyToIndex[e.key];if(itemIndex===void 0)return;e.preventDefault(),itemIndex<0&&loop2?itemIndex=items2.length-1:itemIndex===items2.length&&loop2&&(itemIndex=0);const itemToFocus=items2[itemIndex];if(itemToFocus)return itemToFocus.focus(),this.#currentTabStopId.current=itemToFocus.id,this.#opts.onCandidateFocus?.(itemToFocus),itemToFocus}getTabIndex(node2){const items2=this.getCandidateNodes(),anyActive=this.#currentTabStopId.current!==
null;return node2&&!anyActive&&items2[0]===node2?(this.#currentTabStopId.current=node2.id,0):node2?.id===this.#currentTabStopId.current?0:-1}setCurrentTabStopId(id2){this.#currentTabStopId.current=id2}focusCurrentTabStop(){const currentTabStopId=this.#currentTabStopId.current;if(!currentTabStopId)return;const currentTabStop=this.#opts.rootNode.current?.querySelector(`#${currentTabStopId}`);!currentTabStop||!isHTMLElement$1(currentTabStop)||currentTabStop.focus()}}class AnimationsComplete{#opts;#currentFrame=null;#observer=null;#runId=0;constructor(opts){
this.#opts=opts,onDestroyEffect(()=>this.#cleanup())}#cleanup(){this.#currentFrame!==null&&(window.cancelAnimationFrame(this.#currentFrame),this.#currentFrame=null),this.#observer?.disconnect(),this.#observer=null,this.#runId++}run(fn){this.#cleanup();const node2=this.#opts.ref.current;if(!node2)return;if(typeof node2.getAnimations!="function"){this.#executeCallback(fn);return}const runId=this.#runId,executeIfCurrent=()=>{runId===this.#runId&&this.#executeCallback(fn)},waitForAnimations=()=>{if(runId!==
this.#runId)return;const animations=node2.getAnimations();if(animations.length===0){executeIfCurrent();return}Promise.all(animations.map(animation=>animation.finished)).then(()=>{executeIfCurrent()}).catch(()=>{if(runId!==this.#runId)return;if(node2.getAnimations().some(animation=>animation.pending||animation.playState!=="finished")){waitForAnimations();return}executeIfCurrent()})},requestWaitForAnimations=()=>{this.#currentFrame=window.requestAnimationFrame(()=>{this.#currentFrame=null,waitForAnimations()})};
if(!this.#opts.afterTick.current){requestWaitForAnimations();return}this.#currentFrame=window.requestAnimationFrame(()=>{this.#currentFrame=null;const startingStyleAttr="data-starting-style";if(!node2.hasAttribute(startingStyleAttr)){requestWaitForAnimations();return}this.#observer=new MutationObserver(()=>{runId===this.#runId&&(node2.hasAttribute(startingStyleAttr)||(this.#observer?.disconnect(),this.#observer=null,requestWaitForAnimations()))}),this.#observer.observe(node2,{attributes:!0,attributeFilter:[
startingStyleAttr]})})}#executeCallback(fn){const execute=()=>{fn()};this.#opts.afterTick?afterTick(execute):execute()}}class PresenceManager{#opts;#enabled;#afterAnimations;#shouldRender=state$1(!1);#transitionStatus=state$1(void 0);#hasMounted=!1;#transitionFrame=null;constructor(opts){this.#opts=opts,set$1(this.#shouldRender,opts.open.current,!0),this.#enabled=opts.enabled??!0,this.#afterAnimations=new AnimationsComplete({ref:this.#opts.ref,afterTick:this.#opts.open}),onDestroyEffect(()=>this.#clearTransitionFrame()),
watch$1(()=>this.#opts.open.current,isOpen=>{if(!this.#hasMounted){this.#hasMounted=!0;return}if(this.#clearTransitionFrame(),!isOpen&&this.#opts.shouldSkipExitAnimation?.()){set$1(this.#shouldRender,!1),set$1(this.#transitionStatus,void 0),this.#opts.onComplete?.();return}if(isOpen&&set$1(this.#shouldRender,!0),set$1(this.#transitionStatus,isOpen?"starting":"ending",!0),isOpen&&(this.#transitionFrame=window.requestAnimationFrame(()=>{this.#transitionFrame=null,this.#opts.open.current&&set$1(this.#transitionStatus,
void 0)})),!this.#enabled){isOpen||set$1(this.#shouldRender,!1),set$1(this.#transitionStatus,void 0),this.#opts.onComplete?.();return}this.#afterAnimations.run(()=>{isOpen===this.#opts.open.current&&(this.#opts.open.current||set$1(this.#shouldRender,!1),set$1(this.#transitionStatus,void 0),this.#opts.onComplete?.())})})}get shouldRender(){return get$3(this.#shouldRender)}get transitionStatus(){return get$3(this.#transitionStatus)}#clearTransitionFrame(){this.#transitionFrame!==null&&(window.cancelAnimationFrame(
this.#transitionFrame),this.#transitionFrame=null)}}function noop$1(){}function createId(prefixOrUid,uid2){return`bits-${prefixOrUid}`}const dialogAttrs=createBitsAttrs({component:"dialog",parts:["content","trigger","overlay","title","description","close","cancel","action"]}),DialogRootContext=new Context$1("Dialog.Root | AlertDialog.Root");class DialogRootState{static create(opts){const parent=DialogRootContext.getOr(null);return DialogRootContext.set(new DialogRootState(opts,parent))}opts;#triggerNode=state$1(
null);get triggerNode(){return get$3(this.#triggerNode)}set triggerNode(value){set$1(this.#triggerNode,value,!0)}#contentNode=state$1(null);get contentNode(){return get$3(this.#contentNode)}set contentNode(value){set$1(this.#contentNode,value,!0)}#overlayNode=state$1(null);get overlayNode(){return get$3(this.#overlayNode)}set overlayNode(value){set$1(this.#overlayNode,value,!0)}#descriptionNode=state$1(null);get descriptionNode(){return get$3(this.#descriptionNode)}set descriptionNode(value){set$1(
this.#descriptionNode,value,!0)}#contentId=state$1(void 0);get contentId(){return get$3(this.#contentId)}set contentId(value){set$1(this.#contentId,value,!0)}#titleId=state$1(void 0);get titleId(){return get$3(this.#titleId)}set titleId(value){set$1(this.#titleId,value,!0)}#triggerId=state$1(void 0);get triggerId(){return get$3(this.#triggerId)}set triggerId(value){set$1(this.#triggerId,value,!0)}#descriptionId=state$1(void 0);get descriptionId(){return get$3(this.#descriptionId)}set descriptionId(value){
set$1(this.#descriptionId,value,!0)}#cancelNode=state$1(null);get cancelNode(){return get$3(this.#cancelNode)}set cancelNode(value){set$1(this.#cancelNode,value,!0)}#nestedOpenCount=state$1(0);get nestedOpenCount(){return get$3(this.#nestedOpenCount)}set nestedOpenCount(value){set$1(this.#nestedOpenCount,value,!0)}depth;parent;contentPresence;overlayPresence;constructor(opts,parent){this.opts=opts,this.parent=parent,this.depth=parent?parent.depth+1:0,this.handleOpen=this.handleOpen.bind(this),this.
handleClose=this.handleClose.bind(this),this.contentPresence=new PresenceManager({ref:boxWith$1(()=>this.contentNode),open:this.opts.open,enabled:!0,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),this.overlayPresence=new PresenceManager({ref:boxWith$1(()=>this.overlayNode),open:this.opts.open,enabled:!0}),watch$1(()=>this.opts.open.current,isOpen=>{this.parent&&(isOpen?this.parent.incrementNested():this.parent.decrementNested())},{lazy:!0}),onDestroyEffect(()=>{
this.opts.open.current&&this.parent?.decrementNested()})}handleOpen(){this.opts.open.current||(this.opts.open.current=!0)}handleClose(){this.opts.open.current&&(this.opts.open.current=!1)}getBitsAttr=part=>dialogAttrs.getAttr(part,this.opts.variant.current);incrementNested(){this.nestedOpenCount++,this.parent?.incrementNested()}decrementNested(){this.nestedOpenCount!==0&&(this.nestedOpenCount--,this.parent?.decrementNested())}#sharedProps=user_derived(()=>({"data-state":getDataOpenClosed(this.opts.
open.current)}));get sharedProps(){return get$3(this.#sharedProps)}set sharedProps(value){set$1(this.#sharedProps,value)}}class DialogCloseState{static create(opts){return new DialogCloseState(opts,DialogRootContext.get())}opts;root;attachment;constructor(opts,root2){this.opts=opts,this.root=root2,this.attachment=attachRef(this.opts.ref),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this)}onclick(e){this.opts.disabled.current||e.button>0||this.root.handleClose()}onkeydown(e){
this.opts.disabled.current||(e.key===SPACE||e.key===ENTER)&&(e.preventDefault(),this.root.handleClose())}#props=user_derived(()=>({id:this.opts.id.current,[this.root.getBitsAttr(this.opts.variant.current)]:"",onclick:this.onclick,onkeydown:this.onkeydown,disabled:this.opts.disabled.current?!0:void 0,tabindex:0,...this.root.sharedProps,...this.attachment}));get props(){return get$3(this.#props)}set props(value){set$1(this.#props,value)}}class DialogActionState{static create(opts){return new DialogActionState(
opts,DialogRootContext.get())}opts;root;attachment;constructor(opts,root2){this.opts=opts,this.root=root2,this.attachment=attachRef(this.opts.ref)}#props=user_derived(()=>({id:this.opts.id.current,[this.root.getBitsAttr("action")]:"",...this.root.sharedProps,...this.attachment}));get props(){return get$3(this.#props)}set props(value){set$1(this.#props,value)}}class DialogTitleState{static create(opts){return new DialogTitleState(opts,DialogRootContext.get())}opts;root;attachment;constructor(opts,root2){
this.opts=opts,this.root=root2,this.root.titleId=this.opts.id.current,this.attachment=attachRef(this.opts.ref),watch$1.pre(()=>this.opts.id.current,id2=>{this.root.titleId=id2})}#props=user_derived(()=>({id:this.opts.id.current,role:"heading","aria-level":this.opts.level.current,[this.root.getBitsAttr("title")]:"",...this.root.sharedProps,...this.attachment}));get props(){return get$3(this.#props)}set props(value){set$1(this.#props,value)}}class DialogDescriptionState{static create(opts){return new DialogDescriptionState(
opts,DialogRootContext.get())}opts;root;attachment;constructor(opts,root2){this.opts=opts,this.root=root2,this.root.descriptionId=this.opts.id.current,this.attachment=attachRef(this.opts.ref,v=>{this.root.descriptionNode=v}),watch$1.pre(()=>this.opts.id.current,id2=>{this.root.descriptionId=id2})}#props=user_derived(()=>({id:this.opts.id.current,[this.root.getBitsAttr("description")]:"",...this.root.sharedProps,...this.attachment}));get props(){return get$3(this.#props)}set props(value){set$1(this.#props,
value)}}class DialogContentState{static create(opts){return new DialogContentState(opts,DialogRootContext.get())}opts;root;attachment;constructor(opts,root2){this.opts=opts,this.root=root2,this.attachment=attachRef(this.opts.ref,v=>{this.root.contentNode=v,this.root.contentId=v?.id})}#snippetProps=user_derived(()=>({open:this.root.opts.open.current}));get snippetProps(){return get$3(this.#snippetProps)}set snippetProps(value){set$1(this.#snippetProps,value)}#props=user_derived(()=>({id:this.opts.
id.current,role:this.root.opts.variant.current==="alert-dialog"?"alertdialog":"dialog","aria-modal":"true","aria-describedby":this.root.descriptionId,"aria-labelledby":this.root.titleId,[this.root.getBitsAttr("content")]:"",style:{pointerEvents:"auto",outline:this.root.opts.variant.current==="alert-dialog"?"none":void 0,"--bits-dialog-depth":this.root.depth,"--bits-dialog-nested-count":this.root.nestedOpenCount,contain:"layout style"},tabindex:this.root.opts.variant.current==="alert-dialog"?-1:void 0,
"data-nested-open":boolToEmptyStrOrUndef(this.root.nestedOpenCount>0),"data-nested":boolToEmptyStrOrUndef(this.root.parent!==null),...getDataTransitionAttrs(this.root.contentPresence.transitionStatus),...this.root.sharedProps,...this.attachment}));get props(){return get$3(this.#props)}set props(value){set$1(this.#props,value)}get shouldRender(){return this.root.contentPresence.shouldRender}}class DialogOverlayState{static create(opts){return new DialogOverlayState(opts,DialogRootContext.get())}opts;root;attachment;constructor(opts,root2){
this.opts=opts,this.root=root2,this.attachment=attachRef(this.opts.ref,v=>this.root.overlayNode=v)}#snippetProps=user_derived(()=>({open:this.root.opts.open.current}));get snippetProps(){return get$3(this.#snippetProps)}set snippetProps(value){set$1(this.#snippetProps,value)}#props=user_derived(()=>({id:this.opts.id.current,[this.root.getBitsAttr("overlay")]:"",style:{pointerEvents:"auto","--bits-dialog-depth":this.root.depth,"--bits-dialog-nested-count":this.root.nestedOpenCount},"data-nested-o\
pen":boolToEmptyStrOrUndef(this.root.nestedOpenCount>0),"data-nested":boolToEmptyStrOrUndef(this.root.parent!==null),...getDataTransitionAttrs(this.root.overlayPresence.transitionStatus),...this.root.sharedProps,...this.attachment}));get props(){return get$3(this.#props)}set props(value){set$1(this.#props,value)}get shouldRender(){return this.root.overlayPresence.shouldRender}}class AlertDialogCancelState{static create(opts){return new AlertDialogCancelState(opts,DialogRootContext.get())}opts;root;attachment;constructor(opts,root2){
this.opts=opts,this.root=root2,this.attachment=attachRef(this.opts.ref,v=>this.root.cancelNode=v),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this)}onclick(e){this.opts.disabled.current||e.button>0||this.root.handleClose()}onkeydown(e){this.opts.disabled.current||(e.key===SPACE||e.key===ENTER)&&(e.preventDefault(),this.root.handleClose())}#props=user_derived(()=>({id:this.opts.id.current,[this.root.getBitsAttr("cancel")]:"",onclick:this.onclick,onkeydown:this.onkeydown,
tabindex:0,...this.root.sharedProps,...this.attachment}));get props(){return get$3(this.#props)}set props(value){set$1(this.#props,value)}}function Alert_dialog($$anchor,$$props){push$1($$props,!0);let open2=prop($$props,"open",15,!1),onOpenChange=prop($$props,"onOpenChange",3,noop$1),onOpenChangeComplete=prop($$props,"onOpenChangeComplete",3,noop$1);DialogRootState.create({variant:boxWith$1(()=>"alert-dialog"),open:boxWith$1(()=>open2(),v=>{open2(v),onOpenChange()(v)}),onOpenChangeComplete:boxWith$1(
()=>onOpenChangeComplete())});var fragment=comment$2(),node2=first_child(fragment);snippet(node2,()=>$$props.children??noop$3),append($$anchor,fragment),pop()}var root_2$1D=from_html("<div><!></div>");function Dialog_title$1($$anchor,$$props){const uid2=props_id();push$1($$props,!0);let id2=prop($$props,"id",19,()=>createId(uid2)),ref2=prop($$props,"ref",15,null),level=prop($$props,"level",3,2),restProps=rest_props($$props,["$$slots","$$events","$$legacy","id","ref","child","children","level"]);
const titleState=DialogTitleState.create({id:boxWith$1(()=>id2()),level:boxWith$1(()=>level()),ref:boxWith$1(()=>ref2(),v=>ref2(v))}),mergedProps=user_derived(()=>mergeProps(restProps,titleState.props));var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);snippet(node_1,()=>$$props.child,()=>({props:get$3(mergedProps)})),append($$anchor2,fragment_1)},alternate=$$anchor2=>{var div=root_2$1D();attribute_effect(div,
()=>({...get$3(mergedProps)}));var node_2=child(div);snippet(node_2,()=>$$props.children??noop$3),reset(div),append($$anchor2,div)};if_block(node2,$$render=>{$$props.child?$$render(consequent):$$render(alternate,-1)})}append($$anchor,fragment),pop()}var root_2$1C=from_html("<button><!></button>");function Alert_dialog_action$1($$anchor,$$props){const uid2=props_id();push$1($$props,!0);let id2=prop($$props,"id",19,()=>createId(uid2)),ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,[
"$$slots","$$events","$$legacy","children","child","id","ref"]);const actionState=DialogActionState.create({id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v))}),mergedProps=user_derived(()=>mergeProps(restProps,actionState.props));var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);snippet(node_1,()=>$$props.child,()=>({props:get$3(mergedProps)})),append($$anchor2,fragment_1)},alternate=$$anchor2=>{var button=root_2$1C();
attribute_effect(button,()=>({...get$3(mergedProps)}));var node_2=child(button);snippet(node_2,()=>$$props.children??noop$3),reset(button),append($$anchor2,button)};if_block(node2,$$render=>{$$props.child?$$render(consequent):$$render(alternate,-1)})}append($$anchor,fragment),pop()}var root_2$1B=from_html("<button><!></button>");function Alert_dialog_cancel$1($$anchor,$$props){const uid2=props_id();push$1($$props,!0);let id2=prop($$props,"id",19,()=>createId(uid2)),ref2=prop($$props,"ref",15,null),
disabled=prop($$props,"disabled",3,!1),restProps=rest_props($$props,["$$slots","$$events","$$legacy","id","ref","children","child","disabled"]);const cancelState=AlertDialogCancelState.create({id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v)),disabled:boxWith$1(()=>!!disabled())}),mergedProps=user_derived(()=>mergeProps(restProps,cancelState.props));var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);
snippet(node_1,()=>$$props.child,()=>({props:get$3(mergedProps)})),append($$anchor2,fragment_1)},alternate=$$anchor2=>{var button=root_2$1B();attribute_effect(button,()=>({...get$3(mergedProps)}));var node_2=child(button);snippet(node_2,()=>$$props.children??noop$3),reset(button),append($$anchor2,button)};if_block(node2,$$render=>{$$props.child?$$render(consequent):$$render(alternate,-1)})}append($$anchor,fragment),pop()}function Portal_consumer($$anchor,$$props){var fragment=comment$2(),node2=first_child(
fragment);key$1(node2,()=>$$props.children,$$anchor2=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);snippet(node_1,()=>$$props.children??noop$3),append($$anchor2,fragment_1)}),append($$anchor,fragment)}const BitsConfigContext=new Context$1("BitsConfig");function getBitsConfig(){const fallback2=new BitsConfigState(null,{});return BitsConfigContext.getOr(fallback2).opts}class BitsConfigState{opts;constructor(parent,opts){const resolveConfigOption=createConfigResolver(parent,opts);this.
opts={defaultPortalTo:resolveConfigOption(config2=>config2.defaultPortalTo),defaultLocale:resolveConfigOption(config2=>config2.defaultLocale)}}}function createConfigResolver(parent,currentOpts){return getter=>boxWith$1(()=>{const value=getter(currentOpts)?.current;if(value!==void 0)return value;if(parent!==null)return getter(parent.opts)?.current})}function createPropResolver(configOption,fallback2){return getProp=>{const config2=getBitsConfig();return boxWith$1(()=>{const propValue=getProp();if(propValue!==
void 0)return propValue;const option2=configOption(config2).current;return option2!==void 0?option2:fallback2})}}const resolvePortalToProp=createPropResolver(config2=>config2.defaultPortalTo,"body");function Portal$2($$anchor,$$props){push$1($$props,!0);const to=resolvePortalToProp(()=>$$props.to),context=getAllContexts();let target2=user_derived(getTarget);function getTarget(){if(!isBrowser$2||$$props.disabled)return null;let localTarget=null;return typeof to.current=="string"?localTarget=document.
querySelector(to.current):localTarget=to.current,localTarget}let instance;function unmountInstance(){instance&&(unmount(instance),instance=null)}watch$1([()=>get$3(target2),()=>$$props.disabled],([target3,disabled])=>{if(!target3||disabled){unmountInstance();return}return instance=mount(Portal_consumer,{target:target3,props:{children:$$props.children},context}),()=>{unmountInstance()}});var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{var fragment_1=comment$2(),node_1=first_child(
fragment_1);snippet(node_1,()=>$$props.children??noop$3),append($$anchor2,fragment_1)};if_block(node2,$$render=>{$$props.disabled&&$$render(consequent)})}append($$anchor,fragment),pop()}class CustomEventDispatcher{eventName;options;constructor(eventName,options={bubbles:!0,cancelable:!0}){this.eventName=eventName,this.options=options}createEvent(detail){return new CustomEvent(this.eventName,{...this.options,detail})}dispatch(element2,detail){const event2=this.createEvent(detail);return element2.
dispatchEvent(event2),event2}listen(element2,callback,options){const handler=event2=>{callback(event2)};return on(element2,this.eventName,handler,options)}}function debounce$1(fn,wait=500){let timeout=null;const debounced=(...args)=>{timeout!==null&&clearTimeout(timeout),timeout=setTimeout(()=>{fn(...args)},wait)};return debounced.destroy=()=>{timeout!==null&&(clearTimeout(timeout),timeout=null)},debounced}function isOrContainsTarget(node2,target2){return node2===target2||node2.contains(target2)}
function getOwnerDocument(el){return el?.ownerDocument??document}function isClickTrulyOutside(event2,contentNode){const{clientX,clientY}=event2,rect=contentNode.getBoundingClientRect();return clientX<rect.left||clientX>rect.right||clientY<rect.top||clientY>rect.bottom}const SELECTION_KEYS=[ENTER,SPACE],FIRST_KEYS$1=[ARROW_DOWN,PAGE_UP,HOME],LAST_KEYS$1=[ARROW_UP,PAGE_DOWN,END],FIRST_LAST_KEYS$1=[...FIRST_KEYS$1,...LAST_KEYS$1],SUB_OPEN_KEYS={ltr:[...SELECTION_KEYS,ARROW_RIGHT],rtl:[...SELECTION_KEYS,
ARROW_LEFT]},SUB_CLOSE_KEYS={ltr:[ARROW_LEFT],rtl:[ARROW_RIGHT]};function isMouseEvent(event2){return event2.pointerType==="mouse"}function focus(element2,{select=!1}={}){if(!element2||!element2.focus)return;const doc=getDocument$1(element2);if(doc.activeElement===element2)return;const previouslyFocusedElement=doc.activeElement;element2.focus({preventScroll:!0}),element2!==previouslyFocusedElement&&isSelectableInput(element2)&&select&&element2.select()}function focusFirst(candidates,{select=!1}={},getActiveElement2){
const previouslyFocusedElement=getActiveElement2();for(const candidate of candidates)if(focus(candidate,{select}),getActiveElement2()!==previouslyFocusedElement)return!0}let isUsingKeyboard=state$1(!1);class IsUsingKeyboard{static _refs=0;static _cleanup;constructor(){user_effect(()=>(IsUsingKeyboard._refs===0&&(IsUsingKeyboard._cleanup=effect_root(()=>{const callbacksToDispose=[],handlePointer=_=>{set$1(isUsingKeyboard,!1)},handleKeydown=_=>{set$1(isUsingKeyboard,!0)};return callbacksToDispose.
push(on(document,"pointerdown",handlePointer,{capture:!0}),on(document,"pointermove",handlePointer,{capture:!0}),on(document,"keydown",handleKeydown,{capture:!0})),executeCallbacks(...callbacksToDispose)})),IsUsingKeyboard._refs++,()=>{IsUsingKeyboard._refs--,IsUsingKeyboard._refs===0&&(set$1(isUsingKeyboard,!1),IsUsingKeyboard._cleanup?.())}))}get current(){return get$3(isUsingKeyboard)}set current(value){set$1(isUsingKeyboard,value,!0)}}var candidateSelectors=["input:not([inert])","select:not(\
[inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],candidateSelector=candidateSelectors.join(","),NoElement=typeof Element>"u",matches=NoElement?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,
getRootNode=!NoElement&&Element.prototype.getRootNode?function(element2){var _element$getRootNode;return element2==null||(_element$getRootNode=element2.getRootNode)===null||_element$getRootNode===void 0?void 0:_element$getRootNode.call(element2)}:function(element2){return element2?.ownerDocument},isInert=function isInert2(node2,lookUp){var _node$getAttribute;lookUp===void 0&&(lookUp=!0);var inertAtt=node2==null||(_node$getAttribute=node2.getAttribute)===null||_node$getAttribute===void 0?void 0:_node$getAttribute.
call(node2,"inert"),inert=inertAtt===""||inertAtt==="true",result=inert||lookUp&&node2&&isInert2(node2.parentNode);return result},isContentEditable=function(node2){var _node$getAttribute2,attValue=node2==null||(_node$getAttribute2=node2.getAttribute)===null||_node$getAttribute2===void 0?void 0:_node$getAttribute2.call(node2,"contenteditable");return attValue===""||attValue==="true"},getCandidates=function(el,includeContainer,filter){if(isInert(el))return[];var candidates=Array.prototype.slice.apply(
el.querySelectorAll(candidateSelector));return includeContainer&&matches.call(el,candidateSelector)&&candidates.unshift(el),candidates=candidates.filter(filter),candidates},getCandidatesIteratively=function getCandidatesIteratively2(elements,includeContainer,options){for(var candidates=[],elementsToCheck=Array.from(elements);elementsToCheck.length;){var element2=elementsToCheck.shift();if(!isInert(element2,!1))if(element2.tagName==="SLOT"){var assigned=element2.assignedElements(),content2=assigned.
length?assigned:element2.children,nestedCandidates=getCandidatesIteratively2(content2,!0,options);options.flatten?candidates.push.apply(candidates,nestedCandidates):candidates.push({scopeParent:element2,candidates:nestedCandidates})}else{var validCandidate=matches.call(element2,candidateSelector);validCandidate&&options.filter(element2)&&(includeContainer||!elements.includes(element2))&&candidates.push(element2);var shadowRoot=element2.shadowRoot||typeof options.getShadowRoot=="function"&&options.
getShadowRoot(element2),validShadowRoot=!isInert(shadowRoot,!1)&&(!options.shadowRootFilter||options.shadowRootFilter(element2));if(shadowRoot&&validShadowRoot){var _nestedCandidates=getCandidatesIteratively2(shadowRoot===!0?element2.children:shadowRoot.children,!0,options);options.flatten?candidates.push.apply(candidates,_nestedCandidates):candidates.push({scopeParent:element2,candidates:_nestedCandidates})}else elementsToCheck.unshift.apply(elementsToCheck,element2.children)}}return candidates},
hasTabIndex=function(node2){return!isNaN(parseInt(node2.getAttribute("tabindex"),10))},getTabIndex=function(node2){if(!node2)throw new Error("No node provided");return node2.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(node2.tagName)||isContentEditable(node2))&&!hasTabIndex(node2)?0:node2.tabIndex},getSortOrderTabIndex=function(node2,isScope){var tabIndex=getTabIndex(node2);return tabIndex<0&&isScope&&!hasTabIndex(node2)?0:tabIndex},sortOrderedTabbables=function(a,b){return a.tabIndex===b.tabIndex?
a.documentOrder-b.documentOrder:a.tabIndex-b.tabIndex},isInput=function(node2){return node2.tagName==="INPUT"},isHiddenInput=function(node2){return isInput(node2)&&node2.type==="hidden"},isDetailsWithSummary=function(node2){var r2=node2.tagName==="DETAILS"&&Array.prototype.slice.apply(node2.children).some(function(child2){return child2.tagName==="SUMMARY"});return r2},getCheckedRadio=function(nodes2,form){for(var i=0;i<nodes2.length;i++)if(nodes2[i].checked&&nodes2[i].form===form)return nodes2[i]},
isTabbableRadio=function(node2){if(!node2.name)return!0;var radioScope=node2.form||getRootNode(node2),queryRadios=function(name){return radioScope.querySelectorAll('input[type="radio"][name="'+name+'"]')},radioSet;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")radioSet=queryRadios(window.CSS.escape(node2.name));else try{radioSet=queryRadios(node2.name)}catch(err){return console.error("Looks like you have a radio button with a name attribute containing invalid C\
SS selector characters and need the CSS.escape polyfill: %s",err.message),!1}var checked=getCheckedRadio(radioSet,node2.form);return!checked||checked===node2},isRadio=function(node2){return isInput(node2)&&node2.type==="radio"},isNonTabbableRadio=function(node2){return isRadio(node2)&&!isTabbableRadio(node2)},isNodeAttached=function(node2){var _nodeRoot,nodeRoot=node2&&getRootNode(node2),nodeRootHost=(_nodeRoot=nodeRoot)===null||_nodeRoot===void 0?void 0:_nodeRoot.host,attached=!1;if(nodeRoot&&nodeRoot!==
node2){var _nodeRootHost,_nodeRootHost$ownerDo,_node$ownerDocument;for(attached=!!((_nodeRootHost=nodeRootHost)!==null&&_nodeRootHost!==void 0&&(_nodeRootHost$ownerDo=_nodeRootHost.ownerDocument)!==null&&_nodeRootHost$ownerDo!==void 0&&_nodeRootHost$ownerDo.contains(nodeRootHost)||node2!=null&&(_node$ownerDocument=node2.ownerDocument)!==null&&_node$ownerDocument!==void 0&&_node$ownerDocument.contains(node2));!attached&&nodeRootHost;){var _nodeRoot2,_nodeRootHost2,_nodeRootHost2$ownerD;nodeRoot=getRootNode(
nodeRootHost),nodeRootHost=(_nodeRoot2=nodeRoot)===null||_nodeRoot2===void 0?void 0:_nodeRoot2.host,attached=!!((_nodeRootHost2=nodeRootHost)!==null&&_nodeRootHost2!==void 0&&(_nodeRootHost2$ownerD=_nodeRootHost2.ownerDocument)!==null&&_nodeRootHost2$ownerD!==void 0&&_nodeRootHost2$ownerD.contains(nodeRootHost))}}return attached},isZeroArea=function(node2){var _node$getBoundingClie=node2.getBoundingClientRect(),width=_node$getBoundingClie.width,height=_node$getBoundingClie.height;return width===
0&&height===0},isHidden=function(node2,_ref){var displayCheck=_ref.displayCheck,getShadowRoot=_ref.getShadowRoot;if(getComputedStyle(node2).visibility==="hidden")return!0;var isDirectSummary=matches.call(node2,"details>summary:first-of-type"),nodeUnderDetails=isDirectSummary?node2.parentElement:node2;if(matches.call(nodeUnderDetails,"details:not([open]) *"))return!0;if(!displayCheck||displayCheck==="full"||displayCheck==="legacy-full"){if(typeof getShadowRoot=="function"){for(var originalNode=node2;node2;){
var parentElement=node2.parentElement,rootNode=getRootNode(node2);if(parentElement&&!parentElement.shadowRoot&&getShadowRoot(parentElement)===!0)return isZeroArea(node2);node2.assignedSlot?node2=node2.assignedSlot:!parentElement&&rootNode!==node2.ownerDocument?node2=rootNode.host:node2=parentElement}node2=originalNode}if(isNodeAttached(node2))return!node2.getClientRects().length;if(displayCheck!=="legacy-full")return!0}else if(displayCheck==="non-zero-area")return isZeroArea(node2);return!1},isDisabledFromFieldset=function(node2){
if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(node2.tagName))for(var parentNode=node2.parentElement;parentNode;){if(parentNode.tagName==="FIELDSET"&&parentNode.disabled){for(var i=0;i<parentNode.children.length;i++){var child2=parentNode.children.item(i);if(child2.tagName==="LEGEND")return matches.call(parentNode,"fieldset[disabled] *")?!0:!child2.contains(node2)}return!0}parentNode=parentNode.parentElement}return!1},isNodeMatchingSelectorFocusable=function(options,node2){return!(node2.disabled||isInert(
node2)||isHiddenInput(node2)||isHidden(node2,options)||isDetailsWithSummary(node2)||isDisabledFromFieldset(node2))},isNodeMatchingSelectorTabbable=function(options,node2){return!(isNonTabbableRadio(node2)||getTabIndex(node2)<0||!isNodeMatchingSelectorFocusable(options,node2))},isValidShadowRootTabbable=function(shadowHostNode){var tabIndex=parseInt(shadowHostNode.getAttribute("tabindex"),10);return!!(isNaN(tabIndex)||tabIndex>=0)},sortByOrder=function sortByOrder2(candidates){var regularTabbables=[],
orderedTabbables=[];return candidates.forEach(function(item,i){var isScope=!!item.scopeParent,element2=isScope?item.scopeParent:item,candidateTabindex=getSortOrderTabIndex(element2,isScope),elements=isScope?sortByOrder2(item.candidates):element2;candidateTabindex===0?isScope?regularTabbables.push.apply(regularTabbables,elements):regularTabbables.push(element2):orderedTabbables.push({documentOrder:i,tabIndex:candidateTabindex,item,isScope,content:elements})}),orderedTabbables.sort(sortOrderedTabbables).
reduce(function(acc,sortable){return sortable.isScope?acc.push.apply(acc,sortable.content):acc.push(sortable.content),acc},[]).concat(regularTabbables)},tabbable=function(container2,options){options=options||{};var candidates;return options.getShadowRoot?candidates=getCandidatesIteratively([container2],options.includeContainer,{filter:isNodeMatchingSelectorTabbable.bind(null,options),flatten:!1,getShadowRoot:options.getShadowRoot,shadowRootFilter:isValidShadowRootTabbable}):candidates=getCandidates(
container2,options.includeContainer,isNodeMatchingSelectorTabbable.bind(null,options)),sortByOrder(candidates)},focusable=function(container2,options){options=options||{};var candidates;return options.getShadowRoot?candidates=getCandidatesIteratively([container2],options.includeContainer,{filter:isNodeMatchingSelectorFocusable.bind(null,options),flatten:!0,getShadowRoot:options.getShadowRoot}):candidates=getCandidates(container2,options.includeContainer,isNodeMatchingSelectorFocusable.bind(null,
options)),candidates},isTabbable=function(node2,options){if(options=options||{},!node2)throw new Error("No node provided");return matches.call(node2,candidateSelector)===!1?!1:isNodeMatchingSelectorTabbable(options,node2)},focusableCandidateSelector=candidateSelectors.concat("iframe").join(","),isFocusable=function(node2,options){if(options=options||{},!node2)throw new Error("No node provided");return matches.call(node2,focusableCandidateSelector)===!1?!1:isNodeMatchingSelectorFocusable(options,
node2)};function getTabbableOptions(){return{getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"}}function getTabbableFrom(currentNode,direction){if(!isTabbable(currentNode,getTabbableOptions()))return getTabbableFromFocusable(currentNode,direction);const doc=getDocument$1(currentNode),allTabbable=tabbable(doc.body,getTabbableOptions());direction==="prev"&&allTabbable.reverse();const activeIndex=allTabbable.indexOf(currentNode);
return activeIndex===-1?doc.body:allTabbable.slice(activeIndex+1)[0]}function getTabbableFromFocusable(currentNode,direction){const doc=getDocument$1(currentNode);if(!isFocusable(currentNode,getTabbableOptions()))return doc.body;const allFocusable=focusable(doc.body,getTabbableOptions());direction==="prev"&&allFocusable.reverse();const activeIndex=allFocusable.indexOf(currentNode);return activeIndex===-1?doc.body:allFocusable.slice(activeIndex+1).find(node2=>isTabbable(node2,getTabbableOptions()))??
doc.body}function next(array2,index2,loop2=!0){if(!(array2.length===0||index2<0||index2>=array2.length))return array2.length===1&&index2===0?array2[0]:index2===array2.length-1?loop2?array2[0]:void 0:array2[index2+1]}function prev(array2,index2,loop2=!0){if(!(array2.length===0||index2<0||index2>=array2.length))return array2.length===1&&index2===0?array2[0]:index2===0?loop2?array2[array2.length-1]:void 0:array2[index2-1]}function forward(array2,index2,increment2,loop2=!0){if(array2.length===0||index2<
0||index2>=array2.length)return;let targetIndex=index2+increment2;return loop2?targetIndex=(targetIndex%array2.length+array2.length)%array2.length:targetIndex=Math.max(0,Math.min(targetIndex,array2.length-1)),array2[targetIndex]}function backward(array2,index2,decrement,loop2=!0){if(array2.length===0||index2<0||index2>=array2.length)return;let targetIndex=index2-decrement;return loop2?targetIndex=(targetIndex%array2.length+array2.length)%array2.length:targetIndex=Math.max(0,Math.min(targetIndex,
array2.length-1)),array2[targetIndex]}function getNextMatch(values,search2,currentMatch){const lowerSearch=search2.toLowerCase();if(lowerSearch.endsWith(" ")){const searchWithoutSpace=lowerSearch.slice(0,-1);if(values.filter(value=>value.toLowerCase().startsWith(searchWithoutSpace)).length<=1)return getNextMatch(values,searchWithoutSpace,currentMatch);const currentMatchLowercase=currentMatch?.toLowerCase();if(currentMatchLowercase&&currentMatchLowercase.startsWith(searchWithoutSpace)&&currentMatchLowercase.
charAt(searchWithoutSpace.length)===" "&&search2.trim()===searchWithoutSpace)return currentMatch;const spacedMatches=values.filter(value=>value.toLowerCase().startsWith(lowerSearch));if(spacedMatches.length>0){const currentMatchIndex2=currentMatch?values.indexOf(currentMatch):-1;return wrapArray(spacedMatches,Math.max(currentMatchIndex2,0)).find(match=>match!==currentMatch)||currentMatch}}const normalizedSearch=search2.length>1&&Array.from(search2).every(char=>char===search2[0])?search2[0]:search2,
normalizedLowerSearch=normalizedSearch.toLowerCase(),currentMatchIndex=currentMatch?values.indexOf(currentMatch):-1;let wrappedValues=wrapArray(values,Math.max(currentMatchIndex,0));normalizedSearch.length===1&&(wrappedValues=wrappedValues.filter(v=>v!==currentMatch));const nextMatch=wrappedValues.find(value=>value?.toLowerCase().startsWith(normalizedLowerSearch));return nextMatch!==currentMatch?nextMatch:void 0}function wrapArray(array2,startIndex){return array2.map((_,index2)=>array2[(startIndex+
index2)%array2.length])}const defaultOptions={afterMs:1e4,onChange:noop$1};function boxAutoReset(defaultValue,options){const{afterMs,onChange,getWindow:getWindow2}={...defaultOptions,...options};let timeout=null,value=state$1(proxy(defaultValue));function resetAfter(){return getWindow2().setTimeout(()=>{set$1(value,defaultValue,!0),onChange?.(defaultValue)},afterMs)}return user_effect(()=>()=>{timeout&&getWindow2().clearTimeout(timeout)}),boxWith$1(()=>get$3(value),v=>{set$1(value,v,!0),onChange?.(
v),timeout&&getWindow2().clearTimeout(timeout),timeout=resetAfter()})}class DOMTypeahead{#opts;#search;#onMatch=user_derived(()=>this.#opts.onMatch?this.#opts.onMatch:node2=>node2.focus());#getCurrentItem=user_derived(()=>this.#opts.getCurrentItem?this.#opts.getCurrentItem:this.#opts.getActiveElement);constructor(opts){this.#opts=opts,this.#search=boxAutoReset("",{afterMs:1e3,getWindow:opts.getWindow}),this.handleTypeaheadSearch=this.handleTypeaheadSearch.bind(this),this.resetTypeahead=this.resetTypeahead.
bind(this)}handleTypeaheadSearch(key2,candidates){if(!candidates.length)return;this.#search.current=this.#search.current+key2;const currentItem=get$3(this.#getCurrentItem)(),currentMatch=candidates.find(item=>item===currentItem)?.textContent?.trim()??"",values=candidates.map(item=>item.textContent?.trim()??""),nextMatch=getNextMatch(values,this.#search.current,currentMatch),newItem=candidates.find(item=>item.textContent?.trim()===nextMatch);return newItem&&get$3(this.#onMatch)(newItem),newItem}resetTypeahead(){
this.#search.current=""}get search(){return this.#search.current}}const CONTEXT_MENU_TRIGGER_ATTR="data-context-menu-trigger",CONTEXT_MENU_CONTENT_ATTR="data-context-menu-content",MenuRootContext=new Context$1("Menu.Root"),MenuMenuContext=new Context$1("Menu.Root | Menu.Sub"),MenuContentContext=new Context$1("Menu.Content"),MenuOpenEvent=new CustomEventDispatcher("bitsmenuopen",{bubbles:!1,cancelable:!0}),menuAttrs=createBitsAttrs({component:"menu",parts:["trigger","content","sub-trigger","item",
"group","group-heading","checkbox-group","checkbox-item","radio-group","radio-item","separator","sub-content","arrow"]});class MenuSubmenuIntent{#opts;#cleanupDocMove=null;#fallbackTimer=null;#active=!1;#target=null;#apex=null;#pointerPoint=null;#launchPoint=null;constructor(opts){this.#opts=opts,watch$1([opts.triggerNode,opts.contentNode,opts.enabled],([triggerNode,contentNode,enabled])=>{if(this.#reset(),!triggerNode||!contentNode||!enabled)return;const onTriggerMove=e=>{isMouseEvent(e)&&(this.#launchPoint=
{x:e.clientX,y:e.clientY},this.#active||this.#preview(e,"content"))},onTriggerLeave=e=>{isMouseEvent(e)&&this.#engage(e,"content")},onContentMove=e=>{isMouseEvent(e)&&(this.#active||this.#preview(e,"trigger"))},onContentLeave=e=>{if(isMouseEvent(e)){if(isElement$1(e.relatedTarget)){const selector=this.#opts.subContentSelector(),matchedSubContent=e.relatedTarget.closest(selector);if(matchedSubContent&&matchedSubContent!==contentNode&&matchedSubContent.id&&!!contentNode.querySelector(`[aria-contro\
ls="${matchedSubContent.id}"]`))return}this.#engage(e,"trigger")}},onTriggerEnter=e=>{isMouseEvent(e)&&this.#disengage()},onContentEnter=e=>{isMouseEvent(e)&&this.#disengage()};return triggerNode.addEventListener("pointermove",onTriggerMove),triggerNode.addEventListener("pointerleave",onTriggerLeave),triggerNode.addEventListener("pointerenter",onTriggerEnter),contentNode.addEventListener("pointermove",onContentMove),contentNode.addEventListener("pointerleave",onContentLeave),contentNode.addEventListener(
"pointerenter",onContentEnter),()=>{triggerNode.removeEventListener("pointermove",onTriggerMove),triggerNode.removeEventListener("pointerleave",onTriggerLeave),triggerNode.removeEventListener("pointerenter",onTriggerEnter),contentNode.removeEventListener("pointermove",onContentMove),contentNode.removeEventListener("pointerleave",onContentLeave),contentNode.removeEventListener("pointerenter",onContentEnter),this.#reset()}}),onDestroyEffect(()=>{this.#reset()})}#parentTargetRect(){const parent=this.#opts.
parentContentNode();return parent?parent.getBoundingClientRect():this.#opts.triggerNode()?.getBoundingClientRect()??null}#computePolygons(pointerPt,target2){const triggerNode=this.#opts.triggerNode(),contentNode=this.#opts.contentNode();if(!triggerNode||!contentNode)return null;const triggerRect=triggerNode.getBoundingClientRect(),contentRect=contentNode.getBoundingClientRect(),side=getSide$2(triggerRect,contentRect);let apex,targetRect,sourceRect;return target2==="content"?(apex=this.#active?this.#apex??
pointerPt:pointerPt,targetRect=contentRect):(apex=this.#launchPoint??pointerPt,targetRect=this.#parentTargetRect()??triggerRect,sourceRect=contentRect),this.#apex=apex,{corridor:getCorridorPolygon(triggerRect,contentRect,side),intent:getIntentPolygon(apex,targetRect,side,target2,sourceRect),targetRect,side}}#isInSafeZone(pt,corridor,intent){return isPointInPolygon$1(pt,corridor)||isPointInPolygon$1(pt,intent)}#preview(e,target2){const pt={x:e.clientX,y:e.clientY};this.#computePolygons(pt,target2)&&
(this.#target=target2,this.#pointerPoint=pt)}#engage(e,target2){if(!this.#opts.enabled())return;const triggerNode=this.#opts.triggerNode(),contentNode=this.#opts.contentNode();if(!triggerNode||!contentNode)return;const related=e.relatedTarget;if(isElement$1(related)&&(target2==="content"&&contentNode.contains(related)||target2==="trigger"&&triggerNode.contains(related)))return;const pt={x:e.clientX,y:e.clientY},geo=this.#computePolygons(pt,target2);if(geo){if(!isInsideRect$1(pt,geo.targetRect)&&
!this.#isInSafeZone(pt,geo.corridor,geo.intent)){this.#clearVisuals();return}this.#active=!0,this.#target=target2,this.#pointerPoint=pt,this.#opts.setIsPointerInTransit(!0),this.#attachDocMove(),this.#startFallback()}}#disengageTimer=null;#disengage(){if(!this.#active)return;const wasReturning=this.#target==="trigger";this.#detachDocMove(),this.#clearFallback(),this.#active=!1,this.#clearVisuals(),wasReturning?(this.#clearDisengageTimer(),this.#disengageTimer=setTimeout(()=>{this.#disengageTimer=
null,this.#opts.setIsPointerInTransit(!1)},100)):this.#opts.setIsPointerInTransit(!1)}#clearDisengageTimer(){this.#disengageTimer!==null&&(clearTimeout(this.#disengageTimer),this.#disengageTimer=null)}#intentExit(){const pointerPoint=this.#pointerPoint;this.#detachDocMove(),this.#clearFallback(),this.#clearDisengageTimer(),this.#active=!1,this.#opts.setIsPointerInTransit(!1),this.#clearVisuals(),this.#opts.onIntentExit(pointerPoint)}#reset(){this.#detachDocMove(),this.#clearFallback(),this.#clearDisengageTimer(),
this.#active&&this.#opts.setIsPointerInTransit(!1),this.#active=!1,this.#target=null,this.#apex=null,this.#pointerPoint=null,this.#launchPoint=null}#isPointerInDescendantSubContent(pt){const contentNode=this.#opts.contentNode();if(!contentNode)return!1;const el=contentNode.ownerDocument.elementFromPoint(pt.x,pt.y);if(!el)return!1;const selector=this.#opts.subContentSelector(),subContent=el.closest(selector);return!subContent||subContent===contentNode?!1:subContent.id?!!contentNode.querySelector(
`[aria-controls="${subContent.id}"]`):!1}#onDocMove=e=>{if(!this.#active||!this.#target||!isMouseEvent(e))return;const triggerNode=this.#opts.triggerNode(),contentNode=this.#opts.contentNode();if(!triggerNode||!contentNode){this.#intentExit();return}this.#clearFallback();const pt={x:e.clientX,y:e.clientY};this.#pointerPoint=pt;const triggerRect=triggerNode.getBoundingClientRect(),contentRect=contentNode.getBoundingClientRect();if(this.#target==="content"&&isInsideRect$1(pt,contentRect)){this.#disengage();
return}if(this.#target==="trigger"&&isInsideInsetRect(pt,triggerRect,4)){this.#disengage();return}if(this.#isPointerInDescendantSubContent(pt)){this.#startFallback();return}const geo=this.#computePolygons(pt,this.#target);if(!geo){this.#intentExit();return}if(this.#isInSafeZone(pt,geo.corridor,geo.intent)){this.#startFallback();return}this.#intentExit()};#attachDocMove(){if(this.#cleanupDocMove)return;const doc=getDocument$1(this.#opts.triggerNode()??this.#opts.contentNode());doc&&(doc.addEventListener(
"pointermove",this.#onDocMove,!0),this.#cleanupDocMove=()=>{doc.removeEventListener("pointermove",this.#onDocMove,!0),this.#cleanupDocMove=null})}#detachDocMove(){this.#cleanupDocMove?.()}#startFallback(){this.#clearFallback(),this.#fallbackTimer=setTimeout(()=>{this.#fallbackTimer=null,this.#active&&this.#intentExit()},500)}#clearFallback(){this.#fallbackTimer!==null&&(clearTimeout(this.#fallbackTimer),this.#fallbackTimer=null)}#clearVisuals(){this.#target=null,this.#apex=null,this.#pointerPoint=
null}}function isPointInPolygon$1(point2,polygon){const{x,y}=point2;let inside=!1;for(let i=0,j=polygon.length-1;i<polygon.length;j=i++){const xi=polygon[i].x,yi=polygon[i].y,xj=polygon[j].x,yj=polygon[j].y;yi>y!=yj>y&&x<(xj-xi)*(y-yi)/(yj-yi)+xi&&(inside=!inside)}return inside}function isInsideRect$1(point2,rect){return point2.x>=rect.left&&point2.x<=rect.right&&point2.y>=rect.top&&point2.y<=rect.bottom}function isInsideInsetRect(point2,rect,inset){return point2.x>=rect.left+inset&&point2.x<=rect.
right-inset&&point2.y>=rect.top+inset&&point2.y<=rect.bottom-inset}function getSide$2(triggerRect,contentRect){const triggerCenterX=triggerRect.left+triggerRect.width/2,triggerCenterY=triggerRect.top+triggerRect.height/2,contentCenterX=contentRect.left+contentRect.width/2,contentCenterY=contentRect.top+contentRect.height/2,deltaX=contentCenterX-triggerCenterX,deltaY=contentCenterY-triggerCenterY;return Math.abs(deltaX)>Math.abs(deltaY)?deltaX>0?"right":"left":deltaY>0?"bottom":"top"}function getCorridorPolygon(triggerRect,contentRect,side){
switch(side){case"top":return[{x:Math.min(triggerRect.left,contentRect.left)-2,y:triggerRect.top},{x:Math.min(triggerRect.left,contentRect.left)-2,y:contentRect.bottom},{x:Math.max(triggerRect.right,contentRect.right)+2,y:contentRect.bottom},{x:Math.max(triggerRect.right,contentRect.right)+2,y:triggerRect.top}];case"bottom":return[{x:Math.min(triggerRect.left,contentRect.left)-2,y:triggerRect.bottom},{x:Math.min(triggerRect.left,contentRect.left)-2,y:contentRect.top},{x:Math.max(triggerRect.right,
contentRect.right)+2,y:contentRect.top},{x:Math.max(triggerRect.right,contentRect.right)+2,y:triggerRect.bottom}];case"left":return[{x:triggerRect.left,y:Math.min(triggerRect.top,contentRect.top)-2},{x:contentRect.right,y:Math.min(triggerRect.top,contentRect.top)-2},{x:contentRect.right,y:Math.max(triggerRect.bottom,contentRect.bottom)+2},{x:triggerRect.left,y:Math.max(triggerRect.bottom,contentRect.bottom)+2}];case"right":return[{x:triggerRect.right,y:Math.min(triggerRect.top,contentRect.top)-2},
{x:contentRect.left,y:Math.min(triggerRect.top,contentRect.top)-2},{x:contentRect.left,y:Math.max(triggerRect.bottom,contentRect.bottom)+2},{x:triggerRect.right,y:Math.max(triggerRect.bottom,contentRect.bottom)+2}]}}function getIntentPolygon(exitPoint,targetRect,side,target2,sourceRect){const effectiveSide=target2==="trigger"?flipSide(side):side,top=sourceRect?Math.min(targetRect.top,sourceRect.top)-8:targetRect.top-8,bottom=sourceRect?Math.max(targetRect.bottom,sourceRect.bottom)+8:targetRect.bottom+
8,left=sourceRect?Math.min(targetRect.left,sourceRect.left)-8:targetRect.left-8,right=sourceRect?Math.max(targetRect.right,sourceRect.right)+8:targetRect.right+8;switch(effectiveSide){case"right":return[exitPoint,{x:targetRect.left,y:top},{x:targetRect.left,y:bottom}];case"left":return[exitPoint,{x:targetRect.right,y:top},{x:targetRect.right,y:bottom}];case"bottom":return[exitPoint,{x:left,y:targetRect.top},{x:right,y:targetRect.top}];case"top":return[exitPoint,{x:left,y:targetRect.bottom},{x:right,
y:targetRect.bottom}]}}function flipSide(side){switch(side){case"top":return"bottom";case"bottom":return"top";case"left":return"right";case"right":return"left"}}class MenuRootState{static create(opts){const root2=new MenuRootState(opts);return MenuRootContext.set(root2)}opts;isUsingKeyboard=new IsUsingKeyboard;#ignoreCloseAutoFocus=state$1(!1);get ignoreCloseAutoFocus(){return get$3(this.#ignoreCloseAutoFocus)}set ignoreCloseAutoFocus(value){set$1(this.#ignoreCloseAutoFocus,value,!0)}#isPointerInTransit=state$1(
!1);get isPointerInTransit(){return get$3(this.#isPointerInTransit)}set isPointerInTransit(value){set$1(this.#isPointerInTransit,value,!0)}constructor(opts){this.opts=opts}getBitsAttr=part=>menuAttrs.getAttr(part,this.opts.variant.current)}class MenuMenuState{static create(opts,root2){return MenuMenuContext.set(new MenuMenuState(opts,root2,null))}opts;root;parentMenu;contentId=boxWith$1(()=>"");#contentNode=state$1(null);get contentNode(){return get$3(this.#contentNode)}set contentNode(value){set$1(
this.#contentNode,value,!0)}contentPresence;#triggerNode=state$1(null);get triggerNode(){return get$3(this.#triggerNode)}set triggerNode(value){set$1(this.#triggerNode,value,!0)}constructor(opts,root2,parentMenu){this.opts=opts,this.root=root2,this.parentMenu=parentMenu,this.contentPresence=new PresenceManager({ref:boxWith$1(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)},shouldSkipExitAnimation:()=>this.root.opts.variant.
current!=="menubar"||this.parentMenu!==null?!1:this.root.opts.shouldSkipExitAnimation?.()??!1}),parentMenu&&watch$1(()=>parentMenu.opts.open.current,()=>{parentMenu.opts.open.current||(this.opts.open.current=!1)})}toggleOpen(){this.opts.open.current=!this.opts.open.current}onOpen(){this.opts.open.current=!0}onClose(){this.opts.open.current=!1}}class MenuContentState{static create(opts){return MenuContentContext.set(new MenuContentState(opts,MenuMenuContext.get()))}opts;parentMenu;rovingFocusGroup;domContext;attachment;#search=state$1(
"");get search(){return get$3(this.#search)}set search(value){set$1(this.#search,value,!0)}#timer=0;#handleTypeaheadSearch;#mounted=state$1(!1);get mounted(){return get$3(this.#mounted)}set mounted(value){set$1(this.#mounted,value,!0)}#isSub;constructor(opts,parentMenu){this.opts=opts,this.parentMenu=parentMenu,this.domContext=new DOMContext(opts.ref),this.attachment=attachRef(this.opts.ref,v=>{this.parentMenu.contentNode!==v&&(this.parentMenu.contentNode=v)}),parentMenu.contentId=opts.id,this.#isSub=
opts.isSub??!1,this.onkeydown=this.onkeydown.bind(this),this.onblur=this.onblur.bind(this),this.onfocus=this.onfocus.bind(this),this.handleInteractOutside=this.handleInteractOutside.bind(this),new MenuSubmenuIntent({contentNode:()=>this.parentMenu.contentNode,triggerNode:()=>this.parentMenu.triggerNode,parentContentNode:()=>this.parentMenu.parentMenu?.contentNode??null,subContentSelector:()=>`[${this.parentMenu.root.getBitsAttr("sub-content")}]`,enabled:()=>this.parentMenu.opts.open.current&&!!this.
parentMenu.triggerNode?.hasAttribute(this.parentMenu.root.getBitsAttr("sub-trigger")),onIntentExit:pointerPoint=>{this.parentMenu.opts.open.current=!1,this.#dispatchPointerMoveToHoveredSubTrigger(pointerPoint)},setIsPointerInTransit:value=>{this.parentMenu.root.isPointerInTransit=value}}),this.#handleTypeaheadSearch=new DOMTypeahead({getActiveElement:()=>this.domContext.getActiveElement(),getWindow:()=>this.domContext.getWindow()}).handleTypeaheadSearch,this.rovingFocusGroup=new RovingFocusGroup(
{rootNode:boxWith$1(()=>this.parentMenu.contentNode),candidateAttr:this.parentMenu.root.getBitsAttr("item"),loop:this.opts.loop,orientation:boxWith$1(()=>"vertical")}),watch$1(()=>this.parentMenu.contentNode,contentNode=>{if(!contentNode)return;const handler=()=>{afterTick(()=>{this.parentMenu.root.isUsingKeyboard.current&&this.rovingFocusGroup.focusFirstCandidate()})};return MenuOpenEvent.listen(contentNode,handler)}),user_effect(()=>{this.parentMenu.opts.open.current||this.domContext.getWindow().
clearTimeout(this.#timer)})}#getCandidateNodes(){const node2=this.parentMenu.contentNode;return node2?Array.from(node2.querySelectorAll(`[${this.parentMenu.root.getBitsAttr("item")}]:not([data-disabled])`)):[]}#isPointerMovingToSubmenu(){return this.parentMenu.root.isPointerInTransit}#dispatchPointerMoveToHoveredSubTrigger(pointerPoint){if(!pointerPoint)return;const parentContentNode=this.parentMenu.parentMenu?.contentNode;if(!parentContentNode)return;const hoveredNode=this.domContext.getDocument().
elementFromPoint(pointerPoint.x,pointerPoint.y);if(!isElement$1(hoveredNode))return;const hoveredSubTrigger=hoveredNode.closest(`[${this.parentMenu.root.getBitsAttr("sub-trigger")}]`);!hoveredSubTrigger||!parentContentNode.contains(hoveredSubTrigger)||hoveredSubTrigger!==this.parentMenu.triggerNode&&hoveredSubTrigger.dispatchEvent(new PointerEvent("pointermove",{bubbles:!0,cancelable:!0,pointerType:"mouse",clientX:pointerPoint.x,clientY:pointerPoint.y}))}onCloseAutoFocus=e=>{if(this.opts.onCloseAutoFocus.
current?.(e),!(e.defaultPrevented||this.#isSub)){if(this.parentMenu.root.ignoreCloseAutoFocus){e.preventDefault();return}this.parentMenu.triggerNode&&isTabbable(this.parentMenu.triggerNode)&&(e.preventDefault(),this.parentMenu.triggerNode.focus())}};handleTabKeyDown(e){let rootMenu=this.parentMenu;for(;rootMenu.parentMenu!==null;)rootMenu=rootMenu.parentMenu;if(!rootMenu.triggerNode)return;e.preventDefault();const nodeToFocus=getTabbableFrom(rootMenu.triggerNode,e.shiftKey?"prev":"next");nodeToFocus?
(this.parentMenu.root.ignoreCloseAutoFocus=!0,rootMenu.onClose(),afterTick(()=>{nodeToFocus.focus(),afterTick(()=>{this.parentMenu.root.ignoreCloseAutoFocus=!1})})):this.domContext.getDocument().body.focus()}onkeydown(e){if(e.defaultPrevented)return;if(e.key===TAB){this.handleTabKeyDown(e);return}const target2=e.target,currentTarget=e.currentTarget;if(!isHTMLElement$1(target2)||!isHTMLElement$1(currentTarget))return;const isKeydownInside=target2.closest(`[${this.parentMenu.root.getBitsAttr("cont\
ent")}]`)?.id===this.parentMenu.contentId.current,isModifierKey=e.ctrlKey||e.altKey||e.metaKey,isCharacterKey=e.key.length===1;if(this.rovingFocusGroup.handleKeydown(target2,e)||e.code==="Space")return;const candidateNodes=this.#getCandidateNodes();isKeydownInside&&!isModifierKey&&isCharacterKey&&this.#handleTypeaheadSearch(e.key,candidateNodes),e.target?.id===this.parentMenu.contentId.current&&FIRST_LAST_KEYS$1.includes(e.key)&&(e.preventDefault(),LAST_KEYS$1.includes(e.key)&&candidateNodes.reverse(),
focusFirst(candidateNodes,{select:!1},()=>this.domContext.getActiveElement()))}onblur(e){isElement$1(e.currentTarget)&&isElement$1(e.target)&&(e.currentTarget.contains?.(e.target)||(this.domContext.getWindow().clearTimeout(this.#timer),this.search=""))}onfocus(_){this.parentMenu.root.isUsingKeyboard.current&&afterTick(()=>this.rovingFocusGroup.focusFirstCandidate())}onItemEnter(){return this.#isPointerMovingToSubmenu()}onItemLeave(e){if(e.currentTarget.hasAttribute(this.parentMenu.root.getBitsAttr(
"sub-trigger"))||this.#isPointerMovingToSubmenu()||this.parentMenu.root.isUsingKeyboard.current)return;this.parentMenu.contentNode?.focus(),this.rovingFocusGroup.setCurrentTabStopId("")}onTriggerLeave(){return!!this.#isPointerMovingToSubmenu()}handleInteractOutside(e){if(!isElementOrSVGElement(e.target))return;const triggerId=this.parentMenu.triggerNode?.id;if(e.target.id===triggerId){e.preventDefault();return}if(e.target.closest(`#${triggerId}`)){e.preventDefault();return}this.parentMenu.root.ignoreCloseAutoFocus=
!0,afterTick(()=>{this.parentMenu.root.ignoreCloseAutoFocus=!1})}get shouldRender(){return this.parentMenu.contentPresence.shouldRender}#snippetProps=user_derived(()=>({open:this.parentMenu.opts.open.current}));get snippetProps(){return get$3(this.#snippetProps)}set snippetProps(value){set$1(this.#snippetProps,value)}#props=user_derived(()=>({id:this.opts.id.current,role:"menu","aria-orientation":"vertical",[this.parentMenu.root.getBitsAttr("content")]:"","data-state":getDataOpenClosed(this.parentMenu.
opts.open.current),...getDataTransitionAttrs(this.parentMenu.contentPresence.transitionStatus),onkeydown:this.onkeydown,onblur:this.onblur,onfocus:this.onfocus,dir:this.parentMenu.root.opts.dir.current,style:{pointerEvents:"auto",contain:"layout style"},...this.attachment}));get props(){return get$3(this.#props)}set props(value){set$1(this.#props,value)}popperProps={onCloseAutoFocus:e=>this.onCloseAutoFocus(e)}}class MenuItemSharedState{opts;content;attachment;#isFocused=state$1(!1);constructor(opts,content2){
this.opts=opts,this.content=content2,this.attachment=attachRef(this.opts.ref),this.onpointermove=this.onpointermove.bind(this),this.onpointerleave=this.onpointerleave.bind(this),this.onfocus=this.onfocus.bind(this),this.onblur=this.onblur.bind(this)}onpointermove(e){if(!e.defaultPrevented&&isMouseEvent(e))if(this.opts.disabled.current)this.content.onItemLeave(e);else{if(this.content.onItemEnter())return;const item=e.currentTarget;if(!isHTMLElement$1(item))return;item.focus()}}onpointerleave(e){e.
defaultPrevented||isMouseEvent(e)&&this.content.onItemLeave(e)}onfocus(e){afterTick(()=>{e.defaultPrevented||this.opts.disabled.current||set$1(this.#isFocused,!0)})}onblur(e){afterTick(()=>{e.defaultPrevented||set$1(this.#isFocused,!1)})}#props=user_derived(()=>({id:this.opts.id.current,tabindex:-1,role:"menuitem","aria-disabled":boolToStr(this.opts.disabled.current),"data-disabled":boolToEmptyStrOrUndef(this.opts.disabled.current),"data-highlighted":get$3(this.#isFocused)?"":void 0,[this.content.
parentMenu.root.getBitsAttr("item")]:"",onpointermove:this.onpointermove,onpointerleave:this.onpointerleave,onfocus:this.onfocus,onblur:this.onblur,...this.attachment}));get props(){return get$3(this.#props)}set props(value){set$1(this.#props,value)}}class MenuItemState{static create(opts){const item=new MenuItemSharedState(opts,MenuContentContext.get());return new MenuItemState(opts,item)}opts;item;root;#isPointerDown=!1;constructor(opts,item){this.opts=opts,this.item=item,this.root=item.content.
parentMenu.root,this.onkeydown=this.onkeydown.bind(this),this.onclick=this.onclick.bind(this),this.onpointerdown=this.onpointerdown.bind(this),this.onpointerup=this.onpointerup.bind(this)}#handleSelect(){if(this.item.opts.disabled.current)return;const selectEvent=new CustomEvent("menuitemselect",{bubbles:!0,cancelable:!0});if(this.opts.onSelect.current(selectEvent),selectEvent.defaultPrevented){this.item.content.parentMenu.root.isUsingKeyboard.current=!1;return}this.opts.closeOnSelect.current&&this.
item.content.parentMenu.root.opts.onClose()}onkeydown(e){const isTypingAhead=this.item.content.search!=="";if(!(this.item.opts.disabled.current||isTypingAhead&&e.key===SPACE)&&SELECTION_KEYS.includes(e.key)){if(!isHTMLElement$1(e.currentTarget))return;e.currentTarget.click(),e.preventDefault()}}onclick(_){this.item.opts.disabled.current||this.#handleSelect()}onpointerup(e){if(!e.defaultPrevented&&!this.#isPointerDown){if(!isHTMLElement$1(e.currentTarget))return;e.currentTarget?.click()}}onpointerdown(_){
this.#isPointerDown=!0}#props=user_derived(()=>mergeProps(this.item.props,{onclick:this.onclick,onpointerdown:this.onpointerdown,onpointerup:this.onpointerup,onkeydown:this.onkeydown}));get props(){return get$3(this.#props)}set props(value){set$1(this.#props,value)}}class MenuSubTriggerState{static create(opts){const content2=MenuContentContext.get(),item=new MenuItemSharedState(opts,content2),submenu=MenuMenuContext.get();return new MenuSubTriggerState(opts,item,content2,submenu)}opts;item;content;submenu;attachment;#openTimer=null;constructor(opts,item,content2,submenu){
this.opts=opts,this.item=item,this.content=content2,this.submenu=submenu,this.attachment=attachRef(this.opts.ref,v=>this.submenu.triggerNode=v),this.onpointerleave=this.onpointerleave.bind(this),this.onpointermove=this.onpointermove.bind(this),this.onkeydown=this.onkeydown.bind(this),this.onclick=this.onclick.bind(this),onDestroyEffect(()=>{this.#clearOpenTimer()})}#clearOpenTimer(){this.#openTimer!==null&&(this.content.domContext.getWindow().clearTimeout(this.#openTimer),this.#openTimer=null)}onpointermove(e){
if(isMouseEvent(e)){if(this.submenu.root.isPointerInTransit){this.#openTimer!==null&&this.#clearOpenTimer();return}if(!this.item.opts.disabled.current&&!this.submenu.opts.open.current&&!this.#openTimer){const openDelay=this.opts.openDelay.current;if(openDelay<=0){this.submenu.onOpen();return}this.#openTimer=this.content.domContext.setTimeout(()=>{if(this.submenu.root.isPointerInTransit){this.#clearOpenTimer();return}this.submenu.onOpen(),this.#clearOpenTimer()},openDelay)}}}onpointerleave(e){isMouseEvent(
e)&&this.#clearOpenTimer()}onkeydown(e){const isTypingAhead=this.content.search!=="";this.item.opts.disabled.current||isTypingAhead&&e.key===SPACE||SUB_OPEN_KEYS[this.submenu.root.opts.dir.current].includes(e.key)&&(e.currentTarget.click(),e.preventDefault())}onclick(e){if(this.item.opts.disabled.current||!isHTMLElement$1(e.currentTarget))return;e.currentTarget.focus();const selectEvent=new CustomEvent("menusubtriggerselect",{bubbles:!0,cancelable:!0});this.opts.onSelect.current(selectEvent),this.
submenu.opts.open.current||(this.submenu.onOpen(),afterTick(()=>{const contentNode=this.submenu.contentNode;contentNode&&MenuOpenEvent.dispatch(contentNode)}))}#props=user_derived(()=>mergeProps({"aria-haspopup":"menu","aria-expanded":boolToStr(this.submenu.opts.open.current),"data-state":getDataOpenClosed(this.submenu.opts.open.current),"aria-controls":this.submenu.opts.open.current?this.submenu.contentId.current:void 0,[this.submenu.root.getBitsAttr("sub-trigger")]:"",onclick:this.onclick,onpointermove:this.
onpointermove,onpointerleave:this.onpointerleave,onkeydown:this.onkeydown,...this.attachment},this.item.props));get props(){return get$3(this.#props)}set props(value){set$1(this.#props,value)}}class MenuSeparatorState{static create(opts){return new MenuSeparatorState(opts,MenuRootContext.get())}opts;root;attachment;constructor(opts,root2){this.opts=opts,this.root=root2,this.attachment=attachRef(this.opts.ref)}#props=user_derived(()=>({id:this.opts.id.current,role:"group",[this.root.getBitsAttr("\
separator")]:"",...this.attachment}));get props(){return get$3(this.#props)}set props(value){set$1(this.#props,value)}}class DropdownMenuTriggerState{static create(opts){return new DropdownMenuTriggerState(opts,MenuMenuContext.get())}opts;parentMenu;attachment;constructor(opts,parentMenu){this.opts=opts,this.parentMenu=parentMenu,this.attachment=attachRef(this.opts.ref,v=>this.parentMenu.triggerNode=v)}onclick=e=>{this.opts.disabled.current||e.detail!==0||(this.parentMenu.toggleOpen(),e.preventDefault())};onpointerdown=e=>{
if(!this.opts.disabled.current){if(e.pointerType==="touch")return e.preventDefault();e.button===0&&e.ctrlKey===!1&&(this.parentMenu.toggleOpen(),this.parentMenu.opts.open.current||e.preventDefault())}};onpointerup=e=>{this.opts.disabled.current||e.pointerType==="touch"&&(e.preventDefault(),this.parentMenu.toggleOpen())};onkeydown=e=>{if(!this.opts.disabled.current){if(e.key===SPACE||e.key===ENTER){this.parentMenu.toggleOpen(),e.preventDefault();return}e.key===ARROW_DOWN&&(this.parentMenu.onOpen(),
e.preventDefault())}};#ariaControls=user_derived(()=>{if(this.parentMenu.opts.open.current&&this.parentMenu.contentId.current)return this.parentMenu.contentId.current});#props=user_derived(()=>({id:this.opts.id.current,disabled:this.opts.disabled.current,"aria-haspopup":"menu","aria-expanded":boolToStr(this.parentMenu.opts.open.current),"aria-controls":get$3(this.#ariaControls),"data-disabled":boolToEmptyStrOrUndef(this.opts.disabled.current),"data-state":getDataOpenClosed(this.parentMenu.opts.open.
current),[this.parentMenu.root.getBitsAttr("trigger")]:"",onclick:this.onclick,onpointerdown:this.onpointerdown,onpointerup:this.onpointerup,onkeydown:this.onkeydown,...this.attachment}));get props(){return get$3(this.#props)}set props(value){set$1(this.#props,value)}}class MenuSubmenuState{static create(opts){const menu=MenuMenuContext.get();return MenuMenuContext.set(new MenuMenuState(opts,menu.root,menu))}}globalThis.bitsDismissableLayers??=new Map;class DismissibleLayerState{static create(opts){
return new DismissibleLayerState(opts)}opts;#interactOutsideProp;#behaviorType;#interceptedEvents={pointerdown:!1};#isResponsibleLayer=!1;#isFocusInsideDOMTree=!1;#documentObj=void 0;#onFocusOutside;#unsubClickListener=noop$1;constructor(opts){this.opts=opts,this.#behaviorType=opts.interactOutsideBehavior,this.#interactOutsideProp=opts.onInteractOutside,this.#onFocusOutside=opts.onFocusOutside,user_effect(()=>{this.#documentObj=getOwnerDocument(this.opts.ref.current)});let unsubEvents=noop$1;const cleanup=()=>{
this.#resetState(),globalThis.bitsDismissableLayers.delete(this),this.#handleInteractOutside.destroy(),unsubEvents()};watch$1([()=>this.opts.enabled.current,()=>this.opts.ref.current],()=>{if(!(!this.opts.enabled.current||!this.opts.ref.current))return afterSleep(1,()=>{this.opts.ref.current&&(globalThis.bitsDismissableLayers.set(this,this.#behaviorType),unsubEvents(),unsubEvents=this.#addEventListeners())}),cleanup}),onDestroyEffect(()=>{this.#resetState.destroy(),globalThis.bitsDismissableLayers.
delete(this),this.#handleInteractOutside.destroy(),this.#unsubClickListener(),unsubEvents()})}#handleFocus=event2=>{event2.defaultPrevented||this.opts.ref.current&&afterTick(()=>{!this.opts.ref.current||this.#isTargetWithinLayer(event2.target)||event2.target&&!this.#isFocusInsideDOMTree&&this.#onFocusOutside.current?.(event2)})};#addEventListeners(){return executeCallbacks(on(this.#documentObj,"pointerdown",executeCallbacks(this.#markInterceptedEvent,this.#markResponsibleLayer),{capture:!0}),on(
this.#documentObj,"pointerdown",executeCallbacks(this.#markNonInterceptedEvent,this.#handleInteractOutside)),on(this.#documentObj,"focusin",this.#handleFocus))}#handleDismiss=e=>{let event2=e;event2.defaultPrevented&&(event2=createWrappedEvent(e)),this.#interactOutsideProp.current(e)};#handleInteractOutside=debounce$1(e=>{if(!this.opts.ref.current){this.#unsubClickListener();return}const isEventValid=this.opts.isValidEvent.current(e,this.opts.ref.current)||isValidEvent(e,this.opts.ref.current);if(!this.#isResponsibleLayer||
this.#isAnyEventIntercepted()||!isEventValid){this.#unsubClickListener();return}let event2=e;if(event2.defaultPrevented&&(event2=createWrappedEvent(event2)),this.#behaviorType.current!=="close"&&this.#behaviorType.current!=="defer-otherwise-close"){this.#unsubClickListener();return}e.pointerType==="touch"?(this.#unsubClickListener(),this.#unsubClickListener=on(this.#documentObj,"click",this.#handleDismiss,{once:!0})):this.#interactOutsideProp.current(event2)},10);#markInterceptedEvent=e=>{this.#interceptedEvents[e.
type]=!0};#markNonInterceptedEvent=e=>{this.#interceptedEvents[e.type]=!1};#markResponsibleLayer=()=>{this.opts.ref.current&&(this.#isResponsibleLayer=isResponsibleLayer(this.opts.ref.current))};#isTargetWithinLayer=target2=>this.opts.ref.current?isOrContainsTarget(this.opts.ref.current,target2):!1;#resetState=debounce$1(()=>{for(const eventType in this.#interceptedEvents)this.#interceptedEvents[eventType]=!1;this.#isResponsibleLayer=!1},20);#isAnyEventIntercepted(){return Object.values(this.#interceptedEvents).
some(Boolean)}#onfocuscapture=()=>{this.#isFocusInsideDOMTree=!0};#onblurcapture=()=>{this.#isFocusInsideDOMTree=!1};props={onfocuscapture:this.#onfocuscapture,onblurcapture:this.#onblurcapture}}function getTopMostDismissableLayer(layersArr=[...globalThis.bitsDismissableLayers]){return layersArr.findLast(([_,{current:behaviorType}])=>behaviorType==="close"||behaviorType==="ignore")}function isResponsibleLayer(node2){const layersArr=[...globalThis.bitsDismissableLayers],topMostLayer=getTopMostDismissableLayer(
layersArr);if(topMostLayer)return topMostLayer[0].opts.ref.current===node2;const[firstLayerNode]=layersArr[0];return firstLayerNode.opts.ref.current===node2}function isValidEvent(e,node2){const target2=e.target;if(!isElementOrSVGElement(target2))return!1;const targetIsContextMenuTrigger=!!target2.closest(`[${CONTEXT_MENU_TRIGGER_ATTR}]`),nodeIsContextMenu=!!node2.closest(`[${CONTEXT_MENU_CONTENT_ATTR}]`);return"button"in e&&e.button>0&&!targetIsContextMenuTrigger?!1:"button"in e&&e.button===0&&targetIsContextMenuTrigger&&
nodeIsContextMenu?!0:targetIsContextMenuTrigger&&nodeIsContextMenu?!1:getOwnerDocument(target2).documentElement.contains(target2)&&!isOrContainsTarget(node2,target2)&&isClickTrulyOutside(e,node2)}function createWrappedEvent(e){const capturedCurrentTarget=e.currentTarget,capturedTarget=e.target;let newEvent;e instanceof PointerEvent?newEvent=new PointerEvent(e.type,e):newEvent=new PointerEvent("pointerdown",e);let isPrevented=!1;return new Proxy(newEvent,{get:(target2,prop2)=>prop2==="currentTarg\
et"?capturedCurrentTarget:prop2==="target"?capturedTarget:prop2==="preventDefault"?()=>{isPrevented=!0,typeof target2.preventDefault=="function"&&target2.preventDefault()}:prop2==="defaultPrevented"?isPrevented:prop2 in target2?target2[prop2]:e[prop2]})}function Dismissible_layer($$anchor,$$props){push$1($$props,!0);let interactOutsideBehavior=prop($$props,"interactOutsideBehavior",3,"close"),onInteractOutside=prop($$props,"onInteractOutside",3,noop$1),onFocusOutside=prop($$props,"onFocusOutside",
3,noop$1),isValidEvent2=prop($$props,"isValidEvent",3,()=>!1);const dismissibleLayerState=DismissibleLayerState.create({id:boxWith$1(()=>$$props.id),interactOutsideBehavior:boxWith$1(()=>interactOutsideBehavior()),onInteractOutside:boxWith$1(()=>onInteractOutside()),enabled:boxWith$1(()=>$$props.enabled),onFocusOutside:boxWith$1(()=>onFocusOutside()),isValidEvent:boxWith$1(()=>isValidEvent2()),ref:$$props.ref});var fragment=comment$2(),node2=first_child(fragment);snippet(node2,()=>$$props.children??
noop$3,()=>({props:dismissibleLayerState.props})),append($$anchor,fragment),pop()}globalThis.bitsEscapeLayers??=new Map;class EscapeLayerState{static create(opts){return new EscapeLayerState(opts)}opts;domContext;constructor(opts){this.opts=opts,this.domContext=new DOMContext(this.opts.ref);let unsubEvents=noop$1;watch$1(()=>opts.enabled.current,enabled=>(enabled&&(globalThis.bitsEscapeLayers.set(this,opts.escapeKeydownBehavior),unsubEvents=this.#addEventListener()),()=>{unsubEvents(),globalThis.
bitsEscapeLayers.delete(this)}))}#addEventListener=()=>on(this.domContext.getDocument(),"keydown",this.#onkeydown,{passive:!1});#onkeydown=e=>{if(e.key!==ESCAPE||!isResponsibleEscapeLayer(this))return;const clonedEvent=new KeyboardEvent(e.type,e);e.preventDefault();const behaviorType=this.opts.escapeKeydownBehavior.current;behaviorType!=="close"&&behaviorType!=="defer-otherwise-close"||this.opts.onEscapeKeydown.current(clonedEvent)}}function isResponsibleEscapeLayer(instance){const layersArr=[...globalThis.
bitsEscapeLayers],topMostLayer=layersArr.findLast(([_,{current:behaviorType}])=>behaviorType==="close"||behaviorType==="ignore");if(topMostLayer)return topMostLayer[0]===instance;const[firstLayerNode]=layersArr[0];return firstLayerNode===instance}function Escape_layer($$anchor,$$props){push$1($$props,!0);let escapeKeydownBehavior=prop($$props,"escapeKeydownBehavior",3,"close"),onEscapeKeydown=prop($$props,"onEscapeKeydown",3,noop$1);EscapeLayerState.create({escapeKeydownBehavior:boxWith$1(()=>escapeKeydownBehavior()),
onEscapeKeydown:boxWith$1(()=>onEscapeKeydown()),enabled:boxWith$1(()=>$$props.enabled),ref:$$props.ref});var fragment=comment$2(),node2=first_child(fragment);snippet(node2,()=>$$props.children??noop$3),append($$anchor,fragment),pop()}class FocusScopeManager{static instance;#scopeStack=simpleBox([]);#focusHistory=new WeakMap;#preFocusHistory=new WeakMap;static getInstance(){return this.instance||(this.instance=new FocusScopeManager),this.instance}register(scope2){const current2=this.getActive();
current2&&current2!==scope2&&current2.pause();const activeElement=document.activeElement;activeElement&&activeElement!==document.body&&this.#preFocusHistory.set(scope2,activeElement),this.#scopeStack.current=this.#scopeStack.current.filter(s2=>s2!==scope2),this.#scopeStack.current.unshift(scope2)}unregister(scope2){this.#scopeStack.current=this.#scopeStack.current.filter(s2=>s2!==scope2);const next2=this.getActive();next2&&next2.resume()}getActive(){return this.#scopeStack.current[0]}setFocusMemory(scope2,element2){
this.#focusHistory.set(scope2,element2)}getFocusMemory(scope2){return this.#focusHistory.get(scope2)}isActiveScope(scope2){return this.getActive()===scope2}setPreFocusMemory(scope2,element2){this.#preFocusHistory.set(scope2,element2)}getPreFocusMemory(scope2){return this.#preFocusHistory.get(scope2)}clearPreFocusMemory(scope2){this.#preFocusHistory.delete(scope2)}}class FocusScope{#paused=!1;#container=null;#manager=FocusScopeManager.getInstance();#cleanupFns=[];#opts;constructor(opts){this.#opts=
opts}get paused(){return this.#paused}pause(){this.#paused=!0}resume(){this.#paused=!1}#cleanup(){for(const fn of this.#cleanupFns)fn();this.#cleanupFns=[]}mount(container2){this.#container&&this.unmount(),this.#container=container2,this.#manager.register(this),this.#setupEventListeners(),this.#handleOpenAutoFocus()}unmount(){this.#container&&(this.#cleanup(),this.#handleCloseAutoFocus(),this.#manager.unregister(this),this.#manager.clearPreFocusMemory(this),this.#container=null)}#handleOpenAutoFocus(){
if(!this.#container)return;const event2=new CustomEvent("focusScope.onOpenAutoFocus",{bubbles:!1,cancelable:!0});this.#opts.onOpenAutoFocus.current(event2),event2.defaultPrevented||requestAnimationFrame(()=>{if(!this.#container)return;const firstTabbable=this.#getFirstTabbable();firstTabbable?(firstTabbable.focus(),this.#manager.setFocusMemory(this,firstTabbable)):this.#container.focus()})}#handleCloseAutoFocus(){const event2=new CustomEvent("focusScope.onCloseAutoFocus",{bubbles:!1,cancelable:!0});
if(this.#opts.onCloseAutoFocus.current?.(event2),!event2.defaultPrevented){const preFocusedElement=this.#manager.getPreFocusMemory(this);if(preFocusedElement&&document.contains(preFocusedElement))try{preFocusedElement.focus()}catch{document.body.focus()}}}#setupEventListeners(){if(!this.#container||!this.#opts.trap.current)return;const container2=this.#container,doc=container2.ownerDocument,handleFocus=e=>{if(this.#paused||!this.#manager.isActiveScope(this))return;const target2=e.target;if(!target2)
return;if(container2.contains(target2))this.#manager.setFocusMemory(this,target2);else{const lastFocused=this.#manager.getFocusMemory(this);if(lastFocused&&container2.contains(lastFocused)&&isFocusable(lastFocused))e.preventDefault(),lastFocused.focus();else{const firstTabbable=this.#getFirstTabbable(),firstFocusable=this.#getAllFocusables()[0];(firstTabbable||firstFocusable||container2).focus()}}},handleKeydown=e=>{if(!this.#opts.loop||this.#paused||e.key!=="Tab"||!this.#manager.isActiveScope(this))
return;const tabbables=this.#getTabbables();if(tabbables.length===0)return;const first=tabbables[0],last=tabbables[tabbables.length-1];!e.shiftKey&&doc.activeElement===last?(e.preventDefault(),first.focus()):e.shiftKey&&doc.activeElement===first&&(e.preventDefault(),last.focus())};this.#cleanupFns.push(on(doc,"focusin",handleFocus,{capture:!0}),on(container2,"keydown",handleKeydown));const observer=new MutationObserver(()=>{const lastFocused=this.#manager.getFocusMemory(this);if(lastFocused&&!container2.
contains(lastFocused)){const firstTabbable=this.#getFirstTabbable(),firstFocusable=this.#getAllFocusables()[0],elementToFocus=firstTabbable||firstFocusable;elementToFocus?(elementToFocus.focus(),this.#manager.setFocusMemory(this,elementToFocus)):container2.focus()}});observer.observe(container2,{childList:!0,subtree:!0}),this.#cleanupFns.push(()=>observer.disconnect())}#getTabbables(){return this.#container?tabbable(this.#container,{includeContainer:!1,getShadowRoot:!0}):[]}#getFirstTabbable(){return this.#getTabbables()[0]||
null}#getAllFocusables(){return this.#container?focusable(this.#container,{includeContainer:!1,getShadowRoot:!0}):[]}static use(opts){let scope2=null;return watch$1([()=>opts.ref.current,()=>opts.enabled.current],([ref2,enabled])=>{ref2&&enabled?(scope2||(scope2=new FocusScope(opts)),scope2.mount(ref2)):scope2&&(scope2.unmount(),scope2=null)}),onDestroyEffect(()=>{scope2?.unmount()}),{get props(){return{tabindex:-1}}}}}function Focus_scope($$anchor,$$props){push$1($$props,!0);let enabled=prop($$props,
"enabled",3,!1),trapFocus=prop($$props,"trapFocus",3,!1),loop2=prop($$props,"loop",3,!1),onCloseAutoFocus=prop($$props,"onCloseAutoFocus",3,noop$1),onOpenAutoFocus=prop($$props,"onOpenAutoFocus",3,noop$1);const focusScopeState=FocusScope.use({enabled:boxWith$1(()=>enabled()),trap:boxWith$1(()=>trapFocus()),loop:loop2(),onCloseAutoFocus:boxWith$1(()=>onCloseAutoFocus()),onOpenAutoFocus:boxWith$1(()=>onOpenAutoFocus()),ref:$$props.ref});var fragment=comment$2(),node2=first_child(fragment);snippet(
node2,()=>$$props.focusScope??noop$3,()=>({props:focusScopeState.props})),append($$anchor,fragment),pop()}globalThis.bitsTextSelectionLayers??=new Map;class TextSelectionLayerState{static create(opts){return new TextSelectionLayerState(opts)}opts;domContext;#unsubSelectionLock=noop$1;constructor(opts){this.opts=opts,this.domContext=new DOMContext(opts.ref);let unsubEvents=noop$1;watch$1(()=>this.opts.enabled.current,isEnabled=>(isEnabled&&(globalThis.bitsTextSelectionLayers.set(this,this.opts.enabled),
unsubEvents(),unsubEvents=this.#addEventListeners()),()=>{unsubEvents(),this.#resetSelectionLock(),globalThis.bitsTextSelectionLayers.delete(this)}))}#addEventListeners(){return executeCallbacks(on(this.domContext.getDocument(),"pointerdown",this.#pointerdown),on(this.domContext.getDocument(),"pointerup",composeHandlers(this.#resetSelectionLock,this.opts.onPointerUp.current)))}#pointerdown=e=>{const node2=this.opts.ref.current,target2=e.target;!isHTMLElement$1(node2)||!isHTMLElement$1(target2)||
!this.opts.enabled.current||!isHighestLayer(this)||!contains$3(node2,target2)||(this.opts.onPointerDown.current(e),!e.defaultPrevented&&(this.#unsubSelectionLock=preventTextSelectionOverflow(node2,this.domContext.getDocument().body)))};#resetSelectionLock=()=>{this.#unsubSelectionLock(),this.#unsubSelectionLock=noop$1}}const getUserSelect=node2=>node2.style.userSelect||node2.style.webkitUserSelect;function preventTextSelectionOverflow(node2,body2){const originalBodyUserSelect=getUserSelect(body2),
originalNodeUserSelect=getUserSelect(node2);return setUserSelect(body2,"none"),setUserSelect(node2,"text"),()=>{setUserSelect(body2,originalBodyUserSelect),setUserSelect(node2,originalNodeUserSelect)}}function setUserSelect(node2,value){node2.style.userSelect=value,node2.style.webkitUserSelect=value}function isHighestLayer(instance){const layersArr=[...globalThis.bitsTextSelectionLayers];if(!layersArr.length)return!1;const highestLayer=layersArr.at(-1);return highestLayer?highestLayer[0]===instance:
!1}function Text_selection_layer($$anchor,$$props){push$1($$props,!0);let preventOverflowTextSelection=prop($$props,"preventOverflowTextSelection",3,!0),onPointerDown=prop($$props,"onPointerDown",3,noop$1),onPointerUp=prop($$props,"onPointerUp",3,noop$1);TextSelectionLayerState.create({id:boxWith$1(()=>$$props.id),onPointerDown:boxWith$1(()=>onPointerDown()),onPointerUp:boxWith$1(()=>onPointerUp()),enabled:boxWith$1(()=>$$props.enabled&&preventOverflowTextSelection()),ref:$$props.ref});var fragment=comment$2(),
node2=first_child(fragment);snippet(node2,()=>$$props.children??noop$3),append($$anchor,fragment),pop()}globalThis.bitsIdCounter??={current:0};function useId(prefix="bits"){return globalThis.bitsIdCounter.current++,`${prefix}-${globalThis.bitsIdCounter.current}`}class SharedState{#factory;#subscribers=0;#state=state$1();#scope;constructor(factory){this.#factory=factory}#dispose(){this.#subscribers-=1,this.#scope&&this.#subscribers<=0&&(this.#scope(),set$1(this.#state,void 0),this.#scope=void 0)}get(...args){
return this.#subscribers+=1,get$3(this.#state)===void 0&&(this.#scope=effect_root(()=>{set$1(this.#state,this.#factory(...args),!0)})),user_effect(()=>()=>{this.#dispose()}),get$3(this.#state)}}const lockMap=new SvelteMap;let initialBodyStyle=state$1(null),stopTouchMoveListener=null,cleanupTimeoutId=null,isInCleanupTransition=!1;const anyLocked=boxWith$1(()=>{for(const value of lockMap.values())if(value)return!0;return!1});let cleanupScheduledAt=null;const bodyLockStackCount=new SharedState(()=>{
function resetBodyStyle(){document.body.setAttribute("style",get$3(initialBodyStyle)??""),document.body.style.removeProperty("--scrollbar-width"),isIOS&&stopTouchMoveListener?.(),set$1(initialBodyStyle,null)}function cancelPendingCleanup(){cleanupTimeoutId!==null&&(window.clearTimeout(cleanupTimeoutId),cleanupTimeoutId=null)}function scheduleCleanupIfNoNewLocks(delay,callback){cancelPendingCleanup(),isInCleanupTransition=!0,cleanupScheduledAt=Date.now();const currentCleanupId=cleanupScheduledAt,
cleanupFn=()=>{cleanupTimeoutId=null,cleanupScheduledAt===currentCleanupId&&(isAnyLocked(lockMap)?isInCleanupTransition=!1:(isInCleanupTransition=!1,callback()))},actualDelay=delay===null?24:delay;cleanupTimeoutId=window.setTimeout(cleanupFn,actualDelay)}function ensureInitialStyleCaptured(){get$3(initialBodyStyle)===null&&lockMap.size===0&&!isInCleanupTransition&&set$1(initialBodyStyle,document.body.getAttribute("style"),!0)}return watch$1(()=>anyLocked.current,()=>{if(!anyLocked.current)return;
ensureInitialStyleCaptured(),isInCleanupTransition=!1;const htmlStyle=getComputedStyle(document.documentElement),bodyStyle=getComputedStyle(document.body),hasStableGutter=htmlStyle.scrollbarGutter?.includes("stable")||bodyStyle.scrollbarGutter?.includes("stable"),verticalScrollbarWidth=window.innerWidth-document.documentElement.clientWidth,config2={padding:Number.parseInt(bodyStyle.paddingRight??"0",10)+verticalScrollbarWidth,margin:Number.parseInt(bodyStyle.marginRight??"0",10)};verticalScrollbarWidth>
0&&!hasStableGutter&&(document.body.style.paddingRight=`${config2.padding}px`,document.body.style.marginRight=`${config2.margin}px`,document.body.style.setProperty("--scrollbar-width",`${verticalScrollbarWidth}px`)),document.body.style.overflow="hidden",isIOS&&(stopTouchMoveListener=on(document,"touchmove",e=>{e.target===document.documentElement&&(e.touches.length>1||e.preventDefault())},{passive:!1})),afterTick(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})}),
onDestroyEffect(()=>()=>{stopTouchMoveListener?.()}),{get lockMap(){return lockMap},resetBodyStyle,scheduleCleanupIfNoNewLocks,cancelPendingCleanup,ensureInitialStyleCaptured}});class BodyScrollLock{#id=useId();#initialState;#restoreScrollDelay=()=>null;#countState;locked;constructor(initialState,restoreScrollDelay=()=>null){this.#initialState=initialState,this.#restoreScrollDelay=restoreScrollDelay,this.#countState=bodyLockStackCount.get(),this.#countState&&(this.#countState.cancelPendingCleanup(),
this.#countState.ensureInitialStyleCaptured(),this.#countState.lockMap.set(this.#id,this.#initialState??!1),this.locked=boxWith$1(()=>this.#countState.lockMap.get(this.#id)??!1,v=>this.#countState.lockMap.set(this.#id,v)),onDestroyEffect(()=>{if(this.#countState.lockMap.delete(this.#id),isAnyLocked(this.#countState.lockMap))return;const restoreScrollDelay2=this.#restoreScrollDelay();this.#countState.scheduleCleanupIfNoNewLocks(restoreScrollDelay2,()=>{this.#countState.resetBodyStyle()})}))}}function isAnyLocked(map2){
for(const[_,value]of map2)if(value)return!0;return!1}function Scroll_lock($$anchor,$$props){push$1($$props,!0);let preventScroll=prop($$props,"preventScroll",3,!0),restoreScrollDelay=prop($$props,"restoreScrollDelay",3,null);preventScroll()&&new BodyScrollLock(preventScroll(),()=>restoreScrollDelay()),pop()}var root_6$y=from_html("<!> <!>",1),root_8$A=from_html("<!> <div><!></div>",1);function Alert_dialog_content$1($$anchor,$$props){const uid2=props_id();push$1($$props,!0);let id2=prop($$props,
"id",19,()=>createId(uid2)),ref2=prop($$props,"ref",15,null),forceMount=prop($$props,"forceMount",3,!1),interactOutsideBehavior=prop($$props,"interactOutsideBehavior",3,"ignore"),onCloseAutoFocus=prop($$props,"onCloseAutoFocus",3,noop$1),onEscapeKeydown=prop($$props,"onEscapeKeydown",3,noop$1),onOpenAutoFocus=prop($$props,"onOpenAutoFocus",3,noop$1),onInteractOutside=prop($$props,"onInteractOutside",3,noop$1),preventScroll=prop($$props,"preventScroll",3,!0),trapFocus=prop($$props,"trapFocus",3,!0),
restoreScrollDelay=prop($$props,"restoreScrollDelay",3,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","id","children","child","ref","forceMount","interactOutsideBehavior","onCloseAutoFocus","onEscapeKeydown","onOpenAutoFocus","onInteractOutside","preventScroll","trapFocus","restoreScrollDelay"]);const contentState=DialogContentState.create({id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v))}),mergedProps=user_derived(()=>mergeProps(restProps,contentState.props));var fragment=comment$2(),
node2=first_child(fragment);{var consequent_2=$$anchor2=>{Focus_scope($$anchor2,{get ref(){return contentState.opts.ref},loop:!0,get trapFocus(){return trapFocus()},get enabled(){return contentState.root.opts.open.current},get onCloseAutoFocus(){return onCloseAutoFocus()},onOpenAutoFocus:e=>{onOpenAutoFocus()(e),!e.defaultPrevented&&(e.preventDefault(),afterSleep(0,()=>contentState.opts.ref.current?.focus()))},focusScope:($$anchor3,$$arg0)=>{let focusScopeProps=()=>$$arg0?.().props;Escape_layer(
$$anchor3,spread_props(()=>get$3(mergedProps),{get enabled(){return contentState.root.opts.open.current},get ref(){return contentState.opts.ref},onEscapeKeydown:e=>{onEscapeKeydown()(e),!e.defaultPrevented&&contentState.root.handleClose()},children:($$anchor4,$$slotProps)=>{Dismissible_layer($$anchor4,spread_props(()=>get$3(mergedProps),{get ref(){return contentState.opts.ref},get enabled(){return contentState.root.opts.open.current},get interactOutsideBehavior(){return interactOutsideBehavior()},
onInteractOutside:e=>{onInteractOutside()(e),!e.defaultPrevented&&contentState.root.handleClose()},children:($$anchor5,$$slotProps2)=>{Text_selection_layer($$anchor5,spread_props(()=>get$3(mergedProps),{get ref(){return contentState.opts.ref},get enabled(){return contentState.root.opts.open.current},children:($$anchor6,$$slotProps3)=>{var fragment_5=comment$2(),node_1=first_child(fragment_5);{var consequent_1=$$anchor7=>{var fragment_6=root_6$y(),node_2=first_child(fragment_6);{var consequent=$$anchor8=>{
Scroll_lock($$anchor8,{get preventScroll(){return preventScroll()},get restoreScrollDelay(){return restoreScrollDelay()}})};if_block(node_2,$$render=>{contentState.root.opts.open.current&&$$render(consequent)})}var node_3=sibling(node_2,2);{let $0=user_derived(()=>({props:mergeProps(get$3(mergedProps),focusScopeProps()),...contentState.snippetProps}));snippet(node_3,()=>$$props.child,()=>get$3($0))}append($$anchor7,fragment_6)},alternate=$$anchor7=>{var fragment_8=root_8$A(),node_4=first_child(fragment_8);
Scroll_lock(node_4,{get preventScroll(){return preventScroll()}});var div=sibling(node_4,2);attribute_effect(div,$0=>({...$0}),[()=>mergeProps(get$3(mergedProps),focusScopeProps())]);var node_5=child(div);snippet(node_5,()=>$$props.children??noop$3),reset(div),append($$anchor7,fragment_8)};if_block(node_1,$$render=>{$$props.child?$$render(consequent_1):$$render(alternate,-1)})}append($$anchor6,fragment_5)},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{focusScope:!0}})};
if_block(node2,$$render=>{(contentState.shouldRender||forceMount())&&$$render(consequent_2)})}append($$anchor,fragment),pop()}var root_3$15=from_html("<div><!></div>");function Dialog_overlay$1($$anchor,$$props){const uid2=props_id();push$1($$props,!0);let id2=prop($$props,"id",19,()=>createId(uid2)),forceMount=prop($$props,"forceMount",3,!1),ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","id","forceMount","child","children","ref"]);const overlayState=DialogOverlayState.
create({id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v))}),mergedProps=user_derived(()=>mergeProps(restProps,overlayState.props));var fragment=comment$2(),node2=first_child(fragment);{var consequent_1=$$anchor2=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);{var consequent=$$anchor3=>{var fragment_2=comment$2(),node_2=first_child(fragment_2);{let $0=user_derived(()=>({props:mergeProps(get$3(mergedProps)),...overlayState.snippetProps}));snippet(node_2,()=>$$props.child,()=>get$3(
$0))}append($$anchor3,fragment_2)},alternate=$$anchor3=>{var div=root_3$15();attribute_effect(div,$0=>({...$0}),[()=>mergeProps(get$3(mergedProps))]);var node_3=child(div);snippet(node_3,()=>$$props.children??noop$3,()=>overlayState.snippetProps),reset(div),append($$anchor3,div)};if_block(node_1,$$render=>{$$props.child?$$render(consequent):$$render(alternate,-1)})}append($$anchor2,fragment_1)};if_block(node2,$$render=>{(overlayState.shouldRender||forceMount())&&$$render(consequent_1)})}append($$anchor,
fragment),pop()}var root_2$1A=from_html("<div><!></div>");function Dialog_description$1($$anchor,$$props){const uid2=props_id();push$1($$props,!0);let id2=prop($$props,"id",19,()=>createId(uid2)),ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","id","children","child","ref"]);const descriptionState=DialogDescriptionState.create({id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v))}),mergedProps=user_derived(()=>mergeProps(restProps,descriptionState.
props));var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);snippet(node_1,()=>$$props.child,()=>({props:get$3(mergedProps)})),append($$anchor2,fragment_1)},alternate=$$anchor2=>{var div=root_2$1A();attribute_effect(div,()=>({...get$3(mergedProps)}));var node_2=child(div);snippet(node_2,()=>$$props.children??noop$3),reset(div),append($$anchor2,div)};if_block(node2,$$render=>{$$props.child?$$render(consequent):
$$render(alternate,-1)})}append($$anchor,fragment),pop()}const checkboxAttrs=createBitsAttrs({component:"checkbox",parts:["root","group","group-label","input"]}),CheckboxGroupContext=new Context$1("Checkbox.Group"),CheckboxRootContext=new Context$1("Checkbox.Root");class CheckboxRootState{static create(opts,group=null){return CheckboxRootContext.set(new CheckboxRootState(opts,group))}opts;group;#trueName=user_derived(()=>this.group&&this.group.opts.name.current?this.group.opts.name.current:this.
opts.name.current);get trueName(){return get$3(this.#trueName)}set trueName(value){set$1(this.#trueName,value)}#trueRequired=user_derived(()=>this.group&&this.group.opts.required.current?!0:this.opts.required.current);get trueRequired(){return get$3(this.#trueRequired)}set trueRequired(value){set$1(this.#trueRequired,value)}#trueDisabled=user_derived(()=>this.group&&this.group.opts.disabled.current?!0:this.opts.disabled.current);get trueDisabled(){return get$3(this.#trueDisabled)}set trueDisabled(value){
set$1(this.#trueDisabled,value)}#trueReadonly=user_derived(()=>this.group&&this.group.opts.readonly.current?!0:this.opts.readonly.current);get trueReadonly(){return get$3(this.#trueReadonly)}set trueReadonly(value){set$1(this.#trueReadonly,value)}attachment;constructor(opts,group){this.opts=opts,this.group=group,this.attachment=attachRef(this.opts.ref),this.onkeydown=this.onkeydown.bind(this),this.onclick=this.onclick.bind(this),watch$1.pre([()=>snapshot(this.group?.opts.value.current),()=>this.
opts.value.current],([groupValue,value])=>{!groupValue||!value||(this.opts.checked.current=groupValue.includes(value))}),watch$1.pre(()=>this.opts.checked.current,checked=>{this.group&&(checked?this.group?.addValue(this.opts.value.current):this.group?.removeValue(this.opts.value.current))})}onkeydown(e){if(!(this.trueDisabled||this.trueReadonly)){if(e.key===ENTER){e.preventDefault(),this.opts.type.current==="submit"&&e.currentTarget.closest("form")?.requestSubmit();return}e.key===SPACE&&(e.preventDefault(),
this.#toggle())}}#toggle(){this.opts.indeterminate.current?(this.opts.indeterminate.current=!1,this.opts.checked.current=!0):this.opts.checked.current=!this.opts.checked.current}onclick(e){if(!(this.trueDisabled||this.trueReadonly)){if(this.opts.type.current==="submit"){this.#toggle();return}e.preventDefault(),this.#toggle()}}#snippetProps=user_derived(()=>({checked:this.opts.checked.current,indeterminate:this.opts.indeterminate.current}));get snippetProps(){return get$3(this.#snippetProps)}set snippetProps(value){
set$1(this.#snippetProps,value)}#props=user_derived(()=>({id:this.opts.id.current,role:"checkbox",type:this.opts.type.current,disabled:this.trueDisabled,"aria-checked":getAriaChecked(this.opts.checked.current,this.opts.indeterminate.current),"aria-required":boolToStr(this.trueRequired),"aria-readonly":boolToStr(this.trueReadonly),"data-disabled":boolToEmptyStrOrUndef(this.trueDisabled),"data-readonly":boolToEmptyStrOrUndef(this.trueReadonly),"data-state":getCheckboxDataState(this.opts.checked.current,
this.opts.indeterminate.current),[checkboxAttrs.root]:"",onclick:this.onclick,onkeydown:this.onkeydown,...this.attachment}));get props(){return get$3(this.#props)}set props(value){set$1(this.#props,value)}}class CheckboxInputState{static create(){return new CheckboxInputState(CheckboxRootContext.get())}root;#trueChecked=user_derived(()=>this.root.group?!!(this.root.opts.value.current!==void 0&&this.root.group.opts.value.current.includes(this.root.opts.value.current)):this.root.opts.checked.current);get trueChecked(){
return get$3(this.#trueChecked)}set trueChecked(value){set$1(this.#trueChecked,value)}#shouldRender=user_derived(()=>!!this.root.trueName);get shouldRender(){return get$3(this.#shouldRender)}set shouldRender(value){set$1(this.#shouldRender,value)}constructor(root2){this.root=root2,this.onfocus=this.onfocus.bind(this)}onfocus(_){isHTMLElement$1(this.root.opts.ref.current)&&this.root.opts.ref.current.focus()}#props=user_derived(()=>({type:"checkbox",checked:this.root.opts.checked.current===!0,disabled:this.
root.trueDisabled,required:this.root.trueRequired,name:this.root.trueName,value:this.root.opts.value.current,readonly:this.root.trueReadonly,onfocus:this.onfocus}));get props(){return get$3(this.#props)}set props(value){set$1(this.#props,value)}}function getCheckboxDataState(checked,indeterminate){return indeterminate?"indeterminate":checked?"checked":"unchecked"}enable_legacy_mode_flag();var root_1$1d=from_html("<input/>"),root_2$1z=from_html("<input/>");function Hidden_input($$anchor,$$props){
push$1($$props,!0);let value=prop($$props,"value",15),restProps=rest_props($$props,["$$slots","$$events","$$legacy","value"]);const mergedProps=user_derived(()=>mergeProps(restProps,{"aria-hidden":"true",tabindex:-1,style:{...srOnlyStyles$1,position:"absolute",top:"0",left:"0"}}));var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{var input=root_1$1d();attribute_effect(input,()=>({...get$3(mergedProps),value:value()}),void 0,void 0,void 0,void 0,!0),append($$anchor2,
input)},alternate=$$anchor2=>{var input_1=root_2$1z();attribute_effect(input_1,()=>({...get$3(mergedProps)}),void 0,void 0,void 0,void 0,!0),bind_value(input_1,value),append($$anchor2,input_1)};if_block(node2,$$render=>{get$3(mergedProps).type==="checkbox"?$$render(consequent):$$render(alternate,-1)})}append($$anchor,fragment),pop()}function Checkbox_input($$anchor,$$props){push$1($$props,!1);const inputState=CheckboxInputState.create();init();var fragment=comment$2(),node2=first_child(fragment);
{var consequent=$$anchor2=>{Hidden_input($$anchor2,spread_props(()=>inputState.props))};if_block(node2,$$render=>{inputState.shouldRender&&$$render(consequent)})}append($$anchor,fragment),pop()}var root_2$1y=from_html("<button><!></button>"),root$1_=from_html("<!> <!>",1);function Checkbox$1($$anchor,$$props){const uid2=props_id();push$1($$props,!0);let checked=prop($$props,"checked",15,!1),ref2=prop($$props,"ref",15,null),disabled=prop($$props,"disabled",3,!1),required2=prop($$props,"required",
3,!1),name=prop($$props,"name",3,void 0),value=prop($$props,"value",3,"on"),id2=prop($$props,"id",19,()=>createId(uid2)),indeterminate=prop($$props,"indeterminate",15,!1),type2=prop($$props,"type",3,"button"),restProps=rest_props($$props,["$$slots","$$events","$$legacy","checked","ref","onCheckedChange","children","disabled","required","name","value","id","indeterminate","onIndeterminateChange","child","type","readonly"]);const group=CheckboxGroupContext.getOr(null);group&&value()&&(group.opts.value.
current.includes(value())?checked(!0):checked(!1)),watch$1.pre(()=>value(),()=>{group&&value()&&(group.opts.value.current.includes(value())?checked(!0):checked(!1))});const rootState=CheckboxRootState.create({checked:boxWith$1(()=>checked(),v=>{checked(v),$$props.onCheckedChange?.(v)}),disabled:boxWith$1(()=>disabled()??!1),required:boxWith$1(()=>required2()),name:boxWith$1(()=>name()),value:boxWith$1(()=>value()),id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v)),indeterminate:boxWith$1(
()=>indeterminate(),v=>{indeterminate(v),$$props.onIndeterminateChange?.(v)}),type:boxWith$1(()=>type2()),readonly:boxWith$1(()=>!!$$props.readonly)},group),mergedProps=user_derived(()=>mergeProps({...restProps},rootState.props));var fragment=root$1_(),node2=first_child(fragment);{var consequent=$$anchor2=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);{let $0=user_derived(()=>({props:get$3(mergedProps),...rootState.snippetProps}));snippet(node_1,()=>$$props.child,()=>get$3($0))}append(
$$anchor2,fragment_1)},alternate=$$anchor2=>{var button=root_2$1y();attribute_effect(button,()=>({...get$3(mergedProps)}));var node_2=child(button);snippet(node_2,()=>$$props.children??noop$3,()=>rootState.snippetProps),reset(button),append($$anchor2,button)};if_block(node2,$$render=>{$$props.child?$$render(consequent):$$render(alternate,-1)})}var node_3=sibling(node2,2);Checkbox_input(node_3,{}),append($$anchor,fragment),pop()}const collapsibleAttrs=createBitsAttrs({component:"collapsible",parts:[
"root","content","trigger"]}),CollapsibleRootContext=new Context$1("Collapsible.Root");class CollapsibleRootState{static create(opts){return CollapsibleRootContext.set(new CollapsibleRootState(opts))}opts;attachment;#contentNode=state$1(null);get contentNode(){return get$3(this.#contentNode)}set contentNode(value){set$1(this.#contentNode,value,!0)}contentPresence;#contentId=state$1(void 0);get contentId(){return get$3(this.#contentId)}set contentId(value){set$1(this.#contentId,value,!0)}constructor(opts){
this.opts=opts,this.toggleOpen=this.toggleOpen.bind(this),this.attachment=attachRef(this.opts.ref),this.contentPresence=new PresenceManager({ref:boxWith$1(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}})}toggleOpen(){this.opts.open.current=!this.opts.open.current}#props=user_derived(()=>({id:this.opts.id.current,"data-state":getDataOpenClosed(this.opts.open.current),"data-disabled":boolToEmptyStrOrUndef(this.opts.disabled.
current),[collapsibleAttrs.root]:"",...this.attachment}));get props(){return get$3(this.#props)}set props(value){set$1(this.#props,value)}}class CollapsibleContentState{static create(opts){return new CollapsibleContentState(opts,CollapsibleRootContext.get())}opts;root;attachment;#present=user_derived(()=>this.opts.hiddenUntilFound.current?this.root.opts.open.current:this.opts.forceMount.current||this.root.opts.open.current);get present(){return get$3(this.#present)}set present(value){set$1(this.#present,
value)}#originalStyles;#isMountAnimationPrevented=state$1(!1);#width=state$1(0);#height=state$1(0);constructor(opts,root2){this.opts=opts,this.root=root2,set$1(this.#isMountAnimationPrevented,root2.opts.open.current,!0),this.root.contentId=this.opts.id.current,this.attachment=attachRef(this.opts.ref,v=>this.root.contentNode=v),watch$1.pre(()=>this.opts.id.current,id2=>{this.root.contentId=id2}),user_pre_effect(()=>{const rAF=requestAnimationFrame(()=>{set$1(this.#isMountAnimationPrevented,!1)});
return()=>{cancelAnimationFrame(rAF)}}),watch$1.pre([()=>this.opts.ref.current,()=>this.opts.hiddenUntilFound.current],([node2,hiddenUntilFound])=>!node2||!hiddenUntilFound?void 0:on(node2,"beforematch",()=>{this.root.opts.open.current||requestAnimationFrame(()=>{this.root.opts.open.current=!0})})),watch$1([()=>this.opts.ref.current,()=>this.present],([node2])=>{node2&&afterTick(()=>{if(!this.opts.ref.current)return;this.#originalStyles=this.#originalStyles||{transitionDuration:node2.style.transitionDuration,
animationName:node2.style.animationName},node2.style.transitionDuration="0s",node2.style.animationName="none";const rect=node2.getBoundingClientRect();if(set$1(this.#height,rect.height,!0),set$1(this.#width,rect.width,!0),!get$3(this.#isMountAnimationPrevented)){const{animationName,transitionDuration}=this.#originalStyles;node2.style.transitionDuration=transitionDuration,node2.style.animationName=animationName}})})}get shouldRender(){return this.root.contentPresence.shouldRender}#snippetProps=user_derived(
()=>({open:this.root.opts.open.current}));get snippetProps(){return get$3(this.#snippetProps)}set snippetProps(value){set$1(this.#snippetProps,value)}#props=user_derived(()=>({id:this.opts.id.current,style:{"--bits-collapsible-content-height":get$3(this.#height)?`${get$3(this.#height)}px`:void 0,"--bits-collapsible-content-width":get$3(this.#width)?`${get$3(this.#width)}px`:void 0},hidden:this.opts.hiddenUntilFound.current&&!this.root.opts.open.current?"until-found":void 0,"data-state":getDataOpenClosed(
this.root.opts.open.current),...getDataTransitionAttrs(this.root.contentPresence.transitionStatus),"data-disabled":boolToEmptyStrOrUndef(this.root.opts.disabled.current),[collapsibleAttrs.content]:"",...this.opts.hiddenUntilFound.current&&!this.shouldRender?{}:{hidden:this.opts.hiddenUntilFound.current?!this.shouldRender:this.opts.forceMount.current?void 0:!this.shouldRender},...this.attachment}));get props(){return get$3(this.#props)}set props(value){set$1(this.#props,value)}}class CollapsibleTriggerState{static create(opts){
return new CollapsibleTriggerState(opts,CollapsibleRootContext.get())}opts;root;attachment;#isDisabled=user_derived(()=>this.opts.disabled.current||this.root.opts.disabled.current);constructor(opts,root2){this.opts=opts,this.root=root2,this.attachment=attachRef(this.opts.ref),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this)}onclick(e){if(!get$3(this.#isDisabled)){if(e.button!==0)return e.preventDefault();this.root.toggleOpen()}}onkeydown(e){get$3(this.#isDisabled)||(e.
key===SPACE||e.key===ENTER)&&(e.preventDefault(),this.root.toggleOpen())}#props=user_derived(()=>({id:this.opts.id.current,type:"button",disabled:get$3(this.#isDisabled),"aria-controls":this.root.contentId,"aria-expanded":boolToStr(this.root.opts.open.current),"data-state":getDataOpenClosed(this.root.opts.open.current),"data-disabled":boolToEmptyStrOrUndef(get$3(this.#isDisabled)),[collapsibleAttrs.trigger]:"",onclick:this.onclick,onkeydown:this.onkeydown,...this.attachment}));get props(){return get$3(
this.#props)}set props(value){set$1(this.#props,value)}}var root_2$1x=from_html("<div><!></div>");function Collapsible$1($$anchor,$$props){const uid2=props_id();push$1($$props,!0);let id2=prop($$props,"id",19,()=>createId(uid2)),ref2=prop($$props,"ref",15,null),open2=prop($$props,"open",15,!1),disabled=prop($$props,"disabled",3,!1),onOpenChange=prop($$props,"onOpenChange",3,noop$1),onOpenChangeComplete=prop($$props,"onOpenChangeComplete",3,noop$1),restProps=rest_props($$props,["$$slots","$$event\
s","$$legacy","children","child","id","ref","open","disabled","onOpenChange","onOpenChangeComplete"]);const rootState=CollapsibleRootState.create({open:boxWith$1(()=>open2(),v=>{open2(v),onOpenChange()(v)}),disabled:boxWith$1(()=>disabled()),id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v)),onOpenChangeComplete:boxWith$1(()=>onOpenChangeComplete())}),mergedProps=user_derived(()=>mergeProps(restProps,rootState.props));var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{
var fragment_1=comment$2(),node_1=first_child(fragment_1);snippet(node_1,()=>$$props.child,()=>({props:get$3(mergedProps)})),append($$anchor2,fragment_1)},alternate=$$anchor2=>{var div=root_2$1x();attribute_effect(div,()=>({...get$3(mergedProps)}));var node_2=child(div);snippet(node_2,()=>$$props.children??noop$3),reset(div),append($$anchor2,div)};if_block(node2,$$render=>{$$props.child?$$render(consequent):$$render(alternate,-1)})}append($$anchor,fragment),pop()}var root_2$1w=from_html("<div><!\
></div>");function Collapsible_content$1($$anchor,$$props){const uid2=props_id();push$1($$props,!0);let ref2=prop($$props,"ref",15,null),forceMount=prop($$props,"forceMount",3,!1),hiddenUntilFound=prop($$props,"hiddenUntilFound",3,!1),id2=prop($$props,"id",19,()=>createId(uid2)),restProps=rest_props($$props,["$$slots","$$events","$$legacy","child","ref","forceMount","hiddenUntilFound","children","id"]);const contentState=CollapsibleContentState.create({id:boxWith$1(()=>id2()),forceMount:boxWith$1(
()=>forceMount()),hiddenUntilFound:boxWith$1(()=>hiddenUntilFound()),ref:boxWith$1(()=>ref2(),v=>ref2(v))}),mergedProps=user_derived(()=>mergeProps(restProps,contentState.props));var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);{let $0=user_derived(()=>({...contentState.snippetProps,props:get$3(mergedProps)}));snippet(node_1,()=>$$props.child,()=>get$3($0))}append($$anchor2,fragment_1)},alternate=$$anchor2=>{
var div=root_2$1w();attribute_effect(div,()=>({...get$3(mergedProps)}));var node_2=child(div);snippet(node_2,()=>$$props.children??noop$3),reset(div),append($$anchor2,div)};if_block(node2,$$render=>{$$props.child?$$render(consequent):$$render(alternate,-1)})}append($$anchor,fragment),pop()}var root_2$1v=from_html("<button><!></button>");function Collapsible_trigger$1($$anchor,$$props){const uid2=props_id();push$1($$props,!0);let ref2=prop($$props,"ref",15,null),id2=prop($$props,"id",19,()=>createId(
uid2)),disabled=prop($$props,"disabled",3,!1),restProps=rest_props($$props,["$$slots","$$events","$$legacy","children","child","ref","id","disabled"]);const triggerState=CollapsibleTriggerState.create({id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v)),disabled:boxWith$1(()=>disabled())}),mergedProps=user_derived(()=>mergeProps(restProps,triggerState.props));var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);
snippet(node_1,()=>$$props.child,()=>({props:get$3(mergedProps)})),append($$anchor2,fragment_1)},alternate=$$anchor2=>{var button=root_2$1v();attribute_effect(button,()=>({...get$3(mergedProps)}));var node_2=child(button);snippet(node_2,()=>$$props.children??noop$3),reset(button),append($$anchor2,button)};if_block(node2,$$render=>{$$props.child?$$render(consequent):$$render(alternate,-1)})}append($$anchor,fragment),pop()}const sides=["top","right","bottom","left"],min=Math.min,max=Math.max,round=Math.
round,floor=Math.floor,createCoords=v=>({x:v,y:v}),oppositeSideMap={left:"right",right:"left",bottom:"top",top:"bottom"},oppositeAlignmentMap={start:"end",end:"start"};function clamp$1(start2,value,end){return max(start2,min(value,end))}function evaluate(value,param){return typeof value=="function"?value(param):value}function getSide$1(placement){return placement.split("-")[0]}function getAlignment(placement){return placement.split("-")[1]}function getOppositeAxis(axis){return axis==="x"?"y":"x"}
function getAxisLength(axis){return axis==="y"?"height":"width"}const yAxisSides=new Set(["top","bottom"]);function getSideAxis(placement){return yAxisSides.has(getSide$1(placement))?"y":"x"}function getAlignmentAxis(placement){return getOppositeAxis(getSideAxis(placement))}function getAlignmentSides(placement,rects,rtl){rtl===void 0&&(rtl=!1);const alignment=getAlignment(placement),alignmentAxis=getAlignmentAxis(placement),length=getAxisLength(alignmentAxis);let mainAlignmentSide=alignmentAxis===
"x"?alignment===(rtl?"end":"start")?"right":"left":alignment==="start"?"bottom":"top";return rects.reference[length]>rects.floating[length]&&(mainAlignmentSide=getOppositePlacement(mainAlignmentSide)),[mainAlignmentSide,getOppositePlacement(mainAlignmentSide)]}function getExpandedPlacements(placement){const oppositePlacement=getOppositePlacement(placement);return[getOppositeAlignmentPlacement(placement),oppositePlacement,getOppositeAlignmentPlacement(oppositePlacement)]}function getOppositeAlignmentPlacement(placement){
return placement.replace(/start|end/g,alignment=>oppositeAlignmentMap[alignment])}const lrPlacement=["left","right"],rlPlacement=["right","left"],tbPlacement=["top","bottom"],btPlacement=["bottom","top"];function getSideList(side,isStart,rtl){switch(side){case"top":case"bottom":return rtl?isStart?rlPlacement:lrPlacement:isStart?lrPlacement:rlPlacement;case"left":case"right":return isStart?tbPlacement:btPlacement;default:return[]}}function getOppositeAxisPlacements(placement,flipAlignment,direction,rtl){
const alignment=getAlignment(placement);let list2=getSideList(getSide$1(placement),direction==="start",rtl);return alignment&&(list2=list2.map(side=>side+"-"+alignment),flipAlignment&&(list2=list2.concat(list2.map(getOppositeAlignmentPlacement)))),list2}function getOppositePlacement(placement){return placement.replace(/left|right|bottom|top/g,side=>oppositeSideMap[side])}function expandPaddingObject(padding){return{top:0,right:0,bottom:0,left:0,...padding}}function getPaddingObject(padding){return typeof padding!=
"number"?expandPaddingObject(padding):{top:padding,right:padding,bottom:padding,left:padding}}function rectToClientRect(rect){const{x,y,width,height}=rect;return{width,height,top:y,left:x,right:x+width,bottom:y+height,x,y}}function computeCoordsFromPlacement(_ref,placement,rtl){let{reference,floating}=_ref;const sideAxis=getSideAxis(placement),alignmentAxis=getAlignmentAxis(placement),alignLength=getAxisLength(alignmentAxis),side=getSide$1(placement),isVertical=sideAxis==="y",commonX=reference.x+
reference.width/2-floating.width/2,commonY=reference.y+reference.height/2-floating.height/2,commonAlign=reference[alignLength]/2-floating[alignLength]/2;let coords;switch(side){case"top":coords={x:commonX,y:reference.y-floating.height};break;case"bottom":coords={x:commonX,y:reference.y+reference.height};break;case"right":coords={x:reference.x+reference.width,y:commonY};break;case"left":coords={x:reference.x-floating.width,y:commonY};break;default:coords={x:reference.x,y:reference.y}}switch(getAlignment(
placement)){case"start":coords[alignmentAxis]-=commonAlign*(rtl&&isVertical?-1:1);break;case"end":coords[alignmentAxis]+=commonAlign*(rtl&&isVertical?-1:1);break}return coords}const computePosition$1=async(reference,floating,config2)=>{const{placement="bottom",strategy="absolute",middleware=[],platform:platform2}=config2,validMiddleware=middleware.filter(Boolean),rtl=await(platform2.isRTL==null?void 0:platform2.isRTL(floating));let rects=await platform2.getElementRects({reference,floating,strategy}),
{x,y}=computeCoordsFromPlacement(rects,placement,rtl),statefulPlacement=placement,middlewareData={},resetCount=0;for(let i=0;i<validMiddleware.length;i++){const{name,fn}=validMiddleware[i],{x:nextX,y:nextY,data,reset:reset2}=await fn({x,y,initialPlacement:placement,placement:statefulPlacement,strategy,middlewareData,rects,platform:platform2,elements:{reference,floating}});x=nextX??x,y=nextY??y,middlewareData={...middlewareData,[name]:{...middlewareData[name],...data}},reset2&&resetCount<=50&&(resetCount++,
typeof reset2=="object"&&(reset2.placement&&(statefulPlacement=reset2.placement),reset2.rects&&(rects=reset2.rects===!0?await platform2.getElementRects({reference,floating,strategy}):reset2.rects),{x,y}=computeCoordsFromPlacement(rects,statefulPlacement,rtl)),i=-1)}return{x,y,placement:statefulPlacement,strategy,middlewareData}};async function detectOverflow(state2,options){var _await$platform$isEle;options===void 0&&(options={});const{x,y,platform:platform2,rects,elements,strategy}=state2,{boundary:boundary2="\
clippingAncestors",rootBoundary="viewport",elementContext="floating",altBoundary=!1,padding=0}=evaluate(options,state2),paddingObject=getPaddingObject(padding),element2=elements[altBoundary?elementContext==="floating"?"reference":"floating":elementContext],clippingClientRect=rectToClientRect(await platform2.getClippingRect({element:(_await$platform$isEle=await(platform2.isElement==null?void 0:platform2.isElement(element2)))==null||_await$platform$isEle?element2:element2.contextElement||await(platform2.
getDocumentElement==null?void 0:platform2.getDocumentElement(elements.floating)),boundary:boundary2,rootBoundary,strategy})),rect=elementContext==="floating"?{x,y,width:rects.floating.width,height:rects.floating.height}:rects.reference,offsetParent=await(platform2.getOffsetParent==null?void 0:platform2.getOffsetParent(elements.floating)),offsetScale=await(platform2.isElement==null?void 0:platform2.isElement(offsetParent))?await(platform2.getScale==null?void 0:platform2.getScale(offsetParent))||{
x:1,y:1}:{x:1,y:1},elementClientRect=rectToClientRect(platform2.convertOffsetParentRelativeRectToViewportRelativeRect?await platform2.convertOffsetParentRelativeRectToViewportRelativeRect({elements,rect,offsetParent,strategy}):rect);return{top:(clippingClientRect.top-elementClientRect.top+paddingObject.top)/offsetScale.y,bottom:(elementClientRect.bottom-clippingClientRect.bottom+paddingObject.bottom)/offsetScale.y,left:(clippingClientRect.left-elementClientRect.left+paddingObject.left)/offsetScale.
x,right:(elementClientRect.right-clippingClientRect.right+paddingObject.right)/offsetScale.x}}const arrow$1=options=>({name:"arrow",options,async fn(state2){const{x,y,placement,rects,platform:platform2,elements,middlewareData}=state2,{element:element2,padding=0}=evaluate(options,state2)||{};if(element2==null)return{};const paddingObject=getPaddingObject(padding),coords={x,y},axis=getAlignmentAxis(placement),length=getAxisLength(axis),arrowDimensions=await platform2.getDimensions(element2),isYAxis=axis===
"y",minProp=isYAxis?"top":"left",maxProp=isYAxis?"bottom":"right",clientProp=isYAxis?"clientHeight":"clientWidth",endDiff=rects.reference[length]+rects.reference[axis]-coords[axis]-rects.floating[length],startDiff=coords[axis]-rects.reference[axis],arrowOffsetParent=await(platform2.getOffsetParent==null?void 0:platform2.getOffsetParent(element2));let clientSize=arrowOffsetParent?arrowOffsetParent[clientProp]:0;(!clientSize||!await(platform2.isElement==null?void 0:platform2.isElement(arrowOffsetParent)))&&
(clientSize=elements.floating[clientProp]||rects.floating[length]);const centerToReference=endDiff/2-startDiff/2,largestPossiblePadding=clientSize/2-arrowDimensions[length]/2-1,minPadding=min(paddingObject[minProp],largestPossiblePadding),maxPadding=min(paddingObject[maxProp],largestPossiblePadding),min$1=minPadding,max2=clientSize-arrowDimensions[length]-maxPadding,center=clientSize/2-arrowDimensions[length]/2+centerToReference,offset2=clamp$1(min$1,center,max2),shouldAddOffset=!middlewareData.
arrow&&getAlignment(placement)!=null&&center!==offset2&&rects.reference[length]/2-(center<min$1?minPadding:maxPadding)-arrowDimensions[length]/2<0,alignmentOffset=shouldAddOffset?center<min$1?center-min$1:center-max2:0;return{[axis]:coords[axis]+alignmentOffset,data:{[axis]:offset2,centerOffset:center-offset2-alignmentOffset,...shouldAddOffset&&{alignmentOffset}},reset:shouldAddOffset}}}),flip$1=function(options){return options===void 0&&(options={}),{name:"flip",options,async fn(state2){var _middlewareData$arrow,
_middlewareData$flip;const{placement,middlewareData,rects,initialPlacement,platform:platform2,elements}=state2,{mainAxis:checkMainAxis=!0,crossAxis:checkCrossAxis=!0,fallbackPlacements:specifiedFallbackPlacements,fallbackStrategy="bestFit",fallbackAxisSideDirection="none",flipAlignment=!0,...detectOverflowOptions}=evaluate(options,state2);if((_middlewareData$arrow=middlewareData.arrow)!=null&&_middlewareData$arrow.alignmentOffset)return{};const side=getSide$1(placement),initialSideAxis=getSideAxis(
initialPlacement),isBasePlacement=getSide$1(initialPlacement)===initialPlacement,rtl=await(platform2.isRTL==null?void 0:platform2.isRTL(elements.floating)),fallbackPlacements=specifiedFallbackPlacements||(isBasePlacement||!flipAlignment?[getOppositePlacement(initialPlacement)]:getExpandedPlacements(initialPlacement)),hasFallbackAxisSideDirection=fallbackAxisSideDirection!=="none";!specifiedFallbackPlacements&&hasFallbackAxisSideDirection&&fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement,
flipAlignment,fallbackAxisSideDirection,rtl));const placements=[initialPlacement,...fallbackPlacements],overflow=await detectOverflow(state2,detectOverflowOptions),overflows=[];let overflowsData=((_middlewareData$flip=middlewareData.flip)==null?void 0:_middlewareData$flip.overflows)||[];if(checkMainAxis&&overflows.push(overflow[side]),checkCrossAxis){const sides2=getAlignmentSides(placement,rects,rtl);overflows.push(overflow[sides2[0]],overflow[sides2[1]])}if(overflowsData=[...overflowsData,{placement,
overflows}],!overflows.every(side2=>side2<=0)){var _middlewareData$flip2,_overflowsData$filter;const nextIndex=(((_middlewareData$flip2=middlewareData.flip)==null?void 0:_middlewareData$flip2.index)||0)+1,nextPlacement=placements[nextIndex];if(nextPlacement&&(!(checkCrossAxis==="alignment"?initialSideAxis!==getSideAxis(nextPlacement):!1)||overflowsData.every(d2=>d2.overflows[0]>0&&getSideAxis(d2.placement)===initialSideAxis)))return{data:{index:nextIndex,overflows:overflowsData},reset:{placement:nextPlacement}};
let resetPlacement=(_overflowsData$filter=overflowsData.filter(d2=>d2.overflows[0]<=0).sort((a,b)=>a.overflows[1]-b.overflows[1])[0])==null?void 0:_overflowsData$filter.placement;if(!resetPlacement)switch(fallbackStrategy){case"bestFit":{var _overflowsData$filter2;const placement2=(_overflowsData$filter2=overflowsData.filter(d2=>{if(hasFallbackAxisSideDirection){const currentSideAxis=getSideAxis(d2.placement);return currentSideAxis===initialSideAxis||currentSideAxis==="y"}return!0}).map(d2=>[d2.
placement,d2.overflows.filter(overflow2=>overflow2>0).reduce((acc,overflow2)=>acc+overflow2,0)]).sort((a,b)=>a[1]-b[1])[0])==null?void 0:_overflowsData$filter2[0];placement2&&(resetPlacement=placement2);break}case"initialPlacement":resetPlacement=initialPlacement;break}if(placement!==resetPlacement)return{reset:{placement:resetPlacement}}}return{}}}};function getSideOffsets(overflow,rect){return{top:overflow.top-rect.height,right:overflow.right-rect.width,bottom:overflow.bottom-rect.height,left:overflow.
left-rect.width}}function isAnySideFullyClipped(overflow){return sides.some(side=>overflow[side]>=0)}const hide$1=function(options){return options===void 0&&(options={}),{name:"hide",options,async fn(state2){const{rects}=state2,{strategy="referenceHidden",...detectOverflowOptions}=evaluate(options,state2);switch(strategy){case"referenceHidden":{const overflow=await detectOverflow(state2,{...detectOverflowOptions,elementContext:"reference"}),offsets=getSideOffsets(overflow,rects.reference);return{
data:{referenceHiddenOffsets:offsets,referenceHidden:isAnySideFullyClipped(offsets)}}}case"escaped":{const overflow=await detectOverflow(state2,{...detectOverflowOptions,altBoundary:!0}),offsets=getSideOffsets(overflow,rects.floating);return{data:{escapedOffsets:offsets,escaped:isAnySideFullyClipped(offsets)}}}default:return{}}}}},originSides=new Set(["left","top"]);async function convertValueToCoords(state2,options){const{placement,platform:platform2,elements}=state2,rtl=await(platform2.isRTL==
null?void 0:platform2.isRTL(elements.floating)),side=getSide$1(placement),alignment=getAlignment(placement),isVertical=getSideAxis(placement)==="y",mainAxisMulti=originSides.has(side)?-1:1,crossAxisMulti=rtl&&isVertical?-1:1,rawValue=evaluate(options,state2);let{mainAxis,crossAxis,alignmentAxis}=typeof rawValue=="number"?{mainAxis:rawValue,crossAxis:0,alignmentAxis:null}:{mainAxis:rawValue.mainAxis||0,crossAxis:rawValue.crossAxis||0,alignmentAxis:rawValue.alignmentAxis};return alignment&&typeof alignmentAxis==
"number"&&(crossAxis=alignment==="end"?alignmentAxis*-1:alignmentAxis),isVertical?{x:crossAxis*crossAxisMulti,y:mainAxis*mainAxisMulti}:{x:mainAxis*mainAxisMulti,y:crossAxis*crossAxisMulti}}const offset$1=function(options){return options===void 0&&(options=0),{name:"offset",options,async fn(state2){var _middlewareData$offse,_middlewareData$arrow;const{x,y,placement,middlewareData}=state2,diffCoords=await convertValueToCoords(state2,options);return placement===((_middlewareData$offse=middlewareData.
offset)==null?void 0:_middlewareData$offse.placement)&&(_middlewareData$arrow=middlewareData.arrow)!=null&&_middlewareData$arrow.alignmentOffset?{}:{x:x+diffCoords.x,y:y+diffCoords.y,data:{...diffCoords,placement}}}}},shift$1=function(options){return options===void 0&&(options={}),{name:"shift",options,async fn(state2){const{x,y,placement}=state2,{mainAxis:checkMainAxis=!0,crossAxis:checkCrossAxis=!1,limiter={fn:_ref=>{let{x:x2,y:y2}=_ref;return{x:x2,y:y2}}},...detectOverflowOptions}=evaluate(options,
state2),coords={x,y},overflow=await detectOverflow(state2,detectOverflowOptions),crossAxis=getSideAxis(getSide$1(placement)),mainAxis=getOppositeAxis(crossAxis);let mainAxisCoord=coords[mainAxis],crossAxisCoord=coords[crossAxis];if(checkMainAxis){const minSide=mainAxis==="y"?"top":"left",maxSide=mainAxis==="y"?"bottom":"right",min2=mainAxisCoord+overflow[minSide],max2=mainAxisCoord-overflow[maxSide];mainAxisCoord=clamp$1(min2,mainAxisCoord,max2)}if(checkCrossAxis){const minSide=crossAxis==="y"?"\
top":"left",maxSide=crossAxis==="y"?"bottom":"right",min2=crossAxisCoord+overflow[minSide],max2=crossAxisCoord-overflow[maxSide];crossAxisCoord=clamp$1(min2,crossAxisCoord,max2)}const limitedCoords=limiter.fn({...state2,[mainAxis]:mainAxisCoord,[crossAxis]:crossAxisCoord});return{...limitedCoords,data:{x:limitedCoords.x-x,y:limitedCoords.y-y,enabled:{[mainAxis]:checkMainAxis,[crossAxis]:checkCrossAxis}}}}}},limitShift$1=function(options){return options===void 0&&(options={}),{options,fn(state2){
const{x,y,placement,rects,middlewareData}=state2,{offset:offset2=0,mainAxis:checkMainAxis=!0,crossAxis:checkCrossAxis=!0}=evaluate(options,state2),coords={x,y},crossAxis=getSideAxis(placement),mainAxis=getOppositeAxis(crossAxis);let mainAxisCoord=coords[mainAxis],crossAxisCoord=coords[crossAxis];const rawOffset=evaluate(offset2,state2),computedOffset=typeof rawOffset=="number"?{mainAxis:rawOffset,crossAxis:0}:{mainAxis:0,crossAxis:0,...rawOffset};if(checkMainAxis){const len=mainAxis==="y"?"heigh\
t":"width",limitMin=rects.reference[mainAxis]-rects.floating[len]+computedOffset.mainAxis,limitMax=rects.reference[mainAxis]+rects.reference[len]-computedOffset.mainAxis;mainAxisCoord<limitMin?mainAxisCoord=limitMin:mainAxisCoord>limitMax&&(mainAxisCoord=limitMax)}if(checkCrossAxis){var _middlewareData$offse,_middlewareData$offse2;const len=mainAxis==="y"?"width":"height",isOriginSide=originSides.has(getSide$1(placement)),limitMin=rects.reference[crossAxis]-rects.floating[len]+(isOriginSide&&((_middlewareData$offse=
middlewareData.offset)==null?void 0:_middlewareData$offse[crossAxis])||0)+(isOriginSide?0:computedOffset.crossAxis),limitMax=rects.reference[crossAxis]+rects.reference[len]+(isOriginSide?0:((_middlewareData$offse2=middlewareData.offset)==null?void 0:_middlewareData$offse2[crossAxis])||0)-(isOriginSide?computedOffset.crossAxis:0);crossAxisCoord<limitMin?crossAxisCoord=limitMin:crossAxisCoord>limitMax&&(crossAxisCoord=limitMax)}return{[mainAxis]:mainAxisCoord,[crossAxis]:crossAxisCoord}}}},size$1=function(options){
return options===void 0&&(options={}),{name:"size",options,async fn(state2){var _state$middlewareData,_state$middlewareData2;const{placement,rects,platform:platform2,elements}=state2,{apply=()=>{},...detectOverflowOptions}=evaluate(options,state2),overflow=await detectOverflow(state2,detectOverflowOptions),side=getSide$1(placement),alignment=getAlignment(placement),isYAxis=getSideAxis(placement)==="y",{width,height}=rects.floating;let heightSide,widthSide;side==="top"||side==="bottom"?(heightSide=
side,widthSide=alignment===(await(platform2.isRTL==null?void 0:platform2.isRTL(elements.floating))?"start":"end")?"left":"right"):(widthSide=side,heightSide=alignment==="end"?"top":"bottom");const maximumClippingHeight=height-overflow.top-overflow.bottom,maximumClippingWidth=width-overflow.left-overflow.right,overflowAvailableHeight=min(height-overflow[heightSide],maximumClippingHeight),overflowAvailableWidth=min(width-overflow[widthSide],maximumClippingWidth),noShift=!state2.middlewareData.shift;
let availableHeight=overflowAvailableHeight,availableWidth=overflowAvailableWidth;if((_state$middlewareData=state2.middlewareData.shift)!=null&&_state$middlewareData.enabled.x&&(availableWidth=maximumClippingWidth),(_state$middlewareData2=state2.middlewareData.shift)!=null&&_state$middlewareData2.enabled.y&&(availableHeight=maximumClippingHeight),noShift&&!alignment){const xMin=max(overflow.left,0),xMax=max(overflow.right,0),yMin=max(overflow.top,0),yMax=max(overflow.bottom,0);isYAxis?availableWidth=
width-2*(xMin!==0||xMax!==0?xMin+xMax:max(overflow.left,overflow.right)):availableHeight=height-2*(yMin!==0||yMax!==0?yMin+yMax:max(overflow.top,overflow.bottom))}await apply({...state2,availableWidth,availableHeight});const nextDimensions=await platform2.getDimensions(elements.floating);return width!==nextDimensions.width||height!==nextDimensions.height?{reset:{rects:!0}}:{}}}};function hasWindow(){return typeof window<"u"}function getNodeName(node2){return isNode(node2)?(node2.nodeName||"").toLowerCase():
"#document"}function getWindow(node2){var _node$ownerDocument;return(node2==null||(_node$ownerDocument=node2.ownerDocument)==null?void 0:_node$ownerDocument.defaultView)||window}function getDocumentElement(node2){var _ref;return(_ref=(isNode(node2)?node2.ownerDocument:node2.document)||window.document)==null?void 0:_ref.documentElement}function isNode(value){return hasWindow()?value instanceof Node||value instanceof getWindow(value).Node:!1}function isElement(value){return hasWindow()?value instanceof
Element||value instanceof getWindow(value).Element:!1}function isHTMLElement(value){return hasWindow()?value instanceof HTMLElement||value instanceof getWindow(value).HTMLElement:!1}function isShadowRoot(value){return!hasWindow()||typeof ShadowRoot>"u"?!1:value instanceof ShadowRoot||value instanceof getWindow(value).ShadowRoot}const invalidOverflowDisplayValues=new Set(["inline","contents"]);function isOverflowElement(element2){const{overflow,overflowX,overflowY,display}=getComputedStyle$1(element2);
return/auto|scroll|overlay|hidden|clip/.test(overflow+overflowY+overflowX)&&!invalidOverflowDisplayValues.has(display)}const tableElements=new Set(["table","td","th"]);function isTableElement(element2){return tableElements.has(getNodeName(element2))}const topLayerSelectors=[":popover-open",":modal"];function isTopLayer(element2){return topLayerSelectors.some(selector=>{try{return element2.matches(selector)}catch{return!1}})}const transformProperties=["transform","translate","scale","rotate","per\
spective"],willChangeValues=["transform","translate","scale","rotate","perspective","filter"],containValues=["paint","layout","strict","content"];function isContainingBlock(elementOrCss){const webkit=isWebKit(),css2=isElement(elementOrCss)?getComputedStyle$1(elementOrCss):elementOrCss;return transformProperties.some(value=>css2[value]?css2[value]!=="none":!1)||(css2.containerType?css2.containerType!=="normal":!1)||!webkit&&(css2.backdropFilter?css2.backdropFilter!=="none":!1)||!webkit&&(css2.filter?
css2.filter!=="none":!1)||willChangeValues.some(value=>(css2.willChange||"").includes(value))||containValues.some(value=>(css2.contain||"").includes(value))}function getContainingBlock(element2){let currentNode=getParentNode(element2);for(;isHTMLElement(currentNode)&&!isLastTraversableNode(currentNode);){if(isContainingBlock(currentNode))return currentNode;if(isTopLayer(currentNode))return null;currentNode=getParentNode(currentNode)}return null}function isWebKit(){return typeof CSS>"u"||!CSS.supports?
!1:CSS.supports("-webkit-backdrop-filter","none")}const lastTraversableNodeNames=new Set(["html","body","#document"]);function isLastTraversableNode(node2){return lastTraversableNodeNames.has(getNodeName(node2))}function getComputedStyle$1(element2){return getWindow(element2).getComputedStyle(element2)}function getNodeScroll(element2){return isElement(element2)?{scrollLeft:element2.scrollLeft,scrollTop:element2.scrollTop}:{scrollLeft:element2.scrollX,scrollTop:element2.scrollY}}function getParentNode(node2){
if(getNodeName(node2)==="html")return node2;const result=node2.assignedSlot||node2.parentNode||isShadowRoot(node2)&&node2.host||getDocumentElement(node2);return isShadowRoot(result)?result.host:result}function getNearestOverflowAncestor(node2){const parentNode=getParentNode(node2);return isLastTraversableNode(parentNode)?node2.ownerDocument?node2.ownerDocument.body:node2.body:isHTMLElement(parentNode)&&isOverflowElement(parentNode)?parentNode:getNearestOverflowAncestor(parentNode)}function getOverflowAncestors(node2,list2,traverseIframes){
var _node$ownerDocument2;list2===void 0&&(list2=[]),traverseIframes===void 0&&(traverseIframes=!0);const scrollableAncestor=getNearestOverflowAncestor(node2),isBody=scrollableAncestor===((_node$ownerDocument2=node2.ownerDocument)==null?void 0:_node$ownerDocument2.body),win=getWindow(scrollableAncestor);if(isBody){const frameElement=getFrameElement(win);return list2.concat(win,win.visualViewport||[],isOverflowElement(scrollableAncestor)?scrollableAncestor:[],frameElement&&traverseIframes?getOverflowAncestors(
frameElement):[])}return list2.concat(scrollableAncestor,getOverflowAncestors(scrollableAncestor,[],traverseIframes))}function getFrameElement(win){return win.parent&&Object.getPrototypeOf(win.parent)?win.frameElement:null}function getCssDimensions(element2){const css2=getComputedStyle$1(element2);let width=parseFloat(css2.width)||0,height=parseFloat(css2.height)||0;const hasOffset=isHTMLElement(element2),offsetWidth=hasOffset?element2.offsetWidth:width,offsetHeight=hasOffset?element2.offsetHeight:
height,shouldFallback=round(width)!==offsetWidth||round(height)!==offsetHeight;return shouldFallback&&(width=offsetWidth,height=offsetHeight),{width,height,$:shouldFallback}}function unwrapElement(element2){return isElement(element2)?element2:element2.contextElement}function getScale(element2){const domElement=unwrapElement(element2);if(!isHTMLElement(domElement))return createCoords(1);const rect=domElement.getBoundingClientRect(),{width,height,$}=getCssDimensions(domElement);let x=($?round(rect.
width):rect.width)/width,y=($?round(rect.height):rect.height)/height;return(!x||!Number.isFinite(x))&&(x=1),(!y||!Number.isFinite(y))&&(y=1),{x,y}}const noOffsets=createCoords(0);function getVisualOffsets(element2){const win=getWindow(element2);return!isWebKit()||!win.visualViewport?noOffsets:{x:win.visualViewport.offsetLeft,y:win.visualViewport.offsetTop}}function shouldAddVisualOffsets(element2,isFixed,floatingOffsetParent){return isFixed===void 0&&(isFixed=!1),!floatingOffsetParent||isFixed&&
floatingOffsetParent!==getWindow(element2)?!1:isFixed}function getBoundingClientRect(element2,includeScale,isFixedStrategy,offsetParent){includeScale===void 0&&(includeScale=!1),isFixedStrategy===void 0&&(isFixedStrategy=!1);const clientRect=element2.getBoundingClientRect(),domElement=unwrapElement(element2);let scale2=createCoords(1);includeScale&&(offsetParent?isElement(offsetParent)&&(scale2=getScale(offsetParent)):scale2=getScale(element2));const visualOffsets=shouldAddVisualOffsets(domElement,
isFixedStrategy,offsetParent)?getVisualOffsets(domElement):createCoords(0);let x=(clientRect.left+visualOffsets.x)/scale2.x,y=(clientRect.top+visualOffsets.y)/scale2.y,width=clientRect.width/scale2.x,height=clientRect.height/scale2.y;if(domElement){const win=getWindow(domElement),offsetWin=offsetParent&&isElement(offsetParent)?getWindow(offsetParent):offsetParent;let currentWin=win,currentIFrame=getFrameElement(currentWin);for(;currentIFrame&&offsetParent&&offsetWin!==currentWin;){const iframeScale=getScale(
currentIFrame),iframeRect=currentIFrame.getBoundingClientRect(),css2=getComputedStyle$1(currentIFrame),left=iframeRect.left+(currentIFrame.clientLeft+parseFloat(css2.paddingLeft))*iframeScale.x,top=iframeRect.top+(currentIFrame.clientTop+parseFloat(css2.paddingTop))*iframeScale.y;x*=iframeScale.x,y*=iframeScale.y,width*=iframeScale.x,height*=iframeScale.y,x+=left,y+=top,currentWin=getWindow(currentIFrame),currentIFrame=getFrameElement(currentWin)}}return rectToClientRect({width,height,x,y})}function getWindowScrollBarX(element2,rect){
const leftScroll=getNodeScroll(element2).scrollLeft;return rect?rect.left+leftScroll:getBoundingClientRect(getDocumentElement(element2)).left+leftScroll}function getHTMLOffset(documentElement,scroll,ignoreScrollbarX){ignoreScrollbarX===void 0&&(ignoreScrollbarX=!1);const htmlRect=documentElement.getBoundingClientRect(),x=htmlRect.left+scroll.scrollLeft-(ignoreScrollbarX?0:getWindowScrollBarX(documentElement,htmlRect)),y=htmlRect.top+scroll.scrollTop;return{x,y}}function convertOffsetParentRelativeRectToViewportRelativeRect(_ref){
let{elements,rect,offsetParent,strategy}=_ref;const isFixed=strategy==="fixed",documentElement=getDocumentElement(offsetParent),topLayer=elements?isTopLayer(elements.floating):!1;if(offsetParent===documentElement||topLayer&&isFixed)return rect;let scroll={scrollLeft:0,scrollTop:0},scale2=createCoords(1);const offsets=createCoords(0),isOffsetParentAnElement=isHTMLElement(offsetParent);if((isOffsetParentAnElement||!isOffsetParentAnElement&&!isFixed)&&((getNodeName(offsetParent)!=="body"||isOverflowElement(
documentElement))&&(scroll=getNodeScroll(offsetParent)),isHTMLElement(offsetParent))){const offsetRect=getBoundingClientRect(offsetParent);scale2=getScale(offsetParent),offsets.x=offsetRect.x+offsetParent.clientLeft,offsets.y=offsetRect.y+offsetParent.clientTop}const htmlOffset=documentElement&&!isOffsetParentAnElement&&!isFixed?getHTMLOffset(documentElement,scroll,!0):createCoords(0);return{width:rect.width*scale2.x,height:rect.height*scale2.y,x:rect.x*scale2.x-scroll.scrollLeft*scale2.x+offsets.
x+htmlOffset.x,y:rect.y*scale2.y-scroll.scrollTop*scale2.y+offsets.y+htmlOffset.y}}function getClientRects(element2){return Array.from(element2.getClientRects())}function getDocumentRect(element2){const html2=getDocumentElement(element2),scroll=getNodeScroll(element2),body2=element2.ownerDocument.body,width=max(html2.scrollWidth,html2.clientWidth,body2.scrollWidth,body2.clientWidth),height=max(html2.scrollHeight,html2.clientHeight,body2.scrollHeight,body2.clientHeight);let x=-scroll.scrollLeft+getWindowScrollBarX(
element2);const y=-scroll.scrollTop;return getComputedStyle$1(body2).direction==="rtl"&&(x+=max(html2.clientWidth,body2.clientWidth)-width),{width,height,x,y}}function getViewportRect(element2,strategy){const win=getWindow(element2),html2=getDocumentElement(element2),visualViewport=win.visualViewport;let width=html2.clientWidth,height=html2.clientHeight,x=0,y=0;if(visualViewport){width=visualViewport.width,height=visualViewport.height;const visualViewportBased=isWebKit();(!visualViewportBased||visualViewportBased&&
strategy==="fixed")&&(x=visualViewport.offsetLeft,y=visualViewport.offsetTop)}return{width,height,x,y}}const absoluteOrFixed=new Set(["absolute","fixed"]);function getInnerBoundingClientRect(element2,strategy){const clientRect=getBoundingClientRect(element2,!0,strategy==="fixed"),top=clientRect.top+element2.clientTop,left=clientRect.left+element2.clientLeft,scale2=isHTMLElement(element2)?getScale(element2):createCoords(1),width=element2.clientWidth*scale2.x,height=element2.clientHeight*scale2.y,
x=left*scale2.x,y=top*scale2.y;return{width,height,x,y}}function getClientRectFromClippingAncestor(element2,clippingAncestor,strategy){let rect;if(clippingAncestor==="viewport")rect=getViewportRect(element2,strategy);else if(clippingAncestor==="document")rect=getDocumentRect(getDocumentElement(element2));else if(isElement(clippingAncestor))rect=getInnerBoundingClientRect(clippingAncestor,strategy);else{const visualOffsets=getVisualOffsets(element2);rect={x:clippingAncestor.x-visualOffsets.x,y:clippingAncestor.
y-visualOffsets.y,width:clippingAncestor.width,height:clippingAncestor.height}}return rectToClientRect(rect)}function hasFixedPositionAncestor(element2,stopNode){const parentNode=getParentNode(element2);return parentNode===stopNode||!isElement(parentNode)||isLastTraversableNode(parentNode)?!1:getComputedStyle$1(parentNode).position==="fixed"||hasFixedPositionAncestor(parentNode,stopNode)}function getClippingElementAncestors(element2,cache2){const cachedResult=cache2.get(element2);if(cachedResult)
return cachedResult;let result=getOverflowAncestors(element2,[],!1).filter(el=>isElement(el)&&getNodeName(el)!=="body"),currentContainingBlockComputedStyle=null;const elementIsFixed=getComputedStyle$1(element2).position==="fixed";let currentNode=elementIsFixed?getParentNode(element2):element2;for(;isElement(currentNode)&&!isLastTraversableNode(currentNode);){const computedStyle=getComputedStyle$1(currentNode),currentNodeIsContaining=isContainingBlock(currentNode);!currentNodeIsContaining&&computedStyle.
position==="fixed"&&(currentContainingBlockComputedStyle=null),(elementIsFixed?!currentNodeIsContaining&&!currentContainingBlockComputedStyle:!currentNodeIsContaining&&computedStyle.position==="static"&&!!currentContainingBlockComputedStyle&&absoluteOrFixed.has(currentContainingBlockComputedStyle.position)||isOverflowElement(currentNode)&&!currentNodeIsContaining&&hasFixedPositionAncestor(element2,currentNode))?result=result.filter(ancestor=>ancestor!==currentNode):currentContainingBlockComputedStyle=
computedStyle,currentNode=getParentNode(currentNode)}return cache2.set(element2,result),result}function getClippingRect(_ref){let{element:element2,boundary:boundary2,rootBoundary,strategy}=_ref;const clippingAncestors=[...boundary2==="clippingAncestors"?isTopLayer(element2)?[]:getClippingElementAncestors(element2,this._c):[].concat(boundary2),rootBoundary],firstClippingAncestor=clippingAncestors[0],clippingRect=clippingAncestors.reduce((accRect,clippingAncestor)=>{const rect=getClientRectFromClippingAncestor(
element2,clippingAncestor,strategy);return accRect.top=max(rect.top,accRect.top),accRect.right=min(rect.right,accRect.right),accRect.bottom=min(rect.bottom,accRect.bottom),accRect.left=max(rect.left,accRect.left),accRect},getClientRectFromClippingAncestor(element2,firstClippingAncestor,strategy));return{width:clippingRect.right-clippingRect.left,height:clippingRect.bottom-clippingRect.top,x:clippingRect.left,y:clippingRect.top}}function getDimensions(element2){const{width,height}=getCssDimensions(
element2);return{width,height}}function getRectRelativeToOffsetParent(element2,offsetParent,strategy){const isOffsetParentAnElement=isHTMLElement(offsetParent),documentElement=getDocumentElement(offsetParent),isFixed=strategy==="fixed",rect=getBoundingClientRect(element2,!0,isFixed,offsetParent);let scroll={scrollLeft:0,scrollTop:0};const offsets=createCoords(0);function setLeftRTLScrollbarOffset(){offsets.x=getWindowScrollBarX(documentElement)}if(isOffsetParentAnElement||!isOffsetParentAnElement&&
!isFixed)if((getNodeName(offsetParent)!=="body"||isOverflowElement(documentElement))&&(scroll=getNodeScroll(offsetParent)),isOffsetParentAnElement){const offsetRect=getBoundingClientRect(offsetParent,!0,isFixed,offsetParent);offsets.x=offsetRect.x+offsetParent.clientLeft,offsets.y=offsetRect.y+offsetParent.clientTop}else documentElement&&setLeftRTLScrollbarOffset();isFixed&&!isOffsetParentAnElement&&documentElement&&setLeftRTLScrollbarOffset();const htmlOffset=documentElement&&!isOffsetParentAnElement&&
!isFixed?getHTMLOffset(documentElement,scroll):createCoords(0),x=rect.left+scroll.scrollLeft-offsets.x-htmlOffset.x,y=rect.top+scroll.scrollTop-offsets.y-htmlOffset.y;return{x,y,width:rect.width,height:rect.height}}function isStaticPositioned(element2){return getComputedStyle$1(element2).position==="static"}function getTrueOffsetParent(element2,polyfill){if(!isHTMLElement(element2)||getComputedStyle$1(element2).position==="fixed")return null;if(polyfill)return polyfill(element2);let rawOffsetParent=element2.
offsetParent;return getDocumentElement(element2)===rawOffsetParent&&(rawOffsetParent=rawOffsetParent.ownerDocument.body),rawOffsetParent}function getOffsetParent(element2,polyfill){const win=getWindow(element2);if(isTopLayer(element2))return win;if(!isHTMLElement(element2)){let svgOffsetParent=getParentNode(element2);for(;svgOffsetParent&&!isLastTraversableNode(svgOffsetParent);){if(isElement(svgOffsetParent)&&!isStaticPositioned(svgOffsetParent))return svgOffsetParent;svgOffsetParent=getParentNode(
svgOffsetParent)}return win}let offsetParent=getTrueOffsetParent(element2,polyfill);for(;offsetParent&&isTableElement(offsetParent)&&isStaticPositioned(offsetParent);)offsetParent=getTrueOffsetParent(offsetParent,polyfill);return offsetParent&&isLastTraversableNode(offsetParent)&&isStaticPositioned(offsetParent)&&!isContainingBlock(offsetParent)?win:offsetParent||getContainingBlock(element2)||win}const getElementRects=async function(data){const getOffsetParentFn=this.getOffsetParent||getOffsetParent,
getDimensionsFn=this.getDimensions,floatingDimensions=await getDimensionsFn(data.floating);return{reference:getRectRelativeToOffsetParent(data.reference,await getOffsetParentFn(data.floating),data.strategy),floating:{x:0,y:0,width:floatingDimensions.width,height:floatingDimensions.height}}};function isRTL(element2){return getComputedStyle$1(element2).direction==="rtl"}const platform={convertOffsetParentRelativeRectToViewportRelativeRect,getDocumentElement,getClippingRect,getOffsetParent,getElementRects,
getClientRects,getDimensions,getScale,isElement,isRTL};function rectsAreEqual(a,b){return a.x===b.x&&a.y===b.y&&a.width===b.width&&a.height===b.height}function observeMove(element2,onMove){let io=null,timeoutId;const root2=getDocumentElement(element2);function cleanup(){var _io;clearTimeout(timeoutId),(_io=io)==null||_io.disconnect(),io=null}function refresh(skip,threshold){skip===void 0&&(skip=!1),threshold===void 0&&(threshold=1),cleanup();const elementRectForRootMargin=element2.getBoundingClientRect(),
{left,top,width,height}=elementRectForRootMargin;if(skip||onMove(),!width||!height)return;const insetTop=floor(top),insetRight=floor(root2.clientWidth-(left+width)),insetBottom=floor(root2.clientHeight-(top+height)),insetLeft=floor(left),options={rootMargin:-insetTop+"px "+-insetRight+"px "+-insetBottom+"px "+-insetLeft+"px",threshold:max(0,min(1,threshold))||1};let isFirstUpdate=!0;function handleObserve(entries){const ratio=entries[0].intersectionRatio;if(ratio!==threshold){if(!isFirstUpdate)return refresh();
ratio?refresh(!1,ratio):timeoutId=setTimeout(()=>{refresh(!1,1e-7)},1e3)}ratio===1&&!rectsAreEqual(elementRectForRootMargin,element2.getBoundingClientRect())&&refresh(),isFirstUpdate=!1}try{io=new IntersectionObserver(handleObserve,{...options,root:root2.ownerDocument})}catch{io=new IntersectionObserver(handleObserve,options)}io.observe(element2)}return refresh(!0),cleanup}function autoUpdate(reference,floating,update2,options){options===void 0&&(options={});const{ancestorScroll=!0,ancestorResize=!0,
elementResize=typeof ResizeObserver=="function",layoutShift=typeof IntersectionObserver=="function",animationFrame=!1}=options,referenceEl=unwrapElement(reference),ancestors=ancestorScroll||ancestorResize?[...referenceEl?getOverflowAncestors(referenceEl):[],...getOverflowAncestors(floating)]:[];ancestors.forEach(ancestor=>{ancestorScroll&&ancestor.addEventListener("scroll",update2,{passive:!0}),ancestorResize&&ancestor.addEventListener("resize",update2)});const cleanupIo=referenceEl&&layoutShift?
observeMove(referenceEl,update2):null;let reobserveFrame=-1,resizeObserver=null;elementResize&&(resizeObserver=new ResizeObserver(_ref=>{let[firstEntry]=_ref;firstEntry&&firstEntry.target===referenceEl&&resizeObserver&&(resizeObserver.unobserve(floating),cancelAnimationFrame(reobserveFrame),reobserveFrame=requestAnimationFrame(()=>{var _resizeObserver;(_resizeObserver=resizeObserver)==null||_resizeObserver.observe(floating)})),update2()}),referenceEl&&!animationFrame&&resizeObserver.observe(referenceEl),
resizeObserver.observe(floating));let frameId,prevRefRect=animationFrame?getBoundingClientRect(reference):null;animationFrame&&frameLoop();function frameLoop(){const nextRefRect=getBoundingClientRect(reference);prevRefRect&&!rectsAreEqual(prevRefRect,nextRefRect)&&update2(),prevRefRect=nextRefRect,frameId=requestAnimationFrame(frameLoop)}return update2(),()=>{var _resizeObserver2;ancestors.forEach(ancestor=>{ancestorScroll&&ancestor.removeEventListener("scroll",update2),ancestorResize&&ancestor.
removeEventListener("resize",update2)}),cleanupIo?.(),(_resizeObserver2=resizeObserver)==null||_resizeObserver2.disconnect(),resizeObserver=null,animationFrame&&cancelAnimationFrame(frameId)}}const offset=offset$1,shift=shift$1,flip=flip$1,size=size$1,hide=hide$1,arrow=arrow$1,limitShift=limitShift$1,computePosition=(reference,floating,options)=>{const cache2=new Map,mergedOptions={platform,...options},platformWithCache={...mergedOptions.platform,_c:cache2};return computePosition$1(reference,floating,
{...mergedOptions,platform:platformWithCache})};function get(valueOrGetValue){return typeof valueOrGetValue=="function"?valueOrGetValue():valueOrGetValue}function getDPR(element2){return typeof window>"u"?1:(element2.ownerDocument.defaultView||window).devicePixelRatio||1}function roundByDPR(element2,value){const dpr=getDPR(element2);return Math.round(value*dpr)/dpr}function getFloatingContentCSSVars(name){return{[`--bits-${name}-content-transform-origin`]:"var(--bits-floating-transform-origin)",
[`--bits-${name}-content-available-width`]:"var(--bits-floating-available-width)",[`--bits-${name}-content-available-height`]:"var(--bits-floating-available-height)",[`--bits-${name}-anchor-width`]:"var(--bits-floating-anchor-width)",[`--bits-${name}-anchor-height`]:"var(--bits-floating-anchor-height)"}}function useFloating(options){const whileElementsMountedOption=options.whileElementsMounted,openOption=user_derived(()=>get(options.open)??!0),middlewareOption=user_derived(()=>get(options.middleware)),
transformOption=user_derived(()=>get(options.transform)??!0),placementOption=user_derived(()=>get(options.placement)??"bottom"),strategyOption=user_derived(()=>get(options.strategy)??"absolute"),sideOffsetOption=user_derived(()=>get(options.sideOffset)??0),alignOffsetOption=user_derived(()=>get(options.alignOffset)??0),reference=options.reference;let x=state$1(0),y=state$1(0);const floating=simpleBox(null);let strategy=state$1(proxy(get$3(strategyOption))),placement=state$1(proxy(get$3(placementOption))),
middlewareData=state$1(proxy({})),isPositioned=state$1(!1),hasWhileMountedPosition=!1,updateRequestId=0;const floatingStyles=user_derived(()=>{const xVal=floating.current?roundByDPR(floating.current,get$3(x)):get$3(x),yVal=floating.current?roundByDPR(floating.current,get$3(y)):get$3(y);return get$3(transformOption)?{position:get$3(strategy),left:"0",top:"0",transform:`translate(${xVal}px, ${yVal}px)`,...floating.current&&getDPR(floating.current)>=1.5&&{willChange:"transform"}}:{position:get$3(strategy),
left:`${xVal}px`,top:`${yVal}px`}});let whileElementsMountedCleanup;function update2(){if(reference.current===null||floating.current===null)return;const referenceNode=reference.current,floatingNode=floating.current,requestId=++updateRequestId;computePosition(referenceNode,floatingNode,{middleware:get$3(middlewareOption),placement:get$3(placementOption),strategy:get$3(strategyOption)}).then(position2=>{if(requestId!==updateRequestId||reference.current!==referenceNode||floating.current!==floatingNode)
return;if(isReferenceHidden(referenceNode)){set$1(middlewareData,{...get$3(middlewareData),hide:{...get$3(middlewareData).hide,referenceHidden:!0}},!0);return}if(!get$3(openOption)&&get$3(x)!==0&&get$3(y)!==0){const maxExpectedOffset=Math.max(Math.abs(get$3(sideOffsetOption)),Math.abs(get$3(alignOffsetOption)),15);if(position2.x<=maxExpectedOffset&&position2.y<=maxExpectedOffset)return}set$1(x,position2.x,!0),set$1(y,position2.y,!0),set$1(strategy,position2.strategy,!0),set$1(placement,position2.
placement,!0),set$1(middlewareData,position2.middlewareData,!0),set$1(isPositioned,!0)})}function cleanup(){typeof whileElementsMountedCleanup=="function"&&(whileElementsMountedCleanup(),whileElementsMountedCleanup=void 0),updateRequestId++}function attach2(){if(cleanup(),whileElementsMountedOption===void 0){update2();return}get$3(openOption)&&(reference.current===null||floating.current===null||(whileElementsMountedCleanup=whileElementsMountedOption(reference.current,floating.current,update2)))}
function reset2(){!get$3(openOption)&&floating.current===null&&set$1(isPositioned,!1)}function trackWhileMountedDeps(){return[get$3(middlewareOption),get$3(placementOption),get$3(strategyOption),get$3(sideOffsetOption),get$3(alignOffsetOption),get$3(openOption)]}return user_effect(()=>{whileElementsMountedOption===void 0&&get$3(openOption)&&update2()}),user_effect(attach2),user_effect(()=>{if(whileElementsMountedOption!==void 0){if(trackWhileMountedDeps(),!get$3(openOption)){hasWhileMountedPosition=
!1;return}if(!get$3(isPositioned)){hasWhileMountedPosition=!1;return}if(!hasWhileMountedPosition){hasWhileMountedPosition=!0;return}update2()}}),user_effect(reset2),user_effect(()=>cleanup),{floating,reference,get strategy(){return get$3(strategy)},get placement(){return get$3(placement)},get middlewareData(){return get$3(middlewareData)},get isPositioned(){return get$3(isPositioned)},get floatingStyles(){return get$3(floatingStyles)},get update(){return update2}}}function isReferenceHidden(node2){
return node2 instanceof Element?!node2.isConnected||node2 instanceof HTMLElement&&node2.hidden?!0:node2.getClientRects().length===0:!1}const OPPOSITE_SIDE={top:"bottom",right:"left",bottom:"top",left:"right"},FloatingRootContext=new Context$1("Floating.Root"),FloatingContentContext=new Context$1("Floating.Content"),FloatingTooltipRootContext=new Context$1("Floating.Root");class FloatingRootState{static create(tooltip=!1){return tooltip?FloatingTooltipRootContext.set(new FloatingRootState):FloatingRootContext.
set(new FloatingRootState)}anchorNode=simpleBox(null);customAnchorNode=simpleBox(null);triggerNode=simpleBox(null);constructor(){user_effect(()=>{this.customAnchorNode.current?typeof this.customAnchorNode.current=="string"?this.anchorNode.current=document.querySelector(this.customAnchorNode.current):this.anchorNode.current=this.customAnchorNode.current:this.anchorNode.current=this.triggerNode.current})}}class FloatingContentState{static create(opts,tooltip=!1){return tooltip?FloatingContentContext.
set(new FloatingContentState(opts,FloatingTooltipRootContext.get())):FloatingContentContext.set(new FloatingContentState(opts,FloatingRootContext.get()))}opts;root;contentRef=simpleBox(null);wrapperRef=simpleBox(null);arrowRef=simpleBox(null);contentAttachment=attachRef(this.contentRef);wrapperAttachment=attachRef(this.wrapperRef);arrowAttachment=attachRef(this.arrowRef);arrowId=simpleBox(useId());#transformedStyle=user_derived(()=>{if(typeof this.opts.style=="string")return cssToStyleObj(this.opts.
style);if(!this.opts.style)return{}});#updatePositionStrategy=void 0;#arrowSize=new ElementSize(()=>this.arrowRef.current??void 0);#arrowWidth=user_derived(()=>this.#arrowSize?.width??0);#arrowHeight=user_derived(()=>this.#arrowSize?.height??0);#desiredPlacement=user_derived(()=>this.opts.side?.current+(this.opts.align.current!=="center"?`-${this.opts.align.current}`:""));#boundary=user_derived(()=>Array.isArray(this.opts.collisionBoundary.current)?this.opts.collisionBoundary.current:[this.opts.
collisionBoundary.current]);#hasExplicitBoundaries=user_derived(()=>get$3(this.#boundary).length>0);get hasExplicitBoundaries(){return get$3(this.#hasExplicitBoundaries)}set hasExplicitBoundaries(value){set$1(this.#hasExplicitBoundaries,value)}#detectOverflowOptions=user_derived(()=>({padding:this.opts.collisionPadding.current,boundary:get$3(this.#boundary).filter(isNotNull),altBoundary:this.hasExplicitBoundaries}));get detectOverflowOptions(){return get$3(this.#detectOverflowOptions)}set detectOverflowOptions(value){
set$1(this.#detectOverflowOptions,value)}#availableWidth=state$1(void 0);#availableHeight=state$1(void 0);#anchorWidth=state$1(void 0);#anchorHeight=state$1(void 0);#middleware=user_derived(()=>[offset({mainAxis:this.opts.sideOffset.current+get$3(this.#arrowHeight),alignmentAxis:this.opts.alignOffset.current}),this.opts.avoidCollisions.current&&shift({mainAxis:!0,crossAxis:!1,limiter:this.opts.sticky.current==="partial"?limitShift():void 0,...this.detectOverflowOptions}),this.opts.avoidCollisions.
current&&flip({...this.detectOverflowOptions}),size({...this.detectOverflowOptions,apply:({rects,availableWidth,availableHeight})=>{const{width:anchorWidth,height:anchorHeight}=rects.reference;set$1(this.#availableWidth,availableWidth,!0),set$1(this.#availableHeight,availableHeight,!0),set$1(this.#anchorWidth,anchorWidth,!0),set$1(this.#anchorHeight,anchorHeight,!0)}}),this.arrowRef.current&&arrow({element:this.arrowRef.current,padding:this.opts.arrowPadding.current}),transformOrigin({arrowWidth:get$3(
this.#arrowWidth),arrowHeight:get$3(this.#arrowHeight)}),this.opts.hideWhenDetached.current&&hide({strategy:"referenceHidden",...this.detectOverflowOptions})].filter(Boolean));get middleware(){return get$3(this.#middleware)}set middleware(value){set$1(this.#middleware,value)}floating;#placedSide=user_derived(()=>getSideFromPlacement(this.floating.placement));get placedSide(){return get$3(this.#placedSide)}set placedSide(value){set$1(this.#placedSide,value)}#placedAlign=user_derived(()=>getAlignFromPlacement(
this.floating.placement));get placedAlign(){return get$3(this.#placedAlign)}set placedAlign(value){set$1(this.#placedAlign,value)}#arrowX=user_derived(()=>this.floating.middlewareData.arrow?.x??0);get arrowX(){return get$3(this.#arrowX)}set arrowX(value){set$1(this.#arrowX,value)}#arrowY=user_derived(()=>this.floating.middlewareData.arrow?.y??0);get arrowY(){return get$3(this.#arrowY)}set arrowY(value){set$1(this.#arrowY,value)}#cannotCenterArrow=user_derived(()=>this.floating.middlewareData.arrow?.
centerOffset!==0);get cannotCenterArrow(){return get$3(this.#cannotCenterArrow)}set cannotCenterArrow(value){set$1(this.#cannotCenterArrow,value)}#contentZIndex=state$1();get contentZIndex(){return get$3(this.#contentZIndex)}set contentZIndex(value){set$1(this.#contentZIndex,value,!0)}#arrowBaseSide=user_derived(()=>OPPOSITE_SIDE[this.placedSide]);get arrowBaseSide(){return get$3(this.#arrowBaseSide)}set arrowBaseSide(value){set$1(this.#arrowBaseSide,value)}#wrapperProps=user_derived(()=>({id:this.
opts.wrapperId.current,"data-bits-floating-content-wrapper":"",style:{...this.floating.floatingStyles,transform:this.floating.isPositioned?this.floating.floatingStyles.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:this.contentZIndex,"--bits-floating-transform-origin":`${this.floating.middlewareData.transformOrigin?.x} ${this.floating.middlewareData.transformOrigin?.y}`,"--bits-floating-available-width":`${get$3(this.#availableWidth)}px`,"--bits-floating-available-height":`${get$3(
this.#availableHeight)}px`,"--bits-floating-anchor-width":`${get$3(this.#anchorWidth)}px`,"--bits-floating-anchor-height":`${get$3(this.#anchorHeight)}px`,...this.floating.middlewareData.hide?.referenceHidden&&{visibility:"hidden","pointer-events":"none"},...get$3(this.#transformedStyle)},dir:this.opts.dir.current,...this.wrapperAttachment}));get wrapperProps(){return get$3(this.#wrapperProps)}set wrapperProps(value){set$1(this.#wrapperProps,value)}#props=user_derived(()=>({"data-side":this.placedSide,
"data-align":this.placedAlign,style:styleToString$1({...get$3(this.#transformedStyle)}),...this.contentAttachment}));get props(){return get$3(this.#props)}set props(value){set$1(this.#props,value)}#arrowStyle=user_derived(()=>({position:"absolute",left:this.arrowX?`${this.arrowX}px`:void 0,top:this.arrowY?`${this.arrowY}px`:void 0,[this.arrowBaseSide]:0,"transform-origin":{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[this.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%\
) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[this.placedSide],visibility:this.cannotCenterArrow?"hidden":void 0}));get arrowStyle(){return get$3(this.#arrowStyle)}set arrowStyle(value){set$1(this.#arrowStyle,value)}constructor(opts,root2){this.opts=opts,this.root=root2,this.#updatePositionStrategy=opts.updatePositionStrategy,opts.customAnchor&&(this.root.customAnchorNode.current=opts.customAnchor.current),watch$1(()=>opts.customAnchor.
current,customAnchor=>{this.root.customAnchorNode.current=customAnchor}),this.floating=useFloating({strategy:()=>this.opts.strategy.current,placement:()=>get$3(this.#desiredPlacement),middleware:()=>this.middleware,reference:this.root.anchorNode,whileElementsMounted:(...args)=>autoUpdate(...args,{animationFrame:this.#updatePositionStrategy?.current==="always"}),open:()=>this.opts.enabled.current,sideOffset:()=>this.opts.sideOffset.current,alignOffset:()=>this.opts.alignOffset.current}),user_effect(
()=>{this.floating.isPositioned&&this.opts.onPlaced?.current()}),watch$1(()=>this.contentRef.current,contentNode=>{if(!contentNode||!this.opts.enabled.current)return;const win=getWindow$1(contentNode),rafId=win.requestAnimationFrame(()=>{if(this.contentRef.current!==contentNode||!this.opts.enabled.current)return;const zIndex=win.getComputedStyle(contentNode).zIndex;zIndex!==this.contentZIndex&&(this.contentZIndex=zIndex)});return()=>{win.cancelAnimationFrame(rafId)}}),user_effect(()=>{this.floating.
floating.current=this.wrapperRef.current})}}class FloatingArrowState{static create(opts){return new FloatingArrowState(opts,FloatingContentContext.get())}opts;content;constructor(opts,content2){this.opts=opts,this.content=content2}#props=user_derived(()=>({id:this.opts.id.current,style:this.content.arrowStyle,"data-side":this.content.placedSide,...this.content.arrowAttachment}));get props(){return get$3(this.#props)}set props(value){set$1(this.#props,value)}}class FloatingAnchorState{static create(opts,tooltip=!1){
return tooltip?new FloatingAnchorState(opts,FloatingTooltipRootContext.get()):new FloatingAnchorState(opts,FloatingRootContext.get())}opts;root;constructor(opts,root2){this.opts=opts,this.root=root2,opts.virtualEl&&opts.virtualEl.current?root2.triggerNode=boxFrom$1(opts.virtualEl.current):root2.triggerNode=opts.ref}}function transformOrigin(options){return{name:"transformOrigin",options,fn(data){const{placement,rects,middlewareData}=data,isArrowHidden=middlewareData.arrow?.centerOffset!==0,arrowWidth=isArrowHidden?
0:options.arrowWidth,arrowHeight=isArrowHidden?0:options.arrowHeight,[placedSide,placedAlign]=getSideAndAlignFromPlacement(placement),noArrowAlign={start:"0%",center:"50%",end:"100%"}[placedAlign],arrowXCenter=(middlewareData.arrow?.x??0)+arrowWidth/2,arrowYCenter=(middlewareData.arrow?.y??0)+arrowHeight/2;let x="",y="";return placedSide==="bottom"?(x=isArrowHidden?noArrowAlign:`${arrowXCenter}px`,y=`${-arrowHeight}px`):placedSide==="top"?(x=isArrowHidden?noArrowAlign:`${arrowXCenter}px`,y=`${rects.
floating.height+arrowHeight}px`):placedSide==="right"?(x=`${-arrowHeight}px`,y=isArrowHidden?noArrowAlign:`${arrowYCenter}px`):placedSide==="left"&&(x=`${rects.floating.width+arrowHeight}px`,y=isArrowHidden?noArrowAlign:`${arrowYCenter}px`),{data:{x,y}}}}}function getSideAndAlignFromPlacement(placement){const[side,align="center"]=placement.split("-");return[side,align]}function getSideFromPlacement(placement){return getSideAndAlignFromPlacement(placement)[0]}function getAlignFromPlacement(placement){
return getSideAndAlignFromPlacement(placement)[1]}function Floating_layer($$anchor,$$props){push$1($$props,!0);let tooltip=prop($$props,"tooltip",3,!1);FloatingRootState.create(tooltip());var fragment=comment$2(),node2=first_child(fragment);snippet(node2,()=>$$props.children??noop$3),append($$anchor,fragment),pop()}class DataTypeahead{#opts;#candidateValues=user_derived(()=>this.#opts.candidateValues());#search;constructor(opts){this.#opts=opts,this.#search=boxAutoReset("",{afterMs:1e3,getWindow:this.#opts.
getWindow}),this.handleTypeaheadSearch=this.handleTypeaheadSearch.bind(this),this.resetTypeahead=this.resetTypeahead.bind(this)}handleTypeaheadSearch(key2){if(!this.#opts.enabled()||!get$3(this.#candidateValues).length)return;this.#search.current=this.#search.current+key2;const currentItem=this.#opts.getCurrentItem(),currentMatch=get$3(this.#candidateValues).find(item=>item===currentItem)??"",values=get$3(this.#candidateValues).map(item=>item??""),nextMatch=getNextMatch(values,this.#search.current,
currentMatch),newItem=get$3(this.#candidateValues).find(item=>item===nextMatch);return newItem&&this.#opts.onMatch(newItem),newItem}resetTypeahead(){this.#search.current=""}}const FIRST_KEYS=[ARROW_DOWN,PAGE_UP,HOME],LAST_KEYS=[ARROW_UP,PAGE_DOWN,END],FIRST_LAST_KEYS=[...FIRST_KEYS,...LAST_KEYS],selectAttrs=createBitsAttrs({component:"select",parts:["trigger","content","item","viewport","scroll-up-button","scroll-down-button","group","group-label","separator","arrow","input","content-wrapper","i\
tem-text","value"]}),SelectRootContext=new Context$1("Select.Root | Combobox.Root"),SelectContentContext=new Context$1("Select.Content | Combobox.Content");class SelectBaseRootState{opts;#touchedInput=state$1(!1);get touchedInput(){return get$3(this.#touchedInput)}set touchedInput(value){set$1(this.#touchedInput,value,!0)}#inputNode=state$1(null);get inputNode(){return get$3(this.#inputNode)}set inputNode(value){set$1(this.#inputNode,value,!0)}#contentNode=state$1(null);get contentNode(){return get$3(
this.#contentNode)}set contentNode(value){set$1(this.#contentNode,value,!0)}contentPresence;#viewportNode=state$1(null);get viewportNode(){return get$3(this.#viewportNode)}set viewportNode(value){set$1(this.#viewportNode,value,!0)}#triggerNode=state$1(null);get triggerNode(){return get$3(this.#triggerNode)}set triggerNode(value){set$1(this.#triggerNode,value,!0)}#valueNode=state$1(null);get valueNode(){return get$3(this.#valueNode)}set valueNode(value){set$1(this.#valueNode,value,!0)}#valueId=state$1(
"");get valueId(){return get$3(this.#valueId)}set valueId(value){set$1(this.#valueId,value,!0)}#highlightedNode=state$1(null);get highlightedNode(){return get$3(this.#highlightedNode)}set highlightedNode(value){set$1(this.#highlightedNode,value,!0)}#highlightedValue=user_derived(()=>this.highlightedNode?this.highlightedNode.getAttribute("data-value"):null);get highlightedValue(){return get$3(this.#highlightedValue)}set highlightedValue(value){set$1(this.#highlightedValue,value)}#highlightedId=user_derived(
()=>{if(this.highlightedNode)return this.highlightedNode.id});get highlightedId(){return get$3(this.#highlightedId)}set highlightedId(value){set$1(this.#highlightedId,value)}#highlightedLabel=user_derived(()=>this.highlightedNode?this.highlightedNode.getAttribute("data-label"):null);get highlightedLabel(){return get$3(this.#highlightedLabel)}set highlightedLabel(value){set$1(this.#highlightedLabel,value)}#contentIsPositioned=state$1(!1);get contentIsPositioned(){return get$3(this.#contentIsPositioned)}set contentIsPositioned(value){
set$1(this.#contentIsPositioned,value,!0)}isUsingKeyboard=!1;isCombobox=!1;domContext=new DOMContext(()=>null);constructor(opts){this.opts=opts,this.isCombobox=opts.isCombobox,this.contentPresence=new PresenceManager({ref:boxWith$1(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),user_pre_effect(()=>{this.opts.open.current||this.setHighlightedNode(null)})}setHighlightedNode(node2,initial=!1){this.highlightedNode=node2,node2&&
(this.isUsingKeyboard||initial)&&this.scrollHighlightedNodeIntoView(node2)}scrollHighlightedNodeIntoView(node2){!this.viewportNode||!this.contentIsPositioned||node2.scrollIntoView({block:this.opts.scrollAlignment.current})}getCandidateNodes(){const node2=this.contentNode;return node2?Array.from(node2.querySelectorAll(`[${this.getBitsAttr("item")}]:not([data-disabled])`)):[]}setHighlightedToFirstCandidate(initial=!1){this.setHighlightedNode(null);let nodes2=this.getCandidateNodes();if(nodes2.length){
if(this.viewportNode){const viewportRect=this.viewportNode.getBoundingClientRect();nodes2=nodes2.filter(node2=>{if(!this.viewportNode)return!1;const nodeRect=node2.getBoundingClientRect();return nodeRect.right<=viewportRect.right&&nodeRect.left>=viewportRect.left&&nodeRect.bottom<=viewportRect.bottom&&nodeRect.top>=viewportRect.top})}this.setHighlightedNode(nodes2[0],initial)}}getNodeByValue(value){return this.getCandidateNodes().find(node2=>node2.dataset.value===value)??null}getLabelForValue(value){
if(value==="")return"";const fromItems=this.opts.items.current.find(item=>item.value===value)?.label;if(fromItems!==void 0)return fromItems;const node2=this.getNodeByValue(value);if(node2){const dataLabel=node2.getAttribute("data-label");return dataLabel!==null&&dataLabel!==""?dataLabel:node2.textContent?.trim()??value}return value}setOpen(open2){this.opts.open.current=open2}toggleOpen(){this.opts.open.current=!this.opts.open.current}handleOpen(){this.setOpen(!0)}handleClose(){this.setHighlightedNode(
null),this.setOpen(!1)}toggleMenu(){this.toggleOpen()}getBitsAttr=part=>selectAttrs.getAttr(part,this.isCombobox?"combobox":void 0)}class SelectSingleRootState extends SelectBaseRootState{opts;isMulti=!1;#hasValue=user_derived(()=>this.opts.value.current!=="");get hasValue(){return get$3(this.#hasValue)}set hasValue(value){set$1(this.#hasValue,value)}#currentLabel=user_derived(()=>this.opts.items.current.length?this.opts.items.current.find(item=>item.value===this.opts.value.current)?.label??"":"");get currentLabel(){
return get$3(this.#currentLabel)}set currentLabel(value){set$1(this.#currentLabel,value)}#candidateLabels=user_derived(()=>this.opts.items.current.length?this.opts.items.current.filter(item=>!item.disabled).map(item=>item.label):[]);get candidateLabels(){return get$3(this.#candidateLabels)}set candidateLabels(value){set$1(this.#candidateLabels,value)}#dataTypeaheadEnabled=user_derived(()=>!(this.isMulti||this.opts.items.current.length===0));get dataTypeaheadEnabled(){return get$3(this.#dataTypeaheadEnabled)}set dataTypeaheadEnabled(value){
set$1(this.#dataTypeaheadEnabled,value)}constructor(opts){super(opts),this.opts=opts,user_effect(()=>{!this.opts.open.current&&this.highlightedNode&&this.setHighlightedNode(null)}),watch$1(()=>this.opts.open.current,()=>{this.opts.open.current&&this.setInitialHighlightedNode()})}includesItem(itemValue){return this.opts.value.current===itemValue}toggleItem(itemValue,itemLabel=itemValue){const newValue=this.includesItem(itemValue)?"":itemValue;this.opts.value.current=newValue,newValue!==""&&(this.
opts.inputValue.current=itemLabel)}setInitialHighlightedNode(){afterTick(()=>{if(!(this.highlightedNode&&this.domContext.getDocument().contains(this.highlightedNode))){if(this.opts.value.current!==""){const node2=this.getNodeByValue(this.opts.value.current);if(node2){this.setHighlightedNode(node2,!0);return}}this.setHighlightedToFirstCandidate(!0)}})}}class SelectMultipleRootState extends SelectBaseRootState{opts;isMulti=!0;#hasValue=user_derived(()=>this.opts.value.current.length>0);get hasValue(){
return get$3(this.#hasValue)}set hasValue(value){set$1(this.#hasValue,value)}constructor(opts){super(opts),this.opts=opts,user_effect(()=>{!this.opts.open.current&&this.highlightedNode&&this.setHighlightedNode(null)}),watch$1(()=>this.opts.open.current,()=>{this.opts.open.current&&this.setInitialHighlightedNode()})}includesItem(itemValue){return this.opts.value.current.includes(itemValue)}toggleItem(itemValue,itemLabel=itemValue){this.includesItem(itemValue)?this.opts.value.current=this.opts.value.
current.filter(v=>v!==itemValue):this.opts.value.current=[...this.opts.value.current,itemValue],this.opts.inputValue.current=itemLabel}setInitialHighlightedNode(){afterTick(()=>{if(this.domContext&&!(this.highlightedNode&&this.domContext.getDocument().contains(this.highlightedNode))){if(this.opts.value.current.length&&this.opts.value.current[0]!==""){const node2=this.getNodeByValue(this.opts.value.current[0]);if(node2){this.setHighlightedNode(node2,!0);return}}this.setHighlightedToFirstCandidate(
!0)}})}}class SelectRootState{static create(props){const{type:type2,...rest}=props,rootState=type2==="single"?new SelectSingleRootState(rest):new SelectMultipleRootState(rest);return SelectRootContext.set(rootState)}}class SelectTriggerState{static create(opts){return new SelectTriggerState(opts,SelectRootContext.get())}opts;root;attachment;#domTypeahead;#dataTypeahead;constructor(opts,root2){this.opts=opts,this.root=root2,this.attachment=attachRef(opts.ref,v=>this.root.triggerNode=v),this.root.
domContext=new DOMContext(opts.ref),this.#domTypeahead=new DOMTypeahead({getCurrentItem:()=>this.root.highlightedNode,onMatch:node2=>{this.root.setHighlightedNode(node2)},getActiveElement:()=>this.root.domContext.getActiveElement(),getWindow:()=>this.root.domContext.getWindow()}),this.#dataTypeahead=new DataTypeahead({getCurrentItem:()=>this.root.isMulti?"":this.root.currentLabel,onMatch:label=>{if(this.root.isMulti||!this.root.opts.items.current)return;const matchedItem=this.root.opts.items.current.
find(item=>item.label===label);matchedItem&&(this.root.opts.value.current=matchedItem.value)},enabled:()=>!this.root.isMulti&&this.root.dataTypeaheadEnabled,candidateValues:()=>this.root.isMulti?[]:this.root.candidateLabels,getWindow:()=>this.root.domContext.getWindow()}),this.onkeydown=this.onkeydown.bind(this),this.onpointerdown=this.onpointerdown.bind(this),this.onpointerup=this.onpointerup.bind(this),this.onclick=this.onclick.bind(this)}#handleOpen(){this.root.opts.open.current=!0,this.#dataTypeahead.
resetTypeahead(),this.#domTypeahead.resetTypeahead()}#handlePointerOpen(_){this.#handleOpen()}#handleKeyboardSelection(){const isCurrentSelectedValue=this.root.highlightedValue===this.root.opts.value.current;return!this.root.opts.allowDeselect.current&&isCurrentSelectedValue&&!this.root.isMulti?(this.root.handleClose(),!0):(this.root.highlightedValue!==null&&this.root.toggleItem(this.root.highlightedValue,this.root.highlightedLabel??void 0),!this.root.isMulti&&!isCurrentSelectedValue?(this.root.
handleClose(),!0):!1)}onkeydown(e){if(this.root.isUsingKeyboard=!0,(e.key===ARROW_UP||e.key===ARROW_DOWN)&&e.preventDefault(),!this.root.opts.open.current){if(e.key===ENTER||e.key===SPACE||e.key===ARROW_DOWN||e.key===ARROW_UP)e.preventDefault(),this.root.handleOpen();else if(!this.root.isMulti&&this.root.dataTypeaheadEnabled){this.#dataTypeahead.handleTypeaheadSearch(e.key);return}if(this.root.hasValue)return;const candidateNodes2=this.root.getCandidateNodes();if(!candidateNodes2.length)return;if(e.
key===ARROW_DOWN){const firstCandidate=candidateNodes2[0];this.root.setHighlightedNode(firstCandidate)}else if(e.key===ARROW_UP){const lastCandidate=candidateNodes2[candidateNodes2.length-1];this.root.setHighlightedNode(lastCandidate)}return}if(e.key===TAB){this.root.handleClose();return}if((e.key===ENTER||e.key===SPACE&&this.#domTypeahead.search==="")&&!e.isComposing&&(e.preventDefault(),this.#handleKeyboardSelection()))return;if(e.key===ARROW_UP&&e.altKey&&this.root.handleClose(),FIRST_LAST_KEYS.
includes(e.key)){e.preventDefault();const candidateNodes2=this.root.getCandidateNodes(),currHighlightedNode=this.root.highlightedNode,currIndex=currHighlightedNode?candidateNodes2.indexOf(currHighlightedNode):-1,loop2=this.root.opts.loop.current;let nextItem;if(e.key===ARROW_DOWN?nextItem=next(candidateNodes2,currIndex,loop2):e.key===ARROW_UP?nextItem=prev(candidateNodes2,currIndex,loop2):e.key===PAGE_DOWN?nextItem=forward(candidateNodes2,currIndex,10,loop2):e.key===PAGE_UP?nextItem=backward(candidateNodes2,
currIndex,10,loop2):e.key===HOME?nextItem=candidateNodes2[0]:e.key===END&&(nextItem=candidateNodes2[candidateNodes2.length-1]),!nextItem)return;this.root.setHighlightedNode(nextItem);return}const isModifierKey=e.ctrlKey||e.altKey||e.metaKey,isCharacterKey=e.key.length===1,isSpaceKey=e.key===SPACE,candidateNodes=this.root.getCandidateNodes();if(e.key!==TAB){if(!isModifierKey&&(isCharacterKey||isSpaceKey)){!this.#domTypeahead.handleTypeaheadSearch(e.key,candidateNodes)&&isSpaceKey&&(e.preventDefault(),
this.#handleKeyboardSelection());return}this.root.highlightedNode||this.root.setHighlightedToFirstCandidate()}}onclick(e){e.currentTarget.focus()}onpointerdown(e){if(this.root.opts.disabled.current)return;if(e.pointerType==="touch")return e.preventDefault();const target2=e.target;target2?.hasPointerCapture(e.pointerId)&&target2?.releasePointerCapture(e.pointerId),e.button===0&&e.ctrlKey===!1&&(this.root.opts.open.current===!1?this.#handlePointerOpen(e):this.root.handleClose())}onpointerup(e){this.
root.opts.disabled.current||(e.preventDefault(),e.pointerType==="touch"&&(this.root.opts.open.current===!1?this.#handlePointerOpen(e):this.root.handleClose()))}#props=user_derived(()=>({id:this.opts.id.current,disabled:this.root.opts.disabled.current?!0:void 0,"aria-haspopup":"listbox","aria-expanded":boolToStr(this.root.opts.open.current),"aria-activedescendant":this.root.highlightedId,"data-state":getDataOpenClosed(this.root.opts.open.current),"data-disabled":boolToEmptyStrOrUndef(this.root.opts.
disabled.current),"data-placeholder":this.root.hasValue?void 0:"",[this.root.getBitsAttr("trigger")]:"",onpointerdown:this.onpointerdown,onkeydown:this.onkeydown,onclick:this.onclick,onpointerup:this.onpointerup,...this.attachment}));get props(){return get$3(this.#props)}set props(value){set$1(this.#props,value)}}class SelectContentState{static create(opts){return SelectContentContext.set(new SelectContentState(opts,SelectRootContext.get()))}opts;root;attachment;#isPositioned=state$1(!1);get isPositioned(){
return get$3(this.#isPositioned)}set isPositioned(value){set$1(this.#isPositioned,value,!0)}domContext;constructor(opts,root2){this.opts=opts,this.root=root2,this.attachment=attachRef(opts.ref,v=>this.root.contentNode=v),this.domContext=new DOMContext(this.opts.ref),this.root.domContext===null&&(this.root.domContext=this.domContext),onDestroyEffect(()=>{this.root.contentNode=null,this.root.contentIsPositioned=!1,this.isPositioned=!1}),watch$1(()=>this.root.opts.open.current,()=>{this.root.opts.open.
current||(this.root.contentIsPositioned=!1,this.isPositioned=!1)}),watch$1([()=>this.isPositioned,()=>this.root.highlightedNode],()=>{!this.isPositioned||!this.root.highlightedNode||this.root.scrollHighlightedNodeIntoView(this.root.highlightedNode)}),this.onpointermove=this.onpointermove.bind(this)}onpointermove(_){this.root.isUsingKeyboard=!1}#styles=user_derived(()=>getFloatingContentCSSVars(this.root.isCombobox?"combobox":"select"));onInteractOutside=e=>{if(e.target===this.root.triggerNode||e.
target===this.root.inputNode){e.preventDefault();return}this.opts.onInteractOutside.current(e),!e.defaultPrevented&&this.root.handleClose()};onEscapeKeydown=e=>{this.opts.onEscapeKeydown.current(e),!e.defaultPrevented&&this.root.handleClose()};onOpenAutoFocus=e=>{e.preventDefault()};onCloseAutoFocus=e=>{e.preventDefault()};get shouldRender(){return this.root.contentPresence.shouldRender}#snippetProps=user_derived(()=>({open:this.root.opts.open.current}));get snippetProps(){return get$3(this.#snippetProps)}set snippetProps(value){
set$1(this.#snippetProps,value)}#props=user_derived(()=>({id:this.opts.id.current,role:"listbox","aria-multiselectable":this.root.isMulti?"true":void 0,"data-state":getDataOpenClosed(this.root.opts.open.current),...getDataTransitionAttrs(this.root.contentPresence.transitionStatus),[this.root.getBitsAttr("content")]:"",style:{display:"flex",flexDirection:"column",outline:"none",boxSizing:"border-box",pointerEvents:"auto",...get$3(this.#styles)},onpointermove:this.onpointermove,...this.attachment}));get props(){
return get$3(this.#props)}set props(value){set$1(this.#props,value)}popperProps={onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown,onOpenAutoFocus:this.onOpenAutoFocus,onCloseAutoFocus:this.onCloseAutoFocus,trapFocus:!1,loop:!1,onPlaced:()=>{this.root.opts.open.current&&(this.root.contentIsPositioned=!0,this.isPositioned=!0)}}}class SelectItemState{static create(opts){return new SelectItemState(opts,SelectRootContext.get())}opts;root;attachment;#isSelected=user_derived(
()=>this.root.includesItem(this.opts.value.current));get isSelected(){return get$3(this.#isSelected)}set isSelected(value){set$1(this.#isSelected,value)}#isHighlighted=user_derived(()=>this.root.highlightedValue===this.opts.value.current);get isHighlighted(){return get$3(this.#isHighlighted)}set isHighlighted(value){set$1(this.#isHighlighted,value)}prevHighlighted=new Previous(()=>this.isHighlighted);#mounted=state$1(!1);get mounted(){return get$3(this.#mounted)}set mounted(value){set$1(this.#mounted,
value,!0)}constructor(opts,root2){this.opts=opts,this.root=root2,this.attachment=attachRef(opts.ref),watch$1([()=>this.isHighlighted,()=>this.prevHighlighted.current],()=>{this.isHighlighted?this.opts.onHighlight.current():this.prevHighlighted.current&&this.opts.onUnhighlight.current()}),watch$1(()=>this.mounted,()=>{this.mounted&&this.root.setInitialHighlightedNode()}),this.onpointerdown=this.onpointerdown.bind(this),this.onpointerup=this.onpointerup.bind(this),this.onpointermove=this.onpointermove.
bind(this)}handleSelect(){if(this.opts.disabled.current)return;const isCurrentSelectedValue=this.opts.value.current===this.root.opts.value.current;if(!this.root.opts.allowDeselect.current&&isCurrentSelectedValue&&!this.root.isMulti){this.root.handleClose();return}this.root.toggleItem(this.opts.value.current,this.opts.label.current),!this.root.isMulti&&!isCurrentSelectedValue&&this.root.handleClose()}#snippetProps=user_derived(()=>({selected:this.isSelected,highlighted:this.isHighlighted}));get snippetProps(){
return get$3(this.#snippetProps)}set snippetProps(value){set$1(this.#snippetProps,value)}onpointerdown(e){e.preventDefault()}onpointerup(e){if(!(e.defaultPrevented||!this.opts.ref.current)){if(e.pointerType==="touch"&&!isIOS){on(this.opts.ref.current,"click",()=>{this.handleSelect(),this.root.setHighlightedNode(this.opts.ref.current)},{once:!0});return}e.preventDefault(),this.handleSelect(),e.pointerType==="touch"&&this.root.setHighlightedNode(this.opts.ref.current)}}onpointermove(e){e.pointerType!==
"touch"&&this.root.highlightedNode!==this.opts.ref.current&&this.root.setHighlightedNode(this.opts.ref.current)}#props=user_derived(()=>({id:this.opts.id.current,role:"option","aria-selected":this.root.includesItem(this.opts.value.current)?"true":void 0,"data-value":this.opts.value.current,"data-disabled":boolToEmptyStrOrUndef(this.opts.disabled.current),"data-highlighted":this.root.highlightedValue===this.opts.value.current&&!this.opts.disabled.current?"":void 0,"data-selected":this.root.includesItem(
this.opts.value.current)?"":void 0,"data-label":this.opts.label.current,[this.root.getBitsAttr("item")]:"",onpointermove:this.onpointermove,onpointerdown:this.onpointerdown,onpointerup:this.onpointerup,...this.attachment}));get props(){return get$3(this.#props)}set props(value){set$1(this.#props,value)}}class SelectHiddenInputState{static create(opts){return new SelectHiddenInputState(opts,SelectRootContext.get())}opts;root;#shouldRender=user_derived(()=>this.root.opts.name.current!=="");get shouldRender(){
return get$3(this.#shouldRender)}set shouldRender(value){set$1(this.#shouldRender,value)}constructor(opts,root2){this.opts=opts,this.root=root2,this.onfocus=this.onfocus.bind(this)}onfocus(e){e.preventDefault(),this.root.isCombobox?this.root.inputNode?.focus():this.root.triggerNode?.focus()}#props=user_derived(()=>({disabled:boolToTrueOrUndef(this.root.opts.disabled.current),required:boolToTrueOrUndef(this.root.opts.required.current),name:this.root.opts.name.current,value:this.opts.value.current,
onfocus:this.onfocus}));get props(){return get$3(this.#props)}set props(value){set$1(this.#props,value)}}class SelectViewportState{static create(opts){return new SelectViewportState(opts,SelectContentContext.get())}opts;content;root;attachment;#prevScrollTop=state$1(0);get prevScrollTop(){return get$3(this.#prevScrollTop)}set prevScrollTop(value){set$1(this.#prevScrollTop,value,!0)}constructor(opts,content2){this.opts=opts,this.content=content2,this.root=content2.root,this.attachment=attachRef(opts.
ref,v=>{this.root.viewportNode=v})}#props=user_derived(()=>({id:this.opts.id.current,role:"presentation",[this.root.getBitsAttr("viewport")]:"",style:{position:"relative",flex:1,overflow:"auto"},...this.attachment}));get props(){return get$3(this.#props)}set props(value){set$1(this.#props,value)}}class SelectScrollButtonImplState{opts;content;root;attachment;autoScrollTimer=null;userScrollTimer=-1;isUserScrolling=!1;onAutoScroll=noop$1;#mounted=state$1(!1);get mounted(){return get$3(this.#mounted)}set mounted(value){
set$1(this.#mounted,value,!0)}constructor(opts,content2){this.opts=opts,this.content=content2,this.root=content2.root,this.attachment=attachRef(opts.ref),watch$1([()=>this.mounted],()=>{if(!this.mounted){this.isUserScrolling=!1;return}this.isUserScrolling}),user_effect(()=>{this.mounted||this.clearAutoScrollInterval()}),this.onpointerdown=this.onpointerdown.bind(this),this.onpointermove=this.onpointermove.bind(this),this.onpointerleave=this.onpointerleave.bind(this)}handleUserScroll(){this.content.
domContext.clearTimeout(this.userScrollTimer),this.isUserScrolling=!0,this.userScrollTimer=this.content.domContext.setTimeout(()=>{this.isUserScrolling=!1},200)}clearAutoScrollInterval(){this.autoScrollTimer!==null&&(this.content.domContext.clearTimeout(this.autoScrollTimer),this.autoScrollTimer=null)}onpointerdown(_){if(this.autoScrollTimer!==null)return;const autoScroll=tick2=>{this.onAutoScroll(),this.autoScrollTimer=this.content.domContext.setTimeout(()=>autoScroll(tick2+1),this.opts.delay.current(
tick2))};this.autoScrollTimer=this.content.domContext.setTimeout(()=>autoScroll(1),this.opts.delay.current(0))}onpointermove(e){this.onpointerdown(e)}onpointerleave(_){this.clearAutoScrollInterval()}#props=user_derived(()=>({id:this.opts.id.current,"aria-hidden":boolToStrTrueOrUndef(!0),style:{flexShrink:0},onpointerdown:this.onpointerdown,onpointermove:this.onpointermove,onpointerleave:this.onpointerleave,...this.attachment}));get props(){return get$3(this.#props)}set props(value){set$1(this.#props,
value)}}class SelectScrollDownButtonState{static create(opts){return new SelectScrollDownButtonState(new SelectScrollButtonImplState(opts,SelectContentContext.get()))}scrollButtonState;content;root;#canScrollDown=state$1(!1);get canScrollDown(){return get$3(this.#canScrollDown)}set canScrollDown(value){set$1(this.#canScrollDown,value,!0)}scrollIntoViewTimer=null;constructor(scrollButtonState){this.scrollButtonState=scrollButtonState,this.content=scrollButtonState.content,this.root=scrollButtonState.
root,this.scrollButtonState.onAutoScroll=this.handleAutoScroll,watch$1([()=>this.root.viewportNode,()=>this.content.isPositioned],()=>{if(!(!this.root.viewportNode||!this.content.isPositioned))return this.handleScroll(!0),on(this.root.viewportNode,"scroll",()=>this.handleScroll())}),watch$1([()=>this.root.opts.inputValue.current,()=>this.root.viewportNode,()=>this.content.isPositioned],()=>{!this.root.viewportNode||!this.content.isPositioned||this.handleScroll(!0)}),watch$1(()=>this.scrollButtonState.
mounted,()=>{this.scrollButtonState.mounted&&(this.scrollIntoViewTimer&&clearTimeout(this.scrollIntoViewTimer),this.scrollIntoViewTimer=afterSleep(5,()=>{const activeItem=this.root.highlightedNode;activeItem&&this.root.scrollHighlightedNodeIntoView(activeItem)}))})}handleScroll=(manual=!1)=>{if(manual||this.scrollButtonState.handleUserScroll(),!this.root.viewportNode)return;const maxScroll=this.root.viewportNode.scrollHeight-this.root.viewportNode.clientHeight,paddingTop=Number.parseInt(getComputedStyle(
this.root.viewportNode).paddingTop,10);this.canScrollDown=Math.ceil(this.root.viewportNode.scrollTop)<maxScroll-paddingTop};handleAutoScroll=()=>{const viewport=this.root.viewportNode,selectedItem=this.root.highlightedNode;!viewport||!selectedItem||(viewport.scrollTop=viewport.scrollTop+selectedItem.offsetHeight)};#props=user_derived(()=>({...this.scrollButtonState.props,[this.root.getBitsAttr("scroll-down-button")]:""}));get props(){return get$3(this.#props)}set props(value){set$1(this.#props,value)}}
class SelectScrollUpButtonState{static create(opts){return new SelectScrollUpButtonState(new SelectScrollButtonImplState(opts,SelectContentContext.get()))}scrollButtonState;content;root;#canScrollUp=state$1(!1);get canScrollUp(){return get$3(this.#canScrollUp)}set canScrollUp(value){set$1(this.#canScrollUp,value,!0)}constructor(scrollButtonState){this.scrollButtonState=scrollButtonState,this.content=scrollButtonState.content,this.root=scrollButtonState.root,this.scrollButtonState.onAutoScroll=this.
handleAutoScroll,watch$1([()=>this.root.viewportNode,()=>this.content.isPositioned],()=>{if(!(!this.root.viewportNode||!this.content.isPositioned))return this.handleScroll(!0),on(this.root.viewportNode,"scroll",()=>this.handleScroll())})}handleScroll=(manual=!1)=>{if(manual||this.scrollButtonState.handleUserScroll(),!this.root.viewportNode)return;const paddingTop=Number.parseInt(getComputedStyle(this.root.viewportNode).paddingTop,10);this.canScrollUp=this.root.viewportNode.scrollTop-paddingTop>.1};handleAutoScroll=()=>{
!this.root.viewportNode||!this.root.highlightedNode||(this.root.viewportNode.scrollTop=this.root.viewportNode.scrollTop-this.root.highlightedNode.offsetHeight)};#props=user_derived(()=>({...this.scrollButtonState.props,[this.root.getBitsAttr("scroll-up-button")]:""}));get props(){return get$3(this.#props)}set props(value){set$1(this.#props,value)}}function Select_hidden_input($$anchor,$$props){push$1($$props,!0);let value=prop($$props,"value",15);const hiddenInputState=SelectHiddenInputState.create(
{value:boxWith$1(()=>value())});var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{Hidden_input($$anchor2,spread_props(()=>hiddenInputState.props,{get autocomplete(){return $$props.autocomplete},get value(){return value()},set value($$value){value($$value)}}))};if_block(node2,$$render=>{hiddenInputState.shouldRender&&$$render(consequent)})}append($$anchor,fragment),pop()}function Floating_layer_anchor($$anchor,$$props){push$1($$props,!0);let tooltip=prop($$props,"to\
oltip",3,!1);FloatingAnchorState.create({id:boxWith$1(()=>$$props.id),virtualEl:boxWith$1(()=>$$props.virtualEl),ref:$$props.ref},tooltip());var fragment=comment$2(),node2=first_child(fragment);snippet(node2,()=>$$props.children??noop$3),append($$anchor,fragment),pop()}var root_4$M=from_svg('<svg viewBox="0 0 30 10" preserveAspectRatio="none" data-arrow=""><polygon points="0,0 30,0 15,10" fill="currentColor"></polygon></svg>'),root_2$1u=from_html("<span><!></span>");function Arrow($$anchor,$$props){
push$1($$props,!0);let id2=prop($$props,"id",19,useId),width=prop($$props,"width",3,10),height=prop($$props,"height",3,5),restProps=rest_props($$props,["$$slots","$$events","$$legacy","id","children","child","width","height"]);const mergedProps=user_derived(()=>mergeProps(restProps,{id:id2()}));var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);snippet(node_1,()=>$$props.child,()=>({props:get$3(mergedProps)})),
append($$anchor2,fragment_1)},alternate_1=$$anchor2=>{var span=root_2$1u();attribute_effect(span,()=>({...get$3(mergedProps)}));var node_2=child(span);{var consequent_1=$$anchor3=>{var fragment_2=comment$2(),node_3=first_child(fragment_2);snippet(node_3,()=>$$props.children??noop$3),append($$anchor3,fragment_2)},alternate=$$anchor3=>{var svg2=root_4$M();template_effect(()=>{set_attribute(svg2,"width",width()),set_attribute(svg2,"height",height())}),append($$anchor3,svg2)};if_block(node_2,$$render=>{
$$props.children?$$render(consequent_1):$$render(alternate,-1)})}reset(span),append($$anchor2,span)};if_block(node2,$$render=>{$$props.child?$$render(consequent):$$render(alternate_1,-1)})}append($$anchor,fragment),pop()}function Floating_layer_arrow($$anchor,$$props){push$1($$props,!0);let id2=prop($$props,"id",19,useId),ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","id","ref"]);const arrowState=FloatingArrowState.create({id:boxWith$1(()=>id2()),
ref:boxWith$1(()=>ref2(),v=>ref2(v))}),mergedProps=user_derived(()=>mergeProps(restProps,arrowState.props));Arrow($$anchor,spread_props(()=>get$3(mergedProps))),pop()}function Floating_layer_content($$anchor,$$props){push$1($$props,!0);let side=prop($$props,"side",3,"bottom"),sideOffset=prop($$props,"sideOffset",3,0),align=prop($$props,"align",3,"center"),alignOffset=prop($$props,"alignOffset",3,0),arrowPadding=prop($$props,"arrowPadding",3,0),avoidCollisions=prop($$props,"avoidCollisions",3,!0),
collisionBoundary=prop($$props,"collisionBoundary",19,()=>[]),collisionPadding=prop($$props,"collisionPadding",3,0),hideWhenDetached=prop($$props,"hideWhenDetached",3,!1),onPlaced=prop($$props,"onPlaced",3,()=>{}),sticky=prop($$props,"sticky",3,"partial"),updatePositionStrategy=prop($$props,"updatePositionStrategy",3,"optimized"),strategy=prop($$props,"strategy",3,"fixed"),dir=prop($$props,"dir",3,"ltr"),style2=prop($$props,"style",19,()=>({})),wrapperId=prop($$props,"wrapperId",19,useId),customAnchor=prop(
$$props,"customAnchor",3,null),tooltip=prop($$props,"tooltip",3,!1);const contentState=FloatingContentState.create({side:boxWith$1(()=>side()),sideOffset:boxWith$1(()=>sideOffset()),align:boxWith$1(()=>align()),alignOffset:boxWith$1(()=>alignOffset()),id:boxWith$1(()=>$$props.id),arrowPadding:boxWith$1(()=>arrowPadding()),avoidCollisions:boxWith$1(()=>avoidCollisions()),collisionBoundary:boxWith$1(()=>collisionBoundary()),collisionPadding:boxWith$1(()=>collisionPadding()),hideWhenDetached:boxWith$1(
()=>hideWhenDetached()),onPlaced:boxWith$1(()=>onPlaced()),sticky:boxWith$1(()=>sticky()),updatePositionStrategy:boxWith$1(()=>updatePositionStrategy()),strategy:boxWith$1(()=>strategy()),dir:boxWith$1(()=>dir()),style:boxWith$1(()=>style2()),enabled:boxWith$1(()=>$$props.enabled),wrapperId:boxWith$1(()=>wrapperId()),customAnchor:boxWith$1(()=>customAnchor())},tooltip()),mergedProps=user_derived(()=>mergeProps(contentState.wrapperProps,{style:{pointerEvents:"auto"}}));var fragment=comment$2(),node2=first_child(
fragment);snippet(node2,()=>$$props.content??noop$3,()=>({props:contentState.props,wrapperProps:get$3(mergedProps)})),append($$anchor,fragment),pop()}function Floating_layer_content_static($$anchor,$$props){push$1($$props,!0),onMount$1(()=>{$$props.onPlaced?.()});var fragment=comment$2(),node2=first_child(fragment);snippet(node2,()=>$$props.content??noop$3,()=>({props:{},wrapperProps:{}})),append($$anchor,fragment),pop()}function Popper_content($$anchor,$$props){let isStatic=prop($$props,"isStat\
ic",3,!1),restProps=rest_props($$props,["$$slots","$$events","$$legacy","content","isStatic","onPlaced"]);var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{Floating_layer_content_static($$anchor2,{get content(){return $$props.content},get onPlaced(){return $$props.onPlaced}})},alternate=$$anchor2=>{Floating_layer_content($$anchor2,spread_props({get content(){return $$props.content},get onPlaced(){return $$props.onPlaced}},()=>restProps))};if_block(node2,$$render=>{
isStatic()?$$render(consequent):$$render(alternate,-1)})}append($$anchor,fragment)}var root_1$1c=from_html("<!> <!>",1);function Popper_layer_inner($$anchor,$$props){push$1($$props,!0);let interactOutsideBehavior=prop($$props,"interactOutsideBehavior",3,"close"),trapFocus=prop($$props,"trapFocus",3,!0),isValidEvent2=prop($$props,"isValidEvent",3,()=>!1),customAnchor=prop($$props,"customAnchor",3,null),isStatic=prop($$props,"isStatic",3,!1),tooltip=prop($$props,"tooltip",3,!1),contentPointerEvents=prop(
$$props,"contentPointerEvents",3,"auto"),restProps=rest_props($$props,["$$slots","$$events","$$legacy","popper","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAut\
oFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic","enabled","ref","tooltip","contentPointerEvents"]);const resolvedPreventScroll=user_derived(()=>$$props.preventScroll??!0),effectiveStrategy=user_derived(()=>$$props.strategy??(get$3(resolvedPreventScroll)?"fixed":"absolute"));Popper_content($$anchor,{get isStatic(){return isStatic()},get id(){return $$props.id},get side(){return $$props.side},get sideOffset(){return $$props.sideOffset},
get align(){return $$props.align},get alignOffset(){return $$props.alignOffset},get arrowPadding(){return $$props.arrowPadding},get avoidCollisions(){return $$props.avoidCollisions},get collisionBoundary(){return $$props.collisionBoundary},get collisionPadding(){return $$props.collisionPadding},get sticky(){return $$props.sticky},get hideWhenDetached(){return $$props.hideWhenDetached},get updatePositionStrategy(){return $$props.updatePositionStrategy},get strategy(){return get$3(effectiveStrategy)},
get dir(){return $$props.dir},get wrapperId(){return $$props.wrapperId},get style(){return $$props.style},get onPlaced(){return $$props.onPlaced},get customAnchor(){return customAnchor()},get enabled(){return $$props.enabled},get tooltip(){return tooltip()},content:($$anchor2,$$arg0)=>{let floatingProps=()=>$$arg0?.().props,wrapperProps=()=>$$arg0?.().wrapperProps;var fragment_1=root_1$1c(),node2=first_child(fragment_1);{var consequent=$$anchor3=>{Scroll_lock($$anchor3,{get preventScroll(){return get$3(
resolvedPreventScroll)}})},consequent_1=$$anchor3=>{Scroll_lock($$anchor3,{get preventScroll(){return get$3(resolvedPreventScroll)}})};if_block(node2,$$render=>{$$props.forceMount&&$$props.enabled?$$render(consequent):$$props.forceMount||$$render(consequent_1,1)})}var node_1=sibling(node2,2);Focus_scope(node_1,{get onOpenAutoFocus(){return $$props.onOpenAutoFocus},get onCloseAutoFocus(){return $$props.onCloseAutoFocus},get loop(){return $$props.loop},get enabled(){return $$props.enabled},get trapFocus(){
return trapFocus()},get forceMount(){return $$props.forceMount},get ref(){return $$props.ref},focusScope:($$anchor3,$$arg02)=>{let focusScopeProps=()=>$$arg02?.().props;Escape_layer($$anchor3,{get onEscapeKeydown(){return $$props.onEscapeKeydown},get escapeKeydownBehavior(){return $$props.escapeKeydownBehavior},get enabled(){return $$props.enabled},get ref(){return $$props.ref},children:($$anchor4,$$slotProps)=>{Dismissible_layer($$anchor4,{get id(){return $$props.id},get onInteractOutside(){return $$props.
onInteractOutside},get onFocusOutside(){return $$props.onFocusOutside},get interactOutsideBehavior(){return interactOutsideBehavior()},get isValidEvent(){return isValidEvent2()},get enabled(){return $$props.enabled},get ref(){return $$props.ref},children:($$anchor5,$$arg03)=>{let dismissibleProps=()=>$$arg03?.().props;Text_selection_layer($$anchor5,{get id(){return $$props.id},get preventOverflowTextSelection(){return $$props.preventOverflowTextSelection},get onPointerDown(){return $$props.onPointerDown},
get onPointerUp(){return $$props.onPointerUp},get enabled(){return $$props.enabled},get ref(){return $$props.ref},children:($$anchor6,$$slotProps2)=>{var fragment_7=comment$2(),node_2=first_child(fragment_7);{let $0=user_derived(()=>({props:mergeProps(restProps,floatingProps(),dismissibleProps(),focusScopeProps(),{style:{pointerEvents:contentPointerEvents()}}),wrapperProps:wrapperProps()}));snippet(node_2,()=>$$props.popper??noop$3,()=>get$3($0))}append($$anchor6,fragment_7)},$$slots:{default:!0}})},
$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{focusScope:!0}}),append($$anchor2,fragment_1)},$$slots:{content:!0}}),pop()}function Popper_layer($$anchor,$$props){let interactOutsideBehavior=prop($$props,"interactOutsideBehavior",3,"close"),trapFocus=prop($$props,"trapFocus",3,!0),isValidEvent2=prop($$props,"isValidEvent",3,()=>!1),customAnchor=prop($$props,"customAnchor",3,null),isStatic=prop($$props,"isStatic",3,!1),restProps=rest_props($$props,["$$slots","$$events","$$legacy","poppe\
r","open","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","i\
sStatic","ref","shouldRender"]);var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{Popper_layer_inner($$anchor2,spread_props({get popper(){return $$props.popper},get onEscapeKeydown(){return $$props.onEscapeKeydown},get escapeKeydownBehavior(){return $$props.escapeKeydownBehavior},get preventOverflowTextSelection(){return $$props.preventOverflowTextSelection},get id(){return $$props.id},get onPointerDown(){return $$props.onPointerDown},get onPointerUp(){return $$props.
onPointerUp},get side(){return $$props.side},get sideOffset(){return $$props.sideOffset},get align(){return $$props.align},get alignOffset(){return $$props.alignOffset},get arrowPadding(){return $$props.arrowPadding},get avoidCollisions(){return $$props.avoidCollisions},get collisionBoundary(){return $$props.collisionBoundary},get collisionPadding(){return $$props.collisionPadding},get sticky(){return $$props.sticky},get hideWhenDetached(){return $$props.hideWhenDetached},get updatePositionStrategy(){
return $$props.updatePositionStrategy},get strategy(){return $$props.strategy},get dir(){return $$props.dir},get preventScroll(){return $$props.preventScroll},get wrapperId(){return $$props.wrapperId},get style(){return $$props.style},get onPlaced(){return $$props.onPlaced},get customAnchor(){return customAnchor()},get isStatic(){return isStatic()},get enabled(){return $$props.open},get onInteractOutside(){return $$props.onInteractOutside},get onCloseAutoFocus(){return $$props.onCloseAutoFocus},
get onOpenAutoFocus(){return $$props.onOpenAutoFocus},get interactOutsideBehavior(){return interactOutsideBehavior()},get loop(){return $$props.loop},get trapFocus(){return trapFocus()},get isValidEvent(){return isValidEvent2()},get onFocusOutside(){return $$props.onFocusOutside},forceMount:!1,get ref(){return $$props.ref}},()=>restProps))};if_block(node2,$$render=>{$$props.shouldRender&&$$render(consequent)})}append($$anchor,fragment)}function Popper_layer_force_mount($$anchor,$$props){let interactOutsideBehavior=prop(
$$props,"interactOutsideBehavior",3,"close"),trapFocus=prop($$props,"trapFocus",3,!0),isValidEvent2=prop($$props,"isValidEvent",3,()=>!1),customAnchor=prop($$props,"customAnchor",3,null),isStatic=prop($$props,"isStatic",3,!1),restProps=rest_props($$props,["$$slots","$$events","$$legacy","popper","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary",
"collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic","enabled"]);Popper_layer_inner($$anchor,spread_props({get popper(){return $$props.popper},get onEscapeKeydown(){return $$props.onEscapeKeydown},get escapeKeydownBehavior(){return $$props.escapeKeydownBehavior},
get preventOverflowTextSelection(){return $$props.preventOverflowTextSelection},get id(){return $$props.id},get onPointerDown(){return $$props.onPointerDown},get onPointerUp(){return $$props.onPointerUp},get side(){return $$props.side},get sideOffset(){return $$props.sideOffset},get align(){return $$props.align},get alignOffset(){return $$props.alignOffset},get arrowPadding(){return $$props.arrowPadding},get avoidCollisions(){return $$props.avoidCollisions},get collisionBoundary(){return $$props.
collisionBoundary},get collisionPadding(){return $$props.collisionPadding},get sticky(){return $$props.sticky},get hideWhenDetached(){return $$props.hideWhenDetached},get updatePositionStrategy(){return $$props.updatePositionStrategy},get strategy(){return $$props.strategy},get dir(){return $$props.dir},get preventScroll(){return $$props.preventScroll},get wrapperId(){return $$props.wrapperId},get style(){return $$props.style},get onPlaced(){return $$props.onPlaced},get customAnchor(){return customAnchor()},
get isStatic(){return isStatic()},get enabled(){return $$props.enabled},get onInteractOutside(){return $$props.onInteractOutside},get onCloseAutoFocus(){return $$props.onCloseAutoFocus},get onOpenAutoFocus(){return $$props.onOpenAutoFocus},get interactOutsideBehavior(){return interactOutsideBehavior()},get loop(){return $$props.loop},get trapFocus(){return trapFocus()},get isValidEvent(){return isValidEvent2()},get onFocusOutside(){return $$props.onFocusOutside}},()=>restProps,{forceMount:!0}))}
var root_4$L=from_html("<div><div><!></div></div>"),root_8$z=from_html("<div><div><!></div></div>");function Select_content$1($$anchor,$$props){const uid2=props_id();push$1($$props,!0);let id2=prop($$props,"id",19,()=>createId(uid2)),ref2=prop($$props,"ref",15,null),forceMount=prop($$props,"forceMount",3,!1),side=prop($$props,"side",3,"bottom"),onInteractOutside=prop($$props,"onInteractOutside",3,noop$1),onEscapeKeydown=prop($$props,"onEscapeKeydown",3,noop$1),preventScroll=prop($$props,"prevent\
Scroll",3,!1),restProps=rest_props($$props,["$$slots","$$events","$$legacy","id","ref","forceMount","side","onInteractOutside","onEscapeKeydown","children","child","preventScroll","style"]);const contentState=SelectContentState.create({id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v)),onInteractOutside:boxWith$1(()=>onInteractOutside()),onEscapeKeydown:boxWith$1(()=>onEscapeKeydown())}),mergedProps=user_derived(()=>mergeProps(restProps,contentState.props));var fragment=comment$2(),node2=first_child(
fragment);{var consequent_1=$$anchor2=>{Popper_layer_force_mount($$anchor2,spread_props(()=>get$3(mergedProps),()=>contentState.popperProps,{get ref(){return contentState.opts.ref},get side(){return side()},get enabled(){return contentState.root.opts.open.current},get id(){return id2()},get preventScroll(){return preventScroll()},forceMount:!0,get shouldRender(){return contentState.shouldRender},popper:($$anchor3,$$arg0)=>{let props=()=>$$arg0?.().props,wrapperProps=()=>$$arg0?.().wrapperProps;const finalProps=user_derived(
()=>mergeProps(props(),{style:contentState.props.style},{style:$$props.style}));var fragment_2=comment$2(),node_1=first_child(fragment_2);{var consequent=$$anchor4=>{var fragment_3=comment$2(),node_2=first_child(fragment_3);{let $0=user_derived(()=>({props:get$3(finalProps),wrapperProps:wrapperProps(),...contentState.snippetProps}));snippet(node_2,()=>$$props.child,()=>get$3($0))}append($$anchor4,fragment_3)},alternate=$$anchor4=>{var div=root_4$L();attribute_effect(div,()=>({...wrapperProps()}));
var div_1=child(div);attribute_effect(div_1,()=>({...get$3(finalProps)}));var node_3=child(div_1);snippet(node_3,()=>$$props.children??noop$3),reset(div_1),reset(div),append($$anchor4,div)};if_block(node_1,$$render=>{$$props.child?$$render(consequent):$$render(alternate,-1)})}append($$anchor3,fragment_2)},$$slots:{popper:!0}}))},consequent_3=$$anchor2=>{Popper_layer($$anchor2,spread_props(()=>get$3(mergedProps),()=>contentState.popperProps,{get ref(){return contentState.opts.ref},get side(){return side()},
get open(){return contentState.root.opts.open.current},get id(){return id2()},get preventScroll(){return preventScroll()},forceMount:!1,get shouldRender(){return contentState.shouldRender},popper:($$anchor3,$$arg0)=>{let props=()=>$$arg0?.().props,wrapperProps=()=>$$arg0?.().wrapperProps;const finalProps=user_derived(()=>mergeProps(props(),{style:contentState.props.style},{style:$$props.style}));var fragment_5=comment$2(),node_4=first_child(fragment_5);{var consequent_2=$$anchor4=>{var fragment_6=comment$2(),
node_5=first_child(fragment_6);{let $0=user_derived(()=>({props:get$3(finalProps),wrapperProps:wrapperProps(),...contentState.snippetProps}));snippet(node_5,()=>$$props.child,()=>get$3($0))}append($$anchor4,fragment_6)},alternate_1=$$anchor4=>{var div_2=root_8$z();attribute_effect(div_2,()=>({...wrapperProps()}));var div_3=child(div_2);attribute_effect(div_3,()=>({...get$3(finalProps)}));var node_6=child(div_3);snippet(node_6,()=>$$props.children??noop$3),reset(div_3),reset(div_2),append($$anchor4,
div_2)};if_block(node_4,$$render=>{$$props.child?$$render(consequent_2):$$render(alternate_1,-1)})}append($$anchor3,fragment_5)},$$slots:{popper:!0}}))};if_block(node2,$$render=>{forceMount()?$$render(consequent_1):forceMount()||$$render(consequent_3,1)})}append($$anchor,fragment),pop()}function Mounted($$anchor,$$props){push$1($$props,!0);let mounted=prop($$props,"mounted",15,!1),onMountedChange=prop($$props,"onMountedChange",3,noop$1);onMountEffect(()=>(mounted(!0),onMountedChange()(!0),()=>{mounted(
!1),onMountedChange()(!1)})),pop()}var root_2$1t=from_html("<div><!></div>"),root$1Z=from_html("<!> <!>",1);function Select_item$1($$anchor,$$props){const uid2=props_id();push$1($$props,!0);let id2=prop($$props,"id",19,()=>createId(uid2)),ref2=prop($$props,"ref",15,null),label=prop($$props,"label",19,()=>$$props.value),disabled=prop($$props,"disabled",3,!1),onHighlight=prop($$props,"onHighlight",3,noop$1),onUnhighlight=prop($$props,"onUnhighlight",3,noop$1),restProps=rest_props($$props,["$$slots",
"$$events","$$legacy","id","ref","value","label","disabled","children","child","onHighlight","onUnhighlight"]);const itemState=SelectItemState.create({id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v)),value:boxWith$1(()=>$$props.value),disabled:boxWith$1(()=>disabled()),label:boxWith$1(()=>label()),onHighlight:boxWith$1(()=>onHighlight()),onUnhighlight:boxWith$1(()=>onUnhighlight())}),mergedProps=user_derived(()=>mergeProps(restProps,itemState.props));var fragment=root$1Z(),node2=first_child(
fragment);{var consequent=$$anchor2=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);{let $0=user_derived(()=>({props:get$3(mergedProps),...itemState.snippetProps}));snippet(node_1,()=>$$props.child,()=>get$3($0))}append($$anchor2,fragment_1)},alternate=$$anchor2=>{var div=root_2$1t();attribute_effect(div,()=>({...get$3(mergedProps)}));var node_2=child(div);snippet(node_2,()=>$$props.children??noop$3,()=>itemState.snippetProps),reset(div),append($$anchor2,div)};if_block(node2,$$render=>{
$$props.child?$$render(consequent):$$render(alternate,-1)})}var node_3=sibling(node2,2);Mounted(node_3,{get mounted(){return itemState.mounted},set mounted($$value){itemState.mounted=$$value}}),append($$anchor,fragment),pop()}var root_2$1s=from_html("<div><!></div>");function Select_viewport($$anchor,$$props){const uid2=props_id();push$1($$props,!0);let id2=prop($$props,"id",19,()=>createId(uid2)),ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","id",
"ref","children","child"]);const viewportState=SelectViewportState.create({id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v))}),mergedProps=user_derived(()=>mergeProps(restProps,viewportState.props));var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);snippet(node_1,()=>$$props.child,()=>({props:get$3(mergedProps)})),append($$anchor2,fragment_1)},alternate=$$anchor2=>{var div=root_2$1s();attribute_effect(
div,()=>({...get$3(mergedProps)}));var node_2=child(div);snippet(node_2,()=>$$props.children??noop$3),reset(div),append($$anchor2,div)};if_block(node2,$$render=>{$$props.child?$$render(consequent):$$render(alternate,-1)})}append($$anchor,fragment),pop()}var root_3$14=from_html("<div><!></div>"),root_1$1b=from_html("<!> <!>",1);function Select_scroll_down_button$1($$anchor,$$props){const uid2=props_id();push$1($$props,!0);let id2=prop($$props,"id",19,()=>createId(uid2)),ref2=prop($$props,"ref",15,
null),delay=prop($$props,"delay",3,()=>50),restProps=rest_props($$props,["$$slots","$$events","$$legacy","id","ref","delay","child","children"]);const scrollButtonState=SelectScrollDownButtonState.create({id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v)),delay:boxWith$1(()=>delay())}),mergedProps=user_derived(()=>mergeProps(restProps,scrollButtonState.props));var fragment=comment$2(),node2=first_child(fragment);{var consequent_1=$$anchor2=>{var fragment_1=root_1$1b(),node_1=first_child(
fragment_1);Mounted(node_1,{get mounted(){return scrollButtonState.scrollButtonState.mounted},set mounted($$value){scrollButtonState.scrollButtonState.mounted=$$value}});var node_2=sibling(node_1,2);{var consequent=$$anchor3=>{var fragment_2=comment$2(),node_3=first_child(fragment_2);snippet(node_3,()=>$$props.child,()=>({props:restProps})),append($$anchor3,fragment_2)},alternate=$$anchor3=>{var div=root_3$14();attribute_effect(div,()=>({...get$3(mergedProps)}));var node_4=child(div);snippet(node_4,
()=>$$props.children??noop$3),reset(div),append($$anchor3,div)};if_block(node_2,$$render=>{$$props.child?$$render(consequent):$$render(alternate,-1)})}append($$anchor2,fragment_1)};if_block(node2,$$render=>{scrollButtonState.canScrollDown&&$$render(consequent_1)})}append($$anchor,fragment),pop()}var root_3$13=from_html("<div><!></div>"),root_1$1a=from_html("<!> <!>",1);function Select_scroll_up_button$1($$anchor,$$props){const uid2=props_id();push$1($$props,!0);let id2=prop($$props,"id",19,()=>createId(
uid2)),ref2=prop($$props,"ref",15,null),delay=prop($$props,"delay",3,()=>50),restProps=rest_props($$props,["$$slots","$$events","$$legacy","id","ref","delay","child","children"]);const scrollButtonState=SelectScrollUpButtonState.create({id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v)),delay:boxWith$1(()=>delay())}),mergedProps=user_derived(()=>mergeProps(restProps,scrollButtonState.props));var fragment=comment$2(),node2=first_child(fragment);{var consequent_1=$$anchor2=>{var fragment_1=root_1$1a(),
node_1=first_child(fragment_1);Mounted(node_1,{get mounted(){return scrollButtonState.scrollButtonState.mounted},set mounted($$value){scrollButtonState.scrollButtonState.mounted=$$value}});var node_2=sibling(node_1,2);{var consequent=$$anchor3=>{var fragment_2=comment$2(),node_3=first_child(fragment_2);snippet(node_3,()=>$$props.child,()=>({props:restProps})),append($$anchor3,fragment_2)},alternate=$$anchor3=>{var div=root_3$13();attribute_effect(div,()=>({...get$3(mergedProps)}));var node_4=child(
div);snippet(node_4,()=>$$props.children??noop$3),reset(div),append($$anchor3,div)};if_block(node_2,$$render=>{$$props.child?$$render(consequent):$$render(alternate,-1)})}append($$anchor2,fragment_1)};if_block(node2,$$render=>{scrollButtonState.canScrollUp&&$$render(consequent_1)})}append($$anchor,fragment),pop()}function Menu_sub($$anchor,$$props){push$1($$props,!0);let open2=prop($$props,"open",15,!1),onOpenChange=prop($$props,"onOpenChange",3,noop$1),onOpenChangeComplete=prop($$props,"onOpenC\
hangeComplete",3,noop$1);MenuSubmenuState.create({open:boxWith$1(()=>open2(),v=>{open2(v),onOpenChange()?.(v)}),onOpenChangeComplete:boxWith$1(()=>onOpenChangeComplete())}),Floating_layer($$anchor,{children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}}),pop()}var root_2$1r=from_html("<div><!></div>");function Menu_item($$anchor,$$props){const uid2=props_id();push$1(
$$props,!0);let ref2=prop($$props,"ref",15,null),id2=prop($$props,"id",19,()=>createId(uid2)),disabled=prop($$props,"disabled",3,!1),onSelect=prop($$props,"onSelect",3,noop$1),closeOnSelect=prop($$props,"closeOnSelect",3,!0),restProps=rest_props($$props,["$$slots","$$events","$$legacy","child","children","ref","id","disabled","onSelect","closeOnSelect"]);const itemState=MenuItemState.create({id:boxWith$1(()=>id2()),disabled:boxWith$1(()=>disabled()),onSelect:boxWith$1(()=>onSelect()),ref:boxWith$1(
()=>ref2(),v=>ref2(v)),closeOnSelect:boxWith$1(()=>closeOnSelect())}),mergedProps=user_derived(()=>mergeProps(restProps,itemState.props));var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);snippet(node_1,()=>$$props.child,()=>({props:get$3(mergedProps)})),append($$anchor2,fragment_1)},alternate=$$anchor2=>{var div=root_2$1r();attribute_effect(div,()=>({...get$3(mergedProps)}));var node_2=child(div);snippet(node_2,
()=>$$props.children??noop$3),reset(div),append($$anchor2,div)};if_block(node2,$$render=>{$$props.child?$$render(consequent):$$render(alternate,-1)})}append($$anchor,fragment),pop()}var root_2$1q=from_html("<div><!></div>");function Menu_separator($$anchor,$$props){const uid2=props_id();push$1($$props,!0);let ref2=prop($$props,"ref",15,null),id2=prop($$props,"id",19,()=>createId(uid2)),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","id","child","children"]);const separatorState=MenuSeparatorState.
create({id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v))}),mergedProps=user_derived(()=>mergeProps(restProps,separatorState.props));var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);snippet(node_1,()=>$$props.child,()=>({props:get$3(mergedProps)})),append($$anchor2,fragment_1)},alternate=$$anchor2=>{var div=root_2$1q();attribute_effect(div,()=>({...get$3(mergedProps)}));var node_2=child(div);snippet(
node_2,()=>$$props.children??noop$3),reset(div),append($$anchor2,div)};if_block(node2,$$render=>{$$props.child?$$render(consequent):$$render(alternate,-1)})}append($$anchor,fragment),pop()}var root_4$K=from_html("<div><div><!></div></div>"),root_8$y=from_html("<div><div><!></div></div>");function Menu_sub_content($$anchor,$$props){const uid2=props_id();push$1($$props,!0);let id2=prop($$props,"id",19,()=>createId(uid2)),ref2=prop($$props,"ref",15,null),loop2=prop($$props,"loop",3,!0),onInteractOutside=prop(
$$props,"onInteractOutside",3,noop$1),forceMount=prop($$props,"forceMount",3,!1),onEscapeKeydown=prop($$props,"onEscapeKeydown",3,noop$1),interactOutsideBehavior=prop($$props,"interactOutsideBehavior",3,"defer-otherwise-close"),escapeKeydownBehavior=prop($$props,"escapeKeydownBehavior",3,"defer-otherwise-close"),onOpenAutoFocusProp=prop($$props,"onOpenAutoFocus",3,noop$1),onCloseAutoFocusProp=prop($$props,"onCloseAutoFocus",3,noop$1),onFocusOutside=prop($$props,"onFocusOutside",3,noop$1),side=prop(
$$props,"side",3,"right"),trapFocus=prop($$props,"trapFocus",3,!1),restProps=rest_props($$props,["$$slots","$$events","$$legacy","id","ref","children","child","loop","onInteractOutside","forceMount","onEscapeKeydown","interactOutsideBehavior","escapeKeydownBehavior","onOpenAutoFocus","onCloseAutoFocus","onFocusOutside","side","trapFocus","style"]);const subContentState=MenuContentState.create({id:boxWith$1(()=>id2()),loop:boxWith$1(()=>loop2()),ref:boxWith$1(()=>ref2(),v=>ref2(v)),isSub:!0,onCloseAutoFocus:boxWith$1(
()=>handleCloseAutoFocus)});function onkeydown(e){const isKeyDownInside=e.currentTarget.contains(e.target),isCloseKey=SUB_CLOSE_KEYS[subContentState.parentMenu.root.opts.dir.current].includes(e.key);isKeyDownInside&&isCloseKey&&(subContentState.parentMenu.onClose(),subContentState.parentMenu.triggerNode?.focus(),e.preventDefault())}const dataAttr=user_derived(()=>subContentState.parentMenu.root.getBitsAttr("sub-content")),mergedProps=user_derived(()=>mergeProps(restProps,subContentState.props,{side:side(),
onkeydown,[get$3(dataAttr)]:""}));function handleOpenAutoFocus(e){onOpenAutoFocusProp()(e),!e.defaultPrevented&&(e.preventDefault(),subContentState.parentMenu.root.isUsingKeyboard&&subContentState.parentMenu.contentNode&&MenuOpenEvent.dispatch(subContentState.parentMenu.contentNode))}function handleCloseAutoFocus(e){onCloseAutoFocusProp()(e),!e.defaultPrevented&&e.preventDefault()}function handleInteractOutside(e){onInteractOutside()(e),!e.defaultPrevented&&subContentState.parentMenu.onClose()}function handleEscapeKeydown(e){
onEscapeKeydown()(e),!e.defaultPrevented&&subContentState.parentMenu.onClose()}function handleOnFocusOutside(e){if(onFocusOutside()(e),e.defaultPrevented||!isHTMLElement$1(e.target)||e.target.id===subContentState.parentMenu.triggerNode?.id)return;if(subContentState.parentMenu.parentMenu?.contentNode?.contains(e.target)){subContentState.parentMenu.onClose(),e.preventDefault();return}const subContentSelector=`[${subContentState.parentMenu.root.getBitsAttr("sub-content")}]`;if(e.target.closest(subContentSelector)){
e.preventDefault();return}subContentState.parentMenu.onClose()}var fragment=comment$2(),node2=first_child(fragment);{var consequent_1=$$anchor2=>{Popper_layer_force_mount($$anchor2,spread_props(()=>get$3(mergedProps),{get ref(){return subContentState.opts.ref},get interactOutsideBehavior(){return interactOutsideBehavior()},get escapeKeydownBehavior(){return escapeKeydownBehavior()},onOpenAutoFocus:handleOpenAutoFocus,get enabled(){return subContentState.parentMenu.opts.open.current},onInteractOutside:handleInteractOutside,
onEscapeKeydown:handleEscapeKeydown,onFocusOutside:handleOnFocusOutside,preventScroll:!1,get loop(){return loop2()},get trapFocus(){return trapFocus()},get shouldRender(){return subContentState.shouldRender},popper:($$anchor3,$$arg0)=>{let props=()=>$$arg0?.().props,wrapperProps=()=>$$arg0?.().wrapperProps;const finalProps=user_derived(()=>mergeProps(props(),get$3(mergedProps),{style:getFloatingContentCSSVars("menu")},{style:$$props.style}));var fragment_2=comment$2(),node_1=first_child(fragment_2);
{var consequent=$$anchor4=>{var fragment_3=comment$2(),node_2=first_child(fragment_3);{let $0=user_derived(()=>({props:get$3(finalProps),wrapperProps:wrapperProps(),...subContentState.snippetProps}));snippet(node_2,()=>$$props.child,()=>get$3($0))}append($$anchor4,fragment_3)},alternate=$$anchor4=>{var div=root_4$K();attribute_effect(div,()=>({...wrapperProps()}));var div_1=child(div);attribute_effect(div_1,()=>({...get$3(finalProps)}));var node_3=child(div_1);snippet(node_3,()=>$$props.children??
noop$3),reset(div_1),reset(div),append($$anchor4,div)};if_block(node_1,$$render=>{$$props.child?$$render(consequent):$$render(alternate,-1)})}append($$anchor3,fragment_2)},$$slots:{popper:!0}}))},consequent_3=$$anchor2=>{Popper_layer($$anchor2,spread_props(()=>get$3(mergedProps),{get ref(){return subContentState.opts.ref},get interactOutsideBehavior(){return interactOutsideBehavior()},get escapeKeydownBehavior(){return escapeKeydownBehavior()},onCloseAutoFocus:handleCloseAutoFocus,onOpenAutoFocus:handleOpenAutoFocus,
get open(){return subContentState.parentMenu.opts.open.current},onInteractOutside:handleInteractOutside,onEscapeKeydown:handleEscapeKeydown,onFocusOutside:handleOnFocusOutside,preventScroll:!1,get loop(){return loop2()},get trapFocus(){return trapFocus()},get shouldRender(){return subContentState.shouldRender},popper:($$anchor3,$$arg0)=>{let props=()=>$$arg0?.().props,wrapperProps=()=>$$arg0?.().wrapperProps;const finalProps=user_derived(()=>mergeProps(props(),get$3(mergedProps),{style:getFloatingContentCSSVars(
"menu")},{style:$$props.style}));var fragment_5=comment$2(),node_4=first_child(fragment_5);{var consequent_2=$$anchor4=>{var fragment_6=comment$2(),node_5=first_child(fragment_6);{let $0=user_derived(()=>({props:get$3(finalProps),wrapperProps:wrapperProps(),...subContentState.snippetProps}));snippet(node_5,()=>$$props.child,()=>get$3($0))}append($$anchor4,fragment_6)},alternate_1=$$anchor4=>{var div_2=root_8$y();attribute_effect(div_2,()=>({...wrapperProps()}));var div_3=child(div_2);attribute_effect(
div_3,()=>({...get$3(finalProps)}));var node_6=child(div_3);snippet(node_6,()=>$$props.children??noop$3),reset(div_3),reset(div_2),append($$anchor4,div_2)};if_block(node_4,$$render=>{$$props.child?$$render(consequent_2):$$render(alternate_1,-1)})}append($$anchor3,fragment_5)},$$slots:{popper:!0}}))};if_block(node2,$$render=>{forceMount()?$$render(consequent_1):forceMount()||$$render(consequent_3,1)})}append($$anchor,fragment),pop()}var root_3$12=from_html("<div><!></div>");function Menu_sub_trigger($$anchor,$$props){
const uid2=props_id();push$1($$props,!0);let id2=prop($$props,"id",19,()=>createId(uid2)),disabled=prop($$props,"disabled",3,!1),ref2=prop($$props,"ref",15,null),onSelect=prop($$props,"onSelect",3,noop$1),openDelay=prop($$props,"openDelay",3,0),restProps=rest_props($$props,["$$slots","$$events","$$legacy","id","disabled","ref","children","child","onSelect","openDelay"]);const subTriggerState=MenuSubTriggerState.create({disabled:boxWith$1(()=>disabled()),onSelect:boxWith$1(()=>onSelect()),id:boxWith$1(
()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v)),openDelay:boxWith$1(()=>openDelay())}),mergedProps=user_derived(()=>mergeProps(restProps,subTriggerState.props));Floating_layer_anchor($$anchor,{get id(){return id2()},get ref(){return subTriggerState.opts.ref},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);{var consequent=$$anchor3=>{var fragment_2=comment$2(),node_1=first_child(fragment_2);snippet(node_1,()=>$$props.child,()=>({props:get$3(mergedProps)})),
append($$anchor3,fragment_2)},alternate=$$anchor3=>{var div=root_3$12();attribute_effect(div,()=>({...get$3(mergedProps)}));var node_2=child(div);snippet(node_2,()=>$$props.children??noop$3),reset(div),append($$anchor3,div)};if_block(node2,$$render=>{$$props.child?$$render(consequent):$$render(alternate,-1)})}append($$anchor2,fragment_1)},$$slots:{default:!0}}),pop()}function isPointInPolygon(point2,polygon){const[x,y]=point2;let isInside=!1;const length=polygon.length;for(let i=0,j=length-1;i<length;j=
i++){const[xi,yi]=polygon[i]??[0,0],[xj,yj]=polygon[j]??[0,0];yi>=y!=yj>=y&&x<=(xj-xi)*(y-yi)/(yj-yi)+xi&&(isInside=!isInside)}return isInside}function isInsideRect(point2,rect){return point2[0]>=rect.left&&point2[0]<=rect.right&&point2[1]>=rect.top&&point2[1]<=rect.bottom}function getSide(triggerRect,contentRect){const triggerCenterX=triggerRect.left+triggerRect.width/2,triggerCenterY=triggerRect.top+triggerRect.height/2,contentCenterX=contentRect.left+contentRect.width/2,contentCenterY=contentRect.
top+contentRect.height/2,deltaX=contentCenterX-triggerCenterX,deltaY=contentCenterY-triggerCenterY;return Math.abs(deltaX)>Math.abs(deltaY)?deltaX>0?"right":"left":deltaY>0?"bottom":"top"}class SafePolygon{#opts;#buffer;#transitIntentTimeout;#exitPoint=null;#exitTarget=null;#transitTargets=[];#trackedTriggerNode=null;#leaveFallbackRafId=null;#transitIntentTimeoutId=null;#cancelLeaveFallback(){this.#leaveFallbackRafId!==null&&(cancelAnimationFrame(this.#leaveFallbackRafId),this.#leaveFallbackRafId=
null)}#scheduleLeaveFallback(){this.#cancelLeaveFallback(),this.#leaveFallbackRafId=requestAnimationFrame(()=>{this.#leaveFallbackRafId=null,!(!this.#exitPoint||!this.#exitTarget)&&(this.#clearTracking(),this.#opts.onPointerExit())})}#cancelTransitIntentTimeout(){this.#transitIntentTimeoutId!==null&&(clearTimeout(this.#transitIntentTimeoutId),this.#transitIntentTimeoutId=null)}#scheduleTransitIntentTimeout(){this.#transitIntentTimeout!==null&&(this.#cancelTransitIntentTimeout(),this.#transitIntentTimeoutId=
window.setTimeout(()=>{this.#transitIntentTimeoutId=null,!(!this.#exitPoint||!this.#exitTarget)&&(this.#clearTracking(),this.#opts.onPointerExit())},this.#transitIntentTimeout))}constructor(opts){this.#opts=opts,this.#buffer=opts.buffer??1;const transitIntentTimeout=opts.transitIntentTimeout;this.#transitIntentTimeout=typeof transitIntentTimeout=="number"&&transitIntentTimeout>0?transitIntentTimeout:null,watch$1([opts.triggerNode,opts.contentNode,opts.enabled],([triggerNode,contentNode,enabled])=>{
if(!triggerNode||!contentNode||!enabled){this.#trackedTriggerNode=null,this.#clearTracking();return}this.#trackedTriggerNode&&this.#trackedTriggerNode!==triggerNode&&this.#clearTracking(),this.#trackedTriggerNode=triggerNode;const doc=getDocument$1(triggerNode),handlePointerMove=e=>{this.#onPointerMove([e.clientX,e.clientY],triggerNode,contentNode)},handleTriggerLeave=e=>{const target2=e.relatedTarget;if(isElement$1(target2)&&contentNode.contains(target2))return;const ignoredTargets=this.#opts.ignoredTargets?.()??
[];isElement$1(target2)&&ignoredTargets.some(n=>n===target2||n.contains(target2))||(this.#transitTargets=isElement$1(target2)&&ignoredTargets.length>0?ignoredTargets.filter(n=>target2.contains(n)):[],this.#exitPoint=[e.clientX,e.clientY],this.#exitTarget="content",this.#scheduleLeaveFallback())},handleTriggerEnter=()=>{this.#clearTracking()},handleContentEnter=()=>{this.#clearTracking()},handleContentLeave=e=>{const target2=e.relatedTarget;isElement$1(target2)&&triggerNode.contains(target2)||(this.#exitPoint=
[e.clientX,e.clientY],this.#exitTarget="trigger",this.#scheduleLeaveFallback())};return[on(doc,"pointermove",handlePointerMove),on(triggerNode,"pointerleave",handleTriggerLeave),on(triggerNode,"pointerenter",handleTriggerEnter),on(contentNode,"pointerenter",handleContentEnter),on(contentNode,"pointerleave",handleContentLeave)].reduce((acc,cleanup)=>()=>{acc(),cleanup()},()=>{})})}#onPointerMove(clientPoint,triggerNode,contentNode){if(!this.#exitPoint||!this.#exitTarget)return;this.#cancelLeaveFallback(),
this.#scheduleTransitIntentTimeout();const triggerRect=triggerNode.getBoundingClientRect(),contentRect=contentNode.getBoundingClientRect();if(this.#exitTarget==="content"&&isInsideRect(clientPoint,contentRect)){this.#clearTracking();return}if(this.#exitTarget==="trigger"&&isInsideRect(clientPoint,triggerRect)){this.#clearTracking();return}if(this.#exitTarget==="content"&&this.#transitTargets.length>0)for(const transitTarget of this.#transitTargets){const transitRect=transitTarget.getBoundingClientRect();
if(isInsideRect(clientPoint,transitRect))return;const transitSide=getSide(triggerRect,transitRect),transitCorridor=this.#getCorridorPolygon(triggerRect,transitRect,transitSide);if(transitCorridor&&isPointInPolygon(clientPoint,transitCorridor))return}const side=getSide(triggerRect,contentRect),corridorPoly=this.#getCorridorPolygon(triggerRect,contentRect,side);if(corridorPoly&&isPointInPolygon(clientPoint,corridorPoly))return;const targetRect=this.#exitTarget==="content"?contentRect:triggerRect,safePoly=this.#getSafePolygon(
this.#exitPoint,targetRect,side,this.#exitTarget);isPointInPolygon(clientPoint,safePoly)||(this.#clearTracking(),this.#opts.onPointerExit())}#clearTracking(){this.#exitPoint=null,this.#exitTarget=null,this.#transitTargets=[],this.#cancelLeaveFallback(),this.#cancelTransitIntentTimeout()}#getCorridorPolygon(triggerRect,contentRect,side){const buffer=this.#buffer;switch(side){case"top":return[[Math.min(triggerRect.left,contentRect.left)-buffer,triggerRect.top],[Math.min(triggerRect.left,contentRect.
left)-buffer,contentRect.bottom],[Math.max(triggerRect.right,contentRect.right)+buffer,contentRect.bottom],[Math.max(triggerRect.right,contentRect.right)+buffer,triggerRect.top]];case"bottom":return[[Math.min(triggerRect.left,contentRect.left)-buffer,triggerRect.bottom],[Math.min(triggerRect.left,contentRect.left)-buffer,contentRect.top],[Math.max(triggerRect.right,contentRect.right)+buffer,contentRect.top],[Math.max(triggerRect.right,contentRect.right)+buffer,triggerRect.bottom]];case"left":return[
[triggerRect.left,Math.min(triggerRect.top,contentRect.top)-buffer],[contentRect.right,Math.min(triggerRect.top,contentRect.top)-buffer],[contentRect.right,Math.max(triggerRect.bottom,contentRect.bottom)+buffer],[triggerRect.left,Math.max(triggerRect.bottom,contentRect.bottom)+buffer]];case"right":return[[triggerRect.right,Math.min(triggerRect.top,contentRect.top)-buffer],[contentRect.left,Math.min(triggerRect.top,contentRect.top)-buffer],[contentRect.left,Math.max(triggerRect.bottom,contentRect.
bottom)+buffer],[triggerRect.right,Math.max(triggerRect.bottom,contentRect.bottom)+buffer]]}}#getSafePolygon(exitPoint,targetRect,side,exitTarget){const buffer=this.#buffer*4,[x,y]=exitPoint;switch(exitTarget==="trigger"?this.#flipSide(side):side){case"top":return[[x-buffer,y+buffer],[x+buffer,y+buffer],[targetRect.right+buffer,targetRect.bottom],[targetRect.right+buffer,targetRect.top],[targetRect.left-buffer,targetRect.top],[targetRect.left-buffer,targetRect.bottom]];case"bottom":return[[x-buffer,
y-buffer],[x+buffer,y-buffer],[targetRect.right+buffer,targetRect.top],[targetRect.right+buffer,targetRect.bottom],[targetRect.left-buffer,targetRect.bottom],[targetRect.left-buffer,targetRect.top]];case"left":return[[x+buffer,y-buffer],[x+buffer,y+buffer],[targetRect.right,targetRect.bottom+buffer],[targetRect.left,targetRect.bottom+buffer],[targetRect.left,targetRect.top-buffer],[targetRect.right,targetRect.top-buffer]];case"right":return[[x-buffer,y-buffer],[x-buffer,y+buffer],[targetRect.left,
targetRect.bottom+buffer],[targetRect.right,targetRect.bottom+buffer],[targetRect.right,targetRect.top-buffer],[targetRect.left,targetRect.top-buffer]]}}#flipSide(side){switch(side){case"top":return"bottom";case"bottom":return"top";case"left":return"right";case"right":return"left"}}}const popoverAttrs=createBitsAttrs({component:"popover",parts:["root","trigger","content","close","overlay"]}),PopoverRootContext=new Context$1("Popover.Root");class PopoverRootState{static create(opts){return PopoverRootContext.
set(new PopoverRootState(opts))}opts;#contentNode=state$1(null);get contentNode(){return get$3(this.#contentNode)}set contentNode(value){set$1(this.#contentNode,value,!0)}contentPresence;#triggerNode=state$1(null);get triggerNode(){return get$3(this.#triggerNode)}set triggerNode(value){set$1(this.#triggerNode,value,!0)}#overlayNode=state$1(null);get overlayNode(){return get$3(this.#overlayNode)}set overlayNode(value){set$1(this.#overlayNode,value,!0)}overlayPresence;#openedViaHover=state$1(!1);get openedViaHover(){
return get$3(this.#openedViaHover)}set openedViaHover(value){set$1(this.#openedViaHover,value,!0)}#hasInteractedWithContent=state$1(!1);get hasInteractedWithContent(){return get$3(this.#hasInteractedWithContent)}set hasInteractedWithContent(value){set$1(this.#hasInteractedWithContent,value,!0)}#hoverCooldown=state$1(!1);get hoverCooldown(){return get$3(this.#hoverCooldown)}set hoverCooldown(value){set$1(this.#hoverCooldown,value,!0)}#closeDelay=state$1(0);get closeDelay(){return get$3(this.#closeDelay)}set closeDelay(value){
set$1(this.#closeDelay,value,!0)}#closeTimeout=null;#domContext=null;constructor(opts){this.opts=opts,this.contentPresence=new PresenceManager({ref:boxWith$1(()=>this.contentNode),open:this.opts.open,onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),this.overlayPresence=new PresenceManager({ref:boxWith$1(()=>this.overlayNode),open:this.opts.open}),watch$1(()=>this.opts.open.current,isOpen=>{isOpen||(this.openedViaHover=!1,this.hasInteractedWithContent=!1,this.#clearCloseTimeout())})}setDomContext(ctx){
this.#domContext=ctx}#clearCloseTimeout(){this.#closeTimeout!==null&&this.#domContext&&(this.#domContext.clearTimeout(this.#closeTimeout),this.#closeTimeout=null)}toggleOpen(){this.#clearCloseTimeout(),this.opts.open.current=!this.opts.open.current}handleClose(){this.#clearCloseTimeout(),this.opts.open.current&&(this.opts.open.current=!1)}handleHoverOpen(){this.#clearCloseTimeout(),!this.opts.open.current&&(this.openedViaHover=!0,this.opts.open.current=!0)}handleHoverClose(){this.opts.open.current&&
this.openedViaHover&&!this.hasInteractedWithContent&&(this.opts.open.current=!1)}handleDelayedHoverClose(){this.opts.open.current&&(!this.openedViaHover||this.hasInteractedWithContent||(this.#clearCloseTimeout(),this.closeDelay<=0?this.opts.open.current=!1:this.#domContext&&(this.#closeTimeout=this.#domContext.setTimeout(()=>{this.openedViaHover&&!this.hasInteractedWithContent&&(this.opts.open.current=!1),this.#closeTimeout=null},this.closeDelay))))}cancelDelayedClose(){this.#clearCloseTimeout()}markInteraction(){
this.hasInteractedWithContent=!0,this.#clearCloseTimeout()}}class PopoverTriggerState{static create(opts){return new PopoverTriggerState(opts,PopoverRootContext.get())}opts;root;attachment;domContext;#openTimeout=null;#closeTimeout=null;#isHovering=state$1(!1);constructor(opts,root2){this.opts=opts,this.root=root2,this.attachment=attachRef(this.opts.ref,v=>this.root.triggerNode=v),this.domContext=new DOMContext(opts.ref),this.root.setDomContext(this.domContext),this.onclick=this.onclick.bind(this),
this.onkeydown=this.onkeydown.bind(this),this.onpointerenter=this.onpointerenter.bind(this),this.onpointerleave=this.onpointerleave.bind(this),watch$1(()=>this.opts.closeDelay.current,delay=>{this.root.closeDelay=delay})}#clearOpenTimeout(){this.#openTimeout!==null&&(this.domContext.clearTimeout(this.#openTimeout),this.#openTimeout=null)}#clearCloseTimeout(){this.#closeTimeout!==null&&(this.domContext.clearTimeout(this.#closeTimeout),this.#closeTimeout=null)}#clearAllTimeouts(){this.#clearOpenTimeout(),
this.#clearCloseTimeout()}onpointerenter(e){if(this.opts.disabled.current||!this.opts.openOnHover.current||isTouch(e)||(set$1(this.#isHovering,!0),this.#clearCloseTimeout(),this.root.cancelDelayedClose(),this.root.opts.open.current||this.root.hoverCooldown))return;const delay=this.opts.openDelay.current;delay<=0?this.root.handleHoverOpen():this.#openTimeout=this.domContext.setTimeout(()=>{this.root.handleHoverOpen(),this.#openTimeout=null},delay)}onpointerleave(e){this.opts.disabled.current||this.
opts.openOnHover.current&&(isTouch(e)||(set$1(this.#isHovering,!1),this.#clearOpenTimeout(),this.root.hoverCooldown=!1))}onclick(e){if(!this.opts.disabled.current&&e.button===0){if(this.#clearAllTimeouts(),get$3(this.#isHovering)&&this.root.opts.open.current&&this.root.openedViaHover){this.root.openedViaHover=!1,this.root.hasInteractedWithContent=!0;return}get$3(this.#isHovering)&&this.opts.openOnHover.current&&this.root.opts.open.current&&(this.root.hoverCooldown=!0),this.root.hoverCooldown&&!this.
root.opts.open.current&&(this.root.hoverCooldown=!1),this.root.toggleOpen()}}onkeydown(e){this.opts.disabled.current||(e.key===ENTER||e.key===SPACE)&&(e.preventDefault(),this.#clearAllTimeouts(),this.root.toggleOpen())}#getAriaControls(){if(this.root.opts.open.current&&this.root.contentNode?.id)return this.root.contentNode?.id}#props=user_derived(()=>({id:this.opts.id.current,"aria-haspopup":"dialog","aria-expanded":boolToStr(this.root.opts.open.current),"data-state":getDataOpenClosed(this.root.
opts.open.current),"aria-controls":this.#getAriaControls(),[popoverAttrs.trigger]:"",disabled:this.opts.disabled.current,onkeydown:this.onkeydown,onclick:this.onclick,onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave,...this.attachment}));get props(){return get$3(this.#props)}set props(value){set$1(this.#props,value)}}class PopoverContentState{static create(opts){return new PopoverContentState(opts,PopoverRootContext.get())}opts;root;attachment;constructor(opts,root2){this.opts=
opts,this.root=root2,this.attachment=attachRef(this.opts.ref,v=>this.root.contentNode=v),this.onpointerdown=this.onpointerdown.bind(this),this.onfocusin=this.onfocusin.bind(this),this.onpointerenter=this.onpointerenter.bind(this),this.onpointerleave=this.onpointerleave.bind(this),new SafePolygon({triggerNode:()=>this.root.triggerNode,contentNode:()=>this.root.contentNode,enabled:()=>this.root.opts.open.current&&this.root.openedViaHover&&!this.root.hasInteractedWithContent,onPointerExit:()=>{this.
root.handleDelayedHoverClose()}})}onpointerdown(_){this.root.markInteraction()}onfocusin(e){const target2=e.target;isElement$1(target2)&&isTabbable(target2)&&this.root.markInteraction()}onpointerenter(e){isTouch(e)||this.root.cancelDelayedClose()}onpointerleave(e){isTouch(e)}onInteractOutside=e=>{if(this.opts.onInteractOutside.current(e),e.defaultPrevented||!isElement$1(e.target))return;const closestTrigger=e.target.closest(popoverAttrs.selector("trigger"));if(!(closestTrigger&&closestTrigger===
this.root.triggerNode)){if(this.opts.customAnchor.current){if(isElement$1(this.opts.customAnchor.current)){if(this.opts.customAnchor.current.contains(e.target))return}else if(typeof this.opts.customAnchor.current=="string"){const el=document.querySelector(this.opts.customAnchor.current);if(el&&el.contains(e.target))return}}this.root.handleClose()}};onEscapeKeydown=e=>{this.opts.onEscapeKeydown.current(e),!e.defaultPrevented&&this.root.handleClose()};get shouldRender(){return this.root.contentPresence.
shouldRender}get shouldTrapFocus(){return!(this.root.openedViaHover&&!this.root.hasInteractedWithContent)}#snippetProps=user_derived(()=>({open:this.root.opts.open.current}));get snippetProps(){return get$3(this.#snippetProps)}set snippetProps(value){set$1(this.#snippetProps,value)}#props=user_derived(()=>({id:this.opts.id.current,tabindex:-1,"data-state":getDataOpenClosed(this.root.opts.open.current),...getDataTransitionAttrs(this.root.contentPresence.transitionStatus),[popoverAttrs.content]:"",
style:{pointerEvents:"auto",contain:"layout style"},onpointerdown:this.onpointerdown,onfocusin:this.onfocusin,onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave,...this.attachment}));get props(){return get$3(this.#props)}set props(value){set$1(this.#props,value)}popperProps={onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown}}var root_4$J=from_html("<div><div><!></div></div>"),root_8$x=from_html("<div><div><!></div></div>");function Popover_content$1($$anchor,$$props){
const uid2=props_id();push$1($$props,!0);let ref2=prop($$props,"ref",15,null),id2=prop($$props,"id",19,()=>createId(uid2)),forceMount=prop($$props,"forceMount",3,!1),onOpenAutoFocus=prop($$props,"onOpenAutoFocus",3,noop$1),onCloseAutoFocus=prop($$props,"onCloseAutoFocus",3,noop$1),onEscapeKeydown=prop($$props,"onEscapeKeydown",3,noop$1),onInteractOutside=prop($$props,"onInteractOutside",3,noop$1),trapFocus=prop($$props,"trapFocus",3,!0),preventScroll=prop($$props,"preventScroll",3,!1),customAnchor=prop(
$$props,"customAnchor",3,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","child","children","ref","id","forceMount","onOpenAutoFocus","onCloseAutoFocus","onEscapeKeydown","onInteractOutside","trapFocus","preventScroll","customAnchor","style"]);const contentState=PopoverContentState.create({id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v)),onInteractOutside:boxWith$1(()=>onInteractOutside()),onEscapeKeydown:boxWith$1(()=>onEscapeKeydown()),customAnchor:boxWith$1(()=>customAnchor())}),
mergedProps=user_derived(()=>mergeProps(restProps,contentState.props)),effectiveTrapFocus=user_derived(()=>trapFocus()&&contentState.shouldTrapFocus);function handleOpenAutoFocus(e){contentState.shouldTrapFocus||e.preventDefault(),onOpenAutoFocus()(e)}var fragment=comment$2(),node2=first_child(fragment);{var consequent_1=$$anchor2=>{Popper_layer_force_mount($$anchor2,spread_props(()=>get$3(mergedProps),()=>contentState.popperProps,{get ref(){return contentState.opts.ref},get enabled(){return contentState.
root.opts.open.current},get id(){return id2()},get trapFocus(){return get$3(effectiveTrapFocus)},get preventScroll(){return preventScroll()},loop:!0,forceMount:!0,get customAnchor(){return customAnchor()},onOpenAutoFocus:handleOpenAutoFocus,get onCloseAutoFocus(){return onCloseAutoFocus()},get shouldRender(){return contentState.shouldRender},popper:($$anchor3,$$arg0)=>{let props=()=>$$arg0?.().props,wrapperProps=()=>$$arg0?.().wrapperProps;const finalProps=user_derived(()=>mergeProps(props(),{style:getFloatingContentCSSVars(
"popover")},{style:$$props.style}));var fragment_2=comment$2(),node_1=first_child(fragment_2);{var consequent=$$anchor4=>{var fragment_3=comment$2(),node_2=first_child(fragment_3);{let $0=user_derived(()=>({props:get$3(finalProps),wrapperProps:wrapperProps(),...contentState.snippetProps}));snippet(node_2,()=>$$props.child,()=>get$3($0))}append($$anchor4,fragment_3)},alternate=$$anchor4=>{var div=root_4$J();attribute_effect(div,()=>({...wrapperProps()}));var div_1=child(div);attribute_effect(div_1,
()=>({...get$3(finalProps)}));var node_3=child(div_1);snippet(node_3,()=>$$props.children??noop$3),reset(div_1),reset(div),append($$anchor4,div)};if_block(node_1,$$render=>{$$props.child?$$render(consequent):$$render(alternate,-1)})}append($$anchor3,fragment_2)},$$slots:{popper:!0}}))},consequent_3=$$anchor2=>{Popper_layer($$anchor2,spread_props(()=>get$3(mergedProps),()=>contentState.popperProps,{get ref(){return contentState.opts.ref},get open(){return contentState.root.opts.open.current},get id(){
return id2()},get trapFocus(){return get$3(effectiveTrapFocus)},get preventScroll(){return preventScroll()},loop:!0,forceMount:!1,get customAnchor(){return customAnchor()},onOpenAutoFocus:handleOpenAutoFocus,get onCloseAutoFocus(){return onCloseAutoFocus()},get shouldRender(){return contentState.shouldRender},popper:($$anchor3,$$arg0)=>{let props=()=>$$arg0?.().props,wrapperProps=()=>$$arg0?.().wrapperProps;const finalProps=user_derived(()=>mergeProps(props(),{style:getFloatingContentCSSVars("po\
pover")},{style:$$props.style}));var fragment_5=comment$2(),node_4=first_child(fragment_5);{var consequent_2=$$anchor4=>{var fragment_6=comment$2(),node_5=first_child(fragment_6);{let $0=user_derived(()=>({props:get$3(finalProps),wrapperProps:wrapperProps(),...contentState.snippetProps}));snippet(node_5,()=>$$props.child,()=>get$3($0))}append($$anchor4,fragment_6)},alternate_1=$$anchor4=>{var div_2=root_8$x();attribute_effect(div_2,()=>({...wrapperProps()}));var div_3=child(div_2);attribute_effect(
div_3,()=>({...get$3(finalProps)}));var node_6=child(div_3);snippet(node_6,()=>$$props.children??noop$3),reset(div_3),reset(div_2),append($$anchor4,div_2)};if_block(node_4,$$render=>{$$props.child?$$render(consequent_2):$$render(alternate_1,-1)})}append($$anchor3,fragment_5)},$$slots:{popper:!0}}))};if_block(node2,$$render=>{forceMount()?$$render(consequent_1):forceMount()||$$render(consequent_3,1)})}append($$anchor,fragment),pop()}var root_3$11=from_html("<button><!></button>");function Popover_trigger$1($$anchor,$$props){
const uid2=props_id();push$1($$props,!0);let id2=prop($$props,"id",19,()=>createId(uid2)),ref2=prop($$props,"ref",15,null),type2=prop($$props,"type",3,"button"),disabled=prop($$props,"disabled",3,!1),openOnHover=prop($$props,"openOnHover",3,!1),openDelay=prop($$props,"openDelay",3,700),closeDelay=prop($$props,"closeDelay",3,300),restProps=rest_props($$props,["$$slots","$$events","$$legacy","children","child","id","ref","type","disabled","openOnHover","openDelay","closeDelay"]);const triggerState=PopoverTriggerState.
create({id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v)),disabled:boxWith$1(()=>!!disabled()),openOnHover:boxWith$1(()=>openOnHover()),openDelay:boxWith$1(()=>openDelay()),closeDelay:boxWith$1(()=>closeDelay())}),mergedProps=user_derived(()=>mergeProps(restProps,triggerState.props,{type:type2()}));Floating_layer_anchor($$anchor,{get id(){return id2()},get ref(){return triggerState.opts.ref},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);{var consequent=$$anchor3=>{
var fragment_2=comment$2(),node_1=first_child(fragment_2);snippet(node_1,()=>$$props.child,()=>({props:get$3(mergedProps)})),append($$anchor3,fragment_2)},alternate=$$anchor3=>{var button=root_3$11();attribute_effect(button,()=>({...get$3(mergedProps)}));var node_2=child(button);snippet(node_2,()=>$$props.children??noop$3),reset(button),append($$anchor3,button)};if_block(node2,$$render=>{$$props.child?$$render(consequent):$$render(alternate,-1)})}append($$anchor2,fragment_1)},$$slots:{default:!0}}),
pop()}function Dialog($$anchor,$$props){push$1($$props,!0);let open2=prop($$props,"open",15,!1),onOpenChange=prop($$props,"onOpenChange",3,noop$1),onOpenChangeComplete=prop($$props,"onOpenChangeComplete",3,noop$1);DialogRootState.create({variant:boxWith$1(()=>"dialog"),open:boxWith$1(()=>open2(),v=>{open2(v),onOpenChange()(v)}),onOpenChangeComplete:boxWith$1(()=>onOpenChangeComplete())});var fragment=comment$2(),node2=first_child(fragment);snippet(node2,()=>$$props.children??noop$3),append($$anchor,
fragment),pop()}var root_2$1p=from_html("<button><!></button>");function Dialog_close($$anchor,$$props){const uid2=props_id();push$1($$props,!0);let id2=prop($$props,"id",19,()=>createId(uid2)),ref2=prop($$props,"ref",15,null),disabled=prop($$props,"disabled",3,!1),restProps=rest_props($$props,["$$slots","$$events","$$legacy","children","child","id","ref","disabled"]);const closeState=DialogCloseState.create({variant:boxWith$1(()=>"close"),id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(
v)),disabled:boxWith$1(()=>!!disabled())}),mergedProps=user_derived(()=>mergeProps(restProps,closeState.props));var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);snippet(node_1,()=>$$props.child,()=>({props:get$3(mergedProps)})),append($$anchor2,fragment_1)},alternate=$$anchor2=>{var button=root_2$1p();attribute_effect(button,()=>({...get$3(mergedProps)}));var node_2=child(button);snippet(node_2,()=>$$props.
children??noop$3),reset(button),append($$anchor2,button)};if_block(node2,$$render=>{$$props.child?$$render(consequent):$$render(alternate,-1)})}append($$anchor,fragment),pop()}var root_6$x=from_html("<!> <!>",1),root_8$w=from_html("<!> <div><!></div>",1);function Dialog_content$1($$anchor,$$props){const uid2=props_id();push$1($$props,!0);let id2=prop($$props,"id",19,()=>createId(uid2)),ref2=prop($$props,"ref",15,null),forceMount=prop($$props,"forceMount",3,!1),onCloseAutoFocus=prop($$props,"onCl\
oseAutoFocus",3,noop$1),onOpenAutoFocus=prop($$props,"onOpenAutoFocus",3,noop$1),onEscapeKeydown=prop($$props,"onEscapeKeydown",3,noop$1),onInteractOutside=prop($$props,"onInteractOutside",3,noop$1),trapFocus=prop($$props,"trapFocus",3,!0),preventScroll=prop($$props,"preventScroll",3,!0),restoreScrollDelay=prop($$props,"restoreScrollDelay",3,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","id","children","child","ref","forceMount","onCloseAutoFocus","onOpenAutoFocus","onEscap\
eKeydown","onInteractOutside","trapFocus","preventScroll","restoreScrollDelay"]);const contentState=DialogContentState.create({id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v))}),mergedProps=user_derived(()=>mergeProps(restProps,contentState.props));var fragment=comment$2(),node2=first_child(fragment);{var consequent_2=$$anchor2=>{Focus_scope($$anchor2,{get ref(){return contentState.opts.ref},loop:!0,get trapFocus(){return trapFocus()},get enabled(){return contentState.root.opts.open.
current},get onOpenAutoFocus(){return onOpenAutoFocus()},get onCloseAutoFocus(){return onCloseAutoFocus()},focusScope:($$anchor3,$$arg0)=>{let focusScopeProps=()=>$$arg0?.().props;Escape_layer($$anchor3,spread_props(()=>get$3(mergedProps),{get enabled(){return contentState.root.opts.open.current},get ref(){return contentState.opts.ref},onEscapeKeydown:e=>{onEscapeKeydown()(e),!e.defaultPrevented&&contentState.root.handleClose()},children:($$anchor4,$$slotProps)=>{Dismissible_layer($$anchor4,spread_props(
()=>get$3(mergedProps),{get ref(){return contentState.opts.ref},get enabled(){return contentState.root.opts.open.current},onInteractOutside:e=>{onInteractOutside()(e),!e.defaultPrevented&&contentState.root.handleClose()},children:($$anchor5,$$slotProps2)=>{Text_selection_layer($$anchor5,spread_props(()=>get$3(mergedProps),{get ref(){return contentState.opts.ref},get enabled(){return contentState.root.opts.open.current},children:($$anchor6,$$slotProps3)=>{var fragment_5=comment$2(),node_1=first_child(
fragment_5);{var consequent_1=$$anchor7=>{var fragment_6=root_6$x(),node_2=first_child(fragment_6);{var consequent=$$anchor8=>{Scroll_lock($$anchor8,{get preventScroll(){return preventScroll()},get restoreScrollDelay(){return restoreScrollDelay()}})};if_block(node_2,$$render=>{contentState.root.opts.open.current&&$$render(consequent)})}var node_3=sibling(node_2,2);{let $0=user_derived(()=>({props:mergeProps(get$3(mergedProps),focusScopeProps()),...contentState.snippetProps}));snippet(node_3,()=>$$props.
child,()=>get$3($0))}append($$anchor7,fragment_6)},alternate=$$anchor7=>{var fragment_8=root_8$w(),node_4=first_child(fragment_8);Scroll_lock(node_4,{get preventScroll(){return preventScroll()}});var div=sibling(node_4,2);attribute_effect(div,$0=>({...$0}),[()=>mergeProps(get$3(mergedProps),focusScopeProps())]);var node_5=child(div);snippet(node_5,()=>$$props.children??noop$3),reset(div),append($$anchor7,fragment_8)};if_block(node_1,$$render=>{$$props.child?$$render(consequent_1):$$render(alternate,
-1)})}append($$anchor6,fragment_5)},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{focusScope:!0}})};if_block(node2,$$render=>{(contentState.shouldRender||forceMount())&&$$render(consequent_2)})}append($$anchor,fragment),pop()}function Menu($$anchor,$$props){push$1($$props,!0);let open2=prop($$props,"open",15,!1),dir=prop($$props,"dir",3,"ltr"),onOpenChange=prop($$props,"onOpenChange",3,noop$1),onOpenChangeComplete=prop($$props,"onOpenChangeComplete",3,noop$1),
variant=prop($$props,"_internal_variant",3,"dropdown-menu"),shouldSkipExitAnimation=prop($$props,"_internal_should_skip_exit_animation",3,void 0);const root2=MenuRootState.create({variant:boxWith$1(()=>variant()),dir:boxWith$1(()=>dir()),onClose:()=>{open2(!1),onOpenChange()(!1)},shouldSkipExitAnimation:()=>shouldSkipExitAnimation()?.()??!1});MenuMenuState.create({open:boxWith$1(()=>open2(),v=>{open2(v),onOpenChange()(v)}),onOpenChangeComplete:boxWith$1(()=>onOpenChangeComplete())},root2),Floating_layer(
$$anchor,{children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}}),pop()}var root_4$I=from_html("<div><div><!></div></div>"),root_8$v=from_html("<div><div><!></div></div>");function Dropdown_menu_content$1($$anchor,$$props){const uid2=props_id();push$1($$props,!0);let id2=prop($$props,"id",19,()=>createId(uid2)),ref2=prop($$props,"ref",15,null),loop2=prop($$props,"l\
oop",3,!0),onInteractOutside=prop($$props,"onInteractOutside",3,noop$1),onEscapeKeydown=prop($$props,"onEscapeKeydown",3,noop$1),onCloseAutoFocus=prop($$props,"onCloseAutoFocus",3,noop$1),forceMount=prop($$props,"forceMount",3,!1),trapFocus=prop($$props,"trapFocus",3,!1),restProps=rest_props($$props,["$$slots","$$events","$$legacy","id","child","children","ref","loop","onInteractOutside","onEscapeKeydown","onCloseAutoFocus","forceMount","trapFocus","style"]);const contentState=MenuContentState.create(
{id:boxWith$1(()=>id2()),loop:boxWith$1(()=>loop2()),ref:boxWith$1(()=>ref2(),v=>ref2(v)),onCloseAutoFocus:boxWith$1(()=>onCloseAutoFocus())}),mergedProps=user_derived(()=>mergeProps(restProps,contentState.props));function handleInteractOutside(e){if(contentState.handleInteractOutside(e),!e.defaultPrevented&&(onInteractOutside()(e),!e.defaultPrevented)){if(e.target&&e.target instanceof Element){const subContentSelector=`[${contentState.parentMenu.root.getBitsAttr("sub-content")}]`;if(e.target.closest(
subContentSelector))return}contentState.parentMenu.onClose()}}function handleEscapeKeydown(e){onEscapeKeydown()(e),!e.defaultPrevented&&contentState.parentMenu.onClose()}var fragment=comment$2(),node2=first_child(fragment);{var consequent_1=$$anchor2=>{Popper_layer_force_mount($$anchor2,spread_props(()=>get$3(mergedProps),()=>contentState.popperProps,{get ref(){return contentState.opts.ref},get enabled(){return contentState.parentMenu.opts.open.current},onInteractOutside:handleInteractOutside,onEscapeKeydown:handleEscapeKeydown,
get trapFocus(){return trapFocus()},get loop(){return loop2()},forceMount:!0,get id(){return id2()},get shouldRender(){return contentState.shouldRender},popper:($$anchor3,$$arg0)=>{let props=()=>$$arg0?.().props,wrapperProps=()=>$$arg0?.().wrapperProps;const finalProps=user_derived(()=>mergeProps(props(),{style:getFloatingContentCSSVars("dropdown-menu")},{style:$$props.style}));var fragment_2=comment$2(),node_1=first_child(fragment_2);{var consequent=$$anchor4=>{var fragment_3=comment$2(),node_2=first_child(
fragment_3);{let $0=user_derived(()=>({props:get$3(finalProps),wrapperProps:wrapperProps(),...contentState.snippetProps}));snippet(node_2,()=>$$props.child,()=>get$3($0))}append($$anchor4,fragment_3)},alternate=$$anchor4=>{var div=root_4$I();attribute_effect(div,()=>({...wrapperProps()}));var div_1=child(div);attribute_effect(div_1,()=>({...get$3(finalProps)}));var node_3=child(div_1);snippet(node_3,()=>$$props.children??noop$3),reset(div_1),reset(div),append($$anchor4,div)};if_block(node_1,$$render=>{
$$props.child?$$render(consequent):$$render(alternate,-1)})}append($$anchor3,fragment_2)},$$slots:{popper:!0}}))},consequent_3=$$anchor2=>{Popper_layer($$anchor2,spread_props(()=>get$3(mergedProps),()=>contentState.popperProps,{get ref(){return contentState.opts.ref},get open(){return contentState.parentMenu.opts.open.current},onInteractOutside:handleInteractOutside,onEscapeKeydown:handleEscapeKeydown,get trapFocus(){return trapFocus()},get loop(){return loop2()},forceMount:!1,get id(){return id2()},
get shouldRender(){return contentState.shouldRender},popper:($$anchor3,$$arg0)=>{let props=()=>$$arg0?.().props,wrapperProps=()=>$$arg0?.().wrapperProps;const finalProps=user_derived(()=>mergeProps(props(),{style:getFloatingContentCSSVars("dropdown-menu")},{style:$$props.style}));var fragment_5=comment$2(),node_4=first_child(fragment_5);{var consequent_2=$$anchor4=>{var fragment_6=comment$2(),node_5=first_child(fragment_6);{let $0=user_derived(()=>({props:get$3(finalProps),wrapperProps:wrapperProps(),
...contentState.snippetProps}));snippet(node_5,()=>$$props.child,()=>get$3($0))}append($$anchor4,fragment_6)},alternate_1=$$anchor4=>{var div_2=root_8$v();attribute_effect(div_2,()=>({...wrapperProps()}));var div_3=child(div_2);attribute_effect(div_3,()=>({...get$3(finalProps)}));var node_6=child(div_3);snippet(node_6,()=>$$props.children??noop$3),reset(div_3),reset(div_2),append($$anchor4,div_2)};if_block(node_4,$$render=>{$$props.child?$$render(consequent_2):$$render(alternate_1,-1)})}append($$anchor3,
fragment_5)},$$slots:{popper:!0}}))};if_block(node2,$$render=>{forceMount()?$$render(consequent_1):forceMount()||$$render(consequent_3,1)})}append($$anchor,fragment),pop()}var root_3$10=from_html("<button><!></button>");function Menu_trigger($$anchor,$$props){const uid2=props_id();push$1($$props,!0);let id2=prop($$props,"id",19,()=>createId(uid2)),ref2=prop($$props,"ref",15,null),disabled=prop($$props,"disabled",3,!1),type2=prop($$props,"type",3,"button"),restProps=rest_props($$props,["$$slots",
"$$events","$$legacy","id","ref","child","children","disabled","type"]);const triggerState=DropdownMenuTriggerState.create({id:boxWith$1(()=>id2()),disabled:boxWith$1(()=>disabled()??!1),ref:boxWith$1(()=>ref2(),v=>ref2(v))}),mergedProps=user_derived(()=>mergeProps(restProps,triggerState.props,{type:type2()}));Floating_layer_anchor($$anchor,{get id(){return id2()},get ref(){return triggerState.opts.ref},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);{
var consequent=$$anchor3=>{var fragment_2=comment$2(),node_1=first_child(fragment_2);snippet(node_1,()=>$$props.child,()=>({props:get$3(mergedProps)})),append($$anchor3,fragment_2)},alternate=$$anchor3=>{var button=root_3$10();attribute_effect(button,()=>({...get$3(mergedProps)}));var node_2=child(button);snippet(node_2,()=>$$props.children??noop$3),reset(button),append($$anchor3,button)};if_block(node2,$$render=>{$$props.child?$$render(consequent):$$render(alternate,-1)})}append($$anchor2,fragment_1)},
$$slots:{default:!0}}),pop()}const labelAttrs=createBitsAttrs({component:"label",parts:["root"]});class LabelRootState{static create(opts){return new LabelRootState(opts)}opts;attachment;constructor(opts){this.opts=opts,this.attachment=attachRef(this.opts.ref),this.onmousedown=this.onmousedown.bind(this)}onmousedown(e){e.detail>1&&e.preventDefault()}#props=user_derived(()=>({id:this.opts.id.current,[labelAttrs.root]:"",onmousedown:this.onmousedown,...this.attachment}));get props(){return get$3(this.#props)}set props(value){
set$1(this.#props,value)}}var root_2$1o=from_html("<label><!></label>");function Label$1($$anchor,$$props){const uid2=props_id();push$1($$props,!0);let id2=prop($$props,"id",19,()=>createId(uid2)),ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","children","child","id","ref","for"]);const rootState=LabelRootState.create({id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v))}),mergedProps=user_derived(()=>mergeProps(restProps,rootState.props,{for:$$props.
for}));var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);snippet(node_1,()=>$$props.child,()=>({props:get$3(mergedProps)})),append($$anchor2,fragment_1)},alternate=$$anchor2=>{var label=root_2$1o();attribute_effect(label,()=>({...get$3(mergedProps),for:$$props.for}));var node_2=child(label);snippet(node_2,()=>$$props.children??noop$3),reset(label),append($$anchor2,label)};if_block(node2,$$render=>{$$props.child?
$$render(consequent):$$render(alternate,-1)})}append($$anchor,fragment),pop()}class SvelteResizeObserver{#node;#onResize;constructor(node2,onResize){this.#node=node2,this.#onResize=onResize,this.handler=this.handler.bind(this),user_effect(this.handler)}handler(){let rAF=0;const _node=this.#node();if(!_node)return;const resizeObserver=new ResizeObserver(()=>{cancelAnimationFrame(rAF),rAF=window.requestAnimationFrame(this.#onResize)});return resizeObserver.observe(_node),()=>{window.cancelAnimationFrame(
rAF),resizeObserver.unobserve(_node)}}}class Presence{opts;present;#afterAnimations;#isPresent=state$1(!1);#hasMounted=!1;#transitionStatus=state$1(void 0);#transitionFrame=null;constructor(opts){this.opts=opts,this.present=this.opts.open,set$1(this.#isPresent,opts.open.current,!0),this.#afterAnimations=new AnimationsComplete({ref:this.opts.ref,afterTick:this.opts.open}),onDestroyEffect(()=>this.#clearTransitionFrame()),watch$1(()=>this.present.current,isOpen=>{if(!this.#hasMounted){this.#hasMounted=
!0;return}this.#clearTransitionFrame(),isOpen&&set$1(this.#isPresent,!0),set$1(this.#transitionStatus,isOpen?"starting":"ending",!0),isOpen&&(this.#transitionFrame=window.requestAnimationFrame(()=>{this.#transitionFrame=null,this.present.current&&set$1(this.#transitionStatus,void 0)})),this.#afterAnimations.run(()=>{isOpen===this.present.current&&(isOpen||set$1(this.#isPresent,!1),set$1(this.#transitionStatus,void 0))})})}#_isPresent=user_derived(()=>get$3(this.#isPresent));get isPresent(){return get$3(
this.#_isPresent)}set isPresent(value){set$1(this.#_isPresent,value)}get transitionStatus(){return get$3(this.#transitionStatus)}#clearTransitionFrame(){this.#transitionFrame!==null&&(window.cancelAnimationFrame(this.#transitionFrame),this.#transitionFrame=null)}}function Presence_layer($$anchor,$$props){push$1($$props,!0);const presenceState=new Presence({open:boxWith$1(()=>$$props.open),ref:$$props.ref});var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{var fragment_1=comment$2(),
node_1=first_child(fragment_1);snippet(node_1,()=>$$props.presence??noop$3,()=>({present:presenceState.isPresent,transitionStatus:presenceState.transitionStatus})),append($$anchor2,fragment_1)};if_block(node2,$$render=>{($$props.forceMount||$$props.open||presenceState.isPresent)&&$$render(consequent)})}append($$anchor,fragment),pop()}function Popover$1($$anchor,$$props){push$1($$props,!0);let open2=prop($$props,"open",15,!1),onOpenChange=prop($$props,"onOpenChange",3,noop$1),onOpenChangeComplete=prop(
$$props,"onOpenChangeComplete",3,noop$1);PopoverRootState.create({open:boxWith$1(()=>open2(),v=>{open2(v),onOpenChange()(v)}),onOpenChangeComplete:boxWith$1(()=>onOpenChangeComplete())}),Floating_layer($$anchor,{children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}}),pop()}function clamp(n,min2,max2){return Math.min(max2,Math.max(min2,n))}class StateMachine{state;#machine;constructor(initialState,machine){
this.state=simpleBox(initialState),this.#machine=machine,this.dispatch=this.dispatch.bind(this)}#reducer(event2){return this.#machine[this.state.current][event2]??this.state.current}dispatch(event2){this.state.current=this.#reducer(event2)}}const scrollAreaAttrs=createBitsAttrs({component:"scroll-area",parts:["root","viewport","corner","thumb","scrollbar"]}),ScrollAreaRootContext=new Context$1("ScrollArea.Root"),ScrollAreaScrollbarContext=new Context$1("ScrollArea.Scrollbar"),ScrollAreaScrollbarVisibleContext=new Context$1(
"ScrollArea.ScrollbarVisible"),ScrollAreaScrollbarAxisContext=new Context$1("ScrollArea.ScrollbarAxis"),ScrollAreaScrollbarSharedContext=new Context$1("ScrollArea.ScrollbarShared");class ScrollAreaRootState{static create(opts){return ScrollAreaRootContext.set(new ScrollAreaRootState(opts))}opts;attachment;#scrollAreaNode=state$1(null);get scrollAreaNode(){return get$3(this.#scrollAreaNode)}set scrollAreaNode(value){set$1(this.#scrollAreaNode,value,!0)}#viewportNode=state$1(null);get viewportNode(){
return get$3(this.#viewportNode)}set viewportNode(value){set$1(this.#viewportNode,value,!0)}#contentNode=state$1(null);get contentNode(){return get$3(this.#contentNode)}set contentNode(value){set$1(this.#contentNode,value,!0)}#scrollbarXNode=state$1(null);get scrollbarXNode(){return get$3(this.#scrollbarXNode)}set scrollbarXNode(value){set$1(this.#scrollbarXNode,value,!0)}#scrollbarYNode=state$1(null);get scrollbarYNode(){return get$3(this.#scrollbarYNode)}set scrollbarYNode(value){set$1(this.#scrollbarYNode,
value,!0)}#cornerWidth=state$1(0);get cornerWidth(){return get$3(this.#cornerWidth)}set cornerWidth(value){set$1(this.#cornerWidth,value,!0)}#cornerHeight=state$1(0);get cornerHeight(){return get$3(this.#cornerHeight)}set cornerHeight(value){set$1(this.#cornerHeight,value,!0)}#scrollbarXEnabled=state$1(!1);get scrollbarXEnabled(){return get$3(this.#scrollbarXEnabled)}set scrollbarXEnabled(value){set$1(this.#scrollbarXEnabled,value,!0)}#scrollbarYEnabled=state$1(!1);get scrollbarYEnabled(){return get$3(
this.#scrollbarYEnabled)}set scrollbarYEnabled(value){set$1(this.#scrollbarYEnabled,value,!0)}domContext;constructor(opts){this.opts=opts,this.attachment=attachRef(opts.ref,v=>this.scrollAreaNode=v),this.domContext=new DOMContext(opts.ref)}#props=user_derived(()=>({id:this.opts.id.current,dir:this.opts.dir.current,style:{position:"relative","--bits-scroll-area-corner-height":`${this.cornerHeight}px`,"--bits-scroll-area-corner-width":`${this.cornerWidth}px`},[scrollAreaAttrs.root]:"",...this.attachment}));get props(){
return get$3(this.#props)}set props(value){set$1(this.#props,value)}}class ScrollAreaViewportState{static create(opts){return new ScrollAreaViewportState(opts,ScrollAreaRootContext.get())}opts;root;attachment;#contentId=simpleBox(useId());#contentRef=simpleBox(null);contentAttachment=attachRef(this.#contentRef,v=>this.root.contentNode=v);constructor(opts,root2){this.opts=opts,this.root=root2,this.attachment=attachRef(opts.ref,v=>this.root.viewportNode=v)}#props=user_derived(()=>({id:this.opts.id.
current,style:{overflowX:this.root.scrollbarXEnabled?"scroll":"hidden",overflowY:this.root.scrollbarYEnabled?"scroll":"hidden"},[scrollAreaAttrs.viewport]:"",...this.attachment}));get props(){return get$3(this.#props)}set props(value){set$1(this.#props,value)}#contentProps=user_derived(()=>({id:this.#contentId.current,"data-scroll-area-content":"",style:{minWidth:this.root.scrollbarXEnabled?"fit-content":void 0},...this.contentAttachment}));get contentProps(){return get$3(this.#contentProps)}set contentProps(value){
set$1(this.#contentProps,value)}}class ScrollAreaScrollbarState{static create(opts){return ScrollAreaScrollbarContext.set(new ScrollAreaScrollbarState(opts,ScrollAreaRootContext.get()))}opts;root;#isHorizontal=user_derived(()=>this.opts.orientation.current==="horizontal");get isHorizontal(){return get$3(this.#isHorizontal)}set isHorizontal(value){set$1(this.#isHorizontal,value)}#hasThumb=state$1(!1);get hasThumb(){return get$3(this.#hasThumb)}set hasThumb(value){set$1(this.#hasThumb,value,!0)}constructor(opts,root2){
this.opts=opts,this.root=root2,watch$1(()=>this.isHorizontal,isHorizontal=>isHorizontal?(this.root.scrollbarXEnabled=!0,()=>{this.root.scrollbarXEnabled=!1}):(this.root.scrollbarYEnabled=!0,()=>{this.root.scrollbarYEnabled=!1}))}}class ScrollAreaScrollbarHoverState{static create(){return new ScrollAreaScrollbarHoverState(ScrollAreaScrollbarContext.get())}scrollbar;root;#isVisible=state$1(!1);get isVisible(){return get$3(this.#isVisible)}set isVisible(value){set$1(this.#isVisible,value,!0)}constructor(scrollbar){
this.scrollbar=scrollbar,this.root=scrollbar.root,user_effect(()=>{const scrollAreaNode=this.root.scrollAreaNode,hideDelay=this.root.opts.scrollHideDelay.current;let hideTimer=0;if(!scrollAreaNode)return;const handlePointerEnter=()=>{this.root.domContext.clearTimeout(hideTimer),untrack$1(()=>this.isVisible=!0)},handlePointerLeave=()=>{hideTimer&&this.root.domContext.clearTimeout(hideTimer),hideTimer=this.root.domContext.setTimeout(()=>{untrack$1(()=>{this.scrollbar.hasThumb=!1,this.isVisible=!1})},
hideDelay)},unsubListeners=executeCallbacks(on(scrollAreaNode,"pointerenter",handlePointerEnter),on(scrollAreaNode,"pointerleave",handlePointerLeave));return()=>{this.root.domContext.getWindow().clearTimeout(hideTimer),unsubListeners()}})}#props=user_derived(()=>({"data-state":this.isVisible?"visible":"hidden"}));get props(){return get$3(this.#props)}set props(value){set$1(this.#props,value)}}class ScrollAreaScrollbarScrollState{static create(){return new ScrollAreaScrollbarScrollState(ScrollAreaScrollbarContext.
get())}scrollbar;root;machine=new StateMachine("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});#isHidden=user_derived(()=>this.machine.state.current==="hidden");get isHidden(){return get$3(this.#isHidden)}set isHidden(value){set$1(this.#isHidden,value)}constructor(scrollbar){this.scrollbar=scrollbar,this.root=scrollbar.root;
const debounceScrollend=useDebounce(()=>this.machine.dispatch("SCROLL_END"),100);user_effect(()=>{const _state=this.machine.state.current,scrollHideDelay=this.root.opts.scrollHideDelay.current;if(_state==="idle"){const hideTimer=this.root.domContext.setTimeout(()=>this.machine.dispatch("HIDE"),scrollHideDelay);return()=>this.root.domContext.clearTimeout(hideTimer)}}),user_effect(()=>{const viewportNode=this.root.viewportNode;if(!viewportNode)return;const scrollDirection=this.scrollbar.isHorizontal?
"scrollLeft":"scrollTop";let prevScrollPos=viewportNode[scrollDirection];return on(viewportNode,"scroll",()=>{const scrollPos=viewportNode[scrollDirection];prevScrollPos!==scrollPos&&(this.machine.dispatch("SCROLL"),debounceScrollend()),prevScrollPos=scrollPos})}),this.onpointerenter=this.onpointerenter.bind(this),this.onpointerleave=this.onpointerleave.bind(this)}onpointerenter(_){this.machine.dispatch("POINTER_ENTER")}onpointerleave(_){this.machine.dispatch("POINTER_LEAVE")}#props=user_derived(
()=>({"data-state":this.machine.state.current==="hidden"?"hidden":"visible",onpointerenter:this.onpointerenter,onpointerleave:this.onpointerleave}));get props(){return get$3(this.#props)}set props(value){set$1(this.#props,value)}}class ScrollAreaScrollbarAutoState{static create(){return new ScrollAreaScrollbarAutoState(ScrollAreaScrollbarContext.get())}scrollbar;root;#isVisible=state$1(!1);get isVisible(){return get$3(this.#isVisible)}set isVisible(value){set$1(this.#isVisible,value,!0)}constructor(scrollbar){
this.scrollbar=scrollbar,this.root=scrollbar.root;const handleResize=useDebounce(()=>{const viewportNode=this.root.viewportNode;if(!viewportNode)return;const isOverflowX=viewportNode.offsetWidth<viewportNode.scrollWidth,isOverflowY=viewportNode.offsetHeight<viewportNode.scrollHeight;this.isVisible=this.scrollbar.isHorizontal?isOverflowX:isOverflowY},10);new SvelteResizeObserver(()=>this.root.viewportNode,handleResize),new SvelteResizeObserver(()=>this.root.contentNode,handleResize)}#props=user_derived(
()=>({"data-state":this.isVisible?"visible":"hidden"}));get props(){return get$3(this.#props)}set props(value){set$1(this.#props,value)}}class ScrollAreaScrollbarVisibleState{static create(){return ScrollAreaScrollbarVisibleContext.set(new ScrollAreaScrollbarVisibleState(ScrollAreaScrollbarContext.get()))}scrollbar;root;#thumbNode=state$1(null);get thumbNode(){return get$3(this.#thumbNode)}set thumbNode(value){set$1(this.#thumbNode,value,!0)}#pointerOffset=state$1(0);get pointerOffset(){return get$3(
this.#pointerOffset)}set pointerOffset(value){set$1(this.#pointerOffset,value,!0)}#sizes=state$1({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}});get sizes(){return get$3(this.#sizes)}set sizes(value){set$1(this.#sizes,value)}#thumbRatio=user_derived(()=>getThumbRatio(this.sizes.viewport,this.sizes.content));get thumbRatio(){return get$3(this.#thumbRatio)}set thumbRatio(value){set$1(this.#thumbRatio,value)}#hasThumb=user_derived(()=>this.thumbRatio>0&&this.thumbRatio<1);get hasThumb(){
return get$3(this.#hasThumb)}set hasThumb(value){set$1(this.#hasThumb,value)}#prevTransformStyle=state$1("");get prevTransformStyle(){return get$3(this.#prevTransformStyle)}set prevTransformStyle(value){set$1(this.#prevTransformStyle,value,!0)}constructor(scrollbar){this.scrollbar=scrollbar,this.root=scrollbar.root,user_effect(()=>{this.scrollbar.hasThumb=this.hasThumb}),user_effect(()=>{!this.scrollbar.hasThumb&&this.thumbNode&&(this.prevTransformStyle=this.thumbNode.style.transform)})}setSizes(sizes){
this.sizes=sizes}getScrollPosition(pointerPos,dir){return getScrollPositionFromPointer({pointerPos,pointerOffset:this.pointerOffset,sizes:this.sizes,dir})}onThumbPointerUp(){this.pointerOffset=0}onThumbPointerDown(pointerPos){this.pointerOffset=pointerPos}xOnThumbPositionChange(){if(!(this.root.viewportNode&&this.thumbNode))return;const scrollPos=this.root.viewportNode.scrollLeft,transformStyle=`translate3d(${getThumbOffsetFromScroll({scrollPos,sizes:this.sizes,dir:this.root.opts.dir.current})}p\
x, 0, 0)`;this.thumbNode.style.transform=transformStyle,this.prevTransformStyle=transformStyle}xOnWheelScroll(scrollPos){this.root.viewportNode&&(this.root.viewportNode.scrollLeft=scrollPos)}xOnDragScroll(pointerPos){this.root.viewportNode&&(this.root.viewportNode.scrollLeft=this.getScrollPosition(pointerPos,this.root.opts.dir.current))}yOnThumbPositionChange(){if(!(this.root.viewportNode&&this.thumbNode))return;const scrollPos=this.root.viewportNode.scrollTop,transformStyle=`translate3d(0, ${getThumbOffsetFromScroll(
{scrollPos,sizes:this.sizes})}px, 0)`;this.thumbNode.style.transform=transformStyle,this.prevTransformStyle=transformStyle}yOnWheelScroll(scrollPos){this.root.viewportNode&&(this.root.viewportNode.scrollTop=scrollPos)}yOnDragScroll(pointerPos){this.root.viewportNode&&(this.root.viewportNode.scrollTop=this.getScrollPosition(pointerPos,this.root.opts.dir.current))}}class ScrollAreaScrollbarXState{static create(opts){return ScrollAreaScrollbarAxisContext.set(new ScrollAreaScrollbarXState(opts,ScrollAreaScrollbarVisibleContext.
get()))}opts;scrollbarVis;root;scrollbar;attachment;#computedStyle=state$1();get computedStyle(){return get$3(this.#computedStyle)}set computedStyle(value){set$1(this.#computedStyle,value,!0)}constructor(opts,scrollbarVis){this.opts=opts,this.scrollbarVis=scrollbarVis,this.root=scrollbarVis.root,this.scrollbar=scrollbarVis.scrollbar,this.attachment=attachRef(this.scrollbar.opts.ref,v=>this.root.scrollbarXNode=v),user_effect(()=>{this.scrollbar.opts.ref.current&&this.opts.mounted.current&&(this.computedStyle=
getComputedStyle(this.scrollbar.opts.ref.current))}),user_effect(()=>{this.onResize()})}onThumbPointerDown=pointerPos=>{this.scrollbarVis.onThumbPointerDown(pointerPos.x)};onDragScroll=pointerPos=>{this.scrollbarVis.xOnDragScroll(pointerPos.x)};onThumbPointerUp=()=>{this.scrollbarVis.onThumbPointerUp()};onThumbPositionChange=()=>{this.scrollbarVis.xOnThumbPositionChange()};onWheelScroll=(e,maxScrollPos)=>{if(!this.root.viewportNode)return;const scrollPos=this.root.viewportNode.scrollLeft+e.deltaX;
this.scrollbarVis.xOnWheelScroll(scrollPos),isScrollingWithinScrollbarBounds(scrollPos,maxScrollPos)&&e.preventDefault()};onResize=()=>{this.scrollbar.opts.ref.current&&this.root.viewportNode&&this.computedStyle&&this.scrollbarVis.setSizes({content:this.root.viewportNode.scrollWidth,viewport:this.root.viewportNode.offsetWidth,scrollbar:{size:this.scrollbar.opts.ref.current.clientWidth,paddingStart:toInt(this.computedStyle.paddingLeft),paddingEnd:toInt(this.computedStyle.paddingRight)}})};#thumbSize=user_derived(
()=>getThumbSize(this.scrollbarVis.sizes));get thumbSize(){return get$3(this.#thumbSize)}set thumbSize(value){set$1(this.#thumbSize,value)}#props=user_derived(()=>({id:this.scrollbar.opts.id.current,"data-orientation":"horizontal",style:{bottom:0,left:this.root.opts.dir.current==="rtl"?"var(--bits-scroll-area-corner-width)":0,right:this.root.opts.dir.current==="ltr"?"var(--bits-scroll-area-corner-width)":0,"--bits-scroll-area-thumb-width":`${this.thumbSize}px`},...this.attachment}));get props(){
return get$3(this.#props)}set props(value){set$1(this.#props,value)}}class ScrollAreaScrollbarYState{static create(opts){return ScrollAreaScrollbarAxisContext.set(new ScrollAreaScrollbarYState(opts,ScrollAreaScrollbarVisibleContext.get()))}opts;scrollbarVis;root;scrollbar;attachment;#computedStyle=state$1();get computedStyle(){return get$3(this.#computedStyle)}set computedStyle(value){set$1(this.#computedStyle,value,!0)}constructor(opts,scrollbarVis){this.opts=opts,this.scrollbarVis=scrollbarVis,
this.root=scrollbarVis.root,this.scrollbar=scrollbarVis.scrollbar,this.attachment=attachRef(this.scrollbar.opts.ref,v=>this.root.scrollbarYNode=v),user_effect(()=>{this.scrollbar.opts.ref.current&&this.opts.mounted.current&&(this.computedStyle=getComputedStyle(this.scrollbar.opts.ref.current))}),user_effect(()=>{this.onResize()}),this.onThumbPointerDown=this.onThumbPointerDown.bind(this),this.onDragScroll=this.onDragScroll.bind(this),this.onThumbPointerUp=this.onThumbPointerUp.bind(this),this.onThumbPositionChange=
this.onThumbPositionChange.bind(this),this.onWheelScroll=this.onWheelScroll.bind(this),this.onResize=this.onResize.bind(this)}onThumbPointerDown(pointerPos){this.scrollbarVis.onThumbPointerDown(pointerPos.y)}onDragScroll(pointerPos){this.scrollbarVis.yOnDragScroll(pointerPos.y)}onThumbPointerUp(){this.scrollbarVis.onThumbPointerUp()}onThumbPositionChange(){this.scrollbarVis.yOnThumbPositionChange()}onWheelScroll(e,maxScrollPos){if(!this.root.viewportNode)return;const scrollPos=this.root.viewportNode.
scrollTop+e.deltaY;this.scrollbarVis.yOnWheelScroll(scrollPos),isScrollingWithinScrollbarBounds(scrollPos,maxScrollPos)&&e.preventDefault()}onResize(){this.scrollbar.opts.ref.current&&this.root.viewportNode&&this.computedStyle&&this.scrollbarVis.setSizes({content:this.root.viewportNode.scrollHeight,viewport:this.root.viewportNode.offsetHeight,scrollbar:{size:this.scrollbar.opts.ref.current.clientHeight,paddingStart:toInt(this.computedStyle.paddingTop),paddingEnd:toInt(this.computedStyle.paddingBottom)}})}#thumbSize=user_derived(
()=>getThumbSize(this.scrollbarVis.sizes));get thumbSize(){return get$3(this.#thumbSize)}set thumbSize(value){set$1(this.#thumbSize,value)}#props=user_derived(()=>({id:this.scrollbar.opts.id.current,"data-orientation":"vertical",style:{top:0,right:this.root.opts.dir.current==="ltr"?0:void 0,left:this.root.opts.dir.current==="rtl"?0:void 0,bottom:"var(--bits-scroll-area-corner-height)","--bits-scroll-area-thumb-height":`${this.thumbSize}px`},...this.attachment}));get props(){return get$3(this.#props)}set props(value){
set$1(this.#props,value)}}class ScrollAreaScrollbarSharedState{static create(){return ScrollAreaScrollbarSharedContext.set(new ScrollAreaScrollbarSharedState(ScrollAreaScrollbarAxisContext.get()))}scrollbarState;root;scrollbarVis;scrollbar;#rect=state$1(null);get rect(){return get$3(this.#rect)}set rect(value){set$1(this.#rect,value)}#prevWebkitUserSelect=state$1("");get prevWebkitUserSelect(){return get$3(this.#prevWebkitUserSelect)}set prevWebkitUserSelect(value){set$1(this.#prevWebkitUserSelect,
value,!0)}handleResize;handleThumbPositionChange;handleWheelScroll;handleThumbPointerDown;handleThumbPointerUp;#maxScrollPos=user_derived(()=>this.scrollbarVis.sizes.content-this.scrollbarVis.sizes.viewport);get maxScrollPos(){return get$3(this.#maxScrollPos)}set maxScrollPos(value){set$1(this.#maxScrollPos,value)}constructor(scrollbarState){this.scrollbarState=scrollbarState,this.root=scrollbarState.root,this.scrollbarVis=scrollbarState.scrollbarVis,this.scrollbar=scrollbarState.scrollbarVis.scrollbar,
this.handleResize=useDebounce(()=>this.scrollbarState.onResize(),10),this.handleThumbPositionChange=this.scrollbarState.onThumbPositionChange,this.handleWheelScroll=this.scrollbarState.onWheelScroll,this.handleThumbPointerDown=this.scrollbarState.onThumbPointerDown,this.handleThumbPointerUp=this.scrollbarState.onThumbPointerUp,user_effect(()=>{const maxScrollPos=this.maxScrollPos,scrollbarNode=this.scrollbar.opts.ref.current;this.root.viewportNode;const handleWheel=e=>{const node2=e.target;scrollbarNode?.
contains(node2)&&this.handleWheelScroll(e,maxScrollPos)};return on(this.root.domContext.getDocument(),"wheel",handleWheel,{passive:!1})}),user_pre_effect(()=>{this.scrollbarVis.sizes,untrack$1(()=>this.handleThumbPositionChange())}),new SvelteResizeObserver(()=>this.scrollbar.opts.ref.current,this.handleResize),new SvelteResizeObserver(()=>this.root.contentNode,this.handleResize),this.onpointerdown=this.onpointerdown.bind(this),this.onpointermove=this.onpointermove.bind(this),this.onpointerup=this.
onpointerup.bind(this),this.onlostpointercapture=this.onlostpointercapture.bind(this)}handleDragScroll(e){if(!this.rect)return;const x=e.clientX-this.rect.left,y=e.clientY-this.rect.top;this.scrollbarState.onDragScroll({x,y})}#cleanupPointerState(){this.rect!==null&&(this.root.domContext.getDocument().body.style.webkitUserSelect=this.prevWebkitUserSelect,this.root.viewportNode&&(this.root.viewportNode.style.scrollBehavior=""),this.rect=null)}onpointerdown(e){if(e.button!==0)return;e.target.setPointerCapture(
e.pointerId),this.rect=this.scrollbar.opts.ref.current?.getBoundingClientRect()??null,this.prevWebkitUserSelect=this.root.domContext.getDocument().body.style.webkitUserSelect,this.root.domContext.getDocument().body.style.webkitUserSelect="none",this.root.viewportNode&&(this.root.viewportNode.style.scrollBehavior="auto"),this.handleDragScroll(e)}onpointermove(e){this.handleDragScroll(e)}onpointerup(e){const target2=e.target;target2.hasPointerCapture(e.pointerId)&&target2.releasePointerCapture(e.pointerId),
this.#cleanupPointerState()}onlostpointercapture(_){this.#cleanupPointerState()}#props=user_derived(()=>mergeProps({...this.scrollbarState.props,style:{position:"absolute",...this.scrollbarState.props.style},[scrollAreaAttrs.scrollbar]:"",onpointerdown:this.onpointerdown,onpointermove:this.onpointermove,onpointerup:this.onpointerup,onlostpointercapture:this.onlostpointercapture}));get props(){return get$3(this.#props)}set props(value){set$1(this.#props,value)}}class ScrollAreaThumbImplState{static create(opts){
return new ScrollAreaThumbImplState(opts,ScrollAreaScrollbarSharedContext.get())}opts;scrollbarState;attachment;#root;#removeUnlinkedScrollListener=state$1();#debounceScrollEnd=useDebounce(()=>{get$3(this.#removeUnlinkedScrollListener)&&(get$3(this.#removeUnlinkedScrollListener)(),set$1(this.#removeUnlinkedScrollListener,void 0))},100);constructor(opts,scrollbarState){this.opts=opts,this.scrollbarState=scrollbarState,this.#root=scrollbarState.root,this.attachment=attachRef(this.opts.ref,v=>this.
scrollbarState.scrollbarVis.thumbNode=v),user_effect(()=>{const viewportNode=this.#root.viewportNode;if(!viewportNode)return;const handleScroll=()=>{if(this.#debounceScrollEnd(),!get$3(this.#removeUnlinkedScrollListener)){const listener=addUnlinkedScrollListener(viewportNode,this.scrollbarState.handleThumbPositionChange);set$1(this.#removeUnlinkedScrollListener,listener,!0),this.scrollbarState.handleThumbPositionChange()}};return untrack$1(()=>this.scrollbarState.handleThumbPositionChange()),on(
viewportNode,"scroll",handleScroll)}),this.onpointerdowncapture=this.onpointerdowncapture.bind(this),this.onpointerup=this.onpointerup.bind(this)}onpointerdowncapture(e){const thumb=e.target;if(!thumb)return;const thumbRect=thumb.getBoundingClientRect(),x=e.clientX-thumbRect.left,y=e.clientY-thumbRect.top;this.scrollbarState.handleThumbPointerDown({x,y})}onpointerup(_){this.scrollbarState.handleThumbPointerUp()}#props=user_derived(()=>({id:this.opts.id.current,"data-state":this.scrollbarState.scrollbarVis.
hasThumb?"visible":"hidden",style:{width:"var(--bits-scroll-area-thumb-width)",height:"var(--bits-scroll-area-thumb-height)",transform:this.scrollbarState.scrollbarVis.prevTransformStyle},onpointerdowncapture:this.onpointerdowncapture,onpointerup:this.onpointerup,[scrollAreaAttrs.thumb]:"",...this.attachment}));get props(){return get$3(this.#props)}set props(value){set$1(this.#props,value)}}class ScrollAreaCornerImplState{static create(opts){return new ScrollAreaCornerImplState(opts,ScrollAreaRootContext.
get())}opts;root;attachment;#width=state$1(0);#height=state$1(0);#hasSize=user_derived(()=>!!(get$3(this.#width)&&get$3(this.#height)));get hasSize(){return get$3(this.#hasSize)}set hasSize(value){set$1(this.#hasSize,value)}constructor(opts,root2){this.opts=opts,this.root=root2,this.attachment=attachRef(this.opts.ref),new SvelteResizeObserver(()=>this.root.scrollbarXNode,()=>{const height=this.root.scrollbarXNode?.offsetHeight||0;this.root.cornerHeight=height,set$1(this.#height,height,!0)}),new SvelteResizeObserver(
()=>this.root.scrollbarYNode,()=>{const width=this.root.scrollbarYNode?.offsetWidth||0;this.root.cornerWidth=width,set$1(this.#width,width,!0)})}#props=user_derived(()=>({id:this.opts.id.current,style:{width:get$3(this.#width),height:get$3(this.#height),position:"absolute",right:this.root.opts.dir.current==="ltr"?0:void 0,left:this.root.opts.dir.current==="rtl"?0:void 0,bottom:0},[scrollAreaAttrs.corner]:"",...this.attachment}));get props(){return get$3(this.#props)}set props(value){set$1(this.#props,
value)}}function toInt(value){return value?Number.parseInt(value,10):0}function getThumbRatio(viewportSize,contentSize){const ratio=viewportSize/contentSize;return Number.isNaN(ratio)?0:ratio}function getThumbSize(sizes){const ratio=getThumbRatio(sizes.viewport,sizes.content),scrollbarPadding=sizes.scrollbar.paddingStart+sizes.scrollbar.paddingEnd,thumbSize=(sizes.scrollbar.size-scrollbarPadding)*ratio;return Math.max(thumbSize,18)}function getScrollPositionFromPointer({pointerPos,pointerOffset,
sizes,dir="ltr"}){const thumbSizePx=getThumbSize(sizes),thumbCenter=thumbSizePx/2,offset2=pointerOffset||thumbCenter,thumbOffsetFromEnd=thumbSizePx-offset2,minPointerPos=sizes.scrollbar.paddingStart+offset2,maxPointerPos=sizes.scrollbar.size-sizes.scrollbar.paddingEnd-thumbOffsetFromEnd,maxScrollPos=sizes.content-sizes.viewport,scrollRange=dir==="ltr"?[0,maxScrollPos]:[maxScrollPos*-1,0];return linearScale([minPointerPos,maxPointerPos],scrollRange)(pointerPos)}function getThumbOffsetFromScroll({
scrollPos,sizes,dir="ltr"}){const thumbSizePx=getThumbSize(sizes),scrollbarPadding=sizes.scrollbar.paddingStart+sizes.scrollbar.paddingEnd,scrollbar=sizes.scrollbar.size-scrollbarPadding,maxScrollPos=sizes.content-sizes.viewport,maxThumbPos=scrollbar-thumbSizePx,scrollClampRange=dir==="ltr"?[0,maxScrollPos]:[maxScrollPos*-1,0],scrollWithoutMomentum=clamp(scrollPos,scrollClampRange[0],scrollClampRange[1]);return linearScale([0,maxScrollPos],[0,maxThumbPos])(scrollWithoutMomentum)}function linearScale(input,output){
return value=>{if(input[0]===input[1]||output[0]===output[1])return output[0];const ratio=(output[1]-output[0])/(input[1]-input[0]);return output[0]+ratio*(value-input[0])}}function isScrollingWithinScrollbarBounds(scrollPos,maxScrollPos){return scrollPos>0&&scrollPos<maxScrollPos}function addUnlinkedScrollListener(node2,handler){let prevPosition={left:node2.scrollLeft,top:node2.scrollTop},rAF=0;const win=getWindow$1(node2);return(function loop2(){const position2={left:node2.scrollLeft,top:node2.
scrollTop},isHorizontalScroll=prevPosition.left!==position2.left,isVerticalScroll=prevPosition.top!==position2.top;(isHorizontalScroll||isVerticalScroll)&&handler(),prevPosition=position2,rAF=win.requestAnimationFrame(loop2)})(),()=>win.cancelAnimationFrame(rAF)}var root_2$1n=from_html("<div><!></div>");function Scroll_area$1($$anchor,$$props){const uid2=props_id();push$1($$props,!0);let ref2=prop($$props,"ref",15,null),id2=prop($$props,"id",19,()=>createId(uid2)),type2=prop($$props,"type",3,"ho\
ver"),dir=prop($$props,"dir",3,"ltr"),scrollHideDelay=prop($$props,"scrollHideDelay",3,600),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","id","type","dir","scrollHideDelay","children","child"]);const rootState=ScrollAreaRootState.create({type:boxWith$1(()=>type2()),dir:boxWith$1(()=>dir()),scrollHideDelay:boxWith$1(()=>scrollHideDelay()),id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v))}),mergedProps=user_derived(()=>mergeProps(restProps,rootState.props));var fragment=comment$2(),
node2=first_child(fragment);{var consequent=$$anchor2=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);snippet(node_1,()=>$$props.child,()=>({props:get$3(mergedProps)})),append($$anchor2,fragment_1)},alternate=$$anchor2=>{var div=root_2$1n();attribute_effect(div,()=>({...get$3(mergedProps)}));var node_2=child(div);snippet(node_2,()=>$$props.children??noop$3),reset(div),append($$anchor2,div)};if_block(node2,$$render=>{$$props.child?$$render(consequent):$$render(alternate,-1)})}append($$anchor,
fragment),pop()}var root$1Y=from_html("<div><div><!></div></div>");function Scroll_area_viewport($$anchor,$$props){const uid2=props_id();push$1($$props,!0);let ref2=prop($$props,"ref",15,null),id2=prop($$props,"id",19,()=>createId(uid2)),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","id","children"]);const viewportState=ScrollAreaViewportState.create({id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v))}),mergedProps=user_derived(()=>mergeProps(restProps,viewportState.
props)),mergedContentProps=user_derived(()=>mergeProps({},viewportState.contentProps));var div=root$1Y();attribute_effect(div,()=>({...get$3(mergedProps)}));var div_1=child(div);attribute_effect(div_1,()=>({...get$3(mergedContentProps)}));var node2=child(div_1);snippet(node2,()=>$$props.children??noop$3),reset(div_1),reset(div),append($$anchor,div),pop()}var root_2$1m=from_html("<div><!></div>");function Scroll_area_scrollbar_shared($$anchor,$$props){push$1($$props,!0);let restProps=rest_props($$props,
["$$slots","$$events","$$legacy","child","children"]);const scrollbarSharedState=ScrollAreaScrollbarSharedState.create(),mergedProps=user_derived(()=>mergeProps(restProps,scrollbarSharedState.props));var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);snippet(node_1,()=>$$props.child,()=>({props:get$3(mergedProps)})),append($$anchor2,fragment_1)},alternate=$$anchor2=>{var div=root_2$1m();attribute_effect(div,()=>({
...get$3(mergedProps)}));var node_2=child(div);snippet(node_2,()=>$$props.children??noop$3),reset(div),append($$anchor2,div)};if_block(node2,$$render=>{$$props.child?$$render(consequent):$$render(alternate,-1)})}append($$anchor,fragment),pop()}function Scroll_area_scrollbar_x($$anchor,$$props){push$1($$props,!0);let restProps=rest_props($$props,["$$slots","$$events","$$legacy"]);const isMounted=new IsMounted,scrollbarXState=ScrollAreaScrollbarXState.create({mounted:boxWith$1(()=>isMounted.current)}),
mergedProps=user_derived(()=>mergeProps(restProps,scrollbarXState.props));Scroll_area_scrollbar_shared($$anchor,spread_props(()=>get$3(mergedProps))),pop()}function Scroll_area_scrollbar_y($$anchor,$$props){push$1($$props,!0);let restProps=rest_props($$props,["$$slots","$$events","$$legacy"]);const isMounted=new IsMounted,scrollbarYState=ScrollAreaScrollbarYState.create({mounted:boxWith$1(()=>isMounted.current)}),mergedProps=user_derived(()=>mergeProps(restProps,scrollbarYState.props));Scroll_area_scrollbar_shared(
$$anchor,spread_props(()=>get$3(mergedProps))),pop()}function Scroll_area_scrollbar_visible($$anchor,$$props){push$1($$props,!0);let restProps=rest_props($$props,["$$slots","$$events","$$legacy"]);const scrollbarVisibleState=ScrollAreaScrollbarVisibleState.create();var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{Scroll_area_scrollbar_x($$anchor2,spread_props(()=>restProps))},alternate=$$anchor2=>{Scroll_area_scrollbar_y($$anchor2,spread_props(()=>restProps))};if_block(
node2,$$render=>{scrollbarVisibleState.scrollbar.opts.orientation.current==="horizontal"?$$render(consequent):$$render(alternate,-1)})}append($$anchor,fragment),pop()}function Scroll_area_scrollbar_auto($$anchor,$$props){push$1($$props,!0);let forceMount=prop($$props,"forceMount",3,!1),restProps=rest_props($$props,["$$slots","$$events","$$legacy","forceMount"]);const scrollbarAutoState=ScrollAreaScrollbarAutoState.create(),mergedProps=user_derived(()=>mergeProps(restProps,scrollbarAutoState.props));
{const presence=$$anchor2=>{Scroll_area_scrollbar_visible($$anchor2,spread_props(()=>get$3(mergedProps)))};let $0=user_derived(()=>forceMount()||scrollbarAutoState.isVisible);Presence_layer($$anchor,{get open(){return get$3($0)},get ref(){return scrollbarAutoState.scrollbar.opts.ref},presence,$$slots:{presence:!0}})}pop()}function Scroll_area_scrollbar_scroll($$anchor,$$props){push$1($$props,!0);let forceMount=prop($$props,"forceMount",3,!1),restProps=rest_props($$props,["$$slots","$$events","$$\
legacy","forceMount"]);const scrollbarScrollState=ScrollAreaScrollbarScrollState.create(),mergedProps=user_derived(()=>mergeProps(restProps,scrollbarScrollState.props));{const presence=$$anchor2=>{Scroll_area_scrollbar_visible($$anchor2,spread_props(()=>get$3(mergedProps)))};let $0=user_derived(()=>forceMount()||!scrollbarScrollState.isHidden);Presence_layer($$anchor,spread_props(()=>get$3(mergedProps),{get open(){return get$3($0)},get ref(){return scrollbarScrollState.scrollbar.opts.ref},presence,
$$slots:{presence:!0}}))}pop()}function Scroll_area_scrollbar_hover($$anchor,$$props){push$1($$props,!0);let forceMount=prop($$props,"forceMount",3,!1),restProps=rest_props($$props,["$$slots","$$events","$$legacy","forceMount"]);const scrollbarHoverState=ScrollAreaScrollbarHoverState.create(),scrollbarAutoState=ScrollAreaScrollbarAutoState.create(),mergedProps=user_derived(()=>mergeProps(restProps,scrollbarHoverState.props,scrollbarAutoState.props,{"data-state":scrollbarHoverState.isVisible?"vis\
ible":"hidden"})),open2=user_derived(()=>forceMount()||scrollbarHoverState.isVisible&&scrollbarAutoState.isVisible);Presence_layer($$anchor,{get open(){return get$3(open2)},get ref(){return scrollbarAutoState.scrollbar.opts.ref},presence:$$anchor2=>{Scroll_area_scrollbar_visible($$anchor2,spread_props(()=>get$3(mergedProps)))},$$slots:{presence:!0}}),pop()}function Scroll_area_scrollbar$1($$anchor,$$props){const uid2=props_id();push$1($$props,!0);let ref2=prop($$props,"ref",15,null),id2=prop($$props,
"id",19,()=>createId(uid2)),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","id","orientation"]);const scrollbarState=ScrollAreaScrollbarState.create({orientation:boxWith$1(()=>$$props.orientation),id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v))}),type2=user_derived(()=>scrollbarState.root.opts.type.current);var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{Scroll_area_scrollbar_hover($$anchor2,spread_props(()=>restProps,{get id(){return id2()}}))},
consequent_1=$$anchor2=>{Scroll_area_scrollbar_scroll($$anchor2,spread_props(()=>restProps,{get id(){return id2()}}))},consequent_2=$$anchor2=>{Scroll_area_scrollbar_auto($$anchor2,spread_props(()=>restProps,{get id(){return id2()}}))},consequent_3=$$anchor2=>{Scroll_area_scrollbar_visible($$anchor2,spread_props(()=>restProps,{get id(){return id2()}}))};if_block(node2,$$render=>{get$3(type2)==="hover"?$$render(consequent):get$3(type2)==="scroll"?$$render(consequent_1,1):get$3(type2)==="auto"?$$render(
consequent_2,2):get$3(type2)==="always"&&$$render(consequent_3,3)})}append($$anchor,fragment),pop()}var root_2$1l=from_html("<div><!></div>");function Scroll_area_thumb_impl($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","id","child","children","present"]);const isMounted=new IsMounted,thumbState=ScrollAreaThumbImplState.create({id:boxWith$1(()=>$$props.id),ref:boxWith$1(()=>ref2(),v=>ref2(v)),mounted:boxWith$1(
()=>isMounted.current)}),mergedProps=user_derived(()=>mergeProps(restProps,thumbState.props,{style:{hidden:!$$props.present}}));var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);snippet(node_1,()=>$$props.child,()=>({props:get$3(mergedProps)})),append($$anchor2,fragment_1)},alternate=$$anchor2=>{var div=root_2$1l();attribute_effect(div,()=>({...get$3(mergedProps)}));var node_2=child(div);snippet(node_2,()=>$$props.
children??noop$3),reset(div),append($$anchor2,div)};if_block(node2,$$render=>{$$props.child?$$render(consequent):$$render(alternate,-1)})}append($$anchor,fragment),pop()}function Scroll_area_thumb($$anchor,$$props){const uid2=props_id();push$1($$props,!0);let id2=prop($$props,"id",19,()=>createId(uid2)),ref2=prop($$props,"ref",15,null),forceMount=prop($$props,"forceMount",3,!1),restProps=rest_props($$props,["$$slots","$$events","$$legacy","id","ref","forceMount"]);const scrollbarState=ScrollAreaScrollbarVisibleContext.
get();{const presence=($$anchor2,$$arg0)=>{let present=()=>$$arg0?.().present;Scroll_area_thumb_impl($$anchor2,spread_props(()=>restProps,{get id(){return id2()},get present(){return present()},get ref(){return ref2()},set ref($$value){ref2($$value)}}))};let $0=user_derived(()=>forceMount()||scrollbarState.hasThumb);Presence_layer($$anchor,{get open(){return get$3($0)},get ref(){return scrollbarState.scrollbar.opts.ref},presence,$$slots:{presence:!0}})}pop()}var root_2$1k=from_html("<div><!></di\
v>");function Scroll_area_corner_impl($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","id","children","child"]);const cornerState=ScrollAreaCornerImplState.create({id:boxWith$1(()=>$$props.id),ref:boxWith$1(()=>ref2(),v=>ref2(v))}),mergedProps=user_derived(()=>mergeProps(restProps,cornerState.props));var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{var fragment_1=comment$2(),
node_1=first_child(fragment_1);snippet(node_1,()=>$$props.child,()=>({props:get$3(mergedProps)})),append($$anchor2,fragment_1)},alternate=$$anchor2=>{var div=root_2$1k();attribute_effect(div,()=>({...get$3(mergedProps)}));var node_2=child(div);snippet(node_2,()=>$$props.children??noop$3),reset(div),append($$anchor2,div)};if_block(node2,$$render=>{$$props.child?$$render(consequent):$$render(alternate,-1)})}append($$anchor,fragment),pop()}function Scroll_area_corner($$anchor,$$props){const uid2=props_id();
push$1($$props,!0);let ref2=prop($$props,"ref",15,null),id2=prop($$props,"id",19,()=>createId(uid2)),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","id"]);const scrollAreaState=ScrollAreaRootContext.get(),hasBothScrollbarsVisible=user_derived(()=>!!(scrollAreaState.scrollbarXNode&&scrollAreaState.scrollbarYNode)),hasCorner=user_derived(()=>scrollAreaState.opts.type.current!=="scroll"&&get$3(hasBothScrollbarsVisible));var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{
Scroll_area_corner_impl($$anchor2,spread_props(()=>restProps,{get id(){return id2()},get ref(){return ref2()},set ref($$value){ref2($$value)}}))};if_block(node2,$$render=>{get$3(hasCorner)&&$$render(consequent)})}append($$anchor,fragment),pop()}var root$1X=from_html("<!> <!>",1);function Select($$anchor,$$props){push$1($$props,!0);let value=prop($$props,"value",15),onValueChange=prop($$props,"onValueChange",3,noop$1),name=prop($$props,"name",3,""),disabled=prop($$props,"disabled",3,!1),open2=prop(
$$props,"open",15,!1),onOpenChange=prop($$props,"onOpenChange",3,noop$1),onOpenChangeComplete=prop($$props,"onOpenChangeComplete",3,noop$1),loop2=prop($$props,"loop",3,!1),scrollAlignment=prop($$props,"scrollAlignment",3,"nearest"),required2=prop($$props,"required",3,!1),items2=prop($$props,"items",19,()=>[]),allowDeselect=prop($$props,"allowDeselect",3,!1);function handleDefaultValue(){value()===void 0&&value($$props.type==="single"?"":[])}handleDefaultValue(),watch$1.pre(()=>value(),()=>{handleDefaultValue()});
let inputValue=state$1("");const rootState=SelectRootState.create({type:$$props.type,value:boxWith$1(()=>value(),v=>{value(v),onValueChange()(v)}),disabled:boxWith$1(()=>disabled()),required:boxWith$1(()=>required2()),open:boxWith$1(()=>open2(),v=>{open2(v),onOpenChange()(v)}),loop:boxWith$1(()=>loop2()),scrollAlignment:boxWith$1(()=>scrollAlignment()),name:boxWith$1(()=>name()),isCombobox:!1,items:boxWith$1(()=>items2()),allowDeselect:boxWith$1(()=>allowDeselect()),inputValue:boxWith$1(()=>get$3(
inputValue),v=>set$1(inputValue,v,!0)),onOpenChangeComplete:boxWith$1(()=>onOpenChangeComplete())});var fragment=root$1X(),node2=first_child(fragment);Floating_layer(node2,{children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);snippet(node_1,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}});var node_2=sibling(node2,2);{var consequent_1=$$anchor2=>{var fragment_2=comment$2(),node_3=first_child(fragment_2);{var consequent=$$anchor3=>{
Select_hidden_input($$anchor3,{get autocomplete(){return $$props.autocomplete}})},alternate=$$anchor3=>{var fragment_4=comment$2(),node_4=first_child(fragment_4);each(node_4,16,()=>rootState.opts.value.current,item=>item,($$anchor4,item)=>{Select_hidden_input($$anchor4,{get value(){return item},get autocomplete(){return $$props.autocomplete}})}),append($$anchor3,fragment_4)};if_block(node_3,$$render=>{rootState.opts.value.current.length===0?$$render(consequent):$$render(alternate,-1)})}append($$anchor2,
fragment_2)},d2=user_derived(()=>Array.isArray(rootState.opts.value.current)),alternate_1=$$anchor2=>{Select_hidden_input($$anchor2,{get autocomplete(){return $$props.autocomplete},get value(){return rootState.opts.value.current},set value($$value){rootState.opts.value.current=$$value}})};if_block(node_2,$$render=>{get$3(d2)?$$render(consequent_1):$$render(alternate_1,-1)})}append($$anchor,fragment),pop()}var root_3$$=from_html("<button><!></button>");function Select_trigger$1($$anchor,$$props){
const uid2=props_id();push$1($$props,!0);let id2=prop($$props,"id",19,()=>createId(uid2)),ref2=prop($$props,"ref",15,null),type2=prop($$props,"type",3,"button"),restProps=rest_props($$props,["$$slots","$$events","$$legacy","id","ref","child","children","type"]);const triggerState=SelectTriggerState.create({id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v))}),mergedProps=user_derived(()=>mergeProps(restProps,triggerState.props,{type:type2()}));var fragment=comment$2(),node2=first_child(
fragment);component(node2,()=>Floating_layer_anchor,($$anchor2,FloatingLayer_Anchor)=>{FloatingLayer_Anchor($$anchor2,{get id(){return id2()},get ref(){return triggerState.opts.ref},children:($$anchor3,$$slotProps)=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);{var consequent=$$anchor4=>{var fragment_2=comment$2(),node_2=first_child(fragment_2);snippet(node_2,()=>$$props.child,()=>({props:get$3(mergedProps)})),append($$anchor4,fragment_2)},alternate=$$anchor4=>{var button=root_3$$();
attribute_effect(button,()=>({...get$3(mergedProps)}));var node_3=child(button);snippet(node_3,()=>$$props.children??noop$3),reset(button),append($$anchor4,button)};if_block(node_1,$$render=>{$$props.child?$$render(consequent):$$render(alternate,-1)})}append($$anchor3,fragment_1)},$$slots:{default:!0}})}),append($$anchor,fragment),pop()}const switchAttrs=createBitsAttrs({component:"switch",parts:["root","thumb"]}),SwitchRootContext=new Context$1("Switch.Root");class SwitchRootState{static create(opts){
return SwitchRootContext.set(new SwitchRootState(opts))}opts;attachment;constructor(opts){this.opts=opts,this.attachment=attachRef(opts.ref),this.onkeydown=this.onkeydown.bind(this),this.onclick=this.onclick.bind(this)}#toggle(){this.opts.checked.current=!this.opts.checked.current}onkeydown(e){!(e.key===ENTER||e.key===SPACE)||this.opts.disabled.current||(e.preventDefault(),this.#toggle())}onclick(_){this.opts.disabled.current||this.#toggle()}#sharedProps=user_derived(()=>({"data-disabled":boolToEmptyStrOrUndef(
this.opts.disabled.current),"data-state":getDataChecked(this.opts.checked.current),"data-required":boolToEmptyStrOrUndef(this.opts.required.current)}));get sharedProps(){return get$3(this.#sharedProps)}set sharedProps(value){set$1(this.#sharedProps,value)}#snippetProps=user_derived(()=>({checked:this.opts.checked.current}));get snippetProps(){return get$3(this.#snippetProps)}set snippetProps(value){set$1(this.#snippetProps,value)}#props=user_derived(()=>({...this.sharedProps,id:this.opts.id.current,
role:"switch",disabled:boolToTrueOrUndef(this.opts.disabled.current),"aria-checked":getAriaChecked(this.opts.checked.current,!1),"aria-required":boolToStr(this.opts.required.current),[switchAttrs.root]:"",onclick:this.onclick,onkeydown:this.onkeydown,...this.attachment}));get props(){return get$3(this.#props)}set props(value){set$1(this.#props,value)}}class SwitchInputState{static create(){return new SwitchInputState(SwitchRootContext.get())}root;#shouldRender=user_derived(()=>this.root.opts.name.
current!==void 0);get shouldRender(){return get$3(this.#shouldRender)}set shouldRender(value){set$1(this.#shouldRender,value)}constructor(root2){this.root=root2}#props=user_derived(()=>({type:"checkbox",name:this.root.opts.name.current,value:this.root.opts.value.current,checked:this.root.opts.checked.current,disabled:this.root.opts.disabled.current,required:this.root.opts.required.current}));get props(){return get$3(this.#props)}set props(value){set$1(this.#props,value)}}class SwitchThumbState{static create(opts){
return new SwitchThumbState(opts,SwitchRootContext.get())}opts;root;attachment;constructor(opts,root2){this.opts=opts,this.root=root2,this.attachment=attachRef(opts.ref)}#snippetProps=user_derived(()=>({checked:this.root.opts.checked.current}));get snippetProps(){return get$3(this.#snippetProps)}set snippetProps(value){set$1(this.#snippetProps,value)}#props=user_derived(()=>({...this.root.sharedProps,id:this.opts.id.current,[switchAttrs.thumb]:"",...this.attachment}));get props(){return get$3(this.#props)}set props(value){
set$1(this.#props,value)}}function Switch_input($$anchor,$$props){push$1($$props,!1);const inputState=SwitchInputState.create();init();var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{Hidden_input($$anchor2,spread_props(()=>inputState.props))};if_block(node2,$$render=>{inputState.shouldRender&&$$render(consequent)})}append($$anchor,fragment),pop()}var root_2$1j=from_html("<button><!></button>"),root$1W=from_html("<!> <!>",1);function Switch$1($$anchor,$$props){const uid2=props_id();
push$1($$props,!0);let ref2=prop($$props,"ref",15,null),id2=prop($$props,"id",19,()=>createId(uid2)),disabled=prop($$props,"disabled",3,!1),required2=prop($$props,"required",3,!1),checked=prop($$props,"checked",15,!1),value=prop($$props,"value",3,"on"),name=prop($$props,"name",3,void 0),type2=prop($$props,"type",3,"button"),onCheckedChange=prop($$props,"onCheckedChange",3,noop$1),restProps=rest_props($$props,["$$slots","$$events","$$legacy","child","children","ref","id","disabled","required","ch\
ecked","value","name","type","onCheckedChange"]);const rootState=SwitchRootState.create({checked:boxWith$1(()=>checked(),v=>{checked(v),onCheckedChange()?.(v)}),disabled:boxWith$1(()=>disabled()??!1),required:boxWith$1(()=>required2()),value:boxWith$1(()=>value()),name:boxWith$1(()=>name()),id:boxWith$1(()=>id2()),ref:boxWith$1(()=>ref2(),v=>ref2(v))}),mergedProps=user_derived(()=>mergeProps(restProps,rootState.props,{type:type2()}));var fragment=root$1W(),node2=first_child(fragment);{var consequent=$$anchor2=>{
var fragment_1=comment$2(),node_1=first_child(fragment_1);{let $0=user_derived(()=>({props:get$3(mergedProps),...rootState.snippetProps}));snippet(node_1,()=>$$props.child,()=>get$3($0))}append($$anchor2,fragment_1)},alternate=$$anchor2=>{var button=root_2$1j();attribute_effect(button,()=>({...get$3(mergedProps)}));var node_2=child(button);snippet(node_2,()=>$$props.children??noop$3,()=>rootState.snippetProps),reset(button),append($$anchor2,button)};if_block(node2,$$render=>{$$props.child?$$render(
consequent):$$render(alternate,-1)})}var node_3=sibling(node2,2);Switch_input(node_3,{}),append($$anchor,fragment),pop()}var root_2$1i=from_html("<span><!></span>");function Switch_thumb($$anchor,$$props){const uid2=props_id();push$1($$props,!0);let ref2=prop($$props,"ref",15,null),id2=prop($$props,"id",19,()=>createId(uid2)),restProps=rest_props($$props,["$$slots","$$events","$$legacy","child","children","ref","id"]);const thumbState=SwitchThumbState.create({id:boxWith$1(()=>id2()),ref:boxWith$1(
()=>ref2(),v=>ref2(v))}),mergedProps=user_derived(()=>mergeProps(restProps,thumbState.props));var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);{let $0=user_derived(()=>({props:get$3(mergedProps),...thumbState.snippetProps}));snippet(node_1,()=>$$props.child,()=>get$3($0))}append($$anchor2,fragment_1)},alternate=$$anchor2=>{var span=root_2$1i();attribute_effect(span,()=>({...get$3(mergedProps)}));var node_2=child(
span);snippet(node_2,()=>$$props.children??noop$3,()=>thumbState.snippetProps),reset(span),append($$anchor2,span)};if_block(node2,$$render=>{$$props.child?$$render(consequent):$$render(alternate,-1)})}append($$anchor,fragment),pop()}class TimeoutFn{#interval;#cb;#timer=null;constructor(cb,interval){this.#cb=cb,this.#interval=interval,this.stop=this.stop.bind(this),this.start=this.start.bind(this),onDestroyEffect(this.stop)}#clear(){this.#timer!==null&&(window.clearTimeout(this.#timer),this.#timer=
null)}stop(){this.#clear()}start(...args){this.#clear(),this.#timer=window.setTimeout(()=>{this.#timer=null,this.#cb(...args)},this.#interval)}}const tooltipAttrs=createBitsAttrs({component:"tooltip",parts:["content","trigger"]}),TooltipProviderContext=new Context$1("Tooltip.Provider"),TooltipRootContext=new Context$1("Tooltip.Root");class TooltipTriggerRegistryState{#triggers=state$1(proxy(new Map));get triggers(){return get$3(this.#triggers)}set triggers(value){set$1(this.#triggers,value,!0)}#activeTriggerId=state$1(
null);get activeTriggerId(){return get$3(this.#activeTriggerId)}set activeTriggerId(value){set$1(this.#activeTriggerId,value,!0)}#activeTriggerNode=user_derived(()=>{const activeTriggerId=this.activeTriggerId;return activeTriggerId===null?null:this.triggers.get(activeTriggerId)?.node??null});get activeTriggerNode(){return get$3(this.#activeTriggerNode)}set activeTriggerNode(value){set$1(this.#activeTriggerNode,value)}#activePayload=user_derived(()=>{const activeTriggerId=this.activeTriggerId;return activeTriggerId===
null?null:this.triggers.get(activeTriggerId)?.payload??null});get activePayload(){return get$3(this.#activePayload)}set activePayload(value){set$1(this.#activePayload,value)}register=record2=>{const next2=new Map(this.triggers);next2.set(record2.id,record2),this.triggers=next2,this.#coerceActiveTrigger()};update=record2=>{const next2=new Map(this.triggers);next2.set(record2.id,record2),this.triggers=next2,this.#coerceActiveTrigger()};unregister=id2=>{if(!this.triggers.has(id2))return;const next2=new Map(
this.triggers);next2.delete(id2),this.triggers=next2,this.activeTriggerId===id2&&(this.activeTriggerId=null)};setActiveTrigger=id2=>{if(id2===null){this.activeTriggerId=null;return}if(!this.triggers.has(id2)){this.activeTriggerId=null;return}this.activeTriggerId=id2};get=id2=>this.triggers.get(id2);has=id2=>this.triggers.has(id2);getFirstTriggerId=()=>{const firstEntry=this.triggers.entries().next();return firstEntry.done?null:firstEntry.value[0]};#coerceActiveTrigger=()=>{const activeTriggerId=this.
activeTriggerId;activeTriggerId!==null&&(this.triggers.has(activeTriggerId)||(this.activeTriggerId=null))}}class TooltipProviderState{static create(opts){return TooltipProviderContext.set(new TooltipProviderState(opts))}opts;#isOpenDelayed=state$1(!0);get isOpenDelayed(){return get$3(this.#isOpenDelayed)}set isOpenDelayed(value){set$1(this.#isOpenDelayed,value,!0)}isPointerInTransit=simpleBox(!1);#timerFn;#openTooltip=state$1(null);constructor(opts){this.opts=opts,this.#timerFn=new TimeoutFn(()=>{
this.isOpenDelayed=!0},this.opts.skipDelayDuration.current),onMountEffect(()=>on(window,"scroll",e=>{const activeTooltip=get$3(this.#openTooltip);if(!activeTooltip)return;const triggerNode=activeTooltip.triggerNode;if(!triggerNode)return;const target2=e.target;(target2 instanceof Element||target2 instanceof Document)&&target2.contains(triggerNode)&&activeTooltip.handleClose()}))}#startTimer=()=>{if(this.opts.skipDelayDuration.current===0){this.isOpenDelayed=!0;return}else this.#timerFn.start()};#clearTimer=()=>{
this.#timerFn.stop()};onOpen=tooltip=>{get$3(this.#openTooltip)&&get$3(this.#openTooltip)!==tooltip&&get$3(this.#openTooltip).handleClose(),this.#clearTimer(),this.isOpenDelayed=!1,set$1(this.#openTooltip,tooltip,!0)};onClose=tooltip=>{get$3(this.#openTooltip)===tooltip&&(set$1(this.#openTooltip,null),this.#startTimer())};isTooltipOpen=tooltip=>get$3(this.#openTooltip)===tooltip}class TooltipRootState{static create(opts){return TooltipRootContext.set(new TooltipRootState(opts,TooltipProviderContext.
get()))}opts;provider;#delayDuration=user_derived(()=>this.opts.delayDuration.current??this.provider.opts.delayDuration.current);get delayDuration(){return get$3(this.#delayDuration)}set delayDuration(value){set$1(this.#delayDuration,value)}#disableHoverableContent=user_derived(()=>this.opts.disableHoverableContent.current??this.provider.opts.disableHoverableContent.current);get disableHoverableContent(){return get$3(this.#disableHoverableContent)}set disableHoverableContent(value){set$1(this.#disableHoverableContent,
value)}#disableCloseOnTriggerClick=user_derived(()=>this.opts.disableCloseOnTriggerClick.current??this.provider.opts.disableCloseOnTriggerClick.current);get disableCloseOnTriggerClick(){return get$3(this.#disableCloseOnTriggerClick)}set disableCloseOnTriggerClick(value){set$1(this.#disableCloseOnTriggerClick,value)}#disabled=user_derived(()=>this.opts.disabled.current??this.provider.opts.disabled.current);get disabled(){return get$3(this.#disabled)}set disabled(value){set$1(this.#disabled,value)}#ignoreNonKeyboardFocus=user_derived(
()=>this.opts.ignoreNonKeyboardFocus.current??this.provider.opts.ignoreNonKeyboardFocus.current);get ignoreNonKeyboardFocus(){return get$3(this.#ignoreNonKeyboardFocus)}set ignoreNonKeyboardFocus(value){set$1(this.#ignoreNonKeyboardFocus,value)}registry;tether;#contentNode=state$1(null);get contentNode(){return get$3(this.#contentNode)}set contentNode(value){set$1(this.#contentNode,value,!0)}contentPresence;#wasOpenDelayed=state$1(!1);#timerFn;#stateAttr=user_derived(()=>this.opts.open.current?get$3(
this.#wasOpenDelayed)?"delayed-open":"instant-open":"closed");get stateAttr(){return get$3(this.#stateAttr)}set stateAttr(value){set$1(this.#stateAttr,value)}constructor(opts,provider){this.opts=opts,this.provider=provider,this.tether=opts.tether.current?.state??null,this.registry=this.tether?.registry??new TooltipTriggerRegistryState,this.#timerFn=new TimeoutFn(()=>{set$1(this.#wasOpenDelayed,!0),this.opts.open.current=!0},this.delayDuration??0),this.tether&&(this.tether.root=this,onMountEffect(
()=>()=>{this.tether?.root===this&&(this.tether.root=null)})),this.contentPresence=new PresenceManager({open:this.opts.open,ref:boxWith$1(()=>this.contentNode),onComplete:()=>{this.opts.onOpenChangeComplete.current(this.opts.open.current)}}),watch$1(()=>this.delayDuration,()=>{this.delayDuration!==void 0&&(this.#timerFn=new TimeoutFn(()=>{set$1(this.#wasOpenDelayed,!0),this.opts.open.current=!0},this.delayDuration))}),watch$1(()=>this.opts.open.current,isOpen=>{isOpen?(this.ensureActiveTrigger(),
this.provider.onOpen(this)):this.provider.onClose(this)},{lazy:!0}),watch$1(()=>this.opts.triggerId.current,triggerId=>{triggerId!==this.registry.activeTriggerId&&this.registry.setActiveTrigger(triggerId)}),watch$1(()=>this.registry.activeTriggerId,activeTriggerId=>{this.opts.triggerId.current!==activeTriggerId&&(this.opts.triggerId.current=activeTriggerId)})}handleOpen=()=>{this.#timerFn.stop(),set$1(this.#wasOpenDelayed,!1),this.ensureActiveTrigger(),this.opts.open.current=!0};handleClose=()=>{
this.#timerFn.stop(),this.opts.open.current=!1};#handleDelayedOpen=()=>{this.#timerFn.stop();const shouldSkipDelay=!this.provider.isOpenDelayed,delayDuration=this.delayDuration??0;shouldSkipDelay||delayDuration===0?(set$1(this.#wasOpenDelayed,!1),this.opts.open.current=!0):this.#timerFn.start()};onTriggerEnter=triggerId=>{this.setActiveTrigger(triggerId),this.#handleDelayedOpen()};onTriggerLeave=()=>{this.disableHoverableContent?this.handleClose():this.#timerFn.stop()};ensureActiveTrigger=()=>{if(this.
registry.activeTriggerId!==null&&this.registry.has(this.registry.activeTriggerId))return;if(this.opts.triggerId.current!==null&&this.registry.has(this.opts.triggerId.current)){this.registry.setActiveTrigger(this.opts.triggerId.current);return}const firstTriggerId=this.registry.getFirstTriggerId();this.registry.setActiveTrigger(firstTriggerId)};setActiveTrigger=triggerId=>{this.registry.setActiveTrigger(triggerId)};registerTrigger=trigger=>{this.registry.register(trigger),trigger.disabled&&this.registry.
activeTriggerId===trigger.id&&this.opts.open.current&&this.handleClose()};updateTrigger=trigger=>{this.registry.update(trigger),trigger.disabled&&this.registry.activeTriggerId===trigger.id&&this.opts.open.current&&this.handleClose()};unregisterTrigger=id2=>{const isActive=this.registry.activeTriggerId===id2;this.registry.unregister(id2),isActive&&this.opts.open.current&&this.handleClose()};isActiveTrigger=triggerId=>this.registry.activeTriggerId===triggerId;get triggerNode(){return this.registry.
activeTriggerNode}get activePayload(){return this.registry.activePayload}get activeTriggerId(){return this.registry.activeTriggerId}}class TooltipTriggerState{static create(opts){return opts.tether.current?new TooltipTriggerState(opts,null,opts.tether.current.state):new TooltipTriggerState(opts,TooltipRootContext.get(),null)}opts;root;tether;attachment;#isPointerDown=simpleBox(!1);#hasPointerMoveOpened=state$1(!1);domContext;#transitCheckTimeout=null;#mounted=!1;#lastRegisteredId=null;constructor(opts,root2,tether){
this.opts=opts,this.root=root2,this.tether=tether,this.domContext=new DOMContext(opts.ref),this.attachment=attachRef(this.opts.ref,v=>this.#register(v)),watch$1(()=>this.opts.id.current,()=>{this.#register(this.opts.ref.current)}),watch$1(()=>this.opts.payload.current,()=>{this.#register(this.opts.ref.current)}),watch$1(()=>this.opts.disabled.current,()=>{this.#register(this.opts.ref.current)}),onMountEffect(()=>(this.#mounted=!0,this.#register(this.opts.ref.current),()=>{const root3=this.#getRoot(),
id2=this.#lastRegisteredId;id2&&(this.tether?this.tether.registry.unregister(id2):root3?.unregisterTrigger(id2)),this.#lastRegisteredId=null,this.#mounted=!1}))}#getRoot=()=>this.tether?.root??this.root;#isDisabled=()=>{const root2=this.#getRoot();return this.opts.disabled.current||!!root2?.disabled};#register=node2=>{if(!this.#mounted)return;const id2=this.opts.id.current,payload=this.opts.payload.current,disabled=this.opts.disabled.current;if(this.#lastRegisteredId&&this.#lastRegisteredId!==id2){
const root3=this.#getRoot();this.tether?this.tether.registry.unregister(this.#lastRegisteredId):root3?.unregisterTrigger(this.#lastRegisteredId)}const triggerRecord={id:id2,node:node2,payload,disabled},root2=this.#getRoot();this.tether?(this.tether.registry.has(id2)?this.tether.registry.update(triggerRecord):this.tether.registry.register(triggerRecord),disabled&&this.tether.registry.activeTriggerId===id2&&root2?.opts.open.current&&root2.handleClose()):root2?.registry.has(id2)?root2.updateTrigger(
triggerRecord):root2?.registerTrigger(triggerRecord),this.#lastRegisteredId=id2};#clearTransitCheck=()=>{this.#transitCheckTimeout!==null&&(clearTimeout(this.#transitCheckTimeout),this.#transitCheckTimeout=null)};handlePointerUp=()=>{this.#isPointerDown.current=!1};#onpointerup=()=>{this.#isDisabled()||(this.#isPointerDown.current=!1)};#onpointerdown=()=>{this.#isDisabled()||(this.#isPointerDown.current=!0,this.domContext.getDocument().addEventListener("pointerup",()=>{this.handlePointerUp()},{once:!0}))};#onpointerenter=e=>{
const root2=this.#getRoot();if(root2){if(this.#isDisabled()){root2.opts.open.current&&root2.handleClose();return}if(e.pointerType!=="touch"){if(root2.provider.isPointerInTransit.current){this.#clearTransitCheck(),this.#transitCheckTimeout=window.setTimeout(()=>{root2.provider.isPointerInTransit.current&&(root2.provider.isPointerInTransit.current=!1,root2.onTriggerEnter(this.opts.id.current),set$1(this.#hasPointerMoveOpened,!0))},250);return}root2.onTriggerEnter(this.opts.id.current),set$1(this.#hasPointerMoveOpened,
!0)}}};#onpointermove=e=>{const root2=this.#getRoot();if(root2){if(this.#isDisabled()){root2.opts.open.current&&root2.handleClose();return}e.pointerType!=="touch"&&(get$3(this.#hasPointerMoveOpened)||(this.#clearTransitCheck(),root2.provider.isPointerInTransit.current=!1,root2.onTriggerEnter(this.opts.id.current),set$1(this.#hasPointerMoveOpened,!0)))}};#onpointerleave=e=>{const root2=this.#getRoot();if(!root2||this.#isDisabled())return;if(this.#clearTransitCheck(),!root2.isActiveTrigger(this.opts.
id.current)){set$1(this.#hasPointerMoveOpened,!1);return}const relatedTarget=e.relatedTarget;if(isElement$1(relatedTarget)){for(const record2 of root2.registry.triggers.values())if(record2.node===relatedTarget){if(root2.provider.opts.skipDelayDuration.current>0){set$1(this.#hasPointerMoveOpened,!1);return}root2.handleClose(),set$1(this.#hasPointerMoveOpened,!1);return}}root2.onTriggerLeave(),set$1(this.#hasPointerMoveOpened,!1)};#onfocus=e=>{const root2=this.#getRoot();if(root2&&!this.#isPointerDown.
current){if(this.#isDisabled()){root2.opts.open.current&&root2.handleClose();return}root2.ignoreNonKeyboardFocus&&!isFocusVisible(e.currentTarget)||(root2.setActiveTrigger(this.opts.id.current),root2.handleOpen())}};#onblur=()=>{const root2=this.#getRoot();!root2||this.#isDisabled()||root2.handleClose()};#onclick=()=>{const root2=this.#getRoot();!root2||root2.disableCloseOnTriggerClick||this.#isDisabled()||root2.handleClose()};#props=user_derived(()=>{const root2=this.#getRoot(),isOpenForTrigger=!!(root2?.
opts.open.current&&root2.isActiveTrigger(this.opts.id.current)),isDisabled=this.#isDisabled();return{id:this.opts.id.current,"aria-describedby":isOpenForTrigger?root2?.contentNode?.id:void 0,"data-state":isOpenForTrigger?root2?.stateAttr:"closed","data-disabled":boolToEmptyStrOrUndef(isDisabled),"data-delay-duration":`${root2?.delayDuration??0}`,[tooltipAttrs.trigger]:"",tabindex:isDisabled?void 0:this.opts.tabindex.current,disabled:this.opts.disabled.current,onpointerup:this.#onpointerup,onpointerdown:this.#onpointerdown,
onpointerenter:this.#onpointerenter,onpointermove:this.#onpointermove,onpointerleave:this.#onpointerleave,onfocus:this.#onfocus,onblur:this.#onblur,onclick:this.#onclick,...this.attachment}});get props(){return get$3(this.#props)}set props(value){set$1(this.#props,value)}}class TooltipContentState{static create(opts){return new TooltipContentState(opts,TooltipRootContext.get())}opts;root;attachment;constructor(opts,root2){this.opts=opts,this.root=root2,this.attachment=attachRef(this.opts.ref,v=>this.
root.contentNode=v),new SafePolygon({triggerNode:()=>this.root.triggerNode,contentNode:()=>this.root.contentNode,enabled:()=>this.root.opts.open.current&&!this.root.disableHoverableContent,transitIntentTimeout:180,ignoredTargets:()=>{if(this.root.provider.opts.skipDelayDuration.current===0)return[];const nodes2=[],activeTriggerNode=this.root.triggerNode;for(const record2 of this.root.registry.triggers.values())record2.node&&record2.node!==activeTriggerNode&&nodes2.push(record2.node);return nodes2},
onPointerExit:()=>{this.root.provider.isTooltipOpen(this.root)&&this.root.handleClose()}})}onInteractOutside=e=>{if(isElement$1(e.target)&&this.root.triggerNode?.contains(e.target)&&this.root.disableCloseOnTriggerClick){e.preventDefault();return}this.opts.onInteractOutside.current(e),!e.defaultPrevented&&this.root.handleClose()};onEscapeKeydown=e=>{this.opts.onEscapeKeydown.current?.(e),!e.defaultPrevented&&this.root.handleClose()};onOpenAutoFocus=e=>{e.preventDefault()};onCloseAutoFocus=e=>{e.preventDefault()};get shouldRender(){
return this.root.contentPresence.shouldRender}#snippetProps=user_derived(()=>({open:this.root.opts.open.current}));get snippetProps(){return get$3(this.#snippetProps)}set snippetProps(value){set$1(this.#snippetProps,value)}#props=user_derived(()=>({id:this.opts.id.current,"data-state":this.root.stateAttr,"data-disabled":boolToEmptyStrOrUndef(this.root.disabled),...getDataTransitionAttrs(this.root.contentPresence.transitionStatus),style:{outline:"none"},[tooltipAttrs.content]:"",...this.attachment}));get props(){
return get$3(this.#props)}set props(value){set$1(this.#props,value)}popperProps={onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown,onOpenAutoFocus:this.onOpenAutoFocus,onCloseAutoFocus:this.onCloseAutoFocus}}function Tooltip($$anchor,$$props){push$1($$props,!0);let open2=prop($$props,"open",15,!1),triggerId=prop($$props,"triggerId",15,null),onOpenChange=prop($$props,"onOpenChange",3,noop$1),onOpenChangeComplete=prop($$props,"onOpenChangeComplete",3,noop$1);const rootState=TooltipRootState.
create({open:boxWith$1(()=>open2(),v=>{open2(v),onOpenChange()(v)}),triggerId:boxWith$1(()=>triggerId(),v=>{triggerId(v)}),delayDuration:boxWith$1(()=>$$props.delayDuration),disableCloseOnTriggerClick:boxWith$1(()=>$$props.disableCloseOnTriggerClick),disableHoverableContent:boxWith$1(()=>$$props.disableHoverableContent),ignoreNonKeyboardFocus:boxWith$1(()=>$$props.ignoreNonKeyboardFocus),disabled:boxWith$1(()=>$$props.disabled),onOpenChangeComplete:boxWith$1(()=>onOpenChangeComplete()),tether:boxWith$1(
()=>$$props.tether)});Floating_layer($$anchor,{tooltip:!0,children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3,()=>({open:rootState.opts.open.current,triggerId:rootState.activeTriggerId,payload:rootState.activePayload})),append($$anchor2,fragment_1)},$$slots:{default:!0}}),pop()}var root_4$H=from_html("<div><div><!></div></div>"),root_8$u=from_html("<div><div><!></div></div>");function Tooltip_content$1($$anchor,$$props){
const uid2=props_id();push$1($$props,!0);let id2=prop($$props,"id",19,()=>createId(uid2)),ref2=prop($$props,"ref",15,null),side=prop($$props,"side",3,"top"),sideOffset=prop($$props,"sideOffset",3,0),align=prop($$props,"align",3,"center"),avoidCollisions=prop($$props,"avoidCollisions",3,!0),arrowPadding=prop($$props,"arrowPadding",3,0),sticky=prop($$props,"sticky",3,"partial"),hideWhenDetached=prop($$props,"hideWhenDetached",3,!1),collisionPadding=prop($$props,"collisionPadding",3,0),onInteractOutside=prop(
$$props,"onInteractOutside",3,noop$1),onEscapeKeydown=prop($$props,"onEscapeKeydown",3,noop$1),forceMount=prop($$props,"forceMount",3,!1),restProps=rest_props($$props,["$$slots","$$events","$$legacy","children","child","id","ref","side","sideOffset","align","avoidCollisions","arrowPadding","sticky","strategy","hideWhenDetached","customAnchor","collisionPadding","onInteractOutside","onEscapeKeydown","forceMount","style"]);const contentState=TooltipContentState.create({id:boxWith$1(()=>id2()),ref:boxWith$1(
()=>ref2(),v=>ref2(v)),onInteractOutside:boxWith$1(()=>onInteractOutside()),onEscapeKeydown:boxWith$1(()=>onEscapeKeydown())}),floatingProps=user_derived(()=>({side:side(),sideOffset:sideOffset(),align:align(),avoidCollisions:avoidCollisions(),arrowPadding:arrowPadding(),sticky:sticky(),hideWhenDetached:hideWhenDetached(),collisionPadding:collisionPadding(),strategy:$$props.strategy,customAnchor:$$props.customAnchor??contentState.root.triggerNode})),mergedProps=user_derived(()=>mergeProps(restProps,
get$3(floatingProps),contentState.props));var fragment=comment$2(),node2=first_child(fragment);{var consequent_1=$$anchor2=>{{const popper=($$anchor3,$$arg0)=>{let props=()=>$$arg0?.().props,wrapperProps=()=>$$arg0?.().wrapperProps;const finalProps=user_derived(()=>mergeProps(props(),{style:getFloatingContentCSSVars("tooltip")},{style:$$props.style}));var fragment_2=comment$2(),node_1=first_child(fragment_2);{var consequent=$$anchor4=>{var fragment_3=comment$2(),node_2=first_child(fragment_3);{let $02=user_derived(
()=>({props:get$3(finalProps),wrapperProps:wrapperProps(),...contentState.snippetProps}));snippet(node_2,()=>$$props.child,()=>get$3($02))}append($$anchor4,fragment_3)},alternate=$$anchor4=>{var div=root_4$H();attribute_effect(div,()=>({...wrapperProps()}));var div_1=child(div);attribute_effect(div_1,()=>({...get$3(finalProps)}));var node_3=child(div_1);snippet(node_3,()=>$$props.children??noop$3),reset(div_1),reset(div),append($$anchor4,div)};if_block(node_1,$$render=>{$$props.child?$$render(consequent):
$$render(alternate,-1)})}append($$anchor3,fragment_2)};let $0=user_derived(()=>contentState.root.disableHoverableContent?"none":"auto");Popper_layer_force_mount($$anchor2,spread_props(()=>get$3(mergedProps),()=>contentState.popperProps,{get enabled(){return contentState.root.opts.open.current},get id(){return id2()},trapFocus:!1,loop:!1,preventScroll:!1,forceMount:!0,get ref(){return contentState.opts.ref},tooltip:!0,get shouldRender(){return contentState.shouldRender},get contentPointerEvents(){
return get$3($0)},popper,$$slots:{popper:!0}}))}},consequent_3=$$anchor2=>{{const popper=($$anchor3,$$arg0)=>{let props=()=>$$arg0?.().props,wrapperProps=()=>$$arg0?.().wrapperProps;const finalProps=user_derived(()=>mergeProps(props(),{style:getFloatingContentCSSVars("tooltip")},{style:$$props.style}));var fragment_5=comment$2(),node_4=first_child(fragment_5);{var consequent_2=$$anchor4=>{var fragment_6=comment$2(),node_5=first_child(fragment_6);{let $02=user_derived(()=>({props:get$3(finalProps),
wrapperProps:wrapperProps(),...contentState.snippetProps}));snippet(node_5,()=>$$props.child,()=>get$3($02))}append($$anchor4,fragment_6)},alternate_1=$$anchor4=>{var div_2=root_8$u();attribute_effect(div_2,()=>({...wrapperProps()}));var div_3=child(div_2);attribute_effect(div_3,()=>({...get$3(finalProps)}));var node_6=child(div_3);snippet(node_6,()=>$$props.children??noop$3),reset(div_3),reset(div_2),append($$anchor4,div_2)};if_block(node_4,$$render=>{$$props.child?$$render(consequent_2):$$render(
alternate_1,-1)})}append($$anchor3,fragment_5)};let $0=user_derived(()=>contentState.root.disableHoverableContent?"none":"auto");Popper_layer($$anchor2,spread_props(()=>get$3(mergedProps),()=>contentState.popperProps,{get open(){return contentState.root.opts.open.current},get id(){return id2()},trapFocus:!1,loop:!1,preventScroll:!1,forceMount:!1,get ref(){return contentState.opts.ref},tooltip:!0,get shouldRender(){return contentState.shouldRender},get contentPointerEvents(){return get$3($0)},popper,
$$slots:{popper:!0}}))}};if_block(node2,$$render=>{forceMount()?$$render(consequent_1):forceMount()||$$render(consequent_3,1)})}append($$anchor,fragment),pop()}var root_2$1h=from_html("<button><!></button>");function Tooltip_trigger$1($$anchor,$$props){const uid2=props_id();push$1($$props,!0);let id2=prop($$props,"id",19,()=>createId(uid2)),disabled=prop($$props,"disabled",3,!1),type2=prop($$props,"type",3,"button"),tabindex=prop($$props,"tabindex",3,0),ref2=prop($$props,"ref",15,null),restProps=rest_props(
$$props,["$$slots","$$events","$$legacy","children","child","id","disabled","payload","tether","type","tabindex","ref"]);const triggerState=TooltipTriggerState.create({id:boxWith$1(()=>id2()),disabled:boxWith$1(()=>disabled()??!1),tabindex:boxWith$1(()=>tabindex()??0),payload:boxWith$1(()=>$$props.payload),tether:boxWith$1(()=>$$props.tether),ref:boxWith$1(()=>ref2(),v=>ref2(v))}),mergedProps=user_derived(()=>mergeProps(restProps,triggerState.props,{type:type2()}));var fragment=comment$2(),node2=first_child(
fragment);{var consequent=$$anchor2=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);snippet(node_1,()=>$$props.child,()=>({props:get$3(mergedProps)})),append($$anchor2,fragment_1)},alternate=$$anchor2=>{var button=root_2$1h();attribute_effect(button,()=>({...get$3(mergedProps)}));var node_2=child(button);snippet(node_2,()=>$$props.children??noop$3),reset(button),append($$anchor2,button)};if_block(node2,$$render=>{$$props.child?$$render(consequent):$$render(alternate,-1)})}append($$anchor,
fragment),pop()}function Tooltip_arrow($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref"]);Floating_layer_arrow($$anchor,spread_props(()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)}})),pop()}function Tooltip_provider($$anchor,$$props){push$1($$props,!0);let delayDuration=prop($$props,"delayDuration",3,700),disableCloseOnTriggerClick=prop($$props,"disableCloseOnTriggerClick",3,!1),disableHoverableContent=prop(
$$props,"disableHoverableContent",3,!1),disabled=prop($$props,"disabled",3,!1),ignoreNonKeyboardFocus=prop($$props,"ignoreNonKeyboardFocus",3,!1),skipDelayDuration=prop($$props,"skipDelayDuration",3,300);TooltipProviderState.create({delayDuration:boxWith$1(()=>delayDuration()),disableCloseOnTriggerClick:boxWith$1(()=>disableCloseOnTriggerClick()),disableHoverableContent:boxWith$1(()=>disableHoverableContent()),disabled:boxWith$1(()=>disabled()),ignoreNonKeyboardFocus:boxWith$1(()=>ignoreNonKeyboardFocus()),
skipDelayDuration:boxWith$1(()=>skipDelayDuration())});var fragment=comment$2(),node2=first_child(fragment);snippet(node2,()=>$$props.children??noop$3),append($$anchor,fragment),pop()}function Tooltip_trigger($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref"]);var fragment=comment$2(),node2=first_child(fragment);component(node2,()=>Tooltip_trigger$1,($$anchor2,TooltipPrimitive_Trigger)=>{TooltipPrimitive_Trigger(
$$anchor2,spread_props({"data-slot":"tooltip-trigger",class:"cursor-pointer"},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)}}))}),append($$anchor,fragment),pop()}var root_3$_=from_html("<div></div>"),root_2$1g=from_html("<!> <!>",1);function Tooltip_content($$anchor,$$props){push$1($$props,!0);const tooltipContent=$$anchor2=>{var fragment=comment$2(),node2=first_child(fragment);component(node2,()=>Tooltip_content$1,($$anchor3,TooltipPrimitive_Content)=>{TooltipPrimitive_Content(
$$anchor3,spread_props({"data-slot":"tooltip-content",get sideOffset(){return sideOffset()},get side(){return side()},get class(){return get$3(contentClass)}},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)},children:($$anchor4,$$slotProps)=>{var fragment_1=root_2$1g(),node_1=first_child(fragment_1);snippet(node_1,()=>$$props.children??noop$3);var node_2=sibling(node_1,2);{const child2=($$anchor5,$$arg0)=>{let props=()=>$$arg0?.().props;var div=root_3$_();attribute_effect(
div,$0=>({class:$0,...props()}),[()=>cn$1("z-50 size-2.5 rotate-45 rounded-[2px] bg-primary","data-[side=top]:translate-x-1/2 data-[side=top]:translate-y-[calc(-50%_+_2px)]","data-[side=bottom]:-translate-x-1/2 data-[side=bottom]:-translate-y-[calc(-50%_+_1px)]","data-[side=right]:translate-x-[calc(50%_+_2px)] data-[side=right]:translate-y-1/2","data-[side=left]:-translate-y-[calc(50%_-_3px)]",$$props.arrowClasses)]),append($$anchor5,div)};component(node_2,()=>Tooltip_arrow,($$anchor5,TooltipPrimitive_Arrow)=>{
TooltipPrimitive_Arrow($$anchor5,{child:child2,$$slots:{child:!0}})})}append($$anchor4,fragment_1)},$$slots:{default:!0}}))}),append($$anchor2,fragment)};let ref2=prop($$props,"ref",15,null),sideOffset=prop($$props,"sideOffset",3,0),side=prop($$props,"side",3,"top"),noPortal=prop($$props,"noPortal",3,!1),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class","sideOffset","side","children","arrowClasses","noPortal"]);const contentClass=user_derived(()=>cn$1("z-50 w-fit origin\
-(--bits-tooltip-content-transform-origin) animate-in rounded-md bg-primary px-3 py-1.5 text-xs text-balance text-primary-foreground fade-in-0 zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=closed]:fill-mode-forwards",$$props.class));var fragment_2=comment$2(),node_3=first_child(
fragment_2);{var consequent=$$anchor2=>{tooltipContent($$anchor2)},alternate=$$anchor2=>{var fragment_4=comment$2(),node_4=first_child(fragment_4);component(node_4,()=>Portal$2,($$anchor3,TooltipPrimitive_Portal)=>{TooltipPrimitive_Portal($$anchor3,{children:($$anchor4,$$slotProps)=>{tooltipContent($$anchor4)},$$slots:{default:!0}})}),append($$anchor2,fragment_4)};if_block(node_3,$$render=>{noPortal()?$$render(consequent):$$render(alternate,-1)})}append($$anchor,fragment_2),pop()}const Root$5=Tooltip,
Provider=Tooltip_provider;var AttachmentType=(AttachmentType2=>(AttachmentType2.AUDIO="AUDIO",AttachmentType2.IMAGE="IMAGE",AttachmentType2.MCP_PROMPT="MCP_PROMPT",AttachmentType2.MCP_RESOURCE="MCP_RESOURCE",AttachmentType2.PDF="PDF",AttachmentType2.TEXT="TEXT",AttachmentType2.LEGACY_CONTEXT="context",AttachmentType2))(AttachmentType||{}),AttachmentMenuItemId=(AttachmentMenuItemId2=>(AttachmentMenuItemId2.IMAGES="images",AttachmentMenuItemId2.AUDIO="audio",AttachmentMenuItemId2.TEXT="text",AttachmentMenuItemId2.
PDF="pdf",AttachmentMenuItemId2.SYSTEM_MESSAGE="system-message",AttachmentMenuItemId2.MCP_PROMPT="mcp-prompt",AttachmentMenuItemId2.MCP_RESOURCES="mcp-resources",AttachmentMenuItemId2))(AttachmentMenuItemId||{}),AttachmentItemEnabledWhen=(AttachmentItemEnabledWhen2=>(AttachmentItemEnabledWhen2.ALWAYS="always",AttachmentItemEnabledWhen2.HAS_VISION_MODALITY="hasVisionModality",AttachmentItemEnabledWhen2.HAS_AUDIO_MODALITY="hasAudioModality",AttachmentItemEnabledWhen2))(AttachmentItemEnabledWhen||{}),
AttachmentAction=(AttachmentAction2=>(AttachmentAction2.FILE_UPLOAD="onFileUpload",AttachmentAction2.SYSTEM_PROMPT_CLICK="onSystemPromptClick",AttachmentAction2.MCP_PROMPT_CLICK="onMcpPromptClick",AttachmentAction2.MCP_RESOURCES_CLICK="onMcpResourcesClick",AttachmentAction2))(AttachmentAction||{}),AttachmentItemVisibleWhen=(AttachmentItemVisibleWhen2=>(AttachmentItemVisibleWhen2.HAS_MCP_PROMPTS_SUPPORT="hasMcpPromptsSupport",AttachmentItemVisibleWhen2.HAS_MCP_RESOURCES_SUPPORT="hasMcpResourcesSu\
pport",AttachmentItemVisibleWhen2))(AttachmentItemVisibleWhen||{}),ToolCallType=(ToolCallType2=>(ToolCallType2.FUNCTION="function",ToolCallType2))(ToolCallType||{}),AgenticSectionType=(AgenticSectionType2=>(AgenticSectionType2.TEXT="text",AgenticSectionType2.TOOL_CALL="tool_call",AgenticSectionType2.TOOL_CALL_PENDING="tool_call_pending",AgenticSectionType2.TOOL_CALL_STREAMING="tool_call_streaming",AgenticSectionType2.REASONING="reasoning",AgenticSectionType2.REASONING_PENDING="reasoning_pending",
AgenticSectionType2))(AgenticSectionType||{}),ChatMessageStatsView=(ChatMessageStatsView2=>(ChatMessageStatsView2.GENERATION="generation",ChatMessageStatsView2.READING="reading",ChatMessageStatsView2.TOOLS="tools",ChatMessageStatsView2.SUMMARY="summary",ChatMessageStatsView2))(ChatMessageStatsView||{}),ReasoningFormat=(ReasoningFormat2=>(ReasoningFormat2.NONE="none",ReasoningFormat2.AUTO="auto",ReasoningFormat2))(ReasoningFormat||{}),MessageRole=(MessageRole2=>(MessageRole2.USER="user",MessageRole2.
ASSISTANT="assistant",MessageRole2.SYSTEM="system",MessageRole2.TOOL="tool",MessageRole2))(MessageRole||{}),MessageType=(MessageType2=>(MessageType2.ROOT="root",MessageType2.TEXT="text",MessageType2.THINK="think",MessageType2.SYSTEM="system",MessageType2))(MessageType||{}),ContentPartType=(ContentPartType2=>(ContentPartType2.TEXT="text",ContentPartType2.IMAGE_URL="image_url",ContentPartType2.INPUT_AUDIO="input_audio",ContentPartType2))(ContentPartType||{}),ErrorDialogType=(ErrorDialogType2=>(ErrorDialogType2.
TIMEOUT="timeout",ErrorDialogType2.SERVER="server",ErrorDialogType2))(ErrorDialogType||{}),ConversationSelectionMode=(ConversationSelectionMode2=>(ConversationSelectionMode2.EXPORT="export",ConversationSelectionMode2.IMPORT="import",ConversationSelectionMode2))(ConversationSelectionMode||{}),PdfViewMode=(PdfViewMode2=>(PdfViewMode2.TEXT="text",PdfViewMode2.PAGES="pages",PdfViewMode2))(PdfViewMode||{}),FileTypeCategory=(FileTypeCategory2=>(FileTypeCategory2.IMAGE="image",FileTypeCategory2.AUDIO="\
audio",FileTypeCategory2.PDF="pdf",FileTypeCategory2.TEXT="text",FileTypeCategory2))(FileTypeCategory||{}),SpecialFileType=(SpecialFileType2=>(SpecialFileType2.MCP_PROMPT="mcp-prompt",SpecialFileType2))(SpecialFileType||{}),FileTypeImage=(FileTypeImage2=>(FileTypeImage2.JPEG="jpeg",FileTypeImage2.PNG="png",FileTypeImage2.GIF="gif",FileTypeImage2.WEBP="webp",FileTypeImage2.SVG="svg",FileTypeImage2))(FileTypeImage||{}),FileTypeAudio=(FileTypeAudio2=>(FileTypeAudio2.MP3="mp3",FileTypeAudio2.WAV="wa\
v",FileTypeAudio2.WEBM="webm",FileTypeAudio2))(FileTypeAudio||{}),FileTypePdf=(FileTypePdf2=>(FileTypePdf2.PDF="pdf",FileTypePdf2))(FileTypePdf||{}),FileTypeText=(FileTypeText2=>(FileTypeText2.PLAIN_TEXT="plainText",FileTypeText2.MARKDOWN="md",FileTypeText2.ASCIIDOC="asciidoc",FileTypeText2.JAVASCRIPT="js",FileTypeText2.TYPESCRIPT="ts",FileTypeText2.JSX="jsx",FileTypeText2.TSX="tsx",FileTypeText2.CSS="css",FileTypeText2.HTML="html",FileTypeText2.JSON="json",FileTypeText2.XML="xml",FileTypeText2.
YAML="yaml",FileTypeText2.CSV="csv",FileTypeText2.LOG="log",FileTypeText2.PYTHON="python",FileTypeText2.JAVA="java",FileTypeText2.CPP="cpp",FileTypeText2.PHP="php",FileTypeText2.RUBY="ruby",FileTypeText2.GO="go",FileTypeText2.RUST="rust",FileTypeText2.SHELL="shell",FileTypeText2.SQL="sql",FileTypeText2.R="r",FileTypeText2.SCALA="scala",FileTypeText2.KOTLIN="kotlin",FileTypeText2.SWIFT="swift",FileTypeText2.DART="dart",FileTypeText2.VUE="vue",FileTypeText2.SVELTE="svelte",FileTypeText2.LATEX="lat\
ex",FileTypeText2.BIBTEX="bibtex",FileTypeText2.CUDA="cuda",FileTypeText2.VULKAN="vulkan",FileTypeText2.HASKELL="haskell",FileTypeText2.CSHARP="csharp",FileTypeText2.PROPERTIES="properties",FileTypeText2))(FileTypeText||{}),FileExtensionImage=(FileExtensionImage2=>(FileExtensionImage2.JPG=".jpg",FileExtensionImage2.JPEG=".jpeg",FileExtensionImage2.PNG=".png",FileExtensionImage2.GIF=".gif",FileExtensionImage2.WEBP=".webp",FileExtensionImage2.SVG=".svg",FileExtensionImage2))(FileExtensionImage||{}),
FileExtensionAudio=(FileExtensionAudio2=>(FileExtensionAudio2.MP3=".mp3",FileExtensionAudio2.WAV=".wav",FileExtensionAudio2))(FileExtensionAudio||{}),FileExtensionPdf=(FileExtensionPdf2=>(FileExtensionPdf2.PDF=".pdf",FileExtensionPdf2))(FileExtensionPdf||{}),FileExtensionText=(FileExtensionText2=>(FileExtensionText2.TXT=".txt",FileExtensionText2.MD=".md",FileExtensionText2.ADOC=".adoc",FileExtensionText2.JS=".js",FileExtensionText2.TS=".ts",FileExtensionText2.JSX=".jsx",FileExtensionText2.TSX=".\
tsx",FileExtensionText2.CSS=".css",FileExtensionText2.HTML=".html",FileExtensionText2.HTM=".htm",FileExtensionText2.JSON=".json",FileExtensionText2.XML=".xml",FileExtensionText2.YAML=".yaml",FileExtensionText2.YML=".yml",FileExtensionText2.CSV=".csv",FileExtensionText2.LOG=".log",FileExtensionText2.PY=".py",FileExtensionText2.JAVA=".java",FileExtensionText2.CPP=".cpp",FileExtensionText2.C=".c",FileExtensionText2.H=".h",FileExtensionText2.PHP=".php",FileExtensionText2.RB=".rb",FileExtensionText2.
GO=".go",FileExtensionText2.RS=".rs",FileExtensionText2.SH=".sh",FileExtensionText2.BAT=".bat",FileExtensionText2.SQL=".sql",FileExtensionText2.R=".r",FileExtensionText2.SCALA=".scala",FileExtensionText2.KT=".kt",FileExtensionText2.SWIFT=".swift",FileExtensionText2.DART=".dart",FileExtensionText2.VUE=".vue",FileExtensionText2.SVELTE=".svelte",FileExtensionText2.TEX=".tex",FileExtensionText2.BIB=".bib",FileExtensionText2.CU=".cu",FileExtensionText2.CUH=".cuh",FileExtensionText2.COMP=".comp",FileExtensionText2.
HPP=".hpp",FileExtensionText2.HS=".hs",FileExtensionText2.PROPERTIES=".properties",FileExtensionText2.CS=".cs",FileExtensionText2))(FileExtensionText||{}),MimeTypePrefix=(MimeTypePrefix2=>(MimeTypePrefix2.IMAGE="image/",MimeTypePrefix2.TEXT="text",MimeTypePrefix2))(MimeTypePrefix||{}),MimeTypeIncludes=(MimeTypeIncludes2=>(MimeTypeIncludes2.JSON="json",MimeTypeIncludes2.JAVASCRIPT="javascript",MimeTypeIncludes2.TYPESCRIPT="typescript",MimeTypeIncludes2))(MimeTypeIncludes||{}),UriPattern=(UriPattern2=>(UriPattern2.
DATABASE_KEYWORD="database",UriPattern2.DATABASE_SCHEME="db://",UriPattern2))(UriPattern||{}),MimeTypeApplication=(MimeTypeApplication2=>(MimeTypeApplication2.PDF="application/pdf",MimeTypeApplication2.OCTET_STREAM="application/octet-stream",MimeTypeApplication2))(MimeTypeApplication||{}),MimeTypeAudio=(MimeTypeAudio2=>(MimeTypeAudio2.MP3_MPEG="audio/mpeg",MimeTypeAudio2.MP3="audio/mp3",MimeTypeAudio2.MP4="audio/mp4",MimeTypeAudio2.WAV="audio/wav",MimeTypeAudio2.WEBM="audio/webm",MimeTypeAudio2.
WEBM_OPUS="audio/webm;codecs=opus",MimeTypeAudio2))(MimeTypeAudio||{}),MimeTypeImage=(MimeTypeImage2=>(MimeTypeImage2.JPEG="image/jpeg",MimeTypeImage2.JPG="image/jpg",MimeTypeImage2.PNG="image/png",MimeTypeImage2.GIF="image/gif",MimeTypeImage2.WEBP="image/webp",MimeTypeImage2.SVG="image/svg+xml",MimeTypeImage2.ICO="image/x-icon",MimeTypeImage2.ICO_MICROSOFT="image/vnd.microsoft.icon",MimeTypeImage2))(MimeTypeImage||{}),MimeTypeText=(MimeTypeText2=>(MimeTypeText2.PLAIN="text/plain",MimeTypeText2.
MARKDOWN="text/markdown",MimeTypeText2.ASCIIDOC="text/asciidoc",MimeTypeText2.JAVASCRIPT="text/javascript",MimeTypeText2.JAVASCRIPT_APP="application/javascript",MimeTypeText2.TYPESCRIPT="text/typescript",MimeTypeText2.JSX="text/jsx",MimeTypeText2.TSX="text/tsx",MimeTypeText2.CSS="text/css",MimeTypeText2.HTML="text/html",MimeTypeText2.JSON="application/json",MimeTypeText2.XML_TEXT="text/xml",MimeTypeText2.XML_APP="application/xml",MimeTypeText2.YAML_TEXT="text/yaml",MimeTypeText2.YAML_APP="applic\
ation/yaml",MimeTypeText2.CSV="text/csv",MimeTypeText2.PYTHON="text/x-python",MimeTypeText2.JAVA="text/x-java-source",MimeTypeText2.CPP_HDR="text/x-c++hdr",MimeTypeText2.CPP_SRC="text/x-c++src",MimeTypeText2.CSHARP="text/x-csharp",MimeTypeText2.HASKELL="text/x-haskell",MimeTypeText2.C_SRC="text/x-csrc",MimeTypeText2.C_HDR="text/x-chdr",MimeTypeText2.PHP="text/x-php",MimeTypeText2.RUBY="text/x-ruby",MimeTypeText2.GO="text/x-go",MimeTypeText2.RUST="text/x-rust",MimeTypeText2.SHELL="text/x-shellscr\
ipt",MimeTypeText2.BAT="application/x-bat",MimeTypeText2.SQL="text/x-sql",MimeTypeText2.R="text/x-r",MimeTypeText2.SCALA="text/x-scala",MimeTypeText2.KOTLIN="text/x-kotlin",MimeTypeText2.SWIFT="text/x-swift",MimeTypeText2.DART="text/x-dart",MimeTypeText2.VUE="text/x-vue",MimeTypeText2.SVELTE="text/x-svelte",MimeTypeText2.TEX="text/x-tex",MimeTypeText2.TEX_APP="application/x-tex",MimeTypeText2.LATEX="application/x-latex",MimeTypeText2.BIBTEX="text/x-bibtex",MimeTypeText2.CUDA="text/x-cuda",MimeTypeText2.
PROPERTIES="text/properties",MimeTypeText2))(MimeTypeText||{}),MCPConnectionPhase=(MCPConnectionPhase2=>(MCPConnectionPhase2.IDLE="idle",MCPConnectionPhase2.TRANSPORT_CREATING="transport_creating",MCPConnectionPhase2.TRANSPORT_READY="transport_ready",MCPConnectionPhase2.INITIALIZING="initializing",MCPConnectionPhase2.CAPABILITIES_EXCHANGED="capabilities_exchanged",MCPConnectionPhase2.LISTING_TOOLS="listing_tools",MCPConnectionPhase2.CONNECTED="connected",MCPConnectionPhase2.ERROR="error",MCPConnectionPhase2.
DISCONNECTED="disconnected",MCPConnectionPhase2))(MCPConnectionPhase||{}),MCPLogLevel=(MCPLogLevel2=>(MCPLogLevel2.INFO="info",MCPLogLevel2.WARN="warn",MCPLogLevel2.ERROR="error",MCPLogLevel2))(MCPLogLevel||{}),MCPTransportType=(MCPTransportType2=>(MCPTransportType2.WEBSOCKET="websocket",MCPTransportType2.STREAMABLE_HTTP="streamable_http",MCPTransportType2.SSE="sse",MCPTransportType2))(MCPTransportType||{}),HealthCheckStatus=(HealthCheckStatus2=>(HealthCheckStatus2.IDLE="idle",HealthCheckStatus2.
CONNECTING="connecting",HealthCheckStatus2.SUCCESS="success",HealthCheckStatus2.ERROR="error",HealthCheckStatus2))(HealthCheckStatus||{}),MCPContentType=(MCPContentType2=>(MCPContentType2.TEXT="text",MCPContentType2.IMAGE="image",MCPContentType2.RESOURCE="resource",MCPContentType2))(MCPContentType||{}),JsonSchemaType=(JsonSchemaType2=>(JsonSchemaType2.OBJECT="object",JsonSchemaType2))(JsonSchemaType||{}),MCPRefType=(MCPRefType2=>(MCPRefType2.PROMPT="ref/prompt",MCPRefType2.RESOURCE="ref/resource",
MCPRefType2))(MCPRefType||{}),ModelModality=(ModelModality2=>(ModelModality2.TEXT="TEXT",ModelModality2.AUDIO="AUDIO",ModelModality2.VISION="VISION",ModelModality2))(ModelModality||{}),ServerRole=(ServerRole2=>(ServerRole2.MODEL="model",ServerRole2.ROUTER="router",ServerRole2))(ServerRole||{}),ServerModelStatus=(ServerModelStatus2=>(ServerModelStatus2.UNLOADED="unloaded",ServerModelStatus2.LOADING="loading",ServerModelStatus2.LOADED="loaded",ServerModelStatus2.SLEEPING="sleeping",ServerModelStatus2.
FAILED="failed",ServerModelStatus2))(ServerModelStatus||{}),ParameterSource=(ParameterSource2=>(ParameterSource2.DEFAULT="default",ParameterSource2.CUSTOM="custom",ParameterSource2))(ParameterSource||{}),SyncableParameterType=(SyncableParameterType2=>(SyncableParameterType2.NUMBER="number",SyncableParameterType2.STRING="string",SyncableParameterType2.BOOLEAN="boolean",SyncableParameterType2))(SyncableParameterType||{}),SettingsFieldType=(SettingsFieldType2=>(SettingsFieldType2.INPUT="input",SettingsFieldType2.
TEXTAREA="textarea",SettingsFieldType2.CHECKBOX="checkbox",SettingsFieldType2.SELECT="select",SettingsFieldType2))(SettingsFieldType||{}),ColorMode=(ColorMode2=>(ColorMode2.LIGHT="light",ColorMode2.DARK="dark",ColorMode2.SYSTEM="system",ColorMode2))(ColorMode||{}),TooltipSide=(TooltipSide2=>(TooltipSide2.TOP="top",TooltipSide2.RIGHT="right",TooltipSide2.BOTTOM="bottom",TooltipSide2.LEFT="left",TooltipSide2))(TooltipSide||{}),McpPromptVariant=(McpPromptVariant2=>(McpPromptVariant2.MESSAGE="messag\
e",McpPromptVariant2.ATTACHMENT="attachment",McpPromptVariant2))(McpPromptVariant||{}),UrlProtocol=(UrlProtocol2=>(UrlProtocol2.DATA="data:",UrlProtocol2.HTTP="http:",UrlProtocol2.HTTPS="https:",UrlProtocol2.WEBSOCKET="ws:",UrlProtocol2.WEBSOCKET_SECURE="wss:",UrlProtocol2))(UrlProtocol||{}),HtmlInputType=(HtmlInputType2=>(HtmlInputType2.FILE="file",HtmlInputType2))(HtmlInputType||{}),KeyboardKey=(KeyboardKey2=>(KeyboardKey2.ENTER="Enter",KeyboardKey2.ESCAPE="Escape",KeyboardKey2.ARROW_UP="Arrow\
Up",KeyboardKey2.ARROW_DOWN="ArrowDown",KeyboardKey2.ARROW_LEFT="ArrowLeft",KeyboardKey2.ARROW_RIGHT="ArrowRight",KeyboardKey2.TAB="Tab",KeyboardKey2.D_LOWER="d",KeyboardKey2.D_UPPER="D",KeyboardKey2.E_UPPER="E",KeyboardKey2.K_LOWER="k",KeyboardKey2.O_LOWER="o",KeyboardKey2.O_UPPER="O",KeyboardKey2.SPACE=" ",KeyboardKey2))(KeyboardKey||{}),ToolSource=(ToolSource2=>(ToolSource2.BUILTIN="builtin",ToolSource2.MCP="mcp",ToolSource2.CUSTOM="custom",ToolSource2))(ToolSource||{}),ToolPermissionDecision=(ToolPermissionDecision2=>(ToolPermissionDecision2.
ALWAYS="always",ToolPermissionDecision2.ALWAYS_SERVER="always_server",ToolPermissionDecision2.ONCE="once",ToolPermissionDecision2.DENY="deny",ToolPermissionDecision2))(ToolPermissionDecision||{}),ToolResponseField=(ToolResponseField2=>(ToolResponseField2.PLAIN_TEXT="plain_text_response",ToolResponseField2.ERROR="error",ToolResponseField2))(ToolResponseField||{}),root_5$v=from_html("<p> </p>"),root_1$19=from_html("<!> <!>",1);function ActionIcon($$anchor,$$props){push$1($$props,!0);let variant=prop(
$$props,"variant",3,"ghost"),size2=prop($$props,"size",3,"sm"),className=prop($$props,"class",3,""),disabled=prop($$props,"disabled",3,!1),iconSize=prop($$props,"iconSize",3,"h-3 w-3"),tooltipSide=prop($$props,"tooltipSide",19,()=>TooltipSide.TOP),stopPropagationOnClick=prop($$props,"stopPropagationOnClick",3,!1);var fragment=comment$2(),node2=first_child(fragment);component(node2,()=>Root$5,($$anchor2,Tooltip_Root)=>{Tooltip_Root($$anchor2,{children:($$anchor3,$$slotProps)=>{var fragment_1=root_1$19(),
node_1=first_child(fragment_1);component(node_1,()=>Tooltip_trigger,($$anchor4,Tooltip_Trigger)=>{Tooltip_Trigger($$anchor4,{children:($$anchor5,$$slotProps2)=>{{let $0=user_derived(()=>$$props.ariaLabel||$$props.tooltip);Button($$anchor5,{get variant(){return variant()},get size(){return size2()},get disabled(){return disabled()},onclick:e=>{stopPropagationOnClick()&&e.stopPropagation(),$$props.onclick?.(e)},get class(){return`h-6 w-6 p-0 ${className()??""} flex hover:bg-transparent data-[state\
=open]:bg-transparent!`},get"aria-label"(){return get$3($0)},children:($$anchor6,$$slotProps3)=>{var fragment_3=comment$2(),node_2=first_child(fragment_3);{var consequent=$$anchor7=>{const IconComponent=user_derived(()=>$$props.icon);var fragment_4=comment$2(),node_3=first_child(fragment_4);component(node_3,()=>get$3(IconComponent),($$anchor8,IconComponent_1)=>{IconComponent_1($$anchor8,{get class(){return iconSize()}})}),append($$anchor7,fragment_4)};if_block(node_2,$$render=>{$$props.icon&&$$render(
consequent)})}append($$anchor6,fragment_3)},$$slots:{default:!0}})}},$$slots:{default:!0}})});var node_4=sibling(node_1,2);component(node_4,()=>Tooltip_content,($$anchor4,Tooltip_Content)=>{Tooltip_Content($$anchor4,{get side(){return tooltipSide()},children:($$anchor5,$$slotProps2)=>{var p2=root_5$v(),text2=child(p2,!0);reset(p2),template_effect(()=>set_text(text2,$$props.tooltip)),append($$anchor5,p2)},$$slots:{default:!0}})}),append($$anchor3,fragment_1)},$$slots:{default:!0}})}),append($$anchor,
fragment),pop()}const defaultAttributes={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round"};var root$1V=from_svg("<svg><!><!></svg>");function Icon($$anchor,$$props){push$1($$props,!0);const color=prop($$props,"color",3,"currentColor"),size2=prop($$props,"size",3,24),strokeWidth=prop($$props,"strokeWidth",3,2),absoluteStrokeWidth=prop($$props,"absoluteStrokeWidth",3,!1),iconNode=prop(
$$props,"iconNode",19,()=>[]),props=rest_props($$props,["$$slots","$$events","$$legacy","name","color","size","strokeWidth","absoluteStrokeWidth","iconNode","children"]);var svg2=root$1V();attribute_effect(svg2,$0=>({...defaultAttributes,...props,width:size2(),height:size2(),stroke:color(),"stroke-width":$0,class:["lucide-icon lucide",$$props.name&&`lucide-${$$props.name}`,$$props.class]}),[()=>absoluteStrokeWidth()?Number(strokeWidth())*24/Number(size2()):strokeWidth()]);var node2=child(svg2);each(
node2,17,iconNode,index$2,($$anchor2,$$item)=>{var $$array=user_derived(()=>to_array(get$3($$item),2));let tag=()=>get$3($$array)[0],attrs=()=>get$3($$array)[1];var fragment=comment$2(),node_1=first_child(fragment);element$4(node_1,tag,!0,($$element,$$anchor3)=>{attribute_effect($$element,()=>({...attrs()}))}),append($$anchor2,fragment)});var node_2=sibling(node2);snippet(node_2,()=>$$props.children??noop$3),reset(svg2),append($$anchor,svg2),pop()}function Arrow_big_up($$anchor,$$props){push$1($$props,
!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M9 18v-6H5l7-7 7 7h-4v6H9z"}]];Icon($$anchor,spread_props({name:"arrow-big-up"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Arrow_right($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,
["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M5 12h14"}],["path",{d:"m12 5 7 7-7 7"}]];Icon($$anchor,spread_props({name:"arrow-right"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Arrow_up($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$\
$legacy"]);const iconNode=[["path",{d:"m5 12 7-7 7 7"}],["path",{d:"M12 19V5"}]];Icon($$anchor,spread_props({name:"arrow-up"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Book_open_text($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[
["path",{d:"M12 7v14"}],["path",{d:"M16 12h2"}],["path",{d:"M16 8h2"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z"}],["path",{d:"M6 12h2"}],["path",{d:"M6 8h2"}]];Icon($$anchor,spread_props({name:"book-open-text"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append(
$$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Braces($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1"}]];Icon($$anchor,spread_props({name:"braces"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),
node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Brain($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M12 5a3 3 0 1 0-5.997.125 4 4 0 0 0-2.526 5.77 4 4 0 0 0 .556 6.588A4 4 0 1 0 12 18Z"}],["path",{d:"M12 5a3 3 0 1 1 5.997.125 4 4 0 0 1 2.526 5.77 4 4 0 0 1-.556 6.588A4 4 0 1 1 12 18Z"}],["path",{d:"M15 13a4.5 4.5 0 0 1-3\
-4 4.5 4.5 0 0 1-3 4"}],["path",{d:"M17.599 6.5a3 3 0 0 0 .399-1.375"}],["path",{d:"M6.003 5.125A3 3 0 0 0 6.401 6.5"}],["path",{d:"M3.477 10.896a4 4 0 0 1 .585-.396"}],["path",{d:"M19.938 10.5a4 4 0 0 1 .585.396"}],["path",{d:"M6 18a4 4 0 0 1-1.967-.516"}],["path",{d:"M19.967 17.484A4 4 0 0 1 18 18"}]];Icon($$anchor,spread_props({name:"brain"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.
children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Check($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M20 6 9 17l-5-5"}]];Icon($$anchor,spread_props({name:"check"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{
default:!0}})),pop()}function Chevron_down($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"m6 9 6 6 6-6"}]];Icon($$anchor,spread_props({name:"chevron-down"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Chevron_left($$anchor,$$props){
push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"m15 18-6-6 6-6"}]];Icon($$anchor,spread_props({name:"chevron-left"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Chevron_up($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,
["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"m18 15-6-6-6 6"}]];Icon($$anchor,spread_props({name:"chevron-up"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Chevron_right($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[
["path",{d:"m9 18 6-6-6-6"}]];Icon($$anchor,spread_props({name:"chevron-right"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Chevrons_up_down($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"m7 15 5 5 5-5"}],["path",{
d:"m7 9 5-5 5 5"}]];Icon($$anchor,spread_props({name:"chevrons-up-down"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Circle_alert($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["circle",{cx:"12",cy:"12",r:"10"}],["line",{x1:"\
12",x2:"12",y1:"8",y2:"12"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16"}]];Icon($$anchor,spread_props({name:"circle-alert"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Circle_check_big($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[
["path",{d:"M21.801 10A10 10 0 1 1 17 3.335"}],["path",{d:"m9 11 3 3L22 4"}]];Icon($$anchor,spread_props({name:"circle-check-big"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Circle_x($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[
["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"m15 9-6 6"}],["path",{d:"m9 9 6 6"}]];Icon($$anchor,spread_props({name:"circle-x"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Clock($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[
["circle",{cx:"12",cy:"12",r:"10"}],["polyline",{points:"12 6 12 12 16 14"}]];Icon($$anchor,spread_props({name:"clock"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Code($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"\
m16 18 6-6-6-6"}],["path",{d:"m8 6-6 6 6 6"}]];Icon($$anchor,spread_props({name:"code"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Copy($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["rect",{width:"14",height:"14",x:"8",y:"8",
rx:"2",ry:"2"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"}]];Icon($$anchor,spread_props({name:"copy"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Database($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[
["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5"}],["path",{d:"M3 12A9 3 0 0 0 21 12"}]];Icon($$anchor,spread_props({name:"database"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Download($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots",
"$$events","$$legacy"]);const iconNode=[["path",{d:"M12 15V3"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}],["path",{d:"m7 10 5 5 5-5"}]];Icon($$anchor,spread_props({name:"download"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Ellipsis($$anchor,$$props){push$1($$props,!0);let props=rest_props(
$$props,["$$slots","$$events","$$legacy"]);const iconNode=[["circle",{cx:"12",cy:"12",r:"1"}],["circle",{cx:"19",cy:"12",r:"1"}],["circle",{cx:"5",cy:"12",r:"1"}]];Icon($$anchor,spread_props({name:"ellipsis"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function External_link($$anchor,$$props){push$1($$props,
!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M15 3h6v6"}],["path",{d:"M10 14 21 3"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"}]];Icon($$anchor,spread_props({name:"external-link"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Eye($$anchor,$$props){
push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0"}],["circle",{cx:"12",cy:"12",r:"3"}]];Icon($$anchor,spread_props({name:"eye"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},
$$slots:{default:!0}})),pop()}function File_text($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4"}],["path",{d:"M10 9H8"}],["path",{d:"M16 13H8"}],["path",{d:"M16 17H8"}]];Icon($$anchor,spread_props({name:"file-text"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),
node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function File_x($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4"}],["path",{d:"m14.5 12.5-5 5"}],["path",{d:"m9.5 12.5 5 5"}]];Icon($$anchor,spread_props({name:"file-x"},()=>props,{get iconNode(){
return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function File$1($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4"}]];Icon($$anchor,spread_props({name:"file"},
()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Flask_conical($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2"}],["\
path",{d:"M6.453 15h11.094"}],["path",{d:"M8.5 2h7"}]];Icon($$anchor,spread_props({name:"flask-conical"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Folder_open($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"m6 14 \
1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2"}]];Icon($$anchor,spread_props({name:"folder-open"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Funnel($$anchor,$$props){push$1(
$$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z"}]];Icon($$anchor,spread_props({name:"funnel"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},
$$slots:{default:!0}})),pop()}function Gauge($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"m12 14 4-4"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0"}]];Icon($$anchor,spread_props({name:"gauge"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),
pop()}function Git_branch($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["line",{x1:"6",x2:"6",y1:"3",y2:"15"}],["circle",{cx:"18",cy:"6",r:"3"}],["circle",{cx:"6",cy:"18",r:"3"}],["path",{d:"M18 9a9 9 0 0 1-9 9"}]];Icon($$anchor,spread_props({name:"git-branch"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??
noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Globe($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20"}],["path",{d:"M2 12h20"}]];Icon($$anchor,spread_props({name:"globe"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);
snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Heart_off($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["line",{x1:"2",y1:"2",x2:"22",y2:"22"}],["path",{d:"M16.5 16.5 12 21l-7-7c-1.5-1.45-3-3.2-3-5.5a5.5 5.5 0 0 1 2.14-4.35"}],["path",{d:"M8.76 3.1c1.15.22 2.13.78 3.24 1.9 1.5-1.5 2.74-2 4.5-2A5.5 5.5 0 0 1 22 8.5c0 2.12-1.3 3.78-2.67 5.17"}]];Icon($$anchor,spread_props(
{name:"heart-off"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Heart($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5\
 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5l7 7Z"}]];Icon($$anchor,spread_props({name:"heart"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Image$1($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["rect",{width:"18",height:"18",x:"3",y:"3",
rx:"2",ry:"2"}],["circle",{cx:"9",cy:"9",r:"2"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"}]];Icon($$anchor,spread_props({name:"image"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Info$1($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legac\
y"]);const iconNode=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M12 16v-4"}],["path",{d:"M12 8h.01"}]];Icon($$anchor,spread_props({name:"info"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Key($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);
const iconNode=[["path",{d:"m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4"}],["path",{d:"m21 2-9.6 9.6"}],["circle",{cx:"7.5",cy:"15.5",r:"5.5"}]];Icon($$anchor,spread_props({name:"key"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Layers($$anchor,$$props){push$1($$props,!0);let props=rest_props(
$$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17"}]];Icon($$anchor,spread_props({name:"layers"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),
node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function List_checks($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"m3 17 2 2 4-4"}],["path",{d:"m3 7 2 2 4-4"}],["path",{d:"M13 6h8"}],["path",{d:"M13 12h8"}],["path",{d:"M13 18h8"}]];Icon($$anchor,spread_props({name:"list-checks"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{
var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function List_restart($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M21 6H3"}],["path",{d:"M7 12H3"}],["path",{d:"M7 18H3"}],["path",{d:"M12 18a5 5 0 0 0 9-3 4.5 4.5 0 0 0-4.5-4.5c-1.33 0-2.54.54-3.41 1.41L11 14"}],["path",{d:"M11 10v4h4"}]];Icon($$anchor,
spread_props({name:"list-restart"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Loader_circle($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56"}]];Icon($$anchor,spread_props({name:"loader-c\
ircle"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Message_square($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"}]];Icon($$anchor,spread_props({name:"\
message-square"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Mic($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2"}],["li\
ne",{x1:"12",x2:"12",y1:"19",y2:"22"}]];Icon($$anchor,spread_props({name:"mic"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Minus($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M5 12h14"}]];Icon($$anchor,spread_props(
{name:"minus"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Monitor($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21"}],["line",{x1:"12",
x2:"12",y1:"17",y2:"21"}]];Icon($$anchor,spread_props({name:"monitor"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Moon($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z"}]];Icon($$anchor,
spread_props({name:"moon"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Music($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M9 18V5l12-2v13"}],["circle",{cx:"6",cy:"18",r:"3"}],["circle",{cx:"18",cy:"16",r:"3"}]];Icon(
$$anchor,spread_props({name:"music"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Package($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-\
2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z"}],["path",{d:"M12 22V12"}],["polyline",{points:"3.29 7 12 12 20.71 7"}],["path",{d:"m7.5 4.27 9 5.15"}]];Icon($$anchor,spread_props({name:"package"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Panel_left_close($$anchor,$$props){push$1($$props,!0);let props=rest_props(
$$props,["$$slots","$$events","$$legacy"]);const iconNode=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}],["path",{d:"M9 3v18"}],["path",{d:"m16 15-3-3 3-3"}]];Icon($$anchor,spread_props({name:"panel-left-close"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Panel_left($$anchor,$$props){push$1(
$$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}],["path",{d:"M9 3v18"}]];Icon($$anchor,spread_props({name:"panel-left"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Pencil_ruler($$anchor,$$props){push$1(
$$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M13 7 8.7 2.7a2.41 2.41 0 0 0-3.4 0L2.7 5.3a2.41 2.41 0 0 0 0 3.4L7 13"}],["path",{d:"m8 6 2-2"}],["path",{d:"m18 16 2-2"}],["path",{d:"m17 11 4.3 4.3c.94.94.94 2.46 0 3.4l-2.6 2.6c-.94.94-2.46.94-3.4 0L11 17"}],["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z"}],["path",{d:"m15 5 4 4"}]];Icon($$anchor,
spread_props({name:"pencil-ruler"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Pencil($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.\
5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z"}],["path",{d:"m15 5 4 4"}]];Icon($$anchor,spread_props({name:"pencil"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Plus($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"\
M5 12h14"}],["path",{d:"M12 5v14"}]];Icon($$anchor,spread_props({name:"plus"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Power_off($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M18.36 6.64A9 9 0 0 1 20.77 15"}],[
"path",{d:"M6.16 6.16a9 9 0 1 0 12.68 12.68"}],["path",{d:"M12 2v4"}],["path",{d:"m2 2 20 20"}]];Icon($$anchor,spread_props({name:"power-off"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Power($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[
["path",{d:"M12 2v10"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04"}]];Icon($$anchor,spread_props({name:"power"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Radio($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M4.9 1\
9.1C1 15.2 1 8.8 4.9 4.9"}],["path",{d:"M7.8 16.2c-2.3-2.3-2.3-6.1 0-8.5"}],["circle",{cx:"12",cy:"12",r:"2"}],["path",{d:"M16.2 7.8c2.3 2.3 2.3 6.1 0 8.5"}],["path",{d:"M19.1 4.9C23 8.8 23 15.1 19.1 19"}]];Icon($$anchor,spread_props({name:"radio"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Refresh_cw($$anchor,$$props){
push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8"}],["path",{d:"M21 3v5h-5"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16"}],["path",{d:"M8 16H3v5"}]];Icon($$anchor,spread_props({name:"refresh-cw"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??
noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Rotate_ccw($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"}],["path",{d:"M3 3v5h5"}]];Icon($$anchor,spread_props({name:"rotate-ccw"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.
children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Rotate_cw($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8"}],["path",{d:"M21 3v5h-5"}]];Icon($$anchor,spread_props({name:"rotate-cw"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,
()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Search($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"m21 21-4.34-4.34"}],["circle",{cx:"11",cy:"11",r:"8"}]];Icon($$anchor,spread_props({name:"search"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??
noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Server($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18"}]];Icon($$anchor,spread_props({name:"server"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{
var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Settings$1($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73\
 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"}],["circle",{cx:"12",cy:"12",r:"3"}]];Icon($$anchor,spread_props({name:"settings"},()=>props,{get iconNode(){return iconNode},
children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Shield_off($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"m2 2 20 20"}],["path",{d:"M5 5a1 1 0 0 0-1 1v7c0 5 3.5 7.5 7.67 8.94a1 1 0 0 0 .67.01c2.35-.82 4.48-1.97 5.9-3.71"}],["path",{d:"M9.309 3.652A12.252 12.252\
 0 0 0 11.24 2.28a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1v7a9.784 9.784 0 0 1-.08 1.264"}]];Icon($$anchor,spread_props({name:"shield-off"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Shield_question($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$\
$events","$$legacy"]);const iconNode=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"}],["path",{d:"M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3"}],["path",{d:"M12 17h.01"}]];Icon($$anchor,spread_props({name:"shield-question"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.
children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Shield($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z"}]];Icon($$anchor,spread_props({name:"shield"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{
var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Sliders_vertical($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["line",{x1:"4",x2:"4",y1:"21",y2:"14"}],["line",{x1:"4",x2:"4",y1:"10",y2:"3"}],["line",{x1:"12",x2:"12",y1:"21",y2:"12"}],["line",{x1:"12",x2:"12",y1:"8",y2:"3"}],["line",{x1:"20",x2:"20",y1:"21",
y2:"16"}],["line",{x1:"20",x2:"20",y1:"12",y2:"3"}],["line",{x1:"2",x2:"6",y1:"14",y2:"14"}],["line",{x1:"10",x2:"14",y1:"8",y2:"8"}],["line",{x1:"18",x2:"22",y1:"16",y2:"16"}]];Icon($$anchor,spread_props({name:"sliders-vertical"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Sparkles($$anchor,$$props){
push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M9.937 15.5A2 2 0 0 0 8.5 14.063l-6.135-1.582a.5.5 0 0 1 0-.962L8.5 9.936A2 2 0 0 0 9.937 8.5l1.582-6.135a.5.5 0 0 1 .963 0L14.063 8.5A2 2 0 0 0 15.5 9.937l6.135 1.581a.5.5 0 0 1 0 .964L15.5 14.063a2 2 0 0 0-1.437 1.437l-1.582 6.135a.5.5 0 0 1-.963 0z"}],["path",{d:"M20 3v4"}],["path",{d:"M22 5h-4"}],["path",{d:"M4 17v2"}],["path",{d:"M5 18H3"}]];Icon($$anchor,spread_props({name:"sparkl\
es"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Square_pen($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.01\
3 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z"}]];Icon($$anchor,spread_props({name:"square-pen"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Square($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[
["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}]];Icon($$anchor,spread_props({name:"square"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Sun($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["circle",{cx:"12",cy:"12",r:"4"}],
["path",{d:"M12 2v2"}],["path",{d:"M12 20v2"}],["path",{d:"m4.93 4.93 1.41 1.41"}],["path",{d:"m17.66 17.66 1.41 1.41"}],["path",{d:"M2 12h2"}],["path",{d:"M20 12h2"}],["path",{d:"m6.34 17.66-1.41 1.41"}],["path",{d:"m19.07 4.93-1.41 1.41"}]];Icon($$anchor,spread_props({name:"sun"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{
default:!0}})),pop()}function Timer_off($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M10 2h4"}],["path",{d:"M4.6 11a8 8 0 0 0 1.7 8.7 8 8 0 0 0 8.7 1.7"}],["path",{d:"M7.4 7.4a8 8 0 0 1 10.3 1 8 8 0 0 1 .9 10.2"}],["path",{d:"m2 2 20 20"}],["path",{d:"M12 12v-2"}]];Icon($$anchor,spread_props({name:"timer-off"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),
node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Trash_2($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M3 6h18"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17"}]];Icon($$anchor,spread_props(
{name:"trash-2"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Triangle_alert($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"}],["path",{d:"M12\
 9v4"}],["path",{d:"M12 17h.01"}]];Icon($$anchor,spread_props({name:"triangle-alert"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Upload($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M12 3v12"}],["path",{d:"m17 8-\
5-5-5 5"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}]];Icon($$anchor,spread_props({name:"upload"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Whole_word($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["circle",{cx:"\
7",cy:"12",r:"3"}],["path",{d:"M10 9v6"}],["circle",{cx:"17",cy:"12",r:"3"}],["path",{d:"M14 7v8"}],["path",{d:"M22 17v1c0 .5-.5 1-1 1H3c-.5 0-1-.5-1-1v-1"}]];Icon($$anchor,spread_props({name:"whole-word"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Wrench($$anchor,$$props){push$1($$props,!0);let props=rest_props(
$$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.77-3.77a6 6 0 0 1-7.94 7.94l-6.91 6.91a2.12 2.12 0 0 1-3-3l6.91-6.91a6 6 0 0 1 7.94-7.94l-3.76 3.76z"}]];Icon($$anchor,spread_props({name:"wrench"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),
pop()}function X($$anchor,$$props){push$1($$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M18 6 6 18"}],["path",{d:"m6 6 12 12"}]];Icon($$anchor,spread_props({name:"x"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Zap($$anchor,$$props){push$1(
$$props,!0);let props=rest_props($$props,["$$slots","$$events","$$legacy"]);const iconNode=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z"}]];Icon($$anchor,spread_props({name:"zap"},()=>props,{get iconNode(){return iconNode},children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);snippet(node2,()=>$$props.children??noop$3),append($$anchor2,
fragment_1)},$$slots:{default:!0}})),pop()}const defaultWindow$2=typeof window<"u"?window:void 0;function getActiveElement$2(document2){let activeElement=document2.activeElement;for(;activeElement?.shadowRoot;){const node2=activeElement.shadowRoot.activeElement;if(node2===activeElement)break;activeElement=node2}return activeElement}let ActiveElement$2=class{#document;#subscribe;constructor(options={}){const{window:window2=defaultWindow$2,document:document2=window2?.document}=options;window2!==void 0&&
(this.#document=document2,this.#subscribe=createSubscriber(update2=>{const cleanupFocusIn=on(window2,"focusin",update2),cleanupFocusOut=on(window2,"focusout",update2);return()=>{cleanupFocusIn(),cleanupFocusOut()}}))}get current(){return this.#subscribe?.(),this.#document?getActiveElement$2(this.#document):null}};new ActiveElement$2;function runEffect(flush,effect2){switch(flush){case"post":user_effect(effect2);break;case"pre":user_pre_effect(effect2);break}}function runWatcher(sources,flush,effect2,options={}){
const{lazy=!1}=options;let active=!lazy,previousValues=Array.isArray(sources)?[]:void 0;runEffect(flush,()=>{const values=Array.isArray(sources)?sources.map(source2=>source2()):sources();if(!active){active=!0,previousValues=values;return}const cleanup=untrack$1(()=>effect2(values,previousValues));return previousValues=values,cleanup})}function watch(sources,effect2,options){runWatcher(sources,"post",effect2,options)}function watchPre(sources,effect2,options){runWatcher(sources,"pre",effect2,options)}
watch.pre=watchPre;function getStorage(storageType,window2){switch(storageType){case"local":return window2.localStorage;case"session":return window2.sessionStorage}}class PersistedState{#current;#key;#serializer;#storage;#subscribe;#version=state$1(0);constructor(key2,initialValue,options={}){const{storage:storageType="local",serializer:serializer2={serialize:JSON.stringify,deserialize:JSON.parse},syncTabs=!0,window:window2=defaultWindow$2}=options;if(this.#current=initialValue,this.#key=key2,this.#serializer=
serializer2,window2===void 0)return;const storage=getStorage(storageType,window2);this.#storage=storage;const existingValue=storage.getItem(key2);existingValue!==null?this.#current=this.#deserialize(existingValue):this.#serialize(initialValue),syncTabs&&storageType==="local"&&(this.#subscribe=createSubscriber(()=>on(window2,"storage",this.#handleStorageEvent)))}get current(){this.#subscribe?.(),get$3(this.#version);const root2=this.#deserialize(this.#storage?.getItem(this.#key))??this.#current,proxies=new WeakMap,
proxy2=value=>{if(value===null||value?.constructor.name==="Date"||typeof value!="object")return value;let p2=proxies.get(value);return p2||(p2=new Proxy(value,{get:(target2,property)=>(get$3(this.#version),proxy2(Reflect.get(target2,property))),set:(target2,property,value2)=>(set$1(this.#version,get$3(this.#version)+1),Reflect.set(target2,property,value2),this.#serialize(root2),!0)}),proxies.set(value,p2)),p2};return proxy2(root2)}set current(newValue){this.#serialize(newValue),set$1(this.#version,
get$3(this.#version)+1)}#handleStorageEvent=event2=>{event2.key!==this.#key||event2.newValue===null||(this.#current=this.#deserialize(event2.newValue),set$1(this.#version,get$3(this.#version)+1))};#deserialize(value){try{return this.#serializer.deserialize(value)}catch(error2){console.error(`Error when parsing "${value}" from persisted store "${this.#key}"`,error2);return}}#serialize(value){try{value!=null&&this.#storage?.setItem(this.#key,this.#serializer.serialize(value))}catch(error2){console.
error(`Error when writing value from persisted store "${this.#key}" to ${this.#storage}`,error2)}}}function sanitizeClassNames(classNames){return classNames.filter(className=>className.length>0)}const noopStorage={getItem:_key=>null,setItem:(_key,_value)=>{}},isBrowser$1=typeof document<"u";function isFunction(value){return typeof value=="function"}function isObject$1(value){return value!==null&&typeof value=="object"}const BoxSymbol=Symbol("box"),isWritableSymbol=Symbol("is-writable");function isBox(value){
return isObject$1(value)&&BoxSymbol in value}function isWritableBox(value){return box.isBox(value)&&isWritableSymbol in value}function box(initialValue){let current2=state$1(proxy(initialValue));return{[BoxSymbol]:!0,[isWritableSymbol]:!0,get current(){return get$3(current2)},set current(v){set$1(current2,v,!0)}}}function boxWith(getter,setter){const derived2=user_derived(getter);return setter?{[BoxSymbol]:!0,[isWritableSymbol]:!0,get current(){return get$3(derived2)},set current(v){setter(v)}}:
{[BoxSymbol]:!0,get current(){return getter()}}}function boxFrom(value){return box.isBox(value)?value:isFunction(value)?box.with(value):box(value)}function boxFlatten(boxes){return Object.entries(boxes).reduce((acc,[key2,b])=>box.isBox(b)?(box.isWritableBox(b)?Object.defineProperty(acc,key2,{get(){return b.current},set(v){b.current=v}}):Object.defineProperty(acc,key2,{get(){return b.current}}),acc):Object.assign(acc,{[key2]:b}),{})}function toReadonlyBox(b){return box.isWritableBox(b)?{[BoxSymbol]:!0,
get current(){return b.current}}:b}box.from=boxFrom;box.with=boxWith;box.flatten=boxFlatten;box.readonly=toReadonlyBox;box.isBox=isBox;box.isWritableBox=isWritableBox;function createParser$1(matcher,replacer){const regex=RegExp(matcher,"g");return str=>{if(typeof str!="string")throw new TypeError(`expected an argument of type string, but got ${typeof str}`);return str.match(regex)?str.replace(regex,replacer):str}}const camelToKebab=createParser$1(/[A-Z]/,match=>`-${match.toLowerCase()}`);function styleToCSS(styleObj){
if(!styleObj||typeof styleObj!="object"||Array.isArray(styleObj))throw new TypeError(`expected an argument of type object, but got ${typeof styleObj}`);return Object.keys(styleObj).map(property=>`${camelToKebab(property)}: ${styleObj[property]};`).join(`
`)}function styleToString(style2={}){return styleToCSS(style2).replace(`
`," ")}const srOnlyStyles={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",transform:"translateX(-100%)"};styleToString(srOnlyStyles);const defaultWindow$1=typeof window<"u"?window:void 0;function getActiveElement$1(document2){let activeElement=document2.activeElement;for(;activeElement?.shadowRoot;){const node2=activeElement.shadowRoot.activeElement;if(node2===activeElement)break;activeElement=node2}
return activeElement}let ActiveElement$1=class{#document;#subscribe;constructor(options={}){const{window:window2=defaultWindow$1,document:document2=window2?.document}=options;window2!==void 0&&(this.#document=document2,this.#subscribe=createSubscriber(update2=>{const cleanupFocusIn=on(window2,"focusin",update2),cleanupFocusOut=on(window2,"focusout",update2);return()=>{cleanupFocusIn(),cleanupFocusOut()}}))}get current(){return this.#subscribe?.(),this.#document?getActiveElement$1(this.#document):
null}};new ActiveElement$1;const modeStorageKey=box("mode-watcher-mode"),themeStorageKey=box("mode-watcher-theme"),modes=["dark","light","system"];function isValidMode(value){return typeof value!="string"?!1:modes.includes(value)}class UserPrefersMode{#defaultValue="system";#storage=isBrowser$1?localStorage:noopStorage;#initialValue=this.#storage.getItem(modeStorageKey.current);#value=isValidMode(this.#initialValue)?this.#initialValue:this.#defaultValue;#persisted=state$1(proxy(this.#makePersisted()));#makePersisted(value=this.#value){
return new PersistedState(modeStorageKey.current,value,{serializer:{serialize:v=>v,deserialize:v=>isValidMode(v)?v:this.#defaultValue}})}constructor(){effect_root(()=>watch.pre(()=>modeStorageKey.current,(_,prevStorageKey)=>{const currModeValue=get$3(this.#persisted).current;set$1(this.#persisted,this.#makePersisted(currModeValue),!0),prevStorageKey&&localStorage.removeItem(prevStorageKey)}))}get current(){return get$3(this.#persisted).current}set current(newValue){get$3(this.#persisted).current=
newValue}}class SystemPrefersMode{#defaultValue=void 0;#track=!0;#current=state$1(proxy(this.#defaultValue));#mediaQueryState=typeof window<"u"&&typeof window.matchMedia=="function"?new MediaQuery("prefers-color-scheme: light"):{current:!1};query(){isBrowser$1&&set$1(this.#current,this.#mediaQueryState.current?"light":"dark",!0)}tracking(active){this.#track=active}constructor(){effect_root(()=>{user_pre_effect(()=>{this.#track&&this.query()})}),this.query=this.query.bind(this),this.tracking=this.
tracking.bind(this)}get current(){return get$3(this.#current)}}const userPrefersMode=new UserPrefersMode,systemPrefersMode=new SystemPrefersMode;class CustomTheme{#storage=isBrowser$1?localStorage:noopStorage;#initialValue=this.#storage.getItem(themeStorageKey.current);#value=this.#initialValue===null||this.#initialValue===void 0?"":this.#initialValue;#persisted=state$1(proxy(this.#makePersisted()));#makePersisted(value=this.#value){return new PersistedState(themeStorageKey.current,value,{serializer:{
serialize:v=>typeof v!="string"?"":v,deserialize:v=>v}})}constructor(){effect_root(()=>watch.pre(()=>themeStorageKey.current,(_,prevStorageKey)=>{const currModeValue=get$3(this.#persisted).current;set$1(this.#persisted,this.#makePersisted(currModeValue),!0),prevStorageKey&&localStorage.removeItem(prevStorageKey)}))}get current(){return get$3(this.#persisted).current}set current(newValue){get$3(this.#persisted).current=newValue}}const customTheme=new CustomTheme;let timeoutAction,timeoutEnable,hasLoaded=!1,
styleElement=null;function getStyleElement(){return styleElement||(styleElement=document.createElement("style"),styleElement.appendChild(document.createTextNode(`* {
		-webkit-transition: none !important;
		-moz-transition: none !important;
		-o-transition: none !important;
		-ms-transition: none !important;
		transition: none !important;
	}`)),styleElement)}function withoutTransition(action2,synchronous=!1){if(typeof document>"u")return;if(!hasLoaded){hasLoaded=!0,action2();return}if(typeof window<"u"&&window.__vitest_worker__){action2();return}clearTimeout(timeoutAction),clearTimeout(timeoutEnable);const style2=getStyleElement(),disable2=()=>document.head.appendChild(style2),enable=()=>{style2.parentNode&&document.head.removeChild(style2)};function executeAction(){action2(),window.requestAnimationFrame(enable)}if(typeof window.
requestAnimationFrame<"u"){disable2(),synchronous?executeAction():window.requestAnimationFrame(()=>{executeAction()});return}disable2(),timeoutAction=window.setTimeout(()=>{action2(),timeoutEnable=window.setTimeout(enable,16)},16)}const themeColors=box(void 0),disableTransitions=box(!0),synchronousModeChanges=box(!1),darkClassNames=box([]),lightClassNames=box([]);function createDerivedMode(){const current2=user_derived(()=>{if(!isBrowser$1)return;const derivedMode2=userPrefersMode.current==="sys\
tem"?systemPrefersMode.current:userPrefersMode.current,sanitizedDarkClassNames=sanitizeClassNames(darkClassNames.current),sanitizedLightClassNames=sanitizeClassNames(lightClassNames.current);function update2(){const htmlEl=document.documentElement,themeColorEl=document.querySelector('meta[name="theme-color"]');derivedMode2==="light"?(sanitizedDarkClassNames.length&&htmlEl.classList.remove(...sanitizedDarkClassNames),sanitizedLightClassNames.length&&htmlEl.classList.add(...sanitizedLightClassNames),
htmlEl.style.colorScheme="light",themeColorEl&&themeColors.current&&themeColorEl.setAttribute("content",themeColors.current.light)):(sanitizedLightClassNames.length&&htmlEl.classList.remove(...sanitizedLightClassNames),sanitizedDarkClassNames.length&&htmlEl.classList.add(...sanitizedDarkClassNames),htmlEl.style.colorScheme="dark",themeColorEl&&themeColors.current&&themeColorEl.setAttribute("content",themeColors.current.dark))}return disableTransitions.current?withoutTransition(update2,synchronousModeChanges.
current):update2(),derivedMode2});return{get current(){return get$3(current2)}}}function createDerivedTheme(){const current2=user_derived(()=>{if(customTheme.current,!isBrowser$1)return;function update2(){document.documentElement.setAttribute("data-theme",customTheme.current)}return disableTransitions.current?withoutTransition(update2,untrack$1(()=>synchronousModeChanges.current)):update2(),customTheme.current});return{get current(){return get$3(current2)}}}const derivedMode=createDerivedMode(),
derivedTheme=createDerivedTheme();function setMode(mode){userPrefersMode.current=mode}function setTheme(newTheme){customTheme.current=newTheme}function setInitialMode({defaultMode="system",themeColors:themeColors2,darkClassNames:darkClassNames2=["dark"],lightClassNames:lightClassNames2=[],defaultTheme="",modeStorageKey:modeStorageKey2="mode-watcher-mode",themeStorageKey:themeStorageKey2="mode-watcher-theme"}){const rootEl=document.documentElement,mode=localStorage.getItem(modeStorageKey2)??defaultMode,theme=localStorage.getItem(themeStorageKey2)??defaultTheme,light=mode==="light"||mode==="system"&&window.matchMedia("(prefers-color-sche\
me: light)").matches;if(light?(darkClassNames2.length&&rootEl.classList.remove(...darkClassNames2.filter(Boolean)),lightClassNames2.length&&rootEl.classList.add(...lightClassNames2.filter(Boolean))):(lightClassNames2.length&&rootEl.classList.remove(...lightClassNames2.filter(Boolean)),darkClassNames2.length&&rootEl.classList.add(...darkClassNames2.filter(Boolean))),rootEl.style.colorScheme=light?"light":"dark",themeColors2){const themeMetaEl=document.querySelector('meta[name="theme-color"]');themeMetaEl&&
themeMetaEl.setAttribute("content",mode==="light"?themeColors2.light:themeColors2.dark)}theme&&(rootEl.setAttribute("data-theme",theme),localStorage.setItem(themeStorageKey2,theme)),localStorage.setItem(modeStorageKey2,mode)}var root_1$18=from_html('<meta name="theme-color"/>');function Mode_watcher_lite($$anchor,$$props){push$1($$props,!0);var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{var meta=root_1$18();template_effect(()=>set_attribute(meta,"content",$$props.
themeColors.dark)),append($$anchor2,meta)};if_block(node2,$$render=>{$$props.themeColors&&$$render(consequent)})}append($$anchor,fragment),pop()}var root_2$1f=from_html('<meta name="theme-color"/>'),root_1$17=from_html("<!> <!>",1);function Mode_watcher_full($$anchor,$$props){push$1($$props,!0);let trueNonce=prop($$props,"trueNonce",3,"");head$1("1funsus",$$anchor2=>{var fragment=root_1$17(),node2=first_child(fragment);{var consequent=$$anchor3=>{var meta=root_2$1f();template_effect(()=>set_attribute(
meta,"content",$$props.themeColors.dark)),append($$anchor3,meta)};if_block(node2,$$render=>{$$props.themeColors&&$$render(consequent)})}var node_1=sibling(node2,2);html$6(node_1,()=>`<script${trueNonce()?` nonce=${trueNonce()}`:""}>(`+setInitialMode.toString()+")("+JSON.stringify($$props.initConfig)+");<\/script>"),append($$anchor2,fragment)}),pop()}function Mode_watcher($$anchor,$$props){push$1($$props,!0);let track2=prop($$props,"track",3,!0),defaultMode=prop($$props,"defaultMode",3,"system"),
disableTransitionsProp=prop($$props,"disableTransitions",3,!0),darkClassNamesProp=prop($$props,"darkClassNames",19,()=>["dark"]),lightClassNamesProp=prop($$props,"lightClassNames",19,()=>[]),defaultTheme=prop($$props,"defaultTheme",3,""),nonce=prop($$props,"nonce",3,""),themeStorageKeyProp=prop($$props,"themeStorageKey",3,"mode-watcher-theme"),modeStorageKeyProp=prop($$props,"modeStorageKey",3,"mode-watcher-mode"),disableHeadScriptInjection=prop($$props,"disableHeadScriptInjection",3,!1),synchronousModeChangesProp=prop(
$$props,"synchronousModeChanges",3,!1);modeStorageKey.current=modeStorageKeyProp(),themeStorageKey.current=themeStorageKeyProp(),darkClassNames.current=darkClassNamesProp(),lightClassNames.current=lightClassNamesProp(),disableTransitions.current=disableTransitionsProp(),themeColors.current=$$props.themeColors,synchronousModeChanges.current=synchronousModeChangesProp(),user_pre_effect(()=>{synchronousModeChanges.current=synchronousModeChangesProp()}),user_pre_effect(()=>{disableTransitions.current=
disableTransitionsProp()}),user_pre_effect(()=>{themeColors.current=$$props.themeColors}),user_pre_effect(()=>{darkClassNames.current=darkClassNamesProp()}),user_pre_effect(()=>{lightClassNames.current=lightClassNamesProp()}),user_pre_effect(()=>{modeStorageKey.current=modeStorageKeyProp()}),user_pre_effect(()=>{themeStorageKey.current=themeStorageKeyProp()}),user_pre_effect(()=>{derivedMode.current,modeStorageKey.current,themeStorageKey.current,derivedTheme.current}),onMount$1(()=>{systemPrefersMode.
tracking(track2()),systemPrefersMode.query();const localStorageMode=localStorage.getItem(modeStorageKey.current);setMode(isValidMode(localStorageMode)?localStorageMode:defaultMode());const localStorageTheme=localStorage.getItem(themeStorageKey.current);setTheme(localStorageTheme||defaultTheme())});const initConfig={defaultMode:defaultMode(),themeColors:$$props.themeColors,darkClassNames:darkClassNamesProp(),lightClassNames:lightClassNamesProp(),defaultTheme:defaultTheme(),modeStorageKey:modeStorageKeyProp(),
themeStorageKey:themeStorageKeyProp()},trueNonce=user_derived(()=>typeof window>"u"?nonce():"");var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{Mode_watcher_lite($$anchor2,{get themeColors(){return themeColors.current}})},alternate=$$anchor2=>{Mode_watcher_full($$anchor2,{get trueNonce(){return get$3(trueNonce)},get initConfig(){return initConfig},get themeColors(){return themeColors.current}})};if_block(node2,$$render=>{disableHeadScriptInjection()?$$render(consequent):
$$render(alternate,-1)})}append($$anchor,fragment),pop()}const ATTACHMENT_SAVED_REGEX=/\[Attachment saved: ([^\]]+)\]/,NEWLINE_SEPARATOR=`
`,LLM_ERROR_BLOCK_START=`

\`\`\`
Upstream LLM error:
`,LLM_ERROR_BLOCK_END="\n```\n",DEFAULT_AGENTIC_CONFIG={enabled:!0,maxTurns:100,maxToolPreviewLines:25},REASONING_TAGS={START:"<think>",END:"</think>"},LEGACY_REASONING_TAGS={START:"<<<reasoning_content_start>>>"},LEGACY_AGENTIC_REGEX={COMPLETED_TOOL_CALL:/<<<AGENTIC_TOOL_CALL_START>>>\n<<<TOOL_NAME:(.+?)>>>\n<<<TOOL_ARGS_START>>>([\s\S]*?)<<<TOOL_ARGS_END>>>([\s\S]*?)<<<AGENTIC_TOOL_CALL_END>>>/g,REASONING_BLOCK:/<<<reasoning_content_start>>>[\s\S]*?<<<reasoning_content_end>>>/g,REASONING_EXTRACT:/<<<reasoning_content_start>>>([\s\S]*?)<<<reasoning_content_end>>>/,
REASONING_OPEN:/<<<reasoning_content_start>>>[\s\S]*$/,AGENTIC_TOOL_CALL_OPEN:/\n*<<<AGENTIC_TOOL_CALL_START>>>[\s\S]*$/,HAS_LEGACY_MARKERS:/<<<(?:AGENTIC_TOOL_CALL_START|reasoning_content_start)>>>/},API_MODELS={LIST:"/v1/models",LOAD:"/models/load",UNLOAD:"/models/unload"},API_TOOLS={LIST:"/tools",EXECUTE:"/tools"},CORS_PROXY_ENDPOINT="/cors-proxy",ATTACHMENT_LABEL_PDF_FILE="PDF File",ATTACHMENT_LABEL_MCP_PROMPT="MCP Prompt",ATTACHMENT_LABEL_MCP_RESOURCE="MCP Resource",FILE_TYPE_ICONS={[FileTypeCategory.
IMAGE]:Image$1,[FileTypeCategory.AUDIO]:Mic,[FileTypeCategory.TEXT]:File_text,[FileTypeCategory.PDF]:File$1},ATTACHMENT_FILE_ITEMS=[{id:AttachmentMenuItemId.IMAGES,label:"Images",icon:FILE_TYPE_ICONS.image,class:"images-button",enabledWhen:AttachmentItemEnabledWhen.HAS_VISION_MODALITY,disabledTooltip:"Image processing requires a vision model",action:AttachmentAction.FILE_UPLOAD},{id:AttachmentMenuItemId.AUDIO,label:"Audio Files",icon:FILE_TYPE_ICONS.audio,class:"audio-button",enabledWhen:AttachmentItemEnabledWhen.
HAS_AUDIO_MODALITY,disabledTooltip:"Audio files processing requires an audio model",action:AttachmentAction.FILE_UPLOAD},{id:AttachmentMenuItemId.TEXT,label:"Text Files",icon:FILE_TYPE_ICONS.text,enabledWhen:AttachmentItemEnabledWhen.ALWAYS,action:AttachmentAction.FILE_UPLOAD},{id:AttachmentMenuItemId.PDF,label:"PDF Files",icon:FILE_TYPE_ICONS.pdf,enabledWhen:AttachmentItemEnabledWhen.ALWAYS,disabledTooltip:"PDFs will be converted to text. Image-based PDFs may not work properly.",hasEnabledTooltip:!0,
action:AttachmentAction.FILE_UPLOAD}],ATTACHMENT_EXTRA_ITEMS=[{id:AttachmentMenuItemId.SYSTEM_MESSAGE,label:"System Message",icon:Message_square,enabledWhen:AttachmentItemEnabledWhen.ALWAYS,hasEnabledTooltip:!0,action:AttachmentAction.SYSTEM_PROMPT_CLICK}],ATTACHMENT_MCP_ITEMS=[{id:AttachmentMenuItemId.MCP_PROMPT,label:"MCP Prompt",icon:Zap,enabledWhen:AttachmentItemEnabledWhen.ALWAYS,action:AttachmentAction.MCP_PROMPT_CLICK,visibleWhen:AttachmentItemVisibleWhen.HAS_MCP_PROMPTS_SUPPORT},{id:AttachmentMenuItemId.
MCP_RESOURCES,label:"MCP Resources",icon:Folder_open,enabledWhen:AttachmentItemEnabledWhen.ALWAYS,action:AttachmentAction.MCP_RESOURCES_CLICK,visibleWhen:AttachmentItemVisibleWhen.HAS_MCP_RESOURCES_SUPPORT}],ATTACHMENT_TOOLTIP_TEXT="Add files, prompts, tools or MCP Servers",AUTO_SCROLL_INTERVAL=100,AUTO_SCROLL_AT_BOTTOM_THRESHOLD=10,DEFAULT_BINARY_DETECTION_OPTIONS={prefixLength:1024*10,suspiciousCharThresholdRatio:.15,maxAbsoluteNullBytes:2},DEFAULT_CACHE_TTL_MS=300*1e3,DEFAULT_CACHE_MAX_ENTRIES=100,
MODEL_PROPS_CACHE_TTL_MS=600*1e3,MODEL_PROPS_CACHE_MAX_ENTRIES=50,MCP_RESOURCE_CACHE_MAX_ENTRIES=50,MCP_RESOURCE_CACHE_TTL_MS=300*1e3,MAX_INACTIVE_CONVERSATION_STATES=10,INACTIVE_CONVERSATION_STATE_MAX_AGE_MS=1800*1e3,INITIAL_FILE_SIZE=0,PROMPT_CONTENT_SEPARATOR=`

`,CLIPBOARD_CONTENT_QUOTE_PREFIX='"',PROMPT_TRIGGER_PREFIX="/",RESOURCE_TRIGGER_PREFIX="@",NEW_CHAT_DRAFT_KEY="__new_chat__",CODE_BLOCK_SCROLL_CONTAINER_CLASS="code-block-scroll-container",CODE_BLOCK_WRAPPER_CLASS="code-block-wrapper",CODE_BLOCK_HEADER_CLASS="code-block-header",CODE_BLOCK_ACTIONS_CLASS="code-block-actions",CODE_LANGUAGE_CLASS="code-language",COPY_CODE_BTN_CLASS="copy-code-btn",PREVIEW_CODE_BTN_CLASS="preview-code-btn",RELATIVE_CLASS="relative",NEWLINE=`
`,DEFAULT_LANGUAGE="text",LANG_PATTERN=/^(\w*)\n?/,AMPERSAND_REGEX=/&/g,LT_REGEX=/</g,GT_REGEX=/>/g,FENCE_PATTERN=/^```|\n```/g,CONTEXT_KEY_MESSAGE_EDIT="chat-message-edit",CONTEXT_KEY_CHAT_ACTIONS="chat-actions",CONTEXT_KEY_CHAT_SETTINGS_CONFIG="chat-settings-config",CONTEXT_KEY_PROCESSING_INFO="processing-info",BOX_BORDER="border border-border/30 focus-within:border-border  dark:border-border/20 dark:focus-within:border-border",INPUT_CLASSES=`
    bg-muted/60 dark:bg-muted/75
    ${BOX_BORDER}
    shadow-sm
    outline-none
    text-foreground
`,PANEL_CLASSES=`
    bg-background
    border border-border/30 dark:border-border/20
    shadow-sm backdrop-blur-lg!
    rounded-t-lg!
`,CHAT_FORM_POPOVER_MAX_HEIGHT="max-h-80",MS_PER_SECOND=1e3,SECONDS_PER_MINUTE=60,SECONDS_PER_HOUR=3600,SHORT_DURATION_THRESHOLD=1,MEDIUM_DURATION_THRESHOLD=10,DEFAULT_PERFORMANCE_TIME="0s",KEY_VALUE_PAIR_KEY_MAX_LENGTH=256,KEY_VALUE_PAIR_VALUE_MAX_LENGTH=8192,KEY_VALUE_PAIR_UNSAFE_KEY_RE=/[\x00-\x1F\x7F]/g,KEY_VALUE_PAIR_UNSAFE_VALUE_RE=/[\x00-\x08\x0A-\x0D\x0E-\x1F\x7F]/g,CODE_BLOCK_REGEXP=/(```[\s\S]*?```|`[^`\n]+`)/g,LATEX_MATH_AND_CODE_PATTERN=new RegExp("(```[\\S\\s]*?```|`.*?`)|(?<!\\\\)\\\\\\[(\
[\\S\\s]*?[^\\\\])\\\\]|(?<!\\\\)\\\\\\((.*?)\\\\\\)","g"),LATEX_LINEBREAK_REGEXP=/\$\$([\s\S]*?\\\\[\s\S]*?)\$\$/,LINE_BREAK=/\r?\n/,PHRASE_PARENTS=new Set(["paragraph","heading","emphasis","strong","delete","link","linkReference","tableCell"]),NBSP=" ",TAB_AS_SPACES=NBSP.repeat(4),ALWAYS_ALLOWED_TOOLS_LOCALSTORAGE_KEY="LlamaCppWebui.alwaysAllowedTools",CONFIG_LOCALSTORAGE_KEY="LlamaCppWebui.config",DISABLED_TOOLS_LOCALSTORAGE_KEY="LlamaCppWebui.disabledTools",FAVORITE_MODELS_LOCALSTORAGE_KEY="\
LlamaCppWebui.favoriteModels",MCP_DEFAULT_ENABLED_LOCALSTORAGE_KEY="LlamaCppWebui.mcpDefaultEnabled",USER_OVERRIDES_LOCALSTORAGE_KEY="LlamaCppWebui.userOverrides",IMAGE_NOT_ERROR_BOUND_SELECTOR="img:not([data-error-bound])",DATA_ERROR_BOUND_ATTR="errorBound",DATA_ERROR_HANDLED_ATTR="errorHandled",BOOL_TRUE_STRING="true",DEFAULT_CLIENT_VERSION="1.0.0",DEFAULT_IMAGE_MIME_TYPE=MimeTypeImage.PNG,MCP_ALLOWED_ICON_MIME_TYPES=new Set([MimeTypeImage.PNG,MimeTypeImage.JPEG,MimeTypeImage.JPG,MimeTypeImage.
SVG,MimeTypeImage.WEBP,MimeTypeImage.ICO,MimeTypeImage.ICO_MICROSOFT]),MCP_PROTOCOL_VERSION="2025-06-18",DEFAULT_MCP_CONFIG={protocolVersion:MCP_PROTOCOL_VERSION,capabilities:{tools:{listChanged:!0}},clientInfo:{name:"llama-webui-mcp",version:DEFAULT_CLIENT_VERSION},requestTimeoutSeconds:300,connectionTimeoutMs:1e4},MCP_SERVER_ID_PREFIX="LlamaCpp-WebUI-MCP-Server",MCP_RECONNECT_INITIAL_DELAY=1e3,MCP_RECONNECT_BACKOFF_MULTIPLIER=2,MCP_RECONNECT_MAX_DELAY=3e4,MCP_RECONNECT_ATTEMPT_TIMEOUT_MS=15e3,
EXPECTED_THEMED_ICON_PAIR_COUNT=2,CORS_PROXY_URL_PARAM="url",MCP_SESSION_ID_VISIBLE_CHARS=5,MCP_PARTIAL_REDACT_HEADERS=new Map([["mcp-session-id",MCP_SESSION_ID_VISIBLE_CHARS]]),REDACTED_HEADERS=new Set(["authorization","api-key","cookie","mcp-session-id","proxy-authorization","set-cookie","x-auth-token","x-api-key"]),MCP_TRANSPORT_LABELS={[MCPTransportType.WEBSOCKET]:"WebSocket",[MCPTransportType.STREAMABLE_HTTP]:"HTTP",[MCPTransportType.SSE]:"SSE"},MCP_TRANSPORT_ICONS={[MCPTransportType.WEBSOCKET]:Zap,
[MCPTransportType.STREAMABLE_HTTP]:Globe,[MCPTransportType.SSE]:Radio},MCP_SERVER_URL_PLACEHOLDER="https://mcp.example.com/sse",MIN_AUTOCOMPLETE_INPUT_LENGTH=1,IMAGE_FILE_EXTENSION_REGEX=/\.(png|jpg|jpeg|gif|svg|webp)$/i,CODE_FILE_EXTENSION_REGEX=/\.(js|ts|json|yaml|yml|xml|html|css|py|rs|go|java|cpp|c|h|rb|sh|toml)$/i,TEXT_FILE_EXTENSION_REGEX=/\.(txt|md|log)$/i,PROTOCOL_PREFIX_REGEX=/^[a-z]+:\/\//,FILE_EXTENSION_REGEX=/\.[^.]+$/,DISPLAY_NAME_SEPARATOR_REGEX=/[-_]/,DATA_URI_BASE64_REGEX=/^data:([^;]+);base64,([A-Za-z0-9+/]+=*)$/,
MCP_ATTACHMENT_NAME_PREFIX="mcp-attachment",MCP_RESOURCE_ATTACHMENT_ID_PREFIX="res",DEFAULT_IMAGE_EXTENSION="img",DEFAULT_RESOURCE_FILENAME="resource.txt",PATH_SEPARATOR="/",RESOURCE_TEXT_CONTENT_SEPARATOR=`

`,RESOURCE_UNKNOWN_TYPE="unknown type",BINARY_CONTENT_LABEL="Binary content",IMAGE_MIME_TO_EXTENSION={[MimeTypeImage.JPEG]:"jpg",[MimeTypeImage.JPG]:"jpg",[MimeTypeImage.PNG]:"png",[MimeTypeImage.GIF]:"gif",[MimeTypeImage.WEBP]:"webp"},EXPORT_CONV_ID_TRIM_LENGTH=8,EXPORT_CONV_NAME_SUFFIX_MAX_LENGTH=20,ISO_TIMESTAMP_SLICE_LENGTH=19,NON_ALPHANUMERIC_REGEX=/[^a-z0-9]/gi,EXPORT_CONV_NONALNUM_REPLACEMENT="_",MULTIPLE_UNDERSCORE_REGEX=/_+/g,ISO_DATE_TIME_SEPARATOR="T",ISO_DATE_TIME_SEPARATOR_REPLACEMENT="\
_",ISO_TIME_SEPARATOR=":",ISO_TIME_SEPARATOR_REPLACEMENT="-",MODEL_ID_NOT_FOUND=-1,MODEL_ID_ORG_SEPARATOR="/",MODEL_ID_SEGMENT_SEPARATOR="-",MODEL_ID_QUANTIZATION_SEPARATOR=":",MODEL_QUANTIZATION_SEGMENT_RE=/^(I?Q\d+(_[A-Z0-9]+)*|F\d+|BF\d+|MXFP\d+(_[A-Z0-9]+)*)$/i,MODEL_CUSTOM_QUANTIZATION_PREFIX_RE=/^UD$/i,MODEL_PARAMS_RE=/^\d+(\.\d+)?[BbMmKkTt]$/,MODEL_ACTIVATED_PARAMS_RE=/^[Aa]\d+(\.\d+)?[BbMmKkTt]$/,MODEL_IGNORED_SEGMENTS=new Set(["GGUF","GGML"]),PRECISION_MULTIPLIER=1e6,PROCESSING_INFO_TIMEOUT=2e3,
STATS_UNITS={TOKENS_PER_SECOND:"t/s"},NEW_CHAT_PARAM="new_chat",SETTINGS_SECTION_SLUGS={GENERAL:"general",DISPLAY:"display",SAMPLING:"sampling",PENALTIES:"penalties",AGENTIC:"agentic",DEVELOPER:"developer",TOOLS:"tools",IMPORT_EXPORT:"import-export"},ROUTES={START:"#/",NEW_CHAT:`?${NEW_CHAT_PARAM}=true#/`,CHAT:"#/chat",MCP_SERVERS:"#/mcp-servers",SETTINGS:"#/settings"},SETTINGS_KEYS={THEME:"theme",API_KEY:"apiKey",SYSTEM_MESSAGE:"systemMessage",PASTE_LONG_TEXT_TO_FILE_LEN:"pasteLongTextToFileLen",
COPY_TEXT_ATTACHMENTS_AS_PLAIN_TEXT:"copyTextAttachmentsAsPlainText",SEND_ON_ENTER:"sendOnEnter",ENABLE_CONTINUE_GENERATION:"enableContinueGeneration",PDF_AS_IMAGE:"pdfAsImage",ASK_FOR_TITLE_CONFIRMATION:"askForTitleConfirmation",TITLE_GENERATION_USE_FIRST_LINE:"titleGenerationUseFirstLine",TITLE_GENERATION_USE_LLM:"titleGenerationUseLLM",TITLE_GENERATION_PROMPT:"titleGenerationPrompt",SHOW_MESSAGE_STATS:"showMessageStats",SHOW_THOUGHT_IN_PROGRESS:"showThoughtInProgress",KEEP_STATS_VISIBLE:"keep\
StatsVisible",AUTO_MIC_ON_EMPTY:"autoMicOnEmpty",RENDER_USER_CONTENT_AS_MARKDOWN:"renderUserContentAsMarkdown",DISABLE_AUTO_SCROLL:"disableAutoScroll",ALWAYS_SHOW_SIDEBAR_ON_DESKTOP:"alwaysShowSidebarOnDesktop",FULL_HEIGHT_CODE_BLOCKS:"fullHeightCodeBlocks",SHOW_RAW_MODEL_NAMES:"showRawModelNames",SHOW_SYSTEM_MESSAGE:"showSystemMessage",TEMPERATURE:"temperature",DYNATEMP_RANGE:"dynatemp_range",DYNATEMP_EXPONENT:"dynatemp_exponent",TOP_K:"top_k",TOP_P:"top_p",MIN_P:"min_p",XTC_PROBABILITY:"xtc_pr\
obability",XTC_THRESHOLD:"xtc_threshold",TYP_P:"typ_p",MAX_TOKENS:"max_tokens",SAMPLERS:"samplers",BACKEND_SAMPLING:"backend_sampling",REPEAT_LAST_N:"repeat_last_n",REPEAT_PENALTY:"repeat_penalty",PRESENCE_PENALTY:"presence_penalty",FREQUENCY_PENALTY:"frequency_penalty",DRY_MULTIPLIER:"dry_multiplier",DRY_BASE:"dry_base",DRY_ALLOWED_LENGTH:"dry_allowed_length",DRY_PENALTY_LAST_N:"dry_penalty_last_n",MCP_SERVERS:"mcpServers",AGENTIC_MAX_TURNS:"agenticMaxTurns",ALWAYS_SHOW_AGENTIC_TURNS:"alwaysSho\
wAgenticTurns",AGENTIC_MAX_TOOL_PREVIEW_LINES:"agenticMaxToolPreviewLines",SHOW_TOOL_CALL_IN_PROGRESS:"showToolCallInProgress",PRE_ENCODE_CONVERSATION:"preEncodeConversation",DISABLE_REASONING_PARSING:"disableReasoningParsing",EXCLUDE_REASONING_FROM_CONTEXT:"excludeReasoningFromContext",SHOW_RAW_OUTPUT_SWITCH:"showRawOutputSwitch",CUSTOM:"custom"},TITLE_GENERATION={MIN_LENGTH:3,FALLBACK:"New Chat",DEFAULT_PROMPT:`Based on the following interaction, generate a short, concise title (maximum 6-8 wo\
rds) that captures the main topic. Return ONLY the title text, nothing else. Do not use quotes.

User: {{USER}}

Assistant: {{ASSISTANT}}

Title:`,PREFIX_PATTERN:/^(Title:|Subject:|Topic:)\s*/i,QUOTE_PATTERN:/^["]|["]$/g},SETTINGS_SECTION_TITLES={GENERAL:"General",DISPLAY:"Display",SAMPLING:"Sampling",PENALTIES:"Penalties",AGENTIC:"Agentic",TOOLS:"Tools",IMPORT_EXPORT:"Import/Export",DEVELOPER:"Developer"},STANDALONE_SECTIONS=[{title:SETTINGS_SECTION_TITLES.TOOLS,slug:SETTINGS_SECTION_SLUGS.TOOLS,icon:Pencil_ruler},{title:SETTINGS_SECTION_TITLES.IMPORT_EXPORT,slug:SETTINGS_SECTION_SLUGS.IMPORT_EXPORT,icon:Database}],COLOR_MODE_OPTIONS=[
{value:ColorMode.SYSTEM,label:"System",icon:Monitor},{value:ColorMode.LIGHT,label:"Light",icon:Sun},{value:ColorMode.DARK,label:"Dark",icon:Moon}],SETTINGS_REGISTRY={[SETTINGS_SECTION_SLUGS.GENERAL]:{title:SETTINGS_SECTION_TITLES.GENERAL,slug:SETTINGS_SECTION_SLUGS.GENERAL,icon:Sliders_vertical,settings:[{key:SETTINGS_KEYS.THEME,label:"Theme",help:"Choose the color theme for the interface. You can choose between System (follows your device settings), Light, or Dark.",defaultValue:ColorMode.SYSTEM,
type:SettingsFieldType.SELECT,section:SETTINGS_SECTION_SLUGS.GENERAL,options:COLOR_MODE_OPTIONS,sync:{serverKey:SETTINGS_KEYS.THEME,paramType:SyncableParameterType.STRING}},{key:SETTINGS_KEYS.API_KEY,label:"API Key",help:"Set the API Key if you are using <code>--api-key</code> option for the server.",defaultValue:"",type:SettingsFieldType.INPUT,section:SETTINGS_SECTION_SLUGS.GENERAL},{key:SETTINGS_KEYS.SYSTEM_MESSAGE,label:"System Message",help:"The starting message that defines how model should\
 behave.",defaultValue:"",type:SettingsFieldType.TEXTAREA,section:SETTINGS_SECTION_SLUGS.GENERAL,sync:{serverKey:SETTINGS_KEYS.SYSTEM_MESSAGE,paramType:SyncableParameterType.STRING}},{key:SETTINGS_KEYS.PASTE_LONG_TEXT_TO_FILE_LEN,label:"Paste long text to file length",help:"On pasting long text, it will be converted to a file. You can control the file length by setting the value of this parameter. Value 0 means disable.",defaultValue:2500,type:SettingsFieldType.INPUT,section:SETTINGS_SECTION_SLUGS.
GENERAL,sync:{serverKey:SETTINGS_KEYS.PASTE_LONG_TEXT_TO_FILE_LEN,paramType:SyncableParameterType.NUMBER}},{key:SETTINGS_KEYS.SEND_ON_ENTER,label:"Send message on Enter",help:"Use Enter to send messages and Shift + Enter for new lines. When disabled, use Ctrl/Cmd + Enter.",defaultValue:!0,type:SettingsFieldType.CHECKBOX,section:SETTINGS_SECTION_SLUGS.GENERAL,sync:{serverKey:SETTINGS_KEYS.SEND_ON_ENTER,paramType:SyncableParameterType.BOOLEAN}},{key:SETTINGS_KEYS.COPY_TEXT_ATTACHMENTS_AS_PLAIN_TEXT,
label:"Copy text attachments as plain text",help:"When copying a message with text attachments, combine them into a single plain text string instead of a special format that can be pasted back as attachments.",defaultValue:!1,type:SettingsFieldType.CHECKBOX,section:SETTINGS_SECTION_SLUGS.GENERAL,sync:{serverKey:SETTINGS_KEYS.COPY_TEXT_ATTACHMENTS_AS_PLAIN_TEXT,paramType:SyncableParameterType.BOOLEAN}},{key:SETTINGS_KEYS.ENABLE_CONTINUE_GENERATION,label:'Enable "Continue" button',help:'Enable "Co\
ntinue" button for assistant messages. Currently works only with non-reasoning models.',defaultValue:!1,type:SettingsFieldType.CHECKBOX,section:SETTINGS_SECTION_SLUGS.GENERAL,isExperimental:!0,sync:{serverKey:SETTINGS_KEYS.ENABLE_CONTINUE_GENERATION,paramType:SyncableParameterType.BOOLEAN}},{key:SETTINGS_KEYS.PDF_AS_IMAGE,label:"Parse PDF as image",help:"Parse PDF as image instead of text. Automatically falls back to text processing for non-vision models.",defaultValue:!1,type:SettingsFieldType.
CHECKBOX,section:SETTINGS_SECTION_SLUGS.GENERAL,sync:{serverKey:SETTINGS_KEYS.PDF_AS_IMAGE,paramType:SyncableParameterType.BOOLEAN}},{key:SETTINGS_KEYS.ASK_FOR_TITLE_CONFIRMATION,label:"Ask for confirmation before changing conversation title",help:"Ask for confirmation before automatically changing conversation title when editing the first message.",defaultValue:!1,type:SettingsFieldType.CHECKBOX,section:SETTINGS_SECTION_SLUGS.GENERAL,sync:{serverKey:SETTINGS_KEYS.ASK_FOR_TITLE_CONFIRMATION,paramType:SyncableParameterType.
BOOLEAN}},{key:SETTINGS_KEYS.TITLE_GENERATION_USE_FIRST_LINE,label:"Use first non-empty line for conversation title",help:"Use only the first non-empty line of the prompt to generate the conversation title.",defaultValue:!1,type:SettingsFieldType.CHECKBOX,section:SETTINGS_SECTION_SLUGS.GENERAL,sync:{serverKey:SETTINGS_KEYS.TITLE_GENERATION_USE_FIRST_LINE,paramType:SyncableParameterType.BOOLEAN}},{key:SETTINGS_KEYS.TITLE_GENERATION_USE_LLM,label:"Use LLM to generate conversation title",help:"Use \
the LLM to automatically generate conversation titles based on the first message exchange.",defaultValue:!1,type:SettingsFieldType.CHECKBOX,section:SETTINGS_SECTION_SLUGS.GENERAL,isExperimental:!0},{key:SETTINGS_KEYS.TITLE_GENERATION_PROMPT,label:"LLM title generation prompt",help:"Optional template for the title generation prompt. Use {{USER}} for the user message and {{ASSISTANT}} for the assistant message.",defaultValue:TITLE_GENERATION.DEFAULT_PROMPT,type:SettingsFieldType.TEXTAREA,section:SETTINGS_SECTION_SLUGS.
GENERAL}]},[SETTINGS_SECTION_SLUGS.DISPLAY]:{title:SETTINGS_SECTION_TITLES.DISPLAY,slug:SETTINGS_SECTION_SLUGS.DISPLAY,icon:Monitor,settings:[{key:SETTINGS_KEYS.SHOW_MESSAGE_STATS,label:"Show message generation statistics",help:"Display generation statistics (tokens/second, token count, duration) below each assistant message.",defaultValue:!0,type:SettingsFieldType.CHECKBOX,section:SETTINGS_SECTION_SLUGS.DISPLAY,sync:{serverKey:SETTINGS_KEYS.SHOW_MESSAGE_STATS,paramType:SyncableParameterType.BOOLEAN}},
{key:SETTINGS_KEYS.SHOW_THOUGHT_IN_PROGRESS,label:"Show thought in progress",help:"Expand thought process by default when generating messages.",defaultValue:!0,type:SettingsFieldType.CHECKBOX,section:SETTINGS_SECTION_SLUGS.DISPLAY,sync:{serverKey:SETTINGS_KEYS.SHOW_THOUGHT_IN_PROGRESS,paramType:SyncableParameterType.BOOLEAN}},{key:SETTINGS_KEYS.SHOW_TOOL_CALL_IN_PROGRESS,label:"Show tool call in progress",help:"Automatically expand tool call details while executing and keep them expanded after c\
ompletion.",defaultValue:!1,type:SettingsFieldType.CHECKBOX,section:SETTINGS_SECTION_SLUGS.DISPLAY,sync:{serverKey:SETTINGS_KEYS.SHOW_TOOL_CALL_IN_PROGRESS,paramType:SyncableParameterType.BOOLEAN}},{key:SETTINGS_KEYS.KEEP_STATS_VISIBLE,label:"Keep stats visible after generation",help:"Keep processing statistics visible after generation finishes.",defaultValue:!1,type:SettingsFieldType.CHECKBOX,section:SETTINGS_SECTION_SLUGS.DISPLAY,sync:{serverKey:SETTINGS_KEYS.KEEP_STATS_VISIBLE,paramType:SyncableParameterType.
BOOLEAN}},{key:SETTINGS_KEYS.AUTO_MIC_ON_EMPTY,label:"Show microphone on empty input",help:"Automatically show microphone button instead of send button when textarea is empty for models with audio modality support.",defaultValue:!1,type:SettingsFieldType.CHECKBOX,section:SETTINGS_SECTION_SLUGS.DISPLAY,isExperimental:!0,sync:{serverKey:SETTINGS_KEYS.AUTO_MIC_ON_EMPTY,paramType:SyncableParameterType.BOOLEAN}},{key:SETTINGS_KEYS.RENDER_USER_CONTENT_AS_MARKDOWN,label:"Render user content as Markdown",
help:"Render user messages using markdown formatting in the chat.",defaultValue:!1,type:SettingsFieldType.CHECKBOX,section:SETTINGS_SECTION_SLUGS.DISPLAY,sync:{serverKey:SETTINGS_KEYS.RENDER_USER_CONTENT_AS_MARKDOWN,paramType:SyncableParameterType.BOOLEAN}},{key:SETTINGS_KEYS.FULL_HEIGHT_CODE_BLOCKS,label:"Use full height code blocks",help:"Always display code blocks at their full natural height, overriding any height limits.",defaultValue:!1,type:SettingsFieldType.CHECKBOX,section:SETTINGS_SECTION_SLUGS.
DISPLAY,sync:{serverKey:SETTINGS_KEYS.FULL_HEIGHT_CODE_BLOCKS,paramType:SyncableParameterType.BOOLEAN}},{key:SETTINGS_KEYS.DISABLE_AUTO_SCROLL,label:"Disable automatic scroll",help:"Disable automatic scrolling while messages stream so you can control the viewport position manually.",defaultValue:!1,type:SettingsFieldType.CHECKBOX,section:SETTINGS_SECTION_SLUGS.DISPLAY,sync:{serverKey:SETTINGS_KEYS.DISABLE_AUTO_SCROLL,paramType:SyncableParameterType.BOOLEAN}},{key:SETTINGS_KEYS.ALWAYS_SHOW_SIDEBAR_ON_DESKTOP,
label:"Always show sidebar on desktop",help:"Always keep the sidebar visible on desktop instead of auto-hiding it.",defaultValue:!1,type:SettingsFieldType.CHECKBOX,section:SETTINGS_SECTION_SLUGS.DISPLAY,sync:{serverKey:SETTINGS_KEYS.ALWAYS_SHOW_SIDEBAR_ON_DESKTOP,paramType:SyncableParameterType.BOOLEAN}},{key:SETTINGS_KEYS.SHOW_RAW_MODEL_NAMES,label:"Show raw model names",help:'Display full raw model identifiers (e.g. "ggml-org/GLM-4.7-Flash-GGUF:Q8_0") instead of parsed names with badges.',defaultValue:!1,
type:SettingsFieldType.CHECKBOX,section:SETTINGS_SECTION_SLUGS.DISPLAY,sync:{serverKey:SETTINGS_KEYS.SHOW_RAW_MODEL_NAMES,paramType:SyncableParameterType.BOOLEAN}},{key:SETTINGS_KEYS.ALWAYS_SHOW_AGENTIC_TURNS,label:"Always show agentic turns in conversation",help:"Always expand and display agentic loop turns in conversation messages.",defaultValue:!1,type:SettingsFieldType.CHECKBOX,section:SETTINGS_SECTION_SLUGS.DISPLAY,sync:{serverKey:SETTINGS_KEYS.ALWAYS_SHOW_AGENTIC_TURNS,paramType:SyncableParameterType.
BOOLEAN}}]},[SETTINGS_SECTION_SLUGS.SAMPLING]:{title:SETTINGS_SECTION_TITLES.SAMPLING,slug:SETTINGS_SECTION_SLUGS.SAMPLING,icon:Funnel,settings:[{key:SETTINGS_KEYS.TEMPERATURE,label:"Temperature",help:"Controls the randomness of the generated text by affecting the probability distribution of the output tokens. Higher = more random, lower = more focused.",defaultValue:void 0,type:SettingsFieldType.INPUT,section:SETTINGS_SECTION_SLUGS.SAMPLING,sync:{serverKey:SETTINGS_KEYS.TEMPERATURE,paramType:SyncableParameterType.
NUMBER}},{key:SETTINGS_KEYS.DYNATEMP_RANGE,label:"Dynamic temperature range",help:"Addon for the temperature sampler. The added value to the range of dynamic temperature, which adjusts probabilities by entropy of tokens.",defaultValue:void 0,type:SettingsFieldType.INPUT,section:SETTINGS_SECTION_SLUGS.SAMPLING,sync:{serverKey:SETTINGS_KEYS.DYNATEMP_RANGE,paramType:SyncableParameterType.NUMBER}},{key:SETTINGS_KEYS.DYNATEMP_EXPONENT,label:"Dynamic temperature exponent",help:"Addon for the temperatu\
re sampler. Smoothes out the probability redistribution based on the most probable token.",defaultValue:void 0,type:SettingsFieldType.INPUT,section:SETTINGS_SECTION_SLUGS.SAMPLING,sync:{serverKey:SETTINGS_KEYS.DYNATEMP_EXPONENT,paramType:SyncableParameterType.NUMBER}},{key:SETTINGS_KEYS.TOP_K,label:"Top K",help:"Keeps only k top tokens.",defaultValue:void 0,type:SettingsFieldType.INPUT,section:SETTINGS_SECTION_SLUGS.SAMPLING,sync:{serverKey:SETTINGS_KEYS.TOP_K,paramType:SyncableParameterType.NUMBER}},
{key:SETTINGS_KEYS.TOP_P,label:"Top P",help:"Limits tokens to those that together have a cumulative probability of at least p",defaultValue:void 0,type:SettingsFieldType.INPUT,section:SETTINGS_SECTION_SLUGS.SAMPLING,sync:{serverKey:SETTINGS_KEYS.TOP_P,paramType:SyncableParameterType.NUMBER}},{key:SETTINGS_KEYS.MIN_P,label:"Min P",help:"Limits tokens based on the minimum probability for a token to be considered, relative to the probability of the most likely token.",defaultValue:void 0,type:SettingsFieldType.
INPUT,section:SETTINGS_SECTION_SLUGS.SAMPLING,sync:{serverKey:SETTINGS_KEYS.MIN_P,paramType:SyncableParameterType.NUMBER}},{key:SETTINGS_KEYS.XTC_PROBABILITY,label:"XTC probability",help:"XTC sampler cuts out top tokens; this parameter controls the chance of cutting tokens at all. 0 disables XTC.",defaultValue:void 0,type:SettingsFieldType.INPUT,section:SETTINGS_SECTION_SLUGS.SAMPLING,sync:{serverKey:SETTINGS_KEYS.XTC_PROBABILITY,paramType:SyncableParameterType.NUMBER}},{key:SETTINGS_KEYS.XTC_THRESHOLD,
label:"XTC threshold",help:"XTC sampler cuts out top tokens; this parameter controls the token probability that is required to cut that token.",defaultValue:void 0,type:SettingsFieldType.INPUT,section:SETTINGS_SECTION_SLUGS.SAMPLING,sync:{serverKey:SETTINGS_KEYS.XTC_THRESHOLD,paramType:SyncableParameterType.NUMBER}},{key:SETTINGS_KEYS.TYP_P,label:"Typical P",help:"Sorts and limits tokens based on the difference between log-probability and entropy.",defaultValue:void 0,type:SettingsFieldType.INPUT,
section:SETTINGS_SECTION_SLUGS.SAMPLING,sync:{serverKey:SETTINGS_KEYS.TYP_P,paramType:SyncableParameterType.NUMBER}},{key:SETTINGS_KEYS.MAX_TOKENS,label:"Max tokens",help:"The maximum number of token per output. Use -1 for infinite (no limit).",defaultValue:void 0,type:SettingsFieldType.INPUT,section:SETTINGS_SECTION_SLUGS.SAMPLING,sync:{serverKey:SETTINGS_KEYS.MAX_TOKENS,paramType:SyncableParameterType.NUMBER}},{key:SETTINGS_KEYS.SAMPLERS,label:"Samplers",help:'The order at which samplers are a\
pplied, in simplified way. Default is "top_k;typ_p;top_p;min_p;temperature": top_k->typ_p->top_p->min_p->temperature',defaultValue:"",type:SettingsFieldType.INPUT,section:SETTINGS_SECTION_SLUGS.SAMPLING,sync:{serverKey:SETTINGS_KEYS.SAMPLERS,paramType:SyncableParameterType.STRING}},{key:SETTINGS_KEYS.BACKEND_SAMPLING,label:"Backend sampling",help:"Enable backend-based samplers. When enabled, supported samplers run on the accelerator backend for faster sampling.",defaultValue:!1,type:SettingsFieldType.
CHECKBOX,section:SETTINGS_SECTION_SLUGS.SAMPLING,sync:{serverKey:SETTINGS_KEYS.BACKEND_SAMPLING,paramType:SyncableParameterType.BOOLEAN}}]},[SETTINGS_SECTION_SLUGS.PENALTIES]:{title:SETTINGS_SECTION_TITLES.PENALTIES,slug:SETTINGS_SECTION_SLUGS.PENALTIES,icon:Triangle_alert,settings:[{key:SETTINGS_KEYS.REPEAT_LAST_N,label:"Repeat last N",help:"Last n tokens to consider for penalizing repetition",defaultValue:void 0,type:SettingsFieldType.INPUT,section:SETTINGS_SECTION_SLUGS.PENALTIES,sync:{serverKey:SETTINGS_KEYS.
REPEAT_LAST_N,paramType:SyncableParameterType.NUMBER}},{key:SETTINGS_KEYS.REPEAT_PENALTY,label:"Repeat penalty",help:"Controls the repetition of token sequences in the generated text",defaultValue:void 0,type:SettingsFieldType.INPUT,section:SETTINGS_SECTION_SLUGS.PENALTIES,sync:{serverKey:SETTINGS_KEYS.REPEAT_PENALTY,paramType:SyncableParameterType.NUMBER}},{key:SETTINGS_KEYS.PRESENCE_PENALTY,label:"Presence penalty",help:"Limits tokens based on whether they appear in the output or not.",defaultValue:void 0,
type:SettingsFieldType.INPUT,section:SETTINGS_SECTION_SLUGS.PENALTIES,sync:{serverKey:SETTINGS_KEYS.PRESENCE_PENALTY,paramType:SyncableParameterType.NUMBER}},{key:SETTINGS_KEYS.FREQUENCY_PENALTY,label:"Frequency penalty",help:"Limits tokens based on how often they appear in the output.",defaultValue:void 0,type:SettingsFieldType.INPUT,section:SETTINGS_SECTION_SLUGS.PENALTIES,sync:{serverKey:SETTINGS_KEYS.FREQUENCY_PENALTY,paramType:SyncableParameterType.NUMBER}},{key:SETTINGS_KEYS.DRY_MULTIPLIER,
label:"DRY multiplier",help:"DRY sampling reduces repetition in generated text even across long contexts. This parameter sets the DRY sampling multiplier.",defaultValue:void 0,type:SettingsFieldType.INPUT,section:SETTINGS_SECTION_SLUGS.PENALTIES,sync:{serverKey:SETTINGS_KEYS.DRY_MULTIPLIER,paramType:SyncableParameterType.NUMBER}},{key:SETTINGS_KEYS.DRY_BASE,label:"DRY base",help:"DRY sampling reduces repetition in generated text even across long contexts. This parameter sets the DRY sampling bas\
e value.",defaultValue:void 0,type:SettingsFieldType.INPUT,section:SETTINGS_SECTION_SLUGS.PENALTIES,sync:{serverKey:SETTINGS_KEYS.DRY_BASE,paramType:SyncableParameterType.NUMBER}},{key:SETTINGS_KEYS.DRY_ALLOWED_LENGTH,label:"DRY allowed length",help:"DRY sampling reduces repetition in generated text even across long contexts. This parameter sets the allowed length for DRY sampling.",defaultValue:void 0,type:SettingsFieldType.INPUT,section:SETTINGS_SECTION_SLUGS.PENALTIES,sync:{serverKey:SETTINGS_KEYS.
DRY_ALLOWED_LENGTH,paramType:SyncableParameterType.NUMBER}},{key:SETTINGS_KEYS.DRY_PENALTY_LAST_N,label:"DRY penalty last N",help:"DRY sampling reduces repetition in generated text even across long contexts. This parameter sets DRY penalty for the last n tokens.",defaultValue:void 0,type:SettingsFieldType.INPUT,section:SETTINGS_SECTION_SLUGS.PENALTIES,sync:{serverKey:SETTINGS_KEYS.DRY_PENALTY_LAST_N,paramType:SyncableParameterType.NUMBER}}]},[SETTINGS_SECTION_SLUGS.AGENTIC]:{title:SETTINGS_SECTION_TITLES.
AGENTIC,slug:SETTINGS_SECTION_SLUGS.AGENTIC,icon:List_restart,settings:[{key:SETTINGS_KEYS.AGENTIC_MAX_TURNS,label:"Agentic turns",help:"Maximum number of tool execution cycles before stopping (prevents infinite loops).",defaultValue:10,type:SettingsFieldType.INPUT,section:SETTINGS_SECTION_SLUGS.AGENTIC,isPositiveInteger:!0,sync:{serverKey:SETTINGS_KEYS.AGENTIC_MAX_TURNS,paramType:SyncableParameterType.NUMBER}},{key:SETTINGS_KEYS.AGENTIC_MAX_TOOL_PREVIEW_LINES,label:"Max lines per tool preview",
help:"Number of lines shown in tool output previews (last N lines). Only these previews and the final LLM response persist after the agentic loop completes.",defaultValue:25,type:SettingsFieldType.INPUT,section:SETTINGS_SECTION_SLUGS.AGENTIC,isPositiveInteger:!0,sync:{serverKey:SETTINGS_KEYS.AGENTIC_MAX_TOOL_PREVIEW_LINES,paramType:SyncableParameterType.NUMBER}}]},[SETTINGS_SECTION_SLUGS.DEVELOPER]:{title:SETTINGS_SECTION_TITLES.DEVELOPER,slug:SETTINGS_SECTION_SLUGS.DEVELOPER,icon:Code,settings:[
{key:SETTINGS_KEYS.PRE_ENCODE_CONVERSATION,label:"Pre-fill KV cache after response",help:"After each response, re-submit the conversation to pre-fill the server KV cache. Makes the next turn faster since the prompt is already encoded while you read the response.",defaultValue:!1,type:SettingsFieldType.CHECKBOX,section:SETTINGS_SECTION_SLUGS.DEVELOPER},{key:SETTINGS_KEYS.DISABLE_REASONING_PARSING,label:"Disable reasoning content parsing",help:"Send reasoning_format=none so the server returns thin\
king tokens inline instead of extracting them into a separate field.",defaultValue:!1,type:SettingsFieldType.CHECKBOX,section:SETTINGS_SECTION_SLUGS.DEVELOPER},{key:SETTINGS_KEYS.EXCLUDE_REASONING_FROM_CONTEXT,label:"Exclude reasoning from context",help:"Strip thinking from previous messages before sending. When off, thinking is sent back via the reasoning_content field so the model sees its own chain-of-thought across turns.",defaultValue:!1,type:SettingsFieldType.CHECKBOX,section:SETTINGS_SECTION_SLUGS.
DEVELOPER,sync:{serverKey:SETTINGS_KEYS.EXCLUDE_REASONING_FROM_CONTEXT,paramType:SyncableParameterType.BOOLEAN}},{key:SETTINGS_KEYS.SHOW_RAW_OUTPUT_SWITCH,label:"Enable raw output toggle",help:"Show toggle button to display messages as plain text instead of Markdown-formatted content",defaultValue:!1,type:SettingsFieldType.CHECKBOX,section:SETTINGS_SECTION_SLUGS.DEVELOPER,sync:{serverKey:SETTINGS_KEYS.SHOW_RAW_OUTPUT_SWITCH,paramType:SyncableParameterType.BOOLEAN}},{key:SETTINGS_KEYS.CUSTOM,label:"\
Custom JSON",help:"Custom JSON parameters to send to the API. Must be valid JSON format.",defaultValue:"",type:SettingsFieldType.TEXTAREA,section:SETTINGS_SECTION_SLUGS.DEVELOPER}]}},NON_UI_SETTINGS=[{key:SETTINGS_KEYS.SHOW_SYSTEM_MESSAGE,label:"Show system message",help:"Display the system message at the top of each conversation.",defaultValue:!0,type:SettingsFieldType.CHECKBOX,sync:{serverKey:SETTINGS_KEYS.SHOW_SYSTEM_MESSAGE,paramType:SyncableParameterType.BOOLEAN}},{key:SETTINGS_KEYS.MCP_SERVERS,
label:"MCP servers",help:"Configure MCP servers as a JSON list. Use the form in the MCP Client settings section to edit.",defaultValue:"[]",type:SettingsFieldType.INPUT,sync:{serverKey:SETTINGS_KEYS.MCP_SERVERS,paramType:SyncableParameterType.STRING}}];function getAllSettings(){const result=[];for(const section of Object.values(SETTINGS_REGISTRY))result.push(...section.settings);return result.push(...NON_UI_SETTINGS),result}const SETTING_CONFIG_DEFAULT=Object.fromEntries(getAllSettings().map(s2=>[
s2.key,s2.defaultValue])),SETTING_CONFIG_INFO=Object.fromEntries(getAllSettings().map(s2=>[s2.key,s2.help])),SETTINGS_CHAT_SECTIONS=[...Object.values(SETTINGS_REGISTRY).map(section=>({title:section.title,slug:section.slug,icon:section.icon,fields:section.settings.map(s2=>({key:s2.key,label:s2.label,type:s2.type,isExperimental:s2.isExperimental,help:s2.help,options:s2.options}))})),...STANDALONE_SECTIONS],NUMERIC_FIELDS=getAllSettings().filter(s2=>s2.type===SettingsFieldType.INPUT&&typeof s2.defaultValue!=
"string").map(s2=>s2.key),POSITIVE_INTEGER_FIELDS=getAllSettings().filter(s2=>s2.isPositiveInteger).map(s2=>s2.key),SYNCABLE_PARAMETERS=getAllSettings().filter(s2=>s2.sync!==void 0).map(s2=>({key:s2.key,serverKey:s2.sync.serverKey,type:s2.sync.paramType,canSync:!0})),SETTINGS_FALLBACK_EXIT_ROUTE=ROUTES.START;FileTypeAudio.MP3+"",FileExtensionAudio.MP3,MimeTypeAudio.MP3_MPEG,MimeTypeAudio.MP3,FileTypeAudio.WAV+"",FileExtensionAudio.WAV,MimeTypeAudio.WAV;FileTypeImage.JPEG+"",FileExtensionImage.JPG,
FileExtensionImage.JPEG,MimeTypeImage.JPEG,FileTypeImage.PNG+"",FileExtensionImage.PNG,MimeTypeImage.PNG,FileTypeImage.GIF+"",FileExtensionImage.GIF,MimeTypeImage.GIF,FileTypeImage.WEBP+"",FileExtensionImage.WEBP,MimeTypeImage.WEBP,FileTypeImage.SVG+"",FileExtensionImage.SVG,MimeTypeImage.SVG;FileTypePdf.PDF+"",FileExtensionPdf.PDF,MimeTypeApplication.PDF;FileTypeText.PLAIN_TEXT+"",FileExtensionText.TXT,MimeTypeText.PLAIN,FileTypeText.MARKDOWN+"",FileExtensionText.MD,MimeTypeText.MARKDOWN,FileTypeText.
ASCIIDOC+"",FileExtensionText.ADOC,MimeTypeText.ASCIIDOC,FileTypeText.JAVASCRIPT+"",FileExtensionText.JS,MimeTypeText.JAVASCRIPT,MimeTypeText.JAVASCRIPT_APP,FileTypeText.TYPESCRIPT+"",FileExtensionText.TS,MimeTypeText.TYPESCRIPT,FileTypeText.JSX+"",FileExtensionText.JSX,MimeTypeText.JSX,FileTypeText.TSX+"",FileExtensionText.TSX,MimeTypeText.TSX,FileTypeText.CSS+"",FileExtensionText.CSS,MimeTypeText.CSS,FileTypeText.HTML+"",FileExtensionText.HTML,FileExtensionText.HTM,MimeTypeText.HTML,FileTypeText.
JSON+"",FileExtensionText.JSON,MimeTypeText.JSON,FileTypeText.XML+"",FileExtensionText.XML,MimeTypeText.XML_TEXT,MimeTypeText.XML_APP,FileTypeText.YAML+"",FileExtensionText.YAML,FileExtensionText.YML,MimeTypeText.YAML_TEXT,MimeTypeText.YAML_APP,FileTypeText.CSV+"",FileExtensionText.CSV,MimeTypeText.CSV,FileTypeText.LOG+"",FileExtensionText.LOG,MimeTypeText.PLAIN,FileTypeText.PYTHON+"",FileExtensionText.PY,MimeTypeText.PYTHON,FileTypeText.JAVA+"",FileExtensionText.JAVA,MimeTypeText.JAVA,FileTypeText.
CPP+"",FileExtensionText.CPP,FileExtensionText.C,FileExtensionText.H,FileExtensionText.HPP,MimeTypeText.CPP_SRC,MimeTypeText.CPP_HDR,MimeTypeText.C_SRC,MimeTypeText.C_HDR,FileTypeText.PHP+"",FileExtensionText.PHP,MimeTypeText.PHP,FileTypeText.RUBY+"",FileExtensionText.RB,MimeTypeText.RUBY,FileTypeText.GO+"",FileExtensionText.GO,MimeTypeText.GO,FileTypeText.RUST+"",FileExtensionText.RS,MimeTypeText.RUST,FileTypeText.SHELL+"",FileExtensionText.SH,FileExtensionText.BAT,MimeTypeText.SHELL,MimeTypeText.
BAT,FileTypeText.SQL+"",FileExtensionText.SQL,MimeTypeText.SQL,FileTypeText.R+"",FileExtensionText.R,MimeTypeText.R,FileTypeText.SCALA+"",FileExtensionText.SCALA,MimeTypeText.SCALA,FileTypeText.KOTLIN+"",FileExtensionText.KT,MimeTypeText.KOTLIN,FileTypeText.SWIFT+"",FileExtensionText.SWIFT,MimeTypeText.SWIFT,FileTypeText.DART+"",FileExtensionText.DART,MimeTypeText.DART,FileTypeText.VUE+"",FileExtensionText.VUE,MimeTypeText.VUE,FileTypeText.SVELTE+"",FileExtensionText.SVELTE,MimeTypeText.SVELTE,FileTypeText.
LATEX+"",FileExtensionText.TEX,MimeTypeText.LATEX,MimeTypeText.TEX,MimeTypeText.TEX_APP,FileTypeText.BIBTEX+"",FileExtensionText.BIB,MimeTypeText.BIBTEX,FileTypeText.CUDA+"",FileExtensionText.CU,FileExtensionText.CUH,MimeTypeText.CUDA,FileTypeText.VULKAN+"",FileExtensionText.COMP,MimeTypeText.PLAIN,FileTypeText.HASKELL+"",FileExtensionText.HS,MimeTypeText.HASKELL,FileTypeText.CSHARP+"",FileExtensionText.CS,MimeTypeText.CSHARP,FileTypeText.PROPERTIES+"",FileExtensionText.PROPERTIES,MimeTypeText.PROPERTIES;
const BR_PATTERN=/<br\s*\/?\s*>/gi,LIST_PATTERN=/^<ul>([\s\S]*)<\/ul>$/i,LI_PATTERN=/<li>([\s\S]*?)<\/li>/gi,TOOL_GROUP_LABELS={[ToolSource.BUILTIN]:"Built-in",[ToolSource.CUSTOM]:"JSON Schema"},TOOL_SERVER_LABELS={[ToolSource.BUILTIN]:"Built-in Tools",[ToolSource.CUSTOM]:"Custom Tools"},TOOLTIP_DELAY_DURATION=500;var root$1U=from_svg('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 174 174" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1"><g id="shape-320b5b95-d08d-8089\
-8007-585a8e498184"><defs><clipPath id="frame-clip-320b5b95-d08d-8089-8007-585a8e498184-render-1" class="frame-clip frame-clip-def"><rect rx="0" ry="0" x="0" y="0" width="174.00000000000045" height="174" transform="matrix(1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000)"></rect></clipPath></defs><g class="frame-container-wrapper"><g class="frame-container-blur"><g class="frame-container-shadows"><g clip-path="url(#frame-clip-320b5b95-d08d-8089-8007-585a8e498184-render-1)" fill="none">\
<g class="fills" id="fills-320b5b95-d08d-8089-8007-585a8e498184"><rect rx="0" ry="0" x="0" y="0" width="174.00000000000045" height="174" transform="matrix(1.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000)" class="frame-background"></rect></g><g class="frame-children"><g id="shape-320b5b95-d08d-8089-8007-585a974337b1"><g class="fills" id="fills-320b5b95-d08d-8089-8007-585a974337b1"><path d="M15.5587158203125,81.5927734375L83.44091796875,13.7105712890625C92.813720703125,4.3380126953125,1\
08.0096435546875,4.3380126953125,117.3817138671875,13.7105712890625L117.3817138671875,13.7105712890625C126.7547607421875,23.08306884765625,126.7547607421875,38.27911376953125,117.3817138671875,47.65167236328125L66.1168212890625,98.9169921875" fill="none" stroke-linecap="round" style="fill: none;"></path></g><g fill="none" stroke-linecap="round" id="strokes-b954dcef-3e3e-8015-8007-585acd4382b6-320b5b95-d08d-8089-8007-585a974337b1" class="strokes"><g class="stroke-shape"><path d="M15.5587158203125\
,81.5927734375L83.44091796875,13.7105712890625C92.813720703125,4.3380126953125,108.0096435546875,4.3380126953125,117.3817138671875,13.7105712890625L117.3817138671875,13.7105712890625C126.7547607421875,23.08306884765625,126.7547607421875,38.27911376953125,117.3817138671875,47.65167236328125L66.1168212890625,98.9169921875" style="fill: none; stroke-width: 12; stroke: currentColor; stroke-opacity: 1;"></path></g></g></g><g id="shape-320b5b95-d08d-8089-8007-585a974337b2"><g class="fills" id="fills-3\
20b5b95-d08d-8089-8007-585a974337b2"><path d="M66.5587158203125,98.26885986328125L117.1165771484375,47.7105712890625C126.489501953125,38.3380126953125,141.6854248046875,38.3380126953125,151.0584716796875,47.7105712890625L151.4114990234375,48.0640869140625C160.7845458984375,57.43670654296875,160.7845458984375,72.6326904296875,151.4114990234375,82.00518798828125L90.018310546875,143.39886474609375C86.8941650390625,146.52288818359375,86.8941650390625,151.587890625,90.018310546875,154.71185302734375L\
102.62451171875,167.31890869140625" fill="none" stroke-linecap="round" style="fill: none;"></path></g><g fill="none" stroke-linecap="round" id="strokes-b954dcef-3e3e-8015-8007-585acd447743-320b5b95-d08d-8089-8007-585a974337b2" class="strokes"><g class="stroke-shape"><path d="M66.5587158203125,98.26885986328125L117.1165771484375,47.7105712890625C126.489501953125,38.3380126953125,141.6854248046875,38.3380126953125,151.0584716796875,47.7105712890625L151.4114990234375,48.0640869140625C160.7845458984\
375,57.43670654296875,160.7845458984375,72.6326904296875,151.4114990234375,82.00518798828125L90.018310546875,143.39886474609375C86.8941650390625,146.52288818359375,86.8941650390625,151.587890625,90.018310546875,154.71185302734375L102.62451171875,167.31890869140625" style="fill: none; stroke-width: 12; stroke: currentColor; stroke-opacity: 1;"></path></g></g></g><g id="shape-320b5b95-d08d-8089-8007-585a974337b3"><g class="fills" id="fills-320b5b95-d08d-8089-8007-585a974337b3"><path d="M99.7929687\
5,30.68115234375L49.588134765625,80.8857421875C40.215576171875,90.258056640625,40.215576171875,105.45404052734375,49.588134765625,114.82708740234375L49.588134765625,114.82708740234375C58.9608154296875,124.19903564453125,74.1566162109375,124.19903564453125,83.529296875,114.82708740234375L133.7340087890625,64.62225341796875" fill="none" stroke-linecap="round" style="fill: none;"></path></g><g fill="none" stroke-linecap="round" id="strokes-b954dcef-3e3e-8015-8007-585acd44c5c9-320b5b95-d08d-8089-800\
7-585a974337b3" class="strokes"><g class="stroke-shape"><path d="M99.79296875,30.68115234375L49.588134765625,80.8857421875C40.215576171875,90.258056640625,40.215576171875,105.45404052734375,49.588134765625,114.82708740234375L49.588134765625,114.82708740234375C58.9608154296875,124.19903564453125,74.1566162109375,124.19903564453125,83.529296875,114.82708740234375L133.7340087890625,64.62225341796875" style="fill: none; stroke-width: 12; stroke: currentColor; stroke-opacity: 1;"></path></g></g></g><\
/g></g></g></g></g></g></svg>');function McpLogo($$anchor,$$props){let className=prop($$props,"class",3,""),style2=prop($$props,"style",3,"");var svg2=root$1U();template_effect(()=>{set_class(svg2,0,clsx(className())),set_style(svg2,style2())}),append($$anchor,svg2)}const FORK_TREE_DEPTH_PADDING=8,SYSTEM_MESSAGE_PLACEHOLDER="System message",APP_NAME="llama.cpp",ICON_STRIP_TRANSITION_DURATION=150,ICON_STRIP_TRANSITION_DELAY_MULTIPLIER=50,SIDEBAR_ACTIONS_ITEMS=[{icon:Square_pen,tooltip:"New chat",
route:ROUTES.NEW_CHAT,keys:["shift","cmd","o"]},{icon:Search,tooltip:"Search",keys:["cmd","k"]},{icon:McpLogo,tooltip:"MCP Servers",route:ROUTES.MCP_SERVERS,activeRouteId:"/mcp-servers"},{icon:Settings$1,tooltip:"Settings",route:ROUTES.SETTINGS,activeRoutePrefix:"/settings"}],URI_SCHEME_SEPARATOR="://",TEMPLATE_EXPRESSION_REGEX=/\{([+#./;?&]?)([^}]+)\}/g,URI_TEMPLATE_OPERATORS={RESERVED:"+",FRAGMENT:"#",PATH_SEGMENT:"/",LABEL:".",PATH_PARAM:";",FORM_QUERY:"?",FORM_CONTINUATION:"&"},URI_TEMPLATE_SEPARATORS={
COMMA:",",SLASH:"/",PERIOD:".",SEMICOLON:";",QUERY_PREFIX:"?",QUERY_CONTINUATION:"&"},VARIABLE_EXPLODE_MODIFIER_REGEX=/[*]$/,VARIABLE_PREFIX_MODIFIER_REGEX=/:[\d]+$/,LEADING_SLASHES_REGEX=/^\/+/,STD=["com","net","org","gov","edu"],STD_MIL=[...STD,"mil"],ccTLD_PREFIXES={ar:STD,bd:STD,bg:STD,cn:STD_MIL,eg:STD,gr:STD,hk:STD,hr:STD,lk:STD,mx:STD_MIL,my:STD_MIL,ng:STD,ph:STD,pk:STD,pl:STD,ro:STD,ru:STD,sa:STD,si:STD,tr:STD,tw:STD,ua:STD,ve:STD,au:[...STD_MIL,"id","asn","csiro"],br:[...STD_MIL,"art","\
eco","eng","inf","med","psi","tmp","etc","adm","adv","arq","bio","bmd","cim","cng","cnt","coop","ecn","esp","far","fm","fnd","fot","fst","g12","ggf","imb","ind","jor","jus","leg","lel","mat","mp","mus","not","ntr","odo","ppg","pro","psc","qsl","rec","slg","srv","trd","tur","tv","vet","vlog","wiki","zlg"],id:[...STD_MIL,"co","go","or","web","sch"],in:[...STD_MIL,"co","gen","ind","firm","ernet","nic"],kr:[...STD_MIL,"co","go","or","ac","re"],nz:[...STD_MIL,"co","gen","geek","kiwi","maori","school",
"govt","health","iwi","parliament"],sg:[...STD,"per"],th:["co","go","or","in","ac","mi","net"],ae:["co","net","org","gov","ac","sch"],hu:["co","net","org","gov","edu"],il:["co","net","org","gov","ac","muni"],jp:["ac","ad","co","ed","go","gr","lg","ne","or"],ke:["co","or","ne","go","ac","sc"],rs:["co","net","org","gov","edu"],uk:["co","org","net","ac","gov","mil","nhs","police","mod","ltd","plc","me","sch"],za:["co","org","net","web","law","mil"]},WILDCARD_BASES={br:["nom","blog"],jp:["kobe","kyo\
to","nagoya","osaka","sapporo","sendai","tokyo","yokohama","aichi","akita","aomori","chiba","ehime","fukui","fukuoka","fukushima","gifu","gunma","hiroshima","hokkaido","hyogo","ibaraki","ishikawa","iwate","kagawa","kagoshima","kanagawa","kochi","kumamoto","mie","miyagi","miyazaki","nagano","nara","niigata","oita","okayama","okinawa","saga","saitama","shiga","shimane","shizuoka","tochigi","tokushima","tottori","toyama","wakayama","yamagata","yamaguchi","yamanashi"]};function buildSuffixSet(suffixes){
const set2=new Set;for(const[tld,parts]of Object.entries(suffixes))for(const part of parts)set2.add(`${part}.${tld}`);return set2}const TWO_PART_PUBLIC_SUFFIXES=buildSuffixSet(ccTLD_PREFIXES),WILDCARD_PUBLIC_SUFFIXES=buildSuffixSet(WILDCARD_BASES),DEFAULT_MOBILE_BREAKPOINT=768;class IsMobile extends MediaQuery{constructor(breakpoint=DEFAULT_MOBILE_BREAKPOINT){super(`max-width: ${breakpoint-1}px`)}}class ParameterSyncService{static roundFloatingPoint(value){return normalizeFloatingPoint(value)}static extractServerDefaults(serverParams,webuiSettings){
const extracted={};if(serverParams){for(const param of SYNCABLE_PARAMETERS)if(param.canSync&&param.serverKey in serverParams){const value=serverParams[param.serverKey];value!==void 0&&(extracted[param.key]=this.roundFloatingPoint(value))}serverParams.samplers&&Array.isArray(serverParams.samplers)&&(extracted[SETTINGS_KEYS.SAMPLERS]=serverParams.samplers.join(";"))}if(webuiSettings){for(const param of SYNCABLE_PARAMETERS)if(param.canSync&&param.serverKey in webuiSettings){const value=webuiSettings[param.
serverKey];value!==void 0&&(extracted[param.key]=this.roundFloatingPoint(value))}}return extracted}static mergeWithServerDefaults(currentSettings,serverDefaults,userOverrides=new Set){const merged={...currentSettings};for(const[key2,serverValue]of Object.entries(serverDefaults))userOverrides.has(key2)||(merged[key2]=this.roundFloatingPoint(serverValue));return merged}static getParameterInfo(key2,currentValue,propsDefaults,userOverrides){const hasPropsDefault=propsDefaults[key2]!==void 0,isUserOverride=userOverrides.
has(key2),source2=isUserOverride?ParameterSource.CUSTOM:ParameterSource.DEFAULT;return{value:currentValue,source:source2,serverDefault:hasPropsDefault?propsDefaults[key2]:void 0,userOverride:isUserOverride?currentValue:void 0}}static canSyncParameter(key2){return SYNCABLE_PARAMETERS.some(param=>param.key===key2&&param.canSync)}static getSyncableParameterKeys(){return SYNCABLE_PARAMETERS.filter(param=>param.canSync).map(param=>param.key)}static validateServerParameter(key2,value){const param=SYNCABLE_PARAMETERS.
find(p2=>p2.key===key2);if(!param)return!1;switch(param.type){case SyncableParameterType.NUMBER:return typeof value=="number"&&!isNaN(value);case SyncableParameterType.STRING:return typeof value=="string";case SyncableParameterType.BOOLEAN:return typeof value=="boolean";default:return!1}}static createParameterDiff(currentSettings,serverDefaults){const diff2={};for(const key2 of this.getSyncableParameterKeys()){const currentValue=currentSettings[key2],serverValue=serverDefaults[key2];serverValue!==
void 0&&(diff2[key2]={current:currentValue,server:serverValue,differs:currentValue!==serverValue})}return diff2}}class PropsService{static async fetch(autoload=!1){const params={};return autoload||(params.autoload="false"),apiFetchWithParams("./props",params,{authOnly:!0})}static async fetchForModel(modelId,autoload=!1){const params={model:modelId};return autoload||(params.autoload="false"),apiFetchWithParams("./props",params,{authOnly:!0})}}class ServerStore{#props=state$1(null);get props(){return get$3(
this.#props)}set props(value){set$1(this.#props,value,!0)}#loading=state$1(!1);get loading(){return get$3(this.#loading)}set loading(value){set$1(this.#loading,value,!0)}#error=state$1(null);get error(){return get$3(this.#error)}set error(value){set$1(this.#error,value,!0)}#role=state$1(null);get role(){return get$3(this.#role)}set role(value){set$1(this.#role,value,!0)}fetchPromise=null;get defaultParams(){return this.props?.default_generation_settings?.params||null}get contextSize(){const nCtx=this.
props?.default_generation_settings?.n_ctx;return typeof nCtx=="number"?nCtx:null}get webuiSettings(){return this.props?.webui_settings}get isRouterMode(){return this.role===ServerRole.ROUTER}get isModelMode(){return this.role===ServerRole.MODEL}async fetch(){if(this.fetchPromise)return this.fetchPromise;this.loading=!0,this.error=null;const fetchPromise=(async()=>{try{const props=await PropsService.fetch();this.props=props,this.error=null,this.detectRole(props)}catch(error2){this.error=this.getErrorMessage(
error2),console.error("Error fetching server properties:",error2)}finally{this.loading=!1,this.fetchPromise=null}})();this.fetchPromise=fetchPromise,await fetchPromise}getErrorMessage(error2){if(error2 instanceof Error){const message=error2.message||"";if(error2.name==="TypeError"&&message.includes("fetch"))return"Server is not running or unreachable";if(message.includes("ECONNREFUSED"))return"Connection refused - server may be offline";if(message.includes("ENOTFOUND"))return"Server not found - \
check server address";if(message.includes("ETIMEDOUT"))return"Request timed out";if(message.includes("503"))return"Server temporarily unavailable";if(message.includes("500"))return"Server error - check server logs";if(message.includes("404"))return"Server endpoint not found";if(message.includes("403")||message.includes("401"))return"Access denied"}return"Failed to connect to server"}clear(){this.props=null,this.error=null,this.loading=!1,this.role=null,this.fetchPromise=null}detectRole(props){const newRole=props?.
role===ServerRole.ROUTER?ServerRole.ROUTER:ServerRole.MODEL;this.role!==newRole&&(this.role=newRole,console.info(`Server running in ${newRole===ServerRole.ROUTER?"ROUTER":"MODEL"} mode`))}}const serverStore=new ServerStore,serverProps=()=>serverStore.props,serverLoading=()=>serverStore.loading,serverError=()=>serverStore.error,contextSize=()=>serverStore.contextSize,isRouterMode=()=>serverStore.isRouterMode;class SettingsStore{#config=state$1(proxy({...SETTING_CONFIG_DEFAULT}));get config(){return get$3(
this.#config)}set config(value){set$1(this.#config,value,!0)}#isInitialized=state$1(!1);get isInitialized(){return get$3(this.#isInitialized)}set isInitialized(value){set$1(this.#isInitialized,value,!0)}#userOverrides=state$1(proxy(new Set));get userOverrides(){return get$3(this.#userOverrides)}set userOverrides(value){set$1(this.#userOverrides,value,!0)}getServerDefaults(){const serverParams=serverStore.defaultParams,webuiSettings=serverStore.webuiSettings;return ParameterSyncService.extractServerDefaults(
serverParams,webuiSettings)}constructor(){this.initialize()}initialize(){try{this.loadConfig(),this.migrateLegacyTheme(),setMode(this.config[SETTINGS_KEYS.THEME]),this.isInitialized=!0}catch(error2){console.error("Failed to initialize settings store:",error2)}}loadConfig(){try{const storedConfigRaw=localStorage.getItem(CONFIG_LOCALSTORAGE_KEY),savedVal=JSON.parse(storedConfigRaw||"{}");this.config={...SETTING_CONFIG_DEFAULT,...savedVal},SETTINGS_KEYS.SEND_ON_ENTER in savedVal||new IsMobile().current&&
(this.config[SETTINGS_KEYS.SEND_ON_ENTER]=!1);const savedOverrides=JSON.parse(localStorage.getItem(USER_OVERRIDES_LOCALSTORAGE_KEY)||"[]");this.userOverrides=new Set(savedOverrides)}catch(error2){console.warn("Failed to parse config from localStorage, using defaults:",error2),this.config={...SETTING_CONFIG_DEFAULT},this.userOverrides=new Set}}migrateLegacyTheme(){const legacyTheme=localStorage.getItem("theme");legacyTheme&&(this.config[SETTINGS_KEYS.THEME]=legacyTheme,localStorage.removeItem("th\
eme"),this.saveConfig(),setMode(legacyTheme))}updateConfig(key2,value){if(this.config[key2]=value,ParameterSyncService.canSyncParameter(key2)){const propsDefault=this.getServerDefaults()[key2];if(propsDefault!==void 0){const normalizedValue=normalizeFloatingPoint(value),normalizedDefault=normalizeFloatingPoint(propsDefault);normalizedValue===normalizedDefault?this.userOverrides.delete(key2):this.userOverrides.add(key2)}}this.saveConfig()}updateMultipleConfig(updates){Object.assign(this.config,updates);
const propsDefaults=this.getServerDefaults();for(const[key2,value]of Object.entries(updates))if(ParameterSyncService.canSyncParameter(key2)){const propsDefault=propsDefaults[key2];if(propsDefault!==void 0){const normalizedValue=normalizeFloatingPoint(value),normalizedDefault=normalizeFloatingPoint(propsDefault);normalizedValue===normalizedDefault?this.userOverrides.delete(key2):this.userOverrides.add(key2)}}this.saveConfig()}saveConfig(){try{localStorage.setItem(CONFIG_LOCALSTORAGE_KEY,JSON.stringify(
this.config)),localStorage.setItem(USER_OVERRIDES_LOCALSTORAGE_KEY,JSON.stringify(Array.from(this.userOverrides)))}catch(error2){console.error("Failed to save config to localStorage:",error2)}}updateTheme(newTheme){this.updateConfig(SETTINGS_KEYS.THEME,newTheme),setMode(newTheme)}resetConfig(){this.config={...SETTING_CONFIG_DEFAULT},this.saveConfig()}resetTheme(){this.updateConfig(SETTINGS_KEYS.THEME,SETTING_CONFIG_DEFAULT[SETTINGS_KEYS.THEME]),setMode(SETTING_CONFIG_DEFAULT[SETTINGS_KEYS.THEME])}resetAll(){
this.resetConfig(),this.resetTheme()}resetParameterToServerDefault(key2){const serverDefaults=this.getServerDefaults(),webuiSettings=serverStore.webuiSettings;webuiSettings&&key2 in webuiSettings?setConfigValue(this.config,key2,webuiSettings[key2]):serverDefaults[key2]!==void 0?setConfigValue(this.config,key2,""):key2 in SETTING_CONFIG_DEFAULT&&setConfigValue(this.config,key2,getConfigValue(SETTING_CONFIG_DEFAULT,key2)),this.userOverrides.delete(key2),this.saveConfig()}syncWithServerDefaults(){const propsDefaults=this.
getServerDefaults();if(Object.keys(propsDefaults).length===0)return;const webuiSettings=serverStore.webuiSettings,webuiSettingsKeys=new Set(webuiSettings?Object.keys(webuiSettings):[]);for(const[key2,propsValue]of Object.entries(propsDefaults)){const currentValue=getConfigValue(this.config,key2),normalizedCurrent=normalizeFloatingPoint(currentValue),normalizedDefault=normalizeFloatingPoint(propsValue);normalizedCurrent===normalizedDefault&&(this.userOverrides.delete(key2),!webuiSettingsKeys.has(
key2)&&getConfigValue(SETTING_CONFIG_DEFAULT,key2)===void 0&&setConfigValue(this.config,key2,void 0))}if(webuiSettings)for(const[key2,value]of Object.entries(webuiSettings))!this.userOverrides.has(key2)&&value!==void 0&&setConfigValue(this.config,key2,value);this.saveConfig(),console.log("User overrides after sync:",Array.from(this.userOverrides))}forceSyncWithServerDefaults(){const propsDefaults=this.getServerDefaults(),webuiSettings=serverStore.webuiSettings;for(const key2 of ParameterSyncService.
getSyncableParameterKeys())webuiSettings&&key2 in webuiSettings?setConfigValue(this.config,key2,webuiSettings[key2]):propsDefaults[key2]!==void 0?setConfigValue(this.config,key2,""):key2 in SETTING_CONFIG_DEFAULT&&setConfigValue(this.config,key2,getConfigValue(SETTING_CONFIG_DEFAULT,key2)),this.userOverrides.delete(key2);this.saveConfig()}getConfig(key2){return this.config[key2]}getAllConfig(){return{...this.config}}canSyncParameter(key2){return ParameterSyncService.canSyncParameter(key2)}getParameterInfo(key2){
const propsDefaults=this.getServerDefaults(),currentValue=getConfigValue(this.config,key2);return ParameterSyncService.getParameterInfo(key2,currentValue??"",propsDefaults,this.userOverrides)}getParameterDiff(){const serverDefaults=this.getServerDefaults();if(Object.keys(serverDefaults).length===0)return{};const configAsRecord=configToParameterRecord(this.config,ParameterSyncService.getSyncableParameterKeys());return ParameterSyncService.createParameterDiff(configAsRecord,serverDefaults)}clearAllUserOverrides(){
this.userOverrides.clear(),this.saveConfig(),console.log("Cleared all user overrides")}exportSettings(includeSensitiveData=!1){const configToExport=includeSensitiveData?{...this.config}:Object.fromEntries(Object.entries(this.config).filter(([key2])=>key2!=="apiKey"));if("mcpServers"in configToExport&&!includeSensitiveData)try{const safeServers=JSON.parse(configToExport.mcpServers).map(server=>(delete server.headers,server));configToExport.mcpServers=JSON.stringify(safeServers)}catch{delete configToExport.
mcpServers}return{version:1,timestamp:Date.now(),config:configToExport,userOverrides:Array.from(this.userOverrides)}}importSettings(data){if(!data||!data.config)throw new Error("Invalid settings data: missing config");this.config={...SETTING_CONFIG_DEFAULT,...data.config},this.userOverrides=new Set(data.userOverrides??[]),this.saveConfig(),setMode(this.config[SETTINGS_KEYS.THEME]),console.log("Settings imported successfully")}}const settingsStore=new SettingsStore,config$1=()=>settingsStore.config;
function redactValue(value,showLastChars){return showLastChars?`....${value.slice(-showLastChars)}`:"[redacted]"}function getAuthHeaders(){const apiKey=config$1().apiKey?.toString().trim();return apiKey?{Authorization:`Bearer ${apiKey}`}:{}}function getJsonHeaders(){return{"Content-Type":"application/json",...getAuthHeaders()}}function sanitizeHeaders(headers,extraRedactedHeaders,partialRedactHeaders){if(!headers)return{};const normalized=new Headers(headers),sanitized={},redactedHeaders=new Set(
Array.from(extraRedactedHeaders??[],header=>header.toLowerCase()));for(const[key2,value]of normalized.entries()){const normalizedKey=key2.toLowerCase(),partialChars=partialRedactHeaders?.get(normalizedKey);partialChars!==void 0?sanitized[key2]=redactValue(value,partialChars):REDACTED_HEADERS.has(normalizedKey)||redactedHeaders.has(normalizedKey)?sanitized[key2]=redactValue(value):sanitized[key2]=value}return sanitized}async function apiFetch(path2,options={}){const{authOnly=!1,headers:customHeaders,
...fetchOptions}=options,headers={...authOnly?getAuthHeaders():getJsonHeaders(),...customHeaders},url2=path2.startsWith(UrlProtocol.HTTP)||path2.startsWith(UrlProtocol.HTTPS)?path2:`${base}${path2}`,response=await fetch(url2,{...fetchOptions,headers});if(!response.ok){const errorMessage=await parseErrorMessage(response);throw new Error(errorMessage)}return response.json()}async function apiFetchWithParams(basePath,params,options={}){const url2=new URL(basePath,window.location.href);for(const[key2,
value]of Object.entries(params))value!=null&&url2.searchParams.set(key2,value);const{authOnly=!1,headers:customHeaders,...fetchOptions}=options,headers={...authOnly?getAuthHeaders():getJsonHeaders(),...customHeaders},response=await fetch(url2.toString(),{...fetchOptions,headers});if(!response.ok){const errorMessage=await parseErrorMessage(response);throw new Error(errorMessage)}return response.json()}async function apiPost(path2,body2,options={}){return apiFetch(path2,{method:"POST",body:JSON.stringify(
body2),...options})}async function parseErrorMessage(response){try{const errorData=await response.json();if(errorData?.error?.message)return errorData.error.message;if(errorData?.error&&typeof errorData.error=="string")return errorData.error;if(errorData?.message)return errorData.message}catch{}return`Request failed: ${response.status} ${response.statusText}`}function error(status,body2){throw new HttpError(status,body2)}async function validateApiKey(fetch2){try{const apiKey=config$1().apiKey,headers={
"Content-Type":"application/json"};apiKey&&(headers.Authorization=`Bearer ${apiKey}`);const response=await fetch2(`${base}/props`,{headers});if(!response.ok){if(response.status===401||response.status===403)throw error(401,"Access denied");console.warn(`Server responded with status ${response.status} during API key validation`);return}}catch(err){if(err&&typeof err=="object"&&"status"in err)throw err;console.warn("Cannot connect to server for API key validation:",err)}}function isMcpPrompt(item){
return!!(item.attachment?.type===AttachmentType.MCP_PROMPT||item.uploadedFile?.type===SpecialFileType.MCP_PROMPT&&item.uploadedFile.mcpPrompt)}function isMcpResource(item){return item.attachment?.type===AttachmentType.MCP_RESOURCE}function getUploadedFileCategory$1(file){const categoryByMime=getFileTypeCategory(file.type);return categoryByMime||getFileTypeCategoryByExtension(file.name)}function getAttachmentDisplayItems(options){const{uploadedFiles=[],attachments=[]}=options,items2=[];for(const file of uploadedFiles)
items2.push({id:file.id,name:file.name,size:file.size,preview:file.preview,isImage:getUploadedFileCategory$1(file)===FileTypeCategory.IMAGE,isLoading:file.isLoading,loadError:file.loadError,uploadedFile:file,textContent:file.textContent});for(const[index2,attachment]of attachments.entries()){const isImage2=isImageFile(attachment);items2.push({id:`attachment-${index2}`,name:attachment.name,size:"size"in attachment?attachment.size:void 0,preview:isImage2&&"base64Url"in attachment?attachment.base64Url:
void 0,isImage:isImage2,attachment,attachmentIndex:index2,textContent:"content"in attachment?attachment.content:void 0})}return items2.reverse()}function getUploadedFileCategory(uploadedFile){const categoryByMime=getFileTypeCategory(uploadedFile.type);return categoryByMime||getFileTypeCategoryByExtension(uploadedFile.name)}function isTextFile(attachment,uploadedFile){return uploadedFile?getUploadedFileCategory(uploadedFile)===FileTypeCategory.TEXT:attachment?attachment.type===AttachmentType.TEXT||
attachment.type===AttachmentType.LEGACY_CONTEXT:!1}function isImageFile(attachment,uploadedFile){return uploadedFile?getUploadedFileCategory(uploadedFile)===FileTypeCategory.IMAGE:attachment?attachment.type===AttachmentType.IMAGE:!1}function isPdfFile$1(attachment,uploadedFile){return uploadedFile?getUploadedFileCategory(uploadedFile)===FileTypeCategory.PDF:attachment?attachment.type===AttachmentType.PDF:!1}function isAudioFile(attachment,uploadedFile){return uploadedFile?getUploadedFileCategory(
uploadedFile)===FileTypeCategory.AUDIO:attachment?attachment.type===AttachmentType.AUDIO:!1}function autoResizeTextarea(textareaElement){textareaElement&&(textareaElement.style.height="1rem",textareaElement.style.height=textareaElement.scrollHeight+"px")}function findMessageById(messages,id2){if(id2)return messages.find(m=>m.id===id2)}function filterByLeafNodeId(messages,leafNodeId,includeRoot=!1){const result=[],nodeMap=new Map;for(const msg of messages)nodeMap.set(msg.id,msg);let startNode=nodeMap.
get(leafNodeId);if(!startNode){let latestTime=-1;for(const msg of messages)msg.timestamp>latestTime&&(startNode=msg,latestTime=msg.timestamp)}let currentNode=startNode;for(;currentNode&&((currentNode.type!=="root"||includeRoot)&&result.push(currentNode),currentNode.parent!==null);)currentNode=nodeMap.get(currentNode.parent);return result.sort((a,b)=>a.role===MessageRole.SYSTEM&&b.role!==MessageRole.SYSTEM?-1:a.role!==MessageRole.SYSTEM&&b.role===MessageRole.SYSTEM?1:a.timestamp-b.timestamp),result}
function findLeafNode(messages,messageId){const nodeMap=new Map;for(const msg of messages)nodeMap.set(msg.id,msg);let currentNode=nodeMap.get(messageId);for(;currentNode&&currentNode.children.length>0;){const lastChildId=currentNode.children[currentNode.children.length-1];currentNode=nodeMap.get(lastChildId)}return currentNode?.id??messageId}function findDescendantMessages(messages,messageId){const nodeMap=new Map;for(const msg of messages)nodeMap.set(msg.id,msg);const descendants=[],queue=[messageId];
for(;queue.length>0;){const currentId=queue.shift(),currentNode=nodeMap.get(currentId);if(currentNode)for(const childId of currentNode.children)descendants.push(childId),queue.push(childId)}return descendants}function getMessageSiblings(messages,messageId){const nodeMap=new Map;for(const msg of messages)nodeMap.set(msg.id,msg);const message=nodeMap.get(messageId);if(!message)return null;if(message.parent===null)return{message,siblingIds:[messageId],currentIndex:0,totalSiblings:1};const parentNode=nodeMap.
get(message.parent);if(!parentNode)return{message,siblingIds:[messageId],currentIndex:0,totalSiblings:1};const siblingIds=parentNode.children,siblingLeafIds=siblingIds.map(siblingId=>findLeafNode(messages,siblingId)),currentIndex=siblingIds.indexOf(messageId);return{message,siblingIds:siblingLeafIds,currentIndex,totalSiblings:siblingIds.length}}var core$5,hasRequiredCore$4;function requireCore$4(){if(hasRequiredCore$4)return core$5;hasRequiredCore$4=1;function deepFreeze(obj){return obj instanceof
Map?obj.clear=obj.delete=obj.set=function(){throw new Error("map is read-only")}:obj instanceof Set&&(obj.add=obj.clear=obj.delete=function(){throw new Error("set is read-only")}),Object.freeze(obj),Object.getOwnPropertyNames(obj).forEach(name=>{const prop2=obj[name],type2=typeof prop2;(type2==="object"||type2==="function")&&!Object.isFrozen(prop2)&&deepFreeze(prop2)}),obj}class Response2{constructor(mode){mode.data===void 0&&(mode.data={}),this.data=mode.data,this.isMatchIgnored=!1}ignoreMatch(){
this.isMatchIgnored=!0}}function escapeHTML(value){return value.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function inherit$1(original,...objects){const result=Object.create(null);for(const key2 in original)result[key2]=original[key2];return objects.forEach(function(obj){for(const key2 in obj)result[key2]=obj[key2]}),result}const SPAN_CLOSE="</span>",emitsWrappingTags=node2=>!!node2.scope,scopeToCSSClass=(name,{prefix})=>{if(name.
startsWith("language:"))return name.replace("language:","language-");if(name.includes(".")){const pieces=name.split(".");return[`${prefix}${pieces.shift()}`,...pieces.map((x,i)=>`${x}${"_".repeat(i+1)}`)].join(" ")}return`${prefix}${name}`};class HTMLRenderer{constructor(parseTree3,options){this.buffer="",this.classPrefix=options.classPrefix,parseTree3.walk(this)}addText(text2){this.buffer+=escapeHTML(text2)}openNode(node2){if(!emitsWrappingTags(node2))return;const className=scopeToCSSClass(node2.
scope,{prefix:this.classPrefix});this.span(className)}closeNode(node2){emitsWrappingTags(node2)&&(this.buffer+=SPAN_CLOSE)}value(){return this.buffer}span(className){this.buffer+=`<span class="${className}">`}}const newNode=(opts={})=>{const result={children:[]};return Object.assign(result,opts),result};class TokenTree{constructor(){this.rootNode=newNode(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(node2){this.top.children.push(
node2)}openNode(scope2){const node2=newNode({scope:scope2});this.add(node2),this.stack.push(node2)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(builder){return this.constructor._walk(builder,this.rootNode)}static _walk(builder,node2){return typeof node2=="string"?builder.addText(node2):node2.children&&(builder.openNode(node2),node2.children.forEach(child2=>this._walk(builder,child2)),
builder.closeNode(node2)),builder}static _collapse(node2){typeof node2!="string"&&node2.children&&(node2.children.every(el=>typeof el=="string")?node2.children=[node2.children.join("")]:node2.children.forEach(child2=>{TokenTree._collapse(child2)}))}}class TokenTreeEmitter extends TokenTree{constructor(options){super(),this.options=options}addText(text2){text2!==""&&this.add(text2)}startScope(scope2){this.openNode(scope2)}endScope(){this.closeNode()}__addSublanguage(emitter,name){const node2=emitter.
root;name&&(node2.scope=`language:${name}`),this.add(node2)}toHTML(){return new HTMLRenderer(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function source2(re2){return re2?typeof re2=="string"?re2:re2.source:null}function lookahead2(re2){return concat2("(?=",re2,")")}function anyNumberOfTimes(re2){return concat2("(?:",re2,")*")}function optional2(re2){return concat2("(?:",re2,")?")}function concat2(...args){return args.map(x=>source2(x)).join("")}function stripOptionsFromArgs2(args){
const opts=args[args.length-1];return typeof opts=="object"&&opts.constructor===Object?(args.splice(args.length-1,1),opts):{}}function either2(...args){return"("+(stripOptionsFromArgs2(args).capture?"":"?:")+args.map(x=>source2(x)).join("|")+")"}function countMatchGroups(re2){return new RegExp(re2.toString()+"|").exec("").length-1}function startsWith(re2,lexeme){const match=re2&&re2.exec(lexeme);return match&&match.index===0}const BACKREF_RE=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function _rewriteBackreferences(regexps,{
joinWith}){let numCaptures=0;return regexps.map(regex=>{numCaptures+=1;const offset2=numCaptures;let re2=source2(regex),out="";for(;re2.length>0;){const match=BACKREF_RE.exec(re2);if(!match){out+=re2;break}out+=re2.substring(0,match.index),re2=re2.substring(match.index+match[0].length),match[0][0]==="\\"&&match[1]?out+="\\"+String(Number(match[1])+offset2):(out+=match[0],match[0]==="("&&numCaptures++)}return out}).map(re2=>`(${re2})`).join(joinWith)}const MATCH_NOTHING_RE=/\b\B/,IDENT_RE2="[a-zA\
-Z]\\w*",UNDERSCORE_IDENT_RE="[a-zA-Z_]\\w*",NUMBER_RE="\\b\\d+(\\.\\d+)?",C_NUMBER_RE="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",BINARY_NUMBER_RE="\\b(0b[01]+)",RE_STARTERS_RE="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",SHEBANG=(opts={})=>{const beginShebang=/^#![ ]*\//;return opts.binary&&(opts.begin=concat2(beginShebang,/.*\b/,opts.binary,/\b.*/)),inherit$1({scope:"\
meta",begin:beginShebang,end:/$/,relevance:0,"on:begin":(m,resp)=>{m.index!==0&&resp.ignoreMatch()}},opts)},BACKSLASH_ESCAPE={begin:"\\\\[\\s\\S]",relevance:0},APOS_STRING_MODE={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[BACKSLASH_ESCAPE]},QUOTE_STRING_MODE={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[BACKSLASH_ESCAPE]},PHRASAL_WORDS_MODE={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},
COMMENT=function(begin,end,modeOptions={}){const mode=inherit$1({scope:"comment",begin,end,contains:[]},modeOptions);mode.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const ENGLISH_WORD=either2("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return mode.contains.push({begin:concat2(/[ ]+/,"(",ENGLISH_WORD,
/[.]?[:]?([.][ ]|[ ])/,"){3}")}),mode},C_LINE_COMMENT_MODE=COMMENT("//","$"),C_BLOCK_COMMENT_MODE=COMMENT("/\\*","\\*/"),HASH_COMMENT_MODE=COMMENT("#","$"),NUMBER_MODE={scope:"number",begin:NUMBER_RE,relevance:0},C_NUMBER_MODE={scope:"number",begin:C_NUMBER_RE,relevance:0},BINARY_NUMBER_MODE={scope:"number",begin:BINARY_NUMBER_RE,relevance:0},REGEXP_MODE={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[BACKSLASH_ESCAPE]}]},
TITLE_MODE={scope:"title",begin:IDENT_RE2,relevance:0},UNDERSCORE_TITLE_MODE={scope:"title",begin:UNDERSCORE_IDENT_RE,relevance:0},METHOD_GUARD={begin:"\\.\\s*"+UNDERSCORE_IDENT_RE,relevance:0};var MODES2=Object.freeze({__proto__:null,APOS_STRING_MODE,BACKSLASH_ESCAPE,BINARY_NUMBER_MODE,BINARY_NUMBER_RE,COMMENT,C_BLOCK_COMMENT_MODE,C_LINE_COMMENT_MODE,C_NUMBER_MODE,C_NUMBER_RE,END_SAME_AS_BEGIN:function(mode){return Object.assign(mode,{"on:begin":(m,resp)=>{resp.data._beginMatch=m[1]},"on:end":(m,resp)=>{
resp.data._beginMatch!==m[1]&&resp.ignoreMatch()}})},HASH_COMMENT_MODE,IDENT_RE:IDENT_RE2,MATCH_NOTHING_RE,METHOD_GUARD,NUMBER_MODE,NUMBER_RE,PHRASAL_WORDS_MODE,QUOTE_STRING_MODE,REGEXP_MODE,RE_STARTERS_RE,SHEBANG,TITLE_MODE,UNDERSCORE_IDENT_RE,UNDERSCORE_TITLE_MODE});function skipIfHasPrecedingDot(match,response){match.input[match.index-1]==="."&&response.ignoreMatch()}function scopeClassName(mode,_parent){mode.className!==void 0&&(mode.scope=mode.className,delete mode.className)}function beginKeywords(mode,parent){
parent&&mode.beginKeywords&&(mode.begin="\\b("+mode.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",mode.__beforeBegin=skipIfHasPrecedingDot,mode.keywords=mode.keywords||mode.beginKeywords,delete mode.beginKeywords,mode.relevance===void 0&&(mode.relevance=0))}function compileIllegal(mode,_parent){Array.isArray(mode.illegal)&&(mode.illegal=either2(...mode.illegal))}function compileMatch(mode,_parent){if(mode.match){if(mode.begin||mode.end)throw new Error("begin & end are not supported wi\
th match");mode.begin=mode.match,delete mode.match}}function compileRelevance(mode,_parent){mode.relevance===void 0&&(mode.relevance=1)}const beforeMatchExt=(mode,parent)=>{if(!mode.beforeMatch)return;if(mode.starts)throw new Error("beforeMatch cannot be used with starts");const originalMode=Object.assign({},mode);Object.keys(mode).forEach(key2=>{delete mode[key2]}),mode.keywords=originalMode.keywords,mode.begin=concat2(originalMode.beforeMatch,lookahead2(originalMode.begin)),mode.starts={relevance:0,
contains:[Object.assign(originalMode,{endsParent:!0})]},mode.relevance=0,delete originalMode.beforeMatch},COMMON_KEYWORDS=["of","and","for","in","not","or","if","then","parent","list","value"],DEFAULT_KEYWORD_SCOPE="keyword";function compileKeywords(rawKeywords,caseInsensitive,scopeName=DEFAULT_KEYWORD_SCOPE){const compiledKeywords=Object.create(null);return typeof rawKeywords=="string"?compileList(scopeName,rawKeywords.split(" ")):Array.isArray(rawKeywords)?compileList(scopeName,rawKeywords):Object.
keys(rawKeywords).forEach(function(scopeName2){Object.assign(compiledKeywords,compileKeywords(rawKeywords[scopeName2],caseInsensitive,scopeName2))}),compiledKeywords;function compileList(scopeName2,keywordList){caseInsensitive&&(keywordList=keywordList.map(x=>x.toLowerCase())),keywordList.forEach(function(keyword2){const pair=keyword2.split("|");compiledKeywords[pair[0]]=[scopeName2,scoreForKeyword(pair[0],pair[1])]})}}function scoreForKeyword(keyword2,providedScore){return providedScore?Number(
providedScore):commonKeyword(keyword2)?0:1}function commonKeyword(keyword2){return COMMON_KEYWORDS.includes(keyword2.toLowerCase())}const seenDeprecations={},error2=message=>{console.error(message)},warn2=(message,...args)=>{console.log(`WARN: ${message}`,...args)},deprecated2=(version3,message)=>{seenDeprecations[`${version3}/${message}`]||(console.log(`Deprecated as of ${version3}. ${message}`),seenDeprecations[`${version3}/${message}`]=!0)},MultiClassError=new Error;function remapScopeNames(mode,regexes,{
key:key2}){let offset2=0;const scopeNames=mode[key2],emit={},positions={};for(let i=1;i<=regexes.length;i++)positions[i+offset2]=scopeNames[i],emit[i+offset2]=!0,offset2+=countMatchGroups(regexes[i-1]);mode[key2]=positions,mode[key2]._emit=emit,mode[key2]._multi=!0}function beginMultiClass(mode){if(Array.isArray(mode.begin)){if(mode.skip||mode.excludeBegin||mode.returnBegin)throw error2("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),MultiClassError;if(typeof mode.beginScope!=
"object"||mode.beginScope===null)throw error2("beginScope must be object"),MultiClassError;remapScopeNames(mode,mode.begin,{key:"beginScope"}),mode.begin=_rewriteBackreferences(mode.begin,{joinWith:""})}}function endMultiClass(mode){if(Array.isArray(mode.end)){if(mode.skip||mode.excludeEnd||mode.returnEnd)throw error2("skip, excludeEnd, returnEnd not compatible with endScope: {}"),MultiClassError;if(typeof mode.endScope!="object"||mode.endScope===null)throw error2("endScope must be object"),MultiClassError;
remapScopeNames(mode,mode.end,{key:"endScope"}),mode.end=_rewriteBackreferences(mode.end,{joinWith:""})}}function scopeSugar(mode){mode.scope&&typeof mode.scope=="object"&&mode.scope!==null&&(mode.beginScope=mode.scope,delete mode.scope)}function MultiClass(mode){scopeSugar(mode),typeof mode.beginScope=="string"&&(mode.beginScope={_wrap:mode.beginScope}),typeof mode.endScope=="string"&&(mode.endScope={_wrap:mode.endScope}),beginMultiClass(mode),endMultiClass(mode)}function compileLanguage(language2){
function langRe(value,global2){return new RegExp(source2(value),"m"+(language2.case_insensitive?"i":"")+(language2.unicodeRegex?"u":"")+(global2?"g":""))}class MultiRegex{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(re2,opts){opts.position=this.position++,this.matchIndexes[this.matchAt]=opts,this.regexes.push([opts,re2]),this.matchAt+=countMatchGroups(re2)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const terminators=this.regexes.map(el=>el[1]);
this.matcherRe=langRe(_rewriteBackreferences(terminators,{joinWith:"|"}),!0),this.lastIndex=0}exec(s2){this.matcherRe.lastIndex=this.lastIndex;const match=this.matcherRe.exec(s2);if(!match)return null;const i=match.findIndex((el,i2)=>i2>0&&el!==void 0),matchData=this.matchIndexes[i];return match.splice(0,i),Object.assign(match,matchData)}}class ResumableMultiRegex{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(index2){if(this.multiRegexes[index2])
return this.multiRegexes[index2];const matcher=new MultiRegex;return this.rules.slice(index2).forEach(([re2,opts])=>matcher.addRule(re2,opts)),matcher.compile(),this.multiRegexes[index2]=matcher,matcher}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(re2,opts){this.rules.push([re2,opts]),opts.type==="begin"&&this.count++}exec(s2){const m=this.getMatcher(this.regexIndex);m.lastIndex=this.lastIndex;let result=m.exec(s2);if(this.resumingScanAtSamePosition()&&
!(result&&result.index===this.lastIndex)){const m2=this.getMatcher(0);m2.lastIndex=this.lastIndex+1,result=m2.exec(s2)}return result&&(this.regexIndex+=result.position+1,this.regexIndex===this.count&&this.considerAll()),result}}function buildModeRegex(mode){const mm=new ResumableMultiRegex;return mode.contains.forEach(term=>mm.addRule(term.begin,{rule:term,type:"begin"})),mode.terminatorEnd&&mm.addRule(mode.terminatorEnd,{type:"end"}),mode.illegal&&mm.addRule(mode.illegal,{type:"illegal"}),mm}function compileMode(mode,parent){
const cmode=mode;if(mode.isCompiled)return cmode;[scopeClassName,compileMatch,MultiClass,beforeMatchExt].forEach(ext=>ext(mode,parent)),language2.compilerExtensions.forEach(ext=>ext(mode,parent)),mode.__beforeBegin=null,[beginKeywords,compileIllegal,compileRelevance].forEach(ext=>ext(mode,parent)),mode.isCompiled=!0;let keywordPattern=null;return typeof mode.keywords=="object"&&mode.keywords.$pattern&&(mode.keywords=Object.assign({},mode.keywords),keywordPattern=mode.keywords.$pattern,delete mode.
keywords.$pattern),keywordPattern=keywordPattern||/\w+/,mode.keywords&&(mode.keywords=compileKeywords(mode.keywords,language2.case_insensitive)),cmode.keywordPatternRe=langRe(keywordPattern,!0),parent&&(mode.begin||(mode.begin=/\B|\b/),cmode.beginRe=langRe(cmode.begin),!mode.end&&!mode.endsWithParent&&(mode.end=/\B|\b/),mode.end&&(cmode.endRe=langRe(cmode.end)),cmode.terminatorEnd=source2(cmode.end)||"",mode.endsWithParent&&parent.terminatorEnd&&(cmode.terminatorEnd+=(mode.end?"|":"")+parent.terminatorEnd)),
mode.illegal&&(cmode.illegalRe=langRe(mode.illegal)),mode.contains||(mode.contains=[]),mode.contains=[].concat(...mode.contains.map(function(c2){return expandOrCloneMode(c2==="self"?mode:c2)})),mode.contains.forEach(function(c2){compileMode(c2,cmode)}),mode.starts&&compileMode(mode.starts,parent),cmode.matcher=buildModeRegex(cmode),cmode}if(language2.compilerExtensions||(language2.compilerExtensions=[]),language2.contains&&language2.contains.includes("self"))throw new Error("ERR: contains `self`\
 is not supported at the top-level of a language.  See documentation.");return language2.classNameAliases=inherit$1(language2.classNameAliases||{}),compileMode(language2)}function dependencyOnParent(mode){return mode?mode.endsWithParent||dependencyOnParent(mode.starts):!1}function expandOrCloneMode(mode){return mode.variants&&!mode.cachedVariants&&(mode.cachedVariants=mode.variants.map(function(variant){return inherit$1(mode,{variants:null},variant)})),mode.cachedVariants?mode.cachedVariants:dependencyOnParent(
mode)?inherit$1(mode,{starts:mode.starts?inherit$1(mode.starts):null}):Object.isFrozen(mode)?inherit$1(mode):mode}var version2="11.11.1";class HTMLInjectionError extends Error{constructor(reason,html2){super(reason),this.name="HTMLInjectionError",this.html=html2}}const escape2=escapeHTML,inherit=inherit$1,NO_MATCH=Symbol("nomatch"),MAX_KEYWORD_HITS=7,HLJS=function(hljs){const languages=Object.create(null),aliases=Object.create(null),plugins=[];let SAFE_MODE=!0;const LANGUAGE_NOT_FOUND="Could not\
 find the language '{}', did you forget to load/include a language module?",PLAINTEXT_LANGUAGE={disableAutodetect:!0,name:"Plain text",contains:[]};let options={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:TokenTreeEmitter};function shouldNotHighlight(languageName){return options.noHighlightRe.test(languageName)}function blockLanguage(block2){let classes=block2.
className+" ";classes+=block2.parentNode?block2.parentNode.className:"";const match=options.languageDetectRe.exec(classes);if(match){const language2=getLanguage(match[1]);return language2||(warn2(LANGUAGE_NOT_FOUND.replace("{}",match[1])),warn2("Falling back to no-highlight mode for this block.",block2)),language2?match[1]:"no-highlight"}return classes.split(/\s+/).find(_class=>shouldNotHighlight(_class)||getLanguage(_class))}function highlight2(codeOrLanguageName,optionsOrCode,ignoreIllegals){let code2="",
languageName="";typeof optionsOrCode=="object"?(code2=codeOrLanguageName,ignoreIllegals=optionsOrCode.ignoreIllegals,languageName=optionsOrCode.language):(deprecated2("10.7.0","highlight(lang, code, ...args) has been deprecated."),deprecated2("10.7.0",`Please use highlight(code, options) instead.
https://github.com/highlightjs/highlight.js/issues/2277`),languageName=codeOrLanguageName,code2=optionsOrCode),ignoreIllegals===void 0&&(ignoreIllegals=!0);const context={code:code2,language:languageName};fire("before:highlight",context);const result=context.result?context.result:_highlight(context.language,context.code,ignoreIllegals);return result.code=context.code,fire("after:highlight",result),result}function _highlight(languageName,codeToHighlight,ignoreIllegals,continuation){const keywordHits=Object.
create(null);function keywordData(mode,matchText){return mode.keywords[matchText]}function processKeywords(){if(!top.keywords){emitter.addText(modeBuffer);return}let lastIndex=0;top.keywordPatternRe.lastIndex=0;let match=top.keywordPatternRe.exec(modeBuffer),buf="";for(;match;){buf+=modeBuffer.substring(lastIndex,match.index);const word=language2.case_insensitive?match[0].toLowerCase():match[0],data=keywordData(top,word);if(data){const[kind,keywordRelevance]=data;if(emitter.addText(buf),buf="",keywordHits[word]=
(keywordHits[word]||0)+1,keywordHits[word]<=MAX_KEYWORD_HITS&&(relevance+=keywordRelevance),kind.startsWith("_"))buf+=match[0];else{const cssClass=language2.classNameAliases[kind]||kind;emitKeyword(match[0],cssClass)}}else buf+=match[0];lastIndex=top.keywordPatternRe.lastIndex,match=top.keywordPatternRe.exec(modeBuffer)}buf+=modeBuffer.substring(lastIndex),emitter.addText(buf)}function processSubLanguage(){if(modeBuffer==="")return;let result2=null;if(typeof top.subLanguage=="string"){if(!languages[top.
subLanguage]){emitter.addText(modeBuffer);return}result2=_highlight(top.subLanguage,modeBuffer,!0,continuations[top.subLanguage]),continuations[top.subLanguage]=result2._top}else result2=highlightAuto(modeBuffer,top.subLanguage.length?top.subLanguage:null);top.relevance>0&&(relevance+=result2.relevance),emitter.__addSublanguage(result2._emitter,result2.language)}function processBuffer(){top.subLanguage!=null?processSubLanguage():processKeywords(),modeBuffer=""}function emitKeyword(keyword2,scope2){
keyword2!==""&&(emitter.startScope(scope2),emitter.addText(keyword2),emitter.endScope())}function emitMultiClass(scope2,match){let i=1;const max2=match.length-1;for(;i<=max2;){if(!scope2._emit[i]){i++;continue}const klass=language2.classNameAliases[scope2[i]]||scope2[i],text2=match[i];klass?emitKeyword(text2,klass):(modeBuffer=text2,processKeywords(),modeBuffer=""),i++}}function startNewMode(mode,match){return mode.scope&&typeof mode.scope=="string"&&emitter.openNode(language2.classNameAliases[mode.
scope]||mode.scope),mode.beginScope&&(mode.beginScope._wrap?(emitKeyword(modeBuffer,language2.classNameAliases[mode.beginScope._wrap]||mode.beginScope._wrap),modeBuffer=""):mode.beginScope._multi&&(emitMultiClass(mode.beginScope,match),modeBuffer="")),top=Object.create(mode,{parent:{value:top}}),top}function endOfMode(mode,match,matchPlusRemainder){let matched=startsWith(mode.endRe,matchPlusRemainder);if(matched){if(mode["on:end"]){const resp=new Response2(mode);mode["on:end"](match,resp),resp.isMatchIgnored&&
(matched=!1)}if(matched){for(;mode.endsParent&&mode.parent;)mode=mode.parent;return mode}}if(mode.endsWithParent)return endOfMode(mode.parent,match,matchPlusRemainder)}function doIgnore(lexeme){return top.matcher.regexIndex===0?(modeBuffer+=lexeme[0],1):(resumeScanAtSamePosition=!0,0)}function doBeginMatch(match){const lexeme=match[0],newMode=match.rule,resp=new Response2(newMode),beforeCallbacks=[newMode.__beforeBegin,newMode["on:begin"]];for(const cb of beforeCallbacks)if(cb&&(cb(match,resp),resp.
isMatchIgnored))return doIgnore(lexeme);return newMode.skip?modeBuffer+=lexeme:(newMode.excludeBegin&&(modeBuffer+=lexeme),processBuffer(),!newMode.returnBegin&&!newMode.excludeBegin&&(modeBuffer=lexeme)),startNewMode(newMode,match),newMode.returnBegin?0:lexeme.length}function doEndMatch(match){const lexeme=match[0],matchPlusRemainder=codeToHighlight.substring(match.index),endMode=endOfMode(top,match,matchPlusRemainder);if(!endMode)return NO_MATCH;const origin2=top;top.endScope&&top.endScope._wrap?
(processBuffer(),emitKeyword(lexeme,top.endScope._wrap)):top.endScope&&top.endScope._multi?(processBuffer(),emitMultiClass(top.endScope,match)):origin2.skip?modeBuffer+=lexeme:(origin2.returnEnd||origin2.excludeEnd||(modeBuffer+=lexeme),processBuffer(),origin2.excludeEnd&&(modeBuffer=lexeme));do top.scope&&emitter.closeNode(),!top.skip&&!top.subLanguage&&(relevance+=top.relevance),top=top.parent;while(top!==endMode.parent);return endMode.starts&&startNewMode(endMode.starts,match),origin2.returnEnd?
0:lexeme.length}function processContinuations(){const list2=[];for(let current2=top;current2!==language2;current2=current2.parent)current2.scope&&list2.unshift(current2.scope);list2.forEach(item=>emitter.openNode(item))}let lastMatch={};function processLexeme(textBeforeMatch,match){const lexeme=match&&match[0];if(modeBuffer+=textBeforeMatch,lexeme==null)return processBuffer(),0;if(lastMatch.type==="begin"&&match.type==="end"&&lastMatch.index===match.index&&lexeme===""){if(modeBuffer+=codeToHighlight.
slice(match.index,match.index+1),!SAFE_MODE){const err=new Error(`0 width match regex (${languageName})`);throw err.languageName=languageName,err.badRule=lastMatch.rule,err}return 1}if(lastMatch=match,match.type==="begin")return doBeginMatch(match);if(match.type==="illegal"&&!ignoreIllegals){const err=new Error('Illegal lexeme "'+lexeme+'" for mode "'+(top.scope||"<unnamed>")+'"');throw err.mode=top,err}else if(match.type==="end"){const processed=doEndMatch(match);if(processed!==NO_MATCH)return processed}
if(match.type==="illegal"&&lexeme==="")return modeBuffer+=`
`,1;if(iterations>1e5&&iterations>match.index*3)throw new Error("potential infinite loop, way more iterations than matches");return modeBuffer+=lexeme,lexeme.length}const language2=getLanguage(languageName);if(!language2)throw error2(LANGUAGE_NOT_FOUND.replace("{}",languageName)),new Error('Unknown language: "'+languageName+'"');const md=compileLanguage(language2);let result="",top=continuation||md;const continuations={},emitter=new options.__emitter(options);processContinuations();let modeBuffer="",
relevance=0,index2=0,iterations=0,resumeScanAtSamePosition=!1;try{if(language2.__emitTokens)language2.__emitTokens(codeToHighlight,emitter);else{for(top.matcher.considerAll();;){iterations++,resumeScanAtSamePosition?resumeScanAtSamePosition=!1:top.matcher.considerAll(),top.matcher.lastIndex=index2;const match=top.matcher.exec(codeToHighlight);if(!match)break;const beforeMatch=codeToHighlight.substring(index2,match.index),processedCount=processLexeme(beforeMatch,match);index2=match.index+processedCount}
processLexeme(codeToHighlight.substring(index2))}return emitter.finalize(),result=emitter.toHTML(),{language:languageName,value:result,relevance,illegal:!1,_emitter:emitter,_top:top}}catch(err){if(err.message&&err.message.includes("Illegal"))return{language:languageName,value:escape2(codeToHighlight),illegal:!0,relevance:0,_illegalBy:{message:err.message,index:index2,context:codeToHighlight.slice(index2-100,index2+100),mode:err.mode,resultSoFar:result},_emitter:emitter};if(SAFE_MODE)return{language:languageName,
value:escape2(codeToHighlight),illegal:!1,relevance:0,errorRaised:err,_emitter:emitter,_top:top};throw err}}function justTextHighlightResult(code2){const result={value:escape2(code2),illegal:!1,relevance:0,_top:PLAINTEXT_LANGUAGE,_emitter:new options.__emitter(options)};return result._emitter.addText(code2),result}function highlightAuto(code2,languageSubset){languageSubset=languageSubset||options.languages||Object.keys(languages);const plaintext2=justTextHighlightResult(code2),results=languageSubset.
filter(getLanguage).filter(autoDetection).map(name=>_highlight(name,code2,!1));results.unshift(plaintext2);const sorted=results.sort((a,b)=>{if(a.relevance!==b.relevance)return b.relevance-a.relevance;if(a.language&&b.language){if(getLanguage(a.language).supersetOf===b.language)return 1;if(getLanguage(b.language).supersetOf===a.language)return-1}return 0}),[best,secondBest]=sorted,result=best;return result.secondBest=secondBest,result}function updateClassName(element2,currentLang,resultLang){const language2=currentLang&&
aliases[currentLang]||resultLang;element2.classList.add("hljs"),element2.classList.add(`language-${language2}`)}function highlightElement(element2){let node2=null;const language2=blockLanguage(element2);if(shouldNotHighlight(language2))return;if(fire("before:highlightElement",{el:element2,language:language2}),element2.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",element2);return}if(element2.children.length>0&&(options.ignoreUnescapedHTML||
(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(element2)),options.throwUnescapedHTML))throw new HTMLInjectionError("One of your code blocks includes unescaped HTML.",element2.innerHTML);node2=element2;const text2=node2.textContent,result=language2?highlight2(text2,{language:language2,ignoreIllegals:!0}):
highlightAuto(text2);element2.innerHTML=result.value,element2.dataset.highlighted="yes",updateClassName(element2,language2,result.language),element2.result={language:result.language,re:result.relevance,relevance:result.relevance},result.secondBest&&(element2.secondBest={language:result.secondBest.language,relevance:result.secondBest.relevance}),fire("after:highlightElement",{el:element2,result,text:text2})}function configure2(userOptions){options=inherit(options,userOptions)}const initHighlighting=()=>{
highlightAll(),deprecated2("10.6.0","initHighlighting() deprecated.  Use highlightAll() now.")};function initHighlightingOnLoad(){highlightAll(),deprecated2("10.6.0","initHighlightingOnLoad() deprecated.  Use highlightAll() now.")}let wantsHighlight=!1;function highlightAll(){function boot(){highlightAll()}if(document.readyState==="loading"){wantsHighlight||window.addEventListener("DOMContentLoaded",boot,!1),wantsHighlight=!0;return}document.querySelectorAll(options.cssSelector).forEach(highlightElement)}
function registerLanguage(languageName,languageDefinition){let lang=null;try{lang=languageDefinition(hljs)}catch(error$1){if(error2("Language definition for '{}' could not be registered.".replace("{}",languageName)),SAFE_MODE)error2(error$1);else throw error$1;lang=PLAINTEXT_LANGUAGE}lang.name||(lang.name=languageName),languages[languageName]=lang,lang.rawDefinition=languageDefinition.bind(null,hljs),lang.aliases&&registerAliases(lang.aliases,{languageName})}function unregisterLanguage(languageName){
delete languages[languageName];for(const alias of Object.keys(aliases))aliases[alias]===languageName&&delete aliases[alias]}function listLanguages(){return Object.keys(languages)}function getLanguage(name){return name=(name||"").toLowerCase(),languages[name]||languages[aliases[name]]}function registerAliases(aliasList,{languageName}){typeof aliasList=="string"&&(aliasList=[aliasList]),aliasList.forEach(alias=>{aliases[alias.toLowerCase()]=languageName})}function autoDetection(name){const lang=getLanguage(
name);return lang&&!lang.disableAutodetect}function upgradePluginAPI(plugin){plugin["before:highlightBlock"]&&!plugin["before:highlightElement"]&&(plugin["before:highlightElement"]=data=>{plugin["before:highlightBlock"](Object.assign({block:data.el},data))}),plugin["after:highlightBlock"]&&!plugin["after:highlightElement"]&&(plugin["after:highlightElement"]=data=>{plugin["after:highlightBlock"](Object.assign({block:data.el},data))})}function addPlugin(plugin){upgradePluginAPI(plugin),plugins.push(
plugin)}function removePlugin(plugin){const index2=plugins.indexOf(plugin);index2!==-1&&plugins.splice(index2,1)}function fire(event2,args){const cb=event2;plugins.forEach(function(plugin){plugin[cb]&&plugin[cb](args)})}function deprecateHighlightBlock(el){return deprecated2("10.7.0","highlightBlock will be removed entirely in v12.0"),deprecated2("10.7.0","Please use highlightElement now."),highlightElement(el)}Object.assign(hljs,{highlight:highlight2,highlightAuto,highlightAll,highlightElement,
highlightBlock:deprecateHighlightBlock,configure:configure2,initHighlighting,initHighlightingOnLoad,registerLanguage,unregisterLanguage,listLanguages,getLanguage,registerAliases,autoDetection,inherit,addPlugin,removePlugin}),hljs.debugMode=function(){SAFE_MODE=!1},hljs.safeMode=function(){SAFE_MODE=!0},hljs.versionString=version2,hljs.regex={concat:concat2,lookahead:lookahead2,either:either2,optional:optional2,anyNumberOfTimes};for(const key2 in MODES2)typeof MODES2[key2]=="object"&&deepFreeze(MODES2[key2]);
return Object.assign(hljs,MODES2),hljs},highlight=HLJS({});return highlight.newInstance=()=>HLJS({}),core$5=highlight,highlight.HighlightJS=highlight,highlight.default=highlight,core$5}var _1c_1,hasRequired_1c;function require_1c(){if(hasRequired_1c)return _1c_1;hasRequired_1c=1;function _1c2(hljs){const UNDERSCORE_IDENT_RE="[A-Za-zА-Яа-яёЁ_][A-Za-zА-Яа-яёЁ_0-9]+",KEYWORD="далее "+"возврат вызватьисключение выполнить для если и из или иначе иначеесли исключение каждого конецесли\
 конецпопытки конеццикла не новый перейти перем по пока попытка прервать продолжить тогда цикл экспорт ",METAKEYWORD="загрузитьизфайла "+"вебклиент вместо внешнеесоединение клиент конецобласти мобильноеприложениеклиент мобильноеприложениесервер наклиенте наклиентенасервере наклиентенасерверебезконтекста насервере насерверебезконтекста область перед после сервер толстыйклиентобычноеприложение т\
олстыйклиентуправляемоеприложение тонкийклиент ",BUILTIN="разделительстраниц разделительстрок символтабуляции "+"ansitooem oemtoansi ввестивидсубконто ввестиперечисление ввестипериод ввестиплансчетов выбранныйплансчетов датагод датамесяц датачисло заголовоксистемы значениевстроку значениеизстроки каталогиб каталогпользователя кодсимв конгода конецпериодаби конецрассчитанногопериодаби конецстандартногоин\
тервала конквартала конмесяца коннедели лог лог10 максимальноеколичествосубконто названиеинтерфейса названиенабораправ назначитьвид назначитьсчет найтиссылки началопериодаби началостандартногоинтервала начгода начквартала начмесяца начнедели номерднягода номерднянедели номернеделигода обработкаожидания основнойжурналрасчетов основнойплансчетов основнойязык очиститьокносообщений периодстр получитьвремята получитьдатута получитьдокументта получитьзначенияотбора получитьпозициюта получитьпустоезнач\
ение получитьта префиксавтонумерации пропись пустоезначение разм разобратьпозициюдокумента рассчитатьрегистрына рассчитатьрегистрыпо симв создатьобъект статусвозврата стрколичествострок сформироватьпозициюдокумента счетпокоду текущеевремя типзначения типзначениястр установитьтана установитьтапо фиксшаблон шаблон "+
"acos asin atan base64значение base64строка cos exp log log10 pow sin sqrt tan xmlзначение xmlстрока xmlтип xmlтипзнч активноеокно безопасныйрежим безопасныйрежимразделенияданных булево ввестидату ввестизначение ввестистроку ввестичисло возможностьчтенияxml вопрос восстановитьзначение врег выгрузитьжурналрегистрации выполнитьобработкуоповещения выполнитьпроверкуправдоступа вычислить год данныеформывзначение дата день деньгода деньнедели добавитьмесяц заблокироватьданныедляредактирования заблокир\
оватьработупользователя завершитьработусистемы загрузитьвнешнююкомпоненту закрытьсправку записатьjson записатьxml записатьдатуjson записьжурналарегистрации заполнитьзначениясвойств запроситьразрешениепользователя запуститьприложение запуститьсистему зафиксироватьтранзакцию значениевданныеформы значениевстрокувнутр значениевфайл значениезаполнено значениеизстрокивнутр значениеизфайла изxmlтипа импортмоделиxdto имякомпьютера имяпользователя инициализироватьпредопределенныеданные информацияобошибке\
 каталогбиблиотекимобильногоустройства каталогвременныхфайлов каталогдокументов каталогпрограммы кодироватьстроку кодлокализацииинформационнойбазы кодсимвола командасистемы конецгода конецдня конецквартала конецмесяца конецминуты конецнедели конецчаса конфигурациябазыданныхизмененадинамически конфигурацияизменена копироватьданныеформы копироватьфайл краткоепредставлениеошибки лев макс местноевремя месяц мин минута монопольныйрежим найти найтинедопустимыесимволыxml найтиокнопонавигационнойссылке \
найтипомеченныенаудаление найтипоссылкам найтифайлы началогода началодня началоквартала началомесяца началоминуты началонедели началочаса начатьзапросразрешенияпользователя начатьзапускприложения начатькопированиефайла начатьперемещениефайла начатьподключениевнешнейкомпоненты начатьподключениерасширенияработыскриптографией начатьподключениерасширенияработысфайлами начатьпоискфайлов начатьполучениекаталогавременныхфайлов начатьполучениекаталогадокументов начатьполучениерабочегокаталогаданныхпольз\
ователя начатьполучениефайлов начатьпомещениефайла начатьпомещениефайлов начатьсозданиедвоичныхданныхизфайла начатьсозданиекаталога начатьтранзакцию начатьудалениефайлов начатьустановкувнешнейкомпоненты начатьустановкурасширенияработыскриптографией начатьустановкурасширенияработысфайлами неделягода необходимостьзавершениясоединения номерсеансаинформационнойбазы номерсоединенияинформационнойбазы нрег нстр обновитьинтерфейс обновитьнумерациюобъектов обновитьповторноиспользуемыезначения обработкапр\
ерыванияпользователя объединитьфайлы окр описаниеошибки оповестить оповеститьобизменении отключитьобработчикзапросанастроекклиенталицензирования отключитьобработчикожидания отключитьобработчикоповещения открытьзначение открытьиндекссправки открытьсодержаниесправки открытьсправку открытьформу открытьформумодально отменитьтранзакцию очиститьжурналрегистрации очиститьнастройкипользователя очиститьсообщения параметрыдоступа перейтипонавигационнойссылке переместитьфайл подключитьвнешнююкомпоненту под\
ключитьобработчикзапросанастроекклиенталицензирования подключитьобработчикожидания подключитьобработчикоповещения подключитьрасширениеработыскриптографией подключитьрасширениеработысфайлами подробноепредставлениеошибки показатьвводдаты показатьвводзначения показатьвводстроки показатьвводчисла показатьвопрос показатьзначение показатьинформациюобошибке показатьнакарте показатьоповещениепользователя показатьпредупреждение полноеимяпользователя получитьcomобъект получитьxmlтип получитьадреспоместопо\
ложению получитьблокировкусеансов получитьвремязавершенияспящегосеанса получитьвремязасыпанияпассивногосеанса получитьвремяожиданияблокировкиданных получитьданныевыбора получитьдополнительныйпараметрклиенталицензирования получитьдопустимыекодылокализации получитьдопустимыечасовыепояса получитьзаголовокклиентскогоприложения получитьзаголовоксистемы получитьзначенияотборажурналарегистрации получитьидентификаторконфигурации получитьизвременногохранилища получитьимявременногофайла получитьимяклиента\
лицензирования получитьинформациюэкрановклиента получитьиспользованиежурналарегистрации получитьиспользованиесобытияжурналарегистрации получитькраткийзаголовокприложения получитьмакетоформления получитьмаскувсефайлы получитьмаскувсефайлыклиента получитьмаскувсефайлысервера получитьместоположениепоадресу получитьминимальнуюдлинупаролейпользователей получитьнавигационнуюссылку получитьнавигационнуюссылкуинформационнойбазы получитьобновлениеконфигурациибазыданных получитьобновлениепредопределенныхд\
анныхинформационнойбазы получитьобщиймакет получитьобщуюформу получитьокна получитьоперативнуюотметкувремени получитьотключениебезопасногорежима получитьпараметрыфункциональныхопцийинтерфейса получитьполноеимяпредопределенногозначения получитьпредставлениянавигационныхссылок получитьпроверкусложностипаролейпользователей получитьразделительпути получитьразделительпутиклиента получитьразделительпутисервера получитьсеансыинформационнойбазы получитьскоростьклиентскогосоединения получитьсоединенияинф\
ормационнойбазы получитьсообщенияпользователю получитьсоответствиеобъектаиформы получитьсоставстандартногоинтерфейсаodata получитьструктурухранениябазыданных получитьтекущийсеансинформационнойбазы получитьфайл получитьфайлы получитьформу получитьфункциональнуюопцию получитьфункциональнуюопциюинтерфейса получитьчасовойпоясинформационнойбазы пользователиос поместитьвовременноехранилище поместитьфайл поместитьфайлы прав праводоступа предопределенноезначение представлениекодалокализации представлени\
епериода представлениеправа представлениеприложения представлениесобытияжурналарегистрации представлениечасовогопояса предупреждение прекратитьработусистемы привилегированныйрежим продолжитьвызов прочитатьjson прочитатьxml прочитатьдатуjson пустаястрока рабочийкаталогданныхпользователя разблокироватьданныедляредактирования разделитьфайл разорватьсоединениесвнешнимисточникомданных раскодироватьстроку рольдоступна секунда сигнал символ скопироватьжурналрегистрации смещениелетнеговремени смещениест\
андартноговремени соединитьбуферыдвоичныхданных создатькаталог создатьфабрикуxdto сокрл сокрлп сокрп сообщить состояние сохранитьзначение сохранитьнастройкипользователя сред стрдлина стрзаканчиваетсяна стрзаменить стрнайти стрначинаетсяс строка строкасоединенияинформационнойбазы стрполучитьстроку стрразделить стрсоединить стрсравнить стрчисловхождений стрчислострок стршаблон текущаядата текущаядатасеанса текущаяуниверсальнаядата текущаяуниверсальнаядатавмиллисекундах текущийвариантинтерфейсаклие\
нтскогоприложения текущийвариантосновногошрифтаклиентскогоприложения текущийкодлокализации текущийрежимзапуска текущийязык текущийязыксистемы тип типзнч транзакцияактивна трег удалитьданныеинформационнойбазы удалитьизвременногохранилища удалитьобъекты удалитьфайлы универсальноевремя установитьбезопасныйрежим установитьбезопасныйрежимразделенияданных установитьблокировкусеансов установитьвнешнююкомпоненту установитьвремязавершенияспящегосеанса установитьвремязасыпанияпассивногосеанса установитьвр\
емяожиданияблокировкиданных установитьзаголовокклиентскогоприложения установитьзаголовоксистемы установитьиспользованиежурналарегистрации установитьиспользованиесобытияжурналарегистрации установитькраткийзаголовокприложения установитьминимальнуюдлинупаролейпользователей установитьмонопольныйрежим установитьнастройкиклиенталицензирования установитьобновлениепредопределенныхданныхинформационнойбазы установитьотключениебезопасногорежима установитьпараметрыфункциональныхопцийинтерфейса установитьпри\
вилегированныйрежим установитьпроверкусложностипаролейпользователей установитьрасширениеработыскриптографией установитьрасширениеработысфайлами установитьсоединениесвнешнимисточникомданных установитьсоответствиеобъектаиформы установитьсоставстандартногоинтерфейсаodata установитьчасовойпоясинформационнойбазы установитьчасовойпояссеанса формат цел час часовойпояс часовойпояссеанса число числопрописью этоадресвременногохранилища "+
"wsссылки библиотекакартинок библиотекамакетовоформлениякомпоновкиданных библиотекастилей бизнеспроцессы внешниеисточникиданных внешниеобработки внешниеотчеты встроенныепокупки главныйинтерфейс главныйстиль документы доставляемыеуведомления журналыдокументов задачи информацияобинтернетсоединении использованиерабочейдаты историяработыпользователя константы критерииотбора метаданные обработки отображениерекламы отправкадоставляемыхуведомлений отчеты панельзадачос параметрзапуска параметрысеанса пе\
речисления планывидоврасчета планывидовхарактеристик планыобмена планысчетов полнотекстовыйпоиск пользователиинформационнойбазы последовательности проверкавстроенныхпокупок рабочаядата расширенияконфигурации регистрыбухгалтерии регистрынакопления регистрырасчета регистрысведений регламентныезадания сериализаторxdto справочники средствагеопозиционирования средствакриптографии средствамультимедиа средстваотображениярекламы средствапочты средствателефонии фабрикаxdto файловыепотоки фоновыезадания х\
ранилищанастроек хранилищевариантовотчетов хранилищенастроекданныхформ хранилищеобщихнастроек хранилищепользовательскихнастроекдинамическихсписков хранилищепользовательскихнастроекотчетов хранилищесистемныхнастроек ",CLASS2="webцвета windowsцвета windowsшрифты библиотекакартинок рамкистиля с\
имволы цветастиля шрифтыстиля "+"автоматическоесохранениеданныхформывнастройках автонумерациявформе автораздвижениесерий анимациядиаграммы вариантвыравниванияэлементовизаголовков вариантуправлениявысотойтаблицы вертикальнаяпрокруткаформы вертикальноеположение вертикальноеположениеэлемента видгруппыформы виддекорацииформы виддополненияэлементаформы видизмененияданных видкнопкиформы видпереключателя видподписейкдиаграмме видполяформы видфлажка влияниеразмеранапузырекдиаг\
раммы горизонтальноеположение горизонтальноеположениеэлемента группировкаколонок группировкаподчиненныхэлементовформы группыиэлементы действиеперетаскивания дополнительныйрежимотображения допустимыедействияперетаскивания интервалмеждуэлементамиформы использованиевывода использованиеполосыпрокрутки используемоезначениеточкибиржевойдиаграммы историявыборапривводе источникзначенийоситочекдиаграммы источникзначенияразмерапузырькадиаграммы категориягруппыкоманд максимумсерий начальноеотображениедерев\
а начальноеотображениесписка обновлениетекстаредактирования ориентациядендрограммы ориентациядиаграммы ориентацияметокдиаграммы ориентацияметоксводнойдиаграммы ориентацияэлементаформы отображениевдиаграмме отображениевлегендедиаграммы отображениегруппыкнопок отображениезаголовкашкалыдиаграммы отображениезначенийсводнойдиаграммы отображениезначенияизмерительнойдиаграммы отображениеинтерваладиаграммыганта отображениекнопки отображениекнопкивыбора отображениеобсужденийформы отображениеобычнойгруппы\
 отображениеотрицательныхзначенийпузырьковойдиаграммы отображениепанелипоиска отображениеподсказки отображениепредупрежденияприредактировании отображениеразметкиполосырегулирования отображениестраницформы отображениетаблицы отображениетекстазначениядиаграммыганта отображениеуправленияобычнойгруппы отображениефигурыкнопки палитрацветовдиаграммы поведениеобычнойгруппы поддержкамасштабадендрограммы поддержкамасштабадиаграммыганта поддержкамасштабасводнойдиаграммы поисквтаблицепривводе положениезаго\
ловкаэлементаформы положениекартинкикнопкиформы положениекартинкиэлементаграфическойсхемы положениекоманднойпанелиформы положениекоманднойпанелиэлементаформы положениеопорнойточкиотрисовки положениеподписейкдиаграмме положениеподписейшкалызначенийизмерительнойдиаграммы положениесостоянияпросмотра положениестрокипоиска положениетекстасоединительнойлинии положениеуправленияпоиском положениешкалывремени порядокотображенияточекгоризонтальнойгистограммы порядоксерийвлегендедиаграммы размеркартинки ра\
сположениезаголовкашкалыдиаграммы растягиваниеповертикалидиаграммыганта режимавтоотображениясостояния режимвводастроктаблицы режимвыборанезаполненного режимвыделениядаты режимвыделениястрокитаблицы режимвыделениятаблицы режимизмененияразмера режимизменениясвязанногозначения режимиспользованиядиалогапечати режимиспользованияпараметракоманды режиммасштабированияпросмотра режимосновногоокнаклиентскогоприложения режимоткрытияокнаформы режимотображениявыделения режимотображениягеографическойсхемы реж\
имотображениязначенийсерии режимотрисовкисеткиграфическойсхемы режимполупрозрачностидиаграммы режимпробеловдиаграммы режимразмещениянастранице режимредактированияколонки режимсглаживаниядиаграммы режимсглаживанияиндикатора режимсписказадач сквозноевыравнивание сохранениеданныхформывнастройках способзаполнениятекстазаголовкашкалыдиаграммы способопределенияограничивающегозначениядиаграммы стандартнаягруппакоманд стандартноеоформление статусоповещенияпользователя стильстрелки типаппроксимациилиниит\
рендадиаграммы типдиаграммы типединицышкалывремени типимпортасерийслоягеографическойсхемы типлиниигеографическойсхемы типлиниидиаграммы типмаркерагеографическойсхемы типмаркерадиаграммы типобластиоформления типорганизацииисточникаданныхгеографическойсхемы типотображениясериислоягеографическойсхемы типотображенияточечногообъектагеографическойсхемы типотображенияшкалыэлементалегендыгеографическойсхемы типпоискаобъектовгеографическойсхемы типпроекциигеографическойсхемы типразмещенияизмерений типраз\
мещенияреквизитовизмерений типрамкиэлементауправления типсводнойдиаграммы типсвязидиаграммыганта типсоединениязначенийпосериямдиаграммы типсоединенияточекдиаграммы типсоединительнойлинии типстороныэлементаграфическойсхемы типформыотчета типшкалырадарнойдиаграммы факторлиниитрендадиаграммы фигуракнопки фигурыграфическойсхемы фиксациявтаблице форматдняшкалывремени форматкартинки ширинаподчиненныхэлементовформы "+
"виддвижениябухгалтерии виддвижениянакопления видпериодарегистрарасчета видсчета видточкимаршрутабизнеспроцесса использованиеагрегатарегистранакопления использованиегруппиэлементов использованиережимапроведения использованиесреза периодичностьагрегатарегистранакопления режимавтовремя режимзаписидокумента режимпроведениядокумента "+
"авторегистрацияизменений допустимыйномерсообщения отправкаэлементаданных получениеэлементаданных "+"использованиерасшифровкитабличногодокумента ориентациястраницы положениеитоговколоноксводнойтаблицы положениеитоговстроксводнойтаблицы положениетекстаотносительнокартинки расположениезаголовкагруппировкитабличногодокумента способчтениязначенийтабличногодокумента типдвустороннейпечати типзаполненияобластит\
абличногодокумента типкурсоровтабличногодокумента типлиниирисункатабличногодокумента типлинииячейкитабличногодокумента типнаправленияпереходатабличногодокумента типотображениявыделениятабличногодокумента типотображениялинийсводнойтаблицы типразмещениятекстатабличногодокумента типрисункатабличногодокумента типсмещениятабличногодокумента типузоратабличногодокумента типфайлатабличногодокумента точностьпечати чередованиерасположениястраниц "+
"отображениевремениэлементовпланировщика "+"типфайлаформатированногодокумента "+"обходрезультатазапроса типзаписизапроса "+"видзаполнениярасшифровкипостроителяотчета типдобавленияпредставлений типизмеренияпостроителяотчета типразмещенияитогов "+"доступкфайлу режимдиалогавыбо\
рафайла режимоткрытияфайла "+"типизмеренияпостроителязапроса "+"видданныханализа методкластеризации типединицыинтервалавременианализаданных типзаполнениятаблицырезультатаанализаданных типиспользованиячисловыхзначенийанализаданных типисточникаданныхпоискаассоциаций типколонкианализаданныхдереворешений типколонкианализаданныхкластеризация типколонкианализаданныхобщаястатистика типколонкианализаданныхпоискассоциаций типколонкианализаданныхпоиск\
последовательностей типколонкимоделипрогноза типмерырасстоянияанализаданных типотсеченияправилассоциации типполяанализаданных типстандартизациианализаданных типупорядочиванияправилассоциациианализаданных типупорядочиванияшаблоновпоследовательностейанализаданных типупрощениядереварешений "+
"wsнаправлениепараметра вариантxpathxs вариантзаписидатыjson вариантпростоготипаxs видгруппымоделиxs видфасетаxdto действиепостроителяdom завершенностьпростоготипаxs завершенностьсоставноготипаxs завершенностьсхемыxs запрещенныеподстановкиxs исключениягруппподстановкиxs категорияиспользованияатрибутаxs категорияограниченияидентичностиxs категорияограниченияпространствименxs методнаследованияxs модельсодержимогоxs назначениетипаxml недопустимыеподстановкиxs обработкапробельныхсимволовxs обработка\
содержимогоxs ограничениезначенияxs параметрыотбораузловdom переносстрокjson позициявдокументеdom пробельныесимволыxml типатрибутаxml типзначенияjson типканоническогоxml типкомпонентыxs типпроверкиxml типрезультатаdomxpath типузлаdom типузлаxml формаxml формапредставленияxs форматдатыjson экранированиесимволовjson "+
"видсравнениякомпоновкиданных действиеобработкирасшифровкикомпоновкиданных направлениесортировкикомпоновкиданных расположениевложенныхэлементоврезультатакомпоновкиданных расположениеитоговкомпоновкиданных расположениегруппировкикомпоновкиданных расположениеполейгруппировкикомпоновкиданных расположениеполякомпоновкиданных расположениереквизитовкомпоновкиданных расположениересурсовкомпоновкиданных типбухгалтерскогоостаткакомпоновкиданных типвыводатекстакомпоновкиданных типгруппировкикомпоновкиданн\
ых типгруппыэлементовотборакомпоновкиданных типдополненияпериодакомпоновкиданных типзаголовкаполейкомпоновкиданных типмакетагруппировкикомпоновкиданных типмакетаобластикомпоновкиданных типостаткакомпоновкиданных типпериодакомпоновкиданных типразмещениятекстакомпоновкиданных типсвязинаборовданныхкомпоновкиданных типэлементарезультатакомпоновкиданных расположениелегендыдиаграммыкомпоновкиданных типпримененияотборакомпоновкиданных режимотображенияэлементанастройкикомпоновкиданных режимотображенияна\
строеккомпоновкиданных состояниеэлементанастройкикомпоновкиданных способвосстановлениянастроеккомпоновкиданных режимкомпоновкирезультата использованиепараметракомпоновкиданных автопозицияресурсовкомпоновкиданных вариантиспользованиягруппировкикомпоновкиданных расположениересурсоввдиаграммекомпоновкиданных фиксациякомпоновкиданных использованиеусловногооформлениякомпоновкиданных "+
"важностьинтернетпочтовогосообщения обработкатекстаинтернетпочтовогосообщения способкодированияинтернетпочтовоговложения способкодированиянеasciiсимволовинтернетпочтовогосообщения типтекстапочтовогосообщения протоколинтернетпочты статусразборапочтовогосообщения "+
"режимтранзакциизаписижурналарегистрации статустранзакциизаписижурналарегистрации уровеньжурналарегистрации "+"расположениехранилищасертификатовкриптографии режимвключениясертификатовкриптографии режимпроверкисертификатакриптографии типхранилищасертификатовкриптографии "+
"кодировкаименфайловвzipфайле методсжатияzip методшифрованияzip режимвосстановленияпутейфайловzip режимобработкиподкаталоговzip режимсохраненияпутейzip уровеньсжатияzip "+"звуковоеоповещение направлениепереходакстроке позициявпотоке порядокбайтов режимблокировкиданных режимуправленияблокировкойданных сервисвстроенныхпокупок состояниефоновогозадания типподпис\
чикадоставляемыхуведомлений уровеньиспользованиязащищенногосоединенияftp "+"направлениепорядкасхемызапроса типдополненияпериодамисхемызапроса типконтрольнойточкисхемызапроса типобъединениясхемызапроса типпараметрадоступнойтаблицысхемызапроса типсоединениясхемызапроса "+
"httpметод автоиспользованиеобщегореквизита автопрефиксномеразадачи вариантвстроенногоязыка видиерархии видрегистранакопления видтаблицывнешнегоисточникаданных записьдвиженийприпроведении заполнениепоследовательностей индексирование использованиебазыпланавидоврасчета использованиебыстроговыбора использованиеобщегореквизита использованиеподчинения использованиеполнотекстовогопоиска использованиеразделяемыхданныхобщегореквизита использованиереквизита назначениеиспользованияприложения назначениерас\
ширенияконфигурации направлениепередачи обновлениепредопределенныхданных оперативноепроведение основноепредставлениевидарасчета основноепредставлениевидахарактеристики основноепредставлениезадачи основноепредставлениепланаобмена основноепредставлениесправочника основноепредставлениесчета перемещениеграницыприпроведении периодичностьномерабизнеспроцесса периодичностьномерадокумента периодичностьрегистрарасчета периодичностьрегистрасведений повторноеиспользованиевозвращаемыхзначений полнотекстовый\
поискпривводепостроке принадлежностьобъекта проведение разделениеаутентификацииобщегореквизита разделениеданныхобщегореквизита разделениерасширенийконфигурацииобщегореквизита режимавтонумерацииобъектов режимзаписирегистра режимиспользованиямодальности режимиспользованиясинхронныхвызововрасширенийплатформыивнешнихкомпонент режимповторногоиспользованиясеансов режимполученияданныхвыборапривводепостроке режимсовместимости режимсовместимостиинтерфейса режимуправленияблокировкойданныхпоумолчанию серии\
кодовпланавидовхарактеристик сериикодовпланасчетов сериикодовсправочника созданиепривводе способвыбора способпоискастрокипривводепостроке способредактирования типданныхтаблицывнешнегоисточникаданных типкодапланавидоврасчета типкодасправочника типмакета типномерабизнеспроцесса типномерадокумента типномеразадачи типформы удалениедвижений "+
"важностьпроблемыприменениярасширенияконфигурации вариантинтерфейсаклиентскогоприложения вариантмасштабаформклиентскогоприложения вариантосновногошрифтаклиентскогоприложения вариантстандартногопериода вариантстандартнойдатыначала видграницы видкартинки видотображенияполнотекстовогопоиска видрамки видсравнения видцвета видчисловогозначения видшрифта допустимаядлина допустимыйзнак использованиеbyteordermark использованиеметаданныхполнотекстовогопоиска источникрасширенийконфигурации клавиша кодвозв\
ратадиалога кодировкаxbase кодировкатекста направлениепоиска направлениесортировки обновлениепредопределенныхданных обновлениеприизмененииданных отображениепанелиразделов проверказаполнения режимдиалогавопрос режимзапускаклиентскогоприложения режимокругления режимоткрытияформприложения режимполнотекстовогопоиска скоростьклиентскогосоединения состояниевнешнегоисточникаданных состояниеобновленияконфигурациибазыданных способвыборасертификатаwindows способкодированиястроки статуссообщения типвнешней\
компоненты типплатформы типповеденияклавишиenter типэлементаинформацииовыполненииобновленияконфигурациибазыданных уровеньизоляциитранзакций хешфункция частидаты",TYPE="comобъект ftpсоединение httpзапрос httpсервисответ httpсоединение wsопределения wsпрокси xbase анализданных аннотацияxs блокировкаданных буфердвоичныхданных включениеxs выражениекомпо\
новкиданных генераторслучайныхчисел географическаясхема географическиекоординаты графическаясхема группамоделиxs данныерасшифровкикомпоновкиданных двоичныеданные дендрограмма диаграмма диаграммаганта диалогвыборафайла диалогвыборацвета диалогвыборашрифта диалограсписаниярегламентногозадания диалогредактированиястандартногопериода диапазон документdom документhtml документацияxs доставляемоеуведомление записьdom записьfastinfoset записьhtml записьjson записьxml записьzipфайла записьданных записьт\
екста записьузловdom запрос защищенноесоединениеopenssl значенияполейрасшифровкикомпоновкиданных извлечениетекста импортxs интернетпочта интернетпочтовоесообщение интернетпочтовыйпрофиль интернетпрокси интернетсоединение информациядляприложенияxs использованиеатрибутаxs использованиесобытияжурналарегистрации источникдоступныхнастроеккомпоновкиданных итераторузловdom картинка квалификаторыдаты квалификаторыдвоичныхданных квалификаторыстроки квалификаторычисла компоновщикмакетакомпоновкиданных ком\
поновщикнастроеккомпоновкиданных конструктормакетаоформлениякомпоновкиданных конструкторнастроеккомпоновкиданных конструкторформатнойстроки линия макеткомпоновкиданных макетобластикомпоновкиданных макетоформлениякомпоновкиданных маскаxs менеджеркриптографии наборсхемxml настройкикомпоновкиданных настройкисериализацииjson обработкакартинок обработкарасшифровкикомпоновкиданных обходдереваdom объявлениеатрибутаxs объявлениенотацииxs объявлениеэлементаxs описаниеиспользованиясобытиядоступжурналареги\
страции описаниеиспользованиясобытияотказвдоступежурналарегистрации описаниеобработкирасшифровкикомпоновкиданных описаниепередаваемогофайла описаниетипов определениегруппыатрибутовxs определениегруппымоделиxs определениеограниченияидентичностиxs определениепростоготипаxs определениесоставноготипаxs определениетипадокументаdom определенияxpathxs отборкомпоновкиданных пакетотображаемыхдокументов параметрвыбора параметркомпоновкиданных параметрызаписиjson параметрызаписиxml параметрычтенияxml перео\
пределениеxs планировщик полеанализаданных полекомпоновкиданных построительdom построительзапроса построительотчета построительотчетаанализаданных построительсхемxml поток потоквпамяти почта почтовоесообщение преобразованиеxsl преобразованиекканоническомуxml процессорвыводарезультатакомпоновкиданныхвколлекциюзначений процессорвыводарезультатакомпоновкиданныхвтабличныйдокумент процессоркомпоновкиданных разыменовательпространствименdom рамка расписаниерегламентногозадания расширенноеимяxml результ\
атчтенияданных своднаядиаграмма связьпараметравыбора связьпотипу связьпотипукомпоновкиданных сериализаторxdto сертификатклиентаwindows сертификатклиентафайл сертификаткриптографии сертификатыудостоверяющихцентровwindows сертификатыудостоверяющихцентровфайл сжатиеданных системнаяинформация сообщениепользователю сочетаниеклавиш сравнениезначений стандартнаядатаначала стандартныйпериод схемаxml схемакомпоновкиданных табличныйдокумент текстовыйдокумент тестируемоеприложение типданныхxml уникальныйид\
ентификатор фабрикаxdto файл файловыйпоток фасетдлиныxs фасетколичестваразрядовдробнойчастиxs фасетмаксимальноговключающегозначенияxs фасетмаксимальногоисключающегозначенияxs фасетмаксимальнойдлиныxs фасетминимальноговключающегозначенияxs фасетминимальногоисключающегозначенияxs фасетминимальнойдлиныxs фасетобразцаxs фасетобщегоколичестваразрядовxs фасетперечисленияxs фасетпробельныхсимволовxs фильтрузловdom форматированнаястрока форматированныйдокумент фрагментxs хешированиеданных хранилищезначе\
ния цвет чтениеfastinfoset чтениеhtml чтениеjson чтениеxml чтениеzipфайла чтениеданных чтениетекста чтениеузловdom шрифт элементрезультатакомпоновкиданных "+"comsafearray деревозначений массив соответствие списокзначений структура таблицазначений фиксированнаяструктура фиксированноесоответствие фиксированныймассив ",
LITERAL="null истина ложь неопределено",NUMBERS=hljs.inherit(hljs.NUMBER_MODE),STRINGS={className:"string",begin:'"|\\|',end:'"|$',contains:[{begin:'""'}]},DATE2={begin:"'",end:"'",excludeBegin:!0,excludeEnd:!0,contains:[{className:"number",begin:"\\d{4}([\\.\\\\/:-]?\\d{2}){0,5}"}]},PUNCTUATION={match:/[;()+\-:=,]/,className:"punctuation",relevance:0},COMMENTS=hljs.inherit(hljs.C_LINE_COMMENT_MODE),META={className:"meta",begin:"#|&",end:"$",keywords:{$pattern:UNDERSCORE_IDENT_RE,
keyword:KEYWORD+METAKEYWORD},contains:[COMMENTS]},SYMBOL={className:"symbol",begin:"~",end:";|:",excludeEnd:!0},FUNCTION={className:"function",variants:[{begin:"процедура|функция",end:"\\)",keywords:"процедура функция"},{begin:"конецпроцедуры|конецфункции",keywords:"конецпроцедуры конецфункции"}],contains:[{begin:"\\(",end:"\\)",endsParent:!0,contains:[{className:"params",begin:UNDERSCORE_IDENT_RE,end:",",excludeEnd:!0,
endsWithParent:!0,keywords:{$pattern:UNDERSCORE_IDENT_RE,keyword:"знач",literal:LITERAL},contains:[NUMBERS,STRINGS,DATE2]},COMMENTS]},hljs.inherit(hljs.TITLE_MODE,{begin:UNDERSCORE_IDENT_RE})]};return{name:"1C:Enterprise",case_insensitive:!0,keywords:{$pattern:UNDERSCORE_IDENT_RE,keyword:KEYWORD,built_in:BUILTIN,class:CLASS2,type:TYPE,literal:LITERAL},contains:[META,FUNCTION,COMMENTS,SYMBOL,NUMBERS,STRINGS,DATE2,PUNCTUATION]}}return _1c_1=_1c2,_1c_1}var abnf_1,hasRequiredAbnf;function requireAbnf(){
if(hasRequiredAbnf)return abnf_1;hasRequiredAbnf=1;function abnf2(hljs){const regex=hljs.regex,IDENT=/^[a-zA-Z][a-zA-Z0-9-]*/,KEYWORDS2=["ALPHA","BIT","CHAR","CR","CRLF","CTL","DIGIT","DQUOTE","HEXDIG","HTAB","LF","LWSP","OCTET","SP","VCHAR","WSP"],COMMENT=hljs.COMMENT(/;/,/$/),TERMINAL_BINARY={scope:"symbol",match:/%b[0-1]+(-[0-1]+|(\.[0-1]+)+)?/},TERMINAL_DECIMAL={scope:"symbol",match:/%d[0-9]+(-[0-9]+|(\.[0-9]+)+)?/},TERMINAL_HEXADECIMAL={scope:"symbol",match:/%x[0-9A-F]+(-[0-9A-F]+|(\.[0-9A-F]+)+)?/},
CASE_SENSITIVITY={scope:"symbol",match:/%[si](?=".*")/},RULE_DECLARATION={scope:"attribute",match:regex.concat(IDENT,/(?=\s*=)/)};return{name:"Augmented Backus-Naur Form",illegal:/[!@#$^&',?+~`|:]/,keywords:KEYWORDS2,contains:[{scope:"operator",match:/=\/?/},RULE_DECLARATION,COMMENT,TERMINAL_BINARY,TERMINAL_DECIMAL,TERMINAL_HEXADECIMAL,CASE_SENSITIVITY,hljs.QUOTE_STRING_MODE,hljs.NUMBER_MODE]}}return abnf_1=abnf2,abnf_1}var accesslog_1,hasRequiredAccesslog;function requireAccesslog(){if(hasRequiredAccesslog)
return accesslog_1;hasRequiredAccesslog=1;function accesslog2(hljs){const regex=hljs.regex,HTTP_VERBS=["GET","POST","HEAD","PUT","DELETE","CONNECT","OPTIONS","PATCH","TRACE"];return{name:"Apache Access Log",contains:[{className:"number",begin:/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}(:\d{1,5})?\b/,relevance:5},{className:"number",begin:/\b\d+\b/,relevance:0},{className:"string",begin:regex.concat(/"/,regex.either(...HTTP_VERBS)),end:/"/,keywords:HTTP_VERBS,illegal:/\n/,relevance:5,contains:[{begin:/HTTP\/[12]\.\d'/,
relevance:5}]},{className:"string",begin:/\[\d[^\]\n]{8,}\]/,illegal:/\n/,relevance:1},{className:"string",begin:/\[/,end:/\]/,illegal:/\n/,relevance:0},{className:"string",begin:/"Mozilla\/\d\.\d \(/,end:/"/,illegal:/\n/,relevance:3},{className:"string",begin:/"/,end:/"/,illegal:/\n/,relevance:0}]}}return accesslog_1=accesslog2,accesslog_1}var actionscript_1,hasRequiredActionscript;function requireActionscript(){if(hasRequiredActionscript)return actionscript_1;hasRequiredActionscript=1;function actionscript2(hljs){
const regex=hljs.regex,IDENT_RE2=/[a-zA-Z_$][a-zA-Z0-9_$]*/,PKG_NAME_RE=regex.concat(IDENT_RE2,regex.concat("(\\.",IDENT_RE2,")*")),IDENT_FUNC_RETURN_TYPE_RE=/([*]|[a-zA-Z_$][a-zA-Z0-9_$]*)/,AS3_REST_ARG_MODE={className:"rest_arg",begin:/[.]{3}/,end:IDENT_RE2,relevance:10};return{name:"ActionScript",aliases:["as"],keywords:{keyword:["as","break","case","catch","class","const","continue","default","delete","do","dynamic","each","else","extends","final","finally","for","function","get","if","imple\
ments","import","in","include","instanceof","interface","internal","is","namespace","native","new","override","package","private","protected","public","return","set","static","super","switch","this","throw","try","typeof","use","var","void","while","with"],literal:["true","false","null","undefined"]},contains:[hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.C_NUMBER_MODE,{match:[/\bpackage/,/\s+/,PKG_NAME_RE],className:{1:"keyword",3:"title.cl\
ass"}},{match:[/\b(?:class|interface|extends|implements)/,/\s+/,IDENT_RE2],className:{1:"keyword",3:"title.class"}},{className:"meta",beginKeywords:"import include",end:/;/,keywords:{keyword:"import include"}},{beginKeywords:"function",end:/[{;]/,excludeEnd:!0,illegal:/\S/,contains:[hljs.inherit(hljs.TITLE_MODE,{className:"title.function"}),{className:"params",begin:/\(/,end:/\)/,contains:[hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,AS3_REST_ARG_MODE]},
{begin:regex.concat(/:\s*/,IDENT_FUNC_RETURN_TYPE_RE)}]},hljs.METHOD_GUARD],illegal:/#/}}return actionscript_1=actionscript2,actionscript_1}var ada_1,hasRequiredAda;function requireAda(){if(hasRequiredAda)return ada_1;hasRequiredAda=1;function ada2(hljs){const INTEGER_RE="\\d(_|\\d)*",EXPONENT_RE="[eE][-+]?"+INTEGER_RE,DECIMAL_LITERAL_RE=INTEGER_RE+"(\\."+INTEGER_RE+")?("+EXPONENT_RE+")?",BASED_INTEGER_RE="\\w+",NUMBER_RE="\\b("+(INTEGER_RE+"#"+BASED_INTEGER_RE+"(\\."+BASED_INTEGER_RE+")?#("+EXPONENT_RE+
")?")+"|"+DECIMAL_LITERAL_RE+")",ID_REGEX="[A-Za-z](_?[A-Za-z0-9.])*",BAD_CHARS=`[]\\{\\}%#'"`,COMMENTS=hljs.COMMENT("--","$"),VAR_DECLS={begin:"\\s+:\\s+",end:"\\s*(:=|;|\\)|=>|$)",illegal:BAD_CHARS,contains:[{beginKeywords:"loop for declare others",endsParent:!0},{className:"keyword",beginKeywords:"not null constant access function procedure in out aliased exception"},{className:"type",begin:ID_REGEX,endsParent:!0,relevance:0}]};return{name:"Ada",case_insensitive:!0,keywords:{keyword:["abort",
"else","new","return","abs","elsif","not","reverse","abstract","end","accept","entry","select","access","exception","of","separate","aliased","exit","or","some","all","others","subtype","and","for","out","synchronized","array","function","overriding","at","tagged","generic","package","task","begin","goto","pragma","terminate","body","private","then","if","procedure","type","case","in","protected","constant","interface","is","raise","use","declare","range","delay","limited","record","when","delta",
"loop","rem","while","digits","renames","with","do","mod","requeue","xor"],literal:["True","False"]},contains:[COMMENTS,{className:"string",begin:/"/,end:/"/,contains:[{begin:/""/,relevance:0}]},{className:"string",begin:/'.'/},{className:"number",begin:NUMBER_RE,relevance:0},{className:"symbol",begin:"'"+ID_REGEX},{className:"title",begin:"(\\bwith\\s+)?(\\bprivate\\s+)?\\bpackage\\s+(\\bbody\\s+)?",end:"(is|$)",keywords:"package body",excludeBegin:!0,excludeEnd:!0,illegal:BAD_CHARS},{begin:"(\\\
b(with|overriding)\\s+)?\\b(function|procedure)\\s+",end:"(\\bis|\\bwith|\\brenames|\\)\\s*;)",keywords:"overriding function procedure with is renames return",returnBegin:!0,contains:[COMMENTS,{className:"title",begin:"(\\bwith\\s+)?\\b(function|procedure)\\s+",end:"(\\(|\\s+|$)",excludeBegin:!0,excludeEnd:!0,illegal:BAD_CHARS},VAR_DECLS,{className:"type",begin:"\\breturn\\s+",end:"(\\s+|;|$)",keywords:"return",excludeBegin:!0,excludeEnd:!0,endsParent:!0,illegal:BAD_CHARS}]},{className:"type",begin:"\
\\b(sub)?type\\s+",end:"\\s+",keywords:"type",excludeBegin:!0,illegal:BAD_CHARS},VAR_DECLS]}}return ada_1=ada2,ada_1}var angelscript_1,hasRequiredAngelscript;function requireAngelscript(){if(hasRequiredAngelscript)return angelscript_1;hasRequiredAngelscript=1;function angelscript2(hljs){const builtInTypeMode={className:"built_in",begin:"\\b(void|bool|int8|int16|int32|int64|int|uint8|uint16|uint32|uint64|uint|string|ref|array|double|float|auto|dictionary)"},objectHandleMode={className:"symbol",begin:"\
[a-zA-Z0-9_]+@"},genericMode={className:"keyword",begin:"<",end:">",contains:[builtInTypeMode,objectHandleMode]};return builtInTypeMode.contains=[genericMode],objectHandleMode.contains=[genericMode],{name:"AngelScript",aliases:["asc"],keywords:["for","in|0","break","continue","while","do|0","return","if","else","case","switch","namespace","is","cast","or","and","xor","not","get|0","in","inout|10","out","override","set|0","private","public","const","default|0","final","shared","external","mixin|1\
0","enum","typedef","funcdef","this","super","import","from","interface","abstract|0","try","catch","protected","explicit","property"],illegal:"(^using\\s+[A-Za-z0-9_\\.]+;$|\\bfunction\\s*[^\\(])",contains:[{className:"string",begin:"'",end:"'",illegal:"\\n",contains:[hljs.BACKSLASH_ESCAPE],relevance:0},{className:"string",begin:'"""',end:'"""'},{className:"string",begin:'"',end:'"',illegal:"\\n",contains:[hljs.BACKSLASH_ESCAPE],relevance:0},hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,{className:"\
string",begin:"^\\s*\\[",end:"\\]"},{beginKeywords:"interface namespace",end:/\{/,illegal:"[;.\\-]",contains:[{className:"symbol",begin:"[a-zA-Z0-9_]+"}]},{beginKeywords:"class",end:/\{/,illegal:"[;.\\-]",contains:[{className:"symbol",begin:"[a-zA-Z0-9_]+",contains:[{begin:"[:,]\\s*",contains:[{className:"symbol",begin:"[a-zA-Z0-9_]+"}]}]}]},builtInTypeMode,objectHandleMode,{className:"literal",begin:"\\b(null|true|false)"},{className:"number",relevance:0,begin:"(-?)(\\b0[xXbBoOdD][a-fA-F0-9]+|(\\\
b\\d+(\\.\\d*)?f?|\\.\\d+f?)([eE][-+]?\\d+f?)?)"}]}}return angelscript_1=angelscript2,angelscript_1}var apache_1,hasRequiredApache;function requireApache(){if(hasRequiredApache)return apache_1;hasRequiredApache=1;function apache2(hljs){const NUMBER_REF={className:"number",begin:/[$%]\d+/},NUMBER={className:"number",begin:/\b\d+/},IP_ADDRESS={className:"number",begin:/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}(:\d{1,5})?/},PORT_NUMBER={className:"number",begin:/:\d{1,5}/};return{name:"Apache config",aliases:[
"apacheconf"],case_insensitive:!0,contains:[hljs.HASH_COMMENT_MODE,{className:"section",begin:/<\/?/,end:/>/,contains:[IP_ADDRESS,PORT_NUMBER,hljs.inherit(hljs.QUOTE_STRING_MODE,{relevance:0})]},{className:"attribute",begin:/\w+/,relevance:0,keywords:{_:["order","deny","allow","setenv","rewriterule","rewriteengine","rewritecond","documentroot","sethandler","errordocument","loadmodule","options","header","listen","serverroot","servername"]},starts:{end:/$/,relevance:0,keywords:{literal:"on off al\
l deny allow"},contains:[{scope:"punctuation",match:/\\\n/},{className:"meta",begin:/\s\[/,end:/\]$/},{className:"variable",begin:/[\$%]\{/,end:/\}/,contains:["self",NUMBER_REF]},IP_ADDRESS,NUMBER,hljs.QUOTE_STRING_MODE]}}],illegal:/\S/}}return apache_1=apache2,apache_1}var applescript_1,hasRequiredApplescript;function requireApplescript(){if(hasRequiredApplescript)return applescript_1;hasRequiredApplescript=1;function applescript2(hljs){const regex=hljs.regex,STRING=hljs.inherit(hljs.QUOTE_STRING_MODE,
{illegal:null}),PARAMS={className:"params",begin:/\(/,end:/\)/,contains:["self",hljs.C_NUMBER_MODE,STRING]},COMMENT_MODE_1=hljs.COMMENT(/--/,/$/),COMMENT_MODE_2=hljs.COMMENT(/\(\*/,/\*\)/,{contains:["self",COMMENT_MODE_1]}),COMMENTS=[COMMENT_MODE_1,COMMENT_MODE_2,hljs.HASH_COMMENT_MODE],KEYWORD_PATTERNS=[/apart from/,/aside from/,/instead of/,/out of/,/greater than/,/isn't|(doesn't|does not) (equal|come before|come after|contain)/,/(greater|less) than( or equal)?/,/(starts?|ends|begins?) with/,/contained by/,
/comes (before|after)/,/a (ref|reference)/,/POSIX (file|path)/,/(date|time) string/,/quoted form/],BUILT_IN_PATTERNS=[/clipboard info/,/the clipboard/,/info for/,/list (disks|folder)/,/mount volume/,/path to/,/(close|open for) access/,/(get|set) eof/,/current date/,/do shell script/,/get volume settings/,/random number/,/set volume/,/system attribute/,/system info/,/time to GMT/,/(load|run|store) script/,/scripting components/,/ASCII (character|number)/,/localized string/,/choose (application|color|file|file name|folder|from list|remote application|URL)/,
/display (alert|dialog)/];return{name:"AppleScript",aliases:["osascript"],keywords:{keyword:"about above after against and around as at back before beginning behind below beneath beside between but by considering contain contains continue copy div does eighth else end equal equals error every exit fifth first for fourth from front get given global if ignoring in into is it its last local me middle mod my ninth not of on onto or over prop property put ref reference repeat returning script second \
set seventh since sixth some tell tenth that the|0 then third through thru timeout times to transaction try until where while whose with without",literal:"AppleScript false linefeed return pi quote result space tab true",built_in:"alias application boolean class constant date file integer list number real record string text activate beep count delay launch log offset read round run say summarize write character characters contents day frontmost id item length month name|0 paragraph paragraphs re\
st reverse running time version weekday word words year"},contains:[STRING,hljs.C_NUMBER_MODE,{className:"built_in",begin:regex.concat(/\b/,regex.either(...BUILT_IN_PATTERNS),/\b/)},{className:"built_in",begin:/^\s*return\b/},{className:"literal",begin:/\b(text item delimiters|current application|missing value)\b/},{className:"keyword",begin:regex.concat(/\b/,regex.either(...KEYWORD_PATTERNS),/\b/)},{beginKeywords:"on",illegal:/[${=;\n]/,contains:[hljs.UNDERSCORE_TITLE_MODE,PARAMS]},...COMMENTS],
illegal:/\/\/|->|=>|\[\[/}}return applescript_1=applescript2,applescript_1}var arcade_1,hasRequiredArcade;function requireArcade(){if(hasRequiredArcade)return arcade_1;hasRequiredArcade=1;function arcade2(hljs){const regex=hljs.regex,IDENT_RE2="[A-Za-z_][0-9A-Za-z_]*",KEYWORDS2={keyword:["break","case","catch","continue","debugger","do","else","export","for","function","if","import","in","new","of","return","switch","try","var","void","while"],literal:["BackSlash","DoubleQuote","ForwardSlash","I\
nfinity","NaN","NewLine","PI","SingleQuote","Tab","TextFormatting","false","null","true","undefined"],built_in:["Abs","Acos","All","Angle","Any","Area","AreaGeodetic","Array","Asin","Atan","Atan2","Attachments","Average","Back","Bearing","Boolean","Buffer","BufferGeodetic","Ceil","Centroid","ChangeTimeZone","Clip","Concatenate","Console","Constrain","Contains","ConvertDirection","ConvexHull","Cos","Count","Crosses","Cut","Date|0","DateAdd","DateDiff","DateOnly","Day","Decode","DefaultValue","Den\
sify","DensifyGeodetic","Dictionary","Difference","Disjoint","Distance","DistanceGeodetic","DistanceToCoordinate","Distinct","Domain","DomainCode","DomainName","EnvelopeIntersects","Equals","Erase","Exp","Expects","Extent","Feature","FeatureInFilter","FeatureSet","FeatureSetByAssociation","FeatureSetById","FeatureSetByName","FeatureSetByPortalItem","FeatureSetByRelationshipClass","FeatureSetByRelationshipName","Filter","FilterBySubtypeCode","Find","First|0","Floor","FromCharCode","FromCodePoint",
"FromJSON","Front","GdbVersion","Generalize","Geometry","GetEnvironment","GetFeatureSet","GetFeatureSetInfo","GetUser","GroupBy","Guid","HasKey","HasValue","Hash","Hour","IIf","ISOMonth","ISOWeek","ISOWeekday","ISOYear","Includes","IndexOf","Insert","Intersection","Intersects","IsEmpty","IsNan","IsSelfIntersecting","IsSimple","KnowledgeGraphByPortalItem","Left|0","Length","Length3D","LengthGeodetic","Log","Lower","Map","Max","Mean","MeasureToCoordinate","Mid","Millisecond","Min","Minute","Month",
"MultiPartToSinglePart","Multipoint","NearestCoordinate","NearestVertex","NextSequenceValue","None","Now","Number","Offset","OrderBy","Overlaps","Point","PointToCoordinate","Polygon","Polyline","Pop","Portal","Pow","Proper","Push","QueryGraph","Random","Reduce","Relate","Replace","Resize","Reverse","Right|0","RingIsClockwise","Rotate","Round","Schema","Second","SetGeometry","Simplify","Sin","Slice","Sort","Splice","Split","Sqrt","StandardizeFilename","StandardizeGuid","Stdev","SubtypeCode","Subt\
ypeName","Subtypes","Sum","SymmetricDifference","Tan","Text","Time","TimeZone","TimeZoneOffset","Timestamp","ToCharCode","ToCodePoint","ToHex","ToLocal","ToUTC","Today","Top|0","Touches","TrackAccelerationAt","TrackAccelerationWindow","TrackCurrentAcceleration","TrackCurrentDistance","TrackCurrentSpeed","TrackCurrentTime","TrackDistanceAt","TrackDistanceWindow","TrackDuration","TrackFieldWindow","TrackGeometryWindow","TrackIndex","TrackSpeedAt","TrackSpeedWindow","TrackStartTime","TrackWindow","\
Trim","TypeOf","Union","Upper","UrlEncode","Variance","Week","Weekday","When|0","Within","Year|0"]},PROFILE_VARS=["aggregatedFeatures","analytic","config","datapoint","datastore","editcontext","feature","featureSet","feedfeature","fencefeature","fencenotificationtype","graph","join","layer","locationupdate","map","measure","measure","originalFeature","record","reference","rowindex","sourcedatastore","sourcefeature","sourcelayer","target","targetdatastore","targetfeature","targetlayer","userInput",
"value","variables","view"],SYMBOL={className:"symbol",begin:"\\$"+regex.either(...PROFILE_VARS)},NUMBER={className:"number",variants:[{begin:"\\b(0[bB][01]+)"},{begin:"\\b(0[oO][0-7]+)"},{begin:hljs.C_NUMBER_RE}],relevance:0},SUBST={className:"subst",begin:"\\$\\{",end:"\\}",keywords:KEYWORDS2,contains:[]},TEMPLATE_STRING={className:"string",begin:"`",end:"`",contains:[hljs.BACKSLASH_ESCAPE,SUBST]};SUBST.contains=[hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,TEMPLATE_STRING,NUMBER,hljs.REGEXP_MODE];
const PARAMS_CONTAINS=SUBST.contains.concat([hljs.C_BLOCK_COMMENT_MODE,hljs.C_LINE_COMMENT_MODE]);return{name:"ArcGIS Arcade",case_insensitive:!0,keywords:KEYWORDS2,contains:[hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,TEMPLATE_STRING,hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,SYMBOL,NUMBER,{begin:/[{,]\s*/,relevance:0,contains:[{begin:IDENT_RE2+"\\s*:",returnBegin:!0,relevance:0,contains:[{className:"attr",begin:IDENT_RE2,relevance:0}]}]},{begin:"("+hljs.RE_STARTERS_RE+"|\\b(return)\\b)\\\
s*",keywords:"return",contains:[hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.REGEXP_MODE,{className:"function",begin:"(\\(.*?\\)|"+IDENT_RE2+")\\s*=>",returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:IDENT_RE2},{begin:/\(\s*\)/},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:KEYWORDS2,contains:PARAMS_CONTAINS}]}]}],relevance:0},{beginKeywords:"function",end:/\{/,excludeEnd:!0,contains:[hljs.inherit(hljs.TITLE_MODE,{className:"title.function",begin:IDENT_RE2}),
{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,contains:PARAMS_CONTAINS}],illegal:/\[|%/},{begin:/\$[(.]/}],illegal:/#(?!!)/}}return arcade_1=arcade2,arcade_1}var arduino_1,hasRequiredArduino;function requireArduino(){if(hasRequiredArduino)return arduino_1;hasRequiredArduino=1;function cPlusPlus2(hljs){const regex=hljs.regex,C_LINE_COMMENT_MODE=hljs.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),DECLTYPE_AUTO_RE="decltype\\(auto\\)",NAMESPACE_RE="[a-zA-Z_]\\w*::",FUNCTION_TYPE_RE="\
(?!struct)("+DECLTYPE_AUTO_RE+"|"+regex.optional(NAMESPACE_RE)+"[a-zA-Z_]\\w*"+regex.optional("<[^<>]+>")+")",CPP_PRIMITIVE_TYPES={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},STRINGS={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[hljs.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},hljs.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},NUMBERS={className:"\
number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:L\
L?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},PREPROCESSOR={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},hljs.inherit(STRINGS,{className:"string"}),{className:"string",begin:/<.*?>/},C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE]},TITLE_MODE={className:"title",begin:regex.optional(NAMESPACE_RE)+hljs.IDENT_RE,relevance:0},FUNCTION_TITLE=regex.optional(NAMESPACE_RE)+
hljs.IDENT_RE+"\\s*\\(",RESERVED_KEYWORDS=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","n\
oexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],RESERVED_TYPES=["bool","char","char16_t","char32_t","char8_t","double",
"float","int","long","short","void","wchar_t","unsigned","signed","const","static"],TYPE_HINTS=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursiv\
e_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],FUNCTION_HINTS=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl",
"exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","ss\
canf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],CPP_KEYWORDS={type:RESERVED_TYPES,keyword:RESERVED_KEYWORDS,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:TYPE_HINTS},FUNCTION_DISPATCH={className:"function.dispatch",relevance:0,keywords:{_hint:FUNCTION_HINTS},
begin:regex.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,hljs.IDENT_RE,regex.lookahead(/(<[^<>]+>|)\s*\(/))},EXPRESSION_CONTAINS=[FUNCTION_DISPATCH,PREPROCESSOR,CPP_PRIMITIVE_TYPES,C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,NUMBERS,STRINGS],EXPRESSION_CONTEXT={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:CPP_KEYWORDS,contains:EXPRESSION_CONTAINS.concat([{begin:/\(/,end:/\)/,keywords:CPP_KEYWORDS,contains:EXPRESSION_CONTAINS.
concat(["self"]),relevance:0}]),relevance:0},FUNCTION_DECLARATION={className:"function",begin:"("+FUNCTION_TYPE_RE+"[\\*&\\s]+)+"+FUNCTION_TITLE,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:CPP_KEYWORDS,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:DECLTYPE_AUTO_RE,keywords:CPP_KEYWORDS,relevance:0},{begin:FUNCTION_TITLE,returnBegin:!0,contains:[TITLE_MODE],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[STRINGS,NUMBERS]},{relevance:0,match:/,/},{className:"params",
begin:/\(/,end:/\)/,keywords:CPP_KEYWORDS,relevance:0,contains:[C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,STRINGS,NUMBERS,CPP_PRIMITIVE_TYPES,{begin:/\(/,end:/\)/,keywords:CPP_KEYWORDS,relevance:0,contains:["self",C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,STRINGS,NUMBERS,CPP_PRIMITIVE_TYPES]}]},CPP_PRIMITIVE_TYPES,C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,PREPROCESSOR]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:CPP_KEYWORDS,illegal:"</",classNameAliases:{
"function.dispatch":"built_in"},contains:[].concat(EXPRESSION_CONTEXT,FUNCTION_DECLARATION,FUNCTION_DISPATCH,EXPRESSION_CONTAINS,[PREPROCESSOR,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:CPP_KEYWORDS,contains:["self",CPP_PRIMITIVE_TYPES]},{begin:hljs.IDENT_RE+"::",keywords:CPP_KEYWORDS},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,
/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function arduino2(hljs){const ARDUINO_KW={type:["boolean","byte","word","String"],built_in:["KeyboardController","MouseController","SoftwareSerial","EthernetServer","EthernetClient","LiquidCrystal","RobotControl","GSMVoiceCall","EthernetUDP","EsploraTFT","HttpClient","RobotMotor","WiFiClient","GSMScanner","FileSystem","Scheduler","GSMServer","YunClient","YunServer","IPAddress","GSMClient","GSMModem","Keyboard","Ethernet","Console","GSMBand",
"Esplora","Stepper","Process","WiFiUDP","GSM_SMS","Mailbox","USBHost","Firmata","PImage","Client","Server","GSMPIN","FileIO","Bridge","Serial","EEPROM","Stream","Mouse","Audio","Servo","File","Task","GPRS","WiFi","Wire","TFT","GSM","SPI","SD"],_hints:["setup","loop","runShellCommandAsynchronously","analogWriteResolution","retrieveCallingNumber","printFirmwareVersion","analogReadResolution","sendDigitalPortPair","noListenOnLocalhost","readJoystickButton","setFirmwareVersion","readJoystickSwitch",
"scrollDisplayRight","getVoiceCallStatus","scrollDisplayLeft","writeMicroseconds","delayMicroseconds","beginTransmission","getSignalStrength","runAsynchronously","getAsynchronously","listenOnLocalhost","getCurrentCarrier","readAccelerometer","messageAvailable","sendDigitalPorts","lineFollowConfig","countryNameWrite","runShellCommand","readStringUntil","rewindDirectory","readTemperature","setClockDivider","readLightSensor","endTransmission","analogReference","detachInterrupt","countryNameRead","a\
ttachInterrupt","encryptionType","readBytesUntil","robotNameWrite","readMicrophone","robotNameRead","cityNameWrite","userNameWrite","readJoystickY","readJoystickX","mouseReleased","openNextFile","scanNetworks","noInterrupts","digitalWrite","beginSpeaker","mousePressed","isActionDone","mouseDragged","displayLogos","noAutoscroll","addParameter","remoteNumber","getModifiers","keyboardRead","userNameRead","waitContinue","processInput","parseCommand","printVersion","readNetworks","writeMessage","blin\
kVersion","cityNameRead","readMessage","setDataMode","parsePacket","isListening","setBitOrder","beginPacket","isDirectory","motorsWrite","drawCompass","digitalRead","clearScreen","serialEvent","rightToLeft","setTextSize","leftToRight","requestFrom","keyReleased","compassRead","analogWrite","interrupts","WiFiServer","disconnect","playMelody","parseFloat","autoscroll","getPINUsed","setPINUsed","setTimeout","sendAnalog","readSlider","analogRead","beginWrite","createChar","motorsStop","keyPressed","\
tempoWrite","readButton","subnetMask","debugPrint","macAddress","writeGreen","randomSeed","attachGPRS","readString","sendString","remotePort","releaseAll","mouseMoved","background","getXChange","getYChange","answerCall","getResult","voiceCall","endPacket","constrain","getSocket","writeJSON","getButton","available","connected","findUntil","readBytes","exitValue","readGreen","writeBlue","startLoop","IPAddress","isPressed","sendSysex","pauseMode","gatewayIP","setCursor","getOemKey","tuneWrite","noD\
isplay","loadImage","switchPIN","onRequest","onReceive","changePIN","playFile","noBuffer","parseInt","overflow","checkPIN","knobRead","beginTFT","bitClear","updateIR","bitWrite","position","writeRGB","highByte","writeRed","setSpeed","readBlue","noStroke","remoteIP","transfer","shutdown","hangCall","beginSMS","endWrite","attached","maintain","noCursor","checkReg","checkPUK","shiftOut","isValid","shiftIn","pulseIn","connect","println","localIP","pinMode","getIMEI","display","noBlink","process","ge\
tBand","running","beginSD","drawBMP","lowByte","setBand","release","bitRead","prepare","pointTo","readRed","setMode","noFill","remove","listen","stroke","detach","attach","noTone","exists","buffer","height","bitSet","circle","config","cursor","random","IRread","setDNS","endSMS","getKey","micros","millis","begin","print","write","ready","flush","width","isPIN","blink","clear","press","mkdir","rmdir","close","point","yield","image","BSSID","click","delay","read","text","move","peek","beep","rect",
"line","open","seek","fill","size","turn","stop","home","find","step","tone","sqrt","RSSI","SSID","end","bit","tan","cos","sin","pow","map","abs","max","min","get","run","put"],literal:["DIGITAL_MESSAGE","FIRMATA_STRING","ANALOG_MESSAGE","REPORT_DIGITAL","REPORT_ANALOG","INPUT_PULLUP","SET_PIN_MODE","INTERNAL2V56","SYSTEM_RESET","LED_BUILTIN","INTERNAL1V1","SYSEX_START","INTERNAL","EXTERNAL","DEFAULT","OUTPUT","INPUT","HIGH","LOW"]},ARDUINO=cPlusPlus2(hljs),kws=ARDUINO.keywords;return kws.type=[
...kws.type,...ARDUINO_KW.type],kws.literal=[...kws.literal,...ARDUINO_KW.literal],kws.built_in=[...kws.built_in,...ARDUINO_KW.built_in],kws._hints=ARDUINO_KW._hints,ARDUINO.name="Arduino",ARDUINO.aliases=["ino"],ARDUINO.supersetOf="cpp",ARDUINO}return arduino_1=arduino2,arduino_1}var armasm_1,hasRequiredArmasm;function requireArmasm(){if(hasRequiredArmasm)return armasm_1;hasRequiredArmasm=1;function armasm2(hljs){const COMMENT={variants:[hljs.COMMENT("^[ \\t]*(?=#)","$",{relevance:0,excludeBegin:!0}),
hljs.COMMENT("[;@]","$",{relevance:0}),hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE]};return{name:"ARM Assembly",case_insensitive:!0,aliases:["arm"],keywords:{$pattern:"\\.?"+hljs.IDENT_RE,meta:".2byte .4byte .align .ascii .asciz .balign .byte .code .data .else .end .endif .endm .endr .equ .err .exitm .extern .global .hword .if .ifdef .ifndef .include .irp .long .macro .rept .req .section .set .skip .space .text .word .arm .thumb .code16 .code32 .force_thumb .thumb_func .ltorg ALIAS ALIGN \
ARM AREA ASSERT ATTR CN CODE CODE16 CODE32 COMMON CP DATA DCB DCD DCDU DCDO DCFD DCFDU DCI DCQ DCQU DCW DCWU DN ELIF ELSE END ENDFUNC ENDIF ENDP ENTRY EQU EXPORT EXPORTAS EXTERN FIELD FILL FUNCTION GBLA GBLL GBLS GET GLOBAL IF IMPORT INCBIN INCLUDE INFO KEEP LCLA LCLL LCLS LTORG MACRO MAP MEND MEXIT NOFP OPT PRESERVE8 PROC QN READONLY RELOC REQUIRE REQUIRE8 RLIST FN ROUT SETA SETL SETS SN SPACE SUBT THUMB THUMBX TTL WHILE WEND ",built_in:"r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 w0 \
w1 w2 w3 w4 w5 w6 w7 w8 w9 w10 w11 w12 w13 w14 w15 w16 w17 w18 w19 w20 w21 w22 w23 w24 w25 w26 w27 w28 w29 w30 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16 x17 x18 x19 x20 x21 x22 x23 x24 x25 x26 x27 x28 x29 x30 pc lr sp ip sl sb fp a1 a2 a3 a4 v1 v2 v3 v4 v5 v6 v7 v8 f0 f1 f2 f3 f4 f5 f6 f7 p0 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 c0 c1 c2 c3 c4 c5 c6 c7 c8 c9 c10 c11 c12 c13 c14 c15 q0 q1 q2 q3 q4 q5 q6 q7 q8 q9 q10 q11 q12 q13 q14 q15 cpsr_c cpsr_x cpsr_s cpsr_f cpsr\
_cx cpsr_cxs cpsr_xs cpsr_xsf cpsr_sf cpsr_cxsf spsr_c spsr_x spsr_s spsr_f spsr_cx spsr_cxs spsr_xs spsr_xsf spsr_sf spsr_cxsf s0 s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 s11 s12 s13 s14 s15 s16 s17 s18 s19 s20 s21 s22 s23 s24 s25 s26 s27 s28 s29 s30 s31 d0 d1 d2 d3 d4 d5 d6 d7 d8 d9 d10 d11 d12 d13 d14 d15 d16 d17 d18 d19 d20 d21 d22 d23 d24 d25 d26 d27 d28 d29 d30 d31 {PC} {VAR} {TRUE} {FALSE} {OPT} {CONFIG} {ENDIAN} {CODESIZE} {CPU} {FPU} {ARCHITECTURE} {PCSTOREOFFSET} {ARMASM_VERSION} {INTER} {ROPI} \
{RWPI} {SWST} {NOSWST} . @"},contains:[{className:"keyword",begin:"\\b(adc|(qd?|sh?|u[qh]?)?add(8|16)?|usada?8|(q|sh?|u[qh]?)?(as|sa)x|and|adrl?|sbc|rs[bc]|asr|b[lx]?|blx|bxj|cbn?z|tb[bh]|bic|bfc|bfi|[su]bfx|bkpt|cdp2?|clz|clrex|cmp|cmn|cpsi[ed]|cps|setend|dbg|dmb|dsb|eor|isb|it[te]{0,3}|lsl|lsr|ror|rrx|ldm(([id][ab])|f[ds])?|ldr((s|ex)?[bhd])?|movt?|mvn|mra|mar|mul|[us]mull|smul[bwt][bt]|smu[as]d|smmul|smmla|mla|umlaal|smlal?([wbt][bt]|d)|mls|smlsl?[ds]|smc|svc|sev|mia([bt]{2}|ph)?|mrr?c2?|mcrr2\
?|mrs|msr|orr|orn|pkh(tb|bt)|rbit|rev(16|sh)?|sel|[su]sat(16)?|nop|pop|push|rfe([id][ab])?|stm([id][ab])?|str(ex)?[bhd]?|(qd?)?sub|(sh?|q|u[qh]?)?sub(8|16)|[su]xt(a?h|a?b(16)?)|srs([id][ab])?|swpb?|swi|smi|tst|teq|wfe|wfi|yield)(eq|ne|cs|cc|mi|pl|vs|vc|hi|ls|ge|lt|gt|le|al|hs|lo)?[sptrx]?(?=\\s)"},COMMENT,hljs.QUOTE_STRING_MODE,{className:"string",begin:"'",end:"[^\\\\]'",relevance:0},{className:"title",begin:"\\|",end:"\\|",illegal:"\\n",relevance:0},{className:"number",variants:[{begin:"[#$=]?\
0x[0-9a-f]+"},{begin:"[#$=]?0b[01]+"},{begin:"[#$=]\\d+"},{begin:"\\b\\d+"}],relevance:0},{className:"symbol",variants:[{begin:"^[ \\t]*[a-z_\\.\\$][a-z0-9_\\.\\$]+:"},{begin:"^[a-z_\\.\\$][a-z0-9_\\.\\$]+"},{begin:"[=#]\\w+"}],relevance:0}]}}return armasm_1=armasm2,armasm_1}var xml_1,hasRequiredXml;function requireXml(){if(hasRequiredXml)return xml_1;hasRequiredXml=1;function xml2(hljs){const regex=hljs.regex,TAG_NAME_RE=regex.concat(/[\p{L}_]/u,regex.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),
XML_IDENT_RE=/[\p{L}0-9._:-]+/u,XML_ENTITIES={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},XML_META_KEYWORDS={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},XML_META_PAR_KEYWORDS=hljs.inherit(XML_META_KEYWORDS,{begin:/\(/,end:/\)/}),APOS_META_STRING_MODE=hljs.inherit(hljs.APOS_STRING_MODE,{className:"string"}),QUOTE_META_STRING_MODE=hljs.inherit(hljs.QUOTE_STRING_MODE,{className:"string"}),TAG_INTERNALS={endsWithParent:!0,illegal:/</,relevance:0,
contains:[{className:"attr",begin:XML_IDENT_RE,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[XML_ENTITIES]},{begin:/'/,end:/'/,contains:[XML_ENTITIES]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[XML_META_KEYWORDS,QUOTE_META_STRING_MODE,
APOS_META_STRING_MODE,XML_META_PAR_KEYWORDS,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[XML_META_KEYWORDS,XML_META_PAR_KEYWORDS,QUOTE_META_STRING_MODE,APOS_META_STRING_MODE]}]}]},hljs.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},XML_ENTITIES,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[QUOTE_META_STRING_MODE]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,
keywords:{name:"style"},contains:[TAG_INTERNALS],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[TAG_INTERNALS],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:regex.concat(/</,regex.lookahead(regex.concat(TAG_NAME_RE,regex.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:TAG_NAME_RE,
relevance:0,starts:TAG_INTERNALS}]},{className:"tag",begin:regex.concat(/<\//,regex.lookahead(regex.concat(TAG_NAME_RE,/>/))),contains:[{className:"name",begin:TAG_NAME_RE,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}return xml_1=xml2,xml_1}var asciidoc_1,hasRequiredAsciidoc;function requireAsciidoc(){if(hasRequiredAsciidoc)return asciidoc_1;hasRequiredAsciidoc=1;function asciidoc2(hljs){const regex=hljs.regex,HORIZONTAL_RULE={begin:"^'{3,}[ \\t]*$",relevance:10},ESCAPED_FORMATTING=[{begin:/\\[*_`]/},
{begin:/\\\\\*{2}[^\n]*?\*{2}/},{begin:/\\\\_{2}[^\n]*_{2}/},{begin:/\\\\`{2}[^\n]*`{2}/},{begin:/[:;}][*_`](?![*_`])/}],STRONG=[{className:"strong",begin:/\*{2}([^\n]+?)\*{2}/},{className:"strong",begin:regex.concat(/\*\*/,/((\*(?!\*)|\\[^\n]|[^*\n\\])+\n)+/,/(\*(?!\*)|\\[^\n]|[^*\n\\])*/,/\*\*/),relevance:0},{className:"strong",begin:/\B\*(\S|\S[^\n]*?\S)\*(?!\w)/},{className:"strong",begin:/\*[^\s]([^\n]+\n)+([^\n]+)\*/}],EMPHASIS=[{className:"emphasis",begin:/_{2}([^\n]+?)_{2}/},{className:"\
emphasis",begin:regex.concat(/__/,/((_(?!_)|\\[^\n]|[^_\n\\])+\n)+/,/(_(?!_)|\\[^\n]|[^_\n\\])*/,/__/),relevance:0},{className:"emphasis",begin:/\b_(\S|\S[^\n]*?\S)_(?!\w)/},{className:"emphasis",begin:/_[^\s]([^\n]+\n)+([^\n]+)_/},{className:"emphasis",begin:"\\B'(?!['\\s])",end:"(\\n{2}|')",contains:[{begin:"\\\\'\\w",relevance:0}],relevance:0}],ADMONITION={className:"symbol",begin:"^(NOTE|TIP|IMPORTANT|WARNING|CAUTION):\\s+",relevance:10},BULLET_LIST={className:"bullet",begin:"^(\\*+|-+|\\.+|[^\
\\n]+?::)\\s+"};return{name:"AsciiDoc",aliases:["adoc"],contains:[hljs.COMMENT("^/{4,}\\n","\\n/{4,}$",{relevance:10}),hljs.COMMENT("^//","$",{relevance:0}),{className:"title",begin:"^\\.\\w.*$"},{begin:"^[=\\*]{4,}\\n",end:"\\n^[=\\*]{4,}$",relevance:10},{className:"section",relevance:10,variants:[{begin:"^(={1,6})[ 	].+?([ 	]\\1)?$"},{begin:"^[^\\[\\]\\n]+?\\n[=\\-~\\^\\+]{2,}$"}]},{className:"meta",begin:"^:.+?:",end:"\\s",excludeEnd:!0,relevance:10},{className:"meta",begin:"^\\[.+?\\]$",relevance:0},
{className:"quote",begin:"^_{4,}\\n",end:"\\n_{4,}$",relevance:10},{className:"code",begin:"^[\\-\\.]{4,}\\n",end:"\\n[\\-\\.]{4,}$",relevance:10},{begin:"^\\+{4,}\\n",end:"\\n\\+{4,}$",contains:[{begin:"<",end:">",subLanguage:"xml",relevance:0}],relevance:10},BULLET_LIST,ADMONITION,...ESCAPED_FORMATTING,...STRONG,...EMPHASIS,{className:"string",variants:[{begin:"``.+?''"},{begin:"`.+?'"}]},{className:"code",begin:/`{2}/,end:/(\n{2}|`{2})/},{className:"code",begin:"(`.+?`|\\+.+?\\+)",relevance:0},
{className:"code",begin:"^[ \\t]",end:"$",relevance:0},HORIZONTAL_RULE,{begin:"(link:)?(http|https|ftp|file|irc|image:?):\\S+?\\[[^[]*?\\]",returnBegin:!0,contains:[{begin:"(link|image:?):",relevance:0},{className:"link",begin:"\\w",end:"[^\\[]+",relevance:0},{className:"string",begin:"\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0,relevance:0}],relevance:10}]}}return asciidoc_1=asciidoc2,asciidoc_1}var aspectj_1,hasRequiredAspectj;function requireAspectj(){if(hasRequiredAspectj)return aspectj_1;hasRequiredAspectj=
1;function aspectj2(hljs){const regex=hljs.regex,KEYWORDS2=["false","synchronized","int","abstract","float","private","char","boolean","static","null","if","const","for","true","while","long","throw","strictfp","finally","protected","import","native","final","return","void","enum","else","extends","implements","break","transient","new","catch","instanceof","byte","super","volatile","case","assert","short","package","default","double","public","try","this","switch","continue","throws","privileged",
"aspectOf","adviceexecution","proceed","cflowbelow","cflow","initialization","preinitialization","staticinitialization","withincode","target","within","execution","getWithinTypeName","handler","thisJoinPoint","thisJoinPointStaticPart","thisEnclosingJoinPointStaticPart","declare","parents","warning","error","soft","precedence","thisAspectInstance"],SHORTKEYS=["get","set","args","call"];return{name:"AspectJ",keywords:KEYWORDS2,illegal:/<\/|#/,contains:[hljs.COMMENT(/\/\*\*/,/\*\//,{relevance:0,contains:[
{begin:/\w+@/,relevance:0},{className:"doctag",begin:/@[A-Za-z]+/}]}),hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,{className:"class",beginKeywords:"aspect",end:/[{;=]/,excludeEnd:!0,illegal:/[:;"\[\]]/,contains:[{beginKeywords:"extends implements pertypewithin perthis pertarget percflowbelow percflow issingleton"},hljs.UNDERSCORE_TITLE_MODE,{begin:/\([^\)]*/,end:/[)]+/,keywords:KEYWORDS2.concat(SHORTKEYS),excludeEnd:!1}]},{className:"class",beginKeywords:"\
class interface",end:/[{;=]/,excludeEnd:!0,relevance:0,keywords:"class interface",illegal:/[:"\[\]]/,contains:[{beginKeywords:"extends implements"},hljs.UNDERSCORE_TITLE_MODE]},{beginKeywords:"pointcut after before around throwing returning",end:/[)]/,excludeEnd:!1,illegal:/["\[\]]/,contains:[{begin:regex.concat(hljs.UNDERSCORE_IDENT_RE,/\s*\(/),returnBegin:!0,contains:[hljs.UNDERSCORE_TITLE_MODE]}]},{begin:/[:]/,returnBegin:!0,end:/[{;]/,relevance:0,excludeEnd:!1,keywords:KEYWORDS2,illegal:/["\[\]]/,
contains:[{begin:regex.concat(hljs.UNDERSCORE_IDENT_RE,/\s*\(/),keywords:KEYWORDS2.concat(SHORTKEYS),relevance:0},hljs.QUOTE_STRING_MODE]},{beginKeywords:"new throw",relevance:0},{className:"function",begin:/\w+ +\w+(\.\w+)?\s*\([^\)]*\)\s*((throws)[\w\s,]+)?[\{;]/,returnBegin:!0,end:/[{;=]/,keywords:KEYWORDS2,excludeEnd:!0,contains:[{begin:regex.concat(hljs.UNDERSCORE_IDENT_RE,/\s*\(/),returnBegin:!0,relevance:0,contains:[hljs.UNDERSCORE_TITLE_MODE]},{className:"params",begin:/\(/,end:/\)/,relevance:0,
keywords:KEYWORDS2,contains:[hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,hljs.C_NUMBER_MODE,hljs.C_BLOCK_COMMENT_MODE]},hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE]},hljs.C_NUMBER_MODE,{className:"meta",begin:/@[A-Za-z]+/}]}}return aspectj_1=aspectj2,aspectj_1}var autohotkey_1,hasRequiredAutohotkey;function requireAutohotkey(){if(hasRequiredAutohotkey)return autohotkey_1;hasRequiredAutohotkey=1;function autohotkey2(hljs){const BACKTICK_ESCAPE={begin:"`[\\s\\S]"};return{name:"AutoHotkey",
case_insensitive:!0,aliases:["ahk"],keywords:{keyword:"Break Continue Critical Exit ExitApp Gosub Goto New OnExit Pause return SetBatchLines SetTimer Suspend Thread Throw Until ahk_id ahk_class ahk_pid ahk_exe ahk_group",literal:"true false NOT AND OR",built_in:"ComSpec Clipboard ClipboardAll ErrorLevel"},contains:[BACKTICK_ESCAPE,hljs.inherit(hljs.QUOTE_STRING_MODE,{contains:[BACKTICK_ESCAPE]}),hljs.COMMENT(";","$",{relevance:0}),hljs.C_BLOCK_COMMENT_MODE,{className:"number",begin:hljs.NUMBER_RE,
relevance:0},{className:"variable",begin:"%[a-zA-Z0-9#_$@]+%"},{className:"built_in",begin:"^\\s*\\w+\\s*(,|%)"},{className:"title",variants:[{begin:'^[^\\n";]+::(?!=)'},{begin:'^[^\\n";]+:(?!=)',relevance:0}]},{className:"meta",begin:"^\\s*#\\w+",end:"$",relevance:0},{className:"built_in",begin:"A_[a-zA-Z0-9]+"},{begin:",\\s*,"}]}}return autohotkey_1=autohotkey2,autohotkey_1}var autoit_1,hasRequiredAutoit;function requireAutoit(){if(hasRequiredAutoit)return autoit_1;hasRequiredAutoit=1;function autoit2(hljs){
const KEYWORDS2="ByRef Case Const ContinueCase ContinueLoop Dim Do Else ElseIf EndFunc EndIf EndSelect EndSwitch EndWith Enum Exit ExitLoop For Func Global If In Local Next ReDim Return Select Static Step Switch Then To Until Volatile WEnd While With",DIRECTIVES=["EndRegion","forcedef","forceref","ignorefunc","include","include-once","NoTrayIcon","OnAutoItStartRegister","pragma","Region","RequireAdmin","Tidy_Off","Tidy_On","Tidy_Parameters"],LITERAL="True False And Null Not Or Default",BUILT_IN="\
Abs ACos AdlibRegister AdlibUnRegister Asc AscW ASin Assign ATan AutoItSetOption AutoItWinGetTitle AutoItWinSetTitle Beep Binary BinaryLen BinaryMid BinaryToString BitAND BitNOT BitOR BitRotate BitShift BitXOR BlockInput Break Call CDTray Ceiling Chr ChrW ClipGet ClipPut ConsoleRead ConsoleWrite ConsoleWriteError ControlClick ControlCommand ControlDisable ControlEnable ControlFocus ControlGetFocus ControlGetHandle ControlGetPos ControlGetText ControlHide ControlListView ControlMove ControlSend C\
ontrolSetText ControlShow ControlTreeView Cos Dec DirCopy DirCreate DirGetSize DirMove DirRemove DllCall DllCallAddress DllCallbackFree DllCallbackGetPtr DllCallbackRegister DllClose DllOpen DllStructCreate DllStructGetData DllStructGetPtr DllStructGetSize DllStructSetData DriveGetDrive DriveGetFileSystem DriveGetLabel DriveGetSerial DriveGetType DriveMapAdd DriveMapDel DriveMapGet DriveSetLabel DriveSpaceFree DriveSpaceTotal DriveStatus EnvGet EnvSet EnvUpdate Eval Execute Exp FileChangeDir Fil\
eClose FileCopy FileCreateNTFSLink FileCreateShortcut FileDelete FileExists FileFindFirstFile FileFindNextFile FileFlush FileGetAttrib FileGetEncoding FileGetLongName FileGetPos FileGetShortcut FileGetShortName FileGetSize FileGetTime FileGetVersion FileInstall FileMove FileOpen FileOpenDialog FileRead FileReadLine FileReadToArray FileRecycle FileRecycleEmpty FileSaveDialog FileSelectFolder FileSetAttrib FileSetEnd FileSetPos FileSetTime FileWrite FileWriteLine Floor FtpSetProxy FuncName GUICrea\
te GUICtrlCreateAvi GUICtrlCreateButton GUICtrlCreateCheckbox GUICtrlCreateCombo GUICtrlCreateContextMenu GUICtrlCreateDate GUICtrlCreateDummy GUICtrlCreateEdit GUICtrlCreateGraphic GUICtrlCreateGroup GUICtrlCreateIcon GUICtrlCreateInput GUICtrlCreateLabel GUICtrlCreateList GUICtrlCreateListView GUICtrlCreateListViewItem GUICtrlCreateMenu GUICtrlCreateMenuItem GUICtrlCreateMonthCal GUICtrlCreateObj GUICtrlCreatePic GUICtrlCreateProgress GUICtrlCreateRadio GUICtrlCreateSlider GUICtrlCreateTab GUI\
CtrlCreateTabItem GUICtrlCreateTreeView GUICtrlCreateTreeViewItem GUICtrlCreateUpdown GUICtrlDelete GUICtrlGetHandle GUICtrlGetState GUICtrlRead GUICtrlRecvMsg GUICtrlRegisterListViewSort GUICtrlSendMsg GUICtrlSendToDummy GUICtrlSetBkColor GUICtrlSetColor GUICtrlSetCursor GUICtrlSetData GUICtrlSetDefBkColor GUICtrlSetDefColor GUICtrlSetFont GUICtrlSetGraphic GUICtrlSetImage GUICtrlSetLimit GUICtrlSetOnEvent GUICtrlSetPos GUICtrlSetResizing GUICtrlSetState GUICtrlSetStyle GUICtrlSetTip GUIDelete \
GUIGetCursorInfo GUIGetMsg GUIGetStyle GUIRegisterMsg GUISetAccelerators GUISetBkColor GUISetCoord GUISetCursor GUISetFont GUISetHelp GUISetIcon GUISetOnEvent GUISetState GUISetStyle GUIStartGroup GUISwitch Hex HotKeySet HttpSetProxy HttpSetUserAgent HWnd InetClose InetGet InetGetInfo InetGetSize InetRead IniDelete IniRead IniReadSection IniReadSectionNames IniRenameSection IniWrite IniWriteSection InputBox Int IsAdmin IsArray IsBinary IsBool IsDeclared IsDllStruct IsFloat IsFunc IsHWnd IsInt Is\
Keyword IsNumber IsObj IsPtr IsString Log MemGetStats Mod MouseClick MouseClickDrag MouseDown MouseGetCursor MouseGetPos MouseMove MouseUp MouseWheel MsgBox Number ObjCreate ObjCreateInterface ObjEvent ObjGet ObjName OnAutoItExitRegister OnAutoItExitUnRegister Ping PixelChecksum PixelGetColor PixelSearch ProcessClose ProcessExists ProcessGetStats ProcessList ProcessSetPriority ProcessWait ProcessWaitClose ProgressOff ProgressOn ProgressSet Ptr Random RegDelete RegEnumKey RegEnumVal RegRead RegWr\
ite Round Run RunAs RunAsWait RunWait Send SendKeepActive SetError SetExtended ShellExecute ShellExecuteWait Shutdown Sin Sleep SoundPlay SoundSetWaveVolume SplashImageOn SplashOff SplashTextOn Sqrt SRandom StatusbarGetText StderrRead StdinWrite StdioClose StdoutRead String StringAddCR StringCompare StringFormat StringFromASCIIArray StringInStr StringIsAlNum StringIsAlpha StringIsASCII StringIsDigit StringIsFloat StringIsInt StringIsLower StringIsSpace StringIsUpper StringIsXDigit StringLeft Str\
ingLen StringLower StringMid StringRegExp StringRegExpReplace StringReplace StringReverse StringRight StringSplit StringStripCR StringStripWS StringToASCIIArray StringToBinary StringTrimLeft StringTrimRight StringUpper Tan TCPAccept TCPCloseSocket TCPConnect TCPListen TCPNameToIP TCPRecv TCPSend TCPShutdown, UDPShutdown TCPStartup, UDPStartup TimerDiff TimerInit ToolTip TrayCreateItem TrayCreateMenu TrayGetMsg TrayItemDelete TrayItemGetHandle TrayItemGetState TrayItemGetText TrayItemSetOnEvent T\
rayItemSetState TrayItemSetText TraySetClick TraySetIcon TraySetOnEvent TraySetPauseIcon TraySetState TraySetToolTip TrayTip UBound UDPBind UDPCloseSocket UDPOpen UDPRecv UDPSend VarGetType WinActivate WinActive WinClose WinExists WinFlash WinGetCaretPos WinGetClassList WinGetClientSize WinGetHandle WinGetPos WinGetProcess WinGetState WinGetText WinGetTitle WinKill WinList WinMenuSelectItem WinMinimizeAll WinMinimizeAllUndo WinMove WinSetOnTop WinSetState WinSetTitle WinSetTrans WinWait WinWaitA\
ctive WinWaitClose WinWaitNotActive",COMMENT={variants:[hljs.COMMENT(";","$",{relevance:0}),hljs.COMMENT("#cs","#ce"),hljs.COMMENT("#comments-start","#comments-end")]},VARIABLE={begin:"\\$[A-z0-9_]+"},STRING={className:"string",variants:[{begin:/"/,end:/"/,contains:[{begin:/""/,relevance:0}]},{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]}]},NUMBER={variants:[hljs.BINARY_NUMBER_MODE,hljs.C_NUMBER_MODE]},PREPROCESSOR={className:"meta",begin:"#",end:"$",keywords:{keyword:DIRECTIVES},contains:[
{begin:/\\\n/,relevance:0},{beginKeywords:"include",keywords:{keyword:"include"},end:"$",contains:[STRING,{className:"string",variants:[{begin:"<",end:">"},{begin:/"/,end:/"/,contains:[{begin:/""/,relevance:0}]},{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]}]}]},STRING,COMMENT]},CONSTANT={className:"symbol",begin:"@[A-z0-9_]+"},FUNCTION={beginKeywords:"Func",end:"$",illegal:"\\$|\\[|%",contains:[hljs.inherit(hljs.UNDERSCORE_TITLE_MODE,{className:"title.function"}),{className:"params",begin:"\
\\(",end:"\\)",contains:[VARIABLE,STRING,NUMBER]}]};return{name:"AutoIt",case_insensitive:!0,illegal:/\/\*/,keywords:{keyword:KEYWORDS2,built_in:BUILT_IN,literal:LITERAL},contains:[COMMENT,VARIABLE,STRING,NUMBER,PREPROCESSOR,CONSTANT,FUNCTION]}}return autoit_1=autoit2,autoit_1}var avrasm_1,hasRequiredAvrasm;function requireAvrasm(){if(hasRequiredAvrasm)return avrasm_1;hasRequiredAvrasm=1;function avrasm2(hljs){return{name:"AVR Assembly",case_insensitive:!0,keywords:{$pattern:"\\.?"+hljs.IDENT_RE,
keyword:"adc add adiw and andi asr bclr bld brbc brbs brcc brcs break breq brge brhc brhs brid brie brlo brlt brmi brne brpl brsh brtc brts brvc brvs bset bst call cbi cbr clc clh cli cln clr cls clt clv clz com cp cpc cpi cpse dec eicall eijmp elpm eor fmul fmuls fmulsu icall ijmp in inc jmp ld ldd ldi lds lpm lsl lsr mov movw mul muls mulsu neg nop or ori out pop push rcall ret reti rjmp rol ror sbc sbr sbrc sbrs sec seh sbi sbci sbic sbis sbiw sei sen ser ses set sev sez sleep spm st std sts \
sub subi swap tst wdr",built_in:"r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 r16 r17 r18 r19 r20 r21 r22 r23 r24 r25 r26 r27 r28 r29 r30 r31 x|0 xh xl y|0 yh yl z|0 zh zl ucsr1c udr1 ucsr1a ucsr1b ubrr1l ubrr1h ucsr0c ubrr0h tccr3c tccr3a tccr3b tcnt3h tcnt3l ocr3ah ocr3al ocr3bh ocr3bl ocr3ch ocr3cl icr3h icr3l etimsk etifr tccr1c ocr1ch ocr1cl twcr twdr twar twsr twbr osccal xmcra xmcrb eicra spmcsr spmcr portg ddrg ping portf ddrf sreg sph spl xdiv rampz eicrb eimsk gimsk gicr eifr \
gifr timsk tifr mcucr mcucsr tccr0 tcnt0 ocr0 assr tccr1a tccr1b tcnt1h tcnt1l ocr1ah ocr1al ocr1bh ocr1bl icr1h icr1l tccr2 tcnt2 ocr2 ocdr wdtcr sfior eearh eearl eedr eecr porta ddra pina portb ddrb pinb portc ddrc pinc portd ddrd pind spdr spsr spcr udr0 ucsr0a ucsr0b ubrr0l acsr admux adcsr adch adcl porte ddre pine pinf",meta:".byte .cseg .db .def .device .dseg .dw .endmacro .equ .eseg .exit .include .list .listmac .macro .nolist .org .set"},contains:[hljs.C_BLOCK_COMMENT_MODE,hljs.COMMENT(
";","$",{relevance:0}),hljs.C_NUMBER_MODE,hljs.BINARY_NUMBER_MODE,{className:"number",begin:"\\b(\\$[a-zA-Z0-9]+|0o[0-7]+)"},hljs.QUOTE_STRING_MODE,{className:"string",begin:"'",end:"[^\\\\]'",illegal:"[^\\\\][^']"},{className:"symbol",begin:"^[A-Za-z0-9_.$]+:"},{className:"meta",begin:"#",end:"$"},{className:"subst",begin:"@[0-9]+"}]}}return avrasm_1=avrasm2,avrasm_1}var awk_1,hasRequiredAwk;function requireAwk(){if(hasRequiredAwk)return awk_1;hasRequiredAwk=1;function awk2(hljs){const VARIABLE={
className:"variable",variants:[{begin:/\$[\w\d#@][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},KEYWORDS2="BEGIN END if else while do for in break continue delete next nextfile function func exit|10",STRING={className:"string",contains:[hljs.BACKSLASH_ESCAPE],variants:[{begin:/(u|b)?r?'''/,end:/'''/,relevance:10},{begin:/(u|b)?r?"""/,end:/"""/,relevance:10},{begin:/(u|r|ur)'/,end:/'/,relevance:10},{begin:/(u|r|ur)"/,end:/"/,relevance:10},{begin:/(b|br)'/,end:/'/},{begin:/(b|br)"/,end:/"/},hljs.APOS_STRING_MODE,
hljs.QUOTE_STRING_MODE]};return{name:"Awk",keywords:{keyword:KEYWORDS2},contains:[VARIABLE,STRING,hljs.REGEXP_MODE,hljs.HASH_COMMENT_MODE,hljs.NUMBER_MODE]}}return awk_1=awk2,awk_1}var axapta_1,hasRequiredAxapta;function requireAxapta(){if(hasRequiredAxapta)return axapta_1;hasRequiredAxapta=1;function axapta2(hljs){const IDENT_RE2=hljs.UNDERSCORE_IDENT_RE,KEYWORDS2={keyword:["abstract","as","asc","avg","break","breakpoint","by","byref","case","catch","changecompany","class","client","client","co\
mmon","const","continue","count","crosscompany","delegate","delete_from","desc","display","div","do","edit","else","eventhandler","exists","extends","final","finally","firstfast","firstonly","firstonly1","firstonly10","firstonly100","firstonly1000","flush","for","forceliterals","forcenestedloop","forceplaceholders","forceselectorder","forupdate","from","generateonly","group","hint","if","implements","in","index","insert_recordset","interface","internal","is","join","like","maxof","minof","mod","\
namespace","new","next","nofetch","notexists","optimisticlock","order","outer","pessimisticlock","print","private","protected","public","readonly","repeatableread","retry","return","reverse","select","server","setting","static","sum","super","switch","this","throw","try","ttsabort","ttsbegin","ttscommit","unchecked","update_recordset","using","validtimestate","void","where","while"],built_in:["anytype","boolean","byte","char","container","date","double","enum","guid","int","int64","long","real",
"short","str","utcdatetime","var"],literal:["default","false","null","true"]},CLASS_DEFINITION={variants:[{match:[/(class|interface)\s+/,IDENT_RE2,/\s+(extends|implements)\s+/,IDENT_RE2]},{match:[/class\s+/,IDENT_RE2]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:KEYWORDS2};return{name:"X++",aliases:["x++"],keywords:KEYWORDS2,contains:[hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,hljs.C_NUMBER_MODE,{className:"meta",begin:"#",end:"\
$"},CLASS_DEFINITION]}}return axapta_1=axapta2,axapta_1}var bash_1,hasRequiredBash;function requireBash(){if(hasRequiredBash)return bash_1;hasRequiredBash=1;function bash2(hljs){const regex=hljs.regex,VAR={},BRACED_VAR={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[VAR]}]};Object.assign(VAR,{className:"variable",variants:[{begin:regex.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},BRACED_VAR]});const SUBST={className:"subst",begin:/\$\(/,end:/\)/,contains:[hljs.BACKSLASH_ESCAPE]},
COMMENT=hljs.inherit(hljs.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),HERE_DOC={begin:/<<-?\s*(?=\w+)/,starts:{contains:[hljs.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},QUOTE_STRING={className:"string",begin:/"/,end:/"/,contains:[hljs.BACKSLASH_ESCAPE,VAR,SUBST]};SUBST.contains.push(QUOTE_STRING);const ESCAPED_QUOTE={match:/\\"/},APOS_STRING={className:"string",begin:/'/,end:/'/},ESCAPED_APOS={match:/\\'/},ARITHMETIC={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,
className:"number"},hljs.NUMBER_MODE,VAR]},SH_LIKE_SHELLS=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],KNOWN_SHEBANG=hljs.SHEBANG({binary:`(${SH_LIKE_SHELLS.join("|")})`,relevance:10}),FUNCTION={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[hljs.inherit(hljs.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},KEYWORDS2=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],LITERALS2=["t\
rue","false"],PATH_MODE={match:/(\/[a-z._-]+)+/},SHELL_BUILT_INS=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],BASH_BUILT_INS=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],ZSH_BUILT_INS=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments",
"compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","\
zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],GNU_CORE_UTILS=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","\
tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:KEYWORDS2,literal:LITERALS2,built_in:[...SHELL_BUILT_INS,
...BASH_BUILT_INS,"set","shopt",...ZSH_BUILT_INS,...GNU_CORE_UTILS]},contains:[KNOWN_SHEBANG,hljs.SHEBANG(),FUNCTION,ARITHMETIC,COMMENT,HERE_DOC,PATH_MODE,QUOTE_STRING,ESCAPED_QUOTE,APOS_STRING,ESCAPED_APOS,VAR]}}return bash_1=bash2,bash_1}var basic_1,hasRequiredBasic;function requireBasic(){if(hasRequiredBasic)return basic_1;hasRequiredBasic=1;function basic2(hljs){return{name:"BASIC",case_insensitive:!0,illegal:"^.",keywords:{$pattern:"[a-zA-Z][a-zA-Z0-9_$%!#]*",keyword:["ABS","ASC","AND","ATN",
"AUTO|0","BEEP","BLOAD|10","BSAVE|10","CALL","CALLS","CDBL","CHAIN","CHDIR","CHR$|10","CINT","CIRCLE","CLEAR","CLOSE","CLS","COLOR","COM","COMMON","CONT","COS","CSNG","CSRLIN","CVD","CVI","CVS","DATA","DATE$","DEFDBL","DEFINT","DEFSNG","DEFSTR","DEF|0","SEG","USR","DELETE","DIM","DRAW","EDIT","END","ENVIRON","ENVIRON$","EOF","EQV","ERASE","ERDEV","ERDEV$","ERL","ERR","ERROR","EXP","FIELD","FILES","FIX","FOR|0","FRE","GET","GOSUB|10","GOTO","HEX$","IF","THEN","ELSE|0","INKEY$","INP","INPUT","INPU\
T#","INPUT$","INSTR","IMP","INT","IOCTL","IOCTL$","KEY","ON","OFF","LIST","KILL","LEFT$","LEN","LET","LINE","LLIST","LOAD","LOC","LOCATE","LOF","LOG","LPRINT","USING","LSET","MERGE","MID$","MKDIR","MKD$","MKI$","MKS$","MOD","NAME","NEW","NEXT","NOISE","NOT","OCT$","ON","OR","PEN","PLAY","STRIG","OPEN","OPTION","BASE","OUT","PAINT","PALETTE","PCOPY","PEEK","PMAP","POINT","POKE","POS","PRINT","PRINT]","PSET","PRESET","PUT","RANDOMIZE","READ","REM","RENUM","RESET|0","RESTORE","RESUME","RETURN|0","R\
IGHT$","RMDIR","RND","RSET","RUN","SAVE","SCREEN","SGN","SHELL","SIN","SOUND","SPACE$","SPC","SQR","STEP","STICK","STOP","STR$","STRING$","SWAP","SYSTEM","TAB","TAN","TIME$","TIMER","TROFF","TRON","TO","USR","VAL","VARPTR","VARPTR$","VIEW","WAIT","WHILE","WEND","WIDTH","WINDOW","WRITE","XOR"]},contains:[{scope:"string",begin:/"/,end:/"|$/,contains:[hljs.BACKSLASH_ESCAPE]},hljs.COMMENT("REM","$",{relevance:10}),hljs.COMMENT("'","$",{relevance:0}),{className:"symbol",begin:"^[0-9]+ ",relevance:10},
{className:"number",begin:"\\b\\d+(\\.\\d+)?([edED]\\d+)?[#!]?",relevance:0},{className:"number",begin:"(&[hH][0-9a-fA-F]{1,4})"},{className:"number",begin:"(&[oO][0-7]{1,6})"}]}}return basic_1=basic2,basic_1}var bnf_1,hasRequiredBnf;function requireBnf(){if(hasRequiredBnf)return bnf_1;hasRequiredBnf=1;function bnf2(hljs){return{name:"Backus–Naur Form",contains:[{className:"attribute",begin:/</,end:/>/},{begin:/::=/,end:/$/,contains:[{begin:/</,end:/>/},hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,
hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE]}]}}return bnf_1=bnf2,bnf_1}var brainfuck_1,hasRequiredBrainfuck;function requireBrainfuck(){if(hasRequiredBrainfuck)return brainfuck_1;hasRequiredBrainfuck=1;function brainfuck2(hljs){const LITERAL={className:"literal",begin:/[+-]+/,relevance:0};return{name:"Brainfuck",aliases:["bf"],contains:[hljs.COMMENT(/[^\[\]\.,\+\-<> \r\n]/,/[\[\]\.,\+\-<> \r\n]/,{contains:[{match:/[ ]+[^\[\]\.,\+\-<> \r\n]/,relevance:0}],returnEnd:!0,relevance:0}),{className:"\
title",begin:"[\\[\\]]",relevance:0},{className:"string",begin:"[\\.,]",relevance:0},{begin:/(?=\+\+|--)/,contains:[LITERAL]},LITERAL]}}return brainfuck_1=brainfuck2,brainfuck_1}var c_1,hasRequiredC;function requireC(){if(hasRequiredC)return c_1;hasRequiredC=1;function c2(hljs){const regex=hljs.regex,C_LINE_COMMENT_MODE=hljs.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),DECLTYPE_AUTO_RE="decltype\\(auto\\)",NAMESPACE_RE="[a-zA-Z_]\\w*::",FUNCTION_TYPE_RE="("+DECLTYPE_AUTO_RE+"|"+regex.optional(NAMESPACE_RE)+
"[a-zA-Z_]\\w*"+regex.optional("<[^<>]+>")+")",TYPES2={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},STRINGS={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[hljs.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},hljs.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},NUMBERS={className:"number",variants:[{match:/\b(0b[01']+)/},
{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},PREPROCESSOR={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include"},contains:[{begin:/\\\n/,
relevance:0},hljs.inherit(STRINGS,{className:"string"}),{className:"string",begin:/<.*?>/},C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE]},TITLE_MODE={className:"title",begin:regex.optional(NAMESPACE_RE)+hljs.IDENT_RE,relevance:0},FUNCTION_TITLE=regex.optional(NAMESPACE_RE)+hljs.IDENT_RE+"\\s*\\(",KEYWORDS2={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","typeof","typeof_unqual","s\
truct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_BitInt","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal96","_Decimal128","_Decimal64x","_Decimal128x","_Float16","_Float32","_Float64","_Float128","_Float32x","_Float64x","_Float128x","c\
onst","static","constexpr","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf futu\
re isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},EXPRESSION_CONTAINS=[PREPROCESSOR,TYPES2,C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,NUMBERS,
STRINGS],EXPRESSION_CONTEXT={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:KEYWORDS2,contains:EXPRESSION_CONTAINS.concat([{begin:/\(/,end:/\)/,keywords:KEYWORDS2,contains:EXPRESSION_CONTAINS.concat(["self"]),relevance:0}]),relevance:0},FUNCTION_DECLARATION={begin:"("+FUNCTION_TYPE_RE+"[\\*&\\s]+)+"+FUNCTION_TITLE,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:KEYWORDS2,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:DECLTYPE_AUTO_RE,keywords:KEYWORDS2,
relevance:0},{begin:FUNCTION_TITLE,returnBegin:!0,contains:[hljs.inherit(TITLE_MODE,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:KEYWORDS2,relevance:0,contains:[C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,STRINGS,NUMBERS,TYPES2,{begin:/\(/,end:/\)/,keywords:KEYWORDS2,relevance:0,contains:["self",C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,STRINGS,NUMBERS,TYPES2]}]},TYPES2,C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,PREPROCESSOR]};
return{name:"C",aliases:["h"],keywords:KEYWORDS2,disableAutodetect:!0,illegal:"</",contains:[].concat(EXPRESSION_CONTEXT,FUNCTION_DECLARATION,EXPRESSION_CONTAINS,[PREPROCESSOR,{begin:hljs.IDENT_RE+"::",keywords:KEYWORDS2},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},hljs.TITLE_MODE]}]),exports:{preprocessor:PREPROCESSOR,strings:STRINGS,keywords:KEYWORDS2}}}return c_1=c2,c_1}var cal_1,hasRequiredCal;function requireCal(){
if(hasRequiredCal)return cal_1;hasRequiredCal=1;function cal2(hljs){const regex=hljs.regex,KEYWORDS2=["div","mod","in","and","or","not","xor","asserterror","begin","case","do","downto","else","end","exit","for","local","if","of","repeat","then","to","until","while","with","var"],LITERALS2="false true",COMMENT_MODES=[hljs.C_LINE_COMMENT_MODE,hljs.COMMENT(/\{/,/\}/,{relevance:0}),hljs.COMMENT(/\(\*/,/\*\)/,{relevance:10})],STRING={className:"string",begin:/'/,end:/'/,contains:[{begin:/''/}]},CHAR_STRING={
className:"string",begin:/(#\d+)+/},DATE2={className:"number",begin:"\\b\\d+(\\.\\d+)?(DT|D|T)",relevance:0},DBL_QUOTED_VARIABLE={className:"string",begin:'"',end:'"'},PROCEDURE={match:[/procedure/,/\s+/,/[a-zA-Z_][\w@]*/,/\s*/],scope:{1:"keyword",3:"title.function"},contains:[{className:"params",begin:/\(/,end:/\)/,keywords:KEYWORDS2,contains:[STRING,CHAR_STRING,hljs.NUMBER_MODE]},...COMMENT_MODES]},OBJECT_TYPES=["Table","Form","Report","Dataport","Codeunit","XMLport","MenuSuite","Page","Query"],
OBJECT2={match:[/OBJECT/,/\s+/,regex.either(...OBJECT_TYPES),/\s+/,/\d+/,/\s+(?=[^\s])/,/.*/,/$/],relevance:3,scope:{1:"keyword",3:"type",5:"number",7:"title"}};return{name:"C/AL",case_insensitive:!0,keywords:{keyword:KEYWORDS2,literal:LITERALS2},illegal:/\/\*/,contains:[{match:/[\w]+(?=\=)/,scope:"attribute",relevance:0},STRING,CHAR_STRING,DATE2,DBL_QUOTED_VARIABLE,hljs.NUMBER_MODE,OBJECT2,PROCEDURE]}}return cal_1=cal2,cal_1}var capnproto_1,hasRequiredCapnproto;function requireCapnproto(){if(hasRequiredCapnproto)
return capnproto_1;hasRequiredCapnproto=1;function capnproto2(hljs){const KEYWORDS2=["struct","enum","interface","union","group","import","using","const","annotation","extends","in","of","on","as","with","from","fixed"],TYPES2=["Void","Bool","Int8","Int16","Int32","Int64","UInt8","UInt16","UInt32","UInt64","Float32","Float64","Text","Data","AnyPointer","AnyStruct","Capability","List"],LITERALS2=["true","false"],CLASS_DEFINITION={variants:[{match:[/(struct|enum|interface)/,/\s+/,hljs.IDENT_RE]},{
match:[/extends/,/\s*\(/,hljs.IDENT_RE,/\s*\)/]}],scope:{1:"keyword",3:"title.class"}};return{name:"Cap’n Proto",aliases:["capnp"],keywords:{keyword:KEYWORDS2,type:TYPES2,literal:LITERALS2},contains:[hljs.QUOTE_STRING_MODE,hljs.NUMBER_MODE,hljs.HASH_COMMENT_MODE,{className:"meta",begin:/@0x[\w\d]{16};/,illegal:/\n/},{className:"symbol",begin:/@\d+\b/},CLASS_DEFINITION]}}return capnproto_1=capnproto2,capnproto_1}var ceylon_1,hasRequiredCeylon;function requireCeylon(){if(hasRequiredCeylon)return ceylon_1;
hasRequiredCeylon=1;function ceylon2(hljs){const KEYWORDS2=["assembly","module","package","import","alias","class","interface","object","given","value","assign","void","function","new","of","extends","satisfies","abstracts","in","out","return","break","continue","throw","assert","dynamic","if","else","switch","case","for","while","try","catch","finally","then","let","this","outer","super","is","exists","nonempty"],DECLARATION_MODIFIERS=["shared","abstract","formal","default","actual","variable",
"late","native","deprecated","final","sealed","annotation","suppressWarnings","small"],DOCUMENTATION=["doc","by","license","see","throws","tagged"],SUBST={className:"subst",excludeBegin:!0,excludeEnd:!0,begin:/``/,end:/``/,keywords:KEYWORDS2,relevance:10},EXPRESSIONS=[{className:"string",begin:'"""',end:'"""',relevance:10},{className:"string",begin:'"',end:'"',contains:[SUBST]},{className:"string",begin:"'",end:"'"},{className:"number",begin:"#[0-9a-fA-F_]+|\\$[01_]+|[0-9_]+(?:\\.[0-9_](?:[eE][+-]\
?\\d+)?)?[kMGTPmunpf]?",relevance:0}];return SUBST.contains=EXPRESSIONS,{name:"Ceylon",keywords:{keyword:KEYWORDS2.concat(DECLARATION_MODIFIERS),meta:DOCUMENTATION},illegal:"\\$[^01]|#[^0-9a-fA-F]",contains:[hljs.C_LINE_COMMENT_MODE,hljs.COMMENT("/\\*","\\*/",{contains:["self"]}),{className:"meta",begin:'@[a-z]\\w*(?::"[^"]*")?'}].concat(EXPRESSIONS)}}return ceylon_1=ceylon2,ceylon_1}var clean_1,hasRequiredClean;function requireClean(){if(hasRequiredClean)return clean_1;hasRequiredClean=1;function clean2(hljs){
return{name:"Clean",aliases:["icl","dcl"],keywords:{keyword:["if","let","in","with","where","case","of","class","instance","otherwise","implementation","definition","system","module","from","import","qualified","as","special","code","inline","foreign","export","ccall","stdcall","generic","derive","infix","infixl","infixr"],built_in:"Int Real Char Bool",literal:"True False"},contains:[hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,hljs.C_NUMBER_MODE,
{begin:"->|<-[|:]?|#!?|>>=|\\{\\||\\|\\}|:==|=:|<>"}]}}return clean_1=clean2,clean_1}var clojure_1,hasRequiredClojure;function requireClojure(){if(hasRequiredClojure)return clojure_1;hasRequiredClojure=1;function clojure2(hljs){const SYMBOLSTART="a-zA-Z_\\-!.?+*=<>&'",SYMBOL_RE="[#]?["+SYMBOLSTART+"]["+SYMBOLSTART+"0-9/;:$#]*",globals="def defonce defprotocol defstruct defmulti defmethod defn- defn defmacro deftype defrecord",keywords2={$pattern:SYMBOL_RE,built_in:globals+" cond apply if-not if-\
let if not not= =|0 <|0 >|0 <=|0 >=|0 ==|0 +|0 /|0 *|0 -|0 rem quot neg? pos? delay? symbol? keyword? true? false? integer? empty? coll? list? set? ifn? fn? associative? sequential? sorted? counted? reversible? number? decimal? class? distinct? isa? float? rational? reduced? ratio? odd? even? char? seq? vector? string? map? nil? contains? zero? instance? not-every? not-any? libspec? -> ->> .. . inc compare do dotimes mapcat take remove take-while drop letfn drop-last take-last drop-while while i\
ntern condp case reduced cycle split-at split-with repeat replicate iterate range merge zipmap declare line-seq sort comparator sort-by dorun doall nthnext nthrest partition eval doseq await await-for let agent atom send send-off release-pending-sends add-watch mapv filterv remove-watch agent-error restart-agent set-error-handler error-handler set-error-mode! error-mode shutdown-agents quote var fn loop recur throw try monitor-enter monitor-exit macroexpand macroexpand-1 for dosync and or when w\
hen-not when-let comp juxt partial sequence memoize constantly complement identity assert peek pop doto proxy first rest cons cast coll last butlast sigs reify second ffirst fnext nfirst nnext meta with-meta ns in-ns create-ns import refer keys select-keys vals key val rseq name namespace promise into transient persistent! conj! assoc! dissoc! pop! disj! use class type num float double short byte boolean bigint biginteger bigdec print-method print-dup throw-if printf format load compile get-in u\
pdate-in pr pr-on newline flush read slurp read-line subvec with-open memfn time re-find re-groups rand-int rand mod locking assert-valid-fdecl alias resolve ref deref refset swap! reset! set-validator! compare-and-set! alter-meta! reset-meta! commute get-validator alter ref-set ref-history-count ref-min-history ref-max-history ensure sync io! new next conj set! to-array future future-call into-array aset gen-class reduce map filter find empty hash-map hash-set sorted-map sorted-map-by sorted-se\
t sorted-set-by vec vector seq flatten reverse assoc dissoc list disj get union difference intersection extend extend-type extend-protocol int nth delay count concat chunk chunk-buffer chunk-append chunk-first chunk-rest max min dec unchecked-inc-int unchecked-inc unchecked-dec-inc unchecked-dec unchecked-negate unchecked-add-int unchecked-add unchecked-subtract-int unchecked-subtract chunk-next chunk-cons chunked-seq? prn vary-meta lazy-seq spread list* str find-keyword keyword symbol gensym fo\
rce rationalize"},SYMBOL={begin:SYMBOL_RE,relevance:0},NUMBER={scope:"number",relevance:0,variants:[{match:/[-+]?0[xX][0-9a-fA-F]+N?/},{match:/[-+]?0[0-7]+N?/},{match:/[-+]?[1-9][0-9]?[rR][0-9a-zA-Z]+N?/},{match:/[-+]?[0-9]+\/[0-9]+N?/},{match:/[-+]?[0-9]+((\.[0-9]*([eE][+-]?[0-9]+)?M?)|([eE][+-]?[0-9]+M?|M))/},{match:/[-+]?([1-9][0-9]*|0)N?/}]},CHARACTER={scope:"character",variants:[{match:/\\o[0-3]?[0-7]{1,2}/},{match:/\\u[0-9a-fA-F]{4}/},{match:/\\(newline|space|tab|formfeed|backspace|return)/},
{match:/\\\S/,relevance:0}]},REGEX={scope:"regex",begin:/#"/,end:/"/,contains:[hljs.BACKSLASH_ESCAPE]},STRING=hljs.inherit(hljs.QUOTE_STRING_MODE,{illegal:null}),COMMA={scope:"punctuation",match:/,/,relevance:0},COMMENT=hljs.COMMENT(";","$",{relevance:0}),LITERAL={className:"literal",begin:/\b(true|false|nil)\b/},COLLECTION={begin:"\\[|(#::?"+SYMBOL_RE+")?\\{",end:"[\\]\\}]",relevance:0},KEY={className:"symbol",begin:"[:]{1,2}"+SYMBOL_RE},LIST={begin:"\\(",end:"\\)"},BODY={endsWithParent:!0,relevance:0},
NAME={keywords:keywords2,className:"name",begin:SYMBOL_RE,relevance:0,starts:BODY},DEFAULT_CONTAINS=[COMMA,LIST,CHARACTER,REGEX,STRING,COMMENT,KEY,COLLECTION,NUMBER,LITERAL,SYMBOL],GLOBAL={beginKeywords:globals,keywords:{$pattern:SYMBOL_RE,keyword:globals},end:'(\\[|#|\\d|"|:|\\{|\\)|\\(|$)',contains:[{className:"title",begin:SYMBOL_RE,relevance:0,excludeEnd:!0,endsParent:!0}].concat(DEFAULT_CONTAINS)};return LIST.contains=[GLOBAL,NAME,BODY],BODY.contains=DEFAULT_CONTAINS,COLLECTION.contains=DEFAULT_CONTAINS,
{name:"Clojure",aliases:["clj","edn"],illegal:/\S/,contains:[COMMA,LIST,CHARACTER,REGEX,STRING,COMMENT,KEY,COLLECTION,NUMBER,LITERAL]}}return clojure_1=clojure2,clojure_1}var clojureRepl_1,hasRequiredClojureRepl;function requireClojureRepl(){if(hasRequiredClojureRepl)return clojureRepl_1;hasRequiredClojureRepl=1;function clojureRepl2(hljs){return{name:"Clojure REPL",contains:[{className:"meta.prompt",begin:/^([\w.-]+|\s*#_)?=>/,starts:{end:/$/,subLanguage:"clojure"}}]}}return clojureRepl_1=clojureRepl2,
clojureRepl_1}var cmake_1,hasRequiredCmake;function requireCmake(){if(hasRequiredCmake)return cmake_1;hasRequiredCmake=1;function cmake2(hljs){return{name:"CMake",aliases:["cmake.in"],case_insensitive:!0,keywords:{keyword:"break cmake_host_system_information cmake_minimum_required cmake_parse_arguments cmake_policy configure_file continue elseif else endforeach endfunction endif endmacro endwhile execute_process file find_file find_library find_package find_path find_program foreach function get\
_cmake_property get_directory_property get_filename_component get_property if include include_guard list macro mark_as_advanced math message option return separate_arguments set_directory_properties set_property set site_name string unset variable_watch while add_compile_definitions add_compile_options add_custom_command add_custom_target add_definitions add_dependencies add_executable add_library add_link_options add_subdirectory add_test aux_source_directory build_command create_test_sourcelis\
t define_property enable_language enable_testing export fltk_wrap_ui get_source_file_property get_target_property get_test_property include_directories include_external_msproject include_regular_expression install link_directories link_libraries load_cache project qt_wrap_cpp qt_wrap_ui remove_definitions set_source_files_properties set_target_properties set_tests_properties source_group target_compile_definitions target_compile_features target_compile_options target_include_directories target_l\
ink_directories target_link_libraries target_link_options target_sources try_compile try_run ctest_build ctest_configure ctest_coverage ctest_empty_binary_directory ctest_memcheck ctest_read_custom_files ctest_run_script ctest_sleep ctest_start ctest_submit ctest_test ctest_update ctest_upload build_name exec_program export_library_dependencies install_files install_programs install_targets load_command make_directory output_required_files remove subdir_depends subdirs use_mangled_mesa utility_s\
ource variable_requires write_file qt5_use_modules qt5_use_package qt5_wrap_cpp on off true false and or not command policy target test exists is_newer_than is_directory is_symlink is_absolute matches less greater equal less_equal greater_equal strless strgreater strequal strless_equal strgreater_equal version_less version_greater version_equal version_less_equal version_greater_equal in_list defined"},contains:[{className:"variable",begin:/\$\{/,end:/\}/},hljs.COMMENT(/#\[\[/,/]]/),hljs.HASH_COMMENT_MODE,
hljs.QUOTE_STRING_MODE,hljs.NUMBER_MODE]}}return cmake_1=cmake2,cmake_1}var coffeescript_1,hasRequiredCoffeescript;function requireCoffeescript(){if(hasRequiredCoffeescript)return coffeescript_1;hasRequiredCoffeescript=1;const KEYWORDS2=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","stat\
ic","import","from","export","extends","using"],LITERALS2=["true","false","null","undefined","NaN","Infinity"],TYPES2=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","Gener\
atorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],ERROR_TYPES2=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],BUILT_IN_GLOBALS2=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],BUILT_INS2=[].concat(BUILT_IN_GLOBALS2,TYPES2,ERROR_TYPES2);function coffeescript2(hljs){
const COFFEE_BUILT_INS=["npm","print"],COFFEE_LITERALS=["yes","no","on","off"],COFFEE_KEYWORDS=["then","unless","until","loop","by","when","and","or","is","isnt","not"],NOT_VALID_KEYWORDS=["var","const","let","function","static"],excluding=list2=>kw=>!list2.includes(kw),KEYWORDS$12={keyword:KEYWORDS2.concat(COFFEE_KEYWORDS).filter(excluding(NOT_VALID_KEYWORDS)),literal:LITERALS2.concat(COFFEE_LITERALS),built_in:BUILT_INS2.concat(COFFEE_BUILT_INS)},JS_IDENT_RE="[A-Za-z$_][0-9A-Za-z$_]*",SUBST={className:"\
subst",begin:/#\{/,end:/\}/,keywords:KEYWORDS$12},EXPRESSIONS=[hljs.BINARY_NUMBER_MODE,hljs.inherit(hljs.C_NUMBER_MODE,{starts:{end:"(\\s*/)?",relevance:0}}),{className:"string",variants:[{begin:/'''/,end:/'''/,contains:[hljs.BACKSLASH_ESCAPE]},{begin:/'/,end:/'/,contains:[hljs.BACKSLASH_ESCAPE]},{begin:/"""/,end:/"""/,contains:[hljs.BACKSLASH_ESCAPE,SUBST]},{begin:/"/,end:/"/,contains:[hljs.BACKSLASH_ESCAPE,SUBST]}]},{className:"regexp",variants:[{begin:"///",end:"///",contains:[SUBST,hljs.HASH_COMMENT_MODE]},
{begin:"//[gim]{0,3}(?=\\W)",relevance:0},{begin:/\/(?![ *]).*?(?![\\]).\/[gim]{0,3}(?=\W)/}]},{begin:"@"+JS_IDENT_RE},{subLanguage:"javascript",excludeBegin:!0,excludeEnd:!0,variants:[{begin:"```",end:"```"},{begin:"`",end:"`"}]}];SUBST.contains=EXPRESSIONS;const TITLE=hljs.inherit(hljs.TITLE_MODE,{begin:JS_IDENT_RE}),POSSIBLE_PARAMS_RE="(\\(.*\\)\\s*)?\\B[-=]>",PARAMS={className:"params",begin:"\\([^\\(]",returnBegin:!0,contains:[{begin:/\(/,end:/\)/,keywords:KEYWORDS$12,contains:["self"].concat(
EXPRESSIONS)}]},CLASS_DEFINITION={variants:[{match:[/class\s+/,JS_IDENT_RE,/\s+extends\s+/,JS_IDENT_RE]},{match:[/class\s+/,JS_IDENT_RE]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:KEYWORDS$12};return{name:"CoffeeScript",aliases:["coffee","cson","iced"],keywords:KEYWORDS$12,illegal:/\/\*/,contains:[...EXPRESSIONS,hljs.COMMENT("###","###"),hljs.HASH_COMMENT_MODE,{className:"function",begin:"^\\s*"+JS_IDENT_RE+"\\s*=\\s*"+POSSIBLE_PARAMS_RE,end:"[-=]>",returnBegin:!0,contains:[TITLE,
PARAMS]},{begin:/[:\(,=]\s*/,relevance:0,contains:[{className:"function",begin:POSSIBLE_PARAMS_RE,end:"[-=]>",returnBegin:!0,contains:[PARAMS]}]},CLASS_DEFINITION,{begin:JS_IDENT_RE+":",end:":",returnBegin:!0,returnEnd:!0,relevance:0}]}}return coffeescript_1=coffeescript2,coffeescript_1}var coq_1,hasRequiredCoq;function requireCoq(){if(hasRequiredCoq)return coq_1;hasRequiredCoq=1;function coq2(hljs){return{name:"Coq",keywords:{keyword:["_|0","as","at","cofix","else","end","exists","exists2","fix",
"for","forall","fun","if","IF","in","let","match","mod","Prop","return","Set","then","Type","using","where","with","Abort","About","Add","Admit","Admitted","All","Arguments","Assumptions","Axiom","Back","BackTo","Backtrack","Bind","Blacklist","Canonical","Cd","Check","Class","Classes","Close","Coercion","Coercions","CoFixpoint","CoInductive","Collection","Combined","Compute","Conjecture","Conjectures","Constant","constr","Constraint","Constructors","Context","Corollary","CreateHintDb","Cut","Dec\
lare","Defined","Definition","Delimit","Dependencies","Dependent","Derive","Drop","eauto","End","Equality","Eval","Example","Existential","Existentials","Existing","Export","exporting","Extern","Extract","Extraction","Fact","Field","Fields","File","Fixpoint","Focus","for","From","Function","Functional","Generalizable","Global","Goal","Grab","Grammar","Graph","Guarded","Heap","Hint","HintDb","Hints","Hypotheses","Hypothesis","ident","Identity","If","Immediate","Implicit","Import","Include","Induc\
tive","Infix","Info","Initial","Inline","Inspect","Instance","Instances","Intro","Intros","Inversion","Inversion_clear","Language","Left","Lemma","Let","Libraries","Library","Load","LoadPath","Local","Locate","Ltac","ML","Mode","Module","Modules","Monomorphic","Morphism","Next","NoInline","Notation","Obligation","Obligations","Opaque","Open","Optimize","Options","Parameter","Parameters","Parametric","Path","Paths","pattern","Polymorphic","Preterm","Print","Printing","Program","Projections","Proo\
f","Proposition","Pwd","Qed","Quit","Rec","Record","Recursive","Redirect","Relation","Remark","Remove","Require","Reserved","Reset","Resolve","Restart","Rewrite","Right","Ring","Rings","Save","Scheme","Scope","Scopes","Script","Search","SearchAbout","SearchHead","SearchPattern","SearchRewrite","Section","Separate","Set","Setoid","Show","Solve","Sorted","Step","Strategies","Strategy","Structure","SubClass","Table","Tables","Tactic","Term","Test","Theorem","Time","Timeout","Transparent","Type","Ty\
peclasses","Types","Undelimit","Undo","Unfocus","Unfocused","Unfold","Universe","Universes","Unset","Unshelve","using","Variable","Variables","Variant","Verbose","Visibility","where","with"],built_in:["abstract","absurd","admit","after","apply","as","assert","assumption","at","auto","autorewrite","autounfold","before","bottom","btauto","by","case","case_eq","cbn","cbv","change","classical_left","classical_right","clear","clearbody","cofix","compare","compute","congruence","constr_eq","constructo\
r","contradict","contradiction","cut","cutrewrite","cycle","decide","decompose","dependent","destruct","destruction","dintuition","discriminate","discrR","do","double","dtauto","eapply","eassumption","eauto","ecase","econstructor","edestruct","ediscriminate","eelim","eexact","eexists","einduction","einjection","eleft","elim","elimtype","enough","equality","erewrite","eright","esimplify_eq","esplit","evar","exact","exactly_once","exfalso","exists","f_equal","fail","field","field_simplify","field_\
simplify_eq","first","firstorder","fix","fold","fourier","functional","generalize","generalizing","gfail","give_up","has_evar","hnf","idtac","in","induction","injection","instantiate","intro","intro_pattern","intros","intuition","inversion","inversion_clear","is_evar","is_var","lapply","lazy","left","lia","lra","move","native_compute","nia","nsatz","omega","once","pattern","pose","progress","proof","psatz","quote","record","red","refine","reflexivity","remember","rename","repeat","replace","reve\
rt","revgoals","rewrite","rewrite_strat","right","ring","ring_simplify","rtauto","set","setoid_reflexivity","setoid_replace","setoid_rewrite","setoid_symmetry","setoid_transitivity","shelve","shelve_unifiable","simpl","simple","simplify_eq","solve","specialize","split","split_Rabs","split_Rmult","stepl","stepr","subst","sum","swap","symmetry","tactic","tauto","time","timeout","top","transitivity","trivial","try","tryif","unfold","unify","until","using","vm_compute","with"]},contains:[hljs.QUOTE_STRING_MODE,
hljs.COMMENT("\\(\\*","\\*\\)"),hljs.C_NUMBER_MODE,{className:"type",excludeBegin:!0,begin:"\\|\\s*",end:"\\w+"},{begin:/[-=]>/}]}}return coq_1=coq2,coq_1}var cos_1,hasRequiredCos;function requireCos(){if(hasRequiredCos)return cos_1;hasRequiredCos=1;function cos2(hljs){return{name:"Caché Object Script",case_insensitive:!0,aliases:["cls"],keywords:"property parameter class classmethod clientmethod extends as break catch close continue do d|0 else elseif for goto halt hang h|0 if job j|0 kill k|0\
 lock l|0 merge new open quit q|0 read r|0 return set s|0 tcommit throw trollback try tstart use view while write w|0 xecute x|0 zkill znspace zn ztrap zwrite zw zzdump zzwrite print zbreak zinsert zload zprint zremove zsave zzprint mv mvcall mvcrt mvdim mvprint zquit zsync ascii",contains:[{className:"number",begin:"\\b(\\d+(\\.\\d*)?|\\.\\d+)",relevance:0},{className:"string",variants:[{begin:'"',end:'"',contains:[{begin:'""',relevance:0}]}]},hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,
{className:"comment",begin:/;/,end:"$",relevance:0},{className:"built_in",begin:/(?:\$\$?|\.\.)\^?[a-zA-Z]+/},{className:"built_in",begin:/\$\$\$[a-zA-Z]+/},{className:"built_in",begin:/%[a-z]+(?:\.[a-z]+)*/},{className:"symbol",begin:/\^%?[a-zA-Z][\w]*/},{className:"keyword",begin:/##class|##super|#define|#dim/},{begin:/&sql\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,subLanguage:"sql"},{begin:/&(js|jscript|javascript)</,end:/>/,excludeBegin:!0,excludeEnd:!0,subLanguage:"javascript"},{begin:/&html<\s*</,
end:/>\s*>/,subLanguage:"xml"}]}}return cos_1=cos2,cos_1}var cpp_1,hasRequiredCpp;function requireCpp(){if(hasRequiredCpp)return cpp_1;hasRequiredCpp=1;function cpp2(hljs){const regex=hljs.regex,C_LINE_COMMENT_MODE=hljs.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),DECLTYPE_AUTO_RE="decltype\\(auto\\)",NAMESPACE_RE="[a-zA-Z_]\\w*::",FUNCTION_TYPE_RE="(?!struct)("+DECLTYPE_AUTO_RE+"|"+regex.optional(NAMESPACE_RE)+"[a-zA-Z_]\\w*"+regex.optional("<[^<>]+>")+")",CPP_PRIMITIVE_TYPES={className:"type",
begin:"\\b[a-z\\d_]*_t\\b"},STRINGS={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[hljs.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},hljs.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},NUMBERS={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?\
:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},PREPROCESSOR={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif d\
efine undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},hljs.inherit(STRINGS,{className:"string"}),{className:"string",begin:/<.*?>/},C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE]},TITLE_MODE={className:"title",begin:regex.optional(NAMESPACE_RE)+hljs.IDENT_RE,relevance:0},FUNCTION_TITLE=regex.optional(NAMESPACE_RE)+hljs.IDENT_RE+"\\s*\\(",RESERVED_KEYWORDS=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept",
"auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret\
_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],RESERVED_TYPES=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],TYPE_HINTS=["any","auto_ptr","barrier","binary_se\
maphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_vie\
w","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],FUNCTION_HINTS=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isal\
pha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk",
"strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],CPP_KEYWORDS={type:RESERVED_TYPES,keyword:RESERVED_KEYWORDS,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:TYPE_HINTS},FUNCTION_DISPATCH={className:"function.dispatch",relevance:0,keywords:{_hint:FUNCTION_HINTS},begin:regex.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,hljs.IDENT_RE,regex.lookahead(
/(<[^<>]+>|)\s*\(/))},EXPRESSION_CONTAINS=[FUNCTION_DISPATCH,PREPROCESSOR,CPP_PRIMITIVE_TYPES,C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,NUMBERS,STRINGS],EXPRESSION_CONTEXT={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:CPP_KEYWORDS,contains:EXPRESSION_CONTAINS.concat([{begin:/\(/,end:/\)/,keywords:CPP_KEYWORDS,contains:EXPRESSION_CONTAINS.concat(["self"]),relevance:0}]),relevance:0},FUNCTION_DECLARATION={className:"function",begin:"\
("+FUNCTION_TYPE_RE+"[\\*&\\s]+)+"+FUNCTION_TITLE,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:CPP_KEYWORDS,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:DECLTYPE_AUTO_RE,keywords:CPP_KEYWORDS,relevance:0},{begin:FUNCTION_TITLE,returnBegin:!0,contains:[TITLE_MODE],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[STRINGS,NUMBERS]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:CPP_KEYWORDS,relevance:0,contains:[C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,
STRINGS,NUMBERS,CPP_PRIMITIVE_TYPES,{begin:/\(/,end:/\)/,keywords:CPP_KEYWORDS,relevance:0,contains:["self",C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,STRINGS,NUMBERS,CPP_PRIMITIVE_TYPES]}]},CPP_PRIMITIVE_TYPES,C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,PREPROCESSOR]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:CPP_KEYWORDS,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(EXPRESSION_CONTEXT,FUNCTION_DECLARATION,FUNCTION_DISPATCH,
EXPRESSION_CONTAINS,[PREPROCESSOR,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:CPP_KEYWORDS,contains:["self",CPP_PRIMITIVE_TYPES]},{begin:hljs.IDENT_RE+"::",keywords:CPP_KEYWORDS},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}
return cpp_1=cpp2,cpp_1}var crmsh_1,hasRequiredCrmsh;function requireCrmsh(){if(hasRequiredCrmsh)return crmsh_1;hasRequiredCrmsh=1;function crmsh2(hljs){const RESOURCES="primitive rsc_template",COMMANDS="group clone ms master location colocation order fencing_topology rsc_ticket acl_target acl_group user role tag xml";return{name:"crmsh",aliases:["crm","pcmk"],case_insensitive:!0,keywords:{keyword:"params meta operations op rule attributes utilization"+" "+"read write deny defined not_defined in\
_range date spec in ref reference attribute type xpath version and or lt gt tag lte gte eq ne \\"+" "+"number string",literal:"Master Started Slave Stopped start promote demote stop monitor true false"},contains:[hljs.HASH_COMMENT_MODE,{beginKeywords:"node",starts:{end:"\\s*([\\w_-]+:)?",starts:{className:"title",end:"\\s*[\\$\\w_][\\w_-]*"}}},{beginKeywords:RESOURCES,starts:{className:"title",end:"\\s*[\\$\\w_][\\w_-]*",starts:{end:"\\s*@?[\\w_][\\w_\\.:-]*"}}},{begin:"\\b("+COMMANDS.split(" ").
join("|")+")\\s+",keywords:COMMANDS,starts:{className:"title",end:"[\\$\\w_][\\w_-]*"}},{beginKeywords:"property rsc_defaults op_defaults",starts:{className:"title",end:"\\s*([\\w_-]+:)?"}},hljs.QUOTE_STRING_MODE,{className:"meta",begin:"(ocf|systemd|service|lsb):[\\w_:-]+",relevance:0},{className:"number",begin:"\\b\\d+(\\.\\d+)?(ms|s|h|m)?",relevance:0},{className:"literal",begin:"[-]?(infinity|inf)",relevance:0},{className:"attr",begin:/([A-Za-z$_#][\w_-]+)=/,relevance:0},{className:"tag",begin:"\
</?",end:"/?>",relevance:0}]}}return crmsh_1=crmsh2,crmsh_1}var crystal_1,hasRequiredCrystal;function requireCrystal(){if(hasRequiredCrystal)return crystal_1;hasRequiredCrystal=1;function crystal2(hljs){const INT_SUFFIX="(_?[ui](8|16|32|64|128))?",FLOAT_SUFFIX="(_?f(32|64))?",CRYSTAL_IDENT_RE="[a-zA-Z_]\\w*[!?=]?",CRYSTAL_METHOD_RE="[a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|[=!]~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~|]|//|//=|&[-+*]=?|&\\*\\*|\\[\\][=?]?",CRYSTAL_PATH_RE="[A-Za-z_]\\w*(::\\w+)*(\\?|!)?",CRYSTAL_KEYWORDS={
$pattern:CRYSTAL_IDENT_RE,keyword:"abstract alias annotation as as? asm begin break case class def do else elsif end ensure enum extend for fun if include instance_sizeof is_a? lib macro module next nil? of out pointerof private protected rescue responds_to? return require select self sizeof struct super then type typeof union uninitialized unless until verbatim when while with yield __DIR__ __END_LINE__ __FILE__ __LINE__",literal:"false nil true"},SUBST={className:"subst",begin:/#\{/,end:/\}/,keywords:CRYSTAL_KEYWORDS},
VARIABLE={className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},EXPANSION={className:"template-variable",variants:[{begin:"\\{\\{",end:"\\}\\}"},{begin:"\\{%",end:"%\\}"}],keywords:CRYSTAL_KEYWORDS};function recursiveParen(begin,end){const contains3=[{begin,end}];return contains3[0].contains=contains3,contains3}const STRING={className:"string",contains:[hljs.BACKSLASH_ESCAPE,SUBST],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:"%[\
Qwi]?\\(",end:"\\)",contains:recursiveParen("\\(","\\)")},{begin:"%[Qwi]?\\[",end:"\\]",contains:recursiveParen("\\[","\\]")},{begin:"%[Qwi]?\\{",end:/\}/,contains:recursiveParen(/\{/,/\}/)},{begin:"%[Qwi]?<",end:">",contains:recursiveParen("<",">")},{begin:"%[Qwi]?\\|",end:"\\|"},{begin:/<<-\w+$/,end:/^\s*\w+$/}],relevance:0},Q_STRING={className:"string",variants:[{begin:"%q\\(",end:"\\)",contains:recursiveParen("\\(","\\)")},{begin:"%q\\[",end:"\\]",contains:recursiveParen("\\[","\\]")},{begin:"\
%q\\{",end:/\}/,contains:recursiveParen(/\{/,/\}/)},{begin:"%q<",end:">",contains:recursiveParen("<",">")},{begin:"%q\\|",end:"\\|"},{begin:/<<-'\w+'$/,end:/^\s*\w+$/}],relevance:0},REGEXP2={begin:"(?!%\\})("+hljs.RE_STARTERS_RE+"|\\n|\\b(case|if|select|unless|until|when|while)\\b)\\s*",keywords:"case if select unless until when while",contains:[{className:"regexp",contains:[hljs.BACKSLASH_ESCAPE,SUBST],variants:[{begin:"//[a-z]*",relevance:0},{begin:"/(?!\\/)",end:"/[a-z]*"}]}],relevance:0},REGEXP22={
className:"regexp",contains:[hljs.BACKSLASH_ESCAPE,SUBST],variants:[{begin:"%r\\(",end:"\\)",contains:recursiveParen("\\(","\\)")},{begin:"%r\\[",end:"\\]",contains:recursiveParen("\\[","\\]")},{begin:"%r\\{",end:/\}/,contains:recursiveParen(/\{/,/\}/)},{begin:"%r<",end:">",contains:recursiveParen("<",">")},{begin:"%r\\|",end:"\\|"}],relevance:0},ATTRIBUTE={className:"meta",begin:"@\\[",end:"\\]",contains:[hljs.inherit(hljs.QUOTE_STRING_MODE,{className:"string"})]},CRYSTAL_DEFAULT_CONTAINS=[EXPANSION,
STRING,Q_STRING,REGEXP22,REGEXP2,ATTRIBUTE,VARIABLE,hljs.HASH_COMMENT_MODE,{className:"class",beginKeywords:"class module struct",end:"$|;",illegal:/=/,contains:[hljs.HASH_COMMENT_MODE,hljs.inherit(hljs.TITLE_MODE,{begin:CRYSTAL_PATH_RE}),{begin:"<"}]},{className:"class",beginKeywords:"lib enum union",end:"$|;",illegal:/=/,contains:[hljs.HASH_COMMENT_MODE,hljs.inherit(hljs.TITLE_MODE,{begin:CRYSTAL_PATH_RE})]},{beginKeywords:"annotation",end:"$|;",illegal:/=/,contains:[hljs.HASH_COMMENT_MODE,hljs.
inherit(hljs.TITLE_MODE,{begin:CRYSTAL_PATH_RE})],relevance:2},{className:"function",beginKeywords:"def",end:/\B\b/,contains:[hljs.inherit(hljs.TITLE_MODE,{begin:CRYSTAL_METHOD_RE,endsParent:!0})]},{className:"function",beginKeywords:"fun macro",end:/\B\b/,contains:[hljs.inherit(hljs.TITLE_MODE,{begin:CRYSTAL_METHOD_RE,endsParent:!0})],relevance:2},{className:"symbol",begin:hljs.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":",contains:[STRING,{begin:CRYSTAL_METHOD_RE}],
relevance:0},{className:"number",variants:[{begin:"\\b0b([01_]+)"+INT_SUFFIX},{begin:"\\b0o([0-7_]+)"+INT_SUFFIX},{begin:"\\b0x([A-Fa-f0-9_]+)"+INT_SUFFIX},{begin:"\\b([1-9][0-9_]*[0-9]|[0-9])(\\.[0-9][0-9_]*)?([eE]_?[-+]?[0-9_]*)?"+FLOAT_SUFFIX+"(?!_)"},{begin:"\\b([1-9][0-9_]*|0)"+INT_SUFFIX}],relevance:0}];return SUBST.contains=CRYSTAL_DEFAULT_CONTAINS,EXPANSION.contains=CRYSTAL_DEFAULT_CONTAINS.slice(1),{name:"Crystal",aliases:["cr"],keywords:CRYSTAL_KEYWORDS,contains:CRYSTAL_DEFAULT_CONTAINS}}
return crystal_1=crystal2,crystal_1}var csharp_1,hasRequiredCsharp;function requireCsharp(){if(hasRequiredCsharp)return csharp_1;hasRequiredCsharp=1;function csharp2(hljs){const BUILT_IN_KEYWORDS=["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],FUNCTION_MODIFIERS=["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual",
"new","sealed","partial"],LITERAL_KEYWORDS=["default","false","null","true"],NORMAL_KEYWORDS=["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","\
throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"],CONTEXTUAL_KEYWORDS=["add","alias","and","ascending","args","async","await","by","descending","dynamic","equals","file","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","record","remove","required","scoped","select","set","unmanaged","value|0","var","when","where","with","yield"],KEYWORDS2={keyword:NORMAL_KEYWORDS.concat(CONTEXTUAL_KEYWORDS),built_in:BUILT_IN_KEYWORDS,
literal:LITERAL_KEYWORDS},TITLE_MODE=hljs.inherit(hljs.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),NUMBERS={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},RAW_STRING={className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},VERBATIM_STRING={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},VERBATIM_STRING_NO_LF=hljs.
inherit(VERBATIM_STRING,{illegal:/\n/}),SUBST={className:"subst",begin:/\{/,end:/\}/,keywords:KEYWORDS2},SUBST_NO_LF=hljs.inherit(SUBST,{illegal:/\n/}),INTERPOLATED_STRING={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},hljs.BACKSLASH_ESCAPE,SUBST_NO_LF]},INTERPOLATED_VERBATIM_STRING={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},SUBST]},INTERPOLATED_VERBATIM_STRING_NO_LF=hljs.inherit(INTERPOLATED_VERBATIM_STRING,
{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},SUBST_NO_LF]});SUBST.contains=[INTERPOLATED_VERBATIM_STRING,INTERPOLATED_STRING,VERBATIM_STRING,hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,NUMBERS,hljs.C_BLOCK_COMMENT_MODE],SUBST_NO_LF.contains=[INTERPOLATED_VERBATIM_STRING_NO_LF,INTERPOLATED_STRING,VERBATIM_STRING_NO_LF,hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,NUMBERS,hljs.inherit(hljs.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const STRING={variants:[RAW_STRING,INTERPOLATED_VERBATIM_STRING,
INTERPOLATED_STRING,VERBATIM_STRING,hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE]},GENERIC_MODIFIER={begin:"<",end:">",contains:[{beginKeywords:"in out"},TITLE_MODE]},TYPE_IDENT_RE=hljs.IDENT_RE+"(<"+hljs.IDENT_RE+"(\\s*,\\s*"+hljs.IDENT_RE+")*>)?(\\[\\])?",AT_IDENTIFIER={begin:"@"+hljs.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:KEYWORDS2,illegal:/::/,contains:[hljs.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"\
<!--|-->"},{begin:"</?",end:">"}]}]}),hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},STRING,NUMBERS,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},TITLE_MODE,GENERIC_MODIFIER,hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,
contains:[TITLE_MODE,hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[TITLE_MODE,GENERIC_MODIFIER,hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+TYPE_IDENT_RE+"\\s+)+"+hljs.IDENT_RE+"\\s*(<[^\
=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:KEYWORDS2,contains:[{beginKeywords:FUNCTION_MODIFIERS.join(" "),relevance:0},{begin:hljs.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[hljs.TITLE_MODE,GENERIC_MODIFIER],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:KEYWORDS2,relevance:0,contains:[STRING,NUMBERS,hljs.C_BLOCK_COMMENT_MODE]},hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE]},AT_IDENTIFIER]}}
return csharp_1=csharp2,csharp_1}var csp_1,hasRequiredCsp;function requireCsp(){if(hasRequiredCsp)return csp_1;hasRequiredCsp=1;function csp2(hljs){return{name:"CSP",case_insensitive:!1,keywords:{$pattern:"[a-zA-Z][a-zA-Z0-9_-]*",keyword:["base-uri","child-src","connect-src","default-src","font-src","form-action","frame-ancestors","frame-src","img-src","manifest-src","media-src","object-src","plugin-types","report-uri","sandbox","script-src","style-src","trusted-types","unsafe-hashes","worker-sr\
c"]},contains:[{className:"string",begin:"'",end:"'"},{className:"attribute",begin:"^Content",end:":",excludeEnd:!0}]}}return csp_1=csp2,csp_1}var css_1,hasRequiredCss;function requireCss(){if(hasRequiredCss)return css_1;hasRequiredCss=1;const MODES2=hljs=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:hljs.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{
scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:hljs.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),HTML_TAGS2=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div",
"dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],SVG_TAGS2=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend",
"feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],TAGS2=[...HTML_TAGS2,...SVG_TAGS2],MEDIA_FEATURES2=["any-hover","any-pointer","aspect-ratio","color",
"color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),PSEUDO_CLASSES2=["active","any-link","blank","checked","cur\
rent","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-w\
rite","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),PSEUDO_ELEMENTS2=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),ATTRIBUTES2=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-dir\
ection","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-posit\
ion-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","bo\
rder-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-lef\
t","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","\
box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contai\
n-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flo\
od-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","fo\
nt-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-li\
mit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-styl\
e-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat",
"mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style",
"outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","\
page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margi\
n-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scr\
oll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decorat\
ion-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","\
transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume",
"white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function css2(hljs){const regex=hljs.regex,modes2=MODES2(hljs),VENDOR_PREFIX={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},AT_MODIFIERS="and or not only",AT_PROPERTY_RE=/@-?\w[\w]*(-\w+)*/,IDENT_RE2="[a-zA-Z-][a-zA-Z0-9_-]*",STRINGS=[hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{
keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[modes2.BLOCK_COMMENT,VENDOR_PREFIX,modes2.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+IDENT_RE2,relevance:0},modes2.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+PSEUDO_CLASSES2.join("|")+")"},{begin:":(:)?("+PSEUDO_ELEMENTS2.join("|")+")"}]},modes2.CSS_VARIABLE,{className:"attribute",begin:"\\b("+ATTRIBUTES2.
join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[modes2.BLOCK_COMMENT,modes2.HEXCOLOR,modes2.IMPORTANT,modes2.CSS_NUMBER_MODE,...STRINGS,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...STRINGS,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},modes2.FUNCTION_DISPATCH]},{begin:regex.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:AT_PROPERTY_RE},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,
keywords:{$pattern:/[a-z-]+/,keyword:AT_MODIFIERS,attribute:MEDIA_FEATURES2.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...STRINGS,modes2.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+TAGS2.join("|")+")\\b"}]}}return css_1=css2,css_1}var d_1,hasRequiredD;function requireD(){if(hasRequiredD)return d_1;hasRequiredD=1;function d2(hljs){const D_KEYWORDS={$pattern:hljs.UNDERSCORE_IDENT_RE,keyword:"abstract alias align asm assert auto body break byte case cast catch \
class const continue debug default delete deprecated do else enum export extern final finally for foreach foreach_reverse|10 goto if immutable import in inout int interface invariant is lazy macro mixin module new nothrow out override package pragma private protected public pure ref return scope shared static struct super switch synchronized template this throw try typedef typeid typeof union unittest version void volatile while with __FILE__ __LINE__ __gshared|10 __thread __traits __DATE__ __EO\
F__ __TIME__ __TIMESTAMP__ __VENDOR__ __VERSION__",built_in:"bool cdouble cent cfloat char creal dchar delegate double dstring float function idouble ifloat ireal long real short string ubyte ucent uint ulong ushort wchar wstring",literal:"false null true"},decimal_integer_re="(0|[1-9][\\d_]*)",decimal_integer_nosus_re="(0|[1-9][\\d_]*|\\d[\\d_]*|[\\d_]+?\\d)",binary_integer_re="0[bB][01_]+",hexadecimal_digits_re="([\\da-fA-F][\\da-fA-F_]*|_[\\da-fA-F][\\da-fA-F_]*)",hexadecimal_integer_re="0[xX\
]"+hexadecimal_digits_re,decimal_exponent_re="([eE][+-]?"+decimal_integer_nosus_re+")",decimal_float_re="("+decimal_integer_nosus_re+"(\\.\\d*|"+decimal_exponent_re+")|\\d+\\."+decimal_integer_nosus_re+"|\\."+decimal_integer_re+decimal_exponent_re+"?)",hexadecimal_float_re="(0[xX]("+hexadecimal_digits_re+"\\."+hexadecimal_digits_re+"|\\.?"+hexadecimal_digits_re+")[pP][+-]?"+decimal_integer_nosus_re+")",integer_re="("+decimal_integer_re+"|"+binary_integer_re+"|"+hexadecimal_integer_re+")",float_re="\
("+hexadecimal_float_re+"|"+decimal_float_re+")",escape_sequence_re=`\\\\(['"\\?\\\\abfnrtv]|u[\\dA-Fa-f]{4}|[0-7]{1,3}|x[\\dA-Fa-f]{2}|U[\\dA-Fa-f]{8})|&[a-zA-Z\\d]{2,};`,D_INTEGER_MODE={className:"number",begin:"\\b"+integer_re+"(L|u|U|Lu|LU|uL|UL)?",relevance:0},D_FLOAT_MODE={className:"number",begin:"\\b("+float_re+"([fF]|L|i|[fF]i|Li)?|"+integer_re+"(i|[fF]i|Li))",relevance:0},D_CHARACTER_MODE={className:"string",begin:"'("+escape_sequence_re+"|.)",end:"'",illegal:"."},D_STRING_MODE={className:"\
string",begin:'"',contains:[{begin:escape_sequence_re,relevance:0}],end:'"[cwd]?'},D_WYSIWYG_DELIMITED_STRING_MODE={className:"string",begin:'[rq]"',end:'"[cwd]?',relevance:5},D_ALTERNATE_WYSIWYG_STRING_MODE={className:"string",begin:"`",end:"`[cwd]?"},D_HEX_STRING_MODE={className:"string",begin:'x"[\\da-fA-F\\s\\n\\r]*"[cwd]?',relevance:10},D_TOKEN_STRING_MODE={className:"string",begin:'q"\\{',end:'\\}"'},D_HASHBANG_MODE={className:"meta",begin:"^#!",end:"$",relevance:5},D_SPECIAL_TOKEN_SEQUENCE_MODE={
className:"meta",begin:"#(line)",end:"$",relevance:5},D_ATTRIBUTE_MODE={className:"keyword",begin:"@[a-zA-Z_][a-zA-Z_\\d]*"},D_NESTING_COMMENT_MODE=hljs.COMMENT("\\/\\+","\\+\\/",{contains:["self"],relevance:10});return{name:"D",keywords:D_KEYWORDS,contains:[hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,D_NESTING_COMMENT_MODE,D_HEX_STRING_MODE,D_STRING_MODE,D_WYSIWYG_DELIMITED_STRING_MODE,D_ALTERNATE_WYSIWYG_STRING_MODE,D_TOKEN_STRING_MODE,D_FLOAT_MODE,D_INTEGER_MODE,D_CHARACTER_MODE,D_HASHBANG_MODE,
D_SPECIAL_TOKEN_SEQUENCE_MODE,D_ATTRIBUTE_MODE]}}return d_1=d2,d_1}var markdown_1,hasRequiredMarkdown;function requireMarkdown(){if(hasRequiredMarkdown)return markdown_1;hasRequiredMarkdown=1;function markdown2(hljs){const regex=hljs.regex,INLINE_HTML={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},HORIZONTAL_RULE={begin:"^[-\\*]{3,}",end:"$"},CODE={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},
{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},LIST={className:"bullet",begin:"^[ 	]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},LINK_REFERENCE={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},URL_SCHEME=/[A-Za-z][A-Za-z0-9+.-]*/,LINK={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},
{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:regex.concat(/\[.+?\]\(/,URL_SCHEME,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\
\\]",excludeBegin:!0,excludeEnd:!0}]},BOLD={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},ITALIC={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},BOLD_WITHOUT_ITALIC=hljs.inherit(BOLD,{contains:[]}),ITALIC_WITHOUT_BOLD=hljs.inherit(ITALIC,{contains:[]});BOLD.contains.push(ITALIC_WITHOUT_BOLD),ITALIC.contains.push(BOLD_WITHOUT_ITALIC);let CONTAINABLE=[INLINE_HTML,LINK];
return[BOLD,ITALIC,BOLD_WITHOUT_ITALIC,ITALIC_WITHOUT_BOLD].forEach(m=>{m.contains=m.contains.concat(CONTAINABLE)}),CONTAINABLE=CONTAINABLE.concat(BOLD,ITALIC),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:CONTAINABLE},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:CONTAINABLE}]}]},INLINE_HTML,LIST,BOLD,ITALIC,{className:"quote",begin:"^>\\s+",contains:CONTAINABLE,end:"$"},CODE,HORIZONTAL_RULE,
LINK,LINK_REFERENCE,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}return markdown_1=markdown2,markdown_1}var dart_1,hasRequiredDart;function requireDart(){if(hasRequiredDart)return dart_1;hasRequiredDart=1;function dart2(hljs){const SUBST={className:"subst",variants:[{begin:"\\$[A-Za-z0-9_]+"}]},BRACED_SUBST={className:"subst",variants:[{begin:/\$\{/,end:/\}/}],keywords:"true false null this is new super"},NUMBER={className:"number",relevance:0,variants:[{match:/\b[0-9][0-9_]*(\.[0-9][0-9_]*)?([eE][+-]?[0-9][0-9_]*)?\b/},
{match:/\b0[xX][0-9A-Fa-f][0-9A-Fa-f_]*\b/}]},STRING={className:"string",variants:[{begin:"r'''",end:"'''"},{begin:'r"""',end:'"""'},{begin:"r'",end:"'",illegal:"\\n"},{begin:'r"',end:'"',illegal:"\\n"},{begin:"'''",end:"'''",contains:[hljs.BACKSLASH_ESCAPE,SUBST,BRACED_SUBST]},{begin:'"""',end:'"""',contains:[hljs.BACKSLASH_ESCAPE,SUBST,BRACED_SUBST]},{begin:"'",end:"'",illegal:"\\n",contains:[hljs.BACKSLASH_ESCAPE,SUBST,BRACED_SUBST]},{begin:'"',end:'"',illegal:"\\n",contains:[hljs.BACKSLASH_ESCAPE,
SUBST,BRACED_SUBST]}]};BRACED_SUBST.contains=[NUMBER,STRING];const BUILT_IN_TYPES=["Comparable","DateTime","Duration","Function","Iterable","Iterator","List","Map","Match","Object","Pattern","RegExp","Set","Stopwatch","String","StringBuffer","StringSink","Symbol","Type","Uri","bool","double","int","num","Element","ElementList"],NULLABLE_BUILT_IN_TYPES=BUILT_IN_TYPES.map(e=>`${e}?`);return{name:"Dart",keywords:{keyword:["abstract","as","assert","async","await","base","break","case","catch","class",
"const","continue","covariant","default","deferred","do","dynamic","else","enum","export","extends","extension","external","factory","false","final","finally","for","Function","get","hide","if","implements","import","in","interface","is","late","library","mixin","new","null","on","operator","part","required","rethrow","return","sealed","set","show","static","super","switch","sync","this","throw","true","try","typedef","var","void","when","while","with","yield"],built_in:BUILT_IN_TYPES.concat(NULLABLE_BUILT_IN_TYPES).
concat(["Never","Null","dynamic","print","document","querySelector","querySelectorAll","window"]),$pattern:/[A-Za-z][A-Za-z0-9_]*\??/},contains:[STRING,hljs.COMMENT(/\/\*\*(?!\/)/,/\*\//,{subLanguage:"markdown",relevance:0}),hljs.COMMENT(/\/{3,} ?/,/$/,{contains:[{subLanguage:"markdown",begin:".",end:"$",relevance:0}]}),hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,{className:"class",beginKeywords:"class interface",end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},hljs.UNDERSCORE_TITLE_MODE]},
NUMBER,{className:"meta",begin:"@[A-Za-z]+"},{begin:"=>"}]}}return dart_1=dart2,dart_1}var delphi_1,hasRequiredDelphi;function requireDelphi(){if(hasRequiredDelphi)return delphi_1;hasRequiredDelphi=1;function delphi2(hljs){const KEYWORDS2=["exports","register","file","shl","array","record","property","for","mod","while","set","ally","label","uses","raise","not","stored","class","safecall","var","interface","or","private","static","exit","index","inherited","to","else","stdcall","override","shr",
"asm","far","resourcestring","finalization","packed","virtual","out","and","protected","library","do","xorwrite","goto","near","function","end","div","overload","object","unit","begin","string","on","inline","repeat","until","destructor","write","message","program","with","read","initialization","except","default","nil","if","case","cdecl","in","downto","threadvar","of","try","pascal","const","external","constructor","type","public","then","implementation","finally","published","procedure","abso\
lute","reintroduce","operator","as","is","abstract","alias","assembler","bitpacked","break","continue","cppdecl","cvar","enumerator","experimental","platform","deprecated","unimplemented","dynamic","export","far16","forward","generic","helper","implements","interrupt","iochecks","local","name","nodefault","noreturn","nostackframe","oldfpccall","otherwise","saveregisters","softfloat","specialize","strict","unaligned","varargs"],COMMENT_MODES=[hljs.C_LINE_COMMENT_MODE,hljs.COMMENT(/\{/,/\}/,{relevance:0}),
hljs.COMMENT(/\(\*/,/\*\)/,{relevance:10})],DIRECTIVE={className:"meta",variants:[{begin:/\{\$/,end:/\}/},{begin:/\(\*\$/,end:/\*\)/}]},STRING={className:"string",begin:/'/,end:/'/,contains:[{begin:/''/}]},NUMBER={className:"number",relevance:0,variants:[{match:/\b\d[\d_]*(\.\d[\d_]*)?/},{match:/\$[\dA-Fa-f_]+/},{match:/\$/,relevance:0},{match:/&[0-7][0-7_]*/},{match:/%[01_]+/},{match:/%/,relevance:0}]},CHAR_STRING={className:"string",variants:[{match:/#\d[\d_]*/},{match:/#\$[\dA-Fa-f][\dA-Fa-f_]*/},
{match:/#&[0-7][0-7_]*/},{match:/#%[01][01_]*/}]},CLASS2={begin:hljs.IDENT_RE+"\\s*=\\s*class\\s*\\(",returnBegin:!0,contains:[hljs.TITLE_MODE]},FUNCTION={className:"function",beginKeywords:"function constructor destructor procedure",end:/[:;]/,keywords:"function constructor|10 destructor|10 procedure|10",contains:[hljs.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,keywords:KEYWORDS2,contains:[STRING,CHAR_STRING,DIRECTIVE].concat(COMMENT_MODES)},DIRECTIVE].concat(COMMENT_MODES)};return{name:"\
Delphi",aliases:["dpr","dfm","pas","pascal"],case_insensitive:!0,keywords:KEYWORDS2,illegal:/"|\$[G-Zg-z]|\/\*|<\/|\|/,contains:[STRING,CHAR_STRING,NUMBER,CLASS2,FUNCTION,DIRECTIVE].concat(COMMENT_MODES)}}return delphi_1=delphi2,delphi_1}var diff_1,hasRequiredDiff;function requireDiff(){if(hasRequiredDiff)return diff_1;hasRequiredDiff=1;function diff2(hljs){const regex=hljs.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:regex.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,
/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:regex.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}return diff_1=diff2,diff_1}var django_1,hasRequiredDjango;function requireDjango(){if(hasRequiredDjango)return django_1;hasRequiredDjango=1;function django2(hljs){const FILTER={
begin:/\|[A-Za-z]+:?/,keywords:{name:"truncatewords removetags linebreaksbr yesno get_digit timesince random striptags filesizeformat escape linebreaks length_is ljust rjust cut urlize fix_ampersands title floatformat capfirst pprint divisibleby add make_list unordered_list urlencode timeuntil urlizetrunc wordcount stringformat linenumbers slice date dictsort dictsortreversed default_if_none pluralize lower join center default truncatewords_html upper length phone2numeric wordwrap time addslashe\
s slugify first escapejs force_escape iriencode last safe safeseq truncatechars localize unlocalize localtime utc timezone"},contains:[hljs.QUOTE_STRING_MODE,hljs.APOS_STRING_MODE]};return{name:"Django",aliases:["jinja"],case_insensitive:!0,subLanguage:"xml",contains:[hljs.COMMENT(/\{%\s*comment\s*%\}/,/\{%\s*endcomment\s*%\}/),hljs.COMMENT(/\{#/,/#\}/),{className:"template-tag",begin:/\{%/,end:/%\}/,contains:[{className:"name",begin:/\w+/,keywords:{name:"comment endcomment load templatetag ifch\
anged endifchanged if endif firstof for endfor ifnotequal endifnotequal widthratio extends include spaceless endspaceless regroup ifequal endifequal ssi now with cycle url filter endfilter debug block endblock else autoescape endautoescape csrf_token empty elif endwith static trans blocktrans endblocktrans get_static_prefix get_media_prefix plural get_current_language language get_available_languages get_current_language_bidi get_language_info get_language_info_list localize endlocalize localtim\
e endlocaltime timezone endtimezone get_current_timezone verbatim"},starts:{endsWithParent:!0,keywords:"in by as",contains:[FILTER],relevance:0}}]},{className:"template-variable",begin:/\{\{/,end:/\}\}/,contains:[FILTER]}]}}return django_1=django2,django_1}var dns_1,hasRequiredDns;function requireDns(){if(hasRequiredDns)return dns_1;hasRequiredDns=1;function dns2(hljs){return{name:"DNS Zone",aliases:["bind","zone"],keywords:["IN","A","AAAA","AFSDB","APL","CAA","CDNSKEY","CDS","CERT","CNAME","DHC\
ID","DLV","DNAME","DNSKEY","DS","HIP","IPSECKEY","KEY","KX","LOC","MX","NAPTR","NS","NSEC","NSEC3","NSEC3PARAM","PTR","RRSIG","RP","SIG","SOA","SRV","SSHFP","TA","TKEY","TLSA","TSIG","TXT"],contains:[hljs.COMMENT(";","$",{relevance:0}),{className:"meta",begin:/^\$(TTL|GENERATE|INCLUDE|ORIGIN)\b/},{className:"number",begin:"((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9A\
-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-\
f]{1,4}){0,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))\\b"},{className:"number",begin:"((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]).){3,3}(2\
5[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\b"},hljs.inherit(hljs.NUMBER_MODE,{begin:/\b\d+[dhwm]?/})]}}return dns_1=dns2,dns_1}var dockerfile_1,hasRequiredDockerfile;function requireDockerfile(){if(hasRequiredDockerfile)return dockerfile_1;hasRequiredDockerfile=1;function dockerfile2(hljs){return{name:"Dockerfile",aliases:["docker"],case_insensitive:!0,keywords:["from","maintainer","expose","env","arg","user","onbuild","stopsignal"],contains:[hljs.HASH_COMMENT_MODE,hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,
hljs.NUMBER_MODE,{beginKeywords:"run cmd entrypoint volume add copy workdir label healthcheck shell",starts:{end:/[^\\]$/,subLanguage:"bash"}}],illegal:"</"}}return dockerfile_1=dockerfile2,dockerfile_1}var dos_1,hasRequiredDos;function requireDos(){if(hasRequiredDos)return dos_1;hasRequiredDos=1;function dos2(hljs){const COMMENT=hljs.COMMENT(/^\s*@?rem\b/,/$/,{relevance:10});return{name:"Batch file (DOS)",aliases:["bat","cmd"],case_insensitive:!0,illegal:/\/\*/,keywords:{keyword:["if","else","g\
oto","for","in","do","call","exit","not","exist","errorlevel","defined","equ","neq","lss","leq","gtr","geq"],built_in:["prn","nul","lpt3","lpt2","lpt1","con","com4","com3","com2","com1","aux","shift","cd","dir","echo","setlocal","endlocal","set","pause","copy","append","assoc","at","attrib","break","cacls","cd","chcp","chdir","chkdsk","chkntfs","cls","cmd","color","comp","compact","convert","date","dir","diskcomp","diskcopy","doskey","erase","fs","find","findstr","format","ftype","graftabl","hel\
p","keyb","label","md","mkdir","mode","more","move","path","pause","print","popd","pushd","promt","rd","recover","rem","rename","replace","restore","rmdir","shift","sort","start","subst","time","title","tree","type","ver","verify","vol","ping","net","ipconfig","taskkill","xcopy","ren","del"]},contains:[{className:"variable",begin:/%%[^ ]|%[^ ]+?%|![^ ]+?!/},{className:"function",begin:{begin:"^\\s*[A-Za-z._?][A-Za-z0-9_$#@~.?]*(:|\\s+label)"}.begin,end:"goto:eof",contains:[hljs.inherit(hljs.TITLE_MODE,
{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),COMMENT]},{className:"number",begin:"\\b\\d+",relevance:0},COMMENT]}}return dos_1=dos2,dos_1}var dsconfig_1,hasRequiredDsconfig;function requireDsconfig(){if(hasRequiredDsconfig)return dsconfig_1;hasRequiredDsconfig=1;function dsconfig2(hljs){return{keywords:"dsconfig",contains:[{className:"keyword",begin:"^dsconfig",end:/\s/,excludeEnd:!0,relevance:10},{className:"built_in",begin:/(list|create|get|set|delete)-(\w+)/,end:/\s/,excludeEnd:!0,
illegal:"!@#$%^&*()",relevance:10},{className:"built_in",begin:/--(\w+)/,end:/\s/,excludeEnd:!0},{className:"string",begin:/"/,end:/"/},{className:"string",begin:/'/,end:/'/},{className:"string",begin:/[\w\-?]+:\w+/,end:/\W/,relevance:0},{className:"string",begin:/\w+(\-\w+)*/,end:/(?=\W)/,relevance:0},hljs.HASH_COMMENT_MODE]}}return dsconfig_1=dsconfig2,dsconfig_1}var dts_1,hasRequiredDts;function requireDts(){if(hasRequiredDts)return dts_1;hasRequiredDts=1;function dts2(hljs){const STRINGS={className:"\
string",variants:[hljs.inherit(hljs.QUOTE_STRING_MODE,{begin:'((u8?|U)|L)?"'}),{begin:'(u8?|U)?R"',end:'"',contains:[hljs.BACKSLASH_ESCAPE]},{begin:"'\\\\?.",end:"'",illegal:"."}]},NUMBERS={className:"number",variants:[{begin:"\\b(\\d+(\\.\\d*)?|\\.\\d+)(u|U|l|L|ul|UL|f|F)"},{begin:hljs.C_NUMBER_RE}],relevance:0},PREPROCESSOR={className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef ifdef ifndef"},contains:[{begin:/\\\n/,relevance:0},{beginKeywords:"include",end:"$",
keywords:{keyword:"include"},contains:[hljs.inherit(STRINGS,{className:"string"}),{className:"string",begin:"<",end:">",illegal:"\\n"}]},STRINGS,hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE]},REFERENCE={className:"variable",begin:/&[a-z\d_]*\b/},KEYWORD={className:"keyword",begin:"/[a-z][a-z\\d-]*/"},LABEL={className:"symbol",begin:"^\\s*[a-zA-Z_][a-zA-Z\\d_]*:"},CELL_PROPERTY={className:"params",relevance:0,begin:"<",end:">",contains:[NUMBERS,REFERENCE]},NODE={className:"title.class",begin:/[a-zA-Z_][a-zA-Z\d_@-]*(?=\s\{)/,
relevance:.2},ROOT_NODE={className:"title.class",begin:/^\/(?=\s*\{)/,relevance:10},ATTR_NO_VALUE={match:/[a-z][a-z-,]+(?=;)/,relevance:0,scope:"attr"},ATTR={relevance:0,match:[/[a-z][a-z-,]+/,/\s*/,/=/],scope:{1:"attr",3:"operator"}},PUNC={scope:"punctuation",relevance:0,match:/\};|[;{}]/};return{name:"Device Tree",contains:[ROOT_NODE,REFERENCE,KEYWORD,LABEL,NODE,ATTR,ATTR_NO_VALUE,CELL_PROPERTY,hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,NUMBERS,STRINGS,PREPROCESSOR,PUNC,{begin:hljs.IDENT_RE+
"::",keywords:""}]}}return dts_1=dts2,dts_1}var dust_1,hasRequiredDust;function requireDust(){if(hasRequiredDust)return dust_1;hasRequiredDust=1;function dust2(hljs){return{name:"Dust",aliases:["dst"],case_insensitive:!0,subLanguage:"xml",contains:[{className:"template-tag",begin:/\{[#\/]/,end:/\}/,illegal:/;/,contains:[{className:"name",begin:/[a-zA-Z\.-]+/,starts:{endsWithParent:!0,relevance:0,contains:[hljs.QUOTE_STRING_MODE]}}]},{className:"template-variable",begin:/\{/,end:/\}/,illegal:/;/,
keywords:"if eq ne lt lte gt gte select default math sep"}]}}return dust_1=dust2,dust_1}var ebnf_1,hasRequiredEbnf;function requireEbnf(){if(hasRequiredEbnf)return ebnf_1;hasRequiredEbnf=1;function ebnf2(hljs){const commentMode=hljs.COMMENT(/\(\*/,/\*\)/),nonTerminalMode={className:"attribute",begin:/^[ ]*[a-zA-Z]+([\s_-]+[a-zA-Z]+)*/},ruleBodyMode={begin:/=/,end:/[.;]/,contains:[commentMode,{className:"meta",begin:/\?.*\?/},{className:"string",variants:[hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,
{begin:"`",end:"`"}]}]};return{name:"Extended Backus-Naur Form",illegal:/\S/,contains:[commentMode,nonTerminalMode,ruleBodyMode]}}return ebnf_1=ebnf2,ebnf_1}var elixir_1,hasRequiredElixir;function requireElixir(){if(hasRequiredElixir)return elixir_1;hasRequiredElixir=1;function elixir2(hljs){const regex=hljs.regex,ELIXIR_IDENT_RE="[a-zA-Z_][a-zA-Z0-9_.]*(!|\\?)?",ELIXIR_METHOD_RE="[a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?",KWS={$pattern:ELIXIR_IDENT_RE,keyword:[
"after","alias","and","case","catch","cond","defstruct","defguard","do","else","end","fn","for","if","import","in","not","or","quote","raise","receive","require","reraise","rescue","try","unless","unquote","unquote_splicing","use","when","with|0"],literal:["false","nil","true"]},SUBST={className:"subst",begin:/#\{/,end:/\}/,keywords:KWS},NUMBER={className:"number",begin:"(\\b0o[0-7_]+)|(\\b0b[01_]+)|(\\b0x[0-9a-fA-F_]+)|(-?\\b[0-9][0-9_]*(\\.[0-9_]+([eE][-+]?[0-9]+)?)?)",relevance:0},BACKSLASH_ESCAPE={
match:/\\[\s\S]/,scope:"char.escape",relevance:0},SIGIL_DELIMITERS=`[/|([{<"']`,SIGIL_DELIMITER_MODES=[{begin:/"/,end:/"/},{begin:/'/,end:/'/},{begin:/\//,end:/\//},{begin:/\|/,end:/\|/},{begin:/\(/,end:/\)/},{begin:/\[/,end:/\]/},{begin:/\{/,end:/\}/},{begin:/</,end:/>/}],escapeSigilEnd=end=>({scope:"char.escape",begin:regex.concat(/\\/,end),relevance:0}),LOWERCASE_SIGIL={className:"string",begin:"~[a-z](?="+SIGIL_DELIMITERS+")",contains:SIGIL_DELIMITER_MODES.map(x=>hljs.inherit(x,{contains:[escapeSigilEnd(
x.end),BACKSLASH_ESCAPE,SUBST]}))},UPCASE_SIGIL={className:"string",begin:"~[A-Z](?="+SIGIL_DELIMITERS+")",contains:SIGIL_DELIMITER_MODES.map(x=>hljs.inherit(x,{contains:[escapeSigilEnd(x.end)]}))},REGEX_SIGIL={className:"regex",variants:[{begin:"~r(?="+SIGIL_DELIMITERS+")",contains:SIGIL_DELIMITER_MODES.map(x=>hljs.inherit(x,{end:regex.concat(x.end,/[uismxfU]{0,7}/),contains:[escapeSigilEnd(x.end),BACKSLASH_ESCAPE,SUBST]}))},{begin:"~R(?="+SIGIL_DELIMITERS+")",contains:SIGIL_DELIMITER_MODES.map(
x=>hljs.inherit(x,{end:regex.concat(x.end,/[uismxfU]{0,7}/),contains:[escapeSigilEnd(x.end)]}))}]},STRING={className:"string",contains:[hljs.BACKSLASH_ESCAPE,SUBST],variants:[{begin:/"""/,end:/"""/},{begin:/'''/,end:/'''/},{begin:/~S"""/,end:/"""/,contains:[]},{begin:/~S"/,end:/"/,contains:[]},{begin:/~S'''/,end:/'''/,contains:[]},{begin:/~S'/,end:/'/,contains:[]},{begin:/'/,end:/'/},{begin:/"/,end:/"/}]},FUNCTION={className:"function",beginKeywords:"def defp defmacro defmacrop",end:/\B\b/,contains:[
hljs.inherit(hljs.TITLE_MODE,{begin:ELIXIR_IDENT_RE,endsParent:!0})]},CLASS2=hljs.inherit(FUNCTION,{className:"class",beginKeywords:"defimpl defmodule defprotocol defrecord",end:/\bdo\b|$|;/}),ELIXIR_DEFAULT_CONTAINS=[STRING,REGEX_SIGIL,UPCASE_SIGIL,LOWERCASE_SIGIL,hljs.HASH_COMMENT_MODE,CLASS2,FUNCTION,{begin:"::"},{className:"symbol",begin:":(?![\\s:])",contains:[STRING,{begin:ELIXIR_METHOD_RE}],relevance:0},{className:"symbol",begin:ELIXIR_IDENT_RE+":(?!:)",relevance:0},{className:"title.clas\
s",begin:/(\b[A-Z][a-zA-Z0-9_]+)/,relevance:0},NUMBER,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))"}];return SUBST.contains=ELIXIR_DEFAULT_CONTAINS,{name:"Elixir",aliases:["ex","exs"],keywords:KWS,contains:ELIXIR_DEFAULT_CONTAINS}}return elixir_1=elixir2,elixir_1}var elm_1,hasRequiredElm;function requireElm(){if(hasRequiredElm)return elm_1;hasRequiredElm=1;function elm2(hljs){const COMMENT={variants:[hljs.COMMENT("--","$"),hljs.COMMENT(/\{-/,/-\}/,{contains:["self"]})]},CONSTRUCTOR={className:"\
type",begin:"\\b[A-Z][\\w']*",relevance:0},LIST={begin:"\\(",end:"\\)",illegal:'"',contains:[{className:"type",begin:"\\b[A-Z][\\w]*(\\((\\.\\.|,|\\w+)\\))?"},COMMENT]},RECORD={begin:/\{/,end:/\}/,contains:LIST.contains},CHARACTER={className:"string",begin:"'\\\\?.",end:"'",illegal:"."};return{name:"Elm",keywords:["let","in","if","then","else","case","of","where","module","import","exposing","type","alias","as","infix","infixl","infixr","port","effect","command","subscription"],contains:[{beginKeywords:"\
port effect module",end:"exposing",keywords:"port effect module where command subscription exposing",contains:[LIST,COMMENT],illegal:"\\W\\.|;"},{begin:"import",end:"$",keywords:"import as exposing",contains:[LIST,COMMENT],illegal:"\\W\\.|;"},{begin:"type",end:"$",keywords:"type alias",contains:[CONSTRUCTOR,LIST,RECORD,COMMENT]},{beginKeywords:"infix infixl infixr",end:"$",contains:[hljs.C_NUMBER_MODE,COMMENT]},{begin:"port",end:"$",keywords:"port",contains:[COMMENT]},CHARACTER,hljs.QUOTE_STRING_MODE,
hljs.C_NUMBER_MODE,CONSTRUCTOR,hljs.inherit(hljs.TITLE_MODE,{begin:"^[_a-z][\\w']*"}),COMMENT,{begin:"->|<-"}],illegal:/;/}}return elm_1=elm2,elm_1}var ruby_1,hasRequiredRuby;function requireRuby(){if(hasRequiredRuby)return ruby_1;hasRequiredRuby=1;function ruby2(hljs){const regex=hljs.regex,RUBY_METHOD_RE="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",CLASS_NAME_RE=regex.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),CLASS_NAME_WITH_NAMESPACE_RE=regex.
concat(CLASS_NAME_RE,/(::\w+)*/),RUBY_KEYWORDS={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","la\
mbda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},YARDOCTAG={className:"doctag",begin:"@[A-Za-z]+"},IRB_OBJECT={begin:"#<",end:">"},COMMENT_MODES=[hljs.COMMENT("#","$",{contains:[YARDOCTAG]}),hljs.COMMENT("^=begin","^=end",{contains:[YARDOCTAG],relevance:10}),hljs.COMMENT("^__END__",hljs.MATCH_NOTHING_RE)],SUBST={className:"subst",begin:/#\{/,end:/\}/,keywords:RUBY_KEYWORDS},STRING={className:"string",contains:[
hljs.BACKSLASH_ESCAPE,SUBST],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},
{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:regex.concat(/<<[-~]?'?/,regex.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[hljs.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[hljs.BACKSLASH_ESCAPE,SUBST]})]}]},decimal="[1-9](_?[0-9])*|0",digits="[0-9](_?[0-9])*",NUMBER={className:"number",relevance:0,variants:[{begin:`\\b(${decimal})(\\.(${digits}))?([eE][+-]?(${digits})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?\
i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},PARAMS={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:RUBY_KEYWORDS}]},RUBY_DEFAULT_CONTAINS=[STRING,{variants:[{match:[/class\s+/,CLASS_NAME_WITH_NAMESPACE_RE,/\s+<\s+/,CLASS_NAME_WITH_NAMESPACE_RE]},{match:[/\b(class|module)\s+/,CLASS_NAME_WITH_NAMESPACE_RE]}],scope:{2:"title.class",4:"title.class.i\
nherited"},keywords:RUBY_KEYWORDS},{match:[/(include|extend)\s+/,CLASS_NAME_WITH_NAMESPACE_RE],scope:{2:"title.class"},keywords:RUBY_KEYWORDS},{relevance:0,match:[CLASS_NAME_WITH_NAMESPACE_RE,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:CLASS_NAME_RE,scope:"title.class"},{match:[/def/,/\s+/,RUBY_METHOD_RE],scope:{1:"keyword",3:"title.function"},contains:[PARAMS]},{begin:hljs.IDENT_RE+"::"},{className:"symbol",begin:hljs.
UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[STRING,{begin:RUBY_METHOD_RE}],relevance:0},NUMBER,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:RUBY_KEYWORDS},{begin:"("+hljs.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[hljs.BACKSLASH_ESCAPE,SUBST],illegal:/\n/,variants:[
{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(IRB_OBJECT,COMMENT_MODES),relevance:0}].concat(IRB_OBJECT,COMMENT_MODES);SUBST.contains=RUBY_DEFAULT_CONTAINS,PARAMS.contains=RUBY_DEFAULT_CONTAINS;const IRB_DEFAULT=[{begin:/^\s*=>/,starts:{end:"$",contains:RUBY_DEFAULT_CONTAINS}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\\
d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:RUBY_KEYWORDS,contains:RUBY_DEFAULT_CONTAINS}}];return COMMENT_MODES.unshift(IRB_OBJECT),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:RUBY_KEYWORDS,illegal:/\/\*/,contains:[hljs.SHEBANG({binary:"ruby"})].concat(IRB_DEFAULT).concat(COMMENT_MODES).concat(RUBY_DEFAULT_CONTAINS)}}return ruby_1=ruby2,ruby_1}var erb_1,hasRequiredErb;function requireErb(){if(hasRequiredErb)return erb_1;hasRequiredErb=1;function erb2(hljs){return{
name:"ERB",subLanguage:"xml",contains:[hljs.COMMENT("<%#","%>"),{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0}]}}return erb_1=erb2,erb_1}var erlangRepl_1,hasRequiredErlangRepl;function requireErlangRepl(){if(hasRequiredErlangRepl)return erlangRepl_1;hasRequiredErlangRepl=1;function erlangRepl2(hljs){const regex=hljs.regex;return{name:"Erlang REPL",keywords:{built_in:"spawn spawn_link self",keyword:"after and andalso|10 band begin bnot bor bsl bsr bxor case catc\
h cond div end fun if let not of or orelse|10 query receive rem try when xor"},contains:[{className:"meta.prompt",begin:"^[0-9]+> ",relevance:10},hljs.COMMENT("%","$"),{className:"number",begin:"\\b(\\d+(_\\d+)*#[a-fA-F0-9]+(_[a-fA-F0-9]+)*|\\d+(_\\d+)*(\\.\\d+(_\\d+)*)?([eE][-+]?\\d+)?)",relevance:0},hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,{begin:regex.concat(/\?(::)?/,/([A-Z]\w*)/,/((::)[A-Z]\w*)*/)},{begin:"->"},{begin:"ok"},{begin:"!"},{begin:"(\\b[a-z'][a-zA-Z0-9_']*:[a-z'][a-zA-Z0-9_']\
*)|(\\b[a-z'][a-zA-Z0-9_']*)",relevance:0},{begin:"[A-Z][a-zA-Z0-9_']*",relevance:0}]}}return erlangRepl_1=erlangRepl2,erlangRepl_1}var erlang_1,hasRequiredErlang;function requireErlang(){if(hasRequiredErlang)return erlang_1;hasRequiredErlang=1;function erlang2(hljs){const BASIC_ATOM_RE="[a-z'][a-zA-Z0-9_']*",FUNCTION_NAME_RE="("+BASIC_ATOM_RE+":"+BASIC_ATOM_RE+"|"+BASIC_ATOM_RE+")",ERLANG_RESERVED={keyword:"after and andalso|10 band begin bnot bor bsl bzr bxor case catch cond div end fun if let\
 not of orelse|10 query receive rem try when xor maybe else",literal:"false true"},COMMENT=hljs.COMMENT("%","$"),NUMBER={className:"number",begin:"\\b(\\d+(_\\d+)*#[a-fA-F0-9]+(_[a-fA-F0-9]+)*|\\d+(_\\d+)*(\\.\\d+(_\\d+)*)?([eE][-+]?\\d+)?)",relevance:0},NAMED_FUN={begin:"fun\\s+"+BASIC_ATOM_RE+"/\\d+"},FUNCTION_CALL={begin:FUNCTION_NAME_RE+"\\(",end:"\\)",returnBegin:!0,relevance:0,contains:[{begin:FUNCTION_NAME_RE,relevance:0},{begin:"\\(",end:"\\)",endsWithParent:!0,returnEnd:!0,relevance:0}]},
TUPLE={begin:/\{/,end:/\}/,relevance:0},VAR1={begin:"\\b_([A-Z][A-Za-z0-9_]*)?",relevance:0},VAR2={begin:"[A-Z][a-zA-Z0-9_]*",relevance:0},RECORD_ACCESS={begin:"#"+hljs.UNDERSCORE_IDENT_RE,relevance:0,returnBegin:!0,contains:[{begin:"#"+hljs.UNDERSCORE_IDENT_RE,relevance:0},{begin:/\{/,end:/\}/,relevance:0}]},CHAR_LITERAL={scope:"string",match:/\$(\\([^0-9]|[0-9]{1,3}|)|.)/},TRIPLE_QUOTE={scope:"string",match:/"""("*)(?!")[\s\S]*?"""\1/},SIGIL={scope:"string",contains:[hljs.BACKSLASH_ESCAPE],variants:[
{match:/~\w?"""("*)(?!")[\s\S]*?"""\1/},{begin:/~\w?\(/,end:/\)/},{begin:/~\w?\[/,end:/\]/},{begin:/~\w?{/,end:/}/},{begin:/~\w?</,end:/>/},{begin:/~\w?\//,end:/\//},{begin:/~\w?\|/,end:/\|/},{begin:/~\w?'/,end:/'/},{begin:/~\w?"/,end:/"/},{begin:/~\w?`/,end:/`/},{begin:/~\w?#/,end:/#/}]},BLOCK_STATEMENTS={beginKeywords:"fun receive if try case maybe",end:"end",keywords:ERLANG_RESERVED};BLOCK_STATEMENTS.contains=[COMMENT,NAMED_FUN,hljs.inherit(hljs.APOS_STRING_MODE,{className:""}),BLOCK_STATEMENTS,
FUNCTION_CALL,SIGIL,TRIPLE_QUOTE,hljs.QUOTE_STRING_MODE,NUMBER,TUPLE,VAR1,VAR2,RECORD_ACCESS,CHAR_LITERAL];const BASIC_MODES=[COMMENT,NAMED_FUN,BLOCK_STATEMENTS,FUNCTION_CALL,SIGIL,TRIPLE_QUOTE,hljs.QUOTE_STRING_MODE,NUMBER,TUPLE,VAR1,VAR2,RECORD_ACCESS,CHAR_LITERAL];FUNCTION_CALL.contains[1].contains=BASIC_MODES,TUPLE.contains=BASIC_MODES,RECORD_ACCESS.contains[1].contains=BASIC_MODES;const DIRECTIVES=["-module","-record","-undef","-export","-ifdef","-ifndef","-author","-copyright","-doc","-mod\
uledoc","-vsn","-import","-include","-include_lib","-compile","-define","-else","-endif","-file","-behaviour","-behavior","-spec","-on_load","-nifs"],PARAMS={className:"params",begin:"\\(",end:"\\)",contains:BASIC_MODES};return{name:"Erlang",aliases:["erl"],keywords:ERLANG_RESERVED,illegal:"(</|\\*=|\\+=|-=|/\\*|\\*/|\\(\\*|\\*\\))",contains:[{className:"function",begin:"^"+BASIC_ATOM_RE+"\\s*\\(",end:"->",returnBegin:!0,illegal:"\\(|#|//|/\\*|\\\\|:|;",contains:[PARAMS,hljs.inherit(hljs.TITLE_MODE,
{begin:BASIC_ATOM_RE})],starts:{end:";|\\.",keywords:ERLANG_RESERVED,contains:BASIC_MODES}},COMMENT,{begin:"^-",end:"\\.",relevance:0,excludeEnd:!0,returnBegin:!0,keywords:{$pattern:"-"+hljs.IDENT_RE,keyword:DIRECTIVES.map(x=>`${x}|1.5`).join(" ")},contains:[PARAMS,SIGIL,TRIPLE_QUOTE,hljs.QUOTE_STRING_MODE]},NUMBER,SIGIL,TRIPLE_QUOTE,hljs.QUOTE_STRING_MODE,RECORD_ACCESS,VAR1,VAR2,TUPLE,CHAR_LITERAL,{begin:/\.$/}]}}return erlang_1=erlang2,erlang_1}var excel_1,hasRequiredExcel;function requireExcel(){
if(hasRequiredExcel)return excel_1;hasRequiredExcel=1;function excel2(hljs){return{name:"Excel formulae",aliases:["xlsx","xls"],case_insensitive:!0,keywords:{$pattern:/[a-zA-Z][\w\.]*/,built_in:["ABS","ACCRINT","ACCRINTM","ACOS","ACOSH","ACOT","ACOTH","AGGREGATE","ADDRESS","AMORDEGRC","AMORLINC","AND","ARABIC","AREAS","ARRAYTOTEXT","ASC","ASIN","ASINH","ATAN","ATAN2","ATANH","AVEDEV","AVERAGE","AVERAGEA","AVERAGEIF","AVERAGEIFS","BAHTTEXT","BASE","BESSELI","BESSELJ","BESSELK","BESSELY","BETADIST",
"BETA.DIST","BETAINV","BETA.INV","BIN2DEC","BIN2HEX","BIN2OCT","BINOMDIST","BINOM.DIST","BINOM.DIST.RANGE","BINOM.INV","BITAND","BITLSHIFT","BITOR","BITRSHIFT","BITXOR","BYCOL","BYROW","CALL","CEILING","CEILING.MATH","CEILING.PRECISE","CELL","CHAR","CHIDIST","CHIINV","CHITEST","CHISQ.DIST","CHISQ.DIST.RT","CHISQ.INV","CHISQ.INV.RT","CHISQ.TEST","CHOOSE","CHOOSECOLS","CHOOSEROWS","CLEAN","CODE","COLUMN","COLUMNS","COMBIN","COMBINA","COMPLEX","CONCAT","CONCATENATE","CONFIDENCE","CONFIDENCE.NORM","\
CONFIDENCE.T","CONVERT","CORREL","COS","COSH","COT","COTH","COUNT","COUNTA","COUNTBLANK","COUNTIF","COUNTIFS","COUPDAYBS","COUPDAYS","COUPDAYSNC","COUPNCD","COUPNUM","COUPPCD","COVAR","COVARIANCE.P","COVARIANCE.S","CRITBINOM","CSC","CSCH","CUBEKPIMEMBER","CUBEMEMBER","CUBEMEMBERPROPERTY","CUBERANKEDMEMBER","CUBESET","CUBESETCOUNT","CUBEVALUE","CUMIPMT","CUMPRINC","DATE","DATEDIF","DATEVALUE","DAVERAGE","DAY","DAYS","DAYS360","DB","DBCS","DCOUNT","DCOUNTA","DDB","DEC2BIN","DEC2HEX","DEC2OCT","DEC\
IMAL","DEGREES","DELTA","DEVSQ","DGET","DISC","DMAX","DMIN","DOLLAR","DOLLARDE","DOLLARFR","DPRODUCT","DROP","DSTDEV","DSTDEVP","DSUM","DURATION","DVAR","DVARP","EDATE","EFFECT","ENCODEURL","EOMONTH","ERF","ERF.PRECISE","ERFC","ERFC.PRECISE","ERROR.TYPE","EUROCONVERT","EVEN","EXACT","EXP","EXPAND","EXPON.DIST","EXPONDIST","FACT","FACTDOUBLE","FALSE","F.DIST","FDIST","F.DIST.RT","FILTER","FILTERXML","FIND","FINDB","F.INV","F.INV.RT","FINV","FISHER","FISHERINV","FIXED","FLOOR","FLOOR.MATH","FLOOR.\
PRECISE","FORECAST","FORECAST.ETS","FORECAST.ETS.CONFINT","FORECAST.ETS.SEASONALITY","FORECAST.ETS.STAT","FORECAST.LINEAR","FORMULATEXT","FREQUENCY","F.TEST","FTEST","FV","FVSCHEDULE","GAMMA","GAMMA.DIST","GAMMADIST","GAMMA.INV","GAMMAINV","GAMMALN","GAMMALN.PRECISE","GAUSS","GCD","GEOMEAN","GESTEP","GETPIVOTDATA","GROWTH","HARMEAN","HEX2BIN","HEX2DEC","HEX2OCT","HLOOKUP","HOUR","HSTACK","HYPERLINK","HYPGEOM.DIST","HYPGEOMDIST","IF","IFERROR","IFNA","IFS","IMABS","IMAGE","IMAGINARY","IMARGUMENT",
"IMCONJUGATE","IMCOS","IMCOSH","IMCOT","IMCSC","IMCSCH","IMDIV","IMEXP","IMLN","IMLOG10","IMLOG2","IMPOWER","IMPRODUCT","IMREAL","IMSEC","IMSECH","IMSIN","IMSINH","IMSQRT","IMSUB","IMSUM","IMTAN","INDEX","INDIRECT","INFO","INT","INTERCEPT","INTRATE","IPMT","IRR","ISBLANK","ISERR","ISERROR","ISEVEN","ISFORMULA","ISLOGICAL","ISNA","ISNONTEXT","ISNUMBER","ISODD","ISOMITTED","ISREF","ISTEXT","ISO.CEILING","ISOWEEKNUM","ISPMT","JIS","KURT","LAMBDA","LARGE","LCM","LEFT","LEFTB","LEN","LENB","LET","LIN\
EST","LN","LOG","LOG10","LOGEST","LOGINV","LOGNORM.DIST","LOGNORMDIST","LOGNORM.INV","LOOKUP","LOWER","MAKEARRAY","MAP","MATCH","MAX","MAXA","MAXIFS","MDETERM","MDURATION","MEDIAN","MID","MIDB","MIN","MINIFS","MINA","MINUTE","MINVERSE","MIRR","MMULT","MOD","MODE","MODE.MULT","MODE.SNGL","MONTH","MROUND","MULTINOMIAL","MUNIT","N","NA","NEGBINOM.DIST","NEGBINOMDIST","NETWORKDAYS","NETWORKDAYS.INTL","NOMINAL","NORM.DIST","NORMDIST","NORMINV","NORM.INV","NORM.S.DIST","NORMSDIST","NORM.S.INV","NORMSI\
NV","NOT","NOW","NPER","NPV","NUMBERVALUE","OCT2BIN","OCT2DEC","OCT2HEX","ODD","ODDFPRICE","ODDFYIELD","ODDLPRICE","ODDLYIELD","OFFSET","OR","PDURATION","PEARSON","PERCENTILE.EXC","PERCENTILE.INC","PERCENTILE","PERCENTRANK.EXC","PERCENTRANK.INC","PERCENTRANK","PERMUT","PERMUTATIONA","PHI","PHONETIC","PI","PMT","POISSON.DIST","POISSON","POWER","PPMT","PRICE","PRICEDISC","PRICEMAT","PROB","PRODUCT","PROPER","PV","QUARTILE","QUARTILE.EXC","QUARTILE.INC","QUOTIENT","RADIANS","RAND","RANDARRAY","RAND\
BETWEEN","RANK.AVG","RANK.EQ","RANK","RATE","RECEIVED","REDUCE","REGISTER.ID","REPLACE","REPLACEB","REPT","RIGHT","RIGHTB","ROMAN","ROUND","ROUNDDOWN","ROUNDUP","ROW","ROWS","RRI","RSQ","RTD","SCAN","SEARCH","SEARCHB","SEC","SECH","SECOND","SEQUENCE","SERIESSUM","SHEET","SHEETS","SIGN","SIN","SINH","SKEW","SKEW.P","SLN","SLOPE","SMALL","SORT","SORTBY","SQRT","SQRTPI","SQL.REQUEST","STANDARDIZE","STOCKHISTORY","STDEV","STDEV.P","STDEV.S","STDEVA","STDEVP","STDEVPA","STEYX","SUBSTITUTE","SUBTOTAL",
"SUM","SUMIF","SUMIFS","SUMPRODUCT","SUMSQ","SUMX2MY2","SUMX2PY2","SUMXMY2","SWITCH","SYD","T","TAN","TANH","TAKE","TBILLEQ","TBILLPRICE","TBILLYIELD","T.DIST","T.DIST.2T","T.DIST.RT","TDIST","TEXT","TEXTAFTER","TEXTBEFORE","TEXTJOIN","TEXTSPLIT","TIME","TIMEVALUE","T.INV","T.INV.2T","TINV","TOCOL","TOROW","TODAY","TRANSPOSE","TREND","TRIM","TRIMMEAN","TRUE","TRUNC","T.TEST","TTEST","TYPE","UNICHAR","UNICODE","UNIQUE","UPPER","VALUE","VALUETOTEXT","VAR","VAR.P","VAR.S","VARA","VARP","VARPA","VDB",
"VLOOKUP","VSTACK","WEBSERVICE","WEEKDAY","WEEKNUM","WEIBULL","WEIBULL.DIST","WORKDAY","WORKDAY.INTL","WRAPCOLS","WRAPROWS","XIRR","XLOOKUP","XMATCH","XNPV","XOR","YEAR","YEARFRAC","YIELD","YIELDDISC","YIELDMAT","Z.TEST","ZTEST"]},contains:[{begin:/^=/,end:/[^=]/,returnEnd:!0,illegal:/=/,relevance:10},{className:"symbol",begin:/\b[A-Z]{1,2}\d+\b/,end:/[^\d]/,excludeEnd:!0,relevance:0},{className:"symbol",begin:/[A-Z]{0,2}\d*:[A-Z]{0,2}\d*/,relevance:0},hljs.BACKSLASH_ESCAPE,hljs.QUOTE_STRING_MODE,
{className:"number",begin:hljs.NUMBER_RE+"(%)?",relevance:0},hljs.COMMENT(/\bN\(/,/\)/,{excludeBegin:!0,excludeEnd:!0,illegal:/\n/})]}}return excel_1=excel2,excel_1}var fix_1,hasRequiredFix;function requireFix(){if(hasRequiredFix)return fix_1;hasRequiredFix=1;function fix2(hljs){return{name:"FIX",contains:[{begin:/[^\u2401\u0001]+/,end:/[\u2401\u0001]/,excludeEnd:!0,returnBegin:!0,returnEnd:!1,contains:[{begin:/([^\u2401\u0001=]+)/,end:/=([^\u2401\u0001=]+)/,returnEnd:!0,returnBegin:!1,className:"\
attr"},{begin:/=/,end:/([\u2401\u0001])/,excludeEnd:!0,excludeBegin:!0,className:"string"}]}],case_insensitive:!0}}return fix_1=fix2,fix_1}var flix_1,hasRequiredFlix;function requireFlix(){if(hasRequiredFlix)return flix_1;hasRequiredFlix=1;function flix2(hljs){const CHAR={className:"string",begin:/'(.|\\[xXuU][a-zA-Z0-9]+)'/},STRING={className:"string",variants:[{begin:'"',end:'"'}]},METHOD={className:"function",beginKeywords:"def",end:/[:={\[(\n;]/,excludeEnd:!0,contains:[{className:"title",relevance:0,
begin:/[^0-9\n\t "'(),.`{}\[\]:;][^\n\t "'(),.`{}\[\]:;]+|[^0-9\n\t "'(),.`{}\[\]:;=]/}]};return{name:"Flix",keywords:{keyword:["case","class","def","else","enum","if","impl","import","in","lat","rel","index","let","match","namespace","switch","type","yield","with"],literal:["true","false"]},contains:[hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,CHAR,STRING,METHOD,hljs.C_NUMBER_MODE]}}return flix_1=flix2,flix_1}var fortran_1,hasRequiredFortran;function requireFortran(){if(hasRequiredFortran)
return fortran_1;hasRequiredFortran=1;function fortran2(hljs){const regex=hljs.regex,PARAMS={className:"params",begin:"\\(",end:"\\)"},COMMENT={variants:[hljs.COMMENT("!","$",{relevance:0}),hljs.COMMENT("^C[ ]","$",{relevance:0}),hljs.COMMENT("^C$","$",{relevance:0})]},OPTIONAL_NUMBER_SUFFIX=/(_[a-z_\d]+)?/,OPTIONAL_NUMBER_EXP=/([de][+-]?\d+)?/,NUMBER={className:"number",variants:[{begin:regex.concat(/\b\d+/,/\.(\d*)/,OPTIONAL_NUMBER_EXP,OPTIONAL_NUMBER_SUFFIX)},{begin:regex.concat(/\b\d+/,OPTIONAL_NUMBER_EXP,
OPTIONAL_NUMBER_SUFFIX)},{begin:regex.concat(/\.\d+/,OPTIONAL_NUMBER_EXP,OPTIONAL_NUMBER_SUFFIX)}],relevance:0},FUNCTION_DEF={className:"function",beginKeywords:"subroutine function program",illegal:"[${=\\n]",contains:[hljs.UNDERSCORE_TITLE_MODE,PARAMS]},STRING={className:"string",relevance:0,variants:[hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE]};return{name:"Fortran",case_insensitive:!0,aliases:["f90","f95"],keywords:{$pattern:/\b[a-z][a-z0-9_]+\b|\.[a-z][a-z0-9_]+\./,keyword:["kind","do","c\
oncurrent","local","shared","while","private","call","intrinsic","where","elsewhere","type","endtype","endmodule","endselect","endinterface","end","enddo","endif","if","forall","endforall","only","contains","default","return","stop","then","block","endblock","endassociate","public","subroutine|10","function","program",".and.",".or.",".not.",".le.",".eq.",".ge.",".gt.",".lt.","goto","save","else","use","module","select","case","access","blank","direct","exist","file","fmt","form","formatted","ios\
tat","name","named","nextrec","number","opened","rec","recl","sequential","status","unformatted","unit","continue","format","pause","cycle","exit","c_null_char","c_alert","c_backspace","c_form_feed","flush","wait","decimal","round","iomsg","synchronous","nopass","non_overridable","pass","protected","volatile","abstract","extends","import","non_intrinsic","value","deferred","generic","final","enumerator","class","associate","bind","enum","c_int","c_short","c_long","c_long_long","c_signed_char","c\
_size_t","c_int8_t","c_int16_t","c_int32_t","c_int64_t","c_int_least8_t","c_int_least16_t","c_int_least32_t","c_int_least64_t","c_int_fast8_t","c_int_fast16_t","c_int_fast32_t","c_int_fast64_t","c_intmax_t","C_intptr_t","c_float","c_double","c_long_double","c_float_complex","c_double_complex","c_long_double_complex","c_bool","c_char","c_null_ptr","c_null_funptr","c_new_line","c_carriage_return","c_horizontal_tab","c_vertical_tab","iso_c_binding","c_loc","c_funloc","c_associated","c_f_pointer","c\
_ptr","c_funptr","iso_fortran_env","character_storage_size","error_unit","file_storage_size","input_unit","iostat_end","iostat_eor","numeric_storage_size","output_unit","c_f_procpointer","ieee_arithmetic","ieee_support_underflow_control","ieee_get_underflow_mode","ieee_set_underflow_mode","newunit","contiguous","recursive","pad","position","action","delim","readwrite","eor","advance","nml","interface","procedure","namelist","include","sequence","elemental","pure","impure","integer","real","chara\
cter","complex","logical","codimension","dimension","allocatable|10","parameter","external","implicit|10","none","double","precision","assign","intent","optional","pointer","target","in","out","common","equivalence","data"],literal:[".False.",".True."],built_in:["alog","alog10","amax0","amax1","amin0","amin1","amod","cabs","ccos","cexp","clog","csin","csqrt","dabs","dacos","dasin","datan","datan2","dcos","dcosh","ddim","dexp","dint","dlog","dlog10","dmax1","dmin1","dmod","dnint","dsign","dsin","\
dsinh","dsqrt","dtan","dtanh","float","iabs","idim","idint","idnint","ifix","isign","max0","max1","min0","min1","sngl","algama","cdabs","cdcos","cdexp","cdlog","cdsin","cdsqrt","cqabs","cqcos","cqexp","cqlog","cqsin","cqsqrt","dcmplx","dconjg","derf","derfc","dfloat","dgamma","dimag","dlgama","iqint","qabs","qacos","qasin","qatan","qatan2","qcmplx","qconjg","qcos","qcosh","qdim","qerf","qerfc","qexp","qgamma","qimag","qlgama","qlog","qlog10","qmax1","qmin1","qmod","qnint","qsign","qsin","qsinh",
"qsqrt","qtan","qtanh","abs","acos","aimag","aint","anint","asin","atan","atan2","char","cmplx","conjg","cos","cosh","exp","ichar","index","int","log","log10","max","min","nint","sign","sin","sinh","sqrt","tan","tanh","print","write","dim","lge","lgt","lle","llt","mod","nullify","allocate","deallocate","adjustl","adjustr","all","allocated","any","associated","bit_size","btest","ceiling","count","cshift","date_and_time","digits","dot_product","eoshift","epsilon","exponent","floor","fraction","hug\
e","iand","ibclr","ibits","ibset","ieor","ior","ishft","ishftc","lbound","len_trim","matmul","maxexponent","maxloc","maxval","merge","minexponent","minloc","minval","modulo","mvbits","nearest","pack","present","product","radix","random_number","random_seed","range","repeat","reshape","rrspacing","scale","scan","selected_int_kind","selected_real_kind","set_exponent","shape","size","spacing","spread","sum","system_clock","tiny","transpose","trim","ubound","unpack","verify","achar","iachar","transf\
er","dble","entry","dprod","cpu_time","command_argument_count","get_command","get_command_argument","get_environment_variable","is_iostat_end","ieee_arithmetic","ieee_support_underflow_control","ieee_get_underflow_mode","ieee_set_underflow_mode","is_iostat_eor","move_alloc","new_line","selected_char_kind","same_type_as","extends_type_of","acosh","asinh","atanh","bessel_j0","bessel_j1","bessel_jn","bessel_y0","bessel_y1","bessel_yn","erf","erfc","erfc_scaled","gamma","log_gamma","hypot","norm2","\
atomic_define","atomic_ref","execute_command_line","leadz","trailz","storage_size","merge_bits","bge","bgt","ble","blt","dshiftl","dshiftr","findloc","iall","iany","iparity","image_index","lcobound","ucobound","maskl","maskr","num_images","parity","popcnt","poppar","shifta","shiftl","shiftr","this_image","sync","change","team","co_broadcast","co_max","co_min","co_sum","co_reduce"]},illegal:/\/\*/,contains:[STRING,FUNCTION_DEF,{begin:/^C\s*=(?!=)/,relevance:0},COMMENT,NUMBER]}}return fortran_1=fortran2,
fortran_1}var fsharp_1,hasRequiredFsharp;function requireFsharp(){if(hasRequiredFsharp)return fsharp_1;hasRequiredFsharp=1;function escape2(value){return new RegExp(value.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),"m")}function source2(re2){return re2?typeof re2=="string"?re2:re2.source:null}function lookahead2(re2){return concat2("(?=",re2,")")}function concat2(...args){return args.map(x=>source2(x)).join("")}function stripOptionsFromArgs2(args){const opts=args[args.length-1];return typeof opts=="\
object"&&opts.constructor===Object?(args.splice(args.length-1,1),opts):{}}function either2(...args){return"("+(stripOptionsFromArgs2(args).capture?"":"?:")+args.map(x=>source2(x)).join("|")+")"}function fsharp2(hljs){const KEYWORDS2=["abstract","and","as","assert","base","begin","class","default","delegate","do","done","downcast","downto","elif","else","end","exception","extern","finally","fixed","for","fun","function","global","if","in","inherit","inline","interface","internal","lazy","let","ma\
tch","member","module","mutable","namespace","new","of","open","or","override","private","public","rec","return","static","struct","then","to","try","type","upcast","use","val","void","when","while","with","yield"],BANG_KEYWORD_MODE={scope:"keyword",match:/\b(yield|return|let|do|match|use)!/},PREPROCESSOR_KEYWORDS=["if","else","endif","line","nowarn","light","r","i","I","load","time","help","quit"],LITERALS2=["true","false","null","Some","None","Ok","Error","infinity","infinityf","nan","nanf"],SPECIAL_IDENTIFIERS=[
"__LINE__","__SOURCE_DIRECTORY__","__SOURCE_FILE__"],KNOWN_TYPES=["bool","byte","sbyte","int8","int16","int32","uint8","uint16","uint32","int","uint","int64","uint64","nativeint","unativeint","decimal","float","double","float32","single","char","string","unit","bigint","option","voption","list","array","seq","byref","exn","inref","nativeptr","obj","outref","voidptr","Result"],ALL_KEYWORDS={keyword:KEYWORDS2,literal:LITERALS2,built_in:["not","ref","raise","reraise","dict","readOnlyDict","set","ge\
t","enum","sizeof","typeof","typedefof","nameof","nullArg","invalidArg","invalidOp","id","fst","snd","ignore","lock","using","box","unbox","tryUnbox","printf","printfn","sprintf","eprintf","eprintfn","fprintf","fprintfn","failwith","failwithf"],"variable.constant":SPECIAL_IDENTIFIERS},COMMENT={variants:[hljs.COMMENT(/\(\*(?!\))/,/\*\)/,{contains:["self"]}),hljs.C_LINE_COMMENT_MODE]},IDENTIFIER_RE=/[a-zA-Z_](\w|')*/,QUOTED_IDENTIFIER={scope:"variable",begin:/``/,end:/``/},BEGIN_GENERIC_TYPE_SYMBOL_RE=/\B('|\^)/,
GENERIC_TYPE_SYMBOL={scope:"symbol",variants:[{match:concat2(BEGIN_GENERIC_TYPE_SYMBOL_RE,/``.*?``/)},{match:concat2(BEGIN_GENERIC_TYPE_SYMBOL_RE,hljs.UNDERSCORE_IDENT_RE)}],relevance:0},makeOperatorMode=function({includeEqual}){let allOperatorChars;includeEqual?allOperatorChars="!%&*+-/<=>@^|~?":allOperatorChars="!%&*+-/<>@^|~?";const OPERATOR_CHARS=Array.from(allOperatorChars),OPERATOR_CHAR_RE=concat2("[",...OPERATOR_CHARS.map(escape2),"]"),OPERATOR_CHAR_OR_DOT_RE=either2(OPERATOR_CHAR_RE,/\./),
OPERATOR_FIRST_CHAR_OF_MULTIPLE_RE=concat2(OPERATOR_CHAR_OR_DOT_RE,lookahead2(OPERATOR_CHAR_OR_DOT_RE)),SYMBOLIC_OPERATOR_RE=either2(concat2(OPERATOR_FIRST_CHAR_OF_MULTIPLE_RE,OPERATOR_CHAR_OR_DOT_RE,"*"),concat2(OPERATOR_CHAR_RE,"+"));return{scope:"operator",match:either2(SYMBOLIC_OPERATOR_RE,/:\?>/,/:\?/,/:>/,/:=/,/::?/,/\$/),relevance:0}},OPERATOR=makeOperatorMode({includeEqual:!0}),OPERATOR_WITHOUT_EQUAL=makeOperatorMode({includeEqual:!1}),makeTypeAnnotationMode=function(prefix,prefixScope){
return{begin:concat2(prefix,lookahead2(concat2(/\s*/,either2(/\w/,/'/,/\^/,/#/,/``/,/\(/,/{\|/)))),beginScope:prefixScope,end:lookahead2(either2(/\n/,/=/)),relevance:0,keywords:hljs.inherit(ALL_KEYWORDS,{type:KNOWN_TYPES}),contains:[COMMENT,GENERIC_TYPE_SYMBOL,hljs.inherit(QUOTED_IDENTIFIER,{scope:null}),OPERATOR_WITHOUT_EQUAL]}},TYPE_ANNOTATION=makeTypeAnnotationMode(/:/,"operator"),DISCRIMINATED_UNION_TYPE_ANNOTATION=makeTypeAnnotationMode(/\bof\b/,"keyword"),TYPE_DECLARATION={begin:[/(^|\s+)/,
/type/,/\s+/,IDENTIFIER_RE],beginScope:{2:"keyword",4:"title.class"},end:lookahead2(/\(|=|$/),keywords:ALL_KEYWORDS,contains:[COMMENT,hljs.inherit(QUOTED_IDENTIFIER,{scope:null}),GENERIC_TYPE_SYMBOL,{scope:"operator",match:/<|>/},TYPE_ANNOTATION]},COMPUTATION_EXPRESSION={scope:"computation-expression",match:/\b[_a-z]\w*(?=\s*\{)/},PREPROCESSOR={begin:[/^\s*/,concat2(/#/,either2(...PREPROCESSOR_KEYWORDS)),/\b/],beginScope:{2:"meta"},end:lookahead2(/\s|$/)},NUMBER={variants:[hljs.BINARY_NUMBER_MODE,
hljs.C_NUMBER_MODE]},QUOTED_STRING={scope:"string",begin:/"/,end:/"/,contains:[hljs.BACKSLASH_ESCAPE]},VERBATIM_STRING={scope:"string",begin:/@"/,end:/"/,contains:[{match:/""/},hljs.BACKSLASH_ESCAPE]},TRIPLE_QUOTED_STRING={scope:"string",begin:/"""/,end:/"""/,relevance:2},SUBST={scope:"subst",begin:/\{/,end:/\}/,keywords:ALL_KEYWORDS},INTERPOLATED_STRING={scope:"string",begin:/\$"/,end:/"/,contains:[{match:/\{\{/},{match:/\}\}/},hljs.BACKSLASH_ESCAPE,SUBST]},INTERPOLATED_VERBATIM_STRING={scope:"\
string",begin:/(\$@|@\$)"/,end:/"/,contains:[{match:/\{\{/},{match:/\}\}/},{match:/""/},hljs.BACKSLASH_ESCAPE,SUBST]},INTERPOLATED_TRIPLE_QUOTED_STRING={scope:"string",begin:/\$"""/,end:/"""/,contains:[{match:/\{\{/},{match:/\}\}/},SUBST],relevance:2},CHAR_LITERAL={scope:"string",match:concat2(/'/,either2(/[^\\']/,/\\(?:.|\d{3}|x[a-fA-F\d]{2}|u[a-fA-F\d]{4}|U[a-fA-F\d]{8})/),/'/)};return SUBST.contains=[INTERPOLATED_VERBATIM_STRING,INTERPOLATED_STRING,VERBATIM_STRING,QUOTED_STRING,CHAR_LITERAL,BANG_KEYWORD_MODE,
COMMENT,QUOTED_IDENTIFIER,TYPE_ANNOTATION,COMPUTATION_EXPRESSION,PREPROCESSOR,NUMBER,GENERIC_TYPE_SYMBOL,OPERATOR],{name:"F#",aliases:["fs","f#"],keywords:ALL_KEYWORDS,illegal:/\/\*/,classNameAliases:{"computation-expression":"keyword"},contains:[BANG_KEYWORD_MODE,{variants:[INTERPOLATED_TRIPLE_QUOTED_STRING,INTERPOLATED_VERBATIM_STRING,INTERPOLATED_STRING,TRIPLE_QUOTED_STRING,VERBATIM_STRING,QUOTED_STRING,CHAR_LITERAL]},COMMENT,QUOTED_IDENTIFIER,TYPE_DECLARATION,{scope:"meta",begin:/\[</,end:/>\]/,
relevance:2,contains:[QUOTED_IDENTIFIER,TRIPLE_QUOTED_STRING,VERBATIM_STRING,QUOTED_STRING,CHAR_LITERAL,NUMBER]},DISCRIMINATED_UNION_TYPE_ANNOTATION,TYPE_ANNOTATION,COMPUTATION_EXPRESSION,PREPROCESSOR,NUMBER,GENERIC_TYPE_SYMBOL,OPERATOR]}}return fsharp_1=fsharp2,fsharp_1}var gams_1,hasRequiredGams;function requireGams(){if(hasRequiredGams)return gams_1;hasRequiredGams=1;function gams2(hljs){const regex=hljs.regex,KEYWORDS2={keyword:"abort acronym acronyms alias all and assign binary card diag di\
splay else eq file files for free ge gt if integer le loop lt maximizing minimizing model models ne negative no not option options or ord positive prod put putpage puttl repeat sameas semicont semiint smax smin solve sos1 sos2 sum system table then until using while xor yes",literal:"eps inf na",built_in:"abs arccos arcsin arctan arctan2 Beta betaReg binomial ceil centropy cos cosh cvPower div div0 eDist entropy errorf execSeed exp fact floor frac gamma gammaReg log logBeta logGamma log10 log2 m\
apVal max min mod ncpCM ncpF ncpVUpow ncpVUsin normal pi poly power randBinomial randLinear randTriangle round rPower sigmoid sign signPower sin sinh slexp sllog10 slrec sqexp sqlog10 sqr sqrec sqrt tan tanh trunc uniform uniformInt vcPower bool_and bool_eqv bool_imp bool_not bool_or bool_xor ifThen rel_eq rel_ge rel_gt rel_le rel_lt rel_ne gday gdow ghour gleap gmillisec gminute gmonth gsecond gyear jdate jnow jstart jtime errorLevel execError gamsRelease gamsVersion handleCollect handleDelete \
handleStatus handleSubmit heapFree heapLimit heapSize jobHandle jobKill jobStatus jobTerminate licenseLevel licenseStatus maxExecError sleep timeClose timeComp timeElapsed timeExec timeStart"},PARAMS={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0},SYMBOLS={className:"symbol",variants:[{begin:/=[lgenxc]=/},{begin:/\$/}]},QSTR={className:"comment",variants:[{begin:"'",end:"'"},{begin:'"',end:'"'}],illegal:"\\n",contains:[hljs.BACKSLASH_ESCAPE]},ASSIGNMENT={begin:"/",end:"/",
keywords:KEYWORDS2,contains:[QSTR,hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.QUOTE_STRING_MODE,hljs.APOS_STRING_MODE,hljs.C_NUMBER_MODE]},COMMENT_WORD=/[a-z0-9&#*=?@\\><:,()$[\]_.{}!+%^-]+/,DESCTEXT={begin:/[a-z][a-z0-9_]*(\([a-z0-9_, ]*\))?[ \t]+/,excludeBegin:!0,end:"$",endsWithParent:!0,contains:[QSTR,ASSIGNMENT,{className:"comment",begin:regex.concat(COMMENT_WORD,regex.anyNumberOfTimes(regex.concat(/[ ]+/,COMMENT_WORD))),relevance:0}]};return{name:"GAMS",aliases:["gms"],case_insensitive:!0,
keywords:KEYWORDS2,contains:[hljs.COMMENT(/^\$ontext/,/^\$offtext/),{className:"meta",begin:"^\\$[a-z0-9]+",end:"$",returnBegin:!0,contains:[{className:"keyword",begin:"^\\$[a-z0-9]+"}]},hljs.COMMENT("^\\*","$"),hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.QUOTE_STRING_MODE,hljs.APOS_STRING_MODE,{beginKeywords:"set sets parameter parameters variable variables scalar scalars equation equations",end:";",contains:[hljs.COMMENT("^\\*","$"),hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,
hljs.QUOTE_STRING_MODE,hljs.APOS_STRING_MODE,ASSIGNMENT,DESCTEXT]},{beginKeywords:"table",end:";",returnBegin:!0,contains:[{beginKeywords:"table",end:"$",contains:[DESCTEXT]},hljs.COMMENT("^\\*","$"),hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.QUOTE_STRING_MODE,hljs.APOS_STRING_MODE,hljs.C_NUMBER_MODE]},{className:"function",begin:/^[a-z][a-z0-9_,\-+' ()$]+\.{2}/,returnBegin:!0,contains:[{className:"title",begin:/^[a-z0-9_]+/},PARAMS,SYMBOLS]},hljs.C_NUMBER_MODE,SYMBOLS]}}return gams_1=
gams2,gams_1}var gauss_1,hasRequiredGauss;function requireGauss(){if(hasRequiredGauss)return gauss_1;hasRequiredGauss=1;function gauss2(hljs){const KEYWORDS2={keyword:"bool break call callexe checkinterrupt clear clearg closeall cls comlog compile continue create debug declare delete disable dlibrary dllcall do dos ed edit else elseif enable end endfor endif endp endo errorlog errorlogat expr external fn for format goto gosub graph if keyword let lib library line load loadarray loadexe loadf loa\
dk loadm loadp loads loadx local locate loopnextindex lprint lpwidth lshow matrix msym ndpclex new open output outwidth plot plotsym pop prcsn print printdos proc push retp return rndcon rndmod rndmult rndseed run save saveall screen scroll setarray show sparse stop string struct system trace trap threadfor threadendfor threadbegin threadjoin threadstat threadend until use while winprint ne ge le gt lt and xor or not eq eqv",built_in:"abs acf aconcat aeye amax amean AmericanBinomCall AmericanBin\
omCall_Greeks AmericanBinomCall_ImpVol AmericanBinomPut AmericanBinomPut_Greeks AmericanBinomPut_ImpVol AmericanBSCall AmericanBSCall_Greeks AmericanBSCall_ImpVol AmericanBSPut AmericanBSPut_Greeks AmericanBSPut_ImpVol amin amult annotationGetDefaults annotationSetBkd annotationSetFont annotationSetLineColor annotationSetLineStyle annotationSetLineThickness annualTradingDays arccos arcsin areshape arrayalloc arrayindex arrayinit arraytomat asciiload asclabel astd astds asum atan atan2 atranspose\
 axmargin balance band bandchol bandcholsol bandltsol bandrv bandsolpd bar base10 begwind besselj bessely beta box boxcox cdfBeta cdfBetaInv cdfBinomial cdfBinomialInv cdfBvn cdfBvn2 cdfBvn2e cdfCauchy cdfCauchyInv cdfChic cdfChii cdfChinc cdfChincInv cdfExp cdfExpInv cdfFc cdfFnc cdfFncInv cdfGam cdfGenPareto cdfHyperGeo cdfLaplace cdfLaplaceInv cdfLogistic cdfLogisticInv cdfmControlCreate cdfMvn cdfMvn2e cdfMvnce cdfMvne cdfMvt2e cdfMvtce cdfMvte cdfN cdfN2 cdfNc cdfNegBinomial cdfNegBinomialI\
nv cdfNi cdfPoisson cdfPoissonInv cdfRayleigh cdfRayleighInv cdfTc cdfTci cdfTnc cdfTvn cdfWeibull cdfWeibullInv cdir ceil ChangeDir chdir chiBarSquare chol choldn cholsol cholup chrs close code cols colsf combinate combinated complex con cond conj cons ConScore contour conv convertsatostr convertstrtosa corrm corrms corrvc corrx corrxs cos cosh counts countwts crossprd crout croutp csrcol csrlin csvReadM csvReadSA cumprodc cumsumc curve cvtos datacreate datacreatecomplex datalist dataload datal\
oop dataopen datasave date datestr datestring datestrymd dayinyr dayofweek dbAddDatabase dbClose dbCommit dbCreateQuery dbExecQuery dbGetConnectOptions dbGetDatabaseName dbGetDriverName dbGetDrivers dbGetHostName dbGetLastErrorNum dbGetLastErrorText dbGetNumericalPrecPolicy dbGetPassword dbGetPort dbGetTableHeaders dbGetTables dbGetUserName dbHasFeature dbIsDriverAvailable dbIsOpen dbIsOpenError dbOpen dbQueryBindValue dbQueryClear dbQueryCols dbQueryExecPrepared dbQueryFetchAllM dbQueryFetchAll\
SA dbQueryFetchOneM dbQueryFetchOneSA dbQueryFinish dbQueryGetBoundValue dbQueryGetBoundValues dbQueryGetField dbQueryGetLastErrorNum dbQueryGetLastErrorText dbQueryGetLastInsertID dbQueryGetLastQuery dbQueryGetPosition dbQueryIsActive dbQueryIsForwardOnly dbQueryIsNull dbQueryIsSelect dbQueryIsValid dbQueryPrepare dbQueryRows dbQuerySeek dbQuerySeekFirst dbQuerySeekLast dbQuerySeekNext dbQuerySeekPrevious dbQuerySetForwardOnly dbRemoveDatabase dbRollback dbSetConnectOptions dbSetDatabaseName db\
SetHostName dbSetNumericalPrecPolicy dbSetPort dbSetUserName dbTransaction DeleteFile delif delrows denseToSp denseToSpRE denToZero design det detl dfft dffti diag diagrv digamma doswin DOSWinCloseall DOSWinOpen dotfeq dotfeqmt dotfge dotfgemt dotfgt dotfgtmt dotfle dotflemt dotflt dotfltmt dotfne dotfnemt draw drop dsCreate dstat dstatmt dstatmtControlCreate dtdate dtday dttime dttodtv dttostr dttoutc dtvnormal dtvtodt dtvtoutc dummy dummybr dummydn eig eigh eighv eigv elapsedTradingDays endwin\
d envget eof eqSolve eqSolvemt eqSolvemtControlCreate eqSolvemtOutCreate eqSolveset erf erfc erfccplx erfcplx error etdays ethsec etstr EuropeanBinomCall EuropeanBinomCall_Greeks EuropeanBinomCall_ImpVol EuropeanBinomPut EuropeanBinomPut_Greeks EuropeanBinomPut_ImpVol EuropeanBSCall EuropeanBSCall_Greeks EuropeanBSCall_ImpVol EuropeanBSPut EuropeanBSPut_Greeks EuropeanBSPut_ImpVol exctsmpl exec execbg exp extern eye fcheckerr fclearerr feq feqmt fflush fft ffti fftm fftmi fftn fge fgemt fgets fg\
etsa fgetsat fgetst fgt fgtmt fileinfo filesa fle flemt floor flt fltmt fmod fne fnemt fonts fopen formatcv formatnv fputs fputst fseek fstrerror ftell ftocv ftos ftostrC gamma gammacplx gammaii gausset gdaAppend gdaCreate gdaDStat gdaDStatMat gdaGetIndex gdaGetName gdaGetNames gdaGetOrders gdaGetType gdaGetTypes gdaGetVarInfo gdaIsCplx gdaLoad gdaPack gdaRead gdaReadByIndex gdaReadSome gdaReadSparse gdaReadStruct gdaReportVarInfo gdaSave gdaUpdate gdaUpdateAndPack gdaVars gdaWrite gdaWrite32 gd\
aWriteSome getarray getdims getf getGAUSShome getmatrix getmatrix4D getname getnamef getNextTradingDay getNextWeekDay getnr getorders getpath getPreviousTradingDay getPreviousWeekDay getRow getscalar3D getscalar4D getTrRow getwind glm gradcplx gradMT gradMTm gradMTT gradMTTm gradp graphprt graphset hasimag header headermt hess hessMT hessMTg hessMTgw hessMTm hessMTmw hessMTT hessMTTg hessMTTgw hessMTTm hessMTw hessp hist histf histp hsec imag indcv indexcat indices indices2 indicesf indicesfn in\
dnv indsav integrate1d integrateControlCreate intgrat2 intgrat3 inthp1 inthp2 inthp3 inthp4 inthpControlCreate intquad1 intquad2 intquad3 intrleav intrleavsa intrsect intsimp inv invpd invswp iscplx iscplxf isden isinfnanmiss ismiss key keyav keyw lag lag1 lagn lapEighb lapEighi lapEighvb lapEighvi lapgEig lapgEigh lapgEighv lapgEigv lapgSchur lapgSvdcst lapgSvds lapgSvdst lapSvdcusv lapSvds lapSvdusv ldlp ldlsol linSolve listwise ln lncdfbvn lncdfbvn2 lncdfmvn lncdfn lncdfn2 lncdfnc lnfact lnga\
mmacplx lnpdfmvn lnpdfmvt lnpdfn lnpdft loadd loadstruct loadwind loess loessmt loessmtControlCreate log loglog logx logy lower lowmat lowmat1 ltrisol lu lusol machEpsilon make makevars makewind margin matalloc matinit mattoarray maxbytes maxc maxindc maxv maxvec mbesselei mbesselei0 mbesselei1 mbesseli mbesseli0 mbesseli1 meanc median mergeby mergevar minc minindc minv miss missex missrv moment momentd movingave movingaveExpwgt movingaveWgt nextindex nextn nextnevn nextwind ntos null null1 numC\
ombinations ols olsmt olsmtControlCreate olsqr olsqr2 olsqrmt ones optn optnevn orth outtyp pacf packedToSp packr parse pause pdfCauchy pdfChi pdfExp pdfGenPareto pdfHyperGeo pdfLaplace pdfLogistic pdfn pdfPoisson pdfRayleigh pdfWeibull pi pinv pinvmt plotAddArrow plotAddBar plotAddBox plotAddHist plotAddHistF plotAddHistP plotAddPolar plotAddScatter plotAddShape plotAddTextbox plotAddTS plotAddXY plotArea plotBar plotBox plotClearLayout plotContour plotCustomLayout plotGetDefaults plotHist plot\
HistF plotHistP plotLayout plotLogLog plotLogX plotLogY plotOpenWindow plotPolar plotSave plotScatter plotSetAxesPen plotSetBar plotSetBarFill plotSetBarStacked plotSetBkdColor plotSetFill plotSetGrid plotSetLegend plotSetLineColor plotSetLineStyle plotSetLineSymbol plotSetLineThickness plotSetNewWindow plotSetTitle plotSetWhichYAxis plotSetXAxisShow plotSetXLabel plotSetXRange plotSetXTicInterval plotSetXTicLabel plotSetYAxisShow plotSetYLabel plotSetYRange plotSetZAxisShow plotSetZLabel plotSu\
rface plotTS plotXY polar polychar polyeval polygamma polyint polymake polymat polymroot polymult polyroot pqgwin previousindex princomp printfm printfmt prodc psi putarray putf putvals pvCreate pvGetIndex pvGetParNames pvGetParVector pvLength pvList pvPack pvPacki pvPackm pvPackmi pvPacks pvPacksi pvPacksm pvPacksmi pvPutParVector pvTest pvUnpack QNewton QNewtonmt QNewtonmtControlCreate QNewtonmtOutCreate QNewtonSet QProg QProgmt QProgmtInCreate qqr qqre qqrep qr qre qrep qrsol qrtsol qtyr qtyr\
e qtyrep quantile quantiled qyr qyre qyrep qz rank rankindx readr real reclassify reclassifyCuts recode recserar recsercp recserrc rerun rescale reshape rets rev rfft rffti rfftip rfftn rfftnp rfftp rndBernoulli rndBeta rndBinomial rndCauchy rndChiSquare rndCon rndCreateState rndExp rndGamma rndGeo rndGumbel rndHyperGeo rndi rndKMbeta rndKMgam rndKMi rndKMn rndKMnb rndKMp rndKMu rndKMvm rndLaplace rndLCbeta rndLCgam rndLCi rndLCn rndLCnb rndLCp rndLCu rndLCvm rndLogNorm rndMTu rndMVn rndMVt rndn\
 rndnb rndNegBinomial rndp rndPoisson rndRayleigh rndStateSkip rndu rndvm rndWeibull rndWishart rotater round rows rowsf rref sampleData satostrC saved saveStruct savewind scale scale3d scalerr scalinfnanmiss scalmiss schtoc schur searchsourcepath seekr select selif seqa seqm setdif setdifsa setvars setvwrmode setwind shell shiftr sin singleindex sinh sleep solpd sortc sortcc sortd sorthc sorthcc sortind sortindc sortmc sortr sortrc spBiconjGradSol spChol spConjGradSol spCreate spDenseSubmat spD\
iagRvMat spEigv spEye spLDL spline spLU spNumNZE spOnes spreadSheetReadM spreadSheetReadSA spreadSheetWrite spScale spSubmat spToDense spTrTDense spTScalar spZeros sqpSolve sqpSolveMT sqpSolveMTControlCreate sqpSolveMTlagrangeCreate sqpSolveMToutCreate sqpSolveSet sqrt statements stdc stdsc stocv stof strcombine strindx strlen strput strrindx strsect strsplit strsplitPad strtodt strtof strtofcplx strtriml strtrimr strtrunc strtruncl strtruncpad strtruncr submat subscat substute subvec sumc sumr \
surface svd svd1 svd2 svdcusv svds svdusv sysstate tab tan tanh tempname time timedt timestr timeutc title tkf2eps tkf2ps tocart todaydt toeplitz token topolar trapchk trigamma trimr trunc type typecv typef union unionsa uniqindx uniqindxsa unique uniquesa upmat upmat1 upper utctodt utctodtv utrisol vals varCovMS varCovXS varget vargetl varmall varmares varput varputl vartypef vcm vcms vcx vcxs vec vech vecr vector vget view viewxyz vlist vnamecv volume vput vread vtypecv wait waitc walkindex wh\
ere window writer xlabel xlsGetSheetCount xlsGetSheetSize xlsGetSheetTypes xlsMakeRange xlsReadM xlsReadSA xlsWrite xlsWriteM xlsWriteSA xpnd xtics xy xyz ylabel ytics zeros zeta zlabel ztics cdfEmpirical dot h5create h5open h5read h5readAttribute h5write h5writeAttribute ldl plotAddErrorBar plotAddSurface plotCDFEmpirical plotSetColormap plotSetContourLabels plotSetLegendFont plotSetTextInterpreter plotSetXTicCount plotSetYTicCount plotSetZLevels powerm strjoin sylvester strtrim",literal:"DB_AF\
TER_LAST_ROW DB_ALL_TABLES DB_BATCH_OPERATIONS DB_BEFORE_FIRST_ROW DB_BLOB DB_EVENT_NOTIFICATIONS DB_FINISH_QUERY DB_HIGH_PRECISION DB_LAST_INSERT_ID DB_LOW_PRECISION_DOUBLE DB_LOW_PRECISION_INT32 DB_LOW_PRECISION_INT64 DB_LOW_PRECISION_NUMBERS DB_MULTIPLE_RESULT_SETS DB_NAMED_PLACEHOLDERS DB_POSITIONAL_PLACEHOLDERS DB_PREPARED_QUERIES DB_QUERY_SIZE DB_SIMPLE_LOCKING DB_SYSTEM_TABLES DB_TABLES DB_TRANSACTIONS DB_UNICODE DB_VIEWS __STDIN __STDOUT __STDERR __FILE_DIR"},AT_COMMENT_MODE=hljs.COMMENT(
"@","@"),PREPROCESSOR={className:"meta",begin:"#",end:"$",keywords:{keyword:"define definecs|10 undef ifdef ifndef iflight ifdllcall ifmac ifos2win ifunix else endif lineson linesoff srcfile srcline"},contains:[{begin:/\\\n/,relevance:0},{beginKeywords:"include",end:"$",keywords:{keyword:"include"},contains:[{className:"string",begin:'"',end:'"',illegal:"\\n"}]},hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,AT_COMMENT_MODE]},STRUCT_TYPE={begin:/\bstruct\s+/,end:/\s/,keywords:"struct",contains:[
{className:"type",begin:hljs.UNDERSCORE_IDENT_RE,relevance:0}]},PARSE_PARAMS=[{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,endsWithParent:!0,relevance:0,contains:[{className:"literal",begin:/\.\.\./},hljs.C_NUMBER_MODE,hljs.C_BLOCK_COMMENT_MODE,AT_COMMENT_MODE,STRUCT_TYPE]}],FUNCTION_DEF={className:"title",begin:hljs.UNDERSCORE_IDENT_RE,relevance:0},DEFINITION=function(beginKeywords,end,inherits){const mode=hljs.inherit({className:"function",beginKeywords,end,excludeEnd:!0,
contains:[].concat(PARSE_PARAMS)},{});return mode.contains.push(FUNCTION_DEF),mode.contains.push(hljs.C_NUMBER_MODE),mode.contains.push(hljs.C_BLOCK_COMMENT_MODE),mode.contains.push(AT_COMMENT_MODE),mode},BUILT_IN_REF={className:"built_in",begin:"\\b("+KEYWORDS2.built_in.split(" ").join("|")+")\\b"},STRING_REF={className:"string",begin:'"',end:'"',contains:[hljs.BACKSLASH_ESCAPE],relevance:0},FUNCTION_REF={begin:hljs.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,keywords:KEYWORDS2,relevance:0,contains:[
{beginKeywords:KEYWORDS2.keyword},BUILT_IN_REF,{className:"built_in",begin:hljs.UNDERSCORE_IDENT_RE,relevance:0}]},FUNCTION_REF_PARAMS={begin:/\(/,end:/\)/,relevance:0,keywords:{built_in:KEYWORDS2.built_in,literal:KEYWORDS2.literal},contains:[hljs.C_NUMBER_MODE,hljs.C_BLOCK_COMMENT_MODE,AT_COMMENT_MODE,BUILT_IN_REF,FUNCTION_REF,STRING_REF,"self"]};return FUNCTION_REF.contains.push(FUNCTION_REF_PARAMS),{name:"GAUSS",aliases:["gss"],case_insensitive:!0,keywords:KEYWORDS2,illegal:/(\{[%#]|[%#]\}| <- )/,
contains:[hljs.C_NUMBER_MODE,hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,AT_COMMENT_MODE,STRING_REF,PREPROCESSOR,{className:"keyword",begin:/\bexternal (matrix|string|array|sparse matrix|struct|proc|keyword|fn)/},DEFINITION("proc keyword",";"),DEFINITION("fn","="),{beginKeywords:"for threadfor",end:/;/,relevance:0,contains:[hljs.C_BLOCK_COMMENT_MODE,AT_COMMENT_MODE,FUNCTION_REF_PARAMS]},{variants:[{begin:hljs.UNDERSCORE_IDENT_RE+"\\."+hljs.UNDERSCORE_IDENT_RE},{begin:hljs.UNDERSCORE_IDENT_RE+
"\\s*="}],relevance:0},FUNCTION_REF,STRUCT_TYPE]}}return gauss_1=gauss2,gauss_1}var gcode_1,hasRequiredGcode;function requireGcode(){if(hasRequiredGcode)return gcode_1;hasRequiredGcode=1;function gcode2(hljs){const regex=hljs.regex,GCODE_KEYWORDS={$pattern:/[A-Z]+|%/,keyword:["THEN","ELSE","ENDIF","IF","GOTO","DO","WHILE","WH","END","CALL","SUB","ENDSUB","EQ","NE","LT","GT","LE","GE","AND","OR","XOR","%"],built_in:["ATAN","ABS","ACOS","ASIN","COS","EXP","FIX","FUP","ROUND","LN","SIN","SQRT","TAN",
"EXISTS"]},LETTER_BOUNDARY_RE=/\b/;function LETTER_BOUNDARY_CALLBACK(matchdata,response){if(matchdata.index===0)return;const charBeforeMatch=matchdata.input[matchdata.index-1];charBeforeMatch>="0"&&charBeforeMatch<="9"||charBeforeMatch!=="_"&&response.ignoreMatch()}const NUMBER_RE=/[+-]?((\.\d+)|(\d+)(\.\d*)?)/,GENERAL_MISC_FUNCTION_RE=/[GM]\s*\d+(\.\d+)?/,TOOLS_RE=/T\s*\d+/,SUBROUTINE_RE=/O\s*\d+/,SUBROUTINE_NAMED_RE=/O<.+>/,AXES_RE=/[ABCUVWXYZ]\s*/,PARAMETERS_RE=/[FHIJKPQRS]\s*/,GCODE_CODE=[hljs.
COMMENT(/\(/,/\)/),hljs.COMMENT(/;/,/$/),hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,hljs.C_NUMBER_MODE,{scope:"title.function",variants:[{match:regex.concat(LETTER_BOUNDARY_RE,GENERAL_MISC_FUNCTION_RE)},{begin:GENERAL_MISC_FUNCTION_RE,"on:begin":LETTER_BOUNDARY_CALLBACK},{match:regex.concat(LETTER_BOUNDARY_RE,TOOLS_RE)},{begin:TOOLS_RE,"on:begin":LETTER_BOUNDARY_CALLBACK}]},{scope:"symbol",variants:[{match:regex.concat(LETTER_BOUNDARY_RE,SUBROUTINE_RE)},{begin:SUBROUTINE_RE,"on:begin":LETTER_BOUNDARY_CALLBACK},
{match:regex.concat(LETTER_BOUNDARY_RE,SUBROUTINE_NAMED_RE)},{begin:SUBROUTINE_NAMED_RE,"on:begin":LETTER_BOUNDARY_CALLBACK},{match:/\*\s*\d+\s*$/}]},{scope:"operator",match:/^N\s*\d+/},{scope:"variable",match:/-?#\s*\d+/},{scope:"property",variants:[{match:regex.concat(LETTER_BOUNDARY_RE,AXES_RE,NUMBER_RE)},{begin:regex.concat(AXES_RE,NUMBER_RE),"on:begin":LETTER_BOUNDARY_CALLBACK}]},{scope:"params",variants:[{match:regex.concat(LETTER_BOUNDARY_RE,PARAMETERS_RE,NUMBER_RE)},{begin:regex.concat(PARAMETERS_RE,
NUMBER_RE),"on:begin":LETTER_BOUNDARY_CALLBACK}]}];return{name:"G-code (ISO 6983)",aliases:["nc"],case_insensitive:!0,disableAutodetect:!0,keywords:GCODE_KEYWORDS,contains:GCODE_CODE}}return gcode_1=gcode2,gcode_1}var gherkin_1,hasRequiredGherkin;function requireGherkin(){if(hasRequiredGherkin)return gherkin_1;hasRequiredGherkin=1;function gherkin2(hljs){return{name:"Gherkin",aliases:["feature"],keywords:"Feature Background Ability Business Need Scenario Scenarios Scenario Outline Scenario Templ\
ate Examples Given And Then But When",contains:[{className:"symbol",begin:"\\*",relevance:0},{className:"meta",begin:"@[^@\\s]+"},{begin:"\\|",end:"\\|\\w*$",contains:[{className:"string",begin:"[^|]+"}]},{className:"variable",begin:"<",end:">"},hljs.HASH_COMMENT_MODE,{className:"string",begin:'"""',end:'"""'},hljs.QUOTE_STRING_MODE]}}return gherkin_1=gherkin2,gherkin_1}var glsl_1,hasRequiredGlsl;function requireGlsl(){if(hasRequiredGlsl)return glsl_1;hasRequiredGlsl=1;function glsl2(hljs){return{
name:"GLSL",keywords:{keyword:"break continue discard do else for if return while switch case default attribute binding buffer ccw centroid centroid varying coherent column_major const cw depth_any depth_greater depth_less depth_unchanged early_fragment_tests equal_spacing flat fractional_even_spacing fractional_odd_spacing highp in index inout invariant invocations isolines layout line_strip lines lines_adjacency local_size_x local_size_y local_size_z location lowp max_vertices mediump noperspe\
ctive offset origin_upper_left out packed patch pixel_center_integer point_mode points precise precision quads r11f_g11f_b10f r16 r16_snorm r16f r16i r16ui r32f r32i r32ui r8 r8_snorm r8i r8ui readonly restrict rg16 rg16_snorm rg16f rg16i rg16ui rg32f rg32i rg32ui rg8 rg8_snorm rg8i rg8ui rgb10_a2 rgb10_a2ui rgba16 rgba16_snorm rgba16f rgba16i rgba16ui rgba32f rgba32i rgba32ui rgba8 rgba8_snorm rgba8i rgba8ui row_major sample shared smooth std140 std430 stream triangle_strip triangles triangles_\
adjacency uniform varying vertices volatile writeonly",type:"atomic_uint bool bvec2 bvec3 bvec4 dmat2 dmat2x2 dmat2x3 dmat2x4 dmat3 dmat3x2 dmat3x3 dmat3x4 dmat4 dmat4x2 dmat4x3 dmat4x4 double dvec2 dvec3 dvec4 float iimage1D iimage1DArray iimage2D iimage2DArray iimage2DMS iimage2DMSArray iimage2DRect iimage3D iimageBuffer iimageCube iimageCubeArray image1D image1DArray image2D image2DArray image2DMS image2DMSArray image2DRect image3D imageBuffer imageCube imageCubeArray int isampler1D isampler1\
DArray isampler2D isampler2DArray isampler2DMS isampler2DMSArray isampler2DRect isampler3D isamplerBuffer isamplerCube isamplerCubeArray ivec2 ivec3 ivec4 mat2 mat2x2 mat2x3 mat2x4 mat3 mat3x2 mat3x3 mat3x4 mat4 mat4x2 mat4x3 mat4x4 sampler1D sampler1DArray sampler1DArrayShadow sampler1DShadow sampler2D sampler2DArray sampler2DArrayShadow sampler2DMS sampler2DMSArray sampler2DRect sampler2DRectShadow sampler2DShadow sampler3D samplerBuffer samplerCube samplerCubeArray samplerCubeArrayShadow samp\
lerCubeShadow image1D uimage1DArray uimage2D uimage2DArray uimage2DMS uimage2DMSArray uimage2DRect uimage3D uimageBuffer uimageCube uimageCubeArray uint usampler1D usampler1DArray usampler2D usampler2DArray usampler2DMS usampler2DMSArray usampler2DRect usampler3D samplerBuffer usamplerCube usamplerCubeArray uvec2 uvec3 uvec4 vec2 vec3 vec4 void",built_in:"gl_MaxAtomicCounterBindings gl_MaxAtomicCounterBufferSize gl_MaxClipDistances gl_MaxClipPlanes gl_MaxCombinedAtomicCounterBuffers gl_MaxCombin\
edAtomicCounters gl_MaxCombinedImageUniforms gl_MaxCombinedImageUnitsAndFragmentOutputs gl_MaxCombinedTextureImageUnits gl_MaxComputeAtomicCounterBuffers gl_MaxComputeAtomicCounters gl_MaxComputeImageUniforms gl_MaxComputeTextureImageUnits gl_MaxComputeUniformComponents gl_MaxComputeWorkGroupCount gl_MaxComputeWorkGroupSize gl_MaxDrawBuffers gl_MaxFragmentAtomicCounterBuffers gl_MaxFragmentAtomicCounters gl_MaxFragmentImageUniforms gl_MaxFragmentInputComponents gl_MaxFragmentInputVectors gl_MaxF\
ragmentUniformComponents gl_MaxFragmentUniformVectors gl_MaxGeometryAtomicCounterBuffers gl_MaxGeometryAtomicCounters gl_MaxGeometryImageUniforms gl_MaxGeometryInputComponents gl_MaxGeometryOutputComponents gl_MaxGeometryOutputVertices gl_MaxGeometryTextureImageUnits gl_MaxGeometryTotalOutputComponents gl_MaxGeometryUniformComponents gl_MaxGeometryVaryingComponents gl_MaxImageSamples gl_MaxImageUnits gl_MaxLights gl_MaxPatchVertices gl_MaxProgramTexelOffset gl_MaxTessControlAtomicCounterBuffers \
gl_MaxTessControlAtomicCounters gl_MaxTessControlImageUniforms gl_MaxTessControlInputComponents gl_MaxTessControlOutputComponents gl_MaxTessControlTextureImageUnits gl_MaxTessControlTotalOutputComponents gl_MaxTessControlUniformComponents gl_MaxTessEvaluationAtomicCounterBuffers gl_MaxTessEvaluationAtomicCounters gl_MaxTessEvaluationImageUniforms gl_MaxTessEvaluationInputComponents gl_MaxTessEvaluationOutputComponents gl_MaxTessEvaluationTextureImageUnits gl_MaxTessEvaluationUniformComponents gl\
_MaxTessGenLevel gl_MaxTessPatchComponents gl_MaxTextureCoords gl_MaxTextureImageUnits gl_MaxTextureUnits gl_MaxVaryingComponents gl_MaxVaryingFloats gl_MaxVaryingVectors gl_MaxVertexAtomicCounterBuffers gl_MaxVertexAtomicCounters gl_MaxVertexAttribs gl_MaxVertexImageUniforms gl_MaxVertexOutputComponents gl_MaxVertexOutputVectors gl_MaxVertexTextureImageUnits gl_MaxVertexUniformComponents gl_MaxVertexUniformVectors gl_MaxViewports gl_MinProgramTexelOffset gl_BackColor gl_BackLightModelProduct gl\
_BackLightProduct gl_BackMaterial gl_BackSecondaryColor gl_ClipDistance gl_ClipPlane gl_ClipVertex gl_Color gl_DepthRange gl_EyePlaneQ gl_EyePlaneR gl_EyePlaneS gl_EyePlaneT gl_Fog gl_FogCoord gl_FogFragCoord gl_FragColor gl_FragCoord gl_FragData gl_FragDepth gl_FrontColor gl_FrontFacing gl_FrontLightModelProduct gl_FrontLightProduct gl_FrontMaterial gl_FrontSecondaryColor gl_GlobalInvocationID gl_InstanceID gl_InvocationID gl_Layer gl_LightModel gl_LightSource gl_LocalInvocationID gl_LocalInvoc\
ationIndex gl_ModelViewMatrix gl_ModelViewMatrixInverse gl_ModelViewMatrixInverseTranspose gl_ModelViewMatrixTranspose gl_ModelViewProjectionMatrix gl_ModelViewProjectionMatrixInverse gl_ModelViewProjectionMatrixInverseTranspose gl_ModelViewProjectionMatrixTranspose gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 gl_Normal gl_NormalMatrix gl_NormalScale gl_NumSamples gl_NumWorkGroups gl_ObjectPlaneQ g\
l_ObjectPlaneR gl_ObjectPlaneS gl_ObjectPlaneT gl_PatchVerticesIn gl_Point gl_PointCoord gl_PointSize gl_Position gl_PrimitiveID gl_PrimitiveIDIn gl_ProjectionMatrix gl_ProjectionMatrixInverse gl_ProjectionMatrixInverseTranspose gl_ProjectionMatrixTranspose gl_SampleID gl_SampleMask gl_SampleMaskIn gl_SamplePosition gl_SecondaryColor gl_TessCoord gl_TessLevelInner gl_TessLevelOuter gl_TexCoord gl_TextureEnvColor gl_TextureMatrix gl_TextureMatrixInverse gl_TextureMatrixInverseTranspose gl_Texture\
MatrixTranspose gl_Vertex gl_VertexID gl_ViewportIndex gl_WorkGroupID gl_WorkGroupSize gl_in gl_out EmitStreamVertex EmitVertex EndPrimitive EndStreamPrimitive abs acos acosh all any asin asinh atan atanh atomicAdd atomicAnd atomicCompSwap atomicCounter atomicCounterDecrement atomicCounterIncrement atomicExchange atomicMax atomicMin atomicOr atomicXor barrier bitCount bitfieldExtract bitfieldInsert bitfieldReverse ceil clamp cos cosh cross dFdx dFdy degrees determinant distance dot equal exp exp\
2 faceforward findLSB findMSB floatBitsToInt floatBitsToUint floor fma fract frexp ftransform fwidth greaterThan greaterThanEqual groupMemoryBarrier imageAtomicAdd imageAtomicAnd imageAtomicCompSwap imageAtomicExchange imageAtomicMax imageAtomicMin imageAtomicOr imageAtomicXor imageLoad imageSize imageStore imulExtended intBitsToFloat interpolateAtCentroid interpolateAtOffset interpolateAtSample inverse inversesqrt isinf isnan ldexp length lessThan lessThanEqual log log2 matrixCompMult max memor\
yBarrier memoryBarrierAtomicCounter memoryBarrierBuffer memoryBarrierImage memoryBarrierShared min mix mod modf noise1 noise2 noise3 noise4 normalize not notEqual outerProduct packDouble2x32 packHalf2x16 packSnorm2x16 packSnorm4x8 packUnorm2x16 packUnorm4x8 pow radians reflect refract round roundEven shadow1D shadow1DLod shadow1DProj shadow1DProjLod shadow2D shadow2DLod shadow2DProj shadow2DProjLod sign sin sinh smoothstep sqrt step tan tanh texelFetch texelFetchOffset texture texture1D texture1\
DLod texture1DProj texture1DProjLod texture2D texture2DLod texture2DProj texture2DProjLod texture3D texture3DLod texture3DProj texture3DProjLod textureCube textureCubeLod textureGather textureGatherOffset textureGatherOffsets textureGrad textureGradOffset textureLod textureLodOffset textureOffset textureProj textureProjGrad textureProjGradOffset textureProjLod textureProjLodOffset textureProjOffset textureQueryLevels textureQueryLod textureSize transpose trunc uaddCarry uintBitsToFloat umulExten\
ded unpackDouble2x32 unpackHalf2x16 unpackSnorm2x16 unpackSnorm4x8 unpackUnorm2x16 unpackUnorm4x8 usubBorrow",literal:"true false"},illegal:'"',contains:[hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.C_NUMBER_MODE,{className:"meta",begin:"#",end:"$"}]}}return glsl_1=glsl2,glsl_1}var gml_1,hasRequiredGml;function requireGml(){if(hasRequiredGml)return gml_1;hasRequiredGml=1;function gml2(hljs){return{name:"GML",case_insensitive:!1,keywords:{keyword:["#endregion","#macro","#region","and",
"begin","break","case","constructor","continue","default","delete","div","do","else","end","enum","exit","for","function","globalvar","if","mod","new","not","or","repeat","return","static","switch","then","until","var","while","with","xor"],built_in:["abs","alarm_get","alarm_set","angle_difference","animcurve_channel_evaluate","animcurve_channel_new","animcurve_create","animcurve_destroy","animcurve_exists","animcurve_get","animcurve_get_channel","animcurve_get_channel_index","animcurve_point_ne\
w","ansi_char","application_get_position","application_surface_draw_enable","application_surface_enable","application_surface_is_enabled","arccos","arcsin","arctan","arctan2","array_all","array_any","array_concat","array_contains","array_contains_ext","array_copy","array_copy_while","array_create","array_create_ext","array_delete","array_equals","array_filter","array_filter_ext","array_find_index","array_first","array_foreach","array_get","array_get_index","array_insert","array_intersection","ar\
ray_last","array_length","array_map","array_map_ext","array_pop","array_push","array_reduce","array_resize","array_reverse","array_reverse_ext","array_set","array_shuffle","array_shuffle_ext","array_sort","array_union","array_unique","array_unique_ext","asset_add_tags","asset_clear_tags","asset_get_ids","asset_get_index","asset_get_tags","asset_get_type","asset_has_any_tag","asset_has_tags","asset_remove_tags","audio_bus_clear_emitters","audio_bus_create","audio_bus_get_emitters","audio_channel_\
num","audio_create_buffer_sound","audio_create_play_queue","audio_create_stream","audio_create_sync_group","audio_debug","audio_destroy_stream","audio_destroy_sync_group","audio_effect_create","audio_emitter_bus","audio_emitter_create","audio_emitter_exists","audio_emitter_falloff","audio_emitter_free","audio_emitter_gain","audio_emitter_get_bus","audio_emitter_get_gain","audio_emitter_get_listener_mask","audio_emitter_get_pitch","audio_emitter_get_vx","audio_emitter_get_vy","audio_emitter_get_v\
z","audio_emitter_get_x","audio_emitter_get_y","audio_emitter_get_z","audio_emitter_pitch","audio_emitter_position","audio_emitter_set_listener_mask","audio_emitter_velocity","audio_exists","audio_falloff_set_model","audio_free_buffer_sound","audio_free_play_queue","audio_get_listener_count","audio_get_listener_info","audio_get_listener_mask","audio_get_master_gain","audio_get_name","audio_get_recorder_count","audio_get_recorder_info","audio_get_type","audio_group_get_assets","audio_group_get_ga\
in","audio_group_is_loaded","audio_group_load","audio_group_load_progress","audio_group_name","audio_group_set_gain","audio_group_stop_all","audio_group_unload","audio_is_paused","audio_is_playing","audio_listener_get_data","audio_listener_orientation","audio_listener_position","audio_listener_set_orientation","audio_listener_set_position","audio_listener_set_velocity","audio_listener_velocity","audio_master_gain","audio_pause_all","audio_pause_sound","audio_pause_sync_group","audio_play_in_sync\
_group","audio_play_sound","audio_play_sound_at","audio_play_sound_ext","audio_play_sound_on","audio_queue_sound","audio_resume_all","audio_resume_sound","audio_resume_sync_group","audio_set_listener_mask","audio_set_master_gain","audio_sound_gain","audio_sound_get_audio_group","audio_sound_get_gain","audio_sound_get_listener_mask","audio_sound_get_loop","audio_sound_get_loop_end","audio_sound_get_loop_start","audio_sound_get_pitch","audio_sound_get_track_position","audio_sound_is_playable","aud\
io_sound_length","audio_sound_loop","audio_sound_loop_end","audio_sound_loop_start","audio_sound_pitch","audio_sound_set_listener_mask","audio_sound_set_track_position","audio_start_recording","audio_start_sync_group","audio_stop_all","audio_stop_recording","audio_stop_sound","audio_stop_sync_group","audio_sync_group_debug","audio_sync_group_get_track_pos","audio_sync_group_is_paused","audio_sync_group_is_playing","audio_system_is_available","audio_system_is_initialised","base64_decode","base64_\
encode","bool","browser_input_capture","buffer_async_group_begin","buffer_async_group_end","buffer_async_group_option","buffer_base64_decode","buffer_base64_decode_ext","buffer_base64_encode","buffer_compress","buffer_copy","buffer_copy_from_vertex_buffer","buffer_copy_stride","buffer_crc32","buffer_create","buffer_create_from_vertex_buffer","buffer_create_from_vertex_buffer_ext","buffer_decompress","buffer_delete","buffer_exists","buffer_fill","buffer_get_address","buffer_get_alignment","buffer\
_get_size","buffer_get_surface","buffer_get_type","buffer_load","buffer_load_async","buffer_load_ext","buffer_load_partial","buffer_md5","buffer_peek","buffer_poke","buffer_read","buffer_resize","buffer_save","buffer_save_async","buffer_save_ext","buffer_seek","buffer_set_surface","buffer_set_used_size","buffer_sha1","buffer_sizeof","buffer_tell","buffer_write","call_cancel","call_later","camera_apply","camera_copy_transforms","camera_create","camera_create_view","camera_destroy","camera_get_act\
ive","camera_get_begin_script","camera_get_default","camera_get_end_script","camera_get_proj_mat","camera_get_update_script","camera_get_view_angle","camera_get_view_border_x","camera_get_view_border_y","camera_get_view_height","camera_get_view_mat","camera_get_view_speed_x","camera_get_view_speed_y","camera_get_view_target","camera_get_view_width","camera_get_view_x","camera_get_view_y","camera_set_begin_script","camera_set_default","camera_set_end_script","camera_set_proj_mat","camera_set_upda\
te_script","camera_set_view_angle","camera_set_view_border","camera_set_view_mat","camera_set_view_pos","camera_set_view_size","camera_set_view_speed","camera_set_view_target","ceil","choose","chr","clamp","clickable_add","clickable_add_ext","clickable_change","clickable_change_ext","clickable_delete","clickable_exists","clickable_set_style","clipboard_get_text","clipboard_has_text","clipboard_set_text","cloud_file_save","cloud_string_save","cloud_synchronise","code_is_compiled","collision_circl\
e","collision_circle_list","collision_ellipse","collision_ellipse_list","collision_line","collision_line_list","collision_point","collision_point_list","collision_rectangle","collision_rectangle_list","color_get_blue","color_get_green","color_get_hue","color_get_red","color_get_saturation","color_get_value","colour_get_blue","colour_get_green","colour_get_hue","colour_get_red","colour_get_saturation","colour_get_value","cos","darccos","darcsin","darctan","darctan2","date_compare_date","date_comp\
are_datetime","date_compare_time","date_create_datetime","date_current_datetime","date_date_of","date_date_string","date_datetime_string","date_day_span","date_days_in_month","date_days_in_year","date_get_day","date_get_day_of_year","date_get_hour","date_get_hour_of_year","date_get_minute","date_get_minute_of_year","date_get_month","date_get_second","date_get_second_of_year","date_get_timezone","date_get_week","date_get_weekday","date_get_year","date_hour_span","date_inc_day","date_inc_hour","da\
te_inc_minute","date_inc_month","date_inc_second","date_inc_week","date_inc_year","date_is_today","date_leap_year","date_minute_span","date_month_span","date_second_span","date_set_timezone","date_time_of","date_time_string","date_valid_datetime","date_week_span","date_year_span","db_to_lin","dbg_add_font_glyphs","dbg_button","dbg_checkbox","dbg_color","dbg_colour","dbg_drop_down","dbg_same_line","dbg_section","dbg_section_delete","dbg_section_exists","dbg_slider","dbg_slider_int","dbg_sprite","\
dbg_text","dbg_text_input","dbg_view","dbg_view_delete","dbg_view_exists","dbg_watch","dcos","debug_event","debug_get_callstack","degtorad","device_get_tilt_x","device_get_tilt_y","device_get_tilt_z","device_is_keypad_open","device_mouse_check_button","device_mouse_check_button_pressed","device_mouse_check_button_released","device_mouse_dbclick_enable","device_mouse_raw_x","device_mouse_raw_y","device_mouse_x","device_mouse_x_to_gui","device_mouse_y","device_mouse_y_to_gui","directory_create","d\
irectory_destroy","directory_exists","display_get_dpi_x","display_get_dpi_y","display_get_frequency","display_get_gui_height","display_get_gui_width","display_get_height","display_get_orientation","display_get_sleep_margin","display_get_timing_method","display_get_width","display_mouse_get_x","display_mouse_get_y","display_mouse_set","display_reset","display_set_gui_maximise","display_set_gui_maximize","display_set_gui_size","display_set_sleep_margin","display_set_timing_method","display_set_ui_\
visibility","distance_to_object","distance_to_point","dot_product","dot_product_3d","dot_product_3d_normalised","dot_product_3d_normalized","dot_product_normalised","dot_product_normalized","draw_arrow","draw_button","draw_circle","draw_circle_color","draw_circle_colour","draw_clear","draw_clear_alpha","draw_ellipse","draw_ellipse_color","draw_ellipse_colour","draw_enable_drawevent","draw_enable_skeleton_blendmodes","draw_enable_swf_aa","draw_flush","draw_get_alpha","draw_get_color","draw_get_co\
lour","draw_get_enable_skeleton_blendmodes","draw_get_font","draw_get_halign","draw_get_lighting","draw_get_swf_aa_level","draw_get_valign","draw_getpixel","draw_getpixel_ext","draw_healthbar","draw_highscore","draw_light_define_ambient","draw_light_define_direction","draw_light_define_point","draw_light_enable","draw_light_get","draw_light_get_ambient","draw_line","draw_line_color","draw_line_colour","draw_line_width","draw_line_width_color","draw_line_width_colour","draw_path","draw_point","dr\
aw_point_color","draw_point_colour","draw_primitive_begin","draw_primitive_begin_texture","draw_primitive_end","draw_rectangle","draw_rectangle_color","draw_rectangle_colour","draw_roundrect","draw_roundrect_color","draw_roundrect_color_ext","draw_roundrect_colour","draw_roundrect_colour_ext","draw_roundrect_ext","draw_self","draw_set_alpha","draw_set_circle_precision","draw_set_color","draw_set_colour","draw_set_font","draw_set_halign","draw_set_lighting","draw_set_swf_aa_level","draw_set_valig\
n","draw_skeleton","draw_skeleton_collision","draw_skeleton_instance","draw_skeleton_time","draw_sprite","draw_sprite_ext","draw_sprite_general","draw_sprite_part","draw_sprite_part_ext","draw_sprite_pos","draw_sprite_stretched","draw_sprite_stretched_ext","draw_sprite_tiled","draw_sprite_tiled_ext","draw_surface","draw_surface_ext","draw_surface_general","draw_surface_part","draw_surface_part_ext","draw_surface_stretched","draw_surface_stretched_ext","draw_surface_tiled","draw_surface_tiled_ext",
"draw_text","draw_text_color","draw_text_colour","draw_text_ext","draw_text_ext_color","draw_text_ext_colour","draw_text_ext_transformed","draw_text_ext_transformed_color","draw_text_ext_transformed_colour","draw_text_transformed","draw_text_transformed_color","draw_text_transformed_colour","draw_texture_flush","draw_tile","draw_tilemap","draw_triangle","draw_triangle_color","draw_triangle_colour","draw_vertex","draw_vertex_color","draw_vertex_colour","draw_vertex_texture","draw_vertex_texture_c\
olor","draw_vertex_texture_colour","ds_exists","ds_grid_add","ds_grid_add_disk","ds_grid_add_grid_region","ds_grid_add_region","ds_grid_clear","ds_grid_copy","ds_grid_create","ds_grid_destroy","ds_grid_get","ds_grid_get_disk_max","ds_grid_get_disk_mean","ds_grid_get_disk_min","ds_grid_get_disk_sum","ds_grid_get_max","ds_grid_get_mean","ds_grid_get_min","ds_grid_get_sum","ds_grid_height","ds_grid_multiply","ds_grid_multiply_disk","ds_grid_multiply_grid_region","ds_grid_multiply_region","ds_grid_r\
ead","ds_grid_resize","ds_grid_set","ds_grid_set_disk","ds_grid_set_grid_region","ds_grid_set_region","ds_grid_shuffle","ds_grid_sort","ds_grid_to_mp_grid","ds_grid_value_disk_exists","ds_grid_value_disk_x","ds_grid_value_disk_y","ds_grid_value_exists","ds_grid_value_x","ds_grid_value_y","ds_grid_width","ds_grid_write","ds_list_add","ds_list_clear","ds_list_copy","ds_list_create","ds_list_delete","ds_list_destroy","ds_list_empty","ds_list_find_index","ds_list_find_value","ds_list_insert","ds_lis\
t_is_list","ds_list_is_map","ds_list_mark_as_list","ds_list_mark_as_map","ds_list_read","ds_list_replace","ds_list_set","ds_list_shuffle","ds_list_size","ds_list_sort","ds_list_write","ds_map_add","ds_map_add_list","ds_map_add_map","ds_map_clear","ds_map_copy","ds_map_create","ds_map_delete","ds_map_destroy","ds_map_empty","ds_map_exists","ds_map_find_first","ds_map_find_last","ds_map_find_next","ds_map_find_previous","ds_map_find_value","ds_map_is_list","ds_map_is_map","ds_map_keys_to_array","d\
s_map_read","ds_map_replace","ds_map_replace_list","ds_map_replace_map","ds_map_secure_load","ds_map_secure_load_buffer","ds_map_secure_save","ds_map_secure_save_buffer","ds_map_set","ds_map_size","ds_map_values_to_array","ds_map_write","ds_priority_add","ds_priority_change_priority","ds_priority_clear","ds_priority_copy","ds_priority_create","ds_priority_delete_max","ds_priority_delete_min","ds_priority_delete_value","ds_priority_destroy","ds_priority_empty","ds_priority_find_max","ds_priority_\
find_min","ds_priority_find_priority","ds_priority_read","ds_priority_size","ds_priority_write","ds_queue_clear","ds_queue_copy","ds_queue_create","ds_queue_dequeue","ds_queue_destroy","ds_queue_empty","ds_queue_enqueue","ds_queue_head","ds_queue_read","ds_queue_size","ds_queue_tail","ds_queue_write","ds_set_precision","ds_stack_clear","ds_stack_copy","ds_stack_create","ds_stack_destroy","ds_stack_empty","ds_stack_pop","ds_stack_push","ds_stack_read","ds_stack_size","ds_stack_top","ds_stack_writ\
e","dsin","dtan","effect_clear","effect_create_above","effect_create_below","effect_create_depth","effect_create_layer","environment_get_variable","event_inherited","event_perform","event_perform_async","event_perform_object","event_user","exception_unhandled_handler","exp","extension_exists","extension_get_option_count","extension_get_option_names","extension_get_option_value","extension_get_options","extension_get_version","external_call","external_define","external_free","file_attributes","fi\
le_bin_close","file_bin_open","file_bin_position","file_bin_read_byte","file_bin_rewrite","file_bin_seek","file_bin_size","file_bin_write_byte","file_copy","file_delete","file_exists","file_find_close","file_find_first","file_find_next","file_rename","file_text_close","file_text_eof","file_text_eoln","file_text_open_append","file_text_open_from_string","file_text_open_read","file_text_open_write","file_text_read_real","file_text_read_string","file_text_readln","file_text_write_real","file_text_w\
rite_string","file_text_writeln","filename_change_ext","filename_dir","filename_drive","filename_ext","filename_name","filename_path","floor","font_add","font_add_enable_aa","font_add_get_enable_aa","font_add_sprite","font_add_sprite_ext","font_cache_glyph","font_delete","font_enable_effects","font_enable_sdf","font_exists","font_get_bold","font_get_first","font_get_fontname","font_get_info","font_get_italic","font_get_last","font_get_name","font_get_sdf_enabled","font_get_sdf_spread","font_get_\
size","font_get_texture","font_get_uvs","font_replace_sprite","font_replace_sprite_ext","font_sdf_spread","font_set_cache_size","frac","fx_create","fx_get_name","fx_get_parameter","fx_get_parameter_names","fx_get_parameters","fx_get_single_layer","fx_set_parameter","fx_set_parameters","fx_set_single_layer","game_change","game_end","game_get_speed","game_load","game_load_buffer","game_restart","game_save","game_save_buffer","game_set_speed","gamepad_axis_count","gamepad_axis_value","gamepad_butto\
n_check","gamepad_button_check_pressed","gamepad_button_check_released","gamepad_button_count","gamepad_button_value","gamepad_get_axis_deadzone","gamepad_get_button_threshold","gamepad_get_description","gamepad_get_device_count","gamepad_get_guid","gamepad_get_mapping","gamepad_get_option","gamepad_hat_count","gamepad_hat_value","gamepad_is_connected","gamepad_is_supported","gamepad_remove_mapping","gamepad_set_axis_deadzone","gamepad_set_button_threshold","gamepad_set_color","gamepad_set_colou\
r","gamepad_set_option","gamepad_set_vibration","gamepad_test_mapping","gc_collect","gc_enable","gc_get_stats","gc_get_target_frame_time","gc_is_enabled","gc_target_frame_time","gesture_double_tap_distance","gesture_double_tap_time","gesture_drag_distance","gesture_drag_time","gesture_flick_speed","gesture_get_double_tap_distance","gesture_get_double_tap_time","gesture_get_drag_distance","gesture_get_drag_time","gesture_get_flick_speed","gesture_get_pinch_angle_away","gesture_get_pinch_angle_tow\
ards","gesture_get_pinch_distance","gesture_get_rotate_angle","gesture_get_rotate_time","gesture_get_tap_count","gesture_pinch_angle_away","gesture_pinch_angle_towards","gesture_pinch_distance","gesture_rotate_angle","gesture_rotate_time","gesture_tap_count","get_integer","get_integer_async","get_login_async","get_open_filename","get_open_filename_ext","get_save_filename","get_save_filename_ext","get_string","get_string_async","get_timer","gif_add_surface","gif_open","gif_save","gif_save_buffer",
"gml_pragma","gml_release_mode","gpu_get_alphatestenable","gpu_get_alphatestref","gpu_get_blendenable","gpu_get_blendmode","gpu_get_blendmode_dest","gpu_get_blendmode_destalpha","gpu_get_blendmode_ext","gpu_get_blendmode_ext_sepalpha","gpu_get_blendmode_src","gpu_get_blendmode_srcalpha","gpu_get_colorwriteenable","gpu_get_colourwriteenable","gpu_get_cullmode","gpu_get_depth","gpu_get_fog","gpu_get_state","gpu_get_tex_filter","gpu_get_tex_filter_ext","gpu_get_tex_max_aniso","gpu_get_tex_max_aniso\
_ext","gpu_get_tex_max_mip","gpu_get_tex_max_mip_ext","gpu_get_tex_min_mip","gpu_get_tex_min_mip_ext","gpu_get_tex_mip_bias","gpu_get_tex_mip_bias_ext","gpu_get_tex_mip_enable","gpu_get_tex_mip_enable_ext","gpu_get_tex_mip_filter","gpu_get_tex_mip_filter_ext","gpu_get_tex_repeat","gpu_get_tex_repeat_ext","gpu_get_texfilter","gpu_get_texfilter_ext","gpu_get_texrepeat","gpu_get_texrepeat_ext","gpu_get_zfunc","gpu_get_ztestenable","gpu_get_zwriteenable","gpu_pop_state","gpu_push_state","gpu_set_alp\
hatestenable","gpu_set_alphatestref","gpu_set_blendenable","gpu_set_blendmode","gpu_set_blendmode_ext","gpu_set_blendmode_ext_sepalpha","gpu_set_colorwriteenable","gpu_set_colourwriteenable","gpu_set_cullmode","gpu_set_depth","gpu_set_fog","gpu_set_state","gpu_set_tex_filter","gpu_set_tex_filter_ext","gpu_set_tex_max_aniso","gpu_set_tex_max_aniso_ext","gpu_set_tex_max_mip","gpu_set_tex_max_mip_ext","gpu_set_tex_min_mip","gpu_set_tex_min_mip_ext","gpu_set_tex_mip_bias","gpu_set_tex_mip_bias_ext",
"gpu_set_tex_mip_enable","gpu_set_tex_mip_enable_ext","gpu_set_tex_mip_filter","gpu_set_tex_mip_filter_ext","gpu_set_tex_repeat","gpu_set_tex_repeat_ext","gpu_set_texfilter","gpu_set_texfilter_ext","gpu_set_texrepeat","gpu_set_texrepeat_ext","gpu_set_zfunc","gpu_set_ztestenable","gpu_set_zwriteenable","handle_parse","highscore_add","highscore_clear","highscore_name","highscore_value","http_get","http_get_file","http_get_request_crossorigin","http_post_string","http_request","http_set_request_cro\
ssorigin","iap_acquire","iap_activate","iap_consume","iap_enumerate_products","iap_product_details","iap_purchase_details","iap_restore_all","iap_status","ini_close","ini_key_delete","ini_key_exists","ini_open","ini_open_from_string","ini_read_real","ini_read_string","ini_section_delete","ini_section_exists","ini_write_real","ini_write_string","instance_activate_all","instance_activate_layer","instance_activate_object","instance_activate_region","instance_change","instance_copy","instance_create\
_depth","instance_create_layer","instance_deactivate_all","instance_deactivate_layer","instance_deactivate_object","instance_deactivate_region","instance_destroy","instance_exists","instance_find","instance_furthest","instance_id_get","instance_nearest","instance_number","instance_place","instance_place_list","instance_position","instance_position_list","instanceof","int64","io_clear","irandom","irandom_range","is_array","is_bool","is_callable","is_debug_overlay_open","is_handle","is_infinity","\
is_instanceof","is_int32","is_int64","is_keyboard_used_debug_overlay","is_method","is_mouse_over_debug_overlay","is_nan","is_numeric","is_ptr","is_real","is_string","is_struct","is_undefined","json_decode","json_encode","json_parse","json_stringify","keyboard_check","keyboard_check_direct","keyboard_check_pressed","keyboard_check_released","keyboard_clear","keyboard_get_map","keyboard_get_numlock","keyboard_key_press","keyboard_key_release","keyboard_set_map","keyboard_set_numlock","keyboard_uns\
et_map","keyboard_virtual_height","keyboard_virtual_hide","keyboard_virtual_show","keyboard_virtual_status","layer_add_instance","layer_background_alpha","layer_background_blend","layer_background_change","layer_background_create","layer_background_destroy","layer_background_exists","layer_background_get_alpha","layer_background_get_blend","layer_background_get_htiled","layer_background_get_id","layer_background_get_index","layer_background_get_speed","layer_background_get_sprite","layer_backgro\
und_get_stretch","layer_background_get_visible","layer_background_get_vtiled","layer_background_get_xscale","layer_background_get_yscale","layer_background_htiled","layer_background_index","layer_background_speed","layer_background_sprite","layer_background_stretch","layer_background_visible","layer_background_vtiled","layer_background_xscale","layer_background_yscale","layer_clear_fx","layer_create","layer_depth","layer_destroy","layer_destroy_instances","layer_element_move","layer_enable_fx","\
layer_exists","layer_force_draw_depth","layer_fx_is_enabled","layer_get_all","layer_get_all_elements","layer_get_depth","layer_get_element_layer","layer_get_element_type","layer_get_forced_depth","layer_get_fx","layer_get_hspeed","layer_get_id","layer_get_id_at_depth","layer_get_name","layer_get_script_begin","layer_get_script_end","layer_get_shader","layer_get_target_room","layer_get_visible","layer_get_vspeed","layer_get_x","layer_get_y","layer_has_instance","layer_hspeed","layer_instance_get_\
instance","layer_is_draw_depth_forced","layer_reset_target_room","layer_script_begin","layer_script_end","layer_sequence_angle","layer_sequence_create","layer_sequence_destroy","layer_sequence_exists","layer_sequence_get_angle","layer_sequence_get_headdir","layer_sequence_get_headpos","layer_sequence_get_instance","layer_sequence_get_length","layer_sequence_get_sequence","layer_sequence_get_speedscale","layer_sequence_get_x","layer_sequence_get_xscale","layer_sequence_get_y","layer_sequence_get_\
yscale","layer_sequence_headdir","layer_sequence_headpos","layer_sequence_is_finished","layer_sequence_is_paused","layer_sequence_pause","layer_sequence_play","layer_sequence_speedscale","layer_sequence_x","layer_sequence_xscale","layer_sequence_y","layer_sequence_yscale","layer_set_fx","layer_set_target_room","layer_set_visible","layer_shader","layer_sprite_alpha","layer_sprite_angle","layer_sprite_blend","layer_sprite_change","layer_sprite_create","layer_sprite_destroy","layer_sprite_exists","\
layer_sprite_get_alpha","layer_sprite_get_angle","layer_sprite_get_blend","layer_sprite_get_id","layer_sprite_get_index","layer_sprite_get_speed","layer_sprite_get_sprite","layer_sprite_get_x","layer_sprite_get_xscale","layer_sprite_get_y","layer_sprite_get_yscale","layer_sprite_index","layer_sprite_speed","layer_sprite_x","layer_sprite_xscale","layer_sprite_y","layer_sprite_yscale","layer_tile_alpha","layer_tile_blend","layer_tile_change","layer_tile_create","layer_tile_destroy","layer_tile_exi\
sts","layer_tile_get_alpha","layer_tile_get_blend","layer_tile_get_region","layer_tile_get_sprite","layer_tile_get_visible","layer_tile_get_x","layer_tile_get_xscale","layer_tile_get_y","layer_tile_get_yscale","layer_tile_region","layer_tile_visible","layer_tile_x","layer_tile_xscale","layer_tile_y","layer_tile_yscale","layer_tilemap_create","layer_tilemap_destroy","layer_tilemap_exists","layer_tilemap_get_id","layer_vspeed","layer_x","layer_y","lengthdir_x","lengthdir_y","lerp","lin_to_db","ln",
"load_csv","log10","log2","logn","make_color_hsv","make_color_rgb","make_colour_hsv","make_colour_rgb","math_get_epsilon","math_set_epsilon","matrix_build","matrix_build_identity","matrix_build_lookat","matrix_build_projection_ortho","matrix_build_projection_perspective","matrix_build_projection_perspective_fov","matrix_get","matrix_multiply","matrix_set","matrix_stack_clear","matrix_stack_is_empty","matrix_stack_pop","matrix_stack_push","matrix_stack_set","matrix_stack_top","matrix_transform_ve\
rtex","max","md5_file","md5_string_unicode","md5_string_utf8","mean","median","merge_color","merge_colour","method","method_call","method_get_index","method_get_self","min","motion_add","motion_set","mouse_check_button","mouse_check_button_pressed","mouse_check_button_released","mouse_clear","mouse_wheel_down","mouse_wheel_up","move_and_collide","move_bounce_all","move_bounce_solid","move_contact_all","move_contact_solid","move_outside_all","move_outside_solid","move_random","move_snap","move_to\
wards_point","move_wrap","mp_grid_add_cell","mp_grid_add_instances","mp_grid_add_rectangle","mp_grid_clear_all","mp_grid_clear_cell","mp_grid_clear_rectangle","mp_grid_create","mp_grid_destroy","mp_grid_draw","mp_grid_get_cell","mp_grid_path","mp_grid_to_ds_grid","mp_linear_path","mp_linear_path_object","mp_linear_step","mp_linear_step_object","mp_potential_path","mp_potential_path_object","mp_potential_settings","mp_potential_step","mp_potential_step_object","nameof","network_connect","network_\
connect_async","network_connect_raw","network_connect_raw_async","network_create_server","network_create_server_raw","network_create_socket","network_create_socket_ext","network_destroy","network_resolve","network_send_broadcast","network_send_packet","network_send_raw","network_send_udp","network_send_udp_raw","network_set_config","network_set_timeout","object_exists","object_get_mask","object_get_name","object_get_parent","object_get_persistent","object_get_physics","object_get_solid","object_\
get_sprite","object_get_visible","object_is_ancestor","object_set_mask","object_set_persistent","object_set_solid","object_set_sprite","object_set_visible","ord","os_check_permission","os_get_config","os_get_info","os_get_language","os_get_region","os_is_network_connected","os_is_paused","os_lock_orientation","os_powersave_enable","os_request_permission","os_set_orientation_lock","parameter_count","parameter_string","part_emitter_burst","part_emitter_clear","part_emitter_create","part_emitter_de\
lay","part_emitter_destroy","part_emitter_destroy_all","part_emitter_enable","part_emitter_exists","part_emitter_interval","part_emitter_region","part_emitter_relative","part_emitter_stream","part_particles_burst","part_particles_clear","part_particles_count","part_particles_create","part_particles_create_color","part_particles_create_colour","part_system_angle","part_system_automatic_draw","part_system_automatic_update","part_system_clear","part_system_color","part_system_colour","part_system_c\
reate","part_system_create_layer","part_system_depth","part_system_destroy","part_system_draw_order","part_system_drawit","part_system_exists","part_system_get_info","part_system_get_layer","part_system_global_space","part_system_layer","part_system_position","part_system_update","part_type_alpha1","part_type_alpha2","part_type_alpha3","part_type_blend","part_type_clear","part_type_color1","part_type_color2","part_type_color3","part_type_color_hsv","part_type_color_mix","part_type_color_rgb","pa\
rt_type_colour1","part_type_colour2","part_type_colour3","part_type_colour_hsv","part_type_colour_mix","part_type_colour_rgb","part_type_create","part_type_death","part_type_destroy","part_type_direction","part_type_exists","part_type_gravity","part_type_life","part_type_orientation","part_type_scale","part_type_shape","part_type_size","part_type_size_x","part_type_size_y","part_type_speed","part_type_sprite","part_type_step","part_type_subimage","particle_exists","particle_get_info","path_add",
"path_add_point","path_append","path_assign","path_change_point","path_clear_points","path_delete","path_delete_point","path_duplicate","path_end","path_exists","path_flip","path_get_closed","path_get_kind","path_get_length","path_get_name","path_get_number","path_get_point_speed","path_get_point_x","path_get_point_y","path_get_precision","path_get_speed","path_get_x","path_get_y","path_insert_point","path_mirror","path_rescale","path_reverse","path_rotate","path_set_closed","path_set_kind","pat\
h_set_precision","path_shift","path_start","physics_apply_angular_impulse","physics_apply_force","physics_apply_impulse","physics_apply_local_force","physics_apply_local_impulse","physics_apply_torque","physics_draw_debug","physics_fixture_add_point","physics_fixture_bind","physics_fixture_bind_ext","physics_fixture_create","physics_fixture_delete","physics_fixture_set_angular_damping","physics_fixture_set_awake","physics_fixture_set_box_shape","physics_fixture_set_chain_shape","physics_fixture_\
set_circle_shape","physics_fixture_set_collision_group","physics_fixture_set_density","physics_fixture_set_edge_shape","physics_fixture_set_friction","physics_fixture_set_kinematic","physics_fixture_set_linear_damping","physics_fixture_set_polygon_shape","physics_fixture_set_restitution","physics_fixture_set_sensor","physics_get_density","physics_get_friction","physics_get_restitution","physics_joint_delete","physics_joint_distance_create","physics_joint_enable_motor","physics_joint_friction_cre\
ate","physics_joint_gear_create","physics_joint_get_value","physics_joint_prismatic_create","physics_joint_pulley_create","physics_joint_revolute_create","physics_joint_rope_create","physics_joint_set_value","physics_joint_weld_create","physics_joint_wheel_create","physics_mass_properties","physics_particle_count","physics_particle_create","physics_particle_delete","physics_particle_delete_region_box","physics_particle_delete_region_circle","physics_particle_delete_region_poly","physics_particle\
_draw","physics_particle_draw_ext","physics_particle_get_damping","physics_particle_get_data","physics_particle_get_data_particle","physics_particle_get_density","physics_particle_get_gravity_scale","physics_particle_get_group_flags","physics_particle_get_max_count","physics_particle_get_radius","physics_particle_group_add_point","physics_particle_group_begin","physics_particle_group_box","physics_particle_group_circle","physics_particle_group_count","physics_particle_group_delete","physics_part\
icle_group_end","physics_particle_group_get_ang_vel","physics_particle_group_get_angle","physics_particle_group_get_centre_x","physics_particle_group_get_centre_y","physics_particle_group_get_data","physics_particle_group_get_inertia","physics_particle_group_get_mass","physics_particle_group_get_vel_x","physics_particle_group_get_vel_y","physics_particle_group_get_x","physics_particle_group_get_y","physics_particle_group_join","physics_particle_group_polygon","physics_particle_set_category_flags",
"physics_particle_set_damping","physics_particle_set_density","physics_particle_set_flags","physics_particle_set_gravity_scale","physics_particle_set_group_flags","physics_particle_set_max_count","physics_particle_set_radius","physics_pause_enable","physics_remove_fixture","physics_set_density","physics_set_friction","physics_set_restitution","physics_test_overlap","physics_world_create","physics_world_draw_debug","physics_world_gravity","physics_world_update_iterations","physics_world_update_sp\
eed","place_empty","place_free","place_meeting","place_snapped","point_direction","point_distance","point_distance_3d","point_in_circle","point_in_rectangle","point_in_triangle","position_change","position_destroy","position_empty","position_meeting","power","ptr","radtodeg","random","random_get_seed","random_range","random_set_seed","randomise","randomize","real","rectangle_in_circle","rectangle_in_rectangle","rectangle_in_triangle","ref_create","rollback_chat","rollback_create_game","rollback_\
define_extra_network_latency","rollback_define_input","rollback_define_input_frame_delay","rollback_define_mock_input","rollback_define_player","rollback_display_events","rollback_get_info","rollback_get_input","rollback_get_player_prefs","rollback_join_game","rollback_leave_game","rollback_set_player_prefs","rollback_start_game","rollback_sync_on_frame","rollback_use_late_join","rollback_use_manual_start","rollback_use_player_prefs","rollback_use_random_input","room_add","room_assign","room_dup\
licate","room_exists","room_get_camera","room_get_info","room_get_name","room_get_viewport","room_goto","room_goto_next","room_goto_previous","room_instance_add","room_instance_clear","room_next","room_previous","room_restart","room_set_camera","room_set_height","room_set_persistent","room_set_view_enabled","room_set_viewport","room_set_width","round","scheduler_resolution_get","scheduler_resolution_set","screen_save","screen_save_part","script_execute","script_execute_ext","script_exists","scri\
pt_get_name","sequence_create","sequence_destroy","sequence_exists","sequence_get","sequence_get_objects","sequence_instance_override_object","sequence_keyframe_new","sequence_keyframedata_new","sequence_track_new","sha1_file","sha1_string_unicode","sha1_string_utf8","shader_current","shader_enable_corner_id","shader_get_name","shader_get_sampler_index","shader_get_uniform","shader_is_compiled","shader_reset","shader_set","shader_set_uniform_f","shader_set_uniform_f_array","shader_set_uniform_f_\
buffer","shader_set_uniform_i","shader_set_uniform_i_array","shader_set_uniform_matrix","shader_set_uniform_matrix_array","shaders_are_supported","shop_leave_rating","show_debug_message","show_debug_message_ext","show_debug_overlay","show_error","show_message","show_message_async","show_question","show_question_async","sign","sin","skeleton_animation_clear","skeleton_animation_get","skeleton_animation_get_duration","skeleton_animation_get_event_frames","skeleton_animation_get_ext","skeleton_anim\
ation_get_frame","skeleton_animation_get_frames","skeleton_animation_get_position","skeleton_animation_is_finished","skeleton_animation_is_looping","skeleton_animation_list","skeleton_animation_mix","skeleton_animation_set","skeleton_animation_set_ext","skeleton_animation_set_frame","skeleton_animation_set_position","skeleton_attachment_create","skeleton_attachment_create_color","skeleton_attachment_create_colour","skeleton_attachment_destroy","skeleton_attachment_exists","skeleton_attachment_ge\
t","skeleton_attachment_replace","skeleton_attachment_replace_color","skeleton_attachment_replace_colour","skeleton_attachment_set","skeleton_bone_data_get","skeleton_bone_data_set","skeleton_bone_list","skeleton_bone_state_get","skeleton_bone_state_set","skeleton_collision_draw_set","skeleton_find_slot","skeleton_get_bounds","skeleton_get_minmax","skeleton_get_num_bounds","skeleton_skin_create","skeleton_skin_get","skeleton_skin_list","skeleton_skin_set","skeleton_slot_alpha_get","skeleton_slot\
_color_get","skeleton_slot_color_set","skeleton_slot_colour_get","skeleton_slot_colour_set","skeleton_slot_data","skeleton_slot_data_instance","skeleton_slot_list","sprite_add","sprite_add_ext","sprite_add_from_surface","sprite_assign","sprite_collision_mask","sprite_create_from_surface","sprite_delete","sprite_duplicate","sprite_exists","sprite_flush","sprite_flush_multi","sprite_get_bbox_bottom","sprite_get_bbox_left","sprite_get_bbox_mode","sprite_get_bbox_right","sprite_get_bbox_top","sprite\
_get_height","sprite_get_info","sprite_get_name","sprite_get_nineslice","sprite_get_number","sprite_get_speed","sprite_get_speed_type","sprite_get_texture","sprite_get_tpe","sprite_get_uvs","sprite_get_width","sprite_get_xoffset","sprite_get_yoffset","sprite_merge","sprite_nineslice_create","sprite_prefetch","sprite_prefetch_multi","sprite_replace","sprite_save","sprite_save_strip","sprite_set_alpha_from_sprite","sprite_set_bbox","sprite_set_bbox_mode","sprite_set_cache_size","sprite_set_cache_s\
ize_ext","sprite_set_nineslice","sprite_set_offset","sprite_set_speed","sqr","sqrt","static_get","static_set","string","string_byte_at","string_byte_length","string_char_at","string_concat","string_concat_ext","string_copy","string_count","string_delete","string_digits","string_ends_with","string_ext","string_foreach","string_format","string_hash_to_newline","string_height","string_height_ext","string_insert","string_join","string_join_ext","string_last_pos","string_last_pos_ext","string_length",
"string_letters","string_lettersdigits","string_lower","string_ord_at","string_pos","string_pos_ext","string_repeat","string_replace","string_replace_all","string_set_byte_at","string_split","string_split_ext","string_starts_with","string_trim","string_trim_end","string_trim_start","string_upper","string_width","string_width_ext","struct_exists","struct_foreach","struct_get","struct_get_from_hash","struct_get_names","struct_names_count","struct_remove","struct_set","struct_set_from_hash","surfac\
e_copy","surface_copy_part","surface_create","surface_create_ext","surface_depth_disable","surface_exists","surface_format_is_supported","surface_free","surface_get_depth_disable","surface_get_format","surface_get_height","surface_get_target","surface_get_target_ext","surface_get_texture","surface_get_width","surface_getpixel","surface_getpixel_ext","surface_reset_target","surface_resize","surface_save","surface_save_part","surface_set_target","surface_set_target_ext","tag_get_asset_ids","tag_ge\
t_assets","tan","texture_debug_messages","texture_flush","texture_get_height","texture_get_texel_height","texture_get_texel_width","texture_get_uvs","texture_get_width","texture_global_scale","texture_is_ready","texture_prefetch","texture_set_stage","texturegroup_get_fonts","texturegroup_get_names","texturegroup_get_sprites","texturegroup_get_status","texturegroup_get_textures","texturegroup_get_tilesets","texturegroup_load","texturegroup_set_mode","texturegroup_unload","tile_get_empty","tile_ge\
t_flip","tile_get_index","tile_get_mirror","tile_get_rotate","tile_set_empty","tile_set_flip","tile_set_index","tile_set_mirror","tile_set_rotate","tilemap_clear","tilemap_get","tilemap_get_at_pixel","tilemap_get_cell_x_at_pixel","tilemap_get_cell_y_at_pixel","tilemap_get_frame","tilemap_get_global_mask","tilemap_get_height","tilemap_get_mask","tilemap_get_tile_height","tilemap_get_tile_width","tilemap_get_tileset","tilemap_get_width","tilemap_get_x","tilemap_get_y","tilemap_set","tilemap_set_at\
_pixel","tilemap_set_global_mask","tilemap_set_height","tilemap_set_mask","tilemap_set_width","tilemap_tileset","tilemap_x","tilemap_y","tileset_get_info","tileset_get_name","tileset_get_texture","tileset_get_uvs","time_bpm_to_seconds","time_seconds_to_bpm","time_source_create","time_source_destroy","time_source_exists","time_source_get_children","time_source_get_parent","time_source_get_period","time_source_get_reps_completed","time_source_get_reps_remaining","time_source_get_state","time_sourc\
e_get_time_remaining","time_source_get_units","time_source_pause","time_source_reconfigure","time_source_reset","time_source_resume","time_source_start","time_source_stop","timeline_add","timeline_clear","timeline_delete","timeline_exists","timeline_get_name","timeline_max_moment","timeline_moment_add_script","timeline_moment_clear","timeline_size","typeof","url_get_domain","url_open","url_open_ext","url_open_full","uwp_device_touchscreen_available","uwp_livetile_badge_clear","uwp_livetile_badge\
_notification","uwp_livetile_notification_begin","uwp_livetile_notification_end","uwp_livetile_notification_expiry","uwp_livetile_notification_image_add","uwp_livetile_notification_secondary_begin","uwp_livetile_notification_tag","uwp_livetile_notification_template_add","uwp_livetile_notification_text_add","uwp_livetile_queue_enable","uwp_livetile_tile_clear","uwp_secondarytile_badge_clear","uwp_secondarytile_badge_notification","uwp_secondarytile_delete","uwp_secondarytile_pin","uwp_secondaryti\
le_tile_clear","variable_clone","variable_get_hash","variable_global_exists","variable_global_get","variable_global_set","variable_instance_exists","variable_instance_get","variable_instance_get_names","variable_instance_names_count","variable_instance_set","variable_struct_exists","variable_struct_get","variable_struct_get_names","variable_struct_names_count","variable_struct_remove","variable_struct_set","vertex_argb","vertex_begin","vertex_color","vertex_colour","vertex_create_buffer","vertex\
_create_buffer_ext","vertex_create_buffer_from_buffer","vertex_create_buffer_from_buffer_ext","vertex_delete_buffer","vertex_end","vertex_float1","vertex_float2","vertex_float3","vertex_float4","vertex_format_add_color","vertex_format_add_colour","vertex_format_add_custom","vertex_format_add_normal","vertex_format_add_position","vertex_format_add_position_3d","vertex_format_add_texcoord","vertex_format_begin","vertex_format_delete","vertex_format_end","vertex_format_get_info","vertex_freeze","ve\
rtex_get_buffer_size","vertex_get_number","vertex_normal","vertex_position","vertex_position_3d","vertex_submit","vertex_submit_ext","vertex_texcoord","vertex_ubyte4","vertex_update_buffer_from_buffer","vertex_update_buffer_from_vertex","video_close","video_draw","video_enable_loop","video_get_duration","video_get_format","video_get_position","video_get_status","video_get_volume","video_is_looping","video_open","video_pause","video_resume","video_seek_to","video_set_volume","view_get_camera","vi\
ew_get_hport","view_get_surface_id","view_get_visible","view_get_wport","view_get_xport","view_get_yport","view_set_camera","view_set_hport","view_set_surface_id","view_set_visible","view_set_wport","view_set_xport","view_set_yport","virtual_key_add","virtual_key_delete","virtual_key_hide","virtual_key_show","wallpaper_set_config","wallpaper_set_subscriptions","weak_ref_alive","weak_ref_any_alive","weak_ref_create","window_center","window_device","window_enable_borderless_fullscreen","window_get\
_borderless_fullscreen","window_get_caption","window_get_color","window_get_colour","window_get_cursor","window_get_fullscreen","window_get_height","window_get_showborder","window_get_visible_rects","window_get_width","window_get_x","window_get_y","window_handle","window_has_focus","window_mouse_get_delta_x","window_mouse_get_delta_y","window_mouse_get_locked","window_mouse_get_x","window_mouse_get_y","window_mouse_set","window_mouse_set_locked","window_set_caption","window_set_color","window_se\
t_colour","window_set_cursor","window_set_fullscreen","window_set_max_height","window_set_max_width","window_set_min_height","window_set_min_width","window_set_position","window_set_rectangle","window_set_showborder","window_set_size","window_view_mouse_get_x","window_view_mouse_get_y","window_views_mouse_get_x","window_views_mouse_get_y","winphone_tile_background_color","winphone_tile_background_colour","zip_add_file","zip_create","zip_save","zip_unzip","zip_unzip_async"],symbol:["AudioEffect",
"AudioEffectType","AudioLFOType","GM_build_date","GM_build_type","GM_is_sandboxed","GM_project_filename","GM_runtime_version","GM_version","NaN","_GMFILE_","_GMFUNCTION_","_GMLINE_","alignmentH","alignmentV","all","animcurvetype_bezier","animcurvetype_catmullrom","animcurvetype_linear","asset_animationcurve","asset_font","asset_object","asset_path","asset_room","asset_script","asset_sequence","asset_shader","asset_sound","asset_sprite","asset_tiles","asset_timeline","asset_unknown","audio_3D","a\
udio_bus_main","audio_falloff_exponent_distance","audio_falloff_exponent_distance_clamped","audio_falloff_exponent_distance_scaled","audio_falloff_inverse_distance","audio_falloff_inverse_distance_clamped","audio_falloff_inverse_distance_scaled","audio_falloff_linear_distance","audio_falloff_linear_distance_clamped","audio_falloff_none","audio_mono","audio_stereo","bboxkind_diamond","bboxkind_ellipse","bboxkind_precise","bboxkind_rectangular","bboxmode_automatic","bboxmode_fullimage","bboxmode_m\
anual","bm_add","bm_dest_alpha","bm_dest_color","bm_dest_colour","bm_inv_dest_alpha","bm_inv_dest_color","bm_inv_dest_colour","bm_inv_src_alpha","bm_inv_src_color","bm_inv_src_colour","bm_max","bm_normal","bm_one","bm_src_alpha","bm_src_alpha_sat","bm_src_color","bm_src_colour","bm_subtract","bm_zero","browser_chrome","browser_edge","browser_firefox","browser_ie","browser_ie_mobile","browser_not_a_browser","browser_opera","browser_safari","browser_safari_mobile","browser_tizen","browser_unknown",
"browser_windows_store","buffer_bool","buffer_f16","buffer_f32","buffer_f64","buffer_fast","buffer_fixed","buffer_grow","buffer_s16","buffer_s32","buffer_s8","buffer_seek_end","buffer_seek_relative","buffer_seek_start","buffer_string","buffer_text","buffer_u16","buffer_u32","buffer_u64","buffer_u8","buffer_vbuffer","buffer_wrap","c_aqua","c_black","c_blue","c_dkgray","c_dkgrey","c_fuchsia","c_gray","c_green","c_grey","c_lime","c_ltgray","c_ltgrey","c_maroon","c_navy","c_olive","c_orange","c_purp\
le","c_red","c_silver","c_teal","c_white","c_yellow","cache_directory","characterSpacing","cmpfunc_always","cmpfunc_equal","cmpfunc_greater","cmpfunc_greaterequal","cmpfunc_less","cmpfunc_lessequal","cmpfunc_never","cmpfunc_notequal","coreColor","coreColour","cr_appstart","cr_arrow","cr_beam","cr_cross","cr_default","cr_drag","cr_handpoint","cr_hourglass","cr_none","cr_size_all","cr_size_nesw","cr_size_ns","cr_size_nwse","cr_size_we","cr_uparrow","cull_clockwise","cull_counterclockwise","cull_no\
culling","device_emulator","device_ios_ipad","device_ios_ipad_retina","device_ios_iphone","device_ios_iphone5","device_ios_iphone6","device_ios_iphone6plus","device_ios_iphone_retina","device_ios_unknown","device_tablet","display_landscape","display_landscape_flipped","display_portrait","display_portrait_flipped","dll_cdecl","dll_stdcall","dropShadowEnabled","dropShadowEnabled","ds_type_grid","ds_type_list","ds_type_map","ds_type_priority","ds_type_queue","ds_type_stack","ef_cloud","ef_ellipse",
"ef_explosion","ef_firework","ef_flare","ef_rain","ef_ring","ef_smoke","ef_smokeup","ef_snow","ef_spark","ef_star","effectsEnabled","effectsEnabled","ev_alarm","ev_animation_end","ev_animation_event","ev_animation_update","ev_async_audio_playback","ev_async_audio_playback_ended","ev_async_audio_recording","ev_async_dialog","ev_async_push_notification","ev_async_save_load","ev_async_save_load","ev_async_social","ev_async_system_event","ev_async_web","ev_async_web_cloud","ev_async_web_iap","ev_asy\
nc_web_image_load","ev_async_web_networking","ev_async_web_steam","ev_audio_playback","ev_audio_playback_ended","ev_audio_recording","ev_boundary","ev_boundary_view0","ev_boundary_view1","ev_boundary_view2","ev_boundary_view3","ev_boundary_view4","ev_boundary_view5","ev_boundary_view6","ev_boundary_view7","ev_broadcast_message","ev_cleanup","ev_collision","ev_create","ev_destroy","ev_dialog_async","ev_draw","ev_draw_begin","ev_draw_end","ev_draw_normal","ev_draw_post","ev_draw_pre","ev_end_of_pa\
th","ev_game_end","ev_game_start","ev_gesture","ev_gesture_double_tap","ev_gesture_drag_end","ev_gesture_drag_start","ev_gesture_dragging","ev_gesture_flick","ev_gesture_pinch_end","ev_gesture_pinch_in","ev_gesture_pinch_out","ev_gesture_pinch_start","ev_gesture_rotate_end","ev_gesture_rotate_start","ev_gesture_rotating","ev_gesture_tap","ev_global_gesture_double_tap","ev_global_gesture_drag_end","ev_global_gesture_drag_start","ev_global_gesture_dragging","ev_global_gesture_flick","ev_global_ges\
ture_pinch_end","ev_global_gesture_pinch_in","ev_global_gesture_pinch_out","ev_global_gesture_pinch_start","ev_global_gesture_rotate_end","ev_global_gesture_rotate_start","ev_global_gesture_rotating","ev_global_gesture_tap","ev_global_left_button","ev_global_left_press","ev_global_left_release","ev_global_middle_button","ev_global_middle_press","ev_global_middle_release","ev_global_right_button","ev_global_right_press","ev_global_right_release","ev_gui","ev_gui_begin","ev_gui_end","ev_joystick1_\
button1","ev_joystick1_button2","ev_joystick1_button3","ev_joystick1_button4","ev_joystick1_button5","ev_joystick1_button6","ev_joystick1_button7","ev_joystick1_button8","ev_joystick1_down","ev_joystick1_left","ev_joystick1_right","ev_joystick1_up","ev_joystick2_button1","ev_joystick2_button2","ev_joystick2_button3","ev_joystick2_button4","ev_joystick2_button5","ev_joystick2_button6","ev_joystick2_button7","ev_joystick2_button8","ev_joystick2_down","ev_joystick2_left","ev_joystick2_right","ev_jo\
ystick2_up","ev_keyboard","ev_keypress","ev_keyrelease","ev_left_button","ev_left_press","ev_left_release","ev_middle_button","ev_middle_press","ev_middle_release","ev_mouse","ev_mouse_enter","ev_mouse_leave","ev_mouse_wheel_down","ev_mouse_wheel_up","ev_no_button","ev_no_more_health","ev_no_more_lives","ev_other","ev_outside","ev_outside_view0","ev_outside_view1","ev_outside_view2","ev_outside_view3","ev_outside_view4","ev_outside_view5","ev_outside_view6","ev_outside_view7","ev_pre_create","ev\
_push_notification","ev_right_button","ev_right_press","ev_right_release","ev_room_end","ev_room_start","ev_social","ev_step","ev_step_begin","ev_step_end","ev_step_normal","ev_system_event","ev_trigger","ev_user0","ev_user1","ev_user10","ev_user11","ev_user12","ev_user13","ev_user14","ev_user15","ev_user2","ev_user3","ev_user4","ev_user5","ev_user6","ev_user7","ev_user8","ev_user9","ev_web_async","ev_web_cloud","ev_web_iap","ev_web_image_load","ev_web_networking","ev_web_sound_load","ev_web_ste\
am","fa_archive","fa_bottom","fa_center","fa_directory","fa_hidden","fa_left","fa_middle","fa_none","fa_readonly","fa_right","fa_sysfile","fa_top","fa_volumeid","false","frameSizeX","frameSizeY","gamespeed_fps","gamespeed_microseconds","global","glowColor","glowColour","glowEnabled","glowEnabled","glowEnd","glowStart","gp_axis_acceleration_x","gp_axis_acceleration_y","gp_axis_acceleration_z","gp_axis_angular_velocity_x","gp_axis_angular_velocity_y","gp_axis_angular_velocity_z","gp_axis_orientati\
on_w","gp_axis_orientation_x","gp_axis_orientation_y","gp_axis_orientation_z","gp_axislh","gp_axislv","gp_axisrh","gp_axisrv","gp_face1","gp_face2","gp_face3","gp_face4","gp_padd","gp_padl","gp_padr","gp_padu","gp_select","gp_shoulderl","gp_shoulderlb","gp_shoulderr","gp_shoulderrb","gp_start","gp_stickl","gp_stickr","iap_available","iap_canceled","iap_ev_consume","iap_ev_product","iap_ev_purchase","iap_ev_restore","iap_ev_storeload","iap_failed","iap_purchased","iap_refunded","iap_status_availa\
ble","iap_status_loading","iap_status_processing","iap_status_restoring","iap_status_unavailable","iap_status_uninitialised","iap_storeload_failed","iap_storeload_ok","iap_unavailable","infinity","kbv_autocapitalize_characters","kbv_autocapitalize_none","kbv_autocapitalize_sentences","kbv_autocapitalize_words","kbv_returnkey_continue","kbv_returnkey_default","kbv_returnkey_done","kbv_returnkey_emergency","kbv_returnkey_go","kbv_returnkey_google","kbv_returnkey_join","kbv_returnkey_next","kbv_ret\
urnkey_route","kbv_returnkey_search","kbv_returnkey_send","kbv_returnkey_yahoo","kbv_type_ascii","kbv_type_default","kbv_type_email","kbv_type_numbers","kbv_type_phone","kbv_type_phone_name","kbv_type_url","layerelementtype_background","layerelementtype_instance","layerelementtype_oldtilemap","layerelementtype_particlesystem","layerelementtype_sequence","layerelementtype_sprite","layerelementtype_tile","layerelementtype_tilemap","layerelementtype_undefined","leaderboard_type_number","leaderboard\
_type_time_mins_secs","lighttype_dir","lighttype_point","lineSpacing","m_axisx","m_axisx_gui","m_axisy","m_axisy_gui","m_scroll_down","m_scroll_up","matrix_projection","matrix_view","matrix_world","mb_any","mb_left","mb_middle","mb_none","mb_right","mb_side1","mb_side2","mip_markedonly","mip_off","mip_on","network_config_avoid_time_wait","network_config_connect_timeout","network_config_disable_multicast","network_config_disable_reliable_udp","network_config_enable_multicast","network_config_enab\
le_reliable_udp","network_config_use_non_blocking_socket","network_config_websocket_protocol","network_connect_active","network_connect_blocking","network_connect_nonblocking","network_connect_none","network_connect_passive","network_send_binary","network_send_text","network_socket_bluetooth","network_socket_tcp","network_socket_udp","network_socket_ws","network_socket_wss","network_type_connect","network_type_data","network_type_disconnect","network_type_down","network_type_non_blocking_connect",
"network_type_up","network_type_up_failed","nineslice_blank","nineslice_bottom","nineslice_center","nineslice_centre","nineslice_hide","nineslice_left","nineslice_mirror","nineslice_repeat","nineslice_right","nineslice_stretch","nineslice_top","noone","of_challenge_lose","of_challenge_tie","of_challenge_win","os_android","os_gdk","os_gxgames","os_ios","os_linux","os_macosx","os_operagx","os_permission_denied","os_permission_denied_dont_request","os_permission_granted","os_ps3","os_ps4","os_ps5",
"os_psvita","os_switch","os_tvos","os_unknown","os_uwp","os_win8native","os_windows","os_winphone","os_xboxone","os_xboxseriesxs","other","outlineColor","outlineColour","outlineDist","outlineEnabled","outlineEnabled","paragraphSpacing","path_action_continue","path_action_restart","path_action_reverse","path_action_stop","phy_debug_render_aabb","phy_debug_render_collision_pairs","phy_debug_render_coms","phy_debug_render_core_shapes","phy_debug_render_joints","phy_debug_render_obb","phy_debug_rend\
er_shapes","phy_joint_anchor_1_x","phy_joint_anchor_1_y","phy_joint_anchor_2_x","phy_joint_anchor_2_y","phy_joint_angle","phy_joint_angle_limits","phy_joint_damping_ratio","phy_joint_frequency","phy_joint_length_1","phy_joint_length_2","phy_joint_lower_angle_limit","phy_joint_max_force","phy_joint_max_length","phy_joint_max_motor_force","phy_joint_max_motor_torque","phy_joint_max_torque","phy_joint_motor_force","phy_joint_motor_speed","phy_joint_motor_torque","phy_joint_reaction_force_x","phy_jo\
int_reaction_force_y","phy_joint_reaction_torque","phy_joint_speed","phy_joint_translation","phy_joint_upper_angle_limit","phy_particle_data_flag_category","phy_particle_data_flag_color","phy_particle_data_flag_colour","phy_particle_data_flag_position","phy_particle_data_flag_typeflags","phy_particle_data_flag_velocity","phy_particle_flag_colormixing","phy_particle_flag_colourmixing","phy_particle_flag_elastic","phy_particle_flag_powder","phy_particle_flag_spring","phy_particle_flag_tensile","ph\
y_particle_flag_viscous","phy_particle_flag_wall","phy_particle_flag_water","phy_particle_flag_zombie","phy_particle_group_flag_rigid","phy_particle_group_flag_solid","pi","pointer_invalid","pointer_null","pr_linelist","pr_linestrip","pr_pointlist","pr_trianglefan","pr_trianglelist","pr_trianglestrip","ps_distr_gaussian","ps_distr_invgaussian","ps_distr_linear","ps_mode_burst","ps_mode_stream","ps_shape_diamond","ps_shape_ellipse","ps_shape_line","ps_shape_rectangle","pt_shape_circle","pt_shape_\
cloud","pt_shape_disk","pt_shape_explosion","pt_shape_flare","pt_shape_line","pt_shape_pixel","pt_shape_ring","pt_shape_smoke","pt_shape_snow","pt_shape_spark","pt_shape_sphere","pt_shape_square","pt_shape_star","rollback_chat_message","rollback_connect_error","rollback_connect_info","rollback_connected_to_peer","rollback_connection_rejected","rollback_disconnected_from_peer","rollback_end_game","rollback_game_full","rollback_game_info","rollback_game_interrupted","rollback_game_resumed","rollba\
ck_high_latency","rollback_player_prefs","rollback_protocol_rejected","rollback_synchronized_with_peer","rollback_synchronizing_with_peer","self","seqaudiokey_loop","seqaudiokey_oneshot","seqdir_left","seqdir_right","seqinterpolation_assign","seqinterpolation_lerp","seqplay_loop","seqplay_oneshot","seqplay_pingpong","seqtextkey_bottom","seqtextkey_center","seqtextkey_justify","seqtextkey_left","seqtextkey_middle","seqtextkey_right","seqtextkey_top","seqtracktype_audio","seqtracktype_bool","seqtr\
acktype_clipmask","seqtracktype_clipmask_mask","seqtracktype_clipmask_subject","seqtracktype_color","seqtracktype_colour","seqtracktype_empty","seqtracktype_graphic","seqtracktype_group","seqtracktype_instance","seqtracktype_message","seqtracktype_moment","seqtracktype_particlesystem","seqtracktype_real","seqtracktype_sequence","seqtracktype_spriteframes","seqtracktype_string","seqtracktype_text","shadowColor","shadowColour","shadowOffsetX","shadowOffsetY","shadowSoftness","sprite_add_ext_error_\
cancelled","sprite_add_ext_error_decompressfailed","sprite_add_ext_error_loadfailed","sprite_add_ext_error_setupfailed","sprite_add_ext_error_spritenotfound","sprite_add_ext_error_unknown","spritespeed_framespergameframe","spritespeed_framespersecond","surface_r16float","surface_r32float","surface_r8unorm","surface_rg8unorm","surface_rgba16float","surface_rgba32float","surface_rgba4unorm","surface_rgba8unorm","texturegroup_status_fetched","texturegroup_status_loaded","texturegroup_status_loading",
"texturegroup_status_unloaded","tf_anisotropic","tf_linear","tf_point","thickness","tile_flip","tile_index_mask","tile_mirror","tile_rotate","time_source_expire_after","time_source_expire_nearest","time_source_game","time_source_global","time_source_state_active","time_source_state_initial","time_source_state_paused","time_source_state_stopped","time_source_units_frames","time_source_units_seconds","timezone_local","timezone_utc","tm_countvsyncs","tm_sleep","tm_systemtiming","true","ty_real","ty\
_string","undefined","vertex_type_color","vertex_type_colour","vertex_type_float1","vertex_type_float2","vertex_type_float3","vertex_type_float4","vertex_type_ubyte4","vertex_usage_binormal","vertex_usage_blendindices","vertex_usage_blendweight","vertex_usage_color","vertex_usage_colour","vertex_usage_depth","vertex_usage_fog","vertex_usage_normal","vertex_usage_position","vertex_usage_psize","vertex_usage_sample","vertex_usage_tangent","vertex_usage_texcoord","video_format_rgba","video_format_y\
uv","video_status_closed","video_status_paused","video_status_playing","video_status_preparing","vk_add","vk_alt","vk_anykey","vk_backspace","vk_control","vk_decimal","vk_delete","vk_divide","vk_down","vk_end","vk_enter","vk_escape","vk_f1","vk_f10","vk_f11","vk_f12","vk_f2","vk_f3","vk_f4","vk_f5","vk_f6","vk_f7","vk_f8","vk_f9","vk_home","vk_insert","vk_lalt","vk_lcontrol","vk_left","vk_lshift","vk_multiply","vk_nokey","vk_numpad0","vk_numpad1","vk_numpad2","vk_numpad3","vk_numpad4","vk_numpad\
5","vk_numpad6","vk_numpad7","vk_numpad8","vk_numpad9","vk_pagedown","vk_pageup","vk_pause","vk_printscreen","vk_ralt","vk_rcontrol","vk_return","vk_right","vk_rshift","vk_shift","vk_space","vk_subtract","vk_tab","vk_up","wallpaper_config","wallpaper_subscription_data","wrap"],"variable.language":["alarm","application_surface","argument","argument0","argument1","argument2","argument3","argument4","argument5","argument6","argument7","argument8","argument9","argument10","argument11","argument12","\
argument13","argument14","argument15","argument_count","async_load","background_color","background_colour","background_showcolor","background_showcolour","bbox_bottom","bbox_left","bbox_right","bbox_top","browser_height","browser_width","colour?ColourTrack","current_day","current_hour","current_minute","current_month","current_second","current_time","current_weekday","current_year","cursor_sprite","debug_mode","delta_time","depth","direction","display_aa","drawn_by_sequence","event_action","even\
t_data","event_number","event_object","event_type","font_texture_page_size","fps","fps_real","friction","game_display_name","game_id","game_project_name","game_save_id","gravity","gravity_direction","health","hspeed","iap_data","id","image_alpha","image_angle","image_blend","image_index","image_number","image_speed","image_xscale","image_yscale","in_collision_tree","in_sequence","instance_count","instance_id","keyboard_key","keyboard_lastchar","keyboard_lastkey","keyboard_string","layer","lives",
"longMessage","managed","mask_index","message","mouse_button","mouse_lastbutton","mouse_x","mouse_y","object_index","os_browser","os_device","os_type","os_version","path_endaction","path_index","path_orientation","path_position","path_positionprevious","path_scale","path_speed","persistent","phy_active","phy_angular_damping","phy_angular_velocity","phy_bullet","phy_col_normal_x","phy_col_normal_y","phy_collision_points","phy_collision_x","phy_collision_y","phy_com_x","phy_com_y","phy_dynamic","p\
hy_fixed_rotation","phy_inertia","phy_kinematic","phy_linear_damping","phy_linear_velocity_x","phy_linear_velocity_y","phy_mass","phy_position_x","phy_position_xprevious","phy_position_y","phy_position_yprevious","phy_rotation","phy_sleeping","phy_speed","phy_speed_x","phy_speed_y","player_avatar_sprite","player_avatar_url","player_id","player_local","player_type","player_user_id","program_directory","rollback_api_server","rollback_confirmed_frame","rollback_current_frame","rollback_event_id","r\
ollback_event_param","rollback_game_running","room","room_first","room_height","room_last","room_persistent","room_speed","room_width","score","script","sequence_instance","solid","speed","sprite_height","sprite_index","sprite_width","sprite_xoffset","sprite_yoffset","stacktrace","temp_directory","timeline_index","timeline_loop","timeline_position","timeline_running","timeline_speed","view_camera","view_current","view_enabled","view_hport","view_surface_id","view_visible","view_wport","view_xpor\
t","view_yport","visible","vspeed","webgl_enabled","working_directory","x","xprevious","xstart","y","yprevious","ystart"]},contains:[hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,hljs.C_NUMBER_MODE]}}return gml_1=gml2,gml_1}var go_1,hasRequiredGo;function requireGo(){if(hasRequiredGo)return go_1;hasRequiredGo=1;function go2(hljs){const KEYWORDS2={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func",
"go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:KEYWORDS2,
illegal:"</",contains:[hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,{className:"string",variants:[hljs.QUOTE_STRING_MODE,hljs.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:"number",variants:[{match:/-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/,relevance:0},{match:/-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b0[oO](_?[0-7])*i?/,relevance:0},{match:/-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/,
relevance:0}]},{begin:/:=/},{className:"function",beginKeywords:"func",end:"\\s*(\\{|$)",excludeEnd:!0,contains:[hljs.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:KEYWORDS2,illegal:/["']/}]}]}}return go_1=go2,go_1}var golo_1,hasRequiredGolo;function requireGolo(){if(hasRequiredGolo)return golo_1;hasRequiredGolo=1;function golo2(hljs){return{name:"Golo",keywords:{keyword:["println","readln","print","import","module","function","local","return","let","var","while","for",
"foreach","times","in","case","when","match","with","break","continue","augment","augmentation","each","find","filter","reduce","if","then","else","otherwise","try","catch","finally","raise","throw","orIfNull","DynamicObject|10","DynamicVariable","struct","Observable","map","set","vector","list","array"],literal:["true","false","null"]},contains:[hljs.HASH_COMMENT_MODE,hljs.QUOTE_STRING_MODE,hljs.C_NUMBER_MODE,{className:"meta",begin:"@[A-Za-z]+"}]}}return golo_1=golo2,golo_1}var gradle_1,hasRequiredGradle;
function requireGradle(){if(hasRequiredGradle)return gradle_1;hasRequiredGradle=1;function gradle2(hljs){return{name:"Gradle",case_insensitive:!0,keywords:["task","project","allprojects","subprojects","artifacts","buildscript","configurations","dependencies","repositories","sourceSets","description","delete","from","into","include","exclude","source","classpath","destinationDir","includes","options","sourceCompatibility","targetCompatibility","group","flatDir","doLast","doFirst","flatten","todir",
"fromdir","ant","def","abstract","break","case","catch","continue","default","do","else","extends","final","finally","for","if","implements","instanceof","native","new","private","protected","public","return","static","switch","synchronized","throw","throws","transient","try","volatile","while","strictfp","package","import","false","null","super","this","true","antlrtask","checkstyle","codenarc","copy","boolean","byte","char","class","double","float","int","interface","long","short","void","comp\
ile","runTime","file","fileTree","abs","any","append","asList","asWritable","call","collect","compareTo","count","div","dump","each","eachByte","eachFile","eachLine","every","find","findAll","flatten","getAt","getErr","getIn","getOut","getText","grep","immutable","inject","inspect","intersect","invokeMethods","isCase","join","leftShift","minus","multiply","newInputStream","newOutputStream","newPrintWriter","newReader","newWriter","next","plus","pop","power","previous","print","println","push","p\
utAt","read","readBytes","readLines","reverse","reverseEach","round","size","sort","splitEachLine","step","subMap","times","toInteger","toList","tokenize","upto","waitForOrKill","withPrintWriter","withReader","withStream","withWriter","withWriterAppend","write","writeLine"],contains:[hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,hljs.NUMBER_MODE,hljs.REGEXP_MODE]}}return gradle_1=gradle2,gradle_1}var graphql_1,hasRequiredGraphql;function requireGraphql(){
if(hasRequiredGraphql)return graphql_1;hasRequiredGraphql=1;function graphql2(hljs){const regex=hljs.regex,GQL_NAME=/[_A-Za-z][_0-9A-Za-z]*/;return{name:"GraphQL",aliases:["gql"],case_insensitive:!0,disableAutodetect:!1,keywords:{keyword:["query","mutation","subscription","type","input","schema","directive","interface","union","scalar","fragment","enum","on"],literal:["true","false","null"]},contains:[hljs.HASH_COMMENT_MODE,hljs.QUOTE_STRING_MODE,hljs.NUMBER_MODE,{scope:"punctuation",match:/[.]{3}/,
relevance:0},{scope:"punctuation",begin:/[\!\(\)\:\=\[\]\{\|\}]{1}/,relevance:0},{scope:"variable",begin:/\$/,end:/\W/,excludeEnd:!0,relevance:0},{scope:"meta",match:/@\w+/,excludeEnd:!0},{scope:"symbol",begin:regex.concat(GQL_NAME,regex.lookahead(/\s*:/)),relevance:0}],illegal:[/[;<']/,/BEGIN/]}}return graphql_1=graphql2,graphql_1}var groovy_1,hasRequiredGroovy;function requireGroovy(){if(hasRequiredGroovy)return groovy_1;hasRequiredGroovy=1;function variants2(variants3,obj={}){return obj.variants=
variants3,obj}function groovy2(hljs){const regex=hljs.regex,IDENT_RE2="[A-Za-z0-9_$]+",COMMENT=variants2([hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]})]),REGEXP2={className:"regexp",begin:/~?\/[^\/\n]+\//,contains:[hljs.BACKSLASH_ESCAPE]},NUMBER=variants2([hljs.BINARY_NUMBER_MODE,hljs.C_NUMBER_MODE]),STRING=variants2([{begin:/"""/,end:/"""/},{begin:/'''/,end:/'''/},{begin:"\
\\$/",end:"/\\$",relevance:10},hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE],{className:"string"}),CLASS_DEFINITION={match:[/(class|interface|trait|enum|record|extends|implements)/,/\s+/,hljs.UNDERSCORE_IDENT_RE],scope:{1:"keyword",3:"title.class"}};return{name:"Groovy",keywords:{"variable.language":"this super",literal:"true false null",type:["byte","short","char","int","long","boolean","float","double","void"],keyword:["def","as","in","assert","trait","abstract","static","volatile","transient",
"public","private","protected","synchronized","final","class","interface","enum","if","else","for","while","switch","case","break","default","continue","throw","throws","try","catch","finally","implements","extends","new","import","package","return","instanceof","var"]},contains:[hljs.SHEBANG({binary:"groovy",relevance:10}),COMMENT,STRING,REGEXP2,NUMBER,CLASS_DEFINITION,{className:"meta",begin:"@[A-Za-z]+",relevance:0},{className:"attr",begin:IDENT_RE2+"[ 	]*:",relevance:0},{begin:/\?/,end:/:/,relevance:0,
contains:[COMMENT,STRING,REGEXP2,NUMBER,"self"]},{className:"symbol",begin:"^[ 	]*"+regex.lookahead(IDENT_RE2+":"),excludeBegin:!0,end:IDENT_RE2+":",relevance:0}],illegal:/#|<\//}}return groovy_1=groovy2,groovy_1}var haml_1,hasRequiredHaml;function requireHaml(){if(hasRequiredHaml)return haml_1;hasRequiredHaml=1;function haml2(hljs){return{name:"HAML",case_insensitive:!0,contains:[{className:"meta",begin:"^!!!( (5|1\\.1|Strict|Frameset|Basic|Mobile|RDFa|XML\\b.*))?$",relevance:10},hljs.COMMENT("\
^\\s*(!=#|=#|-#|/).*$",null,{relevance:0}),{begin:"^\\s*(-|=|!=)(?!#)",end:/$/,subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0},{className:"tag",begin:"^\\s*%",contains:[{className:"selector-tag",begin:"\\w+"},{className:"selector-id",begin:"#[\\w-]+"},{className:"selector-class",begin:"\\.[\\w-]+"},{begin:/\{\s*/,end:/\s*\}/,contains:[{begin:":\\w+\\s*=>",end:",\\s+",returnBegin:!0,endsWithParent:!0,contains:[{className:"attr",begin:":\\w+"},hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,{begin:"\
\\w+",relevance:0}]}]},{begin:"\\(\\s*",end:"\\s*\\)",excludeEnd:!0,contains:[{begin:"\\w+\\s*=",end:"\\s+",returnBegin:!0,endsWithParent:!0,contains:[{className:"attr",begin:"\\w+",relevance:0},hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,{begin:"\\w+",relevance:0}]}]}]},{begin:"^\\s*[=~]\\s*"},{begin:/#\{/,end:/\}/,subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0}]}}return haml_1=haml2,haml_1}var handlebars_1,hasRequiredHandlebars;function requireHandlebars(){if(hasRequiredHandlebars)return handlebars_1;
hasRequiredHandlebars=1;function handlebars2(hljs){const regex=hljs.regex,BUILT_INS2={$pattern:/[\w.\/]+/,built_in:["action","bindattr","collection","component","concat","debugger","each","each-in","get","hash","if","in","input","link-to","loc","log","lookup","mut","outlet","partial","query-params","render","template","textarea","unbound","unless","view","with","yield"]},LITERALS2={$pattern:/[\w.\/]+/,literal:["true","false","undefined","null"]},DOUBLE_QUOTED_ID_REGEX=/""|"[^"]+"/,SINGLE_QUOTED_ID_REGEX=/''|'[^']+'/,
BRACKET_QUOTED_ID_REGEX=/\[\]|\[[^\]]+\]/,PLAIN_ID_REGEX=/[^\s!"#%&'()*+,.\/;<=>@\[\\\]^`{|}~]+/,PATH_DELIMITER_REGEX=/(\.|\/)/,ANY_ID=regex.either(DOUBLE_QUOTED_ID_REGEX,SINGLE_QUOTED_ID_REGEX,BRACKET_QUOTED_ID_REGEX,PLAIN_ID_REGEX),IDENTIFIER_REGEX=regex.concat(regex.optional(/\.|\.\/|\//),ANY_ID,regex.anyNumberOfTimes(regex.concat(PATH_DELIMITER_REGEX,ANY_ID))),HASH_PARAM_REGEX=regex.concat("(",BRACKET_QUOTED_ID_REGEX,"|",PLAIN_ID_REGEX,")(?==)"),HELPER_NAME_OR_PATH_EXPRESSION={begin:IDENTIFIER_REGEX},
HELPER_PARAMETER=hljs.inherit(HELPER_NAME_OR_PATH_EXPRESSION,{keywords:LITERALS2}),SUB_EXPRESSION={begin:/\(/,end:/\)/},HASH={className:"attr",begin:HASH_PARAM_REGEX,relevance:0,starts:{begin:/=/,end:/=/,starts:{contains:[hljs.NUMBER_MODE,hljs.QUOTE_STRING_MODE,hljs.APOS_STRING_MODE,HELPER_PARAMETER,SUB_EXPRESSION]}}},BLOCK_PARAMS={begin:/as\s+\|/,keywords:{keyword:"as"},end:/\|/,contains:[{begin:/\w+/}]},HELPER_PARAMETERS={contains:[hljs.NUMBER_MODE,hljs.QUOTE_STRING_MODE,hljs.APOS_STRING_MODE,
BLOCK_PARAMS,HASH,HELPER_PARAMETER,SUB_EXPRESSION],returnEnd:!0},SUB_EXPRESSION_CONTENTS=hljs.inherit(HELPER_NAME_OR_PATH_EXPRESSION,{className:"name",keywords:BUILT_INS2,starts:hljs.inherit(HELPER_PARAMETERS,{end:/\)/})});SUB_EXPRESSION.contains=[SUB_EXPRESSION_CONTENTS];const OPENING_BLOCK_MUSTACHE_CONTENTS=hljs.inherit(HELPER_NAME_OR_PATH_EXPRESSION,{keywords:BUILT_INS2,className:"name",starts:hljs.inherit(HELPER_PARAMETERS,{end:/\}\}/})}),CLOSING_BLOCK_MUSTACHE_CONTENTS=hljs.inherit(HELPER_NAME_OR_PATH_EXPRESSION,
{keywords:BUILT_INS2,className:"name"}),BASIC_MUSTACHE_CONTENTS=hljs.inherit(HELPER_NAME_OR_PATH_EXPRESSION,{className:"name",keywords:BUILT_INS2,starts:hljs.inherit(HELPER_PARAMETERS,{end:/\}\}/})});return{name:"Handlebars",aliases:["hbs","html.hbs","html.handlebars","htmlbars"],case_insensitive:!0,subLanguage:"xml",contains:[{begin:/\\\{\{/,skip:!0},{begin:/\\\\(?=\{\{)/,skip:!0},hljs.COMMENT(/\{\{!--/,/--\}\}/),hljs.COMMENT(/\{\{!/,/\}\}/),{className:"template-tag",begin:/\{\{\{\{(?!\/)/,end:/\}\}\}\}/,
contains:[OPENING_BLOCK_MUSTACHE_CONTENTS],starts:{end:/\{\{\{\{\//,returnEnd:!0,subLanguage:"xml"}},{className:"template-tag",begin:/\{\{\{\{\//,end:/\}\}\}\}/,contains:[CLOSING_BLOCK_MUSTACHE_CONTENTS]},{className:"template-tag",begin:/\{\{#/,end:/\}\}/,contains:[OPENING_BLOCK_MUSTACHE_CONTENTS]},{className:"template-tag",begin:/\{\{(?=else\}\})/,end:/\}\}/,keywords:"else"},{className:"template-tag",begin:/\{\{(?=else if)/,end:/\}\}/,keywords:"else if"},{className:"template-tag",begin:/\{\{\//,
end:/\}\}/,contains:[CLOSING_BLOCK_MUSTACHE_CONTENTS]},{className:"template-variable",begin:/\{\{\{/,end:/\}\}\}/,contains:[BASIC_MUSTACHE_CONTENTS]},{className:"template-variable",begin:/\{\{/,end:/\}\}/,contains:[BASIC_MUSTACHE_CONTENTS]}]}}return handlebars_1=handlebars2,handlebars_1}var haskell_1,hasRequiredHaskell;function requireHaskell(){if(hasRequiredHaskell)return haskell_1;hasRequiredHaskell=1;function haskell2(hljs){const decimalDigits2="([0-9]_*)+",hexDigits2="([0-9a-fA-F]_*)+",binaryDigits="\
([01]_*)+",octalDigits="([0-7]_*)+",symbol="([!#$%&*+.\\/<=>?@\\\\^~-]|(?!([(),;\\[\\]`|{}]|[_:\"']))(\\p{S}|\\p{P}))",COMMENT={variants:[hljs.COMMENT("--+","$"),hljs.COMMENT(/\{-/,/-\}/,{contains:["self"]})]},PRAGMA={className:"meta",begin:/\{-#/,end:/#-\}/},PREPROCESSOR={className:"meta",begin:"^#",end:"$"},CONSTRUCTOR={className:"type",begin:"\\b[A-Z][\\w']*",relevance:0},LIST={begin:"\\(",end:"\\)",illegal:'"',contains:[PRAGMA,PREPROCESSOR,{className:"type",begin:"\\b[A-Z][\\w]*(\\((\\.\\.|,|\\w+)\
\\))?"},hljs.inherit(hljs.TITLE_MODE,{begin:"[_a-z][\\w']*"}),COMMENT]},RECORD={begin:/\{/,end:/\}/,contains:LIST.contains},NUMBER={className:"number",relevance:0,variants:[{match:`\\b(${decimalDigits2})(\\.(${decimalDigits2}))?([eE][+-]?(${decimalDigits2}))?\\b`},{match:`\\b0[xX]_*(${hexDigits2})(\\.(${hexDigits2}))?([pP][+-]?(${decimalDigits2}))?\\b`},{match:`\\b0[oO](${octalDigits})\\b`},{match:`\\b0[bB](${binaryDigits})\\b`}]};return{name:"Haskell",aliases:["hs"],keywords:"let in if then els\
e case of where do module import hiding qualified type data newtype deriving class instance as default infix infixl infixr foreign export ccall stdcall cplusplus jvm dotnet safe unsafe family forall mdo proc rec",unicodeRegex:!0,contains:[{beginKeywords:"module",end:"where",keywords:"module where",contains:[LIST,COMMENT],illegal:"\\W\\.|;"},{begin:"\\bimport\\b",end:"$",keywords:"import qualified as hiding",contains:[LIST,COMMENT],illegal:"\\W\\.|;"},{className:"class",begin:"^(\\s*)?(class|insta\
nce)\\b",end:"where",keywords:"class family instance where",contains:[CONSTRUCTOR,LIST,COMMENT]},{className:"class",begin:"\\b(data|(new)?type)\\b",end:"$",keywords:"data family type newtype deriving",contains:[PRAGMA,CONSTRUCTOR,LIST,RECORD,COMMENT]},{beginKeywords:"default",end:"$",contains:[CONSTRUCTOR,LIST,COMMENT]},{beginKeywords:"infix infixl infixr",end:"$",contains:[hljs.C_NUMBER_MODE,COMMENT]},{begin:"\\bforeign\\b",end:"$",keywords:"foreign import export ccall stdcall cplusplus jvm dot\
net safe unsafe",contains:[CONSTRUCTOR,hljs.QUOTE_STRING_MODE,COMMENT]},{className:"meta",begin:"#!\\/usr\\/bin\\/env runhaskell",end:"$"},PRAGMA,PREPROCESSOR,{scope:"string",begin:/'(?=\\?.')/,end:/'/,contains:[{scope:"char.escape",match:/\\./}]},hljs.QUOTE_STRING_MODE,NUMBER,CONSTRUCTOR,hljs.inherit(hljs.TITLE_MODE,{begin:"^[_a-z][\\w']*"}),{begin:`(?!-)${symbol}--+|--+(?!-)${symbol}`},COMMENT,{begin:"->|<-"}]}}return haskell_1=haskell2,haskell_1}var haxe_1,hasRequiredHaxe;function requireHaxe(){
if(hasRequiredHaxe)return haxe_1;hasRequiredHaxe=1;function haxe2(hljs){const IDENT_RE2="[a-zA-Z_$][a-zA-Z0-9_$]*",HAXE_NUMBER_RE=/(-?)(\b0[xX][a-fA-F0-9_]+|(\b\d+(\.[\d_]*)?|\.[\d_]+)(([eE][-+]?\d+)|i32|u32|i64|f64)?)/;return{name:"Haxe",aliases:["hx"],keywords:{keyword:"abstract break case cast catch continue default do dynamic else enum extern final for function here if import in inline is macro never new override package private get set public return static super switch this throw trace try \
typedef untyped using var while "+"Int Float String Bool Dynamic Void Array ",built_in:"trace this",literal:"true false null _"},contains:[{className:"string",begin:"'",end:"'",contains:[hljs.BACKSLASH_ESCAPE,{className:"subst",begin:/\$\{/,end:/\}/},{className:"subst",begin:/\$/,end:/\W\}/}]},hljs.QUOTE_STRING_MODE,hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,{className:"number",begin:HAXE_NUMBER_RE,relevance:0},{className:"variable",begin:"\\$"+IDENT_RE2},{className:"meta",begin:/@:?/,end:/\(|$/,
excludeEnd:!0},{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elseif end error"}},{className:"type",begin:/:[ \t]*/,end:/[^A-Za-z0-9_ \t\->]/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/:[ \t]*/,end:/\W/,excludeBegin:!0,excludeEnd:!0},{className:"type",beginKeywords:"new",end:/\W/,excludeBegin:!0,excludeEnd:!0},{className:"title.class",beginKeywords:"enum",end:/\{/,contains:[hljs.TITLE_MODE]},{className:"title.class",begin:"\\babstract\\b(?=\\s*"+hljs.IDENT_RE+
"\\s*\\()",end:/[\{$]/,contains:[{className:"type",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0},{className:"type",begin:/from +/,end:/\W/,excludeBegin:!0,excludeEnd:!0},{className:"type",begin:/to +/,end:/\W/,excludeBegin:!0,excludeEnd:!0},hljs.TITLE_MODE],keywords:{keyword:"abstract from to"}},{className:"title.class",begin:/\b(class|interface) +/,end:/[\{$]/,excludeEnd:!0,keywords:"class interface",contains:[{className:"keyword",begin:/\b(extends|implements) +/,keywords:"extends implemen\
ts",contains:[{className:"type",begin:hljs.IDENT_RE,relevance:0}]},hljs.TITLE_MODE]},{className:"title.function",beginKeywords:"function",end:/\(/,excludeEnd:!0,illegal:/\S/,contains:[hljs.TITLE_MODE]}],illegal:/<\//}}return haxe_1=haxe2,haxe_1}var hsp_1,hasRequiredHsp;function requireHsp(){if(hasRequiredHsp)return hsp_1;hasRequiredHsp=1;function hsp2(hljs){return{name:"HSP",case_insensitive:!0,keywords:{$pattern:/[\w._]+/,keyword:"goto gosub return break repeat loop continue wait await dim sdim\
 foreach dimtype dup dupptr end stop newmod delmod mref run exgoto on mcall assert logmes newlab resume yield onexit onerror onkey onclick oncmd exist delete mkdir chdir dirlist bload bsave bcopy memfile if else poke wpoke lpoke getstr chdpm memexpand memcpy memset notesel noteadd notedel noteload notesave randomize noteunsel noteget split strrep setease button chgdisp exec dialog mmload mmplay mmstop mci pset pget syscolor mes print title pos circle cls font sysfont objsize picload color palcol\
or palette redraw width gsel gcopy gzoom gmode bmpsave hsvcolor getkey listbox chkbox combox input mesbox buffer screen bgscr mouse objsel groll line clrobj boxf objprm objmode stick grect grotate gsquare gradf objimage objskip objenable celload celdiv celput newcom querycom delcom cnvstow comres axobj winobj sendmsg comevent comevarg sarrayconv callfunc cnvwtos comevdisp libptr system hspstat hspver stat cnt err strsize looplev sublev iparam wparam lparam refstr refdval int rnd strlen length le\
ngth2 length3 length4 vartype gettime peek wpeek lpeek varptr varuse noteinfo instr abs limit getease str strmid strf getpath strtrim sin cos tan atan sqrt double absf expf logf limitf powf geteasef mousex mousey mousew hwnd hinstance hdc ginfo objinfo dirinfo sysinfo thismod __hspver__ __hsp30__ __date__ __time__ __line__ __file__ _debug __hspdef__ and or xor not screen_normal screen_palette screen_hide screen_fixedsize screen_tool screen_frame gmode_gdi gmode_mem gmode_rgb0 gmode_alpha gmode_r\
gb0alpha gmode_add gmode_sub gmode_pixela ginfo_mx ginfo_my ginfo_act ginfo_sel ginfo_wx1 ginfo_wy1 ginfo_wx2 ginfo_wy2 ginfo_vx ginfo_vy ginfo_sizex ginfo_sizey ginfo_winx ginfo_winy ginfo_mesx ginfo_mesy ginfo_r ginfo_g ginfo_b ginfo_paluse ginfo_dispx ginfo_dispy ginfo_cx ginfo_cy ginfo_intid ginfo_newid ginfo_sx ginfo_sy objinfo_mode objinfo_bmscr objinfo_hwnd notemax notesize dir_cur dir_exe dir_win dir_sys dir_cmdline dir_desktop dir_mydoc dir_tv font_normal font_bold font_italic font_unde\
rline font_strikeout font_antialias objmode_normal objmode_guifont objmode_usefont gsquare_grad msgothic msmincho do until while wend for next _break _continue switch case default swbreak swend ddim ldim alloc m_pi rad2deg deg2rad ease_linear ease_quad_in ease_quad_out ease_quad_inout ease_cubic_in ease_cubic_out ease_cubic_inout ease_quartic_in ease_quartic_out ease_quartic_inout ease_bounce_in ease_bounce_out ease_bounce_inout ease_shake_in ease_shake_out ease_shake_inout ease_loop"},contains:[
hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.QUOTE_STRING_MODE,hljs.APOS_STRING_MODE,{className:"string",begin:/\{"/,end:/"\}/,contains:[hljs.BACKSLASH_ESCAPE]},hljs.COMMENT(";","$",{relevance:0}),{className:"meta",begin:"#",end:"$",keywords:{keyword:"addion cfunc cmd cmpopt comfunc const defcfunc deffunc define else endif enum epack func global if ifdef ifndef include modcfunc modfunc modinit modterm module pack packopt regcmd runtime undef usecom uselib"},contains:[hljs.inherit(hljs.
QUOTE_STRING_MODE,{className:"string"}),hljs.NUMBER_MODE,hljs.C_NUMBER_MODE,hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE]},{className:"symbol",begin:"^\\*(\\w+|@)"},hljs.NUMBER_MODE,hljs.C_NUMBER_MODE]}}return hsp_1=hsp2,hsp_1}var http_1,hasRequiredHttp;function requireHttp(){if(hasRequiredHttp)return http_1;hasRequiredHttp=1;function http2(hljs){const regex=hljs.regex,VERSION="HTTP/([32]|1\\.[01])",HEADER_NAME=/[A-Za-z][A-Za-z0-9-]*/,HEADER={className:"attribute",begin:regex.concat("^",HEADER_NAME,
"(?=\\:\\s)"),starts:{contains:[{className:"punctuation",begin:/: /,relevance:0,starts:{end:"$",relevance:0}}]}},HEADERS_AND_BODY=[HEADER,{begin:"\\n\\n",starts:{subLanguage:[],endsWithParent:!0}}];return{name:"HTTP",aliases:["https"],illegal:/\S/,contains:[{begin:"^(?="+VERSION+" \\d{3})",end:/$/,contains:[{className:"meta",begin:VERSION},{className:"number",begin:"\\b\\d{3}\\b"}],starts:{end:/\b\B/,illegal:/\S/,contains:HEADERS_AND_BODY}},{begin:"(?=^[A-Z]+ (.*?) "+VERSION+"$)",end:/$/,contains:[
{className:"string",begin:" ",end:" ",excludeBegin:!0,excludeEnd:!0},{className:"meta",begin:VERSION},{className:"keyword",begin:"[A-Z]+"}],starts:{end:/\b\B/,illegal:/\S/,contains:HEADERS_AND_BODY}},hljs.inherit(HEADER,{relevance:0})]}}return http_1=http2,http_1}var hy_1,hasRequiredHy;function requireHy(){if(hasRequiredHy)return hy_1;hasRequiredHy=1;function hy2(hljs){const SYMBOLSTART="a-zA-Z_\\-!.?+*=<>&#'",SYMBOL_RE="["+SYMBOLSTART+"]["+SYMBOLSTART+"0-9/;:]*",keywords2={$pattern:SYMBOL_RE,built_in:"\
!= % %= & &= * ** **= *= *map + += , --build-class-- --import-- -= . / // //= /= < << <<= <= = > >= >> >>= @ @= ^ ^= abs accumulate all and any ap-compose ap-dotimes ap-each ap-each-while ap-filter ap-first ap-if ap-last ap-map ap-map-when ap-pipe ap-reduce ap-reject apply as-> ascii assert assoc bin break butlast callable calling-module-name car case cdr chain chr coll? combinations compile compress cond cons cons? continue count curry cut cycle dec def default-method defclass defmacro defmacro\
-alias defmacro/g! defmain defmethod defmulti defn defn-alias defnc defnr defreader defseq del delattr delete-route dict-comp dir disassemble dispatch-reader-macro distinct divmod do doto drop drop-last drop-while empty? end-sequence eval eval-and-compile eval-when-compile even? every? except exec filter first flatten float? fn fnc fnr for for* format fraction genexpr gensym get getattr global globals group-by hasattr hash hex id identity if if* if-not if-python2 import in inc input instance? in\
teger integer-char? integer? interleave interpose is is-coll is-cons is-empty is-even is-every is-float is-instance is-integer is-integer-char is-iterable is-iterator is-keyword is-neg is-none is-not is-numeric is-odd is-pos is-string is-symbol is-zero isinstance islice issubclass iter iterable? iterate iterator? keyword keyword? lambda last len let lif lif-not list* list-comp locals loop macro-error macroexpand macroexpand-1 macroexpand-all map max merge-with method-decorator min multi-decorato\
r multicombinations name neg? next none? nonlocal not not-in not? nth numeric? oct odd? open or ord partition permutations pos? post-route postwalk pow prewalk print product profile/calls profile/cpu put-route quasiquote quote raise range read read-str recursive-replace reduce remove repeat repeatedly repr require rest round route route-with-methods rwm second seq set-comp setattr setv some sorted string string? sum switch symbol? take take-nth take-while tee try unless unquote unquote-splicing \
vars walk when while with with* with-decorator with-gensyms xi xor yield yield-from zero? zip zip-longest | |= ~"},SIMPLE_NUMBER_RE="[-+]?\\d+(\\.\\d+)?",SYMBOL={begin:SYMBOL_RE,relevance:0},NUMBER={className:"number",begin:SIMPLE_NUMBER_RE,relevance:0},STRING=hljs.inherit(hljs.QUOTE_STRING_MODE,{illegal:null}),COMMENT=hljs.COMMENT(";","$",{relevance:0}),LITERAL={className:"literal",begin:/\b([Tt]rue|[Ff]alse|nil|None)\b/},COLLECTION={begin:"[\\[\\{]",end:"[\\]\\}]",relevance:0},HINT={className:"\
comment",begin:"\\^"+SYMBOL_RE},HINT_COL=hljs.COMMENT("\\^\\{","\\}"),KEY={className:"symbol",begin:"[:]{1,2}"+SYMBOL_RE},LIST={begin:"\\(",end:"\\)"},BODY={endsWithParent:!0,relevance:0},NAME={className:"name",relevance:0,keywords:keywords2,begin:SYMBOL_RE,starts:BODY},DEFAULT_CONTAINS=[LIST,STRING,HINT,HINT_COL,COMMENT,KEY,COLLECTION,NUMBER,LITERAL,SYMBOL];return LIST.contains=[hljs.COMMENT("comment",""),NAME,BODY],BODY.contains=DEFAULT_CONTAINS,COLLECTION.contains=DEFAULT_CONTAINS,{name:"Hy",
aliases:["hylang"],illegal:/\S/,contains:[hljs.SHEBANG(),LIST,STRING,HINT,HINT_COL,COMMENT,KEY,COLLECTION,NUMBER,LITERAL]}}return hy_1=hy2,hy_1}var inform7_1,hasRequiredInform7;function requireInform7(){if(hasRequiredInform7)return inform7_1;hasRequiredInform7=1;function inform72(hljs){return{name:"Inform 7",aliases:["i7"],case_insensitive:!0,keywords:{keyword:"thing room person man woman animal container supporter backdrop door scenery open closed locked inside gender is are say understand kind\
 of rule"},contains:[{className:"string",begin:'"',end:'"',relevance:0,contains:[{className:"subst",begin:"\\[",end:"\\]"}]},{className:"section",begin:/^(Volume|Book|Part|Chapter|Section|Table)\b/,end:"$"},{begin:/^(Check|Carry out|Report|Instead of|To|Rule|When|Before|After)\b/,end:":",contains:[{begin:"\\(This",end:"\\)"}]},{className:"comment",begin:"\\[",end:"\\]",contains:["self"]}]}}return inform7_1=inform72,inform7_1}var ini_1,hasRequiredIni;function requireIni(){if(hasRequiredIni)return ini_1;
hasRequiredIni=1;function ini2(hljs){const regex=hljs.regex,NUMBERS={className:"number",relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:hljs.NUMBER_RE}]},COMMENTS=hljs.COMMENT();COMMENTS.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];const VARIABLES={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},LITERALS2={className:"literal",begin:/\bon|off|true|false|yes|no\b/},STRINGS={className:"string",contains:[hljs.BACKSLASH_ESCAPE],variants:[{begin:"''\
'",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]},ARRAY2={begin:/\[/,end:/\]/,contains:[COMMENTS,LITERALS2,VARIABLES,STRINGS,NUMBERS,"self"],relevance:0},BARE_KEY=/[A-Za-z0-9_-]+/,QUOTED_KEY_DOUBLE_QUOTE=/"(\\"|[^"])*"/,QUOTED_KEY_SINGLE_QUOTE=/'[^']*'/,ANY_KEY=regex.either(BARE_KEY,QUOTED_KEY_DOUBLE_QUOTE,QUOTED_KEY_SINGLE_QUOTE),DOTTED_KEY=regex.concat(ANY_KEY,"(\\s*\\.\\s*",ANY_KEY,")*",regex.lookahead(/\s*=\s*[^#\s]/));return{name:"TOML\
, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[COMMENTS,{className:"section",begin:/\[+/,end:/\]+/},{begin:DOTTED_KEY,className:"attr",starts:{end:/$/,contains:[COMMENTS,ARRAY2,LITERALS2,VARIABLES,STRINGS,NUMBERS]}}]}}return ini_1=ini2,ini_1}var irpf90_1,hasRequiredIrpf90;function requireIrpf90(){if(hasRequiredIrpf90)return irpf90_1;hasRequiredIrpf90=1;function irpf902(hljs){const regex=hljs.regex,PARAMS={className:"params",begin:"\\(",end:"\\)"},OPTIONAL_NUMBER_SUFFIX=/(_[a-z_\d]+)?/,
OPTIONAL_NUMBER_EXP=/([de][+-]?\d+)?/,NUMBER={className:"number",variants:[{begin:regex.concat(/\b\d+/,/\.(\d*)/,OPTIONAL_NUMBER_EXP,OPTIONAL_NUMBER_SUFFIX)},{begin:regex.concat(/\b\d+/,OPTIONAL_NUMBER_EXP,OPTIONAL_NUMBER_SUFFIX)},{begin:regex.concat(/\.\d+/,OPTIONAL_NUMBER_EXP,OPTIONAL_NUMBER_SUFFIX)}],relevance:0};return{name:"IRPF90",case_insensitive:!0,keywords:{literal:".False. .True.",keyword:"kind do while private call intrinsic where elsewhere type endtype endmodule endselect endinterfac\
e end enddo endif if forall endforall only contains default return stop then public subroutine|10 function program .and. .or. .not. .le. .eq. .ge. .gt. .lt. goto save else use module select case access blank direct exist file fmt form formatted iostat name named nextrec number opened rec recl sequential status unformatted unit continue format pause cycle exit c_null_char c_alert c_backspace c_form_feed flush wait decimal round iomsg synchronous nopass non_overridable pass protected volatile abst\
ract extends import non_intrinsic value deferred generic final enumerator class associate bind enum c_int c_short c_long c_long_long c_signed_char c_size_t c_int8_t c_int16_t c_int32_t c_int64_t c_int_least8_t c_int_least16_t c_int_least32_t c_int_least64_t c_int_fast8_t c_int_fast16_t c_int_fast32_t c_int_fast64_t c_intmax_t C_intptr_t c_float c_double c_long_double c_float_complex c_double_complex c_long_double_complex c_bool c_char c_null_ptr c_null_funptr c_new_line c_carriage_return c_horiz\
ontal_tab c_vertical_tab iso_c_binding c_loc c_funloc c_associated  c_f_pointer c_ptr c_funptr iso_fortran_env character_storage_size error_unit file_storage_size input_unit iostat_end iostat_eor numeric_storage_size output_unit c_f_procpointer ieee_arithmetic ieee_support_underflow_control ieee_get_underflow_mode ieee_set_underflow_mode newunit contiguous recursive pad position action delim readwrite eor advance nml interface procedure namelist include sequence elemental pure integer real chara\
cter complex logical dimension allocatable|10 parameter external implicit|10 none double precision assign intent optional pointer target in out common equivalence data begin_provider &begin_provider end_provider begin_shell end_shell begin_template end_template subst assert touch soft_touch provide no_dep free irp_if irp_else irp_endif irp_write irp_read",built_in:"alog alog10 amax0 amax1 amin0 amin1 amod cabs ccos cexp clog csin csqrt dabs dacos dasin datan datan2 dcos dcosh ddim dexp dint dlog\
 dlog10 dmax1 dmin1 dmod dnint dsign dsin dsinh dsqrt dtan dtanh float iabs idim idint idnint ifix isign max0 max1 min0 min1 sngl algama cdabs cdcos cdexp cdlog cdsin cdsqrt cqabs cqcos cqexp cqlog cqsin cqsqrt dcmplx dconjg derf derfc dfloat dgamma dimag dlgama iqint qabs qacos qasin qatan qatan2 qcmplx qconjg qcos qcosh qdim qerf qerfc qexp qgamma qimag qlgama qlog qlog10 qmax1 qmin1 qmod qnint qsign qsin qsinh qsqrt qtan qtanh abs acos aimag aint anint asin atan atan2 char cmplx conjg cos cos\
h exp ichar index int log log10 max min nint sign sin sinh sqrt tan tanh print write dim lge lgt lle llt mod nullify allocate deallocate adjustl adjustr all allocated any associated bit_size btest ceiling count cshift date_and_time digits dot_product eoshift epsilon exponent floor fraction huge iand ibclr ibits ibset ieor ior ishft ishftc lbound len_trim matmul maxexponent maxloc maxval merge minexponent minloc minval modulo mvbits nearest pack present product radix random_number random_seed ran\
ge repeat reshape rrspacing scale scan selected_int_kind selected_real_kind set_exponent shape size spacing spread sum system_clock tiny transpose trim ubound unpack verify achar iachar transfer dble entry dprod cpu_time command_argument_count get_command get_command_argument get_environment_variable is_iostat_end ieee_arithmetic ieee_support_underflow_control ieee_get_underflow_mode ieee_set_underflow_mode is_iostat_eor move_alloc new_line selected_char_kind same_type_as extends_type_of acosh a\
sinh atanh bessel_j0 bessel_j1 bessel_jn bessel_y0 bessel_y1 bessel_yn erf erfc erfc_scaled gamma log_gamma hypot norm2 atomic_define atomic_ref execute_command_line leadz trailz storage_size merge_bits bge bgt ble blt dshiftl dshiftr findloc iall iany iparity image_index lcobound ucobound maskl maskr num_images parity popcnt poppar shifta shiftl shiftr this_image IRP_ALIGN irp_here"},illegal:/\/\*/,contains:[hljs.inherit(hljs.APOS_STRING_MODE,{className:"string",relevance:0}),hljs.inherit(hljs.
QUOTE_STRING_MODE,{className:"string",relevance:0}),{className:"function",beginKeywords:"subroutine function program",illegal:"[${=\\n]",contains:[hljs.UNDERSCORE_TITLE_MODE,PARAMS]},hljs.COMMENT("!","$",{relevance:0}),hljs.COMMENT("begin_doc","end_doc",{relevance:10}),NUMBER]}}return irpf90_1=irpf902,irpf90_1}var isbl_1,hasRequiredIsbl;function requireIsbl(){if(hasRequiredIsbl)return isbl_1;hasRequiredIsbl=1;function isbl2(hljs){const UNDERSCORE_IDENT_RE="[A-Za-zА-Яа-яёЁ_!][A-Za-zА-Яа-яёЁ_0-9]*",
FUNCTION_NAME_IDENT_RE="[A-Za-zА-Яа-яёЁ_][A-Za-zА-Яа-яёЁ_0-9]*",KEYWORD="and и else иначе endexcept endfinally endforeach конецвсе endif конецесли endwhile конецпока except exitfor finally foreach все if если in в not не or или try while пока ",CONSTANTS="SYSRES_CONST_ACCES_RIGHT_TYPE_EDIT SYSRES_CONST_ACCES_RIGHT_TYPE_FULL SYSRES_CONST_ACCES_RIGHT_TYPE_VIEW SYSRES_CONST_ACCESS_MODE_REQUISITE_CODE SYSRES_CONST_ACCESS_NO_ACCESS_VIEW SYS\
RES_CONST_ACCESS_NO_ACCESS_VIEW_CODE SYSRES_CONST_ACCESS_RIGHTS_ADD_REQUISITE_CODE SYSRES_CONST_ACCESS_RIGHTS_ADD_REQUISITE_YES_CODE SYSRES_CONST_ACCESS_RIGHTS_CHANGE_REQUISITE_CODE SYSRES_CONST_ACCESS_RIGHTS_CHANGE_REQUISITE_YES_CODE SYSRES_CONST_ACCESS_RIGHTS_DELETE_REQUISITE_CODE SYSRES_CONST_ACCESS_RIGHTS_DELETE_REQUISITE_YES_CODE SYSRES_CONST_ACCESS_RIGHTS_EXECUTE_REQUISITE_CODE SYSRES_CONST_ACCESS_RIGHTS_EXECUTE_REQUISITE_YES_CODE SYSRES_CONST_ACCESS_RIGHTS_NO_ACCESS_REQUISITE_CODE SYSRES_\
CONST_ACCESS_RIGHTS_NO_ACCESS_REQUISITE_YES_CODE SYSRES_CONST_ACCESS_RIGHTS_RATIFY_REQUISITE_CODE SYSRES_CONST_ACCESS_RIGHTS_RATIFY_REQUISITE_YES_CODE SYSRES_CONST_ACCESS_RIGHTS_REQUISITE_CODE SYSRES_CONST_ACCESS_RIGHTS_VIEW SYSRES_CONST_ACCESS_RIGHTS_VIEW_CODE SYSRES_CONST_ACCESS_RIGHTS_VIEW_REQUISITE_CODE SYSRES_CONST_ACCESS_RIGHTS_VIEW_REQUISITE_YES_CODE SYSRES_CONST_ACCESS_TYPE_CHANGE SYSRES_CONST_ACCESS_TYPE_CHANGE_CODE SYSRES_CONST_ACCESS_TYPE_EXISTS SYSRES_CONST_ACCESS_TYPE_EXISTS_CODE SY\
SRES_CONST_ACCESS_TYPE_FULL SYSRES_CONST_ACCESS_TYPE_FULL_CODE SYSRES_CONST_ACCESS_TYPE_VIEW SYSRES_CONST_ACCESS_TYPE_VIEW_CODE SYSRES_CONST_ACTION_TYPE_ABORT SYSRES_CONST_ACTION_TYPE_ACCEPT SYSRES_CONST_ACTION_TYPE_ACCESS_RIGHTS SYSRES_CONST_ACTION_TYPE_ADD_ATTACHMENT SYSRES_CONST_ACTION_TYPE_CHANGE_CARD SYSRES_CONST_ACTION_TYPE_CHANGE_KIND SYSRES_CONST_ACTION_TYPE_CHANGE_STORAGE SYSRES_CONST_ACTION_TYPE_CONTINUE SYSRES_CONST_ACTION_TYPE_COPY SYSRES_CONST_ACTION_TYPE_CREATE SYSRES_CONST_ACTION_\
TYPE_CREATE_VERSION SYSRES_CONST_ACTION_TYPE_DELETE SYSRES_CONST_ACTION_TYPE_DELETE_ATTACHMENT SYSRES_CONST_ACTION_TYPE_DELETE_VERSION SYSRES_CONST_ACTION_TYPE_DISABLE_DELEGATE_ACCESS_RIGHTS SYSRES_CONST_ACTION_TYPE_ENABLE_DELEGATE_ACCESS_RIGHTS SYSRES_CONST_ACTION_TYPE_ENCRYPTION_BY_CERTIFICATE SYSRES_CONST_ACTION_TYPE_ENCRYPTION_BY_CERTIFICATE_AND_PASSWORD SYSRES_CONST_ACTION_TYPE_ENCRYPTION_BY_PASSWORD SYSRES_CONST_ACTION_TYPE_EXPORT_WITH_LOCK SYSRES_CONST_ACTION_TYPE_EXPORT_WITHOUT_LOCK SYSR\
ES_CONST_ACTION_TYPE_IMPORT_WITH_UNLOCK SYSRES_CONST_ACTION_TYPE_IMPORT_WITHOUT_UNLOCK SYSRES_CONST_ACTION_TYPE_LIFE_CYCLE_STAGE SYSRES_CONST_ACTION_TYPE_LOCK SYSRES_CONST_ACTION_TYPE_LOCK_FOR_SERVER SYSRES_CONST_ACTION_TYPE_LOCK_MODIFY SYSRES_CONST_ACTION_TYPE_MARK_AS_READED SYSRES_CONST_ACTION_TYPE_MARK_AS_UNREADED SYSRES_CONST_ACTION_TYPE_MODIFY SYSRES_CONST_ACTION_TYPE_MODIFY_CARD SYSRES_CONST_ACTION_TYPE_MOVE_TO_ARCHIVE SYSRES_CONST_ACTION_TYPE_OFF_ENCRYPTION SYSRES_CONST_ACTION_TYPE_PASSWO\
RD_CHANGE SYSRES_CONST_ACTION_TYPE_PERFORM SYSRES_CONST_ACTION_TYPE_RECOVER_FROM_LOCAL_COPY SYSRES_CONST_ACTION_TYPE_RESTART SYSRES_CONST_ACTION_TYPE_RESTORE_FROM_ARCHIVE SYSRES_CONST_ACTION_TYPE_REVISION SYSRES_CONST_ACTION_TYPE_SEND_BY_MAIL SYSRES_CONST_ACTION_TYPE_SIGN SYSRES_CONST_ACTION_TYPE_START SYSRES_CONST_ACTION_TYPE_UNLOCK SYSRES_CONST_ACTION_TYPE_UNLOCK_FROM_SERVER SYSRES_CONST_ACTION_TYPE_VERSION_STATE SYSRES_CONST_ACTION_TYPE_VERSION_VISIBILITY SYSRES_CONST_ACTION_TYPE_VIEW SYSRES_\
CONST_ACTION_TYPE_VIEW_SHADOW_COPY SYSRES_CONST_ACTION_TYPE_WORKFLOW_DESCRIPTION_MODIFY SYSRES_CONST_ACTION_TYPE_WRITE_HISTORY SYSRES_CONST_ACTIVE_VERSION_STATE_PICK_VALUE SYSRES_CONST_ADD_REFERENCE_MODE_NAME SYSRES_CONST_ADDITION_REQUISITE_CODE SYSRES_CONST_ADDITIONAL_PARAMS_REQUISITE_CODE SYSRES_CONST_ADITIONAL_JOB_END_DATE_REQUISITE_NAME SYSRES_CONST_ADITIONAL_JOB_READ_REQUISITE_NAME SYSRES_CONST_ADITIONAL_JOB_START_DATE_REQUISITE_NAME SYSRES_CONST_ADITIONAL_JOB_STATE_REQUISITE_NAME SYSRES_CO\
NST_ADMINISTRATION_HISTORY_ADDING_USER_TO_GROUP_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_ADDING_USER_TO_GROUP_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_CREATION_COMP_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_CREATION_COMP_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_CREATION_GROUP_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_CREATION_GROUP_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_CREATION_USER_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_CREATION_USER_ACTION_CODE SYSRES_CONST_ADMI\
NISTRATION_HISTORY_DATABASE_USER_CREATION SYSRES_CONST_ADMINISTRATION_HISTORY_DATABASE_USER_CREATION_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_DATABASE_USER_DELETION SYSRES_CONST_ADMINISTRATION_HISTORY_DATABASE_USER_DELETION_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_DELETION_COMP_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_DELETION_COMP_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_DELETION_GROUP_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_DELETION_GROUP_ACTION_CODE SYSRES_CONST_ADMINISTRATION\
_HISTORY_DELETION_USER_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_DELETION_USER_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_DELETION_USER_FROM_GROUP_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_DELETION_USER_FROM_GROUP_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_GRANTING_FILTERER_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_GRANTING_FILTERER_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_GRANTING_FILTERER_RESTRICTION_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_GRANTING_FILTERER_RESTRICTION_A\
CTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_GRANTING_PRIVILEGE_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_GRANTING_PRIVILEGE_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_GRANTING_RIGHTS_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_GRANTING_RIGHTS_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_IS_MAIN_SERVER_CHANGED_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_IS_MAIN_SERVER_CHANGED_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_IS_PUBLIC_CHANGED_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_IS_\
PUBLIC_CHANGED_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_REMOVING_FILTERER_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_REMOVING_FILTERER_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_REMOVING_FILTERER_RESTRICTION_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_REMOVING_FILTERER_RESTRICTION_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_REMOVING_PRIVILEGE_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_REMOVING_PRIVILEGE_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_REMOVING_RIGHTS_ACTION SYSRES_\
CONST_ADMINISTRATION_HISTORY_REMOVING_RIGHTS_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_SERVER_LOGIN_CREATION SYSRES_CONST_ADMINISTRATION_HISTORY_SERVER_LOGIN_CREATION_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_SERVER_LOGIN_DELETION SYSRES_CONST_ADMINISTRATION_HISTORY_SERVER_LOGIN_DELETION_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_CATEGORY_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_CATEGORY_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_COMP_TITLE_ACTION SYSRES_\
CONST_ADMINISTRATION_HISTORY_UPDATING_COMP_TITLE_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_FULL_NAME_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_FULL_NAME_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_GROUP_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_GROUP_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_PARENT_GROUP_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_PARENT_GROUP_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_USER_AUTH\
_TYPE_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_USER_AUTH_TYPE_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_USER_LOGIN_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_USER_LOGIN_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_USER_STATUS_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_USER_STATUS_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_USER_PASSWORD_CHANGE SYSRES_CONST_ADMINISTRATION_HISTORY_USER_PASSWORD_CHANGE_ACTION SYSRES_CONST_ALL_ACCEPT_CONDIT\
ION_RUS SYSRES_CONST_ALL_USERS_GROUP SYSRES_CONST_ALL_USERS_GROUP_NAME SYSRES_CONST_ALL_USERS_SERVER_GROUP_NAME SYSRES_CONST_ALLOWED_ACCESS_TYPE_CODE SYSRES_CONST_ALLOWED_ACCESS_TYPE_NAME SYSRES_CONST_APP_VIEWER_TYPE_REQUISITE_CODE SYSRES_CONST_APPROVING_SIGNATURE_NAME SYSRES_CONST_APPROVING_SIGNATURE_REQUISITE_CODE SYSRES_CONST_ASSISTANT_SUBSTITUE_TYPE SYSRES_CONST_ASSISTANT_SUBSTITUE_TYPE_CODE SYSRES_CONST_ATTACH_TYPE_COMPONENT_TOKEN SYSRES_CONST_ATTACH_TYPE_DOC SYSRES_CONST_ATTACH_TYPE_EDOC S\
YSRES_CONST_ATTACH_TYPE_FOLDER SYSRES_CONST_ATTACH_TYPE_JOB SYSRES_CONST_ATTACH_TYPE_REFERENCE SYSRES_CONST_ATTACH_TYPE_TASK SYSRES_CONST_AUTH_ENCODED_PASSWORD SYSRES_CONST_AUTH_ENCODED_PASSWORD_CODE SYSRES_CONST_AUTH_NOVELL SYSRES_CONST_AUTH_PASSWORD SYSRES_CONST_AUTH_PASSWORD_CODE SYSRES_CONST_AUTH_WINDOWS SYSRES_CONST_AUTHENTICATING_SIGNATURE_NAME SYSRES_CONST_AUTHENTICATING_SIGNATURE_REQUISITE_CODE SYSRES_CONST_AUTO_ENUM_METHOD_FLAG SYSRES_CONST_AUTO_NUMERATION_CODE SYSRES_CONST_AUTO_STRONG_\
ENUM_METHOD_FLAG SYSRES_CONST_AUTOTEXT_NAME_REQUISITE_CODE SYSRES_CONST_AUTOTEXT_TEXT_REQUISITE_CODE SYSRES_CONST_AUTOTEXT_USAGE_ALL SYSRES_CONST_AUTOTEXT_USAGE_ALL_CODE SYSRES_CONST_AUTOTEXT_USAGE_SIGN SYSRES_CONST_AUTOTEXT_USAGE_SIGN_CODE SYSRES_CONST_AUTOTEXT_USAGE_WORK SYSRES_CONST_AUTOTEXT_USAGE_WORK_CODE SYSRES_CONST_AUTOTEXT_USE_ANYWHERE_CODE SYSRES_CONST_AUTOTEXT_USE_ON_SIGNING_CODE SYSRES_CONST_AUTOTEXT_USE_ON_WORK_CODE SYSRES_CONST_BEGIN_DATE_REQUISITE_CODE SYSRES_CONST_BLACK_LIFE_CYCL\
E_STAGE_FONT_COLOR SYSRES_CONST_BLUE_LIFE_CYCLE_STAGE_FONT_COLOR SYSRES_CONST_BTN_PART SYSRES_CONST_CALCULATED_ROLE_TYPE_CODE SYSRES_CONST_CALL_TYPE_VARIABLE_BUTTON_VALUE SYSRES_CONST_CALL_TYPE_VARIABLE_PROGRAM_VALUE SYSRES_CONST_CANCEL_MESSAGE_FUNCTION_RESULT SYSRES_CONST_CARD_PART SYSRES_CONST_CARD_REFERENCE_MODE_NAME SYSRES_CONST_CERTIFICATE_TYPE_REQUISITE_ENCRYPT_VALUE SYSRES_CONST_CERTIFICATE_TYPE_REQUISITE_SIGN_AND_ENCRYPT_VALUE SYSRES_CONST_CERTIFICATE_TYPE_REQUISITE_SIGN_VALUE SYSRES_CON\
ST_CHECK_PARAM_VALUE_DATE_PARAM_TYPE SYSRES_CONST_CHECK_PARAM_VALUE_FLOAT_PARAM_TYPE SYSRES_CONST_CHECK_PARAM_VALUE_INTEGER_PARAM_TYPE SYSRES_CONST_CHECK_PARAM_VALUE_PICK_PARAM_TYPE SYSRES_CONST_CHECK_PARAM_VALUE_REEFRENCE_PARAM_TYPE SYSRES_CONST_CLOSED_RECORD_FLAG_VALUE_FEMININE SYSRES_CONST_CLOSED_RECORD_FLAG_VALUE_MASCULINE SYSRES_CONST_CODE_COMPONENT_TYPE_ADMIN SYSRES_CONST_CODE_COMPONENT_TYPE_DEVELOPER SYSRES_CONST_CODE_COMPONENT_TYPE_DOCS SYSRES_CONST_CODE_COMPONENT_TYPE_EDOC_CARDS SYSRES_\
CONST_CODE_COMPONENT_TYPE_EXTERNAL_EXECUTABLE SYSRES_CONST_CODE_COMPONENT_TYPE_OTHER SYSRES_CONST_CODE_COMPONENT_TYPE_REFERENCE SYSRES_CONST_CODE_COMPONENT_TYPE_REPORT SYSRES_CONST_CODE_COMPONENT_TYPE_SCRIPT SYSRES_CONST_CODE_COMPONENT_TYPE_URL SYSRES_CONST_CODE_REQUISITE_ACCESS SYSRES_CONST_CODE_REQUISITE_CODE SYSRES_CONST_CODE_REQUISITE_COMPONENT SYSRES_CONST_CODE_REQUISITE_DESCRIPTION SYSRES_CONST_CODE_REQUISITE_EXCLUDE_COMPONENT SYSRES_CONST_CODE_REQUISITE_RECORD SYSRES_CONST_COMMENT_REQ_COD\
E SYSRES_CONST_COMMON_SETTINGS_REQUISITE_CODE SYSRES_CONST_COMP_CODE_GRD SYSRES_CONST_COMPONENT_GROUP_TYPE_REQUISITE_CODE SYSRES_CONST_COMPONENT_TYPE_ADMIN_COMPONENTS SYSRES_CONST_COMPONENT_TYPE_DEVELOPER_COMPONENTS SYSRES_CONST_COMPONENT_TYPE_DOCS SYSRES_CONST_COMPONENT_TYPE_EDOC_CARDS SYSRES_CONST_COMPONENT_TYPE_EDOCS SYSRES_CONST_COMPONENT_TYPE_EXTERNAL_EXECUTABLE SYSRES_CONST_COMPONENT_TYPE_OTHER SYSRES_CONST_COMPONENT_TYPE_REFERENCE_TYPES SYSRES_CONST_COMPONENT_TYPE_REFERENCES SYSRES_CONST_\
COMPONENT_TYPE_REPORTS SYSRES_CONST_COMPONENT_TYPE_SCRIPTS SYSRES_CONST_COMPONENT_TYPE_URL SYSRES_CONST_COMPONENTS_REMOTE_SERVERS_VIEW_CODE SYSRES_CONST_CONDITION_BLOCK_DESCRIPTION SYSRES_CONST_CONST_FIRM_STATUS_COMMON SYSRES_CONST_CONST_FIRM_STATUS_INDIVIDUAL SYSRES_CONST_CONST_NEGATIVE_VALUE SYSRES_CONST_CONST_POSITIVE_VALUE SYSRES_CONST_CONST_SERVER_STATUS_DONT_REPLICATE SYSRES_CONST_CONST_SERVER_STATUS_REPLICATE SYSRES_CONST_CONTENTS_REQUISITE_CODE SYSRES_CONST_DATA_TYPE_BOOLEAN SYSRES_CONST\
_DATA_TYPE_DATE SYSRES_CONST_DATA_TYPE_FLOAT SYSRES_CONST_DATA_TYPE_INTEGER SYSRES_CONST_DATA_TYPE_PICK SYSRES_CONST_DATA_TYPE_REFERENCE SYSRES_CONST_DATA_TYPE_STRING SYSRES_CONST_DATA_TYPE_TEXT SYSRES_CONST_DATA_TYPE_VARIANT SYSRES_CONST_DATE_CLOSE_REQ_CODE SYSRES_CONST_DATE_FORMAT_DATE_ONLY_CHAR SYSRES_CONST_DATE_OPEN_REQ_CODE SYSRES_CONST_DATE_REQUISITE SYSRES_CONST_DATE_REQUISITE_CODE SYSRES_CONST_DATE_REQUISITE_NAME SYSRES_CONST_DATE_REQUISITE_TYPE SYSRES_CONST_DATE_TYPE_CHAR SYSRES_CONST_D\
ATETIME_FORMAT_VALUE SYSRES_CONST_DEA_ACCESS_RIGHTS_ACTION_CODE SYSRES_CONST_DESCRIPTION_LOCALIZE_ID_REQUISITE_CODE SYSRES_CONST_DESCRIPTION_REQUISITE_CODE SYSRES_CONST_DET1_PART SYSRES_CONST_DET2_PART SYSRES_CONST_DET3_PART SYSRES_CONST_DET4_PART SYSRES_CONST_DET5_PART SYSRES_CONST_DET6_PART SYSRES_CONST_DETAIL_DATASET_KEY_REQUISITE_CODE SYSRES_CONST_DETAIL_PICK_REQUISITE_CODE SYSRES_CONST_DETAIL_REQ_CODE SYSRES_CONST_DO_NOT_USE_ACCESS_TYPE_CODE SYSRES_CONST_DO_NOT_USE_ACCESS_TYPE_NAME SYSRES_C\
ONST_DO_NOT_USE_ON_VIEW_ACCESS_TYPE_CODE SYSRES_CONST_DO_NOT_USE_ON_VIEW_ACCESS_TYPE_NAME SYSRES_CONST_DOCUMENT_STORAGES_CODE SYSRES_CONST_DOCUMENT_TEMPLATES_TYPE_NAME SYSRES_CONST_DOUBLE_REQUISITE_CODE SYSRES_CONST_EDITOR_CLOSE_FILE_OBSERV_TYPE_CODE SYSRES_CONST_EDITOR_CLOSE_PROCESS_OBSERV_TYPE_CODE SYSRES_CONST_EDITOR_TYPE_REQUISITE_CODE SYSRES_CONST_EDITORS_APPLICATION_NAME_REQUISITE_CODE SYSRES_CONST_EDITORS_CREATE_SEVERAL_PROCESSES_REQUISITE_CODE SYSRES_CONST_EDITORS_EXTENSION_REQUISITE_COD\
E SYSRES_CONST_EDITORS_OBSERVER_BY_PROCESS_TYPE SYSRES_CONST_EDITORS_REFERENCE_CODE SYSRES_CONST_EDITORS_REPLACE_SPEC_CHARS_REQUISITE_CODE SYSRES_CONST_EDITORS_USE_PLUGINS_REQUISITE_CODE SYSRES_CONST_EDITORS_VIEW_DOCUMENT_OPENED_TO_EDIT_CODE SYSRES_CONST_EDOC_CARD_TYPE_REQUISITE_CODE SYSRES_CONST_EDOC_CARD_TYPES_LINK_REQUISITE_CODE SYSRES_CONST_EDOC_CERTIFICATE_AND_PASSWORD_ENCODE_CODE SYSRES_CONST_EDOC_CERTIFICATE_ENCODE_CODE SYSRES_CONST_EDOC_DATE_REQUISITE_CODE SYSRES_CONST_EDOC_KIND_REFERENC\
E_CODE SYSRES_CONST_EDOC_KINDS_BY_TEMPLATE_ACTION_CODE SYSRES_CONST_EDOC_MANAGE_ACCESS_CODE SYSRES_CONST_EDOC_NONE_ENCODE_CODE SYSRES_CONST_EDOC_NUMBER_REQUISITE_CODE SYSRES_CONST_EDOC_PASSWORD_ENCODE_CODE SYSRES_CONST_EDOC_READONLY_ACCESS_CODE SYSRES_CONST_EDOC_SHELL_LIFE_TYPE_VIEW_VALUE SYSRES_CONST_EDOC_SIZE_RESTRICTION_PRIORITY_REQUISITE_CODE SYSRES_CONST_EDOC_STORAGE_CHECK_ACCESS_RIGHTS_REQUISITE_CODE SYSRES_CONST_EDOC_STORAGE_COMPUTER_NAME_REQUISITE_CODE SYSRES_CONST_EDOC_STORAGE_DATABASE_\
NAME_REQUISITE_CODE SYSRES_CONST_EDOC_STORAGE_EDIT_IN_STORAGE_REQUISITE_CODE SYSRES_CONST_EDOC_STORAGE_LOCAL_PATH_REQUISITE_CODE SYSRES_CONST_EDOC_STORAGE_SHARED_SOURCE_NAME_REQUISITE_CODE SYSRES_CONST_EDOC_TEMPLATE_REQUISITE_CODE SYSRES_CONST_EDOC_TYPES_REFERENCE_CODE SYSRES_CONST_EDOC_VERSION_ACTIVE_STAGE_CODE SYSRES_CONST_EDOC_VERSION_DESIGN_STAGE_CODE SYSRES_CONST_EDOC_VERSION_OBSOLETE_STAGE_CODE SYSRES_CONST_EDOC_WRITE_ACCES_CODE SYSRES_CONST_EDOCUMENT_CARD_REQUISITES_REFERENCE_CODE_SELECTE\
D_REQUISITE SYSRES_CONST_ENCODE_CERTIFICATE_TYPE_CODE SYSRES_CONST_END_DATE_REQUISITE_CODE SYSRES_CONST_ENUMERATION_TYPE_REQUISITE_CODE SYSRES_CONST_EXECUTE_ACCESS_RIGHTS_TYPE_CODE SYSRES_CONST_EXECUTIVE_FILE_STORAGE_TYPE SYSRES_CONST_EXIST_CONST SYSRES_CONST_EXIST_VALUE SYSRES_CONST_EXPORT_LOCK_TYPE_ASK SYSRES_CONST_EXPORT_LOCK_TYPE_WITH_LOCK SYSRES_CONST_EXPORT_LOCK_TYPE_WITHOUT_LOCK SYSRES_CONST_EXPORT_VERSION_TYPE_ASK SYSRES_CONST_EXPORT_VERSION_TYPE_LAST SYSRES_CONST_EXPORT_VERSION_TYPE_LAS\
T_ACTIVE SYSRES_CONST_EXTENSION_REQUISITE_CODE SYSRES_CONST_FILTER_NAME_REQUISITE_CODE SYSRES_CONST_FILTER_REQUISITE_CODE SYSRES_CONST_FILTER_TYPE_COMMON_CODE SYSRES_CONST_FILTER_TYPE_COMMON_NAME SYSRES_CONST_FILTER_TYPE_USER_CODE SYSRES_CONST_FILTER_TYPE_USER_NAME SYSRES_CONST_FILTER_VALUE_REQUISITE_NAME SYSRES_CONST_FLOAT_NUMBER_FORMAT_CHAR SYSRES_CONST_FLOAT_REQUISITE_TYPE SYSRES_CONST_FOLDER_AUTHOR_VALUE SYSRES_CONST_FOLDER_KIND_ANY_OBJECTS SYSRES_CONST_FOLDER_KIND_COMPONENTS SYSRES_CONST_FO\
LDER_KIND_EDOCS SYSRES_CONST_FOLDER_KIND_JOBS SYSRES_CONST_FOLDER_KIND_TASKS SYSRES_CONST_FOLDER_TYPE_COMMON SYSRES_CONST_FOLDER_TYPE_COMPONENT SYSRES_CONST_FOLDER_TYPE_FAVORITES SYSRES_CONST_FOLDER_TYPE_INBOX SYSRES_CONST_FOLDER_TYPE_OUTBOX SYSRES_CONST_FOLDER_TYPE_QUICK_LAUNCH SYSRES_CONST_FOLDER_TYPE_SEARCH SYSRES_CONST_FOLDER_TYPE_SHORTCUTS SYSRES_CONST_FOLDER_TYPE_USER SYSRES_CONST_FROM_DICTIONARY_ENUM_METHOD_FLAG SYSRES_CONST_FULL_SUBSTITUTE_TYPE SYSRES_CONST_FULL_SUBSTITUTE_TYPE_CODE SYSR\
ES_CONST_FUNCTION_CANCEL_RESULT SYSRES_CONST_FUNCTION_CATEGORY_SYSTEM SYSRES_CONST_FUNCTION_CATEGORY_USER SYSRES_CONST_FUNCTION_FAILURE_RESULT SYSRES_CONST_FUNCTION_SAVE_RESULT SYSRES_CONST_GENERATED_REQUISITE SYSRES_CONST_GREEN_LIFE_CYCLE_STAGE_FONT_COLOR SYSRES_CONST_GROUP_ACCOUNT_TYPE_VALUE_CODE SYSRES_CONST_GROUP_CATEGORY_NORMAL_CODE SYSRES_CONST_GROUP_CATEGORY_NORMAL_NAME SYSRES_CONST_GROUP_CATEGORY_SERVICE_CODE SYSRES_CONST_GROUP_CATEGORY_SERVICE_NAME SYSRES_CONST_GROUP_COMMON_CATEGORY_FIE\
LD_VALUE SYSRES_CONST_GROUP_FULL_NAME_REQUISITE_CODE SYSRES_CONST_GROUP_NAME_REQUISITE_CODE SYSRES_CONST_GROUP_RIGHTS_T_REQUISITE_CODE SYSRES_CONST_GROUP_SERVER_CODES_REQUISITE_CODE SYSRES_CONST_GROUP_SERVER_NAME_REQUISITE_CODE SYSRES_CONST_GROUP_SERVICE_CATEGORY_FIELD_VALUE SYSRES_CONST_GROUP_USER_REQUISITE_CODE SYSRES_CONST_GROUPS_REFERENCE_CODE SYSRES_CONST_GROUPS_REQUISITE_CODE SYSRES_CONST_HIDDEN_MODE_NAME SYSRES_CONST_HIGH_LVL_REQUISITE_CODE SYSRES_CONST_HISTORY_ACTION_CREATE_CODE SYSRES_C\
ONST_HISTORY_ACTION_DELETE_CODE SYSRES_CONST_HISTORY_ACTION_EDIT_CODE SYSRES_CONST_HOUR_CHAR SYSRES_CONST_ID_REQUISITE_CODE SYSRES_CONST_IDSPS_REQUISITE_CODE SYSRES_CONST_IMAGE_MODE_COLOR SYSRES_CONST_IMAGE_MODE_GREYSCALE SYSRES_CONST_IMAGE_MODE_MONOCHROME SYSRES_CONST_IMPORTANCE_HIGH SYSRES_CONST_IMPORTANCE_LOW SYSRES_CONST_IMPORTANCE_NORMAL SYSRES_CONST_IN_DESIGN_VERSION_STATE_PICK_VALUE SYSRES_CONST_INCOMING_WORK_RULE_TYPE_CODE SYSRES_CONST_INT_REQUISITE SYSRES_CONST_INT_REQUISITE_TYPE SYSRES\
_CONST_INTEGER_NUMBER_FORMAT_CHAR SYSRES_CONST_INTEGER_TYPE_CHAR SYSRES_CONST_IS_GENERATED_REQUISITE_NEGATIVE_VALUE SYSRES_CONST_IS_PUBLIC_ROLE_REQUISITE_CODE SYSRES_CONST_IS_REMOTE_USER_NEGATIVE_VALUE SYSRES_CONST_IS_REMOTE_USER_POSITIVE_VALUE SYSRES_CONST_IS_STORED_REQUISITE_NEGATIVE_VALUE SYSRES_CONST_IS_STORED_REQUISITE_STORED_VALUE SYSRES_CONST_ITALIC_LIFE_CYCLE_STAGE_DRAW_STYLE SYSRES_CONST_JOB_BLOCK_DESCRIPTION SYSRES_CONST_JOB_KIND_CONTROL_JOB SYSRES_CONST_JOB_KIND_JOB SYSRES_CONST_JOB_K\
IND_NOTICE SYSRES_CONST_JOB_STATE_ABORTED SYSRES_CONST_JOB_STATE_COMPLETE SYSRES_CONST_JOB_STATE_WORKING SYSRES_CONST_KIND_REQUISITE_CODE SYSRES_CONST_KIND_REQUISITE_NAME SYSRES_CONST_KINDS_CREATE_SHADOW_COPIES_REQUISITE_CODE SYSRES_CONST_KINDS_DEFAULT_EDOC_LIFE_STAGE_REQUISITE_CODE SYSRES_CONST_KINDS_EDOC_ALL_TEPLATES_ALLOWED_REQUISITE_CODE SYSRES_CONST_KINDS_EDOC_ALLOW_LIFE_CYCLE_STAGE_CHANGING_REQUISITE_CODE SYSRES_CONST_KINDS_EDOC_ALLOW_MULTIPLE_ACTIVE_VERSIONS_REQUISITE_CODE SYSRES_CONST_KI\
NDS_EDOC_SHARE_ACCES_RIGHTS_BY_DEFAULT_CODE SYSRES_CONST_KINDS_EDOC_TEMPLATE_REQUISITE_CODE SYSRES_CONST_KINDS_EDOC_TYPE_REQUISITE_CODE SYSRES_CONST_KINDS_SIGNERS_REQUISITES_CODE SYSRES_CONST_KOD_INPUT_TYPE SYSRES_CONST_LAST_UPDATE_DATE_REQUISITE_CODE SYSRES_CONST_LIFE_CYCLE_START_STAGE_REQUISITE_CODE SYSRES_CONST_LILAC_LIFE_CYCLE_STAGE_FONT_COLOR SYSRES_CONST_LINK_OBJECT_KIND_COMPONENT SYSRES_CONST_LINK_OBJECT_KIND_DOCUMENT SYSRES_CONST_LINK_OBJECT_KIND_EDOC SYSRES_CONST_LINK_OBJECT_KIND_FOLDER\
 SYSRES_CONST_LINK_OBJECT_KIND_JOB SYSRES_CONST_LINK_OBJECT_KIND_REFERENCE SYSRES_CONST_LINK_OBJECT_KIND_TASK SYSRES_CONST_LINK_REF_TYPE_REQUISITE_CODE SYSRES_CONST_LIST_REFERENCE_MODE_NAME SYSRES_CONST_LOCALIZATION_DICTIONARY_MAIN_VIEW_CODE SYSRES_CONST_MAIN_VIEW_CODE SYSRES_CONST_MANUAL_ENUM_METHOD_FLAG SYSRES_CONST_MASTER_COMP_TYPE_REQUISITE_CODE SYSRES_CONST_MASTER_TABLE_REC_ID_REQUISITE_CODE SYSRES_CONST_MAXIMIZED_MODE_NAME SYSRES_CONST_ME_VALUE SYSRES_CONST_MESSAGE_ATTENTION_CAPTION SYSRES\
_CONST_MESSAGE_CONFIRMATION_CAPTION SYSRES_CONST_MESSAGE_ERROR_CAPTION SYSRES_CONST_MESSAGE_INFORMATION_CAPTION SYSRES_CONST_MINIMIZED_MODE_NAME SYSRES_CONST_MINUTE_CHAR SYSRES_CONST_MODULE_REQUISITE_CODE SYSRES_CONST_MONITORING_BLOCK_DESCRIPTION SYSRES_CONST_MONTH_FORMAT_VALUE SYSRES_CONST_NAME_LOCALIZE_ID_REQUISITE_CODE SYSRES_CONST_NAME_REQUISITE_CODE SYSRES_CONST_NAME_SINGULAR_REQUISITE_CODE SYSRES_CONST_NAMEAN_INPUT_TYPE SYSRES_CONST_NEGATIVE_PICK_VALUE SYSRES_CONST_NEGATIVE_VALUE SYSRES_CO\
NST_NO SYSRES_CONST_NO_PICK_VALUE SYSRES_CONST_NO_SIGNATURE_REQUISITE_CODE SYSRES_CONST_NO_VALUE SYSRES_CONST_NONE_ACCESS_RIGHTS_TYPE_CODE SYSRES_CONST_NONOPERATING_RECORD_FLAG_VALUE SYSRES_CONST_NONOPERATING_RECORD_FLAG_VALUE_MASCULINE SYSRES_CONST_NORMAL_ACCESS_RIGHTS_TYPE_CODE SYSRES_CONST_NORMAL_LIFE_CYCLE_STAGE_DRAW_STYLE SYSRES_CONST_NORMAL_MODE_NAME SYSRES_CONST_NOT_ALLOWED_ACCESS_TYPE_CODE SYSRES_CONST_NOT_ALLOWED_ACCESS_TYPE_NAME SYSRES_CONST_NOTE_REQUISITE_CODE SYSRES_CONST_NOTICE_BLOC\
K_DESCRIPTION SYSRES_CONST_NUM_REQUISITE SYSRES_CONST_NUM_STR_REQUISITE_CODE SYSRES_CONST_NUMERATION_AUTO_NOT_STRONG SYSRES_CONST_NUMERATION_AUTO_STRONG SYSRES_CONST_NUMERATION_FROM_DICTONARY SYSRES_CONST_NUMERATION_MANUAL SYSRES_CONST_NUMERIC_TYPE_CHAR SYSRES_CONST_NUMREQ_REQUISITE_CODE SYSRES_CONST_OBSOLETE_VERSION_STATE_PICK_VALUE SYSRES_CONST_OPERATING_RECORD_FLAG_VALUE SYSRES_CONST_OPERATING_RECORD_FLAG_VALUE_CODE SYSRES_CONST_OPERATING_RECORD_FLAG_VALUE_FEMININE SYSRES_CONST_OPERATING_RECO\
RD_FLAG_VALUE_MASCULINE SYSRES_CONST_OPTIONAL_FORM_COMP_REQCODE_PREFIX SYSRES_CONST_ORANGE_LIFE_CYCLE_STAGE_FONT_COLOR SYSRES_CONST_ORIGINALREF_REQUISITE_CODE SYSRES_CONST_OURFIRM_REF_CODE SYSRES_CONST_OURFIRM_REQUISITE_CODE SYSRES_CONST_OURFIRM_VAR SYSRES_CONST_OUTGOING_WORK_RULE_TYPE_CODE SYSRES_CONST_PICK_NEGATIVE_RESULT SYSRES_CONST_PICK_POSITIVE_RESULT SYSRES_CONST_PICK_REQUISITE SYSRES_CONST_PICK_REQUISITE_TYPE SYSRES_CONST_PICK_TYPE_CHAR SYSRES_CONST_PLAN_STATUS_REQUISITE_CODE SYSRES_CONS\
T_PLATFORM_VERSION_COMMENT SYSRES_CONST_PLUGINS_SETTINGS_DESCRIPTION_REQUISITE_CODE SYSRES_CONST_POSITIVE_PICK_VALUE SYSRES_CONST_POWER_TO_CREATE_ACTION_CODE SYSRES_CONST_POWER_TO_SIGN_ACTION_CODE SYSRES_CONST_PRIORITY_REQUISITE_CODE SYSRES_CONST_QUALIFIED_TASK_TYPE SYSRES_CONST_QUALIFIED_TASK_TYPE_CODE SYSRES_CONST_RECSTAT_REQUISITE_CODE SYSRES_CONST_RED_LIFE_CYCLE_STAGE_FONT_COLOR SYSRES_CONST_REF_ID_T_REF_TYPE_REQUISITE_CODE SYSRES_CONST_REF_REQUISITE SYSRES_CONST_REF_REQUISITE_TYPE SYSRES_CO\
NST_REF_REQUISITES_REFERENCE_CODE_SELECTED_REQUISITE SYSRES_CONST_REFERENCE_RECORD_HISTORY_CREATE_ACTION_CODE SYSRES_CONST_REFERENCE_RECORD_HISTORY_DELETE_ACTION_CODE SYSRES_CONST_REFERENCE_RECORD_HISTORY_MODIFY_ACTION_CODE SYSRES_CONST_REFERENCE_TYPE_CHAR SYSRES_CONST_REFERENCE_TYPE_REQUISITE_NAME SYSRES_CONST_REFERENCES_ADD_PARAMS_REQUISITE_CODE SYSRES_CONST_REFERENCES_DISPLAY_REQUISITE_REQUISITE_CODE SYSRES_CONST_REMOTE_SERVER_STATUS_WORKING SYSRES_CONST_REMOTE_SERVER_TYPE_MAIN SYSRES_CONST_R\
EMOTE_SERVER_TYPE_SECONDARY SYSRES_CONST_REMOTE_USER_FLAG_VALUE_CODE SYSRES_CONST_REPORT_APP_EDITOR_INTERNAL SYSRES_CONST_REPORT_BASE_REPORT_ID_REQUISITE_CODE SYSRES_CONST_REPORT_BASE_REPORT_REQUISITE_CODE SYSRES_CONST_REPORT_SCRIPT_REQUISITE_CODE SYSRES_CONST_REPORT_TEMPLATE_REQUISITE_CODE SYSRES_CONST_REPORT_VIEWER_CODE_REQUISITE_CODE SYSRES_CONST_REQ_ALLOW_COMPONENT_DEFAULT_VALUE SYSRES_CONST_REQ_ALLOW_RECORD_DEFAULT_VALUE SYSRES_CONST_REQ_ALLOW_SERVER_COMPONENT_DEFAULT_VALUE SYSRES_CONST_REQ\
_MODE_AVAILABLE_CODE SYSRES_CONST_REQ_MODE_EDIT_CODE SYSRES_CONST_REQ_MODE_HIDDEN_CODE SYSRES_CONST_REQ_MODE_NOT_AVAILABLE_CODE SYSRES_CONST_REQ_MODE_VIEW_CODE SYSRES_CONST_REQ_NUMBER_REQUISITE_CODE SYSRES_CONST_REQ_SECTION_VALUE SYSRES_CONST_REQ_TYPE_VALUE SYSRES_CONST_REQUISITE_FORMAT_BY_UNIT SYSRES_CONST_REQUISITE_FORMAT_DATE_FULL SYSRES_CONST_REQUISITE_FORMAT_DATE_TIME SYSRES_CONST_REQUISITE_FORMAT_LEFT SYSRES_CONST_REQUISITE_FORMAT_RIGHT SYSRES_CONST_REQUISITE_FORMAT_WITHOUT_UNIT SYSRES_CON\
ST_REQUISITE_NUMBER_REQUISITE_CODE SYSRES_CONST_REQUISITE_SECTION_ACTIONS SYSRES_CONST_REQUISITE_SECTION_BUTTON SYSRES_CONST_REQUISITE_SECTION_BUTTONS SYSRES_CONST_REQUISITE_SECTION_CARD SYSRES_CONST_REQUISITE_SECTION_TABLE SYSRES_CONST_REQUISITE_SECTION_TABLE10 SYSRES_CONST_REQUISITE_SECTION_TABLE11 SYSRES_CONST_REQUISITE_SECTION_TABLE12 SYSRES_CONST_REQUISITE_SECTION_TABLE13 SYSRES_CONST_REQUISITE_SECTION_TABLE14 SYSRES_CONST_REQUISITE_SECTION_TABLE15 SYSRES_CONST_REQUISITE_SECTION_TABLE16 SYS\
RES_CONST_REQUISITE_SECTION_TABLE17 SYSRES_CONST_REQUISITE_SECTION_TABLE18 SYSRES_CONST_REQUISITE_SECTION_TABLE19 SYSRES_CONST_REQUISITE_SECTION_TABLE2 SYSRES_CONST_REQUISITE_SECTION_TABLE20 SYSRES_CONST_REQUISITE_SECTION_TABLE21 SYSRES_CONST_REQUISITE_SECTION_TABLE22 SYSRES_CONST_REQUISITE_SECTION_TABLE23 SYSRES_CONST_REQUISITE_SECTION_TABLE24 SYSRES_CONST_REQUISITE_SECTION_TABLE3 SYSRES_CONST_REQUISITE_SECTION_TABLE4 SYSRES_CONST_REQUISITE_SECTION_TABLE5 SYSRES_CONST_REQUISITE_SECTION_TABLE6 S\
YSRES_CONST_REQUISITE_SECTION_TABLE7 SYSRES_CONST_REQUISITE_SECTION_TABLE8 SYSRES_CONST_REQUISITE_SECTION_TABLE9 SYSRES_CONST_REQUISITES_PSEUDOREFERENCE_REQUISITE_NUMBER_REQUISITE_CODE SYSRES_CONST_RIGHT_ALIGNMENT_CODE SYSRES_CONST_ROLES_REFERENCE_CODE SYSRES_CONST_ROUTE_STEP_AFTER_RUS SYSRES_CONST_ROUTE_STEP_AND_CONDITION_RUS SYSRES_CONST_ROUTE_STEP_OR_CONDITION_RUS SYSRES_CONST_ROUTE_TYPE_COMPLEX SYSRES_CONST_ROUTE_TYPE_PARALLEL SYSRES_CONST_ROUTE_TYPE_SERIAL SYSRES_CONST_SBDATASETDESC_NEGATIV\
E_VALUE SYSRES_CONST_SBDATASETDESC_POSITIVE_VALUE SYSRES_CONST_SBVIEWSDESC_POSITIVE_VALUE SYSRES_CONST_SCRIPT_BLOCK_DESCRIPTION SYSRES_CONST_SEARCH_BY_TEXT_REQUISITE_CODE SYSRES_CONST_SEARCHES_COMPONENT_CONTENT SYSRES_CONST_SEARCHES_CRITERIA_ACTION_NAME SYSRES_CONST_SEARCHES_EDOC_CONTENT SYSRES_CONST_SEARCHES_FOLDER_CONTENT SYSRES_CONST_SEARCHES_JOB_CONTENT SYSRES_CONST_SEARCHES_REFERENCE_CODE SYSRES_CONST_SEARCHES_TASK_CONTENT SYSRES_CONST_SECOND_CHAR SYSRES_CONST_SECTION_REQUISITE_ACTIONS_VALU\
E SYSRES_CONST_SECTION_REQUISITE_CARD_VALUE SYSRES_CONST_SECTION_REQUISITE_CODE SYSRES_CONST_SECTION_REQUISITE_DETAIL_1_VALUE SYSRES_CONST_SECTION_REQUISITE_DETAIL_2_VALUE SYSRES_CONST_SECTION_REQUISITE_DETAIL_3_VALUE SYSRES_CONST_SECTION_REQUISITE_DETAIL_4_VALUE SYSRES_CONST_SECTION_REQUISITE_DETAIL_5_VALUE SYSRES_CONST_SECTION_REQUISITE_DETAIL_6_VALUE SYSRES_CONST_SELECT_REFERENCE_MODE_NAME SYSRES_CONST_SELECT_TYPE_SELECTABLE SYSRES_CONST_SELECT_TYPE_SELECTABLE_ONLY_CHILD SYSRES_CONST_SELECT_T\
YPE_SELECTABLE_WITH_CHILD SYSRES_CONST_SELECT_TYPE_UNSLECTABLE SYSRES_CONST_SERVER_TYPE_MAIN SYSRES_CONST_SERVICE_USER_CATEGORY_FIELD_VALUE SYSRES_CONST_SETTINGS_USER_REQUISITE_CODE SYSRES_CONST_SIGNATURE_AND_ENCODE_CERTIFICATE_TYPE_CODE SYSRES_CONST_SIGNATURE_CERTIFICATE_TYPE_CODE SYSRES_CONST_SINGULAR_TITLE_REQUISITE_CODE SYSRES_CONST_SQL_SERVER_AUTHENTIFICATION_FLAG_VALUE_CODE SYSRES_CONST_SQL_SERVER_ENCODE_AUTHENTIFICATION_FLAG_VALUE_CODE SYSRES_CONST_STANDART_ROUTE_REFERENCE_CODE SYSRES_CON\
ST_STANDART_ROUTE_REFERENCE_COMMENT_REQUISITE_CODE SYSRES_CONST_STANDART_ROUTES_GROUPS_REFERENCE_CODE SYSRES_CONST_STATE_REQ_NAME SYSRES_CONST_STATE_REQUISITE_ACTIVE_VALUE SYSRES_CONST_STATE_REQUISITE_CLOSED_VALUE SYSRES_CONST_STATE_REQUISITE_CODE SYSRES_CONST_STATIC_ROLE_TYPE_CODE SYSRES_CONST_STATUS_PLAN_DEFAULT_VALUE SYSRES_CONST_STATUS_VALUE_AUTOCLEANING SYSRES_CONST_STATUS_VALUE_BLUE_SQUARE SYSRES_CONST_STATUS_VALUE_COMPLETE SYSRES_CONST_STATUS_VALUE_GREEN_SQUARE SYSRES_CONST_STATUS_VALUE_O\
RANGE_SQUARE SYSRES_CONST_STATUS_VALUE_PURPLE_SQUARE SYSRES_CONST_STATUS_VALUE_RED_SQUARE SYSRES_CONST_STATUS_VALUE_SUSPEND SYSRES_CONST_STATUS_VALUE_YELLOW_SQUARE SYSRES_CONST_STDROUTE_SHOW_TO_USERS_REQUISITE_CODE SYSRES_CONST_STORAGE_TYPE_FILE SYSRES_CONST_STORAGE_TYPE_SQL_SERVER SYSRES_CONST_STR_REQUISITE SYSRES_CONST_STRIKEOUT_LIFE_CYCLE_STAGE_DRAW_STYLE SYSRES_CONST_STRING_FORMAT_LEFT_ALIGN_CHAR SYSRES_CONST_STRING_FORMAT_RIGHT_ALIGN_CHAR SYSRES_CONST_STRING_REQUISITE_CODE SYSRES_CONST_STRI\
NG_REQUISITE_TYPE SYSRES_CONST_STRING_TYPE_CHAR SYSRES_CONST_SUBSTITUTES_PSEUDOREFERENCE_CODE SYSRES_CONST_SUBTASK_BLOCK_DESCRIPTION SYSRES_CONST_SYSTEM_SETTING_CURRENT_USER_PARAM_VALUE SYSRES_CONST_SYSTEM_SETTING_EMPTY_VALUE_PARAM_VALUE SYSRES_CONST_SYSTEM_VERSION_COMMENT SYSRES_CONST_TASK_ACCESS_TYPE_ALL SYSRES_CONST_TASK_ACCESS_TYPE_ALL_MEMBERS SYSRES_CONST_TASK_ACCESS_TYPE_MANUAL SYSRES_CONST_TASK_ENCODE_TYPE_CERTIFICATION SYSRES_CONST_TASK_ENCODE_TYPE_CERTIFICATION_AND_PASSWORD SYSRES_CONST\
_TASK_ENCODE_TYPE_NONE SYSRES_CONST_TASK_ENCODE_TYPE_PASSWORD SYSRES_CONST_TASK_ROUTE_ALL_CONDITION SYSRES_CONST_TASK_ROUTE_AND_CONDITION SYSRES_CONST_TASK_ROUTE_OR_CONDITION SYSRES_CONST_TASK_STATE_ABORTED SYSRES_CONST_TASK_STATE_COMPLETE SYSRES_CONST_TASK_STATE_CONTINUED SYSRES_CONST_TASK_STATE_CONTROL SYSRES_CONST_TASK_STATE_INIT SYSRES_CONST_TASK_STATE_WORKING SYSRES_CONST_TASK_TITLE SYSRES_CONST_TASK_TYPES_GROUPS_REFERENCE_CODE SYSRES_CONST_TASK_TYPES_REFERENCE_CODE SYSRES_CONST_TEMPLATES_R\
EFERENCE_CODE SYSRES_CONST_TEST_DATE_REQUISITE_NAME SYSRES_CONST_TEST_DEV_DATABASE_NAME SYSRES_CONST_TEST_DEV_SYSTEM_CODE SYSRES_CONST_TEST_EDMS_DATABASE_NAME SYSRES_CONST_TEST_EDMS_MAIN_CODE SYSRES_CONST_TEST_EDMS_MAIN_DB_NAME SYSRES_CONST_TEST_EDMS_SECOND_CODE SYSRES_CONST_TEST_EDMS_SECOND_DB_NAME SYSRES_CONST_TEST_EDMS_SYSTEM_CODE SYSRES_CONST_TEST_NUMERIC_REQUISITE_NAME SYSRES_CONST_TEXT_REQUISITE SYSRES_CONST_TEXT_REQUISITE_CODE SYSRES_CONST_TEXT_REQUISITE_TYPE SYSRES_CONST_TEXT_TYPE_CHAR S\
YSRES_CONST_TYPE_CODE_REQUISITE_CODE SYSRES_CONST_TYPE_REQUISITE_CODE SYSRES_CONST_UNDEFINED_LIFE_CYCLE_STAGE_FONT_COLOR SYSRES_CONST_UNITS_SECTION_ID_REQUISITE_CODE SYSRES_CONST_UNITS_SECTION_REQUISITE_CODE SYSRES_CONST_UNOPERATING_RECORD_FLAG_VALUE_CODE SYSRES_CONST_UNSTORED_DATA_REQUISITE_CODE SYSRES_CONST_UNSTORED_DATA_REQUISITE_NAME SYSRES_CONST_USE_ACCESS_TYPE_CODE SYSRES_CONST_USE_ACCESS_TYPE_NAME SYSRES_CONST_USER_ACCOUNT_TYPE_VALUE_CODE SYSRES_CONST_USER_ADDITIONAL_INFORMATION_REQUISITE\
_CODE SYSRES_CONST_USER_AND_GROUP_ID_FROM_PSEUDOREFERENCE_REQUISITE_CODE SYSRES_CONST_USER_CATEGORY_NORMAL SYSRES_CONST_USER_CERTIFICATE_REQUISITE_CODE SYSRES_CONST_USER_CERTIFICATE_STATE_REQUISITE_CODE SYSRES_CONST_USER_CERTIFICATE_SUBJECT_NAME_REQUISITE_CODE SYSRES_CONST_USER_CERTIFICATE_THUMBPRINT_REQUISITE_CODE SYSRES_CONST_USER_COMMON_CATEGORY SYSRES_CONST_USER_COMMON_CATEGORY_CODE SYSRES_CONST_USER_FULL_NAME_REQUISITE_CODE SYSRES_CONST_USER_GROUP_TYPE_REQUISITE_CODE SYSRES_CONST_USER_LOGIN\
_REQUISITE_CODE SYSRES_CONST_USER_REMOTE_CONTROLLER_REQUISITE_CODE SYSRES_CONST_USER_REMOTE_SYSTEM_REQUISITE_CODE SYSRES_CONST_USER_RIGHTS_T_REQUISITE_CODE SYSRES_CONST_USER_SERVER_NAME_REQUISITE_CODE SYSRES_CONST_USER_SERVICE_CATEGORY SYSRES_CONST_USER_SERVICE_CATEGORY_CODE SYSRES_CONST_USER_STATUS_ADMINISTRATOR_CODE SYSRES_CONST_USER_STATUS_ADMINISTRATOR_NAME SYSRES_CONST_USER_STATUS_DEVELOPER_CODE SYSRES_CONST_USER_STATUS_DEVELOPER_NAME SYSRES_CONST_USER_STATUS_DISABLED_CODE SYSRES_CONST_USER\
_STATUS_DISABLED_NAME SYSRES_CONST_USER_STATUS_SYSTEM_DEVELOPER_CODE SYSRES_CONST_USER_STATUS_USER_CODE SYSRES_CONST_USER_STATUS_USER_NAME SYSRES_CONST_USER_STATUS_USER_NAME_DEPRECATED SYSRES_CONST_USER_TYPE_FIELD_VALUE_USER SYSRES_CONST_USER_TYPE_REQUISITE_CODE SYSRES_CONST_USERS_CONTROLLER_REQUISITE_CODE SYSRES_CONST_USERS_IS_MAIN_SERVER_REQUISITE_CODE SYSRES_CONST_USERS_REFERENCE_CODE SYSRES_CONST_USERS_REGISTRATION_CERTIFICATES_ACTION_NAME SYSRES_CONST_USERS_REQUISITE_CODE SYSRES_CONST_USERS\
_SYSTEM_REQUISITE_CODE SYSRES_CONST_USERS_USER_ACCESS_RIGHTS_TYPR_REQUISITE_CODE SYSRES_CONST_USERS_USER_AUTHENTICATION_REQUISITE_CODE SYSRES_CONST_USERS_USER_COMPONENT_REQUISITE_CODE SYSRES_CONST_USERS_USER_GROUP_REQUISITE_CODE SYSRES_CONST_USERS_VIEW_CERTIFICATES_ACTION_NAME SYSRES_CONST_VIEW_DEFAULT_CODE SYSRES_CONST_VIEW_DEFAULT_NAME SYSRES_CONST_VIEWER_REQUISITE_CODE SYSRES_CONST_WAITING_BLOCK_DESCRIPTION SYSRES_CONST_WIZARD_FORM_LABEL_TEST_STRING  SYSRES_CONST_WIZARD_QUERY_PARAM_HEIGHT_ETA\
LON_STRING SYSRES_CONST_WIZARD_REFERENCE_COMMENT_REQUISITE_CODE SYSRES_CONST_WORK_RULES_DESCRIPTION_REQUISITE_CODE SYSRES_CONST_WORK_TIME_CALENDAR_REFERENCE_CODE SYSRES_CONST_WORK_WORKFLOW_HARD_ROUTE_TYPE_VALUE SYSRES_CONST_WORK_WORKFLOW_HARD_ROUTE_TYPE_VALUE_CODE SYSRES_CONST_WORK_WORKFLOW_HARD_ROUTE_TYPE_VALUE_CODE_RUS SYSRES_CONST_WORK_WORKFLOW_SOFT_ROUTE_TYPE_VALUE_CODE_RUS SYSRES_CONST_WORKFLOW_ROUTE_TYPR_HARD SYSRES_CONST_WORKFLOW_ROUTE_TYPR_SOFT SYSRES_CONST_XML_ENCODING SYSRES_CONST_XREC\
_STAT_REQUISITE_CODE SYSRES_CONST_XRECID_FIELD_NAME SYSRES_CONST_YES SYSRES_CONST_YES_NO_2_REQUISITE_CODE SYSRES_CONST_YES_NO_REQUISITE_CODE SYSRES_CONST_YES_NO_T_REF_TYPE_REQUISITE_CODE SYSRES_CONST_YES_PICK_VALUE SYSRES_CONST_YES_VALUE "+"CR FALSE nil NO_VALUE NULL TAB TRUE YES_VALUE "+"ADMINISTRATORS_GROUP_NAME CUSTOMIZERS_GROUP_NAME DEVELOPERS_GROUP_NAME SERVICE_USERS_GROUP_NAME "+"DECISION_BLOCK_FIRST_OPERAND_PROPERTY DECISION_BLOCK_NAME_PROPERTY DECISION_BLOCK_OPERATION_PROPERTY DECISION_B\
LOCK_RESULT_TYPE_PROPERTY DECISION_BLOCK_SECOND_OPERAND_PROPERTY "+"ANY_FILE_EXTENTION COMPRESSED_DOCUMENT_EXTENSION EXTENDED_DOCUMENT_EXTENSION SHORT_COMPRESSED_DOCUMENT_EXTENSION SHORT_EXTENDED_DOCUMENT_EXTENSION "+"JOB_BLOCK_ABORT_DEADLINE_PROPERTY JOB_BLOCK_AFTER_FINISH_EVENT JOB_BLOCK_AFTER_QUERY_PARAMETERS_EVENT JOB_BLOCK_ATTACHMENT_PROPERTY JOB_BLOCK_ATTACHMENTS_RIGHTS_GROUP_PROPERTY JOB_BLOCK_ATTACHMENTS_RIGHTS_TYPE_PROPERTY JOB_BLOCK_BEFORE_QUERY_PARAMETERS_EVENT JOB_BLOCK_BEFORE_START_\
EVENT JOB_BLOCK_CREATED_JOBS_PROPERTY JOB_BLOCK_DEADLINE_PROPERTY JOB_BLOCK_EXECUTION_RESULTS_PROPERTY JOB_BLOCK_IS_PARALLEL_PROPERTY JOB_BLOCK_IS_RELATIVE_ABORT_DEADLINE_PROPERTY JOB_BLOCK_IS_RELATIVE_DEADLINE_PROPERTY JOB_BLOCK_JOB_TEXT_PROPERTY JOB_BLOCK_NAME_PROPERTY JOB_BLOCK_NEED_SIGN_ON_PERFORM_PROPERTY JOB_BLOCK_PERFORMER_PROPERTY JOB_BLOCK_RELATIVE_ABORT_DEADLINE_TYPE_PROPERTY JOB_BLOCK_RELATIVE_DEADLINE_TYPE_PROPERTY JOB_BLOCK_SUBJECT_PROPERTY "+"ENGLISH_LANGUAGE_CODE RUSSIAN_LANGUAGE_\
CODE "+"smHidden smMaximized smMinimized smNormal wmNo wmYes "+"COMPONENT_TOKEN_LINK_KIND DOCUMENT_LINK_KIND EDOCUMENT_LINK_KIND FOLDER_LINK_KIND JOB_LINK_KIND REFERENCE_LINK_KIND TASK_LINK_KIND "+"COMPONENT_TOKEN_LOCK_TYPE EDOCUMENT_VERSION_LOCK_TYPE "+"MONITOR_BLOCK_AFTER_FINISH_EVENT MONITOR_BLOCK_BEFORE_START_EVENT MONITOR_BLOCK_DEADLINE_PROPERTY MONITOR_BLOCK_INTERVAL_PROPERTY MONITOR_BLOCK_INTERVAL_TYPE_PROPERTY MONITOR_BLOCK_IS_RELATIVE_DEADLINE_PROPERTY MONITOR_BLOCK_NAME_PROPERTY MONITO\
R_BLOCK_RELATIVE_DEADLINE_TYPE_PROPERTY MONITOR_BLOCK_SEARCH_SCRIPT_PROPERTY "+"NOTICE_BLOCK_AFTER_FINISH_EVENT NOTICE_BLOCK_ATTACHMENT_PROPERTY NOTICE_BLOCK_ATTACHMENTS_RIGHTS_GROUP_PROPERTY NOTICE_BLOCK_ATTACHMENTS_RIGHTS_TYPE_PROPERTY NOTICE_BLOCK_BEFORE_START_EVENT NOTICE_BLOCK_CREATED_NOTICES_PROPERTY NOTICE_BLOCK_DEADLINE_PROPERTY NOTICE_BLOCK_IS_RELATIVE_DEADLINE_PROPERTY NOTICE_BLOCK_NAME_PROPERTY NOTICE_BLOCK_NOTICE_TEXT_PROPERTY NOTICE_BLOCK_PERFORMER_PROPERTY NOTICE_BLOCK_RELATIVE_DEA\
DLINE_TYPE_PROPERTY NOTICE_BLOCK_SUBJECT_PROPERTY "+"dseAfterCancel dseAfterClose dseAfterDelete dseAfterDeleteOutOfTransaction dseAfterInsert dseAfterOpen dseAfterScroll dseAfterUpdate dseAfterUpdateOutOfTransaction dseBeforeCancel dseBeforeClose dseBeforeDelete dseBeforeDetailUpdate dseBeforeInsert dseBeforeOpen dseBeforeUpdate dseOnAnyRequisiteChange dseOnCloseRecord dseOnDeleteError dseOnOpenRecord dseOnPrepareUpdate dseOnUpdateError dseOnUpdateRatifiedRecord dseOnValidDelete dseOnValidUpdat\
e reOnChange reOnChangeValues SELECTION_BEGIN_ROUTE_EVENT SELECTION_END_ROUTE_EVENT "+"CURRENT_PERIOD_IS_REQUIRED PREVIOUS_CARD_TYPE_NAME SHOW_RECORD_PROPERTIES_FORM "+"ACCESS_RIGHTS_SETTING_DIALOG_CODE ADMINISTRATOR_USER_CODE ANALYTIC_REPORT_TYPE asrtHideLocal asrtHideRemote CALCULATED_ROLE_TYPE_CODE COMPONENTS_REFERENCE_DEVELOPER_VIEW_CODE DCTS_TEST_PROTOCOLS_FOLDER_PATH E_EDOC_VERSION_ALREADY_APPROVINGLY_SIGNED E_EDOC_VERSION_ALREADY_APPROVINGLY_SIGNED_BY_USER E_EDOC_VERSION_ALREDY_SIGNED E_E\
DOC_VERSION_ALREDY_SIGNED_BY_USER EDOC_TYPES_CODE_REQUISITE_FIELD_NAME EDOCUMENTS_ALIAS_NAME FILES_FOLDER_PATH FILTER_OPERANDS_DELIMITER FILTER_OPERATIONS_DELIMITER FORMCARD_NAME FORMLIST_NAME GET_EXTENDED_DOCUMENT_EXTENSION_CREATION_MODE GET_EXTENDED_DOCUMENT_EXTENSION_IMPORT_MODE INTEGRATED_REPORT_TYPE IS_BUILDER_APPLICATION_ROLE IS_BUILDER_APPLICATION_ROLE2 IS_BUILDER_USERS ISBSYSDEV LOG_FOLDER_PATH mbCancel mbNo mbNoToAll mbOK mbYes mbYesToAll MEMORY_DATASET_DESRIPTIONS_FILENAME mrNo mrNoToA\
ll mrYes mrYesToAll MULTIPLE_SELECT_DIALOG_CODE NONOPERATING_RECORD_FLAG_FEMININE NONOPERATING_RECORD_FLAG_MASCULINE OPERATING_RECORD_FLAG_FEMININE OPERATING_RECORD_FLAG_MASCULINE PROFILING_SETTINGS_COMMON_SETTINGS_CODE_VALUE PROGRAM_INITIATED_LOOKUP_ACTION ratDelete ratEdit ratInsert REPORT_TYPE REQUIRED_PICK_VALUES_VARIABLE rmCard rmList SBRTE_PROGID_DEV SBRTE_PROGID_RELEASE STATIC_ROLE_TYPE_CODE SUPPRESS_EMPTY_TEMPLATE_CREATION SYSTEM_USER_CODE UPDATE_DIALOG_DATASET USED_IN_OBJECT_HINT_PARAM \
USER_INITIATED_LOOKUP_ACTION USER_NAME_FORMAT USER_SELECTION_RESTRICTIONS WORKFLOW_TEST_PROTOCOLS_FOLDER_PATH ELS_SUBTYPE_CONTROL_NAME ELS_FOLDER_KIND_CONTROL_NAME REPEAT_PROCESS_CURRENT_OBJECT_EXCEPTION_NAME "+"PRIVILEGE_COMPONENT_FULL_ACCESS PRIVILEGE_DEVELOPMENT_EXPORT PRIVILEGE_DEVELOPMENT_IMPORT PRIVILEGE_DOCUMENT_DELETE PRIVILEGE_ESD PRIVILEGE_FOLDER_DELETE PRIVILEGE_MANAGE_ACCESS_RIGHTS PRIVILEGE_MANAGE_REPLICATION PRIVILEGE_MANAGE_SESSION_SERVER PRIVILEGE_OBJECT_FULL_ACCESS PRIVILEGE_OBJ\
ECT_VIEW PRIVILEGE_RESERVE_LICENSE PRIVILEGE_SYSTEM_CUSTOMIZE PRIVILEGE_SYSTEM_DEVELOP PRIVILEGE_SYSTEM_INSTALL PRIVILEGE_TASK_DELETE PRIVILEGE_USER_PLUGIN_SETTINGS_CUSTOMIZE PRIVILEGES_PSEUDOREFERENCE_CODE "+"ACCESS_TYPES_PSEUDOREFERENCE_CODE ALL_AVAILABLE_COMPONENTS_PSEUDOREFERENCE_CODE ALL_AVAILABLE_PRIVILEGES_PSEUDOREFERENCE_CODE ALL_REPLICATE_COMPONENTS_PSEUDOREFERENCE_CODE AVAILABLE_DEVELOPERS_COMPONENTS_PSEUDOREFERENCE_CODE COMPONENTS_PSEUDOREFERENCE_CODE FILTRATER_SETTINGS_CONFLICTS_PSEU\
DOREFERENCE_CODE GROUPS_PSEUDOREFERENCE_CODE RECEIVE_PROTOCOL_PSEUDOREFERENCE_CODE REFERENCE_REQUISITE_PSEUDOREFERENCE_CODE REFERENCE_REQUISITES_PSEUDOREFERENCE_CODE REFTYPES_PSEUDOREFERENCE_CODE REPLICATION_SEANCES_DIARY_PSEUDOREFERENCE_CODE SEND_PROTOCOL_PSEUDOREFERENCE_CODE SUBSTITUTES_PSEUDOREFERENCE_CODE SYSTEM_SETTINGS_PSEUDOREFERENCE_CODE UNITS_PSEUDOREFERENCE_CODE USERS_PSEUDOREFERENCE_CODE VIEWERS_PSEUDOREFERENCE_CODE "+"CERTIFICATE_TYPE_ENCRYPT CERTIFICATE_TYPE_SIGN CERTIFICATE_TYPE_SI\
GN_AND_ENCRYPT "+"STORAGE_TYPE_FILE STORAGE_TYPE_NAS_CIFS STORAGE_TYPE_SAPERION STORAGE_TYPE_SQL_SERVER "+"COMPTYPE2_REQUISITE_DOCUMENTS_VALUE COMPTYPE2_REQUISITE_TASKS_VALUE COMPTYPE2_REQUISITE_FOLDERS_VALUE COMPTYPE2_REQUISITE_REFERENCES_VALUE "+"SYSREQ_CODE SYSREQ_COMPTYPE2 SYSREQ_CONST_AVAILABLE_FOR_WEB SYSREQ_CONST_COMMON_CODE SYSREQ_CONST_COMMON_VALUE SYSREQ_CONST_FIRM_CODE SYSREQ_CONST_FIRM_STATUS SYSREQ_CONST_FIRM_VALUE SYSREQ_CONST_SERVER_STATUS SYSREQ_CONTENTS SYSREQ_DATE_OPEN SYSREQ_D\
ATE_CLOSE SYSREQ_DESCRIPTION SYSREQ_DESCRIPTION_LOCALIZE_ID SYSREQ_DOUBLE SYSREQ_EDOC_ACCESS_TYPE SYSREQ_EDOC_AUTHOR SYSREQ_EDOC_CREATED SYSREQ_EDOC_DELEGATE_RIGHTS_REQUISITE_CODE SYSREQ_EDOC_EDITOR SYSREQ_EDOC_ENCODE_TYPE SYSREQ_EDOC_ENCRYPTION_PLUGIN_NAME SYSREQ_EDOC_ENCRYPTION_PLUGIN_VERSION SYSREQ_EDOC_EXPORT_DATE SYSREQ_EDOC_EXPORTER SYSREQ_EDOC_KIND SYSREQ_EDOC_LIFE_STAGE_NAME SYSREQ_EDOC_LOCKED_FOR_SERVER_CODE SYSREQ_EDOC_MODIFIED SYSREQ_EDOC_NAME SYSREQ_EDOC_NOTE SYSREQ_EDOC_QUALIFIED_ID\
 SYSREQ_EDOC_SESSION_KEY SYSREQ_EDOC_SESSION_KEY_ENCRYPTION_PLUGIN_NAME SYSREQ_EDOC_SESSION_KEY_ENCRYPTION_PLUGIN_VERSION SYSREQ_EDOC_SIGNATURE_TYPE SYSREQ_EDOC_SIGNED SYSREQ_EDOC_STORAGE SYSREQ_EDOC_STORAGES_ARCHIVE_STORAGE SYSREQ_EDOC_STORAGES_CHECK_RIGHTS SYSREQ_EDOC_STORAGES_COMPUTER_NAME SYSREQ_EDOC_STORAGES_EDIT_IN_STORAGE SYSREQ_EDOC_STORAGES_EXECUTIVE_STORAGE SYSREQ_EDOC_STORAGES_FUNCTION SYSREQ_EDOC_STORAGES_INITIALIZED SYSREQ_EDOC_STORAGES_LOCAL_PATH SYSREQ_EDOC_STORAGES_SAPERION_DATAB\
ASE_NAME SYSREQ_EDOC_STORAGES_SEARCH_BY_TEXT SYSREQ_EDOC_STORAGES_SERVER_NAME SYSREQ_EDOC_STORAGES_SHARED_SOURCE_NAME SYSREQ_EDOC_STORAGES_TYPE SYSREQ_EDOC_TEXT_MODIFIED SYSREQ_EDOC_TYPE_ACT_CODE SYSREQ_EDOC_TYPE_ACT_DESCRIPTION SYSREQ_EDOC_TYPE_ACT_DESCRIPTION_LOCALIZE_ID SYSREQ_EDOC_TYPE_ACT_ON_EXECUTE SYSREQ_EDOC_TYPE_ACT_ON_EXECUTE_EXISTS SYSREQ_EDOC_TYPE_ACT_SECTION SYSREQ_EDOC_TYPE_ADD_PARAMS SYSREQ_EDOC_TYPE_COMMENT SYSREQ_EDOC_TYPE_EVENT_TEXT SYSREQ_EDOC_TYPE_NAME_IN_SINGULAR SYSREQ_EDOC\
_TYPE_NAME_IN_SINGULAR_LOCALIZE_ID SYSREQ_EDOC_TYPE_NAME_LOCALIZE_ID SYSREQ_EDOC_TYPE_NUMERATION_METHOD SYSREQ_EDOC_TYPE_PSEUDO_REQUISITE_CODE SYSREQ_EDOC_TYPE_REQ_CODE SYSREQ_EDOC_TYPE_REQ_DESCRIPTION SYSREQ_EDOC_TYPE_REQ_DESCRIPTION_LOCALIZE_ID SYSREQ_EDOC_TYPE_REQ_IS_LEADING SYSREQ_EDOC_TYPE_REQ_IS_REQUIRED SYSREQ_EDOC_TYPE_REQ_NUMBER SYSREQ_EDOC_TYPE_REQ_ON_CHANGE SYSREQ_EDOC_TYPE_REQ_ON_CHANGE_EXISTS SYSREQ_EDOC_TYPE_REQ_ON_SELECT SYSREQ_EDOC_TYPE_REQ_ON_SELECT_KIND SYSREQ_EDOC_TYPE_REQ_SEC\
TION SYSREQ_EDOC_TYPE_VIEW_CARD SYSREQ_EDOC_TYPE_VIEW_CODE SYSREQ_EDOC_TYPE_VIEW_COMMENT SYSREQ_EDOC_TYPE_VIEW_IS_MAIN SYSREQ_EDOC_TYPE_VIEW_NAME SYSREQ_EDOC_TYPE_VIEW_NAME_LOCALIZE_ID SYSREQ_EDOC_VERSION_AUTHOR SYSREQ_EDOC_VERSION_CRC SYSREQ_EDOC_VERSION_DATA SYSREQ_EDOC_VERSION_EDITOR SYSREQ_EDOC_VERSION_EXPORT_DATE SYSREQ_EDOC_VERSION_EXPORTER SYSREQ_EDOC_VERSION_HIDDEN SYSREQ_EDOC_VERSION_LIFE_STAGE SYSREQ_EDOC_VERSION_MODIFIED SYSREQ_EDOC_VERSION_NOTE SYSREQ_EDOC_VERSION_SIGNATURE_TYPE SYSR\
EQ_EDOC_VERSION_SIGNED SYSREQ_EDOC_VERSION_SIZE SYSREQ_EDOC_VERSION_SOURCE SYSREQ_EDOC_VERSION_TEXT_MODIFIED SYSREQ_EDOCKIND_DEFAULT_VERSION_STATE_CODE SYSREQ_FOLDER_KIND SYSREQ_FUNC_CATEGORY SYSREQ_FUNC_COMMENT SYSREQ_FUNC_GROUP SYSREQ_FUNC_GROUP_COMMENT SYSREQ_FUNC_GROUP_NUMBER SYSREQ_FUNC_HELP SYSREQ_FUNC_PARAM_DEF_VALUE SYSREQ_FUNC_PARAM_IDENT SYSREQ_FUNC_PARAM_NUMBER SYSREQ_FUNC_PARAM_TYPE SYSREQ_FUNC_TEXT SYSREQ_GROUP_CATEGORY SYSREQ_ID SYSREQ_LAST_UPDATE SYSREQ_LEADER_REFERENCE SYSREQ_LIN\
E_NUMBER SYSREQ_MAIN_RECORD_ID SYSREQ_NAME SYSREQ_NAME_LOCALIZE_ID SYSREQ_NOTE SYSREQ_ORIGINAL_RECORD SYSREQ_OUR_FIRM SYSREQ_PROFILING_SETTINGS_BATCH_LOGING SYSREQ_PROFILING_SETTINGS_BATCH_SIZE SYSREQ_PROFILING_SETTINGS_PROFILING_ENABLED SYSREQ_PROFILING_SETTINGS_SQL_PROFILING_ENABLED SYSREQ_PROFILING_SETTINGS_START_LOGGED SYSREQ_RECORD_STATUS SYSREQ_REF_REQ_FIELD_NAME SYSREQ_REF_REQ_FORMAT SYSREQ_REF_REQ_GENERATED SYSREQ_REF_REQ_LENGTH SYSREQ_REF_REQ_PRECISION SYSREQ_REF_REQ_REFERENCE SYSREQ_RE\
F_REQ_SECTION SYSREQ_REF_REQ_STORED SYSREQ_REF_REQ_TOKENS SYSREQ_REF_REQ_TYPE SYSREQ_REF_REQ_VIEW SYSREQ_REF_TYPE_ACT_CODE SYSREQ_REF_TYPE_ACT_DESCRIPTION SYSREQ_REF_TYPE_ACT_DESCRIPTION_LOCALIZE_ID SYSREQ_REF_TYPE_ACT_ON_EXECUTE SYSREQ_REF_TYPE_ACT_ON_EXECUTE_EXISTS SYSREQ_REF_TYPE_ACT_SECTION SYSREQ_REF_TYPE_ADD_PARAMS SYSREQ_REF_TYPE_COMMENT SYSREQ_REF_TYPE_COMMON_SETTINGS SYSREQ_REF_TYPE_DISPLAY_REQUISITE_NAME SYSREQ_REF_TYPE_EVENT_TEXT SYSREQ_REF_TYPE_MAIN_LEADING_REF SYSREQ_REF_TYPE_NAME_I\
N_SINGULAR SYSREQ_REF_TYPE_NAME_IN_SINGULAR_LOCALIZE_ID SYSREQ_REF_TYPE_NAME_LOCALIZE_ID SYSREQ_REF_TYPE_NUMERATION_METHOD SYSREQ_REF_TYPE_REQ_CODE SYSREQ_REF_TYPE_REQ_DESCRIPTION SYSREQ_REF_TYPE_REQ_DESCRIPTION_LOCALIZE_ID SYSREQ_REF_TYPE_REQ_IS_CONTROL SYSREQ_REF_TYPE_REQ_IS_FILTER SYSREQ_REF_TYPE_REQ_IS_LEADING SYSREQ_REF_TYPE_REQ_IS_REQUIRED SYSREQ_REF_TYPE_REQ_NUMBER SYSREQ_REF_TYPE_REQ_ON_CHANGE SYSREQ_REF_TYPE_REQ_ON_CHANGE_EXISTS SYSREQ_REF_TYPE_REQ_ON_SELECT SYSREQ_REF_TYPE_REQ_ON_SELEC\
T_KIND SYSREQ_REF_TYPE_REQ_SECTION SYSREQ_REF_TYPE_VIEW_CARD SYSREQ_REF_TYPE_VIEW_CODE SYSREQ_REF_TYPE_VIEW_COMMENT SYSREQ_REF_TYPE_VIEW_IS_MAIN SYSREQ_REF_TYPE_VIEW_NAME SYSREQ_REF_TYPE_VIEW_NAME_LOCALIZE_ID SYSREQ_REFERENCE_TYPE_ID SYSREQ_STATE SYSREQ_STATЕ SYSREQ_SYSTEM_SETTINGS_VALUE SYSREQ_TYPE SYSREQ_UNIT SYSREQ_UNIT_ID SYSREQ_USER_GROUPS_GROUP_FULL_NAME SYSREQ_USER_GROUPS_GROUP_NAME SYSREQ_USER_GROUPS_GROUP_SERVER_NAME SYSREQ_USERS_ACCESS_RIGHTS SYSREQ_USERS_AUTHENTICATION SYSREQ_USERS_CA\
TEGORY SYSREQ_USERS_COMPONENT SYSREQ_USERS_COMPONENT_USER_IS_PUBLIC SYSREQ_USERS_DOMAIN SYSREQ_USERS_FULL_USER_NAME SYSREQ_USERS_GROUP SYSREQ_USERS_IS_MAIN_SERVER SYSREQ_USERS_LOGIN SYSREQ_USERS_REFERENCE_USER_IS_PUBLIC SYSREQ_USERS_STATUS SYSREQ_USERS_USER_CERTIFICATE SYSREQ_USERS_USER_CERTIFICATE_INFO SYSREQ_USERS_USER_CERTIFICATE_PLUGIN_NAME SYSREQ_USERS_USER_CERTIFICATE_PLUGIN_VERSION SYSREQ_USERS_USER_CERTIFICATE_STATE SYSREQ_USERS_USER_CERTIFICATE_SUBJECT_NAME SYSREQ_USERS_USER_CERTIFICATE\
_THUMBPRINT SYSREQ_USERS_USER_DEFAULT_CERTIFICATE SYSREQ_USERS_USER_DESCRIPTION SYSREQ_USERS_USER_GLOBAL_NAME SYSREQ_USERS_USER_LOGIN SYSREQ_USERS_USER_MAIN_SERVER SYSREQ_USERS_USER_TYPE SYSREQ_WORK_RULES_FOLDER_ID "+"RESULT_VAR_NAME RESULT_VAR_NAME_ENG "+"AUTO_NUMERATION_RULE_ID CANT_CHANGE_ID_REQUISITE_RULE_ID CANT_CHANGE_OURFIRM_REQUISITE_RULE_ID CHECK_CHANGING_REFERENCE_RECORD_USE_RULE_ID CHECK_CODE_REQUISITE_RULE_ID CHECK_DELETING_REFERENCE_RECORD_USE_RULE_ID CHECK_FILTRATER_CHANGES_RULE_ID\
 CHECK_RECORD_INTERVAL_RULE_ID CHECK_REFERENCE_INTERVAL_RULE_ID CHECK_REQUIRED_DATA_FULLNESS_RULE_ID CHECK_REQUIRED_REQUISITES_FULLNESS_RULE_ID MAKE_RECORD_UNRATIFIED_RULE_ID RESTORE_AUTO_NUMERATION_RULE_ID SET_FIRM_CONTEXT_FROM_RECORD_RULE_ID SET_FIRST_RECORD_IN_LIST_FORM_RULE_ID SET_IDSPS_VALUE_RULE_ID SET_NEXT_CODE_VALUE_RULE_ID SET_OURFIRM_BOUNDS_RULE_ID SET_OURFIRM_REQUISITE_RULE_ID "+"SCRIPT_BLOCK_AFTER_FINISH_EVENT SCRIPT_BLOCK_BEFORE_START_EVENT SCRIPT_BLOCK_EXECUTION_RESULTS_PROPERTY SC\
RIPT_BLOCK_NAME_PROPERTY SCRIPT_BLOCK_SCRIPT_PROPERTY "+"SUBTASK_BLOCK_ABORT_DEADLINE_PROPERTY SUBTASK_BLOCK_AFTER_FINISH_EVENT SUBTASK_BLOCK_ASSIGN_PARAMS_EVENT SUBTASK_BLOCK_ATTACHMENTS_PROPERTY SUBTASK_BLOCK_ATTACHMENTS_RIGHTS_GROUP_PROPERTY SUBTASK_BLOCK_ATTACHMENTS_RIGHTS_TYPE_PROPERTY SUBTASK_BLOCK_BEFORE_START_EVENT SUBTASK_BLOCK_CREATED_TASK_PROPERTY SUBTASK_BLOCK_CREATION_EVENT SUBTASK_BLOCK_DEADLINE_PROPERTY SUBTASK_BLOCK_IMPORTANCE_PROPERTY SUBTASK_BLOCK_INITIATOR_PROPERTY SUBTASK_BLO\
CK_IS_RELATIVE_ABORT_DEADLINE_PROPERTY SUBTASK_BLOCK_IS_RELATIVE_DEADLINE_PROPERTY SUBTASK_BLOCK_JOBS_TYPE_PROPERTY SUBTASK_BLOCK_NAME_PROPERTY SUBTASK_BLOCK_PARALLEL_ROUTE_PROPERTY SUBTASK_BLOCK_PERFORMERS_PROPERTY SUBTASK_BLOCK_RELATIVE_ABORT_DEADLINE_TYPE_PROPERTY SUBTASK_BLOCK_RELATIVE_DEADLINE_TYPE_PROPERTY SUBTASK_BLOCK_REQUIRE_SIGN_PROPERTY SUBTASK_BLOCK_STANDARD_ROUTE_PROPERTY SUBTASK_BLOCK_START_EVENT SUBTASK_BLOCK_STEP_CONTROL_PROPERTY SUBTASK_BLOCK_SUBJECT_PROPERTY SUBTASK_BLOCK_TASK_\
CONTROL_PROPERTY SUBTASK_BLOCK_TEXT_PROPERTY SUBTASK_BLOCK_UNLOCK_ATTACHMENTS_ON_STOP_PROPERTY SUBTASK_BLOCK_USE_STANDARD_ROUTE_PROPERTY SUBTASK_BLOCK_WAIT_FOR_TASK_COMPLETE_PROPERTY "+"SYSCOMP_CONTROL_JOBS SYSCOMP_FOLDERS SYSCOMP_JOBS SYSCOMP_NOTICES SYSCOMP_TASKS "+"SYSDLG_CREATE_EDOCUMENT SYSDLG_CREATE_EDOCUMENT_VERSION SYSDLG_CURRENT_PERIOD SYSDLG_EDIT_FUNCTION_HELP SYSDLG_EDOCUMENT_KINDS_FOR_TEMPLATE SYSDLG_EXPORT_MULTIPLE_EDOCUMENTS SYSDLG_EXPORT_SINGLE_EDOCUMENT SYSDLG_IMPORT_EDOCUMENT SY\
SDLG_MULTIPLE_SELECT SYSDLG_SETUP_ACCESS_RIGHTS SYSDLG_SETUP_DEFAULT_RIGHTS SYSDLG_SETUP_FILTER_CONDITION SYSDLG_SETUP_SIGN_RIGHTS SYSDLG_SETUP_TASK_OBSERVERS SYSDLG_SETUP_TASK_ROUTE SYSDLG_SETUP_USERS_LIST SYSDLG_SIGN_EDOCUMENT SYSDLG_SIGN_MULTIPLE_EDOCUMENTS "+"SYSREF_ACCESS_RIGHTS_TYPES SYSREF_ADMINISTRATION_HISTORY SYSREF_ALL_AVAILABLE_COMPONENTS SYSREF_ALL_AVAILABLE_PRIVILEGES SYSREF_ALL_REPLICATING_COMPONENTS SYSREF_AVAILABLE_DEVELOPERS_COMPONENTS SYSREF_CALENDAR_EVENTS SYSREF_COMPONENT_TO\
KEN_HISTORY SYSREF_COMPONENT_TOKENS SYSREF_COMPONENTS SYSREF_CONSTANTS SYSREF_DATA_RECEIVE_PROTOCOL SYSREF_DATA_SEND_PROTOCOL SYSREF_DIALOGS SYSREF_DIALOGS_REQUISITES SYSREF_EDITORS SYSREF_EDOC_CARDS SYSREF_EDOC_TYPES SYSREF_EDOCUMENT_CARD_REQUISITES SYSREF_EDOCUMENT_CARD_TYPES SYSREF_EDOCUMENT_CARD_TYPES_REFERENCE SYSREF_EDOCUMENT_CARDS SYSREF_EDOCUMENT_HISTORY SYSREF_EDOCUMENT_KINDS SYSREF_EDOCUMENT_REQUISITES SYSREF_EDOCUMENT_SIGNATURES SYSREF_EDOCUMENT_TEMPLATES SYSREF_EDOCUMENT_TEXT_STORAGE\
S SYSREF_EDOCUMENT_VIEWS SYSREF_FILTERER_SETUP_CONFLICTS SYSREF_FILTRATER_SETTING_CONFLICTS SYSREF_FOLDER_HISTORY SYSREF_FOLDERS SYSREF_FUNCTION_GROUPS SYSREF_FUNCTION_PARAMS SYSREF_FUNCTIONS SYSREF_JOB_HISTORY SYSREF_LINKS SYSREF_LOCALIZATION_DICTIONARY SYSREF_LOCALIZATION_LANGUAGES SYSREF_MODULES SYSREF_PRIVILEGES SYSREF_RECORD_HISTORY SYSREF_REFERENCE_REQUISITES SYSREF_REFERENCE_TYPE_VIEWS SYSREF_REFERENCE_TYPES SYSREF_REFERENCES SYSREF_REFERENCES_REQUISITES SYSREF_REMOTE_SERVERS SYSREF_REPLI\
CATION_SESSIONS_LOG SYSREF_REPLICATION_SESSIONS_PROTOCOL SYSREF_REPORTS SYSREF_ROLES SYSREF_ROUTE_BLOCK_GROUPS SYSREF_ROUTE_BLOCKS SYSREF_SCRIPTS SYSREF_SEARCHES SYSREF_SERVER_EVENTS SYSREF_SERVER_EVENTS_HISTORY SYSREF_STANDARD_ROUTE_GROUPS SYSREF_STANDARD_ROUTES SYSREF_STATUSES SYSREF_SYSTEM_SETTINGS SYSREF_TASK_HISTORY SYSREF_TASK_KIND_GROUPS SYSREF_TASK_KINDS SYSREF_TASK_RIGHTS SYSREF_TASK_SIGNATURES SYSREF_TASKS SYSREF_UNITS SYSREF_USER_GROUPS SYSREF_USER_GROUPS_REFERENCE SYSREF_USER_SUBSTIT\
UTION SYSREF_USERS SYSREF_USERS_REFERENCE SYSREF_VIEWERS SYSREF_WORKING_TIME_CALENDARS "+"ACCESS_RIGHTS_TABLE_NAME EDMS_ACCESS_TABLE_NAME EDOC_TYPES_TABLE_NAME "+"TEST_DEV_DB_NAME TEST_DEV_SYSTEM_CODE TEST_EDMS_DB_NAME TEST_EDMS_MAIN_CODE TEST_EDMS_MAIN_DB_NAME TEST_EDMS_SECOND_CODE TEST_EDMS_SECOND_DB_NAME TEST_EDMS_SYSTEM_CODE TEST_ISB5_MAIN_CODE TEST_ISB5_SECOND_CODE TEST_SQL_SERVER_2005_NAME TEST_SQL_SERVER_NAME "+"ATTENTION_CAPTION cbsCommandLinks cbsDefault CONFIRMATION_CAPTION ERROR_CAPTI\
ON INFORMATION_CAPTION mrCancel mrOk "+"EDOC_VERSION_ACTIVE_STAGE_CODE EDOC_VERSION_DESIGN_STAGE_CODE EDOC_VERSION_OBSOLETE_STAGE_CODE "+"cpDataEnciphermentEnabled cpDigitalSignatureEnabled cpID cpIssuer cpPluginVersion cpSerial cpSubjectName cpSubjSimpleName cpValidFromDate cpValidToDate "+"ISBL_SYNTAX NO_SYNTAX XML_SYNTAX "+"WAIT_BLOCK_AFTER_FINISH_EVENT WAIT_BLOCK_BEFORE_START_EVENT WAIT_BLOCK_DEADLINE_PROPERTY WAIT_BLOCK_IS_RELATIVE_DEADLINE_PROPERTY WAIT_BLOCK_NAME_PROPERTY WAIT_BLOCK_RELAT\
IVE_DEADLINE_TYPE_PROPERTY "+"SYSRES_COMMON SYSRES_CONST SYSRES_MBFUNC SYSRES_SBDATA SYSRES_SBGUI SYSRES_SBINTF SYSRES_SBREFDSC SYSRES_SQLERRORS SYSRES_SYSCOMP ",ENUMS="atUser atGroup atRole "+"aemEnabledAlways aemDisabledAlways aemEnabledOnBrowse aemEnabledOnEdit aemDisabledOnBrowseEmpty "+"apBegin apEnd "+"alLeft alRight "+"asmNever asmNoButCustomize asmAsLastTime asmYesButCustomize asmAlways "+"cirCommon cirRevoked "+"ctSignature ctEncode ctSignatureEncode "+"clbUnchecked clbChecked clbGrayed\
 "+"ceISB ceAlways ceNever "+"ctDocument ctReference ctScript ctUnknown ctReport ctDialog ctFunction ctFolder ctEDocument ctTask ctJob ctNotice ctControlJob "+"cfInternal cfDisplay "+"ciUnspecified ciWrite ciRead "+"ckFolder ckEDocument ckTask ckJob ckComponentToken ckAny ckReference ckScript ckReport ckDialog "+"ctISBLEditor ctBevel ctButton ctCheckListBox ctComboBox ctComboEdit ctGrid ctDBCheckBox ctDBComboBox ctDBEdit ctDBEllipsis ctDBMemo ctDBNavigator ctDBRadioGroup ctDBStatusLabel ctEdit c\
tGroupBox ctInplaceHint ctMemo ctPanel ctListBox ctRadioButton ctRichEdit ctTabSheet ctWebBrowser ctImage ctHyperLink ctLabel ctDBMultiEllipsis ctRibbon ctRichView ctInnerPanel ctPanelGroup ctBitButton "+"cctDate cctInteger cctNumeric cctPick cctReference cctString cctText "+"cltInternal cltPrimary cltGUI "+"dseBeforeOpen dseAfterOpen dseBeforeClose dseAfterClose dseOnValidDelete dseBeforeDelete dseAfterDelete dseAfterDeleteOutOfTransaction dseOnDeleteError dseBeforeInsert dseAfterInsert dseOnVa\
lidUpdate dseBeforeUpdate dseOnUpdateRatifiedRecord dseAfterUpdate dseAfterUpdateOutOfTransaction dseOnUpdateError dseAfterScroll dseOnOpenRecord dseOnCloseRecord dseBeforeCancel dseAfterCancel dseOnUpdateDeadlockError dseBeforeDetailUpdate dseOnPrepareUpdate dseOnAnyRequisiteChange "+"dssEdit dssInsert dssBrowse dssInActive "+"dftDate dftShortDate dftDateTime dftTimeStamp "+"dotDays dotHours dotMinutes dotSeconds "+"dtkndLocal dtkndUTC "+"arNone arView arEdit arFull "+"ddaView ddaEdit "+"emLock\
 emEdit emSign emExportWithLock emImportWithUnlock emChangeVersionNote emOpenForModify emChangeLifeStage emDelete emCreateVersion emImport emUnlockExportedWithLock emStart emAbort emReInit emMarkAsReaded emMarkAsUnreaded emPerform emAccept emResume emChangeRights emEditRoute emEditObserver emRecoveryFromLocalCopy emChangeWorkAccessType emChangeEncodeTypeToCertificate emChangeEncodeTypeToPassword emChangeEncodeTypeToNone emChangeEncodeTypeToCertificatePassword emChangeStandardRoute emGetText emOp\
enForView emMoveToStorage emCreateObject emChangeVersionHidden emDeleteVersion emChangeLifeCycleStage emApprovingSign emExport emContinue emLockFromEdit emUnLockForEdit emLockForServer emUnlockFromServer emDelegateAccessRights emReEncode "+"ecotFile ecotProcess "+"eaGet eaCopy eaCreate eaCreateStandardRoute "+"edltAll edltNothing edltQuery "+"essmText essmCard "+"esvtLast esvtLastActive esvtSpecified "+"edsfExecutive edsfArchive "+"edstSQLServer edstFile "+"edvstNone edvstEDocumentVersionCopy ed\
vstFile edvstTemplate edvstScannedFile "+"vsDefault vsDesign vsActive vsObsolete "+"etNone etCertificate etPassword etCertificatePassword "+"ecException ecWarning ecInformation "+"estAll estApprovingOnly "+"evtLast evtLastActive evtQuery "+"fdtString fdtNumeric fdtInteger fdtDate fdtText fdtUnknown fdtWideString fdtLargeInteger "+"ftInbox ftOutbox ftFavorites ftCommonFolder ftUserFolder ftComponents ftQuickLaunch ftShortcuts ftSearch "+"grhAuto grhX1 grhX2 grhX3 "+"hltText hltRTF hltHTML "+"iffB\
MP iffJPEG iffMultiPageTIFF iffSinglePageTIFF iffTIFF iffPNG "+"im8bGrayscale im24bRGB im1bMonochrome "+"itBMP itJPEG itWMF itPNG "+"ikhInformation ikhWarning ikhError ikhNoIcon "+"icUnknown icScript icFunction icIntegratedReport icAnalyticReport icDataSetEventHandler icActionHandler icFormEventHandler icLookUpEventHandler icRequisiteChangeEventHandler icBeforeSearchEventHandler icRoleCalculation icSelectRouteEventHandler icBlockPropertyCalculation icBlockQueryParamsEventHandler icChangeSearchRe\
sultEventHandler icBlockEventHandler icSubTaskInitEventHandler icEDocDataSetEventHandler icEDocLookUpEventHandler icEDocActionHandler icEDocFormEventHandler icEDocRequisiteChangeEventHandler icStructuredConversionRule icStructuredConversionEventBefore icStructuredConversionEventAfter icWizardEventHandler icWizardFinishEventHandler icWizardStepEventHandler icWizardStepFinishEventHandler icWizardActionEnableEventHandler icWizardActionExecuteEventHandler icCreateJobsHandler icCreateNoticesHandler i\
cBeforeLookUpEventHandler icAfterLookUpEventHandler icTaskAbortEventHandler icWorkflowBlockActionHandler icDialogDataSetEventHandler icDialogActionHandler icDialogLookUpEventHandler icDialogRequisiteChangeEventHandler icDialogFormEventHandler icDialogValidCloseEventHandler icBlockFormEventHandler icTaskFormEventHandler icReferenceMethod icEDocMethod icDialogMethod icProcessMessageHandler "+"isShow isHide isByUserSettings "+"jkJob jkNotice jkControlJob "+"jtInner jtLeft jtRight jtFull jtCross "+"\
lbpAbove lbpBelow lbpLeft lbpRight "+"eltPerConnection eltPerUser "+"sfcUndefined sfcBlack sfcGreen sfcRed sfcBlue sfcOrange sfcLilac "+"sfsItalic sfsStrikeout sfsNormal "+"ldctStandardRoute ldctWizard ldctScript ldctFunction ldctRouteBlock ldctIntegratedReport ldctAnalyticReport ldctReferenceType ldctEDocumentType ldctDialog ldctServerEvents "+"mrcrtNone mrcrtUser mrcrtMaximal mrcrtCustom "+"vtEqual vtGreaterOrEqual vtLessOrEqual vtRange "+"rdYesterday rdToday rdTomorrow rdThisWeek rdThisMonth \
rdThisYear rdNextMonth rdNextWeek rdLastWeek rdLastMonth "+"rdWindow rdFile rdPrinter "+"rdtString rdtNumeric rdtInteger rdtDate rdtReference rdtAccount rdtText rdtPick rdtUnknown rdtLargeInteger rdtDocument "+"reOnChange reOnChangeValues "+"ttGlobal ttLocal ttUser ttSystem "+"ssmBrowse ssmSelect ssmMultiSelect ssmBrowseModal "+"smSelect smLike smCard "+"stNone stAuthenticating stApproving "+"sctString sctStream "+"sstAnsiSort sstNaturalSort "+"svtEqual svtContain "+"soatString soatNumeric soatI\
nteger soatDatetime soatReferenceRecord soatText soatPick soatBoolean soatEDocument soatAccount soatIntegerCollection soatNumericCollection soatStringCollection soatPickCollection soatDatetimeCollection soatBooleanCollection soatReferenceRecordCollection soatEDocumentCollection soatAccountCollection soatContents soatUnknown "+"tarAbortByUser tarAbortByWorkflowException "+"tvtAllWords tvtExactPhrase tvtAnyWord "+"usNone usCompleted usRedSquare usBlueSquare usYellowSquare usGreenSquare usOrangeSqu\
are usPurpleSquare usFollowUp "+"utUnknown utUser utDeveloper utAdministrator utSystemDeveloper utDisconnected "+"btAnd btDetailAnd btOr btNotOr btOnly "+"vmView vmSelect vmNavigation "+"vsmSingle vsmMultiple vsmMultipleCheck vsmNoSelection "+"wfatPrevious wfatNext wfatCancel wfatFinish "+"wfepUndefined wfepText3 wfepText6 wfepText9 wfepSpinEdit wfepDropDown wfepRadioGroup wfepFlag wfepText12 wfepText15 wfepText18 wfepText21 wfepText24 wfepText27 wfepText30 wfepRadioGroupColumn1 wfepRadioGroupCo\
lumn2 wfepRadioGroupColumn3 "+"wfetQueryParameter wfetText wfetDelimiter wfetLabel "+"wptString wptInteger wptNumeric wptBoolean wptDateTime wptPick wptText wptUser wptUserList wptEDocumentInfo wptEDocumentInfoList wptReferenceRecordInfo wptReferenceRecordInfoList wptFolderInfo wptTaskInfo wptContents wptFileName wptDate "+"wsrComplete wsrGoNext wsrGoPrevious wsrCustom wsrCancel wsrGoFinal "+"wstForm wstEDocument wstTaskCard wstReferenceRecordCard wstFinal "+"waAll waPerformers waManual "+"wsbSt\
art wsbFinish wsbNotice wsbStep wsbDecision wsbWait wsbMonitor wsbScript wsbConnector wsbSubTask wsbLifeCycleStage wsbPause "+"wdtInteger wdtFloat wdtString wdtPick wdtDateTime wdtBoolean wdtTask wdtJob wdtFolder wdtEDocument wdtReferenceRecord wdtUser wdtGroup wdtRole wdtIntegerCollection wdtFloatCollection wdtStringCollection wdtPickCollection wdtDateTimeCollection wdtBooleanCollection wdtTaskCollection wdtJobCollection wdtFolderCollection wdtEDocumentCollection wdtReferenceRecordCollection wd\
tUserCollection wdtGroupCollection wdtRoleCollection wdtContents wdtUserList wdtSearchDescription wdtDeadLine wdtPickSet wdtAccountCollection "+"wiLow wiNormal wiHigh "+"wrtSoft wrtHard "+"wsInit wsRunning wsDone wsControlled wsAborted wsContinued "+"wtmFull wtmFromCurrent wtmOnlyCurrent ",system_functions="AddSubString AdjustLineBreaks AmountInWords Analysis ArrayDimCount ArrayHighBound ArrayLowBound ArrayOf ArrayReDim Assert Assigned BeginOfMonth BeginOfPeriod BuildProfilingOperationAnalysis C\
allProcedure CanReadFile CArrayElement CDataSetRequisite ChangeDate ChangeReferenceDataset Char CharPos CheckParam CheckParamValue CompareStrings ConstantExists ControlState ConvertDateStr Copy CopyFile CreateArray CreateCachedReference CreateConnection CreateDialog CreateDualListDialog CreateEditor CreateException CreateFile CreateFolderDialog CreateInputDialog CreateLinkFile CreateList CreateLock CreateMemoryDataSet CreateObject CreateOpenDialog CreateProgress CreateQuery CreateReference Creat\
eReport CreateSaveDialog CreateScript CreateSQLPivotFunction CreateStringList CreateTreeListSelectDialog CSelectSQL CSQL CSubString CurrentUserID CurrentUserName CurrentVersion DataSetLocateEx DateDiff DateTimeDiff DateToStr DayOfWeek DeleteFile DirectoryExists DisableCheckAccessRights DisableCheckFullShowingRestriction DisableMassTaskSendingRestrictions DropTable DupeString EditText EnableCheckAccessRights EnableCheckFullShowingRestriction EnableMassTaskSendingRestrictions EndOfMonth EndOfPerio\
d ExceptionExists ExceptionsOff ExceptionsOn Execute ExecuteProcess Exit ExpandEnvironmentVariables ExtractFileDrive ExtractFileExt ExtractFileName ExtractFilePath ExtractParams FileExists FileSize FindFile FindSubString FirmContext ForceDirectories Format FormatDate FormatNumeric FormatSQLDate FormatString FreeException GetComponent GetComponentLaunchParam GetConstant GetLastException GetReferenceRecord GetRefTypeByRefID GetTableID GetTempFolder IfThen In IndexOf InputDialog InputDialogEx Inter\
activeMode IsFileLocked IsGraphicFile IsNumeric Length LoadString LoadStringFmt LocalTimeToUTC LowerCase Max MessageBox MessageBoxEx MimeDecodeBinary MimeDecodeString MimeEncodeBinary MimeEncodeString Min MoneyInWords MoveFile NewID Now OpenFile Ord Precision Raise ReadCertificateFromFile ReadFile ReferenceCodeByID ReferenceNumber ReferenceRequisiteMode ReferenceRequisiteValue RegionDateSettings RegionNumberSettings RegionTimeSettings RegRead RegWrite RenameFile Replace Round SelectServerCode Se\
lectSQL ServerDateTime SetConstant SetManagedFolderFieldsState ShowConstantsInputDialog ShowMessage Sleep Split SQL SQL2XLSTAB SQLProfilingSendReport StrToDate SubString SubStringCount SystemSetting Time TimeDiff Today Transliterate Trim UpperCase UserStatus UTCToLocalTime ValidateXML VarIsClear VarIsEmpty VarIsNull WorkTimeDiff WriteFile WriteFileEx WriteObjectHistory Анализ БазаДанных БлокЕсть БлокЕстьРасш БлокИнфо БлокСнять БлокСнятьРасш БлокУстановить Ввод ВводМеню ВедС ВедСпр ВерхняяГраница\
Массива ВнешПрогр Восст ВременнаяПапка Время ВыборSQL ВыбратьЗапись ВыделитьСтр Вызвать Выполнить ВыпПрогр ГрафическийФайл ГруппаДополнительно ДатаВремяСерв ДеньНедели ДиалогДаНет ДлинаСтр ДобПодстр ЕПусто ЕслиТо ЕЧисло ЗамПодстр ЗаписьСправочника ЗначПоляСпр ИДТипСпр ИзвлечьДиск ИзвлечьИмяФайла ИзвлечьПуть ИзвлечьРасширение ИзмДат ИзменитьРазмерМассива ИзмеренийМассива ИмяОрг ИмяПоляСпр Индекс ИндикаторЗакрыть ИндикаторОткрыть ИндикаторШаг ИнтерактивныйРежим ИтогТблСпр КодВидВедСпр КодВидСпрПоИ\
Д КодПоAnalit КодСимвола КодСпр КолПодстр КолПроп КонМес Конст КонстЕсть КонстЗнач КонТран КопироватьФайл КопияСтр КПериод КСтрТблСпр Макс МаксСтрТблСпр Массив Меню МенюРасш Мин НаборДанныхНайтиРасш НаимВидСпр НаимПоAnalit НаимСпр НастроитьПереводыСтрок НачМес НачТран НижняяГраницаМассива НомерСпр НПериод Окно Окр Окружение ОтлИнфДобавить ОтлИнфУдалить Отчет ОтчетАнал ОтчетИнт ПапкаСуществует Пауза ПВыборSQL ПереименоватьФайл Переменные ПереместитьФайл Подстр ПоискПодстр ПоискСтр ПолучитьИДТабли\
цы ПользовательДополнительно ПользовательИД ПользовательИмя ПользовательСтатус Прервать ПроверитьПараметр ПроверитьПараметрЗнач ПроверитьУсловие РазбСтр РазнВремя РазнДат РазнДатаВремя РазнРабВремя РегУстВрем РегУстДат РегУстЧсл РедТекст РеестрЗапись РеестрСписокИменПарам РеестрЧтение РеквСпр РеквСпрПр Сегодня Сейчас Сервер СерверПроцессИД СертификатФайлСчитать СжПроб Символ СистемаДиректумКод СистемаИнформация СистемаКод Содержит СоединениеЗакрыть СоединениеОткрыть СоздатьДиалог СоздатьДиалогВы\
бораИзДвухСписков СоздатьДиалогВыбораПапки СоздатьДиалогОткрытияФайла СоздатьДиалогСохраненияФайла СоздатьЗапрос СоздатьИндикатор СоздатьИсключение СоздатьКэшированныйСправочник СоздатьМассив СоздатьНаборДанных СоздатьОбъект СоздатьОтчет СоздатьПапку СоздатьРедактор СоздатьСоединение СоздатьСписок СоздатьСписокСтрок СоздатьСправочник СоздатьСценарий СоздСпр СостСпр Сохр СохрСпр СписокСистем Спр Справочник СпрБлокЕсть СпрБлокСнять СпрБлокСнятьРасш СпрБлокУстановить СпрИзмНабДан СпрКод СпрНомер Сп\
рОбновить СпрОткрыть СпрОтменить СпрПарам СпрПолеЗнач СпрПолеИмя СпрРекв СпрРеквВведЗн СпрРеквНовые СпрРеквПр СпрРеквПредЗн СпрРеквРежим СпрРеквТипТекст СпрСоздать СпрСост СпрСохранить СпрТблИтог СпрТблСтр СпрТблСтрКол СпрТблСтрМакс СпрТблСтрМин СпрТблСтрПред СпрТблСтрСлед СпрТблСтрСозд СпрТблСтрУд СпрТекПредст СпрУдалить СравнитьСтр СтрВерхРегистр СтрНижнРегистр СтрТблСпр СумПроп Сценарий СценарийПарам ТекВерсия ТекОрг Точн Тран Транслитерация УдалитьТаблицу УдалитьФайл УдСпр УдСтрТблСпр Уст Ус\
тановкиКонстант ФайлАтрибутСчитать ФайлАтрибутУстановить ФайлВремя ФайлВремяУстановить ФайлВыбрать ФайлЗанят ФайлЗаписать ФайлИскать ФайлКопировать ФайлМожноЧитать ФайлОткрыть ФайлПереименовать ФайлПерекодировать ФайлПереместить ФайлПросмотреть ФайлРазмер ФайлСоздать ФайлСсылкаСоздать ФайлСуществует ФайлСчитать ФайлУдалить ФмтSQLДат ФмтДат ФмтСтр ФмтЧсл Формат ЦМассивЭлемент ЦНаборДанныхРеквизит ЦПодстр ",
predefined_variables="AltState Application CallType ComponentTokens CreatedJobs CreatedNotices ControlState DialogResult Dialogs EDocuments EDocumentVersionSource Folders GlobalIDs Job Jobs InputValue LookUpReference LookUpRequisiteNames LookUpSearch Object ParentComponent Processes References Requisite ReportName Reports Result Scripts Searches SelectedAttachments SelectedItems SelectMode Sender ServerEvents ServiceFactory ShiftState SubTask SystemDialogs Tasks Wizard Wizards Work ВызовСпособ И\
мяОтчета РеквЗнач ",interfaces="IApplication IAccessRights IAccountRepository IAccountSelectionRestrictions IAction IActionList IAdministrationHistoryDescription IAnchors IApplication IArchiveInfo IAttachment IAttachmentList ICheckListBox ICheckPointedList IColumn IComponent IComponentDescription IComponentToken IComponentTokenFactory IComponentTokenInfo ICompRecordInfo IConnection IContents IControl IControlJob IControlJobInfo IControlList ICrypto ICrypto2 ICustomJob ICustomJobI\
nfo ICustomListBox ICustomObjectWizardStep ICustomWork ICustomWorkInfo IDataSet IDataSetAccessInfo IDataSigner IDateCriterion IDateRequisite IDateRequisiteDescription IDateValue IDeaAccessRights IDeaObjectInfo IDevelopmentComponentLock IDialog IDialogFactory IDialogPickRequisiteItems IDialogsFactory IDICSFactory IDocRequisite IDocumentInfo IDualListDialog IECertificate IECertificateInfo IECertificates IEditControl IEditorForm IEdmsExplorer IEdmsObject IEdmsObjectDescription IEdmsObjectFactory IE\
dmsObjectInfo IEDocument IEDocumentAccessRights IEDocumentDescription IEDocumentEditor IEDocumentFactory IEDocumentInfo IEDocumentStorage IEDocumentVersion IEDocumentVersionListDialog IEDocumentVersionSource IEDocumentWizardStep IEDocVerSignature IEDocVersionState IEnabledMode IEncodeProvider IEncrypter IEvent IEventList IException IExternalEvents IExternalHandler IFactory IField IFileDialog IFolder IFolderDescription IFolderDialog IFolderFactory IFolderInfo IForEach IForm IFormTitle IFormWizard\
Step IGlobalIDFactory IGlobalIDInfo IGrid IHasher IHistoryDescription IHyperLinkControl IImageButton IImageControl IInnerPanel IInplaceHint IIntegerCriterion IIntegerList IIntegerRequisite IIntegerValue IISBLEditorForm IJob IJobDescription IJobFactory IJobForm IJobInfo ILabelControl ILargeIntegerCriterion ILargeIntegerRequisite ILargeIntegerValue ILicenseInfo ILifeCycleStage IList IListBox ILocalIDInfo ILocalization ILock IMemoryDataSet IMessagingFactory IMetadataRepository INotice INoticeInfo I\
NumericCriterion INumericRequisite INumericValue IObject IObjectDescription IObjectImporter IObjectInfo IObserver IPanelGroup IPickCriterion IPickProperty IPickRequisite IPickRequisiteDescription IPickRequisiteItem IPickRequisiteItems IPickValue IPrivilege IPrivilegeList IProcess IProcessFactory IProcessMessage IProgress IProperty IPropertyChangeEvent IQuery IReference IReferenceCriterion IReferenceEnabledMode IReferenceFactory IReferenceHistoryDescription IReferenceInfo IReferenceRecordCardWiza\
rdStep IReferenceRequisiteDescription IReferencesFactory IReferenceValue IRefRequisite IReport IReportFactory IRequisite IRequisiteDescription IRequisiteDescriptionList IRequisiteFactory IRichEdit IRouteStep IRule IRuleList ISchemeBlock IScript IScriptFactory ISearchCriteria ISearchCriterion ISearchDescription ISearchFactory ISearchFolderInfo ISearchForObjectDescription ISearchResultRestrictions ISecuredContext ISelectDialog IServerEvent IServerEventFactory IServiceDialog IServiceFactory ISignat\
ure ISignProvider ISignProvider2 ISignProvider3 ISimpleCriterion IStringCriterion IStringList IStringRequisite IStringRequisiteDescription IStringValue ISystemDialogsFactory ISystemInfo ITabSheet ITask ITaskAbortReasonInfo ITaskCardWizardStep ITaskDescription ITaskFactory ITaskInfo ITaskRoute ITextCriterion ITextRequisite ITextValue ITreeListSelectDialog IUser IUserList IValue IView IWebBrowserControl IWizard IWizardAction IWizardFactory IWizardFormElement IWizardParam IWizardPickParam IWizardRe\
ferenceParam IWizardStep IWorkAccessRights IWorkDescription IWorkflowAskableParam IWorkflowAskableParams IWorkflowBlock IWorkflowBlockResult IWorkflowEnabledMode IWorkflowParam IWorkflowPickParam IWorkflowReferenceParam IWorkState IWorkTreeCustomNode IWorkTreeJobNode IWorkTreeTaskNode IXMLEditorForm SBCrypto ",BUILTIN=CONSTANTS+ENUMS,CLASS2=predefined_variables,LITERAL="null true false nil ",NUMBERS={className:"number",begin:hljs.NUMBER_RE,relevance:0},STRINGS={className:"string",variants:[{begin:'\
"',end:'"'},{begin:"'",end:"'"}]},DOCTAGS={className:"doctag",begin:"\\b(?:TODO|DONE|BEGIN|END|STUB|CHG|FIXME|NOTE|BUG|XXX)\\b",relevance:0},ISBL_LINE_COMMENT_MODE={className:"comment",begin:"//",end:"$",relevance:0,contains:[hljs.PHRASAL_WORDS_MODE,DOCTAGS]},ISBL_BLOCK_COMMENT_MODE={className:"comment",begin:"/\\*",end:"\\*/",relevance:0,contains:[hljs.PHRASAL_WORDS_MODE,DOCTAGS]},COMMENTS={variants:[ISBL_LINE_COMMENT_MODE,ISBL_BLOCK_COMMENT_MODE]},KEYWORDS2={$pattern:UNDERSCORE_IDENT_RE,keyword:KEYWORD,
built_in:BUILTIN,class:CLASS2,literal:LITERAL},METHODS={begin:"\\.\\s*"+hljs.UNDERSCORE_IDENT_RE,keywords:KEYWORDS2,relevance:0},TYPES2={className:"type",begin:":[ \\t]*("+interfaces.trim().replace(/\s/g,"|")+")",end:"[ \\t]*=",excludeEnd:!0},VARIABLES={className:"variable",keywords:KEYWORDS2,begin:UNDERSCORE_IDENT_RE,relevance:0,contains:[TYPES2,METHODS]},FUNCTION_TITLE=FUNCTION_NAME_IDENT_RE+"\\(";return{name:"ISBL",case_insensitive:!0,keywords:KEYWORDS2,illegal:"\\$|\\?|%|,|;$|~|#|@|</",contains:[
{className:"function",begin:FUNCTION_TITLE,end:"\\)$",returnBegin:!0,keywords:KEYWORDS2,illegal:"[\\[\\]\\|\\$\\?%,~#@]",contains:[{className:"title",keywords:{$pattern:UNDERSCORE_IDENT_RE,built_in:system_functions},begin:FUNCTION_TITLE,end:"\\(",returnBegin:!0,excludeEnd:!0},METHODS,VARIABLES,STRINGS,NUMBERS,COMMENTS]},TYPES2,METHODS,VARIABLES,STRINGS,NUMBERS,COMMENTS]}}return isbl_1=isbl2,isbl_1}var java_1,hasRequiredJava;function requireJava(){if(hasRequiredJava)return java_1;hasRequiredJava=
1;var decimalDigits2="[0-9](_*[0-9])*",frac2=`\\.(${decimalDigits2})`,hexDigits2="[0-9a-fA-F](_*[0-9a-fA-F])*",NUMERIC2={className:"number",variants:[{begin:`(\\b(${decimalDigits2})((${frac2})|\\.)?|(${frac2}))[eE][+-]?(${decimalDigits2})[fFdD]?\\b`},{begin:`\\b(${decimalDigits2})((${frac2})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${frac2})[fFdD]?\\b`},{begin:`\\b(${decimalDigits2})[fFdD]\\b`},{begin:`\\b0[xX]((${hexDigits2})\\.?|(${hexDigits2})?\\.(${hexDigits2}))[pP][+-]?(${decimalDigits2})[fFdD\
]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${hexDigits2})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function recurRegex2(re2,substitution,depth){return depth===-1?"":re2.replace(substitution,_=>recurRegex2(re2,substitution,depth-1))}function java2(hljs){const regex=hljs.regex,JAVA_IDENT_RE="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",GENERIC_IDENT_RE=JAVA_IDENT_RE+recurRegex2("(?:<"+JAVA_IDENT_RE+"~~~(?:\\s*,\\s*"+JAVA_IDENT_RE+
"~~~)*>)?",/~~~/g,2),KEYWORDS2={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long",
"float","int","byte","short","double"],built_in:["super","this"]},ANNOTATION={className:"meta",begin:"@"+JAVA_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},PARAMS={className:"params",begin:/\(/,end:/\)/,keywords:KEYWORDS2,relevance:0,contains:[hljs.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:KEYWORDS2,illegal:/<\/|#/,contains:[hljs.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),
{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[hljs.BACKSLASH_ESCAPE]},hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,JAVA_IDENT_RE],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[regex.concat(/(?!else)/,JAVA_IDENT_RE),/\s+/,JAVA_IDENT_RE,/\s+/,/=(?!=)/],className:{1:"type",3:"v\
ariable",5:"operator"}},{begin:[/record/,/\s+/,JAVA_IDENT_RE],className:{1:"keyword",3:"title.class"},contains:[PARAMS,hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+GENERIC_IDENT_RE+"\\s+)",hljs.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:KEYWORDS2,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:KEYWORDS2,relevance:0,contains:[ANNOTATION,hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,NUMERIC2,
hljs.C_BLOCK_COMMENT_MODE]},hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE]},NUMERIC2,ANNOTATION]}}return java_1=java2,java_1}var javascript_1,hasRequiredJavascript;function requireJavascript(){if(hasRequiredJavascript)return javascript_1;hasRequiredJavascript=1;const IDENT_RE2="[A-Za-z$_][0-9A-Za-z$_]*",KEYWORDS2=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continu\
e","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],LITERALS2=["true","false","null","undefined","NaN","Infinity"],TYPES2=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayB\
uffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],ERROR_TYPES2=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],BUILT_IN_GLOBALS2=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unesca\
pe"],BUILT_IN_VARIABLES2=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],BUILT_INS2=[].concat(BUILT_IN_GLOBALS2,TYPES2,ERROR_TYPES2);function javascript2(hljs){const regex=hljs.regex,hasClosingTag=(match,{after})=>{const tag="</"+match[0].slice(1);return match.input.indexOf(tag,after)!==-1},IDENT_RE$12=IDENT_RE2,FRAGMENT={begin:"<>",end:"</>"},XML_SELF_CLOSING=/<[A-Za-z0-9\\._:-]+\s*\/>/,XML_TAG={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,
isTrulyOpeningTag:(match,response)=>{const afterMatchIndex=match[0].length+match.index,nextChar=match.input[afterMatchIndex];if(nextChar==="<"||nextChar===","){response.ignoreMatch();return}nextChar===">"&&(hasClosingTag(match,{after:afterMatchIndex})||response.ignoreMatch());let m;const afterMatch=match.input.substring(afterMatchIndex);if(m=afterMatch.match(/^\s*=/)){response.ignoreMatch();return}if((m=afterMatch.match(/^\s+extends\s+/))&&m.index===0){response.ignoreMatch();return}}},KEYWORDS$12={
$pattern:IDENT_RE2,keyword:KEYWORDS2,literal:LITERALS2,built_in:BUILT_INS2,"variable.language":BUILT_IN_VARIABLES2},decimalDigits2="[0-9](_?[0-9])*",frac2=`\\.(${decimalDigits2})`,decimalInteger="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",NUMBER={className:"number",variants:[{begin:`(\\b(${decimalInteger})((${frac2})|\\.)?|(${frac2}))[eE][+-]?(${decimalDigits2})\\b`},{begin:`\\b(${decimalInteger})\\b((${frac2})\\b|\\.)?|(${frac2})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?\
[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},SUBST={className:"subst",begin:"\\$\\{",end:"\\}",keywords:KEYWORDS$12,contains:[]},HTML_TEMPLATE={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[hljs.BACKSLASH_ESCAPE,SUBST],subLanguage:"xml"}},CSS_TEMPLATE={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[hljs.BACKSLASH_ESCAPE,SUBST],subLanguage:"css"}},GRAPHQL_TEMPLATE={begin:".?\
gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[hljs.BACKSLASH_ESCAPE,SUBST],subLanguage:"graphql"}},TEMPLATE_STRING={className:"string",begin:"`",end:"`",contains:[hljs.BACKSLASH_ESCAPE,SUBST]},COMMENT={className:"comment",variants:[hljs.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:IDENT_RE$12+
"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),hljs.C_BLOCK_COMMENT_MODE,hljs.C_LINE_COMMENT_MODE]},SUBST_INTERNALS=[hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,HTML_TEMPLATE,CSS_TEMPLATE,GRAPHQL_TEMPLATE,TEMPLATE_STRING,{match:/\$\d+/},NUMBER];SUBST.contains=SUBST_INTERNALS.concat({begin:/\{/,end:/\}/,keywords:KEYWORDS$12,contains:["self"].concat(SUBST_INTERNALS)});const SUBST_AND_COMMENTS=[].concat(COMMENT,SUBST.contains),PARAMS_CONTAINS=SUBST_AND_COMMENTS.concat(
[{begin:/(\s*)\(/,end:/\)/,keywords:KEYWORDS$12,contains:["self"].concat(SUBST_AND_COMMENTS)}]),PARAMS={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:KEYWORDS$12,contains:PARAMS_CONTAINS},CLASS_OR_EXTENDS={variants:[{match:[/class/,/\s+/,IDENT_RE$12,/\s+/,/extends/,/\s+/,regex.concat(IDENT_RE$12,"(",regex.concat(/\./,IDENT_RE$12),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,IDENT_RE$12],scope:{1:"keyw\
ord",3:"title.class"}}]},CLASS_REFERENCE={relevance:0,match:regex.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...TYPES2,...ERROR_TYPES2]}},USE_STRICT={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},FUNCTION_DEFINITION={variants:[{match:[/function/,/\s+/,IDENT_RE$12,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{
1:"keyword",3:"title.function"},label:"func.def",contains:[PARAMS],illegal:/%/},UPPER_CASE_CONSTANT={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function noneOf(list2){return regex.concat("(?!",list2.join("|"),")")}const FUNCTION_CALL={match:regex.concat(/\b/,noneOf([...BUILT_IN_GLOBALS2,"super","import"].map(x=>`${x}\\s*\\(`)),IDENT_RE$12,regex.lookahead(/\s*\(/)),className:"title.function",relevance:0},PROPERTY_ACCESS={begin:regex.concat(/\./,regex.lookahead(regex.concat(
IDENT_RE$12,/(?![0-9A-Za-z$_(])/))),end:IDENT_RE$12,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},GETTER_OR_SETTER={match:[/get|set/,/\s+/,IDENT_RE$12,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},PARAMS]},FUNC_LEAD_IN_RE="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+hljs.UNDERSCORE_IDENT_RE+")\\s*=>",FUNCTION_VARIABLE={match:[/const|var|let/,/\s+/,IDENT_RE$12,/\s*/,/=\s*/,/(async\s*)?/,regex.lookahead(FUNC_LEAD_IN_RE)],keywords:"\
async",className:{1:"keyword",3:"title.function"},contains:[PARAMS]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:KEYWORDS$12,exports:{PARAMS_CONTAINS,CLASS_REFERENCE},illegal:/#(?![$_A-z])/,contains:[hljs.SHEBANG({label:"shebang",binary:"node",relevance:5}),USE_STRICT,hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,HTML_TEMPLATE,CSS_TEMPLATE,GRAPHQL_TEMPLATE,TEMPLATE_STRING,COMMENT,{match:/\$\d+/},NUMBER,CLASS_REFERENCE,{scope:"attr",match:IDENT_RE$12+regex.lookahead(":"),relevance:0},
FUNCTION_VARIABLE,{begin:"("+hljs.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[COMMENT,hljs.REGEXP_MODE,{className:"function",begin:FUNC_LEAD_IN_RE,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:hljs.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:KEYWORDS$12,contains:PARAMS_CONTAINS}]}]},{begin:/,/,relevance:0},{match:/\s+/,
relevance:0},{variants:[{begin:FRAGMENT.begin,end:FRAGMENT.end},{match:XML_SELF_CLOSING},{begin:XML_TAG.begin,"on:begin":XML_TAG.isTrulyOpeningTag,end:XML_TAG.end}],subLanguage:"xml",contains:[{begin:XML_TAG.begin,end:XML_TAG.end,skip:!0,contains:["self"]}]}]},FUNCTION_DEFINITION,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+hljs.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[PARAMS,hljs.inherit(
hljs.TITLE_MODE,{begin:IDENT_RE$12,className:"title.function"})]},{match:/\.\.\./,relevance:0},PROPERTY_ACCESS,{match:"\\$"+IDENT_RE$12,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[PARAMS]},FUNCTION_CALL,UPPER_CASE_CONSTANT,CLASS_OR_EXTENDS,GETTER_OR_SETTER,{match:/\$[(.]/}]}}return javascript_1=javascript2,javascript_1}var jbossCli_1,hasRequiredJbossCli;function requireJbossCli(){if(hasRequiredJbossCli)return jbossCli_1;hasRequiredJbossCli=1;function jbossCli2(hljs){
const PARAMSBLOCK={className:"params",begin:/\(/,end:/\)/,contains:[{begin:/[\w-]+ *=/,returnBegin:!0,relevance:0,contains:[{className:"attr",begin:/[\w-]+/}]}],relevance:0},OPERATION={className:"function",begin:/:[\w\-.]+/,relevance:0},PATH={className:"string",begin:/\B([\/.])[\w\-.\/=]+/},COMMAND_PARAMS={className:"params",begin:/--[\w\-=\/]+/};return{name:"JBoss CLI",aliases:["wildfly-cli"],keywords:{$pattern:"[a-z-]+",keyword:"alias batch cd clear command connect connection-factory connectio\
n-info data-source deploy deployment-info deployment-overlay echo echo-dmr help history if jdbc-driver-info jms-queue|20 jms-topic|20 ls patch pwd quit read-attribute read-operation reload rollout-plan run-batch set shutdown try unalias undeploy unset version xa-data-source",literal:"true false"},contains:[hljs.HASH_COMMENT_MODE,hljs.QUOTE_STRING_MODE,COMMAND_PARAMS,OPERATION,PATH,PARAMSBLOCK]}}return jbossCli_1=jbossCli2,jbossCli_1}var json_1,hasRequiredJson;function requireJson(){if(hasRequiredJson)
return json_1;hasRequiredJson=1;function json2(hljs){const ATTRIBUTE={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},PUNCTUATION={match:/[{}[\],:]/,className:"punctuation",relevance:0},LITERALS2=["true","false","null"],LITERALS_MODE={scope:"literal",beginKeywords:LITERALS2.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:LITERALS2},contains:[ATTRIBUTE,PUNCTUATION,hljs.QUOTE_STRING_MODE,LITERALS_MODE,hljs.C_NUMBER_MODE,hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE],
illegal:"\\S"}}return json_1=json2,json_1}var julia_1,hasRequiredJulia;function requireJulia(){if(hasRequiredJulia)return julia_1;hasRequiredJulia=1;function julia2(hljs){const VARIABLE_NAME_RE="[A-Za-z_\\u00A1-\\uFFFF][A-Za-z_0-9\\u00A1-\\uFFFF]*",KEYWORDS2={$pattern:VARIABLE_NAME_RE,keyword:["baremodule","begin","break","catch","ccall","const","continue","do","else","elseif","end","export","false","finally","for","function","global","if","import","in","isa","let","local","macro","module","quot\
e","return","true","try","using","where","while"],literal:["ARGS","C_NULL","DEPOT_PATH","ENDIAN_BOM","ENV","Inf","Inf16","Inf32","Inf64","InsertionSort","LOAD_PATH","MergeSort","NaN","NaN16","NaN32","NaN64","PROGRAM_FILE","QuickSort","RoundDown","RoundFromZero","RoundNearest","RoundNearestTiesAway","RoundNearestTiesUp","RoundToZero","RoundUp","VERSION|0","devnull","false","im","missing","nothing","pi","stderr","stdin","stdout","true","undef","π","ℯ"],built_in:["AbstractArray","AbstractChannel",
"AbstractChar","AbstractDict","AbstractDisplay","AbstractFloat","AbstractIrrational","AbstractMatrix","AbstractRange","AbstractSet","AbstractString","AbstractUnitRange","AbstractVecOrMat","AbstractVector","Any","ArgumentError","Array","AssertionError","BigFloat","BigInt","BitArray","BitMatrix","BitSet","BitVector","Bool","BoundsError","CapturedException","CartesianIndex","CartesianIndices","Cchar","Cdouble","Cfloat","Channel","Char","Cint","Cintmax_t","Clong","Clonglong","Cmd","Colon","Complex",
"ComplexF16","ComplexF32","ComplexF64","CompositeException","Condition","Cptrdiff_t","Cshort","Csize_t","Cssize_t","Cstring","Cuchar","Cuint","Cuintmax_t","Culong","Culonglong","Cushort","Cvoid","Cwchar_t","Cwstring","DataType","DenseArray","DenseMatrix","DenseVecOrMat","DenseVector","Dict","DimensionMismatch","Dims","DivideError","DomainError","EOFError","Enum","ErrorException","Exception","ExponentialBackOff","Expr","Float16","Float32","Float64","Function","GlobalRef","HTML","IO","IOBuffer","I\
OContext","IOStream","IdDict","IndexCartesian","IndexLinear","IndexStyle","InexactError","InitError","Int","Int128","Int16","Int32","Int64","Int8","Integer","InterruptException","InvalidStateException","Irrational","KeyError","LinRange","LineNumberNode","LinearIndices","LoadError","MIME","Matrix","Method","MethodError","Missing","MissingException","Module","NTuple","NamedTuple","Nothing","Number","OrdinalRange","OutOfMemoryError","OverflowError","Pair","PartialQuickSort","PermutedDimsArray","Pip\
e","ProcessFailedException","Ptr","QuoteNode","Rational","RawFD","ReadOnlyMemoryError","Real","ReentrantLock","Ref","Regex","RegexMatch","RoundingMode","SegmentationFault","Set","Signed","Some","StackOverflowError","StepRange","StepRangeLen","StridedArray","StridedMatrix","StridedVecOrMat","StridedVector","String","StringIndexError","SubArray","SubString","SubstitutionString","Symbol","SystemError","Task","TaskFailedException","Text","TextDisplay","Timer","Tuple","Type","TypeError","TypeVar","UI\
nt","UInt128","UInt16","UInt32","UInt64","UInt8","UndefInitializer","UndefKeywordError","UndefRefError","UndefVarError","Union","UnionAll","UnitRange","Unsigned","Val","Vararg","VecElement","VecOrMat","Vector","VersionNumber","WeakKeyDict","WeakRef"]},DEFAULT={keywords:KEYWORDS2,illegal:/<\//},NUMBER={className:"number",begin:/(\b0x[\d_]*(\.[\d_]*)?|0x\.\d[\d_]*)p[-+]?\d+|\b0[box][a-fA-F0-9][a-fA-F0-9_]*|(\b\d[\d_]*(\.[\d_]*)?|\.\d[\d_]*)([eEfF][-+]?\d+)?/,relevance:0},CHAR={className:"string",begin:/'(.|\\[xXuU][a-zA-Z0-9]+)'/},
INTERPOLATION={className:"subst",begin:/\$\(/,end:/\)/,keywords:KEYWORDS2},INTERPOLATED_VARIABLE={className:"variable",begin:"\\$"+VARIABLE_NAME_RE},STRING={className:"string",contains:[hljs.BACKSLASH_ESCAPE,INTERPOLATION,INTERPOLATED_VARIABLE],variants:[{begin:/\w*"""/,end:/"""\w*/,relevance:10},{begin:/\w*"/,end:/"\w*/}]},COMMAND={className:"string",contains:[hljs.BACKSLASH_ESCAPE,INTERPOLATION,INTERPOLATED_VARIABLE],begin:"`",end:"`"},MACROCALL={className:"meta",begin:"@"+VARIABLE_NAME_RE},COMMENT={
className:"comment",variants:[{begin:"#=",end:"=#",relevance:10},{begin:"#",end:"$"}]};return DEFAULT.name="Julia",DEFAULT.contains=[NUMBER,CHAR,STRING,COMMAND,MACROCALL,COMMENT,hljs.HASH_COMMENT_MODE,{className:"keyword",begin:"\\b(((abstract|primitive)\\s+)type|(mutable\\s+)?struct)\\b"},{begin:/<:/}],INTERPOLATION.contains=DEFAULT.contains,DEFAULT}return julia_1=julia2,julia_1}var juliaRepl_1,hasRequiredJuliaRepl;function requireJuliaRepl(){if(hasRequiredJuliaRepl)return juliaRepl_1;hasRequiredJuliaRepl=
1;function juliaRepl2(hljs){return{name:"Julia REPL",contains:[{className:"meta.prompt",begin:/^julia>/,relevance:10,starts:{end:/^(?![ ]{6})/,subLanguage:"julia"}}],aliases:["jldoctest"]}}return juliaRepl_1=juliaRepl2,juliaRepl_1}var kotlin_1,hasRequiredKotlin;function requireKotlin(){if(hasRequiredKotlin)return kotlin_1;hasRequiredKotlin=1;var decimalDigits2="[0-9](_*[0-9])*",frac2=`\\.(${decimalDigits2})`,hexDigits2="[0-9a-fA-F](_*[0-9a-fA-F])*",NUMERIC2={className:"number",variants:[{begin:`\
(\\b(${decimalDigits2})((${frac2})|\\.)?|(${frac2}))[eE][+-]?(${decimalDigits2})[fFdD]?\\b`},{begin:`\\b(${decimalDigits2})((${frac2})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${frac2})[fFdD]?\\b`},{begin:`\\b(${decimalDigits2})[fFdD]\\b`},{begin:`\\b0[xX]((${hexDigits2})\\.?|(${hexDigits2})?\\.(${hexDigits2}))[pP][+-]?(${decimalDigits2})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${hexDigits2})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\\
b"}],relevance:0};function kotlin2(hljs){const KEYWORDS2={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean\
 Float Double Void Unit Nothing",literal:"true false null"},KEYWORDS_WITH_LABEL={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},LABEL={className:"symbol",begin:hljs.UNDERSCORE_IDENT_RE+"@"},SUBST={className:"subst",begin:/\$\{/,end:/\}/,contains:[hljs.C_NUMBER_MODE]},VARIABLE={className:"variable",begin:"\\$"+hljs.UNDERSCORE_IDENT_RE},STRING={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[VARIABLE,SUBST]},
{begin:"'",end:"'",illegal:/\n/,contains:[hljs.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[hljs.BACKSLASH_ESCAPE,VARIABLE,SUBST]}]};SUBST.contains.push(STRING);const ANNOTATION_USE_SITE={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+hljs.UNDERSCORE_IDENT_RE+")?"},ANNOTATION={className:"meta",begin:"@"+hljs.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[hljs.inherit(STRING,{className:"string"}),"self"]}]},KOTLIN_NUMBER_MODE=NUMERIC2,
KOTLIN_NESTED_COMMENT=hljs.COMMENT("/\\*","\\*/",{contains:[hljs.C_BLOCK_COMMENT_MODE]}),KOTLIN_PAREN_TYPE={variants:[{className:"type",begin:hljs.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},KOTLIN_PAREN_TYPE2=KOTLIN_PAREN_TYPE;return KOTLIN_PAREN_TYPE2.variants[1].contains=[KOTLIN_PAREN_TYPE],KOTLIN_PAREN_TYPE.variants[1].contains=[KOTLIN_PAREN_TYPE2],{name:"Kotlin",aliases:["kt","kts"],keywords:KEYWORDS2,contains:[hljs.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"do\
ctag",begin:"@[A-Za-z]+"}]}),hljs.C_LINE_COMMENT_MODE,KOTLIN_NESTED_COMMENT,KEYWORDS_WITH_LABEL,LABEL,ANNOTATION_USE_SITE,ANNOTATION,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:KEYWORDS2,relevance:5,contains:[{begin:hljs.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[hljs.UNDERSCORE_TITLE_MODE]},{className:"type",begin:/</,end:/>/,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:KEYWORDS2,
relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[KOTLIN_PAREN_TYPE,hljs.C_LINE_COMMENT_MODE,KOTLIN_NESTED_COMMENT],relevance:0},hljs.C_LINE_COMMENT_MODE,KOTLIN_NESTED_COMMENT,ANNOTATION_USE_SITE,ANNOTATION,STRING,hljs.C_NUMBER_MODE]},KOTLIN_NESTED_COMMENT]},{begin:[/class|interface|trait/,/\s+/,hljs.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public \
protected internal private constructor"},hljs.UNDERSCORE_TITLE_MODE,{className:"type",begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},ANNOTATION_USE_SITE,ANNOTATION]},STRING,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:`
`},KOTLIN_NUMBER_MODE]}}return kotlin_1=kotlin2,kotlin_1}var lasso_1,hasRequiredLasso;function requireLasso(){if(hasRequiredLasso)return lasso_1;hasRequiredLasso=1;function lasso2(hljs){const LASSO_IDENT_RE="[a-zA-Z_][\\w.]*",LASSO_ANGLE_RE="<\\?(lasso(script)?|=)",LASSO_CLOSE_RE="\\]|\\?>",LASSO_KEYWORDS={$pattern:LASSO_IDENT_RE+"|&[lg]t;",literal:"true false none minimal full all void and or not bw nbw ew new cn ncn lt lte gt gte eq neq rx nrx ft",built_in:"array date decimal duration integer \
map pair string tag xml null boolean bytes keyword list locale queue set stack staticarray local var variable global data self inherited currentcapture givenblock",keyword:"cache database_names database_schemanames database_tablenames define_tag define_type email_batch encode_set html_comment handle handle_error header if inline iterate ljax_target link link_currentaction link_currentgroup link_currentrecord link_detail link_firstgroup link_firstrecord link_lastgroup link_lastrecord link_nextgro\
up link_nextrecord link_prevgroup link_prevrecord log loop namespace_using output_none portal private protect records referer referrer repeating resultset rows search_args search_arguments select sort_args sort_arguments thread_atomic value_list while abort case else fail_if fail_ifnot fail if_empty if_false if_null if_true loop_abort loop_continue loop_count params params_up return return_value run_children soap_definetag soap_lastrequest soap_lastresponse tag_name ascending average by define d\
escending do equals frozen group handle_failure import in into join let match max min on order parent protected provide public require returnhome skip split_thread sum take thread to trait type where with yield yieldhome"},HTML_COMMENT=hljs.COMMENT("<!--","-->",{relevance:0}),LASSO_NOPROCESS={className:"meta",begin:"\\[noprocess\\]",starts:{end:"\\[/noprocess\\]",returnEnd:!0,contains:[HTML_COMMENT]}},LASSO_START={className:"meta",begin:"\\[/noprocess|"+LASSO_ANGLE_RE},LASSO_DATAMEMBER={className:"\
symbol",begin:"'"+LASSO_IDENT_RE+"'"},LASSO_CODE=[hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.inherit(hljs.C_NUMBER_MODE,{begin:hljs.C_NUMBER_RE+"|(-?infinity|NaN)\\b"}),hljs.inherit(hljs.APOS_STRING_MODE,{illegal:null}),hljs.inherit(hljs.QUOTE_STRING_MODE,{illegal:null}),{className:"string",begin:"`",end:"`"},{variants:[{begin:"[#$]"+LASSO_IDENT_RE},{begin:"#",end:"\\d+",illegal:"\\W"}]},{className:"type",begin:"::\\s*",end:LASSO_IDENT_RE,illegal:"\\W"},{className:"params",variants:[
{begin:"-(?!infinity)"+LASSO_IDENT_RE,relevance:0},{begin:"(\\.\\.\\.)"}]},{begin:/(->|\.)\s*/,relevance:0,contains:[LASSO_DATAMEMBER]},{className:"class",beginKeywords:"define",returnEnd:!0,end:"\\(|=>",contains:[hljs.inherit(hljs.TITLE_MODE,{begin:LASSO_IDENT_RE+"(=(?!>))?|[-+*/%](?!>)"})]}];return{name:"Lasso",aliases:["ls","lassoscript"],case_insensitive:!0,keywords:LASSO_KEYWORDS,contains:[{className:"meta",begin:LASSO_CLOSE_RE,relevance:0,starts:{end:"\\[|"+LASSO_ANGLE_RE,returnEnd:!0,relevance:0,
contains:[HTML_COMMENT]}},LASSO_NOPROCESS,LASSO_START,{className:"meta",begin:"\\[no_square_brackets",starts:{end:"\\[/no_square_brackets\\]",keywords:LASSO_KEYWORDS,contains:[{className:"meta",begin:LASSO_CLOSE_RE,relevance:0,starts:{end:"\\[noprocess\\]|"+LASSO_ANGLE_RE,returnEnd:!0,contains:[HTML_COMMENT]}},LASSO_NOPROCESS,LASSO_START].concat(LASSO_CODE)}},{className:"meta",begin:"\\[",relevance:0},{className:"meta",begin:"^#!",end:"lasso9$",relevance:10}].concat(LASSO_CODE)}}return lasso_1=lasso2,
lasso_1}var latex_1,hasRequiredLatex;function requireLatex(){if(hasRequiredLatex)return latex_1;hasRequiredLatex=1;function latex2(hljs){const KNOWN_CONTROL_WORDS=hljs.regex.either(...["(?:NeedsTeXFormat|RequirePackage|GetIdInfo)","Provides(?:Expl)?(?:Package|Class|File)","(?:DeclareOption|ProcessOptions)","(?:documentclass|usepackage|input|include)","makeat(?:letter|other)","ExplSyntax(?:On|Off)","(?:new|renew|provide)?command","(?:re)newenvironment","(?:New|Renew|Provide|Declare)(?:Expandable)\
?DocumentCommand","(?:New|Renew|Provide|Declare)DocumentEnvironment","(?:(?:e|g|x)?def|let)","(?:begin|end)","(?:part|chapter|(?:sub){0,2}section|(?:sub)?paragraph)","caption","(?:label|(?:eq|page|name)?ref|(?:paren|foot|super)?cite)","(?:alpha|beta|[Gg]amma|[Dd]elta|(?:var)?epsilon|zeta|eta|[Tt]heta|vartheta)","(?:iota|(?:var)?kappa|[Ll]ambda|mu|nu|[Xx]i|[Pp]i|varpi|(?:var)rho)","(?:[Ss]igma|varsigma|tau|[Uu]psilon|[Pp]hi|varphi|chi|[Pp]si|[Oo]mega)","(?:frac|sum|prod|lim|infty|times|sqrt|leq|g\
eq|left|right|middle|[bB]igg?)","(?:[lr]angle|q?quad|[lcvdi]?dots|d?dot|hat|tilde|bar)"].map(word=>word+"(?![a-zA-Z@:_])")),L3_REGEX=new RegExp(["(?:__)?[a-zA-Z]{2,}_[a-zA-Z](?:_?[a-zA-Z])+:[a-zA-Z]*","[lgc]__?[a-zA-Z](?:_?[a-zA-Z])*_[a-zA-Z]{2,}","[qs]__?[a-zA-Z](?:_?[a-zA-Z])+","use(?:_i)?:[a-zA-Z]*","(?:else|fi|or):","(?:if|cs|exp):w","(?:hbox|vbox):n","::[a-zA-Z]_unbraced","::[a-zA-Z:]"].map(pattern2=>pattern2+"(?![a-zA-Z:_])").join("|")),L2_VARIANTS=[{begin:/[a-zA-Z@]+/},{begin:/[^a-zA-Z@]?/}],
DOUBLE_CARET_VARIANTS=[{begin:/\^{6}[0-9a-f]{6}/},{begin:/\^{5}[0-9a-f]{5}/},{begin:/\^{4}[0-9a-f]{4}/},{begin:/\^{3}[0-9a-f]{3}/},{begin:/\^{2}[0-9a-f]{2}/},{begin:/\^{2}[\u0000-\u007f]/}],CONTROL_SEQUENCE={className:"keyword",begin:/\\/,relevance:0,contains:[{endsParent:!0,begin:KNOWN_CONTROL_WORDS},{endsParent:!0,begin:L3_REGEX},{endsParent:!0,variants:DOUBLE_CARET_VARIANTS},{endsParent:!0,relevance:0,variants:L2_VARIANTS}]},MACRO_PARAM={className:"params",relevance:0,begin:/#+\d?/},DOUBLE_CARET_CHAR={
variants:DOUBLE_CARET_VARIANTS},SPECIAL_CATCODE={className:"built_in",relevance:0,begin:/[$&^_]/},MAGIC_COMMENT={className:"meta",begin:/% ?!(T[eE]X|tex|BIB|bib)/,end:"$",relevance:10},COMMENT=hljs.COMMENT("%","$",{relevance:0}),EVERYTHING_BUT_VERBATIM=[CONTROL_SEQUENCE,MACRO_PARAM,DOUBLE_CARET_CHAR,SPECIAL_CATCODE,MAGIC_COMMENT,COMMENT],BRACE_GROUP_NO_VERBATIM={begin:/\{/,end:/\}/,relevance:0,contains:["self",...EVERYTHING_BUT_VERBATIM]},ARGUMENT_BRACES=hljs.inherit(BRACE_GROUP_NO_VERBATIM,{relevance:0,
endsParent:!0,contains:[BRACE_GROUP_NO_VERBATIM,...EVERYTHING_BUT_VERBATIM]}),ARGUMENT_BRACKETS={begin:/\[/,end:/\]/,endsParent:!0,relevance:0,contains:[BRACE_GROUP_NO_VERBATIM,...EVERYTHING_BUT_VERBATIM]},SPACE_GOBBLER={begin:/\s+/,relevance:0},ARGUMENT_M=[ARGUMENT_BRACES],ARGUMENT_O=[ARGUMENT_BRACKETS],ARGUMENT_AND_THEN=function(arg,starts_mode){return{contains:[SPACE_GOBBLER],starts:{relevance:0,contains:arg,starts:starts_mode}}},CSNAME=function(csname,starts_mode){return{begin:"\\\\"+csname+
"(?![a-zA-Z@:_])",keywords:{$pattern:/\\[a-zA-Z]+/,keyword:"\\"+csname},relevance:0,contains:[SPACE_GOBBLER],starts:starts_mode}},BEGIN_ENV=function(envname,starts_mode){return hljs.inherit({begin:"\\\\begin(?=[ 	]*(\\r?\\n[ 	]*)?\\{"+envname+"\\})",keywords:{$pattern:/\\[a-zA-Z]+/,keyword:"\\begin"},relevance:0},ARGUMENT_AND_THEN(ARGUMENT_M,starts_mode))},VERBATIM_DELIMITED_EQUAL=(innerName="string")=>hljs.END_SAME_AS_BEGIN({className:innerName,begin:/(.|\r?\n)/,end:/(.|\r?\n)/,excludeBegin:!0,
excludeEnd:!0,endsParent:!0}),VERBATIM_DELIMITED_ENV=function(envname){return{className:"string",end:"(?=\\\\end\\{"+envname+"\\})"}},VERBATIM_DELIMITED_BRACES=(innerName="string")=>({relevance:0,begin:/\{/,starts:{endsParent:!0,contains:[{className:innerName,end:/(?=\})/,endsParent:!0,contains:[{begin:/\{/,end:/\}/,relevance:0,contains:["self"]}]}]}}),VERBATIM=[...["verb","lstinline"].map(csname=>CSNAME(csname,{contains:[VERBATIM_DELIMITED_EQUAL()]})),CSNAME("mint",ARGUMENT_AND_THEN(ARGUMENT_M,
{contains:[VERBATIM_DELIMITED_EQUAL()]})),CSNAME("mintinline",ARGUMENT_AND_THEN(ARGUMENT_M,{contains:[VERBATIM_DELIMITED_BRACES(),VERBATIM_DELIMITED_EQUAL()]})),CSNAME("url",{contains:[VERBATIM_DELIMITED_BRACES("link"),VERBATIM_DELIMITED_BRACES("link")]}),CSNAME("hyperref",{contains:[VERBATIM_DELIMITED_BRACES("link")]}),CSNAME("href",ARGUMENT_AND_THEN(ARGUMENT_O,{contains:[VERBATIM_DELIMITED_BRACES("link")]})),...[].concat(...["","\\*"].map(suffix=>[BEGIN_ENV("verbatim"+suffix,VERBATIM_DELIMITED_ENV(
"verbatim"+suffix)),BEGIN_ENV("filecontents"+suffix,ARGUMENT_AND_THEN(ARGUMENT_M,VERBATIM_DELIMITED_ENV("filecontents"+suffix))),...["","B","L"].map(prefix=>BEGIN_ENV(prefix+"Verbatim"+suffix,ARGUMENT_AND_THEN(ARGUMENT_O,VERBATIM_DELIMITED_ENV(prefix+"Verbatim"+suffix))))])),BEGIN_ENV("minted",ARGUMENT_AND_THEN(ARGUMENT_O,ARGUMENT_AND_THEN(ARGUMENT_M,VERBATIM_DELIMITED_ENV("minted"))))];return{name:"LaTeX",aliases:["tex"],contains:[...VERBATIM,...EVERYTHING_BUT_VERBATIM]}}return latex_1=latex2,latex_1}
var ldif_1,hasRequiredLdif;function requireLdif(){if(hasRequiredLdif)return ldif_1;hasRequiredLdif=1;function ldif2(hljs){return{name:"LDIF",contains:[{className:"attribute",match:"^dn(?=:)",relevance:10},{className:"attribute",match:"^\\w+(?=:)"},{className:"literal",match:"^-"},hljs.HASH_COMMENT_MODE]}}return ldif_1=ldif2,ldif_1}var leaf_1,hasRequiredLeaf;function requireLeaf(){if(hasRequiredLeaf)return leaf_1;hasRequiredLeaf=1;function leaf2(hljs){const IDENT=/([A-Za-z_][A-Za-z_0-9]*)?/,PARAMS={
scope:"params",begin:/\(/,end:/\)(?=\:?)/,endsParent:!0,relevance:7,contains:[{scope:"string",begin:'"',end:'"'},{scope:"keyword",match:["true","false","in"].join("|")},{scope:"variable",match:/[A-Za-z_][A-Za-z_0-9]*/},{scope:"operator",match:/\+|\-|\*|\/|\%|\=\=|\=|\!|\>|\<|\&\&|\|\|/}]},INSIDE_DISPATCH={match:[IDENT,/(?=\()/],scope:{1:"keyword"},contains:[PARAMS]};return PARAMS.contains.unshift(INSIDE_DISPATCH),{name:"Leaf",contains:[{match:[/#+/,IDENT,/(?=\()/],scope:{1:"punctuation",2:"keywo\
rd"},starts:{contains:[{match:/\:/,scope:"punctuation"}]},contains:[PARAMS]},{match:[/#+/,IDENT,/:?/],scope:{1:"punctuation",2:"keyword",3:"punctuation"}}]}}return leaf_1=leaf2,leaf_1}var less_1,hasRequiredLess;function requireLess(){if(hasRequiredLess)return less_1;hasRequiredLess=1;const MODES2=hljs=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:hljs.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"\
built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:hljs.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),HTML_TAGS2=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas",
"caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],SVG_TAGS2=["defs","g","m\
arker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],TAGS2=[...HTML_TAGS2,...SVG_TAGS2],MEDIA_FEATURES2=[
"any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),PSEUDO_CLASSES2=[
"active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","pas\
t","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),PSEUDO_ELEMENTS2=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),ATTRIBUTES2=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-com\
position","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position",
"background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","borde\
r-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline\
-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex\
-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block\
-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrin\
k","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-va\
riant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","he\
ight","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-styl\
e-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","m\
ask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outlin\
e-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right",
"padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end",
"scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop",
"scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine\
-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-\
scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range",
"voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse(),PSEUDO_SELECTORS2=PSEUDO_CLASSES2.concat(PSEUDO_ELEMENTS2).sort().reverse();function less2(hljs){const modes2=MODES2(hljs),PSEUDO_SELECTORS$1=PSEUDO_SELECTORS2,AT_MODIFIERS="and or not only",IDENT_RE2="[\\w-]+",INTERP_IDENT_RE="("+IDENT_RE2+"|@\\{"+IDENT_RE2+"\\})",RULES=[],VALUE_MODES=[],STRING_MODE=function(c2){
return{className:"string",begin:"~?"+c2+".*?"+c2}},IDENT_MODE=function(name,begin,relevance){return{className:name,begin,relevance}},AT_KEYWORDS={$pattern:/[a-z-]+/,keyword:AT_MODIFIERS,attribute:MEDIA_FEATURES2.join(" ")},PARENS_MODE={begin:"\\(",end:"\\)",contains:VALUE_MODES,keywords:AT_KEYWORDS,relevance:0};VALUE_MODES.push(hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,STRING_MODE("'"),STRING_MODE('"'),modes2.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\
\\n]",excludeEnd:!0}},modes2.HEXCOLOR,PARENS_MODE,IDENT_MODE("variable","@@?"+IDENT_RE2,10),IDENT_MODE("variable","@\\{"+IDENT_RE2+"\\}"),IDENT_MODE("built_in","~?`[^`]*?`"),{className:"attribute",begin:IDENT_RE2+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},modes2.IMPORTANT,{beginKeywords:"and not"},modes2.FUNCTION_DISPATCH);const VALUE_WITH_RULESETS=VALUE_MODES.concat({begin:/\{/,end:/\}/,contains:RULES}),MIXIN_GUARD_MODE={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and no\
t"}].concat(VALUE_MODES)},RULE_MODE={begin:INTERP_IDENT_RE+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},modes2.CSS_VARIABLE,{className:"attribute",begin:"\\b("+ATTRIBUTES2.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:VALUE_MODES}}]},AT_RULE_MODE={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:AT_KEYWORDS,
returnEnd:!0,contains:VALUE_MODES,relevance:0}},VAR_RULE_MODE={className:"variable",variants:[{begin:"@"+IDENT_RE2+"\\s*:",relevance:15},{begin:"@"+IDENT_RE2}],starts:{end:"[;}]",returnEnd:!0,contains:VALUE_WITH_RULESETS}},SELECTOR_MODE={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:INTERP_IDENT_RE,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,MIXIN_GUARD_MODE,IDENT_MODE("keyword","all\\b"),IDENT_MODE("vari\
able","@\\{"+IDENT_RE2+"\\}"),{begin:"\\b("+TAGS2.join("|")+")\\b",className:"selector-tag"},modes2.CSS_NUMBER_MODE,IDENT_MODE("selector-tag",INTERP_IDENT_RE,0),IDENT_MODE("selector-id","#"+INTERP_IDENT_RE),IDENT_MODE("selector-class","\\."+INTERP_IDENT_RE,0),IDENT_MODE("selector-tag","&",0),modes2.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+PSEUDO_CLASSES2.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+PSEUDO_ELEMENTS2.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,
contains:VALUE_WITH_RULESETS},{begin:"!important"},modes2.FUNCTION_DISPATCH]},PSEUDO_SELECTOR_MODE={begin:IDENT_RE2+`:(:)?(${PSEUDO_SELECTORS$1.join("|")})`,returnBegin:!0,contains:[SELECTOR_MODE]};return RULES.push(hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,AT_RULE_MODE,VAR_RULE_MODE,PSEUDO_SELECTOR_MODE,RULE_MODE,SELECTOR_MODE,MIXIN_GUARD_MODE,modes2.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:RULES}}return less_1=less2,less_1}var lisp_1,hasRequiredLisp;
function requireLisp(){if(hasRequiredLisp)return lisp_1;hasRequiredLisp=1;function lisp2(hljs){const LISP_IDENT_RE="[a-zA-Z_\\-+\\*\\/<=>&#][a-zA-Z0-9_\\-+*\\/<=>&#!]*",MEC_RE="\\|[^]*?\\|",LISP_SIMPLE_NUMBER_RE="(-|\\+)?\\d+(\\.\\d+|\\/\\d+)?((d|e|f|l|s|D|E|F|L|S)(\\+|-)?\\d+)?",LITERAL={className:"literal",begin:"\\b(t{1}|nil)\\b"},NUMBER={className:"number",variants:[{begin:LISP_SIMPLE_NUMBER_RE,relevance:0},{begin:"#(b|B)[0-1]+(/[0-1]+)?"},{begin:"#(o|O)[0-7]+(/[0-7]+)?"},{begin:"#(x|X)[0-9a\
-fA-F]+(/[0-9a-fA-F]+)?"},{begin:"#(c|C)\\("+LISP_SIMPLE_NUMBER_RE+" +"+LISP_SIMPLE_NUMBER_RE,end:"\\)"}]},STRING=hljs.inherit(hljs.QUOTE_STRING_MODE,{illegal:null}),COMMENT=hljs.COMMENT(";","$",{relevance:0}),VARIABLE={begin:"\\*",end:"\\*"},KEYWORD={className:"symbol",begin:"[:&]"+LISP_IDENT_RE},IDENT={begin:LISP_IDENT_RE,relevance:0},MEC={begin:MEC_RE},QUOTED={contains:[NUMBER,STRING,VARIABLE,KEYWORD,{begin:"\\(",end:"\\)",contains:["self",LITERAL,STRING,NUMBER,IDENT]},IDENT],variants:[{begin:"\
['`]\\(",end:"\\)"},{begin:"\\(quote ",end:"\\)",keywords:{name:"quote"}},{begin:"'"+MEC_RE}]},QUOTED_ATOM={variants:[{begin:"'"+LISP_IDENT_RE},{begin:"#'"+LISP_IDENT_RE+"(::"+LISP_IDENT_RE+")*"}]},LIST={begin:"\\(\\s*",end:"\\)"},BODY={endsWithParent:!0,relevance:0};return LIST.contains=[{className:"name",variants:[{begin:LISP_IDENT_RE,relevance:0},{begin:MEC_RE}]},BODY],BODY.contains=[QUOTED,QUOTED_ATOM,LIST,LITERAL,NUMBER,STRING,COMMENT,VARIABLE,KEYWORD,MEC,IDENT],{name:"Lisp",illegal:/\S/,contains:[
NUMBER,hljs.SHEBANG(),LITERAL,STRING,COMMENT,QUOTED,QUOTED_ATOM,LIST,IDENT]}}return lisp_1=lisp2,lisp_1}var livecodeserver_1,hasRequiredLivecodeserver;function requireLivecodeserver(){if(hasRequiredLivecodeserver)return livecodeserver_1;hasRequiredLivecodeserver=1;function livecodeserver2(hljs){const VARIABLE={className:"variable",variants:[{begin:"\\b([gtps][A-Z]{1}[a-zA-Z0-9]*)(\\[.+\\])?(?:\\s*?)"},{begin:"\\$_[A-Z]+"}],relevance:0},COMMENT_MODES=[hljs.C_BLOCK_COMMENT_MODE,hljs.HASH_COMMENT_MODE,
hljs.COMMENT("--","$"),hljs.COMMENT("[^:]//","$")],TITLE1=hljs.inherit(hljs.TITLE_MODE,{variants:[{begin:"\\b_*rig[A-Z][A-Za-z0-9_\\-]*"},{begin:"\\b_[a-z0-9\\-]+"}]}),TITLE2=hljs.inherit(hljs.TITLE_MODE,{begin:"\\b([A-Za-z0-9_\\-]+)\\b"});return{name:"LiveCode",case_insensitive:!1,keywords:{keyword:"$_COOKIE $_FILES $_GET $_GET_BINARY $_GET_RAW $_POST $_POST_BINARY $_POST_RAW $_SESSION $_SERVER codepoint codepoints segment segments codeunit codeunits sentence sentences trueWord trueWords paragr\
aph after byte bytes english the until http forever descending using line real8 with seventh for stdout finally element word words fourth before black ninth sixth characters chars stderr uInt1 uInt1s uInt2 uInt2s stdin string lines relative rel any fifth items from middle mid at else of catch then third it file milliseconds seconds second secs sec int1 int1s int4 int4s internet int2 int2s normal text item last long detailed effective uInt4 uInt4s repeat end repeat URL in try into switch to words\
 https token binfile each tenth as ticks tick system real4 by dateItems without char character ascending eighth whole dateTime numeric short first ftp integer abbreviated abbr abbrev private case while if div mod wrap and or bitAnd bitNot bitOr bitXor among not in a an within contains ends with begins the keys of keys",literal:"SIX TEN FORMFEED NINE ZERO NONE SPACE FOUR FALSE COLON CRLF PI COMMA ENDOFFILE EOF EIGHT FIVE QUOTE EMPTY ONE TRUE RETURN CR LINEFEED RIGHT BACKSLASH NULL SEVEN TAB THREE\
 TWO six ten formfeed nine zero none space four false colon crlf pi comma endoffile eof eight five quote empty one true return cr linefeed right backslash null seven tab three two RIVERSION RISTATE FILE_READ_MODE FILE_WRITE_MODE FILE_WRITE_MODE DIR_WRITE_MODE FILE_READ_UMASK FILE_WRITE_UMASK DIR_READ_UMASK DIR_WRITE_UMASK",built_in:"put abs acos aliasReference annuity arrayDecode arrayEncode asin atan atan2 average avg avgDev base64Decode base64Encode baseConvert binaryDecode binaryEncode byteOf\
fset byteToNum cachedURL cachedURLs charToNum cipherNames codepointOffset codepointProperty codepointToNum codeunitOffset commandNames compound compress constantNames cos date dateFormat decompress difference directories diskSpace DNSServers exp exp1 exp2 exp10 extents files flushEvents folders format functionNames geometricMean global globals hasMemory harmonicMean hostAddress hostAddressToName hostName hostNameToAddress isNumber ISOToMac itemOffset keys len length libURLErrorData libUrlFormDat\
a libURLftpCommand libURLLastHTTPHeaders libURLLastRHHeaders libUrlMultipartFormAddPart libUrlMultipartFormData libURLVersion lineOffset ln ln1 localNames log log2 log10 longFilePath lower macToISO matchChunk matchText matrixMultiply max md5Digest median merge messageAuthenticationCode messageDigest millisec millisecs millisecond milliseconds min monthNames nativeCharToNum normalizeText num number numToByte numToChar numToCodepoint numToNativeChar offset open openfiles openProcesses openProcessI\
Ds openSockets paragraphOffset paramCount param params peerAddress pendingMessages platform popStdDev populationStandardDeviation populationVariance popVariance processID random randomBytes replaceText result revCreateXMLTree revCreateXMLTreeFromFile revCurrentRecord revCurrentRecordIsFirst revCurrentRecordIsLast revDatabaseColumnCount revDatabaseColumnIsNull revDatabaseColumnLengths revDatabaseColumnNames revDatabaseColumnNamed revDatabaseColumnNumbered revDatabaseColumnTypes revDatabaseConnect\
Result revDatabaseCursors revDatabaseID revDatabaseTableNames revDatabaseType revDataFromQuery revdb_closeCursor revdb_columnbynumber revdb_columncount revdb_columnisnull revdb_columnlengths revdb_columnnames revdb_columntypes revdb_commit revdb_connect revdb_connections revdb_connectionerr revdb_currentrecord revdb_cursorconnection revdb_cursorerr revdb_cursors revdb_dbtype revdb_disconnect revdb_execute revdb_iseof revdb_isbof revdb_movefirst revdb_movelast revdb_movenext revdb_moveprev revdb_\
query revdb_querylist revdb_recordcount revdb_rollback revdb_tablenames revGetDatabaseDriverPath revNumberOfRecords revOpenDatabase revOpenDatabases revQueryDatabase revQueryDatabaseBlob revQueryResult revQueryIsAtStart revQueryIsAtEnd revUnixFromMacPath revXMLAttribute revXMLAttributes revXMLAttributeValues revXMLChildContents revXMLChildNames revXMLCreateTreeFromFileWithNamespaces revXMLCreateTreeWithNamespaces revXMLDataFromXPathQuery revXMLEvaluateXPath revXMLFirstChild revXMLMatchingNode re\
vXMLNextSibling revXMLNodeContents revXMLNumberOfChildren revXMLParent revXMLPreviousSibling revXMLRootNode revXMLRPC_CreateRequest revXMLRPC_Documents revXMLRPC_Error revXMLRPC_GetHost revXMLRPC_GetMethod revXMLRPC_GetParam revXMLText revXMLRPC_Execute revXMLRPC_GetParamCount revXMLRPC_GetParamNode revXMLRPC_GetParamType revXMLRPC_GetPath revXMLRPC_GetPort revXMLRPC_GetProtocol revXMLRPC_GetRequest revXMLRPC_GetResponse revXMLRPC_GetSocket revXMLTree revXMLTrees revXMLValidateDTD revZipDescribe\
Item revZipEnumerateItems revZipOpenArchives round sampVariance sec secs seconds sentenceOffset sha1Digest shell shortFilePath sin specialFolderPath sqrt standardDeviation statRound stdDev sum sysError systemVersion tan tempName textDecode textEncode tick ticks time to tokenOffset toLower toUpper transpose truewordOffset trunc uniDecode uniEncode upper URLDecode URLEncode URLStatus uuid value variableNames variance version waitDepth weekdayNames wordOffset xsltApplyStylesheet xsltApplyStylesheet\
FromFile xsltLoadStylesheet xsltLoadStylesheetFromFile add breakpoint cancel clear local variable file word line folder directory URL close socket process combine constant convert create new alias folder directory decrypt delete variable word line folder directory URL dispatch divide do encrypt filter get include intersect kill libURLDownloadToFile libURLFollowHttpRedirects libURLftpUpload libURLftpUploadFile libURLresetAll libUrlSetAuthCallback libURLSetDriver libURLSetCustomHTTPHeaders libUrlS\
etExpect100 libURLSetFTPListCommand libURLSetFTPMode libURLSetFTPStopTime libURLSetStatusCallback load extension loadedExtensions multiply socket prepare process post seek rel relative read from process rename replace require resetAll resolve revAddXMLNode revAppendXML revCloseCursor revCloseDatabase revCommitDatabase revCopyFile revCopyFolder revCopyXMLNode revDeleteFolder revDeleteXMLNode revDeleteAllXMLTrees revDeleteXMLTree revExecuteSQL revGoURL revInsertXMLNode revMoveFolder revMoveToFirst\
Record revMoveToLastRecord revMoveToNextRecord revMoveToPreviousRecord revMoveToRecord revMoveXMLNode revPutIntoXMLNode revRollBackDatabase revSetDatabaseDriverPath revSetXMLAttribute revXMLRPC_AddParam revXMLRPC_DeleteAllDocuments revXMLAddDTD revXMLRPC_Free revXMLRPC_FreeAll revXMLRPC_DeleteDocument revXMLRPC_DeleteParam revXMLRPC_SetHost revXMLRPC_SetMethod revXMLRPC_SetPort revXMLRPC_SetProtocol revXMLRPC_SetSocket revZipAddItemWithData revZipAddItemWithFile revZipAddUncompressedItemWithData\
 revZipAddUncompressedItemWithFile revZipCancel revZipCloseArchive revZipDeleteItem revZipExtractItemToFile revZipExtractItemToVariable revZipSetProgressCallback revZipRenameItem revZipReplaceItemWithData revZipReplaceItemWithFile revZipOpenArchive send set sort split start stop subtract symmetric union unload vectorDotProduct wait write"},contains:[VARIABLE,{className:"keyword",begin:"\\bend\\sif\\b"},{className:"function",beginKeywords:"function",end:"$",contains:[VARIABLE,TITLE2,hljs.APOS_STRING_MODE,
hljs.QUOTE_STRING_MODE,hljs.BINARY_NUMBER_MODE,hljs.C_NUMBER_MODE,TITLE1]},{className:"function",begin:"\\bend\\s+",end:"$",keywords:"end",contains:[TITLE2,TITLE1],relevance:0},{beginKeywords:"command on",end:"$",contains:[VARIABLE,TITLE2,hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,hljs.BINARY_NUMBER_MODE,hljs.C_NUMBER_MODE,TITLE1]},{className:"meta",variants:[{begin:"<\\?(rev|lc|livecode)",relevance:10},{begin:"<\\?"},{begin:"\\?>"}]},hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,hljs.BINARY_NUMBER_MODE,
hljs.C_NUMBER_MODE,TITLE1].concat(COMMENT_MODES),illegal:";$|^\\[|^=|&|\\{"}}return livecodeserver_1=livecodeserver2,livecodeserver_1}var livescript_1,hasRequiredLivescript;function requireLivescript(){if(hasRequiredLivescript)return livescript_1;hasRequiredLivescript=1;const KEYWORDS2=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield",
"const","class","debugger","async","await","static","import","from","export","extends","using"],LITERALS2=["true","false","null","undefined","NaN","Infinity"],TYPES2=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics",
"DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],ERROR_TYPES2=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],BUILT_IN_GLOBALS2=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],BUILT_INS2=[].concat(BUILT_IN_GLOBALS2,
TYPES2,ERROR_TYPES2);function livescript2(hljs){const LIVESCRIPT_BUILT_INS=["npm","print"],LIVESCRIPT_LITERALS=["yes","no","on","off","it","that","void"],LIVESCRIPT_KEYWORDS=["then","unless","until","loop","of","by","when","and","or","is","isnt","not","it","that","otherwise","from","to","til","fallthrough","case","enum","native","list","map","__hasProp","__extends","__slice","__bind","__indexOf"],KEYWORDS$12={keyword:KEYWORDS2.concat(LIVESCRIPT_KEYWORDS),literal:LITERALS2.concat(LIVESCRIPT_LITERALS),
built_in:BUILT_INS2.concat(LIVESCRIPT_BUILT_INS)},JS_IDENT_RE="[A-Za-z$_](?:-[0-9A-Za-z$_]|[0-9A-Za-z$_])*",TITLE=hljs.inherit(hljs.TITLE_MODE,{begin:JS_IDENT_RE}),SUBST={className:"subst",begin:/#\{/,end:/\}/,keywords:KEYWORDS$12},SUBST_SIMPLE={className:"subst",begin:/#[A-Za-z$_]/,end:/(?:-[0-9A-Za-z$_]|[0-9A-Za-z$_])*/,keywords:KEYWORDS$12},EXPRESSIONS=[hljs.BINARY_NUMBER_MODE,{className:"number",begin:"(\\b0[xX][a-fA-F0-9_]+)|(\\b\\d(\\d|_\\d)*(\\.(\\d(\\d|_\\d)*)?)?(_*[eE]([-+]\\d(_\\d|\\d)*)?)?[_a-z]*\
)",relevance:0,starts:{end:"(\\s*/)?",relevance:0}},{className:"string",variants:[{begin:/'''/,end:/'''/,contains:[hljs.BACKSLASH_ESCAPE]},{begin:/'/,end:/'/,contains:[hljs.BACKSLASH_ESCAPE]},{begin:/"""/,end:/"""/,contains:[hljs.BACKSLASH_ESCAPE,SUBST,SUBST_SIMPLE]},{begin:/"/,end:/"/,contains:[hljs.BACKSLASH_ESCAPE,SUBST,SUBST_SIMPLE]},{begin:/\\/,end:/(\s|$)/,excludeEnd:!0}]},{className:"regexp",variants:[{begin:"//",end:"//[gim]*",contains:[SUBST,hljs.HASH_COMMENT_MODE]},{begin:/\/(?![ *])(\\.|[^\\\n])*?\/[gim]*(?=\W)/}]},
{begin:"@"+JS_IDENT_RE},{begin:"``",end:"``",excludeBegin:!0,excludeEnd:!0,subLanguage:"javascript"}];SUBST.contains=EXPRESSIONS;const PARAMS={className:"params",begin:"\\(",returnBegin:!0,contains:[{begin:/\(/,end:/\)/,keywords:KEYWORDS$12,contains:["self"].concat(EXPRESSIONS)}]},SYMBOLS={begin:"(#=>|=>|\\|>>|-?->|!->)"},CLASS_DEFINITION={variants:[{match:[/class\s+/,JS_IDENT_RE,/\s+extends\s+/,JS_IDENT_RE]},{match:[/class\s+/,JS_IDENT_RE]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:KEYWORDS$12};
return{name:"LiveScript",aliases:["ls"],keywords:KEYWORDS$12,illegal:/\/\*/,contains:EXPRESSIONS.concat([hljs.COMMENT("\\/\\*","\\*\\/"),hljs.HASH_COMMENT_MODE,SYMBOLS,{className:"function",contains:[TITLE,PARAMS],returnBegin:!0,variants:[{begin:"("+JS_IDENT_RE+"\\s*(?:=|:=)\\s*)?(\\(.*\\)\\s*)?\\B->\\*?",end:"->\\*?"},{begin:"("+JS_IDENT_RE+"\\s*(?:=|:=)\\s*)?!?(\\(.*\\)\\s*)?\\B[-~]{1,2}>\\*?",end:"[-~]{1,2}>\\*?"},{begin:"("+JS_IDENT_RE+"\\s*(?:=|:=)\\s*)?(\\(.*\\)\\s*)?\\B!?[-~]{1,2}>\\*?",end:"\
!?[-~]{1,2}>\\*?"}]},CLASS_DEFINITION,{begin:JS_IDENT_RE+":",end:":",returnBegin:!0,returnEnd:!0,relevance:0}])}}return livescript_1=livescript2,livescript_1}var llvm_1,hasRequiredLlvm;function requireLlvm(){if(hasRequiredLlvm)return llvm_1;hasRequiredLlvm=1;function llvm2(hljs){const regex=hljs.regex,IDENT_RE2=/([-a-zA-Z$._][\w$.-]*)/,TYPE={className:"type",begin:/\bi\d+(?=\s|\b)/},OPERATOR={className:"operator",relevance:0,begin:/=/},PUNCTUATION={className:"punctuation",relevance:0,begin:/,/},
NUMBER={className:"number",variants:[{begin:/[su]?0[xX][KMLHR]?[a-fA-F0-9]+/},{begin:/[-+]?\d+(?:[.]\d+)?(?:[eE][-+]?\d+(?:[.]\d+)?)?/}],relevance:0},LABEL={className:"symbol",variants:[{begin:/^\s*[a-z]+:/}],relevance:0},VARIABLE={className:"variable",variants:[{begin:regex.concat(/%/,IDENT_RE2)},{begin:/%\d+/},{begin:/#\d+/}]},FUNCTION={className:"title",variants:[{begin:regex.concat(/@/,IDENT_RE2)},{begin:/@\d+/},{begin:regex.concat(/!/,IDENT_RE2)},{begin:regex.concat(/!\d+/,IDENT_RE2)},{begin:/!\d+/}]};
return{name:"LLVM IR",keywords:{keyword:"begin end true false declare define global constant private linker_private internal available_externally linkonce linkonce_odr weak weak_odr appending dllimport dllexport common default hidden protected extern_weak external thread_local zeroinitializer undef null to tail target triple datalayout volatile nuw nsw nnan ninf nsz arcp fast exact inbounds align addrspace section alias module asm sideeffect gc dbg linker_private_weak attributes blockaddress ini\
tialexec localdynamic localexec prefix unnamed_addr ccc fastcc coldcc x86_stdcallcc x86_fastcallcc arm_apcscc arm_aapcscc arm_aapcs_vfpcc ptx_device ptx_kernel intel_ocl_bicc msp430_intrcc spir_func spir_kernel x86_64_sysvcc x86_64_win64cc x86_thiscallcc cc c signext zeroext inreg sret nounwind noreturn noalias nocapture byval nest readnone readonly inlinehint noinline alwaysinline optsize ssp sspreq noredzone noimplicitfloat naked builtin cold nobuiltin noduplicate nonlazybind optnone returns_t\
wice sanitize_address sanitize_memory sanitize_thread sspstrong uwtable returned type opaque eq ne slt sgt sle sge ult ugt ule uge oeq one olt ogt ole oge ord uno ueq une x acq_rel acquire alignstack atomic catch cleanup filter inteldialect max min monotonic nand personality release seq_cst singlethread umax umin unordered xchg add fadd sub fsub mul fmul udiv sdiv fdiv urem srem frem shl lshr ashr and or xor icmp fcmp phi call trunc zext sext fptrunc fpext uitofp sitofp fptoui fptosi inttoptr pt\
rtoint bitcast addrspacecast select va_arg ret br switch invoke unwind unreachable indirectbr landingpad resume malloc alloca free load store getelementptr extractelement insertelement shufflevector getresult extractvalue insertvalue atomicrmw cmpxchg fence argmemonly",type:"void half bfloat float double fp128 x86_fp80 ppc_fp128 x86_amx x86_mmx ptr label token metadata opaque"},contains:[TYPE,hljs.COMMENT(/;\s*$/,null,{relevance:0}),hljs.COMMENT(/;/,/$/),{className:"string",begin:/"/,end:/"/,contains:[
{className:"char.escape",match:/\\\d\d/}]},FUNCTION,PUNCTUATION,OPERATOR,VARIABLE,LABEL,NUMBER]}}return llvm_1=llvm2,llvm_1}var lsl_1,hasRequiredLsl;function requireLsl(){if(hasRequiredLsl)return lsl_1;hasRequiredLsl=1;function lsl2(hljs){const LSL_STRINGS={className:"string",begin:'"',end:'"',contains:[{className:"subst",begin:/\\[tn"\\]/}]},LSL_NUMBERS={className:"number",relevance:0,begin:hljs.C_NUMBER_RE},LSL_CONSTANTS={className:"literal",variants:[{begin:"\\b(PI|TWO_PI|PI_BY_TWO|DEG_TO_RAD|\
RAD_TO_DEG|SQRT2)\\b"},{begin:"\\b(XP_ERROR_(EXPERIENCES_DISABLED|EXPERIENCE_(DISABLED|SUSPENDED)|INVALID_(EXPERIENCE|PARAMETERS)|KEY_NOT_FOUND|MATURITY_EXCEEDED|NONE|NOT_(FOUND|PERMITTED(_LAND)?)|NO_EXPERIENCE|QUOTA_EXCEEDED|RETRY_UPDATE|STORAGE_EXCEPTION|STORE_DISABLED|THROTTLED|UNKNOWN_ERROR)|JSON_APPEND|STATUS_(PHYSICS|ROTATE_[XYZ]|PHANTOM|SANDBOX|BLOCK_GRAB(_OBJECT)?|(DIE|RETURN)_AT_EDGE|CAST_SHADOWS|OK|MALFORMED_PARAMS|TYPE_MISMATCH|BOUNDS_ERROR|NOT_(FOUND|SUPPORTED)|INTERNAL_ERROR|WHITELIS\
T_FAILED)|AGENT(_(BY_(LEGACY_|USER)NAME|FLYING|ATTACHMENTS|SCRIPTED|MOUSELOOK|SITTING|ON_OBJECT|AWAY|WALKING|IN_AIR|TYPING|CROUCHING|BUSY|ALWAYS_RUN|AUTOPILOT|LIST_(PARCEL(_OWNER)?|REGION)))?|CAMERA_(PITCH|DISTANCE|BEHINDNESS_(ANGLE|LAG)|(FOCUS|POSITION)(_(THRESHOLD|LOCKED|LAG))?|FOCUS_OFFSET|ACTIVE)|ANIM_ON|LOOP|REVERSE|PING_PONG|SMOOTH|ROTATE|SCALE|ALL_SIDES|LINK_(ROOT|SET|ALL_(OTHERS|CHILDREN)|THIS)|ACTIVE|PASS(IVE|_(ALWAYS|IF_NOT_HANDLED|NEVER))|SCRIPTED|CONTROL_(FWD|BACK|(ROT_)?(LEFT|RIGHT)\
|UP|DOWN|(ML_)?LBUTTON)|PERMISSION_(RETURN_OBJECTS|DEBIT|OVERRIDE_ANIMATIONS|SILENT_ESTATE_MANAGEMENT|TAKE_CONTROLS|TRIGGER_ANIMATION|ATTACH|CHANGE_LINKS|(CONTROL|TRACK)_CAMERA|TELEPORT)|INVENTORY_(TEXTURE|SOUND|OBJECT|SCRIPT|LANDMARK|CLOTHING|NOTECARD|BODYPART|ANIMATION|GESTURE|ALL|NONE)|CHANGED_(INVENTORY|COLOR|SHAPE|SCALE|TEXTURE|LINK|ALLOWED_DROP|OWNER|REGION(_START)?|TELEPORT|MEDIA)|OBJECT_(CLICK_ACTION|HOVER_HEIGHT|LAST_OWNER_ID|(PHYSICS|SERVER|STREAMING)_COST|UNKNOWN_DETAIL|CHARACTER_TIME\
|PHANTOM|PHYSICS|TEMP_(ATTACHED|ON_REZ)|NAME|DESC|POS|PRIM_(COUNT|EQUIVALENCE)|RETURN_(PARCEL(_OWNER)?|REGION)|REZZER_KEY|ROO?T|VELOCITY|OMEGA|OWNER|GROUP(_TAG)?|CREATOR|ATTACHED_(POINT|SLOTS_AVAILABLE)|RENDER_WEIGHT|(BODY_SHAPE|PATHFINDING)_TYPE|(RUNNING|TOTAL)_SCRIPT_COUNT|TOTAL_INVENTORY_COUNT|SCRIPT_(MEMORY|TIME))|TYPE_(INTEGER|FLOAT|STRING|KEY|VECTOR|ROTATION|INVALID)|(DEBUG|PUBLIC)_CHANNEL|ATTACH_(AVATAR_CENTER|CHEST|HEAD|BACK|PELVIS|MOUTH|CHIN|NECK|NOSE|BELLY|[LR](SHOULDER|HAND|FOOT|EAR|E\
YE|[UL](ARM|LEG)|HIP)|(LEFT|RIGHT)_PEC|HUD_(CENTER_[12]|TOP_(RIGHT|CENTER|LEFT)|BOTTOM(_(RIGHT|LEFT))?)|[LR]HAND_RING1|TAIL_(BASE|TIP)|[LR]WING|FACE_(JAW|[LR]EAR|[LR]EYE|TOUNGE)|GROIN|HIND_[LR]FOOT)|LAND_(LEVEL|RAISE|LOWER|SMOOTH|NOISE|REVERT)|DATA_(ONLINE|NAME|BORN|SIM_(POS|STATUS|RATING)|PAYINFO)|PAYMENT_INFO_(ON_FILE|USED)|REMOTE_DATA_(CHANNEL|REQUEST|REPLY)|PSYS_(PART_(BF_(ZERO|ONE(_MINUS_(DEST_COLOR|SOURCE_(ALPHA|COLOR)))?|DEST_COLOR|SOURCE_(ALPHA|COLOR))|BLEND_FUNC_(DEST|SOURCE)|FLAGS|(STA\
RT|END)_(COLOR|ALPHA|SCALE|GLOW)|MAX_AGE|(RIBBON|WIND|INTERP_(COLOR|SCALE)|BOUNCE|FOLLOW_(SRC|VELOCITY)|TARGET_(POS|LINEAR)|EMISSIVE)_MASK)|SRC_(MAX_AGE|PATTERN|ANGLE_(BEGIN|END)|BURST_(RATE|PART_COUNT|RADIUS|SPEED_(MIN|MAX))|ACCEL|TEXTURE|TARGET_KEY|OMEGA|PATTERN_(DROP|EXPLODE|ANGLE(_CONE(_EMPTY)?)?)))|VEHICLE_(REFERENCE_FRAME|TYPE_(NONE|SLED|CAR|BOAT|AIRPLANE|BALLOON)|(LINEAR|ANGULAR)_(FRICTION_TIMESCALE|MOTOR_DIRECTION)|LINEAR_MOTOR_OFFSET|HOVER_(HEIGHT|EFFICIENCY|TIMESCALE)|BUOYANCY|(LINEAR|\
ANGULAR)_(DEFLECTION_(EFFICIENCY|TIMESCALE)|MOTOR_(DECAY_)?TIMESCALE)|VERTICAL_ATTRACTION_(EFFICIENCY|TIMESCALE)|BANKING_(EFFICIENCY|MIX|TIMESCALE)|FLAG_(NO_DEFLECTION_UP|LIMIT_(ROLL_ONLY|MOTOR_UP)|HOVER_((WATER|TERRAIN|UP)_ONLY|GLOBAL_HEIGHT)|MOUSELOOK_(STEER|BANK)|CAMERA_DECOUPLED))|PRIM_(ALLOW_UNSIT|ALPHA_MODE(_(BLEND|EMISSIVE|MASK|NONE))?|NORMAL|SPECULAR|TYPE(_(BOX|CYLINDER|PRISM|SPHERE|TORUS|TUBE|RING|SCULPT))?|HOLE_(DEFAULT|CIRCLE|SQUARE|TRIANGLE)|MATERIAL(_(STONE|METAL|GLASS|WOOD|FLESH|PL\
ASTIC|RUBBER))?|SHINY_(NONE|LOW|MEDIUM|HIGH)|BUMP_(NONE|BRIGHT|DARK|WOOD|BARK|BRICKS|CHECKER|CONCRETE|TILE|STONE|DISKS|GRAVEL|BLOBS|SIDING|LARGETILE|STUCCO|SUCTION|WEAVE)|TEXGEN_(DEFAULT|PLANAR)|SCRIPTED_SIT_ONLY|SCULPT_(TYPE_(SPHERE|TORUS|PLANE|CYLINDER|MASK)|FLAG_(MIRROR|INVERT))|PHYSICS(_(SHAPE_(CONVEX|NONE|PRIM|TYPE)))?|(POS|ROT)_LOCAL|SLICE|TEXT|FLEXIBLE|POINT_LIGHT|TEMP_ON_REZ|PHANTOM|POSITION|SIT_TARGET|SIZE|ROTATION|TEXTURE|NAME|OMEGA|DESC|LINK_TARGET|COLOR|BUMP_SHINY|FULLBRIGHT|TEXGEN|G\
LOW|MEDIA_(ALT_IMAGE_ENABLE|CONTROLS|(CURRENT|HOME)_URL|AUTO_(LOOP|PLAY|SCALE|ZOOM)|FIRST_CLICK_INTERACT|(WIDTH|HEIGHT)_PIXELS|WHITELIST(_ENABLE)?|PERMS_(INTERACT|CONTROL)|PARAM_MAX|CONTROLS_(STANDARD|MINI)|PERM_(NONE|OWNER|GROUP|ANYONE)|MAX_(URL_LENGTH|WHITELIST_(SIZE|COUNT)|(WIDTH|HEIGHT)_PIXELS)))|MASK_(BASE|OWNER|GROUP|EVERYONE|NEXT)|PERM_(TRANSFER|MODIFY|COPY|MOVE|ALL)|PARCEL_(MEDIA_COMMAND_(STOP|PAUSE|PLAY|LOOP|TEXTURE|URL|TIME|AGENT|UNLOAD|AUTO_ALIGN|TYPE|SIZE|DESC|LOOP_SET)|FLAG_(ALLOW_(\
FLY|(GROUP_)?SCRIPTS|LANDMARK|TERRAFORM|DAMAGE|CREATE_(GROUP_)?OBJECTS)|USE_(ACCESS_(GROUP|LIST)|BAN_LIST|LAND_PASS_LIST)|LOCAL_SOUND_ONLY|RESTRICT_PUSHOBJECT|ALLOW_(GROUP|ALL)_OBJECT_ENTRY)|COUNT_(TOTAL|OWNER|GROUP|OTHER|SELECTED|TEMP)|DETAILS_(NAME|DESC|OWNER|GROUP|AREA|ID|SEE_AVATARS))|LIST_STAT_(MAX|MIN|MEAN|MEDIAN|STD_DEV|SUM(_SQUARES)?|NUM_COUNT|GEOMETRIC_MEAN|RANGE)|PAY_(HIDE|DEFAULT)|REGION_FLAG_(ALLOW_DAMAGE|FIXED_SUN|BLOCK_TERRAFORM|SANDBOX|DISABLE_(COLLISIONS|PHYSICS)|BLOCK_FLY|ALLOW_\
DIRECT_TELEPORT|RESTRICT_PUSHOBJECT)|HTTP_(METHOD|MIMETYPE|BODY_(MAXLENGTH|TRUNCATED)|CUSTOM_HEADER|PRAGMA_NO_CACHE|VERBOSE_THROTTLE|VERIFY_CERT)|SIT_(INVALID_(AGENT|LINK_OBJECT)|NO(T_EXPERIENCE|_(ACCESS|EXPERIENCE_PERMISSION|SIT_TARGET)))|STRING_(TRIM(_(HEAD|TAIL))?)|CLICK_ACTION_(NONE|TOUCH|SIT|BUY|PAY|OPEN(_MEDIA)?|PLAY|ZOOM)|TOUCH_INVALID_FACE|PROFILE_(NONE|SCRIPT_MEMORY)|RC_(DATA_FLAGS|DETECT_PHANTOM|GET_(LINK_NUM|NORMAL|ROOT_KEY)|MAX_HITS|REJECT_(TYPES|AGENTS|(NON)?PHYSICAL|LAND))|RCERR_(C\
AST_TIME_EXCEEDED|SIM_PERF_LOW|UNKNOWN)|ESTATE_ACCESS_(ALLOWED_(AGENT|GROUP)_(ADD|REMOVE)|BANNED_AGENT_(ADD|REMOVE))|DENSITY|FRICTION|RESTITUTION|GRAVITY_MULTIPLIER|KFM_(COMMAND|CMD_(PLAY|STOP|PAUSE)|MODE|FORWARD|LOOP|PING_PONG|REVERSE|DATA|ROTATION|TRANSLATION)|ERR_(GENERIC|PARCEL_PERMISSIONS|MALFORMED_PARAMS|RUNTIME_PERMISSIONS|THROTTLED)|CHARACTER_(CMD_((SMOOTH_)?STOP|JUMP)|DESIRED_(TURN_)?SPEED|RADIUS|STAY_WITHIN_PARCEL|LENGTH|ORIENTATION|ACCOUNT_FOR_SKIPPED_FRAMES|AVOIDANCE_MODE|TYPE(_([ABC\
D]|NONE))?|MAX_(DECEL|TURN_RADIUS|(ACCEL|SPEED)))|PURSUIT_(OFFSET|FUZZ_FACTOR|GOAL_TOLERANCE|INTERCEPT)|REQUIRE_LINE_OF_SIGHT|FORCE_DIRECT_PATH|VERTICAL|HORIZONTAL|AVOID_(CHARACTERS|DYNAMIC_OBSTACLES|NONE)|PU_(EVADE_(HIDDEN|SPOTTED)|FAILURE_(DYNAMIC_PATHFINDING_DISABLED|INVALID_(GOAL|START)|NO_(NAVMESH|VALID_DESTINATION)|OTHER|TARGET_GONE|(PARCEL_)?UNREACHABLE)|(GOAL|SLOWDOWN_DISTANCE)_REACHED)|TRAVERSAL_TYPE(_(FAST|NONE|SLOW))?|CONTENT_TYPE_(ATOM|FORM|HTML|JSON|LLSD|RSS|TEXT|XHTML|XML)|GCNP_(RA\
DIUS|STATIC)|(PATROL|WANDER)_PAUSE_AT_WAYPOINTS|OPT_(AVATAR|CHARACTER|EXCLUSION_VOLUME|LEGACY_LINKSET|MATERIAL_VOLUME|OTHER|STATIC_OBSTACLE|WALKABLE)|SIM_STAT_PCT_CHARS_STEPPED)\\b"},{begin:"\\b(FALSE|TRUE)\\b"},{begin:"\\b(ZERO_ROTATION)\\b"},{begin:"\\b(EOF|JSON_(ARRAY|DELETE|FALSE|INVALID|NULL|NUMBER|OBJECT|STRING|TRUE)|NULL_KEY|TEXTURE_(BLANK|DEFAULT|MEDIA|PLYWOOD|TRANSPARENT)|URL_REQUEST_(GRANTED|DENIED))\\b"},{begin:"\\b(ZERO_VECTOR|TOUCH_INVALID_(TEXCOORD|VECTOR))\\b"}]},LSL_FUNCTIONS={className:"\
built_in",begin:"\\b(ll(AgentInExperience|(Create|DataSize|Delete|KeyCount|Keys|Read|Update)KeyValue|GetExperience(Details|ErrorMessage)|ReturnObjectsBy(ID|Owner)|Json(2List|[GS]etValue|ValueType)|Sin|Cos|Tan|Atan2|Sqrt|Pow|Abs|Fabs|Frand|Floor|Ceil|Round|Vec(Mag|Norm|Dist)|Rot(Between|2(Euler|Fwd|Left|Up))|(Euler|Axes)2Rot|Whisper|(Region|Owner)?Say|Shout|Listen(Control|Remove)?|Sensor(Repeat|Remove)?|Detected(Name|Key|Owner|Type|Pos|Vel|Grab|Rot|Group|LinkNumber)|Die|Ground|Wind|([GS]et)(Animat\
ionOverride|MemoryLimit|PrimMediaParams|ParcelMusicURL|Object(Desc|Name)|PhysicsMaterial|Status|Scale|Color|Alpha|Texture|Pos|Rot|Force|Torque)|ResetAnimationOverride|(Scale|Offset|Rotate)Texture|(Rot)?Target(Remove)?|(Stop)?MoveToTarget|Apply(Rotational)?Impulse|Set(KeyframedMotion|ContentType|RegionPos|(Angular)?Velocity|Buoyancy|HoverHeight|ForceAndTorque|TimerEvent|ScriptState|Damage|TextureAnim|Sound(Queueing|Radius)|Vehicle(Type|(Float|Vector|Rotation)Param)|(Touch|Sit)?Text|Camera(Eye|At)\
Offset|PrimitiveParams|ClickAction|Link(Alpha|Color|PrimitiveParams(Fast)?|Texture(Anim)?|Camera|Media)|RemoteScriptAccessPin|PayPrice|LocalRot)|ScaleByFactor|Get((Max|Min)ScaleFactor|ClosestNavPoint|StaticPath|SimStats|Env|PrimitiveParams|Link(PrimitiveParams|Number(OfSides)?|Key|Name|Media)|HTTPHeader|FreeURLs|Object(Details|PermMask|PrimCount)|Parcel(MaxPrims|Details|Prim(Count|Owners))|Attached(List)?|(SPMax|Free|Used)Memory|Region(Name|TimeDilation|FPS|Corner|AgentCount)|Root(Position|Rotat\
ion)|UnixTime|(Parcel|Region)Flags|(Wall|GMT)clock|SimulatorHostname|BoundingBox|GeometricCenter|Creator|NumberOf(Prims|NotecardLines|Sides)|Animation(List)?|(Camera|Local)(Pos|Rot)|Vel|Accel|Omega|Time(stamp|OfDay)|(Object|CenterOf)?Mass|MassMKS|Energy|Owner|(Owner)?Key|SunDirection|Texture(Offset|Scale|Rot)|Inventory(Number|Name|Key|Type|Creator|PermMask)|Permissions(Key)?|StartParameter|List(Length|EntryType)|Date|Agent(Size|Info|Language|List)|LandOwnerAt|NotecardLine|Script(Name|State))|(Ge\
t|Reset|GetAndReset)Time|PlaySound(Slave)?|LoopSound(Master|Slave)?|(Trigger|Stop|Preload)Sound|((Get|Delete)Sub|Insert)String|To(Upper|Lower)|Give(InventoryList|Money)|RezObject|(Stop)?LookAt|Sleep|CollisionFilter|(Take|Release)Controls|DetachFromAvatar|AttachToAvatar(Temp)?|InstantMessage|(GetNext)?Email|StopHover|MinEventDelay|RotLookAt|String(Length|Trim)|(Start|Stop)Animation|TargetOmega|Request(Experience)?Permissions|(Create|Break)Link|BreakAllLinks|(Give|Remove)Inventory|Water|PassTouche\
s|Request(Agent|Inventory)Data|TeleportAgent(Home|GlobalCoords)?|ModifyLand|CollisionSound|ResetScript|MessageLinked|PushObject|PassCollisions|AxisAngle2Rot|Rot2(Axis|Angle)|A(cos|sin)|AngleBetween|AllowInventoryDrop|SubStringIndex|List2(CSV|Integer|Json|Float|String|Key|Vector|Rot|List(Strided)?)|DeleteSubList|List(Statistics|Sort|Randomize|(Insert|Find|Replace)List)|EdgeOfWorld|AdjustSoundVolume|Key2Name|TriggerSoundLimited|EjectFromLand|(CSV|ParseString)2List|OverMyLand|SameGroup|UnSit|Ground\
(Slope|Normal|Contour)|GroundRepel|(Set|Remove)VehicleFlags|SitOnLink|(AvatarOn)?(Link)?SitTarget|Script(Danger|Profiler)|Dialog|VolumeDetect|ResetOtherScript|RemoteLoadScriptPin|(Open|Close)RemoteDataChannel|SendRemoteData|RemoteDataReply|(Integer|String)ToBase64|XorBase64|Log(10)?|Base64To(String|Integer)|ParseStringKeepNulls|RezAtRoot|RequestSimulatorData|ForceMouselook|(Load|Release|(E|Une)scape)URL|ParcelMedia(CommandList|Query)|ModPow|MapDestination|(RemoveFrom|AddTo|Reset)Land(Pass|Ban)Li\
st|(Set|Clear)CameraParams|HTTP(Request|Response)|TextBox|DetectedTouch(UV|Face|Pos|(N|Bin)ormal|ST)|(MD5|SHA1|DumpList2)String|Request(Secure)?URL|Clear(Prim|Link)Media|(Link)?ParticleSystem|(Get|Request)(Username|DisplayName)|RegionSayTo|CastRay|GenerateKey|TransferLindenDollars|ManageEstateAccess|(Create|Delete)Character|ExecCharacterCmd|Evade|FleeFrom|NavigateTo|PatrolPoints|Pursue|UpdateCharacter|WanderWithin))\\b"};return{name:"LSL (Linden Scripting Language)",illegal:":",contains:[LSL_STRINGS,
{className:"comment",variants:[hljs.COMMENT("//","$"),hljs.COMMENT("/\\*","\\*/")],relevance:0},LSL_NUMBERS,{className:"section",variants:[{begin:"\\b(state|default)\\b"},{begin:"\\b(state_(entry|exit)|touch(_(start|end))?|(land_)?collision(_(start|end))?|timer|listen|(no_)?sensor|control|(not_)?at_(rot_)?target|money|email|experience_permissions(_denied)?|run_time_permissions|changed|attach|dataserver|moving_(start|end)|link_message|(on|object)_rez|remote_data|http_re(sponse|quest)|path_update|t\
ransaction_result)\\b"}]},LSL_FUNCTIONS,LSL_CONSTANTS,{className:"type",begin:"\\b(integer|float|string|key|vector|quaternion|rotation|list)\\b"}]}}return lsl_1=lsl2,lsl_1}var lua_1,hasRequiredLua;function requireLua(){if(hasRequiredLua)return lua_1;hasRequiredLua=1;function lua2(hljs){const OPENING_LONG_BRACKET="\\[=*\\[",CLOSING_LONG_BRACKET="\\]=*\\]",LONG_BRACKETS={begin:OPENING_LONG_BRACKET,end:CLOSING_LONG_BRACKET,contains:["self"]},COMMENTS=[hljs.COMMENT("--(?!"+OPENING_LONG_BRACKET+")","\
$"),hljs.COMMENT("--"+OPENING_LONG_BRACKET,CLOSING_LONG_BRACKET,{contains:[LONG_BRACKETS],relevance:10})];return{name:"Lua",aliases:["pluto"],keywords:{$pattern:hljs.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile er\
ror getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp \
pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:COMMENTS.concat([{className:"function",beginKeywords:"functio\
n",end:"\\)",contains:[hljs.inherit(hljs.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:COMMENTS}].concat(COMMENTS)},hljs.C_NUMBER_MODE,hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,{className:"string",begin:OPENING_LONG_BRACKET,end:CLOSING_LONG_BRACKET,contains:[LONG_BRACKETS],relevance:5}])}}return lua_1=lua2,lua_1}var makefile_1,hasRequiredMakefile;function requireMakefile(){if(hasRequiredMakefile)return makefile_1;
hasRequiredMakefile=1;function makefile2(hljs){const VARIABLE={className:"variable",variants:[{begin:"\\$\\("+hljs.UNDERSCORE_IDENT_RE+"\\)",contains:[hljs.BACKSLASH_ESCAPE]},{begin:/\$[@%<?\^\+\*]/}]},QUOTE_STRING={className:"string",begin:/"/,end:/"/,contains:[hljs.BACKSLASH_ESCAPE,VARIABLE]},FUNC={className:"variable",begin:/\$\([\w-]+\s/,end:/\)/,keywords:{built_in:"subst patsubst strip findstring filter filter-out sort word wordlist firstword lastword dir notdir suffix basename addsuffix ad\
dprefix join wildcard realpath abspath error warning shell origin flavor foreach if or and call eval file value"},contains:[VARIABLE,QUOTE_STRING]},ASSIGNMENT={begin:"^"+hljs.UNDERSCORE_IDENT_RE+"\\s*(?=[:+?]?=)"},META={className:"meta",begin:/^\.PHONY:/,end:/$/,keywords:{$pattern:/[\.\w]+/,keyword:".PHONY"}},TARGET={className:"section",begin:/^[^\s]+:/,end:/$/,contains:[VARIABLE]};return{name:"Makefile",aliases:["mk","mak","make"],keywords:{$pattern:/[\w-]+/,keyword:"define endef undefine ifdef\
 ifndef ifeq ifneq else endif include -include sinclude override export unexport private vpath"},contains:[hljs.HASH_COMMENT_MODE,VARIABLE,QUOTE_STRING,FUNC,ASSIGNMENT,META,TARGET]}}return makefile_1=makefile2,makefile_1}var mathematica_1,hasRequiredMathematica;function requireMathematica(){if(hasRequiredMathematica)return mathematica_1;hasRequiredMathematica=1;const SYSTEM_SYMBOLS2=["AASTriangle","AbelianGroup","Abort","AbortKernels","AbortProtect","AbortScheduledTask","Above","Abs","AbsArg","A\
bsArgPlot","Absolute","AbsoluteCorrelation","AbsoluteCorrelationFunction","AbsoluteCurrentValue","AbsoluteDashing","AbsoluteFileName","AbsoluteOptions","AbsolutePointSize","AbsoluteThickness","AbsoluteTime","AbsoluteTiming","AcceptanceThreshold","AccountingForm","Accumulate","Accuracy","AccuracyGoal","AcousticAbsorbingValue","AcousticImpedanceValue","AcousticNormalVelocityValue","AcousticPDEComponent","AcousticPressureCondition","AcousticRadiationValue","AcousticSoundHardValue","AcousticSoundSof\
tCondition","ActionDelay","ActionMenu","ActionMenuBox","ActionMenuBoxOptions","Activate","Active","ActiveClassification","ActiveClassificationObject","ActiveItem","ActivePrediction","ActivePredictionObject","ActiveStyle","AcyclicGraphQ","AddOnHelpPath","AddSides","AddTo","AddToSearchIndex","AddUsers","AdjacencyGraph","AdjacencyList","AdjacencyMatrix","AdjacentMeshCells","Adjugate","AdjustmentBox","AdjustmentBoxOptions","AdjustTimeSeriesForecast","AdministrativeDivisionData","AffineHalfSpace","Af\
fineSpace","AffineStateSpaceModel","AffineTransform","After","AggregatedEntityClass","AggregationLayer","AircraftData","AirportData","AirPressureData","AirSoundAttenuation","AirTemperatureData","AiryAi","AiryAiPrime","AiryAiZero","AiryBi","AiryBiPrime","AiryBiZero","AlgebraicIntegerQ","AlgebraicNumber","AlgebraicNumberDenominator","AlgebraicNumberNorm","AlgebraicNumberPolynomial","AlgebraicNumberTrace","AlgebraicRules","AlgebraicRulesData","Algebraics","AlgebraicUnitQ","Alignment","AlignmentMark\
er","AlignmentPoint","All","AllowAdultContent","AllowChatServices","AllowedCloudExtraParameters","AllowedCloudParameterExtensions","AllowedDimensions","AllowedFrequencyRange","AllowedHeads","AllowGroupClose","AllowIncomplete","AllowInlineCells","AllowKernelInitialization","AllowLooseGrammar","AllowReverseGroupClose","AllowScriptLevelChange","AllowVersionUpdate","AllTrue","Alphabet","AlphabeticOrder","AlphabeticSort","AlphaChannel","AlternateImage","AlternatingFactorial","AlternatingGroup","Alter\
nativeHypothesis","Alternatives","AltitudeMethod","AmbientLight","AmbiguityFunction","AmbiguityList","Analytic","AnatomyData","AnatomyForm","AnatomyPlot3D","AnatomySkinStyle","AnatomyStyling","AnchoredSearch","And","AndersonDarlingTest","AngerJ","AngleBisector","AngleBracket","AnglePath","AnglePath3D","AngleVector","AngularGauge","Animate","AnimatedImage","AnimationCycleOffset","AnimationCycleRepetitions","AnimationDirection","AnimationDisplayTime","AnimationRate","AnimationRepetitions","Animati\
onRunning","AnimationRunTime","AnimationTimeIndex","AnimationVideo","Animator","AnimatorBox","AnimatorBoxOptions","AnimatorElements","Annotate","Annotation","AnnotationDelete","AnnotationKeys","AnnotationRules","AnnotationValue","Annuity","AnnuityDue","Annulus","AnomalyDetection","AnomalyDetector","AnomalyDetectorFunction","Anonymous","Antialiasing","Antihermitian","AntihermitianMatrixQ","Antisymmetric","AntisymmetricMatrixQ","Antonyms","AnyOrder","AnySubset","AnyTrue","Apart","ApartSquareFree",
"APIFunction","Appearance","AppearanceElements","AppearanceRules","AppellF1","Append","AppendCheck","AppendLayer","AppendTo","Application","Apply","ApplyReaction","ApplySides","ApplyTo","ArcCos","ArcCosh","ArcCot","ArcCoth","ArcCsc","ArcCsch","ArcCurvature","ARCHProcess","ArcLength","ArcSec","ArcSech","ArcSin","ArcSinDistribution","ArcSinh","ArcTan","ArcTanh","Area","Arg","ArgMax","ArgMin","ArgumentCountQ","ArgumentsOptions","ARIMAProcess","ArithmeticGeometricMean","ARMAProcess","Around","Around\
Replace","ARProcess","Array","ArrayComponents","ArrayDepth","ArrayFilter","ArrayFlatten","ArrayMesh","ArrayPad","ArrayPlot","ArrayPlot3D","ArrayQ","ArrayReduce","ArrayResample","ArrayReshape","ArrayRules","Arrays","Arrow","Arrow3DBox","ArrowBox","Arrowheads","ASATriangle","Ask","AskAppend","AskConfirm","AskDisplay","AskedQ","AskedValue","AskFunction","AskState","AskTemplateDisplay","AspectRatio","AspectRatioFixed","Assert","AssessmentFunction","AssessmentResultObject","AssociateTo","Association",
"AssociationFormat","AssociationMap","AssociationQ","AssociationThread","AssumeDeterministic","Assuming","Assumptions","AstroAngularSeparation","AstroBackground","AstroCenter","AstroDistance","AstroGraphics","AstroGridLines","AstroGridLinesStyle","AstronomicalData","AstroPosition","AstroProjection","AstroRange","AstroRangePadding","AstroReferenceFrame","AstroStyling","AstroZoomLevel","Asymptotic","AsymptoticDSolveValue","AsymptoticEqual","AsymptoticEquivalent","AsymptoticExpectation","Asymptotic\
Greater","AsymptoticGreaterEqual","AsymptoticIntegrate","AsymptoticLess","AsymptoticLessEqual","AsymptoticOutputTracker","AsymptoticProbability","AsymptoticProduct","AsymptoticRSolveValue","AsymptoticSolve","AsymptoticSum","Asynchronous","AsynchronousTaskObject","AsynchronousTasks","Atom","AtomCoordinates","AtomCount","AtomDiagramCoordinates","AtomLabels","AtomLabelStyle","AtomList","AtomQ","AttachCell","AttachedCell","AttentionLayer","Attributes","Audio","AudioAmplify","AudioAnnotate","AudioAnn\
otationLookup","AudioBlockMap","AudioCapture","AudioChannelAssignment","AudioChannelCombine","AudioChannelMix","AudioChannels","AudioChannelSeparate","AudioData","AudioDelay","AudioDelete","AudioDevice","AudioDistance","AudioEncoding","AudioFade","AudioFrequencyShift","AudioGenerator","AudioIdentify","AudioInputDevice","AudioInsert","AudioInstanceQ","AudioIntervals","AudioJoin","AudioLabel","AudioLength","AudioLocalMeasurements","AudioLooping","AudioLoudness","AudioMeasurements","AudioNormalize",
"AudioOutputDevice","AudioOverlay","AudioPad","AudioPan","AudioPartition","AudioPause","AudioPitchShift","AudioPlay","AudioPlot","AudioQ","AudioRecord","AudioReplace","AudioResample","AudioReverb","AudioReverse","AudioSampleRate","AudioSpectralMap","AudioSpectralTransformation","AudioSplit","AudioStop","AudioStream","AudioStreams","AudioTimeStretch","AudioTrackApply","AudioTrackSelection","AudioTrim","AudioType","AugmentedPolyhedron","AugmentedSymmetricPolynomial","Authenticate","Authentication",
"AuthenticationDialog","AutoAction","Autocomplete","AutocompletionFunction","AutoCopy","AutocorrelationTest","AutoDelete","AutoEvaluateEvents","AutoGeneratedPackage","AutoIndent","AutoIndentSpacings","AutoItalicWords","AutoloadPath","AutoMatch","Automatic","AutomaticImageSize","AutoMultiplicationSymbol","AutoNumberFormatting","AutoOpenNotebooks","AutoOpenPalettes","AutoOperatorRenderings","AutoQuoteCharacters","AutoRefreshed","AutoRemove","AutorunSequencing","AutoScaling","AutoScroll","AutoSpaci\
ng","AutoStyleOptions","AutoStyleWords","AutoSubmitting","Axes","AxesEdge","AxesLabel","AxesOrigin","AxesStyle","AxiomaticTheory","Axis","Axis3DBox","Axis3DBoxOptions","AxisBox","AxisBoxOptions","AxisLabel","AxisObject","AxisStyle","BabyMonsterGroupB","Back","BackFaceColor","BackFaceGlowColor","BackFaceOpacity","BackFaceSpecularColor","BackFaceSpecularExponent","BackFaceSurfaceAppearance","BackFaceTexture","Background","BackgroundAppearance","BackgroundTasksSettings","Backslash","Backsubstitutio\
n","Backward","Ball","Band","BandpassFilter","BandstopFilter","BarabasiAlbertGraphDistribution","BarChart","BarChart3D","BarcodeImage","BarcodeRecognize","BaringhausHenzeTest","BarLegend","BarlowProschanImportance","BarnesG","BarOrigin","BarSpacing","BartlettHannWindow","BartlettWindow","BaseDecode","BaseEncode","BaseForm","Baseline","BaselinePosition","BaseStyle","BasicRecurrentLayer","BatchNormalizationLayer","BatchSize","BatesDistribution","BattleLemarieWavelet","BayesianMaximization","Bayesi\
anMaximizationObject","BayesianMinimization","BayesianMinimizationObject","Because","BeckmannDistribution","Beep","Before","Begin","BeginDialogPacket","BeginPackage","BellB","BellY","Below","BenfordDistribution","BeniniDistribution","BenktanderGibratDistribution","BenktanderWeibullDistribution","BernoulliB","BernoulliDistribution","BernoulliGraphDistribution","BernoulliProcess","BernsteinBasis","BesagL","BesselFilterModel","BesselI","BesselJ","BesselJZero","BesselK","BesselY","BesselYZero","Beta",
"BetaBinomialDistribution","BetaDistribution","BetaNegativeBinomialDistribution","BetaPrimeDistribution","BetaRegularized","Between","BetweennessCentrality","Beveled","BeveledPolyhedron","BezierCurve","BezierCurve3DBox","BezierCurve3DBoxOptions","BezierCurveBox","BezierCurveBoxOptions","BezierFunction","BilateralFilter","BilateralLaplaceTransform","BilateralZTransform","Binarize","BinaryDeserialize","BinaryDistance","BinaryFormat","BinaryImageQ","BinaryRead","BinaryReadList","BinarySerialize","B\
inaryWrite","BinCounts","BinLists","BinnedVariogramList","Binomial","BinomialDistribution","BinomialPointProcess","BinomialProcess","BinormalDistribution","BiorthogonalSplineWavelet","BioSequence","BioSequenceBackTranslateList","BioSequenceComplement","BioSequenceInstances","BioSequenceModify","BioSequencePlot","BioSequenceQ","BioSequenceReverseComplement","BioSequenceTranscribe","BioSequenceTranslate","BipartiteGraphQ","BiquadraticFilterModel","BirnbaumImportance","BirnbaumSaundersDistribution",
"BitAnd","BitClear","BitGet","BitLength","BitNot","BitOr","BitRate","BitSet","BitShiftLeft","BitShiftRight","BitXor","BiweightLocation","BiweightMidvariance","Black","BlackmanHarrisWindow","BlackmanNuttallWindow","BlackmanWindow","Blank","BlankForm","BlankNullSequence","BlankSequence","Blend","Block","BlockchainAddressData","BlockchainBase","BlockchainBlockData","BlockchainContractValue","BlockchainData","BlockchainGet","BlockchainKeyEncode","BlockchainPut","BlockchainTokenData","BlockchainTrans\
action","BlockchainTransactionData","BlockchainTransactionSign","BlockchainTransactionSubmit","BlockDiagonalMatrix","BlockLowerTriangularMatrix","BlockMap","BlockRandom","BlockUpperTriangularMatrix","BlomqvistBeta","BlomqvistBetaTest","Blue","Blur","Blurring","BodePlot","BohmanWindow","Bold","Bond","BondCount","BondLabels","BondLabelStyle","BondList","BondQ","Bookmarks","Boole","BooleanConsecutiveFunction","BooleanConvert","BooleanCountingFunction","BooleanFunction","BooleanGraph","BooleanMaxter\
ms","BooleanMinimize","BooleanMinterms","BooleanQ","BooleanRegion","Booleans","BooleanStrings","BooleanTable","BooleanVariables","BorderDimensions","BorelTannerDistribution","Bottom","BottomHatTransform","BoundaryDiscretizeGraphics","BoundaryDiscretizeRegion","BoundaryMesh","BoundaryMeshRegion","BoundaryMeshRegionQ","BoundaryStyle","BoundedRegionQ","BoundingRegion","Bounds","Box","BoxBaselineShift","BoxData","BoxDimensions","Boxed","Boxes","BoxForm","BoxFormFormatTypes","BoxFrame","BoxID","BoxMa\
rgins","BoxMatrix","BoxObject","BoxRatios","BoxRotation","BoxRotationPoint","BoxStyle","BoxWhiskerChart","Bra","BracketingBar","BraKet","BrayCurtisDistance","BreadthFirstScan","Break","BridgeData","BrightnessEqualize","BroadcastStationData","Brown","BrownForsytheTest","BrownianBridgeProcess","BrowserCategory","BSplineBasis","BSplineCurve","BSplineCurve3DBox","BSplineCurve3DBoxOptions","BSplineCurveBox","BSplineCurveBoxOptions","BSplineFunction","BSplineSurface","BSplineSurface3DBox","BSplineSurf\
ace3DBoxOptions","BubbleChart","BubbleChart3D","BubbleScale","BubbleSizes","BuckyballGraph","BuildCompiledComponent","BuildingData","BulletGauge","BusinessDayQ","ButterflyGraph","ButterworthFilterModel","Button","ButtonBar","ButtonBox","ButtonBoxOptions","ButtonCell","ButtonContents","ButtonData","ButtonEvaluator","ButtonExpandable","ButtonFrame","ButtonFunction","ButtonMargins","ButtonMinHeight","ButtonNote","ButtonNotebook","ButtonSource","ButtonStyle","ButtonStyleMenuListing","Byte","ByteArra\
y","ByteArrayFormat","ByteArrayFormatQ","ByteArrayQ","ByteArrayToString","ByteCount","ByteOrdering","C","CachedValue","CacheGraphics","CachePersistence","CalendarConvert","CalendarData","CalendarType","Callout","CalloutMarker","CalloutStyle","CallPacket","CanberraDistance","Cancel","CancelButton","CandlestickChart","CanonicalGraph","CanonicalizePolygon","CanonicalizePolyhedron","CanonicalizeRegion","CanonicalName","CanonicalWarpingCorrespondence","CanonicalWarpingDistance","CantorMesh","CantorSt\
aircase","Canvas","Cap","CapForm","CapitalDifferentialD","Capitalize","CapsuleShape","CaptureRunning","CaputoD","CardinalBSplineBasis","CarlemanLinearize","CarlsonRC","CarlsonRD","CarlsonRE","CarlsonRF","CarlsonRG","CarlsonRJ","CarlsonRK","CarlsonRM","CarmichaelLambda","CaseOrdering","Cases","CaseSensitive","Cashflow","Casoratian","Cast","Catalan","CatalanNumber","Catch","CategoricalDistribution","Catenate","CatenateLayer","CauchyDistribution","CauchyMatrix","CauchyPointProcess","CauchyWindow","\
CayleyGraph","CDF","CDFDeploy","CDFInformation","CDFWavelet","Ceiling","CelestialSystem","Cell","CellAutoOverwrite","CellBaseline","CellBoundingBox","CellBracketOptions","CellChangeTimes","CellContents","CellContext","CellDingbat","CellDingbatMargin","CellDynamicExpression","CellEditDuplicate","CellElementsBoundingBox","CellElementSpacings","CellEpilog","CellEvaluationDuplicate","CellEvaluationFunction","CellEvaluationLanguage","CellEventActions","CellFrame","CellFrameColor","CellFrameLabelMargi\
ns","CellFrameLabels","CellFrameMargins","CellFrameStyle","CellGroup","CellGroupData","CellGrouping","CellGroupingRules","CellHorizontalScrolling","CellID","CellInsertionPointCell","CellLabel","CellLabelAutoDelete","CellLabelMargins","CellLabelPositioning","CellLabelStyle","CellLabelTemplate","CellMargins","CellObject","CellOpen","CellPrint","CellProlog","Cells","CellSize","CellStyle","CellTags","CellTrayPosition","CellTrayWidgets","CellularAutomaton","CensoredDistribution","Censoring","Center",
"CenterArray","CenterDot","CenteredInterval","CentralFeature","CentralMoment","CentralMomentGeneratingFunction","Cepstrogram","CepstrogramArray","CepstrumArray","CForm","ChampernowneNumber","ChangeOptions","ChannelBase","ChannelBrokerAction","ChannelDatabin","ChannelHistoryLength","ChannelListen","ChannelListener","ChannelListeners","ChannelListenerWait","ChannelObject","ChannelPreSendFunction","ChannelReceiverFunction","ChannelSend","ChannelSubscribers","ChanVeseBinarize","Character","Character\
Counts","CharacterEncoding","CharacterEncodingsPath","CharacteristicFunction","CharacteristicPolynomial","CharacterName","CharacterNormalize","CharacterRange","Characters","ChartBaseStyle","ChartElementData","ChartElementDataFunction","ChartElementFunction","ChartElements","ChartLabels","ChartLayout","ChartLegends","ChartStyle","Chebyshev1FilterModel","Chebyshev2FilterModel","ChebyshevDistance","ChebyshevT","ChebyshevU","Check","CheckAbort","CheckAll","CheckArguments","Checkbox","CheckboxBar","C\
heckboxBox","CheckboxBoxOptions","ChemicalConvert","ChemicalData","ChemicalFormula","ChemicalInstance","ChemicalReaction","ChessboardDistance","ChiDistribution","ChineseRemainder","ChiSquareDistribution","ChoiceButtons","ChoiceDialog","CholeskyDecomposition","Chop","ChromaticityPlot","ChromaticityPlot3D","ChromaticPolynomial","Circle","CircleBox","CircleDot","CircleMinus","CirclePlus","CirclePoints","CircleThrough","CircleTimes","CirculantGraph","CircularArcThrough","CircularOrthogonalMatrixDist\
ribution","CircularQuaternionMatrixDistribution","CircularRealMatrixDistribution","CircularSymplecticMatrixDistribution","CircularUnitaryMatrixDistribution","Circumsphere","CityData","ClassifierFunction","ClassifierInformation","ClassifierMeasurements","ClassifierMeasurementsObject","Classify","ClassPriors","Clear","ClearAll","ClearAttributes","ClearCookies","ClearPermissions","ClearSystemCache","ClebschGordan","ClickPane","ClickToCopy","ClickToCopyEnabled","Clip","ClipboardNotebook","ClipFill",
"ClippingStyle","ClipPlanes","ClipPlanesStyle","ClipRange","Clock","ClockGauge","ClockwiseContourIntegral","Close","Closed","CloseKernels","ClosenessCentrality","Closing","ClosingAutoSave","ClosingEvent","CloudAccountData","CloudBase","CloudConnect","CloudConnections","CloudDeploy","CloudDirectory","CloudDisconnect","CloudEvaluate","CloudExport","CloudExpression","CloudExpressions","CloudFunction","CloudGet","CloudImport","CloudLoggingData","CloudObject","CloudObjectInformation","CloudObjectInfo\
rmationData","CloudObjectNameFormat","CloudObjects","CloudObjectURLType","CloudPublish","CloudPut","CloudRenderingMethod","CloudSave","CloudShare","CloudSubmit","CloudSymbol","CloudUnshare","CloudUserID","ClusterClassify","ClusterDissimilarityFunction","ClusteringComponents","ClusteringMeasurements","ClusteringTree","CMYKColor","Coarse","CodeAssistOptions","Coefficient","CoefficientArrays","CoefficientDomain","CoefficientList","CoefficientRules","CoifletWavelet","Collect","CollinearPoints","Colo\
n","ColonForm","ColorBalance","ColorCombine","ColorConvert","ColorCoverage","ColorData","ColorDataFunction","ColorDetect","ColorDistance","ColorFunction","ColorFunctionBinning","ColorFunctionScaling","Colorize","ColorNegate","ColorOutput","ColorProfileData","ColorQ","ColorQuantize","ColorReplace","ColorRules","ColorSelectorSettings","ColorSeparate","ColorSetter","ColorSetterBox","ColorSetterBoxOptions","ColorSlider","ColorsNear","ColorSpace","ColorToneMapping","Column","ColumnAlignments","Column\
Backgrounds","ColumnForm","ColumnLines","ColumnsEqual","ColumnSpacings","ColumnWidths","CombinatorB","CombinatorC","CombinatorI","CombinatorK","CombinatorS","CombinatorW","CombinatorY","CombinedEntityClass","CombinerFunction","CometData","CommonDefaultFormatTypes","Commonest","CommonestFilter","CommonName","CommonUnits","CommunityBoundaryStyle","CommunityGraphPlot","CommunityLabels","CommunityRegionStyle","CompanyData","CompatibleUnitQ","CompilationOptions","CompilationTarget","Compile","Compile\
d","CompiledCodeFunction","CompiledComponent","CompiledExpressionDeclaration","CompiledFunction","CompiledLayer","CompilerCallback","CompilerEnvironment","CompilerEnvironmentAppend","CompilerEnvironmentAppendTo","CompilerEnvironmentObject","CompilerOptions","Complement","ComplementedEntityClass","CompleteGraph","CompleteGraphQ","CompleteIntegral","CompleteKaryTree","CompletionsListPacket","Complex","ComplexArrayPlot","ComplexContourPlot","Complexes","ComplexExpand","ComplexInfinity","ComplexityF\
unction","ComplexListPlot","ComplexPlot","ComplexPlot3D","ComplexRegionPlot","ComplexStreamPlot","ComplexVectorPlot","ComponentMeasurements","ComponentwiseContextMenu","Compose","ComposeList","ComposeSeries","CompositeQ","Composition","CompoundElement","CompoundExpression","CompoundPoissonDistribution","CompoundPoissonProcess","CompoundRenewalProcess","Compress","CompressedData","CompressionLevel","ComputeUncertainty","ConcaveHullMesh","Condition","ConditionalExpression","Conditioned","Cone","Co\
neBox","ConfidenceLevel","ConfidenceRange","ConfidenceTransform","ConfigurationPath","Confirm","ConfirmAssert","ConfirmBy","ConfirmMatch","ConfirmQuiet","ConformationMethod","ConformAudio","ConformImages","Congruent","ConicGradientFilling","ConicHullRegion","ConicHullRegion3DBox","ConicHullRegion3DBoxOptions","ConicHullRegionBox","ConicHullRegionBoxOptions","ConicOptimization","Conjugate","ConjugateTranspose","Conjunction","Connect","ConnectedComponents","ConnectedGraphComponents","ConnectedGrap\
hQ","ConnectedMeshComponents","ConnectedMoleculeComponents","ConnectedMoleculeQ","ConnectionSettings","ConnectLibraryCallbackFunction","ConnectSystemModelComponents","ConnectSystemModelController","ConnesWindow","ConoverTest","ConservativeConvectionPDETerm","ConsoleMessage","Constant","ConstantArray","ConstantArrayLayer","ConstantImage","ConstantPlusLayer","ConstantRegionQ","Constants","ConstantTimesLayer","ConstellationData","ConstrainedMax","ConstrainedMin","Construct","Containing","ContainsAl\
l","ContainsAny","ContainsExactly","ContainsNone","ContainsOnly","ContentDetectorFunction","ContentFieldOptions","ContentLocationFunction","ContentObject","ContentPadding","ContentsBoundingBox","ContentSelectable","ContentSize","Context","ContextMenu","Contexts","ContextToFileName","Continuation","Continue","ContinuedFraction","ContinuedFractionK","ContinuousAction","ContinuousMarkovProcess","ContinuousTask","ContinuousTimeModelQ","ContinuousWaveletData","ContinuousWaveletTransform","ContourDete\
ct","ContourGraphics","ContourIntegral","ContourLabels","ContourLines","ContourPlot","ContourPlot3D","Contours","ContourShading","ContourSmoothing","ContourStyle","ContraharmonicMean","ContrastiveLossLayer","Control","ControlActive","ControlAlignment","ControlGroupContentsBox","ControllabilityGramian","ControllabilityMatrix","ControllableDecomposition","ControllableModelQ","ControllerDuration","ControllerInformation","ControllerInformationData","ControllerLinking","ControllerManipulate","Control\
lerMethod","ControllerPath","ControllerState","ControlPlacement","ControlsRendering","ControlType","ConvectionPDETerm","Convergents","ConversionOptions","ConversionRules","ConvertToPostScript","ConvertToPostScriptPacket","ConvexHullMesh","ConvexHullRegion","ConvexOptimization","ConvexPolygonQ","ConvexPolyhedronQ","ConvexRegionQ","ConvolutionLayer","Convolve","ConwayGroupCo1","ConwayGroupCo2","ConwayGroupCo3","CookieFunction","Cookies","CoordinateBoundingBox","CoordinateBoundingBoxArray","Coordin\
ateBounds","CoordinateBoundsArray","CoordinateChartData","CoordinatesToolOptions","CoordinateTransform","CoordinateTransformData","CoplanarPoints","CoprimeQ","Coproduct","CopulaDistribution","Copyable","CopyDatabin","CopyDirectory","CopyFile","CopyFunction","CopyTag","CopyToClipboard","CoreNilpotentDecomposition","CornerFilter","CornerNeighbors","Correlation","CorrelationDistance","CorrelationFunction","CorrelationTest","Cos","Cosh","CoshIntegral","CosineDistance","CosineWindow","CosIntegral","C\
ot","Coth","CoulombF","CoulombG","CoulombH1","CoulombH2","Count","CountDistinct","CountDistinctBy","CounterAssignments","CounterBox","CounterBoxOptions","CounterClockwiseContourIntegral","CounterEvaluator","CounterFunction","CounterIncrements","CounterStyle","CounterStyleMenuListing","CountRoots","CountryData","Counts","CountsBy","Covariance","CovarianceEstimatorFunction","CovarianceFunction","CoxianDistribution","CoxIngersollRossProcess","CoxModel","CoxModelFit","CramerVonMisesTest","CreateArch\
ive","CreateCellID","CreateChannel","CreateCloudExpression","CreateCompilerEnvironment","CreateDatabin","CreateDataStructure","CreateDataSystemModel","CreateDialog","CreateDirectory","CreateDocument","CreateFile","CreateIntermediateDirectories","CreateLicenseEntitlement","CreateManagedLibraryExpression","CreateNotebook","CreatePacletArchive","CreatePalette","CreatePermissionsGroup","CreateScheduledTask","CreateSearchIndex","CreateSystemModel","CreateTemporary","CreateTypeInstance","CreateUUID","\
CreateWindow","CriterionFunction","CriticalityFailureImportance","CriticalitySuccessImportance","CriticalSection","Cross","CrossEntropyLossLayer","CrossingCount","CrossingDetect","CrossingPolygon","CrossMatrix","Csc","Csch","CSGRegion","CSGRegionQ","CSGRegionTree","CTCLossLayer","Cube","CubeRoot","Cubics","Cuboid","CuboidBox","CuboidBoxOptions","Cumulant","CumulantGeneratingFunction","CumulativeFeatureImpactPlot","Cup","CupCap","Curl","CurlyDoubleQuote","CurlyQuote","CurrencyConvert","CurrentDat\
e","CurrentImage","CurrentNotebookImage","CurrentScreenImage","CurrentValue","Curry","CurryApplied","CurvatureFlowFilter","CurveClosed","Cyan","CycleGraph","CycleIndexPolynomial","Cycles","CyclicGroup","Cyclotomic","Cylinder","CylinderBox","CylinderBoxOptions","CylindricalDecomposition","CylindricalDecompositionFunction","D","DagumDistribution","DamData","DamerauLevenshteinDistance","DampingFactor","Darker","Dashed","Dashing","DatabaseConnect","DatabaseDisconnect","DatabaseReference","Databin","\
DatabinAdd","DatabinRemove","Databins","DatabinSubmit","DatabinUpload","DataCompression","DataDistribution","DataRange","DataReversed","Dataset","DatasetDisplayPanel","DatasetTheme","DataStructure","DataStructureQ","Date","DateBounds","Dated","DateDelimiters","DateDifference","DatedUnit","DateFormat","DateFunction","DateGranularity","DateHistogram","DateInterval","DateList","DateListLogPlot","DateListPlot","DateListStepPlot","DateObject","DateObjectQ","DateOverlapsQ","DatePattern","DatePlus","Da\
teRange","DateReduction","DateScale","DateSelect","DateString","DateTicksFormat","DateValue","DateWithinQ","DaubechiesWavelet","DavisDistribution","DawsonF","DayCount","DayCountConvention","DayHemisphere","DaylightQ","DayMatchQ","DayName","DayNightTerminator","DayPlus","DayRange","DayRound","DeBruijnGraph","DeBruijnSequence","Debug","DebugTag","Decapitalize","Decimal","DecimalForm","DeclareCompiledComponent","DeclareKnownSymbols","DeclarePackage","Decompose","DeconvolutionLayer","Decrement","Dec\
rypt","DecryptFile","DedekindEta","DeepSpaceProbeData","Default","Default2DTool","Default3DTool","DefaultAttachedCellStyle","DefaultAxesStyle","DefaultBaseStyle","DefaultBoxStyle","DefaultButton","DefaultColor","DefaultControlPlacement","DefaultDockedCellStyle","DefaultDuplicateCellStyle","DefaultDuration","DefaultElement","DefaultFaceGridsStyle","DefaultFieldHintStyle","DefaultFont","DefaultFontProperties","DefaultFormatType","DefaultFrameStyle","DefaultFrameTicksStyle","DefaultGridLinesStyle",
"DefaultInlineFormatType","DefaultInputFormatType","DefaultLabelStyle","DefaultMenuStyle","DefaultNaturalLanguage","DefaultNewCellStyle","DefaultNewInlineCellStyle","DefaultNotebook","DefaultOptions","DefaultOutputFormatType","DefaultPrintPrecision","DefaultStyle","DefaultStyleDefinitions","DefaultTextFormatType","DefaultTextInlineFormatType","DefaultTicksStyle","DefaultTooltipStyle","DefaultValue","DefaultValues","Defer","DefineExternal","DefineInputStreamMethod","DefineOutputStreamMethod","Def\
ineResourceFunction","Definition","Degree","DegreeCentrality","DegreeGraphDistribution","DegreeLexicographic","DegreeReverseLexicographic","DEigensystem","DEigenvalues","Deinitialization","Del","DelaunayMesh","Delayed","Deletable","Delete","DeleteAdjacentDuplicates","DeleteAnomalies","DeleteBorderComponents","DeleteCases","DeleteChannel","DeleteCloudExpression","DeleteContents","DeleteDirectory","DeleteDuplicates","DeleteDuplicatesBy","DeleteElements","DeleteFile","DeleteMissing","DeleteObject",
"DeletePermissionsKey","DeleteSearchIndex","DeleteSmallComponents","DeleteStopwords","DeleteWithContents","DeletionWarning","DelimitedArray","DelimitedSequence","Delimiter","DelimiterAutoMatching","DelimiterFlashTime","DelimiterMatching","Delimiters","DeliveryFunction","Dendrogram","Denominator","DensityGraphics","DensityHistogram","DensityPlot","DensityPlot3D","DependentVariables","Deploy","Deployed","Depth","DepthFirstScan","Derivative","DerivativeFilter","DerivativePDETerm","DerivedKey","Desc\
riptorStateSpace","DesignMatrix","DestroyAfterEvaluation","Det","DeviceClose","DeviceConfigure","DeviceExecute","DeviceExecuteAsynchronous","DeviceObject","DeviceOpen","DeviceOpenQ","DeviceRead","DeviceReadBuffer","DeviceReadLatest","DeviceReadList","DeviceReadTimeSeries","Devices","DeviceStreams","DeviceWrite","DeviceWriteBuffer","DGaussianWavelet","DiacriticalPositioning","Diagonal","DiagonalizableMatrixQ","DiagonalMatrix","DiagonalMatrixQ","Dialog","DialogIndent","DialogInput","DialogLevel","\
DialogNotebook","DialogProlog","DialogReturn","DialogSymbols","Diamond","DiamondMatrix","DiceDissimilarity","DictionaryLookup","DictionaryWordQ","DifferenceDelta","DifferenceOrder","DifferenceQuotient","DifferenceRoot","DifferenceRootReduce","Differences","DifferentialD","DifferentialRoot","DifferentialRootReduce","DifferentiatorFilter","DiffusionPDETerm","DiggleGatesPointProcess","DiggleGrattonPointProcess","DigitalSignature","DigitBlock","DigitBlockMinimum","DigitCharacter","DigitCount","Digit\
Q","DihedralAngle","DihedralGroup","Dilation","DimensionalCombinations","DimensionalMeshComponents","DimensionReduce","DimensionReducerFunction","DimensionReduction","Dimensions","DiracComb","DiracDelta","DirectedEdge","DirectedEdges","DirectedGraph","DirectedGraphQ","DirectedInfinity","Direction","DirectionalLight","Directive","Directory","DirectoryName","DirectoryQ","DirectoryStack","DirichletBeta","DirichletCharacter","DirichletCondition","DirichletConvolve","DirichletDistribution","Dirichlet\
Eta","DirichletL","DirichletLambda","DirichletTransform","DirichletWindow","DisableConsolePrintPacket","DisableFormatting","DiscreteAsymptotic","DiscreteChirpZTransform","DiscreteConvolve","DiscreteDelta","DiscreteHadamardTransform","DiscreteIndicator","DiscreteInputOutputModel","DiscreteLimit","DiscreteLQEstimatorGains","DiscreteLQRegulatorGains","DiscreteLyapunovSolve","DiscreteMarkovProcess","DiscreteMaxLimit","DiscreteMinLimit","DiscretePlot","DiscretePlot3D","DiscreteRatio","DiscreteRiccati\
Solve","DiscreteShift","DiscreteTimeModelQ","DiscreteUniformDistribution","DiscreteVariables","DiscreteWaveletData","DiscreteWaveletPacketTransform","DiscreteWaveletTransform","DiscretizeGraphics","DiscretizeRegion","Discriminant","DisjointQ","Disjunction","Disk","DiskBox","DiskBoxOptions","DiskMatrix","DiskSegment","Dispatch","DispatchQ","DispersionEstimatorFunction","Display","DisplayAllSteps","DisplayEndPacket","DisplayForm","DisplayFunction","DisplayPacket","DisplayRules","DisplayString","Di\
splayTemporary","DisplayWith","DisplayWithRef","DisplayWithVariable","DistanceFunction","DistanceMatrix","DistanceTransform","Distribute","Distributed","DistributedContexts","DistributeDefinitions","DistributionChart","DistributionDomain","DistributionFitTest","DistributionParameterAssumptions","DistributionParameterQ","Dithering","Div","Divergence","Divide","DivideBy","Dividers","DivideSides","Divisible","Divisors","DivisorSigma","DivisorSum","DMSList","DMSString","Do","DockedCell","DockedCells",
"DocumentGenerator","DocumentGeneratorInformation","DocumentGeneratorInformationData","DocumentGenerators","DocumentNotebook","DocumentWeightingRules","Dodecahedron","DomainRegistrationInformation","DominantColors","DominatorTreeGraph","DominatorVertexList","DOSTextFormat","Dot","DotDashed","DotEqual","DotLayer","DotPlusLayer","Dotted","DoubleBracketingBar","DoubleContourIntegral","DoubleDownArrow","DoubleLeftArrow","DoubleLeftRightArrow","DoubleLeftTee","DoubleLongLeftArrow","DoubleLongLeftRigh\
tArrow","DoubleLongRightArrow","DoubleRightArrow","DoubleRightTee","DoubleUpArrow","DoubleUpDownArrow","DoubleVerticalBar","DoublyInfinite","Down","DownArrow","DownArrowBar","DownArrowUpArrow","DownLeftRightVector","DownLeftTeeVector","DownLeftVector","DownLeftVectorBar","DownRightTeeVector","DownRightVector","DownRightVectorBar","Downsample","DownTee","DownTeeArrow","DownValues","DownValuesFunction","DragAndDrop","DrawBackFaces","DrawEdges","DrawFrontFaces","DrawHighlighted","DrazinInverse","Dr\
op","DropoutLayer","DropShadowing","DSolve","DSolveChangeVariables","DSolveValue","Dt","DualLinearProgramming","DualPlanarGraph","DualPolyhedron","DualSystemsModel","DumpGet","DumpSave","DuplicateFreeQ","Duration","Dynamic","DynamicBox","DynamicBoxOptions","DynamicEvaluationTimeout","DynamicGeoGraphics","DynamicImage","DynamicLocation","DynamicModule","DynamicModuleBox","DynamicModuleBoxOptions","DynamicModuleParent","DynamicModuleValues","DynamicName","DynamicNamespace","DynamicReference","Dyna\
micSetting","DynamicUpdating","DynamicWrapper","DynamicWrapperBox","DynamicWrapperBoxOptions","E","EarthImpactData","EarthquakeData","EccentricityCentrality","Echo","EchoEvaluation","EchoFunction","EchoLabel","EchoTiming","EclipseType","EdgeAdd","EdgeBetweennessCentrality","EdgeCapacity","EdgeCapForm","EdgeChromaticNumber","EdgeColor","EdgeConnectivity","EdgeContract","EdgeCost","EdgeCount","EdgeCoverQ","EdgeCycleMatrix","EdgeDashing","EdgeDelete","EdgeDetect","EdgeForm","EdgeIndex","EdgeJoinFor\
m","EdgeLabeling","EdgeLabels","EdgeLabelStyle","EdgeList","EdgeOpacity","EdgeQ","EdgeRenderingFunction","EdgeRules","EdgeShapeFunction","EdgeStyle","EdgeTaggedGraph","EdgeTaggedGraphQ","EdgeTags","EdgeThickness","EdgeTransitiveGraphQ","EdgeValueRange","EdgeValueSizes","EdgeWeight","EdgeWeightedGraphQ","Editable","EditButtonSettings","EditCellTagsSettings","EditDistance","EffectiveInterest","Eigensystem","Eigenvalues","EigenvectorCentrality","Eigenvectors","Element","ElementData","ElementwiseLay\
er","ElidedForms","Eliminate","EliminationOrder","Ellipsoid","EllipticE","EllipticExp","EllipticExpPrime","EllipticF","EllipticFilterModel","EllipticK","EllipticLog","EllipticNomeQ","EllipticPi","EllipticReducedHalfPeriods","EllipticTheta","EllipticThetaPrime","EmbedCode","EmbeddedHTML","EmbeddedService","EmbeddedSQLEntityClass","EmbeddedSQLExpression","EmbeddingLayer","EmbeddingObject","EmitSound","EmphasizeSyntaxErrors","EmpiricalDistribution","Empty","EmptyGraphQ","EmptyRegion","EmptySpaceF",
"EnableConsolePrintPacket","Enabled","Enclose","Encode","Encrypt","EncryptedObject","EncryptFile","End","EndAdd","EndDialogPacket","EndOfBuffer","EndOfFile","EndOfLine","EndOfString","EndPackage","EngineEnvironment","EngineeringForm","Enter","EnterExpressionPacket","EnterTextPacket","Entity","EntityClass","EntityClassList","EntityCopies","EntityFunction","EntityGroup","EntityInstance","EntityList","EntityPrefetch","EntityProperties","EntityProperty","EntityPropertyClass","EntityRegister","Entity\
Store","EntityStores","EntityTypeName","EntityUnregister","EntityValue","Entropy","EntropyFilter","Environment","Epilog","EpilogFunction","Equal","EqualColumns","EqualRows","EqualTilde","EqualTo","EquatedTo","Equilibrium","EquirippleFilterKernel","Equivalent","Erf","Erfc","Erfi","ErlangB","ErlangC","ErlangDistribution","Erosion","ErrorBox","ErrorBoxOptions","ErrorNorm","ErrorPacket","ErrorsDialogSettings","EscapeRadius","EstimatedBackground","EstimatedDistribution","EstimatedPointNormals","Estim\
atedPointProcess","EstimatedProcess","EstimatedVariogramModel","EstimatorGains","EstimatorRegulator","EuclideanDistance","EulerAngles","EulerCharacteristic","EulerE","EulerGamma","EulerianGraphQ","EulerMatrix","EulerPhi","Evaluatable","Evaluate","Evaluated","EvaluatePacket","EvaluateScheduledTask","EvaluationBox","EvaluationCell","EvaluationCompletionAction","EvaluationData","EvaluationElements","EvaluationEnvironment","EvaluationMode","EvaluationMonitor","EvaluationNotebook","EvaluationObject",
"EvaluationOrder","EvaluationPrivileges","EvaluationRateLimit","Evaluator","EvaluatorNames","EvenQ","EventData","EventEvaluator","EventHandler","EventHandlerTag","EventLabels","EventSeries","ExactBlackmanWindow","ExactNumberQ","ExactRootIsolation","ExampleData","Except","ExcludedContexts","ExcludedForms","ExcludedLines","ExcludedPhysicalQuantities","ExcludePods","Exclusions","ExclusionsStyle","Exists","Exit","ExitDialog","ExoplanetData","Exp","Expand","ExpandAll","ExpandDenominator","ExpandFileN\
ame","ExpandNumerator","Expectation","ExpectationE","ExpectedValue","ExpGammaDistribution","ExpIntegralE","ExpIntegralEi","ExpirationDate","Exponent","ExponentFunction","ExponentialDistribution","ExponentialFamily","ExponentialGeneratingFunction","ExponentialMovingAverage","ExponentialPowerDistribution","ExponentPosition","ExponentStep","Export","ExportAutoReplacements","ExportByteArray","ExportForm","ExportPacket","ExportString","Expression","ExpressionCell","ExpressionGraph","ExpressionPacket",
"ExpressionTree","ExpressionUUID","ExpToTrig","ExtendedEntityClass","ExtendedGCD","Extension","ExtentElementFunction","ExtentMarkers","ExtentSize","ExternalBundle","ExternalCall","ExternalDataCharacterEncoding","ExternalEvaluate","ExternalFunction","ExternalFunctionName","ExternalIdentifier","ExternalObject","ExternalOptions","ExternalSessionObject","ExternalSessions","ExternalStorageBase","ExternalStorageDownload","ExternalStorageGet","ExternalStorageObject","ExternalStoragePut","ExternalStorag\
eUpload","ExternalTypeSignature","ExternalValue","Extract","ExtractArchive","ExtractLayer","ExtractPacletArchive","ExtremeValueDistribution","FaceAlign","FaceForm","FaceGrids","FaceGridsStyle","FaceRecognize","FacialFeatures","Factor","FactorComplete","Factorial","Factorial2","FactorialMoment","FactorialMomentGeneratingFunction","FactorialPower","FactorInteger","FactorList","FactorSquareFree","FactorSquareFreeList","FactorTerms","FactorTermsList","Fail","Failure","FailureAction","FailureDistribu\
tion","FailureQ","False","FareySequence","FARIMAProcess","FeatureDistance","FeatureExtract","FeatureExtraction","FeatureExtractor","FeatureExtractorFunction","FeatureImpactPlot","FeatureNames","FeatureNearest","FeatureSpacePlot","FeatureSpacePlot3D","FeatureTypes","FeatureValueDependencyPlot","FeatureValueImpactPlot","FEDisableConsolePrintPacket","FeedbackLinearize","FeedbackSector","FeedbackSectorStyle","FeedbackType","FEEnableConsolePrintPacket","FetalGrowthData","Fibonacci","Fibonorial","Fiel\
dCompletionFunction","FieldHint","FieldHintStyle","FieldMasked","FieldSize","File","FileBaseName","FileByteCount","FileConvert","FileDate","FileExistsQ","FileExtension","FileFormat","FileFormatProperties","FileFormatQ","FileHandler","FileHash","FileInformation","FileName","FileNameDepth","FileNameDialogSettings","FileNameDrop","FileNameForms","FileNameJoin","FileNames","FileNameSetter","FileNameSplit","FileNameTake","FileNameToFormatList","FilePrint","FileSize","FileSystemMap","FileSystemScan","\
FileSystemTree","FileTemplate","FileTemplateApply","FileType","FilledCurve","FilledCurveBox","FilledCurveBoxOptions","FilledTorus","FillForm","Filling","FillingStyle","FillingTransform","FilteredEntityClass","FilterRules","FinancialBond","FinancialData","FinancialDerivative","FinancialIndicator","Find","FindAnomalies","FindArgMax","FindArgMin","FindChannels","FindClique","FindClusters","FindCookies","FindCurvePath","FindCycle","FindDevices","FindDistribution","FindDistributionParameters","FindDi\
visions","FindEdgeColoring","FindEdgeCover","FindEdgeCut","FindEdgeIndependentPaths","FindEquationalProof","FindEulerianCycle","FindExternalEvaluators","FindFaces","FindFile","FindFit","FindFormula","FindFundamentalCycles","FindGeneratingFunction","FindGeoLocation","FindGeometricConjectures","FindGeometricTransform","FindGraphCommunities","FindGraphIsomorphism","FindGraphPartition","FindHamiltonianCycle","FindHamiltonianPath","FindHiddenMarkovStates","FindImageText","FindIndependentEdgeSet","Fin\
dIndependentVertexSet","FindInstance","FindIntegerNullVector","FindIsomers","FindIsomorphicSubgraph","FindKClan","FindKClique","FindKClub","FindKPlex","FindLibrary","FindLinearRecurrence","FindList","FindMatchingColor","FindMaximum","FindMaximumCut","FindMaximumFlow","FindMaxValue","FindMeshDefects","FindMinimum","FindMinimumCostFlow","FindMinimumCut","FindMinValue","FindMoleculeSubstructure","FindPath","FindPeaks","FindPermutation","FindPlanarColoring","FindPointProcessParameters","FindPostmanT\
our","FindProcessParameters","FindRegionTransform","FindRepeat","FindRoot","FindSequenceFunction","FindSettings","FindShortestPath","FindShortestTour","FindSpanningTree","FindSubgraphIsomorphism","FindSystemModelEquilibrium","FindTextualAnswer","FindThreshold","FindTransientRepeat","FindVertexColoring","FindVertexCover","FindVertexCut","FindVertexIndependentPaths","Fine","FinishDynamic","FiniteAbelianGroupCount","FiniteGroupCount","FiniteGroupData","First","FirstCase","FirstPassageTimeDistributi\
on","FirstPosition","FischerGroupFi22","FischerGroupFi23","FischerGroupFi24Prime","FisherHypergeometricDistribution","FisherRatioTest","FisherZDistribution","Fit","FitAll","FitRegularization","FittedModel","FixedOrder","FixedPoint","FixedPointList","FlashSelection","Flat","FlatShading","Flatten","FlattenAt","FlattenLayer","FlatTopWindow","FlightData","FlipView","Floor","FlowPolynomial","Fold","FoldList","FoldPair","FoldPairList","FoldWhile","FoldWhileList","FollowRedirects","Font","FontColor","F\
ontFamily","FontForm","FontName","FontOpacity","FontPostScriptName","FontProperties","FontReencoding","FontSize","FontSlant","FontSubstitutions","FontTracking","FontVariations","FontWeight","For","ForAll","ForAllType","ForceVersionInstall","Format","FormatRules","FormatType","FormatTypeAutoConvert","FormatValues","FormBox","FormBoxOptions","FormControl","FormFunction","FormLayoutFunction","FormObject","FormPage","FormProtectionMethod","FormTheme","FormulaData","FormulaLookup","FortranForm","Forw\
ard","ForwardBackward","ForwardCloudCredentials","Fourier","FourierCoefficient","FourierCosCoefficient","FourierCosSeries","FourierCosTransform","FourierDCT","FourierDCTFilter","FourierDCTMatrix","FourierDST","FourierDSTMatrix","FourierMatrix","FourierParameters","FourierSequenceTransform","FourierSeries","FourierSinCoefficient","FourierSinSeries","FourierSinTransform","FourierTransform","FourierTrigSeries","FoxH","FoxHReduce","FractionalBrownianMotionProcess","FractionalD","FractionalGaussianNo\
iseProcess","FractionalPart","FractionBox","FractionBoxOptions","FractionLine","Frame","FrameBox","FrameBoxOptions","Framed","FrameInset","FrameLabel","Frameless","FrameListVideo","FrameMargins","FrameRate","FrameStyle","FrameTicks","FrameTicksStyle","FRatioDistribution","FrechetDistribution","FreeQ","FrenetSerretSystem","FrequencySamplingFilterKernel","FresnelC","FresnelF","FresnelG","FresnelS","Friday","FrobeniusNumber","FrobeniusSolve","FromAbsoluteTime","FromCharacterCode","FromCoefficientRu\
les","FromContinuedFraction","FromDate","FromDateString","FromDigits","FromDMS","FromEntity","FromJulianDate","FromLetterNumber","FromPolarCoordinates","FromRawPointer","FromRomanNumeral","FromSphericalCoordinates","FromUnixTime","Front","FrontEndDynamicExpression","FrontEndEventActions","FrontEndExecute","FrontEndObject","FrontEndResource","FrontEndResourceString","FrontEndStackSize","FrontEndToken","FrontEndTokenExecute","FrontEndValueCache","FrontEndVersion","FrontFaceColor","FrontFaceGlowCol\
or","FrontFaceOpacity","FrontFaceSpecularColor","FrontFaceSpecularExponent","FrontFaceSurfaceAppearance","FrontFaceTexture","Full","FullAxes","FullDefinition","FullForm","FullGraphics","FullInformationOutputRegulator","FullOptions","FullRegion","FullSimplify","Function","FunctionAnalytic","FunctionBijective","FunctionCompile","FunctionCompileExport","FunctionCompileExportByteArray","FunctionCompileExportLibrary","FunctionCompileExportString","FunctionContinuous","FunctionConvexity","FunctionDecl\
aration","FunctionDiscontinuities","FunctionDomain","FunctionExpand","FunctionInjective","FunctionInterpolation","FunctionLayer","FunctionMeromorphic","FunctionMonotonicity","FunctionPeriod","FunctionPoles","FunctionRange","FunctionSign","FunctionSingularities","FunctionSpace","FunctionSurjective","FussellVeselyImportance","GaborFilter","GaborMatrix","GaborWavelet","GainMargins","GainPhaseMargins","GalaxyData","GalleryView","Gamma","GammaDistribution","GammaRegularized","GapPenalty","GARCHProces\
s","GatedRecurrentLayer","Gather","GatherBy","GaugeFaceElementFunction","GaugeFaceStyle","GaugeFrameElementFunction","GaugeFrameSize","GaugeFrameStyle","GaugeLabels","GaugeMarkers","GaugeStyle","GaussianFilter","GaussianIntegers","GaussianMatrix","GaussianOrthogonalMatrixDistribution","GaussianSymplecticMatrixDistribution","GaussianUnitaryMatrixDistribution","GaussianWindow","GCD","GegenbauerC","General","GeneralizedLinearModelFit","GenerateAsymmetricKeyPair","GenerateConditions","GeneratedAsset\
Format","GeneratedAssetLocation","GeneratedCell","GeneratedCellStyles","GeneratedDocumentBinding","GenerateDerivedKey","GenerateDigitalSignature","GenerateDocument","GeneratedParameters","GeneratedQuantityMagnitudes","GenerateFileSignature","GenerateHTTPResponse","GenerateSecuredAuthenticationKey","GenerateSymmetricKey","GeneratingFunction","GeneratorDescription","GeneratorHistoryLength","GeneratorOutputType","Generic","GenericCylindricalDecomposition","GenomeData","GenomeLookup","GeoAntipode","\
GeoArea","GeoArraySize","GeoBackground","GeoBoundary","GeoBoundingBox","GeoBounds","GeoBoundsRegion","GeoBoundsRegionBoundary","GeoBubbleChart","GeoCenter","GeoCircle","GeoContourPlot","GeoDensityPlot","GeodesicClosing","GeodesicDilation","GeodesicErosion","GeodesicOpening","GeodesicPolyhedron","GeoDestination","GeodesyData","GeoDirection","GeoDisk","GeoDisplacement","GeoDistance","GeoDistanceList","GeoElevationData","GeoEntities","GeoGraphics","GeoGraphPlot","GeoGraphValuePlot","GeogravityModel\
Data","GeoGridDirectionDifference","GeoGridLines","GeoGridLinesStyle","GeoGridPosition","GeoGridRange","GeoGridRangePadding","GeoGridUnitArea","GeoGridUnitDistance","GeoGridVector","GeoGroup","GeoHemisphere","GeoHemisphereBoundary","GeoHistogram","GeoIdentify","GeoImage","GeoLabels","GeoLength","GeoListPlot","GeoLocation","GeologicalPeriodData","GeomagneticModelData","GeoMarker","GeometricAssertion","GeometricBrownianMotionProcess","GeometricDistribution","GeometricMean","GeometricMeanFilter","G\
eometricOptimization","GeometricScene","GeometricStep","GeometricStylingRules","GeometricTest","GeometricTransformation","GeometricTransformation3DBox","GeometricTransformation3DBoxOptions","GeometricTransformationBox","GeometricTransformationBoxOptions","GeoModel","GeoNearest","GeoOrientationData","GeoPath","GeoPolygon","GeoPosition","GeoPositionENU","GeoPositionXYZ","GeoProjection","GeoProjectionData","GeoRange","GeoRangePadding","GeoRegionValuePlot","GeoResolution","GeoScaleBar","GeoServer","\
GeoSmoothHistogram","GeoStreamPlot","GeoStyling","GeoStylingImageFunction","GeoVariant","GeoVector","GeoVectorENU","GeoVectorPlot","GeoVectorXYZ","GeoVisibleRegion","GeoVisibleRegionBoundary","GeoWithinQ","GeoZoomLevel","GestureHandler","GestureHandlerTag","Get","GetContext","GetEnvironment","GetFileName","GetLinebreakInformationPacket","GibbsPointProcess","Glaisher","GlobalClusteringCoefficient","GlobalPreferences","GlobalSession","Glow","GoldenAngle","GoldenRatio","GompertzMakehamDistribution",
"GoochShading","GoodmanKruskalGamma","GoodmanKruskalGammaTest","Goto","GouraudShading","Grad","Gradient","GradientFilter","GradientFittedMesh","GradientOrientationFilter","GrammarApply","GrammarRules","GrammarToken","Graph","Graph3D","GraphAssortativity","GraphAutomorphismGroup","GraphCenter","GraphComplement","GraphData","GraphDensity","GraphDiameter","GraphDifference","GraphDisjointUnion","GraphDistance","GraphDistanceMatrix","GraphEmbedding","GraphHighlight","GraphHighlightStyle","GraphHub","\
Graphics","Graphics3D","Graphics3DBox","Graphics3DBoxOptions","GraphicsArray","GraphicsBaseline","GraphicsBox","GraphicsBoxOptions","GraphicsColor","GraphicsColumn","GraphicsComplex","GraphicsComplex3DBox","GraphicsComplex3DBoxOptions","GraphicsComplexBox","GraphicsComplexBoxOptions","GraphicsContents","GraphicsData","GraphicsGrid","GraphicsGridBox","GraphicsGroup","GraphicsGroup3DBox","GraphicsGroup3DBoxOptions","GraphicsGroupBox","GraphicsGroupBoxOptions","GraphicsGrouping","GraphicsHighlightC\
olor","GraphicsRow","GraphicsSpacing","GraphicsStyle","GraphIntersection","GraphJoin","GraphLayerLabels","GraphLayers","GraphLayerStyle","GraphLayout","GraphLinkEfficiency","GraphPeriphery","GraphPlot","GraphPlot3D","GraphPower","GraphProduct","GraphPropertyDistribution","GraphQ","GraphRadius","GraphReciprocity","GraphRoot","GraphStyle","GraphSum","GraphTree","GraphUnion","Gray","GrayLevel","Greater","GreaterEqual","GreaterEqualLess","GreaterEqualThan","GreaterFullEqual","GreaterGreater","Greate\
rLess","GreaterSlantEqual","GreaterThan","GreaterTilde","GreekStyle","Green","GreenFunction","Grid","GridBaseline","GridBox","GridBoxAlignment","GridBoxBackground","GridBoxDividers","GridBoxFrame","GridBoxItemSize","GridBoxItemStyle","GridBoxOptions","GridBoxSpacings","GridCreationSettings","GridDefaultElement","GridElementStyleOptions","GridFrame","GridFrameMargins","GridGraph","GridLines","GridLinesStyle","GridVideo","GroebnerBasis","GroupActionBase","GroupBy","GroupCentralizer","GroupElementF\
romWord","GroupElementPosition","GroupElementQ","GroupElements","GroupElementToWord","GroupGenerators","Groupings","GroupMultiplicationTable","GroupOpenerColor","GroupOpenerInsideFrame","GroupOrbits","GroupOrder","GroupPageBreakWithin","GroupSetwiseStabilizer","GroupStabilizer","GroupStabilizerChain","GroupTogetherGrouping","GroupTogetherNestedGrouping","GrowCutComponents","Gudermannian","GuidedFilter","GumbelDistribution","HaarWavelet","HadamardMatrix","HalfLine","HalfNormalDistribution","HalfP\
lane","HalfSpace","HalftoneShading","HamiltonianGraphQ","HammingDistance","HammingWindow","HandlerFunctions","HandlerFunctionsKeys","HankelH1","HankelH2","HankelMatrix","HankelTransform","HannPoissonWindow","HannWindow","HaradaNortonGroupHN","HararyGraph","HardcorePointProcess","HarmonicMean","HarmonicMeanFilter","HarmonicNumber","Hash","HatchFilling","HatchShading","Haversine","HazardFunction","Head","HeadCompose","HeaderAlignment","HeaderBackground","HeaderDisplayFunction","HeaderLines","Heade\
rs","HeaderSize","HeaderStyle","Heads","HeatFluxValue","HeatInsulationValue","HeatOutflowValue","HeatRadiationValue","HeatSymmetryValue","HeatTemperatureCondition","HeatTransferPDEComponent","HeatTransferValue","HeavisideLambda","HeavisidePi","HeavisideTheta","HeldGroupHe","HeldPart","HelmholtzPDEComponent","HelpBrowserLookup","HelpBrowserNotebook","HelpBrowserSettings","HelpViewerSettings","Here","HermiteDecomposition","HermiteH","Hermitian","HermitianMatrixQ","HessenbergDecomposition","Hessian",
"HeunB","HeunBPrime","HeunC","HeunCPrime","HeunD","HeunDPrime","HeunG","HeunGPrime","HeunT","HeunTPrime","HexadecimalCharacter","Hexahedron","HexahedronBox","HexahedronBoxOptions","HiddenItems","HiddenMarkovProcess","HiddenSurface","Highlighted","HighlightGraph","HighlightImage","HighlightMesh","HighlightString","HighpassFilter","HigmanSimsGroupHS","HilbertCurve","HilbertFilter","HilbertMatrix","Histogram","Histogram3D","HistogramDistribution","HistogramList","HistogramPointDensity","HistogramTr\
ansform","HistogramTransformInterpolation","HistoricalPeriodData","HitMissTransform","HITSCentrality","HjorthDistribution","HodgeDual","HoeffdingD","HoeffdingDTest","Hold","HoldAll","HoldAllComplete","HoldComplete","HoldFirst","HoldForm","HoldPattern","HoldRest","HolidayCalendar","HomeDirectory","HomePage","Horizontal","HorizontalForm","HorizontalGauge","HorizontalScrollPosition","HornerForm","HostLookup","HotellingTSquareDistribution","HoytDistribution","HTMLSave","HTTPErrorResponse","HTTPRedir\
ect","HTTPRequest","HTTPRequestData","HTTPResponse","Hue","HumanGrowthData","HumpDownHump","HumpEqual","HurwitzLerchPhi","HurwitzZeta","HyperbolicDistribution","HypercubeGraph","HyperexponentialDistribution","Hyperfactorial","Hypergeometric0F1","Hypergeometric0F1Regularized","Hypergeometric1F1","Hypergeometric1F1Regularized","Hypergeometric2F1","Hypergeometric2F1Regularized","HypergeometricDistribution","HypergeometricPFQ","HypergeometricPFQRegularized","HypergeometricU","Hyperlink","HyperlinkAc\
tion","HyperlinkCreationSettings","Hyperplane","Hyphenation","HyphenationOptions","HypoexponentialDistribution","HypothesisTestData","I","IconData","Iconize","IconizedObject","IconRules","Icosahedron","Identity","IdentityMatrix","If","IfCompiled","IgnoreCase","IgnoreDiacritics","IgnoreIsotopes","IgnorePunctuation","IgnoreSpellCheck","IgnoreStereochemistry","IgnoringInactive","Im","Image","Image3D","Image3DProjection","Image3DSlices","ImageAccumulate","ImageAdd","ImageAdjust","ImageAlign","ImageA\
pply","ImageApplyIndexed","ImageAspectRatio","ImageAssemble","ImageAugmentationLayer","ImageBoundingBoxes","ImageCache","ImageCacheValid","ImageCapture","ImageCaptureFunction","ImageCases","ImageChannels","ImageClip","ImageCollage","ImageColorSpace","ImageCompose","ImageContainsQ","ImageContents","ImageConvolve","ImageCooccurrence","ImageCorners","ImageCorrelate","ImageCorrespondingPoints","ImageCrop","ImageData","ImageDeconvolve","ImageDemosaic","ImageDifference","ImageDimensions","ImageDisplac\
ements","ImageDistance","ImageEditMode","ImageEffect","ImageExposureCombine","ImageFeatureTrack","ImageFileApply","ImageFileFilter","ImageFileScan","ImageFilter","ImageFocusCombine","ImageForestingComponents","ImageFormattingWidth","ImageForwardTransformation","ImageGraphics","ImageHistogram","ImageIdentify","ImageInstanceQ","ImageKeypoints","ImageLabels","ImageLegends","ImageLevels","ImageLines","ImageMargins","ImageMarker","ImageMarkers","ImageMeasurements","ImageMesh","ImageMultiply","ImageOf\
fset","ImagePad","ImagePadding","ImagePartition","ImagePeriodogram","ImagePerspectiveTransformation","ImagePosition","ImagePreviewFunction","ImagePyramid","ImagePyramidApply","ImageQ","ImageRangeCache","ImageRecolor","ImageReflect","ImageRegion","ImageResize","ImageResolution","ImageRestyle","ImageRotate","ImageRotated","ImageSaliencyFilter","ImageScaled","ImageScan","ImageSize","ImageSizeAction","ImageSizeCache","ImageSizeMultipliers","ImageSizeRaw","ImageStitch","ImageSubtract","ImageTake","Im\
ageTransformation","ImageTrim","ImageType","ImageValue","ImageValuePositions","ImageVectorscopePlot","ImageWaveformPlot","ImagingDevice","ImplicitD","ImplicitRegion","Implies","Import","ImportAutoReplacements","ImportByteArray","ImportedObject","ImportOptions","ImportString","ImprovementImportance","In","Inactivate","Inactive","InactiveStyle","IncidenceGraph","IncidenceList","IncidenceMatrix","IncludeAromaticBonds","IncludeConstantBasis","IncludedContexts","IncludeDefinitions","IncludeDirectorie\
s","IncludeFileExtension","IncludeGeneratorTasks","IncludeHydrogens","IncludeInflections","IncludeMetaInformation","IncludePods","IncludeQuantities","IncludeRelatedTables","IncludeSingularSolutions","IncludeSingularTerm","IncludeWindowTimes","Increment","IndefiniteMatrixQ","Indent","IndentingNewlineSpacings","IndentMaxFraction","IndependenceTest","IndependentEdgeSetQ","IndependentPhysicalQuantity","IndependentUnit","IndependentUnitDimension","IndependentVertexSetQ","Indeterminate","Indeterminate\
Threshold","IndexCreationOptions","Indexed","IndexEdgeTaggedGraph","IndexGraph","IndexTag","Inequality","InertEvaluate","InertExpression","InexactNumberQ","InexactNumbers","InfiniteFuture","InfiniteLine","InfiniteLineThrough","InfinitePast","InfinitePlane","Infinity","Infix","InflationAdjust","InflationMethod","Information","InformationData","InformationDataGrid","Inherited","InheritScope","InhomogeneousPoissonPointProcess","InhomogeneousPoissonProcess","InitialEvaluationHistory","Initialization",
"InitializationCell","InitializationCellEvaluation","InitializationCellWarning","InitializationObject","InitializationObjects","InitializationValue","Initialize","InitialSeeding","InlineCounterAssignments","InlineCounterIncrements","InlineRules","Inner","InnerPolygon","InnerPolyhedron","Inpaint","Input","InputAliases","InputAssumptions","InputAutoReplacements","InputField","InputFieldBox","InputFieldBoxOptions","InputForm","InputGrouping","InputNamePacket","InputNotebook","InputPacket","InputPor\
ts","InputSettings","InputStream","InputString","InputStringPacket","InputToBoxFormPacket","Insert","InsertionFunction","InsertionPointObject","InsertLinebreaks","InsertResults","Inset","Inset3DBox","Inset3DBoxOptions","InsetBox","InsetBoxOptions","Insphere","Install","InstallService","InstanceNormalizationLayer","InString","Integer","IntegerDigits","IntegerExponent","IntegerLength","IntegerName","IntegerPart","IntegerPartitions","IntegerQ","IntegerReverse","Integers","IntegerString","Integral",
"Integrate","IntegrateChangeVariables","Interactive","InteractiveTradingChart","InterfaceSwitched","Interlaced","Interleaving","InternallyBalancedDecomposition","InterpolatingFunction","InterpolatingPolynomial","Interpolation","InterpolationOrder","InterpolationPoints","InterpolationPrecision","Interpretation","InterpretationBox","InterpretationBoxOptions","InterpretationFunction","Interpreter","InterpretTemplate","InterquartileRange","Interrupt","InterruptSettings","IntersectedEntityClass","Int\
ersectingQ","Intersection","Interval","IntervalIntersection","IntervalMarkers","IntervalMarkersStyle","IntervalMemberQ","IntervalSlider","IntervalUnion","Into","Inverse","InverseBetaRegularized","InverseBilateralLaplaceTransform","InverseBilateralZTransform","InverseCDF","InverseChiSquareDistribution","InverseContinuousWaveletTransform","InverseDistanceTransform","InverseEllipticNomeQ","InverseErf","InverseErfc","InverseFourier","InverseFourierCosTransform","InverseFourierSequenceTransform","Inv\
erseFourierSinTransform","InverseFourierTransform","InverseFunction","InverseFunctions","InverseGammaDistribution","InverseGammaRegularized","InverseGaussianDistribution","InverseGudermannian","InverseHankelTransform","InverseHaversine","InverseImagePyramid","InverseJacobiCD","InverseJacobiCN","InverseJacobiCS","InverseJacobiDC","InverseJacobiDN","InverseJacobiDS","InverseJacobiNC","InverseJacobiND","InverseJacobiNS","InverseJacobiSC","InverseJacobiSD","InverseJacobiSN","InverseLaplaceTransform",
"InverseMellinTransform","InversePermutation","InverseRadon","InverseRadonTransform","InverseSeries","InverseShortTimeFourier","InverseSpectrogram","InverseSurvivalFunction","InverseTransformedRegion","InverseWaveletTransform","InverseWeierstrassP","InverseWishartMatrixDistribution","InverseZTransform","Invisible","InvisibleApplication","InvisibleTimes","IPAddress","IrreduciblePolynomialQ","IslandData","IsolatingInterval","IsomorphicGraphQ","IsomorphicSubgraphQ","IsotopeData","Italic","Item","It\
emAspectRatio","ItemBox","ItemBoxOptions","ItemDisplayFunction","ItemSize","ItemStyle","ItoProcess","JaccardDissimilarity","JacobiAmplitude","Jacobian","JacobiCD","JacobiCN","JacobiCS","JacobiDC","JacobiDN","JacobiDS","JacobiEpsilon","JacobiNC","JacobiND","JacobiNS","JacobiP","JacobiSC","JacobiSD","JacobiSN","JacobiSymbol","JacobiZeta","JacobiZN","JankoGroupJ1","JankoGroupJ2","JankoGroupJ3","JankoGroupJ4","JarqueBeraALMTest","JohnsonDistribution","Join","JoinAcross","Joined","JoinedCurve","Joine\
dCurveBox","JoinedCurveBoxOptions","JoinForm","JordanDecomposition","JordanModelDecomposition","JulianDate","JuliaSetBoettcher","JuliaSetIterationCount","JuliaSetPlot","JuliaSetPoints","K","KagiChart","KaiserBesselWindow","KaiserWindow","KalmanEstimator","KalmanFilter","KarhunenLoeveDecomposition","KaryTree","KatzCentrality","KCoreComponents","KDistribution","KEdgeConnectedComponents","KEdgeConnectedGraphQ","KeepExistingVersion","KelvinBei","KelvinBer","KelvinKei","KelvinKer","KendallTau","Kenda\
llTauTest","KernelConfiguration","KernelExecute","KernelFunction","KernelMixtureDistribution","KernelObject","Kernels","Ket","Key","KeyCollisionFunction","KeyComplement","KeyDrop","KeyDropFrom","KeyExistsQ","KeyFreeQ","KeyIntersection","KeyMap","KeyMemberQ","KeypointStrength","Keys","KeySelect","KeySort","KeySortBy","KeyTake","KeyUnion","KeyValueMap","KeyValuePattern","Khinchin","KillProcess","KirchhoffGraph","KirchhoffMatrix","KleinInvariantJ","KnapsackSolve","KnightTourGraph","KnotData","Known\
UnitQ","KochCurve","KolmogorovSmirnovTest","KroneckerDelta","KroneckerModelDecomposition","KroneckerProduct","KroneckerSymbol","KuiperTest","KumaraswamyDistribution","Kurtosis","KuwaharaFilter","KVertexConnectedComponents","KVertexConnectedGraphQ","LABColor","Label","Labeled","LabeledSlider","LabelingFunction","LabelingSize","LabelStyle","LabelVisibility","LaguerreL","LakeData","LambdaComponents","LambertW","LameC","LameCPrime","LameEigenvalueA","LameEigenvalueB","LameS","LameSPrime","LaminaData",
"LanczosWindow","LandauDistribution","Language","LanguageCategory","LanguageData","LanguageIdentify","LanguageOptions","LaplaceDistribution","LaplaceTransform","Laplacian","LaplacianFilter","LaplacianGaussianFilter","LaplacianPDETerm","Large","Larger","Last","Latitude","LatitudeLongitude","LatticeData","LatticeReduce","Launch","LaunchKernels","LayeredGraphPlot","LayeredGraphPlot3D","LayerSizeFunction","LayoutInformation","LCHColor","LCM","LeaderSize","LeafCount","LeapVariant","LeapYearQ","LearnD\
istribution","LearnedDistribution","LearningRate","LearningRateMultipliers","LeastSquares","LeastSquaresFilterKernel","Left","LeftArrow","LeftArrowBar","LeftArrowRightArrow","LeftDownTeeVector","LeftDownVector","LeftDownVectorBar","LeftRightArrow","LeftRightVector","LeftTee","LeftTeeArrow","LeftTeeVector","LeftTriangle","LeftTriangleBar","LeftTriangleEqual","LeftUpDownVector","LeftUpTeeVector","LeftUpVector","LeftUpVectorBar","LeftVector","LeftVectorBar","LegendAppearance","Legended","LegendFunc\
tion","LegendLabel","LegendLayout","LegendMargins","LegendMarkers","LegendMarkerSize","LegendreP","LegendreQ","LegendreType","Length","LengthWhile","LerchPhi","Less","LessEqual","LessEqualGreater","LessEqualThan","LessFullEqual","LessGreater","LessLess","LessSlantEqual","LessThan","LessTilde","LetterCharacter","LetterCounts","LetterNumber","LetterQ","Level","LeveneTest","LeviCivitaTensor","LevyDistribution","Lexicographic","LexicographicOrder","LexicographicSort","LibraryDataType","LibraryFuncti\
on","LibraryFunctionDeclaration","LibraryFunctionError","LibraryFunctionInformation","LibraryFunctionLoad","LibraryFunctionUnload","LibraryLoad","LibraryUnload","LicenseEntitlementObject","LicenseEntitlements","LicenseID","LicensingSettings","LiftingFilterData","LiftingWaveletTransform","LightBlue","LightBrown","LightCyan","Lighter","LightGray","LightGreen","Lighting","LightingAngle","LightMagenta","LightOrange","LightPink","LightPurple","LightRed","LightSources","LightYellow","Likelihood","Limi\
t","LimitsPositioning","LimitsPositioningTokens","LindleyDistribution","Line","Line3DBox","Line3DBoxOptions","LinearFilter","LinearFractionalOptimization","LinearFractionalTransform","LinearGradientFilling","LinearGradientImage","LinearizingTransformationData","LinearLayer","LinearModelFit","LinearOffsetFunction","LinearOptimization","LinearProgramming","LinearRecurrence","LinearSolve","LinearSolveFunction","LineBox","LineBoxOptions","LineBreak","LinebreakAdjustments","LineBreakChart","Linebreak\
SemicolonWeighting","LineBreakWithin","LineColor","LineGraph","LineIndent","LineIndentMaxFraction","LineIntegralConvolutionPlot","LineIntegralConvolutionScale","LineLegend","LineOpacity","LineSpacing","LineWrapParts","LinkActivate","LinkClose","LinkConnect","LinkConnectedQ","LinkCreate","LinkError","LinkFlush","LinkFunction","LinkHost","LinkInterrupt","LinkLaunch","LinkMode","LinkObject","LinkOpen","LinkOptions","LinkPatterns","LinkProtocol","LinkRankCentrality","LinkRead","LinkReadHeld","LinkRe\
adyQ","Links","LinkService","LinkWrite","LinkWriteHeld","LiouvilleLambda","List","Listable","ListAnimate","ListContourPlot","ListContourPlot3D","ListConvolve","ListCorrelate","ListCurvePathPlot","ListDeconvolve","ListDensityPlot","ListDensityPlot3D","Listen","ListFormat","ListFourierSequenceTransform","ListInterpolation","ListLineIntegralConvolutionPlot","ListLinePlot","ListLinePlot3D","ListLogLinearPlot","ListLogLogPlot","ListLogPlot","ListPicker","ListPickerBox","ListPickerBoxBackground","List\
PickerBoxOptions","ListPlay","ListPlot","ListPlot3D","ListPointPlot3D","ListPolarPlot","ListQ","ListSliceContourPlot3D","ListSliceDensityPlot3D","ListSliceVectorPlot3D","ListStepPlot","ListStreamDensityPlot","ListStreamPlot","ListStreamPlot3D","ListSurfacePlot3D","ListVectorDensityPlot","ListVectorDisplacementPlot","ListVectorDisplacementPlot3D","ListVectorPlot","ListVectorPlot3D","ListZTransform","Literal","LiteralSearch","LiteralType","LoadCompiledComponent","LocalAdaptiveBinarize","LocalCache",
"LocalClusteringCoefficient","LocalEvaluate","LocalizeDefinitions","LocalizeVariables","LocalObject","LocalObjects","LocalResponseNormalizationLayer","LocalSubmit","LocalSymbol","LocalTime","LocalTimeZone","LocationEquivalenceTest","LocationTest","Locator","LocatorAutoCreate","LocatorBox","LocatorBoxOptions","LocatorCentering","LocatorPane","LocatorPaneBox","LocatorPaneBoxOptions","LocatorRegion","Locked","Log","Log10","Log2","LogBarnesG","LogGamma","LogGammaDistribution","LogicalExpand","LogInt\
egral","LogisticDistribution","LogisticSigmoid","LogitModelFit","LogLikelihood","LogLinearPlot","LogLogisticDistribution","LogLogPlot","LogMultinormalDistribution","LogNormalDistribution","LogPlot","LogRankTest","LogSeriesDistribution","LongEqual","Longest","LongestCommonSequence","LongestCommonSequencePositions","LongestCommonSubsequence","LongestCommonSubsequencePositions","LongestMatch","LongestOrderedSequence","LongForm","Longitude","LongLeftArrow","LongLeftRightArrow","LongRightArrow","Long\
ShortTermMemoryLayer","Lookup","Loopback","LoopFreeGraphQ","Looping","LossFunction","LowerCaseQ","LowerLeftArrow","LowerRightArrow","LowerTriangularize","LowerTriangularMatrix","LowerTriangularMatrixQ","LowpassFilter","LQEstimatorGains","LQGRegulator","LQOutputRegulatorGains","LQRegulatorGains","LUBackSubstitution","LucasL","LuccioSamiComponents","LUDecomposition","LunarEclipse","LUVColor","LyapunovSolve","LyonsGroupLy","MachineID","MachineName","MachineNumberQ","MachinePrecision","MacintoshSyst\
emPageSetup","Magenta","Magnification","Magnify","MailAddressValidation","MailExecute","MailFolder","MailItem","MailReceiverFunction","MailResponseFunction","MailSearch","MailServerConnect","MailServerConnection","MailSettings","MainSolve","MaintainDynamicCaches","Majority","MakeBoxes","MakeExpression","MakeRules","ManagedLibraryExpressionID","ManagedLibraryExpressionQ","MandelbrotSetBoettcher","MandelbrotSetDistance","MandelbrotSetIterationCount","MandelbrotSetMemberQ","MandelbrotSetPlot","Mang\
oldtLambda","ManhattanDistance","Manipulate","Manipulator","MannedSpaceMissionData","MannWhitneyTest","MantissaExponent","Manual","Map","MapAll","MapApply","MapAt","MapIndexed","MAProcess","MapThread","MarchenkoPasturDistribution","MarcumQ","MardiaCombinedTest","MardiaKurtosisTest","MardiaSkewnessTest","MarginalDistribution","MarkovProcessProperties","Masking","MassConcentrationCondition","MassFluxValue","MassImpermeableBoundaryValue","MassOutflowValue","MassSymmetryValue","MassTransferValue","M\
assTransportPDEComponent","MatchingDissimilarity","MatchLocalNameQ","MatchLocalNames","MatchQ","Material","MaterialShading","MaternPointProcess","MathematicalFunctionData","MathematicaNotation","MathieuC","MathieuCharacteristicA","MathieuCharacteristicB","MathieuCharacteristicExponent","MathieuCPrime","MathieuGroupM11","MathieuGroupM12","MathieuGroupM22","MathieuGroupM23","MathieuGroupM24","MathieuS","MathieuSPrime","MathMLForm","MathMLText","Matrices","MatrixExp","MatrixForm","MatrixFunction","\
MatrixLog","MatrixNormalDistribution","MatrixPlot","MatrixPower","MatrixPropertyDistribution","MatrixQ","MatrixRank","MatrixTDistribution","Max","MaxBend","MaxCellMeasure","MaxColorDistance","MaxDate","MaxDetect","MaxDisplayedChildren","MaxDuration","MaxExtraBandwidths","MaxExtraConditions","MaxFeatureDisplacement","MaxFeatures","MaxFilter","MaximalBy","Maximize","MaxItems","MaxIterations","MaxLimit","MaxMemoryUsed","MaxMixtureKernels","MaxOverlapFraction","MaxPlotPoints","MaxPoints","MaxRecursi\
on","MaxStableDistribution","MaxStepFraction","MaxSteps","MaxStepSize","MaxTrainingRounds","MaxValue","MaxwellDistribution","MaxWordGap","McLaughlinGroupMcL","Mean","MeanAbsoluteLossLayer","MeanAround","MeanClusteringCoefficient","MeanDegreeConnectivity","MeanDeviation","MeanFilter","MeanGraphDistance","MeanNeighborDegree","MeanPointDensity","MeanShift","MeanShiftFilter","MeanSquaredLossLayer","Median","MedianDeviation","MedianFilter","MedicalTestData","Medium","MeijerG","MeijerGReduce","Meixner\
Distribution","MellinConvolve","MellinTransform","MemberQ","MemoryAvailable","MemoryConstrained","MemoryConstraint","MemoryInUse","MengerMesh","Menu","MenuAppearance","MenuCommandKey","MenuEvaluator","MenuItem","MenuList","MenuPacket","MenuSortingValue","MenuStyle","MenuView","Merge","MergeDifferences","MergingFunction","MersennePrimeExponent","MersennePrimeExponentQ","Mesh","MeshCellCentroid","MeshCellCount","MeshCellHighlight","MeshCellIndex","MeshCellLabel","MeshCellMarker","MeshCellMeasure",
"MeshCellQuality","MeshCells","MeshCellShapeFunction","MeshCellStyle","MeshConnectivityGraph","MeshCoordinates","MeshFunctions","MeshPrimitives","MeshQualityGoal","MeshRange","MeshRefinementFunction","MeshRegion","MeshRegionQ","MeshShading","MeshStyle","Message","MessageDialog","MessageList","MessageName","MessageObject","MessageOptions","MessagePacket","Messages","MessagesNotebook","MetaCharacters","MetaInformation","MeteorShowerData","Method","MethodOptions","MexicanHatWavelet","MeyerWavelet",
"Midpoint","MIMETypeToFormatList","Min","MinColorDistance","MinDate","MinDetect","MineralData","MinFilter","MinimalBy","MinimalPolynomial","MinimalStateSpaceModel","Minimize","MinimumTimeIncrement","MinIntervalSize","MinkowskiQuestionMark","MinLimit","MinMax","MinorPlanetData","Minors","MinPointSeparation","MinRecursion","MinSize","MinStableDistribution","Minus","MinusPlus","MinValue","Missing","MissingBehavior","MissingDataMethod","MissingDataRules","MissingQ","MissingString","MissingStyle","Mi\
ssingValuePattern","MissingValueSynthesis","MittagLefflerE","MixedFractionParts","MixedGraphQ","MixedMagnitude","MixedRadix","MixedRadixQuantity","MixedUnit","MixtureDistribution","Mod","Modal","Mode","ModelPredictiveController","Modular","ModularInverse","ModularLambda","Module","Modulus","MoebiusMu","Molecule","MoleculeAlign","MoleculeContainsQ","MoleculeDraw","MoleculeEquivalentQ","MoleculeFreeQ","MoleculeGraph","MoleculeMatchQ","MoleculeMaximumCommonSubstructure","MoleculeModify","MoleculeNa\
me","MoleculePattern","MoleculePlot","MoleculePlot3D","MoleculeProperty","MoleculeQ","MoleculeRecognize","MoleculeSubstructureCount","MoleculeValue","Moment","MomentConvert","MomentEvaluate","MomentGeneratingFunction","MomentOfInertia","Monday","Monitor","MonomialList","MonomialOrder","MonsterGroupM","MoonPhase","MoonPosition","MorletWavelet","MorphologicalBinarize","MorphologicalBranchPoints","MorphologicalComponents","MorphologicalEulerNumber","MorphologicalGraph","MorphologicalPerimeter","Mor\
phologicalTransform","MortalityData","Most","MountainData","MouseAnnotation","MouseAppearance","MouseAppearanceTag","MouseButtons","Mouseover","MousePointerNote","MousePosition","MovieData","MovingAverage","MovingMap","MovingMedian","MoyalDistribution","MultiaxisArrangement","Multicolumn","MultiedgeStyle","MultigraphQ","MultilaunchWarning","MultiLetterItalics","MultiLetterStyle","MultilineFunction","Multinomial","MultinomialDistribution","MultinormalDistribution","MultiplicativeOrder","Multiplic\
ity","MultiplySides","MultiscriptBoxOptions","Multiselection","MultivariateHypergeometricDistribution","MultivariatePoissonDistribution","MultivariateTDistribution","N","NakagamiDistribution","NameQ","Names","NamespaceBox","NamespaceBoxOptions","Nand","NArgMax","NArgMin","NBernoulliB","NBodySimulation","NBodySimulationData","NCache","NCaputoD","NDEigensystem","NDEigenvalues","NDSolve","NDSolveValue","Nearest","NearestFunction","NearestMeshCells","NearestNeighborG","NearestNeighborGraph","Nearest\
To","NebulaData","NeedlemanWunschSimilarity","Needs","Negative","NegativeBinomialDistribution","NegativeDefiniteMatrixQ","NegativeIntegers","NegativelyOrientedPoints","NegativeMultinomialDistribution","NegativeRationals","NegativeReals","NegativeSemidefiniteMatrixQ","NeighborhoodData","NeighborhoodGraph","Nest","NestedGreaterGreater","NestedLessLess","NestedScriptRules","NestGraph","NestList","NestTree","NestWhile","NestWhileList","NetAppend","NetArray","NetArrayLayer","NetBidirectionalOperator",
"NetChain","NetDecoder","NetDelete","NetDrop","NetEncoder","NetEvaluationMode","NetExternalObject","NetExtract","NetFlatten","NetFoldOperator","NetGANOperator","NetGraph","NetInformation","NetInitialize","NetInsert","NetInsertSharedArrays","NetJoin","NetMapOperator","NetMapThreadOperator","NetMeasurements","NetModel","NetNestOperator","NetPairEmbeddingOperator","NetPort","NetPortGradient","NetPrepend","NetRename","NetReplace","NetReplacePart","NetSharedArray","NetStateObject","NetTake","NetTrain",
"NetTrainResultsObject","NetUnfold","NetworkPacketCapture","NetworkPacketRecording","NetworkPacketRecordingDuring","NetworkPacketTrace","NeumannValue","NevilleThetaC","NevilleThetaD","NevilleThetaN","NevilleThetaS","NewPrimitiveStyle","NExpectation","Next","NextCell","NextDate","NextPrime","NextScheduledTaskTime","NeymanScottPointProcess","NFractionalD","NHoldAll","NHoldFirst","NHoldRest","NicholsGridLines","NicholsPlot","NightHemisphere","NIntegrate","NMaximize","NMaxValue","NMinimize","NMinVal\
ue","NominalScale","NominalVariables","NonAssociative","NoncentralBetaDistribution","NoncentralChiSquareDistribution","NoncentralFRatioDistribution","NoncentralStudentTDistribution","NonCommutativeMultiply","NonConstants","NondimensionalizationTransform","None","NoneTrue","NonlinearModelFit","NonlinearStateSpaceModel","NonlocalMeansFilter","NonNegative","NonNegativeIntegers","NonNegativeRationals","NonNegativeReals","NonPositive","NonPositiveIntegers","NonPositiveRationals","NonPositiveReals","N\
or","NorlundB","Norm","Normal","NormalDistribution","NormalGrouping","NormalizationLayer","Normalize","Normalized","NormalizedSquaredEuclideanDistance","NormalMatrixQ","NormalsFunction","NormFunction","Not","NotCongruent","NotCupCap","NotDoubleVerticalBar","Notebook","NotebookApply","NotebookAutoSave","NotebookBrowseDirectory","NotebookClose","NotebookConvertSettings","NotebookCreate","NotebookDefault","NotebookDelete","NotebookDirectory","NotebookDynamicExpression","NotebookEvaluate","NotebookE\
ventActions","NotebookFileName","NotebookFind","NotebookGet","NotebookImport","NotebookInformation","NotebookInterfaceObject","NotebookLocate","NotebookObject","NotebookOpen","NotebookPath","NotebookPrint","NotebookPut","NotebookRead","Notebooks","NotebookSave","NotebookSelection","NotebooksMenu","NotebookTemplate","NotebookWrite","NotElement","NotEqualTilde","NotExists","NotGreater","NotGreaterEqual","NotGreaterFullEqual","NotGreaterGreater","NotGreaterLess","NotGreaterSlantEqual","NotGreaterTi\
lde","Nothing","NotHumpDownHump","NotHumpEqual","NotificationFunction","NotLeftTriangle","NotLeftTriangleBar","NotLeftTriangleEqual","NotLess","NotLessEqual","NotLessFullEqual","NotLessGreater","NotLessLess","NotLessSlantEqual","NotLessTilde","NotNestedGreaterGreater","NotNestedLessLess","NotPrecedes","NotPrecedesEqual","NotPrecedesSlantEqual","NotPrecedesTilde","NotReverseElement","NotRightTriangle","NotRightTriangleBar","NotRightTriangleEqual","NotSquareSubset","NotSquareSubsetEqual","NotSquar\
eSuperset","NotSquareSupersetEqual","NotSubset","NotSubsetEqual","NotSucceeds","NotSucceedsEqual","NotSucceedsSlantEqual","NotSucceedsTilde","NotSuperset","NotSupersetEqual","NotTilde","NotTildeEqual","NotTildeFullEqual","NotTildeTilde","NotVerticalBar","Now","NoWhitespace","NProbability","NProduct","NProductFactors","NRoots","NSolve","NSolveValues","NSum","NSumTerms","NuclearExplosionData","NuclearReactorData","Null","NullRecords","NullSpace","NullWords","Number","NumberCompose","NumberDecompos\
e","NumberDigit","NumberExpand","NumberFieldClassNumber","NumberFieldDiscriminant","NumberFieldFundamentalUnits","NumberFieldIntegralBasis","NumberFieldNormRepresentatives","NumberFieldRegulator","NumberFieldRootsOfUnity","NumberFieldSignature","NumberForm","NumberFormat","NumberLinePlot","NumberMarks","NumberMultiplier","NumberPadding","NumberPoint","NumberQ","NumberSeparator","NumberSigns","NumberString","Numerator","NumeratorDenominator","NumericalOrder","NumericalSort","NumericArray","Numeri\
cArrayQ","NumericArrayType","NumericFunction","NumericQ","NuttallWindow","NValues","NyquistGridLines","NyquistPlot","O","ObjectExistsQ","ObservabilityGramian","ObservabilityMatrix","ObservableDecomposition","ObservableModelQ","OceanData","Octahedron","OddQ","Off","Offset","OLEData","On","ONanGroupON","Once","OneIdentity","Opacity","OpacityFunction","OpacityFunctionScaling","Open","OpenAppend","Opener","OpenerBox","OpenerBoxOptions","OpenerView","OpenFunctionInspectorPacket","Opening","OpenRead",
"OpenSpecialOptions","OpenTemporary","OpenWrite","Operate","OperatingSystem","OperatorApplied","OptimumFlowData","Optional","OptionalElement","OptionInspectorSettings","OptionQ","Options","OptionsPacket","OptionsPattern","OptionValue","OptionValueBox","OptionValueBoxOptions","Or","Orange","Order","OrderDistribution","OrderedQ","Ordering","OrderingBy","OrderingLayer","Orderless","OrderlessPatternSequence","OrdinalScale","OrnsteinUhlenbeckProcess","Orthogonalize","OrthogonalMatrixQ","Out","Outer",
"OuterPolygon","OuterPolyhedron","OutputAutoOverwrite","OutputControllabilityMatrix","OutputControllableModelQ","OutputForm","OutputFormData","OutputGrouping","OutputMathEditExpression","OutputNamePacket","OutputPorts","OutputResponse","OutputSizeLimit","OutputStream","Over","OverBar","OverDot","Overflow","OverHat","Overlaps","Overlay","OverlayBox","OverlayBoxOptions","OverlayVideo","Overscript","OverscriptBox","OverscriptBoxOptions","OverTilde","OverVector","OverwriteTarget","OwenT","OwnValues",
"Package","PackingMethod","PackPaclet","PacletDataRebuild","PacletDirectoryAdd","PacletDirectoryLoad","PacletDirectoryRemove","PacletDirectoryUnload","PacletDisable","PacletEnable","PacletFind","PacletFindRemote","PacletInformation","PacletInstall","PacletInstallSubmit","PacletNewerQ","PacletObject","PacletObjectQ","PacletSite","PacletSiteObject","PacletSiteRegister","PacletSites","PacletSiteUnregister","PacletSiteUpdate","PacletSymbol","PacletUninstall","PacletUpdate","PaddedForm","Padding","Pa\
ddingLayer","PaddingSize","PadeApproximant","PadLeft","PadRight","PageBreakAbove","PageBreakBelow","PageBreakWithin","PageFooterLines","PageFooters","PageHeaderLines","PageHeaders","PageHeight","PageRankCentrality","PageTheme","PageWidth","Pagination","PairCorrelationG","PairedBarChart","PairedHistogram","PairedSmoothHistogram","PairedTTest","PairedZTest","PaletteNotebook","PalettePath","PalettesMenuSettings","PalindromeQ","Pane","PaneBox","PaneBoxOptions","Panel","PanelBox","PanelBoxOptions","P\
aneled","PaneSelector","PaneSelectorBox","PaneSelectorBoxOptions","PaperWidth","ParabolicCylinderD","ParagraphIndent","ParagraphSpacing","ParallelArray","ParallelAxisPlot","ParallelCombine","ParallelDo","Parallelepiped","ParallelEvaluate","Parallelization","Parallelize","ParallelKernels","ParallelMap","ParallelNeeds","Parallelogram","ParallelProduct","ParallelSubmit","ParallelSum","ParallelTable","ParallelTry","Parameter","ParameterEstimator","ParameterMixtureDistribution","ParameterVariables","\
ParametricConvexOptimization","ParametricFunction","ParametricNDSolve","ParametricNDSolveValue","ParametricPlot","ParametricPlot3D","ParametricRampLayer","ParametricRegion","ParentBox","ParentCell","ParentConnect","ParentDirectory","ParentEdgeLabel","ParentEdgeLabelFunction","ParentEdgeLabelStyle","ParentEdgeShapeFunction","ParentEdgeStyle","ParentEdgeStyleFunction","ParentForm","Parenthesize","ParentList","ParentNotebook","ParetoDistribution","ParetoPickandsDistribution","ParkData","Part","Part\
Behavior","PartialCorrelationFunction","PartialD","ParticleAcceleratorData","ParticleData","Partition","PartitionGranularity","PartitionsP","PartitionsQ","PartLayer","PartOfSpeech","PartProtection","ParzenWindow","PascalDistribution","PassEventsDown","PassEventsUp","Paste","PasteAutoQuoteCharacters","PasteBoxFormInlineCells","PasteButton","Path","PathGraph","PathGraphQ","Pattern","PatternFilling","PatternReaction","PatternSequence","PatternTest","PauliMatrix","PaulWavelet","Pause","PausedTime","\
PDF","PeakDetect","PeanoCurve","PearsonChiSquareTest","PearsonCorrelationTest","PearsonDistribution","PenttinenPointProcess","PercentForm","PerfectNumber","PerfectNumberQ","PerformanceGoal","Perimeter","PeriodicBoundaryCondition","PeriodicInterpolation","Periodogram","PeriodogramArray","Permanent","Permissions","PermissionsGroup","PermissionsGroupMemberQ","PermissionsGroups","PermissionsKey","PermissionsKeys","PermutationCycles","PermutationCyclesQ","PermutationGroup","PermutationLength","Permut\
ationList","PermutationListQ","PermutationMatrix","PermutationMax","PermutationMin","PermutationOrder","PermutationPower","PermutationProduct","PermutationReplace","Permutations","PermutationSupport","Permute","PeronaMalikFilter","Perpendicular","PerpendicularBisector","PersistenceLocation","PersistenceTime","PersistentObject","PersistentObjects","PersistentSymbol","PersistentValue","PersonData","PERTDistribution","PetersenGraph","PhaseMargins","PhaseRange","PhongShading","PhysicalSystemData","P\
i","Pick","PickedElements","PickMode","PIDData","PIDDerivativeFilter","PIDFeedforward","PIDTune","Piecewise","PiecewiseExpand","PieChart","PieChart3D","PillaiTrace","PillaiTraceTest","PingTime","Pink","PitchRecognize","Pivoting","PixelConstrained","PixelValue","PixelValuePositions","Placed","Placeholder","PlaceholderLayer","PlaceholderReplace","Plain","PlanarAngle","PlanarFaceList","PlanarGraph","PlanarGraphQ","PlanckRadiationLaw","PlaneCurveData","PlanetaryMoonData","PlanetData","PlantData","Pl\
ay","PlaybackSettings","PlayRange","Plot","Plot3D","Plot3Matrix","PlotDivision","PlotJoined","PlotLabel","PlotLabels","PlotLayout","PlotLegends","PlotMarkers","PlotPoints","PlotRange","PlotRangeClipping","PlotRangeClipPlanesStyle","PlotRangePadding","PlotRegion","PlotStyle","PlotTheme","Pluralize","Plus","PlusMinus","Pochhammer","PodStates","PodWidth","Point","Point3DBox","Point3DBoxOptions","PointBox","PointBoxOptions","PointCountDistribution","PointDensity","PointDensityFunction","PointFigureC\
hart","PointLegend","PointLight","PointProcessEstimator","PointProcessFitTest","PointProcessParameterAssumptions","PointProcessParameterQ","PointSize","PointStatisticFunction","PointValuePlot","PoissonConsulDistribution","PoissonDistribution","PoissonPDEComponent","PoissonPointProcess","PoissonProcess","PoissonWindow","PolarAxes","PolarAxesOrigin","PolarGridLines","PolarPlot","PolarTicks","PoleZeroMarkers","PolyaAeppliDistribution","PolyGamma","Polygon","Polygon3DBox","Polygon3DBoxOptions","Poly\
gonalNumber","PolygonAngle","PolygonBox","PolygonBoxOptions","PolygonCoordinates","PolygonDecomposition","PolygonHoleScale","PolygonIntersections","PolygonScale","Polyhedron","PolyhedronAngle","PolyhedronBox","PolyhedronBoxOptions","PolyhedronCoordinates","PolyhedronData","PolyhedronDecomposition","PolyhedronGenus","PolyLog","PolynomialExpressionQ","PolynomialExtendedGCD","PolynomialForm","PolynomialGCD","PolynomialLCM","PolynomialMod","PolynomialQ","PolynomialQuotient","PolynomialQuotientRemain\
der","PolynomialReduce","PolynomialRemainder","Polynomials","PolynomialSumOfSquaresList","PoolingLayer","PopupMenu","PopupMenuBox","PopupMenuBoxOptions","PopupView","PopupWindow","Position","PositionIndex","PositionLargest","PositionSmallest","Positive","PositiveDefiniteMatrixQ","PositiveIntegers","PositivelyOrientedPoints","PositiveRationals","PositiveReals","PositiveSemidefiniteMatrixQ","PossibleZeroQ","Postfix","PostScript","Power","PowerDistribution","PowerExpand","PowerMod","PowerModList","\
PowerRange","PowerSpectralDensity","PowersRepresentations","PowerSymmetricPolynomial","Precedence","PrecedenceForm","Precedes","PrecedesEqual","PrecedesSlantEqual","PrecedesTilde","Precision","PrecisionGoal","PreDecrement","Predict","PredictionRoot","PredictorFunction","PredictorInformation","PredictorMeasurements","PredictorMeasurementsObject","PreemptProtect","PreferencesPath","PreferencesSettings","Prefix","PreIncrement","Prepend","PrependLayer","PrependTo","PreprocessingRules","PreserveColor",
"PreserveImageOptions","Previous","PreviousCell","PreviousDate","PriceGraphDistribution","PrimaryPlaceholder","Prime","PrimeNu","PrimeOmega","PrimePi","PrimePowerQ","PrimeQ","Primes","PrimeZetaP","PrimitivePolynomialQ","PrimitiveRoot","PrimitiveRootList","PrincipalComponents","PrincipalValue","Print","PrintableASCIIQ","PrintAction","PrintForm","PrintingCopies","PrintingOptions","PrintingPageRange","PrintingStartingPageNumber","PrintingStyleEnvironment","Printout3D","Printout3DPreviewer","PrintPr\
ecision","PrintTemporary","Prism","PrismBox","PrismBoxOptions","PrivateCellOptions","PrivateEvaluationOptions","PrivateFontOptions","PrivateFrontEndOptions","PrivateKey","PrivateNotebookOptions","PrivatePaths","Probability","ProbabilityDistribution","ProbabilityPlot","ProbabilityPr","ProbabilityScalePlot","ProbitModelFit","ProcessConnection","ProcessDirectory","ProcessEnvironment","Processes","ProcessEstimator","ProcessInformation","ProcessObject","ProcessParameterAssumptions","ProcessParameterQ",
"ProcessStateDomain","ProcessStatus","ProcessTimeDomain","Product","ProductDistribution","ProductLog","ProgressIndicator","ProgressIndicatorBox","ProgressIndicatorBoxOptions","ProgressReporting","Projection","Prolog","PromptForm","ProofObject","PropagateAborts","Properties","Property","PropertyList","PropertyValue","Proportion","Proportional","Protect","Protected","ProteinData","Pruning","PseudoInverse","PsychrometricPropertyData","PublicKey","PublisherID","PulsarData","PunctuationCharacter","Pu\
rple","Put","PutAppend","Pyramid","PyramidBox","PyramidBoxOptions","QBinomial","QFactorial","QGamma","QHypergeometricPFQ","QnDispersion","QPochhammer","QPolyGamma","QRDecomposition","QuadraticIrrationalQ","QuadraticOptimization","Quantile","QuantilePlot","Quantity","QuantityArray","QuantityDistribution","QuantityForm","QuantityMagnitude","QuantityQ","QuantityUnit","QuantityVariable","QuantityVariableCanonicalUnit","QuantityVariableDimensions","QuantityVariableIdentifier","QuantityVariablePhysica\
lQuantity","Quartics","QuartileDeviation","Quartiles","QuartileSkewness","Query","QuestionGenerator","QuestionInterface","QuestionObject","QuestionSelector","QueueingNetworkProcess","QueueingProcess","QueueProperties","Quiet","QuietEcho","Quit","Quotient","QuotientRemainder","RadialAxisPlot","RadialGradientFilling","RadialGradientImage","RadialityCentrality","RadicalBox","RadicalBoxOptions","RadioButton","RadioButtonBar","RadioButtonBox","RadioButtonBoxOptions","Radon","RadonTransform","Ramanuja\
nTau","RamanujanTauL","RamanujanTauTheta","RamanujanTauZ","Ramp","Random","RandomArrayLayer","RandomChoice","RandomColor","RandomComplex","RandomDate","RandomEntity","RandomFunction","RandomGeneratorState","RandomGeoPosition","RandomGraph","RandomImage","RandomInstance","RandomInteger","RandomPermutation","RandomPoint","RandomPointConfiguration","RandomPolygon","RandomPolyhedron","RandomPrime","RandomReal","RandomSample","RandomSeed","RandomSeeding","RandomTime","RandomTree","RandomVariate","Ran\
domWalkProcess","RandomWord","Range","RangeFilter","RangeSpecification","RankedMax","RankedMin","RarerProbability","Raster","Raster3D","Raster3DBox","Raster3DBoxOptions","RasterArray","RasterBox","RasterBoxOptions","Rasterize","RasterSize","Rational","RationalExpressionQ","RationalFunctions","Rationalize","Rationals","Ratios","RawArray","RawBoxes","RawData","RawMedium","RayleighDistribution","Re","ReactionBalance","ReactionBalancedQ","ReactionPDETerm","Read","ReadByteArray","ReadLine","ReadList",
"ReadProtected","ReadString","Real","RealAbs","RealBlockDiagonalForm","RealDigits","RealExponent","Reals","RealSign","Reap","RebuildPacletData","RecalibrationFunction","RecognitionPrior","RecognitionThreshold","ReconstructionMesh","Record","RecordLists","RecordSeparators","Rectangle","RectangleBox","RectangleBoxOptions","RectangleChart","RectangleChart3D","RectangularRepeatingElement","RecurrenceFilter","RecurrenceTable","RecurringDigitsForm","Red","Reduce","RefBox","ReferenceLineStyle","Referen\
ceMarkers","ReferenceMarkerStyle","Refine","ReflectionMatrix","ReflectionTransform","Refresh","RefreshRate","Region","RegionBinarize","RegionBoundary","RegionBoundaryStyle","RegionBounds","RegionCentroid","RegionCongruent","RegionConvert","RegionDifference","RegionDilation","RegionDimension","RegionDisjoint","RegionDistance","RegionDistanceFunction","RegionEmbeddingDimension","RegionEqual","RegionErosion","RegionFillingStyle","RegionFit","RegionFunction","RegionImage","RegionIntersection","Regio\
nMeasure","RegionMember","RegionMemberFunction","RegionMoment","RegionNearest","RegionNearestFunction","RegionPlot","RegionPlot3D","RegionProduct","RegionQ","RegionResize","RegionSimilar","RegionSize","RegionSymmetricDifference","RegionUnion","RegionWithin","RegisterExternalEvaluator","RegularExpression","Regularization","RegularlySampledQ","RegularPolygon","ReIm","ReImLabels","ReImPlot","ReImStyle","Reinstall","RelationalDatabase","RelationGraph","Release","ReleaseHold","ReliabilityDistribution",
"ReliefImage","ReliefPlot","RemoteAuthorizationCaching","RemoteBatchJobAbort","RemoteBatchJobObject","RemoteBatchJobs","RemoteBatchMapSubmit","RemoteBatchSubmissionEnvironment","RemoteBatchSubmit","RemoteConnect","RemoteConnectionObject","RemoteEvaluate","RemoteFile","RemoteInputFiles","RemoteKernelObject","RemoteProviderSettings","RemoteRun","RemoteRunProcess","RemovalConditions","Remove","RemoveAlphaChannel","RemoveAsynchronousTask","RemoveAudioStream","RemoveBackground","RemoveChannelListener",
"RemoveChannelSubscribers","Removed","RemoveDiacritics","RemoveInputStreamMethod","RemoveOutputStreamMethod","RemoveProperty","RemoveScheduledTask","RemoveUsers","RemoveVideoStream","RenameDirectory","RenameFile","RenderAll","RenderingOptions","RenewalProcess","RenkoChart","RepairMesh","Repeated","RepeatedNull","RepeatedString","RepeatedTiming","RepeatingElement","Replace","ReplaceAll","ReplaceAt","ReplaceHeldPart","ReplaceImageValue","ReplaceList","ReplacePart","ReplacePixelValue","ReplaceRepea\
ted","ReplicateLayer","RequiredPhysicalQuantities","Resampling","ResamplingAlgorithmData","ResamplingMethod","Rescale","RescalingTransform","ResetDirectory","ResetScheduledTask","ReshapeLayer","Residue","ResidueSum","ResizeLayer","Resolve","ResolveContextAliases","ResourceAcquire","ResourceData","ResourceFunction","ResourceObject","ResourceRegister","ResourceRemove","ResourceSearch","ResourceSubmissionObject","ResourceSubmit","ResourceSystemBase","ResourceSystemPath","ResourceUpdate","ResourceVe\
rsion","ResponseForm","Rest","RestartInterval","Restricted","Resultant","ResumePacket","Return","ReturnCreatesNewCell","ReturnEntersInput","ReturnExpressionPacket","ReturnInputFormPacket","ReturnPacket","ReturnReceiptFunction","ReturnTextPacket","Reverse","ReverseApplied","ReverseBiorthogonalSplineWavelet","ReverseElement","ReverseEquilibrium","ReverseGraph","ReverseSort","ReverseSortBy","ReverseUpEquilibrium","RevolutionAxis","RevolutionPlot3D","RGBColor","RiccatiSolve","RiceDistribution","Ridg\
eFilter","RiemannR","RiemannSiegelTheta","RiemannSiegelZ","RiemannXi","Riffle","Right","RightArrow","RightArrowBar","RightArrowLeftArrow","RightComposition","RightCosetRepresentative","RightDownTeeVector","RightDownVector","RightDownVectorBar","RightTee","RightTeeArrow","RightTeeVector","RightTriangle","RightTriangleBar","RightTriangleEqual","RightUpDownVector","RightUpTeeVector","RightUpVector","RightUpVectorBar","RightVector","RightVectorBar","RipleyK","RipleyRassonRegion","RiskAchievementImpo\
rtance","RiskReductionImportance","RobustConvexOptimization","RogersTanimotoDissimilarity","RollPitchYawAngles","RollPitchYawMatrix","RomanNumeral","Root","RootApproximant","RootIntervals","RootLocusPlot","RootMeanSquare","RootOfUnityQ","RootReduce","Roots","RootSum","RootTree","Rotate","RotateLabel","RotateLeft","RotateRight","RotationAction","RotationBox","RotationBoxOptions","RotationMatrix","RotationTransform","Round","RoundImplies","RoundingRadius","Row","RowAlignments","RowBackgrounds","Ro\
wBox","RowHeights","RowLines","RowMinHeight","RowReduce","RowsEqual","RowSpacings","RSolve","RSolveValue","RudinShapiro","RudvalisGroupRu","Rule","RuleCondition","RuleDelayed","RuleForm","RulePlot","RulerUnits","RulesTree","Run","RunProcess","RunScheduledTask","RunThrough","RuntimeAttributes","RuntimeOptions","RussellRaoDissimilarity","SameAs","SameQ","SameTest","SameTestProperties","SampledEntityClass","SampleDepth","SampledSoundFunction","SampledSoundList","SampleRate","SamplingPeriod","SARIMA\
Process","SARMAProcess","SASTriangle","SatelliteData","SatisfiabilityCount","SatisfiabilityInstances","SatisfiableQ","Saturday","Save","Saveable","SaveAutoDelete","SaveConnection","SaveDefinitions","SavitzkyGolayMatrix","SawtoothWave","Scale","Scaled","ScaleDivisions","ScaledMousePosition","ScaleOrigin","ScalePadding","ScaleRanges","ScaleRangeStyle","ScalingFunctions","ScalingMatrix","ScalingTransform","Scan","ScheduledTask","ScheduledTaskActiveQ","ScheduledTaskInformation","ScheduledTaskInforma\
tionData","ScheduledTaskObject","ScheduledTasks","SchurDecomposition","ScientificForm","ScientificNotationThreshold","ScorerGi","ScorerGiPrime","ScorerHi","ScorerHiPrime","ScreenRectangle","ScreenStyleEnvironment","ScriptBaselineShifts","ScriptForm","ScriptLevel","ScriptMinSize","ScriptRules","ScriptSizeMultipliers","Scrollbars","ScrollingOptions","ScrollPosition","SearchAdjustment","SearchIndexObject","SearchIndices","SearchQueryString","SearchResultObject","Sec","Sech","SechDistribution","Seco\
ndOrderConeOptimization","SectionGrouping","SectorChart","SectorChart3D","SectorOrigin","SectorSpacing","SecuredAuthenticationKey","SecuredAuthenticationKeys","SecurityCertificate","SeedRandom","Select","Selectable","SelectComponents","SelectedCells","SelectedNotebook","SelectFirst","Selection","SelectionAnimate","SelectionCell","SelectionCellCreateCell","SelectionCellDefaultStyle","SelectionCellParentStyle","SelectionCreateCell","SelectionDebuggerTag","SelectionEvaluate","SelectionEvaluateCreat\
eCell","SelectionMove","SelectionPlaceholder","SelectWithContents","SelfLoops","SelfLoopStyle","SemanticImport","SemanticImportString","SemanticInterpretation","SemialgebraicComponentInstances","SemidefiniteOptimization","SendMail","SendMessage","Sequence","SequenceAlignment","SequenceAttentionLayer","SequenceCases","SequenceCount","SequenceFold","SequenceFoldList","SequenceForm","SequenceHold","SequenceIndicesLayer","SequenceLastLayer","SequenceMostLayer","SequencePosition","SequencePredict","S\
equencePredictorFunction","SequenceReplace","SequenceRestLayer","SequenceReverseLayer","SequenceSplit","Series","SeriesCoefficient","SeriesData","SeriesTermGoal","ServiceConnect","ServiceDisconnect","ServiceExecute","ServiceObject","ServiceRequest","ServiceResponse","ServiceSubmit","SessionSubmit","SessionTime","Set","SetAccuracy","SetAlphaChannel","SetAttributes","Setbacks","SetCloudDirectory","SetCookies","SetDelayed","SetDirectory","SetEnvironment","SetFileDate","SetFileFormatProperties","Set\
Options","SetOptionsPacket","SetPermissions","SetPrecision","SetProperty","SetSecuredAuthenticationKey","SetSelectedNotebook","SetSharedFunction","SetSharedVariable","SetStreamPosition","SetSystemModel","SetSystemOptions","Setter","SetterBar","SetterBox","SetterBoxOptions","Setting","SetUsers","Shading","Shallow","ShannonWavelet","ShapiroWilkTest","Share","SharingList","Sharpen","ShearingMatrix","ShearingTransform","ShellRegion","ShenCastanMatrix","ShiftedGompertzDistribution","ShiftRegisterSequ\
ence","Short","ShortDownArrow","Shortest","ShortestMatch","ShortestPathFunction","ShortLeftArrow","ShortRightArrow","ShortTimeFourier","ShortTimeFourierData","ShortUpArrow","Show","ShowAutoConvert","ShowAutoSpellCheck","ShowAutoStyles","ShowCellBracket","ShowCellLabel","ShowCellTags","ShowClosedCellArea","ShowCodeAssist","ShowContents","ShowControls","ShowCursorTracker","ShowGroupOpenCloseIcon","ShowGroupOpener","ShowInvisibleCharacters","ShowPageBreaks","ShowPredictiveInterface","ShowSelection",
"ShowShortBoxForm","ShowSpecialCharacters","ShowStringCharacters","ShowSyntaxStyles","ShrinkingDelay","ShrinkWrapBoundingBox","SiderealTime","SiegelTheta","SiegelTukeyTest","SierpinskiCurve","SierpinskiMesh","Sign","Signature","SignedRankTest","SignedRegionDistance","SignificanceLevel","SignPadding","SignTest","SimilarityRules","SimpleGraph","SimpleGraphQ","SimplePolygonQ","SimplePolyhedronQ","Simplex","Simplify","Sin","Sinc","SinghMaddalaDistribution","SingleEvaluation","SingleLetterItalics","S\
ingleLetterStyle","SingularValueDecomposition","SingularValueList","SingularValuePlot","SingularValues","Sinh","SinhIntegral","SinIntegral","SixJSymbol","Skeleton","SkeletonTransform","SkellamDistribution","Skewness","SkewNormalDistribution","SkinStyle","Skip","SliceContourPlot3D","SliceDensityPlot3D","SliceDistribution","SliceVectorPlot3D","Slider","Slider2D","Slider2DBox","Slider2DBoxOptions","SliderBox","SliderBoxOptions","SlideShowVideo","SlideView","Slot","SlotSequence","Small","SmallCircle",
"Smaller","SmithDecomposition","SmithDelayCompensator","SmithWatermanSimilarity","SmoothDensityHistogram","SmoothHistogram","SmoothHistogram3D","SmoothKernelDistribution","SmoothPointDensity","SnDispersion","Snippet","SnippetsVideo","SnubPolyhedron","SocialMediaData","Socket","SocketConnect","SocketListen","SocketListener","SocketObject","SocketOpen","SocketReadMessage","SocketReadyQ","Sockets","SocketWaitAll","SocketWaitNext","SoftmaxLayer","SokalSneathDissimilarity","SolarEclipse","SolarSystem\
FeatureData","SolarTime","SolidAngle","SolidBoundaryLoadValue","SolidData","SolidDisplacementCondition","SolidFixedCondition","SolidMechanicsPDEComponent","SolidMechanicsStrain","SolidMechanicsStress","SolidRegionQ","Solve","SolveAlways","SolveDelayed","SolveValues","Sort","SortBy","SortedBy","SortedEntityClass","Sound","SoundAndGraphics","SoundNote","SoundVolume","SourceLink","SourcePDETerm","Sow","Space","SpaceCurveData","SpaceForm","Spacer","Spacings","Span","SpanAdjustments","SpanCharacterRo\
unding","SpanFromAbove","SpanFromBoth","SpanFromLeft","SpanLineThickness","SpanMaxSize","SpanMinSize","SpanningCharacters","SpanSymmetric","SparseArray","SparseArrayQ","SpatialBinnedPointData","SpatialBoundaryCorrection","SpatialEstimate","SpatialEstimatorFunction","SpatialGraphDistribution","SpatialJ","SpatialMedian","SpatialNoiseLevel","SpatialObservationRegionQ","SpatialPointData","SpatialPointSelect","SpatialRandomnessTest","SpatialTransformationLayer","SpatialTrendFunction","Speak","Speaker\
MatchQ","SpearmanRankTest","SpearmanRho","SpeciesData","SpecificityGoal","SpectralLineData","Spectrogram","SpectrogramArray","Specularity","SpeechCases","SpeechInterpreter","SpeechRecognize","SpeechSynthesize","SpellingCorrection","SpellingCorrectionList","SpellingDictionaries","SpellingDictionariesPath","SpellingOptions","Sphere","SphereBox","SphereBoxOptions","SpherePoints","SphericalBesselJ","SphericalBesselY","SphericalHankelH1","SphericalHankelH2","SphericalHarmonicY","SphericalPlot3D","Sph\
ericalRegion","SphericalShell","SpheroidalEigenvalue","SpheroidalJoiningFactor","SpheroidalPS","SpheroidalPSPrime","SpheroidalQS","SpheroidalQSPrime","SpheroidalRadialFactor","SpheroidalS1","SpheroidalS1Prime","SpheroidalS2","SpheroidalS2Prime","Splice","SplicedDistribution","SplineClosed","SplineDegree","SplineKnots","SplineWeights","Split","SplitBy","SpokenString","SpotLight","Sqrt","SqrtBox","SqrtBoxOptions","Square","SquaredEuclideanDistance","SquareFreeQ","SquareIntersection","SquareMatrixQ",
"SquareRepeatingElement","SquaresR","SquareSubset","SquareSubsetEqual","SquareSuperset","SquareSupersetEqual","SquareUnion","SquareWave","SSSTriangle","StabilityMargins","StabilityMarginsStyle","StableDistribution","Stack","StackBegin","StackComplete","StackedDateListPlot","StackedListPlot","StackInhibit","StadiumShape","StandardAtmosphereData","StandardDeviation","StandardDeviationFilter","StandardForm","Standardize","Standardized","StandardOceanData","StandbyDistribution","Star","StarClusterDa\
ta","StarData","StarGraph","StartAsynchronousTask","StartExternalSession","StartingStepSize","StartOfLine","StartOfString","StartProcess","StartScheduledTask","StartupSound","StartWebSession","StateDimensions","StateFeedbackGains","StateOutputEstimator","StateResponse","StateSpaceModel","StateSpaceRealization","StateSpaceTransform","StateTransformationLinearize","StationaryDistribution","StationaryWaveletPacketTransform","StationaryWaveletTransform","StatusArea","StatusCentrality","StepMonitor",
"StereochemistryElements","StieltjesGamma","StippleShading","StirlingS1","StirlingS2","StopAsynchronousTask","StoppingPowerData","StopScheduledTask","StrataVariables","StratonovichProcess","StraussHardcorePointProcess","StraussPointProcess","StreamColorFunction","StreamColorFunctionScaling","StreamDensityPlot","StreamMarkers","StreamPlot","StreamPlot3D","StreamPoints","StreamPosition","Streams","StreamScale","StreamStyle","StrictInequalities","String","StringBreak","StringByteCount","StringCases",
"StringContainsQ","StringCount","StringDelete","StringDrop","StringEndsQ","StringExpression","StringExtract","StringForm","StringFormat","StringFormatQ","StringFreeQ","StringInsert","StringJoin","StringLength","StringMatchQ","StringPadLeft","StringPadRight","StringPart","StringPartition","StringPosition","StringQ","StringRepeat","StringReplace","StringReplaceList","StringReplacePart","StringReverse","StringRiffle","StringRotateLeft","StringRotateRight","StringSkeleton","StringSplit","StringStart\
sQ","StringTake","StringTakeDrop","StringTemplate","StringToByteArray","StringToStream","StringTrim","StripBoxes","StripOnInput","StripStyleOnPaste","StripWrapperBoxes","StrokeForm","Struckthrough","StructuralImportance","StructuredArray","StructuredArrayHeadQ","StructuredSelection","StruveH","StruveL","Stub","StudentTDistribution","Style","StyleBox","StyleBoxAutoDelete","StyleData","StyleDefinitions","StyleForm","StyleHints","StyleKeyMapping","StyleMenuListing","StyleNameDialogSettings","StyleN\
ames","StylePrint","StyleSheetPath","Subdivide","Subfactorial","Subgraph","SubMinus","SubPlus","SubresultantPolynomialRemainders","SubresultantPolynomials","Subresultants","Subscript","SubscriptBox","SubscriptBoxOptions","Subscripted","Subsequences","Subset","SubsetCases","SubsetCount","SubsetEqual","SubsetMap","SubsetPosition","SubsetQ","SubsetReplace","Subsets","SubStar","SubstitutionSystem","Subsuperscript","SubsuperscriptBox","SubsuperscriptBoxOptions","SubtitleEncoding","SubtitleTrackSelect\
ion","Subtract","SubtractFrom","SubtractSides","SubValues","Succeeds","SucceedsEqual","SucceedsSlantEqual","SucceedsTilde","Success","SuchThat","Sum","SumConvergence","SummationLayer","Sunday","SunPosition","Sunrise","Sunset","SuperDagger","SuperMinus","SupernovaData","SuperPlus","Superscript","SuperscriptBox","SuperscriptBoxOptions","Superset","SupersetEqual","SuperStar","Surd","SurdForm","SurfaceAppearance","SurfaceArea","SurfaceColor","SurfaceData","SurfaceGraphics","SurvivalDistribution","Su\
rvivalFunction","SurvivalModel","SurvivalModelFit","SuspendPacket","SuzukiDistribution","SuzukiGroupSuz","SwatchLegend","Switch","Symbol","SymbolName","SymletWavelet","Symmetric","SymmetricDifference","SymmetricGroup","SymmetricKey","SymmetricMatrixQ","SymmetricPolynomial","SymmetricReduction","Symmetrize","SymmetrizedArray","SymmetrizedArrayRules","SymmetrizedDependentComponents","SymmetrizedIndependentComponents","SymmetrizedReplacePart","SynchronousInitialization","SynchronousUpdating","Synon\
yms","Syntax","SyntaxForm","SyntaxInformation","SyntaxLength","SyntaxPacket","SyntaxQ","SynthesizeMissingValues","SystemCredential","SystemCredentialData","SystemCredentialKey","SystemCredentialKeys","SystemCredentialStoreObject","SystemDialogInput","SystemException","SystemGet","SystemHelpPath","SystemInformation","SystemInformationData","SystemInstall","SystemModel","SystemModeler","SystemModelExamples","SystemModelLinearize","SystemModelMeasurements","SystemModelParametricSimulate","SystemMod\
elPlot","SystemModelProgressReporting","SystemModelReliability","SystemModels","SystemModelSimulate","SystemModelSimulateSensitivity","SystemModelSimulationData","SystemOpen","SystemOptions","SystemProcessData","SystemProcesses","SystemsConnectionsModel","SystemsModelControllerData","SystemsModelDelay","SystemsModelDelayApproximate","SystemsModelDelete","SystemsModelDimensions","SystemsModelExtract","SystemsModelFeedbackConnect","SystemsModelLabels","SystemsModelLinearity","SystemsModelMerge","S\
ystemsModelOrder","SystemsModelParallelConnect","SystemsModelSeriesConnect","SystemsModelStateFeedbackConnect","SystemsModelVectorRelativeOrders","SystemStub","SystemTest","Tab","TabFilling","Table","TableAlignments","TableDepth","TableDirections","TableForm","TableHeadings","TableSpacing","TableView","TableViewBox","TableViewBoxAlignment","TableViewBoxBackground","TableViewBoxHeaders","TableViewBoxItemSize","TableViewBoxItemStyle","TableViewBoxOptions","TabSpacings","TabView","TabViewBox","TabV\
iewBoxOptions","TagBox","TagBoxNote","TagBoxOptions","TaggingRules","TagSet","TagSetDelayed","TagStyle","TagUnset","Take","TakeDrop","TakeLargest","TakeLargestBy","TakeList","TakeSmallest","TakeSmallestBy","TakeWhile","Tally","Tan","Tanh","TargetDevice","TargetFunctions","TargetSystem","TargetUnits","TaskAbort","TaskExecute","TaskObject","TaskRemove","TaskResume","Tasks","TaskSuspend","TaskWait","TautologyQ","TelegraphProcess","TemplateApply","TemplateArgBox","TemplateBox","TemplateBoxOptions","\
TemplateEvaluate","TemplateExpression","TemplateIf","TemplateObject","TemplateSequence","TemplateSlot","TemplateSlotSequence","TemplateUnevaluated","TemplateVerbatim","TemplateWith","TemporalData","TemporalRegularity","Temporary","TemporaryVariable","TensorContract","TensorDimensions","TensorExpand","TensorProduct","TensorQ","TensorRank","TensorReduce","TensorSymmetry","TensorTranspose","TensorWedge","TerminatedEvaluation","TernaryListPlot","TernaryPlotCorners","TestID","TestReport","TestReportO\
bject","TestResultObject","Tetrahedron","TetrahedronBox","TetrahedronBoxOptions","TeXForm","TeXSave","Text","Text3DBox","Text3DBoxOptions","TextAlignment","TextBand","TextBoundingBox","TextBox","TextCases","TextCell","TextClipboardType","TextContents","TextData","TextElement","TextForm","TextGrid","TextJustification","TextLine","TextPacket","TextParagraph","TextPosition","TextRecognize","TextSearch","TextSearchReport","TextSentences","TextString","TextStructure","TextStyle","TextTranslation","Te\
xture","TextureCoordinateFunction","TextureCoordinateScaling","TextWords","Therefore","ThermodynamicData","ThermometerGauge","Thick","Thickness","Thin","Thinning","ThisLink","ThomasPointProcess","ThompsonGroupTh","Thread","Threaded","ThreadingLayer","ThreeJSymbol","Threshold","Through","Throw","ThueMorse","Thumbnail","Thursday","TickDirection","TickLabelOrientation","TickLabelPositioning","TickLabels","TickLengths","TickPositions","Ticks","TicksStyle","TideData","Tilde","TildeEqual","TildeFullEq\
ual","TildeTilde","TimeConstrained","TimeConstraint","TimeDirection","TimeFormat","TimeGoal","TimelinePlot","TimeObject","TimeObjectQ","TimeRemaining","Times","TimesBy","TimeSeries","TimeSeriesAggregate","TimeSeriesForecast","TimeSeriesInsert","TimeSeriesInvertibility","TimeSeriesMap","TimeSeriesMapThread","TimeSeriesModel","TimeSeriesModelFit","TimeSeriesResample","TimeSeriesRescale","TimeSeriesShift","TimeSeriesThread","TimeSeriesWindow","TimeSystem","TimeSystemConvert","TimeUsed","TimeValue",
"TimeWarpingCorrespondence","TimeWarpingDistance","TimeZone","TimeZoneConvert","TimeZoneOffset","Timing","Tiny","TitleGrouping","TitsGroupT","ToBoxes","ToCharacterCode","ToColor","ToContinuousTimeModel","ToDate","Today","ToDiscreteTimeModel","ToEntity","ToeplitzMatrix","ToExpression","ToFileName","Together","Toggle","ToggleFalse","Toggler","TogglerBar","TogglerBox","TogglerBoxOptions","ToHeldExpression","ToInvertibleTimeSeries","TokenWords","Tolerance","ToLowerCase","Tomorrow","ToNumberField","T\
ooBig","Tooltip","TooltipBox","TooltipBoxOptions","TooltipDelay","TooltipStyle","ToonShading","Top","TopHatTransform","ToPolarCoordinates","TopologicalSort","ToRadicals","ToRawPointer","ToRules","Torus","TorusGraph","ToSphericalCoordinates","ToString","Total","TotalHeight","TotalLayer","TotalVariationFilter","TotalWidth","TouchPosition","TouchscreenAutoZoom","TouchscreenControlPlacement","ToUpperCase","TourVideo","Tr","Trace","TraceAbove","TraceAction","TraceBackward","TraceDepth","TraceDialog",
"TraceForward","TraceInternal","TraceLevel","TraceOff","TraceOn","TraceOriginal","TracePrint","TraceScan","TrackCellChangeTimes","TrackedSymbols","TrackingFunction","TracyWidomDistribution","TradingChart","TraditionalForm","TraditionalFunctionNotation","TraditionalNotation","TraditionalOrder","TrainImageContentDetector","TrainingProgressCheckpointing","TrainingProgressFunction","TrainingProgressMeasurements","TrainingProgressReporting","TrainingStoppingCriterion","TrainingUpdateSchedule","TrainT\
extContentDetector","TransferFunctionCancel","TransferFunctionExpand","TransferFunctionFactor","TransferFunctionModel","TransferFunctionPoles","TransferFunctionTransform","TransferFunctionZeros","TransformationClass","TransformationFunction","TransformationFunctions","TransformationMatrix","TransformedDistribution","TransformedField","TransformedProcess","TransformedRegion","TransitionDirection","TransitionDuration","TransitionEffect","TransitiveClosureGraph","TransitiveReductionGraph","Translat\
e","TranslationOptions","TranslationTransform","Transliterate","Transparent","TransparentColor","Transpose","TransposeLayer","TrapEnterKey","TrapSelection","TravelDirections","TravelDirectionsData","TravelDistance","TravelDistanceList","TravelMethod","TravelTime","Tree","TreeCases","TreeChildren","TreeCount","TreeData","TreeDelete","TreeDepth","TreeElementCoordinates","TreeElementLabel","TreeElementLabelFunction","TreeElementLabelStyle","TreeElementShape","TreeElementShapeFunction","TreeElementS\
ize","TreeElementSizeFunction","TreeElementStyle","TreeElementStyleFunction","TreeExpression","TreeExtract","TreeFold","TreeForm","TreeGraph","TreeGraphQ","TreeInsert","TreeLayout","TreeLeafCount","TreeLeafQ","TreeLeaves","TreeLevel","TreeMap","TreeMapAt","TreeOutline","TreePlot","TreePosition","TreeQ","TreeReplacePart","TreeRules","TreeScan","TreeSelect","TreeSize","TreeTraversalOrder","TrendStyle","Triangle","TriangleCenter","TriangleConstruct","TriangleMeasurement","TriangleWave","TriangularD\
istribution","TriangulateMesh","Trig","TrigExpand","TrigFactor","TrigFactorList","Trigger","TrigReduce","TrigToExp","TrimmedMean","TrimmedVariance","TropicalStormData","True","TrueQ","TruncatedDistribution","TruncatedPolyhedron","TsallisQExponentialDistribution","TsallisQGaussianDistribution","TTest","Tube","TubeBezierCurveBox","TubeBezierCurveBoxOptions","TubeBox","TubeBoxOptions","TubeBSplineCurveBox","TubeBSplineCurveBoxOptions","Tuesday","TukeyLambdaDistribution","TukeyWindow","TunnelData","\
Tuples","TuranGraph","TuringMachine","TuttePolynomial","TwoWayRule","Typed","TypeDeclaration","TypeEvaluate","TypeHint","TypeOf","TypeSpecifier","UnateQ","Uncompress","UnconstrainedParameters","Undefined","UnderBar","Underflow","Underlined","Underoverscript","UnderoverscriptBox","UnderoverscriptBoxOptions","Underscript","UnderscriptBox","UnderscriptBoxOptions","UnderseaFeatureData","UndirectedEdge","UndirectedGraph","UndirectedGraphQ","UndoOptions","UndoTrackedVariables","Unequal","UnequalTo","U\
nevaluated","UniformDistribution","UniformGraphDistribution","UniformPolyhedron","UniformSumDistribution","Uninstall","Union","UnionedEntityClass","UnionPlus","Unique","UniqueElements","UnitaryMatrixQ","UnitBox","UnitConvert","UnitDimensions","Unitize","UnitRootTest","UnitSimplify","UnitStep","UnitSystem","UnitTriangle","UnitVector","UnitVectorLayer","UnityDimensions","UniverseModelData","UniversityData","UnixTime","UnlabeledTree","UnmanageObject","Unprotect","UnregisterExternalEvaluator","Unsam\
eQ","UnsavedVariables","Unset","UnsetShared","Until","UntrackedVariables","Up","UpArrow","UpArrowBar","UpArrowDownArrow","Update","UpdateDynamicObjects","UpdateDynamicObjectsSynchronous","UpdateInterval","UpdatePacletSites","UpdateSearchIndex","UpDownArrow","UpEquilibrium","UpperCaseQ","UpperLeftArrow","UpperRightArrow","UpperTriangularize","UpperTriangularMatrix","UpperTriangularMatrixQ","Upsample","UpSet","UpSetDelayed","UpTee","UpTeeArrow","UpTo","UpValues","URL","URLBuild","URLDecode","URLDi\
spatcher","URLDownload","URLDownloadSubmit","URLEncode","URLExecute","URLExpand","URLFetch","URLFetchAsynchronous","URLParse","URLQueryDecode","URLQueryEncode","URLRead","URLResponseTime","URLSave","URLSaveAsynchronous","URLShorten","URLSubmit","UseEmbeddedLibrary","UseGraphicsRange","UserDefinedWavelet","Using","UsingFrontEnd","UtilityFunction","V2Get","ValenceErrorHandling","ValenceFilling","ValidationLength","ValidationSet","ValueBox","ValueBoxOptions","ValueDimensions","ValueForm","ValuePrep\
rocessingFunction","ValueQ","Values","ValuesData","VandermondeMatrix","Variables","Variance","VarianceEquivalenceTest","VarianceEstimatorFunction","VarianceGammaDistribution","VarianceGammaPointProcess","VarianceTest","VariogramFunction","VariogramModel","VectorAngle","VectorAround","VectorAspectRatio","VectorColorFunction","VectorColorFunctionScaling","VectorDensityPlot","VectorDisplacementPlot","VectorDisplacementPlot3D","VectorGlyphData","VectorGreater","VectorGreaterEqual","VectorLess","Vect\
orLessEqual","VectorMarkers","VectorPlot","VectorPlot3D","VectorPoints","VectorQ","VectorRange","Vectors","VectorScale","VectorScaling","VectorSizes","VectorStyle","Vee","Verbatim","Verbose","VerificationTest","VerifyConvergence","VerifyDerivedKey","VerifyDigitalSignature","VerifyFileSignature","VerifyInterpretation","VerifySecurityCertificates","VerifySolutions","VerifyTestAssumptions","VersionedPreferences","VertexAdd","VertexCapacity","VertexChromaticNumber","VertexColors","VertexComponent","\
VertexConnectivity","VertexContract","VertexCoordinateRules","VertexCoordinates","VertexCorrelationSimilarity","VertexCosineSimilarity","VertexCount","VertexCoverQ","VertexDataCoordinates","VertexDegree","VertexDelete","VertexDiceSimilarity","VertexEccentricity","VertexInComponent","VertexInComponentGraph","VertexInDegree","VertexIndex","VertexJaccardSimilarity","VertexLabeling","VertexLabels","VertexLabelStyle","VertexList","VertexNormals","VertexOutComponent","VertexOutComponentGraph","VertexO\
utDegree","VertexQ","VertexRenderingFunction","VertexReplace","VertexShape","VertexShapeFunction","VertexSize","VertexStyle","VertexTextureCoordinates","VertexTransitiveGraphQ","VertexWeight","VertexWeightedGraphQ","Vertical","VerticalBar","VerticalForm","VerticalGauge","VerticalSeparator","VerticalSlider","VerticalTilde","Video","VideoCapture","VideoCombine","VideoDelete","VideoEncoding","VideoExtractFrames","VideoFrameList","VideoFrameMap","VideoGenerator","VideoInsert","VideoIntervals","Video\
Join","VideoMap","VideoMapList","VideoMapTimeSeries","VideoPadding","VideoPause","VideoPlay","VideoQ","VideoRecord","VideoReplace","VideoScreenCapture","VideoSplit","VideoStop","VideoStream","VideoStreams","VideoTimeStretch","VideoTrackSelection","VideoTranscode","VideoTransparency","VideoTrim","ViewAngle","ViewCenter","ViewMatrix","ViewPoint","ViewPointSelectorSettings","ViewPort","ViewProjection","ViewRange","ViewVector","ViewVertical","VirtualGroupData","Visible","VisibleCell","VoiceStyleData",
"VoigtDistribution","VolcanoData","Volume","VonMisesDistribution","VoronoiMesh","WaitAll","WaitAsynchronousTask","WaitNext","WaitUntil","WakebyDistribution","WalleniusHypergeometricDistribution","WaringYuleDistribution","WarpingCorrespondence","WarpingDistance","WatershedComponents","WatsonUSquareTest","WattsStrogatzGraphDistribution","WaveletBestBasis","WaveletFilterCoefficients","WaveletImagePlot","WaveletListPlot","WaveletMapIndexed","WaveletMatrixPlot","WaveletPhi","WaveletPsi","WaveletScale",
"WaveletScalogram","WaveletThreshold","WavePDEComponent","WeaklyConnectedComponents","WeaklyConnectedGraphComponents","WeaklyConnectedGraphQ","WeakStationarity","WeatherData","WeatherForecastData","WebAudioSearch","WebColumn","WebElementObject","WeberE","WebExecute","WebImage","WebImageSearch","WebItem","WebPageMetaInformation","WebRow","WebSearch","WebSessionObject","WebSessions","WebWindowObject","Wedge","Wednesday","WeibullDistribution","WeierstrassE1","WeierstrassE2","WeierstrassE3","Weierst\
rassEta1","WeierstrassEta2","WeierstrassEta3","WeierstrassHalfPeriods","WeierstrassHalfPeriodW1","WeierstrassHalfPeriodW2","WeierstrassHalfPeriodW3","WeierstrassInvariantG2","WeierstrassInvariantG3","WeierstrassInvariants","WeierstrassP","WeierstrassPPrime","WeierstrassSigma","WeierstrassZeta","WeightedAdjacencyGraph","WeightedAdjacencyMatrix","WeightedData","WeightedGraphQ","Weights","WelchWindow","WheelGraph","WhenEvent","Which","While","White","WhiteNoiseProcess","WhitePoint","Whitespace","Wh\
itespaceCharacter","WhittakerM","WhittakerW","WholeCellGroupOpener","WienerFilter","WienerProcess","WignerD","WignerSemicircleDistribution","WikidataData","WikidataSearch","WikipediaData","WikipediaSearch","WilksW","WilksWTest","WindDirectionData","WindingCount","WindingPolygon","WindowClickSelect","WindowElements","WindowFloating","WindowFrame","WindowFrameElements","WindowMargins","WindowMovable","WindowOpacity","WindowPersistentStyles","WindowSelected","WindowSize","WindowStatusArea","WindowT\
itle","WindowToolbars","WindowWidth","WindSpeedData","WindVectorData","WinsorizedMean","WinsorizedVariance","WishartMatrixDistribution","With","WithCleanup","WithLock","WolframAlpha","WolframAlphaDate","WolframAlphaQuantity","WolframAlphaResult","WolframCloudSettings","WolframLanguageData","Word","WordBoundary","WordCharacter","WordCloud","WordCount","WordCounts","WordData","WordDefinition","WordFrequency","WordFrequencyData","WordList","WordOrientation","WordSearch","WordSelectionFunction","Wor\
dSeparators","WordSpacings","WordStem","WordTranslation","WorkingPrecision","WrapAround","Write","WriteLine","WriteString","Wronskian","XMLElement","XMLObject","XMLTemplate","Xnor","Xor","XYZColor","Yellow","Yesterday","YuleDissimilarity","ZernikeR","ZeroSymmetric","ZeroTest","ZeroWidthTimes","Zeta","ZetaZero","ZIPCodeData","ZipfDistribution","ZoomCenter","ZoomFactor","ZTest","ZTransform","$Aborted","$ActivationGroupID","$ActivationKey","$ActivationUserRegistered","$AddOnsDirectory","$AllowDataU\
pdates","$AllowExternalChannelFunctions","$AllowInternet","$AssertFunction","$Assumptions","$AsynchronousTask","$AudioDecoders","$AudioEncoders","$AudioInputDevices","$AudioOutputDevices","$BaseDirectory","$BasePacletsDirectory","$BatchInput","$BatchOutput","$BlockchainBase","$BoxForms","$ByteOrdering","$CacheBaseDirectory","$Canceled","$ChannelBase","$CharacterEncoding","$CharacterEncodings","$CloudAccountName","$CloudBase","$CloudConnected","$CloudConnection","$CloudCreditsAvailable","$CloudEv\
aluation","$CloudExpressionBase","$CloudObjectNameFormat","$CloudObjectURLType","$CloudRootDirectory","$CloudSymbolBase","$CloudUserID","$CloudUserUUID","$CloudVersion","$CloudVersionNumber","$CloudWolframEngineVersionNumber","$CommandLine","$CompilationTarget","$CompilerEnvironment","$ConditionHold","$ConfiguredKernels","$Context","$ContextAliases","$ContextPath","$ControlActiveSetting","$Cookies","$CookieStore","$CreationDate","$CryptographicEllipticCurveNames","$CurrentLink","$CurrentTask","$\
CurrentWebSession","$DataStructures","$DateStringFormat","$DefaultAudioInputDevice","$DefaultAudioOutputDevice","$DefaultFont","$DefaultFrontEnd","$DefaultImagingDevice","$DefaultKernels","$DefaultLocalBase","$DefaultLocalKernel","$DefaultMailbox","$DefaultNetworkInterface","$DefaultPath","$DefaultProxyRules","$DefaultRemoteBatchSubmissionEnvironment","$DefaultRemoteKernel","$DefaultSystemCredentialStore","$Display","$DisplayFunction","$DistributedContexts","$DynamicEvaluation","$Echo","$EmbedCo\
deEnvironments","$EmbeddableServices","$EntityStores","$Epilog","$EvaluationCloudBase","$EvaluationCloudObject","$EvaluationEnvironment","$ExportFormats","$ExternalIdentifierTypes","$ExternalStorageBase","$Failed","$FinancialDataSource","$FontFamilies","$FormatType","$FrontEnd","$FrontEndSession","$GeneratedAssetLocation","$GeoEntityTypes","$GeoLocation","$GeoLocationCity","$GeoLocationCountry","$GeoLocationPrecision","$GeoLocationSource","$HistoryLength","$HomeDirectory","$HTMLExportRules","$HT\
TPCookies","$HTTPRequest","$IgnoreEOF","$ImageFormattingWidth","$ImageResolution","$ImagingDevice","$ImagingDevices","$ImportFormats","$IncomingMailSettings","$InitialDirectory","$Initialization","$InitializationContexts","$Input","$InputFileName","$InputStreamMethods","$Inspector","$InstallationDate","$InstallationDirectory","$InterfaceEnvironment","$InterpreterTypes","$IterationLimit","$KernelCount","$KernelID","$Language","$LaunchDirectory","$LibraryPath","$LicenseExpirationDate","$LicenseID",
"$LicenseProcesses","$LicenseServer","$LicenseSubprocesses","$LicenseType","$Line","$Linked","$LinkSupported","$LoadedFiles","$LocalBase","$LocalSymbolBase","$MachineAddresses","$MachineDomain","$MachineDomains","$MachineEpsilon","$MachineID","$MachineName","$MachinePrecision","$MachineType","$MaxDisplayedChildren","$MaxExtraPrecision","$MaxLicenseProcesses","$MaxLicenseSubprocesses","$MaxMachineNumber","$MaxNumber","$MaxPiecewiseCases","$MaxPrecision","$MaxRootDegree","$MessageGroups","$Message\
List","$MessagePrePrint","$Messages","$MinMachineNumber","$MinNumber","$MinorReleaseNumber","$MinPrecision","$MobilePhone","$ModuleNumber","$NetworkConnected","$NetworkInterfaces","$NetworkLicense","$NewMessage","$NewSymbol","$NotebookInlineStorageLimit","$Notebooks","$NoValue","$NumberMarks","$Off","$OperatingSystem","$Output","$OutputForms","$OutputSizeLimit","$OutputStreamMethods","$Packages","$ParentLink","$ParentProcessID","$PasswordFile","$PatchLevelID","$Path","$PathnameSeparator","$Perfo\
rmanceGoal","$Permissions","$PermissionsGroupBase","$PersistenceBase","$PersistencePath","$PipeSupported","$PlotTheme","$Post","$Pre","$PreferencesDirectory","$PreInitialization","$PrePrint","$PreRead","$PrintForms","$PrintLiteral","$Printout3DPreviewer","$ProcessID","$ProcessorCount","$ProcessorType","$ProductInformation","$ProgramName","$ProgressReporting","$PublisherID","$RandomGeneratorState","$RandomState","$RecursionLimit","$RegisteredDeviceClasses","$RegisteredUserName","$ReleaseNumber","\
$RequesterAddress","$RequesterCloudUserID","$RequesterCloudUserUUID","$RequesterWolframID","$RequesterWolframUUID","$ResourceSystemBase","$ResourceSystemPath","$RootDirectory","$ScheduledTask","$ScriptCommandLine","$ScriptInputString","$SecuredAuthenticationKeyTokens","$ServiceCreditsAvailable","$Services","$SessionID","$SetParentLink","$SharedFunctions","$SharedVariables","$SoundDisplay","$SoundDisplayFunction","$SourceLink","$SSHAuthentication","$SubtitleDecoders","$SubtitleEncoders","$Summary\
BoxDataSizeLimit","$SuppressInputFormHeads","$SynchronousEvaluation","$SyntaxHandler","$System","$SystemCharacterEncoding","$SystemCredentialStore","$SystemID","$SystemMemory","$SystemShell","$SystemTimeZone","$SystemWordLength","$TargetSystems","$TemplatePath","$TemporaryDirectory","$TemporaryPrefix","$TestFileName","$TextStyle","$TimedOut","$TimeUnit","$TimeZone","$TimeZoneEntity","$TopDirectory","$TraceOff","$TraceOn","$TracePattern","$TracePostAction","$TracePreAction","$UnitSystem","$Urgent",
"$UserAddOnsDirectory","$UserAgentLanguages","$UserAgentMachine","$UserAgentName","$UserAgentOperatingSystem","$UserAgentString","$UserAgentVersion","$UserBaseDirectory","$UserBasePacletsDirectory","$UserDocumentsDirectory","$Username","$UserName","$UserURLBase","$Version","$VersionNumber","$VideoDecoders","$VideoEncoders","$VoiceStyles","$WolframDocumentsDirectory","$WolframID","$WolframUUID"];function mathematica2(hljs){const regex=hljs.regex,BASE_RE=/([2-9]|[1-2]\d|[3][0-5])\^\^/,BASE_DIGITS_RE=/(\w*\.\w+|\w+\.\w*|\w+)/,
NUMBER_RE=/(\d*\.\d+|\d+\.\d*|\d+)/,BASE_NUMBER_RE=regex.either(regex.concat(BASE_RE,BASE_DIGITS_RE),NUMBER_RE),ACCURACY_RE=/``[+-]?(\d*\.\d+|\d+\.\d*|\d+)/,PRECISION_RE=/`([+-]?(\d*\.\d+|\d+\.\d*|\d+))?/,APPROXIMATE_NUMBER_RE=regex.either(ACCURACY_RE,PRECISION_RE),SCIENTIFIC_NOTATION_RE=/\*\^[+-]?\d+/,NUMBERS={className:"number",relevance:0,begin:regex.concat(BASE_NUMBER_RE,regex.optional(APPROXIMATE_NUMBER_RE),regex.optional(SCIENTIFIC_NOTATION_RE))},SYMBOL_RE=/[a-zA-Z$][a-zA-Z0-9$]*/,SYSTEM_SYMBOLS_SET=new Set(
SYSTEM_SYMBOLS2),SYMBOLS={variants:[{className:"builtin-symbol",begin:SYMBOL_RE,"on:begin":(match,response)=>{SYSTEM_SYMBOLS_SET.has(match[0])||response.ignoreMatch()}},{className:"symbol",relevance:0,begin:SYMBOL_RE}]},NAMED_CHARACTER={className:"named-character",begin:/\\\[[$a-zA-Z][$a-zA-Z0-9]+\]/},OPERATORS={className:"operator",relevance:0,begin:/[+\-*/,;.:@~=><&|_`'^?!%]+/},PATTERNS={className:"pattern",relevance:0,begin:/([a-zA-Z$][a-zA-Z0-9$]*)?_+([a-zA-Z$][a-zA-Z0-9$]*)?/},SLOTS={className:"\
slot",relevance:0,begin:/#[a-zA-Z$][a-zA-Z0-9$]*|#+[0-9]?/},BRACES={className:"brace",relevance:0,begin:/[[\](){}]/},MESSAGES={className:"message-name",relevance:0,begin:regex.concat("::",SYMBOL_RE)};return{name:"Mathematica",aliases:["mma","wl"],classNameAliases:{brace:"punctuation",pattern:"type",slot:"type",symbol:"variable","named-character":"variable","builtin-symbol":"built_in","message-name":"string"},contains:[hljs.COMMENT(/\(\*/,/\*\)/,{contains:["self"]}),PATTERNS,SLOTS,MESSAGES,SYMBOLS,
NAMED_CHARACTER,hljs.QUOTE_STRING_MODE,NUMBERS,OPERATORS,BRACES]}}return mathematica_1=mathematica2,mathematica_1}var matlab_1,hasRequiredMatlab;function requireMatlab(){if(hasRequiredMatlab)return matlab_1;hasRequiredMatlab=1;function matlab2(hljs){const TRANSPOSE_RE="('|\\.')+",TRANSPOSE={relevance:0,contains:[{begin:TRANSPOSE_RE}]};return{name:"Matlab",keywords:{keyword:"arguments break case catch classdef continue else elseif end enumeration events for function global if methods otherwise pa\
rfor persistent properties return spmd switch try while",built_in:"sin sind sinh asin asind asinh cos cosd cosh acos acosd acosh tan tand tanh atan atand atan2 atanh sec secd sech asec asecd asech csc cscd csch acsc acscd acsch cot cotd coth acot acotd acoth hypot exp expm1 log log1p log10 log2 pow2 realpow reallog realsqrt sqrt nthroot nextpow2 abs angle complex conj imag real unwrap isreal cplxpair fix floor ceil round mod rem sign airy besselj bessely besselh besseli besselk beta betainc beta\
ln ellipj ellipke erf erfc erfcx erfinv expint gamma gammainc gammaln psi legendre cross dot factor isprime primes gcd lcm rat rats perms nchoosek factorial cart2sph cart2pol pol2cart sph2cart hsv2rgb rgb2hsv zeros ones eye repmat rand randn linspace logspace freqspace meshgrid accumarray size length ndims numel disp isempty isequal isequalwithequalnans cat reshape diag blkdiag tril triu fliplr flipud flipdim rot90 find sub2ind ind2sub bsxfun ndgrid permute ipermute shiftdim circshift squeeze is\
scalar isvector ans eps realmax realmin pi i|0 inf nan isnan isinf isfinite j|0 why compan gallery hadamard hankel hilb invhilb magic pascal rosser toeplitz vander wilkinson max min nanmax nanmin mean nanmean type table readtable writetable sortrows sort figure plot plot3 scatter scatter3 cellfun legend intersect ismember procrustes hold num2cell "},illegal:'(//|"|#|/\\*|\\s+/\\w+)',contains:[{className:"function",beginKeywords:"function",end:"$",contains:[hljs.UNDERSCORE_TITLE_MODE,{className:"\
params",variants:[{begin:"\\(",end:"\\)"},{begin:"\\[",end:"\\]"}]}]},{className:"built_in",begin:/true|false/,relevance:0,starts:TRANSPOSE},{begin:"[a-zA-Z][a-zA-Z_0-9]*"+TRANSPOSE_RE,relevance:0},{className:"number",begin:hljs.C_NUMBER_RE,relevance:0,starts:TRANSPOSE},{className:"string",begin:"'",end:"'",contains:[{begin:"''"}]},{begin:/\]|\}|\)/,relevance:0,starts:TRANSPOSE},{className:"string",begin:'"',end:'"',contains:[{begin:'""'}],starts:TRANSPOSE},hljs.COMMENT("^\\s*%\\{\\s*$","^\\s*%\\}\
\\s*$"),hljs.COMMENT("%","$")]}}return matlab_1=matlab2,matlab_1}var maxima_1,hasRequiredMaxima;function requireMaxima(){if(hasRequiredMaxima)return maxima_1;hasRequiredMaxima=1;function maxima2(hljs){return{name:"Maxima",keywords:{$pattern:"[A-Za-z_%][0-9A-Za-z_%]*",keyword:"if then else elseif for thru do while unless step in and or not",literal:"true false unknown inf minf ind und %e %i %pi %phi %gamma",built_in:" abasep abs absint absolute_real_time acos acosh acot acoth acsc acsch activate \
addcol add_edge add_edges addmatrices addrow add_vertex add_vertices adjacency_matrix adjoin adjoint af agd airy airy_ai airy_bi airy_dai airy_dbi algsys alg_type alias allroots alphacharp alphanumericp amortization %and annuity_fv annuity_pv antid antidiff AntiDifference append appendfile apply apply1 apply2 applyb1 apropos args arit_amortization arithmetic arithsum array arrayapply arrayinfo arraymake arraysetapply ascii asec asech asin asinh askinteger asksign assoc assoc_legendre_p assoc_leg\
endre_q assume assume_external_byte_order asympa at atan atan2 atanh atensimp atom atvalue augcoefmatrix augmented_lagrangian_method av average_degree backtrace bars barsplot barsplot_description base64 base64_decode bashindices batch batchload bc2 bdvac belln benefit_cost bern bernpoly bernstein_approx bernstein_expand bernstein_poly bessel bessel_i bessel_j bessel_k bessel_simplify bessel_y beta beta_incomplete beta_incomplete_generalized beta_incomplete_regularized bezout bfallroots bffac bf_\
find_root bf_fmin_cobyla bfhzeta bfloat bfloatp bfpsi bfpsi0 bfzeta biconnected_components bimetric binomial bipartition block blockmatrixp bode_gain bode_phase bothcoef box boxplot boxplot_description break bug_report build_info|10 buildq build_sample burn cabs canform canten cardinality carg cartan cartesian_product catch cauchy_matrix cbffac cdf_bernoulli cdf_beta cdf_binomial cdf_cauchy cdf_chi2 cdf_continuous_uniform cdf_discrete_uniform cdf_exp cdf_f cdf_gamma cdf_general_finite_discrete c\
df_geometric cdf_gumbel cdf_hypergeometric cdf_laplace cdf_logistic cdf_lognormal cdf_negative_binomial cdf_noncentral_chi2 cdf_noncentral_student_t cdf_normal cdf_pareto cdf_poisson cdf_rank_sum cdf_rayleigh cdf_signed_rank cdf_student_t cdf_weibull cdisplay ceiling central_moment cequal cequalignore cf cfdisrep cfexpand cgeodesic cgreaterp cgreaterpignore changename changevar chaosgame charat charfun charfun2 charlist charp charpoly chdir chebyshev_t chebyshev_u checkdiv check_overlaps chinese\
 cholesky christof chromatic_index chromatic_number cint circulant_graph clear_edge_weight clear_rules clear_vertex_label clebsch_gordan clebsch_graph clessp clesspignore close closefile cmetric coeff coefmatrix cograd col collapse collectterms columnop columnspace columnswap columnvector combination combine comp2pui compare compfile compile compile_file complement_graph complete_bipartite_graph complete_graph complex_number_p components compose_functions concan concat conjugate conmetderiv conn\
ected_components connect_vertices cons constant constantp constituent constvalue cont2part content continuous_freq contortion contour_plot contract contract_edge contragrad contrib_ode convert coord copy copy_file copy_graph copylist copymatrix cor cos cosh cot coth cov cov1 covdiff covect covers crc24sum create_graph create_list csc csch csetup cspline ctaylor ct_coordsys ctransform ctranspose cube_graph cuboctahedron_graph cunlisp cv cycle_digraph cycle_graph cylindrical days360 dblint deactiv\
ate declare declare_constvalue declare_dimensions declare_fundamental_dimensions declare_fundamental_units declare_qty declare_translated declare_unit_conversion declare_units declare_weights decsym defcon define define_alt_display define_variable defint defmatch defrule defstruct deftaylor degree_sequence del delete deleten delta demo demoivre denom depends derivdegree derivlist describe desolve determinant dfloat dgauss_a dgauss_b dgeev dgemm dgeqrf dgesv dgesvd diag diagmatrix diag_matrix dia\
gmatrixp diameter diff digitcharp dimacs_export dimacs_import dimension dimensionless dimensions dimensions_as_list direct directory discrete_freq disjoin disjointp disolate disp dispcon dispform dispfun dispJordan display disprule dispterms distrib divide divisors divsum dkummer_m dkummer_u dlange dodecahedron_graph dotproduct dotsimp dpart draw draw2d draw3d drawdf draw_file draw_graph dscalar echelon edge_coloring edge_connectivity edges eigens_by_jacobi eigenvalues eigenvectors eighth einste\
in eivals eivects elapsed_real_time elapsed_run_time ele2comp ele2polynome ele2pui elem elementp elevation_grid elim elim_allbut eliminate eliminate_using ellipse elliptic_e elliptic_ec elliptic_eu elliptic_f elliptic_kc elliptic_pi ematrix empty_graph emptyp endcons entermatrix entertensor entier equal equalp equiv_classes erf erfc erf_generalized erfi errcatch error errormsg errors euler ev eval_string evenp every evolution evolution2d evundiff example exp expand expandwrt expandwrt_factored e\
xpint expintegral_chi expintegral_ci expintegral_e expintegral_e1 expintegral_ei expintegral_e_simplify expintegral_li expintegral_shi expintegral_si explicit explose exponentialize express expt exsec extdiff extract_linear_equations extremal_subset ezgcd %f f90 facsum factcomb factor factorfacsum factorial factorout factorsum facts fast_central_elements fast_linsolve fasttimes featurep fernfale fft fib fibtophi fifth filename_merge file_search file_type fillarray findde find_root find_root_abs \
find_root_error find_root_rel first fix flatten flength float floatnump floor flower_snark flush flush1deriv flushd flushnd flush_output fmin_cobyla forget fortran fourcos fourexpand fourier fourier_elim fourint fourintcos fourintsin foursimp foursin fourth fposition frame_bracket freeof freshline fresnel_c fresnel_s from_adjacency_matrix frucht_graph full_listify fullmap fullmapl fullratsimp fullratsubst fullsetify funcsolve fundamental_dimensions fundamental_units fundef funmake funp fv g0 g1 \
gamma gamma_greek gamma_incomplete gamma_incomplete_generalized gamma_incomplete_regularized gauss gauss_a gauss_b gaussprob gcd gcdex gcdivide gcfac gcfactor gd generalized_lambert_w genfact gen_laguerre genmatrix gensym geo_amortization geo_annuity_fv geo_annuity_pv geomap geometric geometric_mean geosum get getcurrentdirectory get_edge_weight getenv get_lu_factors get_output_stream_string get_pixel get_plot_option get_tex_environment get_tex_environment_default get_vertex_label gfactor gfacto\
rsum ggf girth global_variances gn gnuplot_close gnuplot_replot gnuplot_reset gnuplot_restart gnuplot_start go Gosper GosperSum gr2d gr3d gradef gramschmidt graph6_decode graph6_encode graph6_export graph6_import graph_center graph_charpoly graph_eigenvalues graph_flow graph_order graph_periphery graph_product graph_size graph_union great_rhombicosidodecahedron_graph great_rhombicuboctahedron_graph grid_graph grind grobner_basis grotzch_graph hamilton_cycle hamilton_path hankel hankel_1 hankel_2\
 harmonic harmonic_mean hav heawood_graph hermite hessian hgfred hilbertmap hilbert_matrix hipow histogram histogram_description hodge horner hypergeometric i0 i1 %ibes ic1 ic2 ic_convert ichr1 ichr2 icosahedron_graph icosidodecahedron_graph icurvature ident identfor identity idiff idim idummy ieqn %if ifactors iframes ifs igcdex igeodesic_coords ilt image imagpart imetric implicit implicit_derivative implicit_plot indexed_tensor indices induced_subgraph inferencep inference_result infix info_di\
splay init_atensor init_ctensor in_neighbors innerproduct inpart inprod inrt integerp integer_partitions integrate intersect intersection intervalp intopois intosum invariant1 invariant2 inverse_fft inverse_jacobi_cd inverse_jacobi_cn inverse_jacobi_cs inverse_jacobi_dc inverse_jacobi_dn inverse_jacobi_ds inverse_jacobi_nc inverse_jacobi_nd inverse_jacobi_ns inverse_jacobi_sc inverse_jacobi_sd inverse_jacobi_sn invert invert_by_adjoint invert_by_lu inv_mod irr is is_biconnected is_bipartite is_c\
onnected is_digraph is_edge_in_graph is_graph is_graph_or_digraph ishow is_isomorphic isolate isomorphism is_planar isqrt isreal_p is_sconnected is_tree is_vertex_in_graph items_inference %j j0 j1 jacobi jacobian jacobi_cd jacobi_cn jacobi_cs jacobi_dc jacobi_dn jacobi_ds jacobi_nc jacobi_nd jacobi_ns jacobi_p jacobi_sc jacobi_sd jacobi_sn JF jn join jordan julia julia_set julia_sin %k kdels kdelta kill killcontext kostka kron_delta kronecker_product kummer_m kummer_u kurtosis kurtosis_bernoulli\
 kurtosis_beta kurtosis_binomial kurtosis_chi2 kurtosis_continuous_uniform kurtosis_discrete_uniform kurtosis_exp kurtosis_f kurtosis_gamma kurtosis_general_finite_discrete kurtosis_geometric kurtosis_gumbel kurtosis_hypergeometric kurtosis_laplace kurtosis_logistic kurtosis_lognormal kurtosis_negative_binomial kurtosis_noncentral_chi2 kurtosis_noncentral_student_t kurtosis_normal kurtosis_pareto kurtosis_poisson kurtosis_rayleigh kurtosis_student_t kurtosis_weibull label labels lagrange laguerr\
e lambda lambert_w laplace laplacian_matrix last lbfgs lc2kdt lcharp lc_l lcm lc_u ldefint ldisp ldisplay legendre_p legendre_q leinstein length let letrules letsimp levi_civita lfreeof lgtreillis lhs li liediff limit Lindstedt linear linearinterpol linear_program linear_regression line_graph linsolve listarray list_correlations listify list_matrix_entries list_nc_monomials listoftens listofvars listp lmax lmin load loadfile local locate_matrix_entry log logcontract log_gamma lopow lorentz_gauge\
 lowercasep lpart lratsubst lreduce lriemann lsquares_estimates lsquares_estimates_approximate lsquares_estimates_exact lsquares_mse lsquares_residual_mse lsquares_residuals lsum ltreillis lu_backsub lucas lu_factor %m macroexpand macroexpand1 make_array makebox makefact makegamma make_graph make_level_picture makelist makeOrders make_poly_continent make_poly_country make_polygon make_random_state make_rgb_picture makeset make_string_input_stream make_string_output_stream make_transform mandelbr\
ot mandelbrot_set map mapatom maplist matchdeclare matchfix mat_cond mat_fullunblocker mat_function mathml_display mat_norm matrix matrixmap matrixp matrix_size mattrace mat_trace mat_unblocker max max_clique max_degree max_flow maximize_lp max_independent_set max_matching maybe md5sum mean mean_bernoulli mean_beta mean_binomial mean_chi2 mean_continuous_uniform mean_deviation mean_discrete_uniform mean_exp mean_f mean_gamma mean_general_finite_discrete mean_geometric mean_gumbel mean_hypergeome\
tric mean_laplace mean_logistic mean_lognormal mean_negative_binomial mean_noncentral_chi2 mean_noncentral_student_t mean_normal mean_pareto mean_poisson mean_rayleigh mean_student_t mean_weibull median median_deviation member mesh metricexpandall mgf1_sha1 min min_degree min_edge_cut minfactorial minimalPoly minimize_lp minimum_spanning_tree minor minpack_lsquares minpack_solve min_vertex_cover min_vertex_cut mkdir mnewton mod mode_declare mode_identity ModeMatrix moebius mon2schur mono monomia\
l_dimensions multibernstein_poly multi_display_for_texinfo multi_elem multinomial multinomial_coeff multi_orbit multiplot_mode multi_pui multsym multthru mycielski_graph nary natural_unit nc_degree ncexpt ncharpoly negative_picture neighbors new newcontext newdet new_graph newline newton new_variable next_prime nicedummies niceindices ninth nofix nonarray noncentral_moment nonmetricity nonnegintegerp nonscalarp nonzeroandfreeof notequal nounify nptetrad npv nroots nterms ntermst nthroot nullity \
nullspace num numbered_boundaries numberp number_to_octets num_distinct_partitions numerval numfactor num_partitions nusum nzeta nzetai nzetar octets_to_number octets_to_oid odd_girth oddp ode2 ode_check odelin oid_to_octets op opena opena_binary openr openr_binary openw openw_binary operatorp opsubst optimize %or orbit orbits ordergreat ordergreatp orderless orderlessp orthogonal_complement orthopoly_recur orthopoly_weight outermap out_neighbors outofpois pade parabolic_cylinder_d parametric pa\
rametric_surface parg parGosper parse_string parse_timedate part part2cont partfrac partition partition_set partpol path_digraph path_graph pathname_directory pathname_name pathname_type pdf_bernoulli pdf_beta pdf_binomial pdf_cauchy pdf_chi2 pdf_continuous_uniform pdf_discrete_uniform pdf_exp pdf_f pdf_gamma pdf_general_finite_discrete pdf_geometric pdf_gumbel pdf_hypergeometric pdf_laplace pdf_logistic pdf_lognormal pdf_negative_binomial pdf_noncentral_chi2 pdf_noncentral_student_t pdf_normal \
pdf_pareto pdf_poisson pdf_rank_sum pdf_rayleigh pdf_signed_rank pdf_student_t pdf_weibull pearson_skewness permanent permut permutation permutations petersen_graph petrov pickapart picture_equalp picturep piechart piechart_description planar_embedding playback plog plot2d plot3d plotdf ploteq plsquares pochhammer points poisdiff poisexpt poisint poismap poisplus poissimp poissubst poistimes poistrim polar polarform polartorect polar_to_xy poly_add poly_buchberger poly_buchberger_criterion poly_\
colon_ideal poly_content polydecomp poly_depends_p poly_elimination_ideal poly_exact_divide poly_expand poly_expt poly_gcd polygon poly_grobner poly_grobner_equal poly_grobner_member poly_grobner_subsetp poly_ideal_intersection poly_ideal_polysaturation poly_ideal_polysaturation1 poly_ideal_saturation poly_ideal_saturation1 poly_lcm poly_minimization polymod poly_multiply polynome2ele polynomialp poly_normal_form poly_normalize poly_normalize_list poly_polysaturation_extension poly_primitive_par\
t poly_pseudo_divide poly_reduced_grobner poly_reduction poly_saturation_extension poly_s_polynomial poly_subtract polytocompanion pop postfix potential power_mod powerseries powerset prefix prev_prime primep primes principal_components print printf printfile print_graph printpois printprops prodrac product properties propvars psi psubst ptriangularize pui pui2comp pui2ele pui2polynome pui_direct puireduc push put pv qput qrange qty quad_control quad_qag quad_qagi quad_qagp quad_qags quad_qawc q\
uad_qawf quad_qawo quad_qaws quadrilateral quantile quantile_bernoulli quantile_beta quantile_binomial quantile_cauchy quantile_chi2 quantile_continuous_uniform quantile_discrete_uniform quantile_exp quantile_f quantile_gamma quantile_general_finite_discrete quantile_geometric quantile_gumbel quantile_hypergeometric quantile_laplace quantile_logistic quantile_lognormal quantile_negative_binomial quantile_noncentral_chi2 quantile_noncentral_student_t quantile_normal quantile_pareto quantile_poiss\
on quantile_rayleigh quantile_student_t quantile_weibull quartile_skewness quit qunit quotient racah_v racah_w radcan radius random random_bernoulli random_beta random_binomial random_bipartite_graph random_cauchy random_chi2 random_continuous_uniform random_digraph random_discrete_uniform random_exp random_f random_gamma random_general_finite_discrete random_geometric random_graph random_graph1 random_gumbel random_hypergeometric random_laplace random_logistic random_lognormal random_negative_b\
inomial random_network random_noncentral_chi2 random_noncentral_student_t random_normal random_pareto random_permutation random_poisson random_rayleigh random_regular_graph random_student_t random_tournament random_tree random_weibull range rank rat ratcoef ratdenom ratdiff ratdisrep ratexpand ratinterpol rational rationalize ratnumer ratnump ratp ratsimp ratsubst ratvars ratweight read read_array read_binary_array read_binary_list read_binary_matrix readbyte readchar read_hashed_array readline \
read_list read_matrix read_nested_list readonly read_xpm real_imagpart_to_conjugate realpart realroots rearray rectangle rectform rectform_log_if_constant recttopolar rediff reduce_consts reduce_order region region_boundaries region_boundaries_plus rem remainder remarray rembox remcomps remcon remcoord remfun remfunction remlet remove remove_constvalue remove_dimensions remove_edge remove_fundamental_dimensions remove_fundamental_units remove_plot_option remove_vertex rempart remrule remsym remv\
alue rename rename_file reset reset_displays residue resolvante resolvante_alternee1 resolvante_bipartite resolvante_diedrale resolvante_klein resolvante_klein3 resolvante_produit_sym resolvante_unitaire resolvante_vierer rest resultant return reveal reverse revert revert2 rgb2level rhs ricci riemann rinvariant risch rk rmdir rncombine romberg room rootscontract round row rowop rowswap rreduce run_testsuite %s save saving scalarp scaled_bessel_i scaled_bessel_i0 scaled_bessel_i1 scalefactors sca\
nmap scatterplot scatterplot_description scene schur2comp sconcat scopy scsimp scurvature sdowncase sec sech second sequal sequalignore set_alt_display setdifference set_draw_defaults set_edge_weight setelmx setequalp setify setp set_partitions set_plot_option set_prompt set_random_state set_tex_environment set_tex_environment_default setunits setup_autoload set_up_dot_simplifications set_vertex_label seventh sexplode sf sha1sum sha256sum shortest_path shortest_weighted_path show showcomps showr\
atvars sierpinskiale sierpinskimap sign signum similaritytransform simp_inequality simplify_sum simplode simpmetderiv simtran sin sinh sinsert sinvertcase sixth skewness skewness_bernoulli skewness_beta skewness_binomial skewness_chi2 skewness_continuous_uniform skewness_discrete_uniform skewness_exp skewness_f skewness_gamma skewness_general_finite_discrete skewness_geometric skewness_gumbel skewness_hypergeometric skewness_laplace skewness_logistic skewness_lognormal skewness_negative_binomial\
 skewness_noncentral_chi2 skewness_noncentral_student_t skewness_normal skewness_pareto skewness_poisson skewness_rayleigh skewness_student_t skewness_weibull slength smake small_rhombicosidodecahedron_graph small_rhombicuboctahedron_graph smax smin smismatch snowmap snub_cube_graph snub_dodecahedron_graph solve solve_rec solve_rec_rat some somrac sort sparse6_decode sparse6_encode sparse6_export sparse6_import specint spherical spherical_bessel_j spherical_bessel_y spherical_hankel1 spherical_h\
ankel2 spherical_harmonic spherical_to_xyz splice split sposition sprint sqfr sqrt sqrtdenest sremove sremovefirst sreverse ssearch ssort sstatus ssubst ssubstfirst staircase standardize standardize_inverse_trig starplot starplot_description status std std1 std_bernoulli std_beta std_binomial std_chi2 std_continuous_uniform std_discrete_uniform std_exp std_f std_gamma std_general_finite_discrete std_geometric std_gumbel std_hypergeometric std_laplace std_logistic std_lognormal std_negative_binom\
ial std_noncentral_chi2 std_noncentral_student_t std_normal std_pareto std_poisson std_rayleigh std_student_t std_weibull stemplot stirling stirling1 stirling2 strim striml strimr string stringout stringp strong_components struve_h struve_l sublis sublist sublist_indices submatrix subsample subset subsetp subst substinpart subst_parallel substpart substring subvar subvarp sum sumcontract summand_to_rec supcase supcontext symbolp symmdifference symmetricp system take_channel take_inference tan ta\
nh taylor taylorinfo taylorp taylor_simplifier taytorat tcl_output tcontract tellrat tellsimp tellsimpafter tentex tenth test_mean test_means_difference test_normality test_proportion test_proportions_difference test_rank_sum test_sign test_signed_rank test_variance test_variance_ratio tex tex1 tex_display texput %th third throw time timedate timer timer_info tldefint tlimit todd_coxeter toeplitz tokens to_lisp topological_sort to_poly to_poly_solve totaldisrep totalfourier totient tpartpol trac\
e tracematrix trace_options transform_sample translate translate_file transpose treefale tree_reduce treillis treinat triangle triangularize trigexpand trigrat trigreduce trigsimp trunc truncate truncated_cube_graph truncated_dodecahedron_graph truncated_icosahedron_graph truncated_tetrahedron_graph tr_warnings_get tube tutte_graph ueivects uforget ultraspherical underlying_graph undiff union unique uniteigenvectors unitp units unit_step unitvector unorder unsum untellrat untimer untrace upperca\
sep uricci uriemann uvect vandermonde_matrix var var1 var_bernoulli var_beta var_binomial var_chi2 var_continuous_uniform var_discrete_uniform var_exp var_f var_gamma var_general_finite_discrete var_geometric var_gumbel var_hypergeometric var_laplace var_logistic var_lognormal var_negative_binomial var_noncentral_chi2 var_noncentral_student_t var_normal var_pareto var_poisson var_rayleigh var_student_t var_weibull vector vectorpotential vectorsimp verbify vers vertex_coloring vertex_connectivity\
 vertex_degree vertex_distance vertex_eccentricity vertex_in_degree vertex_out_degree vertices vertices_to_cycle vertices_to_path %w weyl wheel_graph wiener_index wigner_3j wigner_6j wigner_9j with_stdout write_binary_data writebyte write_data writefile wronskian xreduce xthru %y Zeilberger zeroequiv zerofor zeromatrix zeromatrixp zeta zgeev zheev zlange zn_add_table zn_carmichael_lambda zn_characteristic_factors zn_determinant zn_factor_generators zn_invert_by_lu zn_log zn_mult_table absboxchar\
 activecontexts adapt_depth additive adim aform algebraic algepsilon algexact aliases allbut all_dotsimp_denoms allocation allsym alphabetic animation antisymmetric arrays askexp assume_pos assume_pos_pred assumescalar asymbol atomgrad atrig1 axes axis_3d axis_bottom axis_left axis_right axis_top azimuth background background_color backsubst berlefact bernstein_explicit besselexpand beta_args_sum_to_integer beta_expand bftorat bftrunc bindtest border boundaries_array box boxchar breakup %c cappi\
ng cauchysum cbrange cbtics center cflength cframe_flag cnonmet_flag color color_bar color_bar_tics colorbox columns commutative complex cone context contexts contour contour_levels cosnpiflag ctaypov ctaypt ctayswitch ctayvar ct_coords ctorsion_flag ctrgsimp cube current_let_rule_package cylinder data_file_name debugmode decreasing default_let_rule_package delay dependencies derivabbrev derivsubst detout diagmetric diff dim dimensions dispflag display2d|10 display_format_internal distribute_ove\
r doallmxops domain domxexpt domxmxops domxnctimes dontfactor doscmxops doscmxplus dot0nscsimp dot0simp dot1simp dotassoc dotconstrules dotdistrib dotexptsimp dotident dotscrules draw_graph_program draw_realpart edge_color edge_coloring edge_partition edge_type edge_width %edispflag elevation %emode endphi endtheta engineering_format_floats enhanced3d %enumer epsilon_lp erfflag erf_representation errormsg error_size error_syms error_type %e_to_numlog eval even evenfun evflag evfun ev_point expan\
dwrt_denom expintexpand expintrep expon expop exptdispflag exptisolate exptsubst facexpand facsum_combine factlim factorflag factorial_expand factors_only fb feature features file_name file_output_append file_search_demo file_search_lisp file_search_maxima|10 file_search_tests file_search_usage file_type_lisp file_type_maxima|10 fill_color fill_density filled_func fixed_vertices flipflag float2bf font font_size fortindent fortspaces fpprec fpprintprec functions gamma_expand gammalim gdet geninde\
x gensumnum GGFCFMAX GGFINFINITY globalsolve gnuplot_command gnuplot_curve_styles gnuplot_curve_titles gnuplot_default_term_command gnuplot_dumb_term_command gnuplot_file_args gnuplot_file_name gnuplot_out_file gnuplot_pdf_term_command gnuplot_pm3d gnuplot_png_term_command gnuplot_postamble gnuplot_preamble gnuplot_ps_term_command gnuplot_svg_term_command gnuplot_term gnuplot_view_args Gosper_in_Zeilberger gradefs grid grid2d grind halfangles head_angle head_both head_length head_type height hyp\
ergeometric_representation %iargs ibase icc1 icc2 icounter idummyx ieqnprint ifb ifc1 ifc2 ifg ifgi ifr iframe_bracket_form ifri igeowedge_flag ikt1 ikt2 imaginary inchar increasing infeval infinity inflag infolists inm inmc1 inmc2 intanalysis integer integervalued integrate_use_rootsof integration_constant integration_constant_counter interpolate_color intfaclim ip_grid ip_grid_in irrational isolate_wrt_times iterations itr julia_parameter %k1 %k2 keepfloat key key_pos kinvariant kt label label\
_alignment label_orientation labels lassociative lbfgs_ncorrections lbfgs_nfeval_max leftjust legend letrat let_rule_packages lfg lg lhospitallim limsubst linear linear_solver linechar linel|10 linenum line_type linewidth line_width linsolve_params linsolvewarn lispdisp listarith listconstvars listdummyvars lmxchar load_pathname loadprint logabs logarc logcb logconcoeffp logexpand lognegint logsimp logx logx_secondary logy logy_secondary logz lriem m1pbranch macroexpansion macros mainvar manual_\
demo maperror mapprint matrix_element_add matrix_element_mult matrix_element_transpose maxapplydepth maxapplyheight maxima_tempdir|10 maxima_userdir|10 maxnegex MAX_ORD maxposex maxpsifracdenom maxpsifracnum maxpsinegint maxpsiposint maxtayorder mesh_lines_color method mod_big_prime mode_check_errorp mode_checkp mode_check_warnp mod_test mod_threshold modular_linear_solver modulus multiplicative multiplicities myoptions nary negdistrib negsumdispflag newline newtonepsilon newtonmaxiter nextlayer\
factor niceindicespref nm nmc noeval nolabels nonegative_lp noninteger nonscalar noun noundisp nouns np npi nticks ntrig numer numer_pbranch obase odd oddfun opacity opproperties opsubst optimprefix optionset orientation origin orthopoly_returns_intervals outative outchar packagefile palette partswitch pdf_file pfeformat phiresolution %piargs piece pivot_count_sx pivot_max_sx plot_format plot_options plot_realpart png_file pochhammer_max_index points pointsize point_size points_joined point_type\
 poislim poisson poly_coefficient_ring poly_elimination_order polyfactor poly_grobner_algorithm poly_grobner_debug poly_monomial_order poly_primary_elimination_order poly_return_term_list poly_secondary_elimination_order poly_top_reduction_only posfun position powerdisp pred prederror primep_number_of_tests product_use_gamma program programmode promote_float_to_bigfloat prompt proportional_axes props psexpand ps_file radexpand radius radsubstflag rassociative ratalgdenom ratchristof ratdenomdivi\
de rateinstein ratepsilon ratfac rational ratmx ratprint ratriemann ratsimpexpons ratvarswitch ratweights ratweyl ratwtlvl real realonly redraw refcheck resolution restart resultant ric riem rmxchar %rnum_list rombergabs rombergit rombergmin rombergtol rootsconmode rootsepsilon run_viewer same_xy same_xyz savedef savefactors scalar scalarmatrixp scale scale_lp setcheck setcheckbreak setval show_edge_color show_edges show_edge_type show_edge_width show_id show_label showtime show_vertex_color sho\
w_vertex_size show_vertex_type show_vertices show_weight simp simplified_output simplify_products simpproduct simpsum sinnpiflag solvedecomposes solveexplicit solvefactors solvenullwarn solveradcan solvetrigwarn space sparse sphere spring_embedding_depth sqrtdispflag stardisp startphi starttheta stats_numer stringdisp structures style sublis_apply_lambda subnumsimp sumexpand sumsplitfact surface surface_hide svg_file symmetric tab taylordepth taylor_logexpand taylor_order_coefficients taylor_tru\
ncate_polynomials tensorkill terminal testsuite_files thetaresolution timer_devalue title tlimswitch tr track transcompile transform transform_xy translate_fast_arrays transparent transrun tr_array_as_ref tr_bound_function_applyp tr_file_tty_messagesp tr_float_can_branch_complex tr_function_call_default trigexpandplus trigexpandtimes triginverses trigsign trivial_solutions tr_numer tr_optimize_max_loop tr_semicompile tr_state_vars tr_warn_bad_function_calls tr_warn_fexpr tr_warn_meval tr_warn_mo\
de tr_warn_undeclared tr_warn_undefined_variable tstep ttyoff tube_extremes ufg ug %unitexpand unit_vectors uric uriem use_fast_arrays user_preamble usersetunits values vect_cross verbose vertex_color vertex_coloring vertex_partition vertex_size vertex_type view warnings weyl width windowname windowtitle wired_surface wireframe xaxis xaxis_color xaxis_secondary xaxis_type xaxis_width xlabel xlabel_secondary xlength xrange xrange_secondary xtics xtics_axis xtics_rotate xtics_rotate_secondary xtic\
s_secondary xtics_secondary_axis xu_grid x_voxel xy_file xyplane xy_scale yaxis yaxis_color yaxis_secondary yaxis_type yaxis_width ylabel ylabel_secondary ylength yrange yrange_secondary ytics ytics_axis ytics_rotate ytics_rotate_secondary ytics_secondary ytics_secondary_axis yv_grid y_voxel yx_ratio zaxis zaxis_color zaxis_type zaxis_width zeroa zerob zerobern zeta%pi zlabel zlabel_rotate zlength zmin zn_primroot_limit zn_primroot_pretest",symbol:"_ __ %|0 %%|0"},contains:[{className:"comment",
begin:"/\\*",end:"\\*/",contains:["self"]},hljs.QUOTE_STRING_MODE,{className:"number",relevance:0,variants:[{begin:"\\b(\\d+|\\d+\\.|\\.\\d+|\\d+\\.\\d+)[Ee][-+]?\\d+\\b"},{begin:"\\b(\\d+|\\d+\\.|\\.\\d+|\\d+\\.\\d+)[Bb][-+]?\\d+\\b",relevance:10},{begin:"\\b(\\.\\d+|\\d+\\.\\d+)\\b"},{begin:"\\b(\\d+|0[0-9A-Za-z]+)\\.?\\b"}]}],illegal:/@/}}return maxima_1=maxima2,maxima_1}var mel_1,hasRequiredMel;function requireMel(){if(hasRequiredMel)return mel_1;hasRequiredMel=1;function mel2(hljs){return{name:"\
MEL",keywords:"int float string vector matrix if else switch case default while do for in break continue global proc return about abs addAttr addAttributeEditorNodeHelp addDynamic addNewShelfTab addPP addPanelCategory addPrefixToName advanceToNextDrivenKey affectedNet affects aimConstraint air alias aliasAttr align alignCtx alignCurve alignSurface allViewFit ambientLight angle angleBetween animCone animCurveEditor animDisplay animView annotate appendStringArray applicationName applyAttrPreset ap\
plyTake arcLenDimContext arcLengthDimension arclen arrayMapper art3dPaintCtx artAttrCtx artAttrPaintVertexCtx artAttrSkinPaintCtx artAttrTool artBuildPaintMenu artFluidAttrCtx artPuttyCtx artSelectCtx artSetPaintCtx artUserPaintCtx assignCommand assignInputDevice assignViewportFactories attachCurve attachDeviceAttr attachSurface attrColorSliderGrp attrCompatibility attrControlGrp attrEnumOptionMenu attrEnumOptionMenuGrp attrFieldGrp attrFieldSliderGrp attrNavigationControlGrp attrPresetEditWin a\
ttributeExists attributeInfo attributeMenu attributeQuery autoKeyframe autoPlace bakeClip bakeFluidShading bakePartialHistory bakeResults bakeSimulation basename basenameEx batchRender bessel bevel bevelPlus binMembership bindSkin blend2 blendShape blendShapeEditor blendShapePanel blendTwoAttr blindDataType boneLattice boundary boxDollyCtx boxZoomCtx bufferCurve buildBookmarkMenu buildKeyframeMenu button buttonManip CBG cacheFile cacheFileCombine cacheFileMerge cacheFileTrack camera cameraView c\
anCreateManip canvas capitalizeString catch catchQuiet ceil changeSubdivComponentDisplayLevel changeSubdivRegion channelBox character characterMap characterOutlineEditor characterize chdir checkBox checkBoxGrp checkDefaultRenderGlobals choice circle circularFillet clamp clear clearCache clip clipEditor clipEditorCurrentTimeCtx clipSchedule clipSchedulerOutliner clipTrimBefore closeCurve closeSurface cluster cmdFileOutput cmdScrollFieldExecuter cmdScrollFieldReporter cmdShell coarsenSubdivSelecti\
onList collision color colorAtPoint colorEditor colorIndex colorIndexSliderGrp colorSliderButtonGrp colorSliderGrp columnLayout commandEcho commandLine commandPort compactHairSystem componentEditor compositingInterop computePolysetVolume condition cone confirmDialog connectAttr connectControl connectDynamic connectJoint connectionInfo constrain constrainValue constructionHistory container containsMultibyte contextInfo control convertFromOldLayers convertIffToPsd convertLightmap convertSolidTx co\
nvertTessellation convertUnit copyArray copyFlexor copyKey copySkinWeights cos cpButton cpCache cpClothSet cpCollision cpConstraint cpConvClothToMesh cpForces cpGetSolverAttr cpPanel cpProperty cpRigidCollisionFilter cpSeam cpSetEdit cpSetSolverAttr cpSolver cpSolverTypes cpTool cpUpdateClothUVs createDisplayLayer createDrawCtx createEditor createLayeredPsdFile createMotionField createNewShelf createNode createRenderLayer createSubdivRegion cross crossProduct ctxAbort ctxCompletion ctxEditMode c\
txTraverse currentCtx currentTime currentTimeCtx currentUnit curve curveAddPtCtx curveCVCtx curveEPCtx curveEditorCtx curveIntersect curveMoveEPCtx curveOnSurface curveSketchCtx cutKey cycleCheck cylinder dagPose date defaultLightListCheckBox defaultNavigation defineDataServer defineVirtualDevice deformer deg_to_rad delete deleteAttr deleteShadingGroupsAndMaterials deleteShelfTab deleteUI deleteUnusedBrushes delrandstr detachCurve detachDeviceAttr detachSurface deviceEditor devicePanel dgInfo dg\
dirty dgeval dgtimer dimWhen directKeyCtx directionalLight dirmap dirname disable disconnectAttr disconnectJoint diskCache displacementToPoly displayAffected displayColor displayCull displayLevelOfDetail displayPref displayRGBColor displaySmoothness displayStats displayString displaySurface distanceDimContext distanceDimension doBlur dolly dollyCtx dopeSheetEditor dot dotProduct doubleProfileBirailSurface drag dragAttrContext draggerContext dropoffLocator duplicate duplicateCurve duplicateSurfac\
e dynCache dynControl dynExport dynExpression dynGlobals dynPaintEditor dynParticleCtx dynPref dynRelEdPanel dynRelEditor dynamicLoad editAttrLimits editDisplayLayerGlobals editDisplayLayerMembers editRenderLayerAdjustment editRenderLayerGlobals editRenderLayerMembers editor editorTemplate effector emit emitter enableDevice encodeString endString endsWith env equivalent equivalentTol erf error eval evalDeferred evalEcho event exactWorldBoundingBox exclusiveLightCheckBox exec executeForEachObject\
 exists exp expression expressionEditorListen extendCurve extendSurface extrude fcheck fclose feof fflush fgetline fgetword file fileBrowserDialog fileDialog fileExtension fileInfo filetest filletCurve filter filterCurve filterExpand filterStudioImport findAllIntersections findAnimCurves findKeyframe findMenuItem findRelatedSkinCluster finder firstParentOf fitBspline flexor floatEq floatField floatFieldGrp floatScrollBar floatSlider floatSlider2 floatSliderButtonGrp floatSliderGrp floor flow flu\
idCacheInfo fluidEmitter fluidVoxelInfo flushUndo fmod fontDialog fopen formLayout format fprint frameLayout fread freeFormFillet frewind fromNativePath fwrite gamma gauss geometryConstraint getApplicationVersionAsFloat getAttr getClassification getDefaultBrush getFileList getFluidAttr getInputDeviceRange getMayaPanelTypes getModifiers getPanel getParticleAttr getPluginResource getenv getpid glRender glRenderEditor globalStitch gmatch goal gotoBindPose grabColor gradientControl gradientControlNo\
Attr graphDollyCtx graphSelectContext graphTrackCtx gravity grid gridLayout group groupObjectsByName HfAddAttractorToAS HfAssignAS HfBuildEqualMap HfBuildFurFiles HfBuildFurImages HfCancelAFR HfConnectASToHF HfCreateAttractor HfDeleteAS HfEditAS HfPerformCreateAS HfRemoveAttractorFromAS HfSelectAttached HfSelectAttractors HfUnAssignAS hardenPointCurve hardware hardwareRenderPanel headsUpDisplay headsUpMessage help helpLine hermite hide hilite hitTest hotBox hotkey hotkeyCheck hsv_to_rgb hudButto\
n hudSlider hudSliderButton hwReflectionMap hwRender hwRenderLoad hyperGraph hyperPanel hyperShade hypot iconTextButton iconTextCheckBox iconTextRadioButton iconTextRadioCollection iconTextScrollList iconTextStaticLabel ikHandle ikHandleCtx ikHandleDisplayScale ikSolver ikSplineHandleCtx ikSystem ikSystemInfo ikfkDisplayMethod illustratorCurves image imfPlugins inheritTransform insertJoint insertJointCtx insertKeyCtx insertKnotCurve insertKnotSurface instance instanceable instancer intField intF\
ieldGrp intScrollBar intSlider intSliderGrp interToUI internalVar intersect iprEngine isAnimCurve isConnected isDirty isParentOf isSameObject isTrue isValidObjectName isValidString isValidUiName isolateSelect itemFilter itemFilterAttr itemFilterRender itemFilterType joint jointCluster jointCtx jointDisplayScale jointLattice keyTangent keyframe keyframeOutliner keyframeRegionCurrentTimeCtx keyframeRegionDirectKeyCtx keyframeRegionDollyCtx keyframeRegionInsertKeyCtx keyframeRegionMoveKeyCtx keyfra\
meRegionScaleKeyCtx keyframeRegionSelectKeyCtx keyframeRegionSetKeyCtx keyframeRegionTrackCtx keyframeStats lassoContext lattice latticeDeformKeyCtx launch launchImageEditor layerButton layeredShaderPort layeredTexturePort layout layoutDialog lightList lightListEditor lightListPanel lightlink lineIntersection linearPrecision linstep listAnimatable listAttr listCameras listConnections listDeviceAttachments listHistory listInputDeviceAxes listInputDeviceButtons listInputDevices listMenuAnnotation \
listNodeTypes listPanelCategories listRelatives listSets listTransforms listUnselected listerEditor loadFluid loadNewShelf loadPlugin loadPluginLanguageResources loadPrefObjects localizedPanelLabel lockNode loft log longNameOf lookThru ls lsThroughFilter lsType lsUI Mayatomr mag makeIdentity makeLive makePaintable makeRoll makeSingleSurface makeTubeOn makebot manipMoveContext manipMoveLimitsCtx manipOptions manipRotateContext manipRotateLimitsCtx manipScaleContext manipScaleLimitsCtx marker matc\
h max memory menu menuBarLayout menuEditor menuItem menuItemToShelf menuSet menuSetPref messageLine min minimizeApp mirrorJoint modelCurrentTimeCtx modelEditor modelPanel mouse movIn movOut move moveIKtoFK moveKeyCtx moveVertexAlongDirection multiProfileBirailSurface mute nParticle nameCommand nameField namespace namespaceInfo newPanelItems newton nodeCast nodeIconButton nodeOutliner nodePreset nodeType noise nonLinear normalConstraint normalize nurbsBoolean nurbsCopyUVSet nurbsCube nurbsEditUV \
nurbsPlane nurbsSelect nurbsSquare nurbsToPoly nurbsToPolygonsPref nurbsToSubdiv nurbsToSubdivPref nurbsUVSet nurbsViewDirectionVector objExists objectCenter objectLayer objectType objectTypeUI obsoleteProc oceanNurbsPreviewPlane offsetCurve offsetCurveOnSurface offsetSurface openGLExtension openMayaPref optionMenu optionMenuGrp optionVar orbit orbitCtx orientConstraint outlinerEditor outlinerPanel overrideModifier paintEffectsDisplay pairBlend palettePort paneLayout panel panelConfiguration pan\
elHistory paramDimContext paramDimension paramLocator parent parentConstraint particle particleExists particleInstancer particleRenderInfo partition pasteKey pathAnimation pause pclose percent performanceOptions pfxstrokes pickWalk picture pixelMove planarSrf plane play playbackOptions playblast plugAttr plugNode pluginInfo pluginResourceUtil pointConstraint pointCurveConstraint pointLight pointMatrixMult pointOnCurve pointOnSurface pointPosition poleVectorConstraint polyAppend polyAppendFacetCt\
x polyAppendVertex polyAutoProjection polyAverageNormal polyAverageVertex polyBevel polyBlendColor polyBlindData polyBoolOp polyBridgeEdge polyCacheMonitor polyCheck polyChipOff polyClipboard polyCloseBorder polyCollapseEdge polyCollapseFacet polyColorBlindData polyColorDel polyColorPerVertex polyColorSet polyCompare polyCone polyCopyUV polyCrease polyCreaseCtx polyCreateFacet polyCreateFacetCtx polyCube polyCut polyCutCtx polyCylinder polyCylindricalProjection polyDelEdge polyDelFacet polyDelVe\
rtex polyDuplicateAndConnect polyDuplicateEdge polyEditUV polyEditUVShell polyEvaluate polyExtrudeEdge polyExtrudeFacet polyExtrudeVertex polyFlipEdge polyFlipUV polyForceUV polyGeoSampler polyHelix polyInfo polyInstallAction polyLayoutUV polyListComponentConversion polyMapCut polyMapDel polyMapSew polyMapSewMove polyMergeEdge polyMergeEdgeCtx polyMergeFacet polyMergeFacetCtx polyMergeUV polyMergeVertex polyMirrorFace polyMoveEdge polyMoveFacet polyMoveFacetUV polyMoveUV polyMoveVertex polyNorma\
l polyNormalPerVertex polyNormalizeUV polyOptUvs polyOptions polyOutput polyPipe polyPlanarProjection polyPlane polyPlatonicSolid polyPoke polyPrimitive polyPrism polyProjection polyPyramid polyQuad polyQueryBlindData polyReduce polySelect polySelectConstraint polySelectConstraintMonitor polySelectCtx polySelectEditCtx polySeparate polySetToFaceNormal polySewEdge polyShortestPathCtx polySmooth polySoftEdge polySphere polySphericalProjection polySplit polySplitCtx polySplitEdge polySplitRing poly\
SplitVertex polyStraightenUVBorder polySubdivideEdge polySubdivideFacet polyToSubdiv polyTorus polyTransfer polyTriangulate polyUVSet polyUnite polyWedgeFace popen popupMenu pose pow preloadRefEd print progressBar progressWindow projFileViewer projectCurve projectTangent projectionContext projectionManip promptDialog propModCtx propMove psdChannelOutliner psdEditTextureFile psdExport psdTextureFile putenv pwd python querySubdiv quit rad_to_deg radial radioButton radioButtonGrp radioCollection ra\
dioMenuItemCollection rampColorPort rand randomizeFollicles randstate rangeControl readTake rebuildCurve rebuildSurface recordAttr recordDevice redo reference referenceEdit referenceQuery refineSubdivSelectionList refresh refreshAE registerPluginResource rehash reloadImage removeJoint removeMultiInstance removePanelCategory rename renameAttr renameSelectionList renameUI render renderGlobalsNode renderInfo renderLayerButton renderLayerParent renderLayerPostProcess renderLayerUnparent renderManip \
renderPartition renderQualityNode renderSettings renderThumbnailUpdate renderWindowEditor renderWindowSelectContext renderer reorder reorderDeformers requires reroot resampleFluid resetAE resetPfxToPolyCamera resetTool resolutionNode retarget reverseCurve reverseSurface revolve rgb_to_hsv rigidBody rigidSolver roll rollCtx rootOf rot rotate rotationInterpolation roundConstantRadius rowColumnLayout rowLayout runTimeCommand runup sampleImage saveAllShelves saveAttrPreset saveFluid saveImage saveIn\
itialState saveMenu savePrefObjects savePrefs saveShelf saveToolSettings scale scaleBrushBrightness scaleComponents scaleConstraint scaleKey scaleKeyCtx sceneEditor sceneUIReplacement scmh scriptCtx scriptEditorInfo scriptJob scriptNode scriptTable scriptToShelf scriptedPanel scriptedPanelType scrollField scrollLayout sculpt searchPathArray seed selLoadSettings select selectContext selectCurveCV selectKey selectKeyCtx selectKeyframeRegionCtx selectMode selectPref selectPriority selectType select\
edNodes selectionConnection separator setAttr setAttrEnumResource setAttrMapping setAttrNiceNameResource setConstraintRestPosition setDefaultShadingGroup setDrivenKeyframe setDynamic setEditCtx setEditor setFluidAttr setFocus setInfinity setInputDeviceMapping setKeyCtx setKeyPath setKeyframe setKeyframeBlendshapeTargetWts setMenuMode setNodeNiceNameResource setNodeTypeFlag setParent setParticleAttr setPfxToPolyCamera setPluginResource setProject setStampDensity setStartupMessage setState setTool\
To setUITemplate setXformManip sets shadingConnection shadingGeometryRelCtx shadingLightRelCtx shadingNetworkCompare shadingNode shapeCompare shelfButton shelfLayout shelfTabLayout shellField shortNameOf showHelp showHidden showManipCtx showSelectionInTitle showShadingGroupAttrEditor showWindow sign simplify sin singleProfileBirailSurface size sizeBytes skinCluster skinPercent smoothCurve smoothTangentSurface smoothstep snap2to2 snapKey snapMode snapTogetherCtx snapshot soft softMod softModCtx s\
ort sound soundControl source spaceLocator sphere sphrand spotLight spotLightPreviewPort spreadSheetEditor spring sqrt squareSurface srtContext stackTrace startString startsWith stitchAndExplodeShell stitchSurface stitchSurfacePoints strcmp stringArrayCatenate stringArrayContains stringArrayCount stringArrayInsertAtIndex stringArrayIntersector stringArrayRemove stringArrayRemoveAtIndex stringArrayRemoveDuplicates stringArrayRemoveExact stringArrayToString stringToStringArray strip stripPrefixFro\
mName stroke subdAutoProjection subdCleanTopology subdCollapse subdDuplicateAndConnect subdEditUV subdListComponentConversion subdMapCut subdMapSewMove subdMatchTopology subdMirror subdToBlind subdToPoly subdTransferUVsToCache subdiv subdivCrease subdivDisplaySmoothness substitute substituteAllString substituteGeometry substring surface surfaceSampler surfaceShaderList swatchDisplayPort switchTable symbolButton symbolCheckBox sysFile system tabLayout tan tangentConstraint texLatticeDeformContext\
 texManipContext texMoveContext texMoveUVShellContext texRotateContext texScaleContext texSelectContext texSelectShortestPathCtx texSmudgeUVContext texWinToolCtx text textCurves textField textFieldButtonGrp textFieldGrp textManip textScrollList textToShelf textureDisplacePlane textureHairColor texturePlacementContext textureWindow threadCount threePointArcCtx timeControl timePort timerX toNativePath toggle toggleAxis toggleWindowVisibility tokenize tokenizeList tolerance tolower toolButton toolC\
ollection toolDropped toolHasOptions toolPropertyWindow torus toupper trace track trackCtx transferAttributes transformCompare transformLimits translator trim trunc truncateFluidCache truncateHairCache tumble tumbleCtx turbulence twoPointArcCtx uiRes uiTemplate unassignInputDevice undo undoInfo ungroup uniform unit unloadPlugin untangleUV untitledFileName untrim upAxis updateAE userCtx uvLink uvSnapshot validateShelfName vectorize view2dToolCtx viewCamera viewClipPlane viewFit viewHeadOn viewLoo\
kAt viewManip viewPlace viewSet visor volumeAxis vortex waitCursor warning webBrowser webBrowserPrefs whatIs window windowPref wire wireContext workspace wrinkle wrinkleContext writeTake xbmLangPathList xform",illegal:"</",contains:[hljs.C_NUMBER_MODE,hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,{className:"string",begin:"`",end:"`",contains:[hljs.BACKSLASH_ESCAPE]},{begin:/[$%@](\^\w\b|#\w+|[^\s\w{]|\{\w+\}|\w+)/},hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE]}}return mel_1=mel2,mel_1}var mercury_1,
hasRequiredMercury;function requireMercury(){if(hasRequiredMercury)return mercury_1;hasRequiredMercury=1;function mercury2(hljs){const KEYWORDS2={keyword:"module use_module import_module include_module end_module initialise mutable initialize finalize finalise interface implementation pred mode func type inst solver any_pred any_func is semidet det nondet multi erroneous failure cc_nondet cc_multi typeclass instance where pragma promise external trace atomic or_else require_complete_switch requi\
re_det require_semidet require_multi require_nondet require_cc_multi require_cc_nondet require_erroneous require_failure",meta:"inline no_inline type_spec source_file fact_table obsolete memo loop_check minimal_model terminates does_not_terminate check_termination promise_equivalent_clauses foreign_proc foreign_decl foreign_code foreign_type foreign_import_module foreign_export_enum foreign_export foreign_enum may_call_mercury will_not_call_mercury thread_safe not_thread_safe maybe_thread_safe p\
romise_pure promise_semipure tabled_for_io local untrailed trailed attach_to_io_state can_pass_as_mercury_type stable will_not_throw_exception may_modify_trail will_not_modify_trail may_duplicate may_not_duplicate affects_liveness does_not_affect_liveness doesnt_affect_liveness no_sharing unknown_sharing sharing",built_in:"some all not if then else true fail false try catch catch_any semidet_true semidet_false semidet_fail impure_true impure semipure"},COMMENT=hljs.COMMENT("%","$"),NUMCODE={className:"\
number",begin:"0'.\\|0[box][0-9a-fA-F]*"},ATOM=hljs.inherit(hljs.APOS_STRING_MODE,{relevance:0}),STRING=hljs.inherit(hljs.QUOTE_STRING_MODE,{relevance:0}),STRING_FMT={className:"subst",begin:"\\\\[abfnrtv]\\|\\\\x[0-9a-fA-F]*\\\\\\|%[-+# *.0-9]*[dioxXucsfeEgGp]",relevance:0};return STRING.contains=STRING.contains.slice(),STRING.contains.push(STRING_FMT),{name:"Mercury",aliases:["m","moo"],keywords:KEYWORDS2,contains:[{className:"built_in",variants:[{begin:"<=>"},{begin:"<=",relevance:0},{begin:"\
=>",relevance:0},{begin:"/\\\\"},{begin:"\\\\/"}]},{className:"built_in",variants:[{begin:":-\\|-->"},{begin:"=",relevance:0}]},COMMENT,hljs.C_BLOCK_COMMENT_MODE,NUMCODE,hljs.NUMBER_MODE,ATOM,STRING,{begin:/:-/},{begin:/\.$/}]}}return mercury_1=mercury2,mercury_1}var mipsasm_1,hasRequiredMipsasm;function requireMipsasm(){if(hasRequiredMipsasm)return mipsasm_1;hasRequiredMipsasm=1;function mipsasm2(hljs){return{name:"MIPS Assembly",case_insensitive:!0,aliases:["mips"],keywords:{$pattern:"\\.?"+hljs.
IDENT_RE,meta:".2byte .4byte .align .ascii .asciz .balign .byte .code .data .else .end .endif .endm .endr .equ .err .exitm .extern .global .hword .if .ifdef .ifndef .include .irp .long .macro .rept .req .section .set .skip .space .text .word .ltorg ",built_in:"$0 $1 $2 $3 $4 $5 $6 $7 $8 $9 $10 $11 $12 $13 $14 $15 $16 $17 $18 $19 $20 $21 $22 $23 $24 $25 $26 $27 $28 $29 $30 $31 zero at v0 v1 a0 a1 a2 a3 a4 a5 a6 a7 t0 t1 t2 t3 t4 t5 t6 t7 t8 t9 s0 s1 s2 s3 s4 s5 s6 s7 s8 k0 k1 gp sp fp ra $f0 $f1 \
$f2 $f2 $f4 $f5 $f6 $f7 $f8 $f9 $f10 $f11 $f12 $f13 $f14 $f15 $f16 $f17 $f18 $f19 $f20 $f21 $f22 $f23 $f24 $f25 $f26 $f27 $f28 $f29 $f30 $f31 Context Random EntryLo0 EntryLo1 Context PageMask Wired EntryHi HWREna BadVAddr Count Compare SR IntCtl SRSCtl SRSMap Cause EPC PRId EBase Config Config1 Config2 Config3 LLAddr Debug DEPC DESAVE CacheErr ECC ErrorEPC TagLo DataLo TagHi DataHi WatchLo WatchHi PerfCtl PerfCnt "},contains:[{className:"keyword",begin:"\\b(addi?u?|andi?|b(al)?|beql?|bgez(al)?l?|\
bgtzl?|blezl?|bltz(al)?l?|bnel?|cl[oz]|divu?|ext|ins|j(al)?|jalr(\\.hb)?|jr(\\.hb)?|lbu?|lhu?|ll|lui|lw[lr]?|maddu?|mfhi|mflo|movn|movz|move|msubu?|mthi|mtlo|mul|multu?|nop|nor|ori?|rotrv?|sb|sc|se[bh]|sh|sllv?|slti?u?|srav?|srlv?|subu?|sw[lr]?|xori?|wsbh|abs\\.[sd]|add\\.[sd]|alnv.ps|bc1[ft]l?|c\\.(s?f|un|u?eq|[ou]lt|[ou]le|ngle?|seq|l[et]|ng[et])\\.[sd]|(ceil|floor|round|trunc)\\.[lw]\\.[sd]|cfc1|cvt\\.d\\.[lsw]|cvt\\.l\\.[dsw]|cvt\\.ps\\.s|cvt\\.s\\.[dlw]|cvt\\.s\\.p[lu]|cvt\\.w\\.[dls]|div\\.[ds]|ldx?c1|luxc1|lw\
x?c1|madd\\.[sd]|mfc1|mov[fntz]?\\.[ds]|msub\\.[sd]|mth?c1|mul\\.[ds]|neg\\.[ds]|nmadd\\.[ds]|nmsub\\.[ds]|p[lu][lu]\\.ps|recip\\.fmt|r?sqrt\\.[ds]|sdx?c1|sub\\.[ds]|suxc1|swx?c1|break|cache|d?eret|[de]i|ehb|mfc0|mtc0|pause|prefx?|rdhwr|rdpgpr|sdbbp|ssnop|synci?|syscall|teqi?|tgei?u?|tlb(p|r|w[ir])|tlti?u?|tnei?|wait|wrpgpr)",end:"\\s"},hljs.COMMENT("[;#](?!\\s*$)","$"),hljs.C_BLOCK_COMMENT_MODE,hljs.QUOTE_STRING_MODE,{className:"string",begin:"'",end:"[^\\\\]'",relevance:0},{className:"title",begin:"\
\\|",end:"\\|",illegal:"\\n",relevance:0},{className:"number",variants:[{begin:"0x[0-9a-f]+"},{begin:"\\b-?\\d+"}],relevance:0},{className:"symbol",variants:[{begin:"^\\s*[a-z_\\.\\$][a-z0-9_\\.\\$]+:"},{begin:"^\\s*[0-9]+:"},{begin:"[0-9]+[bf]"}],relevance:0}],illegal:/\//}}return mipsasm_1=mipsasm2,mipsasm_1}var mizar_1,hasRequiredMizar;function requireMizar(){if(hasRequiredMizar)return mizar_1;hasRequiredMizar=1;function mizar2(hljs){return{name:"Mizar",keywords:"environ vocabularies notation\
s constructors definitions registrations theorems schemes requirements begin end definition registration cluster existence pred func defpred deffunc theorem proof let take assume then thus hence ex for st holds consider reconsider such that and in provided of as from be being by means equals implies iff redefine define now not or attr is mode suppose per cases set thesis contradiction scheme reserve struct correctness compatibility coherence symmetry assymetry reflexivity irreflexivity connected\
ness uniqueness commutativity idempotence involutiveness projectivity",contains:[hljs.COMMENT("::","$")]}}return mizar_1=mizar2,mizar_1}var perl_1,hasRequiredPerl;function requirePerl(){if(hasRequiredPerl)return perl_1;hasRequiredPerl=1;function perl2(hljs){const regex=hljs.regex,KEYWORDS2=["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","class","close","closedir","connect","continue","cos","crypt","dbmclose","d\
bmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","field","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeername","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","get\
pwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","method","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta",
"qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","st\
ate","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"],REGEX_MODIFIERS=/[dualxmsipngr]{0,12}/,PERL_KEYWORDS={$pattern:/[\w.]+/,keyword:KEYWORDS2.join(" ")},SUBST={className:"subst",begin:"[$@]\\{",end:"\\}",
keywords:PERL_KEYWORDS},METHOD={begin:/->\{/,end:/\}/},ATTR={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},VAR={scope:"variable",variants:[{begin:/\$\d/},{begin:regex.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[ATTR]},NUMBER={className:"number",variants:[{match:/0?\.[0-9][0-9_]+\b/},{match:/\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/},{match:/\b0[0-7][0-7_]*\b/},{match:/\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/},
{match:/\b0b[0-1][0-1_]*\b/}],relevance:0},STRING_CONTAINS=[hljs.BACKSLASH_ESCAPE,SUBST,VAR],REGEX_DELIMS=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],PAIRED_DOUBLE_RE=(prefix,open2,close2="\\1")=>{const middle=close2==="\\1"?close2:regex.concat(close2,open2);return regex.concat(regex.concat("(?:",prefix,")"),open2,/(?:\\.|[^\\\/])*?/,middle,/(?:\\.|[^\\\/])*?/,close2,REGEX_MODIFIERS)},PAIRED_RE=(prefix,open2,close2)=>regex.concat(regex.concat("(?:",prefix,")"),open2,/(?:\\.|[^\\\/])*?/,close2,REGEX_MODIFIERS),
PERL_DEFAULT_CONTAINS=[VAR,hljs.HASH_COMMENT_MODE,hljs.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),METHOD,{className:"string",contains:STRING_CONTAINS,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[hljs.BACKSLASH_ESCAPE]},{begin:'"',end:'\
"'},{begin:"`",end:"`",contains:[hljs.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},NUMBER,{begin:"(\\/\\/|"+hljs.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[hljs.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:PAIRED_DOUBLE_RE("s|tr|y",regex.either(...REGEX_DELIMS,{capture:!0}))},{begin:PAIRED_DOUBLE_RE("s|tr|y","\\(","\\)")},{begin:PAIRED_DOUBLE_RE("s|tr|y","\\[","\
\\]")},{begin:PAIRED_DOUBLE_RE("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:PAIRED_RE("(?:m|qr)?",/\//,/\//)},{begin:PAIRED_RE("m|qr",regex.either(...REGEX_DELIMS,{capture:!0}),/\1/)},{begin:PAIRED_RE("m|qr",/\(/,/\)/)},{begin:PAIRED_RE("m|qr",/\[/,/\]/)},{begin:PAIRED_RE("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub method",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[hljs.TITLE_MODE,ATTR]},{className:"\
class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[hljs.TITLE_MODE,ATTR,NUMBER]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return SUBST.contains=PERL_DEFAULT_CONTAINS,METHOD.contains=PERL_DEFAULT_CONTAINS,{name:"Perl",aliases:["pl","pm"],keywords:PERL_KEYWORDS,contains:PERL_DEFAULT_CONTAINS}}return perl_1=perl2,perl_1}var mojolicious_1,hasRequiredMojolicious;function requireMojolicious(){
if(hasRequiredMojolicious)return mojolicious_1;hasRequiredMojolicious=1;function mojolicious2(hljs){return{name:"Mojolicious",subLanguage:"xml",contains:[{className:"meta",begin:"^__(END|DATA)__$"},{begin:"^\\s*%{1,2}={0,2}",end:"$",subLanguage:"perl"},{begin:"<%{1,2}={0,2}",end:"={0,1}%>",subLanguage:"perl",excludeBegin:!0,excludeEnd:!0}]}}return mojolicious_1=mojolicious2,mojolicious_1}var monkey_1,hasRequiredMonkey;function requireMonkey(){if(hasRequiredMonkey)return monkey_1;hasRequiredMonkey=
1;function monkey2(hljs){const NUMBER={className:"number",relevance:0,variants:[{begin:"[$][a-fA-F0-9]+"},hljs.NUMBER_MODE]},FUNC_DEFINITION={variants:[{match:[/(function|method)/,/\s+/,hljs.UNDERSCORE_IDENT_RE]}],scope:{1:"keyword",3:"title.function"}},CLASS_DEFINITION={variants:[{match:[/(class|interface|extends|implements)/,/\s+/,hljs.UNDERSCORE_IDENT_RE]}],scope:{1:"keyword",3:"title.class"}};return{name:"Monkey",case_insensitive:!0,keywords:{keyword:["public","private","property","continue",
"exit","extern","new","try","catch","eachin","not","abstract","final","select","case","default","const","local","global","field","end","if","then","else","elseif","endif","while","wend","repeat","until","forever","for","to","step","next","return","module","inline","throw","import","and","or","shl","shr","mod"],built_in:["DebugLog","DebugStop","Error","Print","ACos","ACosr","ASin","ASinr","ATan","ATan2","ATan2r","ATanr","Abs","Abs","Ceil","Clamp","Clamp","Cos","Cosr","Exp","Floor","Log","Max","Ma\
x","Min","Min","Pow","Sgn","Sgn","Sin","Sinr","Sqrt","Tan","Tanr","Seed","PI","HALFPI","TWOPI"],literal:["true","false","null"]},illegal:/\/\*/,contains:[hljs.COMMENT("#rem","#end"),hljs.COMMENT("'","$",{relevance:0}),FUNC_DEFINITION,CLASS_DEFINITION,{className:"variable.language",begin:/\b(self|super)\b/},{className:"meta",begin:/\s*#/,end:"$",keywords:{keyword:"if else elseif endif end then"}},{match:[/^\s*/,/strict\b/],scope:{2:"meta"}},{beginKeywords:"alias",end:"=",contains:[hljs.UNDERSCORE_TITLE_MODE]},
hljs.QUOTE_STRING_MODE,NUMBER]}}return monkey_1=monkey2,monkey_1}var moonscript_1,hasRequiredMoonscript;function requireMoonscript(){if(hasRequiredMoonscript)return moonscript_1;hasRequiredMoonscript=1;function moonscript2(hljs){const KEYWORDS2={keyword:"if then not for in while do return else elseif break continue switch and or unless when class extends super local import export from using",literal:"true false nil",built_in:"_G _VERSION assert collectgarbage dofile error getfenv getmetatable ip\
airs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall coroutine debug io math os package string table"},JS_IDENT_RE="[A-Za-z$_][0-9A-Za-z$_]*",SUBST={className:"subst",begin:/#\{/,end:/\}/,keywords:KEYWORDS2},EXPRESSIONS=[hljs.inherit(hljs.C_NUMBER_MODE,{starts:{end:"(\\s*/)?",relevance:0}}),{className:"string",variants:[{begin:/'/,end:/'/,contains:[hljs.BACKSLASH_ESCAPE]},{begin:/"/,end:/"/,contains:[
hljs.BACKSLASH_ESCAPE,SUBST]}]},{className:"built_in",begin:"@__"+hljs.IDENT_RE},{begin:"@"+hljs.IDENT_RE},{begin:hljs.IDENT_RE+"\\\\"+hljs.IDENT_RE}];SUBST.contains=EXPRESSIONS;const TITLE=hljs.inherit(hljs.TITLE_MODE,{begin:JS_IDENT_RE}),POSSIBLE_PARAMS_RE="(\\(.*\\)\\s*)?\\B[-=]>",PARAMS={className:"params",begin:"\\([^\\(]",returnBegin:!0,contains:[{begin:/\(/,end:/\)/,keywords:KEYWORDS2,contains:["self"].concat(EXPRESSIONS)}]};return{name:"MoonScript",aliases:["moon"],keywords:KEYWORDS2,illegal:/\/\*/,
contains:EXPRESSIONS.concat([hljs.COMMENT("--","$"),{className:"function",begin:"^\\s*"+JS_IDENT_RE+"\\s*=\\s*"+POSSIBLE_PARAMS_RE,end:"[-=]>",returnBegin:!0,contains:[TITLE,PARAMS]},{begin:/[\(,:=]\s*/,relevance:0,contains:[{className:"function",begin:POSSIBLE_PARAMS_RE,end:"[-=]>",returnBegin:!0,contains:[PARAMS]}]},{className:"class",beginKeywords:"class",end:"$",illegal:/[:="\[\]]/,contains:[{beginKeywords:"extends",endsWithParent:!0,illegal:/[:="\[\]]/,contains:[TITLE]},TITLE]},{className:"\
name",begin:JS_IDENT_RE+":",end:":",returnBegin:!0,returnEnd:!0,relevance:0}])}}return moonscript_1=moonscript2,moonscript_1}var n1ql_1,hasRequiredN1ql;function requireN1ql(){if(hasRequiredN1ql)return n1ql_1;hasRequiredN1ql=1;function n1ql2(hljs){return{name:"N1QL",case_insensitive:!0,contains:[{beginKeywords:"build create index delete drop explain infer|10 insert merge prepare select update upsert|10",end:/;/,keywords:{keyword:["all","alter","analyze","and","any","array","as","asc","begin","bet\
ween","binary","boolean","break","bucket","build","by","call","case","cast","cluster","collate","collection","commit","connect","continue","correlate","cover","create","database","dataset","datastore","declare","decrement","delete","derived","desc","describe","distinct","do","drop","each","element","else","end","every","except","exclude","execute","exists","explain","fetch","first","flatten","for","force","from","function","grant","group","gsi","having","if","ignore","ilike","in","include","incr\
ement","index","infer","inline","inner","insert","intersect","into","is","join","key","keys","keyspace","known","last","left","let","letting","like","limit","lsm","map","mapping","matched","materialized","merge","minus","namespace","nest","not","number","object","offset","on","option","or","order","outer","over","parse","partition","password","path","pool","prepare","primary","private","privilege","procedure","public","raw","realm","reduce","rename","return","returning","revoke","right","role","\
rollback","satisfies","schema","select","self","semi","set","show","some","start","statistics","string","system","then","to","transaction","trigger","truncate","under","union","unique","unknown","unnest","unset","update","upsert","use","user","using","validate","value","valued","values","via","view","when","where","while","with","within","work","xor"],literal:["true","false","null","missing|5"],built_in:["array_agg","array_append","array_concat","array_contains","array_count","array_distinct","a\
rray_ifnull","array_length","array_max","array_min","array_position","array_prepend","array_put","array_range","array_remove","array_repeat","array_replace","array_reverse","array_sort","array_sum","avg","count","max","min","sum","greatest","least","ifmissing","ifmissingornull","ifnull","missingif","nullif","ifinf","ifnan","ifnanorinf","naninf","neginfif","posinfif","clock_millis","clock_str","date_add_millis","date_add_str","date_diff_millis","date_diff_str","date_part_millis","date_part_str","\
date_trunc_millis","date_trunc_str","duration_to_str","millis","str_to_millis","millis_to_str","millis_to_utc","millis_to_zone_name","now_millis","now_str","str_to_duration","str_to_utc","str_to_zone_name","decode_json","encode_json","encoded_size","poly_length","base64","base64_encode","base64_decode","meta","uuid","abs","acos","asin","atan","atan2","ceil","cos","degrees","e","exp","ln","log","floor","pi","power","radians","random","round","sign","sin","sqrt","tan","trunc","object_length","obje\
ct_names","object_pairs","object_inner_pairs","object_values","object_inner_values","object_add","object_put","object_remove","object_unwrap","regexp_contains","regexp_like","regexp_position","regexp_replace","contains","initcap","length","lower","ltrim","position","repeat","replace","rtrim","split","substr","title","trim","upper","isarray","isatom","isboolean","isnumber","isobject","isstring","type","toarray","toatom","toboolean","tonumber","toobject","tostring"]},contains:[{className:"string",
begin:"'",end:"'",contains:[hljs.BACKSLASH_ESCAPE]},{className:"string",begin:'"',end:'"',contains:[hljs.BACKSLASH_ESCAPE]},{className:"symbol",begin:"`",end:"`",contains:[hljs.BACKSLASH_ESCAPE]},hljs.C_NUMBER_MODE,hljs.C_BLOCK_COMMENT_MODE]},hljs.C_BLOCK_COMMENT_MODE]}}return n1ql_1=n1ql2,n1ql_1}var nestedtext_1,hasRequiredNestedtext;function requireNestedtext(){if(hasRequiredNestedtext)return nestedtext_1;hasRequiredNestedtext=1;function nestedtext2(hljs){const NESTED={match:[/^\s*(?=\S)/,/[^:]+/,
/:\s*/,/$/],className:{2:"attribute",3:"punctuation"}},DICTIONARY_ITEM={match:[/^\s*(?=\S)/,/[^:]*[^: ]/,/[ ]*:/,/[ ]/,/.*$/],className:{2:"attribute",3:"punctuation",5:"string"}},STRING={match:[/^\s*/,/>/,/[ ]/,/.*$/],className:{2:"punctuation",4:"string"}},LIST_ITEM={variants:[{match:[/^\s*/,/-/,/[ ]/,/.*$/]},{match:[/^\s*/,/-$/]}],className:{2:"bullet",4:"string"}};return{name:"Nested Text",aliases:["nt"],contains:[hljs.inherit(hljs.HASH_COMMENT_MODE,{begin:/^\s*(?=#)/,excludeBegin:!0}),LIST_ITEM,
STRING,NESTED,DICTIONARY_ITEM]}}return nestedtext_1=nestedtext2,nestedtext_1}var nginx_1,hasRequiredNginx;function requireNginx(){if(hasRequiredNginx)return nginx_1;hasRequiredNginx=1;function nginx2(hljs){const regex=hljs.regex,VAR={className:"variable",variants:[{begin:/\$\d+/},{begin:/\$\{\w+\}/},{begin:regex.concat(/[$@]/,hljs.UNDERSCORE_IDENT_RE)}]},DEFAULT={endsWithParent:!0,keywords:{$pattern:/[a-z_]{2,}|\/dev\/poll/,literal:["on","off","yes","no","true","false","none","blocked","debug","\
info","notice","warn","error","crit","select","break","last","permanent","redirect","kqueue","rtsig","epoll","poll","/dev/poll"]},relevance:0,illegal:"=>",contains:[hljs.HASH_COMMENT_MODE,{className:"string",contains:[hljs.BACKSLASH_ESCAPE,VAR],variants:[{begin:/"/,end:/"/},{begin:/'/,end:/'/}]},{begin:"([a-z]+):/",end:"\\s",endsWithParent:!0,excludeEnd:!0,contains:[VAR]},{className:"regexp",contains:[hljs.BACKSLASH_ESCAPE,VAR],variants:[{begin:"\\s\\^",end:"\\s|\\{|;",returnEnd:!0},{begin:"~\\*?\
\\s+",end:"\\s|\\{|;",returnEnd:!0},{begin:"\\*(\\.[a-z\\-]+)+"},{begin:"([a-z\\-]+\\.)+\\*"}]},{className:"number",begin:"\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b"},{className:"number",begin:"\\b\\d+[kKmMgGdshdwy]?\\b",relevance:0},VAR]};return{name:"Nginx config",aliases:["nginxconf"],contains:[hljs.HASH_COMMENT_MODE,{beginKeywords:"upstream location",end:/;|\{/,contains:DEFAULT.contains,keywords:{section:"upstream location"}},{className:"section",begin:regex.concat(hljs.UNDERSCORE_IDENT_RE+
regex.lookahead(/\s+\{/)),relevance:0},{begin:regex.lookahead(hljs.UNDERSCORE_IDENT_RE+"\\s"),end:";|\\{",contains:[{className:"attribute",begin:hljs.UNDERSCORE_IDENT_RE,starts:DEFAULT}],relevance:0}],illegal:"[^\\s\\}\\{]"}}return nginx_1=nginx2,nginx_1}var nim_1,hasRequiredNim;function requireNim(){if(hasRequiredNim)return nim_1;hasRequiredNim=1;function nim2(hljs){return{name:"Nim",keywords:{keyword:["addr","and","as","asm","bind","block","break","case","cast","concept","const","continue","co\
nverter","defer","discard","distinct","div","do","elif","else","end","enum","except","export","finally","for","from","func","generic","guarded","if","import","in","include","interface","is","isnot","iterator","let","macro","method","mixin","mod","nil","not","notin","object","of","or","out","proc","ptr","raise","ref","return","shared","shl","shr","static","template","try","tuple","type","using","var","when","while","with","without","xor","yield"],literal:["true","false"],type:["int","int8","int16",
"int32","int64","uint","uint8","uint16","uint32","uint64","float","float32","float64","bool","char","string","cstring","pointer","expr","stmt","void","auto","any","range","array","openarray","varargs","seq","set","clong","culong","cchar","cschar","cshort","cint","csize","clonglong","cfloat","cdouble","clongdouble","cuchar","cushort","cuint","culonglong","cstringarray","semistatic"],built_in:["stdin","stdout","stderr","result"]},contains:[{className:"meta",begin:/\{\./,end:/\.\}/,relevance:10},{className:"\
string",begin:/[a-zA-Z]\w*"/,end:/"/,contains:[{begin:/""/}]},{className:"string",begin:/([a-zA-Z]\w*)?"""/,end:/"""/},hljs.QUOTE_STRING_MODE,{className:"type",begin:/\b[A-Z]\w+\b/,relevance:0},{className:"number",relevance:0,variants:[{begin:/\b(0[xX][0-9a-fA-F][_0-9a-fA-F]*)('?[iIuU](8|16|32|64))?/},{begin:/\b(0o[0-7][_0-7]*)('?[iIuUfF](8|16|32|64))?/},{begin:/\b(0(b|B)[01][_01]*)('?[iIuUfF](8|16|32|64))?/},{begin:/\b(\d[_\d]*)('?[iIuUfF](8|16|32|64))?/}]},hljs.HASH_COMMENT_MODE]}}return nim_1=
nim2,nim_1}var nix_1,hasRequiredNix;function requireNix(){if(hasRequiredNix)return nix_1;hasRequiredNix=1;function nix2(hljs){const regex=hljs.regex,KEYWORDS2={keyword:["assert","else","if","in","inherit","let","or","rec","then","with"],literal:["true","false","null"],built_in:["abort","baseNameOf","builtins","derivation","derivationStrict","dirOf","fetchGit","fetchMercurial","fetchTarball","fetchTree","fromTOML","import","isNull","map","placeholder","removeAttrs","scopedImport","throw","toStrin\
g"]},BUILTINS={scope:"built_in",match:regex.either(...["abort","add","addDrvOutputDependencies","addErrorContext","all","any","appendContext","attrNames","attrValues","baseNameOf","bitAnd","bitOr","bitXor","break","builtins","catAttrs","ceil","compareVersions","concatLists","concatMap","concatStringsSep","convertHash","currentSystem","currentTime","deepSeq","derivation","derivationStrict","dirOf","div","elem","elemAt","false","fetchGit","fetchMercurial","fetchTarball","fetchTree","fetchurl","fil\
ter","filterSource","findFile","flakeRefToString","floor","foldl'","fromJSON","fromTOML","functionArgs","genList","genericClosure","getAttr","getContext","getEnv","getFlake","groupBy","hasAttr","hasContext","hashFile","hashString","head","import","intersectAttrs","isAttrs","isBool","isFloat","isFunction","isInt","isList","isNull","isPath","isString","langVersion","length","lessThan","listToAttrs","map","mapAttrs","match","mul","nixPath","nixVersion","null","parseDrvName","parseFlakeRef","partiti\
on","path","pathExists","placeholder","readDir","readFile","readFileType","removeAttrs","replaceStrings","scopedImport","seq","sort","split","splitVersion","storeDir","storePath","stringLength","sub","substring","tail","throw","toFile","toJSON","toPath","toString","toXML","trace","traceVerbose","true","tryEval","typeOf","unsafeDiscardOutputDependency","unsafeDiscardStringContext","unsafeGetAttrPos","warn","zipAttrsWith"].map(b=>`builtins\\.${b}`)),relevance:10},IDENTIFIER_REGEX="[A-Za-z_][A-Za-z\
0-9_'-]*",LOOKUP_PATH={scope:"symbol",match:new RegExp(`<${IDENTIFIER_REGEX}(/${IDENTIFIER_REGEX})*>`)},PATH_PIECE="[A-Za-z0-9_\\+\\.-]+",PATH={scope:"symbol",match:new RegExp(`(\\.\\.|\\.|~)?/(${PATH_PIECE})?(/${PATH_PIECE})*(?=[\\s;])`)},OPERATOR_WITHOUT_MINUS_REGEX=regex.either("==","=","\\+\\+","\\+","<=","<\\|","<",">=",">","->","//","/","!=","!","\\|\\|","\\|>","\\?","\\*","&&"),OPERATOR={scope:"operator",match:regex.concat(OPERATOR_WITHOUT_MINUS_REGEX,/(?!-)/),relevance:0},NUMBER={scope:"\
number",match:new RegExp(`${hljs.NUMBER_RE}(?!-)`),relevance:0},MINUS_OPERATOR={variants:[{scope:"operator",beforeMatch:/\s/,begin:/-(?!>)/},{begin:[new RegExp(`${hljs.NUMBER_RE}`),/-/,/(?!>)/],beginScope:{1:"number",2:"operator"}},{begin:[OPERATOR_WITHOUT_MINUS_REGEX,/-/,/(?!>)/],beginScope:{1:"operator",2:"operator"}}],relevance:0},ATTRS={beforeMatch:/(^|\{|;)\s*/,begin:new RegExp(`${IDENTIFIER_REGEX}(\\.${IDENTIFIER_REGEX})*\\s*=(?!=)`),returnBegin:!0,relevance:0,contains:[{scope:"attr",match:new RegExp(
`${IDENTIFIER_REGEX}(\\.${IDENTIFIER_REGEX})*(?=\\s*=)`),relevance:.2}]},NORMAL_ESCAPED_DOLLAR={scope:"char.escape",match:/\\\$/},INDENTED_ESCAPED_DOLLAR={scope:"char.escape",match:/''\$/},ANTIQUOTE={scope:"subst",begin:/\$\{/,end:/\}/,keywords:KEYWORDS2},ESCAPED_DOUBLEQUOTE={scope:"char.escape",match:/'''/},ESCAPED_LITERAL={scope:"char.escape",match:/\\(?!\$)./},STRING={scope:"string",variants:[{begin:"''",end:"''",contains:[INDENTED_ESCAPED_DOLLAR,ANTIQUOTE,ESCAPED_DOUBLEQUOTE,ESCAPED_LITERAL]},
{begin:'"',end:'"',contains:[NORMAL_ESCAPED_DOLLAR,ANTIQUOTE,ESCAPED_LITERAL]}]},FUNCTION_PARAMS={scope:"params",match:new RegExp(`${IDENTIFIER_REGEX}\\s*:(?=\\s)`)},EXPRESSIONS=[NUMBER,hljs.HASH_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.COMMENT(/\/\*\*(?!\/)/,/\*\//,{subLanguage:"markdown",relevance:0}),BUILTINS,STRING,LOOKUP_PATH,PATH,FUNCTION_PARAMS,ATTRS,MINUS_OPERATOR,OPERATOR];ANTIQUOTE.contains=EXPRESSIONS;const REPL=[{scope:"meta.prompt",match:/^nix-repl>(?=\s)/,relevance:10},{scope:"m\
eta",beforeMatch:/\s+/,begin:/:([a-z]+|\?)/}];return{name:"Nix",aliases:["nixos"],keywords:KEYWORDS2,contains:EXPRESSIONS.concat(REPL)}}return nix_1=nix2,nix_1}var nodeRepl_1,hasRequiredNodeRepl;function requireNodeRepl(){if(hasRequiredNodeRepl)return nodeRepl_1;hasRequiredNodeRepl=1;function nodeRepl2(hljs){return{name:"Node REPL",contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"javascript"}},variants:[{begin:/^>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}return nodeRepl_1=
nodeRepl2,nodeRepl_1}var nsis_1,hasRequiredNsis;function requireNsis(){if(hasRequiredNsis)return nsis_1;hasRequiredNsis=1;function nsis2(hljs){const regex=hljs.regex,LANGUAGE_CONSTANTS=["ADMINTOOLS","APPDATA","CDBURN_AREA","CMDLINE","COMMONFILES32","COMMONFILES64","COMMONFILES","COOKIES","DESKTOP","DOCUMENTS","EXEDIR","EXEFILE","EXEPATH","FAVORITES","FONTS","HISTORY","HWNDPARENT","INSTDIR","INTERNET_CACHE","LANGUAGE","LOCALAPPDATA","MUSIC","NETHOOD","OUTDIR","PICTURES","PLUGINSDIR","PRINTHOOD","\
PROFILE","PROGRAMFILES32","PROGRAMFILES64","PROGRAMFILES","QUICKLAUNCH","RECENT","RESOURCES_LOCALIZED","RESOURCES","SENDTO","SMPROGRAMS","SMSTARTUP","STARTMENU","SYSDIR","TEMP","TEMPLATES","VIDEOS","WINDIR"],PARAM_NAMES=["ARCHIVE","FILE_ATTRIBUTE_ARCHIVE","FILE_ATTRIBUTE_NORMAL","FILE_ATTRIBUTE_OFFLINE","FILE_ATTRIBUTE_READONLY","FILE_ATTRIBUTE_SYSTEM","FILE_ATTRIBUTE_TEMPORARY","HKCR","HKCU","HKDD","HKEY_CLASSES_ROOT","HKEY_CURRENT_CONFIG","HKEY_CURRENT_USER","HKEY_DYN_DATA","HKEY_LOCAL_MACHINE",
"HKEY_PERFORMANCE_DATA","HKEY_USERS","HKLM","HKPD","HKU","IDABORT","IDCANCEL","IDIGNORE","IDNO","IDOK","IDRETRY","IDYES","MB_ABORTRETRYIGNORE","MB_DEFBUTTON1","MB_DEFBUTTON2","MB_DEFBUTTON3","MB_DEFBUTTON4","MB_ICONEXCLAMATION","MB_ICONINFORMATION","MB_ICONQUESTION","MB_ICONSTOP","MB_OK","MB_OKCANCEL","MB_RETRYCANCEL","MB_RIGHT","MB_RTLREADING","MB_SETFOREGROUND","MB_TOPMOST","MB_USERICON","MB_YESNO","NORMAL","OFFLINE","READONLY","SHCTX","SHELL_CONTEXT","SYSTEM|TEMPORARY"],COMPILER_FLAGS=["addin\
cludedir","addplugindir","appendfile","assert","cd","define","delfile","echo","else","endif","error","execute","finalize","getdllversion","gettlbversion","if","ifdef","ifmacrodef","ifmacrondef","ifndef","include","insertmacro","macro","macroend","makensis","packhdr","searchparse","searchreplace","system","tempfile","undef","uninstfinalize","verbose","warning"],CONSTANTS={className:"variable.constant",begin:regex.concat(/\$/,regex.either(...LANGUAGE_CONSTANTS))},DEFINES={className:"variable",begin:/\$+\{[\!\w.:-]+\}/},
VARIABLES={className:"variable",begin:/\$+\w[\w\.]*/,illegal:/\(\)\{\}/},LANGUAGES={className:"variable",begin:/\$+\([\w^.:!-]+\)/},PARAMETERS={className:"params",begin:regex.either(...PARAM_NAMES)},COMPILER={className:"keyword",begin:regex.concat(/!/,regex.either(...COMPILER_FLAGS))},ESCAPE_CHARS={className:"char.escape",begin:/\$(\\[nrt]|\$)/},PLUGINS={className:"title.function",begin:/\w+::\w+/},STRING={className:"string",variants:[{begin:'"',end:'"'},{begin:"'",end:"'"},{begin:"`",end:"`"}],
illegal:/\n/,contains:[ESCAPE_CHARS,CONSTANTS,DEFINES,VARIABLES,LANGUAGES]},KEYWORDS2=["Abort","AddBrandingImage","AddSize","AllowRootDirInstall","AllowSkipFiles","AutoCloseWindow","BGFont","BGGradient","BrandingText","BringToFront","Call","CallInstDLL","Caption","ChangeUI","CheckBitmap","ClearErrors","CompletedText","ComponentText","CopyFiles","CRCCheck","CreateDirectory","CreateFont","CreateShortCut","Delete","DeleteINISec","DeleteINIStr","DeleteRegKey","DeleteRegValue","DetailPrint","DetailsB\
uttonText","DirText","DirVar","DirVerify","EnableWindow","EnumRegKey","EnumRegValue","Exch","Exec","ExecShell","ExecShellWait","ExecWait","ExpandEnvStrings","File","FileBufSize","FileClose","FileErrorText","FileOpen","FileRead","FileReadByte","FileReadUTF16LE","FileReadWord","FileWriteUTF16LE","FileSeek","FileWrite","FileWriteByte","FileWriteWord","FindClose","FindFirst","FindNext","FindWindow","FlushINI","GetCurInstType","GetCurrentAddress","GetDlgItem","GetDLLVersion","GetDLLVersionLocal","Get\
ErrorLevel","GetFileTime","GetFileTimeLocal","GetFullPathName","GetFunctionAddress","GetInstDirError","GetKnownFolderPath","GetLabelAddress","GetTempFileName","GetWinVer","Goto","HideWindow","Icon","IfAbort","IfErrors","IfFileExists","IfRebootFlag","IfRtlLanguage","IfShellVarContextAll","IfSilent","InitPluginsDir","InstallButtonText","InstallColors","InstallDir","InstallDirRegKey","InstProgressFlags","InstType","InstTypeGetText","InstTypeSetText","Int64Cmp","Int64CmpU","Int64Fmt","IntCmp","IntCm\
pU","IntFmt","IntOp","IntPtrCmp","IntPtrCmpU","IntPtrOp","IsWindow","LangString","LicenseBkColor","LicenseData","LicenseForceSelection","LicenseLangString","LicenseText","LoadAndSetImage","LoadLanguageFile","LockWindow","LogSet","LogText","ManifestDPIAware","ManifestLongPathAware","ManifestMaxVersionTested","ManifestSupportedOS","MessageBox","MiscButtonText","Name|0","Nop","OutFile","Page","PageCallbacks","PEAddResource","PEDllCharacteristics","PERemoveResource","PESubsysVer","Pop","Push","Quit",
"ReadEnvStr","ReadINIStr","ReadRegDWORD","ReadRegStr","Reboot","RegDLL","Rename","RequestExecutionLevel","ReserveFile","Return","RMDir","SearchPath","SectionGetFlags","SectionGetInstTypes","SectionGetSize","SectionGetText","SectionIn","SectionSetFlags","SectionSetInstTypes","SectionSetSize","SectionSetText","SendMessage","SetAutoClose","SetBrandingImage","SetCompress","SetCompressor","SetCompressorDictSize","SetCtlColors","SetCurInstType","SetDatablockOptimize","SetDateSave","SetDetailsPrint","S\
etDetailsView","SetErrorLevel","SetErrors","SetFileAttributes","SetFont","SetOutPath","SetOverwrite","SetRebootFlag","SetRegView","SetShellVarContext","SetSilent","ShowInstDetails","ShowUninstDetails","ShowWindow","SilentInstall","SilentUnInstall","Sleep","SpaceTexts","StrCmp","StrCmpS","StrCpy","StrLen","SubCaption","Unicode","UninstallButtonText","UninstallCaption","UninstallIcon","UninstallSubCaption","UninstallText","UninstPage","UnRegDLL","Var","VIAddVersionKey","VIFileVersion","VIProductVe\
rsion","WindowIcon","WriteINIStr","WriteRegBin","WriteRegDWORD","WriteRegExpandStr","WriteRegMultiStr","WriteRegNone","WriteRegStr","WriteUninstaller","XPStyle"],LITERALS2=["admin","all","auto","both","bottom","bzip2","colored","components","current","custom","directory","false","force","hide","highest","ifdiff","ifnewer","instfiles","lastused","leave","left","license","listonly","lzma","nevershow","none","normal","notset","off","on","open","print","right","show","silent","silentlog","smooth","t\
extonly","top","true","try","un.components","un.custom","un.directory","un.instfiles","un.license","uninstConfirm","user","Win10","Win7","Win8","WinVista","zlib"],FUNCTION_DEFINITION={match:[/Function/,/\s+/,regex.concat(/(\.)?/,hljs.IDENT_RE)],scope:{1:"keyword",3:"title.function"}},VARIABLE_DEFINITION={match:[/Var/,/\s+/,/(?:\/GLOBAL\s+)?/,/[A-Za-z][\w.]*/],scope:{1:"keyword",3:"params",4:"variable"}};return{name:"NSIS",case_insensitive:!0,keywords:{keyword:KEYWORDS2,literal:LITERALS2},contains:[
hljs.HASH_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.COMMENT(";","$",{relevance:0}),VARIABLE_DEFINITION,FUNCTION_DEFINITION,{beginKeywords:"Function PageEx Section SectionGroup FunctionEnd SectionEnd"},STRING,COMPILER,DEFINES,VARIABLES,LANGUAGES,PARAMETERS,PLUGINS,hljs.NUMBER_MODE]}}return nsis_1=nsis2,nsis_1}var objectivec_1,hasRequiredObjectivec;function requireObjectivec(){if(hasRequiredObjectivec)return objectivec_1;hasRequiredObjectivec=1;function objectivec2(hljs){const API_CLASS={className:"\
built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},IDENTIFIER_RE=/[a-zA-Z@][a-zA-Z0-9_]*/,KEYWORDS2={"variable.language":["this","super"],$pattern:IDENTIFIER_RE,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized",
"id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__k\
indof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME",
"NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},CLASS_KEYWORDS={$pattern:IDENTIFIER_RE,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"O\
bjective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:KEYWORDS2,illegal:"</",contains:[API_CLASS,hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.C_NUMBER_MODE,hljs.QUOTE_STRING_MODE,hljs.APOS_STRING_MODE,{className:"string",variants:[{begin:'@"',end:'"',illegal:"\\n",contains:[hljs.BACKSLASH_ESCAPE]}]},{className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma ifdef ifndef include"},contains:[{begin:/\\\n/,
relevance:0},hljs.inherit(hljs.QUOTE_STRING_MODE,{className:"string"}),{className:"string",begin:/<.*?>/,end:/$/,illegal:"\\n"},hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+CLASS_KEYWORDS.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:CLASS_KEYWORDS,contains:[hljs.UNDERSCORE_TITLE_MODE]},{begin:"\\."+hljs.UNDERSCORE_IDENT_RE,relevance:0}]}}return objectivec_1=objectivec2,objectivec_1}var ocaml_1,hasRequiredOcaml;function requireOcaml(){if(hasRequiredOcaml)
return ocaml_1;hasRequiredOcaml=1;function ocaml2(hljs){return{name:"OCaml",aliases:["ml"],keywords:{$pattern:"[a-z_]\\w*!?",keyword:"and as assert asr begin class constraint do done downto else end exception external for fun function functor if in include inherit! inherit initializer land lazy let lor lsl lsr lxor match method!|10 method mod module mutable new object of open! open or private rec sig struct then to try type val! val virtual when while with parser value",built_in:"array bool byte\
s char exn|5 float int int32 int64 list lazy_t|5 nativeint|5 string unit in_channel out_channel ref",literal:"true false"},illegal:/\/\/|>>/,contains:[{className:"literal",begin:"\\[(\\|\\|)?\\]|\\(\\)",relevance:0},hljs.COMMENT("\\(\\*","\\*\\)",{contains:["self"]}),{className:"symbol",begin:"'[A-Za-z_](?!')[\\w']*"},{className:"type",begin:"`[A-Z][\\w']*"},{className:"type",begin:"\\b[A-Z][\\w']*",relevance:0},{begin:"[a-z_]\\w*'[\\w']*",relevance:0},hljs.inherit(hljs.APOS_STRING_MODE,{className:"\
string",relevance:0}),hljs.inherit(hljs.QUOTE_STRING_MODE,{illegal:null}),{className:"number",begin:"\\b(0[xX][a-fA-F0-9_]+[Lln]?|0[oO][0-7_]+[Lln]?|0[bB][01_]+[Lln]?|[0-9][0-9_]*([Lln]|(\\.[0-9_]*)?([eE][-+]?[0-9_]+)?)?)",relevance:0},{begin:/->/}]}}return ocaml_1=ocaml2,ocaml_1}var openscad_1,hasRequiredOpenscad;function requireOpenscad(){if(hasRequiredOpenscad)return openscad_1;hasRequiredOpenscad=1;function openscad2(hljs){const SPECIAL_VARS={className:"keyword",begin:"\\$(f[asn]|t|vp[rtd]|ch\
ildren)"},LITERALS2={className:"literal",begin:"false|true|PI|undef"},NUMBERS={className:"number",begin:"\\b\\d+(\\.\\d+)?(e-?\\d+)?",relevance:0},STRING=hljs.inherit(hljs.QUOTE_STRING_MODE,{illegal:null}),PREPRO={className:"meta",keywords:{keyword:"include use"},begin:"include|use <",end:">"},PARAMS={className:"params",begin:"\\(",end:"\\)",contains:["self",NUMBERS,STRING,SPECIAL_VARS,LITERALS2]},MODIFIERS={begin:"[*!#%]",relevance:0},FUNCTIONS={className:"function",beginKeywords:"module functi\
on",end:/=|\{/,contains:[PARAMS,hljs.UNDERSCORE_TITLE_MODE]};return{name:"OpenSCAD",aliases:["scad"],keywords:{keyword:"function module include use for intersection_for if else \\%",literal:"false true PI undef",built_in:"circle square polygon text sphere cube cylinder polyhedron translate rotate scale resize mirror multmatrix color offset hull minkowski union difference intersection abs sign sin cos tan acos asin atan atan2 floor round ceil ln log pow sqrt exp rands min max concat lookup str ch\
r search version version_num norm cross parent_module echo import import_dxf dxf_linear_extrude linear_extrude rotate_extrude surface projection render children dxf_cross dxf_dim let assign"},contains:[hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,NUMBERS,PREPRO,STRING,SPECIAL_VARS,MODIFIERS,FUNCTIONS]}}return openscad_1=openscad2,openscad_1}var oxygene_1,hasRequiredOxygene;function requireOxygene(){if(hasRequiredOxygene)return oxygene_1;hasRequiredOxygene=1;function oxygene2(hljs){const OXYGENE_KEYWORDS={
$pattern:/\.?\w+/,keyword:"abstract add and array as asc aspect assembly async begin break block by case class concat const copy constructor continue create default delegate desc distinct div do downto dynamic each else empty end ensure enum equals event except exit extension external false final finalize finalizer finally flags for forward from function future global group has if implementation implements implies in index inherited inline interface into invariants is iterator join locked lockin\
g loop matching method mod module namespace nested new nil not notify nullable of old on operator or order out override parallel params partial pinned private procedure property protected public queryable raise read readonly record reintroduce remove repeat require result reverse sealed select self sequence set shl shr skip static step soft take then to true try tuple type union unit unsafe until uses using var virtual raises volatile where while with write xor yield await mapped deprecated stdc\
all cdecl pascal register safecall overload library platform reference packed strict published autoreleasepool selector strong weak unretained"},CURLY_COMMENT=hljs.COMMENT(/\{/,/\}/,{relevance:0}),PAREN_COMMENT=hljs.COMMENT("\\(\\*","\\*\\)",{relevance:10}),STRING={className:"string",begin:"'",end:"'",contains:[{begin:"''"}]},CHAR_STRING={className:"string",begin:"(#\\d+)+"},FUNCTION={beginKeywords:"function constructor destructor procedure method",end:"[:;]",keywords:"function constructor|10 de\
structor|10 procedure|10 method|10",contains:[hljs.inherit(hljs.TITLE_MODE,{scope:"title.function"}),{className:"params",begin:"\\(",end:"\\)",keywords:OXYGENE_KEYWORDS,contains:[STRING,CHAR_STRING]},CURLY_COMMENT,PAREN_COMMENT]},SEMICOLON={scope:"punctuation",match:/;/,relevance:0};return{name:"Oxygene",case_insensitive:!0,keywords:OXYGENE_KEYWORDS,illegal:'("|\\$[G-Zg-z]|\\/\\*|</|=>|->)',contains:[CURLY_COMMENT,PAREN_COMMENT,hljs.C_LINE_COMMENT_MODE,STRING,CHAR_STRING,hljs.NUMBER_MODE,FUNCTION,
SEMICOLON]}}return oxygene_1=oxygene2,oxygene_1}var parser3_1,hasRequiredParser3;function requireParser3(){if(hasRequiredParser3)return parser3_1;hasRequiredParser3=1;function parser32(hljs){const CURLY_SUBCOMMENT=hljs.COMMENT(/\{/,/\}/,{contains:["self"]});return{name:"Parser3",subLanguage:"xml",relevance:0,contains:[hljs.COMMENT("^#","$"),hljs.COMMENT(/\^rem\{/,/\}/,{relevance:10,contains:[CURLY_SUBCOMMENT]}),{className:"meta",begin:"^@(?:BASE|USE|CLASS|OPTIONS)$",relevance:10},{className:"tit\
le",begin:"@[\\w\\-]+\\[[\\w^;\\-]*\\](?:\\[[\\w^;\\-]*\\])?(?:.*)$"},{className:"variable",begin:/\$\{?[\w\-.:]+\}?/},{className:"keyword",begin:/\^[\w\-.:]+/},{className:"number",begin:"\\^#[0-9a-fA-F]+"},hljs.C_NUMBER_MODE]}}return parser3_1=parser32,parser3_1}var pf_1,hasRequiredPf;function requirePf(){if(hasRequiredPf)return pf_1;hasRequiredPf=1;function pf2(hljs){const MACRO={className:"variable",begin:/\$[\w\d#@][\w\d_]*/,relevance:0},TABLE={className:"variable",begin:/<(?!\/)/,end:/>/};return{
name:"Packet Filter config",aliases:["pf.conf"],keywords:{$pattern:/[a-z0-9_<>-]+/,built_in:"block match pass load anchor|5 antispoof|10 set table",keyword:"in out log quick on rdomain inet inet6 proto from port os to route allow-opts divert-packet divert-reply divert-to flags group icmp-type icmp6-type label once probability recieved-on rtable prio queue tos tag tagged user keep fragment for os drop af-to|10 binat-to|10 nat-to|10 rdr-to|10 bitmask least-stats random round-robin source-hash stat\
ic-port dup-to reply-to route-to parent bandwidth default min max qlimit block-policy debug fingerprints hostid limit loginterface optimization reassemble ruleset-optimization basic none profile skip state-defaults state-policy timeout const counters persist no modulate synproxy state|5 floating if-bound no-sync pflow|10 sloppy source-track global rule max-src-nodes max-src-states max-src-conn max-src-conn-rate overload flush scrub|5 max-mss min-ttl no-df|10 random-id",literal:"all any no-route \
self urpf-failed egress|5 unknown"},contains:[hljs.HASH_COMMENT_MODE,hljs.NUMBER_MODE,hljs.QUOTE_STRING_MODE,MACRO,TABLE]}}return pf_1=pf2,pf_1}var pgsql_1,hasRequiredPgsql;function requirePgsql(){if(hasRequiredPgsql)return pgsql_1;hasRequiredPgsql=1;function pgsql2(hljs){const COMMENT_MODE=hljs.COMMENT("--","$"),UNQUOTED_IDENT="[a-zA-Z_][a-zA-Z_0-9$]*",DOLLAR_STRING="\\$([a-zA-Z_]?|[a-zA-Z_][a-zA-Z_0-9]*)\\$",LABEL="<<\\s*"+UNQUOTED_IDENT+"\\s*>>",SQL_KW="ABORT ALTER ANALYZE BEGIN CALL CHECKPOI\
NT|10 CLOSE CLUSTER COMMENT COMMIT COPY CREATE DEALLOCATE DECLARE DELETE DISCARD DO DROP END EXECUTE EXPLAIN FETCH GRANT IMPORT INSERT LISTEN LOAD LOCK MOVE NOTIFY PREPARE REASSIGN|10 REFRESH REINDEX RELEASE RESET REVOKE ROLLBACK SAVEPOINT SECURITY SELECT SET SHOW START TRUNCATE UNLISTEN|10 UPDATE VACUUM|10 VALUES AGGREGATE COLLATION CONVERSION|10 DATABASE DEFAULT PRIVILEGES DOMAIN TRIGGER EXTENSION FOREIGN WRAPPER|10 TABLE FUNCTION GROUP LANGUAGE LARGE OBJECT MATERIALIZED VIEW OPERATOR CLASS FA\
MILY POLICY PUBLICATION|10 ROLE RULE SCHEMA SEQUENCE SERVER STATISTICS SUBSCRIPTION SYSTEM TABLESPACE CONFIGURATION DICTIONARY PARSER TEMPLATE TYPE USER MAPPING PREPARED ACCESS METHOD CAST AS TRANSFORM TRANSACTION OWNED TO INTO SESSION AUTHORIZATION INDEX PROCEDURE ASSERTION ALL ANALYSE AND ANY ARRAY ASC ASYMMETRIC|10 BOTH CASE CHECK COLLATE COLUMN CONCURRENTLY|10 CONSTRAINT CROSS DEFERRABLE RANGE DESC DISTINCT ELSE EXCEPT FOR FREEZE|10 FROM FULL HAVING ILIKE IN INITIALLY INNER INTERSECT IS ISNU\
LL JOIN LATERAL LEADING LIKE LIMIT NATURAL NOT NOTNULL NULL OFFSET ON ONLY OR ORDER OUTER OVERLAPS PLACING PRIMARY REFERENCES RETURNING SIMILAR SOME SYMMETRIC TABLESAMPLE THEN TRAILING UNION UNIQUE USING VARIADIC|10 VERBOSE WHEN WHERE WINDOW WITH BY RETURNS INOUT OUT SETOF|10 IF STRICT CURRENT CONTINUE OWNER LOCATION OVER PARTITION WITHIN BETWEEN ESCAPE EXTERNAL INVOKER DEFINER WORK RENAME VERSION CONNECTION CONNECT TABLES TEMP TEMPORARY FUNCTIONS SEQUENCES TYPES SCHEMAS OPTION CASCADE RESTRICT \
ADD ADMIN EXISTS VALID VALIDATE ENABLE DISABLE REPLICA|10 ALWAYS PASSING COLUMNS PATH REF VALUE OVERRIDING IMMUTABLE STABLE VOLATILE BEFORE AFTER EACH ROW PROCEDURAL ROUTINE NO HANDLER VALIDATOR OPTIONS STORAGE OIDS|10 WITHOUT INHERIT DEPENDS CALLED INPUT LEAKPROOF|10 COST ROWS NOWAIT SEARCH UNTIL ENCRYPTED|10 PASSWORD CONFLICT|10 INSTEAD INHERITS CHARACTERISTICS WRITE CURSOR ALSO STATEMENT SHARE EXCLUSIVE INLINE ISOLATION REPEATABLE READ COMMITTED SERIALIZABLE UNCOMMITTED LOCAL GLOBAL SQL PROCE\
DURES RECURSIVE SNAPSHOT ROLLUP CUBE TRUSTED|10 INCLUDE FOLLOWING PRECEDING UNBOUNDED RANGE GROUPS UNENCRYPTED|10 SYSID FORMAT DELIMITER HEADER QUOTE ENCODING FILTER OFF FORCE_QUOTE FORCE_NOT_NULL FORCE_NULL COSTS BUFFERS TIMING SUMMARY DISABLE_PAGE_SKIPPING RESTART CYCLE GENERATED IDENTITY DEFERRED IMMEDIATE LEVEL LOGGED UNLOGGED OF NOTHING NONE EXCLUDE ATTRIBUTE USAGE ROUTINES TRUE FALSE NAN INFINITY ",ROLE_ATTRS="SUPERUSER NOSUPERUSER CREATEDB NOCREATEDB CREATEROLE NOCREATEROLE INHERIT NOINHE\
RIT LOGIN NOLOGIN REPLICATION NOREPLICATION BYPASSRLS NOBYPASSRLS ",PLPGSQL_KW="ALIAS BEGIN CONSTANT DECLARE END EXCEPTION RETURN PERFORM|10 RAISE GET DIAGNOSTICS STACKED|10 FOREACH LOOP ELSIF EXIT WHILE REVERSE SLICE DEBUG LOG INFO NOTICE WARNING ASSERT OPEN ",TYPES2="BIGINT INT8 BIGSERIAL SERIAL8 BIT VARYING VARBIT BOOLEAN BOOL BOX BYTEA CHARACTER CHAR VARCHAR CIDR CIRCLE DATE DOUBLE PRECISION FLOAT8 FLOAT INET INTEGER INT INT4 INTERVAL JSON JSONB LINE LSEG|10 MACADDR MACADDR8 MONEY NUMERIC DE\
C DECIMAL PATH POINT POLYGON REAL FLOAT4 SMALLINT INT2 SMALLSERIAL|10 SERIAL2|10 SERIAL|10 SERIAL4|10 TEXT TIME ZONE TIMETZ|10 TIMESTAMP TIMESTAMPTZ|10 TSQUERY|10 TSVECTOR|10 TXID_SNAPSHOT|10 UUID XML NATIONAL NCHAR INT4RANGE|10 INT8RANGE|10 NUMRANGE|10 TSRANGE|10 TSTZRANGE|10 DATERANGE|10 ANYELEMENT ANYARRAY ANYNONARRAY ANYENUM ANYRANGE CSTRING INTERNAL RECORD PG_DDL_COMMAND VOID UNKNOWN OPAQUE REFCURSOR NAME OID REGPROC|10 REGPROCEDURE|10 REGOPER|10 REGOPERATOR|10 REGCLASS|10 REGTYPE|10 REGROL\
E|10 REGNAMESPACE|10 REGCONFIG|10 REGDICTIONARY|10 ",TYPES_RE=TYPES2.trim().split(" ").map(function(val){return val.split("|")[0]}).join("|"),SQL_BI="CURRENT_TIME CURRENT_TIMESTAMP CURRENT_USER CURRENT_CATALOG|10 CURRENT_DATE LOCALTIME LOCALTIMESTAMP CURRENT_ROLE|10 CURRENT_SCHEMA|10 SESSION_USER PUBLIC ",PLPGSQL_BI="FOUND NEW OLD TG_NAME|10 TG_WHEN|10 TG_LEVEL|10 TG_OP|10 TG_RELID|10 TG_RELNAME|10 TG_TABLE_NAME|10 TG_TABLE_SCHEMA|10 TG_NARGS|10 TG_ARGV|10 TG_EVENT|10 TG_TAG|10 ROW_COUNT RESULT_\
OID|10 PG_CONTEXT|10 RETURNED_SQLSTATE COLUMN_NAME CONSTRAINT_NAME PG_DATATYPE_NAME|10 MESSAGE_TEXT TABLE_NAME SCHEMA_NAME PG_EXCEPTION_DETAIL|10 PG_EXCEPTION_HINT|10 PG_EXCEPTION_CONTEXT|10 ",PLPGSQL_EXCEPTIONS="SQLSTATE SQLERRM|10 SUCCESSFUL_COMPLETION WARNING DYNAMIC_RESULT_SETS_RETURNED IMPLICIT_ZERO_BIT_PADDING NULL_VALUE_ELIMINATED_IN_SET_FUNCTION PRIVILEGE_NOT_GRANTED PRIVILEGE_NOT_REVOKED STRING_DATA_RIGHT_TRUNCATION DEPRECATED_FEATURE NO_DATA NO_ADDITIONAL_DYNAMIC_RESULT_SETS_RETURNED S\
QL_STATEMENT_NOT_YET_COMPLETE CONNECTION_EXCEPTION CONNECTION_DOES_NOT_EXIST CONNECTION_FAILURE SQLCLIENT_UNABLE_TO_ESTABLISH_SQLCONNECTION SQLSERVER_REJECTED_ESTABLISHMENT_OF_SQLCONNECTION TRANSACTION_RESOLUTION_UNKNOWN PROTOCOL_VIOLATION TRIGGERED_ACTION_EXCEPTION FEATURE_NOT_SUPPORTED INVALID_TRANSACTION_INITIATION LOCATOR_EXCEPTION INVALID_LOCATOR_SPECIFICATION INVALID_GRANTOR INVALID_GRANT_OPERATION INVALID_ROLE_SPECIFICATION DIAGNOSTICS_EXCEPTION STACKED_DIAGNOSTICS_ACCESSED_WITHOUT_ACTIVE\
_HANDLER CASE_NOT_FOUND CARDINALITY_VIOLATION DATA_EXCEPTION ARRAY_SUBSCRIPT_ERROR CHARACTER_NOT_IN_REPERTOIRE DATETIME_FIELD_OVERFLOW DIVISION_BY_ZERO ERROR_IN_ASSIGNMENT ESCAPE_CHARACTER_CONFLICT INDICATOR_OVERFLOW INTERVAL_FIELD_OVERFLOW INVALID_ARGUMENT_FOR_LOGARITHM INVALID_ARGUMENT_FOR_NTILE_FUNCTION INVALID_ARGUMENT_FOR_NTH_VALUE_FUNCTION INVALID_ARGUMENT_FOR_POWER_FUNCTION INVALID_ARGUMENT_FOR_WIDTH_BUCKET_FUNCTION INVALID_CHARACTER_VALUE_FOR_CAST INVALID_DATETIME_FORMAT INVALID_ESCAPE_C\
HARACTER INVALID_ESCAPE_OCTET INVALID_ESCAPE_SEQUENCE NONSTANDARD_USE_OF_ESCAPE_CHARACTER INVALID_INDICATOR_PARAMETER_VALUE INVALID_PARAMETER_VALUE INVALID_REGULAR_EXPRESSION INVALID_ROW_COUNT_IN_LIMIT_CLAUSE INVALID_ROW_COUNT_IN_RESULT_OFFSET_CLAUSE INVALID_TABLESAMPLE_ARGUMENT INVALID_TABLESAMPLE_REPEAT INVALID_TIME_ZONE_DISPLACEMENT_VALUE INVALID_USE_OF_ESCAPE_CHARACTER MOST_SPECIFIC_TYPE_MISMATCH NULL_VALUE_NOT_ALLOWED NULL_VALUE_NO_INDICATOR_PARAMETER NUMERIC_VALUE_OUT_OF_RANGE SEQUENCE_GEN\
ERATOR_LIMIT_EXCEEDED STRING_DATA_LENGTH_MISMATCH STRING_DATA_RIGHT_TRUNCATION SUBSTRING_ERROR TRIM_ERROR UNTERMINATED_C_STRING ZERO_LENGTH_CHARACTER_STRING FLOATING_POINT_EXCEPTION INVALID_TEXT_REPRESENTATION INVALID_BINARY_REPRESENTATION BAD_COPY_FILE_FORMAT UNTRANSLATABLE_CHARACTER NOT_AN_XML_DOCUMENT INVALID_XML_DOCUMENT INVALID_XML_CONTENT INVALID_XML_COMMENT INVALID_XML_PROCESSING_INSTRUCTION INTEGRITY_CONSTRAINT_VIOLATION RESTRICT_VIOLATION NOT_NULL_VIOLATION FOREIGN_KEY_VIOLATION UNIQUE_\
VIOLATION CHECK_VIOLATION EXCLUSION_VIOLATION INVALID_CURSOR_STATE INVALID_TRANSACTION_STATE ACTIVE_SQL_TRANSACTION BRANCH_TRANSACTION_ALREADY_ACTIVE HELD_CURSOR_REQUIRES_SAME_ISOLATION_LEVEL INAPPROPRIATE_ACCESS_MODE_FOR_BRANCH_TRANSACTION INAPPROPRIATE_ISOLATION_LEVEL_FOR_BRANCH_TRANSACTION NO_ACTIVE_SQL_TRANSACTION_FOR_BRANCH_TRANSACTION READ_ONLY_SQL_TRANSACTION SCHEMA_AND_DATA_STATEMENT_MIXING_NOT_SUPPORTED NO_ACTIVE_SQL_TRANSACTION IN_FAILED_SQL_TRANSACTION IDLE_IN_TRANSACTION_SESSION_TIME\
OUT INVALID_SQL_STATEMENT_NAME TRIGGERED_DATA_CHANGE_VIOLATION INVALID_AUTHORIZATION_SPECIFICATION INVALID_PASSWORD DEPENDENT_PRIVILEGE_DESCRIPTORS_STILL_EXIST DEPENDENT_OBJECTS_STILL_EXIST INVALID_TRANSACTION_TERMINATION SQL_ROUTINE_EXCEPTION FUNCTION_EXECUTED_NO_RETURN_STATEMENT MODIFYING_SQL_DATA_NOT_PERMITTED PROHIBITED_SQL_STATEMENT_ATTEMPTED READING_SQL_DATA_NOT_PERMITTED INVALID_CURSOR_NAME EXTERNAL_ROUTINE_EXCEPTION CONTAINING_SQL_NOT_PERMITTED MODIFYING_SQL_DATA_NOT_PERMITTED PROHIBITED\
_SQL_STATEMENT_ATTEMPTED READING_SQL_DATA_NOT_PERMITTED EXTERNAL_ROUTINE_INVOCATION_EXCEPTION INVALID_SQLSTATE_RETURNED NULL_VALUE_NOT_ALLOWED TRIGGER_PROTOCOL_VIOLATED SRF_PROTOCOL_VIOLATED EVENT_TRIGGER_PROTOCOL_VIOLATED SAVEPOINT_EXCEPTION INVALID_SAVEPOINT_SPECIFICATION INVALID_CATALOG_NAME INVALID_SCHEMA_NAME TRANSACTION_ROLLBACK TRANSACTION_INTEGRITY_CONSTRAINT_VIOLATION SERIALIZATION_FAILURE STATEMENT_COMPLETION_UNKNOWN DEADLOCK_DETECTED SYNTAX_ERROR_OR_ACCESS_RULE_VIOLATION SYNTAX_ERROR \
INSUFFICIENT_PRIVILEGE CANNOT_COERCE GROUPING_ERROR WINDOWING_ERROR INVALID_RECURSION INVALID_FOREIGN_KEY INVALID_NAME NAME_TOO_LONG RESERVED_NAME DATATYPE_MISMATCH INDETERMINATE_DATATYPE COLLATION_MISMATCH INDETERMINATE_COLLATION WRONG_OBJECT_TYPE GENERATED_ALWAYS UNDEFINED_COLUMN UNDEFINED_FUNCTION UNDEFINED_TABLE UNDEFINED_PARAMETER UNDEFINED_OBJECT DUPLICATE_COLUMN DUPLICATE_CURSOR DUPLICATE_DATABASE DUPLICATE_FUNCTION DUPLICATE_PREPARED_STATEMENT DUPLICATE_SCHEMA DUPLICATE_TABLE DUPLICATE_A\
LIAS DUPLICATE_OBJECT AMBIGUOUS_COLUMN AMBIGUOUS_FUNCTION AMBIGUOUS_PARAMETER AMBIGUOUS_ALIAS INVALID_COLUMN_REFERENCE INVALID_COLUMN_DEFINITION INVALID_CURSOR_DEFINITION INVALID_DATABASE_DEFINITION INVALID_FUNCTION_DEFINITION INVALID_PREPARED_STATEMENT_DEFINITION INVALID_SCHEMA_DEFINITION INVALID_TABLE_DEFINITION INVALID_OBJECT_DEFINITION WITH_CHECK_OPTION_VIOLATION INSUFFICIENT_RESOURCES DISK_FULL OUT_OF_MEMORY TOO_MANY_CONNECTIONS CONFIGURATION_LIMIT_EXCEEDED PROGRAM_LIMIT_EXCEEDED STATEMENT_\
TOO_COMPLEX TOO_MANY_COLUMNS TOO_MANY_ARGUMENTS OBJECT_NOT_IN_PREREQUISITE_STATE OBJECT_IN_USE CANT_CHANGE_RUNTIME_PARAM LOCK_NOT_AVAILABLE OPERATOR_INTERVENTION QUERY_CANCELED ADMIN_SHUTDOWN CRASH_SHUTDOWN CANNOT_CONNECT_NOW DATABASE_DROPPED SYSTEM_ERROR IO_ERROR UNDEFINED_FILE DUPLICATE_FILE SNAPSHOT_TOO_OLD CONFIG_FILE_ERROR LOCK_FILE_EXISTS FDW_ERROR FDW_COLUMN_NAME_NOT_FOUND FDW_DYNAMIC_PARAMETER_VALUE_NEEDED FDW_FUNCTION_SEQUENCE_ERROR FDW_INCONSISTENT_DESCRIPTOR_INFORMATION FDW_INVALID_AT\
TRIBUTE_VALUE FDW_INVALID_COLUMN_NAME FDW_INVALID_COLUMN_NUMBER FDW_INVALID_DATA_TYPE FDW_INVALID_DATA_TYPE_DESCRIPTORS FDW_INVALID_DESCRIPTOR_FIELD_IDENTIFIER FDW_INVALID_HANDLE FDW_INVALID_OPTION_INDEX FDW_INVALID_OPTION_NAME FDW_INVALID_STRING_LENGTH_OR_BUFFER_LENGTH FDW_INVALID_STRING_FORMAT FDW_INVALID_USE_OF_NULL_POINTER FDW_TOO_MANY_HANDLES FDW_OUT_OF_MEMORY FDW_NO_SCHEMAS FDW_OPTION_NAME_NOT_FOUND FDW_REPLY_HANDLE FDW_SCHEMA_NOT_FOUND FDW_TABLE_NOT_FOUND FDW_UNABLE_TO_CREATE_EXECUTION FD\
W_UNABLE_TO_CREATE_REPLY FDW_UNABLE_TO_ESTABLISH_CONNECTION PLPGSQL_ERROR RAISE_EXCEPTION NO_DATA_FOUND TOO_MANY_ROWS ASSERT_FAILURE INTERNAL_ERROR DATA_CORRUPTED INDEX_CORRUPTED ",FUNCTIONS_RE="ARRAY_AGG AVG BIT_AND BIT_OR BOOL_AND BOOL_OR COUNT EVERY JSON_AGG JSONB_AGG JSON_OBJECT_AGG JSONB_OBJECT_AGG MAX MIN MODE STRING_AGG SUM XMLAGG CORR COVAR_POP COVAR_SAMP REGR_AVGX REGR_AVGY REGR_COUNT REGR_INTERCEPT REGR_R2 REGR_SLOPE REGR_SXX REGR_SXY REGR_SYY STDDEV STDDEV_POP STDDEV_SAMP VARIANCE VAR\
_POP VAR_SAMP PERCENTILE_CONT PERCENTILE_DISC ROW_NUMBER RANK DENSE_RANK PERCENT_RANK CUME_DIST NTILE LAG LEAD FIRST_VALUE LAST_VALUE NTH_VALUE NUM_NONNULLS NUM_NULLS ABS CBRT CEIL CEILING DEGREES DIV EXP FLOOR LN LOG MOD PI POWER RADIANS ROUND SCALE SIGN SQRT TRUNC WIDTH_BUCKET RANDOM SETSEED ACOS ACOSD ASIN ASIND ATAN ATAND ATAN2 ATAN2D COS COSD COT COTD SIN SIND TAN TAND BIT_LENGTH CHAR_LENGTH CHARACTER_LENGTH LOWER OCTET_LENGTH OVERLAY POSITION SUBSTRING TREAT TRIM UPPER ASCII BTRIM CHR CONC\
AT CONCAT_WS CONVERT CONVERT_FROM CONVERT_TO DECODE ENCODE INITCAP LEFT LENGTH LPAD LTRIM MD5 PARSE_IDENT PG_CLIENT_ENCODING QUOTE_IDENT|10 QUOTE_LITERAL|10 QUOTE_NULLABLE|10 REGEXP_MATCH REGEXP_MATCHES REGEXP_REPLACE REGEXP_SPLIT_TO_ARRAY REGEXP_SPLIT_TO_TABLE REPEAT REPLACE REVERSE RIGHT RPAD RTRIM SPLIT_PART STRPOS SUBSTR TO_ASCII TO_HEX TRANSLATE OCTET_LENGTH GET_BIT GET_BYTE SET_BIT SET_BYTE TO_CHAR TO_DATE TO_NUMBER TO_TIMESTAMP AGE CLOCK_TIMESTAMP|10 DATE_PART DATE_TRUNC ISFINITE JUSTIFY_\
DAYS JUSTIFY_HOURS JUSTIFY_INTERVAL MAKE_DATE MAKE_INTERVAL|10 MAKE_TIME MAKE_TIMESTAMP|10 MAKE_TIMESTAMPTZ|10 NOW STATEMENT_TIMESTAMP|10 TIMEOFDAY TRANSACTION_TIMESTAMP|10 ENUM_FIRST ENUM_LAST ENUM_RANGE AREA CENTER DIAMETER HEIGHT ISCLOSED ISOPEN NPOINTS PCLOSE POPEN RADIUS WIDTH BOX BOUND_BOX CIRCLE LINE LSEG PATH POLYGON ABBREV BROADCAST HOST HOSTMASK MASKLEN NETMASK NETWORK SET_MASKLEN TEXT INET_SAME_FAMILY INET_MERGE MACADDR8_SET7BIT ARRAY_TO_TSVECTOR GET_CURRENT_TS_CONFIG NUMNODE PLAINTO_\
TSQUERY PHRASETO_TSQUERY WEBSEARCH_TO_TSQUERY QUERYTREE SETWEIGHT STRIP TO_TSQUERY TO_TSVECTOR JSON_TO_TSVECTOR JSONB_TO_TSVECTOR TS_DELETE TS_FILTER TS_HEADLINE TS_RANK TS_RANK_CD TS_REWRITE TSQUERY_PHRASE TSVECTOR_TO_ARRAY TSVECTOR_UPDATE_TRIGGER TSVECTOR_UPDATE_TRIGGER_COLUMN XMLCOMMENT XMLCONCAT XMLELEMENT XMLFOREST XMLPI XMLROOT XMLEXISTS XML_IS_WELL_FORMED XML_IS_WELL_FORMED_DOCUMENT XML_IS_WELL_FORMED_CONTENT XPATH XPATH_EXISTS XMLTABLE XMLNAMESPACES TABLE_TO_XML TABLE_TO_XMLSCHEMA TABLE_\
TO_XML_AND_XMLSCHEMA QUERY_TO_XML QUERY_TO_XMLSCHEMA QUERY_TO_XML_AND_XMLSCHEMA CURSOR_TO_XML CURSOR_TO_XMLSCHEMA SCHEMA_TO_XML SCHEMA_TO_XMLSCHEMA SCHEMA_TO_XML_AND_XMLSCHEMA DATABASE_TO_XML DATABASE_TO_XMLSCHEMA DATABASE_TO_XML_AND_XMLSCHEMA XMLATTRIBUTES TO_JSON TO_JSONB ARRAY_TO_JSON ROW_TO_JSON JSON_BUILD_ARRAY JSONB_BUILD_ARRAY JSON_BUILD_OBJECT JSONB_BUILD_OBJECT JSON_OBJECT JSONB_OBJECT JSON_ARRAY_LENGTH JSONB_ARRAY_LENGTH JSON_EACH JSONB_EACH JSON_EACH_TEXT JSONB_EACH_TEXT JSON_EXTRACT_\
PATH JSONB_EXTRACT_PATH JSON_OBJECT_KEYS JSONB_OBJECT_KEYS JSON_POPULATE_RECORD JSONB_POPULATE_RECORD JSON_POPULATE_RECORDSET JSONB_POPULATE_RECORDSET JSON_ARRAY_ELEMENTS JSONB_ARRAY_ELEMENTS JSON_ARRAY_ELEMENTS_TEXT JSONB_ARRAY_ELEMENTS_TEXT JSON_TYPEOF JSONB_TYPEOF JSON_TO_RECORD JSONB_TO_RECORD JSON_TO_RECORDSET JSONB_TO_RECORDSET JSON_STRIP_NULLS JSONB_STRIP_NULLS JSONB_SET JSONB_INSERT JSONB_PRETTY CURRVAL LASTVAL NEXTVAL SETVAL COALESCE NULLIF GREATEST LEAST ARRAY_APPEND ARRAY_CAT ARRAY_ND\
IMS ARRAY_DIMS ARRAY_FILL ARRAY_LENGTH ARRAY_LOWER ARRAY_POSITION ARRAY_POSITIONS ARRAY_PREPEND ARRAY_REMOVE ARRAY_REPLACE ARRAY_TO_STRING ARRAY_UPPER CARDINALITY STRING_TO_ARRAY UNNEST ISEMPTY LOWER_INC UPPER_INC LOWER_INF UPPER_INF RANGE_MERGE GENERATE_SERIES GENERATE_SUBSCRIPTS CURRENT_DATABASE CURRENT_QUERY CURRENT_SCHEMA|10 CURRENT_SCHEMAS|10 INET_CLIENT_ADDR INET_CLIENT_PORT INET_SERVER_ADDR INET_SERVER_PORT ROW_SECURITY_ACTIVE FORMAT_TYPE TO_REGCLASS TO_REGPROC TO_REGPROCEDURE TO_REGOPER \
TO_REGOPERATOR TO_REGTYPE TO_REGNAMESPACE TO_REGROLE COL_DESCRIPTION OBJ_DESCRIPTION SHOBJ_DESCRIPTION TXID_CURRENT TXID_CURRENT_IF_ASSIGNED TXID_CURRENT_SNAPSHOT TXID_SNAPSHOT_XIP TXID_SNAPSHOT_XMAX TXID_SNAPSHOT_XMIN TXID_VISIBLE_IN_SNAPSHOT TXID_STATUS CURRENT_SETTING SET_CONFIG BRIN_SUMMARIZE_NEW_VALUES BRIN_SUMMARIZE_RANGE BRIN_DESUMMARIZE_RANGE GIN_CLEAN_PENDING_LIST SUPPRESS_REDUNDANT_UPDATES_TRIGGER LO_FROM_BYTEA LO_PUT LO_GET LO_CREAT LO_CREATE LO_UNLINK LO_IMPORT LO_EXPORT LOREAD LOWRI\
TE GROUPING CAST ".trim().split(" ").map(function(val){return val.split("|")[0]}).join("|");return{name:"PostgreSQL",aliases:["postgres","postgresql"],supersetOf:"sql",case_insensitive:!0,keywords:{keyword:SQL_KW+PLPGSQL_KW+ROLE_ATTRS,built_in:SQL_BI+PLPGSQL_BI+PLPGSQL_EXCEPTIONS},illegal:/:==|\W\s*\(\*|(^|\s)\$[a-z]|\{\{|[a-z]:\s*$|\.\.\.|TO:|DO:/,contains:[{className:"keyword",variants:[{begin:/\bTEXT\s*SEARCH\b/},{begin:/\b(PRIMARY|FOREIGN|FOR(\s+NO)?)\s+KEY\b/},{begin:/\bPARALLEL\s+(UNSAFE|RESTRICTED|SAFE)\b/},
{begin:/\bSTORAGE\s+(PLAIN|EXTERNAL|EXTENDED|MAIN)\b/},{begin:/\bMATCH\s+(FULL|PARTIAL|SIMPLE)\b/},{begin:/\bNULLS\s+(FIRST|LAST)\b/},{begin:/\bEVENT\s+TRIGGER\b/},{begin:/\b(MAPPING|OR)\s+REPLACE\b/},{begin:/\b(FROM|TO)\s+(PROGRAM|STDIN|STDOUT)\b/},{begin:/\b(SHARE|EXCLUSIVE)\s+MODE\b/},{begin:/\b(LEFT|RIGHT)\s+(OUTER\s+)?JOIN\b/},{begin:/\b(FETCH|MOVE)\s+(NEXT|PRIOR|FIRST|LAST|ABSOLUTE|RELATIVE|FORWARD|BACKWARD)\b/},{begin:/\bPRESERVE\s+ROWS\b/},{begin:/\bDISCARD\s+PLANS\b/},{begin:/\bREFERENCING\s+(OLD|NEW)\b/},
{begin:/\bSKIP\s+LOCKED\b/},{begin:/\bGROUPING\s+SETS\b/},{begin:/\b(BINARY|INSENSITIVE|SCROLL|NO\s+SCROLL)\s+(CURSOR|FOR)\b/},{begin:/\b(WITH|WITHOUT)\s+HOLD\b/},{begin:/\bWITH\s+(CASCADED|LOCAL)\s+CHECK\s+OPTION\b/},{begin:/\bEXCLUDE\s+(TIES|NO\s+OTHERS)\b/},{begin:/\bFORMAT\s+(TEXT|XML|JSON|YAML)\b/},{begin:/\bSET\s+((SESSION|LOCAL)\s+)?NAMES\b/},{begin:/\bIS\s+(NOT\s+)?UNKNOWN\b/},{begin:/\bSECURITY\s+LABEL\b/},{begin:/\bSTANDALONE\s+(YES|NO|NO\s+VALUE)\b/},{begin:/\bWITH\s+(NO\s+)?DATA\b/},
{begin:/\b(FOREIGN|SET)\s+DATA\b/},{begin:/\bSET\s+(CATALOG|CONSTRAINTS)\b/},{begin:/\b(WITH|FOR)\s+ORDINALITY\b/},{begin:/\bIS\s+(NOT\s+)?DOCUMENT\b/},{begin:/\bXML\s+OPTION\s+(DOCUMENT|CONTENT)\b/},{begin:/\b(STRIP|PRESERVE)\s+WHITESPACE\b/},{begin:/\bNO\s+(ACTION|MAXVALUE|MINVALUE)\b/},{begin:/\bPARTITION\s+BY\s+(RANGE|LIST|HASH)\b/},{begin:/\bAT\s+TIME\s+ZONE\b/},{begin:/\bGRANTED\s+BY\b/},{begin:/\bRETURN\s+(QUERY|NEXT)\b/},{begin:/\b(ATTACH|DETACH)\s+PARTITION\b/},{begin:/\bFORCE\s+ROW\s+LEVEL\s+SECURITY\b/},
{begin:/\b(INCLUDING|EXCLUDING)\s+(COMMENTS|CONSTRAINTS|DEFAULTS|IDENTITY|INDEXES|STATISTICS|STORAGE|ALL)\b/},{begin:/\bAS\s+(ASSIGNMENT|IMPLICIT|PERMISSIVE|RESTRICTIVE|ENUM|RANGE)\b/}]},{begin:/\b(FORMAT|FAMILY|VERSION)\s*\(/},{begin:/\bINCLUDE\s*\(/,keywords:"INCLUDE"},{begin:/\bRANGE(?!\s*(BETWEEN|UNBOUNDED|CURRENT|[-0-9]+))/},{begin:/\b(VERSION|OWNER|TEMPLATE|TABLESPACE|CONNECTION\s+LIMIT|PROCEDURE|RESTRICT|JOIN|PARSER|COPY|START|END|COLLATION|INPUT|ANALYZE|STORAGE|LIKE|DEFAULT|DELIMITER|ENCODING|COLUMN|CONSTRAINT|TABLE|SCHEMA)\s*=/},
{begin:/\b(PG_\w+?|HAS_[A-Z_]+_PRIVILEGE)\b/,relevance:10},{begin:/\bEXTRACT\s*\(/,end:/\bFROM\b/,returnEnd:!0,keywords:{type:"CENTURY DAY DECADE DOW DOY EPOCH HOUR ISODOW ISOYEAR MICROSECONDS MILLENNIUM MILLISECONDS MINUTE MONTH QUARTER SECOND TIMEZONE TIMEZONE_HOUR TIMEZONE_MINUTE WEEK YEAR"}},{begin:/\b(XMLELEMENT|XMLPI)\s*\(\s*NAME/,keywords:{keyword:"NAME"}},{begin:/\b(XMLPARSE|XMLSERIALIZE)\s*\(\s*(DOCUMENT|CONTENT)/,keywords:{keyword:"DOCUMENT CONTENT"}},{beginKeywords:"CACHE INCREMENT MA\
XVALUE MINVALUE",end:hljs.C_NUMBER_RE,returnEnd:!0,keywords:"BY CACHE INCREMENT MAXVALUE MINVALUE"},{className:"type",begin:/\b(WITH|WITHOUT)\s+TIME\s+ZONE\b/},{className:"type",begin:/\bINTERVAL\s+(YEAR|MONTH|DAY|HOUR|MINUTE|SECOND)(\s+TO\s+(MONTH|HOUR|MINUTE|SECOND))?\b/},{begin:/\bRETURNS\s+(LANGUAGE_HANDLER|TRIGGER|EVENT_TRIGGER|FDW_HANDLER|INDEX_AM_HANDLER|TSM_HANDLER)\b/,keywords:{keyword:"RETURNS",type:"LANGUAGE_HANDLER TRIGGER EVENT_TRIGGER FDW_HANDLER INDEX_AM_HANDLER TSM_HANDLER"}},{begin:"\
\\b("+FUNCTIONS_RE+")\\s*\\("},{begin:"\\.("+TYPES_RE+")\\b"},{begin:"\\b("+TYPES_RE+")\\s+PATH\\b",keywords:{keyword:"PATH",type:TYPES2.replace("PATH ","")}},{className:"type",begin:"\\b("+TYPES_RE+")\\b"},{className:"string",begin:"'",end:"'",contains:[{begin:"''"}]},{className:"string",begin:"(e|E|u&|U&)'",end:"'",contains:[{begin:"\\\\."}],relevance:10},hljs.END_SAME_AS_BEGIN({begin:DOLLAR_STRING,end:DOLLAR_STRING,contains:[{subLanguage:["pgsql","perl","python","tcl","r","lua","java","php","\
ruby","bash","scheme","xml","json"],endsWithParent:!0}]}),{begin:'"',end:'"',contains:[{begin:'""'}]},hljs.C_NUMBER_MODE,hljs.C_BLOCK_COMMENT_MODE,COMMENT_MODE,{className:"meta",variants:[{begin:"%(ROW)?TYPE",relevance:10},{begin:"\\$\\d+"},{begin:"^#\\w",end:"$"}]},{className:"symbol",begin:LABEL,relevance:10}]}}return pgsql_1=pgsql2,pgsql_1}var php_1,hasRequiredPhp;function requirePhp(){if(hasRequiredPhp)return php_1;hasRequiredPhp=1;function php2(hljs){const regex=hljs.regex,NOT_PERL_ETC=/(?![A-Za-z0-9])(?![$])/,
IDENT_RE2=regex.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,NOT_PERL_ETC),PASCAL_CASE_CLASS_NAME_RE=regex.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,NOT_PERL_ETC),UPCASE_NAME_RE=regex.concat(/[A-Z]+/,NOT_PERL_ETC),VARIABLE={scope:"variable",match:"\\$+"+IDENT_RE2},PREPROCESSOR={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},SUBST={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},
SINGLE_QUOTED=hljs.inherit(hljs.APOS_STRING_MODE,{illegal:null}),DOUBLE_QUOTED=hljs.inherit(hljs.QUOTE_STRING_MODE,{illegal:null,contains:hljs.QUOTE_STRING_MODE.contains.concat(SUBST)}),HEREDOC={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:hljs.QUOTE_STRING_MODE.contains.concat(SUBST),"on:begin":(m,resp)=>{resp.data._beginMatch=m[1]||m[2]},"on:end":(m,resp)=>{resp.data._beginMatch!==m[1]&&resp.ignoreMatch()}},NOWDOC=hljs.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),
WHITESPACE=`[ 	
]`,STRING={scope:"string",variants:[DOUBLE_QUOTED,SINGLE_QUOTED,HEREDOC,NOWDOC]},NUMBER={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},LITERALS2=["false","null","true"],KWS=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__\
TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","iss\
et","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],BUILT_INS2=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroEr\
ror","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveD\
irectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess",
"BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],KEYWORDS2={keyword:KWS,literal:(items2=>{const result=[];return items2.forEach(item=>{result.push(item),item.toLowerCase()===item?result.push(item.toUpperCase()):result.push(item.toLowerCase())}),result})(LITERALS2),built_in:BUILT_INS2},normalizeKeywords=items2=>items2.
map(item=>item.replace(/\|\d+$/,"")),CONSTRUCTOR_CALL={variants:[{match:[/new/,regex.concat(WHITESPACE,"+"),regex.concat("(?!",normalizeKeywords(BUILT_INS2).join("\\b|"),"\\b)"),PASCAL_CASE_CLASS_NAME_RE],scope:{1:"keyword",4:"title.class"}}]},CONSTANT_REFERENCE=regex.concat(IDENT_RE2,"\\b(?!\\()"),LEFT_AND_RIGHT_SIDE_OF_DOUBLE_COLON={variants:[{match:[regex.concat(/::/,regex.lookahead(/(?!class\b)/)),CONSTANT_REFERENCE],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.lan\
guage"}},{match:[PASCAL_CASE_CLASS_NAME_RE,regex.concat(/::/,regex.lookahead(/(?!class\b)/)),CONSTANT_REFERENCE],scope:{1:"title.class",3:"variable.constant"}},{match:[PASCAL_CASE_CLASS_NAME_RE,regex.concat("::",regex.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[PASCAL_CASE_CLASS_NAME_RE,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},NAMED_ARGUMENT={scope:"attr",match:regex.concat(IDENT_RE2,regex.lookahead(":"),regex.lookahead(/(?!::)/))},PARAMS_MODE={relevance:0,begin:/\(/,
end:/\)/,keywords:KEYWORDS2,contains:[NAMED_ARGUMENT,VARIABLE,LEFT_AND_RIGHT_SIDE_OF_DOUBLE_COLON,hljs.C_BLOCK_COMMENT_MODE,STRING,NUMBER,CONSTRUCTOR_CALL]},FUNCTION_INVOKE={relevance:0,match:[/\b/,regex.concat("(?!fn\\b|function\\b|",normalizeKeywords(KWS).join("\\b|"),"|",normalizeKeywords(BUILT_INS2).join("\\b|"),"\\b)"),IDENT_RE2,regex.concat(WHITESPACE,"*"),regex.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[PARAMS_MODE]};PARAMS_MODE.contains.push(FUNCTION_INVOKE);const ATTRIBUTE_CONTAINS=[
NAMED_ARGUMENT,LEFT_AND_RIGHT_SIDE_OF_DOUBLE_COLON,hljs.C_BLOCK_COMMENT_MODE,STRING,NUMBER,CONSTRUCTOR_CALL],ATTRIBUTES2={begin:regex.concat(/#\[\s*\\?/,regex.either(PASCAL_CASE_CLASS_NAME_RE,UPCASE_NAME_RE)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:LITERALS2,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:LITERALS2,keyword:["new","array"]},contains:["self",...ATTRIBUTE_CONTAINS]},...ATTRIBUTE_CONTAINS,{scope:"meta",variants:[{match:PASCAL_CASE_CLASS_NAME_RE},
{match:UPCASE_NAME_RE}]}]};return{case_insensitive:!1,keywords:KEYWORDS2,contains:[ATTRIBUTES2,hljs.HASH_COMMENT_MODE,hljs.COMMENT("//","$"),hljs.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:hljs.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},PREPROCESSOR,{scope:"variable.language",match:/\$this\b/},VARIABLE,FUNCTION_INVOKE,LEFT_AND_RIGHT_SIDE_OF_DOUBLE_COLON,{match:[
/const/,/\s/,IDENT_RE2],scope:{1:"keyword",3:"variable.constant"}},CONSTRUCTOR_CALL,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},hljs.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:KEYWORDS2,contains:["self",ATTRIBUTES2,VARIABLE,LEFT_AND_RIGHT_SIDE_OF_DOUBLE_COLON,hljs.C_BLOCK_COMMENT_MODE,STRING,NUMBER]}]},{scope:"class",variants:[
{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},hljs.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[hljs.inherit(hljs.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},hljs.UNDERSCORE_TITLE_MODE]},STRING,NUMBER]}}return php_1=
php2,php_1}var phpTemplate_1,hasRequiredPhpTemplate;function requirePhpTemplate(){if(hasRequiredPhpTemplate)return phpTemplate_1;hasRequiredPhpTemplate=1;function phpTemplate2(hljs){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},hljs.inherit(hljs.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),hljs.inherit(hljs.QUOTE_STRING_MODE,
{illegal:null,className:null,contains:null,skip:!0})]}]}}return phpTemplate_1=phpTemplate2,phpTemplate_1}var plaintext_1,hasRequiredPlaintext;function requirePlaintext(){if(hasRequiredPlaintext)return plaintext_1;hasRequiredPlaintext=1;function plaintext2(hljs){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}return plaintext_1=plaintext2,plaintext_1}var pony_1,hasRequiredPony;function requirePony(){if(hasRequiredPony)return pony_1;hasRequiredPony=1;function pony2(hljs){const KEYWORDS2={
keyword:"actor addressof and as be break class compile_error compile_intrinsic consume continue delegate digestof do else elseif embed end error for fun if ifdef in interface is isnt lambda let match new not object or primitive recover repeat return struct then trait try type until use var where while with xor",meta:"iso val tag trn box ref",literal:"this false true"},TRIPLE_QUOTE_STRING_MODE={className:"string",begin:'"""',end:'"""',relevance:10},QUOTE_STRING_MODE={className:"string",begin:'"',
end:'"',contains:[hljs.BACKSLASH_ESCAPE]},SINGLE_QUOTE_CHAR_MODE={className:"string",begin:"'",end:"'",contains:[hljs.BACKSLASH_ESCAPE],relevance:0},TYPE_NAME={className:"type",begin:"\\b_?[A-Z][\\w]*",relevance:0},PRIMED_NAME={begin:hljs.IDENT_RE+"'",relevance:0};return{name:"Pony",keywords:KEYWORDS2,contains:[TYPE_NAME,TRIPLE_QUOTE_STRING_MODE,QUOTE_STRING_MODE,SINGLE_QUOTE_CHAR_MODE,PRIMED_NAME,{className:"number",begin:"(-?)(\\b0[xX][a-fA-F0-9]+|\\b0[bB][01]+|(\\b\\d+(_\\d+)?(\\.\\d*)?|\\.\\d+)([eE][\
-+]?\\d+)?)",relevance:0},hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE]}}return pony_1=pony2,pony_1}var powershell_1,hasRequiredPowershell;function requirePowershell(){if(hasRequiredPowershell)return powershell_1;hasRequiredPowershell=1;function powershell2(hljs){const TYPES2=["string","char","byte","int","long","bool","decimal","single","double","DateTime","xml","array","hashtable","void"],VALID_VERBS="Add|Clear|Close|Copy|Enter|Exit|Find|Format|Get|Hide|Join|Lock|Move|New|Open|Optimize|P\
op|Push|Redo|Remove|Rename|Reset|Resize|Search|Select|Set|Show|Skip|Split|Step|Switch|Undo|Unlock|Watch|Backup|Checkpoint|Compare|Compress|Convert|ConvertFrom|ConvertTo|Dismount|Edit|Expand|Export|Group|Import|Initialize|Limit|Merge|Mount|Out|Publish|Restore|Save|Sync|Unpublish|Update|Approve|Assert|Build|Complete|Confirm|Deny|Deploy|Disable|Enable|Install|Invoke|Register|Request|Restart|Resume|Start|Stop|Submit|Suspend|Uninstall|Unregister|Wait|Debug|Measure|Ping|Repair|Resolve|Test|Trace|Conne\
ct|Disconnect|Read|Receive|Send|Write|Block|Grant|Protect|Revoke|Unblock|Unprotect|Use|ForEach|Sort|Tee|Where",COMPARISON_OPERATORS="-and|-as|-band|-bnot|-bor|-bxor|-casesensitive|-ccontains|-ceq|-cge|-cgt|-cle|-clike|-clt|-cmatch|-cne|-cnotcontains|-cnotlike|-cnotmatch|-contains|-creplace|-csplit|-eq|-exact|-f|-file|-ge|-gt|-icontains|-ieq|-ige|-igt|-ile|-ilike|-ilt|-imatch|-in|-ine|-inotcontains|-inotlike|-inotmatch|-ireplace|-is|-isnot|-isplit|-join|-le|-like|-lt|-match|-ne|-not|-notcontains|\
-notin|-notlike|-notmatch|-or|-regex|-replace|-shl|-shr|-split|-wildcard|-xor",KEYWORDS2={$pattern:/-?[A-z\.\-]+\b/,keyword:"if else foreach return do while until elseif begin for trap data dynamicparam end break throw param continue finally in switch exit filter try process catch hidden static parameter",built_in:"ac asnp cat cd CFS chdir clc clear clhy cli clp cls clv cnsn compare copy cp cpi cpp curl cvpa dbp del diff dir dnsn ebp echo|0 epal epcsv epsn erase etsn exsn fc fhx fl ft fw gal gbp\
 gc gcb gci gcm gcs gdr gerr ghy gi gin gjb gl gm gmo gp gps gpv group gsn gsnp gsv gtz gu gv gwmi h history icm iex ihy ii ipal ipcsv ipmo ipsn irm ise iwmi iwr kill lp ls man md measure mi mount move mp mv nal ndr ni nmo npssc nsn nv ogv oh popd ps pushd pwd r rbp rcjb rcsn rd rdr ren ri rjb rm rmdir rmo rni rnp rp rsn rsnp rujb rv rvpa rwmi sajb sal saps sasv sbp sc scb select set shcm si sl sleep sls sort sp spjb spps spsv start stz sujb sv swmi tee trcm type wget where wjb write"},TITLE_NAME_RE=/\w[\w\d]*((-)[\w\d]+)*/,
BACKTICK_ESCAPE={begin:"`[\\s\\S]",relevance:0},VAR={className:"variable",variants:[{begin:/\$\B/},{className:"keyword",begin:/\$this/},{begin:/\$[\w\d][\w\d_:]*/}]},LITERAL={className:"literal",begin:/\$(null|true|false)\b/},QUOTE_STRING={className:"string",variants:[{begin:/"/,end:/"/},{begin:/@"/,end:/^"@/}],contains:[BACKTICK_ESCAPE,VAR,{className:"variable",begin:/\$[A-z]/,end:/[^A-z]/}]},APOS_STRING={className:"string",variants:[{begin:/'/,end:/'/},{begin:/@'/,end:/^'@/}]},PS_HELPTAGS={className:"\
doctag",variants:[{begin:/\.(synopsis|description|example|inputs|outputs|notes|link|component|role|functionality)/},{begin:/\.(parameter|forwardhelptargetname|forwardhelpcategory|remotehelprunspace|externalhelp)\s+\S+/}]},PS_COMMENT=hljs.inherit(hljs.COMMENT(null,null),{variants:[{begin:/#/,end:/$/},{begin:/<#/,end:/#>/}],contains:[PS_HELPTAGS]}),CMDLETS={className:"built_in",variants:[{begin:"(".concat(VALID_VERBS,")+(-)[\\w\\d]+")}]},PS_CLASS={className:"class",beginKeywords:"class enum",end:/\s*[{]/,
excludeEnd:!0,relevance:0,contains:[hljs.TITLE_MODE]},PS_FUNCTION={className:"function",begin:/function\s+/,end:/\s*\{|$/,excludeEnd:!0,returnBegin:!0,relevance:0,contains:[{begin:"function",relevance:0,className:"keyword"},{className:"title",begin:TITLE_NAME_RE,relevance:0},{begin:/\(/,end:/\)/,className:"params",relevance:0,contains:[VAR]}]},PS_USING={begin:/using\s/,end:/$/,returnBegin:!0,contains:[QUOTE_STRING,APOS_STRING,{className:"keyword",begin:/(using|assembly|command|module|namespace|type)/}]},
PS_ARGUMENTS={variants:[{className:"operator",begin:"(".concat(COMPARISON_OPERATORS,")\\b")},{className:"literal",begin:/(-){1,2}[\w\d-]+/,relevance:0}]},HASH_SIGNS={className:"selector-tag",begin:/@\B/,relevance:0},PS_METHODS={className:"function",begin:/\[.*\]\s*[\w]+[ ]??\(/,end:/$/,returnBegin:!0,relevance:0,contains:[{className:"keyword",begin:"(".concat(KEYWORDS2.keyword.toString().replace(/\s/g,"|"),")\\b"),endsParent:!0,relevance:0},hljs.inherit(hljs.TITLE_MODE,{endsParent:!0})]},GENTLEMANS_SET=[
PS_METHODS,PS_COMMENT,BACKTICK_ESCAPE,hljs.NUMBER_MODE,QUOTE_STRING,APOS_STRING,CMDLETS,VAR,LITERAL,HASH_SIGNS],PS_TYPE={begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0,relevance:0,contains:[].concat("self",GENTLEMANS_SET,{begin:"("+TYPES2.join("|")+")",className:"built_in",relevance:0},{className:"type",begin:/[\.\w\d]+/,relevance:0})};return PS_METHODS.contains.unshift(PS_TYPE),{name:"PowerShell",aliases:["pwsh","ps","ps1"],case_insensitive:!0,keywords:KEYWORDS2,contains:GENTLEMANS_SET.concat(
PS_CLASS,PS_FUNCTION,PS_USING,PS_ARGUMENTS,PS_TYPE)}}return powershell_1=powershell2,powershell_1}var processing_1,hasRequiredProcessing;function requireProcessing(){if(hasRequiredProcessing)return processing_1;hasRequiredProcessing=1;function processing2(hljs){const regex=hljs.regex,BUILT_INS2=["displayHeight","displayWidth","mouseY","mouseX","mousePressed","pmouseX","pmouseY","key","keyCode","pixels","focused","frameCount","frameRate","height","width","size","createGraphics","beginDraw","creat\
eShape","loadShape","PShape","arc","ellipse","line","point","quad","rect","triangle","bezier","bezierDetail","bezierPoint","bezierTangent","curve","curveDetail","curvePoint","curveTangent","curveTightness","shape","shapeMode","beginContour","beginShape","bezierVertex","curveVertex","endContour","endShape","quadraticVertex","vertex","ellipseMode","noSmooth","rectMode","smooth","strokeCap","strokeJoin","strokeWeight","mouseClicked","mouseDragged","mouseMoved","mousePressed","mouseReleased","mouseW\
heel","keyPressed","keyPressedkeyReleased","keyTyped","print","println","save","saveFrame","day","hour","millis","minute","month","second","year","background","clear","colorMode","fill","noFill","noStroke","stroke","alpha","blue","brightness","color","green","hue","lerpColor","red","saturation","modelX","modelY","modelZ","screenX","screenY","screenZ","ambient","emissive","shininess","specular","add","createImage","beginCamera","camera","endCamera","frustum","ortho","perspective","printCamera","p\
rintProjection","cursor","frameRate","noCursor","exit","loop","noLoop","popStyle","pushStyle","redraw","binary","boolean","byte","char","float","hex","int","str","unbinary","unhex","join","match","matchAll","nf","nfc","nfp","nfs","split","splitTokens","trim","append","arrayCopy","concat","expand","reverse","shorten","sort","splice","subset","box","sphere","sphereDetail","createInput","createReader","loadBytes","loadJSONArray","loadJSONObject","loadStrings","loadTable","loadXML","open","parseXML",
"saveTable","selectFolder","selectInput","beginRaw","beginRecord","createOutput","createWriter","endRaw","endRecord","PrintWritersaveBytes","saveJSONArray","saveJSONObject","saveStream","saveStrings","saveXML","selectOutput","popMatrix","printMatrix","pushMatrix","resetMatrix","rotate","rotateX","rotateY","rotateZ","scale","shearX","shearY","translate","ambientLight","directionalLight","lightFalloff","lights","lightSpecular","noLights","normal","pointLight","spotLight","image","imageMode","loadI\
mage","noTint","requestImage","tint","texture","textureMode","textureWrap","blend","copy","filter","get","loadPixels","set","updatePixels","blendMode","loadShader","PShaderresetShader","shader","createFont","loadFont","text","textFont","textAlign","textLeading","textMode","textSize","textWidth","textAscent","textDescent","abs","ceil","constrain","dist","exp","floor","lerp","log","mag","map","max","min","norm","pow","round","sq","sqrt","acos","asin","atan","atan2","cos","degrees","radians","sin",
"tan","noise","noiseDetail","noiseSeed","random","randomGaussian","randomSeed"],IDENT=hljs.IDENT_RE,FUNC_NAME={variants:[{match:regex.concat(regex.either(...BUILT_INS2),regex.lookahead(/\s*\(/)),className:"built_in"},{relevance:0,match:regex.concat(/\b(?!for|if|while)/,IDENT,regex.lookahead(/\s*\(/)),className:"title.function"}]},NEW_CLASS={match:[/new\s+/,IDENT],className:{1:"keyword",2:"class.title"}},PROPERTY={relevance:0,match:[/\./,IDENT],className:{2:"property"}},CLASS2={variants:[{match:[
/class/,/\s+/,IDENT,/\s+/,/extends/,/\s+/,IDENT]},{match:[/class/,/\s+/,IDENT]}],className:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},TYPES2=["boolean","byte","char","color","double","float","int","long","short"],CLASSES=["BufferedReader","PVector","PFont","PImage","PGraphics","HashMap","String","Array","FloatDict","ArrayList","FloatList","IntDict","IntList","JSONArray","JSONObject","Object","StringDict","StringList","Table","TableRow","XML"];return{name:"Processing",aliases:[
"pde"],keywords:{keyword:[...["abstract","assert","break","case","catch","const","continue","default","else","enum","final","finally","for","if","import","instanceof","long","native","new","package","private","private","protected","protected","public","public","return","static","strictfp","switch","synchronized","throw","throws","transient","try","void","volatile","while"]],literal:"P2D P3D HALF_PI PI QUARTER_PI TAU TWO_PI null true false",title:"setup draw",variable:"super this",built_in:[...BUILT_INS2,
...CLASSES],type:TYPES2},contains:[CLASS2,NEW_CLASS,FUNC_NAME,PROPERTY,hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,hljs.C_NUMBER_MODE]}}return processing_1=processing2,processing_1}var profile_1,hasRequiredProfile;function requireProfile(){if(hasRequiredProfile)return profile_1;hasRequiredProfile=1;function profile2(hljs){return{name:"Python profiler",contains:[hljs.C_NUMBER_MODE,{begin:"[a-zA-Z_][\\da-zA-Z_]+\\.[\\da-zA-Z_]{1,3}",end:":",excludeEnd:!0},
{begin:"(ncalls|tottime|cumtime)",end:"$",keywords:"ncalls tottime|10 cumtime|10 filename",relevance:10},{begin:"function calls",end:"$",contains:[hljs.C_NUMBER_MODE],relevance:10},hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,{className:"string",begin:"\\(",end:"\\)$",excludeBegin:!0,excludeEnd:!0,relevance:0}]}}return profile_1=profile2,profile_1}var prolog_1,hasRequiredProlog;function requireProlog(){if(hasRequiredProlog)return prolog_1;hasRequiredProlog=1;function prolog2(hljs){const ATOM={begin:/[a-z][A-Za-z0-9_]*/,
relevance:0},VAR={className:"symbol",variants:[{begin:/[A-Z][a-zA-Z0-9_]*/},{begin:/_[A-Za-z0-9_]*/}],relevance:0},PARENTED={begin:/\(/,end:/\)/,relevance:0},LIST={begin:/\[/,end:/\]/},LINE_COMMENT={className:"comment",begin:/%/,end:/$/,contains:[hljs.PHRASAL_WORDS_MODE]},BACKTICK_STRING={className:"string",begin:/`/,end:/`/,contains:[hljs.BACKSLASH_ESCAPE]},CHAR_CODE={className:"string",begin:/0'(\\'|.)/},SPACE_CODE={className:"string",begin:/0'\\s/},inner2=[ATOM,VAR,PARENTED,{begin:/:-/},LIST,
LINE_COMMENT,hljs.C_BLOCK_COMMENT_MODE,hljs.QUOTE_STRING_MODE,hljs.APOS_STRING_MODE,BACKTICK_STRING,CHAR_CODE,SPACE_CODE,hljs.C_NUMBER_MODE];return PARENTED.contains=inner2,LIST.contains=inner2,{name:"Prolog",contains:inner2.concat([{begin:/\.$/}])}}return prolog_1=prolog2,prolog_1}var properties_1,hasRequiredProperties$2;function requireProperties$2(){if(hasRequiredProperties$2)return properties_1;hasRequiredProperties$2=1;function properties2(hljs){const WS0="[ \\t\\f]*",WS1="[ \\t\\f]+",EQUAL_DELIM=WS0+
"[:=]"+WS0,WS_DELIM=WS1,DELIM="("+EQUAL_DELIM+"|"+WS_DELIM+")",KEY="([^\\\\:= \\t\\f\\n]|\\\\.)+",DELIM_AND_VALUE={end:DELIM,relevance:0,starts:{className:"string",end:/$/,relevance:0,contains:[{begin:"\\\\\\\\"},{begin:"\\\\\\n"}]}};return{name:".properties",disableAutodetect:!0,case_insensitive:!0,illegal:/\S/,contains:[hljs.COMMENT("^\\s*[!#]","$"),{returnBegin:!0,variants:[{begin:KEY+EQUAL_DELIM},{begin:KEY+WS_DELIM}],contains:[{className:"attr",begin:KEY,endsParent:!0}],starts:DELIM_AND_VALUE},
{className:"attr",begin:KEY+WS0+"$"}]}}return properties_1=properties2,properties_1}var protobuf_1,hasRequiredProtobuf;function requireProtobuf(){if(hasRequiredProtobuf)return protobuf_1;hasRequiredProtobuf=1;function protobuf2(hljs){const KEYWORDS2=["package","import","option","optional","required","repeated","group","oneof"],TYPES2=["double","float","int32","int64","uint32","uint64","sint32","sint64","fixed32","fixed64","sfixed32","sfixed64","bool","string","bytes"],CLASS_DEFINITION={match:[/(message|enum|service)\s+/,
hljs.IDENT_RE],scope:{1:"keyword",2:"title.class"}};return{name:"Protocol Buffers",aliases:["proto"],keywords:{keyword:KEYWORDS2,type:TYPES2,literal:["true","false"]},contains:[hljs.QUOTE_STRING_MODE,hljs.NUMBER_MODE,hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,CLASS_DEFINITION,{className:"function",beginKeywords:"rpc",end:/[{;]/,excludeEnd:!0,keywords:"rpc returns"},{begin:/^\s*[A-Z_]+(?=\s*=[^\n]+;$)/}]}}return protobuf_1=protobuf2,protobuf_1}var puppet_1,hasRequiredPuppet;function requirePuppet(){
if(hasRequiredPuppet)return puppet_1;hasRequiredPuppet=1;function puppet2(hljs){const PUPPET_KEYWORDS={keyword:"and case default else elsif false if in import enherits node or true undef unless main settings $string ",literal:"alias audit before loglevel noop require subscribe tag owner ensure group mode name|0 changes context force incl lens load_path onlyif provider returns root show_diff type_check en_address ip_address realname command environment hour monute month monthday special target we\
ekday creates cwd ogoutput refresh refreshonly tries try_sleep umask backup checksum content ctime force ignore links mtime purge recurse recurselimit replace selinux_ignore_defaults selrange selrole seltype seluser source souirce_permissions sourceselect validate_cmd validate_replacement allowdupe attribute_membership auth_membership forcelocal gid ia_load_module members system host_aliases ip allowed_trunk_vlans description device_url duplex encapsulation etherchannel native_vlan speed princip\
als allow_root auth_class auth_type authenticate_user k_of_n mechanisms rule session_owner shared options device fstype enable hasrestart directory present absent link atboot blockdevice device dump pass remounts poller_tag use message withpath adminfile allow_virtual allowcdrom category configfiles flavor install_options instance package_settings platform responsefile status uninstall_options vendor unless_system_user unless_uid binary control flags hasstatus manifest pattern restart running st\
art stop allowdupe auths expiry gid groups home iterations key_membership keys managehome membership password password_max_age password_min_age profile_membership profiles project purge_ssh_keys role_membership roles salt shell uid baseurl cost descr enabled enablegroups exclude failovermethod gpgcheck gpgkey http_caching include includepkgs keepalive metadata_expire metalink mirrorlist priority protect proxy proxy_password proxy_username repo_gpgcheck s3_enabled skip_if_unavailable sslcacert ss\
lclientcert sslclientkey sslverify mounted",built_in:"architecture augeasversion blockdevices boardmanufacturer boardproductname boardserialnumber cfkey dhcp_servers domain ec2_ ec2_userdata facterversion filesystems ldom fqdn gid hardwareisa hardwaremodel hostname id|0 interfaces ipaddress ipaddress_ ipaddress6 ipaddress6_ iphostnumber is_virtual kernel kernelmajversion kernelrelease kernelversion kernelrelease kernelversion lsbdistcodename lsbdistdescription lsbdistid lsbdistrelease lsbmajdist\
release lsbminordistrelease lsbrelease macaddress macaddress_ macosx_buildversion macosx_productname macosx_productversion macosx_productverson_major macosx_productversion_minor manufacturer memoryfree memorysize netmask metmask_ network_ operatingsystem operatingsystemmajrelease operatingsystemrelease osfamily partitions path physicalprocessorcount processor processorcount productname ps puppetversion rubysitedir rubyversion selinux selinux_config_mode selinux_config_policy selinux_current_mode\
 selinux_current_mode selinux_enforced selinux_policyversion serialnumber sp_ sshdsakey sshecdsakey sshrsakey swapencrypted swapfree swapsize timezone type uniqueid uptime uptime_days uptime_hours uptime_seconds uuid virtual vlans xendomains zfs_version zonenae zones zpool_version"},COMMENT=hljs.COMMENT("#","$"),IDENT_RE2="([A-Za-z_]|::)(\\w|::)*",TITLE=hljs.inherit(hljs.TITLE_MODE,{begin:IDENT_RE2}),VARIABLE={className:"variable",begin:"\\$"+IDENT_RE2},STRING={className:"string",contains:[hljs.
BACKSLASH_ESCAPE,VARIABLE],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/}]};return{name:"Puppet",aliases:["pp"],contains:[COMMENT,VARIABLE,STRING,{beginKeywords:"class",end:"\\{|;",illegal:/=/,contains:[TITLE,COMMENT]},{beginKeywords:"define",end:/\{/,contains:[{className:"section",begin:hljs.IDENT_RE,endsParent:!0}]},{begin:hljs.IDENT_RE+"\\s+\\{",returnBegin:!0,end:/\S/,contains:[{className:"keyword",begin:hljs.IDENT_RE,relevance:.2},{begin:/\{/,end:/\}/,keywords:PUPPET_KEYWORDS,relevance:0,
contains:[STRING,COMMENT,{begin:"[a-zA-Z_]+\\s*=>",returnBegin:!0,end:"=>",contains:[{className:"attr",begin:hljs.IDENT_RE}]},{className:"number",begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",relevance:0},VARIABLE]}],relevance:0}]}}return puppet_1=puppet2,puppet_1}var purebasic_1,hasRequiredPurebasic;function requirePurebasic(){if(hasRequiredPurebasic)return purebasic_1;hasRequiredPurebasic=1;function purebasic2(hljs){const STRINGS={className:"string",begin:'(\
~)?"',end:'"',illegal:"\\n"},CONSTANTS={className:"symbol",begin:"#[a-zA-Z_]\\w*\\$?"};return{name:"PureBASIC",aliases:["pb","pbi"],keywords:"Align And Array As Break CallDebugger Case CompilerCase CompilerDefault CompilerElse CompilerElseIf CompilerEndIf CompilerEndSelect CompilerError CompilerIf CompilerSelect CompilerWarning Continue Data DataSection Debug DebugLevel Declare DeclareC DeclareCDLL DeclareDLL DeclareModule Default Define Dim DisableASM DisableDebugger DisableExplicit Else ElseIf\
 EnableASM EnableDebugger EnableExplicit End EndDataSection EndDeclareModule EndEnumeration EndIf EndImport EndInterface EndMacro EndModule EndProcedure EndSelect EndStructure EndStructureUnion EndWith Enumeration EnumerationBinary Extends FakeReturn For ForEach ForEver Global Gosub Goto If Import ImportC IncludeBinary IncludeFile IncludePath Interface List Macro MacroExpandedCount Map Module NewList NewMap Next Not Or Procedure ProcedureC ProcedureCDLL ProcedureDLL ProcedureReturn Protected Pro\
totype PrototypeC ReDim Read Repeat Restore Return Runtime Select Shared Static Step Structure StructureUnion Swap Threaded To UndefineMacro Until Until  UnuseModule UseModule Wend While With XIncludeFile XOr",contains:[hljs.COMMENT(";","$",{relevance:0}),{className:"function",begin:"\\b(Procedure|Declare)(C|CDLL|DLL)?\\b",end:"\\(",excludeEnd:!0,returnBegin:!0,contains:[{className:"keyword",begin:"(Procedure|Declare)(C|CDLL|DLL)?",excludeEnd:!0},{className:"type",begin:"\\.\\w*"},hljs.UNDERSCORE_TITLE_MODE]},
STRINGS,CONSTANTS]}}return purebasic_1=purebasic2,purebasic_1}var python_1,hasRequiredPython;function requirePython(){if(hasRequiredPython)return python_1;hasRequiredPython=1;function python2(hljs){const regex=hljs.regex,IDENT_RE2=new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*","u"),RESERVED_WORDS=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","\
or","pass","raise","return","try","while","with","yield"],KEYWORDS2={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:RESERVED_WORDS,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max",
"memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},PROMPT={className:"meta",begin:/^(>>>|\.\.\.) /},SUBST={className:"subst",begin:/\{/,end:/\}/,keywords:KEYWORDS2,
illegal:/#/},LITERAL_BRACKET={begin:/\{\{/,relevance:0},STRING={className:"string",contains:[hljs.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[hljs.BACKSLASH_ESCAPE,PROMPT],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[hljs.BACKSLASH_ESCAPE,PROMPT],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[hljs.BACKSLASH_ESCAPE,PROMPT,LITERAL_BRACKET,SUBST]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,
contains:[hljs.BACKSLASH_ESCAPE,PROMPT,LITERAL_BRACKET,SUBST]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[hljs.BACKSLASH_ESCAPE,LITERAL_BRACKET,SUBST]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[hljs.BACKSLASH_ESCAPE,LITERAL_BRACKET,SUBST]},hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE]},digitpart="[0-9]\
(_?[0-9])*",pointfloat=`(\\b(${digitpart}))?\\.(${digitpart})|\\b(${digitpart})\\.`,lookahead2=`\\b|${RESERVED_WORDS.join("|")}`,NUMBER={className:"number",relevance:0,variants:[{begin:`(\\b(${digitpart})|(${pointfloat}))[eE][+-]?(${digitpart})[jJ]?(?=${lookahead2})`},{begin:`(${pointfloat})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${lookahead2})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${lookahead2})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${lookahead2})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]\
?(?=${lookahead2})`},{begin:`\\b(${digitpart})[jJ](?=${lookahead2})`}]},COMMENT_TYPE={className:"comment",begin:regex.lookahead(/# type:/),end:/$/,keywords:KEYWORDS2,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},PARAMS={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:KEYWORDS2,contains:["self",PROMPT,NUMBER,STRING,hljs.HASH_COMMENT_MODE]}]};return SUBST.contains=[STRING,NUMBER,PROMPT],{name:"\
Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:KEYWORDS2,illegal:/(<\/|\?)|=>/,contains:[PROMPT,NUMBER,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},STRING,COMMENT_TYPE,hljs.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,IDENT_RE2],scope:{1:"keyword",3:"title.function"},contains:[PARAMS]},{variants:[{match:[/\bclass/,/\s+/,IDENT_RE2,/\s*/,/\(\s*/,IDENT_RE2,/\s*\)/]},{match:[/\bclass/,/\s+/,IDENT_RE2]}],scope:{1:"keyword",
3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[NUMBER,PARAMS,STRING]}]}}return python_1=python2,python_1}var pythonRepl_1,hasRequiredPythonRepl;function requirePythonRepl(){if(hasRequiredPythonRepl)return pythonRepl_1;hasRequiredPythonRepl=1;function pythonRepl2(hljs){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}
return pythonRepl_1=pythonRepl2,pythonRepl_1}var q_1,hasRequiredQ;function requireQ(){if(hasRequiredQ)return q_1;hasRequiredQ=1;function q2(hljs){return{name:"Q",aliases:["k","kdb"],keywords:{$pattern:/(`?)[A-Za-z0-9_]+\b/,keyword:"do while select delete by update from",literal:"0b 1b",built_in:"neg not null string reciprocal floor ceiling signum mod xbar xlog and or each scan over prior mmu lsq inv md5 ltime gtime count first var dev med cov cor all any rand sums prds mins maxs fills deltas rat\
ios avgs differ prev next rank reverse iasc idesc asc desc msum mcount mavg mdev xrank mmin mmax xprev rotate distinct group where flip type key til get value attr cut set upsert raze union inter except cross sv vs sublist enlist read0 read1 hopen hclose hdel hsym hcount peach system ltrim rtrim trim lower upper ssr view tables views cols xcols keys xkey xcol xasc xdesc fkeys meta lj aj aj0 ij pj asof uj ww wj wj1 fby xgroup ungroup ej save load rsave rload show csv parse eval min max avg wavg w\
sum sin cos tan sum",type:"`float `double int `timestamp `timespan `datetime `time `boolean `symbol `char `byte `short `long `real `month `date `minute `second `guid"},contains:[hljs.C_LINE_COMMENT_MODE,hljs.QUOTE_STRING_MODE,hljs.C_NUMBER_MODE]}}return q_1=q2,q_1}var qml_1,hasRequiredQml;function requireQml(){if(hasRequiredQml)return qml_1;hasRequiredQml=1;function qml2(hljs){const regex=hljs.regex,KEYWORDS2={keyword:"in of on if for while finally var new function do return void else break catc\
h instanceof with throw case default try this switch continue typeof delete let yield const export super debugger as async await import",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array In\
t16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document Symbol Set Map WeakSet WeakMap Proxy Reflect Behavior bool color coordinate date double enumeration font geocircle georectangle geoshape int list matrix4x4 parent point quaternion real rect size string url variant vector2d vector3d vector4d Promise"},QML_IDENT_RE="[a-zA-Z_][a-zA-Z0-9\\._]*",PROPERTY={className:"keyword",begin:"\\bproper\
ty\\b",starts:{className:"string",end:"(:|=|;|,|//|/\\*|$)",returnEnd:!0}},SIGNAL={className:"keyword",begin:"\\bsignal\\b",starts:{className:"string",end:"(\\(|:|=|;|,|//|/\\*|$)",returnEnd:!0}},ID_ID={className:"attribute",begin:"\\bid\\s*:",starts:{className:"string",end:QML_IDENT_RE,returnEnd:!1}},QML_ATTRIBUTE={begin:QML_IDENT_RE+"\\s*:",returnBegin:!0,contains:[{className:"attribute",begin:QML_IDENT_RE,end:"\\s*:",excludeEnd:!0,relevance:0}],relevance:0},QML_OBJECT={begin:regex.concat(QML_IDENT_RE,
/\s*\{/),end:/\{/,returnBegin:!0,relevance:0,contains:[hljs.inherit(hljs.TITLE_MODE,{begin:QML_IDENT_RE})]};return{name:"QML",aliases:["qt"],case_insensitive:!1,keywords:KEYWORDS2,contains:[{className:"meta",begin:/^\s*['"]use (strict|asm)['"]/},hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,{className:"string",begin:"`",end:"`",contains:[hljs.BACKSLASH_ESCAPE,{className:"subst",begin:"\\$\\{",end:"\\}"}]},hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,{className:"number",variants:[{begin:"\\b(\
0[bB][01]+)"},{begin:"\\b(0[oO][0-7]+)"},{begin:hljs.C_NUMBER_RE}],relevance:0},{begin:"("+hljs.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",contains:[hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.REGEXP_MODE,{begin:/</,end:/>\s*[);\]]/,relevance:0,subLanguage:"xml"}],relevance:0},SIGNAL,PROPERTY,{className:"function",beginKeywords:"function",end:/\{/,excludeEnd:!0,contains:[hljs.inherit(hljs.TITLE_MODE,{begin:/[A-Za-z$_][0-9A-Za-z$_]*/}),{className:"pa\
rams",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,contains:[hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE]}],illegal:/\[|%/},{begin:"\\."+hljs.IDENT_RE,relevance:0},ID_ID,QML_ATTRIBUTE,QML_OBJECT],illegal:/#/}}return qml_1=qml2,qml_1}var r_1,hasRequiredR;function requireR(){if(hasRequiredR)return r_1;hasRequiredR=1;function r2(hljs){const regex=hljs.regex,IDENT_RE2=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,NUMBER_TYPES_RE=regex.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,
/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),OPERATORS_RE=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,PUNCTUATION_RE=regex.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:IDENT_RE2,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F abs acos \
acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is\
.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[hljs.
COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:regex.lookahead(regex.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:IDENT_RE2},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),hljs.HASH_COMMENT_MODE,{scope:"string",contains:[hljs.BACKSLASH_ESCAPE],variants:[hljs.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,
end:/\)(-*)"/}),hljs.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),hljs.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),hljs.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),hljs.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),hljs.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[OPERATORS_RE,NUMBER_TYPES_RE]},{scope:{1:"operator",2:"\
number"},match:[/%[^%]*%/,NUMBER_TYPES_RE]},{scope:{1:"punctuation",2:"number"},match:[PUNCTUATION_RE,NUMBER_TYPES_RE]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,NUMBER_TYPES_RE]}]},{scope:{3:"operator"},match:[IDENT_RE2,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:OPERATORS_RE},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:PUNCTUATION_RE},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}return r_1=r2,r_1}var reasonml_1,hasRequiredReasonml;function requireReasonml(){
if(hasRequiredReasonml)return reasonml_1;hasRequiredReasonml=1;function reasonml2(hljs){return{name:"ReasonML",aliases:["re"],keywords:{$pattern:/[a-z_]\w*!?/,keyword:["and","as","asr","assert","begin","class","constraint","do","done","downto","else","end","esfun","exception","external","for","fun","function","functor","if","in","include","inherit","initializer","land","lazy","let","lor","lsl","lsr","lxor","mod","module","mutable","new","nonrec","object","of","open","or","pri","pub","rec","sig",
"struct","switch","then","to","try","type","val","virtual","when","while","with"],built_in:["array","bool","bytes","char","exn|5","float","int","int32","int64","list","lazy_t|5","nativeint|5","ref","string","unit"],literal:["true","false"]},illegal:/(:-|:=|\$\{|\+=)/,contains:[{scope:"literal",match:/\[(\|\|)?\]|\(\)/,relevance:0},hljs.C_LINE_COMMENT_MODE,hljs.COMMENT(/\/\*/,/\*\//,{illegal:/^(#,\/\/)/}),{scope:"symbol",match:/\'[A-Za-z_](?!\')[\w\']*/},{scope:"type",match:/`[A-Z][\w\']*/},{scope:"\
type",match:/\b[A-Z][\w\']*/,relevance:0},{match:/[a-z_]\w*\'[\w\']*/,relevance:0},{scope:"operator",match:/\s+(\|\||\+[\+\.]?|\*[\*\/\.]?|\/[\.]?|\.\.\.|\|>|&&|===?)\s+/,relevance:0},hljs.inherit(hljs.APOS_STRING_MODE,{scope:"string",relevance:0}),hljs.inherit(hljs.QUOTE_STRING_MODE,{illegal:null}),{scope:"number",variants:[{match:/\b0[xX][a-fA-F0-9_]+[Lln]?/},{match:/\b0[oO][0-7_]+[Lln]?/},{match:/\b0[bB][01_]+[Lln]?/},{match:/\b[0-9][0-9_]*([Lln]|(\.[0-9_]*)?([eE][-+]?[0-9_]+)?)/}],relevance:0}]}}
return reasonml_1=reasonml2,reasonml_1}var rib_1,hasRequiredRib;function requireRib(){if(hasRequiredRib)return rib_1;hasRequiredRib=1;function rib2(hljs){return{name:"RenderMan RIB",keywords:"ArchiveRecord AreaLightSource Atmosphere Attribute AttributeBegin AttributeEnd Basis Begin Blobby Bound Clipping ClippingPlane Color ColorSamples ConcatTransform Cone CoordinateSystem CoordSysTransform CropWindow Curves Cylinder DepthOfField Detail DetailRange Disk Displacement Display End ErrorHandler Expo\
sure Exterior Format FrameAspectRatio FrameBegin FrameEnd GeneralPolygon GeometricApproximation Geometry Hider Hyperboloid Identity Illuminate Imager Interior LightSource MakeCubeFaceEnvironment MakeLatLongEnvironment MakeShadow MakeTexture Matte MotionBegin MotionEnd NuPatch ObjectBegin ObjectEnd ObjectInstance Opacity Option Orientation Paraboloid Patch PatchMesh Perspective PixelFilter PixelSamples PixelVariance Points PointsGeneralPolygons PointsPolygons Polygon Procedural Projection Quantiz\
e ReadArchive RelativeDetail ReverseOrientation Rotate Scale ScreenWindow ShadingInterpolation ShadingRate Shutter Sides Skew SolidBegin SolidEnd Sphere SubdivisionMesh Surface TextureCoordinates Torus Transform TransformBegin TransformEnd TransformPoints Translate TrimCurve WorldBegin WorldEnd",illegal:"</",contains:[hljs.HASH_COMMENT_MODE,hljs.C_NUMBER_MODE,hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE]}}return rib_1=rib2,rib_1}var roboconf_1,hasRequiredRoboconf;function requireRoboconf(){if(hasRequiredRoboconf)
return roboconf_1;hasRequiredRoboconf=1;function roboconf2(hljs){const IDENTIFIER="[a-zA-Z-_][^\\n{]+\\{",PROPERTY={className:"attribute",begin:/[a-zA-Z-_]+/,end:/\s*:/,excludeEnd:!0,starts:{end:";",relevance:0,contains:[{className:"variable",begin:/\.[a-zA-Z-_]+/},{className:"keyword",begin:/\(optional\)/}]}};return{name:"Roboconf",aliases:["graph","instances"],case_insensitive:!0,keywords:"import",contains:[{begin:"^facet "+IDENTIFIER,end:/\}/,keywords:"facet",contains:[PROPERTY,hljs.HASH_COMMENT_MODE]},
{begin:"^\\s*instance of "+IDENTIFIER,end:/\}/,keywords:"name count channels instance-data instance-state instance of",illegal:/\S/,contains:["self",PROPERTY,hljs.HASH_COMMENT_MODE]},{begin:"^"+IDENTIFIER,end:/\}/,contains:[PROPERTY,hljs.HASH_COMMENT_MODE]},hljs.HASH_COMMENT_MODE]}}return roboconf_1=roboconf2,roboconf_1}var routeros_1,hasRequiredRouteros;function requireRouteros(){if(hasRequiredRouteros)return routeros_1;hasRequiredRouteros=1;function routeros2(hljs){const STATEMENTS="foreach do\
 while for if from to step else on-error and or not in",GLOBAL_COMMANDS="global local beep delay put len typeof pick log time set find environment terminal error execute parse resolve toarray tobool toid toip toip6 tonum tostr totime",COMMON_COMMANDS="add remove enable disable set get print export edit find run debug error info warning",LITERALS2="true false yes no nothing nil null",OBJECTS="traffic-flow traffic-generator firewall scheduler aaa accounting address-list address align area bandwidt\
h-server bfd bgp bridge client clock community config connection console customer default dhcp-client dhcp-server discovery dns e-mail ethernet filter firmware gps graphing group hardware health hotspot identity igmp-proxy incoming instance interface ip ipsec ipv6 irq l2tp-server lcd ldp logging mac-server mac-winbox mangle manual mirror mme mpls nat nd neighbor network note ntp ospf ospf-v3 ovpn-server page peer pim ping policy pool port ppp pppoe-client pptp-server prefix profile proposal prox\
y queue radius resource rip ripng route routing screen script security-profiles server service service-port settings shares smb sms sniffer snmp snooper socks sstp-server system tool tracking type upgrade upnp user-manager users user vlan secret vrrp watchdog web-access wireless pptp pppoe lan wan layer7-protocol lease simple raw",VAR={className:"variable",variants:[{begin:/\$[\w\d#@][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},QUOTE_STRING={className:"string",begin:/"/,end:/"/,contains:[hljs.BACKSLASH_ESCAPE,
VAR,{className:"variable",begin:/\$\(/,end:/\)/,contains:[hljs.BACKSLASH_ESCAPE]}]},APOS_STRING={className:"string",begin:/'/,end:/'/};return{name:"MikroTik RouterOS script",aliases:["mikrotik"],case_insensitive:!0,keywords:{$pattern:/:?[\w-]+/,literal:LITERALS2,keyword:STATEMENTS+" :"+STATEMENTS.split(" ").join(" :")+" :"+GLOBAL_COMMANDS.split(" ").join(" :")},contains:[{variants:[{begin:/\/\*/,end:/\*\//},{begin:/\/\//,end:/$/},{begin:/<\//,end:/>/}],illegal:/./},hljs.COMMENT("^#","$"),QUOTE_STRING,
APOS_STRING,VAR,{begin:/[\w-]+=([^\s{}[\]()>]+)/,relevance:0,returnBegin:!0,contains:[{className:"attribute",begin:/[^=]+/},{begin:/=/,endsWithParent:!0,relevance:0,contains:[QUOTE_STRING,APOS_STRING,VAR,{className:"literal",begin:"\\b("+LITERALS2.split(" ").join("|")+")\\b"},{begin:/("[^"]*"|[^\s{}[\]]+)/}]}]},{className:"number",begin:/\*[0-9a-fA-F]+/},{begin:"\\b("+COMMON_COMMANDS.split(" ").join("|")+")([\\s[(\\]|])",returnBegin:!0,contains:[{className:"built_in",begin:/\w+/}]},{className:"b\
uilt_in",variants:[{begin:"(\\.\\./|/|\\s)(("+OBJECTS.split(" ").join("|")+");?\\s)+"},{begin:/\.\./,relevance:0}]}]}}return routeros_1=routeros2,routeros_1}var rsl_1,hasRequiredRsl;function requireRsl(){if(hasRequiredRsl)return rsl_1;hasRequiredRsl=1;function rsl2(hljs){const BUILT_INS2=["abs","acos","ambient","area","asin","atan","atmosphere","attribute","calculatenormal","ceil","cellnoise","clamp","comp","concat","cos","degrees","depth","Deriv","diffuse","distance","Du","Dv","environment","ex\
p","faceforward","filterstep","floor","format","fresnel","incident","length","lightsource","log","match","max","min","mod","noise","normalize","ntransform","opposite","option","phong","pnoise","pow","printf","ptlined","radians","random","reflect","refract","renderinfo","round","setcomp","setxcomp","setycomp","setzcomp","shadow","sign","sin","smoothstep","specular","specularbrdf","spline","sqrt","step","tan","texture","textureinfo","trace","transform","vtransform","xcomp","ycomp","zcomp"],TYPES2=[
"matrix","float","color","point","normal","vector"],KEYWORDS2=["while","for","if","do","return","else","break","extern","continue"],CLASS_DEFINITION={match:[/(surface|displacement|light|volume|imager)/,/\s+/,hljs.IDENT_RE],scope:{1:"keyword",3:"title.class"}};return{name:"RenderMan RSL",keywords:{keyword:KEYWORDS2,built_in:BUILT_INS2,type:TYPES2},illegal:"</",contains:[hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.QUOTE_STRING_MODE,hljs.APOS_STRING_MODE,hljs.C_NUMBER_MODE,{className:"m\
eta",begin:"#",end:"$"},CLASS_DEFINITION,{beginKeywords:"illuminate illuminance gather",end:"\\("}]}}return rsl_1=rsl2,rsl_1}var ruleslanguage_1,hasRequiredRuleslanguage;function requireRuleslanguage(){if(hasRequiredRuleslanguage)return ruleslanguage_1;hasRequiredRuleslanguage=1;function ruleslanguage2(hljs){return{name:"Oracle Rules Language",keywords:{keyword:"BILL_PERIOD BILL_START BILL_STOP RS_EFFECTIVE_START RS_EFFECTIVE_STOP RS_JURIS_CODE RS_OPCO_CODE INTDADDATTRIBUTE|5 INTDADDVMSG|5 INTDB\
LOCKOP|5 INTDBLOCKOPNA|5 INTDCLOSE|5 INTDCOUNT|5 INTDCOUNTSTATUSCODE|5 INTDCREATEMASK|5 INTDCREATEDAYMASK|5 INTDCREATEFACTORMASK|5 INTDCREATEHANDLE|5 INTDCREATEOVERRIDEDAYMASK|5 INTDCREATEOVERRIDEMASK|5 INTDCREATESTATUSCODEMASK|5 INTDCREATETOUPERIOD|5 INTDDELETE|5 INTDDIPTEST|5 INTDEXPORT|5 INTDGETERRORCODE|5 INTDGETERRORMESSAGE|5 INTDISEQUAL|5 INTDJOIN|5 INTDLOAD|5 INTDLOADACTUALCUT|5 INTDLOADDATES|5 INTDLOADHIST|5 INTDLOADLIST|5 INTDLOADLISTDATES|5 INTDLOADLISTENERGY|5 INTDLOADLISTHIST|5 INTDL\
OADRELATEDCHANNEL|5 INTDLOADSP|5 INTDLOADSTAGING|5 INTDLOADUOM|5 INTDLOADUOMDATES|5 INTDLOADUOMHIST|5 INTDLOADVERSION|5 INTDOPEN|5 INTDREADFIRST|5 INTDREADNEXT|5 INTDRECCOUNT|5 INTDRELEASE|5 INTDREPLACE|5 INTDROLLAVG|5 INTDROLLPEAK|5 INTDSCALAROP|5 INTDSCALE|5 INTDSETATTRIBUTE|5 INTDSETDSTPARTICIPANT|5 INTDSETSTRING|5 INTDSETVALUE|5 INTDSETVALUESTATUS|5 INTDSHIFTSTARTTIME|5 INTDSMOOTH|5 INTDSORT|5 INTDSPIKETEST|5 INTDSUBSET|5 INTDTOU|5 INTDTOURELEASE|5 INTDTOUVALUE|5 INTDUPDATESTATS|5 INTDVALUE|\
5 STDEV INTDDELETEEX|5 INTDLOADEXACTUAL|5 INTDLOADEXCUT|5 INTDLOADEXDATES|5 INTDLOADEX|5 INTDLOADEXRELATEDCHANNEL|5 INTDSAVEEX|5 MVLOAD|5 MVLOADACCT|5 MVLOADACCTDATES|5 MVLOADACCTHIST|5 MVLOADDATES|5 MVLOADHIST|5 MVLOADLIST|5 MVLOADLISTDATES|5 MVLOADLISTHIST|5 IF FOR NEXT DONE SELECT END CALL ABORT CLEAR CHANNEL FACTOR LIST NUMBER OVERRIDE SET WEEK DISTRIBUTIONNODE ELSE WHEN THEN OTHERWISE IENUM CSV INCLUDE LEAVE RIDER SAVE DELETE NOVALUE SECTION WARN SAVE_UPDATE DETERMINANT LABEL REPORT REVENUE\
 EACH IN FROM TOTAL CHARGE BLOCK AND OR CSV_FILE RATE_CODE AUXILIARY_DEMAND UIDACCOUNT RS BILL_PERIOD_SELECT HOURS_PER_MONTH INTD_ERROR_STOP SEASON_SCHEDULE_NAME ACCOUNTFACTOR ARRAYUPPERBOUND CALLSTOREDPROC GETADOCONNECTION GETCONNECT GETDATASOURCE GETQUALIFIER GETUSERID HASVALUE LISTCOUNT LISTOP LISTUPDATE LISTVALUE PRORATEFACTOR RSPRORATE SETBINPATH SETDBMONITOR WQ_OPEN BILLINGHOURS DATE DATEFROMFLOAT DATETIMEFROMSTRING DATETIMETOSTRING DATETOFLOAT DAY DAYDIFF DAYNAME DBDATETIME HOUR MINUTE MO\
NTH MONTHDIFF MONTHHOURS MONTHNAME ROUNDDATE SAMEWEEKDAYLASTYEAR SECOND WEEKDAY WEEKDIFF YEAR YEARDAY YEARSTR COMPSUM HISTCOUNT HISTMAX HISTMIN HISTMINNZ HISTVALUE MAXNRANGE MAXRANGE MINRANGE COMPIKVA COMPKVA COMPKVARFROMKQKW COMPLF IDATTR FLAG LF2KW LF2KWH MAXKW POWERFACTOR READING2USAGE AVGSEASON MAXSEASON MONTHLYMERGE SEASONVALUE SUMSEASON ACCTREADDATES ACCTTABLELOAD CONFIGADD CONFIGGET CREATEOBJECT CREATEREPORT EMAILCLIENT EXPBLKMDMUSAGE EXPMDMUSAGE EXPORT_USAGE FACTORINEFFECT GETUSERSPECIFI\
EDSTOP INEFFECT ISHOLIDAY RUNRATE SAVE_PROFILE SETREPORTTITLE USEREXIT WATFORRUNRATE TO TABLE ACOS ASIN ATAN ATAN2 BITAND CEIL COS COSECANT COSH COTANGENT DIVQUOT DIVREM EXP FABS FLOOR FMOD FREPM FREXPN LOG LOG10 MAX MAXN MIN MINNZ MODF POW ROUND ROUND2VALUE ROUNDINT SECANT SIN SINH SQROOT TAN TANH FLOAT2STRING FLOAT2STRINGNC INSTR LEFT LEN LTRIM MID RIGHT RTRIM STRING STRINGNC TOLOWER TOUPPER TRIM NUMDAYS READ_DATE STAGING",built_in:"IDENTIFIER OPTIONS XML_ELEMENT XML_OP XML_ELEMENT_OF DOMDOCCR\
EATE DOMDOCLOADFILE DOMDOCLOADXML DOMDOCSAVEFILE DOMDOCGETROOT DOMDOCADDPI DOMNODEGETNAME DOMNODEGETTYPE DOMNODEGETVALUE DOMNODEGETCHILDCT DOMNODEGETFIRSTCHILD DOMNODEGETSIBLING DOMNODECREATECHILDELEMENT DOMNODESETATTRIBUTE DOMNODEGETCHILDELEMENTCT DOMNODEGETFIRSTCHILDELEMENT DOMNODEGETSIBLINGELEMENT DOMNODEGETATTRIBUTECT DOMNODEGETATTRIBUTEI DOMNODEGETATTRIBUTEBYNAME DOMNODEGETBYNAME"},contains:[hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,hljs.
C_NUMBER_MODE,{className:"literal",variants:[{begin:"#\\s+",relevance:0},{begin:"#[a-zA-Z .]+"}]}]}}return ruleslanguage_1=ruleslanguage2,ruleslanguage_1}var rust_1,hasRequiredRust;function requireRust(){if(hasRequiredRust)return rust_1;hasRequiredRust=1;function rust2(hljs){const regex=hljs.regex,RAW_IDENTIFIER=/(r#)?/,UNDERSCORE_IDENT_RE=regex.concat(RAW_IDENTIFIER,hljs.UNDERSCORE_IDENT_RE),IDENT_RE2=regex.concat(RAW_IDENTIFIER,hljs.IDENT_RE),FUNCTION_INVOKE={className:"title.function.invoke",
relevance:0,begin:regex.concat(/\b/,/(?!let|for|while|if|else|match\b)/,IDENT_RE2,regex.lookahead(/\s*\(/))},NUMBER_SUFFIX="([ui](8|16|32|64|128|size)|f(32|64))?",KEYWORDS2=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","u\
nion","unsafe","unsized","use","virtual","where","while","yield"],LITERALS2=["true","false","Some","None","Ok","Err"],BUILTINS=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!",
"debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],TYPES2=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:[
"rs"],keywords:{$pattern:hljs.IDENT_RE+"!?",type:TYPES2,keyword:KEYWORDS2,literal:LITERALS2,built_in:BUILTINS},illegal:"</",contains:[hljs.C_LINE_COMMENT_MODE,hljs.COMMENT("/\\*","\\*/",{contains:["self"]}),hljs.inherit(hljs.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*(?!')/},{scope:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'/,end:/'/,contains:[{scope:"char.escape",match:/\\('|\w|x\w{2}|u\w{4}|U\w{8})/}]}]},{className:"num\
ber",variants:[{begin:"\\b0b([01_]+)"+NUMBER_SUFFIX},{begin:"\\b0o([0-7_]+)"+NUMBER_SUFFIX},{begin:"\\b0x([A-Fa-f0-9_]+)"+NUMBER_SUFFIX},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+NUMBER_SUFFIX}],relevance:0},{begin:[/fn/,/\s+/,UNDERSCORE_IDENT_RE],className:{1:"keyword",3:"title.function"}},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"string",begin:/"/,end:/"/,contains:[hljs.BACKSLASH_ESCAPE]}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,UNDERSCORE_IDENT_RE],className:{
1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,UNDERSCORE_IDENT_RE,/\s+/,/in/],className:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,UNDERSCORE_IDENT_RE],className:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,UNDERSCORE_IDENT_RE],className:{1:"keyword",3:"title.class"}},{begin:hljs.IDENT_RE+"::",keywords:{keyword:"Self",built_in:BUILTINS,type:TYPES2}},{className:"punctuation",begin:"->"},FUNCTION_INVOKE]}}return rust_1=rust2,rust_1}
var sas_1,hasRequiredSas;function requireSas(){if(hasRequiredSas)return sas_1;hasRequiredSas=1;function sas2(hljs){const regex=hljs.regex,SAS_KEYWORDS=["do","if","then","else","end","until","while","abort","array","attrib","by","call","cards","cards4","catname","continue","datalines","datalines4","delete","delim","delimiter","display","dm","drop","endsas","error","file","filename","footnote","format","goto","in","infile","informat","input","keep","label","leave","length","libname","link","list",
"lostcard","merge","missing","modify","options","output","out","page","put","redirect","remove","rename","replace","retain","return","select","set","skip","startsas","stop","title","update","waitsas","where","window","x|0","systask","add","and","alter","as","cascade","check","create","delete","describe","distinct","drop","foreign","from","group","having","index","insert","into","in","key","like","message","modify","msgtype","not","null","on","or","order","primary","references","reset","restrict",
"select","set","table","unique","update","validate","view","where"],FUNCTIONS=["abs","addr","airy","arcos","arsin","atan","attrc","attrn","band","betainv","blshift","bnot","bor","brshift","bxor","byte","cdf","ceil","cexist","cinv","close","cnonct","collate","compbl","compound","compress","cos","cosh","css","curobs","cv","daccdb","daccdbsl","daccsl","daccsyd","dacctab","dairy","date","datejul","datepart","datetime","day","dclose","depdb","depdbsl","depdbsl","depsl","depsl","depsyd","depsyd","dept\
ab","deptab","dequote","dhms","dif","digamma","dim","dinfo","dnum","dopen","doptname","doptnum","dread","dropnote","dsname","erf","erfc","exist","exp","fappend","fclose","fcol","fdelete","fetch","fetchobs","fexist","fget","fileexist","filename","fileref","finfo","finv","fipname","fipnamel","fipstate","floor","fnonct","fnote","fopen","foptname","foptnum","fpoint","fpos","fput","fread","frewind","frlen","fsep","fuzz","fwrite","gaminv","gamma","getoption","getvarc","getvarn","hbound","hms","hosthel\
p","hour","ibessel","index","indexc","indexw","input","inputc","inputn","int","intck","intnx","intrr","irr","jbessel","juldate","kurtosis","lag","lbound","left","length","lgamma","libname","libref","log","log10","log2","logpdf","logpmf","logsdf","lowcase","max","mdy","mean","min","minute","mod","month","mopen","mort","n","netpv","nmiss","normal","note","npv","open","ordinal","pathname","pdf","peek","peekc","pmf","point","poisson","poke","probbeta","probbnml","probchi","probf","probgam","probhypr",
"probit","probnegb","probnorm","probt","put","putc","putn","qtr","quote","ranbin","rancau","ranexp","rangam","range","rank","rannor","ranpoi","rantbl","rantri","ranuni","repeat","resolve","reverse","rewind","right","round","saving","scan","sdf","second","sign","sin","sinh","skewness","soundex","spedis","sqrt","std","stderr","stfips","stname","stnamel","substr","sum","symget","sysget","sysmsg","sysprod","sysrc","system","tan","tanh","time","timepart","tinv","tnonct","today","translate","tranwrd",
"trigamma","trim","trimn","trunc","uniform","upcase","uss","var","varfmt","varinfmt","varlabel","varlen","varname","varnum","varray","varrayx","vartype","verify","vformat","vformatd","vformatdx","vformatn","vformatnx","vformatw","vformatwx","vformatx","vinarray","vinarrayx","vinformat","vinformatd","vinformatdx","vinformatn","vinformatnx","vinformatw","vinformatwx","vinformatx","vlabel","vlabelx","vlength","vlengthx","vname","vnamex","vtype","vtypex","weekday","year","yyq","zipfips","zipname","z\
ipnamel","zipstate"],MACRO_FUNCTIONS=["bquote","nrbquote","cmpres","qcmpres","compstor","datatyp","display","do","else","end","eval","global","goto","if","index","input","keydef","label","left","length","let","local","lowcase","macro","mend","nrbquote","nrquote","nrstr","put","qcmpres","qleft","qlowcase","qscan","qsubstr","qsysfunc","qtrim","quote","qupcase","scan","str","substr","superq","syscall","sysevalf","sysexec","sysfunc","sysget","syslput","sysprod","sysrc","sysrput","then","to","trim","\
unquote","until","upcase","verify","while","window"];return{name:"SAS",case_insensitive:!0,keywords:{literal:["null","missing","_all_","_automatic_","_character_","_infile_","_n_","_name_","_null_","_numeric_","_user_","_webout_"],keyword:SAS_KEYWORDS},contains:[{className:"keyword",begin:/^\s*(proc [\w\d_]+|data|run|quit)[\s;]/},{className:"variable",begin:/&[a-zA-Z_&][a-zA-Z0-9_]*\.?/},{begin:[/^\s*/,/datalines;|cards;/,/(?:.*\n)+/,/^\s*;\s*$/],className:{2:"keyword",3:"string"}},{begin:[/%mend|%macro/,
/\s+/,/[a-zA-Z_&][a-zA-Z0-9_]*/],className:{1:"built_in",3:"title.function"}},{className:"built_in",begin:"%"+regex.either(...MACRO_FUNCTIONS)},{className:"title.function",begin:/%[a-zA-Z_][a-zA-Z_0-9]*/},{className:"meta",begin:regex.either(...FUNCTIONS)+"(?=\\()"},{className:"string",variants:[hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE]},hljs.COMMENT("\\*",";"),hljs.C_BLOCK_COMMENT_MODE]}}return sas_1=sas2,sas_1}var scala_1,hasRequiredScala;function requireScala(){if(hasRequiredScala)return scala_1;
hasRequiredScala=1;function scala2(hljs){const regex=hljs.regex,ANNOTATION={className:"meta",begin:"@[A-Za-z]+"},SUBST={className:"subst",variants:[{begin:"\\$[A-Za-z0-9_]+"},{begin:/\$\{/,end:/\}/}]},STRING={className:"string",variants:[{begin:'"""',end:'"""'},{begin:'"',end:'"',illegal:"\\n",contains:[hljs.BACKSLASH_ESCAPE]},{begin:'[a-z]+"',end:'"',illegal:"\\n",contains:[hljs.BACKSLASH_ESCAPE,SUBST]},{className:"string",begin:'[a-z]+"""',end:'"""',contains:[SUBST],relevance:10}]},TYPE={className:"\
type",begin:"\\b[A-Z][A-Za-z0-9_]*",relevance:0},NAME={className:"title",begin:/[^0-9\n\t "'(),.`{}\[\]:;][^\n\t "'(),.`{}\[\]:;]+|[^0-9\n\t "'(),.`{}\[\]:;=]/,relevance:0},CLASS2={className:"class",beginKeywords:"class object trait type",end:/[:={\[\n;]/,excludeEnd:!0,contains:[hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,{beginKeywords:"extends with",relevance:10},{begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0,relevance:0,contains:[TYPE,hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE]},
{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,relevance:0,contains:[TYPE,hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE]},NAME]},METHOD={className:"function",beginKeywords:"def",end:regex.lookahead(/[:={\[(\n;]/),contains:[NAME]},EXTENSION={begin:[/^\s*/,"extension",/\s+(?=[[(])/],beginScope:{2:"keyword"}},END2={begin:[/^\s*/,/end/,/\s+/,/(extension\b)?/],beginScope:{2:"keyword",4:"keyword"}},INLINE_MODES=[{match:/\.inline\b/},{begin:/\binline(?=\s)/,keywords:"inline"}],
USING_PARAM_CLAUSE={begin:[/\(\s*/,/using/,/\s+(?!\))/],beginScope:{2:"keyword"}};return{name:"Scala",keywords:{literal:"true false null",keyword:"type yield lazy override def with val var sealed abstract private trait object if then forSome for while do throw finally protected extends import final return else break new catch super class case package default try this match continue throws implicit export enum given transparent"},contains:[{begin:["//>",/\s+/,/using/,/\s+/,/\S+/],beginScope:{1:"c\
omment",3:"keyword",5:"type"},end:/$/,contains:[{className:"string",begin:/\S+/}]},hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,STRING,TYPE,METHOD,CLASS2,hljs.C_NUMBER_MODE,EXTENSION,END2,...INLINE_MODES,USING_PARAM_CLAUSE,ANNOTATION]}}return scala_1=scala2,scala_1}var scheme_1,hasRequiredScheme;function requireScheme(){if(hasRequiredScheme)return scheme_1;hasRequiredScheme=1;function scheme2(hljs){const SCHEME_IDENT_RE="[^\\(\\)\\[\\]\\{\\}\",'`;#|\\\\\\s]+",SCHEME_SIMPLE_NUMBER_RE="(-|\\+\
)?\\d+([./]\\d+)?",SCHEME_COMPLEX_NUMBER_RE=SCHEME_SIMPLE_NUMBER_RE+"[+\\-]"+SCHEME_SIMPLE_NUMBER_RE+"i",KEYWORDS2={$pattern:SCHEME_IDENT_RE,built_in:"case-lambda call/cc class define-class exit-handler field import inherit init-field interface let*-values let-values let/ec mixin opt-lambda override protect provide public rename require require-for-syntax syntax syntax-case syntax-error unit/sig unless when with-syntax and begin call-with-current-continuation call-with-input-file call-with-outpu\
t-file case cond define define-syntax delay do dynamic-wind else for-each if lambda let let* let-syntax letrec letrec-syntax map or syntax-rules ' * + , ,@ - ... / ; < <= = => > >= ` abs acos angle append apply asin assoc assq assv atan boolean? caar cadr call-with-input-file call-with-output-file call-with-values car cdddar cddddr cdr ceiling char->integer char-alphabetic? char-ci<=? char-ci<? char-ci=? char-ci>=? char-ci>? char-downcase char-lower-case? char-numeric? char-ready? char-upcase ch\
ar-upper-case? char-whitespace? char<=? char<? char=? char>=? char>? char? close-input-port close-output-port complex? cons cos current-input-port current-output-port denominator display eof-object? eq? equal? eqv? eval even? exact->inexact exact? exp expt floor force gcd imag-part inexact->exact inexact? input-port? integer->char integer? interaction-environment lcm length list list->string list->vector list-ref list-tail list? load log magnitude make-polar make-rectangular make-string make-vec\
tor max member memq memv min modulo negative? newline not null-environment null? number->string number? numerator odd? open-input-file open-output-file output-port? pair? peek-char port? positive? procedure? quasiquote quote quotient rational? rationalize read read-char real-part real? remainder reverse round scheme-report-environment set! set-car! set-cdr! sin sqrt string string->list string->number string->symbol string-append string-ci<=? string-ci<? string-ci=? string-ci>=? string-ci>? strin\
g-copy string-fill! string-length string-ref string-set! string<=? string<? string=? string>=? string>? string? substring symbol->string symbol? tan transcript-off transcript-on truncate values vector vector->list vector-fill! vector-length vector-ref vector-set! with-input-from-file with-output-to-file write write-char zero?"},LITERAL={className:"literal",begin:"(#t|#f|#\\\\"+SCHEME_IDENT_RE+"|#\\\\.)"},NUMBER={className:"number",variants:[{begin:SCHEME_SIMPLE_NUMBER_RE,relevance:0},{begin:SCHEME_COMPLEX_NUMBER_RE,
relevance:0},{begin:"#b[0-1]+(/[0-1]+)?"},{begin:"#o[0-7]+(/[0-7]+)?"},{begin:"#x[0-9a-f]+(/[0-9a-f]+)?"}]},STRING=hljs.QUOTE_STRING_MODE,COMMENT_MODES=[hljs.COMMENT(";","$",{relevance:0}),hljs.COMMENT("#\\|","\\|#")],IDENT={begin:SCHEME_IDENT_RE,relevance:0},QUOTED_IDENT={className:"symbol",begin:"'"+SCHEME_IDENT_RE},BODY={endsWithParent:!0,relevance:0},QUOTED_LIST={variants:[{begin:/'/},{begin:"`"}],contains:[{begin:"\\(",end:"\\)",contains:["self",LITERAL,STRING,NUMBER,IDENT,QUOTED_IDENT]}]},
NAME={className:"name",relevance:0,begin:SCHEME_IDENT_RE,keywords:KEYWORDS2},LIST={variants:[{begin:"\\(",end:"\\)"},{begin:"\\[",end:"\\]"}],contains:[{begin:/lambda/,endsWithParent:!0,returnBegin:!0,contains:[NAME,{endsParent:!0,variants:[{begin:/\(/,end:/\)/},{begin:/\[/,end:/\]/}],contains:[IDENT]}]},NAME,BODY]};return BODY.contains=[LITERAL,NUMBER,STRING,IDENT,QUOTED_IDENT,QUOTED_LIST,LIST].concat(COMMENT_MODES),{name:"Scheme",aliases:["scm"],illegal:/\S/,contains:[hljs.SHEBANG(),NUMBER,STRING,
QUOTED_IDENT,QUOTED_LIST,LIST].concat(COMMENT_MODES)}}return scheme_1=scheme2,scheme_1}var scilab_1,hasRequiredScilab;function requireScilab(){if(hasRequiredScilab)return scilab_1;hasRequiredScilab=1;function scilab2(hljs){const COMMON_CONTAINS=[hljs.C_NUMBER_MODE,{className:"string",begin:`'|"`,end:`'|"`,contains:[hljs.BACKSLASH_ESCAPE,{begin:"''"}]}];return{name:"Scilab",aliases:["sci"],keywords:{$pattern:/%?\w+/,keyword:"abort break case clear catch continue do elseif else endfunction end for\
 function global if pause return resume select try then while",literal:"%f %F %t %T %pi %eps %inf %nan %e %i %z %s",built_in:"abs and acos asin atan ceil cd chdir clearglobal cosh cos cumprod deff disp error exec execstr exists exp eye gettext floor fprintf fread fsolve imag isdef isempty isinfisnan isvector lasterror length load linspace list listfiles log10 log2 log max min msprintf mclose mopen ones or pathconvert poly printf prod pwd rand real round sinh sin size gsort sprintf sqrt strcat st\
rcmps tring sum system tanh tan type typename warning zeros matrix"},illegal:'("|#|/\\*|\\s+/\\w+)',contains:[{className:"function",beginKeywords:"function",end:"$",contains:[hljs.UNDERSCORE_TITLE_MODE,{className:"params",begin:"\\(",end:"\\)"}]},{begin:"[a-zA-Z_][a-zA-Z_0-9]*[\\.']+",relevance:0},{begin:"\\[",end:"\\][\\.']*",relevance:0,contains:COMMON_CONTAINS},hljs.COMMENT("//","$")].concat(COMMON_CONTAINS)}}return scilab_1=scilab2,scilab_1}var scss_1,hasRequiredScss;function requireScss(){if(hasRequiredScss)
return scss_1;hasRequiredScss=1;const MODES2=hljs=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:hljs.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:hljs.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vm\
ax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),HTML_TAGS2=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark",
"menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],SVG_TAGS2=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecul\
arLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],TAGS2=[...HTML_TAGS2,...SVG_TAGS2],MEDIA_FEATURES2=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-bl\
ock","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),PSEUDO_CLASSES2=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context",
"hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),PSEUDO_ELEMENTS2=["after","backdrop","before","cue","cue-region","first\
-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),ATTRIBUTES2=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-t\
imeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","borde\
r-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image\
-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-rad\
ius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","col\
or-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","count\
er-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-sm\
ooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","gri\
d-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-blo\
ck-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin\
-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","mi\
n-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behav\
ior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position",
"position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scr\
oll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","\
stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-positio\
n","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unic\
ode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function scss2(hljs){const modes2=MODES2(
hljs),PSEUDO_ELEMENTS$12=PSEUDO_ELEMENTS2,PSEUDO_CLASSES$12=PSEUDO_CLASSES2,AT_IDENTIFIER="@[a-z-]+",AT_MODIFIERS="and or not only",VARIABLE={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,modes2.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},modes2.ATTRIBUTE_SELECTOR_MODE,
{className:"selector-tag",begin:"\\b("+TAGS2.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+PSEUDO_CLASSES$12.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+PSEUDO_ELEMENTS$12.join("|")+")"},VARIABLE,{begin:/\(/,end:/\)/,contains:[modes2.CSS_NUMBER_MODE]},modes2.CSS_VARIABLE,{className:"attribute",begin:"\\b("+ATTRIBUTES2.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|\
transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|l\
eft|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|a\
lways|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[modes2.BLOCK_COMMENT,VARIABLE,modes2.HEXCOLOR,modes2.CSS_NUMBER_MODE,hljs.QUOTE_STRING_MODE,hljs.APOS_STRING_MODE,modes2.IMPORTANT,modes2.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:AT_IDENTIFIER,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:AT_MODIFIERS,attribute:MEDIA_FEATURES2.join(" ")},contains:[{begin:AT_IDENTIFIER,className:"\
keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},VARIABLE,hljs.QUOTE_STRING_MODE,hljs.APOS_STRING_MODE,modes2.HEXCOLOR,modes2.CSS_NUMBER_MODE]},modes2.FUNCTION_DISPATCH]}}return scss_1=scss2,scss_1}var shell_1,hasRequiredShell;function requireShell(){if(hasRequiredShell)return shell_1;hasRequiredShell=1;function shell2(hljs){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,
subLanguage:"bash"}}]}}return shell_1=shell2,shell_1}var smali_1,hasRequiredSmali;function requireSmali(){if(hasRequiredSmali)return smali_1;hasRequiredSmali=1;function smali2(hljs){const smali_instr_low_prio=["add","and","cmp","cmpg","cmpl","const","div","double","float","goto","if","int","long","move","mul","neg","new","nop","not","or","rem","return","shl","shr","sput","sub","throw","ushr","xor"],smali_instr_high_prio=["aget","aput","array","check","execute","fill","filled","goto/16","goto/32",
"iget","instance","invoke","iput","monitor","packed","sget","sparse"],smali_keywords=["transient","constructor","abstract","final","synthetic","public","private","protected","static","bridge","system"];return{name:"Smali",contains:[{className:"string",begin:'"',end:'"',relevance:0},hljs.COMMENT("#","$",{relevance:0}),{className:"keyword",variants:[{begin:"\\s*\\.end\\s[a-zA-Z0-9]*"},{begin:"^[ ]*\\.[a-zA-Z]*",relevance:0},{begin:"\\s:[a-zA-Z_0-9]*",relevance:0},{begin:"\\s("+smali_keywords.join(
"|")+")"}]},{className:"built_in",variants:[{begin:"\\s("+smali_instr_low_prio.join("|")+")\\s"},{begin:"\\s("+smali_instr_low_prio.join("|")+")((-|/)[a-zA-Z0-9]+)+\\s",relevance:10},{begin:"\\s("+smali_instr_high_prio.join("|")+")((-|/)[a-zA-Z0-9]+)*\\s",relevance:10}]},{className:"class",begin:`L[^(;:
]*;`,relevance:0},{begin:"[vp][0-9]+"}]}}return smali_1=smali2,smali_1}var smalltalk_1,hasRequiredSmalltalk;function requireSmalltalk(){if(hasRequiredSmalltalk)return smalltalk_1;hasRequiredSmalltalk=1;function smalltalk2(hljs){const VAR_IDENT_RE="[a-z][a-zA-Z0-9_]*",CHAR={className:"string",begin:"\\$.{1}"},SYMBOL={className:"symbol",begin:"#"+hljs.UNDERSCORE_IDENT_RE};return{name:"Smalltalk",aliases:["st"],keywords:["self","super","nil","true","false","thisContext"],contains:[hljs.COMMENT('"',
'"'),hljs.APOS_STRING_MODE,{className:"type",begin:"\\b[A-Z][A-Za-z0-9_]*",relevance:0},{begin:VAR_IDENT_RE+":",relevance:0},hljs.C_NUMBER_MODE,SYMBOL,CHAR,{begin:"\\|[ ]*"+VAR_IDENT_RE+"([ ]+"+VAR_IDENT_RE+")*[ ]*\\|",returnBegin:!0,end:/\|/,illegal:/\S/,contains:[{begin:"(\\|[ ]*)?"+VAR_IDENT_RE}]},{begin:"#\\(",end:"\\)",contains:[hljs.APOS_STRING_MODE,CHAR,hljs.C_NUMBER_MODE,SYMBOL]}]}}return smalltalk_1=smalltalk2,smalltalk_1}var sml_1,hasRequiredSml;function requireSml(){if(hasRequiredSml)
return sml_1;hasRequiredSml=1;function sml2(hljs){return{name:"SML (Standard ML)",aliases:["ml"],keywords:{$pattern:"[a-z_]\\w*!?",keyword:"abstype and andalso as case datatype do else end eqtype exception fn fun functor handle if in include infix infixr let local nonfix of op open orelse raise rec sharing sig signature struct structure then type val with withtype where while",built_in:"array bool char exn int list option order real ref string substring vector unit word",literal:"true false NONE\
 SOME LESS EQUAL GREATER nil"},illegal:/\/\/|>>/,contains:[{className:"literal",begin:/\[(\|\|)?\]|\(\)/,relevance:0},hljs.COMMENT("\\(\\*","\\*\\)",{contains:["self"]}),{className:"symbol",begin:"'[A-Za-z_](?!')[\\w']*"},{className:"type",begin:"`[A-Z][\\w']*"},{className:"type",begin:"\\b[A-Z][\\w']*",relevance:0},{begin:"[a-z_]\\w*'[\\w']*"},hljs.inherit(hljs.APOS_STRING_MODE,{className:"string",relevance:0}),hljs.inherit(hljs.QUOTE_STRING_MODE,{illegal:null}),{className:"number",begin:"\\b(0[\
xX][a-fA-F0-9_]+[Lln]?|0[oO][0-7_]+[Lln]?|0[bB][01_]+[Lln]?|[0-9][0-9_]*([Lln]|(\\.[0-9_]*)?([eE][-+]?[0-9_]+)?)?)",relevance:0},{begin:/[-=]>/}]}}return sml_1=sml2,sml_1}var sqf_1,hasRequiredSqf;function requireSqf(){if(hasRequiredSqf)return sqf_1;hasRequiredSqf=1;function sqf2(hljs){const VARIABLE={className:"variable",begin:/\b_+[a-zA-Z]\w*/},FUNCTION={className:"title",begin:/[a-zA-Z][a-zA-Z_0-9]*_fnc_[a-zA-Z_0-9]+/},STRINGS={className:"string",variants:[{begin:'"',end:'"',contains:[{begin:'\
""',relevance:0}]},{begin:"'",end:"'",contains:[{begin:"''",relevance:0}]}]},KEYWORDS2=["break","breakWith","breakOut","breakTo","case","catch","continue","continueWith","default","do","else","exit","exitWith","for","forEach","from","if","local","private","switch","step","then","throw","to","try","waitUntil","while","with"],LITERAL=["blufor","civilian","configNull","controlNull","displayNull","diaryRecordNull","east","endl","false","grpNull","independent","lineBreak","locationNull","nil","objNul\
l","opfor","pi","resistance","scriptNull","sideAmbientLife","sideEmpty","sideEnemy","sideFriendly","sideLogic","sideUnknown","taskNull","teamMemberNull","true","west"],BUILT_IN=["abs","accTime","acos","action","actionIDs","actionKeys","actionKeysEx","actionKeysImages","actionKeysNames","actionKeysNamesArray","actionName","actionParams","activateAddons","activatedAddons","activateKey","activeTitleEffectParams","add3DENConnection","add3DENEventHandler","add3DENLayer","addAction","addBackpack","add\
BackpackCargo","addBackpackCargoGlobal","addBackpackGlobal","addBinocularItem","addCamShake","addCuratorAddons","addCuratorCameraArea","addCuratorEditableObjects","addCuratorEditingArea","addCuratorPoints","addEditorObject","addEventHandler","addForce","addForceGeneratorRTD","addGoggles","addGroupIcon","addHandgunItem","addHeadgear","addItem","addItemCargo","addItemCargoGlobal","addItemPool","addItemToBackpack","addItemToUniform","addItemToVest","addLiveStats","addMagazine","addMagazineAmmoCargo",
"addMagazineCargo","addMagazineCargoGlobal","addMagazineGlobal","addMagazinePool","addMagazines","addMagazineTurret","addMenu","addMenuItem","addMissionEventHandler","addMPEventHandler","addMusicEventHandler","addonFiles","addOwnedMine","addPlayerScores","addPrimaryWeaponItem","addPublicVariableEventHandler","addRating","addResources","addScore","addScoreSide","addSecondaryWeaponItem","addSwitchableUnit","addTeamMember","addToRemainsCollector","addTorque","addUniform","addUserActionEventHandler",
"addVehicle","addVest","addWaypoint","addWeapon","addWeaponCargo","addWeaponCargoGlobal","addWeaponGlobal","addWeaponItem","addWeaponPool","addWeaponTurret","addWeaponWithAttachmentsCargo","addWeaponWithAttachmentsCargoGlobal","admin","agent","agents","AGLToASL","aimedAtTarget","aimPos","airDensityCurveRTD","airDensityRTD","airplaneThrottle","airportSide","AISFinishHeal","alive","all3DENEntities","allActiveTitleEffects","allAddonsInfo","allAirports","allControls","allCurators","allCutLayers","al\
lDead","allDeadMen","allDiaryRecords","allDiarySubjects","allDisplays","allEnv3DSoundSources","allGroups","allLODs","allMapMarkers","allMines","allMissionObjects","allObjects","allow3DMode","allowCrewInImmobile","allowCuratorLogicIgnoreAreas","allowDamage","allowDammage","allowedService","allowFileOperations","allowFleeing","allowGetIn","allowService","allowSprint","allPlayers","allSimpleObjects","allSites","allTurrets","allUnits","allUnitsUAV","allUsers","allVariables","ambientTemperature","amm\
o","ammoOnPylon","and","animate","animateBay","animateDoor","animatePylon","animateSource","animationNames","animationPhase","animationSourcePhase","animationState","apertureParams","append","apply","armoryPoints","arrayIntersect","asin","ASLToAGL","ASLToATL","assert","assignAsCargo","assignAsCargoIndex","assignAsCommander","assignAsDriver","assignAsGunner","assignAsTurret","assignCurator","assignedCargo","assignedCommander","assignedDriver","assignedGroup","assignedGunner","assignedItems","assi\
gnedTarget","assignedTeam","assignedVehicle","assignedVehicleRole","assignedVehicles","assignItem","assignTeam","assignToAirport","atan","atan2","atg","ATLToASL","attachedObject","attachedObjects","attachedTo","attachObject","attachTo","attackEnabled","awake","backpack","backpackCargo","backpackContainer","backpackItems","backpackMagazines","backpackSpaceFor","behaviour","benchmark","bezierInterpolation","binocular","binocularItems","binocularMagazine","boundingBox","boundingBoxReal","boundingCe\
nter","brakesDisabled","briefingName","buildingExit","buildingPos","buldozer_EnableRoadDiag","buldozer_IsEnabledRoadDiag","buldozer_LoadNewRoads","buldozer_reloadOperMap","buttonAction","buttonSetAction","cadetMode","calculatePath","calculatePlayerVisibilityByFriendly","call","callExtension","camCommand","camCommit","camCommitPrepared","camCommitted","camConstuctionSetParams","camCreate","camDestroy","cameraEffect","cameraEffectEnableHUD","cameraInterest","cameraOn","cameraView","campaignConfigF\
ile","camPreload","camPreloaded","camPrepareBank","camPrepareDir","camPrepareDive","camPrepareFocus","camPrepareFov","camPrepareFovRange","camPreparePos","camPrepareRelPos","camPrepareTarget","camSetBank","camSetDir","camSetDive","camSetFocus","camSetFov","camSetFovRange","camSetPos","camSetRelPos","camSetTarget","camTarget","camUseNVG","canAdd","canAddItemToBackpack","canAddItemToUniform","canAddItemToVest","cancelSimpleTaskDestination","canDeployWeapon","canFire","canMove","canSlingLoad","canS\
tand","canSuspend","canTriggerDynamicSimulation","canUnloadInCombat","canVehicleCargo","captive","captiveNum","cbChecked","cbSetChecked","ceil","channelEnabled","cheatsEnabled","checkAIFeature","checkVisibility","className","clear3DENAttribute","clear3DENInventory","clearAllItemsFromBackpack","clearBackpackCargo","clearBackpackCargoGlobal","clearForcesRTD","clearGroupIcons","clearItemCargo","clearItemCargoGlobal","clearItemPool","clearMagazineCargo","clearMagazineCargoGlobal","clearMagazinePool",
"clearOverlay","clearRadio","clearWeaponCargo","clearWeaponCargoGlobal","clearWeaponPool","clientOwner","closeDialog","closeDisplay","closeOverlay","collapseObjectTree","collect3DENHistory","collectiveRTD","collisionDisabledWith","combatBehaviour","combatMode","commandArtilleryFire","commandChat","commander","commandFire","commandFollow","commandFSM","commandGetOut","commandingMenu","commandMove","commandRadio","commandStop","commandSuppressiveFire","commandTarget","commandWatch","comment","comm\
itOverlay","compatibleItems","compatibleMagazines","compile","compileFinal","compileScript","completedFSM","composeText","configClasses","configFile","configHierarchy","configName","configOf","configProperties","configSourceAddonList","configSourceMod","configSourceModList","confirmSensorTarget","connectTerminalToUAV","connectToServer","controlsGroupCtrl","conversationDisabled","copyFromClipboard","copyToClipboard","copyWaypoints","cos","count","countEnemy","countFriendly","countSide","countType",
"countUnknown","create3DENComposition","create3DENEntity","createAgent","createCenter","createDialog","createDiaryLink","createDiaryRecord","createDiarySubject","createDisplay","createGearDialog","createGroup","createGuardedPoint","createHashMap","createHashMapFromArray","createLocation","createMarker","createMarkerLocal","createMenu","createMine","createMissionDisplay","createMPCampaignDisplay","createSimpleObject","createSimpleTask","createSite","createSoundSource","createTask","createTeam","c\
reateTrigger","createUnit","createVehicle","createVehicleCrew","createVehicleLocal","crew","ctAddHeader","ctAddRow","ctClear","ctCurSel","ctData","ctFindHeaderRows","ctFindRowHeader","ctHeaderControls","ctHeaderCount","ctRemoveHeaders","ctRemoveRows","ctrlActivate","ctrlAddEventHandler","ctrlAngle","ctrlAnimateModel","ctrlAnimationPhaseModel","ctrlAt","ctrlAutoScrollDelay","ctrlAutoScrollRewind","ctrlAutoScrollSpeed","ctrlBackgroundColor","ctrlChecked","ctrlClassName","ctrlCommit","ctrlCommitted",
"ctrlCreate","ctrlDelete","ctrlEnable","ctrlEnabled","ctrlFade","ctrlFontHeight","ctrlForegroundColor","ctrlHTMLLoaded","ctrlIDC","ctrlIDD","ctrlMapAnimAdd","ctrlMapAnimClear","ctrlMapAnimCommit","ctrlMapAnimDone","ctrlMapCursor","ctrlMapMouseOver","ctrlMapPosition","ctrlMapScale","ctrlMapScreenToWorld","ctrlMapSetPosition","ctrlMapWorldToScreen","ctrlModel","ctrlModelDirAndUp","ctrlModelScale","ctrlMousePosition","ctrlParent","ctrlParentControlsGroup","ctrlPosition","ctrlRemoveAllEventHandlers",
"ctrlRemoveEventHandler","ctrlScale","ctrlScrollValues","ctrlSetActiveColor","ctrlSetAngle","ctrlSetAutoScrollDelay","ctrlSetAutoScrollRewind","ctrlSetAutoScrollSpeed","ctrlSetBackgroundColor","ctrlSetChecked","ctrlSetDisabledColor","ctrlSetEventHandler","ctrlSetFade","ctrlSetFocus","ctrlSetFont","ctrlSetFontH1","ctrlSetFontH1B","ctrlSetFontH2","ctrlSetFontH2B","ctrlSetFontH3","ctrlSetFontH3B","ctrlSetFontH4","ctrlSetFontH4B","ctrlSetFontH5","ctrlSetFontH5B","ctrlSetFontH6","ctrlSetFontH6B","ctr\
lSetFontHeight","ctrlSetFontHeightH1","ctrlSetFontHeightH2","ctrlSetFontHeightH3","ctrlSetFontHeightH4","ctrlSetFontHeightH5","ctrlSetFontHeightH6","ctrlSetFontHeightSecondary","ctrlSetFontP","ctrlSetFontPB","ctrlSetFontSecondary","ctrlSetForegroundColor","ctrlSetModel","ctrlSetModelDirAndUp","ctrlSetModelScale","ctrlSetMousePosition","ctrlSetPixelPrecision","ctrlSetPosition","ctrlSetPositionH","ctrlSetPositionW","ctrlSetPositionX","ctrlSetPositionY","ctrlSetScale","ctrlSetScrollValues","ctrlSet\
Shadow","ctrlSetStructuredText","ctrlSetText","ctrlSetTextColor","ctrlSetTextColorSecondary","ctrlSetTextSecondary","ctrlSetTextSelection","ctrlSetTooltip","ctrlSetTooltipColorBox","ctrlSetTooltipColorShade","ctrlSetTooltipColorText","ctrlSetTooltipMaxWidth","ctrlSetURL","ctrlSetURLOverlayMode","ctrlShadow","ctrlShow","ctrlShown","ctrlStyle","ctrlText","ctrlTextColor","ctrlTextHeight","ctrlTextSecondary","ctrlTextSelection","ctrlTextWidth","ctrlTooltip","ctrlType","ctrlURL","ctrlURLOverlayMode",
"ctrlVisible","ctRowControls","ctRowCount","ctSetCurSel","ctSetData","ctSetHeaderTemplate","ctSetRowTemplate","ctSetValue","ctValue","curatorAddons","curatorCamera","curatorCameraArea","curatorCameraAreaCeiling","curatorCoef","curatorEditableObjects","curatorEditingArea","curatorEditingAreaType","curatorMouseOver","curatorPoints","curatorRegisteredObjects","curatorSelected","curatorWaypointCost","current3DENOperation","currentChannel","currentCommand","currentMagazine","currentMagazineDetail","c\
urrentMagazineDetailTurret","currentMagazineTurret","currentMuzzle","currentNamespace","currentPilot","currentTask","currentTasks","currentThrowable","currentVisionMode","currentWaypoint","currentWeapon","currentWeaponMode","currentWeaponTurret","currentZeroing","cursorObject","cursorTarget","customChat","customRadio","customWaypointPosition","cutFadeOut","cutObj","cutRsc","cutText","damage","date","dateToNumber","dayTime","deActivateKey","debriefingText","debugFSM","debugLog","decayGraphValues",
"deg","delete3DENEntities","deleteAt","deleteCenter","deleteCollection","deleteEditorObject","deleteGroup","deleteGroupWhenEmpty","deleteIdentity","deleteLocation","deleteMarker","deleteMarkerLocal","deleteRange","deleteResources","deleteSite","deleteStatus","deleteTeam","deleteVehicle","deleteVehicleCrew","deleteWaypoint","detach","detectedMines","diag_activeMissionFSMs","diag_activeScripts","diag_activeSQFScripts","diag_activeSQSScripts","diag_allMissionEventHandlers","diag_captureFrame","diag\
_captureFrameToFile","diag_captureSlowFrame","diag_codePerformance","diag_deltaTime","diag_drawmode","diag_dumpCalltraceToLog","diag_dumpScriptAssembly","diag_dumpTerrainSynth","diag_dynamicSimulationEnd","diag_enable","diag_enabled","diag_exportConfig","diag_exportTerrainSVG","diag_fps","diag_fpsmin","diag_frameno","diag_getTerrainSegmentOffset","diag_lightNewLoad","diag_list","diag_localized","diag_log","diag_logSlowFrame","diag_mergeConfigFile","diag_recordTurretLimits","diag_resetFSM","diag_\
resetshapes","diag_scope","diag_setLightNew","diag_stacktrace","diag_tickTime","diag_toggle","dialog","diarySubjectExists","didJIP","didJIPOwner","difficulty","difficultyEnabled","difficultyEnabledRTD","difficultyOption","direction","directionStabilizationEnabled","directSay","disableAI","disableBrakes","disableCollisionWith","disableConversation","disableDebriefingStats","disableMapIndicators","disableNVGEquipment","disableRemoteSensors","disableSerialization","disableTIEquipment","disableUAVCo\
nnectability","disableUserInput","displayAddEventHandler","displayChild","displayCtrl","displayParent","displayRemoveAllEventHandlers","displayRemoveEventHandler","displaySetEventHandler","displayUniqueName","displayUpdate","dissolveTeam","distance","distance2D","distanceSqr","distributionRegion","do3DENAction","doArtilleryFire","doFire","doFollow","doFSM","doGetOut","doMove","doorPhase","doStop","doSuppressiveFire","doTarget","doWatch","drawArrow","drawEllipse","drawIcon","drawIcon3D","drawLase\
r","drawLine","drawLine3D","drawLink","drawLocation","drawPolygon","drawRectangle","drawTriangle","driver","drop","dynamicSimulationDistance","dynamicSimulationDistanceCoef","dynamicSimulationEnabled","dynamicSimulationSystemEnabled","echo","edit3DENMissionAttributes","editObject","editorSetEventHandler","effectiveCommander","elevatePeriscope","emptyPositions","enableAI","enableAIFeature","enableAimPrecision","enableAttack","enableAudioFeature","enableAutoStartUpRTD","enableAutoTrimRTD","enableC\
amShake","enableCaustics","enableChannel","enableCollisionWith","enableCopilot","enableDebriefingStats","enableDiagLegend","enableDirectionStabilization","enableDynamicSimulation","enableDynamicSimulationSystem","enableEndDialog","enableEngineArtillery","enableEnvironment","enableFatigue","enableGunLights","enableInfoPanelComponent","enableIRLasers","enableMimics","enablePersonTurret","enableRadio","enableReload","enableRopeAttach","enableSatNormalOnDetail","enableSaving","enableSentences","enab\
leSimulation","enableSimulationGlobal","enableStamina","enableStressDamage","enableTeamSwitch","enableTraffic","enableUAVConnectability","enableUAVWaypoints","enableVehicleCargo","enableVehicleSensor","enableWeaponDisassembly","endLoadingScreen","endMission","engineOn","enginesIsOnRTD","enginesPowerRTD","enginesRpmRTD","enginesTorqueRTD","entities","environmentEnabled","environmentVolume","equipmentDisabled","estimatedEndServerTime","estimatedTimeLeft","evalObjectArgument","everyBackpack","every\
Container","exec","execEditorScript","execFSM","execVM","exp","expectedDestination","exportJIPMessages","eyeDirection","eyePos","face","faction","fadeEnvironment","fadeMusic","fadeRadio","fadeSound","fadeSpeech","failMission","fileExists","fillWeaponsFromPool","find","findAny","findCover","findDisplay","findEditorObject","findEmptyPosition","findEmptyPositionReady","findIf","findNearestEnemy","finishMissionInit","finite","fire","fireAtTarget","firstBackpack","flag","flagAnimationPhase","flagOwne\
r","flagSide","flagTexture","flatten","fleeing","floor","flyInHeight","flyInHeightASL","focusedCtrl","fog","fogForecast","fogParams","forceAddUniform","forceAtPositionRTD","forceCadetDifficulty","forcedMap","forceEnd","forceFlagTexture","forceFollowRoad","forceGeneratorRTD","forceMap","forceRespawn","forceSpeed","forceUnicode","forceWalk","forceWeaponFire","forceWeatherChange","forEachMember","forEachMemberAgent","forEachMemberTeam","forgetTarget","format","formation","formationDirection","forma\
tionLeader","formationMembers","formationPosition","formationTask","formatText","formLeader","freeExtension","freeLook","fromEditor","fuel","fullCrew","gearIDCAmmoCount","gearSlotAmmoCount","gearSlotData","gestureState","get","get3DENActionState","get3DENAttribute","get3DENCamera","get3DENConnections","get3DENEntity","get3DENEntityID","get3DENGrid","get3DENIconsVisible","get3DENLayerEntities","get3DENLinesVisible","get3DENMissionAttribute","get3DENMouseOver","get3DENSelected","getAimingCoef","ge\
tAllEnv3DSoundControllers","getAllEnvSoundControllers","getAllHitPointsDamage","getAllOwnedMines","getAllPylonsInfo","getAllSoundControllers","getAllUnitTraits","getAmmoCargo","getAnimAimPrecision","getAnimSpeedCoef","getArray","getArtilleryAmmo","getArtilleryComputerSettings","getArtilleryETA","getAssetDLCInfo","getAssignedCuratorLogic","getAssignedCuratorUnit","getAttackTarget","getAudioOptionVolumes","getBackpackCargo","getBleedingRemaining","getBurningValue","getCalculatePlayerVisibilityByFr\
iendly","getCameraViewDirection","getCargoIndex","getCenterOfMass","getClientState","getClientStateNumber","getCompatiblePylonMagazines","getConnectedUAV","getConnectedUAVUnit","getContainerMaxLoad","getCorpse","getCruiseControl","getCursorObjectParams","getCustomAimCoef","getCustomSoundController","getCustomSoundControllerCount","getDammage","getDebriefingText","getDescription","getDir","getDirVisual","getDiverState","getDLCAssetsUsage","getDLCAssetsUsageByName","getDLCs","getDLCUsageTime","get\
EditorCamera","getEditorMode","getEditorObjectScope","getElevationOffset","getEngineTargetRPMRTD","getEnv3DSoundController","getEnvSoundController","getEventHandlerInfo","getFatigue","getFieldManualStartPage","getForcedFlagTexture","getForcedSpeed","getFriend","getFSMVariable","getFuelCargo","getGraphValues","getGroupIcon","getGroupIconParams","getGroupIcons","getHideFrom","getHit","getHitIndex","getHitPointDamage","getItemCargo","getLighting","getLightingAt","getLoadedModsInfo","getMagazineCarg\
o","getMarkerColor","getMarkerPos","getMarkerSize","getMarkerType","getMass","getMissionConfig","getMissionConfigValue","getMissionDLCs","getMissionLayerEntities","getMissionLayers","getMissionPath","getModelInfo","getMousePosition","getMusicPlayedTime","getNumber","getObjectArgument","getObjectChildren","getObjectDLC","getObjectFOV","getObjectID","getObjectMaterials","getObjectProxy","getObjectScale","getObjectTextures","getObjectType","getObjectViewDistance","getOpticsMode","getOrDefault","get\
OrDefaultCall","getOxygenRemaining","getPersonUsedDLCs","getPilotCameraDirection","getPilotCameraPosition","getPilotCameraRotation","getPilotCameraTarget","getPiPViewDistance","getPlateNumber","getPlayerChannel","getPlayerID","getPlayerScores","getPlayerUID","getPlayerVoNVolume","getPos","getPosASL","getPosASLVisual","getPosASLW","getPosATL","getPosATLVisual","getPosVisual","getPosWorld","getPosWorldVisual","getPylonMagazines","getRelDir","getRelPos","getRemoteSensorsDisabled","getRepairCargo","\
getResolution","getRoadInfo","getRotorBrakeRTD","getSensorTargets","getSensorThreats","getShadowDistance","getShotParents","getSlingLoad","getSoundController","getSoundControllerResult","getSpeed","getStamina","getStatValue","getSteamFriendsServers","getSubtitleOptions","getSuppression","getTerrainGrid","getTerrainHeight","getTerrainHeightASL","getTerrainInfo","getText","getTextRaw","getTextureInfo","getTextWidth","getTiParameters","getTotalDLCUsageTime","getTrimOffsetRTD","getTurretLimits","get\
TurretOpticsMode","getUnitFreefallInfo","getUnitLoadout","getUnitTrait","getUnloadInCombat","getUserInfo","getUserMFDText","getUserMFDValue","getVariable","getVehicleCargo","getVehicleTiPars","getWeaponCargo","getWeaponSway","getWingsOrientationRTD","getWingsPositionRTD","getWPPos","glanceAt","globalChat","globalRadio","goggles","goto","group","groupChat","groupFromNetId","groupIconSelectable","groupIconsVisible","groupID","groupOwner","groupRadio","groups","groupSelectedUnits","groupSelectUnit",
"gunner","gusts","halt","handgunItems","handgunMagazine","handgunWeapon","handsHit","hashValue","hasInterface","hasPilotCamera","hasWeapon","hcAllGroups","hcGroupParams","hcLeader","hcRemoveAllGroups","hcRemoveGroup","hcSelected","hcSelectGroup","hcSetGroup","hcShowBar","hcShownBar","headgear","hideBody","hideObject","hideObjectGlobal","hideSelection","hint","hintC","hintCadet","hintSilent","hmd","hostMission","htmlLoad","HUDMovementLevels","humidity","image","importAllGroups","importance","in",
"inArea","inAreaArray","incapacitatedState","inflame","inflamed","infoPanel","infoPanelComponentEnabled","infoPanelComponents","infoPanels","inGameUISetEventHandler","inheritsFrom","initAmbientLife","inPolygon","inputAction","inputController","inputMouse","inRangeOfArtillery","insert","insertEditorObject","intersect","is3DEN","is3DENMultiplayer","is3DENPreview","isAbleToBreathe","isActionMenuVisible","isAgent","isAimPrecisionEnabled","isAllowedCrewInImmobile","isArray","isAutoHoverOn","isAutonom\
ous","isAutoStartUpEnabledRTD","isAutotest","isAutoTrimOnRTD","isAwake","isBleeding","isBurning","isClass","isCollisionLightOn","isCopilotEnabled","isDamageAllowed","isDedicated","isDLCAvailable","isEngineOn","isEqualRef","isEqualTo","isEqualType","isEqualTypeAll","isEqualTypeAny","isEqualTypeArray","isEqualTypeParams","isFilePatchingEnabled","isFinal","isFlashlightOn","isFlatEmpty","isForcedWalk","isFormationLeader","isGameFocused","isGamePaused","isGroupDeletedWhenEmpty","isHidden","isInRemain\
sCollector","isInstructorFigureEnabled","isIRLaserOn","isKeyActive","isKindOf","isLaserOn","isLightOn","isLocalized","isManualFire","isMarkedForCollection","isMissionProfileNamespaceLoaded","isMultiplayer","isMultiplayerSolo","isNil","isNotEqualRef","isNotEqualTo","isNull","isNumber","isObjectHidden","isObjectRTD","isOnRoad","isPiPEnabled","isPlayer","isRealTime","isRemoteExecuted","isRemoteExecutedJIP","isSaving","isSensorTargetConfirmed","isServer","isShowing3DIcons","isSimpleObject","isSprint\
Allowed","isStaminaEnabled","isSteamMission","isSteamOverlayEnabled","isStreamFriendlyUIEnabled","isStressDamageEnabled","isText","isTouchingGround","isTurnedOut","isTutHintsEnabled","isUAVConnectable","isUAVConnected","isUIContext","isUniformAllowed","isVehicleCargo","isVehicleRadarOn","isVehicleSensorEnabled","isWalking","isWeaponDeployed","isWeaponRested","itemCargo","items","itemsWithMagazines","join","joinAs","joinAsSilent","joinSilent","joinString","kbAddDatabase","kbAddDatabaseTargets","k\
bAddTopic","kbHasTopic","kbReact","kbRemoveTopic","kbTell","kbWasSaid","keyImage","keyName","keys","knowsAbout","land","landAt","landResult","language","laserTarget","lbAdd","lbClear","lbColor","lbColorRight","lbCurSel","lbData","lbDelete","lbIsSelected","lbPicture","lbPictureRight","lbSelection","lbSetColor","lbSetColorRight","lbSetCurSel","lbSetData","lbSetPicture","lbSetPictureColor","lbSetPictureColorDisabled","lbSetPictureColorSelected","lbSetPictureRight","lbSetPictureRightColor","lbSetPic\
tureRightColorDisabled","lbSetPictureRightColorSelected","lbSetSelectColor","lbSetSelectColorRight","lbSetSelected","lbSetText","lbSetTextRight","lbSetTooltip","lbSetValue","lbSize","lbSort","lbSortBy","lbSortByValue","lbText","lbTextRight","lbTooltip","lbValue","leader","leaderboardDeInit","leaderboardGetRows","leaderboardInit","leaderboardRequestRowsFriends","leaderboardRequestRowsGlobal","leaderboardRequestRowsGlobalAroundUser","leaderboardsRequestUploadScore","leaderboardsRequestUploadScoreK\
eepBest","leaderboardState","leaveVehicle","libraryCredits","libraryDisclaimers","lifeState","lightAttachObject","lightDetachObject","lightIsOn","lightnings","limitSpeed","linearConversion","lineIntersects","lineIntersectsObjs","lineIntersectsSurfaces","lineIntersectsWith","linkItem","list","listObjects","listRemoteTargets","listVehicleSensors","ln","lnbAddArray","lnbAddColumn","lnbAddRow","lnbClear","lnbColor","lnbColorRight","lnbCurSelRow","lnbData","lnbDeleteColumn","lnbDeleteRow","lnbGetColu\
mnsPosition","lnbPicture","lnbPictureRight","lnbSetColor","lnbSetColorRight","lnbSetColumnsPos","lnbSetCurSelRow","lnbSetData","lnbSetPicture","lnbSetPictureColor","lnbSetPictureColorRight","lnbSetPictureColorSelected","lnbSetPictureColorSelectedRight","lnbSetPictureRight","lnbSetText","lnbSetTextRight","lnbSetTooltip","lnbSetValue","lnbSize","lnbSort","lnbSortBy","lnbSortByValue","lnbText","lnbTextRight","lnbValue","load","loadAbs","loadBackpack","loadConfig","loadFile","loadGame","loadIdentity",
"loadMagazine","loadOverlay","loadStatus","loadUniform","loadVest","localize","localNamespace","locationPosition","lock","lockCameraTo","lockCargo","lockDriver","locked","lockedCameraTo","lockedCargo","lockedDriver","lockedInventory","lockedTurret","lockIdentity","lockInventory","lockTurret","lockWp","log","logEntities","logNetwork","logNetworkTerminate","lookAt","lookAtPos","magazineCargo","magazines","magazinesAllTurrets","magazinesAmmo","magazinesAmmoCargo","magazinesAmmoFull","magazinesDetai\
l","magazinesDetailBackpack","magazinesDetailUniform","magazinesDetailVest","magazinesTurret","magazineTurretAmmo","mapAnimAdd","mapAnimClear","mapAnimCommit","mapAnimDone","mapCenterOnCamera","mapGridPosition","markAsFinishedOnSteam","markerAlpha","markerBrush","markerChannel","markerColor","markerDir","markerPolyline","markerPos","markerShadow","markerShape","markerSize","markerText","markerType","matrixMultiply","matrixTranspose","max","maxLoad","members","menuAction","menuAdd","menuChecked",
"menuClear","menuCollapse","menuData","menuDelete","menuEnable","menuEnabled","menuExpand","menuHover","menuPicture","menuSetAction","menuSetCheck","menuSetData","menuSetPicture","menuSetShortcut","menuSetText","menuSetURL","menuSetValue","menuShortcut","menuShortcutText","menuSize","menuSort","menuText","menuURL","menuValue","merge","min","mineActive","mineDetectedBy","missileTarget","missileTargetPos","missionConfigFile","missionDifficulty","missionEnd","missionName","missionNameSource","missi\
onNamespace","missionProfileNamespace","missionStart","missionVersion","mod","modelToWorld","modelToWorldVisual","modelToWorldVisualWorld","modelToWorldWorld","modParams","moonIntensity","moonPhase","morale","move","move3DENCamera","moveInAny","moveInCargo","moveInCommander","moveInDriver","moveInGunner","moveInTurret","moveObjectToEnd","moveOut","moveTime","moveTo","moveToCompleted","moveToFailed","musicVolume","name","namedProperties","nameSound","nearEntities","nearestBuilding","nearestLocati\
on","nearestLocations","nearestLocationWithDubbing","nearestMines","nearestObject","nearestObjects","nearestTerrainObjects","nearObjects","nearObjectsReady","nearRoads","nearSupplies","nearTargets","needReload","needService","netId","netObjNull","newOverlay","nextMenuItemIndex","nextWeatherChange","nMenuItems","not","numberOfEnginesRTD","numberToDate","objectCurators","objectFromNetId","objectParent","objStatus","onBriefingGroup","onBriefingNotes","onBriefingPlan","onBriefingTeamSwitch","onComma\
ndModeChanged","onDoubleClick","onEachFrame","onGroupIconClick","onGroupIconOverEnter","onGroupIconOverLeave","onHCGroupSelectionChanged","onMapSingleClick","onPlayerConnected","onPlayerDisconnected","onPreloadFinished","onPreloadStarted","onShowNewObject","onTeamSwitch","openCuratorInterface","openDLCPage","openGPS","openMap","openSteamApp","openYoutubeVideo","or","orderGetIn","overcast","overcastForecast","owner","param","params","parseNumber","parseSimpleArray","parseText","parsingNamespace",
"particlesQuality","periscopeElevation","pickWeaponPool","pitch","pixelGrid","pixelGridBase","pixelGridNoUIScale","pixelH","pixelW","playableSlotsNumber","playableUnits","playAction","playActionNow","player","playerRespawnTime","playerSide","playersNumber","playGesture","playMission","playMove","playMoveNow","playMusic","playScriptedMission","playSound","playSound3D","playSoundUI","pose","position","positionCameraToWorld","posScreenToWorld","posWorldToScreen","ppEffectAdjust","ppEffectCommit","p\
pEffectCommitted","ppEffectCreate","ppEffectDestroy","ppEffectEnable","ppEffectEnabled","ppEffectForceInNVG","precision","preloadCamera","preloadObject","preloadSound","preloadTitleObj","preloadTitleRsc","preprocessFile","preprocessFileLineNumbers","primaryWeapon","primaryWeaponItems","primaryWeaponMagazine","priority","processDiaryLink","productVersion","profileName","profileNamespace","profileNameSteam","progressLoadingScreen","progressPosition","progressSetPosition","publicVariable","publicVa\
riableClient","publicVariableServer","pushBack","pushBackUnique","putWeaponPool","queryItemsPool","queryMagazinePool","queryWeaponPool","rad","radioChannelAdd","radioChannelCreate","radioChannelInfo","radioChannelRemove","radioChannelSetCallSign","radioChannelSetLabel","radioEnabled","radioVolume","rain","rainbow","rainParams","random","rank","rankId","rating","rectangular","regexFind","regexMatch","regexReplace","registeredTasks","registerTask","reload","reloadEnabled","remoteControl","remoteEx\
ec","remoteExecCall","remoteExecutedOwner","remove3DENConnection","remove3DENEventHandler","remove3DENLayer","removeAction","removeAll3DENEventHandlers","removeAllActions","removeAllAssignedItems","removeAllBinocularItems","removeAllContainers","removeAllCuratorAddons","removeAllCuratorCameraAreas","removeAllCuratorEditingAreas","removeAllEventHandlers","removeAllHandgunItems","removeAllItems","removeAllItemsWithMagazines","removeAllMissionEventHandlers","removeAllMPEventHandlers","removeAllMusi\
cEventHandlers","removeAllOwnedMines","removeAllPrimaryWeaponItems","removeAllSecondaryWeaponItems","removeAllUserActionEventHandlers","removeAllWeapons","removeBackpack","removeBackpackGlobal","removeBinocularItem","removeCuratorAddons","removeCuratorCameraArea","removeCuratorEditableObjects","removeCuratorEditingArea","removeDiaryRecord","removeDiarySubject","removeDrawIcon","removeDrawLinks","removeEventHandler","removeFromRemainsCollector","removeGoggles","removeGroupIcon","removeHandgunItem",
"removeHeadgear","removeItem","removeItemFromBackpack","removeItemFromUniform","removeItemFromVest","removeItems","removeMagazine","removeMagazineGlobal","removeMagazines","removeMagazinesTurret","removeMagazineTurret","removeMenuItem","removeMissionEventHandler","removeMPEventHandler","removeMusicEventHandler","removeOwnedMine","removePrimaryWeaponItem","removeSecondaryWeaponItem","removeSimpleTask","removeSwitchableUnit","removeTeamMember","removeUniform","removeUserActionEventHandler","remove\
Vest","removeWeapon","removeWeaponAttachmentCargo","removeWeaponCargo","removeWeaponGlobal","removeWeaponTurret","reportRemoteTarget","requiredVersion","resetCamShake","resetSubgroupDirection","resize","resources","respawnVehicle","restartEditorCamera","reveal","revealMine","reverse","reversedMouseY","roadAt","roadsConnectedTo","roleDescription","ropeAttachedObjects","ropeAttachedTo","ropeAttachEnabled","ropeAttachTo","ropeCreate","ropeCut","ropeDestroy","ropeDetach","ropeEndPosition","ropeLengt\
h","ropes","ropesAttachedTo","ropeSegments","ropeUnwind","ropeUnwound","rotorsForcesRTD","rotorsRpmRTD","round","runInitScript","safeZoneH","safeZoneW","safeZoneWAbs","safeZoneX","safeZoneXAbs","safeZoneY","save3DENInventory","saveGame","saveIdentity","saveJoysticks","saveMissionProfileNamespace","saveOverlay","saveProfileNamespace","saveStatus","saveVar","savingEnabled","say","say2D","say3D","scopeName","score","scoreSide","screenshot","screenToWorld","scriptDone","scriptName","scudState","seco\
ndaryWeapon","secondaryWeaponItems","secondaryWeaponMagazine","select","selectBestPlaces","selectDiarySubject","selectedEditorObjects","selectEditorObject","selectionNames","selectionPosition","selectionVectorDirAndUp","selectLeader","selectMax","selectMin","selectNoPlayer","selectPlayer","selectRandom","selectRandomWeighted","selectWeapon","selectWeaponTurret","sendAUMessage","sendSimpleCommand","sendTask","sendTaskResult","sendUDPMessage","sentencesEnabled","serverCommand","serverCommandAvaila\
ble","serverCommandExecutable","serverName","serverNamespace","serverTime","set","set3DENAttribute","set3DENAttributes","set3DENGrid","set3DENIconsVisible","set3DENLayer","set3DENLinesVisible","set3DENLogicType","set3DENMissionAttribute","set3DENMissionAttributes","set3DENModelsVisible","set3DENObjectType","set3DENSelected","setAccTime","setActualCollectiveRTD","setAirplaneThrottle","setAirportSide","setAmmo","setAmmoCargo","setAmmoOnPylon","setAnimSpeedCoef","setAperture","setApertureNew","setA\
rmoryPoints","setAttributes","setAutonomous","setBehaviour","setBehaviourStrong","setBleedingRemaining","setBrakesRTD","setCameraInterest","setCamShakeDefParams","setCamShakeParams","setCamUseTi","setCaptive","setCenterOfMass","setCollisionLight","setCombatBehaviour","setCombatMode","setCompassOscillation","setConvoySeparation","setCruiseControl","setCuratorCameraAreaCeiling","setCuratorCoef","setCuratorEditingAreaType","setCuratorWaypointCost","setCurrentChannel","setCurrentTask","setCurrentWay\
point","setCustomAimCoef","SetCustomMissionData","setCustomSoundController","setCustomWeightRTD","setDamage","setDammage","setDate","setDebriefingText","setDefaultCamera","setDestination","setDetailMapBlendPars","setDiaryRecordText","setDiarySubjectPicture","setDir","setDirection","setDrawIcon","setDriveOnPath","setDropInterval","setDynamicSimulationDistance","setDynamicSimulationDistanceCoef","setEditorMode","setEditorObjectScope","setEffectCondition","setEffectiveCommander","setEngineRpmRTD","\
setFace","setFaceanimation","setFatigue","setFeatureType","setFlagAnimationPhase","setFlagOwner","setFlagSide","setFlagTexture","setFog","setForceGeneratorRTD","setFormation","setFormationTask","setFormDir","setFriend","setFromEditor","setFSMVariable","setFuel","setFuelCargo","setGroupIcon","setGroupIconParams","setGroupIconsSelectable","setGroupIconsVisible","setGroupid","setGroupIdGlobal","setGroupOwner","setGusts","setHideBehind","setHit","setHitIndex","setHitPointDamage","setHorizonParallaxC\
oef","setHUDMovementLevels","setHumidity","setIdentity","setImportance","setInfoPanel","setLeader","setLightAmbient","setLightAttenuation","setLightBrightness","setLightColor","setLightConePars","setLightDayLight","setLightFlareMaxDistance","setLightFlareSize","setLightIntensity","setLightIR","setLightnings","setLightUseFlare","setLightVolumeShape","setLocalWindParams","setMagazineTurretAmmo","setMarkerAlpha","setMarkerAlphaLocal","setMarkerBrush","setMarkerBrushLocal","setMarkerColor","setMarke\
rColorLocal","setMarkerDir","setMarkerDirLocal","setMarkerPolyline","setMarkerPolylineLocal","setMarkerPos","setMarkerPosLocal","setMarkerShadow","setMarkerShadowLocal","setMarkerShape","setMarkerShapeLocal","setMarkerSize","setMarkerSizeLocal","setMarkerText","setMarkerTextLocal","setMarkerType","setMarkerTypeLocal","setMass","setMaxLoad","setMimic","setMissileTarget","setMissileTargetPos","setMousePosition","setMusicEffect","setMusicEventHandler","setName","setNameSound","setObjectArguments","\
setObjectMaterial","setObjectMaterialGlobal","setObjectProxy","setObjectScale","setObjectTexture","setObjectTextureGlobal","setObjectViewDistance","setOpticsMode","setOvercast","setOwner","setOxygenRemaining","setParticleCircle","setParticleClass","setParticleFire","setParticleParams","setParticleRandom","setPilotCameraDirection","setPilotCameraRotation","setPilotCameraTarget","setPilotLight","setPiPEffect","setPiPViewDistance","setPitch","setPlateNumber","setPlayable","setPlayerRespawnTime","se\
tPlayerVoNVolume","setPos","setPosASL","setPosASL2","setPosASLW","setPosATL","setPosition","setPosWorld","setPylonLoadout","setPylonsPriority","setRadioMsg","setRain","setRainbow","setRandomLip","setRank","setRectangular","setRepairCargo","setRotorBrakeRTD","setShadowDistance","setShotParents","setSide","setSimpleTaskAlwaysVisible","setSimpleTaskCustomData","setSimpleTaskDescription","setSimpleTaskDestination","setSimpleTaskTarget","setSimpleTaskType","setSimulWeatherLayers","setSize","setSkill",
"setSlingLoad","setSoundEffect","setSpeaker","setSpeech","setSpeedMode","setStamina","setStaminaScheme","setStatValue","setSuppression","setSystemOfUnits","setTargetAge","setTaskMarkerOffset","setTaskResult","setTaskState","setTerrainGrid","setTerrainHeight","setText","setTimeMultiplier","setTiParameter","setTitleEffect","setTowParent","setTrafficDensity","setTrafficDistance","setTrafficGap","setTrafficSpeed","setTriggerActivation","setTriggerArea","setTriggerInterval","setTriggerStatements","se\
tTriggerText","setTriggerTimeout","setTriggerType","setTurretLimits","setTurretOpticsMode","setType","setUnconscious","setUnitAbility","setUnitCombatMode","setUnitFreefallHeight","setUnitLoadout","setUnitPos","setUnitPosWeak","setUnitRank","setUnitRecoilCoefficient","setUnitTrait","setUnloadInCombat","setUserActionText","setUserMFDText","setUserMFDValue","setVariable","setVectorDir","setVectorDirAndUp","setVectorUp","setVehicleAmmo","setVehicleAmmoDef","setVehicleArmor","setVehicleCargo","setVeh\
icleId","setVehicleLock","setVehiclePosition","setVehicleRadar","setVehicleReceiveRemoteTargets","setVehicleReportOwnPosition","setVehicleReportRemoteTargets","setVehicleTiPars","setVehicleVarName","setVelocity","setVelocityModelSpace","setVelocityTransformation","setViewDistance","setVisibleIfTreeCollapsed","setWantedRPMRTD","setWaves","setWaypointBehaviour","setWaypointCombatMode","setWaypointCompletionRadius","setWaypointDescription","setWaypointForceBehaviour","setWaypointFormation","setWayp\
ointHousePosition","setWaypointLoiterAltitude","setWaypointLoiterRadius","setWaypointLoiterType","setWaypointName","setWaypointPosition","setWaypointScript","setWaypointSpeed","setWaypointStatements","setWaypointTimeout","setWaypointType","setWaypointVisible","setWeaponReloadingTime","setWeaponZeroing","setWind","setWindDir","setWindForce","setWindStr","setWingForceScaleRTD","setWPPos","show3DIcons","showChat","showCinemaBorder","showCommandingMenu","showCompass","showCuratorCompass","showGps","\
showHUD","showLegend","showMap","shownArtilleryComputer","shownChat","shownCompass","shownCuratorCompass","showNewEditorObject","shownGps","shownHUD","shownMap","shownPad","shownRadio","shownScoretable","shownSubtitles","shownUAVFeed","shownWarrant","shownWatch","showPad","showRadio","showScoretable","showSubtitles","showUAVFeed","showWarrant","showWatch","showWaypoint","showWaypoints","side","sideChat","sideRadio","simpleTasks","simulationEnabled","simulCloudDensity","simulCloudOcclusion","simu\
lInClouds","simulWeatherSync","sin","size","sizeOf","skill","skillFinal","skipTime","sleep","sliderPosition","sliderRange","sliderSetPosition","sliderSetRange","sliderSetSpeed","sliderSpeed","slingLoadAssistantShown","soldierMagazines","someAmmo","sort","soundVolume","spawn","speaker","speechVolume","speed","speedMode","splitString","sqrt","squadParams","stance","startLoadingScreen","stop","stopEngineRTD","stopped","str","sunOrMoon","supportInfo","suppressFor","surfaceIsWater","surfaceNormal","s\
urfaceTexture","surfaceType","swimInDepth","switchableUnits","switchAction","switchCamera","switchGesture","switchLight","switchMove","synchronizedObjects","synchronizedTriggers","synchronizedWaypoints","synchronizeObjectsAdd","synchronizeObjectsRemove","synchronizeTrigger","synchronizeWaypoint","systemChat","systemOfUnits","systemTime","systemTimeUTC","tan","targetKnowledge","targets","targetsAggregate","targetsQuery","taskAlwaysVisible","taskChildren","taskCompleted","taskCustomData","taskDesc\
ription","taskDestination","taskHint","taskMarkerOffset","taskName","taskParent","taskResult","taskState","taskType","teamMember","teamName","teams","teamSwitch","teamSwitchEnabled","teamType","terminate","terrainIntersect","terrainIntersectASL","terrainIntersectAtASL","text","textLog","textLogFormat","tg","time","timeMultiplier","titleCut","titleFadeOut","titleObj","titleRsc","titleText","toArray","toFixed","toLower","toLowerANSI","toString","toUpper","toUpperANSI","triggerActivated","triggerAc\
tivation","triggerAmmo","triggerArea","triggerAttachedVehicle","triggerAttachObject","triggerAttachVehicle","triggerDynamicSimulation","triggerInterval","triggerStatements","triggerText","triggerTimeout","triggerTimeoutCurrent","triggerType","trim","turretLocal","turretOwner","turretUnit","tvAdd","tvClear","tvCollapse","tvCollapseAll","tvCount","tvCurSel","tvData","tvDelete","tvExpand","tvExpandAll","tvIsSelected","tvPicture","tvPictureRight","tvSelection","tvSetColor","tvSetCurSel","tvSetData",
"tvSetPicture","tvSetPictureColor","tvSetPictureColorDisabled","tvSetPictureColorSelected","tvSetPictureRight","tvSetPictureRightColor","tvSetPictureRightColorDisabled","tvSetPictureRightColorSelected","tvSetSelectColor","tvSetSelected","tvSetText","tvSetTooltip","tvSetValue","tvSort","tvSortAll","tvSortByValue","tvSortByValueAll","tvText","tvTooltip","tvValue","type","typeName","typeOf","UAVControl","uiNamespace","uiSleep","unassignCurator","unassignItem","unassignTeam","unassignVehicle","under\
water","uniform","uniformContainer","uniformItems","uniformMagazines","uniqueUnitItems","unitAddons","unitAimPosition","unitAimPositionVisual","unitBackpack","unitCombatMode","unitIsUAV","unitPos","unitReady","unitRecoilCoefficient","units","unitsBelowHeight","unitTurret","unlinkItem","unlockAchievement","unregisterTask","updateDrawIcon","updateMenuItem","updateObjectTree","useAIOperMapObstructionTest","useAISteeringComponent","useAudioTimeForMoves","userInputDisabled","values","vectorAdd","vect\
orCos","vectorCrossProduct","vectorDiff","vectorDir","vectorDirVisual","vectorDistance","vectorDistanceSqr","vectorDotProduct","vectorFromTo","vectorLinearConversion","vectorMagnitude","vectorMagnitudeSqr","vectorModelToWorld","vectorModelToWorldVisual","vectorMultiply","vectorNormalized","vectorUp","vectorUpVisual","vectorWorldToModel","vectorWorldToModelVisual","vehicle","vehicleCargoEnabled","vehicleChat","vehicleMoveInfo","vehicleRadio","vehicleReceiveRemoteTargets","vehicleReportOwnPosition",
"vehicleReportRemoteTargets","vehicles","vehicleVarName","velocity","velocityModelSpace","verifySignature","vest","vestContainer","vestItems","vestMagazines","viewDistance","visibleCompass","visibleGps","visibleMap","visiblePosition","visiblePositionASL","visibleScoretable","visibleWatch","waves","waypointAttachedObject","waypointAttachedVehicle","waypointAttachObject","waypointAttachVehicle","waypointBehaviour","waypointCombatMode","waypointCompletionRadius","waypointDescription","waypointForce\
Behaviour","waypointFormation","waypointHousePosition","waypointLoiterAltitude","waypointLoiterRadius","waypointLoiterType","waypointName","waypointPosition","waypoints","waypointScript","waypointsEnabledUAV","waypointShow","waypointSpeed","waypointStatements","waypointTimeout","waypointTimeoutCurrent","waypointType","waypointVisible","weaponAccessories","weaponAccessoriesCargo","weaponCargo","weaponDirection","weaponInertia","weaponLowered","weaponReloadingTime","weapons","weaponsInfo","weapons\
Items","weaponsItemsCargo","weaponState","weaponsTurret","weightRTD","WFSideText","wind","windDir","windRTD","windStr","wingsForcesRTD","worldName","worldSize","worldToModel","worldToModelVisual","worldToScreen"],PREPROCESSOR={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:"define undef ifdef ifndef else endif include if",contains:[{begin:/\\\n/,relevance:0},hljs.inherit(STRINGS,{className:"string"}),{begin:/<[^\n>]*>/,end:/$/,illegal:"\\n"},hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE]};
return{name:"SQF",case_insensitive:!0,keywords:{keyword:KEYWORDS2,built_in:BUILT_IN,literal:LITERAL},contains:[hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.NUMBER_MODE,VARIABLE,FUNCTION,STRINGS,PREPROCESSOR],illegal:[/\$[^a-fA-F0-9]/,/\w\$/,/\?/,/@/,/ \| /,/[a-zA-Z_]\./,/\:\=/,/\[\:/]}}return sqf_1=sqf2,sqf_1}var sql_1,hasRequiredSql;function requireSql(){if(hasRequiredSql)return sql_1;hasRequiredSql=1;function sql2(hljs){const regex=hljs.regex,COMMENT_MODE=hljs.COMMENT("--","$"),STRING={
scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},QUOTED_IDENTIFIER={begin:/"/,end:/"/,contains:[{match:/""/}]},LITERALS2=["true","false","unknown"],MULTI_WORD_TYPES=["double precision","large object","with timezone","without timezone"],TYPES2=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","var\
binary"],NON_RESERVED_WORDS=["add","asc","collation","desc","final","first","last","view"],RESERVED_WORDS=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character\
_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type",
"current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function",
"fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","loc\
altimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_ra\
nk","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","\
seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","\
treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],RESERVED_FUNCTIONS=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","el\
ement","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_\
number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],POSSIBLE_WITHOUT_PARENS=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_times\
tamp","localtimestamp"],COMBOS=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],FUNCTIONS=RESERVED_FUNCTIONS,KEYWORDS2=[...RESERVED_WORDS,...NON_RESERVED_WORDS].filter(keyword2=>!RESERVED_FUNCTIONS.includes(keyword2)),VARIABLE={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},OPERATOR={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,
relevance:0},FUNCTION_CALL={match:regex.concat(/\b/,regex.either(...FUNCTIONS),/\s*\(/),relevance:0,keywords:{built_in:FUNCTIONS}};function kws_to_regex(list2){return regex.concat(/\b/,regex.either(...list2.map(kw=>kw.replace(/\s+/,"\\s+"))),/\b/)}const MULTI_WORD_KEYWORDS={scope:"keyword",match:kws_to_regex(COMBOS),relevance:0};function reduceRelevancy(list2,{exceptions,when}={}){const qualifyFn=when;return exceptions=exceptions||[],list2.map(item=>item.match(/\|\d+$/)||exceptions.includes(item)?
item:qualifyFn(item)?`${item}|0`:item)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:reduceRelevancy(KEYWORDS2,{when:x=>x.length<3}),literal:LITERALS2,type:TYPES2,built_in:POSSIBLE_WITHOUT_PARENS},contains:[{scope:"type",match:kws_to_regex(MULTI_WORD_TYPES)},MULTI_WORD_KEYWORDS,FUNCTION_CALL,VARIABLE,STRING,QUOTED_IDENTIFIER,hljs.C_NUMBER_MODE,hljs.C_BLOCK_COMMENT_MODE,COMMENT_MODE,OPERATOR]}}return sql_1=sql2,sql_1}var stan_1,hasRequiredStan;function requireStan(){
if(hasRequiredStan)return stan_1;hasRequiredStan=1;function stan2(hljs){const regex=hljs.regex,BLOCKS=["functions","model","data","parameters","quantities","transformed","generated"],STATEMENTS=["for","in","if","else","while","break","continue","return"],TYPES2=["array","tuple","complex","int","real","vector","complex_vector","ordered","positive_ordered","simplex","unit_vector","row_vector","complex_row_vector","matrix","complex_matrix","cholesky_factor_corr|10","cholesky_factor_cov|10","corr_ma\
trix|10","cov_matrix|10","void"],FUNCTIONS=["abs","acos","acosh","add_diag","algebra_solver","algebra_solver_newton","append_array","append_col","append_row","asin","asinh","atan","atan2","atanh","bessel_first_kind","bessel_second_kind","binary_log_loss","block","cbrt","ceil","chol2inv","cholesky_decompose","choose","col","cols","columns_dot_product","columns_dot_self","complex_schur_decompose","complex_schur_decompose_t","complex_schur_decompose_u","conj","cos","cosh","cov_exp_quad","crossprod",
"csr_extract","csr_extract_u","csr_extract_v","csr_extract_w","csr_matrix_times_vector","csr_to_dense_matrix","cumulative_sum","dae","dae_tol","determinant","diag_matrix","diagonal","diag_post_multiply","diag_pre_multiply","digamma","dims","distance","dot_product","dot_self","eigendecompose","eigendecompose_sym","eigenvalues","eigenvalues_sym","eigenvectors","eigenvectors_sym","erf","erfc","exp","exp2","expm1","falling_factorial","fdim","fft","fft2","floor","fma","fmax","fmin","fmod","gamma_p","\
gamma_q","generalized_inverse","get_imag","get_real","head","hmm_hidden_state_prob","hmm_marginal","hypot","identity_matrix","inc_beta","integrate_1d","integrate_ode","integrate_ode_adams","integrate_ode_bdf","integrate_ode_rk45","int_step","inv","inv_cloglog","inv_erfc","inverse","inverse_spd","inv_fft","inv_fft2","inv_inc_beta","inv_logit","inv_Phi","inv_sqrt","inv_square","is_inf","is_nan","lambert_w0","lambert_wm1","lbeta","lchoose","ldexp","lgamma","linspaced_array","linspaced_int_array","l\
inspaced_row_vector","linspaced_vector","lmgamma","lmultiply","log","log1m","log1m_exp","log1m_inv_logit","log1p","log1p_exp","log_determinant","log_diff_exp","log_falling_factorial","log_inv_logit","log_inv_logit_diff","logit","log_mix","log_modified_bessel_first_kind","log_rising_factorial","log_softmax","log_sum_exp","machine_precision","map_rect","matrix_exp","matrix_exp_multiply","matrix_power","max","mdivide_left_spd","mdivide_left_tri_low","mdivide_right_spd","mdivide_right_tri_low","mean",
"min","modified_bessel_first_kind","modified_bessel_second_kind","multiply_lower_tri_self_transpose","negative_infinity","norm","norm1","norm2","not_a_number","num_elements","ode_adams","ode_adams_tol","ode_adjoint_tol_ctl","ode_bdf","ode_bdf_tol","ode_ckrk","ode_ckrk_tol","ode_rk45","ode_rk45_tol","one_hot_array","one_hot_int_array","one_hot_row_vector","one_hot_vector","ones_array","ones_int_array","ones_row_vector","ones_vector","owens_t","Phi","Phi_approx","polar","positive_infinity","pow","\
print","prod","proj","qr","qr_Q","qr_R","qr_thin","qr_thin_Q","qr_thin_R","quad_form","quad_form_diag","quad_form_sym","quantile","rank","reduce_sum","reject","rep_array","rep_matrix","rep_row_vector","rep_vector","reverse","rising_factorial","round","row","rows","rows_dot_product","rows_dot_self","scale_matrix_exp_multiply","sd","segment","sin","singular_values","sinh","size","softmax","sort_asc","sort_desc","sort_indices_asc","sort_indices_desc","sqrt","square","squared_distance","step","sub_c\
ol","sub_row","sum","svd","svd_U","svd_V","symmetrize_from_lower_tri","tail","tan","tanh","target","tcrossprod","tgamma","to_array_1d","to_array_2d","to_complex","to_int","to_matrix","to_row_vector","to_vector","trace","trace_gen_quad_form","trace_quad_form","trigamma","trunc","uniform_simplex","variance","zeros_array","zeros_int_array","zeros_row_vector"],DISTRIBUTIONS=["bernoulli","bernoulli_logit","bernoulli_logit_glm","beta","beta_binomial","beta_proportion","binomial","binomial_logit","cate\
gorical","categorical_logit","categorical_logit_glm","cauchy","chi_square","dirichlet","discrete_range","double_exponential","exp_mod_normal","exponential","frechet","gamma","gaussian_dlm_obs","gumbel","hmm_latent","hypergeometric","inv_chi_square","inv_gamma","inv_wishart","inv_wishart_cholesky","lkj_corr","lkj_corr_cholesky","logistic","loglogistic","lognormal","multi_gp","multi_gp_cholesky","multinomial","multinomial_logit","multi_normal","multi_normal_cholesky","multi_normal_prec","multi_stu\
dent_cholesky_t","multi_student_t","multi_student_t_cholesky","neg_binomial","neg_binomial_2","neg_binomial_2_log","neg_binomial_2_log_glm","normal","normal_id_glm","ordered_logistic","ordered_logistic_glm","ordered_probit","pareto","pareto_type_2","poisson","poisson_log","poisson_log_glm","rayleigh","scaled_inv_chi_square","skew_double_exponential","skew_normal","std_normal","std_normal_log","student_t","uniform","von_mises","weibull","wiener","wishart","wishart_cholesky"],BLOCK_COMMENT=hljs.COMMENT(
/\/\*/,/\*\//,{relevance:0,contains:[{scope:"doctag",match:/@(return|param)/}]}),INCLUDE={scope:"meta",begin:/#include\b/,end:/$/,contains:[{match:/[a-z][a-z-._]+/,scope:"string"},hljs.C_LINE_COMMENT_MODE]},RANGE_CONSTRAINTS=["lower","upper","offset","multiplier"];return{name:"Stan",aliases:["stanfuncs"],keywords:{$pattern:hljs.IDENT_RE,title:BLOCKS,type:TYPES2,keyword:STATEMENTS,built_in:FUNCTIONS},contains:[hljs.C_LINE_COMMENT_MODE,INCLUDE,hljs.HASH_COMMENT_MODE,BLOCK_COMMENT,{scope:"built_in",
match:/\s(pi|e|sqrt2|log2|log10)(?=\()/,relevance:0},{match:regex.concat(/[<,]\s*/,regex.either(...RANGE_CONSTRAINTS),/\s*=/),keywords:RANGE_CONSTRAINTS},{scope:"keyword",match:/\btarget(?=\s*\+=)/},{match:[/~\s*/,regex.either(...DISTRIBUTIONS),/(?:\(\))/,/\s*T(?=\s*\[)/],scope:{2:"built_in",4:"keyword"}},{scope:"built_in",keywords:DISTRIBUTIONS,begin:regex.concat(/\w*/,regex.either(...DISTRIBUTIONS),/(_lpdf|_lupdf|_lpmf|_cdf|_lcdf|_lccdf|_qf)(?=\s*[\(.*\)])/)},{begin:[/~/,/\s*/,regex.concat(regex.
either(...DISTRIBUTIONS),/(?=\s*[\(.*\)])/)],scope:{3:"built_in"}},{begin:[/~/,/\s*\w+(?=\s*[\(.*\)])/,"(?!.*/\b("+regex.either(...DISTRIBUTIONS)+")\b)"],scope:{2:"title.function"}},{scope:"title.function",begin:/\w*(_lpdf|_lupdf|_lpmf|_cdf|_lcdf|_lccdf|_qf)(?=\s*[\(.*\)])/},{scope:"number",match:regex.concat(/(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)/,/(?:[eE][+-]?\d+(?:_\d+)*)?i?(?!\w)/),relevance:0},{scope:"string",begin:/"/,end:/"/}]}}return stan_1=stan2,stan_1}var stata_1,
hasRequiredStata;function requireStata(){if(hasRequiredStata)return stata_1;hasRequiredStata=1;function stata2(hljs){return{name:"Stata",aliases:["do","ado"],case_insensitive:!0,keywords:"if else in foreach for forv forva forval forvalu forvalue forvalues by bys bysort xi quietly qui capture about ac ac_7 acprplot acprplot_7 adjust ado adopath adoupdate alpha ameans an ano anov anova anova_estat anova_terms anovadef aorder ap app appe appen append arch arch_dr arch_estat arch_p archlm areg areg_\
p args arima arima_dr arima_estat arima_p as asmprobit asmprobit_estat asmprobit_lf asmprobit_mfx__dlg asmprobit_p ass asse asser assert avplot avplot_7 avplots avplots_7 bcskew0 bgodfrey bias binreg bip0_lf biplot bipp_lf bipr_lf bipr_p biprobit bitest bitesti bitowt blogit bmemsize boot bootsamp bootstrap bootstrap_8 boxco_l boxco_p boxcox boxcox_6 boxcox_p bprobit br break brier bro brow brows browse brr brrstat bs bs_7 bsampl_w bsample bsample_7 bsqreg bstat bstat_7 bstat_8 bstrap bstrap_7 b\
ubble bubbleplot ca ca_estat ca_p cabiplot camat canon canon_8 canon_8_p canon_estat canon_p cap caprojection capt captu captur capture cat cc cchart cchart_7 cci cd censobs_table centile cf char chdir checkdlgfiles checkestimationsample checkhlpfiles checksum chelp ci cii cl class classutil clear cli clis clist clo clog clog_lf clog_p clogi clogi_sw clogit clogit_lf clogit_p clogitp clogl_sw cloglog clonevar clslistarray cluster cluster_measures cluster_stop cluster_tree cluster_tree_8 clusterm\
at cmdlog cnr cnre cnreg cnreg_p cnreg_sw cnsreg codebook collaps4 collapse colormult_nb colormult_nw compare compress conf confi confir confirm conren cons const constr constra constrai constrain constraint continue contract copy copyright copysource cor corc corr corr2data corr_anti corr_kmo corr_smc corre correl correla correlat correlate corrgram cou coun count cox cox_p cox_sw coxbase coxhaz coxvar cprplot cprplot_7 crc cret cretu cretur creturn cross cs cscript cscript_log csi ct ct_is cts\
et ctst_5 ctst_st cttost cumsp cumsp_7 cumul cusum cusum_7 cutil d|0 datasig datasign datasigna datasignat datasignatu datasignatur datasignature datetof db dbeta de dec deco decod decode deff des desc descr descri describ describe destring dfbeta dfgls dfuller di di_g dir dirstats dis discard disp disp_res disp_s displ displa display distinct do doe doed doedi doedit dotplot dotplot_7 dprobit drawnorm drop ds ds_util dstdize duplicates durbina dwstat dydx e|0 ed edi edit egen eivreg emdef en en\
c enco encod encode eq erase ereg ereg_lf ereg_p ereg_sw ereghet ereghet_glf ereghet_glf_sh ereghet_gp ereghet_ilf ereghet_ilf_sh ereghet_ip eret eretu eretur ereturn err erro error esize est est_cfexist est_cfname est_clickable est_expand est_hold est_table est_unhold est_unholdok estat estat_default estat_summ estat_vce_only esti estimates etodow etof etomdy ex exi exit expand expandcl fac fact facto factor factor_estat factor_p factor_pca_rotated factor_rotate factormat fcast fcast_compute fc\
ast_graph fdades fdadesc fdadescr fdadescri fdadescrib fdadescribe fdasav fdasave fdause fh_st file open file read file close file filefilter fillin find_hlp_file findfile findit findit_7 fit fl fli flis flist for5_0 forest forestplot form forma format fpredict frac_154 frac_adj frac_chk frac_cox frac_ddp frac_dis frac_dv frac_in frac_mun frac_pp frac_pq frac_pv frac_wgt frac_xo fracgen fracplot fracplot_7 fracpoly fracpred fron_ex fron_hn fron_p fron_tn fron_tn2 frontier ftodate ftoe ftomdy fto\
wdate funnel funnelplot g|0 gamhet_glf gamhet_gp gamhet_ilf gamhet_ip gamma gamma_d2 gamma_p gamma_sw gammahet gdi_hexagon gdi_spokes ge gen gene gener genera generat generate genrank genstd genvmean gettoken gl gladder gladder_7 glim_l01 glim_l02 glim_l03 glim_l04 glim_l05 glim_l06 glim_l07 glim_l08 glim_l09 glim_l10 glim_l11 glim_l12 glim_lf glim_mu glim_nw1 glim_nw2 glim_nw3 glim_p glim_v1 glim_v2 glim_v3 glim_v4 glim_v5 glim_v6 glim_v7 glm glm_6 glm_p glm_sw glmpred glo glob globa global glo\
git glogit_8 glogit_p gmeans gnbre_lf gnbreg gnbreg_5 gnbreg_p gomp_lf gompe_sw gomper_p gompertz gompertzhet gomphet_glf gomphet_glf_sh gomphet_gp gomphet_ilf gomphet_ilf_sh gomphet_ip gphdot gphpen gphprint gprefs gprobi_p gprobit gprobit_8 gr gr7 gr_copy gr_current gr_db gr_describe gr_dir gr_draw gr_draw_replay gr_drop gr_edit gr_editviewopts gr_example gr_example2 gr_export gr_print gr_qscheme gr_query gr_read gr_rename gr_replay gr_save gr_set gr_setscheme gr_table gr_undo gr_use graph gra\
ph7 grebar greigen greigen_7 greigen_8 grmeanby grmeanby_7 gs_fileinfo gs_filetype gs_graphinfo gs_stat gsort gwood h|0 hadimvo hareg hausman haver he heck_d2 heckma_p heckman heckp_lf heckpr_p heckprob hel help hereg hetpr_lf hetpr_p hetprob hettest hexdump hilite hist hist_7 histogram hlogit hlu hmeans hotel hotelling hprobit hreg hsearch icd9 icd9_ff icd9p iis impute imtest inbase include inf infi infil infile infix inp inpu input ins insheet insp inspe inspec inspect integ inten intreg intre\
g_7 intreg_p intrg2_ll intrg_ll intrg_ll2 ipolate iqreg ir irf irf_create irfm iri is_svy is_svysum isid istdize ivprob_1_lf ivprob_lf ivprobit ivprobit_p ivreg ivreg_footnote ivtob_1_lf ivtob_lf ivtobit ivtobit_p jackknife jacknife jknife jknife_6 jknife_8 jkstat joinby kalarma1 kap kap_3 kapmeier kappa kapwgt kdensity kdensity_7 keep ksm ksmirnov ktau kwallis l|0 la lab labbe labbeplot labe label labelbook ladder levels levelsof leverage lfit lfit_p li lincom line linktest lis list lloghet_glf\
 lloghet_glf_sh lloghet_gp lloghet_ilf lloghet_ilf_sh lloghet_ip llogi_sw llogis_p llogist llogistic llogistichet lnorm_lf lnorm_sw lnorma_p lnormal lnormalhet lnormhet_glf lnormhet_glf_sh lnormhet_gp lnormhet_ilf lnormhet_ilf_sh lnormhet_ip lnskew0 loadingplot loc loca local log logi logis_lf logistic logistic_p logit logit_estat logit_p loglogs logrank loneway lookfor lookup lowess lowess_7 lpredict lrecomp lroc lroc_7 lrtest ls lsens lsens_7 lsens_x lstat ltable ltable_7 ltriang lv lvr2plot l\
vr2plot_7 m|0 ma mac macr macro makecns man manova manova_estat manova_p manovatest mantel mark markin markout marksample mat mat_capp mat_order mat_put_rr mat_rapp mata mata_clear mata_describe mata_drop mata_matdescribe mata_matsave mata_matuse mata_memory mata_mlib mata_mosave mata_rename mata_which matalabel matcproc matlist matname matr matri matrix matrix_input__dlg matstrik mcc mcci md0_ md1_ md1debug_ md2_ md2debug_ mds mds_estat mds_p mdsconfig mdslong mdsmat mdsshepard mdytoe mdytof me\
_derd mean means median memory memsize menl meqparse mer merg merge meta mfp mfx mhelp mhodds minbound mixed_ll mixed_ll_reparm mkassert mkdir mkmat mkspline ml ml_5 ml_adjs ml_bhhhs ml_c_d ml_check ml_clear ml_cnt ml_debug ml_defd ml_e0 ml_e0_bfgs ml_e0_cycle ml_e0_dfp ml_e0i ml_e1 ml_e1_bfgs ml_e1_bhhh ml_e1_cycle ml_e1_dfp ml_e2 ml_e2_cycle ml_ebfg0 ml_ebfr0 ml_ebfr1 ml_ebh0q ml_ebhh0 ml_ebhr0 ml_ebr0i ml_ecr0i ml_edfp0 ml_edfr0 ml_edfr1 ml_edr0i ml_eds ml_eer0i ml_egr0i ml_elf ml_elf_bfgs ml\
_elf_bhhh ml_elf_cycle ml_elf_dfp ml_elfi ml_elfs ml_enr0i ml_enrr0 ml_erdu0 ml_erdu0_bfgs ml_erdu0_bhhh ml_erdu0_bhhhq ml_erdu0_cycle ml_erdu0_dfp ml_erdu0_nrbfgs ml_exde ml_footnote ml_geqnr ml_grad0 ml_graph ml_hbhhh ml_hd0 ml_hold ml_init ml_inv ml_log ml_max ml_mlout ml_mlout_8 ml_model ml_nb0 ml_opt ml_p ml_plot ml_query ml_rdgrd ml_repor ml_s_e ml_score ml_searc ml_technique ml_unhold mleval mlf_ mlmatbysum mlmatsum mlog mlogi mlogit mlogit_footnote mlogit_p mlopts mlsum mlvecsum mnl0_ mo\
r more mov move mprobit mprobit_lf mprobit_p mrdu0_ mrdu1_ mvdecode mvencode mvreg mvreg_estat n|0 nbreg nbreg_al nbreg_lf nbreg_p nbreg_sw nestreg net newey newey_7 newey_p news nl nl_7 nl_9 nl_9_p nl_p nl_p_7 nlcom nlcom_p nlexp2 nlexp2_7 nlexp2a nlexp2a_7 nlexp3 nlexp3_7 nlgom3 nlgom3_7 nlgom4 nlgom4_7 nlinit nllog3 nllog3_7 nllog4 nllog4_7 nlog_rd nlogit nlogit_p nlogitgen nlogittree nlpred no nobreak noi nois noisi noisil noisily note notes notes_dlg nptrend numlabel numlist odbc old_ver ol\
o olog ologi ologi_sw ologit ologit_p ologitp on one onew onewa oneway op_colnm op_comp op_diff op_inv op_str opr opro oprob oprob_sw oprobi oprobi_p oprobit oprobitp opts_exclusive order orthog orthpoly ou out outf outfi outfil outfile outs outsh outshe outshee outsheet ovtest pac pac_7 palette parse parse_dissim pause pca pca_8 pca_display pca_estat pca_p pca_rotate pcamat pchart pchart_7 pchi pchi_7 pcorr pctile pentium pergram pergram_7 permute permute_8 personal peto_st pkcollapse pkcross p\
kequiv pkexamine pkexamine_7 pkshape pksumm pksumm_7 pl plo plot plugin pnorm pnorm_7 poisgof poiss_lf poiss_sw poisso_p poisson poisson_estat post postclose postfile postutil pperron pr prais prais_e prais_e2 prais_p predict predictnl preserve print pro prob probi probit probit_estat probit_p proc_time procoverlay procrustes procrustes_estat procrustes_p profiler prog progr progra program prop proportion prtest prtesti pwcorr pwd q\\s qby qbys qchi qchi_7 qladder qladder_7 qnorm qnorm_7 qqplot q\
qplot_7 qreg qreg_c qreg_p qreg_sw qu quadchk quantile quantile_7 que quer query range ranksum ratio rchart rchart_7 rcof recast reclink recode reg reg3 reg3_p regdw regr regre regre_p2 regres regres_p regress regress_estat regriv_p remap ren rena renam rename renpfix repeat replace report reshape restore ret retu retur return rm rmdir robvar roccomp roccomp_7 roccomp_8 rocf_lf rocfit rocfit_8 rocgold rocplot rocplot_7 roctab roctab_7 rolling rologit rologit_p rot rota rotat rotate rotatemat rre\
g rreg_p ru run runtest rvfplot rvfplot_7 rvpplot rvpplot_7 sa safesum sample sampsi sav save savedresults saveold sc sca scal scala scalar scatter scm_mine sco scob_lf scob_p scobi_sw scobit scor score scoreplot scoreplot_help scree screeplot screeplot_help sdtest sdtesti se search separate seperate serrbar serrbar_7 serset set set_defaults sfrancia sh she shel shell shewhart shewhart_7 signestimationsample signrank signtest simul simul_7 simulate simulate_8 sktest sleep slogit slogit_d2 slogit\
_p smooth snapspan so sor sort spearman spikeplot spikeplot_7 spikeplt spline_x split sqreg sqreg_p sret sretu sretur sreturn ssc st st_ct st_hc st_hcd st_hcd_sh st_is st_issys st_note st_promo st_set st_show st_smpl st_subid stack statsby statsby_8 stbase stci stci_7 stcox stcox_estat stcox_fr stcox_fr_ll stcox_p stcox_sw stcoxkm stcoxkm_7 stcstat stcurv stcurve stcurve_7 stdes stem stepwise stereg stfill stgen stir stjoin stmc stmh stphplot stphplot_7 stphtest stphtest_7 stptime strate strate_\
7 streg streg_sw streset sts sts_7 stset stsplit stsum sttocc sttoct stvary stweib su suest suest_8 sum summ summa summar summari summariz summarize sunflower sureg survcurv survsum svar svar_p svmat svy svy_disp svy_dreg svy_est svy_est_7 svy_estat svy_get svy_gnbreg_p svy_head svy_header svy_heckman_p svy_heckprob_p svy_intreg_p svy_ivreg_p svy_logistic_p svy_logit_p svy_mlogit_p svy_nbreg_p svy_ologit_p svy_oprobit_p svy_poisson_p svy_probit_p svy_regress_p svy_sub svy_sub_7 svy_x svy_x_7 svy\
_x_p svydes svydes_8 svygen svygnbreg svyheckman svyheckprob svyintreg svyintreg_7 svyintrg svyivreg svylc svylog_p svylogit svymarkout svymarkout_8 svymean svymlog svymlogit svynbreg svyolog svyologit svyoprob svyoprobit svyopts svypois svypois_7 svypoisson svyprobit svyprobt svyprop svyprop_7 svyratio svyreg svyreg_p svyregress svyset svyset_7 svyset_8 svytab svytab_7 svytest svytotal sw sw_8 swcnreg swcox swereg swilk swlogis swlogit swologit swoprbt swpois swprobit swqreg swtobit swweib symm\
etry symmi symplot symplot_7 syntax sysdescribe sysdir sysuse szroeter ta tab tab1 tab2 tab_or tabd tabdi tabdis tabdisp tabi table tabodds tabodds_7 tabstat tabu tabul tabula tabulat tabulate te tempfile tempname tempvar tes test testnl testparm teststd tetrachoric time_it timer tis tob tobi tobit tobit_p tobit_sw token tokeni tokeniz tokenize tostring total translate translator transmap treat_ll treatr_p treatreg trim trimfill trnb_cons trnb_mean trpoiss_d2 trunc_ll truncr_p truncreg tsappend \
tset tsfill tsline tsline_ex tsreport tsrevar tsrline tsset tssmooth tsunab ttest ttesti tut_chk tut_wait tutorial tw tware_st two twoway twoway__fpfit_serset twoway__function_gen twoway__histogram_gen twoway__ipoint_serset twoway__ipoints_serset twoway__kdensity_gen twoway__lfit_serset twoway__normgen_gen twoway__pci_serset twoway__qfit_serset twoway__scatteri_serset twoway__sunflower_gen twoway_ksm_serset ty typ type typeof u|0 unab unabbrev unabcmd update us use uselabel var var_mkcompanion v\
ar_p varbasic varfcast vargranger varirf varirf_add varirf_cgraph varirf_create varirf_ctable varirf_describe varirf_dir varirf_drop varirf_erase varirf_graph varirf_ograph varirf_rename varirf_set varirf_table varlist varlmar varnorm varsoc varstable varstable_w varstable_w2 varwle vce vec vec_fevd vec_mkphi vec_p vec_p_w vecirf_create veclmar veclmar_w vecnorm vecnorm_w vecrank vecstable verinst vers versi versio version view viewsource vif vwls wdatetof webdescribe webseek webuse weib1_lf wei\
b2_lf weib_lf weib_lf0 weibhet_glf weibhet_glf_sh weibhet_glfa weibhet_glfa_sh weibhet_gp weibhet_ilf weibhet_ilf_sh weibhet_ilfa weibhet_ilfa_sh weibhet_ip weibu_sw weibul_p weibull weibull_c weibull_s weibullhet wh whelp whi which whil while wilc_st wilcoxon win wind windo window winexec wntestb wntestb_7 wntestq xchart xchart_7 xcorr xcorr_7 xi xi_6 xmlsav xmlsave xmluse xpose xsh xshe xshel xshell xt_iis xt_tis xtab_p xtabond xtbin_p xtclog xtcloglog xtcloglog_8 xtcloglog_d2 xtcloglog_pa_p x\
tcloglog_re_p xtcnt_p xtcorr xtdata xtdes xtfront_p xtfrontier xtgee xtgee_elink xtgee_estat xtgee_makeivar xtgee_p xtgee_plink xtgls xtgls_p xthaus xthausman xtht_p xthtaylor xtile xtint_p xtintreg xtintreg_8 xtintreg_d2 xtintreg_p xtivp_1 xtivp_2 xtivreg xtline xtline_ex xtlogit xtlogit_8 xtlogit_d2 xtlogit_fe_p xtlogit_pa_p xtlogit_re_p xtmixed xtmixed_estat xtmixed_p xtnb_fe xtnb_lf xtnbreg xtnbreg_pa_p xtnbreg_refe_p xtpcse xtpcse_p xtpois xtpoisson xtpoisson_d2 xtpoisson_pa_p xtpoisson_ref\
e_p xtpred xtprobit xtprobit_8 xtprobit_d2 xtprobit_re_p xtps_fe xtps_lf xtps_ren xtps_ren_8 xtrar_p xtrc xtrc_p xtrchh xtrefe_p xtreg xtreg_be xtreg_fe xtreg_ml xtreg_pa_p xtreg_re xtregar xtrere_p xtset xtsf_ll xtsf_llti xtsum xttab xttest0 xttobit xttobit_8 xttobit_p xttrans yx yxview__barlike_draw yxview_area_draw yxview_bar_draw yxview_dot_draw yxview_dropline_draw yxview_function_draw yxview_iarrow_draw yxview_ilabels_draw yxview_normal_draw yxview_pcarrow_draw yxview_pcbarrow_draw yxview_\
pccapsym_draw yxview_pcscatter_draw yxview_pcspike_draw yxview_rarea_draw yxview_rbar_draw yxview_rbarm_draw yxview_rcap_draw yxview_rcapsym_draw yxview_rconnected_draw yxview_rline_draw yxview_rscatter_draw yxview_rspike_draw yxview_spike_draw yxview_sunflower_draw zap_s zinb zinb_llf zinb_plf zip zip_llf zip_p zip_plf zt_ct_5 zt_hc_5 zt_hcd_5 zt_is_5 zt_iss_5 zt_sho_5 zt_smp_5 ztbase_5 ztcox_5 ztdes_5 ztereg_5 ztfill_5 ztgen_5 ztir_5 ztjoin_5 ztnb ztnb_p ztp ztp_p zts_5 ztset_5 ztspli_5 ztsum_\
5 zttoct_5 ztvary_5 ztweib_5",contains:[{className:"symbol",begin:/`[a-zA-Z0-9_]+'/},{className:"variable",begin:/\$\{?[a-zA-Z0-9_]+\}?/,relevance:0},{className:"string",variants:[{begin:`\`"[^\r
]*?"'`},{begin:`"[^\r
"]*"`}]},{className:"built_in",variants:[{begin:"\\b(abs|acos|asin|atan|atan2|atanh|ceil|cloglog|comb|cos|digamma|exp|floor|invcloglog|invlogit|ln|lnfact|lnfactorial|lngamma|log|log10|max|min|mod|reldif|round|sign|sin|sqrt|sum|tan|tanh|trigamma|trunc|betaden|Binomial|binorm|binormal|chi2|chi2tail|dgammapda|dgammapdada|dgammapdadx|dgammapdx|dgammapdxdx|F|Fden|Ftail|gammaden|gammap|ibeta|invbinomial|invchi2|invchi2tail|invF|invFtail|invgammap|invibeta|invnchi2|invnFtail|invnibeta|invnorm|invnormal|\
invttail|nbetaden|nchi2|nFden|nFtail|nibeta|norm|normal|normalden|normd|npnchi2|tden|ttail|uniform|abbrev|char|index|indexnot|length|lower|ltrim|match|plural|proper|real|regexm|regexr|regexs|reverse|rtrim|string|strlen|strlower|strltrim|strmatch|strofreal|strpos|strproper|strreverse|strrtrim|strtrim|strupper|subinstr|subinword|substr|trim|upper|word|wordcount|_caller|autocode|byteorder|chop|clip|cond|e|epsdouble|epsfloat|group|inlist|inrange|irecode|matrix|maxbyte|maxdouble|maxfloat|maxint|maxlo\
ng|mi|minbyte|mindouble|minfloat|minint|minlong|missing|r|recode|replay|return|s|scalar|d|date|day|dow|doy|halfyear|mdy|month|quarter|week|year|d|daily|dofd|dofh|dofm|dofq|dofw|dofy|h|halfyearly|hofd|m|mofd|monthly|q|qofd|quarterly|tin|twithin|w|weekly|wofd|y|yearly|yh|ym|yofd|yq|yw|cholesky|colnumb|colsof|corr|det|diag|diag0cnt|el|get|hadamard|I|inv|invsym|issym|issymmetric|J|matmissing|matuniform|mreldif|nullmat|rownumb|rowsof|sweep|syminv|trace|vec|vecdiag)(?=\\()"}]},hljs.COMMENT("^[ 	]*\\*.*\
$",!1),hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE]}}return stata_1=stata2,stata_1}var step21_1,hasRequiredStep21;function requireStep21(){if(hasRequiredStep21)return step21_1;hasRequiredStep21=1;function step212(hljs){return{name:"STEP Part 21",aliases:["p21","step","stp"],case_insensitive:!0,keywords:{$pattern:"[A-Z_][A-Z0-9_.]*",keyword:["HEADER","ENDSEC","DATA"]},contains:[{className:"meta",begin:"ISO-10303-21;",relevance:10},{className:"meta",begin:"END-ISO-10303-21;",relevance:10},hljs.
C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.COMMENT("/\\*\\*!","\\*/"),hljs.C_NUMBER_MODE,hljs.inherit(hljs.APOS_STRING_MODE,{illegal:null}),hljs.inherit(hljs.QUOTE_STRING_MODE,{illegal:null}),{className:"string",begin:"'",end:"'"},{className:"symbol",variants:[{begin:"#",end:"\\d+",illegal:"\\W"}]}]}}return step21_1=step212,step21_1}var stylus_1,hasRequiredStylus;function requireStylus(){if(hasRequiredStylus)return stylus_1;hasRequiredStylus=1;const MODES2=hljs=>({IMPORTANT:{scope:"meta",
begin:"!important"},BLOCK_COMMENT:hljs.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:hljs.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},
CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),HTML_TAGS2=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp",
"section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],SVG_TAGS2=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","ci\
rcle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],TAGS2=[...HTML_TAGS2,...SVG_TAGS2],MEDIA_FEATURES2=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","pref\
ers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),PSEUDO_CLASSES2=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of\
-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),PSEUDO_ELEMENTS2=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection",
"slotted","spelling-error"].sort().reverse(),ATTRIBUTES2=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filte\
r","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block\
-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline\
-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color",
"border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","colu\
mn-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display",
"dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthe\
sis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end",
"grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start",
"isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-borde\
r","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","n\
one","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavio\
r-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize",
"rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll\
-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-\
linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-over\
flow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeli\
ne","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function stylus2(hljs){const modes2=MODES2(hljs),AT_MODIFIERS="and or not only",VARIABLE={className:"variable",
begin:"\\$"+hljs.IDENT_RE},AT_KEYWORDS=["charset","css","debug","extend","font-face","for","import","include","keyframes","media","mixin","page","warn","while"],LOOKAHEAD_TAG_END="(?=[.\\s\\n[:,(])";return{name:"Stylus",aliases:["styl"],case_insensitive:!1,keywords:"if else for in",illegal:"("+["\\?","(\\bReturn\\b)","(\\bEnd\\b)","(\\bend\\b)","(\\bdef\\b)",";","#\\s","\\*\\s","===\\s","\\|","%"].join("|")+")",contains:[hljs.QUOTE_STRING_MODE,hljs.APOS_STRING_MODE,hljs.C_LINE_COMMENT_MODE,hljs.
C_BLOCK_COMMENT_MODE,modes2.HEXCOLOR,{begin:"\\.[a-zA-Z][a-zA-Z0-9_-]*"+LOOKAHEAD_TAG_END,className:"selector-class"},{begin:"#[a-zA-Z][a-zA-Z0-9_-]*"+LOOKAHEAD_TAG_END,className:"selector-id"},{begin:"\\b("+TAGS2.join("|")+")"+LOOKAHEAD_TAG_END,className:"selector-tag"},{className:"selector-pseudo",begin:"&?:("+PSEUDO_CLASSES2.join("|")+")"+LOOKAHEAD_TAG_END},{className:"selector-pseudo",begin:"&?:(:)?("+PSEUDO_ELEMENTS2.join("|")+")"+LOOKAHEAD_TAG_END},modes2.ATTRIBUTE_SELECTOR_MODE,{className:"\
keyword",begin:/@media/,starts:{end:/[{;}]/,keywords:{$pattern:/[a-z-]+/,keyword:AT_MODIFIERS,attribute:MEDIA_FEATURES2.join(" ")},contains:[modes2.CSS_NUMBER_MODE]}},{className:"keyword",begin:"@((-(o|moz|ms|webkit)-)?("+AT_KEYWORDS.join("|")+"))\\b"},VARIABLE,modes2.CSS_NUMBER_MODE,{className:"function",begin:"^[a-zA-Z][a-zA-Z0-9_-]*\\(.*\\)",illegal:"[\\n]",returnBegin:!0,contains:[{className:"title",begin:"\\b[a-zA-Z][a-zA-Z0-9_-]*"},{className:"params",begin:/\(/,end:/\)/,contains:[modes2.HEXCOLOR,
VARIABLE,hljs.APOS_STRING_MODE,modes2.CSS_NUMBER_MODE,hljs.QUOTE_STRING_MODE]}]},modes2.CSS_VARIABLE,{className:"attribute",begin:"\\b("+ATTRIBUTES2.join("|")+")\\b",starts:{end:/;|$/,contains:[modes2.HEXCOLOR,VARIABLE,hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,modes2.CSS_NUMBER_MODE,hljs.C_BLOCK_COMMENT_MODE,modes2.IMPORTANT,modes2.FUNCTION_DISPATCH],illegal:/\./,relevance:0}},modes2.FUNCTION_DISPATCH]}}return stylus_1=stylus2,stylus_1}var subunit_1,hasRequiredSubunit;function requireSubunit(){
if(hasRequiredSubunit)return subunit_1;hasRequiredSubunit=1;function subunit2(hljs){return{name:"SubUnit",case_insensitive:!0,contains:[{className:"string",begin:`\\[
(multipart)?`,end:`\\]
`},{className:"string",begin:"\\d{4}-\\d{2}-\\d{2}(\\s+)\\d{2}:\\d{2}:\\d{2}.\\d+Z"},{className:"string",begin:"(\\+|-)\\d+"},{className:"keyword",relevance:10,variants:[{begin:"^(test|testing|success|successful|failure|error|skip|xfail|uxsuccess)(:?)\\s+(test)?"},{begin:"^progress(:?)(\\s+)?(pop|push)?"},{begin:"^tags:"},{begin:"^time:"}]}]}}return subunit_1=subunit2,subunit_1}var swift_1,hasRequiredSwift;function requireSwift(){if(hasRequiredSwift)return swift_1;hasRequiredSwift=1;function source2(re2){
return re2?typeof re2=="string"?re2:re2.source:null}function lookahead2(re2){return concat2("(?=",re2,")")}function concat2(...args){return args.map(x=>source2(x)).join("")}function stripOptionsFromArgs2(args){const opts=args[args.length-1];return typeof opts=="object"&&opts.constructor===Object?(args.splice(args.length-1,1),opts):{}}function either2(...args){return"("+(stripOptionsFromArgs2(args).capture?"":"?:")+args.map(x=>source2(x)).join("|")+")"}const keywordWrapper2=keyword2=>concat2(/\b/,
keyword2,/\w$/.test(keyword2)?/\b/:/\B/),dotKeywords2=["Protocol","Type"].map(keywordWrapper2),optionalDotKeywords2=["init","self"].map(keywordWrapper2),keywordTypes2=["Any","Self"],keywords2=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate",
"final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","package","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"\
try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],literals2=["false","nil","true"],precedencegroupKeywords2=["assignment","associativity","higherThan","left","lowerThan","none","right"],numberSignKeywords2=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],builtIns2=["abs","all",
"any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],operatorHead2=either2(/[/=\-+!*%<>&|^~?]/,
/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),operatorCharacter2=either2(operatorHead2,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),operator2=concat2(operatorHead2,operatorCharacter2,"*"),
identifierHead2=either2(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),
identifierCharacter2=either2(identifierHead2,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),identifier2=concat2(identifierHead2,identifierCharacter2,"*"),typeIdentifier2=concat2(/[A-Z]/,identifierCharacter2,"*"),keywordAttributes2=["attached","autoclosure",concat2(/convention\(/,either2("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSe\
gueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",concat2(/objc\(/,identifier2,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],availabilityKeywords2=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvO\
S","tvOSApplicationExtension","swift"];function swift2(hljs){const WHITESPACE={match:/\s+/,relevance:0},BLOCK_COMMENT=hljs.COMMENT("/\\*","\\*/",{contains:["self"]}),COMMENTS=[hljs.C_LINE_COMMENT_MODE,BLOCK_COMMENT],DOT_KEYWORD={match:[/\./,either2(...dotKeywords2,...optionalDotKeywords2)],className:{2:"keyword"}},KEYWORD_GUARD={match:concat2(/\./,either2(...keywords2)),relevance:0},PLAIN_KEYWORDS=keywords2.filter(kw=>typeof kw=="string").concat(["_|0"]),REGEX_KEYWORDS=keywords2.filter(kw=>typeof kw!=
"string").concat(keywordTypes2).map(keywordWrapper2),KEYWORD={variants:[{className:"keyword",match:either2(...REGEX_KEYWORDS,...optionalDotKeywords2)}]},KEYWORDS2={$pattern:either2(/\b\w+/,/#\w+/),keyword:PLAIN_KEYWORDS.concat(numberSignKeywords2),literal:literals2},KEYWORD_MODES=[DOT_KEYWORD,KEYWORD_GUARD,KEYWORD],BUILT_IN_GUARD={match:concat2(/\./,either2(...builtIns2)),relevance:0},BUILT_IN={className:"built_in",match:concat2(/\b/,either2(...builtIns2),/(?=\()/)},BUILT_INS2=[BUILT_IN_GUARD,BUILT_IN],
OPERATOR_GUARD={match:/->/,relevance:0},OPERATOR={className:"operator",relevance:0,variants:[{match:operator2},{match:`\\.(\\.|${operatorCharacter2})+`}]},OPERATORS=[OPERATOR_GUARD,OPERATOR],decimalDigits2="([0-9]_*)+",hexDigits2="([0-9a-fA-F]_*)+",NUMBER={className:"number",relevance:0,variants:[{match:`\\b(${decimalDigits2})(\\.(${decimalDigits2}))?([eE][+-]?(${decimalDigits2}))?\\b`},{match:`\\b0x(${hexDigits2})(\\.(${hexDigits2}))?([pP][+-]?(${decimalDigits2}))?\\b`},{match:/\b0o([0-7]_*)+\b/},
{match:/\b0b([01]_*)+\b/}]},ESCAPED_CHARACTER=(rawDelimiter="")=>({className:"subst",variants:[{match:concat2(/\\/,rawDelimiter,/[0\\tnr"']/)},{match:concat2(/\\/,rawDelimiter,/u\{[0-9a-fA-F]{1,8}\}/)}]}),ESCAPED_NEWLINE=(rawDelimiter="")=>({className:"subst",match:concat2(/\\/,rawDelimiter,/[\t ]*(?:[\r\n]|\r\n)/)}),INTERPOLATION=(rawDelimiter="")=>({className:"subst",label:"interpol",begin:concat2(/\\/,rawDelimiter,/\(/),end:/\)/}),MULTILINE_STRING=(rawDelimiter="")=>({begin:concat2(rawDelimiter,
/"""/),end:concat2(/"""/,rawDelimiter),contains:[ESCAPED_CHARACTER(rawDelimiter),ESCAPED_NEWLINE(rawDelimiter),INTERPOLATION(rawDelimiter)]}),SINGLE_LINE_STRING=(rawDelimiter="")=>({begin:concat2(rawDelimiter,/"/),end:concat2(/"/,rawDelimiter),contains:[ESCAPED_CHARACTER(rawDelimiter),INTERPOLATION(rawDelimiter)]}),STRING={className:"string",variants:[MULTILINE_STRING(),MULTILINE_STRING("#"),MULTILINE_STRING("##"),MULTILINE_STRING("###"),SINGLE_LINE_STRING(),SINGLE_LINE_STRING("#"),SINGLE_LINE_STRING(
"##"),SINGLE_LINE_STRING("###")]},REGEXP_CONTENTS=[hljs.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[hljs.BACKSLASH_ESCAPE]}],BARE_REGEXP_LITERAL={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:REGEXP_CONTENTS},EXTENDED_REGEXP_LITERAL=rawDelimiter=>{const begin=concat2(rawDelimiter,/\//),end=concat2(/\//,rawDelimiter);return{begin,end,contains:[...REGEXP_CONTENTS,{scope:"comment",begin:`#(?!.*${end})`,end:/$/}]}},REGEXP2={scope:"regexp",variants:[EXTENDED_REGEXP_LITERAL("###"),EXTENDED_REGEXP_LITERAL(
"##"),EXTENDED_REGEXP_LITERAL("#"),BARE_REGEXP_LITERAL]},QUOTED_IDENTIFIER={match:concat2(/`/,identifier2,/`/)},IMPLICIT_PARAMETER={className:"variable",match:/\$\d+/},PROPERTY_WRAPPER_PROJECTION={className:"variable",match:`\\$${identifierCharacter2}+`},IDENTIFIERS=[QUOTED_IDENTIFIER,IMPLICIT_PARAMETER,PROPERTY_WRAPPER_PROJECTION],AVAILABLE_ATTRIBUTE={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:availabilityKeywords2,contains:[...OPERATORS,NUMBER,STRING]}]}},
KEYWORD_ATTRIBUTE={scope:"keyword",match:concat2(/@/,either2(...keywordAttributes2),lookahead2(either2(/\(/,/\s+/)))},USER_DEFINED_ATTRIBUTE={scope:"meta",match:concat2(/@/,identifier2)},ATTRIBUTES2=[AVAILABLE_ATTRIBUTE,KEYWORD_ATTRIBUTE,USER_DEFINED_ATTRIBUTE],TYPE={match:lookahead2(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:concat2(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,identifierCharacter2,"+")},{className:"type",match:typeIdentifier2,relevance:0},{match:/[?!]+/,
relevance:0},{match:/\.\.\./,relevance:0},{match:concat2(/\s+&\s+/,lookahead2(typeIdentifier2)),relevance:0}]},GENERIC_ARGUMENTS={begin:/</,end:/>/,keywords:KEYWORDS2,contains:[...COMMENTS,...KEYWORD_MODES,...ATTRIBUTES2,OPERATOR_GUARD,TYPE]};TYPE.contains.push(GENERIC_ARGUMENTS);const TUPLE_ELEMENT_NAME={match:concat2(identifier2,/\s*:/),keywords:"_|0",relevance:0},TUPLE={begin:/\(/,end:/\)/,relevance:0,keywords:KEYWORDS2,contains:["self",TUPLE_ELEMENT_NAME,...COMMENTS,REGEXP2,...KEYWORD_MODES,
...BUILT_INS2,...OPERATORS,NUMBER,STRING,...IDENTIFIERS,...ATTRIBUTES2,TYPE]},GENERIC_PARAMETERS={begin:/</,end:/>/,keywords:"repeat each",contains:[...COMMENTS,TYPE]},FUNCTION_PARAMETER_NAME={begin:either2(lookahead2(concat2(identifier2,/\s*:/)),lookahead2(concat2(identifier2,/\s+/,identifier2,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:identifier2}]},FUNCTION_PARAMETERS={begin:/\(/,end:/\)/,keywords:KEYWORDS2,contains:[FUNCTION_PARAMETER_NAME,
...COMMENTS,...KEYWORD_MODES,...OPERATORS,NUMBER,STRING,...ATTRIBUTES2,TYPE,TUPLE],endsParent:!0,illegal:/["']/},FUNCTION_OR_MACRO={match:[/(func|macro)/,/\s+/,either2(QUOTED_IDENTIFIER.match,identifier2,operator2)],className:{1:"keyword",3:"title.function"},contains:[GENERIC_PARAMETERS,FUNCTION_PARAMETERS,WHITESPACE],illegal:[/\[/,/%/]},INIT_SUBSCRIPT={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[GENERIC_PARAMETERS,FUNCTION_PARAMETERS,WHITESPACE],illegal:/\[|%/},
OPERATOR_DECLARATION={match:[/operator/,/\s+/,operator2],className:{1:"keyword",3:"title"}},PRECEDENCEGROUP={begin:[/precedencegroup/,/\s+/,typeIdentifier2],className:{1:"keyword",3:"title"},contains:[TYPE],keywords:[...precedencegroupKeywords2,...literals2],end:/}/},CLASS_FUNC_DECLARATION={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},CLASS_VAR_DECLARATION={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},
TYPE_DECLARATION={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,identifier2,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:KEYWORDS2,contains:[GENERIC_PARAMETERS,...KEYWORD_MODES,{begin:/:/,end:/\{/,keywords:KEYWORDS2,contains:[{scope:"title.class.inherited",match:typeIdentifier2},...KEYWORD_MODES],relevance:0}]};for(const variant of STRING.variants){const interpolation=variant.contains.find(mode=>mode.label==="interpol");interpolation.keywords=KEYWORDS2;const submodes=[...KEYWORD_MODES,
...BUILT_INS2,...OPERATORS,NUMBER,STRING,...IDENTIFIERS];interpolation.contains=[...submodes,{begin:/\(/,end:/\)/,contains:["self",...submodes]}]}return{name:"Swift",keywords:KEYWORDS2,contains:[...COMMENTS,FUNCTION_OR_MACRO,INIT_SUBSCRIPT,CLASS_FUNC_DECLARATION,CLASS_VAR_DECLARATION,TYPE_DECLARATION,OPERATOR_DECLARATION,PRECEDENCEGROUP,{beginKeywords:"import",end:/$/,contains:[...COMMENTS],relevance:0},REGEXP2,...KEYWORD_MODES,...BUILT_INS2,...OPERATORS,NUMBER,STRING,...IDENTIFIERS,...ATTRIBUTES2,
TYPE,TUPLE]}}return swift_1=swift2,swift_1}var taggerscript_1,hasRequiredTaggerscript;function requireTaggerscript(){if(hasRequiredTaggerscript)return taggerscript_1;hasRequiredTaggerscript=1;function taggerscript2(hljs){return{name:"Tagger Script",contains:[{className:"comment",begin:/\$noop\(/,end:/\)/,contains:[{begin:/\\[()]/},{begin:/\(/,end:/\)/,contains:[{begin:/\\[()]/},"self"]}],relevance:10},{className:"keyword",begin:/\$[_a-zA-Z0-9]+(?=\()/},{className:"variable",begin:/%[_a-zA-Z0-9:]+%/},
{className:"symbol",begin:/\\[\\nt$%,()]/},{className:"symbol",begin:/\\u[a-fA-F0-9]{4}/}]}}return taggerscript_1=taggerscript2,taggerscript_1}var yaml_1,hasRequiredYaml;function requireYaml(){if(hasRequiredYaml)return yaml_1;hasRequiredYaml=1;function yaml2(hljs){const LITERALS2="true false yes no null",URI_CHARACTERS="[\\w#;/?:@&=+$,.~*'()[\\]]+",KEY={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},
TEMPLATE_VARIABLES={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},SINGLE_QUOTE_STRING={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},STRING={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[hljs.BACKSLASH_ESCAPE,TEMPLATE_VARIABLES]},CONTAINER_STRING=hljs.inherit(STRING,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{
begin:/[^\s,{}[\]]+/}]}),TIMESTAMP={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},VALUE_CONTAINER={end:",",endsWithParent:!0,excludeEnd:!0,keywords:LITERALS2,relevance:0},OBJECT2={begin:/\{/,end:/\}/,contains:[VALUE_CONTAINER],illegal:"\\n",relevance:0},ARRAY2={begin:"\\[",end:"\\]",contains:[VALUE_CONTAINER],illegal:"\\n",relevance:0},MODES2=[KEY,{className:"meta",begin:"^-\
--\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+URI_CHARACTERS},{className:"type",begin:"!<"+URI_CHARACTERS+">"},{className:"type",begin:"!"+URI_CHARACTERS},{className:"type",begin:"!!"+URI_CHARACTERS},{className:"meta",begin:"&"+hljs.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+hljs.UNDERSCORE_IDENT_RE+
"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},hljs.HASH_COMMENT_MODE,{beginKeywords:LITERALS2,keywords:{literal:LITERALS2}},TIMESTAMP,{className:"number",begin:hljs.C_NUMBER_RE+"\\b",relevance:0},OBJECT2,ARRAY2,SINGLE_QUOTE_STRING,STRING],VALUE_MODES=[...MODES2];return VALUE_MODES.pop(),VALUE_MODES.push(CONTAINER_STRING),VALUE_CONTAINER.contains=VALUE_MODES,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:MODES2}}return yaml_1=yaml2,yaml_1}var tap_1,hasRequiredTap;function requireTap(){
if(hasRequiredTap)return tap_1;hasRequiredTap=1;function tap2(hljs){return{name:"Test Anything Protocol",case_insensitive:!0,contains:[hljs.HASH_COMMENT_MODE,{className:"meta",variants:[{begin:"^TAP version (\\d+)$"},{begin:"^1\\.\\.(\\d+)$"}]},{begin:/---$/,end:"\\.\\.\\.$",subLanguage:"yaml",relevance:0},{className:"number",begin:" (\\d+) "},{className:"symbol",variants:[{begin:"^ok"},{begin:"^not ok"}]}]}}return tap_1=tap2,tap_1}var tcl_1,hasRequiredTcl;function requireTcl(){if(hasRequiredTcl)
return tcl_1;hasRequiredTcl=1;function tcl2(hljs){const regex=hljs.regex,TCL_IDENT=/[a-zA-Z_][a-zA-Z0-9_]*/,NUMBER={className:"number",variants:[hljs.BINARY_NUMBER_MODE,hljs.C_NUMBER_MODE]};return{name:"Tcl",aliases:["tk"],keywords:["after","append","apply","array","auto_execok","auto_import","auto_load","auto_mkindex","auto_mkindex_old","auto_qualify","auto_reset","bgerror","binary","break","catch","cd","chan","clock","close","concat","continue","dde","dict","encoding","eof","error","eval","exe\
c","exit","expr","fblocked","fconfigure","fcopy","file","fileevent","filename","flush","for","foreach","format","gets","glob","global","history","http","if","incr","info","interp","join","lappend|10","lassign|10","lindex|10","linsert|10","list","llength|10","load","lrange|10","lrepeat|10","lreplace|10","lreverse|10","lsearch|10","lset|10","lsort|10","mathfunc","mathop","memory","msgcat","namespace","open","package","parray","pid","pkg::create","pkg_mkIndex","platform","platform::shell","proc","p\
uts","pwd","read","refchan","regexp","registry","regsub|10","rename","return","safe","scan","seek","set","socket","source","split","string","subst","switch","tcl_endOfWord","tcl_findLibrary","tcl_startOfNextWord","tcl_startOfPreviousWord","tcl_wordBreakAfter","tcl_wordBreakBefore","tcltest","tclvars","tell","time","tm","trace","unknown","unload","unset","update","uplevel","upvar","variable","vwait","while"],contains:[hljs.COMMENT(";[ \\t]*#","$"),hljs.COMMENT("^[ \\t]*#","$"),{beginKeywords:"pro\
c",end:"[\\{]",excludeEnd:!0,contains:[{className:"title",begin:"[ \\t\\n\\r]+(::)?[a-zA-Z_]((::)?[a-zA-Z0-9_])*",end:"[ \\t\\n\\r]",endsWithParent:!0,excludeEnd:!0}]},{className:"variable",variants:[{begin:regex.concat(/\$/,regex.optional(/::/),TCL_IDENT,"(::",TCL_IDENT,")*")},{begin:"\\$\\{(::)?[a-zA-Z_]((::)?[a-zA-Z0-9_])*",end:"\\}",contains:[NUMBER]}]},{className:"string",contains:[hljs.BACKSLASH_ESCAPE],variants:[hljs.inherit(hljs.QUOTE_STRING_MODE,{illegal:null})]},NUMBER]}}return tcl_1=tcl2,
tcl_1}var thrift_1,hasRequiredThrift;function requireThrift(){if(hasRequiredThrift)return thrift_1;hasRequiredThrift=1;function thrift2(hljs){const TYPES2=["bool","byte","i16","i32","i64","double","string","binary"];return{name:"Thrift",keywords:{keyword:["namespace","const","typedef","struct","enum","service","exception","void","oneway","set","list","map","required","optional"],type:TYPES2,literal:"true false"},contains:[hljs.QUOTE_STRING_MODE,hljs.NUMBER_MODE,hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,
{className:"class",beginKeywords:"struct enum service exception",end:/\{/,illegal:/\n/,contains:[hljs.inherit(hljs.TITLE_MODE,{starts:{endsWithParent:!0,excludeEnd:!0}})]},{begin:"\\b(set|list|map)\\s*<",keywords:{type:[...TYPES2,"set","list","map"]},end:">",contains:["self"]}]}}return thrift_1=thrift2,thrift_1}var tp_1,hasRequiredTp;function requireTp(){if(hasRequiredTp)return tp_1;hasRequiredTp=1;function tp2(hljs){const TPID={className:"number",begin:"[1-9][0-9]*",relevance:0},TPLABEL={className:"\
symbol",begin:":[^\\]]+"},TPDATA={className:"built_in",begin:"(AR|P|PAYLOAD|PR|R|SR|RSR|LBL|VR|UALM|MESSAGE|UTOOL|UFRAME|TIMER|TIMER_OVERFLOW|JOINT_MAX_SPEED|RESUME_PROG|DIAG_REC)\\[",end:"\\]",contains:["self",TPID,TPLABEL]},TPIO={className:"built_in",begin:"(AI|AO|DI|DO|F|RI|RO|UI|UO|GI|GO|SI|SO)\\[",end:"\\]",contains:["self",TPID,hljs.QUOTE_STRING_MODE,TPLABEL]};return{name:"TP",keywords:{keyword:["ABORT","ACC","ADJUST","AND","AP_LD","BREAK","CALL","CNT","COL","CONDITION","CONFIG","DA","DB",
"DIV","DETECT","ELSE","END","ENDFOR","ERR_NUM","ERROR_PROG","FINE","FOR","GP","GUARD","INC","IF","JMP","LINEAR_MAX_SPEED","LOCK","MOD","MONITOR","OFFSET","Offset","OR","OVERRIDE","PAUSE","PREG","PTH","RT_LD","RUN","SELECT","SKIP","Skip","TA","TB","TO","TOOL_OFFSET","Tool_Offset","UF","UT","UFRAME_NUM","UTOOL_NUM","UNLOCK","WAIT","X","Y","Z","W","P","R","STRLEN","SUBSTR","FINDSTR","VOFFSET","PROG","ATTR","MN","POS"],literal:["ON","OFF","max_speed","LPOS","JPOS","ENABLE","DISABLE","START","STOP","\
RESET"]},contains:[TPDATA,TPIO,{className:"keyword",begin:"/(PROG|ATTR|MN|POS|END)\\b"},{className:"keyword",begin:"(CALL|RUN|POINT_LOGIC|LBL)\\b"},{className:"keyword",begin:"\\b(ACC|CNT|Skip|Offset|PSPD|RT_LD|AP_LD|Tool_Offset)"},{className:"number",begin:"\\d+(sec|msec|mm/sec|cm/min|inch/min|deg/sec|mm|in|cm)?\\b",relevance:0},hljs.COMMENT("//","[;$]"),hljs.COMMENT("!","[;$]"),hljs.COMMENT("--eg:","$"),hljs.QUOTE_STRING_MODE,{className:"string",begin:"'",end:"'"},hljs.C_NUMBER_MODE,{className:"\
variable",begin:"\\$[A-Za-z0-9_]+"}]}}return tp_1=tp2,tp_1}var twig_1,hasRequiredTwig;function requireTwig(){if(hasRequiredTwig)return twig_1;hasRequiredTwig=1;function twig2(hljs){const regex=hljs.regex,FUNCTION_NAMES=["absolute_url","asset|0","asset_version","attribute","block","constant","controller|0","country_timezones","csrf_token","cycle","date","dump","expression","form|0","form_end","form_errors","form_help","form_label","form_rest","form_row","form_start","form_widget","html_classes","\
include","is_granted","logout_path","logout_url","max","min","parent","path|0","random","range","relative_path","render","render_esi","source","template_from_string","url|0"],FILTERS=["abs","abbr_class","abbr_method","batch","capitalize","column","convert_encoding","country_name","currency_name","currency_symbol","data_uri","date","date_modify","default","escape","file_excerpt","file_link","file_relative","filter","first","format","format_args","format_args_as_text","format_currency","format_dat\
e","format_datetime","format_file","format_file_from_text","format_number","format_time","html_to_markdown","humanize","inky_to_html","inline_css","join","json_encode","keys","language_name","last","length","locale_name","lower","map","markdown","markdown_to_html","merge","nl2br","number_format","raw","reduce","replace","reverse","round","slice","slug","sort","spaceless","split","striptags","timezone_name","title","trans","transchoice","trim","u|0","upper","url_encode","yaml_dump","yaml_encode"];
let TAG_NAMES=["apply","autoescape","block","cache","deprecated","do","embed","extends","filter","flush","for","form_theme","from","if","import","include","macro","sandbox","set","stopwatch","trans","trans_default_domain","transchoice","use","verbatim","with"];TAG_NAMES=TAG_NAMES.concat(TAG_NAMES.map(t=>`end${t}`));const STRING={scope:"string",variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/}]},NUMBER={scope:"number",match:/\d+/},PARAMS={begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,contains:[
STRING,NUMBER]},FUNCTIONS={beginKeywords:FUNCTION_NAMES.join(" "),keywords:{name:FUNCTION_NAMES},relevance:0,contains:[PARAMS]},FILTER={match:/\|(?=[A-Za-z_]+:?)/,beginScope:"punctuation",relevance:0,contains:[{match:/[A-Za-z_]+:?/,keywords:FILTERS}]},tagNamed=(tagnames,{relevance})=>({beginScope:{1:"template-tag",3:"name"},relevance:relevance||2,endScope:"template-tag",begin:[/\{%/,/\s*/,regex.either(...tagnames)],end:/%\}/,keywords:"in",contains:[FILTER,FUNCTIONS,STRING,NUMBER]}),CUSTOM_TAG_RE=/[a-z_]+/,
TAG=tagNamed(TAG_NAMES,{relevance:2}),CUSTOM_TAG=tagNamed([CUSTOM_TAG_RE],{relevance:1});return{name:"Twig",aliases:["craftcms"],case_insensitive:!0,subLanguage:"xml",contains:[hljs.COMMENT(/\{#/,/#\}/),TAG,CUSTOM_TAG,{className:"template-variable",begin:/\{\{/,end:/\}\}/,contains:["self",FILTER,FUNCTIONS,STRING,NUMBER]}]}}return twig_1=twig2,twig_1}var typescript_1,hasRequiredTypescript;function requireTypescript(){if(hasRequiredTypescript)return typescript_1;hasRequiredTypescript=1;const IDENT_RE2="\
[A-Za-z$_][0-9A-Za-z$_]*",KEYWORDS2=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],LITERALS2=["true","false","null","undefined","NaN","Infinity"],TYPES2=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","R\
egExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],ERROR_TYPES2=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],BUILT_IN_GLOBALS2=[
"setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],BUILT_IN_VARIABLES2=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],BUILT_INS2=[].concat(BUILT_IN_GLOBALS2,TYPES2,ERROR_TYPES2);function javascript2(hljs){const regex=hljs.regex,hasClosingTag=(match,{after})=>{const tag="</"+
match[0].slice(1);return match.input.indexOf(tag,after)!==-1},IDENT_RE$12=IDENT_RE2,FRAGMENT={begin:"<>",end:"</>"},XML_SELF_CLOSING=/<[A-Za-z0-9\\._:-]+\s*\/>/,XML_TAG={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(match,response)=>{const afterMatchIndex=match[0].length+match.index,nextChar=match.input[afterMatchIndex];if(nextChar==="<"||nextChar===","){response.ignoreMatch();return}nextChar===">"&&(hasClosingTag(match,{after:afterMatchIndex})||response.ignoreMatch());
let m;const afterMatch=match.input.substring(afterMatchIndex);if(m=afterMatch.match(/^\s*=/)){response.ignoreMatch();return}if((m=afterMatch.match(/^\s+extends\s+/))&&m.index===0){response.ignoreMatch();return}}},KEYWORDS$12={$pattern:IDENT_RE2,keyword:KEYWORDS2,literal:LITERALS2,built_in:BUILT_INS2,"variable.language":BUILT_IN_VARIABLES2},decimalDigits2="[0-9](_?[0-9])*",frac2=`\\.(${decimalDigits2})`,decimalInteger="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",NUMBER={className:"number",variants:[{begin:`\
(\\b(${decimalInteger})((${frac2})|\\.)?|(${frac2}))[eE][+-]?(${decimalDigits2})\\b`},{begin:`\\b(${decimalInteger})\\b((${frac2})\\b|\\.)?|(${frac2})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},SUBST={className:"subst",begin:"\\$\\{",end:"\\}",keywords:KEYWORDS$12,contains:[]},HTML_TEMPLATE={begin:".?html`",end:"",starts:{end:"`",
returnEnd:!1,contains:[hljs.BACKSLASH_ESCAPE,SUBST],subLanguage:"xml"}},CSS_TEMPLATE={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[hljs.BACKSLASH_ESCAPE,SUBST],subLanguage:"css"}},GRAPHQL_TEMPLATE={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[hljs.BACKSLASH_ESCAPE,SUBST],subLanguage:"graphql"}},TEMPLATE_STRING={className:"string",begin:"`",end:"`",contains:[hljs.BACKSLASH_ESCAPE,SUBST]},COMMENT={className:"comment",variants:[hljs.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,
contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:IDENT_RE$12+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),hljs.C_BLOCK_COMMENT_MODE,hljs.C_LINE_COMMENT_MODE]},SUBST_INTERNALS=[hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,HTML_TEMPLATE,CSS_TEMPLATE,GRAPHQL_TEMPLATE,TEMPLATE_STRING,{match:/\$\d+/},NUMBER];
SUBST.contains=SUBST_INTERNALS.concat({begin:/\{/,end:/\}/,keywords:KEYWORDS$12,contains:["self"].concat(SUBST_INTERNALS)});const SUBST_AND_COMMENTS=[].concat(COMMENT,SUBST.contains),PARAMS_CONTAINS=SUBST_AND_COMMENTS.concat([{begin:/(\s*)\(/,end:/\)/,keywords:KEYWORDS$12,contains:["self"].concat(SUBST_AND_COMMENTS)}]),PARAMS={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:KEYWORDS$12,contains:PARAMS_CONTAINS},CLASS_OR_EXTENDS={variants:[{match:[/class/,/\s+/,
IDENT_RE$12,/\s+/,/extends/,/\s+/,regex.concat(IDENT_RE$12,"(",regex.concat(/\./,IDENT_RE$12),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,IDENT_RE$12],scope:{1:"keyword",3:"title.class"}}]},CLASS_REFERENCE={relevance:0,match:regex.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...TYPES2,...ERROR_TYPES2]}},
USE_STRICT={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},FUNCTION_DEFINITION={variants:[{match:[/function/,/\s+/,IDENT_RE$12,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[PARAMS],illegal:/%/},UPPER_CASE_CONSTANT={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function noneOf(list2){return regex.concat("(?!",list2.join("|"),")")}const FUNCTION_CALL={match:regex.
concat(/\b/,noneOf([...BUILT_IN_GLOBALS2,"super","import"].map(x=>`${x}\\s*\\(`)),IDENT_RE$12,regex.lookahead(/\s*\(/)),className:"title.function",relevance:0},PROPERTY_ACCESS={begin:regex.concat(/\./,regex.lookahead(regex.concat(IDENT_RE$12,/(?![0-9A-Za-z$_(])/))),end:IDENT_RE$12,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},GETTER_OR_SETTER={match:[/get|set/,/\s+/,IDENT_RE$12,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},PARAMS]},FUNC_LEAD_IN_RE="\
(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+hljs.UNDERSCORE_IDENT_RE+")\\s*=>",FUNCTION_VARIABLE={match:[/const|var|let/,/\s+/,IDENT_RE$12,/\s*/,/=\s*/,/(async\s*)?/,regex.lookahead(FUNC_LEAD_IN_RE)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[PARAMS]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:KEYWORDS$12,exports:{PARAMS_CONTAINS,CLASS_REFERENCE},illegal:/#(?![$_A-z])/,contains:[hljs.SHEBANG({label:"shebang",binary:"node",relevance:5}),
USE_STRICT,hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,HTML_TEMPLATE,CSS_TEMPLATE,GRAPHQL_TEMPLATE,TEMPLATE_STRING,COMMENT,{match:/\$\d+/},NUMBER,CLASS_REFERENCE,{scope:"attr",match:IDENT_RE$12+regex.lookahead(":"),relevance:0},FUNCTION_VARIABLE,{begin:"("+hljs.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[COMMENT,hljs.REGEXP_MODE,{className:"function",begin:FUNC_LEAD_IN_RE,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[
{begin:hljs.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:KEYWORDS$12,contains:PARAMS_CONTAINS}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:FRAGMENT.begin,end:FRAGMENT.end},{match:XML_SELF_CLOSING},{begin:XML_TAG.begin,"on:begin":XML_TAG.isTrulyOpeningTag,end:XML_TAG.end}],subLanguage:"xml",contains:[{begin:XML_TAG.begin,end:XML_TAG.end,skip:!0,contains:["self"]}]}]},FUNCTION_DEFINITION,
{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+hljs.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[PARAMS,hljs.inherit(hljs.TITLE_MODE,{begin:IDENT_RE$12,className:"title.function"})]},{match:/\.\.\./,relevance:0},PROPERTY_ACCESS,{match:"\\$"+IDENT_RE$12,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[PARAMS]},FUNCTION_CALL,UPPER_CASE_CONSTANT,CLASS_OR_EXTENDS,
GETTER_OR_SETTER,{match:/\$[(.]/}]}}function typescript2(hljs){const regex=hljs.regex,tsLanguage=javascript2(hljs),IDENT_RE$12=IDENT_RE2,TYPES3=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],NAMESPACE={begin:[/namespace/,/\s+/,hljs.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},INTERFACE={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:TYPES3},contains:[tsLanguage.exports.CLASS_REFERENCE]},USE_STRICT={className:"\
meta",relevance:10,begin:/^\s*['"]use strict['"]/},TS_SPECIFIC_KEYWORDS=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],KEYWORDS$12={$pattern:IDENT_RE2,keyword:KEYWORDS2.concat(TS_SPECIFIC_KEYWORDS),literal:LITERALS2,built_in:BUILT_INS2.concat(TYPES3),"variable.language":BUILT_IN_VARIABLES2},DECORATOR={className:"meta",begin:"@"+IDENT_RE$12},swapMode=(mode,label,replacement)=>{const indx=mode.contains.findIndex(m=>m.label===
label);if(indx===-1)throw new Error("can not find mode to replace");mode.contains.splice(indx,1,replacement)};Object.assign(tsLanguage.keywords,KEYWORDS$12),tsLanguage.exports.PARAMS_CONTAINS.push(DECORATOR);const ATTRIBUTE_HIGHLIGHT=tsLanguage.contains.find(c2=>c2.scope==="attr"),OPTIONAL_KEY_OR_ARGUMENT=Object.assign({},ATTRIBUTE_HIGHLIGHT,{match:regex.concat(IDENT_RE$12,regex.lookahead(/\s*\?:/))});tsLanguage.exports.PARAMS_CONTAINS.push([tsLanguage.exports.CLASS_REFERENCE,ATTRIBUTE_HIGHLIGHT,
OPTIONAL_KEY_OR_ARGUMENT]),tsLanguage.contains=tsLanguage.contains.concat([DECORATOR,NAMESPACE,INTERFACE,OPTIONAL_KEY_OR_ARGUMENT]),swapMode(tsLanguage,"shebang",hljs.SHEBANG()),swapMode(tsLanguage,"use_strict",USE_STRICT);const functionDeclaration=tsLanguage.contains.find(m=>m.label==="func.def");return functionDeclaration.relevance=0,Object.assign(tsLanguage,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),tsLanguage}return typescript_1=typescript2,typescript_1}var vala_1,hasRequiredVala;
function requireVala(){if(hasRequiredVala)return vala_1;hasRequiredVala=1;function vala2(hljs){return{name:"Vala",keywords:{keyword:"char uchar unichar int uint long ulong short ushort int8 int16 int32 int64 uint8 uint16 uint32 uint64 float double bool struct enum string void weak unowned owned async signal static abstract interface override virtual delegate if while do for foreach else switch case break default return try catch public private protected internal using new this get set const stdo\
ut stdin stderr var",built_in:"DBus GLib CCode Gee Object Gtk Posix",literal:"false true null"},contains:[{className:"class",beginKeywords:"class interface namespace",end:/\{/,excludeEnd:!0,illegal:"[^,:\\n\\s\\.]",contains:[hljs.UNDERSCORE_TITLE_MODE]},hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,{className:"string",begin:'"""',end:'"""',relevance:5},hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,hljs.C_NUMBER_MODE,{className:"meta",begin:"^#",end:"$"}]}}return vala_1=vala2,vala_1}var vbnet_1,
hasRequiredVbnet;function requireVbnet(){if(hasRequiredVbnet)return vbnet_1;hasRequiredVbnet=1;function vbnet2(hljs){const regex=hljs.regex,CHARACTER={className:"string",begin:/"(""|[^/n])"C\b/},STRING={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},MM_DD_YYYY=/\d{1,2}\/\d{1,2}\/\d{4}/,YYYY_MM_DD=/\d{4}-\d{1,2}-\d{1,2}/,TIME_12H=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,TIME_24H=/\d{1,2}(:\d{1,2}){1,2}/,DATE2={className:"literal",variants:[{begin:regex.concat(/# */,regex.either(
YYYY_MM_DD,MM_DD_YYYY),/ *#/)},{begin:regex.concat(/# */,TIME_24H,/ *#/)},{begin:regex.concat(/# */,TIME_12H,/ *#/)},{begin:regex.concat(/# */,regex.either(YYYY_MM_DD,MM_DD_YYYY),/ +/,regex.either(TIME_12H,TIME_24H),/ *#/)}]},NUMBER={className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},LABEL={
className:"label",begin:/^\w+:/},DOC_COMMENT=hljs.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),COMMENT=hljs.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do e\
ach equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resum\
e return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long objec\
t sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[CHARACTER,STRING,DATE2,NUMBER,LABEL,DOC_COMMENT,COMMENT,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[COMMENT]}]}}return vbnet_1=vbnet2,vbnet_1}var vbscript_1,hasRequiredVbscript;function requireVbscript(){
if(hasRequiredVbscript)return vbscript_1;hasRequiredVbscript=1;function vbscript2(hljs){const regex=hljs.regex,BUILT_IN_FUNCTIONS=["lcase","month","vartype","instrrev","ubound","setlocale","getobject","rgb","getref","string","weekdayname","rnd","dateadd","monthname","now","day","minute","isarray","cbool","round","formatcurrency","conversions","csng","timevalue","second","year","space","abs","clng","timeserial","fixs","len","asc","isempty","maths","dateserial","atn","timer","isobject","filter","w\
eekday","datevalue","ccur","isdate","instr","datediff","formatdatetime","replace","isnull","right","sgn","array","snumeric","log","cdbl","hex","chr","lbound","msgbox","ucase","getlocale","cos","cdate","cbyte","rtrim","join","hour","oct","typename","trim","strcomp","int","createobject","loadpicture","tan","formatnumber","mid","split","cint","sin","datepart","ltrim","sqr","time","derived","eval","date","formatpercent","exp","inputbox","left","ascw","chrw","regexp","cstr","err"],BUILT_IN_OBJECTS=["\
server","response","request","scriptengine","scriptenginebuildversion","scriptengineminorversion","scriptenginemajorversion"],BUILT_IN_CALL={begin:regex.concat(regex.either(...BUILT_IN_FUNCTIONS),"\\s*\\("),relevance:0,keywords:{built_in:BUILT_IN_FUNCTIONS}};return{name:"VBScript",aliases:["vbs"],case_insensitive:!0,keywords:{keyword:["call","class","const","dim","do","loop","erase","execute","executeglobal","exit","for","each","next","function","if","then","else","on","error","option","explicit",
"new","private","property","let","get","public","randomize","redim","rem","select","case","set","stop","sub","while","wend","with","end","to","elseif","is","or","xor","and","not","class_initialize","class_terminate","default","preserve","in","me","byval","byref","step","resume","goto"],built_in:BUILT_IN_OBJECTS,literal:["true","false","null","nothing","empty"]},illegal:"//",contains:[BUILT_IN_CALL,hljs.inherit(hljs.QUOTE_STRING_MODE,{contains:[{begin:'""'}]}),hljs.COMMENT(/'/,/$/,{relevance:0}),
hljs.C_NUMBER_MODE]}}return vbscript_1=vbscript2,vbscript_1}var vbscriptHtml_1,hasRequiredVbscriptHtml;function requireVbscriptHtml(){if(hasRequiredVbscriptHtml)return vbscriptHtml_1;hasRequiredVbscriptHtml=1;function vbscriptHtml2(hljs){return{name:"VBScript in HTML",subLanguage:"xml",contains:[{begin:"<%",end:"%>",subLanguage:"vbscript"}]}}return vbscriptHtml_1=vbscriptHtml2,vbscriptHtml_1}var verilog_1,hasRequiredVerilog;function requireVerilog(){if(hasRequiredVerilog)return verilog_1;hasRequiredVerilog=
1;function verilog2(hljs){const regex=hljs.regex,KEYWORDS2={$pattern:/\$?[\w]+(\$[\w]+)*/,keyword:["accept_on","alias","always","always_comb","always_ff","always_latch","and","assert","assign","assume","automatic","before","begin","bind","bins","binsof","bit","break","buf|0","bufif0","bufif1","byte","case","casex","casez","cell","chandle","checker","class","clocking","cmos","config","const","constraint","context","continue","cover","covergroup","coverpoint","cross","deassign","default","defparam",
"design","disable","dist","do","edge","else","end","endcase","endchecker","endclass","endclocking","endconfig","endfunction","endgenerate","endgroup","endinterface","endmodule","endpackage","endprimitive","endprogram","endproperty","endspecify","endsequence","endtable","endtask","enum","event","eventually","expect","export","extends","extern","final","first_match","for","force","foreach","forever","fork","forkjoin","function","generate|5","genvar","global","highz0","highz1","if","iff","ifnone","\
ignore_bins","illegal_bins","implements","implies","import","incdir","include","initial","inout","input","inside","instance","int","integer","interconnect","interface","intersect","join","join_any","join_none","large","let","liblist","library","local","localparam","logic","longint","macromodule","matches","medium","modport","module","nand","negedge","nettype","new","nexttime","nmos","nor","noshowcancelled","not","notif0","notif1","or","output","package","packed","parameter","pmos","posedge","pri\
mitive","priority","program","property","protected","pull0","pull1","pulldown","pullup","pulsestyle_ondetect","pulsestyle_onevent","pure","rand","randc","randcase","randsequence","rcmos","real","realtime","ref","reg","reject_on","release","repeat","restrict","return","rnmos","rpmos","rtran","rtranif0","rtranif1","s_always","s_eventually","s_nexttime","s_until","s_until_with","scalared","sequence","shortint","shortreal","showcancelled","signed","small","soft","solve","specify","specparam","static",
"string","strong","strong0","strong1","struct","super","supply0","supply1","sync_accept_on","sync_reject_on","table","tagged","task","this","throughout","time","timeprecision","timeunit","tran","tranif0","tranif1","tri","tri0","tri1","triand","trior","trireg","type","typedef","union","unique","unique0","unsigned","until","until_with","untyped","use","uwire","var","vectored","virtual","void","wait","wait_order","wand","weak","weak0","weak1","while","wildcard","wire","with","within","wor","xnor","\
xor"],literal:["null"],built_in:["$finish","$stop","$exit","$fatal","$error","$warning","$info","$realtime","$time","$printtimescale","$bitstoreal","$bitstoshortreal","$itor","$signed","$cast","$bits","$stime","$timeformat","$realtobits","$shortrealtobits","$rtoi","$unsigned","$asserton","$assertkill","$assertpasson","$assertfailon","$assertnonvacuouson","$assertoff","$assertcontrol","$assertpassoff","$assertfailoff","$assertvacuousoff","$isunbounded","$sampled","$fell","$changed","$past_gclk","\
$fell_gclk","$changed_gclk","$rising_gclk","$steady_gclk","$coverage_control","$coverage_get","$coverage_save","$set_coverage_db_name","$rose","$stable","$past","$rose_gclk","$stable_gclk","$future_gclk","$falling_gclk","$changing_gclk","$display","$coverage_get_max","$coverage_merge","$get_coverage","$load_coverage_db","$typename","$unpacked_dimensions","$left","$low","$increment","$clog2","$ln","$log10","$exp","$sqrt","$pow","$floor","$ceil","$sin","$cos","$tan","$countbits","$onehot","$isunkn\
own","$fatal","$warning","$dimensions","$right","$high","$size","$asin","$acos","$atan","$atan2","$hypot","$sinh","$cosh","$tanh","$asinh","$acosh","$atanh","$countones","$onehot0","$error","$info","$random","$dist_chi_square","$dist_erlang","$dist_exponential","$dist_normal","$dist_poisson","$dist_t","$dist_uniform","$q_initialize","$q_remove","$q_exam","$async$and$array","$async$nand$array","$async$or$array","$async$nor$array","$sync$and$array","$sync$nand$array","$sync$or$array","$sync$nor$ar\
ray","$q_add","$q_full","$psprintf","$async$and$plane","$async$nand$plane","$async$or$plane","$async$nor$plane","$sync$and$plane","$sync$nand$plane","$sync$or$plane","$sync$nor$plane","$system","$display","$displayb","$displayh","$displayo","$strobe","$strobeb","$strobeh","$strobeo","$write","$readmemb","$readmemh","$writememh","$value$plusargs","$dumpvars","$dumpon","$dumplimit","$dumpports","$dumpportson","$dumpportslimit","$writeb","$writeh","$writeo","$monitor","$monitorb","$monitorh","$moni\
toro","$writememb","$dumpfile","$dumpoff","$dumpall","$dumpflush","$dumpportsoff","$dumpportsall","$dumpportsflush","$fclose","$fdisplay","$fdisplayb","$fdisplayh","$fdisplayo","$fstrobe","$fstrobeb","$fstrobeh","$fstrobeo","$swrite","$swriteb","$swriteh","$swriteo","$fscanf","$fread","$fseek","$fflush","$feof","$fopen","$fwrite","$fwriteb","$fwriteh","$fwriteo","$fmonitor","$fmonitorb","$fmonitorh","$fmonitoro","$sformat","$sformatf","$fgetc","$ungetc","$fgets","$sscanf","$rewind","$ftell","$fe\
rror"]},BUILT_IN_CONSTANTS=["__FILE__","__LINE__"],DIRECTIVES=["begin_keywords","celldefine","default_nettype","default_decay_time","default_trireg_strength","define","delay_mode_distributed","delay_mode_path","delay_mode_unit","delay_mode_zero","else","elsif","end_keywords","endcelldefine","endif","ifdef","ifndef","include","line","nounconnected_drive","pragma","resetall","timescale","unconnected_drive","undef","undefineall"];return{name:"Verilog",aliases:["v","sv","svh"],case_insensitive:!1,keywords:KEYWORDS2,
contains:[hljs.C_BLOCK_COMMENT_MODE,hljs.C_LINE_COMMENT_MODE,hljs.QUOTE_STRING_MODE,{scope:"number",contains:[hljs.BACKSLASH_ESCAPE],variants:[{begin:/\b((\d+'([bhodBHOD]))[0-9xzXZa-fA-F_]+)/},{begin:/\B(('([bhodBHOD]))[0-9xzXZa-fA-F_]+)/},{begin:/\b[0-9][0-9_]*/,relevance:0}]},{scope:"variable",variants:[{begin:"#\\((?!parameter).+\\)"},{begin:"\\.\\w+",relevance:0}]},{scope:"variable.constant",match:regex.concat(/`/,regex.either(...BUILT_IN_CONSTANTS))},{scope:"meta",begin:regex.concat(/`/,regex.
either(...DIRECTIVES)),end:/$|\/\/|\/\*/,returnEnd:!0,keywords:DIRECTIVES}]}}return verilog_1=verilog2,verilog_1}var vhdl_1,hasRequiredVhdl;function requireVhdl(){if(hasRequiredVhdl)return vhdl_1;hasRequiredVhdl=1;function vhdl2(hljs){const INTEGER_RE="\\d(_|\\d)*",EXPONENT_RE="[eE][-+]?"+INTEGER_RE,DECIMAL_LITERAL_RE=INTEGER_RE+"(\\."+INTEGER_RE+")?("+EXPONENT_RE+")?",BASED_INTEGER_RE="\\w+",NUMBER_RE="\\b("+(INTEGER_RE+"#"+BASED_INTEGER_RE+"(\\."+BASED_INTEGER_RE+")?#("+EXPONENT_RE+")?")+"|"+DECIMAL_LITERAL_RE+
")";return{name:"VHDL",case_insensitive:!0,keywords:{keyword:["abs","access","after","alias","all","and","architecture","array","assert","assume","assume_guarantee","attribute","begin","block","body","buffer","bus","case","component","configuration","constant","context","cover","disconnect","downto","default","else","elsif","end","entity","exit","fairness","file","for","force","function","generate","generic","group","guarded","if","impure","in","inertial","inout","is","label","library","linkage",
"literal","loop","map","mod","nand","new","next","nor","not","null","of","on","open","or","others","out","package","parameter","port","postponed","procedure","process","property","protected","pure","range","record","register","reject","release","rem","report","restrict","restrict_guarantee","return","rol","ror","select","sequence","severity","shared","signal","sla","sll","sra","srl","strong","subtype","then","to","transport","type","unaffected","units","until","use","variable","view","vmode","vp\
rop","vunit","wait","when","while","with","xnor","xor"],built_in:["boolean","bit","character","integer","time","delay_length","natural","positive","string","bit_vector","file_open_kind","file_open_status","std_logic","std_logic_vector","unsigned","signed","boolean_vector","integer_vector","std_ulogic","std_ulogic_vector","unresolved_unsigned","u_unsigned","unresolved_signed","u_signed","real_vector","time_vector"],literal:["false","true","note","warning","error","failure","line","text","side","w\
idth"]},illegal:/\{/,contains:[hljs.C_BLOCK_COMMENT_MODE,hljs.COMMENT("--","$"),hljs.QUOTE_STRING_MODE,{className:"number",begin:NUMBER_RE,relevance:0},{className:"string",begin:"'(U|X|0|1|Z|W|L|H|-)'",contains:[hljs.BACKSLASH_ESCAPE]},{className:"symbol",begin:"'[A-Za-z](_?[A-Za-z0-9])*",contains:[hljs.BACKSLASH_ESCAPE]}]}}return vhdl_1=vhdl2,vhdl_1}var vim_1,hasRequiredVim;function requireVim(){if(hasRequiredVim)return vim_1;hasRequiredVim=1;function vim2(hljs){return{name:"Vim Script",keywords:{
$pattern:/[!#@\w]+/,keyword:"N|0 P|0 X|0 a|0 ab abc abo al am an|0 ar arga argd arge argdo argg argl argu as au aug aun b|0 bN ba bad bd be bel bf bl bm bn bo bp br brea breaka breakd breakl bro bufdo buffers bun bw c|0 cN cNf ca cabc caddb cad caddf cal cat cb cc ccl cd ce cex cf cfir cgetb cgete cg changes chd che checkt cl cla clo cm cmapc cme cn cnew cnf cno cnorea cnoreme co col colo com comc comp con conf cope cp cpf cq cr cs cst cu cuna cunme cw delm deb debugg delc delf dif diffg diffo d\
iffp diffpu diffs diffthis dig di dl dell dj dli do doautoa dp dr ds dsp e|0 ea ec echoe echoh echom echon el elsei em en endfo endf endt endw ene ex exe exi exu f|0 files filet fin fina fini fir fix fo foldc foldd folddoc foldo for fu go gr grepa gu gv ha helpf helpg helpt hi hid his ia iabc if ij il im imapc ime ino inorea inoreme int is isp iu iuna iunme j|0 ju k|0 keepa kee keepj lN lNf l|0 lad laddb laddf la lan lat lb lc lch lcl lcs le lefta let lex lf lfir lgetb lgete lg lgr lgrepa lh ll \
lla lli lmak lm lmapc lne lnew lnf ln loadk lo loc lockv lol lope lp lpf lr ls lt lu lua luad luaf lv lvimgrepa lw m|0 ma mak map mapc marks mat me menut mes mk mks mksp mkv mkvie mod mz mzf nbc nb nbs new nm nmapc nme nn nnoreme noa no noh norea noreme norm nu nun nunme ol o|0 om omapc ome on ono onoreme opt ou ounme ow p|0 profd prof pro promptr pc ped pe perld po popu pp pre prev ps pt ptN ptf ptj ptl ptn ptp ptr pts pu pw py3 python3 py3d py3f py pyd pyf quita qa rec red redi redr redraws re\
g res ret retu rew ri rightb rub rubyd rubyf rund ru rv sN san sa sal sav sb sbN sba sbf sbl sbm sbn sbp sbr scrip scripte scs se setf setg setl sf sfir sh sim sig sil sl sla sm smap smapc sme sn sni sno snor snoreme sor so spelld spe spelli spellr spellu spellw sp spr sre st sta startg startr star stopi stj sts sun sunm sunme sus sv sw sy synti sync tN tabN tabc tabdo tabe tabf tabfir tabl tabm tabnew tabn tabo tabp tabr tabs tab ta tags tc tcld tclf te tf th tj tl tm tn to tp tr try ts tu u|0 \
undoj undol una unh unl unlo unm unme uns up ve verb vert vim vimgrepa vi viu vie vm vmapc vme vne vn vnoreme vs vu vunme windo w|0 wN wa wh wi winc winp wn wp wq wqa ws wu wv x|0 xa xmapc xm xme xn xnoreme xu xunme y|0 z|0 ~ Next Print append abbreviate abclear aboveleft all amenu anoremenu args argadd argdelete argedit argglobal arglocal argument ascii autocmd augroup aunmenu buffer bNext ball badd bdelete behave belowright bfirst blast bmodified bnext botright bprevious brewind break breakadd\
 breakdel breaklist browse bunload bwipeout change cNext cNfile cabbrev cabclear caddbuffer caddexpr caddfile call catch cbuffer cclose center cexpr cfile cfirst cgetbuffer cgetexpr cgetfile chdir checkpath checktime clist clast close cmap cmapclear cmenu cnext cnewer cnfile cnoremap cnoreabbrev cnoremenu copy colder colorscheme command comclear compiler continue confirm copen cprevious cpfile cquit crewind cscope cstag cunmap cunabbrev cunmenu cwindow delete delmarks debug debuggreedy delcomman\
d delfunction diffupdate diffget diffoff diffpatch diffput diffsplit digraphs display deletel djump dlist doautocmd doautoall deletep drop dsearch dsplit edit earlier echo echoerr echohl echomsg else elseif emenu endif endfor endfunction endtry endwhile enew execute exit exusage file filetype find finally finish first fixdel fold foldclose folddoopen folddoclosed foldopen function global goto grep grepadd gui gvim hardcopy help helpfind helpgrep helptags highlight hide history insert iabbrev iab\
clear ijump ilist imap imapclear imenu inoremap inoreabbrev inoremenu intro isearch isplit iunmap iunabbrev iunmenu join jumps keepalt keepmarks keepjumps lNext lNfile list laddexpr laddbuffer laddfile last language later lbuffer lcd lchdir lclose lcscope left leftabove lexpr lfile lfirst lgetbuffer lgetexpr lgetfile lgrep lgrepadd lhelpgrep llast llist lmake lmap lmapclear lnext lnewer lnfile lnoremap loadkeymap loadview lockmarks lockvar lolder lopen lprevious lpfile lrewind ltag lunmap luado \
luafile lvimgrep lvimgrepadd lwindow move mark make mapclear match menu menutranslate messages mkexrc mksession mkspell mkvimrc mkview mode mzscheme mzfile nbclose nbkey nbsart next nmap nmapclear nmenu nnoremap nnoremenu noautocmd noremap nohlsearch noreabbrev noremenu normal number nunmap nunmenu oldfiles open omap omapclear omenu only onoremap onoremenu options ounmap ounmenu ownsyntax print profdel profile promptfind promptrepl pclose pedit perl perldo pop popup ppop preserve previous psearc\
h ptag ptNext ptfirst ptjump ptlast ptnext ptprevious ptrewind ptselect put pwd py3do py3file python pydo pyfile quit quitall qall read recover redo redir redraw redrawstatus registers resize retab return rewind right rightbelow ruby rubydo rubyfile rundo runtime rviminfo substitute sNext sandbox sargument sall saveas sbuffer sbNext sball sbfirst sblast sbmodified sbnext sbprevious sbrewind scriptnames scriptencoding scscope set setfiletype setglobal setlocal sfind sfirst shell simalt sign silen\
t sleep slast smagic smapclear smenu snext sniff snomagic snoremap snoremenu sort source spelldump spellgood spellinfo spellrepall spellundo spellwrong split sprevious srewind stop stag startgreplace startreplace startinsert stopinsert stjump stselect sunhide sunmap sunmenu suspend sview swapname syntax syntime syncbind tNext tabNext tabclose tabedit tabfind tabfirst tablast tabmove tabnext tabonly tabprevious tabrewind tag tcl tcldo tclfile tearoff tfirst throw tjump tlast tmenu tnext topleft t\
previous trewind tselect tunmenu undo undojoin undolist unabbreviate unhide unlet unlockvar unmap unmenu unsilent update vglobal version verbose vertical vimgrep vimgrepadd visual viusage view vmap vmapclear vmenu vnew vnoremap vnoremenu vsplit vunmap vunmenu write wNext wall while winsize wincmd winpos wnext wprevious wqall wsverb wundo wviminfo xit xall xmapclear xmap xmenu xnoremap xnoremenu xunmap xunmenu yank",built_in:"synIDtrans atan2 range matcharg did_filetype asin feedkeys xor argv com\
plete_check add getwinposx getqflist getwinposy screencol clearmatches empty extend getcmdpos mzeval garbagecollect setreg ceil sqrt diff_hlID inputsecret get getfperm getpid filewritable shiftwidth max sinh isdirectory synID system inputrestore winline atan visualmode inputlist tabpagewinnr round getregtype mapcheck hasmapto histdel argidx findfile sha256 exists toupper getcmdline taglist string getmatches bufnr strftime winwidth bufexists strtrans tabpagebuflist setcmdpos remote_read printf se\
tloclist getpos getline bufwinnr float2nr len getcmdtype diff_filler luaeval resolve libcallnr foldclosedend reverse filter has_key bufname str2float strlen setline getcharmod setbufvar index searchpos shellescape undofile foldclosed setqflist buflisted strchars str2nr virtcol floor remove undotree remote_expr winheight gettabwinvar reltime cursor tabpagenr finddir localtime acos getloclist search tanh matchend rename gettabvar strdisplaywidth type abs py3eval setwinvar tolower wildmenumode log1\
0 spellsuggest bufloaded synconcealed nextnonblank server2client complete settabwinvar executable input wincol setmatches getftype hlID inputsave searchpair or screenrow line settabvar histadd deepcopy strpart remote_peek and eval getftime submatch screenchar winsaveview matchadd mkdir screenattr getfontname libcall reltimestr getfsize winnr invert pow getbufline byte2line soundfold repeat fnameescape tagfiles sin strwidth spellbadword trunc maparg log lispindent hostname setpos globpath remote_\
foreground getchar synIDattr fnamemodify cscope_connection stridx winbufnr indent min complete_add nr2char searchpairpos inputdialog values matchlist items hlexists strridx browsedir expand fmod pathshorten line2byte argc count getwinvar glob foldtextresult getreg foreground cosh matchdelete has char2nr simplify histget searchdecl iconv winrestcmd pumvisible writefile foldlevel haslocaldir keys cos matchstr foldtext histnr tan tempname getcwd byteidx getbufvar islocked escape eventhandler remote\
_send serverlist winrestview synstack pyeval prevnonblank readfile cindent filereadable changenr exp"},illegal:/;/,contains:[hljs.NUMBER_MODE,{className:"string",begin:"'",end:"'",illegal:"\\n"},{className:"string",begin:/"(\\"|\n\\|[^"\n])*"/},hljs.COMMENT('"',"$"),{className:"variable",begin:/[bwtglsav]:[\w\d_]+/},{begin:[/\b(?:function|function!)/,/\s+/,hljs.IDENT_RE],className:{1:"keyword",3:"title"},end:"$",relevance:0,contains:[{className:"params",begin:"\\(",end:"\\)"}]},{className:"symbo\
l",begin:/<[\w-]+>/}]}}return vim_1=vim2,vim_1}var wasm_1,hasRequiredWasm;function requireWasm(){if(hasRequiredWasm)return wasm_1;hasRequiredWasm=1;function wasm2(hljs){hljs.regex;const BLOCK_COMMENT=hljs.COMMENT(/\(;/,/;\)/);BLOCK_COMMENT.contains.push("self");const LINE_COMMENT=hljs.COMMENT(/;;/,/$/),KWS=["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","\
get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"],FUNCTION_REFERENCE={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},ARGUMENT={className:"variable",begin:/\$[\w_]+/},PARENS={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},NUMBER={className:"number",relevance:0,
match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/},TYPE={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},MATH_OPERATIONS={className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/};
return{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:KWS},contains:[LINE_COMMENT,BLOCK_COMMENT,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},ARGUMENT,PARENS,FUNCTION_REFERENCE,hljs.QUOTE_STRING_MODE,TYPE,MATH_OPERATIONS,NUMBER]}}return wasm_1=wasm2,wasm_1}var wren_1,hasRequiredWren;function requireWren(){if(hasRequiredWren)return wren_1;hasRequiredWren=1;function wren2(hljs){const regex=hljs.regex,IDENT_RE2=/[a-zA-Z]\w*/,KEYWORDS2=["as","break","class","con\
struct","continue","else","for","foreign","if","import","in","is","return","static","var","while"],LITERALS2=["true","false","null"],LANGUAGE_VARS=["this","super"],CORE_CLASSES=["Bool","Class","Fiber","Fn","List","Map","Null","Num","Object","Range","Sequence","String","System"],OPERATORS=["-","~",/\*/,"%",/\.\.\./,/\.\./,/\+/,"<<",">>",">=","<=","<",">",/\^/,/!=/,/!/,/\bis\b/,"==","&&","&",/\|\|/,/\|/,/\?:/,"="],FUNCTION={relevance:0,match:regex.concat(/\b(?!(if|while|for|else|super)\b)/,IDENT_RE2,
/(?=\s*[({])/),className:"title.function"},FUNCTION_DEFINITION={match:regex.concat(regex.either(regex.concat(/\b(?!(if|while|for|else|super)\b)/,IDENT_RE2),regex.either(...OPERATORS)),/(?=\s*\([^)]+\)\s*\{)/),className:"title.function",starts:{contains:[{begin:/\(/,end:/\)/,contains:[{relevance:0,scope:"params",match:IDENT_RE2}]}]}},CLASS_DEFINITION={variants:[{match:[/class\s+/,IDENT_RE2,/\s+is\s+/,IDENT_RE2]},{match:[/class\s+/,IDENT_RE2]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:KEYWORDS2},
OPERATOR={relevance:0,match:regex.either(...OPERATORS),className:"operator"},TRIPLE_STRING={className:"string",begin:/"""/,end:/"""/},PROPERTY={className:"property",begin:regex.concat(/\./,regex.lookahead(IDENT_RE2)),end:IDENT_RE2,excludeBegin:!0,relevance:0},FIELD={relevance:0,match:regex.concat(/\b_/,IDENT_RE2),scope:"variable"},CLASS_REFERENCE={relevance:0,match:/\b[A-Z]+[a-z]+([A-Z]+[a-z]+)*/,scope:"title.class",keywords:{_:CORE_CLASSES}},NUMBER=hljs.C_NUMBER_MODE,SETTER={match:[IDENT_RE2,/\s*/,
/=/,/\s*/,/\(/,IDENT_RE2,/\)\s*\{/],scope:{1:"title.function",3:"operator",6:"params"}},COMMENT_DOCS=hljs.COMMENT(/\/\*\*/,/\*\//,{contains:[{match:/@[a-z]+/,scope:"doctag"},"self"]}),SUBST={scope:"subst",begin:/%\(/,end:/\)/,contains:[NUMBER,CLASS_REFERENCE,FUNCTION,FIELD,OPERATOR]},STRING={scope:"string",begin:/"/,end:/"/,contains:[SUBST,{scope:"char.escape",variants:[{match:/\\\\|\\["0%abefnrtv]/},{match:/\\x[0-9A-F]{2}/},{match:/\\u[0-9A-F]{4}/},{match:/\\U[0-9A-F]{8}/}]}]};SUBST.contains.push(
STRING);const ALL_KWS=[...KEYWORDS2,...LANGUAGE_VARS,...LITERALS2],VARIABLE={relevance:0,match:regex.concat("\\b(?!",ALL_KWS.join("|"),"\\b)",/[a-zA-Z_]\w*(?:[?!]|\b)/),className:"variable"};return{name:"Wren",keywords:{keyword:KEYWORDS2,"variable.language":LANGUAGE_VARS,literal:LITERALS2},contains:[{scope:"comment",variants:[{begin:[/#!?/,/[A-Za-z_]+(?=\()/],beginScope:{},keywords:{literal:LITERALS2},contains:[],end:/\)/},{begin:[/#!?/,/[A-Za-z_]+/],beginScope:{},end:/$/}]},NUMBER,STRING,TRIPLE_STRING,
COMMENT_DOCS,hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,CLASS_REFERENCE,CLASS_DEFINITION,SETTER,FUNCTION_DEFINITION,FUNCTION,OPERATOR,FIELD,PROPERTY,VARIABLE]}}return wren_1=wren2,wren_1}var x86asm_1,hasRequiredX86asm;function requireX86asm(){if(hasRequiredX86asm)return x86asm_1;hasRequiredX86asm=1;function x86asm2(hljs){return{name:"Intel x86 Assembly",case_insensitive:!0,keywords:{$pattern:"[.%]?"+hljs.IDENT_RE,keyword:"lock rep repe repz repne repnz xaquire xrelease bnd nobnd aaa aad \
aam aas adc add and arpl bb0_reset bb1_reset bound bsf bsr bswap bt btc btr bts call cbw cdq cdqe clc cld cli clts cmc cmp cmpsb cmpsd cmpsq cmpsw cmpxchg cmpxchg486 cmpxchg8b cmpxchg16b cpuid cpu_read cpu_write cqo cwd cwde daa das dec div dmint emms enter equ f2xm1 fabs fadd faddp fbld fbstp fchs fclex fcmovb fcmovbe fcmove fcmovnb fcmovnbe fcmovne fcmovnu fcmovu fcom fcomi fcomip fcomp fcompp fcos fdecstp fdisi fdiv fdivp fdivr fdivrp femms feni ffree ffreep fiadd ficom ficomp fidiv fidivr fi\
ld fimul fincstp finit fist fistp fisttp fisub fisubr fld fld1 fldcw fldenv fldl2e fldl2t fldlg2 fldln2 fldpi fldz fmul fmulp fnclex fndisi fneni fninit fnop fnsave fnstcw fnstenv fnstsw fpatan fprem fprem1 fptan frndint frstor fsave fscale fsetpm fsin fsincos fsqrt fst fstcw fstenv fstp fstsw fsub fsubp fsubr fsubrp ftst fucom fucomi fucomip fucomp fucompp fxam fxch fxtract fyl2x fyl2xp1 hlt ibts icebp idiv imul in inc incbin insb insd insw int int01 int1 int03 int3 into invd invpcid invlpg inv\
lpga iret iretd iretq iretw jcxz jecxz jrcxz jmp jmpe lahf lar lds lea leave les lfence lfs lgdt lgs lidt lldt lmsw loadall loadall286 lodsb lodsd lodsq lodsw loop loope loopne loopnz loopz lsl lss ltr mfence monitor mov movd movq movsb movsd movsq movsw movsx movsxd movzx mul mwait neg nop not or out outsb outsd outsw packssdw packsswb packuswb paddb paddd paddsb paddsiw paddsw paddusb paddusw paddw pand pandn pause paveb pavgusb pcmpeqb pcmpeqd pcmpeqw pcmpgtb pcmpgtd pcmpgtw pdistib pf2id pfa\
cc pfadd pfcmpeq pfcmpge pfcmpgt pfmax pfmin pfmul pfrcp pfrcpit1 pfrcpit2 pfrsqit1 pfrsqrt pfsub pfsubr pi2fd pmachriw pmaddwd pmagw pmulhriw pmulhrwa pmulhrwc pmulhw pmullw pmvgezb pmvlzb pmvnzb pmvzb pop popa popad popaw popf popfd popfq popfw por prefetch prefetchw pslld psllq psllw psrad psraw psrld psrlq psrlw psubb psubd psubsb psubsiw psubsw psubusb psubusw psubw punpckhbw punpckhdq punpckhwd punpcklbw punpckldq punpcklwd push pusha pushad pushaw pushf pushfd pushfq pushfw pxor rcl rcr r\
dshr rdmsr rdpmc rdtsc rdtscp ret retf retn rol ror rdm rsdc rsldt rsm rsts sahf sal salc sar sbb scasb scasd scasq scasw sfence sgdt shl shld shr shrd sidt sldt skinit smi smint smintold smsw stc std sti stosb stosd stosq stosw str sub svdc svldt svts swapgs syscall sysenter sysexit sysret test ud0 ud1 ud2b ud2 ud2a umov verr verw fwait wbinvd wrshr wrmsr xadd xbts xchg xlatb xlat xor cmove cmovz cmovne cmovnz cmova cmovnbe cmovae cmovnb cmovb cmovnae cmovbe cmovna cmovg cmovnle cmovge cmovnl c\
movl cmovnge cmovle cmovng cmovc cmovnc cmovo cmovno cmovs cmovns cmovp cmovpe cmovnp cmovpo je jz jne jnz ja jnbe jae jnb jb jnae jbe jna jg jnle jge jnl jl jnge jle jng jc jnc jo jno js jns jpo jnp jpe jp sete setz setne setnz seta setnbe setae setnb setnc setb setnae setcset setbe setna setg setnle setge setnl setl setnge setle setng sets setns seto setno setpe setp setpo setnp addps addss andnps andps cmpeqps cmpeqss cmpleps cmpless cmpltps cmpltss cmpneqps cmpneqss cmpnleps cmpnless cmpnltp\
s cmpnltss cmpordps cmpordss cmpunordps cmpunordss cmpps cmpss comiss cvtpi2ps cvtps2pi cvtsi2ss cvtss2si cvttps2pi cvttss2si divps divss ldmxcsr maxps maxss minps minss movaps movhps movlhps movlps movhlps movmskps movntps movss movups mulps mulss orps rcpps rcpss rsqrtps rsqrtss shufps sqrtps sqrtss stmxcsr subps subss ucomiss unpckhps unpcklps xorps fxrstor fxrstor64 fxsave fxsave64 xgetbv xsetbv xsave xsave64 xsaveopt xsaveopt64 xrstor xrstor64 prefetchnta prefetcht0 prefetcht1 prefetcht2 ma\
skmovq movntq pavgb pavgw pextrw pinsrw pmaxsw pmaxub pminsw pminub pmovmskb pmulhuw psadbw pshufw pf2iw pfnacc pfpnacc pi2fw pswapd maskmovdqu clflush movntdq movnti movntpd movdqa movdqu movdq2q movq2dq paddq pmuludq pshufd pshufhw pshuflw pslldq psrldq psubq punpckhqdq punpcklqdq addpd addsd andnpd andpd cmpeqpd cmpeqsd cmplepd cmplesd cmpltpd cmpltsd cmpneqpd cmpneqsd cmpnlepd cmpnlesd cmpnltpd cmpnltsd cmpordpd cmpordsd cmpunordpd cmpunordsd cmppd comisd cvtdq2pd cvtdq2ps cvtpd2dq cvtpd2pi \
cvtpd2ps cvtpi2pd cvtps2dq cvtps2pd cvtsd2si cvtsd2ss cvtsi2sd cvtss2sd cvttpd2pi cvttpd2dq cvttps2dq cvttsd2si divpd divsd maxpd maxsd minpd minsd movapd movhpd movlpd movmskpd movupd mulpd mulsd orpd shufpd sqrtpd sqrtsd subpd subsd ucomisd unpckhpd unpcklpd xorpd addsubpd addsubps haddpd haddps hsubpd hsubps lddqu movddup movshdup movsldup clgi stgi vmcall vmclear vmfunc vmlaunch vmload vmmcall vmptrld vmptrst vmread vmresume vmrun vmsave vmwrite vmxoff vmxon invept invvpid pabsb pabsw pabsd \
palignr phaddw phaddd phaddsw phsubw phsubd phsubsw pmaddubsw pmulhrsw pshufb psignb psignw psignd extrq insertq movntsd movntss lzcnt blendpd blendps blendvpd blendvps dppd dpps extractps insertps movntdqa mpsadbw packusdw pblendvb pblendw pcmpeqq pextrb pextrd pextrq phminposuw pinsrb pinsrd pinsrq pmaxsb pmaxsd pmaxud pmaxuw pminsb pminsd pminud pminuw pmovsxbw pmovsxbd pmovsxbq pmovsxwd pmovsxwq pmovsxdq pmovzxbw pmovzxbd pmovzxbq pmovzxwd pmovzxwq pmovzxdq pmuldq pmulld ptest roundpd roundp\
s roundsd roundss crc32 pcmpestri pcmpestrm pcmpistri pcmpistrm pcmpgtq popcnt getsec pfrcpv pfrsqrtv movbe aesenc aesenclast aesdec aesdeclast aesimc aeskeygenassist vaesenc vaesenclast vaesdec vaesdeclast vaesimc vaeskeygenassist vaddpd vaddps vaddsd vaddss vaddsubpd vaddsubps vandpd vandps vandnpd vandnps vblendpd vblendps vblendvpd vblendvps vbroadcastss vbroadcastsd vbroadcastf128 vcmpeq_ospd vcmpeqpd vcmplt_ospd vcmpltpd vcmple_ospd vcmplepd vcmpunord_qpd vcmpunordpd vcmpneq_uqpd vcmpneqpd\
 vcmpnlt_uspd vcmpnltpd vcmpnle_uspd vcmpnlepd vcmpord_qpd vcmpordpd vcmpeq_uqpd vcmpnge_uspd vcmpngepd vcmpngt_uspd vcmpngtpd vcmpfalse_oqpd vcmpfalsepd vcmpneq_oqpd vcmpge_ospd vcmpgepd vcmpgt_ospd vcmpgtpd vcmptrue_uqpd vcmptruepd vcmplt_oqpd vcmple_oqpd vcmpunord_spd vcmpneq_uspd vcmpnlt_uqpd vcmpnle_uqpd vcmpord_spd vcmpeq_uspd vcmpnge_uqpd vcmpngt_uqpd vcmpfalse_ospd vcmpneq_ospd vcmpge_oqpd vcmpgt_oqpd vcmptrue_uspd vcmppd vcmpeq_osps vcmpeqps vcmplt_osps vcmpltps vcmple_osps vcmpleps vcm\
punord_qps vcmpunordps vcmpneq_uqps vcmpneqps vcmpnlt_usps vcmpnltps vcmpnle_usps vcmpnleps vcmpord_qps vcmpordps vcmpeq_uqps vcmpnge_usps vcmpngeps vcmpngt_usps vcmpngtps vcmpfalse_oqps vcmpfalseps vcmpneq_oqps vcmpge_osps vcmpgeps vcmpgt_osps vcmpgtps vcmptrue_uqps vcmptrueps vcmplt_oqps vcmple_oqps vcmpunord_sps vcmpneq_usps vcmpnlt_uqps vcmpnle_uqps vcmpord_sps vcmpeq_usps vcmpnge_uqps vcmpngt_uqps vcmpfalse_osps vcmpneq_osps vcmpge_oqps vcmpgt_oqps vcmptrue_usps vcmpps vcmpeq_ossd vcmpeqsd \
vcmplt_ossd vcmpltsd vcmple_ossd vcmplesd vcmpunord_qsd vcmpunordsd vcmpneq_uqsd vcmpneqsd vcmpnlt_ussd vcmpnltsd vcmpnle_ussd vcmpnlesd vcmpord_qsd vcmpordsd vcmpeq_uqsd vcmpnge_ussd vcmpngesd vcmpngt_ussd vcmpngtsd vcmpfalse_oqsd vcmpfalsesd vcmpneq_oqsd vcmpge_ossd vcmpgesd vcmpgt_ossd vcmpgtsd vcmptrue_uqsd vcmptruesd vcmplt_oqsd vcmple_oqsd vcmpunord_ssd vcmpneq_ussd vcmpnlt_uqsd vcmpnle_uqsd vcmpord_ssd vcmpeq_ussd vcmpnge_uqsd vcmpngt_uqsd vcmpfalse_ossd vcmpneq_ossd vcmpge_oqsd vcmpgt_oq\
sd vcmptrue_ussd vcmpsd vcmpeq_osss vcmpeqss vcmplt_osss vcmpltss vcmple_osss vcmpless vcmpunord_qss vcmpunordss vcmpneq_uqss vcmpneqss vcmpnlt_usss vcmpnltss vcmpnle_usss vcmpnless vcmpord_qss vcmpordss vcmpeq_uqss vcmpnge_usss vcmpngess vcmpngt_usss vcmpngtss vcmpfalse_oqss vcmpfalsess vcmpneq_oqss vcmpge_osss vcmpgess vcmpgt_osss vcmpgtss vcmptrue_uqss vcmptruess vcmplt_oqss vcmple_oqss vcmpunord_sss vcmpneq_usss vcmpnlt_uqss vcmpnle_uqss vcmpord_sss vcmpeq_usss vcmpnge_uqss vcmpngt_uqss vcmp\
false_osss vcmpneq_osss vcmpge_oqss vcmpgt_oqss vcmptrue_usss vcmpss vcomisd vcomiss vcvtdq2pd vcvtdq2ps vcvtpd2dq vcvtpd2ps vcvtps2dq vcvtps2pd vcvtsd2si vcvtsd2ss vcvtsi2sd vcvtsi2ss vcvtss2sd vcvtss2si vcvttpd2dq vcvttps2dq vcvttsd2si vcvttss2si vdivpd vdivps vdivsd vdivss vdppd vdpps vextractf128 vextractps vhaddpd vhaddps vhsubpd vhsubps vinsertf128 vinsertps vlddqu vldqqu vldmxcsr vmaskmovdqu vmaskmovps vmaskmovpd vmaxpd vmaxps vmaxsd vmaxss vminpd vminps vminsd vminss vmovapd vmovaps vmov\
d vmovq vmovddup vmovdqa vmovqqa vmovdqu vmovqqu vmovhlps vmovhpd vmovhps vmovlhps vmovlpd vmovlps vmovmskpd vmovmskps vmovntdq vmovntqq vmovntdqa vmovntpd vmovntps vmovsd vmovshdup vmovsldup vmovss vmovupd vmovups vmpsadbw vmulpd vmulps vmulsd vmulss vorpd vorps vpabsb vpabsw vpabsd vpacksswb vpackssdw vpackuswb vpackusdw vpaddb vpaddw vpaddd vpaddq vpaddsb vpaddsw vpaddusb vpaddusw vpalignr vpand vpandn vpavgb vpavgw vpblendvb vpblendw vpcmpestri vpcmpestrm vpcmpistri vpcmpistrm vpcmpeqb vpcmp\
eqw vpcmpeqd vpcmpeqq vpcmpgtb vpcmpgtw vpcmpgtd vpcmpgtq vpermilpd vpermilps vperm2f128 vpextrb vpextrw vpextrd vpextrq vphaddw vphaddd vphaddsw vphminposuw vphsubw vphsubd vphsubsw vpinsrb vpinsrw vpinsrd vpinsrq vpmaddwd vpmaddubsw vpmaxsb vpmaxsw vpmaxsd vpmaxub vpmaxuw vpmaxud vpminsb vpminsw vpminsd vpminub vpminuw vpminud vpmovmskb vpmovsxbw vpmovsxbd vpmovsxbq vpmovsxwd vpmovsxwq vpmovsxdq vpmovzxbw vpmovzxbd vpmovzxbq vpmovzxwd vpmovzxwq vpmovzxdq vpmulhuw vpmulhrsw vpmulhw vpmullw vpmu\
lld vpmuludq vpmuldq vpor vpsadbw vpshufb vpshufd vpshufhw vpshuflw vpsignb vpsignw vpsignd vpslldq vpsrldq vpsllw vpslld vpsllq vpsraw vpsrad vpsrlw vpsrld vpsrlq vptest vpsubb vpsubw vpsubd vpsubq vpsubsb vpsubsw vpsubusb vpsubusw vpunpckhbw vpunpckhwd vpunpckhdq vpunpckhqdq vpunpcklbw vpunpcklwd vpunpckldq vpunpcklqdq vpxor vrcpps vrcpss vrsqrtps vrsqrtss vroundpd vroundps vroundsd vroundss vshufpd vshufps vsqrtpd vsqrtps vsqrtsd vsqrtss vstmxcsr vsubpd vsubps vsubsd vsubss vtestps vtestpd vu\
comisd vucomiss vunpckhpd vunpckhps vunpcklpd vunpcklps vxorpd vxorps vzeroall vzeroupper pclmullqlqdq pclmulhqlqdq pclmullqhqdq pclmulhqhqdq pclmulqdq vpclmullqlqdq vpclmulhqlqdq vpclmullqhqdq vpclmulhqhqdq vpclmulqdq vfmadd132ps vfmadd132pd vfmadd312ps vfmadd312pd vfmadd213ps vfmadd213pd vfmadd123ps vfmadd123pd vfmadd231ps vfmadd231pd vfmadd321ps vfmadd321pd vfmaddsub132ps vfmaddsub132pd vfmaddsub312ps vfmaddsub312pd vfmaddsub213ps vfmaddsub213pd vfmaddsub123ps vfmaddsub123pd vfmaddsub231ps vf\
maddsub231pd vfmaddsub321ps vfmaddsub321pd vfmsub132ps vfmsub132pd vfmsub312ps vfmsub312pd vfmsub213ps vfmsub213pd vfmsub123ps vfmsub123pd vfmsub231ps vfmsub231pd vfmsub321ps vfmsub321pd vfmsubadd132ps vfmsubadd132pd vfmsubadd312ps vfmsubadd312pd vfmsubadd213ps vfmsubadd213pd vfmsubadd123ps vfmsubadd123pd vfmsubadd231ps vfmsubadd231pd vfmsubadd321ps vfmsubadd321pd vfnmadd132ps vfnmadd132pd vfnmadd312ps vfnmadd312pd vfnmadd213ps vfnmadd213pd vfnmadd123ps vfnmadd123pd vfnmadd231ps vfnmadd231pd vfn\
madd321ps vfnmadd321pd vfnmsub132ps vfnmsub132pd vfnmsub312ps vfnmsub312pd vfnmsub213ps vfnmsub213pd vfnmsub123ps vfnmsub123pd vfnmsub231ps vfnmsub231pd vfnmsub321ps vfnmsub321pd vfmadd132ss vfmadd132sd vfmadd312ss vfmadd312sd vfmadd213ss vfmadd213sd vfmadd123ss vfmadd123sd vfmadd231ss vfmadd231sd vfmadd321ss vfmadd321sd vfmsub132ss vfmsub132sd vfmsub312ss vfmsub312sd vfmsub213ss vfmsub213sd vfmsub123ss vfmsub123sd vfmsub231ss vfmsub231sd vfmsub321ss vfmsub321sd vfnmadd132ss vfnmadd132sd vfnmadd\
312ss vfnmadd312sd vfnmadd213ss vfnmadd213sd vfnmadd123ss vfnmadd123sd vfnmadd231ss vfnmadd231sd vfnmadd321ss vfnmadd321sd vfnmsub132ss vfnmsub132sd vfnmsub312ss vfnmsub312sd vfnmsub213ss vfnmsub213sd vfnmsub123ss vfnmsub123sd vfnmsub231ss vfnmsub231sd vfnmsub321ss vfnmsub321sd rdfsbase rdgsbase rdrand wrfsbase wrgsbase vcvtph2ps vcvtps2ph adcx adox rdseed clac stac xstore xcryptecb xcryptcbc xcryptctr xcryptcfb xcryptofb montmul xsha1 xsha256 llwpcb slwpcb lwpval lwpins vfmaddpd vfmaddps vfmadd\
sd vfmaddss vfmaddsubpd vfmaddsubps vfmsubaddpd vfmsubaddps vfmsubpd vfmsubps vfmsubsd vfmsubss vfnmaddpd vfnmaddps vfnmaddsd vfnmaddss vfnmsubpd vfnmsubps vfnmsubsd vfnmsubss vfrczpd vfrczps vfrczsd vfrczss vpcmov vpcomb vpcomd vpcomq vpcomub vpcomud vpcomuq vpcomuw vpcomw vphaddbd vphaddbq vphaddbw vphadddq vphaddubd vphaddubq vphaddubw vphaddudq vphadduwd vphadduwq vphaddwd vphaddwq vphsubbw vphsubdq vphsubwd vpmacsdd vpmacsdqh vpmacsdql vpmacssdd vpmacssdqh vpmacssdql vpmacsswd vpmacssww vpm\
acswd vpmacsww vpmadcsswd vpmadcswd vpperm vprotb vprotd vprotq vprotw vpshab vpshad vpshaq vpshaw vpshlb vpshld vpshlq vpshlw vbroadcasti128 vpblendd vpbroadcastb vpbroadcastw vpbroadcastd vpbroadcastq vpermd vpermpd vpermps vpermq vperm2i128 vextracti128 vinserti128 vpmaskmovd vpmaskmovq vpsllvd vpsllvq vpsravd vpsrlvd vpsrlvq vgatherdpd vgatherqpd vgatherdps vgatherqps vpgatherdd vpgatherqd vpgatherdq vpgatherqq xabort xbegin xend xtest andn bextr blci blcic blsi blsic blcfill blsfill blcmsk \
blsmsk blsr blcs bzhi mulx pdep pext rorx sarx shlx shrx tzcnt tzmsk t1mskc valignd valignq vblendmpd vblendmps vbroadcastf32x4 vbroadcastf64x4 vbroadcasti32x4 vbroadcasti64x4 vcompresspd vcompressps vcvtpd2udq vcvtps2udq vcvtsd2usi vcvtss2usi vcvttpd2udq vcvttps2udq vcvttsd2usi vcvttss2usi vcvtudq2pd vcvtudq2ps vcvtusi2sd vcvtusi2ss vexpandpd vexpandps vextractf32x4 vextractf64x4 vextracti32x4 vextracti64x4 vfixupimmpd vfixupimmps vfixupimmsd vfixupimmss vgetexppd vgetexpps vgetexpsd vgetexpss \
vgetmantpd vgetmantps vgetmantsd vgetmantss vinsertf32x4 vinsertf64x4 vinserti32x4 vinserti64x4 vmovdqa32 vmovdqa64 vmovdqu32 vmovdqu64 vpabsq vpandd vpandnd vpandnq vpandq vpblendmd vpblendmq vpcmpltd vpcmpled vpcmpneqd vpcmpnltd vpcmpnled vpcmpd vpcmpltq vpcmpleq vpcmpneqq vpcmpnltq vpcmpnleq vpcmpq vpcmpequd vpcmpltud vpcmpleud vpcmpnequd vpcmpnltud vpcmpnleud vpcmpud vpcmpequq vpcmpltuq vpcmpleuq vpcmpnequq vpcmpnltuq vpcmpnleuq vpcmpuq vpcompressd vpcompressq vpermi2d vpermi2pd vpermi2ps vp\
ermi2q vpermt2d vpermt2pd vpermt2ps vpermt2q vpexpandd vpexpandq vpmaxsq vpmaxuq vpminsq vpminuq vpmovdb vpmovdw vpmovqb vpmovqd vpmovqw vpmovsdb vpmovsdw vpmovsqb vpmovsqd vpmovsqw vpmovusdb vpmovusdw vpmovusqb vpmovusqd vpmovusqw vpord vporq vprold vprolq vprolvd vprolvq vprord vprorq vprorvd vprorvq vpscatterdd vpscatterdq vpscatterqd vpscatterqq vpsraq vpsravq vpternlogd vpternlogq vptestmd vptestmq vptestnmd vptestnmq vpxord vpxorq vrcp14pd vrcp14ps vrcp14sd vrcp14ss vrndscalepd vrndscaleps\
 vrndscalesd vrndscaless vrsqrt14pd vrsqrt14ps vrsqrt14sd vrsqrt14ss vscalefpd vscalefps vscalefsd vscalefss vscatterdpd vscatterdps vscatterqpd vscatterqps vshuff32x4 vshuff64x2 vshufi32x4 vshufi64x2 kandnw kandw kmovw knotw kortestw korw kshiftlw kshiftrw kunpckbw kxnorw kxorw vpbroadcastmb2q vpbroadcastmw2d vpconflictd vpconflictq vplzcntd vplzcntq vexp2pd vexp2ps vrcp28pd vrcp28ps vrcp28sd vrcp28ss vrsqrt28pd vrsqrt28ps vrsqrt28sd vrsqrt28ss vgatherpf0dpd vgatherpf0dps vgatherpf0qpd vgatherp\
f0qps vgatherpf1dpd vgatherpf1dps vgatherpf1qpd vgatherpf1qps vscatterpf0dpd vscatterpf0dps vscatterpf0qpd vscatterpf0qps vscatterpf1dpd vscatterpf1dps vscatterpf1qpd vscatterpf1qps prefetchwt1 bndmk bndcl bndcu bndcn bndmov bndldx bndstx sha1rnds4 sha1nexte sha1msg1 sha1msg2 sha256rnds2 sha256msg1 sha256msg2 hint_nop0 hint_nop1 hint_nop2 hint_nop3 hint_nop4 hint_nop5 hint_nop6 hint_nop7 hint_nop8 hint_nop9 hint_nop10 hint_nop11 hint_nop12 hint_nop13 hint_nop14 hint_nop15 hint_nop16 hint_nop17 h\
int_nop18 hint_nop19 hint_nop20 hint_nop21 hint_nop22 hint_nop23 hint_nop24 hint_nop25 hint_nop26 hint_nop27 hint_nop28 hint_nop29 hint_nop30 hint_nop31 hint_nop32 hint_nop33 hint_nop34 hint_nop35 hint_nop36 hint_nop37 hint_nop38 hint_nop39 hint_nop40 hint_nop41 hint_nop42 hint_nop43 hint_nop44 hint_nop45 hint_nop46 hint_nop47 hint_nop48 hint_nop49 hint_nop50 hint_nop51 hint_nop52 hint_nop53 hint_nop54 hint_nop55 hint_nop56 hint_nop57 hint_nop58 hint_nop59 hint_nop60 hint_nop61 hint_nop62 hint_n\
op63",built_in:"ip eip rip al ah bl bh cl ch dl dh sil dil bpl spl r8b r9b r10b r11b r12b r13b r14b r15b ax bx cx dx si di bp sp r8w r9w r10w r11w r12w r13w r14w r15w eax ebx ecx edx esi edi ebp esp eip r8d r9d r10d r11d r12d r13d r14d r15d rax rbx rcx rdx rsi rdi rbp rsp r8 r9 r10 r11 r12 r13 r14 r15 cs ds es fs gs ss st st0 st1 st2 st3 st4 st5 st6 st7 mm0 mm1 mm2 mm3 mm4 mm5 mm6 mm7 xmm0  xmm1  xmm2  xmm3  xmm4  xmm5  xmm6  xmm7  xmm8  xmm9 xmm10  xmm11 xmm12 xmm13 xmm14 xmm15 xmm16 xmm17 xmm1\
8 xmm19 xmm20 xmm21 xmm22 xmm23 xmm24 xmm25 xmm26 xmm27 xmm28 xmm29 xmm30 xmm31 ymm0  ymm1  ymm2  ymm3  ymm4  ymm5  ymm6  ymm7  ymm8  ymm9 ymm10  ymm11 ymm12 ymm13 ymm14 ymm15 ymm16 ymm17 ymm18 ymm19 ymm20 ymm21 ymm22 ymm23 ymm24 ymm25 ymm26 ymm27 ymm28 ymm29 ymm30 ymm31 zmm0  zmm1  zmm2  zmm3  zmm4  zmm5  zmm6  zmm7  zmm8  zmm9 zmm10  zmm11 zmm12 zmm13 zmm14 zmm15 zmm16 zmm17 zmm18 zmm19 zmm20 zmm21 zmm22 zmm23 zmm24 zmm25 zmm26 zmm27 zmm28 zmm29 zmm30 zmm31 k0 k1 k2 k3 k4 k5 k6 k7 bnd0 bnd1 bn\
d2 bnd3 cr0 cr1 cr2 cr3 cr4 cr8 dr0 dr1 dr2 dr3 dr8 tr3 tr4 tr5 tr6 tr7 r0 r1 r2 r3 r4 r5 r6 r7 r0b r1b r2b r3b r4b r5b r6b r7b r0w r1w r2w r3w r4w r5w r6w r7w r0d r1d r2d r3d r4d r5d r6d r7d r0h r1h r2h r3h r0l r1l r2l r3l r4l r5l r6l r7l r8l r9l r10l r11l r12l r13l r14l r15l db dw dd dq dt ddq do dy dz resb resw resd resq rest resdq reso resy resz incbin equ times byte word dword qword nosplit rel abs seg wrt strict near far a32 ptr",meta:"%define %xdefine %+ %undef %defstr %deftok %assign %st\
rcat %strlen %substr %rotate %elif %else %endif %if %ifmacro %ifctx %ifidn %ifidni %ifid %ifnum %ifstr %iftoken %ifempty %ifenv %error %warning %fatal %rep %endrep %include %push %pop %repl %pathsearch %depend %use %arg %stacksize %local %line %comment %endcomment .nolist __FILE__ __LINE__ __SECT__  __BITS__ __OUTPUT_FORMAT__ __DATE__ __TIME__ __DATE_NUM__ __TIME_NUM__ __UTC_DATE__ __UTC_TIME__ __UTC_DATE_NUM__ __UTC_TIME_NUM__  __PASS__ struc endstruc istruc at iend align alignb sectalign daz n\
odaz up down zero default option assume public bits use16 use32 use64 default section segment absolute extern global common cpu float __utf16__ __utf16le__ __utf16be__ __utf32__ __utf32le__ __utf32be__ __float8__ __float16__ __float32__ __float64__ __float80m__ __float80e__ __float128l__ __float128h__ __Infinity__ __QNaN__ __SNaN__ Inf NaN QNaN SNaN float8 float16 float32 float64 float80m float80e float128l float128h __FLOAT_DAZ__ __FLOAT_ROUND__ __FLOAT__"},contains:[hljs.COMMENT(";","$",{relevance:0}),
{className:"number",variants:[{begin:"\\b(?:([0-9][0-9_]*)?\\.[0-9_]*(?:[eE][+-]?[0-9_]+)?|(0[Xx])?[0-9][0-9_]*(\\.[0-9_]*)?(?:[pP](?:[+-]?[0-9_]+)?)?)\\b",relevance:0},{begin:"\\$[0-9][0-9A-Fa-f]*",relevance:0},{begin:"\\b(?:[0-9A-Fa-f][0-9A-Fa-f_]*[Hh]|[0-9][0-9_]*[DdTt]?|[0-7][0-7_]*[QqOo]|[0-1][0-1_]*[BbYy])\\b"},{begin:"\\b(?:0[Xx][0-9A-Fa-f_]+|0[DdTt][0-9_]+|0[QqOo][0-7_]+|0[BbYy][0-1_]+)\\b"}]},hljs.QUOTE_STRING_MODE,{className:"string",variants:[{begin:"'",end:"[^\\\\]'"},{begin:"`",end:"\
[^\\\\]`"}],relevance:0},{className:"symbol",variants:[{begin:"^\\s*[A-Za-z._?][A-Za-z0-9_$#@~.?]*(:|\\s+label)"},{begin:"^\\s*%%[A-Za-z0-9_$#@~.?]*:"}],relevance:0},{className:"subst",begin:"%[0-9]+",relevance:0},{className:"subst",begin:"%!S+",relevance:0},{className:"meta",begin:/^\s*\.[\w_-]+/}]}}return x86asm_1=x86asm2,x86asm_1}var xl_1,hasRequiredXl;function requireXl(){if(hasRequiredXl)return xl_1;hasRequiredXl=1;function xl2(hljs){const KWS=["if","then","else","do","while","until","for",
"loop","import","with","is","as","where","when","by","data","constant","integer","real","text","name","boolean","symbol","infix","prefix","postfix","block","tree"],BUILT_INS2=["in","mod","rem","and","or","xor","not","abs","sign","floor","ceil","sqrt","sin","cos","tan","asin","acos","atan","exp","expm1","log","log2","log10","log1p","pi","at","text_length","text_range","text_find","text_replace","contains","page","slide","basic_slide","title_slide","title","subtitle","fade_in","fade_out","fade_at",
"clear_color","color","line_color","line_width","texture_wrap","texture_transform","texture","scale_?x","scale_?y","scale_?z?","translate_?x","translate_?y","translate_?z?","rotate_?x","rotate_?y","rotate_?z?","rectangle","circle","ellipse","sphere","path","line_to","move_to","quad_to","curve_to","theme","background","contents","locally","time","mouse_?x","mouse_?y","mouse_buttons"],BUILTIN_MODULES=["ObjectLoader","Animate","MovieCredits","Slides","Filters","Shading","Materials","LensFlare","Map\
ping","VLCAudioVideo","StereoDecoder","PointCloud","NetworkAccess","RemoteControl","RegExp","ChromaKey","Snowfall","NodeJS","Speech","Charts"],KEYWORDS2={$pattern:/[a-zA-Z][a-zA-Z0-9_?]*/,keyword:KWS,literal:["true","false","nil"],built_in:BUILT_INS2.concat(BUILTIN_MODULES)},DOUBLE_QUOTE_TEXT={className:"string",begin:'"',end:'"',illegal:"\\n"},SINGLE_QUOTE_TEXT={className:"string",begin:"'",end:"'",illegal:"\\n"},LONG_TEXT={className:"string",begin:"<<",end:">>"},BASED_NUMBER={className:"number",
begin:"[0-9]+#[0-9A-Z_]+(\\.[0-9-A-Z_]+)?#?([Ee][+-]?[0-9]+)?"},IMPORT={beginKeywords:"import",end:"$",keywords:KEYWORDS2,contains:[DOUBLE_QUOTE_TEXT]},FUNCTION_DEFINITION={className:"function",begin:/[a-z][^\n]*->/,returnBegin:!0,end:/->/,contains:[hljs.inherit(hljs.TITLE_MODE,{starts:{endsWithParent:!0,keywords:KEYWORDS2}})]};return{name:"XL",aliases:["tao"],keywords:KEYWORDS2,contains:[hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,DOUBLE_QUOTE_TEXT,SINGLE_QUOTE_TEXT,LONG_TEXT,FUNCTION_DEFINITION,
IMPORT,BASED_NUMBER,hljs.NUMBER_MODE]}}return xl_1=xl2,xl_1}var xquery_1,hasRequiredXquery;function requireXquery(){if(hasRequiredXquery)return xquery_1;hasRequiredXquery=1;function xquery2(_hljs){return{name:"XQuery",aliases:["xpath","xq","xqm"],case_insensitive:!1,illegal:/(proc)|(abstract)|(extends)|(until)|(#)/,keywords:{$pattern:/[a-zA-Z$][a-zA-Z0-9_:-]*/,keyword:["module","schema","namespace","boundary-space","preserve","no-preserve","strip","default","collation","base-uri","ordering","con\
text","decimal-format","decimal-separator","copy-namespaces","empty-sequence","except","exponent-separator","external","grouping-separator","inherit","no-inherit","lax","minus-sign","per-mille","percent","schema-attribute","schema-element","strict","unordered","zero-digit","declare","import","option","function","validate","variable","for","at","in","let","where","order","group","by","return","if","then","else","tumbling","sliding","window","start","when","only","end","previous","next","stable","\
ascending","descending","allowing","empty","greatest","least","some","every","satisfies","switch","case","typeswitch","try","catch","and","or","to","union","intersect","instance","of","treat","as","castable","cast","map","array","delete","insert","into","replace","value","rename","copy","modify","update"],type:["item","document-node","node","attribute","document","element","comment","namespace","namespace-node","processing-instruction","text","construction","xs:anyAtomicType","xs:untypedAtomic",
"xs:duration","xs:time","xs:decimal","xs:float","xs:double","xs:gYearMonth","xs:gYear","xs:gMonthDay","xs:gMonth","xs:gDay","xs:boolean","xs:base64Binary","xs:hexBinary","xs:anyURI","xs:QName","xs:NOTATION","xs:dateTime","xs:dateTimeStamp","xs:date","xs:string","xs:normalizedString","xs:token","xs:language","xs:NMTOKEN","xs:Name","xs:NCName","xs:ID","xs:IDREF","xs:ENTITY","xs:integer","xs:nonPositiveInteger","xs:negativeInteger","xs:long","xs:int","xs:short","xs:byte","xs:nonNegativeInteger","xs\
:unisignedLong","xs:unsignedInt","xs:unsignedShort","xs:unsignedByte","xs:positiveInteger","xs:yearMonthDuration","xs:dayTimeDuration"],literal:["eq","ne","lt","le","gt","ge","is","self::","child::","descendant::","descendant-or-self::","attribute::","following::","following-sibling::","parent::","ancestor::","ancestor-or-self::","preceding::","preceding-sibling::","NaN"]},contains:[{className:"variable",begin:/[$][\w\-:]+/},{className:"built_in",variants:[{begin:/\barray:/,end:/(?:append|filter|flatten|fold-(?:left|right)|for-each(?:-pair)?|get|head|insert-before|join|put|remove|reverse|size|sort|subarray|tail)\b/},
{begin:/\bmap:/,end:/(?:contains|entry|find|for-each|get|keys|merge|put|remove|size)\b/},{begin:/\bmath:/,end:/(?:a(?:cos|sin|tan[2]?)|cos|exp(?:10)?|log(?:10)?|pi|pow|sin|sqrt|tan)\b/},{begin:/\bop:/,end:/\(/,excludeEnd:!0},{begin:/\bfn:/,end:/\(/,excludeEnd:!0},{begin:/[^</$:'"-]\b(?:abs|accumulator-(?:after|before)|adjust-(?:date(?:Time)?|time)-to-timezone|analyze-string|apply|available-(?:environment-variables|system-properties)|avg|base-uri|boolean|ceiling|codepoints?-(?:equal|to-string)|collation-key|collection|compare|concat|contains(?:-token)?|copy-of|count|current(?:-)?(?:date(?:Time)?|time|group(?:ing-key)?|output-uri|merge-(?:group|key))?data|dateTime|days?-from-(?:date(?:Time)?|duration)|deep-equal|default-(?:collation|language)|distinct-values|document(?:-uri)?|doc(?:-available)?|element-(?:available|with-id)|empty|encode-for-uri|ends-with|environment-variable|error|escape-html-uri|exactly-one|exists|false|filter|floor|fold-(?:left|right)|for-each(?:-pair)?|format-(?:date(?:Time)?|time|integer|number)|function-(?:arity|available|lookup|name)|generate-id|has-children|head|hours-from-(?:dateTime|duration|time)|id(?:ref)?|implicit-timezone|in-scope-prefixes|index-of|innermost|insert-before|iri-to-uri|json-(?:doc|to-xml)|key|lang|last|load-xquery-module|local-name(?:-from-QName)?|(?:lower|upper)-case|matches|max|minutes-from-(?:dateTime|duration|time)|min|months?-from-(?:date(?:Time)?|duration)|name(?:space-uri-?(?:for-prefix|from-QName)?)?|nilled|node-name|normalize-(?:space|unicode)|not|number|one-or-more|outermost|parse-(?:ietf-date|json)|path|position|(?:prefix-from-)?QName|random-number-generator|regex-group|remove|replace|resolve-(?:QName|uri)|reverse|root|round(?:-half-to-even)?|seconds-from-(?:dateTime|duration|time)|snapshot|sort|starts-with|static-base-uri|stream-available|string-?(?:join|length|to-codepoints)?|subsequence|substring-?(?:after|before)?|sum|system-property|tail|timezone-from-(?:date(?:Time)?|time)|tokenize|trace|trans(?:form|late)|true|type-available|unordered|unparsed-(?:entity|text)?-?(?:public-id|uri|available|lines)?|uri-collection|xml-to-json|years?-from-(?:date(?:Time)?|duration)|zero-or-one)\b/},
{begin:/\blocal:/,end:/\(/,excludeEnd:!0},{begin:/\bzip:/,end:/(?:zip-file|(?:xml|html|text|binary)-entry| (?:update-)?entries)\b/},{begin:/\b(?:util|db|functx|app|xdmp|xmldb):/,end:/\(/,excludeEnd:!0}]},{className:"string",variants:[{begin:/"/,end:/"/,contains:[{begin:/""/,relevance:0}]},{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]}]},{className:"number",begin:/(\b0[0-7_]+)|(\b0x[0-9a-fA-F_]+)|(\b[1-9][0-9_]*(\.[0-9_]+)?)|[0_]\b/,relevance:0},{className:"comment",begin:/\(:/,end:/:\)/,
relevance:10,contains:[{className:"doctag",begin:/@\w+/}]},{className:"meta",begin:/%[\w\-:]+/},{className:"title",begin:/\bxquery version "[13]\.[01]"\s?(?:encoding ".+")?/,end:/;/},{beginKeywords:"element attribute comment document processing-instruction",end:/\{/,excludeEnd:!0},{begin:/<([\w._:-]+)(\s+\S*=('|").*('|"))?>/,end:/(\/[\w._:-]+>)/,subLanguage:"xml",contains:[{begin:/\{/,end:/\}/,subLanguage:"xquery"},"self"]}]}}return xquery_1=xquery2,xquery_1}var zephir_1,hasRequiredZephir;function requireZephir(){
if(hasRequiredZephir)return zephir_1;hasRequiredZephir=1;function zephir2(hljs){const STRING={className:"string",contains:[hljs.BACKSLASH_ESCAPE],variants:[hljs.inherit(hljs.APOS_STRING_MODE,{illegal:null}),hljs.inherit(hljs.QUOTE_STRING_MODE,{illegal:null})]},TITLE_MODE=hljs.UNDERSCORE_TITLE_MODE,NUMBER={variants:[hljs.BINARY_NUMBER_MODE,hljs.C_NUMBER_MODE]},KEYWORDS2="namespace class interface use extends function return abstract final public protected private static deprecated throw try catch\
 Exception echo empty isset instanceof unset let var new const self require if else elseif switch case default do while loop for continue break likely unlikely __LINE__ __FILE__ __DIR__ __FUNCTION__ __CLASS__ __TRAIT__ __METHOD__ __NAMESPACE__ array boolean float double integer object resource string char long unsigned bool int uint ulong uchar true false null undefined";return{name:"Zephir",aliases:["zep"],keywords:KEYWORDS2,contains:[hljs.C_LINE_COMMENT_MODE,hljs.COMMENT(/\/\*/,/\*\//,{contains:[
{className:"doctag",begin:/@[A-Za-z]+/}]}),{className:"string",begin:/<<<['"]?\w+['"]?$/,end:/^\w+;/,contains:[hljs.BACKSLASH_ESCAPE]},{begin:/(::|->)+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/},{className:"function",beginKeywords:"function fn",end:/[;{]/,excludeEnd:!0,illegal:/\$|\[|%/,contains:[TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,keywords:KEYWORDS2,contains:["self",hljs.C_BLOCK_COMMENT_MODE,STRING,NUMBER]}]},{className:"class",beginKeywords:"class interface",end:/\{/,excludeEnd:!0,
illegal:/[:($"]/,contains:[{beginKeywords:"extends implements"},TITLE_MODE]},{beginKeywords:"namespace",end:/;/,illegal:/[.']/,contains:[TITLE_MODE]},{beginKeywords:"use",end:/;/,contains:[TITLE_MODE]},{begin:/=>/},STRING,NUMBER]}}return zephir_1=zephir2,zephir_1}var lib,hasRequiredLib;function requireLib(){if(hasRequiredLib)return lib;hasRequiredLib=1;var hljs=requireCore$4();return hljs.registerLanguage("1c",require_1c()),hljs.registerLanguage("abnf",requireAbnf()),hljs.registerLanguage("acces\
slog",requireAccesslog()),hljs.registerLanguage("actionscript",requireActionscript()),hljs.registerLanguage("ada",requireAda()),hljs.registerLanguage("angelscript",requireAngelscript()),hljs.registerLanguage("apache",requireApache()),hljs.registerLanguage("applescript",requireApplescript()),hljs.registerLanguage("arcade",requireArcade()),hljs.registerLanguage("arduino",requireArduino()),hljs.registerLanguage("armasm",requireArmasm()),hljs.registerLanguage("xml",requireXml()),hljs.registerLanguage(
"asciidoc",requireAsciidoc()),hljs.registerLanguage("aspectj",requireAspectj()),hljs.registerLanguage("autohotkey",requireAutohotkey()),hljs.registerLanguage("autoit",requireAutoit()),hljs.registerLanguage("avrasm",requireAvrasm()),hljs.registerLanguage("awk",requireAwk()),hljs.registerLanguage("axapta",requireAxapta()),hljs.registerLanguage("bash",requireBash()),hljs.registerLanguage("basic",requireBasic()),hljs.registerLanguage("bnf",requireBnf()),hljs.registerLanguage("brainfuck",requireBrainfuck()),
hljs.registerLanguage("c",requireC()),hljs.registerLanguage("cal",requireCal()),hljs.registerLanguage("capnproto",requireCapnproto()),hljs.registerLanguage("ceylon",requireCeylon()),hljs.registerLanguage("clean",requireClean()),hljs.registerLanguage("clojure",requireClojure()),hljs.registerLanguage("clojure-repl",requireClojureRepl()),hljs.registerLanguage("cmake",requireCmake()),hljs.registerLanguage("coffeescript",requireCoffeescript()),hljs.registerLanguage("coq",requireCoq()),hljs.registerLanguage(
"cos",requireCos()),hljs.registerLanguage("cpp",requireCpp()),hljs.registerLanguage("crmsh",requireCrmsh()),hljs.registerLanguage("crystal",requireCrystal()),hljs.registerLanguage("csharp",requireCsharp()),hljs.registerLanguage("csp",requireCsp()),hljs.registerLanguage("css",requireCss()),hljs.registerLanguage("d",requireD()),hljs.registerLanguage("markdown",requireMarkdown()),hljs.registerLanguage("dart",requireDart()),hljs.registerLanguage("delphi",requireDelphi()),hljs.registerLanguage("diff",
requireDiff()),hljs.registerLanguage("django",requireDjango()),hljs.registerLanguage("dns",requireDns()),hljs.registerLanguage("dockerfile",requireDockerfile()),hljs.registerLanguage("dos",requireDos()),hljs.registerLanguage("dsconfig",requireDsconfig()),hljs.registerLanguage("dts",requireDts()),hljs.registerLanguage("dust",requireDust()),hljs.registerLanguage("ebnf",requireEbnf()),hljs.registerLanguage("elixir",requireElixir()),hljs.registerLanguage("elm",requireElm()),hljs.registerLanguage("ru\
by",requireRuby()),hljs.registerLanguage("erb",requireErb()),hljs.registerLanguage("erlang-repl",requireErlangRepl()),hljs.registerLanguage("erlang",requireErlang()),hljs.registerLanguage("excel",requireExcel()),hljs.registerLanguage("fix",requireFix()),hljs.registerLanguage("flix",requireFlix()),hljs.registerLanguage("fortran",requireFortran()),hljs.registerLanguage("fsharp",requireFsharp()),hljs.registerLanguage("gams",requireGams()),hljs.registerLanguage("gauss",requireGauss()),hljs.registerLanguage(
"gcode",requireGcode()),hljs.registerLanguage("gherkin",requireGherkin()),hljs.registerLanguage("glsl",requireGlsl()),hljs.registerLanguage("gml",requireGml()),hljs.registerLanguage("go",requireGo()),hljs.registerLanguage("golo",requireGolo()),hljs.registerLanguage("gradle",requireGradle()),hljs.registerLanguage("graphql",requireGraphql()),hljs.registerLanguage("groovy",requireGroovy()),hljs.registerLanguage("haml",requireHaml()),hljs.registerLanguage("handlebars",requireHandlebars()),hljs.registerLanguage(
"haskell",requireHaskell()),hljs.registerLanguage("haxe",requireHaxe()),hljs.registerLanguage("hsp",requireHsp()),hljs.registerLanguage("http",requireHttp()),hljs.registerLanguage("hy",requireHy()),hljs.registerLanguage("inform7",requireInform7()),hljs.registerLanguage("ini",requireIni()),hljs.registerLanguage("irpf90",requireIrpf90()),hljs.registerLanguage("isbl",requireIsbl()),hljs.registerLanguage("java",requireJava()),hljs.registerLanguage("javascript",requireJavascript()),hljs.registerLanguage(
"jboss-cli",requireJbossCli()),hljs.registerLanguage("json",requireJson()),hljs.registerLanguage("julia",requireJulia()),hljs.registerLanguage("julia-repl",requireJuliaRepl()),hljs.registerLanguage("kotlin",requireKotlin()),hljs.registerLanguage("lasso",requireLasso()),hljs.registerLanguage("latex",requireLatex()),hljs.registerLanguage("ldif",requireLdif()),hljs.registerLanguage("leaf",requireLeaf()),hljs.registerLanguage("less",requireLess()),hljs.registerLanguage("lisp",requireLisp()),hljs.registerLanguage(
"livecodeserver",requireLivecodeserver()),hljs.registerLanguage("livescript",requireLivescript()),hljs.registerLanguage("llvm",requireLlvm()),hljs.registerLanguage("lsl",requireLsl()),hljs.registerLanguage("lua",requireLua()),hljs.registerLanguage("makefile",requireMakefile()),hljs.registerLanguage("mathematica",requireMathematica()),hljs.registerLanguage("matlab",requireMatlab()),hljs.registerLanguage("maxima",requireMaxima()),hljs.registerLanguage("mel",requireMel()),hljs.registerLanguage("mer\
cury",requireMercury()),hljs.registerLanguage("mipsasm",requireMipsasm()),hljs.registerLanguage("mizar",requireMizar()),hljs.registerLanguage("perl",requirePerl()),hljs.registerLanguage("mojolicious",requireMojolicious()),hljs.registerLanguage("monkey",requireMonkey()),hljs.registerLanguage("moonscript",requireMoonscript()),hljs.registerLanguage("n1ql",requireN1ql()),hljs.registerLanguage("nestedtext",requireNestedtext()),hljs.registerLanguage("nginx",requireNginx()),hljs.registerLanguage("nim",
requireNim()),hljs.registerLanguage("nix",requireNix()),hljs.registerLanguage("node-repl",requireNodeRepl()),hljs.registerLanguage("nsis",requireNsis()),hljs.registerLanguage("objectivec",requireObjectivec()),hljs.registerLanguage("ocaml",requireOcaml()),hljs.registerLanguage("openscad",requireOpenscad()),hljs.registerLanguage("oxygene",requireOxygene()),hljs.registerLanguage("parser3",requireParser3()),hljs.registerLanguage("pf",requirePf()),hljs.registerLanguage("pgsql",requirePgsql()),hljs.registerLanguage(
"php",requirePhp()),hljs.registerLanguage("php-template",requirePhpTemplate()),hljs.registerLanguage("plaintext",requirePlaintext()),hljs.registerLanguage("pony",requirePony()),hljs.registerLanguage("powershell",requirePowershell()),hljs.registerLanguage("processing",requireProcessing()),hljs.registerLanguage("profile",requireProfile()),hljs.registerLanguage("prolog",requireProlog()),hljs.registerLanguage("properties",requireProperties$2()),hljs.registerLanguage("protobuf",requireProtobuf()),hljs.
registerLanguage("puppet",requirePuppet()),hljs.registerLanguage("purebasic",requirePurebasic()),hljs.registerLanguage("python",requirePython()),hljs.registerLanguage("python-repl",requirePythonRepl()),hljs.registerLanguage("q",requireQ()),hljs.registerLanguage("qml",requireQml()),hljs.registerLanguage("r",requireR()),hljs.registerLanguage("reasonml",requireReasonml()),hljs.registerLanguage("rib",requireRib()),hljs.registerLanguage("roboconf",requireRoboconf()),hljs.registerLanguage("routeros",requireRouteros()),
hljs.registerLanguage("rsl",requireRsl()),hljs.registerLanguage("ruleslanguage",requireRuleslanguage()),hljs.registerLanguage("rust",requireRust()),hljs.registerLanguage("sas",requireSas()),hljs.registerLanguage("scala",requireScala()),hljs.registerLanguage("scheme",requireScheme()),hljs.registerLanguage("scilab",requireScilab()),hljs.registerLanguage("scss",requireScss()),hljs.registerLanguage("shell",requireShell()),hljs.registerLanguage("smali",requireSmali()),hljs.registerLanguage("smalltalk",
requireSmalltalk()),hljs.registerLanguage("sml",requireSml()),hljs.registerLanguage("sqf",requireSqf()),hljs.registerLanguage("sql",requireSql()),hljs.registerLanguage("stan",requireStan()),hljs.registerLanguage("stata",requireStata()),hljs.registerLanguage("step21",requireStep21()),hljs.registerLanguage("stylus",requireStylus()),hljs.registerLanguage("subunit",requireSubunit()),hljs.registerLanguage("swift",requireSwift()),hljs.registerLanguage("taggerscript",requireTaggerscript()),hljs.registerLanguage(
"yaml",requireYaml()),hljs.registerLanguage("tap",requireTap()),hljs.registerLanguage("tcl",requireTcl()),hljs.registerLanguage("thrift",requireThrift()),hljs.registerLanguage("tp",requireTp()),hljs.registerLanguage("twig",requireTwig()),hljs.registerLanguage("typescript",requireTypescript()),hljs.registerLanguage("vala",requireVala()),hljs.registerLanguage("vbnet",requireVbnet()),hljs.registerLanguage("vbscript",requireVbscript()),hljs.registerLanguage("vbscript-html",requireVbscriptHtml()),hljs.
registerLanguage("verilog",requireVerilog()),hljs.registerLanguage("vhdl",requireVhdl()),hljs.registerLanguage("vim",requireVim()),hljs.registerLanguage("wasm",requireWasm()),hljs.registerLanguage("wren",requireWren()),hljs.registerLanguage("x86asm",requireX86asm()),hljs.registerLanguage("xl",requireXl()),hljs.registerLanguage("xquery",requireXquery()),hljs.registerLanguage("zephir",requireZephir()),hljs.HighlightJS=hljs,hljs.default=hljs,lib=hljs,lib}var libExports=requireLib();const HighlightJS$1=getDefaultExportFromCjs(
libExports);function highlightCode(code2,language2){if(!code2)return"";try{const lang=language2.toLowerCase();return HighlightJS$1.getLanguage(lang)?HighlightJS$1.highlight(code2,{language:lang}).value:HighlightJS$1.highlightAuto(code2).value}catch{return code2.replace(AMPERSAND_REGEX,"&amp;").replace(LT_REGEX,"&lt;").replace(GT_REGEX,"&gt;")}}function detectIncompleteCodeBlock(markdown2){const fencePattern=new RegExp(FENCE_PATTERN.source,FENCE_PATTERN.flags),fences=[];let fenceMatch;for(;(fenceMatch=
fencePattern.exec(markdown2))!==null;){const pos=fenceMatch[0].startsWith(NEWLINE)?fenceMatch.index+1:fenceMatch.index;fences.push(pos)}if(fences.length%2===0)return null;const openingIndex=fences[fences.length-1],langMatch=markdown2.slice(openingIndex+3).match(LANG_PATTERN),language2=langMatch?.[1]||DEFAULT_LANGUAGE,codeStartIndex=openingIndex+3+(langMatch?.[0]?.length??0),code2=markdown2.slice(codeStartIndex);return{language:language2,code:code2,openingIndex}}function setConfigValue(config2,key2,value){
key2 in config2&&(config2[key2]=value)}function getConfigValue(config2,key2){return config2[key2]}function configToParameterRecord(config2,keys2){const record2={};for(const key2 of keys2){const value=getConfigValue(config2,key2);value!==void 0&&(record2[key2]=value)}return record2}function buildProxiedUrl(targetUrl){const proxyPath=`${base}${CORS_PROXY_ENDPOINT}`,proxyUrl=new URL(proxyPath,window.location.origin);return proxyUrl.searchParams.set(CORS_PROXY_URL_PARAM,targetUrl),proxyUrl}function buildProxiedHeaders(headers){
const proxiedHeaders={};for(const[key2,value]of Object.entries(headers))proxiedHeaders[`x-proxy-header-${key2}`]=value;return proxiedHeaders}function isIpAddress(hostname){return!!(hostname.includes(":")||/^\d{1,3}(\.\d{1,3}){3}$/.test(hostname))}function extractRootDomain(url2){const hostname=url2.hostname.toLowerCase();if(!hostname||isIpAddress(hostname))return null;const parts=hostname.split(".");if(parts.length<2)return null;if(parts.length>=3){const suffix2=`${parts[parts.length-2]}.${parts[parts.
length-1]}`;if(TWO_PART_PUBLIC_SUFFIXES.has(suffix2))return parts.slice(-3).join(".")}for(let i=2;i<=parts.length;i++){const candidate=parts.slice(-i).join(".");if(WILDCARD_PUBLIC_SUFFIXES.has(candidate))return parts.length===i+1?hostname:parts.slice(-(i+2)).join(".")}return parts.slice(-2).join(".")}function sanitizeExternalUrl(raw2){try{const url2=new URL(raw2);return url2.protocol!==UrlProtocol.HTTP&&url2.protocol!==UrlProtocol.HTTPS?null:url2.href}catch{return null}}function createMessageCountMap(exportedData){
const countMap=new Map;for(const item of exportedData)countMap.set(item.conv.id,item.messages.length);return countMap}const bars=Array(12).fill(0);var root_1$16=from_html('<div class="sonner-loading-bar"></div>'),root$1T=from_html('<div><div class="sonner-spinner"></div></div>');function Loader($$anchor,$$props){push$1($$props,!0);var div=root$1T(),div_1=child(div);each(div_1,23,()=>bars,(_,i)=>`spinner-bar-${i}`,($$anchor2,_)=>{var div_2=root_1$16();append($$anchor2,div_2)}),reset(div_1),reset(
div),template_effect($0=>{set_class(div,1,$0),set_attribute(div,"data-visible",$$props.visible)},[()=>clsx(["sonner-loading-wrapper",$$props.class].filter(Boolean).join(" "))]),append($$anchor,div),pop()}function cn(...classes){return classes.filter(Boolean).join(" ")}const isBrowser=typeof document<"u",defaultWindow=typeof window<"u"?window:void 0;function getActiveElement(document2){let activeElement=document2.activeElement;for(;activeElement?.shadowRoot;){const node2=activeElement.shadowRoot.
activeElement;if(node2===activeElement)break;activeElement=node2}return activeElement}class ActiveElement4{#document;#subscribe;constructor(options={}){const{window:window2=defaultWindow,document:document2=window2?.document}=options;window2!==void 0&&(this.#document=document2,this.#subscribe=createSubscriber(update2=>{const cleanupFocusIn=on(window2,"focusin",update2),cleanupFocusOut=on(window2,"focusout",update2);return()=>{cleanupFocusIn(),cleanupFocusOut()}}))}get current(){return this.#subscribe?.(),
this.#document?getActiveElement(this.#document):null}}new ActiveElement4;class Context2{#name;#key;constructor(name){this.#name=name,this.#key=Symbol(name)}get key(){return this.#key}exists(){return hasContext(this.#key)}get(){const context=getContext(this.#key);if(context===void 0)throw new Error(`Context "${this.#name}" not found`);return context}getOr(fallback2){const context=getContext(this.#key);return context===void 0?fallback2:context}set(context){return setContext(this.#key,context)}}const sonnerContext=new Context2(
"<Toaster/>");let toastsCounter=0;class ToastState{#toasts=state$1(proxy([]));get toasts(){return get$3(this.#toasts)}set toasts(value){set$1(this.#toasts,value,!0)}#heights=state$1(proxy([]));get heights(){return get$3(this.#heights)}set heights(value){set$1(this.#heights,value,!0)}#findToastIdx=id2=>{const idx=this.toasts.findIndex(toast2=>toast2.id===id2);return idx===-1?null:idx};addToast=data=>{isBrowser&&this.toasts.unshift(data)};updateToast=({id:id2,data,type:type2,message})=>{const toastIdx=this.
toasts.findIndex(toast2=>toast2.id===id2),toastToUpdate=this.toasts[toastIdx];this.toasts[toastIdx]={...toastToUpdate,...data,id:id2,title:message,type:type2,updated:!0}};create=data=>{const{message,...rest}=data,id2=typeof data?.id=="number"||data.id&&data.id?.length>0?data.id:toastsCounter++,dismissable=data.dismissable===void 0?!0:data.dismissable,type2=data.type===void 0?"default":data.type;return untrack$1(()=>{this.toasts.find(toast2=>toast2.id===id2)?this.updateToast({id:id2,data,type:type2,
message,dismissable}):this.addToast({...rest,id:id2,title:message,dismissable,type:type2})}),id2};dismiss=id2=>(untrack$1(()=>{if(id2===void 0){this.toasts=this.toasts.map(toast2=>({...toast2,dismiss:!0}));return}const toastIdx=this.toasts.findIndex(toast2=>toast2.id===id2);this.toasts[toastIdx]&&(this.toasts[toastIdx]={...this.toasts[toastIdx],dismiss:!0})}),id2);remove=id2=>{if(id2===void 0){this.toasts=[];return}const toastIdx=this.#findToastIdx(id2);if(toastIdx!==null)return this.toasts.splice(
toastIdx,1),id2};message=(message,data)=>this.create({...data,type:"default",message});error=(message,data)=>this.create({...data,type:"error",message});success=(message,data)=>this.create({...data,type:"success",message});info=(message,data)=>this.create({...data,type:"info",message});warning=(message,data)=>this.create({...data,type:"warning",message});loading=(message,data)=>this.create({...data,type:"loading",message});promise=(promise,data)=>{if(!data)return;let id2;data.loading!==void 0&&(id2=
this.create({...data,promise,type:"loading",message:typeof data.loading=="string"?data.loading:data.loading()}));const p2=promise instanceof Promise?promise:promise();let shouldDismiss=id2!==void 0;return p2.then(response=>{if(typeof response=="object"&&response&&"ok"in response&&typeof response.ok=="boolean"&&!response.ok){shouldDismiss=!1;const message=constructPromiseErrorMessage(response);this.create({id:id2,type:"error",message})}else if(data.success!==void 0){shouldDismiss=!1;const message=typeof data.
success=="function"?data.success(response):data.success;this.create({id:id2,type:"success",message})}}).catch(error2=>{if(data.error!==void 0){shouldDismiss=!1;const message=typeof data.error=="function"?data.error(error2):data.error;this.create({id:id2,type:"error",message})}}).finally(()=>{shouldDismiss&&(this.dismiss(id2),id2=void 0),data.finally?.()}),id2};custom=(component2,data)=>{const id2=data?.id||toastsCounter++;return this.create({component:component2,id:id2,...data}),id2};removeHeight=id2=>{
this.heights=this.heights.filter(height=>height.toastId!==id2)};setHeight=data=>{const toastIdx=this.#findToastIdx(data.toastId);if(toastIdx===null){this.heights.push(data);return}this.heights[toastIdx]=data};reset=()=>{this.toasts=[],this.heights=[]}}function constructPromiseErrorMessage(response){return response&&typeof response=="object"&&"status"in response?`HTTP error! Status: ${response.status}`:`Error! ${response}`}const toastState=new ToastState;function toastFunction(message,data){return toastState.
create({message,...data})}class SonnerState{#activeToasts=user_derived(()=>toastState.toasts.filter(toast2=>!toast2.dismiss));get toasts(){return get$3(this.#activeToasts)}}const basicToast=toastFunction,toast=Object.assign(basicToast,{success:toastState.success,info:toastState.info,warning:toastState.warning,error:toastState.error,custom:toastState.custom,message:toastState.message,promise:toastState.promise,dismiss:toastState.dismiss,loading:toastState.loading,getActiveToasts:()=>toastState.toasts.
filter(toast2=>!toast2.dismiss)});function isAction(action2){return action2.label!==void 0}function useDocumentHidden(){let current2=state$1(proxy(typeof document<"u"?document.hidden:!1));return user_effect(()=>on(document,"visibilitychange",()=>{set$1(current2,document.hidden,!0)})),{get current(){return get$3(current2)}}}const TOAST_LIFETIME$1=4e3,GAP$1=14,SWIPE_THRESHOLD=45,TIME_BEFORE_UNMOUNT=200,SCALE_MULTIPLIER=.05,DEFAULT_TOAST_CLASSES={toast:"",title:"",description:"",loader:"",closeButton:"",
cancelButton:"",actionButton:"",action:"",warning:"",error:"",success:"",default:"",info:"",loading:""};function getDefaultSwipeDirections(position2){const[y,x]=position2.split("-"),directions=[];return y&&directions.push(y),x&&directions.push(x),directions}function getDampening(delta){return 1/(1.5+Math.abs(delta)/20)}var root_2$1e=from_html("<div><!></div>"),root_4$G=from_html('<button data-close-button=""><!></button>'),root_7$v=from_html('<div data-icon=""><!> <!></div>'),root_20$6=from_html(
'<div data-description=""><!></div>'),root_25$3=from_html('<button data-button="" data-cancel=""> </button>'),root_28$1=from_html('<button data-button=""> </button>'),root_6$w=from_html('<!> <div data-content=""><div data-title=""><!></div> <!></div> <!> <!>',1),root$1S=from_html('<li data-sonner-toast=""><!> <!></li>');function Toast($$anchor,$$props){push$1($$props,!0);const LoadingIcon=$$anchor2=>{var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor3=>{var div=root_2$1e(),
node_1=child(div);snippet(node_1,()=>$$props.loadingIcon),reset(div),template_effect($0=>{set_class(div,1,$0),set_attribute(div,"data-visible",get$3(toastType)==="loading")},[()=>clsx(cn(get$3(classes)?.loader,$$props.toast?.classes?.loader,"sonner-loader"))]),append($$anchor3,div)},alternate=$$anchor3=>{{let $0=user_derived(()=>cn(get$3(classes)?.loader,$$props.toast.classes?.loader)),$1=user_derived(()=>get$3(toastType)==="loading");Loader($$anchor3,{get class(){return get$3($0)},get visible(){
return get$3($1)}})}};if_block(node2,$$render=>{$$props.loadingIcon?$$render(consequent):$$render(alternate,-1)})}append($$anchor2,fragment)};let cancelButtonStyle=prop($$props,"cancelButtonStyle",3,""),actionButtonStyle=prop($$props,"actionButtonStyle",3,""),descriptionClass=prop($$props,"descriptionClass",3,""),unstyled=prop($$props,"unstyled",3,!1),defaultRichColors=prop($$props,"defaultRichColors",3,!1);const defaultClasses={...DEFAULT_TOAST_CLASSES};let mounted=state$1(!1),removed=state$1(!1),
swiping=state$1(!1),swipeOut=state$1(!1),isSwiped=state$1(!1),offsetBeforeRemove=state$1(0),initialHeight=state$1(0),remainingTime=$$props.toast.duration||$$props.duration||TOAST_LIFETIME$1,toastRef=state$1(void 0),swipeDirection=state$1(null),swipeOutDirection=state$1(null);const isFront=user_derived(()=>$$props.index===0),isVisible=user_derived(()=>$$props.index+1<=$$props.visibleToasts),toastType=user_derived(()=>$$props.toast.type),dismissable=user_derived(()=>$$props.toast.dismissable!==!1),
toastClass=user_derived(()=>$$props.toast.class||""),toastDescriptionClass=user_derived(()=>$$props.toast.descriptionClass||""),heightIndex=user_derived(()=>toastState.heights.findIndex(height=>height.toastId===$$props.toast.id)||0),closeButton=user_derived(()=>$$props.toast.closeButton??$$props.closeButton),duration2=user_derived(()=>$$props.toast.duration??$$props.duration??TOAST_LIFETIME$1);let pointerStart=null;const coords=user_derived(()=>$$props.position.split("-")),toastsHeightBefore=user_derived(
()=>toastState.heights.reduce((prev2,curr,reducerIndex)=>reducerIndex>=get$3(heightIndex)?prev2:prev2+curr.height,0)),isDocumentHidden=useDocumentHidden(),invert=user_derived(()=>$$props.toast.invert||$$props.invert),disabled=user_derived(()=>get$3(toastType)==="loading"),classes=user_derived(()=>({...defaultClasses,...$$props.classes})),toastTitle=user_derived(()=>$$props.toast.title),toastDescription=user_derived(()=>$$props.toast.description);let closeTimerStartTime=state$1(0),lastCloseTimerStartTime=state$1(
0);const offset2=user_derived(()=>Math.round(get$3(heightIndex)*GAP$1+get$3(toastsHeightBefore)));user_effect(()=>{get$3(toastTitle),get$3(toastDescription);let scale2;$$props.expanded||$$props.expandByDefault?scale2=1:scale2=1-$$props.index*SCALE_MULTIPLIER;const toastEl=untrack$1(()=>get$3(toastRef));if(toastEl===void 0)return;toastEl.style.setProperty("height","auto");const offsetHeight=toastEl.offsetHeight,rectHeight=toastEl.getBoundingClientRect().height,scaledRectHeight=Math.round(rectHeight/
scale2+Number.EPSILON&100)/100;toastEl.style.removeProperty("height");let finalHeight;Math.abs(scaledRectHeight-offsetHeight)<1?finalHeight=scaledRectHeight:finalHeight=offsetHeight,set$1(initialHeight,finalHeight,!0),untrack$1(()=>{toastState.setHeight({toastId:$$props.toast.id,height:finalHeight})})});function deleteToast(){set$1(removed,!0),set$1(offsetBeforeRemove,get$3(offset2),!0),toastState.removeHeight($$props.toast.id),setTimeout(()=>{toastState.remove($$props.toast.id)},TIME_BEFORE_UNMOUNT)}
let timeoutId;const isPromiseLoadingOrInfiniteDuration=user_derived(()=>$$props.toast.promise&&get$3(toastType)==="loading"||$$props.toast.duration===Number.POSITIVE_INFINITY);function startTimer(){set$1(closeTimerStartTime,new Date().getTime(),!0),timeoutId=setTimeout(()=>{$$props.toast.onAutoClose?.($$props.toast),deleteToast()},remainingTime)}function pauseTimer(){if(get$3(lastCloseTimerStartTime)<get$3(closeTimerStartTime)){const elapsedTime=new Date().getTime()-get$3(closeTimerStartTime);remainingTime=
remainingTime-elapsedTime}set$1(lastCloseTimerStartTime,new Date().getTime(),!0)}user_effect(()=>{$$props.toast.updated&&(clearTimeout(timeoutId),remainingTime=get$3(duration2),startTimer())}),user_effect(()=>(get$3(isPromiseLoadingOrInfiniteDuration)||($$props.expanded||$$props.interacting||isDocumentHidden.current?pauseTimer():startTimer()),()=>clearTimeout(timeoutId))),onMount$1(()=>{set$1(mounted,!0);const height=get$3(toastRef)?.getBoundingClientRect().height;return set$1(initialHeight,height,
!0),toastState.setHeight({toastId:$$props.toast.id,height}),()=>{toastState.removeHeight($$props.toast.id)}}),user_effect(()=>{$$props.toast.delete&&untrack$1(()=>{deleteToast(),$$props.toast.onDismiss?.($$props.toast)})});const handlePointerDown=event2=>{if(get$3(disabled))return;set$1(offsetBeforeRemove,get$3(offset2),!0);const target2=event2.target;target2.setPointerCapture(event2.pointerId),target2.tagName!=="BUTTON"&&(set$1(swiping,!0),pointerStart={x:event2.clientX,y:event2.clientY})},handlePointerUp=()=>{
if(get$3(swipeOut)||!get$3(dismissable))return;pointerStart=null;const swipeAmountX=Number(get$3(toastRef)?.style.getPropertyValue("--swipe-amount-x").replace("px","")||0),swipeAmountY=Number(get$3(toastRef)?.style.getPropertyValue("--swipe-amount-y").replace("px","")||0),timeTaken=new Date().getTime()-0,swipeAmount=get$3(swipeDirection)==="x"?swipeAmountX:swipeAmountY,velocity=Math.abs(swipeAmount)/timeTaken;if(Math.abs(swipeAmount)>=SWIPE_THRESHOLD||velocity>.11){set$1(offsetBeforeRemove,get$3(
offset2),!0),$$props.toast.onDismiss?.($$props.toast),get$3(swipeDirection)==="x"?set$1(swipeOutDirection,swipeAmountX>0?"right":"left",!0):set$1(swipeOutDirection,swipeAmountY>0?"down":"up",!0),deleteToast(),set$1(swipeOut,!0);return}else get$3(toastRef)?.style.setProperty("--swipe-amount-x","0px"),get$3(toastRef)?.style.setProperty("--swipe-amount-y","0px");set$1(isSwiped,!1),set$1(swiping,!1),set$1(swipeDirection,null)},handlePointerMove=event2=>{if(!pointerStart||!get$3(dismissable)||(window.
getSelection()?.toString().length??-1)>0)return;const yDelta=event2.clientY-pointerStart.y,xDelta=event2.clientX-pointerStart.x,swipeDirections=$$props.swipeDirections??getDefaultSwipeDirections($$props.position);!get$3(swipeDirection)&&(Math.abs(xDelta)>1||Math.abs(yDelta)>1)&&set$1(swipeDirection,Math.abs(xDelta)>Math.abs(yDelta)?"x":"y",!0);let swipeAmount={x:0,y:0};if(get$3(swipeDirection)==="y"){if(swipeDirections.includes("top")||swipeDirections.includes("bottom"))if(swipeDirections.includes(
"top")&&yDelta<0||swipeDirections.includes("bottom")&&yDelta>0)swipeAmount.y=yDelta;else{const dampenedDelta=yDelta*getDampening(yDelta);swipeAmount.y=Math.abs(dampenedDelta)<Math.abs(yDelta)?dampenedDelta:yDelta}}else if(get$3(swipeDirection)==="x"&&(swipeDirections.includes("left")||swipeDirections.includes("right")))if(swipeDirections.includes("left")&&xDelta<0||swipeDirections.includes("right")&&xDelta>0)swipeAmount.x=xDelta;else{const dampenedDelta=xDelta*getDampening(xDelta);swipeAmount.x=
Math.abs(dampenedDelta)<Math.abs(xDelta)?dampenedDelta:xDelta}(Math.abs(swipeAmount.x)>0||Math.abs(swipeAmount.y)>0)&&set$1(isSwiped,!0),get$3(toastRef)?.style.setProperty("--swipe-amount-x",`${swipeAmount.x}px`),get$3(toastRef)?.style.setProperty("--swipe-amount-y",`${swipeAmount.y}px`)},handleDragEnd=()=>{set$1(swiping,!1),set$1(swipeDirection,null),pointerStart=null},icon=user_derived(()=>$$props.toast.icon?$$props.toast.icon:get$3(toastType)==="success"?$$props.successIcon:get$3(toastType)===
"error"?$$props.errorIcon:get$3(toastType)==="warning"?$$props.warningIcon:get$3(toastType)==="info"?$$props.infoIcon:get$3(toastType)==="loading"?$$props.loadingIcon:null);var li2=root$1S();set_attribute(li2,"tabindex",0);let styles2;var node_2=child(li2);{var consequent_1=$$anchor2=>{var button=root_4$G(),node_3=child(button);snippet(node_3,()=>$$props.closeIcon??noop$3),reset(button),template_effect($0=>{set_attribute(button,"aria-label",$$props.closeButtonAriaLabel),set_attribute(button,"dat\
a-disabled",get$3(disabled)),set_class(button,1,$0)},[()=>clsx(cn(get$3(classes)?.closeButton,$$props.toast?.classes?.closeButton))]),delegated("click",button,()=>{get$3(disabled)||!get$3(dismissable)||(deleteToast(),$$props.toast.onDismiss?.($$props.toast))}),append($$anchor2,button)};if_block(node_2,$$render=>{get$3(closeButton)&&!$$props.toast.component&&get$3(toastType)!=="loading"&&$$props.closeIcon!==null&&$$render(consequent_1)})}var node_4=sibling(node_2,2);{var consequent_2=$$anchor2=>{
const Component=user_derived(()=>$$props.toast.component);var fragment_2=comment$2(),node_5=first_child(fragment_2);component(node_5,()=>get$3(Component),($$anchor3,Component_1)=>{Component_1($$anchor3,spread_props(()=>$$props.toast.componentProps,{closeToast:deleteToast}))}),append($$anchor2,fragment_2)},alternate_4=$$anchor2=>{var fragment_3=root_6$w(),node_6=first_child(fragment_3);{var consequent_11=$$anchor3=>{var div_1=root_7$v(),node_7=child(div_1);{var consequent_4=$$anchor4=>{var fragment_4=comment$2(),
node_8=first_child(fragment_4);{var consequent_3=$$anchor5=>{var fragment_5=comment$2(),node_9=first_child(fragment_5);component(node_9,()=>$$props.toast.icon,($$anchor6,toast_icon)=>{toast_icon($$anchor6,{})}),append($$anchor5,fragment_5)},alternate_1=$$anchor5=>{LoadingIcon($$anchor5)};if_block(node_8,$$render=>{$$props.toast.icon?$$render(consequent_3):$$render(alternate_1,-1)})}append($$anchor4,fragment_4)};if_block(node_7,$$render=>{($$props.toast.promise||get$3(toastType)==="loading")&&$$render(
consequent_4)})}var node_10=sibling(node_7,2);{var consequent_10=$$anchor4=>{var fragment_7=comment$2(),node_11=first_child(fragment_7);{var consequent_5=$$anchor5=>{var fragment_8=comment$2(),node_12=first_child(fragment_8);component(node_12,()=>$$props.toast.icon,($$anchor6,toast_icon_1)=>{toast_icon_1($$anchor6,{})}),append($$anchor5,fragment_8)},consequent_6=$$anchor5=>{var fragment_9=comment$2(),node_13=first_child(fragment_9);snippet(node_13,()=>$$props.successIcon??noop$3),append($$anchor5,
fragment_9)},consequent_7=$$anchor5=>{var fragment_10=comment$2(),node_14=first_child(fragment_10);snippet(node_14,()=>$$props.errorIcon??noop$3),append($$anchor5,fragment_10)},consequent_8=$$anchor5=>{var fragment_11=comment$2(),node_15=first_child(fragment_11);snippet(node_15,()=>$$props.warningIcon??noop$3),append($$anchor5,fragment_11)},consequent_9=$$anchor5=>{var fragment_12=comment$2(),node_16=first_child(fragment_12);snippet(node_16,()=>$$props.infoIcon??noop$3),append($$anchor5,fragment_12)};
if_block(node_11,$$render=>{$$props.toast.icon?$$render(consequent_5):get$3(toastType)==="success"?$$render(consequent_6,1):get$3(toastType)==="error"?$$render(consequent_7,2):get$3(toastType)==="warning"?$$render(consequent_8,3):get$3(toastType)==="info"&&$$render(consequent_9,4)})}append($$anchor4,fragment_7)};if_block(node_10,$$render=>{$$props.toast.type!=="loading"&&$$render(consequent_10)})}reset(div_1),template_effect($0=>set_class(div_1,1,$0),[()=>clsx(cn(get$3(classes)?.icon,$$props.toast?.
classes?.icon))]),append($$anchor3,div_1)};if_block(node_6,$$render=>{(get$3(toastType)||$$props.toast.icon||$$props.toast.promise)&&$$props.toast.icon!==null&&(get$3(icon)!==null||$$props.toast.icon)&&$$render(consequent_11)})}var div_2=sibling(node_6,2),div_3=child(div_2),node_17=child(div_3);{var consequent_13=$$anchor3=>{var fragment_13=comment$2(),node_18=first_child(fragment_13);{var consequent_12=$$anchor4=>{const Title=user_derived(()=>$$props.toast.title);var fragment_14=comment$2(),node_19=first_child(
fragment_14);component(node_19,()=>get$3(Title),($$anchor5,Title_1)=>{Title_1($$anchor5,spread_props(()=>$$props.toast.componentProps))}),append($$anchor4,fragment_14)},alternate_2=$$anchor4=>{var text2=text$8();template_effect(()=>set_text(text2,$$props.toast.title)),append($$anchor4,text2)};if_block(node_18,$$render=>{typeof $$props.toast.title!="string"?$$render(consequent_12):$$render(alternate_2,-1)})}append($$anchor3,fragment_13)};if_block(node_17,$$render=>{$$props.toast.title&&$$render(consequent_13)})}
reset(div_3);var node_20=sibling(div_3,2);{var consequent_15=$$anchor3=>{var div_4=root_20$6(),node_21=child(div_4);{var consequent_14=$$anchor4=>{const Description=user_derived(()=>$$props.toast.description);var fragment_16=comment$2(),node_22=first_child(fragment_16);component(node_22,()=>get$3(Description),($$anchor5,Description_1)=>{Description_1($$anchor5,spread_props(()=>$$props.toast.componentProps))}),append($$anchor4,fragment_16)},alternate_3=$$anchor4=>{var text_1=text$8();template_effect(
()=>set_text(text_1,$$props.toast.description)),append($$anchor4,text_1)};if_block(node_21,$$render=>{typeof $$props.toast.description!="string"?$$render(consequent_14):$$render(alternate_3,-1)})}reset(div_4),template_effect($0=>set_class(div_4,1,$0),[()=>clsx(cn(descriptionClass(),get$3(toastDescriptionClass),get$3(classes)?.description,$$props.toast.classes?.description))]),append($$anchor3,div_4)};if_block(node_20,$$render=>{$$props.toast.description&&$$render(consequent_15)})}reset(div_2);var node_23=sibling(
div_2,2);{var consequent_18=$$anchor3=>{var fragment_18=comment$2(),node_24=first_child(fragment_18);{var consequent_16=$$anchor4=>{var fragment_19=comment$2(),node_25=first_child(fragment_19);component(node_25,()=>$$props.toast.cancel,($$anchor5,toast_cancel)=>{toast_cancel($$anchor5,{})}),append($$anchor4,fragment_19)},consequent_17=$$anchor4=>{var button_1=root_25$3(),text_2=child(button_1,!0);reset(button_1),template_effect($0=>{set_style(button_1,$$props.toast.cancelButtonStyle??cancelButtonStyle()),
set_class(button_1,1,$0),set_text(text_2,$$props.toast.cancel.label)},[()=>clsx(cn(get$3(classes)?.cancelButton,$$props.toast?.classes?.cancelButton))]),delegated("click",button_1,event2=>{isAction($$props.toast.cancel)&&get$3(dismissable)&&($$props.toast.cancel?.onClick?.(event2),deleteToast())}),append($$anchor4,button_1)},d2=user_derived(()=>isAction($$props.toast.cancel));if_block(node_24,$$render=>{typeof $$props.toast.cancel=="function"?$$render(consequent_16):get$3(d2)&&$$render(consequent_17,
1)})}append($$anchor3,fragment_18)};if_block(node_23,$$render=>{$$props.toast.cancel&&$$render(consequent_18)})}var node_26=sibling(node_23,2);{var consequent_21=$$anchor3=>{var fragment_20=comment$2(),node_27=first_child(fragment_20);{var consequent_19=$$anchor4=>{var fragment_21=comment$2(),node_28=first_child(fragment_21);component(node_28,()=>$$props.toast.action,($$anchor5,toast_action)=>{toast_action($$anchor5,{})}),append($$anchor4,fragment_21)},consequent_20=$$anchor4=>{var button_2=root_28$1(),
text_3=child(button_2,!0);reset(button_2),template_effect($0=>{set_style(button_2,$$props.toast.actionButtonStyle??actionButtonStyle()),set_class(button_2,1,$0),set_text(text_3,$$props.toast.action.label)},[()=>clsx(cn(get$3(classes)?.actionButton,$$props.toast?.classes?.actionButton))]),delegated("click",button_2,event2=>{isAction($$props.toast.action)&&($$props.toast.action?.onClick(event2),!event2.defaultPrevented&&deleteToast())}),append($$anchor4,button_2)},d_12=user_derived(()=>isAction($$props.
toast.action));if_block(node_27,$$render=>{typeof $$props.toast.action=="function"?$$render(consequent_19):get$3(d_12)&&$$render(consequent_20,1)})}append($$anchor3,fragment_20)};if_block(node_26,$$render=>{$$props.toast.action&&$$render(consequent_21)})}template_effect($0=>set_class(div_3,1,$0),[()=>clsx(cn(get$3(classes)?.title,$$props.toast?.classes?.title))]),append($$anchor2,fragment_3)};if_block(node_4,$$render=>{$$props.toast.component?$$render(consequent_2):$$render(alternate_4,-1)})}reset(
li2),bind_this(li2,$$value=>set$1(toastRef,$$value),()=>get$3(toastRef)),template_effect(($0,$1,$2)=>{set_class(li2,1,$0),set_attribute(li2,"data-rich-colors",$$props.toast.richColors??defaultRichColors()),set_attribute(li2,"data-styled",!($$props.toast.component||$$props.toast.unstyled||unstyled())),set_attribute(li2,"data-mounted",get$3(mounted)),set_attribute(li2,"data-promise",$1),set_attribute(li2,"data-swiped",get$3(isSwiped)),set_attribute(li2,"data-removed",get$3(removed)),set_attribute(
li2,"data-visible",get$3(isVisible)),set_attribute(li2,"data-y-position",get$3(coords)[0]),set_attribute(li2,"data-x-position",get$3(coords)[1]),set_attribute(li2,"data-index",$$props.index),set_attribute(li2,"data-front",get$3(isFront)),set_attribute(li2,"data-swiping",get$3(swiping)),set_attribute(li2,"data-dismissable",get$3(dismissable)),set_attribute(li2,"data-type",get$3(toastType)),set_attribute(li2,"data-invert",get$3(invert)),set_attribute(li2,"data-swipe-out",get$3(swipeOut)),set_attribute(
li2,"data-swipe-direction",get$3(swipeOutDirection)),set_attribute(li2,"data-expanded",$2),styles2=set_style(li2,`${$$props.style} ${$$props.toast.style}`,styles2,{"--index":$$props.index,"--toasts-before":$$props.index,"--z-index":toastState.toasts.length-$$props.index,"--offset":`${get$3(removed)?get$3(offsetBeforeRemove):get$3(offset2)}px`,"--initial-height":$$props.expandByDefault?"auto":`${get$3(initialHeight)}px`})},[()=>clsx(cn($$props.class,get$3(toastClass),get$3(classes)?.toast,$$props.
toast?.classes?.toast,get$3(classes)?.[get$3(toastType)],$$props.toast?.classes?.[get$3(toastType)])),()=>!!$$props.toast.promise,()=>!!($$props.expanded||$$props.expandByDefault&&get$3(mounted))]),delegated("pointermove",li2,handlePointerMove),delegated("pointerup",li2,handlePointerUp),delegated("pointerdown",li2,handlePointerDown),event("dragend",li2,handleDragEnd),append($$anchor,li2),pop()}delegate(["pointermove","pointerup","pointerdown","click"]);var root$1R=from_svg('<svg xmlns="http://ww\
w.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20" data-sonner-success-icon=""><path fill-rule="evenodd" d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z" clip-rule="evenodd"></path></svg>');function SuccessIcon($$anchor){var svg2=root$1R();append($$anchor,svg2)}var root$1Q=from_svg('<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor"\
 height="20" width="20" data-sonner-error-icon=""><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z" clip-rule="evenodd"></path></svg>');function ErrorIcon($$anchor){var svg2=root$1Q();append($$anchor,svg2)}var root$1P=from_svg('<svg viewBox="0 0 64 64" fill="currentColor" height="20" width="20" data-sonner-warning-icon="" xmlns="http://www.w3.org/2000/svg"><path d="M32.427,7.987c2.183,\
0.124 4,1.165 5.096,3.281l17.936,36.208c1.739,3.66 -0.954,8.585 -5.373,8.656l-36.119,0c-4.022,-0.064 -7.322,-4.631 -5.352,-8.696l18.271,-36.207c0.342,-0.65 0.498,-0.838 0.793,-1.179c1.186,-1.375 2.483,-2.111 4.748,-2.063Zm-0.295,3.997c-0.687,0.034 -1.316,0.419 -1.659,1.017c-6.312,11.979 -12.397,24.081 -18.301,36.267c-0.546,1.225 0.391,2.797 1.762,2.863c12.06,0.195 24.125,0.195 36.185,0c1.325,-0.064 2.321,-1.584 1.769,-2.85c-5.793,-12.184 -11.765,-24.286 -17.966,-36.267c-0.366,-0.651 -0.903,-1.04\
2 -1.79,-1.03Z"></path><path d="M33.631,40.581l-3.348,0l-0.368,-16.449l4.1,0l-0.384,16.449Zm-3.828,5.03c0,-0.609 0.197,-1.113 0.592,-1.514c0.396,-0.4 0.935,-0.601 1.618,-0.601c0.684,0 1.223,0.201 1.618,0.601c0.395,0.401 0.593,0.905 0.593,1.514c0,0.587 -0.193,1.078 -0.577,1.473c-0.385,0.395 -0.929,0.593 -1.634,0.593c-0.705,0 -1.249,-0.198 -1.634,-0.593c-0.384,-0.395 -0.576,-0.886 -0.576,-1.473Z"></path></svg>');function WarningIcon($$anchor){var svg2=root$1P();append($$anchor,svg2)}var root$1O=from_svg(
'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" height="20" width="20" data-sonner-info-icon=""><path fill-rule="evenodd" d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z" clip-rule="evenodd"></path></svg>');function InfoIcon($$anchor){var svg2=root$1O();append($$anchor,svg2)}var root$1N=from_svg(
'<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" data-sonner-close-icon=""><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>');function CloseIcon($$anchor){var svg2=root$1N();append($$anchor,svg2)}const VISIBLE_TOASTS_AMOUNT=3,VIEWPORT_OFFSET="24px",MOBILE_VIEWPORT_OFFSET="16px",TOAST_LIFETIME=4e3,TOAST_WIDTH=356,GAP=14,
DARK="dark",LIGHT="light";function getOffsetObject(defaultOffset,mobileOffset){const styles2={};return[defaultOffset,mobileOffset].forEach((offset2,index2)=>{const isMobile=index2===1,prefix=isMobile?"--mobile-offset":"--offset",defaultValue=isMobile?MOBILE_VIEWPORT_OFFSET:VIEWPORT_OFFSET;function assignAll(offset3){["top","right","bottom","left"].forEach(key2=>{styles2[`${prefix}-${key2}`]=typeof offset3=="number"?`${offset3}px`:offset3})}typeof offset2=="number"||typeof offset2=="string"?assignAll(
offset2):typeof offset2=="object"?["top","right","bottom","left"].forEach(key2=>{const value=offset2[key2];value===void 0?styles2[`${prefix}-${key2}`]=defaultValue:styles2[`${prefix}-${key2}`]=typeof value=="number"?`${value}px`:value}):assignAll(defaultValue)}),styles2}var root_2$1d=from_html("<ol></ol>"),root$1M=from_html('<section aria-live="polite" aria-relevant="additions text" aria-atomic="false" class="svelte-nbs0zk"><!></section>');function Toaster($$anchor,$$props){push$1($$props,!0);function getInitialTheme(t){
return t!=="system"?t:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?DARK:LIGHT}let invert=prop($$props,"invert",3,!1),position2=prop($$props,"position",3,"bottom-right"),hotkey=prop($$props,"hotkey",19,()=>["altKey","KeyT"]),expand=prop($$props,"expand",3,!1),closeButton=prop($$props,"closeButton",3,!1),offset2=prop($$props,"offset",3,VIEWPORT_OFFSET),mobileOffset=prop($$props,"mobileOffset",3,MOBILE_VIEWPORT_OFFSET),theme=prop($$props,"theme",3,
"light"),richColors=prop($$props,"richColors",3,!1),duration2=prop($$props,"duration",3,TOAST_LIFETIME),visibleToasts=prop($$props,"visibleToasts",3,VISIBLE_TOASTS_AMOUNT),toastOptions=prop($$props,"toastOptions",19,()=>({})),dir=prop($$props,"dir",7,"auto"),gap=prop($$props,"gap",3,GAP),containerAriaLabel=prop($$props,"containerAriaLabel",3,"Notifications"),closeButtonAriaLabel=prop($$props,"closeButtonAriaLabel",3,"Close toast"),restProps=rest_props($$props,["$$slots","$$events","$$legacy","in\
vert","position","hotkey","expand","closeButton","offset","mobileOffset","theme","richColors","duration","visibleToasts","toastOptions","dir","gap","loadingIcon","successIcon","errorIcon","warningIcon","closeIcon","infoIcon","containerAriaLabel","class","closeButtonAriaLabel","onblur","onfocus","onmouseenter","onmousemove","onmouseleave","ondragend","onpointerdown","onpointerup"]);function getDocumentDirection(){if(dir()!=="auto")return dir();if(typeof window>"u"||typeof document>"u")return"ltr";
const dirAttribute=document.documentElement.getAttribute("dir");return dirAttribute==="auto"||!dirAttribute?(untrack$1(()=>dir(window.getComputedStyle(document.documentElement).direction??"ltr")),dir()):(untrack$1(()=>dir(dirAttribute)),dirAttribute)}const possiblePositions=user_derived(()=>Array.from(new Set([position2(),...toastState.toasts.filter(toast2=>toast2.position).map(toast2=>toast2.position)].filter(Boolean))));let expanded=state$1(!1),interacting=state$1(!1),actualTheme=state$1(proxy(
getInitialTheme(theme()))),listRef=state$1(void 0),lastFocusedElementRef=state$1(null),isFocusWithin=state$1(!1);const hotkeyLabel=user_derived(()=>hotkey().join("+").replace(/Key/g,"").replace(/Digit/g,""));user_effect(()=>{toastState.toasts.length<=1&&set$1(expanded,!1)}),user_effect(()=>{const toastsToDismiss=toastState.toasts.filter(toast2=>toast2.dismiss&&!toast2.delete);if(toastsToDismiss.length>0){const updatedToasts=toastState.toasts.map(toast2=>toastsToDismiss.find(dismissToast=>dismissToast.
id===toast2.id)?{...toast2,delete:!0}:toast2);toastState.toasts=updatedToasts}}),user_effect(()=>()=>{get$3(listRef)&&get$3(lastFocusedElementRef)&&(get$3(lastFocusedElementRef).focus({preventScroll:!0}),set$1(lastFocusedElementRef,null),set$1(isFocusWithin,!1))}),onMount$1(()=>(toastState.reset(),on(document,"keydown",event2=>{hotkey().every(key2=>event2[key2]||event2.code===key2)&&(set$1(expanded,!0),get$3(listRef)?.focus()),event2.code==="Escape"&&(document.activeElement===get$3(listRef)||get$3(
listRef)?.contains(document.activeElement))&&set$1(expanded,!1)}))),user_effect(()=>{if(theme()!=="system"&&set$1(actualTheme,theme()),typeof window<"u"){theme()==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?set$1(actualTheme,DARK):set$1(actualTheme,LIGHT));const mediaQueryList=window.matchMedia("(prefers-color-scheme: dark)"),changeHandler=({matches:matches2})=>{set$1(actualTheme,matches2?DARK:LIGHT,!0)};"addEventListener"in mediaQueryList?mediaQueryList.
addEventListener("change",changeHandler):mediaQueryList.addListener(changeHandler)}});const handleBlur=event2=>{$$props.onblur?.(event2),get$3(isFocusWithin)&&!event2.currentTarget.contains(event2.relatedTarget)&&(set$1(isFocusWithin,!1),get$3(lastFocusedElementRef)&&(get$3(lastFocusedElementRef).focus({preventScroll:!0}),set$1(lastFocusedElementRef,null)))},handleFocus=event2=>{$$props.onfocus?.(event2),!(event2.target instanceof HTMLElement&&event2.target.dataset.dismissable==="false")&&(get$3(
isFocusWithin)||(set$1(isFocusWithin,!0),set$1(lastFocusedElementRef,event2.relatedTarget,!0)))},handlePointerDown=event2=>{$$props.onpointerdown?.(event2),!(event2.target instanceof HTMLElement&&event2.target.dataset.dismissable==="false")&&set$1(interacting,!0)},handleMouseEnter=event2=>{$$props.onmouseenter?.(event2),set$1(expanded,!0)},handleMouseLeave=event2=>{$$props.onmouseleave?.(event2),get$3(interacting)||set$1(expanded,!1)},handleMouseMove=event2=>{$$props.onmousemove?.(event2),set$1(
expanded,!0)},handleDragEnd=event2=>{$$props.ondragend?.(event2),set$1(expanded,!1)},handlePointerUp=event2=>{$$props.onpointerup?.(event2),set$1(interacting,!1)};sonnerContext.set(new SonnerState);var section=root$1M();set_attribute(section,"tabindex",-1);var node2=child(section);{var consequent_10=$$anchor2=>{var fragment=comment$2(),node_1=first_child(fragment);each(node_1,18,()=>get$3(possiblePositions),position3=>position3,($$anchor3,position3,index2,$$array)=>{const computed_const=user_derived(
()=>{const[y,x]=position3.split("-");return{y,x}}),offsetObject=user_derived(()=>getOffsetObject(offset2(),mobileOffset()));var ol=root_2$1d();attribute_effect(ol,$0=>({tabindex:-1,dir:$0,class:$$props.class,"data-sonner-toaster":!0,"data-sonner-theme":get$3(actualTheme),"data-y-position":get$3(computed_const).y,"data-x-position":get$3(computed_const).x,style:$$props.style,onblur:handleBlur,onfocus:handleFocus,onmouseenter:handleMouseEnter,onmousemove:handleMouseMove,onmouseleave:handleMouseLeave,
ondragend:handleDragEnd,onpointerdown:handlePointerDown,onpointerup:handlePointerUp,...restProps,[STYLE]:{"--front-toast-height":`${toastState.heights[0]?.height}px`,"--width":`${TOAST_WIDTH}px`,"--gap":`${gap()}px`,"--offset-top":get$3(offsetObject)["--offset-top"],"--offset-right":get$3(offsetObject)["--offset-right"],"--offset-bottom":get$3(offsetObject)["--offset-bottom"],"--offset-left":get$3(offsetObject)["--offset-left"],"--mobile-offset-top":get$3(offsetObject)["--mobile-offset-top"],"--\
mobile-offset-right":get$3(offsetObject)["--mobile-offset-right"],"--mobile-offset-bottom":get$3(offsetObject)["--mobile-offset-bottom"],"--mobile-offset-left":get$3(offsetObject)["--mobile-offset-left"]}}),[()=>getDocumentDirection()],void 0,void 0,"svelte-nbs0zk"),each(ol,23,()=>toastState.toasts.filter(toast2=>!toast2.position&&get$3(index2)===0||toast2.position===position3),toast2=>toast2.id,($$anchor4,toast2,index3,$$array_1)=>{{const successIcon=$$anchor5=>{var fragment_2=comment$2(),node_2=first_child(
fragment_2);{var consequent=$$anchor6=>{var fragment_3=comment$2(),node_3=first_child(fragment_3);snippet(node_3,()=>$$props.successIcon??noop$3),append($$anchor6,fragment_3)},consequent_1=$$anchor6=>{SuccessIcon($$anchor6)};if_block(node_2,$$render=>{$$props.successIcon?$$render(consequent):$$props.successIcon!==null&&$$render(consequent_1,1)})}append($$anchor5,fragment_2)},errorIcon=$$anchor5=>{var fragment_5=comment$2(),node_4=first_child(fragment_5);{var consequent_2=$$anchor6=>{var fragment_6=comment$2(),
node_5=first_child(fragment_6);snippet(node_5,()=>$$props.errorIcon??noop$3),append($$anchor6,fragment_6)},consequent_3=$$anchor6=>{ErrorIcon($$anchor6)};if_block(node_4,$$render=>{$$props.errorIcon?$$render(consequent_2):$$props.errorIcon!==null&&$$render(consequent_3,1)})}append($$anchor5,fragment_5)},warningIcon=$$anchor5=>{var fragment_8=comment$2(),node_6=first_child(fragment_8);{var consequent_4=$$anchor6=>{var fragment_9=comment$2(),node_7=first_child(fragment_9);snippet(node_7,()=>$$props.
warningIcon??noop$3),append($$anchor6,fragment_9)},consequent_5=$$anchor6=>{WarningIcon($$anchor6)};if_block(node_6,$$render=>{$$props.warningIcon?$$render(consequent_4):$$props.warningIcon!==null&&$$render(consequent_5,1)})}append($$anchor5,fragment_8)},infoIcon=$$anchor5=>{var fragment_11=comment$2(),node_8=first_child(fragment_11);{var consequent_6=$$anchor6=>{var fragment_12=comment$2(),node_9=first_child(fragment_12);snippet(node_9,()=>$$props.infoIcon??noop$3),append($$anchor6,fragment_12)},
consequent_7=$$anchor6=>{InfoIcon($$anchor6)};if_block(node_8,$$render=>{$$props.infoIcon?$$render(consequent_6):$$props.infoIcon!==null&&$$render(consequent_7,1)})}append($$anchor5,fragment_11)},closeIcon=$$anchor5=>{var fragment_14=comment$2(),node_10=first_child(fragment_14);{var consequent_8=$$anchor6=>{var fragment_15=comment$2(),node_11=first_child(fragment_15);snippet(node_11,()=>$$props.closeIcon??noop$3),append($$anchor6,fragment_15)},consequent_9=$$anchor6=>{CloseIcon($$anchor6)};if_block(
node_10,$$render=>{$$props.closeIcon?$$render(consequent_8):$$props.closeIcon!==null&&$$render(consequent_9,1)})}append($$anchor5,fragment_14)};let $0=user_derived(()=>toastOptions()?.duration??duration2()),$1=user_derived(()=>toastOptions()?.class??""),$2=user_derived(()=>toastOptions()?.descriptionClass||""),$3=user_derived(()=>toastOptions()?.style??""),$4=user_derived(()=>toastOptions().classes||{}),$5=user_derived(()=>toastOptions().unstyled??!1),$6=user_derived(()=>toastOptions()?.cancelButtonStyle??
""),$7=user_derived(()=>toastOptions()?.actionButtonStyle??""),$8=user_derived(()=>toastOptions()?.closeButtonAriaLabel??closeButtonAriaLabel());Toast($$anchor4,{get index(){return get$3(index3)},get toast(){return get$3(toast2)},get defaultRichColors(){return richColors()},get duration(){return get$3($0)},get class(){return get$3($1)},get descriptionClass(){return get$3($2)},get invert(){return invert()},get visibleToasts(){return visibleToasts()},get closeButton(){return closeButton()},get interacting(){
return get$3(interacting)},get position(){return position3},get style(){return get$3($3)},get classes(){return get$3($4)},get unstyled(){return get$3($5)},get cancelButtonStyle(){return get$3($6)},get actionButtonStyle(){return get$3($7)},get closeButtonAriaLabel(){return get$3($8)},get expandByDefault(){return expand()},get expanded(){return get$3(expanded)},get loadingIcon(){return $$props.loadingIcon},successIcon,errorIcon,warningIcon,infoIcon,closeIcon,$$slots:{successIcon:!0,errorIcon:!0,warningIcon:!0,
infoIcon:!0,closeIcon:!0}})}}),reset(ol),bind_this(ol,$$value=>set$1(listRef,$$value),()=>get$3(listRef)),template_effect(()=>ol.dir=ol.dir),append($$anchor3,ol)}),append($$anchor2,fragment)};if_block(node2,$$render=>{toastState.toasts.length>0&&$$render(consequent_10)})}reset(section),template_effect(()=>set_attribute(section,"aria-label",`${containerAriaLabel()??""} ${get$3(hotkeyLabel)??""}`)),append($$anchor,section),pop()}async function copyToClipboard(text2,successMessage="Copied to clipbo\
ard",errorMessage="Failed to copy to clipboard"){try{if(navigator.clipboard&&navigator.clipboard.writeText)return await navigator.clipboard.writeText(text2),toast.success(successMessage),!0;const textArea=document.createElement("textarea");textArea.value=text2,textArea.style.position="fixed",textArea.style.left="-999999px",textArea.style.top="-999999px",document.body.appendChild(textArea),textArea.focus(),textArea.select();const successful=document.execCommand("copy");if(document.body.removeChild(
textArea),successful)return toast.success(successMessage),!0;throw new Error("execCommand failed")}catch(error2){return console.error("Failed to copy to clipboard:",error2),toast.error(errorMessage),!1}}async function copyCodeToClipboard(rawCode,successMessage="Code copied to clipboard",errorMessage="Failed to copy code"){return copyToClipboard(rawCode,successMessage,errorMessage)}function formatMessageForClipboard(content2,extras,asPlainText=!1){const textAttachments=extras?.filter(extra=>extra.
type===AttachmentType.TEXT||extra.type===AttachmentType.LEGACY_CONTEXT||extra.type===AttachmentType.MCP_PROMPT||extra.type===AttachmentType.MCP_RESOURCE)??[];if(textAttachments.length===0)return content2;if(asPlainText){const parts=[content2];for(const att of textAttachments)parts.push(att.content);return parts.join(`

`)}const clipboardAttachments=textAttachments.map(att=>{if(att.type===AttachmentType.MCP_PROMPT){const mcpAtt=att;return{type:AttachmentType.MCP_PROMPT,name:mcpAtt.name,serverName:mcpAtt.serverName,promptName:mcpAtt.promptName,content:mcpAtt.content,arguments:mcpAtt.arguments}}return{type:AttachmentType.TEXT,name:att.name,content:att.content}});return`${JSON.stringify(content2)}
${JSON.stringify(clipboardAttachments,null,2)}`}function parseClipboardContent(clipboardText){const defaultResult={message:clipboardText,textAttachments:[],mcpPromptAttachments:[]};if(!clipboardText.startsWith('"'))return defaultResult;try{let stringEndIndex=-1,escaped=!1;for(let i=1;i<clipboardText.length;i++){const char=clipboardText[i];if(escaped){escaped=!1;continue}if(char==="\\"){escaped=!0;continue}if(char==='"'){stringEndIndex=i;break}}if(stringEndIndex===-1)return defaultResult;const jsonStringPart=clipboardText.
substring(0,stringEndIndex+1),remainingPart=clipboardText.substring(stringEndIndex+1).trim(),message=JSON.parse(jsonStringPart);if(!remainingPart||!remainingPart.startsWith("["))return{message,textAttachments:[],mcpPromptAttachments:[]};const attachments=JSON.parse(remainingPart),validTextAttachments=[],validMcpPromptAttachments=[];for(const att of attachments)isValidMcpPromptAttachment(att)?validMcpPromptAttachments.push({type:AttachmentType.MCP_PROMPT,name:att.name,serverName:att.serverName,promptName:att.
promptName,content:att.content,arguments:att.arguments}):isValidTextAttachment(att)&&validTextAttachments.push({type:AttachmentType.TEXT,name:att.name,content:att.content});return{message,textAttachments:validTextAttachments,mcpPromptAttachments:validMcpPromptAttachments}}catch{return defaultResult}}function isValidMcpPromptAttachment(obj){if(typeof obj!="object"||obj===null)return!1;const record2=obj;return(record2.type===AttachmentType.MCP_PROMPT||record2.type==="MCP_PROMPT")&&typeof record2.name==
"string"&&typeof record2.serverName=="string"&&typeof record2.promptName=="string"&&typeof record2.content=="string"}function isValidTextAttachment(obj){if(typeof obj!="object"||obj===null)return!1;const record2=obj;return(record2.type===AttachmentType.TEXT||record2.type==="TEXT")&&typeof record2.name=="string"&&typeof record2.content=="string"}function getFileTypeLabel(input){if(!input)return"FILE";if(input.includes("/")){const subtype=input.split("/").pop();if(subtype)return subtype.includes("\
.")?subtype.split(".").pop()?.toUpperCase()||"FILE":subtype.toUpperCase()}if(input.includes(".")){const ext=input.split(".").pop();if(ext)return ext.toUpperCase()}return input.toUpperCase()}function getPreviewText(content2,max2=150){return content2.length>max2?content2.slice(0,max2)+"...":content2}function generateConversationTitle(content2,useFirstLine=!1){if(useFirstLine){const firstLine=content2.split(NEWLINE_SEPARATOR).find(line=>line.trim().length>0);return firstLine?firstLine.trim():content2.
trim()}return content2.trim()}function getFileTypeCategory(mimeType){switch(mimeType){case MimeTypeImage.JPEG:case MimeTypeImage.PNG:case MimeTypeImage.GIF:case MimeTypeImage.WEBP:case MimeTypeImage.SVG:return FileTypeCategory.IMAGE;case MimeTypeAudio.MP3_MPEG:case MimeTypeAudio.MP3:case MimeTypeAudio.MP4:case MimeTypeAudio.WAV:case MimeTypeAudio.WEBM:case MimeTypeAudio.WEBM_OPUS:return FileTypeCategory.AUDIO;case MimeTypeApplication.PDF:return FileTypeCategory.PDF;case MimeTypeText.PLAIN:case MimeTypeText.
MARKDOWN:case MimeTypeText.ASCIIDOC:case MimeTypeText.JAVASCRIPT:case MimeTypeText.JAVASCRIPT_APP:case MimeTypeText.TYPESCRIPT:case MimeTypeText.JSX:case MimeTypeText.TSX:case MimeTypeText.CSS:case MimeTypeText.HTML:case MimeTypeText.JSON:case MimeTypeText.XML_TEXT:case MimeTypeText.XML_APP:case MimeTypeText.YAML_TEXT:case MimeTypeText.YAML_APP:case MimeTypeText.CSV:case MimeTypeText.PYTHON:case MimeTypeText.JAVA:case MimeTypeText.CPP_SRC:case MimeTypeText.C_SRC:case MimeTypeText.C_HDR:case MimeTypeText.
PHP:case MimeTypeText.RUBY:case MimeTypeText.GO:case MimeTypeText.RUST:case MimeTypeText.SHELL:case MimeTypeText.BAT:case MimeTypeText.SQL:case MimeTypeText.R:case MimeTypeText.SCALA:case MimeTypeText.KOTLIN:case MimeTypeText.SWIFT:case MimeTypeText.DART:case MimeTypeText.VUE:case MimeTypeText.SVELTE:case MimeTypeText.LATEX:case MimeTypeText.BIBTEX:case MimeTypeText.CUDA:case MimeTypeText.CPP_HDR:case MimeTypeText.CSHARP:case MimeTypeText.HASKELL:case MimeTypeText.PROPERTIES:case MimeTypeText.TEX:case MimeTypeText.
TEX_APP:return FileTypeCategory.TEXT;default:return null}}function getFileTypeCategoryByExtension(filename){switch(filename.toLowerCase().substring(filename.lastIndexOf("."))){case FileExtensionImage.JPG:case FileExtensionImage.JPEG:case FileExtensionImage.PNG:case FileExtensionImage.GIF:case FileExtensionImage.WEBP:case FileExtensionImage.SVG:return FileTypeCategory.IMAGE;case FileExtensionAudio.MP3:case FileExtensionAudio.WAV:return FileTypeCategory.AUDIO;case FileExtensionPdf.PDF:return FileTypeCategory.
PDF;case FileExtensionText.TXT:case FileExtensionText.MD:case FileExtensionText.ADOC:case FileExtensionText.JS:case FileExtensionText.TS:case FileExtensionText.JSX:case FileExtensionText.TSX:case FileExtensionText.CSS:case FileExtensionText.HTML:case FileExtensionText.HTM:case FileExtensionText.JSON:case FileExtensionText.XML:case FileExtensionText.YAML:case FileExtensionText.YML:case FileExtensionText.CSV:case FileExtensionText.LOG:case FileExtensionText.PY:case FileExtensionText.JAVA:case FileExtensionText.
CPP:case FileExtensionText.C:case FileExtensionText.H:case FileExtensionText.PHP:case FileExtensionText.RB:case FileExtensionText.GO:case FileExtensionText.RS:case FileExtensionText.SH:case FileExtensionText.BAT:case FileExtensionText.SQL:case FileExtensionText.R:case FileExtensionText.SCALA:case FileExtensionText.KT:case FileExtensionText.SWIFT:case FileExtensionText.DART:case FileExtensionText.VUE:case FileExtensionText.SVELTE:case FileExtensionText.TEX:case FileExtensionText.BIB:case FileExtensionText.
COMP:case FileExtensionText.CU:case FileExtensionText.CUH:case FileExtensionText.HPP:case FileExtensionText.HS:case FileExtensionText.PROPERTIES:return FileTypeCategory.TEXT;default:return null}}function isFileTypeSupported(filename,mimeType){if(mimeType){const category=getFileTypeCategory(mimeType);if(category===FileTypeCategory.IMAGE||category===FileTypeCategory.AUDIO||category===FileTypeCategory.PDF)return!0}const extCategory=getFileTypeCategoryByExtension(filename);return extCategory===FileTypeCategory.
IMAGE||extCategory===FileTypeCategory.AUDIO||extCategory===FileTypeCategory.PDF,!0}function formatFileSize(bytes){if(typeof bytes!="number")return"Unknown";if(bytes===0)return"0 Bytes";const k=1024,sizes=["Bytes","KB","MB","GB"],i=Math.floor(Math.log(bytes)/Math.log(k));return parseFloat((bytes/Math.pow(k,i)).toFixed(2))+" "+sizes[i]}function formatParameters(params){return typeof params!="number"?"Unknown":params>=1e9?`${(params/1e9).toFixed(2)}B`:params>=1e6?`${(params/1e6).toFixed(2)}M`:params>=
1e3?`${(params/1e3).toFixed(2)}K`:params.toString()}function formatNumber(num){return typeof num!="number"?"Unknown":num.toLocaleString()}function formatJsonPretty(jsonString){try{const parsed=JSON.parse(jsonString);return JSON.stringify(parsed,null,2)}catch{return jsonString}}function formatTime(date2){return date2.toLocaleTimeString("en-US",{hour12:!1,hour:"2-digit",minute:"2-digit",second:"2-digit"})}function formatPerformanceTime(ms){if(ms<0)return"0s";const totalSeconds=ms/MS_PER_SECOND;if(totalSeconds<
SHORT_DURATION_THRESHOLD)return`${totalSeconds.toFixed(1)}s`;if(totalSeconds<MEDIUM_DURATION_THRESHOLD)return`${totalSeconds.toFixed(1)}s`;const hours=Math.floor(totalSeconds/SECONDS_PER_HOUR),minutes=Math.floor(totalSeconds%SECONDS_PER_HOUR/SECONDS_PER_MINUTE),seconds=Math.floor(totalSeconds%SECONDS_PER_MINUTE),parts=[];return hours>0&&parts.push(`${hours}h`),minutes>0&&parts.push(`${minutes}min`),(seconds>0||parts.length===0)&&parts.push(`${seconds}s`),parts.join(" ")}function formatAttachmentText(label,name,content2,extra){
const header=extra?`${name} (${extra})`:name;return`

--- ${label}: ${header} ---
${content2}`}function isIMEComposing(event2){return event2.isComposing||event2.keyCode===229}function maskInlineLaTeX(content2,latexExpressions){return content2.includes("$")?content2.split(`
`).map(line=>{if(line.indexOf("$")==-1)return line;let processedLine="",currentPosition=0;for(;currentPosition<line.length;){const openDollarIndex=line.indexOf("$",currentPosition);if(openDollarIndex==-1){processedLine+=line.slice(currentPosition);break}const closeDollarIndex=line.indexOf("$",openDollarIndex+1);if(closeDollarIndex==-1){processedLine+=line.slice(currentPosition);break}const charBeforeOpen=openDollarIndex>0?line[openDollarIndex-1]:"",charAfterOpen=line[openDollarIndex+1],charBeforeClose=openDollarIndex+
1<closeDollarIndex?line[closeDollarIndex-1]:"",charAfterClose=closeDollarIndex+1<line.length?line[closeDollarIndex+1]:"";let shouldSkipAsNonLatex=!1;if(closeDollarIndex==currentPosition+1&&(shouldSkipAsNonLatex=!0),/[A-Za-z0-9_$-]/.test(charBeforeOpen)&&(shouldSkipAsNonLatex=!0),/[0-9]/.test(charAfterOpen)&&(/[A-Za-z0-9_$-]/.test(charAfterClose)||charBeforeClose==" ")&&(shouldSkipAsNonLatex=!0),shouldSkipAsNonLatex){processedLine+=line.slice(currentPosition,openDollarIndex+1),currentPosition=openDollarIndex+
1;continue}processedLine+=line.slice(currentPosition,openDollarIndex);const latexContent=line.slice(openDollarIndex,closeDollarIndex+1);latexExpressions.push(latexContent),processedLine+=`<<LATEX_${latexExpressions.length-1}>>`,currentPosition=closeDollarIndex+1}return processedLine}).join(`
`):content2}function escapeBrackets(text2){return text2.replace(LATEX_MATH_AND_CODE_PATTERN,(match,codeBlock,squareBracket,roundBracket)=>codeBlock??(squareBracket!=null?`$$${squareBracket}$$`:roundBracket!=null?`$${roundBracket}$`:match))}function preprocessLaTeX(content2){const blockquoteMarkers=new Map;content2=content2.split(`
`).map((line,index2)=>{const match=line.match(/^(>\s*)/);return match?(blockquoteMarkers.set(index2,match[1]),line.slice(match[1].length)):line}).join(`
`);const codeBlocks=[];content2=content2.replace(CODE_BLOCK_REGEXP,match=>(codeBlocks.push(match),`<<CODE_BLOCK_${codeBlocks.length-1}>>`));const latexExpressions=[];return content2=content2.replace(/([\S].*?)\\\[([\s\S]*?)\\\](.*)/g,(match,group1,group2,group3)=>{if(group1.endsWith("\\"))return match;const hasSuffix=/\S/.test(group3);let optBreak;return hasSuffix?(latexExpressions.push(`\\(${group2.trim()}\\)`),optBreak=""):(latexExpressions.push(`\\[${group2}\\]`),optBreak=`
`),`${group1}${optBreak}<<LATEX_${latexExpressions.length-1}>>${optBreak}${group3}`}),content2=content2.replace(new RegExp("(\\$\\$[\\s\\S]*?\\$\\$|(?<!\\\\)\\\\\\[[\\s\\S]*?\\\\\\]|(?<!\\\\)\\\\\\(.*?\\\\\\))","g"),match=>(latexExpressions.push(match),`<<LATEX_${latexExpressions.length-1}>>`)),content2=maskInlineLaTeX(content2,latexExpressions),content2=content2.replace(/\$(?=\d)/g,"\\$"),content2=content2.replace(/<<LATEX_(\d+)>>/g,(_,index2)=>{let expr=latexExpressions[parseInt(index2)];const match=expr.
match(LATEX_LINEBREAK_REGEXP);if(match){const formula=match[1],prefix=formula.startsWith(`
`)?"":`
`,suffix=formula.endsWith(`
`)?"":`
`;expr="$$"+prefix+formula+suffix+"$$"}return expr}),content2=escapeBrackets(content2),content2=content2.replace(new RegExp("(?<!\\\\)\\\\\\((.+?)\\\\\\)","g"),"$$$1$").replace(new RegExp("(?<!\\\\)\\\\\\[([\\s\\S]*?)\\\\\\]","g"),(_,content22)=>`$$${content22}$$`),content2=content2.replace(/<<CODE_BLOCK_(\d+)>>/g,(_,index2)=>codeBlocks[parseInt(index2)]),blockquoteMarkers.size>0&&(content2=content2.split(`
`).map((line,index2)=>{const marker=blockquoteMarkers.get(index2);return marker?marker+line:line}).join(`
`)),content2}function filterFilesByModalities(files,capabilities){const supportedFiles=[],unsupportedFiles=[],modalityReasons={},{hasVision,hasAudio}=capabilities;for(const file of files){const category=getFileTypeCategory(file.type);let isSupported=!0,reason="";switch(category){case FileTypeCategory.IMAGE:hasVision||(isSupported=!1,reason="Images require a vision-capable model");break;case FileTypeCategory.AUDIO:hasAudio||(isSupported=!1,reason="Audio files require an audio-capable model");break;case FileTypeCategory.
TEXT:case FileTypeCategory.PDF:break}isSupported?supportedFiles.push(file):(unsupportedFiles.push(file),modalityReasons[file.name]=reason)}return{supportedFiles,unsupportedFiles,modalityReasons}}function normalizeModelName(modelName){const trimmed=modelName.trim();if(!trimmed)return"";const segments=trimmed.split(/[\\/]/);if(segments.length===2){const[org,model]=segments,trimmedOrg=org?.trim(),trimmedModel=model?.trim();if(trimmedOrg&&trimmedModel)return`${trimmedOrg}/${trimmedModel}`}const normalized=segments.
pop()?.trim();return normalized&&normalized.length>0?normalized:trimmed}function normalizeFloatingPoint(value){return typeof value=="number"?Math.round(value*PRECISION_MULTIPLIER)/PRECISION_MULTIPLIER:value}function getLanguageFromFilename(filename){switch(filename.toLowerCase().substring(filename.lastIndexOf("."))){case".js":case".mjs":case".cjs":return"javascript";case".ts":case".mts":case".cts":return"typescript";case".jsx":return"javascript";case".tsx":return"typescript";case".html":case".ht\
m":return"html";case".css":return"css";case".scss":return"scss";case".less":return"less";case".vue":return"html";case".svelte":return"html";case".json":return"json";case".xml":return"xml";case".yaml":case".yml":return"yaml";case".toml":return"ini";case".csv":return"plaintext";case".py":return"python";case".java":return"java";case".kt":case".kts":return"kotlin";case".scala":return"scala";case".cpp":case".cc":case".cxx":case".c++":return"cpp";case".c":return"c";case".h":case".hpp":return"cpp";case"\
.cs":return"csharp";case".go":return"go";case".rs":return"rust";case".rb":return"ruby";case".php":return"php";case".swift":return"swift";case".dart":return"dart";case".r":return"r";case".lua":return"lua";case".pl":case".pm":return"perl";case".sh":case".bash":case".zsh":return"bash";case".bat":case".cmd":return"dos";case".ps1":return"powershell";case".sql":return"sql";case".md":case".markdown":return"markdown";case".tex":case".latex":return"latex";case".adoc":case".asciidoc":return"asciidoc";case"\
.ini":case".cfg":case".conf":return"ini";case".dockerfile":return"dockerfile";case".nginx":return"nginx";case".graphql":case".gql":return"graphql";case".proto":return"protobuf";case".diff":case".patch":return"diff";case".log":return"plaintext";case".txt":return"plaintext";default:return"plaintext"}}async function readFileAsText(file){return new Promise((resolve2,reject)=>{const reader=new FileReader;reader.onload=event2=>{event2.target?.result!==null&&event2.target?.result!==void 0?resolve2(event2.
target.result):reject(new Error("Failed to read file"))},reader.onerror=()=>reject(new Error("File reading error")),reader.readAsText(file)})}function isLikelyTextFile(content2,options={}){if(!content2)return!0;const config2={...DEFAULT_BINARY_DETECTION_OPTIONS,...options},sample=content2.substring(0,config2.prefixLength);let nullCount=0,suspiciousControlCount=0;for(let i=0;i<sample.length;i++){const charCode=sample.charCodeAt(i);if(charCode===0){nullCount++;continue}charCode<32&&charCode!==9&&charCode!==
10&&charCode!==13&&(charCode<8||charCode>13&&charCode<27)&&suspiciousControlCount++,charCode===65533&&suspiciousControlCount++}return!(nullCount>config2.maxAbsoluteNullBytes||suspiciousControlCount/sample.length>config2.suspiciousCharThresholdRatio)}function debounce(fn,delay){let timeoutId=null;return(...args)=>{timeoutId&&clearTimeout(timeoutId),timeoutId=setTimeout(()=>{fn(...args),timeoutId=null},delay)}}function sanitizeKeyValuePairKey(raw2){return raw2.replace(KEY_VALUE_PAIR_UNSAFE_KEY_RE,
"").slice(0,KEY_VALUE_PAIR_KEY_MAX_LENGTH)}function sanitizeKeyValuePairValue(raw2){return raw2.replace(KEY_VALUE_PAIR_UNSAFE_VALUE_RE,"").slice(0,KEY_VALUE_PAIR_VALUE_MAX_LENGTH)}function getImageErrorFallbackHtml(src){return`<div class="image-error-content">
		<span>Image cannot be displayed</span>
		<a href="${src}" target="_blank" rel="noopener noreferrer">(open link)</a>
	</div>`}function detectMcpTransportFromUrl(url2){const normalized=url2.trim().toLowerCase();return normalized.startsWith(UrlProtocol.WEBSOCKET)||normalized.startsWith(UrlProtocol.WEBSOCKET_SECURE)?MCPTransportType.WEBSOCKET:MCPTransportType.STREAMABLE_HTTP}function parseMcpServerSettings(rawServers){if(!rawServers)return[];let parsed;if(typeof rawServers=="string"){const trimmed=rawServers.trim();if(!trimmed)return[];try{parsed=JSON.parse(trimmed)}catch(error2){return console.warn("[MCP] Failed\
 to parse mcpServers JSON, ignoring value:",error2),[]}}else parsed=rawServers;return Array.isArray(parsed)?parsed.map((entry,index2)=>{const url2=typeof entry?.url=="string"?entry.url.trim():"",headers=typeof entry?.headers=="string"?entry.headers.trim():void 0;return{id:typeof entry?.id=="string"&&entry.id?.trim()?entry.id.trim():`${MCP_SERVER_ID_PREFIX}-${index2+1}`,enabled:!!entry?.enabled,url:url2,name:entry?.name,requestTimeoutSeconds:DEFAULT_MCP_CONFIG.requestTimeoutSeconds,headers:headers||
void 0,useProxy:!!entry?.useProxy}}):[]}function getMcpLogLevelIcon(level){switch(level){case MCPLogLevel.ERROR:return Circle_x;case MCPLogLevel.WARN:return Triangle_alert;default:return Info$1}}function getMcpLogLevelClass(level){switch(level){case MCPLogLevel.ERROR:return"text-destructive";case MCPLogLevel.WARN:return"text-yellow-600 dark:text-yellow-500";default:return"text-muted-foreground"}}function isImageMimeType(mimeType){return mimeType?.startsWith(MimeTypePrefix.IMAGE)??!1}function parseResourcePath(uri2){
try{return uri2.replace(PROTOCOL_PREFIX_REGEX,"").split(PATH_SEPARATOR).filter(p2=>p2.length>0)}catch{return[uri2]}}function getDisplayName(pathPart){return pathPart.replace(FILE_EXTENSION_REGEX,"").split(DISPLAY_NAME_SEPARATOR_REGEX).map(word=>word.charAt(0).toUpperCase()+word.slice(1)).join(" ")}function getResourceDisplayName(resource){try{const parts=parseResourcePath(resource.uri);return parts[parts.length-1]||resource.name||resource.uri}catch{return resource.name||resource.uri}}function isCodeResource(mimeType,uri2){
const mime=mimeType?.toLowerCase()||"",u=uri2?.toLowerCase()||"";return mime.includes(MimeTypeIncludes.JSON)||mime.includes(MimeTypeIncludes.JAVASCRIPT)||mime.includes(MimeTypeIncludes.TYPESCRIPT)||CODE_FILE_EXTENSION_REGEX.test(u)}function isImageResource(mimeType,uri2){const mime=mimeType?.toLowerCase()||"",u=uri2?.toLowerCase()||"";return mime.startsWith(MimeTypePrefix.IMAGE)||IMAGE_FILE_EXTENSION_REGEX.test(u)}function getResourceIcon(mimeType,uri2){const mime=mimeType?.toLowerCase()||"",u=uri2?.
toLowerCase()||"";return mime.startsWith(MimeTypePrefix.IMAGE)||IMAGE_FILE_EXTENSION_REGEX.test(u)?Image$1:mime.includes(MimeTypeIncludes.JSON)||mime.includes(MimeTypeIncludes.JAVASCRIPT)||mime.includes(MimeTypeIncludes.TYPESCRIPT)||CODE_FILE_EXTENSION_REGEX.test(u)?Code:mime.includes(MimeTypePrefix.TEXT)||TEXT_FILE_EXTENSION_REGEX.test(u)?File_text:u.includes(UriPattern.DATABASE_KEYWORD)||u.includes(UriPattern.DATABASE_SCHEME)?Database:File$1}function getResourceTextContent(content2){return content2?
content2.filter(c2=>"text"in c2).map(c2=>c2.text).join(RESOURCE_TEXT_CONTENT_SEPARATOR):""}function getResourceBlobContent(content2){return content2?content2.filter(c2=>"blob"in c2):[]}function downloadResourceContent(text2,mimeType=MimeTypeText.PLAIN,filename=DEFAULT_RESOURCE_FILENAME){const blob=new Blob([text2],{type:mimeType}),url2=URL.createObjectURL(blob),a=document.createElement("a");a.href=url2,a.download=filename,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(
url2)}function normalizeResourceUri(uri2){const schemeEnd=uri2.indexOf(URI_SCHEME_SEPARATOR);if(schemeEnd===-1)return uri2;const scheme2=uri2.substring(0,schemeEnd),rest=uri2.substring(schemeEnd+URI_SCHEME_SEPARATOR.length).replace(LEADING_SLASHES_REGEX,"");return`${scheme2}${URI_SCHEME_SEPARATOR}${rest}`}function extractTemplateVariables(template){const variables=[],seen2=new Set;let match;for(TEMPLATE_EXPRESSION_REGEX.lastIndex=0;(match=TEMPLATE_EXPRESSION_REGEX.exec(template))!==null;){const operator2=match[1]||
"",varList=match[2];for(const varSpec of varList.split(",")){const name=varSpec.replace(VARIABLE_EXPLODE_MODIFIER_REGEX,"").replace(VARIABLE_PREFIX_MODIFIER_REGEX,"").trim();name&&!seen2.has(name)&&(seen2.add(name),variables.push({name,operator:operator2}))}}return variables}function expandTemplate(template,values){return TEMPLATE_EXPRESSION_REGEX.lastIndex=0,template.replace(TEMPLATE_EXPRESSION_REGEX,(_match,operator2,varList)=>{const varNames=varList.split(",").map(v=>v.replace(VARIABLE_EXPLODE_MODIFIER_REGEX,
"").replace(VARIABLE_PREFIX_MODIFIER_REGEX,"").trim()),expandedParts=varNames.map(name=>values[name]??"").filter(v=>v!=="");if(expandedParts.length===0)return"";switch(operator2){case URI_TEMPLATE_OPERATORS.RESERVED:return expandedParts.join(URI_TEMPLATE_SEPARATORS.COMMA);case URI_TEMPLATE_OPERATORS.FRAGMENT:return URI_TEMPLATE_OPERATORS.FRAGMENT+expandedParts.join(URI_TEMPLATE_SEPARATORS.COMMA);case URI_TEMPLATE_OPERATORS.PATH_SEGMENT:return URI_TEMPLATE_SEPARATORS.SLASH+expandedParts.join(URI_TEMPLATE_SEPARATORS.
SLASH);case URI_TEMPLATE_OPERATORS.LABEL:return URI_TEMPLATE_SEPARATORS.PERIOD+expandedParts.join(URI_TEMPLATE_SEPARATORS.PERIOD);case URI_TEMPLATE_OPERATORS.PATH_PARAM:return varNames.filter((_,i)=>expandedParts[i]).map((name,i)=>`${URI_TEMPLATE_SEPARATORS.SEMICOLON}${name}=${expandedParts[i]}`).join("");case URI_TEMPLATE_OPERATORS.FORM_QUERY:return URI_TEMPLATE_SEPARATORS.QUERY_PREFIX+varNames.filter((_,i)=>expandedParts[i]).map((name,i)=>`${encodeURIComponent(name)}=${encodeURIComponent(expandedParts[i])}`).
join(URI_TEMPLATE_SEPARATORS.COMMA);case URI_TEMPLATE_OPERATORS.FORM_CONTINUATION:return URI_TEMPLATE_SEPARATORS.QUERY_CONTINUATION+varNames.filter((_,i)=>expandedParts[i]).map((name,i)=>`${encodeURIComponent(name)}=${encodeURIComponent(expandedParts[i])}`).join(URI_TEMPLATE_SEPARATORS.COMMA);default:return expandedParts.map(v=>encodeURIComponent(v)).join(URI_TEMPLATE_SEPARATORS.COMMA)}})}function isTemplateComplete(template,values){return extractTemplateVariables(template).every(v=>(values[v.name]??
"").trim()!=="")}function createBase64DataUrl(mimeType,base64Data){return`data:${mimeType};base64,${base64Data}`}function parseHeadersToArray(headersJson){if(!headersJson?.trim())return[];try{const parsed=JSON.parse(headersJson);if(typeof parsed=="object"&&parsed!==null&&!Array.isArray(parsed))return Object.entries(parsed).map(([key2,value])=>({key:key2,value:String(value)}))}catch{return[]}return[]}function serializeHeaders(pairs){const validPairs=pairs.filter(p2=>p2.key.trim());if(validPairs.length===
0)return"";const obj={};for(const pair of validPairs)obj[pair.key.trim()]=pair.value;return JSON.stringify(obj)}function deriveSingleTurnSections(message,toolMessages=[],streamingToolCalls=[],isStreaming=!1){const sections=[];if(message.reasoningContent){const toolCalls2=parseToolCalls(message.toolCalls),hasContentAfterReasoning=!!message.content?.trim()||toolCalls2.length>0||streamingToolCalls.length>0,isPending=isStreaming&&!hasContentAfterReasoning;sections.push({type:isPending?AgenticSectionType.
REASONING_PENDING:AgenticSectionType.REASONING,content:message.reasoningContent})}message.content?.trim()&&sections.push({type:AgenticSectionType.TEXT,content:message.content});const toolCalls=parseToolCalls(message.toolCalls);for(const tc of toolCalls){const resultMsg=toolMessages.find(m=>m.toolCallId===tc.id),type2=resultMsg?AgenticSectionType.TOOL_CALL:isStreaming?AgenticSectionType.TOOL_CALL_PENDING:AgenticSectionType.TOOL_CALL;sections.push({type:type2,content:resultMsg?.content||"",toolName:tc.
function?.name,toolArgs:tc.function?.arguments,toolResult:resultMsg?.content,toolResultExtras:resultMsg?.extra})}for(const tc of streamingToolCalls)tc.id&&toolCalls.find(t=>t.id===tc.id)||sections.push({type:AgenticSectionType.TOOL_CALL_STREAMING,content:"",toolName:tc.function?.name,toolArgs:tc.function?.arguments});return sections}function deriveAgenticSections(message,toolMessages=[],streamingToolCalls=[],isStreaming=!1){if(!toolMessages.some(m=>m.role===MessageRole.ASSISTANT))return deriveSingleTurnSections(
message,toolMessages,streamingToolCalls,isStreaming);const sections=[],firstTurnToolMsgs=collectToolMessages(toolMessages,0);sections.push(...deriveSingleTurnSections(message,firstTurnToolMsgs));let i=firstTurnToolMsgs.length;for(;i<toolMessages.length;){const msg=toolMessages[i];if(msg.role===MessageRole.ASSISTANT){const turnToolMsgs=collectToolMessages(toolMessages,i+1),isLastTurn=i+1+turnToolMsgs.length>=toolMessages.length;sections.push(...deriveSingleTurnSections(msg,turnToolMsgs,isLastTurn?
streamingToolCalls:[],isLastTurn&&isStreaming)),i+=1+turnToolMsgs.length}else i++}return sections}function collectToolMessages(messages,startIndex){const result=[];for(let i=startIndex;i<messages.length&&messages[i].role===MessageRole.TOOL;i++)result.push(messages[i]);return result}function parseToolResultWithImages(toolResult,extras){return toolResult.split(NEWLINE_SEPARATOR).map(line=>{const match=line.match(ATTACHMENT_SAVED_REGEX);if(!match||!extras)return{text:line};const attachmentName=match[1],
image2=extras.find(e=>e.type===AttachmentType.IMAGE&&e.name===attachmentName);return{text:line,image:image2}})}function parseToolCalls(toolCallsJson){if(!toolCallsJson)return[];try{const parsed=JSON.parse(toolCallsJson);return Array.isArray(parsed)?parsed:[]}catch{return[]}}function hasAgenticContent(message,toolMessages=[]){return message.toolCalls&&parseToolCalls(message.toolCalls).length>0?!0:toolMessages.length>0}var dexie_min$1={exports:{}},dexie_min=dexie_min$1.exports,hasRequiredDexie_min;
function requireDexie_min(){return hasRequiredDexie_min||(hasRequiredDexie_min=1,(function(module,exports$1){(function(e,t){module.exports=t()})(dexie_min,function(){var s2=function(e2,t2){return(s2=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e3,t3){e3.__proto__=t3}||function(e3,t3){for(var n2 in t3)Object.prototype.hasOwnProperty.call(t3,n2)&&(e3[n2]=t3[n2])})(e2,t2)},_=function(){return(_=Object.assign||function(e2){for(var t2,n2=1,r3=arguments.length;n2<r3;n2++)for(var i2 in t2=
arguments[n2])Object.prototype.hasOwnProperty.call(t2,i2)&&(e2[i2]=t2[i2]);return e2}).apply(this,arguments)};function i(e2,t2,n2){for(var r3,i2=0,o2=t2.length;i2<o2;i2++)!r3&&i2 in t2||((r3=r3||Array.prototype.slice.call(t2,0,i2))[i2]=t2[i2]);return e2.concat(r3||Array.prototype.slice.call(t2))}var f=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:commonjsGlobal,x=Object.keys,k=Array.isArray;function a(t2,n2){return typeof n2!="object"||x(n2).forEach(function(e2){
t2[e2]=n2[e2]}),t2}typeof Promise>"u"||f.Promise||(f.Promise=Promise);var c2=Object.getPrototypeOf,n={}.hasOwnProperty;function m(e2,t2){return n.call(e2,t2)}function r2(t2,n2){typeof n2=="function"&&(n2=n2(c2(t2))),(typeof Reflect>"u"?x:Reflect.ownKeys)(n2).forEach(function(e2){l(t2,e2,n2[e2])})}var u=Object.defineProperty;function l(e2,t2,n2,r3){u(e2,t2,a(n2&&m(n2,"get")&&typeof n2.get=="function"?{get:n2.get,set:n2.set,configurable:!0}:{value:n2,configurable:!0,writable:!0},r3))}function o(t2){
return{from:function(e2){return t2.prototype=Object.create(e2.prototype),l(t2.prototype,"constructor",t2),{extend:r2.bind(null,t2.prototype)}}}}var h2=Object.getOwnPropertyDescriptor,d2=[].slice;function b(e2,t2,n2){return d2.call(e2,t2,n2)}function p2(e2,t2){return t2(e2)}function y(e2){if(!e2)throw new Error("Assertion Failed")}function v(e2){f.setImmediate?setImmediate(e2):setTimeout(e2,0)}function O(e2,t2){if(typeof t2=="string"&&m(e2,t2))return e2[t2];if(!t2)return e2;if(typeof t2!="string"){
for(var n2=[],r3=0,i2=t2.length;r3<i2;++r3){var o2=O(e2,t2[r3]);n2.push(o2)}return n2}var a2=t2.indexOf(".");if(a2!==-1){var u2=e2[t2.substr(0,a2)];return u2==null?void 0:O(u2,t2.substr(a2+1))}}function P(e2,t2,n2){if(e2&&t2!==void 0&&!("isFrozen"in Object&&Object.isFrozen(e2)))if(typeof t2!="string"&&"length"in t2){y(typeof n2!="string"&&"length"in n2);for(var r3=0,i2=t2.length;r3<i2;++r3)P(e2,t2[r3],n2[r3])}else{var o2,a2,u2=t2.indexOf(".");u2!==-1?(o2=t2.substr(0,u2),(a2=t2.substr(u2+1))===""?
n2===void 0?k(e2)&&!isNaN(parseInt(o2))?e2.splice(o2,1):delete e2[o2]:e2[o2]=n2:P(u2=!(u2=e2[o2])||!m(e2,o2)?e2[o2]={}:u2,a2,n2)):n2===void 0?k(e2)&&!isNaN(parseInt(t2))?e2.splice(t2,1):delete e2[t2]:e2[t2]=n2}}function g(e2){var t2,n2={};for(t2 in e2)m(e2,t2)&&(n2[t2]=e2[t2]);return n2}var t=[].concat;function w(e2){return t.apply([],e2)}var e="BigUint64Array,BigInt64Array,Array,Boolean,String,Date,RegExp,Blob,File,FileList,FileSystemFileHandle,FileSystemDirectoryHandle,ArrayBuffer,DataView,Uin\
t8ClampedArray,ImageBitmap,ImageData,Map,Set,CryptoKey".split(",").concat(w([8,16,32,64].map(function(t2){return["Int","Uint","Float"].map(function(e2){return e2+t2+"Array"})}))).filter(function(e2){return f[e2]}),K=new Set(e.map(function(e2){return f[e2]})),E=null;function S2(e2){return E=new WeakMap,e2=(function e3(t2){if(!t2||typeof t2!="object")return t2;var n2=E.get(t2);if(n2)return n2;if(k(t2)){n2=[],E.set(t2,n2);for(var r3=0,i2=t2.length;r3<i2;++r3)n2.push(e3(t2[r3]))}else if(K.has(t2.constructor))
n2=t2;else{var o2,a2=c2(t2);for(o2 in n2=a2===Object.prototype?{}:Object.create(a2),E.set(t2,n2),t2)m(t2,o2)&&(n2[o2]=e3(t2[o2]))}return n2})(e2),E=null,e2}var j={}.toString;function A(e2){return j.call(e2).slice(8,-1)}var C=typeof Symbol<"u"?Symbol.iterator:"@@iterator",T2=typeof C=="symbol"?function(e2){var t2;return e2!=null&&(t2=e2[C])&&t2.apply(e2)}:function(){return null};function q2(e2,t2){return t2=e2.indexOf(t2),0<=t2&&e2.splice(t2,1),0<=t2}var D2={};function I(e2){var t2,n2,r3,i2;if(arguments.
length===1){if(k(e2))return e2.slice();if(this===D2&&typeof e2=="string")return[e2];if(i2=T2(e2)){for(n2=[];!(r3=i2.next()).done;)n2.push(r3.value);return n2}if(e2==null)return[e2];if(typeof(t2=e2.length)!="number")return[e2];for(n2=new Array(t2);t2--;)n2[t2]=e2[t2];return n2}for(t2=arguments.length,n2=new Array(t2);t2--;)n2[t2]=arguments[t2];return n2}var B=typeof Symbol<"u"?function(e2){return e2[Symbol.toStringTag]==="AsyncFunction"}:function(){return!1},R=["Unknown","Constraint","Data","Tran\
sactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],F=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"].concat(R),M={VersionChanged:"Database version changed by other database connection",DatabaseClosed:"Database has been closed",Abort:"Transact\
ion aborted",TransactionInactive:"Transaction has already completed or failed",MissingAPI:"IndexedDB API missing. Please visit https://tinyurl.com/y2uuvskb"};function N(e2,t2){this.name=e2,this.message=t2}function L(e2,t2){return e2+". Errors: "+Object.keys(t2).map(function(e3){return t2[e3].toString()}).filter(function(e3,t3,n2){return n2.indexOf(e3)===t3}).join(`
`)}function U(e2,t2,n2,r3){this.failures=t2,this.failedKeys=r3,this.successCount=n2,this.message=L(e2,t2)}function V(e2,t2){this.name="BulkError",this.failures=Object.keys(t2).map(function(e3){return t2[e3]}),this.failuresByPos=t2,this.message=L(e2,this.failures)}o(N).from(Error).extend({toString:function(){return this.name+": "+this.message}}),o(U).from(N),o(V).from(N);var z=F.reduce(function(e2,t2){return e2[t2]=t2+"Error",e2},{}),W=N,Y=F.reduce(function(e2,n2){var r3=n2+"Error";function t2(e3,t3){
this.name=r3,e3?typeof e3=="string"?(this.message="".concat(e3).concat(t3?`
 `+t3:""),this.inner=t3||null):typeof e3=="object"&&(this.message="".concat(e3.name," ").concat(e3.message),this.inner=e3):(this.message=M[n2]||r3,this.inner=null)}return o(t2).from(W),e2[n2]=t2,e2},{});Y.Syntax=SyntaxError,Y.Type=TypeError,Y.Range=RangeError;var $=R.reduce(function(e2,t2){return e2[t2+"Error"]=Y[t2],e2},{}),Q=F.reduce(function(e2,t2){return["Syntax","Type","Range"].indexOf(t2)===-1&&(e2[t2+"Error"]=Y[t2]),e2},{});function G(){}function X2(e2){return e2}function H(t2,n2){return t2==
null||t2===X2?n2:function(e2){return n2(t2(e2))}}function J(e2,t2){return function(){e2.apply(this,arguments),t2.apply(this,arguments)}}function Z(i2,o2){return i2===G?o2:function(){var e2=i2.apply(this,arguments);e2!==void 0&&(arguments[0]=e2);var t2=this.onsuccess,n2=this.onerror;this.onsuccess=null,this.onerror=null;var r3=o2.apply(this,arguments);return t2&&(this.onsuccess=this.onsuccess?J(t2,this.onsuccess):t2),n2&&(this.onerror=this.onerror?J(n2,this.onerror):n2),r3!==void 0?r3:e2}}function ee(n2,r3){
return n2===G?r3:function(){n2.apply(this,arguments);var e2=this.onsuccess,t2=this.onerror;this.onsuccess=this.onerror=null,r3.apply(this,arguments),e2&&(this.onsuccess=this.onsuccess?J(e2,this.onsuccess):e2),t2&&(this.onerror=this.onerror?J(t2,this.onerror):t2)}}function te(i2,o2){return i2===G?o2:function(e2){var t2=i2.apply(this,arguments);a(e2,t2);var n2=this.onsuccess,r3=this.onerror;return this.onsuccess=null,this.onerror=null,e2=o2.apply(this,arguments),n2&&(this.onsuccess=this.onsuccess?
J(n2,this.onsuccess):n2),r3&&(this.onerror=this.onerror?J(r3,this.onerror):r3),t2===void 0?e2===void 0?void 0:e2:a(t2,e2)}}function ne(e2,t2){return e2===G?t2:function(){return t2.apply(this,arguments)!==!1&&e2.apply(this,arguments)}}function re2(i2,o2){return i2===G?o2:function(){var e2=i2.apply(this,arguments);if(e2&&typeof e2.then=="function"){for(var t2=this,n2=arguments.length,r3=new Array(n2);n2--;)r3[n2]=arguments[n2];return e2.then(function(){return o2.apply(t2,r3)})}return o2.apply(this,
arguments)}}Q.ModifyError=U,Q.DexieError=N,Q.BulkError=V;var ie=typeof location<"u"&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function oe(e2){ie=e2}var ae={},ue=100,e=typeof Promise>"u"?[]:(function(){var e2=Promise.resolve();if(typeof crypto>"u"||!crypto.subtle)return[e2,c2(e2),e2];var t2=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[t2,c2(t2),e2]})(),R=e[0],F=e[1],e=e[2],F=F&&F.then,se=R&&R.constructor,ce=!!e,le=function(e2,t2){be.push([e2,t2]),he&&(queueMicrotask(
Se),he=!1)},fe=!0,he=!0,de=[],pe=[],ye=X2,ve={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:G,pgp:!1,env:{},finalize:G},me=ve,be=[],ge=0,we=[];function _e(e2){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this._lib=!1;var t2=this._PSD=me;if(typeof e2!="function"){if(e2!==ae)throw new TypeError("Not a function");return this._state=arguments[1],this._value=arguments[2],void(this._state===!1&&Oe(this,this._value))}this._state=null,this.
_value=null,++t2.ref,(function t3(r3,e3){try{e3(function(n2){if(r3._state===null){if(n2===r3)throw new TypeError("A promise cannot be resolved with itself.");var e4=r3._lib&&je();n2&&typeof n2.then=="function"?t3(r3,function(e5,t4){n2 instanceof _e?n2._then(e5,t4):n2.then(e5,t4)}):(r3._state=!0,r3._value=n2,Pe(r3)),e4&&Ae()}},Oe.bind(null,r3))}catch(e4){Oe(r3,e4)}})(this,e2)}var xe={get:function(){var u2=me,t2=Fe;function e2(n2,r3){var i2=this,o2=!u2.global&&(u2!==me||t2!==Fe),a2=o2&&!Ue(),e3=new _e(
function(e4,t3){Ke(i2,new ke(Qe(n2,u2,o2,a2),Qe(r3,u2,o2,a2),e4,t3,u2))});return this._consoleTask&&(e3._consoleTask=this._consoleTask),e3}return e2.prototype=ae,e2},set:function(e2){l(this,"then",e2&&e2.prototype===ae?xe:{get:function(){return e2},set:xe.set})}};function ke(e2,t2,n2,r3,i2){this.onFulfilled=typeof e2=="function"?e2:null,this.onRejected=typeof t2=="function"?t2:null,this.resolve=n2,this.reject=r3,this.psd=i2}function Oe(e2,t2){var n2,r3;pe.push(t2),e2._state===null&&(n2=e2._lib&&
je(),t2=ye(t2),e2._state=!1,e2._value=t2,r3=e2,de.some(function(e3){return e3._value===r3._value})||de.push(r3),Pe(e2),n2&&Ae())}function Pe(e2){var t2=e2._listeners;e2._listeners=[];for(var n2=0,r3=t2.length;n2<r3;++n2)Ke(e2,t2[n2]);var i2=e2._PSD;--i2.ref||i2.finalize(),ge===0&&(++ge,le(function(){--ge==0&&Ce()},[]))}function Ke(e2,t2){if(e2._state!==null){var n2=e2._state?t2.onFulfilled:t2.onRejected;if(n2===null)return(e2._state?t2.resolve:t2.reject)(e2._value);++t2.psd.ref,++ge,le(Ee,[n2,e2,
t2])}else e2._listeners.push(t2)}function Ee(e2,t2,n2){try{var r3,i2=t2._value;!t2._state&&pe.length&&(pe=[]),r3=ie&&t2._consoleTask?t2._consoleTask.run(function(){return e2(i2)}):e2(i2),t2._state||pe.indexOf(i2)!==-1||(function(e3){for(var t3=de.length;t3;)if(de[--t3]._value===e3._value)return de.splice(t3,1)})(t2),n2.resolve(r3)}catch(e3){n2.reject(e3)}finally{--ge==0&&Ce(),--n2.psd.ref||n2.psd.finalize()}}function Se(){$e(ve,function(){je()&&Ae()})}function je(){var e2=fe;return he=fe=!1,e2}function Ae(){
var e2,t2,n2;do for(;0<be.length;)for(e2=be,be=[],n2=e2.length,t2=0;t2<n2;++t2){var r3=e2[t2];r3[0].apply(null,r3[1])}while(0<be.length);he=fe=!0}function Ce(){var e2=de;de=[],e2.forEach(function(e3){e3._PSD.onunhandled.call(null,e3._value,e3)});for(var t2=we.slice(0),n2=t2.length;n2;)t2[--n2]()}function Te(e2){return new _e(ae,!1,e2)}function qe(n2,r3){var i2=me;return function(){var e2=je(),t2=me;try{return We(i2,!0),n2.apply(this,arguments)}catch(e3){r3&&r3(e3)}finally{We(t2,!1),e2&&Ae()}}}r2(
_e.prototype,{then:xe,_then:function(e2,t2){Ke(this,new ke(null,null,e2,t2,me))},catch:function(e2){if(arguments.length===1)return this.then(null,e2);var t2=e2,n2=arguments[1];return typeof t2=="function"?this.then(null,function(e3){return(e3 instanceof t2?n2:Te)(e3)}):this.then(null,function(e3){return(e3&&e3.name===t2?n2:Te)(e3)})},finally:function(t2){return this.then(function(e2){return _e.resolve(t2()).then(function(){return e2})},function(e2){return _e.resolve(t2()).then(function(){return Te(
e2)})})},timeout:function(r3,i2){var o2=this;return r3<1/0?new _e(function(e2,t2){var n2=setTimeout(function(){return t2(new Y.Timeout(i2))},r3);o2.then(e2,t2).finally(clearTimeout.bind(null,n2))}):this}}),typeof Symbol<"u"&&Symbol.toStringTag&&l(_e.prototype,Symbol.toStringTag,"Dexie.Promise"),ve.env=Ye(),r2(_e,{all:function(){var o2=I.apply(null,arguments).map(Ve);return new _e(function(n2,r3){o2.length===0&&n2([]);var i2=o2.length;o2.forEach(function(e2,t2){return _e.resolve(e2).then(function(e3){
o2[t2]=e3,--i2||n2(o2)},r3)})})},resolve:function(n2){return n2 instanceof _e?n2:n2&&typeof n2.then=="function"?new _e(function(e2,t2){n2.then(e2,t2)}):new _e(ae,!0,n2)},reject:Te,race:function(){var e2=I.apply(null,arguments).map(Ve);return new _e(function(t2,n2){e2.map(function(e3){return _e.resolve(e3).then(t2,n2)})})},PSD:{get:function(){return me},set:function(e2){return me=e2}},totalEchoes:{get:function(){return Fe}},newPSD:Ne,usePSD:$e,scheduler:{get:function(){return le},set:function(e2){
le=e2}},rejectionMapper:{get:function(){return ye},set:function(e2){ye=e2}},follow:function(i2,n2){return new _e(function(e2,t2){return Ne(function(n3,r3){var e3=me;e3.unhandleds=[],e3.onunhandled=r3,e3.finalize=J(function(){var t3,e4=this;t3=function(){e4.unhandleds.length===0?n3():r3(e4.unhandleds[0])},we.push(function e5(){t3(),we.splice(we.indexOf(e5),1)}),++ge,le(function(){--ge==0&&Ce()},[])},e3.finalize),i2()},n2,e2,t2)})}}),se&&(se.allSettled&&l(_e,"allSettled",function(){var e2=I.apply(
null,arguments).map(Ve);return new _e(function(n2){e2.length===0&&n2([]);var r3=e2.length,i2=new Array(r3);e2.forEach(function(e3,t2){return _e.resolve(e3).then(function(e4){return i2[t2]={status:"fulfilled",value:e4}},function(e4){return i2[t2]={status:"rejected",reason:e4}}).then(function(){return--r3||n2(i2)})})})}),se.any&&typeof AggregateError<"u"&&l(_e,"any",function(){var e2=I.apply(null,arguments).map(Ve);return new _e(function(n2,r3){e2.length===0&&r3(new AggregateError([]));var i2=e2.length,
o2=new Array(i2);e2.forEach(function(e3,t2){return _e.resolve(e3).then(function(e4){return n2(e4)},function(e4){o2[t2]=e4,--i2||r3(new AggregateError(o2))})})})}),se.withResolvers&&(_e.withResolvers=se.withResolvers));var De={awaits:0,echoes:0,id:0},Ie=0,Be=[],Re=0,Fe=0,Me=0;function Ne(e2,t2,n2,r3){var i2=me,o2=Object.create(i2);return o2.parent=i2,o2.ref=0,o2.global=!1,o2.id=++Me,ve.env,o2.env=ce?{Promise:_e,PromiseProp:{value:_e,configurable:!0,writable:!0},all:_e.all,race:_e.race,allSettled:_e.
allSettled,any:_e.any,resolve:_e.resolve,reject:_e.reject}:{},t2&&a(o2,t2),++i2.ref,o2.finalize=function(){--this.parent.ref||this.parent.finalize()},r3=$e(o2,e2,n2,r3),o2.ref===0&&o2.finalize(),r3}function Le(){return De.id||(De.id=++Ie),++De.awaits,De.echoes+=ue,De.id}function Ue(){return!!De.awaits&&(--De.awaits==0&&(De.id=0),De.echoes=De.awaits*ue,!0)}function Ve(e2){return De.echoes&&e2&&e2.constructor===se?(Le(),e2.then(function(e3){return Ue(),e3},function(e3){return Ue(),Xe(e3)})):e2}function ze(){
var e2=Be[Be.length-1];Be.pop(),We(e2,!1)}function We(e2,t2){var n2,r3=me;(t2?!De.echoes||Re++&&e2===me:!Re||--Re&&e2===me)||queueMicrotask(t2?(function(e3){++Fe,De.echoes&&--De.echoes!=0||(De.echoes=De.awaits=De.id=0),Be.push(me),We(e3,!0)}).bind(null,e2):ze),e2!==me&&(me=e2,r3===ve&&(ve.env=Ye()),ce&&(n2=ve.env.Promise,t2=e2.env,(r3.global||e2.global)&&(Object.defineProperty(f,"Promise",t2.PromiseProp),n2.all=t2.all,n2.race=t2.race,n2.resolve=t2.resolve,n2.reject=t2.reject,t2.allSettled&&(n2.allSettled=
t2.allSettled),t2.any&&(n2.any=t2.any))))}function Ye(){var e2=f.Promise;return ce?{Promise:e2,PromiseProp:Object.getOwnPropertyDescriptor(f,"Promise"),all:e2.all,race:e2.race,allSettled:e2.allSettled,any:e2.any,resolve:e2.resolve,reject:e2.reject}:{}}function $e(e2,t2,n2,r3,i2){var o2=me;try{return We(e2,!0),t2(n2,r3,i2)}finally{We(o2,!1)}}function Qe(t2,n2,r3,i2){return typeof t2!="function"?t2:function(){var e2=me;r3&&Le(),We(n2,!0);try{return t2.apply(this,arguments)}finally{We(e2,!1),i2&&queueMicrotask(
Ue)}}}function Ge(e2){Promise===se&&De.echoes===0?Re===0?e2():enqueueNativeMicroTask(e2):setTimeout(e2,0)}(""+F).indexOf("[native code]")===-1&&(Le=Ue=G);var Xe=_e.reject,He="",Je="Invalid key provided. Keys must be of type string, number, Date or Array<string | number | Date>.",Ze="String expected.",et=[],tt="__dbnames",nt="readonly",rt="readwrite";function it(e2,t2){return e2?t2?function(){return e2.apply(this,arguments)&&t2.apply(this,arguments)}:e2:t2}var ot={type:3,lower:-1/0,lowerOpen:!1,
upper:[[]],upperOpen:!1};function at(t2){return typeof t2!="string"||/\./.test(t2)?function(e2){return e2}:function(e2){return e2[t2]===void 0&&t2 in e2&&delete(e2=S2(e2))[t2],e2}}function ut(){throw Y.Type()}function st(e2,t2){try{var n2=ct(e2),r3=ct(t2);if(n2!==r3)return n2==="Array"?1:r3==="Array"?-1:n2==="binary"?1:r3==="binary"?-1:n2==="string"?1:r3==="string"?-1:n2==="Date"?1:r3!=="Date"?NaN:-1;switch(n2){case"number":case"Date":case"string":return t2<e2?1:e2<t2?-1:0;case"binary":return(function(e3,t3){
for(var n3=e3.length,r4=t3.length,i2=n3<r4?n3:r4,o2=0;o2<i2;++o2)if(e3[o2]!==t3[o2])return e3[o2]<t3[o2]?-1:1;return n3===r4?0:n3<r4?-1:1})(lt(e2),lt(t2));case"Array":return(function(e3,t3){for(var n3=e3.length,r4=t3.length,i2=n3<r4?n3:r4,o2=0;o2<i2;++o2){var a2=st(e3[o2],t3[o2]);if(a2!==0)return a2}return n3===r4?0:n3<r4?-1:1})(e2,t2)}}catch{}return NaN}function ct(e2){var t2=typeof e2;return t2!="object"?t2:ArrayBuffer.isView(e2)?"binary":(e2=A(e2),e2==="ArrayBuffer"?"binary":e2)}function lt(e2){
return e2 instanceof Uint8Array?e2:ArrayBuffer.isView(e2)?new Uint8Array(e2.buffer,e2.byteOffset,e2.byteLength):new Uint8Array(e2)}var ft=(ht.prototype._trans=function(e2,r3,t2){var n2=this._tx||me.trans,i2=this.name,o2=ie&&typeof console<"u"&&console.createTask&&console.createTask("Dexie: ".concat(e2==="readonly"?"read":"write"," ").concat(this.name));function a2(e3,t3,n3){if(!n3.schema[i2])throw new Y.NotFound("Table "+i2+" not part of transaction");return r3(n3.idbtrans,n3)}var u2=je();try{var s3=n2&&
n2.db._novip===this.db._novip?n2===me.trans?n2._promise(e2,a2,t2):Ne(function(){return n2._promise(e2,a2,t2)},{trans:n2,transless:me.transless||me}):(function t3(n3,r4,i3,o3){if(n3.idbdb&&(n3._state.openComplete||me.letThrough||n3._vip)){var a3=n3._createTransaction(r4,i3,n3._dbSchema);try{a3.create(),n3._state.PR1398_maxLoop=3}catch(e3){return e3.name===z.InvalidState&&n3.isOpen()&&0<--n3._state.PR1398_maxLoop?(console.warn("Dexie: Need to reopen db"),n3.close({disableAutoOpen:!1}),n3.open().then(
function(){return t3(n3,r4,i3,o3)})):Xe(e3)}return a3._promise(r4,function(e3,t4){return Ne(function(){return me.trans=a3,o3(e3,t4,a3)})}).then(function(e3){if(r4==="readwrite")try{a3.idbtrans.commit()}catch{}return r4==="readonly"?e3:a3._completion.then(function(){return e3})})}if(n3._state.openComplete)return Xe(new Y.DatabaseClosed(n3._state.dbOpenError));if(!n3._state.isBeingOpened){if(!n3._state.autoOpen)return Xe(new Y.DatabaseClosed);n3.open().catch(G)}return n3._state.dbReadyPromise.then(
function(){return t3(n3,r4,i3,o3)})})(this.db,e2,[this.name],a2);return o2&&(s3._consoleTask=o2,s3=s3.catch(function(e3){return console.trace(e3),Xe(e3)})),s3}finally{u2&&Ae()}},ht.prototype.get=function(t2,e2){var n2=this;return t2&&t2.constructor===Object?this.where(t2).first(e2):t2==null?Xe(new Y.Type("Invalid argument to Table.get()")):this._trans("readonly",function(e3){return n2.core.get({trans:e3,key:t2}).then(function(e4){return n2.hook.reading.fire(e4)})}).then(e2)},ht.prototype.where=function(o2){
if(typeof o2=="string")return new this.db.WhereClause(this,o2);if(k(o2))return new this.db.WhereClause(this,"[".concat(o2.join("+"),"]"));var n2=x(o2);if(n2.length===1)return this.where(n2[0]).equals(o2[n2[0]]);var e2=this.schema.indexes.concat(this.schema.primKey).filter(function(t3){if(t3.compound&&n2.every(function(e4){return 0<=t3.keyPath.indexOf(e4)})){for(var e3=0;e3<n2.length;++e3)if(n2.indexOf(t3.keyPath[e3])===-1)return!1;return!0}return!1}).sort(function(e3,t3){return e3.keyPath.length-
t3.keyPath.length})[0];if(e2&&this.db._maxKey!==He){var t2=e2.keyPath.slice(0,n2.length);return this.where(t2).equals(t2.map(function(e3){return o2[e3]}))}!e2&&ie&&console.warn("The query ".concat(JSON.stringify(o2)," on ").concat(this.name," would benefit from a ")+"compound index [".concat(n2.join("+"),"]"));var a2=this.schema.idxByName;function u2(e3,t3){return st(e3,t3)===0}var r3=n2.reduce(function(e3,t3){var n3=e3[0],r4=e3[1],e3=a2[t3],i2=o2[t3];return[n3||e3,n3||!e3?it(r4,e3&&e3.multi?function(e4){
return e4=O(e4,t3),k(e4)&&e4.some(function(e5){return u2(i2,e5)})}:function(e4){return u2(i2,O(e4,t3))}):r4]},[null,null]),t2=r3[0],r3=r3[1];return t2?this.where(t2.name).equals(o2[t2.keyPath]).filter(r3):e2?this.filter(r3):this.where(n2).equals("")},ht.prototype.filter=function(e2){return this.toCollection().and(e2)},ht.prototype.count=function(e2){return this.toCollection().count(e2)},ht.prototype.offset=function(e2){return this.toCollection().offset(e2)},ht.prototype.limit=function(e2){return this.
toCollection().limit(e2)},ht.prototype.each=function(e2){return this.toCollection().each(e2)},ht.prototype.toArray=function(e2){return this.toCollection().toArray(e2)},ht.prototype.toCollection=function(){return new this.db.Collection(new this.db.WhereClause(this))},ht.prototype.orderBy=function(e2){return new this.db.Collection(new this.db.WhereClause(this,k(e2)?"[".concat(e2.join("+"),"]"):e2))},ht.prototype.reverse=function(){return this.toCollection().reverse()},ht.prototype.mapToClass=function(r3){
var e2,t2=this.db,n2=this.name;function i2(){return e2!==null&&e2.apply(this,arguments)||this}(this.schema.mappedClass=r3).prototype instanceof ut&&((function(e3,t3){if(typeof t3!="function"&&t3!==null)throw new TypeError("Class extends value "+String(t3)+" is not a constructor or null");function n3(){this.constructor=e3}s2(e3,t3),e3.prototype=t3===null?Object.create(t3):(n3.prototype=t3.prototype,new n3)})(i2,e2=r3),Object.defineProperty(i2.prototype,"db",{get:function(){return t2},enumerable:!1,
configurable:!0}),i2.prototype.table=function(){return n2},r3=i2);for(var o2=new Set,a2=r3.prototype;a2;a2=c2(a2))Object.getOwnPropertyNames(a2).forEach(function(e3){return o2.add(e3)});function u2(e3){if(!e3)return e3;var t3,n3=Object.create(r3.prototype);for(t3 in e3)if(!o2.has(t3))try{n3[t3]=e3[t3]}catch{}return n3}return this.schema.readHook&&this.hook.reading.unsubscribe(this.schema.readHook),this.schema.readHook=u2,this.hook("reading",u2),r3},ht.prototype.defineClass=function(){return this.
mapToClass(function(e2){a(this,e2)})},ht.prototype.add=function(t2,n2){var r3=this,e2=this.schema.primKey,i2=e2.auto,o2=e2.keyPath,a2=t2;return o2&&i2&&(a2=at(o2)(t2)),this._trans("readwrite",function(e3){return r3.core.mutate({trans:e3,type:"add",keys:n2!=null?[n2]:null,values:[a2]})}).then(function(e3){return e3.numFailures?_e.reject(e3.failures[0]):e3.lastResult}).then(function(e3){if(o2)try{P(t2,o2,e3)}catch{}return e3})},ht.prototype.update=function(e2,t2){return typeof e2!="object"||k(e2)?
this.where(":id").equals(e2).modify(t2):(e2=O(e2,this.schema.primKey.keyPath),e2===void 0?Xe(new Y.InvalidArgument("Given object does not contain its primary key")):this.where(":id").equals(e2).modify(t2))},ht.prototype.put=function(t2,n2){var r3=this,e2=this.schema.primKey,i2=e2.auto,o2=e2.keyPath,a2=t2;return o2&&i2&&(a2=at(o2)(t2)),this._trans("readwrite",function(e3){return r3.core.mutate({trans:e3,type:"put",values:[a2],keys:n2!=null?[n2]:null})}).then(function(e3){return e3.numFailures?_e.
reject(e3.failures[0]):e3.lastResult}).then(function(e3){if(o2)try{P(t2,o2,e3)}catch{}return e3})},ht.prototype.delete=function(t2){var n2=this;return this._trans("readwrite",function(e2){return n2.core.mutate({trans:e2,type:"delete",keys:[t2]})}).then(function(e2){return e2.numFailures?_e.reject(e2.failures[0]):void 0})},ht.prototype.clear=function(){var t2=this;return this._trans("readwrite",function(e2){return t2.core.mutate({trans:e2,type:"deleteRange",range:ot})}).then(function(e2){return e2.
numFailures?_e.reject(e2.failures[0]):void 0})},ht.prototype.bulkGet=function(t2){var n2=this;return this._trans("readonly",function(e2){return n2.core.getMany({keys:t2,trans:e2}).then(function(e3){return e3.map(function(e4){return n2.hook.reading.fire(e4)})})})},ht.prototype.bulkAdd=function(r3,e2,t2){var o2=this,a2=Array.isArray(e2)?e2:void 0,u2=(t2=t2||(a2?void 0:e2))?t2.allKeys:void 0;return this._trans("readwrite",function(e3){var t3=o2.schema.primKey,n2=t3.auto,t3=t3.keyPath;if(t3&&a2)throw new Y.
InvalidArgument("bulkAdd(): keys argument invalid on tables with inbound keys");if(a2&&a2.length!==r3.length)throw new Y.InvalidArgument("Arguments objects and keys must have the same length");var i2=r3.length,t3=t3&&n2?r3.map(at(t3)):r3;return o2.core.mutate({trans:e3,type:"add",keys:a2,values:t3,wantResults:u2}).then(function(e4){var t4=e4.numFailures,n3=e4.results,r4=e4.lastResult,e4=e4.failures;if(t4===0)return u2?n3:r4;throw new V("".concat(o2.name,".bulkAdd(): ").concat(t4," of ").concat(i2,
" operations failed"),e4)})})},ht.prototype.bulkPut=function(r3,e2,t2){var o2=this,a2=Array.isArray(e2)?e2:void 0,u2=(t2=t2||(a2?void 0:e2))?t2.allKeys:void 0;return this._trans("readwrite",function(e3){var t3=o2.schema.primKey,n2=t3.auto,t3=t3.keyPath;if(t3&&a2)throw new Y.InvalidArgument("bulkPut(): keys argument invalid on tables with inbound keys");if(a2&&a2.length!==r3.length)throw new Y.InvalidArgument("Arguments objects and keys must have the same length");var i2=r3.length,t3=t3&&n2?r3.map(
at(t3)):r3;return o2.core.mutate({trans:e3,type:"put",keys:a2,values:t3,wantResults:u2}).then(function(e4){var t4=e4.numFailures,n3=e4.results,r4=e4.lastResult,e4=e4.failures;if(t4===0)return u2?n3:r4;throw new V("".concat(o2.name,".bulkPut(): ").concat(t4," of ").concat(i2," operations failed"),e4)})})},ht.prototype.bulkUpdate=function(t2){var h3=this,n2=this.core,r3=t2.map(function(e2){return e2.key}),i2=t2.map(function(e2){return e2.changes}),d3=[];return this._trans("readwrite",function(e2){
return n2.getMany({trans:e2,keys:r3,cache:"clone"}).then(function(c3){var l2=[],f2=[];t2.forEach(function(e3,t3){var n3=e3.key,r4=e3.changes,i3=c3[t3];if(i3){for(var o2=0,a2=Object.keys(r4);o2<a2.length;o2++){var u2=a2[o2],s4=r4[u2];if(u2===h3.schema.primKey.keyPath){if(st(s4,n3)!==0)throw new Y.Constraint("Cannot update primary key in bulkUpdate()")}else P(i3,u2,s4)}d3.push(t3),l2.push(n3),f2.push(i3)}});var s3=l2.length;return n2.mutate({trans:e2,type:"put",keys:l2,values:f2,updates:{keys:r3,changeSpecs:i2}}).
then(function(e3){var t3=e3.numFailures,n3=e3.failures;if(t3===0)return s3;for(var r4=0,i3=Object.keys(n3);r4<i3.length;r4++){var o2,a2=i3[r4],u2=d3[Number(a2)];u2!=null&&(o2=n3[a2],delete n3[a2],n3[u2]=o2)}throw new V("".concat(h3.name,".bulkUpdate(): ").concat(t3," of ").concat(s3," operations failed"),n3)})})})},ht.prototype.bulkDelete=function(t2){var r3=this,i2=t2.length;return this._trans("readwrite",function(e2){return r3.core.mutate({trans:e2,type:"delete",keys:t2})}).then(function(e2){var t3=e2.
numFailures,n2=e2.lastResult,e2=e2.failures;if(t3===0)return n2;throw new V("".concat(r3.name,".bulkDelete(): ").concat(t3," of ").concat(i2," operations failed"),e2)})},ht);function ht(){}function dt2(i2){function t2(e3,t3){if(t3){for(var n3=arguments.length,r3=new Array(n3-1);--n3;)r3[n3-1]=arguments[n3];return a2[e3].subscribe.apply(null,r3),i2}if(typeof e3=="string")return a2[e3]}var a2={};t2.addEventType=u2;for(var e2=1,n2=arguments.length;e2<n2;++e2)u2(arguments[e2]);return t2;function u2(e3,n3,r3){
if(typeof e3!="object"){var i3;n3=n3||ne;var o2={subscribers:[],fire:r3=r3||G,subscribe:function(e4){o2.subscribers.indexOf(e4)===-1&&(o2.subscribers.push(e4),o2.fire=n3(o2.fire,e4))},unsubscribe:function(t3){o2.subscribers=o2.subscribers.filter(function(e4){return e4!==t3}),o2.fire=o2.subscribers.reduce(n3,r3)}};return a2[e3]=t2[e3]=o2}x(i3=e3).forEach(function(e4){var t3=i3[e4];if(k(t3))u2(e4,i3[e4][0],i3[e4][1]);else{if(t3!=="asap")throw new Y.InvalidArgument("Invalid event config");var n4=u2(
e4,X2,function(){for(var e5=arguments.length,t4=new Array(e5);e5--;)t4[e5]=arguments[e5];n4.subscribers.forEach(function(e6){v(function(){e6.apply(null,t4)})})})}})}}function pt(e2,t2){return o(t2).from({prototype:e2}),t2}function yt(e2,t2){return!(e2.filter||e2.algorithm||e2.or)&&(t2?e2.justLimit:!e2.replayFilter)}function vt(e2,t2){e2.filter=it(e2.filter,t2)}function mt(e2,t2,n2){var r3=e2.replayFilter;e2.replayFilter=r3?function(){return it(r3(),t2())}:t2,e2.justLimit=n2&&!r3}function bt(e2,t2){
if(e2.isPrimKey)return t2.primaryKey;var n2=t2.getIndexByKeyPath(e2.index);if(!n2)throw new Y.Schema("KeyPath "+e2.index+" on object store "+t2.name+" is not indexed");return n2}function gt(e2,t2,n2){var r3=bt(e2,t2.schema);return t2.openCursor({trans:n2,values:!e2.keysOnly,reverse:e2.dir==="prev",unique:!!e2.unique,query:{index:r3,range:e2.range}})}function wt(e2,o2,t2,n2){var a2=e2.replayFilter?it(e2.filter,e2.replayFilter()):e2.filter;if(e2.or){var u2={},r3=function(e3,t3,n3){var r4,i2;a2&&!a2(
t3,n3,function(e4){return t3.stop(e4)},function(e4){return t3.fail(e4)})||((i2=""+(r4=t3.primaryKey))=="[object ArrayBuffer]"&&(i2=""+new Uint8Array(r4)),m(u2,i2)||(u2[i2]=!0,o2(e3,t3,n3)))};return Promise.all([e2.or._iterate(r3,t2),_t(gt(e2,n2,t2),e2.algorithm,r3,!e2.keysOnly&&e2.valueMapper)])}return _t(gt(e2,n2,t2),it(e2.algorithm,a2),o2,!e2.keysOnly&&e2.valueMapper)}function _t(e2,r3,i2,o2){var a2=qe(o2?function(e3,t2,n2){return i2(o2(e3),t2,n2)}:i2);return e2.then(function(n2){if(n2)return n2.
start(function(){var t2=function(){return n2.continue()};r3&&!r3(n2,function(e3){return t2=e3},function(e3){n2.stop(e3),t2=G},function(e3){n2.fail(e3),t2=G})||a2(n2.value,n2,function(e3){return t2=e3}),t2()})})}var xt=(kt.prototype.execute=function(e2){var t2=this["@@propmod"];if(t2.add!==void 0){var n2=t2.add;if(k(n2))return i(i([],k(e2)?e2:[],!0),n2).sort();if(typeof n2=="number")return(Number(e2)||0)+n2;if(typeof n2=="bigint")try{return BigInt(e2)+n2}catch{return BigInt(0)+n2}throw new TypeError(
"Invalid term ".concat(n2))}if(t2.remove!==void 0){var r3=t2.remove;if(k(r3))return k(e2)?e2.filter(function(e3){return!r3.includes(e3)}).sort():[];if(typeof r3=="number")return Number(e2)-r3;if(typeof r3=="bigint")try{return BigInt(e2)-r3}catch{return BigInt(0)-r3}throw new TypeError("Invalid subtrahend ".concat(r3))}return n2=(n2=t2.replacePrefix)===null||n2===void 0?void 0:n2[0],n2&&typeof e2=="string"&&e2.startsWith(n2)?t2.replacePrefix[1]+e2.substring(n2.length):e2},kt);function kt(e2){this["\
@@propmod"]=e2}var Ot=(Pt.prototype._read=function(e2,t2){var n2=this._ctx;return n2.error?n2.table._trans(null,Xe.bind(null,n2.error)):n2.table._trans("readonly",e2).then(t2)},Pt.prototype._write=function(e2){var t2=this._ctx;return t2.error?t2.table._trans(null,Xe.bind(null,t2.error)):t2.table._trans("readwrite",e2,"locked")},Pt.prototype._addAlgorithm=function(e2){var t2=this._ctx;t2.algorithm=it(t2.algorithm,e2)},Pt.prototype._iterate=function(e2,t2){return wt(this._ctx,e2,t2,this._ctx.table.
core)},Pt.prototype.clone=function(e2){var t2=Object.create(this.constructor.prototype),n2=Object.create(this._ctx);return e2&&a(n2,e2),t2._ctx=n2,t2},Pt.prototype.raw=function(){return this._ctx.valueMapper=null,this},Pt.prototype.each=function(t2){var n2=this._ctx;return this._read(function(e2){return wt(n2,t2,e2,n2.table.core)})},Pt.prototype.count=function(e2){var i2=this;return this._read(function(e3){var t2=i2._ctx,n2=t2.table.core;if(yt(t2,!0))return n2.count({trans:e3,query:{index:bt(t2,
n2.schema),range:t2.range}}).then(function(e4){return Math.min(e4,t2.limit)});var r3=0;return wt(t2,function(){return++r3,!1},e3,n2).then(function(){return r3})}).then(e2)},Pt.prototype.sortBy=function(e2,t2){var n2=e2.split(".").reverse(),r3=n2[0],i2=n2.length-1;function o2(e3,t3){return t3?o2(e3[n2[t3]],t3-1):e3[r3]}var a2=this._ctx.dir==="next"?1:-1;function u2(e3,t3){return st(o2(e3,i2),o2(t3,i2))*a2}return this.toArray(function(e3){return e3.sort(u2)}).then(t2)},Pt.prototype.toArray=function(e2){
var o2=this;return this._read(function(e3){var t2=o2._ctx;if(t2.dir==="next"&&yt(t2,!0)&&0<t2.limit){var n2=t2.valueMapper,r3=bt(t2,t2.table.core.schema);return t2.table.core.query({trans:e3,limit:t2.limit,values:!0,query:{index:r3,range:t2.range}}).then(function(e4){return e4=e4.result,n2?e4.map(n2):e4})}var i2=[];return wt(t2,function(e4){return i2.push(e4)},e3,t2.table.core).then(function(){return i2})},e2)},Pt.prototype.offset=function(t2){var e2=this._ctx;return t2<=0||(e2.offset+=t2,yt(e2)?
mt(e2,function(){var n2=t2;return function(e3,t3){return n2===0||(n2===1?--n2:t3(function(){e3.advance(n2),n2=0}),!1)}}):mt(e2,function(){var e3=t2;return function(){return--e3<0}})),this},Pt.prototype.limit=function(e2){return this._ctx.limit=Math.min(this._ctx.limit,e2),mt(this._ctx,function(){var r3=e2;return function(e3,t2,n2){return--r3<=0&&t2(n2),0<=r3}},!0),this},Pt.prototype.until=function(r3,i2){return vt(this._ctx,function(e2,t2,n2){return!r3(e2.value)||(t2(n2),i2)}),this},Pt.prototype.
first=function(e2){return this.limit(1).toArray(function(e3){return e3[0]}).then(e2)},Pt.prototype.last=function(e2){return this.reverse().first(e2)},Pt.prototype.filter=function(t2){var e2;return vt(this._ctx,function(e3){return t2(e3.value)}),(e2=this._ctx).isMatch=it(e2.isMatch,t2),this},Pt.prototype.and=function(e2){return this.filter(e2)},Pt.prototype.or=function(e2){return new this.db.WhereClause(this._ctx.table,e2,this)},Pt.prototype.reverse=function(){return this._ctx.dir=this._ctx.dir===
"prev"?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this},Pt.prototype.desc=function(){return this.reverse()},Pt.prototype.eachKey=function(n2){var e2=this._ctx;return e2.keysOnly=!e2.isMatch,this.each(function(e3,t2){n2(t2.key,t2)})},Pt.prototype.eachUniqueKey=function(e2){return this._ctx.unique="unique",this.eachKey(e2)},Pt.prototype.eachPrimaryKey=function(n2){var e2=this._ctx;return e2.keysOnly=!e2.isMatch,this.each(function(e3,t2){n2(t2.primaryKey,t2)})},Pt.
prototype.keys=function(e2){var t2=this._ctx;t2.keysOnly=!t2.isMatch;var n2=[];return this.each(function(e3,t3){n2.push(t3.key)}).then(function(){return n2}).then(e2)},Pt.prototype.primaryKeys=function(e2){var n2=this._ctx;if(n2.dir==="next"&&yt(n2,!0)&&0<n2.limit)return this._read(function(e3){var t2=bt(n2,n2.table.core.schema);return n2.table.core.query({trans:e3,values:!1,limit:n2.limit,query:{index:t2,range:n2.range}})}).then(function(e3){return e3.result}).then(e2);n2.keysOnly=!n2.isMatch;var r3=[];
return this.each(function(e3,t2){r3.push(t2.primaryKey)}).then(function(){return r3}).then(e2)},Pt.prototype.uniqueKeys=function(e2){return this._ctx.unique="unique",this.keys(e2)},Pt.prototype.firstKey=function(e2){return this.limit(1).keys(function(e3){return e3[0]}).then(e2)},Pt.prototype.lastKey=function(e2){return this.reverse().firstKey(e2)},Pt.prototype.distinct=function(){var e2=this._ctx,e2=e2.index&&e2.table.schema.idxByName[e2.index];if(!e2||!e2.multi)return this;var n2={};return vt(this.
_ctx,function(e3){var t2=e3.primaryKey.toString(),e3=m(n2,t2);return n2[t2]=!0,!e3}),this},Pt.prototype.modify=function(w2){var n2=this,r3=this._ctx;return this._write(function(d3){var a2,u2,p3;p3=typeof w2=="function"?w2:(a2=x(w2),u2=a2.length,function(e3){for(var t3=!1,n3=0;n3<u2;++n3){var r4=a2[n3],i2=w2[r4],o2=O(e3,r4);i2 instanceof xt?(P(e3,r4,i2.execute(o2)),t3=!0):o2!==i2&&(P(e3,r4,i2),t3=!0)}return t3});var y2=r3.table.core,e2=y2.schema.primaryKey,v2=e2.outbound,m2=e2.extractKey,b2=200,e2=n2.
db._options.modifyChunkSize;e2&&(b2=typeof e2=="object"?e2[y2.name]||e2["*"]||200:e2);function g2(e3,t3){var n3=t3.failures,t3=t3.numFailures;c3+=e3-t3;for(var r4=0,i2=x(n3);r4<i2.length;r4++){var o2=i2[r4];s3.push(n3[o2])}}var s3=[],c3=0,t2=[];return n2.clone().primaryKeys().then(function(l2){function f2(s4){var c4=Math.min(b2,l2.length-s4);return y2.getMany({trans:d3,keys:l2.slice(s4,s4+c4),cache:"immutable"}).then(function(e3){for(var n3=[],t3=[],r4=v2?[]:null,i2=[],o2=0;o2<c4;++o2){var a3=e3[o2],
u3={value:S2(a3),primKey:l2[s4+o2]};p3.call(u3,u3.value,u3)!==!1&&(u3.value==null?i2.push(l2[s4+o2]):v2||st(m2(a3),m2(u3.value))===0?(t3.push(u3.value),v2&&r4.push(l2[s4+o2])):(i2.push(l2[s4+o2]),n3.push(u3.value)))}return Promise.resolve(0<n3.length&&y2.mutate({trans:d3,type:"add",values:n3}).then(function(e4){for(var t4 in e4.failures)i2.splice(parseInt(t4),1);g2(n3.length,e4)})).then(function(){return(0<t3.length||h3&&typeof w2=="object")&&y2.mutate({trans:d3,type:"put",keys:r4,values:t3,criteria:h3,
changeSpec:typeof w2!="function"&&w2,isAdditionalChunk:0<s4}).then(function(e4){return g2(t3.length,e4)})}).then(function(){return(0<i2.length||h3&&w2===Kt)&&y2.mutate({trans:d3,type:"delete",keys:i2,criteria:h3,isAdditionalChunk:0<s4}).then(function(e4){return g2(i2.length,e4)})}).then(function(){return l2.length>s4+c4&&f2(s4+b2)})})}var h3=yt(r3)&&r3.limit===1/0&&(typeof w2!="function"||w2===Kt)&&{index:r3.index,range:r3.range};return f2(0).then(function(){if(0<s3.length)throw new U("Error mod\
ifying one or more objects",s3,c3,t2);return l2.length})})})},Pt.prototype.delete=function(){var i2=this._ctx,n2=i2.range;return yt(i2)&&(i2.isPrimKey||n2.type===3)?this._write(function(e2){var t2=i2.table.core.schema.primaryKey,r3=n2;return i2.table.core.count({trans:e2,query:{index:t2,range:r3}}).then(function(n3){return i2.table.core.mutate({trans:e2,type:"deleteRange",range:r3}).then(function(e3){var t3=e3.failures;if(e3.lastResult,e3.results,e3=e3.numFailures,e3)throw new U("Could not delet\
e some values",Object.keys(t3).map(function(e4){return t3[e4]}),n3-e3);return n3-e3})})}):this.modify(Kt)},Pt);function Pt(){}var Kt=function(e2,t2){return t2.value=null};function Et(e2,t2){return e2<t2?-1:e2===t2?0:1}function St(e2,t2){return t2<e2?-1:e2===t2?0:1}function jt(e2,t2,n2){return e2=e2 instanceof Dt?new e2.Collection(e2):e2,e2._ctx.error=new(n2||TypeError)(t2),e2}function At(e2){return new e2.Collection(e2,function(){return qt("")}).limit(0)}function Ct(e2,s3,n2,r3){var i2,c3,l2,f2,
h3,d3,p3,y2=n2.length;if(!n2.every(function(e3){return typeof e3=="string"}))return jt(e2,Ze);function t2(e3){i2=e3==="next"?function(e4){return e4.toUpperCase()}:function(e4){return e4.toLowerCase()},c3=e3==="next"?function(e4){return e4.toLowerCase()}:function(e4){return e4.toUpperCase()},l2=e3==="next"?Et:St;var t3=n2.map(function(e4){return{lower:c3(e4),upper:i2(e4)}}).sort(function(e4,t4){return l2(e4.lower,t4.lower)});f2=t3.map(function(e4){return e4.upper}),h3=t3.map(function(e4){return e4.
lower}),p3=(d3=e3)==="next"?"":r3}t2("next"),e2=new e2.Collection(e2,function(){return Tt(f2[0],h3[y2-1]+r3)}),e2._ondirectionchange=function(e3){t2(e3)};var v2=0;return e2._addAlgorithm(function(e3,t3,n3){var r4=e3.key;if(typeof r4!="string")return!1;var i3=c3(r4);if(s3(i3,h3,v2))return!0;for(var o2=null,a2=v2;a2<y2;++a2){var u2=(function(e4,t4,n4,r5,i4,o3){for(var a3=Math.min(e4.length,r5.length),u3=-1,s4=0;s4<a3;++s4){var c4=t4[s4];if(c4!==r5[s4])return i4(e4[s4],n4[s4])<0?e4.substr(0,s4)+n4[s4]+
n4.substr(s4+1):i4(e4[s4],r5[s4])<0?e4.substr(0,s4)+r5[s4]+n4.substr(s4+1):0<=u3?e4.substr(0,u3)+t4[u3]+n4.substr(u3+1):null;i4(e4[s4],c4)<0&&(u3=s4)}return a3<r5.length&&o3==="next"?e4+n4.substr(e4.length):a3<e4.length&&o3==="prev"?e4.substr(0,n4.length):u3<0?null:e4.substr(0,u3)+r5[u3]+n4.substr(u3+1)})(r4,i3,f2[a2],h3[a2],l2,d3);u2===null&&o2===null?v2=a2+1:(o2===null||0<l2(o2,u2))&&(o2=u2)}return t3(o2!==null?function(){e3.continue(o2+p3)}:n3),!1}),e2}function Tt(e2,t2,n2,r3){return{type:2,lower:e2,
upper:t2,lowerOpen:n2,upperOpen:r3}}function qt(e2){return{type:1,lower:e2,upper:e2}}var Dt=(Object.defineProperty(It.prototype,"Collection",{get:function(){return this._ctx.table.db.Collection},enumerable:!1,configurable:!0}),It.prototype.between=function(e2,t2,n2,r3){n2=n2!==!1,r3=r3===!0;try{return 0<this._cmp(e2,t2)||this._cmp(e2,t2)===0&&(n2||r3)&&(!n2||!r3)?At(this):new this.Collection(this,function(){return Tt(e2,t2,!n2,!r3)})}catch{return jt(this,Je)}},It.prototype.equals=function(e2){return e2==
null?jt(this,Je):new this.Collection(this,function(){return qt(e2)})},It.prototype.above=function(e2){return e2==null?jt(this,Je):new this.Collection(this,function(){return Tt(e2,void 0,!0)})},It.prototype.aboveOrEqual=function(e2){return e2==null?jt(this,Je):new this.Collection(this,function(){return Tt(e2,void 0,!1)})},It.prototype.below=function(e2){return e2==null?jt(this,Je):new this.Collection(this,function(){return Tt(void 0,e2,!1,!0)})},It.prototype.belowOrEqual=function(e2){return e2==null?
jt(this,Je):new this.Collection(this,function(){return Tt(void 0,e2)})},It.prototype.startsWith=function(e2){return typeof e2!="string"?jt(this,Ze):this.between(e2,e2+He,!0,!0)},It.prototype.startsWithIgnoreCase=function(e2){return e2===""?this.startsWith(e2):Ct(this,function(e3,t2){return e3.indexOf(t2[0])===0},[e2],He)},It.prototype.equalsIgnoreCase=function(e2){return Ct(this,function(e3,t2){return e3===t2[0]},[e2],"")},It.prototype.anyOfIgnoreCase=function(){var e2=I.apply(D2,arguments);return e2.
length===0?At(this):Ct(this,function(e3,t2){return t2.indexOf(e3)!==-1},e2,"")},It.prototype.startsWithAnyOfIgnoreCase=function(){var e2=I.apply(D2,arguments);return e2.length===0?At(this):Ct(this,function(t2,e3){return e3.some(function(e4){return t2.indexOf(e4)===0})},e2,He)},It.prototype.anyOf=function(){var t2=this,i2=I.apply(D2,arguments),o2=this._cmp;try{i2.sort(o2)}catch{return jt(this,Je)}if(i2.length===0)return At(this);var e2=new this.Collection(this,function(){return Tt(i2[0],i2[i2.length-
1])});e2._ondirectionchange=function(e3){o2=e3==="next"?t2._ascending:t2._descending,i2.sort(o2)};var a2=0;return e2._addAlgorithm(function(e3,t3,n2){for(var r3=e3.key;0<o2(r3,i2[a2]);)if(++a2===i2.length)return t3(n2),!1;return o2(r3,i2[a2])===0||(t3(function(){e3.continue(i2[a2])}),!1)}),e2},It.prototype.notEqual=function(e2){return this.inAnyRange([[-1/0,e2],[e2,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})},It.prototype.noneOf=function(){var e2=I.apply(D2,arguments);if(e2.length===0)
return new this.Collection(this);try{e2.sort(this._ascending)}catch{return jt(this,Je)}var t2=e2.reduce(function(e3,t3){return e3?e3.concat([[e3[e3.length-1][1],t3]]):[[-1/0,t3]]},null);return t2.push([e2[e2.length-1],this.db._maxKey]),this.inAnyRange(t2,{includeLowers:!1,includeUppers:!1})},It.prototype.inAnyRange=function(e2,t2){var o2=this,a2=this._cmp,u2=this._ascending,n2=this._descending,s3=this._min,c3=this._max;if(e2.length===0)return At(this);if(!e2.every(function(e3){return e3[0]!==void 0&&
e3[1]!==void 0&&u2(e3[0],e3[1])<=0}))return jt(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",Y.InvalidArgument);var r3=!t2||t2.includeLowers!==!1,i2=t2&&t2.includeUppers===!0,l2,f2=u2;function h3(e3,t3){return f2(e3[0],t3[0])}try{(l2=e2.reduce(function(e3,t3){for(var n3=0,r4=e3.length;n3<r4;++n3){var i3=e3[n3];if(a2(t3[0],i3[1])<0&&0<a2(t3[1],i3[0])){i3[0]=s3(i3[0],t3[0]),i3[1]=c3(i3[1],t3[1]);break}}return n3===
r4&&e3.push(t3),e3},[])).sort(h3)}catch{return jt(this,Je)}var d3=0,p3=i2?function(e3){return 0<u2(e3,l2[d3][1])}:function(e3){return 0<=u2(e3,l2[d3][1])},y2=r3?function(e3){return 0<n2(e3,l2[d3][0])}:function(e3){return 0<=n2(e3,l2[d3][0])},v2=p3,e2=new this.Collection(this,function(){return Tt(l2[0][0],l2[l2.length-1][1],!r3,!i2)});return e2._ondirectionchange=function(e3){f2=e3==="next"?(v2=p3,u2):(v2=y2,n2),l2.sort(h3)},e2._addAlgorithm(function(e3,t3,n3){for(var r4,i3=e3.key;v2(i3);)if(++d3===
l2.length)return t3(n3),!1;return!p3(r4=i3)&&!y2(r4)||(o2._cmp(i3,l2[d3][1])===0||o2._cmp(i3,l2[d3][0])===0||t3(function(){f2===u2?e3.continue(l2[d3][0]):e3.continue(l2[d3][1])}),!1)}),e2},It.prototype.startsWithAnyOf=function(){var e2=I.apply(D2,arguments);return e2.every(function(e3){return typeof e3=="string"})?e2.length===0?At(this):this.inAnyRange(e2.map(function(e3){return[e3,e3+He]})):jt(this,"startsWithAnyOf() only works with strings")},It);function It(){}function Bt(t2){return qe(function(e2){
return Rt(e2),t2(e2.target.error),!1})}function Rt(e2){e2.stopPropagation&&e2.stopPropagation(),e2.preventDefault&&e2.preventDefault()}var Ft="storagemutated",Mt="x-storagemutated-1",Nt=dt2(null,Ft),Lt=(Ut.prototype._lock=function(){return y(!me.global),++this._reculock,this._reculock!==1||me.global||(me.lockOwnerFor=this),this},Ut.prototype._unlock=function(){if(y(!me.global),--this._reculock==0)for(me.global||(me.lockOwnerFor=null);0<this._blockedFuncs.length&&!this._locked();){var e2=this._blockedFuncs.
shift();try{$e(e2[1],e2[0])}catch{}}return this},Ut.prototype._locked=function(){return this._reculock&&me.lockOwnerFor!==this},Ut.prototype.create=function(t2){var n2=this;if(!this.mode)return this;var e2=this.db.idbdb,r3=this.db._state.dbOpenError;if(y(!this.idbtrans),!t2&&!e2)switch(r3&&r3.name){case"DatabaseClosedError":throw new Y.DatabaseClosed(r3);case"MissingAPIError":throw new Y.MissingAPI(r3.message,r3);default:throw new Y.OpenFailed(r3)}if(!this.active)throw new Y.TransactionInactive;
return y(this._completion._state===null),(t2=this.idbtrans=t2||(this.db.core||e2).transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability})).onerror=qe(function(e3){Rt(e3),n2._reject(t2.error)}),t2.onabort=qe(function(e3){Rt(e3),n2.active&&n2._reject(new Y.Abort(t2.error)),n2.active=!1,n2.on("abort").fire(e3)}),t2.oncomplete=qe(function(){n2.active=!1,n2._resolve(),"mutatedParts"in t2&&Nt.storagemutated.fire(t2.mutatedParts)}),this},Ut.prototype._promise=function(n2,r3,i2){
var o2=this;if(n2==="readwrite"&&this.mode!=="readwrite")return Xe(new Y.ReadOnly("Transaction is readonly"));if(!this.active)return Xe(new Y.TransactionInactive);if(this._locked())return new _e(function(e3,t2){o2._blockedFuncs.push([function(){o2._promise(n2,r3,i2).then(e3,t2)},me])});if(i2)return Ne(function(){var e3=new _e(function(e4,t2){o2._lock();var n3=r3(e4,t2,o2);n3&&n3.then&&n3.then(e4,t2)});return e3.finally(function(){return o2._unlock()}),e3._lib=!0,e3});var e2=new _e(function(e3,t2){
var n3=r3(e3,t2,o2);n3&&n3.then&&n3.then(e3,t2)});return e2._lib=!0,e2},Ut.prototype._root=function(){return this.parent?this.parent._root():this},Ut.prototype.waitFor=function(e2){var t2,r3=this._root(),i2=_e.resolve(e2);r3._waitingFor?r3._waitingFor=r3._waitingFor.then(function(){return i2}):(r3._waitingFor=i2,r3._waitingQueue=[],t2=r3.idbtrans.objectStore(r3.storeNames[0]),(function e3(){for(++r3._spinCount;r3._waitingQueue.length;)r3._waitingQueue.shift()();r3._waitingFor&&(t2.get(-1/0).onsuccess=
e3)})());var o2=r3._waitingFor;return new _e(function(t3,n2){i2.then(function(e3){return r3._waitingQueue.push(qe(t3.bind(null,e3)))},function(e3){return r3._waitingQueue.push(qe(n2.bind(null,e3)))}).finally(function(){r3._waitingFor===o2&&(r3._waitingFor=null)})})},Ut.prototype.abort=function(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new Y.Abort))},Ut.prototype.table=function(e2){var t2=this._memoizedTables||(this._memoizedTables={});if(m(t2,e2))return t2[e2];
var n2=this.schema[e2];if(!n2)throw new Y.NotFound("Table "+e2+" not part of transaction");return n2=new this.db.Table(e2,n2,this),n2.core=this.db.core.table(e2),t2[e2]=n2},Ut);function Ut(){}function Vt(e2,t2,n2,r3,i2,o2,a2){return{name:e2,keyPath:t2,unique:n2,multi:r3,auto:i2,compound:o2,src:(n2&&!a2?"&":"")+(r3?"*":"")+(i2?"++":"")+zt(t2)}}function zt(e2){return typeof e2=="string"?e2:e2?"["+[].join.call(e2,"+")+"]":""}function Wt(e2,t2,n2){return{name:e2,primKey:t2,indexes:n2,mappedClass:null,
idxByName:(r3=function(e3){return[e3.name,e3]},n2.reduce(function(e3,t3,n3){return n3=r3(t3,n3),n3&&(e3[n3[0]]=n3[1]),e3},{}))};var r3}var Yt=function(e2){try{return e2.only([[]]),Yt=function(){return[[]]},[[]]}catch{return Yt=function(){return He},He}};function $t(t2){return t2==null?function(){}:typeof t2=="string"?(n2=t2).split(".").length===1?function(e2){return e2[n2]}:function(e2){return O(e2,n2)}:function(e2){return O(e2,t2)};var n2}function Qt(e2){return[].slice.call(e2)}var Gt=0;function Xt(e2){
return e2==null?":id":typeof e2=="string"?e2:"[".concat(e2.join("+"),"]")}function Ht(e2,i2,t2){function _8(e3){if(e3.type===3)return null;if(e3.type===4)throw new Error("Cannot convert never type to IDBKeyRange");var t3=e3.lower,n3=e3.upper,r4=e3.lowerOpen,e3=e3.upperOpen;return t3===void 0?n3===void 0?null:i2.upperBound(n3,!!e3):n3===void 0?i2.lowerBound(t3,!!r4):i2.bound(t3,n3,!!r4,!!e3)}function n2(e3){var h3,w2=e3.name;return{name:w2,schema:e3,mutate:function(e4){var y2=e4.trans,v2=e4.type,
m2=e4.keys,b2=e4.values,g2=e4.range;return new Promise(function(t3,e5){t3=qe(t3);var n3=y2.objectStore(w2),r4=n3.keyPath==null,i3=v2==="put"||v2==="add";if(!i3&&v2!=="delete"&&v2!=="deleteRange")throw new Error("Invalid operation type: "+v2);var o3,a3=(m2||b2||{length:1}).length;if(m2&&b2&&m2.length!==b2.length)throw new Error("Given keys array must have same length as given values array.");if(a3===0)return t3({numFailures:0,failures:{},results:[],lastResult:void 0});function u3(e6){++l2,Rt(e6)}
var s4=[],c4=[],l2=0;if(v2==="deleteRange"){if(g2.type===4)return t3({numFailures:l2,failures:c4,results:[],lastResult:void 0});g2.type===3?s4.push(o3=n3.clear()):s4.push(o3=n3.delete(_8(g2)))}else{var r4=i3?r4?[b2,m2]:[b2,null]:[m2,null],f2=r4[0],h4=r4[1];if(i3)for(var d3=0;d3<a3;++d3)s4.push(o3=h4&&h4[d3]!==void 0?n3[v2](f2[d3],h4[d3]):n3[v2](f2[d3])),o3.onerror=u3;else for(d3=0;d3<a3;++d3)s4.push(o3=n3[v2](f2[d3])),o3.onerror=u3}function p3(e6){e6=e6.target.result,s4.forEach(function(e7,t4){return e7.
error!=null&&(c4[t4]=e7.error)}),t3({numFailures:l2,failures:c4,results:v2==="delete"?m2:s4.map(function(e7){return e7.result}),lastResult:e6})}o3.onerror=function(e6){u3(e6),p3(e6)},o3.onsuccess=p3})},getMany:function(e4){var f2=e4.trans,h4=e4.keys;return new Promise(function(t3,e5){t3=qe(t3);for(var n3,r4=f2.objectStore(w2),i3=h4.length,o3=new Array(i3),a3=0,u3=0,s4=function(e6){e6=e6.target,o3[e6._pos]=e6.result,++u3===a3&&t3(o3)},c4=Bt(e5),l2=0;l2<i3;++l2)h4[l2]!=null&&((n3=r4.get(h4[l2]))._pos=
l2,n3.onsuccess=s4,n3.onerror=c4,++a3);a3===0&&t3(o3)})},get:function(e4){var r4=e4.trans,i3=e4.key;return new Promise(function(t3,e5){t3=qe(t3);var n3=r4.objectStore(w2).get(i3);n3.onsuccess=function(e6){return t3(e6.target.result)},n3.onerror=Bt(e5)})},query:(h3=s3,function(f2){return new Promise(function(n3,e4){n3=qe(n3);var r4,i3,o3,t3=f2.trans,a3=f2.values,u3=f2.limit,s4=f2.query,c4=u3===1/0?void 0:u3,l2=s4.index,s4=s4.range,t3=t3.objectStore(w2),l2=l2.isPrimaryKey?t3:t3.index(l2.name),s4=_8(
s4);if(u3===0)return n3({result:[]});h3?((c4=a3?l2.getAll(s4,c4):l2.getAllKeys(s4,c4)).onsuccess=function(e5){return n3({result:e5.target.result})},c4.onerror=Bt(e4)):(r4=0,i3=!a3&&"openKeyCursor"in l2?l2.openKeyCursor(s4):l2.openCursor(s4),o3=[],i3.onsuccess=function(e5){var t4=i3.result;return t4?(o3.push(a3?t4.value:t4.primaryKey),++r4===u3?n3({result:o3}):void t4.continue()):n3({result:o3})},i3.onerror=Bt(e4))})}),openCursor:function(e4){var c4=e4.trans,o3=e4.values,a3=e4.query,u3=e4.reverse,
l2=e4.unique;return new Promise(function(t3,n3){t3=qe(t3);var e5=a3.index,r4=a3.range,i3=c4.objectStore(w2),i3=e5.isPrimaryKey?i3:i3.index(e5.name),e5=u3?l2?"prevunique":"prev":l2?"nextunique":"next",s4=!o3&&"openKeyCursor"in i3?i3.openKeyCursor(_8(r4),e5):i3.openCursor(_8(r4),e5);s4.onerror=Bt(n3),s4.onsuccess=qe(function(e6){var r5,i4,o4,a4,u4=s4.result;u4?(u4.___id=++Gt,u4.done=!1,r5=u4.continue.bind(u4),i4=(i4=u4.continuePrimaryKey)&&i4.bind(u4),o4=u4.advance.bind(u4),a4=function(){throw new Error(
"Cursor not stopped")},u4.trans=c4,u4.stop=u4.continue=u4.continuePrimaryKey=u4.advance=function(){throw new Error("Cursor not started")},u4.fail=qe(n3),u4.next=function(){var e7=this,t4=1;return this.start(function(){return t4--?e7.continue():e7.stop()}).then(function(){return e7})},u4.start=function(e7){function t4(){if(s4.result)try{e7()}catch(e8){u4.fail(e8)}else u4.done=!0,u4.start=function(){throw new Error("Cursor behind last entry")},u4.stop()}var n4=new Promise(function(t5,e8){t5=qe(t5),
s4.onerror=Bt(e8),u4.fail=e8,u4.stop=function(e9){u4.stop=u4.continue=u4.continuePrimaryKey=u4.advance=a4,t5(e9)}});return s4.onsuccess=qe(function(e8){s4.onsuccess=t4,t4()}),u4.continue=r5,u4.continuePrimaryKey=i4,u4.advance=o4,t4(),n4},t3(u4)):t3(null)},n3)})},count:function(e4){var t3=e4.query,i3=e4.trans,o3=t3.index,a3=t3.range;return new Promise(function(t4,e5){var n3=i3.objectStore(w2),r4=o3.isPrimaryKey?n3:n3.index(o3.name),n3=_8(a3),r4=n3?r4.count(n3):r4.count();r4.onsuccess=qe(function(e6){
return t4(e6.target.result)}),r4.onerror=Bt(e5)})}}}var r3,o2,a2,u2=(o2=t2,a2=Qt((r3=e2).objectStoreNames),{schema:{name:r3.name,tables:a2.map(function(e3){return o2.objectStore(e3)}).map(function(t3){var e3=t3.keyPath,n3=t3.autoIncrement,r4=k(e3),i3={},n3={name:t3.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:e3==null,compound:r4,keyPath:e3,autoIncrement:n3,unique:!0,extractKey:$t(e3)},indexes:Qt(t3.indexNames).map(function(e4){return t3.index(e4)}).map(function(e4){var t4=e4.name,n4=e4.unique,
r5=e4.multiEntry,e4=e4.keyPath,r5={name:t4,compound:k(e4),keyPath:e4,unique:n4,multiEntry:r5,extractKey:$t(e4)};return i3[Xt(e4)]=r5}),getIndexByKeyPath:function(e4){return i3[Xt(e4)]}};return i3[":id"]=n3.primaryKey,e3!=null&&(i3[Xt(e3)]=n3.primaryKey),n3})},hasGetAll:0<a2.length&&"getAll"in o2.objectStore(a2[0])&&!(typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}),t2=u2.schema,
s3=u2.hasGetAll,u2=t2.tables.map(n2),c3={};return u2.forEach(function(e3){return c3[e3.name]=e3}),{stack:"dbcore",transaction:e2.transaction.bind(e2),table:function(e3){if(!c3[e3])throw new Error("Table '".concat(e3,"' not found"));return c3[e3]},MIN_KEY:-1/0,MAX_KEY:Yt(i2),schema:t2}}function Jt(e2,t2,n2,r3){var i2=n2.IDBKeyRange;return n2.indexedDB,{dbcore:(r3=Ht(t2,i2,r3),e2.dbcore.reduce(function(e3,t3){return t3=t3.create,_(_({},e3),t3(e3))},r3))}}function Zt(n2,e2){var t2=e2.db,e2=Jt(n2._middlewares,
t2,n2._deps,e2);n2.core=e2.dbcore,n2.tables.forEach(function(e3){var t3=e3.name;n2.core.schema.tables.some(function(e4){return e4.name===t3})&&(e3.core=n2.core.table(t3),n2[t3]instanceof n2.Table&&(n2[t3].core=e3.core))})}function en(i2,e2,t2,o2){t2.forEach(function(n2){var r3=o2[n2];e2.forEach(function(e3){var t3=(function e4(t4,n3){return h2(t4,n3)||(t4=c2(t4))&&e4(t4,n3)})(e3,n2);(!t3||"value"in t3&&t3.value===void 0)&&(e3===i2.Transaction.prototype||e3 instanceof i2.Transaction?l(e3,n2,{get:function(){
return this.table(n2)},set:function(e4){u(this,n2,{value:e4,writable:!0,configurable:!0,enumerable:!0})}}):e3[n2]=new i2.Table(n2,r3))})})}function tn(n2,e2){e2.forEach(function(e3){for(var t2 in e3)e3[t2]instanceof n2.Table&&delete e3[t2]})}function nn(e2,t2){return e2._cfg.version-t2._cfg.version}function rn(n2,r3,i2,e2){var o2=n2._dbSchema;i2.objectStoreNames.contains("$meta")&&!o2.$meta&&(o2.$meta=Wt("$meta",hn("")[0],[]),n2._storeNames.push("$meta"));var a2=n2._createTransaction("readwrite",
n2._storeNames,o2);a2.create(i2),a2._completion.catch(e2);var u2=a2._reject.bind(a2),s3=me.transless||me;Ne(function(){return me.trans=a2,me.transless=s3,r3!==0?(Zt(n2,i2),t2=r3,((e3=a2).storeNames.includes("$meta")?e3.table("$meta").get("version").then(function(e4){return e4??t2}):_e.resolve(t2)).then(function(e4){return c3=e4,l2=a2,f2=i2,t3=[],e4=(s4=n2)._versions,h3=s4._dbSchema=ln(0,s4.idbdb,f2),(e4=e4.filter(function(e5){return e5._cfg.version>=c3})).length!==0?(e4.forEach(function(u3){t3.push(
function(){var t4=h3,e5=u3._cfg.dbschema;fn(s4,t4,f2),fn(s4,e5,f2),h3=s4._dbSchema=e5;var n3=an(t4,e5);n3.add.forEach(function(e6){un(f2,e6[0],e6[1].primKey,e6[1].indexes)}),n3.change.forEach(function(e6){if(e6.recreate)throw new Y.Upgrade("Not yet support for changing primary key");var t5=f2.objectStore(e6.name);e6.add.forEach(function(e7){return cn2(t5,e7)}),e6.change.forEach(function(e7){t5.deleteIndex(e7.name),cn2(t5,e7)}),e6.del.forEach(function(e7){return t5.deleteIndex(e7)})});var r4=u3._cfg.
contentUpgrade;if(r4&&u3._cfg.version>c3){Zt(s4,f2),l2._memoizedTables={};var i3=g(e5);n3.del.forEach(function(e6){i3[e6]=t4[e6]}),tn(s4,[s4.Transaction.prototype]),en(s4,[s4.Transaction.prototype],x(i3),i3),l2.schema=i3;var o3,a3=B(r4);return a3&&Le(),n3=_e.follow(function(){var e6;(o3=r4(l2))&&a3&&(e6=Ue.bind(null,null),o3.then(e6,e6))}),o3&&typeof o3.then=="function"?_e.resolve(o3):n3.then(function(){return o3})}}),t3.push(function(e5){var t4,n3,r4=u3._cfg.dbschema;t4=r4,n3=e5,[].slice.call(n3.
db.objectStoreNames).forEach(function(e6){return t4[e6]==null&&n3.db.deleteObjectStore(e6)}),tn(s4,[s4.Transaction.prototype]),en(s4,[s4.Transaction.prototype],s4._storeNames,s4._dbSchema),l2.schema=s4._dbSchema}),t3.push(function(e5){s4.idbdb.objectStoreNames.contains("$meta")&&(Math.ceil(s4.idbdb.version/10)===u3._cfg.version?(s4.idbdb.deleteObjectStore("$meta"),delete s4._dbSchema.$meta,s4._storeNames=s4._storeNames.filter(function(e6){return e6!=="$meta"})):e5.objectStore("$meta").put(u3._cfg.
version,"version"))})}),(function e5(){return t3.length?_e.resolve(t3.shift()(l2.idbtrans)).then(e5):_e.resolve()})().then(function(){sn(h3,f2)})):_e.resolve();var s4,c3,l2,f2,t3,h3}).catch(u2)):(x(o2).forEach(function(e4){un(i2,e4,o2[e4].primKey,o2[e4].indexes)}),Zt(n2,i2),void _e.follow(function(){return n2.on.populate.fire(a2)}).catch(u2));var e3,t2})}function on2(e2,r3){sn(e2._dbSchema,r3),r3.db.version%10!=0||r3.objectStoreNames.contains("$meta")||r3.db.createObjectStore("$meta").add(Math.ceil(
r3.db.version/10-1),"version");var t2=ln(0,e2.idbdb,r3);fn(e2,e2._dbSchema,r3);for(var n2=0,i2=an(t2,e2._dbSchema).change;n2<i2.length;n2++){var o2=(function(t3){if(t3.change.length||t3.recreate)return console.warn("Unable to patch indexes of table ".concat(t3.name," because it has changes on the type of index or primary key.")),{value:void 0};var n3=r3.objectStore(t3.name);t3.add.forEach(function(e3){ie&&console.debug("Dexie upgrade patch: Creating missing index ".concat(t3.name,".").concat(e3.
src)),cn2(n3,e3)})})(i2[n2]);if(typeof o2=="object")return o2.value}}function an(e2,t2){var n2,r3={del:[],add:[],change:[]};for(n2 in e2)t2[n2]||r3.del.push(n2);for(n2 in t2){var i2=e2[n2],o2=t2[n2];if(i2){var a2={name:n2,def:o2,recreate:!1,del:[],add:[],change:[]};if(""+(i2.primKey.keyPath||"")!=""+(o2.primKey.keyPath||"")||i2.primKey.auto!==o2.primKey.auto)a2.recreate=!0,r3.change.push(a2);else{var u2=i2.idxByName,s3=o2.idxByName,c3=void 0;for(c3 in u2)s3[c3]||a2.del.push(c3);for(c3 in s3){var l2=u2[c3],
f2=s3[c3];l2?l2.src!==f2.src&&a2.change.push(f2):a2.add.push(f2)}(0<a2.del.length||0<a2.add.length||0<a2.change.length)&&r3.change.push(a2)}}else r3.add.push([n2,o2])}return r3}function un(e2,t2,n2,r3){var i2=e2.db.createObjectStore(t2,n2.keyPath?{keyPath:n2.keyPath,autoIncrement:n2.auto}:{autoIncrement:n2.auto});return r3.forEach(function(e3){return cn2(i2,e3)}),i2}function sn(t2,n2){x(t2).forEach(function(e2){n2.db.objectStoreNames.contains(e2)||(ie&&console.debug("Dexie: Creating missing tabl\
e",e2),un(n2,e2,t2[e2].primKey,t2[e2].indexes))})}function cn2(e2,t2){e2.createIndex(t2.name,t2.keyPath,{unique:t2.unique,multiEntry:t2.multi})}function ln(e2,t2,u2){var s3={};return b(t2.objectStoreNames,0).forEach(function(e3){for(var t3=u2.objectStore(e3),n2=Vt(zt(a2=t3.keyPath),a2||"",!0,!1,!!t3.autoIncrement,a2&&typeof a2!="string",!0),r3=[],i2=0;i2<t3.indexNames.length;++i2){var o2=t3.index(t3.indexNames[i2]),a2=o2.keyPath,o2=Vt(o2.name,a2,!!o2.unique,!!o2.multiEntry,!1,a2&&typeof a2!="str\
ing",!1);r3.push(o2)}s3[e3]=Wt(e3,n2,r3)}),s3}function fn(e2,t2,n2){for(var r3=n2.db.objectStoreNames,i2=0;i2<r3.length;++i2){var o2=r3[i2],a2=n2.objectStore(o2);e2._hasGetAll="getAll"in a2;for(var u2=0;u2<a2.indexNames.length;++u2){var s3=a2.indexNames[u2],c3=a2.index(s3).keyPath,l2=typeof c3=="string"?c3:"["+b(c3).join("+")+"]";!t2[o2]||(c3=t2[o2].idxByName[l2])&&(c3.name=s3,delete t2[o2].idxByName[l2],t2[o2].idxByName[s3]=c3)}}typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.
test(navigator.userAgent)&&f.WorkerGlobalScope&&f instanceof f.WorkerGlobalScope&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604&&(e2._hasGetAll=!1)}function hn(e2){return e2.split(",").map(function(e3,t2){var n2=(e3=e3.trim()).replace(/([&*]|\+\+)/g,""),r3=/^\[/.test(n2)?n2.match(/^\[(.*)\]$/)[1].split("+"):n2;return Vt(n2,r3||null,/\&/.test(e3),/\*/.test(e3),/\+\+/.test(e3),k(r3),t2===0)})}var dn=(pn.prototype._parseStoresSpec=function(r3,i2){x(r3).forEach(function(e2){if(r3[e2]!==
null){var t2=hn(r3[e2]),n2=t2.shift();if(n2.unique=!0,n2.multi)throw new Y.Schema("Primary key cannot be multi-valued");t2.forEach(function(e3){if(e3.auto)throw new Y.Schema("Only primary key can be marked as autoIncrement (++)");if(!e3.keyPath)throw new Y.Schema("Index must have a name and cannot be an empty string")}),i2[e2]=Wt(e2,n2,t2)}})},pn.prototype.stores=function(e2){var t2=this.db;this._cfg.storesSource=this._cfg.storesSource?a(this._cfg.storesSource,e2):e2;var e2=t2._versions,n2={},r3={};
return e2.forEach(function(e3){a(n2,e3._cfg.storesSource),r3=e3._cfg.dbschema={},e3._parseStoresSpec(n2,r3)}),t2._dbSchema=r3,tn(t2,[t2._allTables,t2,t2.Transaction.prototype]),en(t2,[t2._allTables,t2,t2.Transaction.prototype,this._cfg.tables],x(r3),r3),t2._storeNames=x(r3),this},pn.prototype.upgrade=function(e2){return this._cfg.contentUpgrade=re2(this._cfg.contentUpgrade||G,e2),this},pn);function pn(){}function yn(e2,t2){var n2=e2._dbNamesDB;return n2||(n2=e2._dbNamesDB=new er(tt,{addons:[],indexedDB:e2,
IDBKeyRange:t2})).version(1).stores({dbnames:"name"}),n2.table("dbnames")}function vn(e2){return e2&&typeof e2.databases=="function"}function mn(e2){return Ne(function(){return me.letThrough=!0,e2()})}function bn(e2){return!("from"in e2)}var gn=function(e2,t2){if(!this){var n2=new gn;return e2&&"d"in e2&&a(n2,e2),n2}a(this,arguments.length?{d:1,from:e2,to:1<arguments.length?t2:e2}:{d:0})};function wn(e2,t2,n2){var r3=st(t2,n2);if(!isNaN(r3)){if(0<r3)throw RangeError();if(bn(e2))return a(e2,{from:t2,
to:n2,d:1});var i2=e2.l,r3=e2.r;if(st(n2,e2.from)<0)return i2?wn(i2,t2,n2):e2.l={from:t2,to:n2,d:1,l:null,r:null},On(e2);if(0<st(t2,e2.to))return r3?wn(r3,t2,n2):e2.r={from:t2,to:n2,d:1,l:null,r:null},On(e2);st(t2,e2.from)<0&&(e2.from=t2,e2.l=null,e2.d=r3?r3.d+1:1),0<st(n2,e2.to)&&(e2.to=n2,e2.r=null,e2.d=e2.l?e2.l.d+1:1),n2=!e2.r,i2&&!e2.l&&_n(e2,i2),r3&&n2&&_n(e2,r3)}}function _n(e2,t2){bn(t2)||(function e3(t3,n2){var r3=n2.from,i2=n2.to,o2=n2.l,n2=n2.r;wn(t3,r3,i2),o2&&e3(t3,o2),n2&&e3(t3,n2)})(
e2,t2)}function xn(e2,t2){var n2=kn(t2),r3=n2.next();if(r3.done)return!1;for(var i2=r3.value,o2=kn(e2),a2=o2.next(i2.from),u2=a2.value;!r3.done&&!a2.done;){if(st(u2.from,i2.to)<=0&&0<=st(u2.to,i2.from))return!0;st(i2.from,u2.from)<0?i2=(r3=n2.next(u2.from)).value:u2=(a2=o2.next(i2.from)).value}return!1}function kn(e2){var n2=bn(e2)?null:{s:0,n:e2};return{next:function(e3){for(var t2=0<arguments.length;n2;)switch(n2.s){case 0:if(n2.s=1,t2)for(;n2.n.l&&st(e3,n2.n.from)<0;)n2={up:n2,n:n2.n.l,s:1};else
for(;n2.n.l;)n2={up:n2,n:n2.n.l,s:1};case 1:if(n2.s=2,!t2||st(e3,n2.n.to)<=0)return{value:n2.n,done:!1};case 2:if(n2.n.r){n2.s=3,n2={up:n2,n:n2.n.r,s:0};continue}case 3:n2=n2.up}return{done:!0}}}}function On(e2){var t2,n2,r3=(((t2=e2.r)===null||t2===void 0?void 0:t2.d)||0)-(((n2=e2.l)===null||n2===void 0?void 0:n2.d)||0),i2=1<r3?"r":r3<-1?"l":"";i2&&(t2=i2=="r"?"l":"r",n2=_({},e2),r3=e2[i2],e2.from=r3.from,e2.to=r3.to,e2[i2]=r3[i2],n2[i2]=r3[t2],(e2[t2]=n2).d=Pn(n2)),e2.d=Pn(e2)}function Pn(e2){
var t2=e2.r,e2=e2.l;return(t2?e2?Math.max(t2.d,e2.d):t2.d:e2?e2.d:0)+1}function Kn(t2,n2){return x(n2).forEach(function(e2){t2[e2]?_n(t2[e2],n2[e2]):t2[e2]=(function e3(t3){var n3,r3,i2={};for(n3 in t3)m(t3,n3)&&(r3=t3[n3],i2[n3]=!r3||typeof r3!="object"||K.has(r3.constructor)?r3:e3(r3));return i2})(n2[e2])}),t2}function En(t2,n2){return t2.all||n2.all||Object.keys(t2).some(function(e2){return n2[e2]&&xn(n2[e2],t2[e2])})}r2(gn.prototype,((F={add:function(e2){return _n(this,e2),this},addKey:function(e2){
return wn(this,e2,e2),this},addKeys:function(e2){var t2=this;return e2.forEach(function(e3){return wn(t2,e3,e3)}),this},hasKey:function(e2){var t2=kn(this).next(e2).value;return t2&&st(t2.from,e2)<=0&&0<=st(t2.to,e2)}})[C]=function(){return kn(this)},F));var Sn={},jn={},An=!1;function Cn(e2){Kn(jn,e2),An||(An=!0,setTimeout(function(){An=!1,Tn(jn,!(jn={}))},0))}function Tn(e2,t2){t2===void 0&&(t2=!1);var n2=new Set;if(e2.all)for(var r3=0,i2=Object.values(Sn);r3<i2.length;r3++)qn(a2=i2[r3],e2,n2,t2);else
for(var o2 in e2){var a2,u2=/^idb\:\/\/(.*)\/(.*)\//.exec(o2);u2&&(o2=u2[1],u2=u2[2],(a2=Sn["idb://".concat(o2,"/").concat(u2)])&&qn(a2,e2,n2,t2))}n2.forEach(function(e3){return e3()})}function qn(e2,t2,n2,r3){for(var i2=[],o2=0,a2=Object.entries(e2.queries.query);o2<a2.length;o2++){for(var u2=a2[o2],s3=u2[0],c3=[],l2=0,f2=u2[1];l2<f2.length;l2++){var h3=f2[l2];En(t2,h3.obsSet)?h3.subscribers.forEach(function(e3){return n2.add(e3)}):r3&&c3.push(h3)}r3&&i2.push([s3,c3])}if(r3)for(var d3=0,p3=i2;d3<
p3.length;d3++){var y2=p3[d3],s3=y2[0],c3=y2[1];e2.queries.query[s3]=c3}}function Dn(f2){var h3=f2._state,r3=f2._deps.indexedDB;if(h3.isBeingOpened||f2.idbdb)return h3.dbReadyPromise.then(function(){return h3.dbOpenError?Xe(h3.dbOpenError):f2});h3.isBeingOpened=!0,h3.dbOpenError=null,h3.openComplete=!1;var t2=h3.openCanceller,d3=Math.round(10*f2.verno),p3=!1;function e2(){if(h3.openCanceller!==t2)throw new Y.DatabaseClosed("db.open() was cancelled")}function y2(){return new _e(function(s3,n3){if(e2(),
!r3)throw new Y.MissingAPI;var c3=f2.name,l2=h3.autoSchema||!d3?r3.open(c3):r3.open(c3,d3);if(!l2)throw new Y.MissingAPI;l2.onerror=Bt(n3),l2.onblocked=qe(f2._fireOnBlocked),l2.onupgradeneeded=qe(function(e3){var t3;v2=l2.transaction,h3.autoSchema&&!f2._options.allowEmptyDB?(l2.onerror=Rt,v2.abort(),l2.result.close(),(t3=r3.deleteDatabase(c3)).onsuccess=t3.onerror=qe(function(){n3(new Y.NoSuchDatabase("Database ".concat(c3," doesnt exist")))})):(v2.onerror=Bt(n3),e3=e3.oldVersion>Math.pow(2,62)?
0:e3.oldVersion,m2=e3<1,f2.idbdb=l2.result,p3&&on2(f2,v2),rn(f2,e3/10,v2,n3))},n3),l2.onsuccess=qe(function(){v2=null;var e3,t3,n4,r4,i3,o2=f2.idbdb=l2.result,a2=b(o2.objectStoreNames);if(0<a2.length)try{var u2=o2.transaction((r4=a2).length===1?r4[0]:r4,"readonly");if(h3.autoSchema)t3=o2,n4=u2,(e3=f2).verno=t3.version/10,n4=e3._dbSchema=ln(0,t3,n4),e3._storeNames=b(t3.objectStoreNames,0),en(e3,[e3._allTables],x(n4),n4);else if(fn(f2,f2._dbSchema,u2),((i3=an(ln(0,(i3=f2).idbdb,u2),i3._dbSchema)).
add.length||i3.change.some(function(e4){return e4.add.length||e4.change.length}))&&!p3)return console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Dexie will add missing parts and increment native version number to workaround this."),o2.close(),d3=o2.version+1,p3=!0,s3(y2());Zt(f2,u2)}catch{}et.push(f2),o2.onversionchange=qe(function(e4){h3.vcFired=!0,f2.on("versionchange").fire(e4)}),o2.onclose=qe(function(e4){f2.on("close").fire(e4)}),m2&&(i3=
f2._deps,u2=c3,o2=i3.indexedDB,i3=i3.IDBKeyRange,vn(o2)||u2===tt||yn(o2,i3).put({name:u2}).catch(G)),s3()},n3)}).catch(function(e3){switch(e3?.name){case"UnknownError":if(0<h3.PR1398_maxLoop)return h3.PR1398_maxLoop--,console.warn("Dexie: Workaround for Chrome UnknownError on open()"),y2();break;case"VersionError":if(0<d3)return d3=0,y2()}return _e.reject(e3)})}var n2,i2=h3.dbReadyResolve,v2=null,m2=!1;return _e.race([t2,(typeof navigator>"u"?_e.resolve():!navigator.userAgentData&&/Safari\//.test(
navigator.userAgent)&&!/Chrom(e|ium)\//.test(navigator.userAgent)&&indexedDB.databases?new Promise(function(e3){function t3(){return indexedDB.databases().finally(e3)}n2=setInterval(t3,100),t3()}).finally(function(){return clearInterval(n2)}):Promise.resolve()).then(y2)]).then(function(){return e2(),h3.onReadyBeingFired=[],_e.resolve(mn(function(){return f2.on.ready.fire(f2.vip)})).then(function e3(){if(0<h3.onReadyBeingFired.length){var t3=h3.onReadyBeingFired.reduce(re2,G);return h3.onReadyBeingFired=
[],_e.resolve(mn(function(){return t3(f2.vip)})).then(e3)}})}).finally(function(){h3.openCanceller===t2&&(h3.onReadyBeingFired=null,h3.isBeingOpened=!1)}).catch(function(e3){h3.dbOpenError=e3;try{v2&&v2.abort()}catch{}return t2===h3.openCanceller&&f2._close(),Xe(e3)}).finally(function(){h3.openComplete=!0,i2()}).then(function(){var n3;return m2&&(n3={},f2.tables.forEach(function(t3){t3.schema.indexes.forEach(function(e3){e3.name&&(n3["idb://".concat(f2.name,"/").concat(t3.name,"/").concat(e3.name)]=
new gn(-1/0,[[[]]]))}),n3["idb://".concat(f2.name,"/").concat(t3.name,"/")]=n3["idb://".concat(f2.name,"/").concat(t3.name,"/:dels")]=new gn(-1/0,[[[]]])}),Nt(Ft).fire(n3),Tn(n3,!0)),f2})}function In(t2){function e2(e3){return t2.next(e3)}var r3=n2(e2),i2=n2(function(e3){return t2.throw(e3)});function n2(n3){return function(e3){var t3=n3(e3),e3=t3.value;return t3.done?e3:e3&&typeof e3.then=="function"?e3.then(r3,i2):k(e3)?Promise.all(e3).then(r3,i2):r3(e3)}}return n2(e2)()}function Bn(e2,t2,n2){
for(var r3=k(e2)?e2.slice():[e2],i2=0;i2<n2;++i2)r3.push(t2);return r3}var Rn={stack:"dbcore",name:"VirtualIndexMiddleware",level:1,create:function(f2){return _(_({},f2),{table:function(e2){var a2=f2.table(e2),t2=a2.schema,u2={},s3=[];function c3(e3,t3,n3){var r4=Xt(e3),i3=u2[r4]=u2[r4]||[],o2=e3==null?0:typeof e3=="string"?1:e3.length,a3=0<t3,a3=_(_({},n3),{name:a3?"".concat(r4,"(virtual-from:").concat(n3.name,")"):n3.name,lowLevelIndex:n3,isVirtual:a3,keyTail:t3,keyLength:o2,extractKey:$t(e3),
unique:!a3&&n3.unique});return i3.push(a3),a3.isPrimaryKey||s3.push(a3),1<o2&&c3(o2===2?e3[0]:e3.slice(0,o2-1),t3+1,n3),i3.sort(function(e4,t4){return e4.keyTail-t4.keyTail}),a3}e2=c3(t2.primaryKey.keyPath,0,t2.primaryKey),u2[":id"]=[e2];for(var n2=0,r3=t2.indexes;n2<r3.length;n2++){var i2=r3[n2];c3(i2.keyPath,0,i2)}function l2(e3){var t3,n3=e3.query.index;return n3.isVirtual?_(_({},e3),{query:{index:n3.lowLevelIndex,range:(t3=e3.query.range,n3=n3.keyTail,{type:t3.type===1?2:t3.type,lower:Bn(t3.
lower,t3.lowerOpen?f2.MAX_KEY:f2.MIN_KEY,n3),lowerOpen:!0,upper:Bn(t3.upper,t3.upperOpen?f2.MIN_KEY:f2.MAX_KEY,n3),upperOpen:!0})}}):e3}return _(_({},a2),{schema:_(_({},t2),{primaryKey:e2,indexes:s3,getIndexByKeyPath:function(e3){return(e3=u2[Xt(e3)])&&e3[0]}}),count:function(e3){return a2.count(l2(e3))},query:function(e3){return a2.query(l2(e3))},openCursor:function(t3){var e3=t3.query.index,r4=e3.keyTail,n3=e3.isVirtual,i3=e3.keyLength;return n3?a2.openCursor(l2(t3)).then(function(e4){return e4&&
o2(e4)}):a2.openCursor(t3);function o2(n4){return Object.create(n4,{continue:{value:function(e4){e4!=null?n4.continue(Bn(e4,t3.reverse?f2.MAX_KEY:f2.MIN_KEY,r4)):t3.unique?n4.continue(n4.key.slice(0,i3).concat(t3.reverse?f2.MIN_KEY:f2.MAX_KEY,r4)):n4.continue()}},continuePrimaryKey:{value:function(e4,t4){n4.continuePrimaryKey(Bn(e4,f2.MAX_KEY,r4),t4)}},primaryKey:{get:function(){return n4.primaryKey}},key:{get:function(){var e4=n4.key;return i3===1?e4[0]:e4.slice(0,i3)}},value:{get:function(){return n4.
value}}})}}})}})}};function Fn(i2,o2,a2,u2){return a2=a2||{},u2=u2||"",x(i2).forEach(function(e2){var t2,n2,r3;m(o2,e2)?(t2=i2[e2],n2=o2[e2],typeof t2=="object"&&typeof n2=="object"&&t2&&n2?(r3=A(t2))!==A(n2)?a2[u2+e2]=o2[e2]:r3==="Object"?Fn(t2,n2,a2,u2+e2+"."):t2!==n2&&(a2[u2+e2]=o2[e2]):t2!==n2&&(a2[u2+e2]=o2[e2])):a2[u2+e2]=void 0}),x(o2).forEach(function(e2){m(i2,e2)||(a2[u2+e2]=o2[e2])}),a2}function Mn(e2,t2){return t2.type==="delete"?t2.keys:t2.keys||t2.values.map(e2.extractKey)}var Nn={stack:"\
dbcore",name:"HooksMiddleware",level:2,create:function(e2){return _(_({},e2),{table:function(r3){var y2=e2.table(r3),v2=y2.schema.primaryKey;return _(_({},y2),{mutate:function(e3){var t2=me.trans,n2=t2.table(r3).hook,h3=n2.deleting,d3=n2.creating,p3=n2.updating;switch(e3.type){case"add":if(d3.fire===G)break;return t2._promise("readwrite",function(){return a2(e3)},!0);case"put":if(d3.fire===G&&p3.fire===G)break;return t2._promise("readwrite",function(){return a2(e3)},!0);case"delete":if(h3.fire===
G)break;return t2._promise("readwrite",function(){return a2(e3)},!0);case"deleteRange":if(h3.fire===G)break;return t2._promise("readwrite",function(){return(function n3(r4,i2,o2){return y2.query({trans:r4,values:!1,query:{index:v2,range:i2},limit:o2}).then(function(e4){var t3=e4.result;return a2({type:"delete",keys:t3,trans:r4}).then(function(e5){return 0<e5.numFailures?Promise.reject(e5.failures[0]):t3.length<o2?{failures:[],numFailures:0,lastResult:void 0}:n3(r4,_(_({},i2),{lower:t3[t3.length-
1],lowerOpen:!0}),o2)})})})(e3.trans,e3.range,1e4)},!0)}return y2.mutate(e3);function a2(c3){var e4,t3,n3,l2=me.trans,f2=c3.keys||Mn(v2,c3);if(!f2)throw new Error("Keys missing");return(c3=c3.type==="add"||c3.type==="put"?_(_({},c3),{keys:f2}):_({},c3)).type!=="delete"&&(c3.values=i([],c3.values)),c3.keys&&(c3.keys=i([],c3.keys)),e4=y2,n3=f2,((t3=c3).type==="add"?Promise.resolve([]):e4.getMany({trans:t3.trans,keys:n3,cache:"immutable"})).then(function(u2){var s3=f2.map(function(e5,t4){var n4,r4,
i2,o2=u2[t4],a3={onerror:null,onsuccess:null};return c3.type==="delete"?h3.fire.call(a3,e5,o2,l2):c3.type==="add"||o2===void 0?(n4=d3.fire.call(a3,e5,c3.values[t4],l2),e5==null&&n4!=null&&(c3.keys[t4]=e5=n4,v2.outbound||P(c3.values[t4],v2.keyPath,e5))):(n4=Fn(o2,c3.values[t4]),(r4=p3.fire.call(a3,n4,e5,o2,l2))&&(i2=c3.values[t4],Object.keys(r4).forEach(function(e6){m(i2,e6)?i2[e6]=r4[e6]:P(i2,e6,r4[e6])}))),a3});return y2.mutate(c3).then(function(e5){for(var t4=e5.failures,n4=e5.results,r4=e5.numFailures,
e5=e5.lastResult,i2=0;i2<f2.length;++i2){var o2=(n4||f2)[i2],a3=s3[i2];o2==null?a3.onerror&&a3.onerror(t4[i2]):a3.onsuccess&&a3.onsuccess(c3.type==="put"&&u2[i2]?c3.values[i2]:o2)}return{failures:t4,results:n4,numFailures:r4,lastResult:e5}}).catch(function(t4){return s3.forEach(function(e5){return e5.onerror&&e5.onerror(t4)}),Promise.reject(t4)})})}}})}})}};function Ln(e2,t2,n2){try{if(!t2||t2.keys.length<e2.length)return null;for(var r3=[],i2=0,o2=0;i2<t2.keys.length&&o2<e2.length;++i2)st(t2.keys[i2],
e2[o2])===0&&(r3.push(n2?S2(t2.values[i2]):t2.values[i2]),++o2);return r3.length===e2.length?r3:null}catch{return null}}var Un={stack:"dbcore",level:-1,create:function(t2){return{table:function(e2){var n2=t2.table(e2);return _(_({},n2),{getMany:function(t3){if(!t3.cache)return n2.getMany(t3);var e3=Ln(t3.keys,t3.trans._cache,t3.cache==="clone");return e3?_e.resolve(e3):n2.getMany(t3).then(function(e4){return t3.trans._cache={keys:t3.keys,values:t3.cache==="clone"?S2(e4):e4},e4})},mutate:function(e3){
return e3.type!=="add"&&(e3.trans._cache=null),n2.mutate(e3)}})}}}};function Vn(e2,t2){return e2.trans.mode==="readonly"&&!!e2.subscr&&!e2.trans.explicit&&e2.trans.db._options.cache!=="disabled"&&!t2.schema.primaryKey.outbound}function zn(e2,t2){switch(e2){case"query":return t2.values&&!t2.unique;case"get":case"getMany":case"count":case"openCursor":return!1}}var Wn={stack:"dbcore",level:0,name:"Observability",create:function(b2){var g2=b2.schema.name,w2=new gn(b2.MIN_KEY,b2.MAX_KEY);return _(_({},
b2),{transaction:function(e2,t2,n2){if(me.subscr&&t2!=="readonly")throw new Y.ReadOnly("Readwrite transaction in liveQuery context. Querier source: ".concat(me.querier));return b2.transaction(e2,t2,n2)},table:function(d3){var p3=b2.table(d3),y2=p3.schema,v2=y2.primaryKey,e2=y2.indexes,c3=v2.extractKey,l2=v2.outbound,m2=v2.autoIncrement&&e2.filter(function(e3){return e3.compound&&e3.keyPath.includes(v2.keyPath)}),t2=_(_({},p3),{mutate:function(a2){function u2(e4){return e4="idb://".concat(g2,"/").
concat(d3,"/").concat(e4),n2[e4]||(n2[e4]=new gn)}var e3,o2,s3,t3=a2.trans,n2=a2.mutatedParts||(a2.mutatedParts={}),r3=u2(""),i2=u2(":dels"),c4=a2.type,l3=a2.type==="deleteRange"?[a2.range]:a2.type==="delete"?[a2.keys]:a2.values.length<50?[Mn(v2,a2).filter(function(e4){return e4}),a2.values]:[],f3=l3[0],h3=l3[1],l3=a2.trans._cache;return k(f3)?(r3.addKeys(f3),(l3=c4==="delete"||f3.length===h3.length?Ln(f3,l3):null)||i2.addKeys(f3),(l3||h3)&&(e3=u2,o2=l3,s3=h3,y2.indexes.forEach(function(t4){var n3=e3(
t4.name||"");function r4(e4){return e4!=null?t4.extractKey(e4):null}function i3(e4){return t4.multiEntry&&k(e4)?e4.forEach(function(e5){return n3.addKey(e5)}):n3.addKey(e4)}(o2||s3).forEach(function(e4,t5){var n4=o2&&r4(o2[t5]),t5=s3&&r4(s3[t5]);st(n4,t5)!==0&&(n4!=null&&i3(n4),t5!=null&&i3(t5))})}))):f3?(h3={from:(h3=f3.lower)!==null&&h3!==void 0?h3:b2.MIN_KEY,to:(h3=f3.upper)!==null&&h3!==void 0?h3:b2.MAX_KEY},i2.add(h3),r3.add(h3)):(r3.add(w2),i2.add(w2),y2.indexes.forEach(function(e4){return u2(
e4.name).add(w2)})),p3.mutate(a2).then(function(o3){return!f3||a2.type!=="add"&&a2.type!=="put"||(r3.addKeys(o3.results),m2&&m2.forEach(function(t4){for(var e4=a2.values.map(function(e5){return t4.extractKey(e5)}),n3=t4.keyPath.findIndex(function(e5){return e5===v2.keyPath}),r4=0,i3=o3.results.length;r4<i3;++r4)e4[r4][n3]=o3.results[r4];u2(t4.name).addKeys(e4)})),t3.mutatedParts=Kn(t3.mutatedParts||{},n2),o3})}}),e2=function(e3){var t3=e3.query,e3=t3.index,t3=t3.range;return[e3,new gn((e3=t3.lower)!==
null&&e3!==void 0?e3:b2.MIN_KEY,(t3=t3.upper)!==null&&t3!==void 0?t3:b2.MAX_KEY)]},f2={get:function(e3){return[v2,new gn(e3.key)]},getMany:function(e3){return[v2,new gn().addKeys(e3.keys)]},count:e2,query:e2,openCursor:e2};return x(f2).forEach(function(s3){t2[s3]=function(i2){var e3=me.subscr,t3=!!e3,n2=Vn(me,p3)&&zn(s3,i2)?i2.obsSet={}:e3;if(t3){var r3=function(e4){return e4="idb://".concat(g2,"/").concat(d3,"/").concat(e4),n2[e4]||(n2[e4]=new gn)},o2=r3(""),a2=r3(":dels"),e3=f2[s3](i2),t3=e3[0],
e3=e3[1];if((s3==="query"&&t3.isPrimaryKey&&!i2.values?a2:r3(t3.name||"")).add(e3),!t3.isPrimaryKey){if(s3!=="count"){var u2=s3==="query"&&l2&&i2.values&&p3.query(_(_({},i2),{values:!1}));return p3[s3].apply(this,arguments).then(function(t4){if(s3==="query"){if(l2&&i2.values)return u2.then(function(e5){return e5=e5.result,o2.addKeys(e5),t4});var e4=i2.values?t4.result.map(c3):t4.result;(i2.values?o2:a2).addKeys(e4)}else if(s3==="openCursor"){var n3=t4,r4=i2.values;return n3&&Object.create(n3,{key:{
get:function(){return a2.addKey(n3.primaryKey),n3.key}},primaryKey:{get:function(){var e5=n3.primaryKey;return a2.addKey(e5),e5}},value:{get:function(){return r4&&o2.addKey(n3.primaryKey),n3.value}}})}return t4})}a2.add(w2)}}return p3[s3].apply(this,arguments)}}),t2}})}};function Yn(e2,t2,n2){if(n2.numFailures===0)return t2;if(t2.type==="deleteRange")return null;var r3=t2.keys?t2.keys.length:"values"in t2&&t2.values?t2.values.length:1;return n2.numFailures===r3?null:(t2=_({},t2),k(t2.keys)&&(t2.
keys=t2.keys.filter(function(e3,t3){return!(t3 in n2.failures)})),"values"in t2&&k(t2.values)&&(t2.values=t2.values.filter(function(e3,t3){return!(t3 in n2.failures)})),t2)}function $n(e2,t2){return n2=e2,((r3=t2).lower===void 0||(r3.lowerOpen?0<st(n2,r3.lower):0<=st(n2,r3.lower)))&&(e2=e2,(t2=t2).upper===void 0||(t2.upperOpen?st(e2,t2.upper)<0:st(e2,t2.upper)<=0));var n2,r3}function Qn(e2,d3,t2,n2,r3,i2){if(!t2||t2.length===0)return e2;var o2=d3.query.index,p3=o2.multiEntry,y2=d3.query.range,v2=n2.
schema.primaryKey.extractKey,m2=o2.extractKey,a2=(o2.lowLevelIndex||o2).extractKey,t2=t2.reduce(function(e3,t3){var n3=e3,r4=[];if(t3.type==="add"||t3.type==="put")for(var i3=new gn,o3=t3.values.length-1;0<=o3;--o3){var a3,u2=t3.values[o3],s3=v2(u2);i3.hasKey(s3)||(a3=m2(u2),(p3&&k(a3)?a3.some(function(e4){return $n(e4,y2)}):$n(a3,y2))&&(i3.addKey(s3),r4.push(u2)))}switch(t3.type){case"add":var c3=new gn().addKeys(d3.values?e3.map(function(e4){return v2(e4)}):e3),n3=e3.concat(d3.values?r4.filter(
function(e4){return e4=v2(e4),!c3.hasKey(e4)&&(c3.addKey(e4),!0)}):r4.map(function(e4){return v2(e4)}).filter(function(e4){return!c3.hasKey(e4)&&(c3.addKey(e4),!0)}));break;case"put":var l2=new gn().addKeys(t3.values.map(function(e4){return v2(e4)}));n3=e3.filter(function(e4){return!l2.hasKey(d3.values?v2(e4):e4)}).concat(d3.values?r4:r4.map(function(e4){return v2(e4)}));break;case"delete":var f2=new gn().addKeys(t3.keys);n3=e3.filter(function(e4){return!f2.hasKey(d3.values?v2(e4):e4)});break;case"\
deleteRange":var h3=t3.range;n3=e3.filter(function(e4){return!$n(v2(e4),h3)})}return n3},e2);return t2===e2?e2:(t2.sort(function(e3,t3){return st(a2(e3),a2(t3))||st(v2(e3),v2(t3))}),d3.limit&&d3.limit<1/0&&(t2.length>d3.limit?t2.length=d3.limit:e2.length===d3.limit&&t2.length<d3.limit&&(r3.dirty=!0)),i2?Object.freeze(t2):t2)}function Gn(e2,t2){return st(e2.lower,t2.lower)===0&&st(e2.upper,t2.upper)===0&&!!e2.lowerOpen==!!t2.lowerOpen&&!!e2.upperOpen==!!t2.upperOpen}function Xn(e2,t2){return(function(e3,t3,n2,r3){
if(e3===void 0)return t3!==void 0?-1:0;if(t3===void 0)return 1;if((t3=st(e3,t3))===0){if(n2&&r3)return 0;if(n2)return 1;if(r3)return-1}return t3})(e2.lower,t2.lower,e2.lowerOpen,t2.lowerOpen)<=0&&0<=(function(e3,t3,n2,r3){if(e3===void 0)return t3!==void 0?1:0;if(t3===void 0)return-1;if((t3=st(e3,t3))===0){if(n2&&r3)return 0;if(n2)return-1;if(r3)return 1}return t3})(e2.upper,t2.upper,e2.upperOpen,t2.upperOpen)}function Hn(n2,r3,i2,e2){n2.subscribers.add(i2),e2.addEventListener("abort",function(){
var e3,t2;n2.subscribers.delete(i2),n2.subscribers.size===0&&(e3=n2,t2=r3,setTimeout(function(){e3.subscribers.size===0&&q2(t2,e3)},3e3))})}var Jn={stack:"dbcore",level:0,name:"Cache",create:function(k2){var O2=k2.schema.name;return _(_({},k2),{transaction:function(g2,w2,e2){var _8,t2,x2=k2.transaction(g2,w2,e2);return w2==="readwrite"&&(t2=(_8=new AbortController).signal,e2=function(b2){return function(){if(_8.abort(),w2==="readwrite"){for(var t3=new Set,e3=0,n2=g2;e3<n2.length;e3++){var r3=n2[e3],
i2=Sn["idb://".concat(O2,"/").concat(r3)];if(i2){var o2=k2.table(r3),a2=i2.optimisticOps.filter(function(e4){return e4.trans===x2});if(x2._explicit&&b2&&x2.mutatedParts)for(var u2=0,s3=Object.values(i2.queries.query);u2<s3.length;u2++)for(var c3=0,l2=(d3=s3[u2]).slice();c3<l2.length;c3++)En((p3=l2[c3]).obsSet,x2.mutatedParts)&&(q2(d3,p3),p3.subscribers.forEach(function(e4){return t3.add(e4)}));else if(0<a2.length){i2.optimisticOps=i2.optimisticOps.filter(function(e4){return e4.trans!==x2});for(var f2=0,
h3=Object.values(i2.queries.query);f2<h3.length;f2++)for(var d3,p3,y2,v2=0,m2=(d3=h3[f2]).slice();v2<m2.length;v2++)(p3=m2[v2]).res!=null&&x2.mutatedParts&&(b2&&!p3.dirty?(y2=Object.isFrozen(p3.res),y2=Qn(p3.res,p3.req,a2,o2,p3,y2),p3.dirty?(q2(d3,p3),p3.subscribers.forEach(function(e4){return t3.add(e4)})):y2!==p3.res&&(p3.res=y2,p3.promise=_e.resolve({result:y2}))):(p3.dirty&&q2(d3,p3),p3.subscribers.forEach(function(e4){return t3.add(e4)})))}}}t3.forEach(function(e4){return e4()})}}},x2.addEventListener(
"abort",e2(!1),{signal:t2}),x2.addEventListener("error",e2(!1),{signal:t2}),x2.addEventListener("complete",e2(!0),{signal:t2})),x2},table:function(c3){var l2=k2.table(c3),i2=l2.schema.primaryKey;return _(_({},l2),{mutate:function(t2){var e2=me.trans;if(i2.outbound||e2.db._options.cache==="disabled"||e2.explicit||e2.idbtrans.mode!=="readwrite")return l2.mutate(t2);var n2=Sn["idb://".concat(O2,"/").concat(c3)];return n2?(e2=l2.mutate(t2),t2.type!=="add"&&t2.type!=="put"||!(50<=t2.values.length||Mn(
i2,t2).some(function(e3){return e3==null}))?(n2.optimisticOps.push(t2),t2.mutatedParts&&Cn(t2.mutatedParts),e2.then(function(e3){0<e3.numFailures&&(q2(n2.optimisticOps,t2),(e3=Yn(0,t2,e3))&&n2.optimisticOps.push(e3),t2.mutatedParts&&Cn(t2.mutatedParts))}),e2.catch(function(){q2(n2.optimisticOps,t2),t2.mutatedParts&&Cn(t2.mutatedParts)})):e2.then(function(r3){var e3=Yn(0,_(_({},t2),{values:t2.values.map(function(e4,t3){var n3;return r3.failures[t3]?e4:(e4=(n3=i2.keyPath)!==null&&n3!==void 0&&n3.includes(
".")?S2(e4):_({},e4),P(e4,i2.keyPath,r3.results[t3]),e4)})}),r3);n2.optimisticOps.push(e3),queueMicrotask(function(){return t2.mutatedParts&&Cn(t2.mutatedParts)})}),e2):l2.mutate(t2)},query:function(t2){if(!Vn(me,l2)||!zn("query",t2))return l2.query(t2);var i3=((o2=me.trans)===null||o2===void 0?void 0:o2.db._options.cache)==="immutable",e2=me,n2=e2.requery,r3=e2.signal,o2=(function(e3,t3,n3,r4){var i4=Sn["idb://".concat(e3,"/").concat(t3)];if(!i4)return[];if(!(t3=i4.queries[n3]))return[null,!1,i4,
null];var o3=t3[(r4.query?r4.query.index.name:null)||""];if(!o3)return[null,!1,i4,null];switch(n3){case"query":var a3=o3.find(function(e4){return e4.req.limit===r4.limit&&e4.req.values===r4.values&&Gn(e4.req.query.range,r4.query.range)});return a3?[a3,!0,i4,o3]:[o3.find(function(e4){return("limit"in e4.req?e4.req.limit:1/0)>=r4.limit&&(!r4.values||e4.req.values)&&Xn(e4.req.query.range,r4.query.range)}),!1,i4,o3];case"count":return a3=o3.find(function(e4){return Gn(e4.req.query.range,r4.query.range)}),
[a3,!!a3,i4,o3]}})(O2,c3,"query",t2),a2=o2[0],e2=o2[1],u2=o2[2],s3=o2[3];return a2&&e2?a2.obsSet=t2.obsSet:(e2=l2.query(t2).then(function(e3){var t3=e3.result;if(a2&&(a2.res=t3),i3){for(var n3=0,r4=t3.length;n3<r4;++n3)Object.freeze(t3[n3]);Object.freeze(t3)}else e3.result=S2(t3);return e3}).catch(function(e3){return s3&&a2&&q2(s3,a2),Promise.reject(e3)}),a2={obsSet:t2.obsSet,promise:e2,subscribers:new Set,type:"query",req:t2,dirty:!1},s3?s3.push(a2):(s3=[a2],(u2=u2||(Sn["idb://".concat(O2,"/").
concat(c3)]={queries:{query:{},count:{}},objs:new Map,optimisticOps:[],unsignaledParts:{}})).queries.query[t2.query.index.name||""]=s3)),Hn(a2,s3,n2,r3),a2.promise.then(function(e3){return{result:Qn(e3.result,t2,u2?.optimisticOps,l2,a2,i3)}})}})}})}};function Zn(e2,r3){return new Proxy(e2,{get:function(e3,t2,n2){return t2==="db"?r3:Reflect.get(e3,t2,n2)}})}var er=(tr2.prototype.version=function(t2){if(isNaN(t2)||t2<.1)throw new Y.Type("Given version is not a positive number");if(t2=Math.round(10*
t2)/10,this.idbdb||this._state.isBeingOpened)throw new Y.Schema("Cannot add version when database is open");this.verno=Math.max(this.verno,t2);var e2=this._versions,n2=e2.filter(function(e3){return e3._cfg.version===t2})[0];return n2||(n2=new this.Version(t2),e2.push(n2),e2.sort(nn),n2.stores({}),this._state.autoSchema=!1,n2)},tr2.prototype._whenReady=function(e2){var n2=this;return this.idbdb&&(this._state.openComplete||me.letThrough||this._vip)?e2():new _e(function(e3,t2){if(n2._state.openComplete)
return t2(new Y.DatabaseClosed(n2._state.dbOpenError));if(!n2._state.isBeingOpened){if(!n2._state.autoOpen)return void t2(new Y.DatabaseClosed);n2.open().catch(G)}n2._state.dbReadyPromise.then(e3,t2)}).then(e2)},tr2.prototype.use=function(e2){var t2=e2.stack,n2=e2.create,r3=e2.level,i2=e2.name;return i2&&this.unuse({stack:t2,name:i2}),e2=this._middlewares[t2]||(this._middlewares[t2]=[]),e2.push({stack:t2,create:n2,level:r3??10,name:i2}),e2.sort(function(e3,t3){return e3.level-t3.level}),this},tr2.
prototype.unuse=function(e2){var t2=e2.stack,n2=e2.name,r3=e2.create;return t2&&this._middlewares[t2]&&(this._middlewares[t2]=this._middlewares[t2].filter(function(e3){return r3?e3.create!==r3:!!n2&&e3.name!==n2})),this},tr2.prototype.open=function(){var e2=this;return $e(ve,function(){return Dn(e2)})},tr2.prototype._close=function(){var n2=this._state,e2=et.indexOf(this);if(0<=e2&&et.splice(e2,1),this.idbdb){try{this.idbdb.close()}catch{}this.idbdb=null}n2.isBeingOpened||(n2.dbReadyPromise=new _e(
function(e3){n2.dbReadyResolve=e3}),n2.openCanceller=new _e(function(e3,t2){n2.cancelOpen=t2}))},tr2.prototype.close=function(e2){var t2=(e2===void 0?{disableAutoOpen:!0}:e2).disableAutoOpen,e2=this._state;t2?(e2.isBeingOpened&&e2.cancelOpen(new Y.DatabaseClosed),this._close(),e2.autoOpen=!1,e2.dbOpenError=new Y.DatabaseClosed):(this._close(),e2.autoOpen=this._options.autoOpen||e2.isBeingOpened,e2.openComplete=!1,e2.dbOpenError=null)},tr2.prototype.delete=function(n2){var i2=this;n2===void 0&&(n2=
{disableAutoOpen:!0});var o2=0<arguments.length&&typeof arguments[0]!="object",a2=this._state;return new _e(function(r3,t2){function e2(){i2.close(n2);var e3=i2._deps.indexedDB.deleteDatabase(i2.name);e3.onsuccess=qe(function(){var e4,t3,n3;e4=i2._deps,t3=i2.name,n3=e4.indexedDB,e4=e4.IDBKeyRange,vn(n3)||t3===tt||yn(n3,e4).delete(t3).catch(G),r3()}),e3.onerror=Bt(t2),e3.onblocked=i2._fireOnBlocked}if(o2)throw new Y.InvalidArgument("Invalid closeOptions argument to db.delete()");a2.isBeingOpened?
a2.dbReadyPromise.then(e2):e2()})},tr2.prototype.backendDB=function(){return this.idbdb},tr2.prototype.isOpen=function(){return this.idbdb!==null},tr2.prototype.hasBeenClosed=function(){var e2=this._state.dbOpenError;return e2&&e2.name==="DatabaseClosed"},tr2.prototype.hasFailed=function(){return this._state.dbOpenError!==null},tr2.prototype.dynamicallyOpened=function(){return this._state.autoSchema},Object.defineProperty(tr2.prototype,"tables",{get:function(){var t2=this;return x(this._allTables).
map(function(e2){return t2._allTables[e2]})},enumerable:!1,configurable:!0}),tr2.prototype.transaction=function(){var e2=(function(e3,t2,n2){var r3=arguments.length;if(r3<2)throw new Y.InvalidArgument("Too few arguments");for(var i2=new Array(r3-1);--r3;)i2[r3-1]=arguments[r3];return n2=i2.pop(),[e3,w(i2),n2]}).apply(this,arguments);return this._transaction.apply(this,e2)},tr2.prototype._transaction=function(e2,t2,n2){var r3=this,i2=me.trans;i2&&i2.db===this&&e2.indexOf("!")===-1||(i2=null);var o2,
a2,u2=e2.indexOf("?")!==-1;e2=e2.replace("!","").replace("?","");try{if(a2=t2.map(function(e3){if(e3=e3 instanceof r3.Table?e3.name:e3,typeof e3!="string")throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return e3}),e2=="r"||e2===nt)o2=nt;else{if(e2!="rw"&&e2!=rt)throw new Y.InvalidArgument("Invalid transaction mode: "+e2);o2=rt}if(i2){if(i2.mode===nt&&o2===rt){if(!u2)throw new Y.SubTransaction("Cannot enter a sub-transaction with READWRITE m\
ode when parent transaction is READONLY");i2=null}i2&&a2.forEach(function(e3){if(i2&&i2.storeNames.indexOf(e3)===-1){if(!u2)throw new Y.SubTransaction("Table "+e3+" not included in parent transaction.");i2=null}}),u2&&i2&&!i2.active&&(i2=null)}}catch(n3){return i2?i2._promise(null,function(e3,t3){t3(n3)}):Xe(n3)}var s3=(function i3(o3,a3,u3,s4,c3){return _e.resolve().then(function(){var e3=me.transless||me,t3=o3._createTransaction(a3,u3,o3._dbSchema,s4);if(t3.explicit=!0,e3={trans:t3,transless:e3},
s4)t3.idbtrans=s4.idbtrans;else try{t3.create(),t3.idbtrans._explicit=!0,o3._state.PR1398_maxLoop=3}catch(e4){return e4.name===z.InvalidState&&o3.isOpen()&&0<--o3._state.PR1398_maxLoop?(console.warn("Dexie: Need to reopen db"),o3.close({disableAutoOpen:!1}),o3.open().then(function(){return i3(o3,a3,u3,null,c3)})):Xe(e4)}var n3,r4=B(c3);return r4&&Le(),e3=_e.follow(function(){var e4;(n3=c3.call(t3,t3))&&(r4?(e4=Ue.bind(null,null),n3.then(e4,e4)):typeof n3.next=="function"&&typeof n3.throw=="funct\
ion"&&(n3=In(n3)))},e3),(n3&&typeof n3.then=="function"?_e.resolve(n3).then(function(e4){return t3.active?e4:Xe(new Y.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))}):e3.then(function(){return n3})).then(function(e4){return s4&&t3._resolve(),t3._completion.then(function(){return e4})}).catch(function(e4){return t3._reject(e4),Xe(e4)})})}).bind(null,this,o2,a2,i2,n2);return i2?i2._promise(o2,s3,"lock"):me.trans?$e(me.transless,function(){return r3._whenReady(s3)}):
this._whenReady(s3)},tr2.prototype.table=function(e2){if(!m(this._allTables,e2))throw new Y.InvalidTable("Table ".concat(e2," does not exist"));return this._allTables[e2]},tr2);function tr2(e2,t2){var o2=this;this._middlewares={},this.verno=0;var n2=tr2.dependencies;this._options=t2=_({addons:tr2.addons,autoOpen:!0,indexedDB:n2.indexedDB,IDBKeyRange:n2.IDBKeyRange,cache:"cloned"},t2),this._deps={indexedDB:t2.indexedDB,IDBKeyRange:t2.IDBKeyRange},n2=t2.addons,this._dbSchema={},this._versions=[],this.
_storeNames=[],this._allTables={},this.idbdb=null,this._novip=this;var a2,r3,u2,i2,s3,c3={dbOpenError:null,isBeingOpened:!1,onReadyBeingFired:null,openComplete:!1,dbReadyResolve:G,dbReadyPromise:null,cancelOpen:G,openCanceller:null,autoSchema:!0,PR1398_maxLoop:3,autoOpen:t2.autoOpen};c3.dbReadyPromise=new _e(function(e3){c3.dbReadyResolve=e3}),c3.openCanceller=new _e(function(e3,t3){c3.cancelOpen=t3}),this._state=c3,this.name=e2,this.on=dt2(this,"populate","blocked","versionchange","close",{ready:[
re2,G]}),this.on.ready.subscribe=p2(this.on.ready.subscribe,function(i3){return function(n3,r4){tr2.vip(function(){var t3,e3=o2._state;e3.openComplete?(e3.dbOpenError||_e.resolve().then(n3),r4&&i3(n3)):e3.onReadyBeingFired?(e3.onReadyBeingFired.push(n3),r4&&i3(n3)):(i3(n3),t3=o2,r4||i3(function e4(){t3.on.ready.unsubscribe(n3),t3.on.ready.unsubscribe(e4)}))})}}),this.Collection=(a2=this,pt(Ot.prototype,function(e3,t3){this.db=a2;var n3=ot,r4=null;if(t3)try{n3=t3()}catch(e4){r4=e4}var i3=e3._ctx,
t3=i3.table,e3=t3.hook.reading.fire;this._ctx={table:t3,index:i3.index,isPrimKey:!i3.index||t3.schema.primKey.keyPath&&i3.index===t3.schema.primKey.name,range:n3,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:r4,or:i3.or,valueMapper:e3!==X2?e3:null}})),this.Table=(r3=this,pt(ft.prototype,function(e3,t3,n3){this.db=r3,this._tx=n3,this.name=e3,this.schema=t3,this.hook=r3._allTables[e3]?r3._allTables[e3].hook:dt2(null,
{creating:[Z,G],reading:[H,X2],updating:[te,G],deleting:[ee,G]})})),this.Transaction=(u2=this,pt(Lt.prototype,function(e3,t3,n3,r4,i3){var o3=this;this.db=u2,this.mode=e3,this.storeNames=t3,this.schema=n3,this.chromeTransactionDurability=r4,this.idbtrans=null,this.on=dt2(this,"complete","error","abort"),this.parent=i3||null,this.active=!0,this._reculock=0,this._blockedFuncs=[],this._resolve=null,this._reject=null,this._waitingFor=null,this._waitingQueue=null,this._spinCount=0,this._completion=new _e(
function(e4,t4){o3._resolve=e4,o3._reject=t4}),this._completion.then(function(){o3.active=!1,o3.on.complete.fire()},function(e4){var t4=o3.active;return o3.active=!1,o3.on.error.fire(e4),o3.parent?o3.parent._reject(e4):t4&&o3.idbtrans&&o3.idbtrans.abort(),Xe(e4)})})),this.Version=(i2=this,pt(dn.prototype,function(e3){this.db=i2,this._cfg={version:e3,storesSource:null,dbschema:{},tables:{},contentUpgrade:null}})),this.WhereClause=(s3=this,pt(Dt.prototype,function(e3,t3,n3){if(this.db=s3,this._ctx=
{table:e3,index:t3===":id"?null:t3,or:n3},this._cmp=this._ascending=st,this._descending=function(e4,t4){return st(t4,e4)},this._max=function(e4,t4){return 0<st(e4,t4)?e4:t4},this._min=function(e4,t4){return st(e4,t4)<0?e4:t4},this._IDBKeyRange=s3._deps.IDBKeyRange,!this._IDBKeyRange)throw new Y.MissingAPI})),this.on("versionchange",function(e3){0<e3.newVersion?console.warn("Another connection wants to upgrade database '".concat(o2.name,"'. Closing db now to resume the upgrade.")):console.warn("A\
nother connection wants to delete database '".concat(o2.name,"'. Closing db now to resume the delete request.")),o2.close({disableAutoOpen:!1})}),this.on("blocked",function(e3){!e3.newVersion||e3.newVersion<e3.oldVersion?console.warn("Dexie.delete('".concat(o2.name,"') was blocked")):console.warn("Upgrade '".concat(o2.name,"' blocked by other connection holding version ").concat(e3.oldVersion/10))}),this._maxKey=Yt(t2.IDBKeyRange),this._createTransaction=function(e3,t3,n3,r4){return new o2.Transaction(
e3,t3,n3,o2._options.chromeTransactionDurability,r4)},this._fireOnBlocked=function(t3){o2.on("blocked").fire(t3),et.filter(function(e3){return e3.name===o2.name&&e3!==o2&&!e3._state.vcFired}).map(function(e3){return e3.on("versionchange").fire(t3)})},this.use(Un),this.use(Jn),this.use(Wn),this.use(Rn),this.use(Nn);var l2=new Proxy(this,{get:function(e3,t3,n3){if(t3==="_vip")return!0;if(t3==="table")return function(e4){return Zn(o2.table(e4),l2)};var r4=Reflect.get(e3,t3,n3);return r4 instanceof ft?
Zn(r4,l2):t3==="tables"?r4.map(function(e4){return Zn(e4,l2)}):t3==="_createTransaction"?function(){return Zn(r4.apply(this,arguments),l2)}:r4}});this.vip=l2,n2.forEach(function(e3){return e3(o2)})}var nr,F=typeof Symbol<"u"&&"observable"in Symbol?Symbol.observable:"@@observable",rr=(ir.prototype.subscribe=function(e2,t2,n2){return this._subscribe(e2&&typeof e2!="function"?e2:{next:e2,error:t2,complete:n2})},ir.prototype[F]=function(){return this},ir);function ir(e2){this._subscribe=e2}try{nr={indexedDB:f.
indexedDB||f.mozIndexedDB||f.webkitIndexedDB||f.msIndexedDB,IDBKeyRange:f.IDBKeyRange||f.webkitIDBKeyRange}}catch{nr={indexedDB:null,IDBKeyRange:null}}function or(h3){var d3,p3=!1,e2=new rr(function(r3){var i2=B(h3),o2,a2=!1,u2={},s3={},e3={get closed(){return a2},unsubscribe:function(){a2||(a2=!0,o2&&o2.abort(),c3&&Nt.storagemutated.unsubscribe(f2))}};r3.start&&r3.start(e3);var c3=!1,l2=function(){return Ge(t2)},f2=function(e4){Kn(u2,e4),En(s3,u2)&&l2()},t2=function(){var t3,n2,e4;!a2&&nr.indexedDB&&
(u2={},t3={},o2&&o2.abort(),o2=new AbortController,e4=(function(e5){var t4=je();try{i2&&Le();var n3=Ne(h3,e5);return n3=i2?n3.finally(Ue):n3}finally{t4&&Ae()}})(n2={subscr:t3,signal:o2.signal,requery:l2,querier:h3,trans:null}),Promise.resolve(e4).then(function(e5){p3=!0,d3=e5,a2||n2.signal.aborted||(u2={},(function(e6){for(var t4 in e6)if(m(e6,t4))return;return 1})(s3=t3)||c3||(Nt(Ft,f2),c3=!0),Ge(function(){return!a2&&r3.next&&r3.next(e5)}))},function(e5){p3=!1,["DatabaseClosedError","AbortErro\
r"].includes(e5?.name)||a2||Ge(function(){a2||r3.error&&r3.error(e5)})}))};return setTimeout(l2,0),e3});return e2.hasValue=function(){return p3},e2.getValue=function(){return d3},e2}var ar=er;function ur(e2){var t2=cr;try{cr=!0,Nt.storagemutated.fire(e2),Tn(e2,!0)}finally{cr=t2}}r2(ar,_(_({},Q),{delete:function(e2){return new ar(e2,{addons:[]}).delete()},exists:function(e2){return new ar(e2,{addons:[]}).open().then(function(e3){return e3.close(),!0}).catch("NoSuchDatabaseError",function(){return!1})},
getDatabaseNames:function(e2){try{return t2=ar.dependencies,n2=t2.indexedDB,t2=t2.IDBKeyRange,(vn(n2)?Promise.resolve(n2.databases()).then(function(e3){return e3.map(function(e4){return e4.name}).filter(function(e4){return e4!==tt})}):yn(n2,t2).toCollection().primaryKeys()).then(e2)}catch{return Xe(new Y.MissingAPI)}var t2,n2},defineClass:function(){return function(e2){a(this,e2)}},ignoreTransaction:function(e2){return me.trans?$e(me.transless,e2):e2()},vip:mn,async:function(t2){return function(){
try{var e2=In(t2.apply(this,arguments));return e2&&typeof e2.then=="function"?e2:_e.resolve(e2)}catch(e3){return Xe(e3)}}},spawn:function(e2,t2,n2){try{var r3=In(e2.apply(n2,t2||[]));return r3&&typeof r3.then=="function"?r3:_e.resolve(r3)}catch(e3){return Xe(e3)}},currentTransaction:{get:function(){return me.trans||null}},waitFor:function(e2,t2){return t2=_e.resolve(typeof e2=="function"?ar.ignoreTransaction(e2):e2).timeout(t2||6e4),me.trans?me.trans.waitFor(t2):t2},Promise:_e,debug:{get:function(){
return ie},set:function(e2){oe(e2)}},derive:o,extend:a,props:r2,override:p2,Events:dt2,on:Nt,liveQuery:or,extendObservabilitySet:Kn,getByKeyPath:O,setByKeyPath:P,delByKeyPath:function(t2,e2){typeof e2=="string"?P(t2,e2,void 0):"length"in e2&&[].map.call(e2,function(e3){P(t2,e3,void 0)})},shallowClone:g,deepClone:S2,getObjectDiff:Fn,cmp:st,asap:v,minKey:-1/0,addons:[],connections:et,errnames:z,dependencies:nr,cache:Sn,semVer:"4.0.11",version:"4.0.11".split(".").map(function(e2){return parseInt(e2)}).
reduce(function(e2,t2,n2){return e2+t2/Math.pow(10,2*n2)})})),ar.maxKey=Yt(ar.dependencies.IDBKeyRange),typeof dispatchEvent<"u"&&typeof addEventListener<"u"&&(Nt(Ft,function(e2){cr||(e2=new CustomEvent(Mt,{detail:e2}),cr=!0,dispatchEvent(e2),cr=!1)}),addEventListener(Mt,function(e2){e2=e2.detail,cr||ur(e2)}));var sr,cr=!1,lr=function(){};return typeof BroadcastChannel<"u"&&((lr=function(){(sr=new BroadcastChannel(Mt)).onmessage=function(e2){return e2.data&&ur(e2.data)}})(),typeof sr.unref=="fun\
ction"&&sr.unref(),Nt(Ft,function(e2){cr||sr.postMessage(e2)})),typeof addEventListener<"u"&&(addEventListener("pagehide",function(e2){if(!er.disableBfCache&&e2.persisted){ie&&console.debug("Dexie: handling persisted pagehide"),sr?.close();for(var t2=0,n2=et;t2<n2.length;t2++)n2[t2].close({disableAutoOpen:!1})}}),addEventListener("pageshow",function(e2){!er.disableBfCache&&e2.persisted&&(ie&&console.debug("Dexie: handling persisted pageshow"),lr(),ur({all:new gn(-1/0,[[]])}))})),_e.rejectionMapper=
function(e2,t2){return!e2||e2 instanceof N||e2 instanceof TypeError||e2 instanceof SyntaxError||!e2.name||!$[e2.name]?e2:(t2=new $[e2.name](t2||e2.message,e2),"stack"in e2&&l(t2,"stack",{get:function(){return this.inner.stack}}),t2)},oe(ie),_(er,Object.freeze({__proto__:null,Dexie:er,liveQuery:or,Entity:ut,cmp:st,PropModification:xt,replacePrefix:function(e2,t2){return new xt({replacePrefix:[e2,t2]})},add:function(e2){return new xt({add:e2})},remove:function(e2){return new xt({remove:e2})},default:er,
RangeSet:gn,mergeRanges:_n,rangesOverlap:xn}),{default:er}),er})})(dexie_min$1)),dexie_min$1.exports}var dexie_minExports=requireDexie_min();const _Dexie=getDefaultExportFromCjs(dexie_minExports),DexieSymbol=Symbol.for("Dexie"),Dexie=globalThis[DexieSymbol]||(globalThis[DexieSymbol]=_Dexie);if(_Dexie.semVer!==Dexie.semVer)throw new Error(`Two different versions of Dexie loaded in the same app: ${_Dexie.semVer} and ${Dexie.semVer}`);const{liveQuery,mergeRanges,rangesOverlap,RangeSet,cmp,Entity,PropModification,
replacePrefix,add,remove}=Dexie;class LlamacppDatabase extends Dexie{conversations;messages;constructor(){super("LlamacppWebui"),this.version(1).stores({conversations:"id, lastModified, currNode, name",messages:"id, convId, type, role, timestamp, parent, children"})}}const db=new LlamacppDatabase;class DatabaseService{static async createConversation(name){const conversation={id:uuid$1(),name,lastModified:Date.now(),currNode:""};return await db.conversations.add(conversation),conversation}static async createMessageBranch(message,parentId){
return await db.transaction("rw",[db.conversations,db.messages],async()=>{if(parentId!==null&&!await db.messages.get(parentId))throw new Error(`Parent message ${parentId} not found`);const newMessage={...message,id:uuid$1(),parent:parentId,toolCalls:message.toolCalls??"",children:[]};if(await db.messages.add(newMessage),parentId!==null){const parentMessage=await db.messages.get(parentId);parentMessage&&await db.messages.update(parentId,{children:[...parentMessage.children,newMessage.id]})}return await this.
updateConversation(message.convId,{currNode:newMessage.id}),newMessage})}static async createRootMessage(convId){const rootMessage={id:uuid$1(),convId,type:"root",timestamp:Date.now(),role:MessageRole.SYSTEM,content:"",parent:null,toolCalls:"",children:[]};return await db.messages.add(rootMessage),rootMessage.id}static async createSystemMessage(convId,systemPrompt,parentId){const trimmedPrompt=systemPrompt.trim();if(!trimmedPrompt)throw new Error("Cannot create system message with empty content");
const systemMessage={id:uuid$1(),convId,type:MessageRole.SYSTEM,timestamp:Date.now(),role:MessageRole.SYSTEM,content:trimmedPrompt,parent:parentId,children:[]};await db.messages.add(systemMessage);const parentMessage=await db.messages.get(parentId);return parentMessage&&await db.messages.update(parentId,{children:[...parentMessage.children,systemMessage.id]}),systemMessage}static async deleteConversation(id2,options){await db.transaction("rw",[db.conversations,db.messages],async()=>{if(options?.
deleteWithForks){const idsToDelete=[],queue=[id2];for(;queue.length>0;){const parentId=queue.pop(),children=await db.conversations.filter(c2=>c2.forkedFromConversationId===parentId).toArray();for(const child2 of children)idsToDelete.push(child2.id),queue.push(child2.id)}for(const forkId of idsToDelete)await db.conversations.delete(forkId),await db.messages.where("convId").equals(forkId).delete()}else{const newParent=(await db.conversations.get(id2))?.forkedFromConversationId,directChildren=await db.
conversations.filter(c2=>c2.forkedFromConversationId===id2).toArray();for(const child2 of directChildren)await db.conversations.update(child2.id,{forkedFromConversationId:newParent??void 0})}await db.conversations.delete(id2),await db.messages.where("convId").equals(id2).delete()})}static async deleteMessage(messageId){await db.transaction("rw",db.messages,async()=>{const message=await db.messages.get(messageId);if(message){if(message.parent){const parent=await db.messages.get(message.parent);parent&&
(parent.children=parent.children.filter(childId=>childId!==messageId),await db.messages.put(parent))}await db.messages.delete(messageId)}})}static async deleteMessageCascading(conversationId,messageId){return await db.transaction("rw",db.messages,async()=>{const allMessages=await db.messages.where("convId").equals(conversationId).toArray(),descendants=findDescendantMessages(allMessages,messageId),allToDelete=[messageId,...descendants],message=await db.messages.get(messageId);if(message&&message.
parent){const parent=await db.messages.get(message.parent);parent&&(parent.children=parent.children.filter(childId=>childId!==messageId),await db.messages.put(parent))}return await db.messages.bulkDelete(allToDelete),allToDelete})}static async getAllConversations(){return await db.conversations.orderBy("lastModified").reverse().toArray()}static async getConversation(id2){return await db.conversations.get(id2)}static async getConversationMessages(convId){return await db.messages.where("convId").equals(
convId).sortBy("timestamp")}static async updateConversation(id2,updates){await db.conversations.update(id2,{...updates,lastModified:Date.now()})}static async updateCurrentNode(convId,nodeId){await this.updateConversation(convId,{currNode:nodeId})}static async updateMessage(id2,updates){await db.messages.update(id2,updates)}static async importConversations(data){let importedCount=0,skippedCount=0;return await db.transaction("rw",[db.conversations,db.messages],async()=>{for(const item of data){const{
conv,messages}=item;if(await db.conversations.get(conv.id)){console.warn(`Conversation "${conv.name}" already exists, skipping...`),skippedCount++;continue}await db.conversations.add(conv);for(const msg of messages)await db.messages.put(msg);importedCount++}return{imported:importedCount,skipped:skippedCount}})}static async forkConversation(sourceConvId,atMessageId,options){return await db.transaction("rw",[db.conversations,db.messages],async()=>{const sourceConv=await db.conversations.get(sourceConvId);
if(!sourceConv)throw new Error(`Source conversation ${sourceConvId} not found`);const allMessages=await db.messages.where("convId").equals(sourceConvId).toArray(),pathMessages=filterByLeafNodeId(allMessages,atMessageId,!0);if(pathMessages.length===0)throw new Error(`Could not resolve message path to ${atMessageId}`);const idMap=new Map;for(const msg of pathMessages)idMap.set(msg.id,uuid$1());const newConvId=uuid$1(),clonedMessages=pathMessages.map(msg=>{const newId=idMap.get(msg.id),newParent=msg.
parent?idMap.get(msg.parent)??null:null,newChildren=msg.children.filter(childId=>idMap.has(childId)).map(childId=>idMap.get(childId));return{...msg,id:newId,convId:newConvId,parent:newParent,children:newChildren,extra:options.includeAttachments?msg.extra:void 0}}),lastClonedMessage=clonedMessages[clonedMessages.length-1],newConv={id:newConvId,name:options.name,lastModified:Date.now(),currNode:lastClonedMessage.id,forkedFromConversationId:sourceConvId,mcpServerOverrides:sourceConv.mcpServerOverrides?
sourceConv.mcpServerOverrides.map(o=>({serverId:o.serverId,enabled:o.enabled})):void 0};await db.conversations.add(newConv);for(const msg of clonedMessages)await db.messages.add(msg);return newConv})}}const MIGRATION_DONE_KEY="llama-webui-migration-v2-done";function isMigrationNeeded(){try{return!localStorage.getItem(MIGRATION_DONE_KEY)}catch{return!1}}function markMigrationDone(){try{localStorage.setItem(MIGRATION_DONE_KEY,String(Date.now()))}catch{}}function hasLegacyMarkers(message){return message.
content?LEGACY_AGENTIC_REGEX.HAS_LEGACY_MARKERS.test(message.content):!1}function extractLegacyReasoning(content2){let reasoning="",cleanContent=content2;const re2=new RegExp(LEGACY_AGENTIC_REGEX.REASONING_EXTRACT.source,"g");let match;for(;(match=re2.exec(content2))!==null;)reasoning+=match[1];return cleanContent=cleanContent.replace(new RegExp(LEGACY_AGENTIC_REGEX.REASONING_BLOCK.source,"g"),"").replace(LEGACY_AGENTIC_REGEX.REASONING_OPEN,""),{reasoning,cleanContent}}function parseLegacyToolCalls(content2){
const turns=[],regex=new RegExp(LEGACY_AGENTIC_REGEX.COMPLETED_TOOL_CALL.source,"g");let lastIndex=0,currentTurn={textBefore:"",toolCalls:[]},match;for(;(match=regex.exec(content2))!==null;){const textBefore=content2.slice(lastIndex,match.index).trim();textBefore&&currentTurn.toolCalls.length>0?(turns.push(currentTurn),currentTurn={textBefore,toolCalls:[]}):textBefore&&currentTurn.toolCalls.length===0&&(currentTurn.textBefore=textBefore),currentTurn.toolCalls.push({name:match[1],args:match[2],result:match[3].
replace(/^\n+|\n+$/g,"")}),lastIndex=match.index+match[0].length}const remainingText=content2.slice(lastIndex).trim();if(currentTurn.toolCalls.length>0&&turns.push(currentTurn),remainingText){const cleanRemaining=remainingText.replace(LEGACY_AGENTIC_REGEX.AGENTIC_TOOL_CALL_OPEN,"").trim();cleanRemaining&&turns.push({textBefore:cleanRemaining,toolCalls:[]})}return turns.length===0&&turns.push({textBefore:content2.trim(),toolCalls:[]}),turns}async function migrateConversation(convId){const allMessages=await DatabaseService.
getConversationMessages(convId);let migratedCount=0;for(const message of allMessages){if(message.role!==MessageRole.ASSISTANT)continue;if(!hasLegacyMarkers(message)){if(message.content?.includes(LEGACY_REASONING_TAGS.START)){const{reasoning:reasoning2,cleanContent:cleanContent2}=extractLegacyReasoning(message.content);await DatabaseService.updateMessage(message.id,{content:cleanContent2.trim(),reasoningContent:reasoning2||void 0}),migratedCount++}continue}const{reasoning,cleanContent}=extractLegacyReasoning(
message.content),turns=parseLegacyToolCalls(cleanContent);let existingToolCalls=[];if(message.toolCalls)try{existingToolCalls=JSON.parse(message.toolCalls)}catch{}const firstTurn=turns[0];if(!firstTurn)continue;const firstTurnToolCalls=firstTurn.toolCalls.map((tc,i)=>({id:(existingToolCalls.find(e=>e.function?.name===tc.name)||existingToolCalls[i])?.id||`legacy_tool_${i}`,type:"function",function:{name:tc.name,arguments:tc.args}}));await DatabaseService.updateMessage(message.id,{content:firstTurn.
textBefore,reasoningContent:reasoning||void 0,toolCalls:firstTurnToolCalls.length>0?JSON.stringify(firstTurnToolCalls):""});let currentParentId=message.id,toolCallIdCounter=existingToolCalls.length;for(let i=0;i<firstTurn.toolCalls.length;i++){const tc=firstTurn.toolCalls[i],toolCallId=firstTurnToolCalls[i]?.id||`legacy_tool_${i}`;currentParentId=(await DatabaseService.createMessageBranch({convId,type:MessageType.TEXT,role:MessageRole.TOOL,content:tc.result,toolCallId,timestamp:message.timestamp+
i+1,toolCalls:"",children:[]},currentParentId)).id}for(let turnIdx=1;turnIdx<turns.length;turnIdx++){const turn=turns[turnIdx],turnToolCalls=turn.toolCalls.map((tc,i)=>{const idx=toolCallIdCounter+i;return{id:existingToolCalls[idx]?.id||`legacy_tool_${idx}`,type:"function",function:{name:tc.name,arguments:tc.args}}});toolCallIdCounter+=turn.toolCalls.length,currentParentId=(await DatabaseService.createMessageBranch({convId,type:MessageType.TEXT,role:MessageRole.ASSISTANT,content:turn.textBefore,
timestamp:message.timestamp+turnIdx*100,toolCalls:turnToolCalls.length>0?JSON.stringify(turnToolCalls):"",children:[],model:message.model},currentParentId)).id;for(let i=0;i<turn.toolCalls.length;i++){const tc=turn.toolCalls[i],toolCallId=turnToolCalls[i]?.id||`legacy_tool_${toolCallIdCounter+i}`;currentParentId=(await DatabaseService.createMessageBranch({convId,type:MessageType.TEXT,role:MessageRole.TOOL,content:tc.result,toolCallId,timestamp:message.timestamp+turnIdx*100+i+1,toolCalls:"",children:[]},
currentParentId)).id}}if(message.children.length>0&&currentParentId!==message.id){for(const childId of message.children){const child2=allMessages.find(m=>m.id===childId);if(child2&&child2.role!==MessageRole.TOOL){await DatabaseService.updateMessage(childId,{parent:currentParentId});const newParent=await DatabaseService.getConversationMessages(convId).then(msgs=>msgs.find(m=>m.id===currentParentId));newParent&&!newParent.children.includes(childId)&&await DatabaseService.updateMessage(currentParentId,
{children:[...newParent.children,childId]})}}await DatabaseService.updateMessage(message.id,{children:[]})}migratedCount++}return migratedCount}async function runLegacyMigration(){if(isMigrationNeeded()){console.log("[Migration] Starting legacy message format migration...");try{const conversations2=await DatabaseService.getAllConversations();let totalMigrated=0;for(const conv of conversations2){const count=await migrateConversation(conv.id);totalMigrated+=count}totalMigrated>0?console.log(`[Migr\
ation] Migrated ${totalMigrated} messages across ${conversations2.length} conversations`):console.log("[Migration] No legacy messages found, marking as done"),markMigrationDone()}catch(error2){console.error("[Migration] Failed to migrate legacy messages:",error2),markMigrationDone()}}}class TTLCache{cache=new Map;ttlMs;maxEntries;onEvict;constructor(options={}){this.ttlMs=options.ttlMs??DEFAULT_CACHE_TTL_MS,this.maxEntries=options.maxEntries??DEFAULT_CACHE_MAX_ENTRIES,this.onEvict=options.onEvict}get(key2){
const entry=this.cache.get(key2);return entry?Date.now()>entry.expiresAt?(this.delete(key2),null):(entry.lastAccessed=Date.now(),entry.value):null}set(key2,value,customTtlMs){this.cache.size>=this.maxEntries&&!this.cache.has(key2)&&this.evictOldest();const ttl=customTtlMs??this.ttlMs,now2=Date.now();this.cache.set(key2,{value,expiresAt:now2+ttl,lastAccessed:now2})}has(key2){const entry=this.cache.get(key2);return entry?Date.now()>entry.expiresAt?(this.delete(key2),!1):!0:!1}delete(key2){const entry=this.
cache.get(key2);return entry&&this.onEvict&&this.onEvict(key2,entry.value),this.cache.delete(key2)}clear(){if(this.onEvict)for(const[key2,entry]of this.cache)this.onEvict(key2,entry.value);this.cache.clear()}get size(){return this.cache.size}prune(){const now2=Date.now();let pruned=0;for(const[key2,entry]of this.cache)now2>entry.expiresAt&&(this.delete(key2),pruned++);return pruned}keys(){const now2=Date.now(),validKeys=[];for(const[key2,entry]of this.cache)now2<=entry.expiresAt&&validKeys.push(
key2);return validKeys}evictOldest(){let oldestKey=null,oldestTime=1/0;for(const[key2,entry]of this.cache)entry.lastAccessed<oldestTime&&(oldestTime=entry.lastAccessed,oldestKey=key2);oldestKey!==null&&this.delete(oldestKey)}touch(key2){const entry=this.cache.get(key2);if(!entry)return!1;const now2=Date.now();return now2>entry.expiresAt?(this.delete(key2),!1):(entry.expiresAt=now2+this.ttlMs,entry.lastAccessed=now2,!0)}}function getRequestUrl(input){return typeof input=="string"?input:input instanceof
URL?input.href:input.url}function getRequestMethod(input,init2,baseInit){return init2?.method?init2.method:typeof Request<"u"&&input instanceof Request?input.method:baseInit?.method??"GET"}function getRequestBody(input,init2){if(init2?.body!==void 0)return init2.body;if(typeof Request<"u"&&input instanceof Request)return input.body}function summarizeRequestBody(body2){return body2==null?{kind:"empty"}:typeof body2=="string"?{kind:"string",size:body2.length}:body2 instanceof Blob?{kind:"blob",size:body2.
size}:body2 instanceof URLSearchParams?{kind:"urlsearchparams",size:body2.toString().length}:body2 instanceof FormData?{kind:"formdata"}:body2 instanceof ArrayBuffer?{kind:"arraybuffer",size:body2.byteLength}:ArrayBuffer.isView(body2)?{kind:body2.constructor.name,size:body2.byteLength}:{kind:typeof body2}}function formatDiagnosticErrorMessage(error2){const message=error2 instanceof Error?error2.message:String(error2);return message.includes("Failed to fetch")?`${message} (check CORS?)`:message}function extractJsonRpcMethods(body2){
if(typeof body2=="string")try{const parsed=JSON.parse(body2),methods=(Array.isArray(parsed)?parsed:[parsed]).map(message=>typeof message?.method=="string"?message.method:void 0).filter(method=>!!method);return methods.length>0?methods:void 0}catch{return}}function throwIfAborted(signal){if(signal?.aborted)throw new DOMException("Operation was aborted","AbortError")}function isAbortError(error2){return error2 instanceof DOMException&&error2.name==="AbortError"||error2 instanceof Error&&error2.name===
"AbortError"}function uuid$1(){return globalThis.crypto?.randomUUID?.()??Math.random().toString(36).substring(2)}function remToPx(rem){const val=parseFloat(rem),fontSize=parseFloat(getComputedStyle(document.documentElement).fontSize);return val*fontSize}function ActionIconCopyToClipboard($$anchor,$$props){push$1($$props,!1);let ariaLabel=prop($$props,"ariaLabel",8,"Copy to clipboard"),canCopy=prop($$props,"canCopy",8,!0),text2=prop($$props,"text",8);init();{let $0=derived_safe_equal(()=>!canCopy());
ActionIcon($$anchor,{get icon(){return Copy},get tooltip(){return ariaLabel()},iconSize:"h-4 w-4",get disabled(){return get$3($0)},onclick:()=>canCopy()&&copyToClipboard(text2())})}pop()}var root$1L=from_html("<button><!> <!></button>");function BadgeInfo($$anchor,$$props){let className=prop($$props,"class",3,"");var button=root$1L(),node2=child(button);{var consequent=$$anchor2=>{var fragment=comment$2(),node_1=first_child(fragment);snippet(node_1,()=>$$props.icon),append($$anchor2,fragment)};if_block(
node2,$$render=>{$$props.icon&&$$render(consequent)})}var node_2=sibling(node2,2);snippet(node_2,()=>$$props.children),reset(button),template_effect(()=>set_class(button,1,clsx(["inline-flex cursor-pointer items-center gap-1 rounded-sm bg-muted-foreground/15 px-1.5 py-0.75",className()]))),delegated("click",button,function(...$$args){$$props.onclick?.apply(this,$$args)}),append($$anchor,button)}delegate(["click"]);var root_3$Z=from_html("<!> Vision",1),root_4$F=from_html("<!> Audio",1),root_2$1c=from_html(
"<span><!></span>");function BadgesModality($$anchor,$$props){push$1($$props,!0);let className=prop($$props,"class",3,"");var fragment=comment$2(),node2=first_child(fragment);each(node2,16,()=>$$props.modalities,modality=>modality,($$anchor2,modality)=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);{var consequent_1=$$anchor3=>{var span=root_2$1c(),node_2=child(span);{var consequent=$$anchor4=>{var fragment_2=root_3$Z(),node_3=first_child(fragment_2);Eye(node_3,{class:"h-3 w-3"}),next$1(),
append($$anchor4,fragment_2)},alternate=$$anchor4=>{var fragment_3=root_4$F(),node_4=first_child(fragment_3);Mic(node_4,{class:"h-3 w-3"}),next$1(),append($$anchor4,fragment_3)};if_block(node_2,$$render=>{modality===ModelModality.VISION?$$render(consequent):$$render(alternate,-1)})}reset(span),template_effect(()=>set_class(span,1,clsx(["inline-flex items-center gap-1 rounded-md bg-muted px-2 py-1 text-xs font-medium",className()]))),append($$anchor3,span)};if_block(node_1,$$render=>{(modality===
ModelModality.VISION||modality===ModelModality.AUDIO)&&$$render(consequent_1)})}append($$anchor2,fragment_1)}),append($$anchor,fragment),pop()}var root_6$v=from_html('<div class="flex flex-wrap items-start justify-end gap-3"></div>'),root_2$1b=from_html("<div><!></div>"),root$1K=from_html("<!> <!> <!>",1);function ChatAttachmentsList($$anchor,$$props){push$1($$props,!0);const attachmentitem=($$anchor2,item=noop$3)=>{ChatAttachmentsListItem($$anchor2,{get imageClass(){return imageClass()},get imageHeight(){
return imageHeight()},get imageWidth(){return imageWidth()},get item(){return item()},get limitToSingleRow(){return limitToSingleRow()},get onFileRemove(){return $$props.onFileRemove},onMcpResourcePreview:openMcpResourcePreview,onPreview:(i,event2)=>openPreview(i,event2),get readonly(){return readonly2()}})};let className=prop($$props,"class",3,""),style2=prop($$props,"style",3,""),attachments=prop($$props,"attachments",19,()=>[]),readonly2=prop($$props,"readonly",3,!1),uploadedFiles=prop($$props,
"uploadedFiles",27,()=>proxy([])),imageClass=prop($$props,"imageClass",3,""),imageHeight=prop($$props,"imageHeight",3,"h-24"),imageWidth=prop($$props,"imageWidth",3,"w-auto"),limitToSingleRow=prop($$props,"limitToSingleRow",3,!1),carouselRef=state$1(void 0),mcpResourcePreviewOpen=state$1(!1),mcpResourcePreviewExtra=state$1(null),previewFocusIndex=state$1(0),viewAllDialogOpen=state$1(!1),displayItems=user_derived(()=>getAttachmentDisplayItems({uploadedFiles:uploadedFiles(),attachments:attachments()}));
function openPreview(item,event2){event2?.stopPropagation(),event2?.preventDefault();const index2=get$3(displayItems).filter(i=>!isMcpPrompt(i)&&!isMcpResource(i)).findIndex(i=>i.id===item.id);set$1(previewFocusIndex,index2>=0?index2:0,!0),set$1(viewAllDialogOpen,!0)}function openMcpResourcePreview(extra){set$1(mcpResourcePreviewExtra,extra,!0),set$1(mcpResourcePreviewOpen,!0)}user_effect(()=>{get$3(carouselRef)&&get$3(displayItems).length&&get$3(carouselRef).resetScroll()});var fragment_1=root$1K(),
node2=first_child(fragment_1);{var consequent_1=$$anchor2=>{var div=root_2$1b(),node_1=child(div);{var consequent=$$anchor3=>{bind_this(HorizontalScrollCarousel($$anchor3,{children:($$anchor4,$$slotProps)=>{var fragment_3=comment$2(),node_2=first_child(fragment_3);each(node_2,17,()=>get$3(displayItems),item=>item.id,($$anchor5,item)=>{attachmentitem($$anchor5,()=>get$3(item))}),append($$anchor4,fragment_3)},$$slots:{default:!0}}),$$value=>set$1(carouselRef,$$value,!0),()=>get$3(carouselRef))},alternate=$$anchor3=>{
var div_1=root_6$v();each(div_1,21,()=>get$3(displayItems),item=>item.id,($$anchor4,item)=>{attachmentitem($$anchor4,()=>get$3(item))}),reset(div_1),append($$anchor3,div_1)};if_block(node_1,$$render=>{limitToSingleRow()?$$render(consequent):$$render(alternate,-1)})}reset(div),template_effect(()=>{set_class(div,1,clsx(className())),set_style(div,style2())}),append($$anchor2,div)};if_block(node2,$$render=>{get$3(displayItems).length>0&&$$render(consequent_1)})}var node_3=sibling(node2,2);DialogChatAttachmentsPreview(
node_3,{get activeModelId(){return $$props.activeModelId},get attachments(){return attachments()},get previewFocusIndex(){return get$3(previewFocusIndex)},get uploadedFiles(){return uploadedFiles()},get open(){return get$3(viewAllDialogOpen)},set open($$value){set$1(viewAllDialogOpen,$$value,!0)}});var node_4=sibling(node_3,2);{var consequent_2=$$anchor2=>{DialogMcpResourcePreview($$anchor2,{get extra(){return get$3(mcpResourcePreviewExtra)},get open(){return get$3(mcpResourcePreviewOpen)},set open($$value){
set$1(mcpResourcePreviewOpen,$$value,!0)}})};if_block(node_4,$$render=>{get$3(mcpResourcePreviewExtra)&&$$render(consequent_2)})}append($$anchor,fragment_1),pop()}function ChatAttachmentsListItem($$anchor,$$props){push$1($$props,!0);let className=prop($$props,"class",3,""),imageClass=prop($$props,"imageClass",3,""),imageHeight=prop($$props,"imageHeight",3,"h-24"),imageWidth=prop($$props,"imageWidth",3,"w-auto"),limitToSingleRow=prop($$props,"limitToSingleRow",3,!1),readonly2=prop($$props,"readon\
ly",3,!1);const scrollClasses=user_derived(()=>limitToSingleRow()?"first:ml-4 last:mr-4":"");function toMcpResourceAttachment(extra,id2){return{id:id2,resource:{uri:extra.uri,name:extra.name,title:extra.name,serverName:extra.serverName}}}var fragment=comment$2(),node2=first_child(fragment);{var consequent_1=$$anchor2=>{const mcpPrompt=user_derived(()=>$$props.item.attachment?.type===AttachmentType.MCP_PROMPT?$$props.item.attachment:$$props.item.uploadedFile?.mcpPrompt?{type:AttachmentType.MCP_PROMPT,
name:$$props.item.name,serverName:$$props.item.uploadedFile.mcpPrompt.serverName,promptName:$$props.item.uploadedFile.mcpPrompt.promptName,content:$$props.item.textContent??"",arguments:$$props.item.uploadedFile.mcpPrompt.arguments}:null);var fragment_1=comment$2(),node_1=first_child(fragment_1);{var consequent=$$anchor3=>{{let $0=user_derived(()=>$$props.onFileRemove?()=>$$props.onFileRemove($$props.item.id):void 0);ChatAttachmentsListItemMcpPrompt($$anchor3,{get class(){return`max-w-[300px] mi\
n-w-[200px] flex-shrink-0 ${className()??""} ${get$3(scrollClasses)??""}`},get prompt(){return get$3(mcpPrompt)},get readonly(){return readonly2()},get isLoading(){return $$props.item.isLoading},get loadError(){return $$props.item.loadError},get onRemove(){return get$3($0)}})}};if_block(node_1,$$render=>{get$3(mcpPrompt)&&$$render(consequent)})}append($$anchor2,fragment_1)},d2=user_derived(()=>isMcpPrompt($$props.item)),consequent_2=$$anchor2=>{const mcpResource=user_derived(()=>$$props.item.attachment);
{let $0=user_derived(()=>toMcpResourceAttachment(get$3(mcpResource),$$props.item.id));ChatAttachmentsListItemMcpResource($$anchor2,{get class(){return`flex-shrink-0 ${className()??""} ${get$3(scrollClasses)??""}`},get attachment(){return get$3($0)},onclick:()=>$$props.onMcpResourcePreview?.(get$3(mcpResource))})}},d_12=user_derived(()=>isMcpResource($$props.item)),consequent_3=$$anchor2=>{ChatAttachmentsListItemThumbnailImage($$anchor2,{get class(){return`flex-shrink-0 cursor-pointer ${className()??
""} ${get$3(scrollClasses)??""}`},get id(){return $$props.item.id},get name(){return $$props.item.name},get preview(){return $$props.item.preview},get readonly(){return readonly2()},get onRemove(){return $$props.onFileRemove},get height(){return imageHeight()},get width(){return imageWidth()},get imageClass(){return imageClass()},onclick:()=>$$props.onPreview?.($$props.item)})},consequent_4=$$anchor2=>{ChatAttachmentsListItemThumbnailFile($$anchor2,{get class(){return`flex-shrink-0 cursor-pointe\
r ${className()??""} ${get$3(scrollClasses)??""}`},get id(){return $$props.item.id},get name(){return $$props.item.name},get size(){return $$props.item.size},get readonly(){return readonly2()},get onRemove(){return $$props.onFileRemove},get textContent(){return $$props.item.textContent},get attachment(){return $$props.item.attachment},get uploadedFile(){return $$props.item.uploadedFile},onclick:()=>$$props.onPreview?.($$props.item)})},d_2=user_derived(()=>isPdfFile$1($$props.item.attachment,$$props.
item.uploadedFile)),alternate=$$anchor2=>{ChatAttachmentsListItemThumbnailFile($$anchor2,{get class(){return`flex-shrink-0 cursor-pointer ${className()??""} ${get$3(scrollClasses)??""}`},get id(){return $$props.item.id},get name(){return $$props.item.name},get size(){return $$props.item.size},get readonly(){return readonly2()},get onRemove(){return $$props.onFileRemove},get textContent(){return $$props.item.textContent},get attachment(){return $$props.item.attachment},get uploadedFile(){return $$props.
item.uploadedFile},onclick:()=>$$props.onPreview?.($$props.item)})};if_block(node2,$$render=>{get$3(d2)?$$render(consequent_1):get$3(d_12)?$$render(consequent_2,1):$$props.item.isImage&&$$props.item.preview?$$render(consequent_3,2):get$3(d_2)?$$render(consequent_4,3):$$render(alternate,-1)})}append($$anchor,fragment),pop()}var root_1$15=from_html('<div class="absolute top-10 right-2 flex items-center justify-center opacity-0 transition-opacity group-hover:opacity-100"><!></div>'),root$1J=from_html(
"<div><!> <!></div>");function ChatAttachmentsListItemMcpPrompt($$anchor,$$props){push$1($$props,!0);let className=prop($$props,"class",3,""),isLoading2=prop($$props,"isLoading",3,!1),readonly2=prop($$props,"readonly",3,!1);var div=root$1J(),node2=child(div);ChatMessageMcpPromptContent(node2,{get isLoading(){return isLoading2()},get loadError(){return $$props.loadError},get prompt(){return $$props.prompt},get variant(){return McpPromptVariant.ATTACHMENT}});var node_1=sibling(node2,2);{var consequent=$$anchor2=>{
var div_1=root_1$15(),node_2=child(div_1);ActionIcon(node_2,{get icon(){return X},tooltip:"Remove",stopPropagationOnClick:!0,onclick:()=>$$props.onRemove?.()}),reset(div_1),append($$anchor2,div_1)};if_block(node_1,$$render=>{!readonly2()&&$$props.onRemove&&$$render(consequent)})}reset(div),template_effect(()=>set_class(div,1,`group relative ${className()??""}`)),append($$anchor,div),pop()}const NEVER=Object.freeze({status:"aborted"});function $constructor(name,initializer2,params){function init2(inst,def){
if(inst._zod||Object.defineProperty(inst,"_zod",{value:{def,constr:_,traits:new Set},enumerable:!1}),inst._zod.traits.has(name))return;inst._zod.traits.add(name),initializer2(inst,def);const proto=_.prototype,keys2=Object.keys(proto);for(let i=0;i<keys2.length;i++){const k=keys2[i];k in inst||(inst[k]=proto[k].bind(inst))}}const Parent=params?.Parent??Object;class Definition extends Parent{}Object.defineProperty(Definition,"name",{value:name});function _(def){var _a2;const inst=params?.Parent?new Definition:
this;init2(inst,def),(_a2=inst._zod).deferred??(_a2.deferred=[]);for(const fn of inst._zod.deferred)fn();return inst}return Object.defineProperty(_,"init",{value:init2}),Object.defineProperty(_,Symbol.hasInstance,{value:inst=>params?.Parent&&inst instanceof params.Parent?!0:inst?._zod?.traits?.has(name)}),Object.defineProperty(_,"name",{value:name}),_}class $ZodAsyncError extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class $ZodEncodeError extends Error{constructor(name){
super(`Encountered unidirectional transform during encode: ${name}`),this.name="ZodEncodeError"}}const globalConfig={};function config(newConfig){return globalConfig}function getEnumValues(entries){const numericValues=Object.values(entries).filter(v=>typeof v=="number");return Object.entries(entries).filter(([k,_])=>numericValues.indexOf(+k)===-1).map(([_,v])=>v)}function jsonStringifyReplacer(_,value){return typeof value=="bigint"?value.toString():value}function cached(getter){return{get value(){
{const value=getter();return Object.defineProperty(this,"value",{value}),value}}}}function nullish(input){return input==null}function cleanRegex(source2){const start2=source2.startsWith("^")?1:0,end=source2.endsWith("$")?source2.length-1:source2.length;return source2.slice(start2,end)}function floatSafeRemainder(val,step){const valDecCount=(val.toString().split(".")[1]||"").length,stepString=step.toString();let stepDecCount=(stepString.split(".")[1]||"").length;if(stepDecCount===0&&/\d?e-\d?/.test(
stepString)){const match=stepString.match(/\d?e-(\d?)/);match?.[1]&&(stepDecCount=Number.parseInt(match[1]))}const decCount=valDecCount>stepDecCount?valDecCount:stepDecCount,valInt=Number.parseInt(val.toFixed(decCount).replace(".","")),stepInt=Number.parseInt(step.toFixed(decCount).replace(".",""));return valInt%stepInt/10**decCount}const EVALUATING=Symbol("evaluating");function defineLazy(object2,key2,getter){let value;Object.defineProperty(object2,key2,{get(){if(value!==EVALUATING)return value===
void 0&&(value=EVALUATING,value=getter()),value},set(v){Object.defineProperty(object2,key2,{value:v})},configurable:!0})}function assignProp(target2,prop2,value){Object.defineProperty(target2,prop2,{value,writable:!0,enumerable:!0,configurable:!0})}function mergeDefs(...defs){const mergedDescriptors={};for(const def of defs){const descriptors=Object.getOwnPropertyDescriptors(def);Object.assign(mergedDescriptors,descriptors)}return Object.defineProperties({},mergedDescriptors)}function esc(str){return JSON.
stringify(str)}function slugify(input){return input.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const captureStackTrace="captureStackTrace"in Error?Error.captureStackTrace:(..._args)=>{};function isObject(data){return typeof data=="object"&&data!==null&&!Array.isArray(data)}const allowsEval=cached(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const F=Function;return new F(""),!0}catch{return!1}});function isPlainObject$2(o){
if(isObject(o)===!1)return!1;const ctor=o.constructor;if(ctor===void 0||typeof ctor!="function")return!0;const prot=ctor.prototype;return!(isObject(prot)===!1||Object.prototype.hasOwnProperty.call(prot,"isPrototypeOf")===!1)}function shallowClone(o){return isPlainObject$2(o)?{...o}:Array.isArray(o)?[...o]:o}const propertyKeyTypes=new Set(["string","number","symbol"]);function escapeRegex(str){return str.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function clone(inst,def,params){const cl=new inst._zod.
constr(def??inst._zod.def);return(!def||params?.parent)&&(cl._zod.parent=inst),cl}function normalizeParams(_params){const params=_params;if(!params)return{};if(typeof params=="string")return{error:()=>params};if(params?.message!==void 0){if(params?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");params.error=params.message}return delete params.message,typeof params.error=="string"?{...params,error:()=>params.error}:params}function optionalKeys(shape){return Object.
keys(shape).filter(k=>shape[k]._zod.optin==="optional"&&shape[k]._zod.optout==="optional")}const NUMBER_FORMAT_RANGES={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function pick(schema,mask){const currDef=schema._zod.def,def=mergeDefs(schema._zod.def,{get shape(){const newShape={};for(const key2 in mask){if(!(key2 in currDef.shape))throw new Error(
`Unrecognized key: "${key2}"`);mask[key2]&&(newShape[key2]=currDef.shape[key2])}return assignProp(this,"shape",newShape),newShape},checks:[]});return clone(schema,def)}function omit(schema,mask){const currDef=schema._zod.def,def=mergeDefs(schema._zod.def,{get shape(){const newShape={...schema._zod.def.shape};for(const key2 in mask){if(!(key2 in currDef.shape))throw new Error(`Unrecognized key: "${key2}"`);mask[key2]&&delete newShape[key2]}return assignProp(this,"shape",newShape),newShape},checks:[]});
return clone(schema,def)}function extend$2(schema,shape){if(!isPlainObject$2(shape))throw new Error("Invalid input to extend: expected a plain object");const checks2=schema._zod.def.checks;if(checks2&&checks2.length>0)throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");const def=mergeDefs(schema._zod.def,{get shape(){const _shape={...schema._zod.def.shape,...shape};return assignProp(this,"shape",_shape),_shape},checks:[]});return clone(schema,
def)}function safeExtend(schema,shape){if(!isPlainObject$2(shape))throw new Error("Invalid input to safeExtend: expected a plain object");const def={...schema._zod.def,get shape(){const _shape={...schema._zod.def.shape,...shape};return assignProp(this,"shape",_shape),_shape},checks:schema._zod.def.checks};return clone(schema,def)}function merge$1(a,b){const def=mergeDefs(a._zod.def,{get shape(){const _shape={...a._zod.def.shape,...b._zod.def.shape};return assignProp(this,"shape",_shape),_shape},
get catchall(){return b._zod.def.catchall},checks:[]});return clone(a,def)}function partial(Class,schema,mask){const def=mergeDefs(schema._zod.def,{get shape(){const oldShape=schema._zod.def.shape,shape={...oldShape};if(mask)for(const key2 in mask){if(!(key2 in oldShape))throw new Error(`Unrecognized key: "${key2}"`);mask[key2]&&(shape[key2]=Class?new Class({type:"optional",innerType:oldShape[key2]}):oldShape[key2])}else for(const key2 in oldShape)shape[key2]=Class?new Class({type:"optional",innerType:oldShape[key2]}):
oldShape[key2];return assignProp(this,"shape",shape),shape},checks:[]});return clone(schema,def)}function required$4(Class,schema,mask){const def=mergeDefs(schema._zod.def,{get shape(){const oldShape=schema._zod.def.shape,shape={...oldShape};if(mask)for(const key2 in mask){if(!(key2 in shape))throw new Error(`Unrecognized key: "${key2}"`);mask[key2]&&(shape[key2]=new Class({type:"nonoptional",innerType:oldShape[key2]}))}else for(const key2 in oldShape)shape[key2]=new Class({type:"nonoptional",innerType:oldShape[key2]});
return assignProp(this,"shape",shape),shape},checks:[]});return clone(schema,def)}function aborted(x,startIndex=0){if(x.aborted===!0)return!0;for(let i=startIndex;i<x.issues.length;i++)if(x.issues[i]?.continue!==!0)return!0;return!1}function prefixIssues(path2,issues){return issues.map(iss=>{var _a2;return(_a2=iss).path??(_a2.path=[]),iss.path.unshift(path2),iss})}function unwrapMessage(message){return typeof message=="string"?message:message?.message}function finalizeIssue(iss,ctx,config2){const full={
...iss,path:iss.path??[]};if(!iss.message){const message=unwrapMessage(iss.inst?._zod.def?.error?.(iss))??unwrapMessage(ctx?.error?.(iss))??unwrapMessage(config2.customError?.(iss))??unwrapMessage(config2.localeError?.(iss))??"Invalid input";full.message=message}return delete full.inst,delete full.continue,ctx?.reportInput||delete full.input,full}function getLengthableOrigin(input){return Array.isArray(input)?"array":typeof input=="string"?"string":"unknown"}function issue(...args){const[iss,input,
inst]=args;return typeof iss=="string"?{message:iss,code:"custom",input,inst}:{...iss}}const initializer$1=(inst,def)=>{inst.name="$ZodError",Object.defineProperty(inst,"_zod",{value:inst._zod,enumerable:!1}),Object.defineProperty(inst,"issues",{value:def,enumerable:!1}),inst.message=JSON.stringify(def,jsonStringifyReplacer,2),Object.defineProperty(inst,"toString",{value:()=>inst.message,enumerable:!1})},$ZodError=$constructor("$ZodError",initializer$1),$ZodRealError=$constructor("$ZodError",initializer$1,
{Parent:Error});function flattenError$1(error2,mapper=issue2=>issue2.message){const fieldErrors={},formErrors=[];for(const sub2 of error2.issues)sub2.path.length>0?(fieldErrors[sub2.path[0]]=fieldErrors[sub2.path[0]]||[],fieldErrors[sub2.path[0]].push(mapper(sub2))):formErrors.push(mapper(sub2));return{formErrors,fieldErrors}}function formatError(error2,mapper=issue2=>issue2.message){const fieldErrors={_errors:[]},processError=error3=>{for(const issue2 of error3.issues)if(issue2.code==="invalid_\
union"&&issue2.errors.length)issue2.errors.map(issues=>processError({issues}));else if(issue2.code==="invalid_key")processError({issues:issue2.issues});else if(issue2.code==="invalid_element")processError({issues:issue2.issues});else if(issue2.path.length===0)fieldErrors._errors.push(mapper(issue2));else{let curr=fieldErrors,i=0;for(;i<issue2.path.length;){const el=issue2.path[i];i===issue2.path.length-1?(curr[el]=curr[el]||{_errors:[]},curr[el]._errors.push(mapper(issue2))):curr[el]=curr[el]||{
_errors:[]},curr=curr[el],i++}}};return processError(error2),fieldErrors}const _parse=_Err=>(schema,value,_ctx,_params)=>{const ctx=_ctx?Object.assign(_ctx,{async:!1}):{async:!1},result=schema._zod.run({value,issues:[]},ctx);if(result instanceof Promise)throw new $ZodAsyncError;if(result.issues.length){const e=new(_params?.Err??_Err)(result.issues.map(iss=>finalizeIssue(iss,ctx,config())));throw captureStackTrace(e,_params?.callee),e}return result.value},_parseAsync=_Err=>async(schema,value,_ctx,params)=>{
const ctx=_ctx?Object.assign(_ctx,{async:!0}):{async:!0};let result=schema._zod.run({value,issues:[]},ctx);if(result instanceof Promise&&(result=await result),result.issues.length){const e=new(params?.Err??_Err)(result.issues.map(iss=>finalizeIssue(iss,ctx,config())));throw captureStackTrace(e,params?.callee),e}return result.value},_safeParse=_Err=>(schema,value,_ctx)=>{const ctx=_ctx?{..._ctx,async:!1}:{async:!1},result=schema._zod.run({value,issues:[]},ctx);if(result instanceof Promise)throw new $ZodAsyncError;
return result.issues.length?{success:!1,error:new(_Err??$ZodError)(result.issues.map(iss=>finalizeIssue(iss,ctx,config())))}:{success:!0,data:result.value}},safeParse$2=_safeParse($ZodRealError),_safeParseAsync=_Err=>async(schema,value,_ctx)=>{const ctx=_ctx?Object.assign(_ctx,{async:!0}):{async:!0};let result=schema._zod.run({value,issues:[]},ctx);return result instanceof Promise&&(result=await result),result.issues.length?{success:!1,error:new _Err(result.issues.map(iss=>finalizeIssue(iss,ctx,
config())))}:{success:!0,data:result.value}},safeParseAsync$1=_safeParseAsync($ZodRealError),_encode=_Err=>(schema,value,_ctx)=>{const ctx=_ctx?Object.assign(_ctx,{direction:"backward"}):{direction:"backward"};return _parse(_Err)(schema,value,ctx)},_decode=_Err=>(schema,value,_ctx)=>_parse(_Err)(schema,value,_ctx),_encodeAsync=_Err=>async(schema,value,_ctx)=>{const ctx=_ctx?Object.assign(_ctx,{direction:"backward"}):{direction:"backward"};return _parseAsync(_Err)(schema,value,ctx)},_decodeAsync=_Err=>async(schema,value,_ctx)=>_parseAsync(
_Err)(schema,value,_ctx),_safeEncode=_Err=>(schema,value,_ctx)=>{const ctx=_ctx?Object.assign(_ctx,{direction:"backward"}):{direction:"backward"};return _safeParse(_Err)(schema,value,ctx)},_safeDecode=_Err=>(schema,value,_ctx)=>_safeParse(_Err)(schema,value,_ctx),_safeEncodeAsync=_Err=>async(schema,value,_ctx)=>{const ctx=_ctx?Object.assign(_ctx,{direction:"backward"}):{direction:"backward"};return _safeParseAsync(_Err)(schema,value,ctx)},_safeDecodeAsync=_Err=>async(schema,value,_ctx)=>_safeParseAsync(
_Err)(schema,value,_ctx),cuid=/^[cC][^\s-]{8,}$/,cuid2=/^[0-9a-z]+$/,ulid=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,xid=/^[0-9a-vA-V]{20}$/,ksuid=/^[A-Za-z0-9]{27}$/,nanoid=/^[a-zA-Z0-9_-]{21}$/,duration$1=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,guid=/^([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})$/,uuid=version2=>version2?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${version2}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]\
{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,email=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,_emoji$1="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function emoji(){return new RegExp(_emoji$1,"u")}const ipv4=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,
ipv6=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,cidrv4=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,
cidrv6=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,base64=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,base64url=/^[A-Za-z0-9_-]*$/,e164=/^\+(?:[0-9]){6,14}[0-9]$/,dateSource="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",
date$1=new RegExp(`^${dateSource}$`);function timeSource(args){const hhmm="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof args.precision=="number"?args.precision===-1?`${hhmm}`:args.precision===0?`${hhmm}:[0-5]\\d`:`${hhmm}:[0-5]\\d\\.\\d{${args.precision}}`:`${hhmm}(?::[0-5]\\d(?:\\.\\d+)?)?`}function time$1(args){return new RegExp(`^${timeSource(args)}$`)}function datetime$1(args){const time2=timeSource({precision:args.precision}),opts=["Z"];args.local&&opts.push(""),args.offset&&opts.push("([+-](\
?:[01]\\d|2[0-3]):[0-5]\\d)");const timeRegex=`${time2}(?:${opts.join("|")})`;return new RegExp(`^${dateSource}T(?:${timeRegex})$`)}const string$3=params=>{const regex=params?`[\\s\\S]{${params?.minimum??0},${params?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${regex}$`)},integer=/^-?\d+$/,number$3=/^-?\d+(?:\.\d+)?/,boolean$2=/^(?:true|false)$/i,_null$2=/^null$/i,lowercase=/^[^A-Z]*$/,uppercase$1=/^[^a-z]*$/,$ZodCheck=$constructor("$ZodCheck",(inst,def)=>{var _a2;inst._zod??(inst._zod={}),inst.
_zod.def=def,(_a2=inst._zod).onattach??(_a2.onattach=[])}),numericOriginMap={number:"number",bigint:"bigint",object:"date"},$ZodCheckLessThan=$constructor("$ZodCheckLessThan",(inst,def)=>{$ZodCheck.init(inst,def);const origin2=numericOriginMap[typeof def.value];inst._zod.onattach.push(inst2=>{const bag=inst2._zod.bag,curr=(def.inclusive?bag.maximum:bag.exclusiveMaximum)??Number.POSITIVE_INFINITY;def.value<curr&&(def.inclusive?bag.maximum=def.value:bag.exclusiveMaximum=def.value)}),inst._zod.check=
payload=>{(def.inclusive?payload.value<=def.value:payload.value<def.value)||payload.issues.push({origin:origin2,code:"too_big",maximum:def.value,input:payload.value,inclusive:def.inclusive,inst,continue:!def.abort})}}),$ZodCheckGreaterThan=$constructor("$ZodCheckGreaterThan",(inst,def)=>{$ZodCheck.init(inst,def);const origin2=numericOriginMap[typeof def.value];inst._zod.onattach.push(inst2=>{const bag=inst2._zod.bag,curr=(def.inclusive?bag.minimum:bag.exclusiveMinimum)??Number.NEGATIVE_INFINITY;
def.value>curr&&(def.inclusive?bag.minimum=def.value:bag.exclusiveMinimum=def.value)}),inst._zod.check=payload=>{(def.inclusive?payload.value>=def.value:payload.value>def.value)||payload.issues.push({origin:origin2,code:"too_small",minimum:def.value,input:payload.value,inclusive:def.inclusive,inst,continue:!def.abort})}}),$ZodCheckMultipleOf=$constructor("$ZodCheckMultipleOf",(inst,def)=>{$ZodCheck.init(inst,def),inst._zod.onattach.push(inst2=>{var _a2;(_a2=inst2._zod.bag).multipleOf??(_a2.multipleOf=
def.value)}),inst._zod.check=payload=>{if(typeof payload.value!=typeof def.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof payload.value=="bigint"?payload.value%def.value===BigInt(0):floatSafeRemainder(payload.value,def.value)===0)||payload.issues.push({origin:typeof payload.value,code:"not_multiple_of",divisor:def.value,input:payload.value,inst,continue:!def.abort})}}),$ZodCheckNumberFormat=$constructor("$ZodCheckNumberFormat",(inst,def)=>{$ZodCheck.init(inst,
def),def.format=def.format||"float64";const isInt=def.format?.includes("int"),origin2=isInt?"int":"number",[minimum,maximum]=NUMBER_FORMAT_RANGES[def.format];inst._zod.onattach.push(inst2=>{const bag=inst2._zod.bag;bag.format=def.format,bag.minimum=minimum,bag.maximum=maximum,isInt&&(bag.pattern=integer)}),inst._zod.check=payload=>{const input=payload.value;if(isInt){if(!Number.isInteger(input)){payload.issues.push({expected:origin2,format:def.format,code:"invalid_type",continue:!1,input,inst});
return}if(!Number.isSafeInteger(input)){input>0?payload.issues.push({input,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst,origin:origin2,continue:!def.abort}):payload.issues.push({input,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst,origin:origin2,continue:!def.abort});return}}input<minimum&&payload.issues.push({origin:"number",input,code:"too_small",minimum,inclusive:!0,inst,
continue:!def.abort}),input>maximum&&payload.issues.push({origin:"number",input,code:"too_big",maximum,inst})}}),$ZodCheckMaxLength=$constructor("$ZodCheckMaxLength",(inst,def)=>{var _a2;$ZodCheck.init(inst,def),(_a2=inst._zod.def).when??(_a2.when=payload=>{const val=payload.value;return!nullish(val)&&val.length!==void 0}),inst._zod.onattach.push(inst2=>{const curr=inst2._zod.bag.maximum??Number.POSITIVE_INFINITY;def.maximum<curr&&(inst2._zod.bag.maximum=def.maximum)}),inst._zod.check=payload=>{
const input=payload.value;if(input.length<=def.maximum)return;const origin2=getLengthableOrigin(input);payload.issues.push({origin:origin2,code:"too_big",maximum:def.maximum,inclusive:!0,input,inst,continue:!def.abort})}}),$ZodCheckMinLength=$constructor("$ZodCheckMinLength",(inst,def)=>{var _a2;$ZodCheck.init(inst,def),(_a2=inst._zod.def).when??(_a2.when=payload=>{const val=payload.value;return!nullish(val)&&val.length!==void 0}),inst._zod.onattach.push(inst2=>{const curr=inst2._zod.bag.minimum??
Number.NEGATIVE_INFINITY;def.minimum>curr&&(inst2._zod.bag.minimum=def.minimum)}),inst._zod.check=payload=>{const input=payload.value;if(input.length>=def.minimum)return;const origin2=getLengthableOrigin(input);payload.issues.push({origin:origin2,code:"too_small",minimum:def.minimum,inclusive:!0,input,inst,continue:!def.abort})}}),$ZodCheckLengthEquals=$constructor("$ZodCheckLengthEquals",(inst,def)=>{var _a2;$ZodCheck.init(inst,def),(_a2=inst._zod.def).when??(_a2.when=payload=>{const val=payload.
value;return!nullish(val)&&val.length!==void 0}),inst._zod.onattach.push(inst2=>{const bag=inst2._zod.bag;bag.minimum=def.length,bag.maximum=def.length,bag.length=def.length}),inst._zod.check=payload=>{const input=payload.value,length=input.length;if(length===def.length)return;const origin2=getLengthableOrigin(input),tooBig=length>def.length;payload.issues.push({origin:origin2,...tooBig?{code:"too_big",maximum:def.length}:{code:"too_small",minimum:def.length},inclusive:!0,exact:!0,input:payload.
value,inst,continue:!def.abort})}}),$ZodCheckStringFormat=$constructor("$ZodCheckStringFormat",(inst,def)=>{var _a2,_b;$ZodCheck.init(inst,def),inst._zod.onattach.push(inst2=>{const bag=inst2._zod.bag;bag.format=def.format,def.pattern&&(bag.patterns??(bag.patterns=new Set),bag.patterns.add(def.pattern))}),def.pattern?(_a2=inst._zod).check??(_a2.check=payload=>{def.pattern.lastIndex=0,!def.pattern.test(payload.value)&&payload.issues.push({origin:"string",code:"invalid_format",format:def.format,input:payload.
value,...def.pattern?{pattern:def.pattern.toString()}:{},inst,continue:!def.abort})}):(_b=inst._zod).check??(_b.check=()=>{})}),$ZodCheckRegex=$constructor("$ZodCheckRegex",(inst,def)=>{$ZodCheckStringFormat.init(inst,def),inst._zod.check=payload=>{def.pattern.lastIndex=0,!def.pattern.test(payload.value)&&payload.issues.push({origin:"string",code:"invalid_format",format:"regex",input:payload.value,pattern:def.pattern.toString(),inst,continue:!def.abort})}}),$ZodCheckLowerCase=$constructor("$ZodC\
heckLowerCase",(inst,def)=>{def.pattern??(def.pattern=lowercase),$ZodCheckStringFormat.init(inst,def)}),$ZodCheckUpperCase=$constructor("$ZodCheckUpperCase",(inst,def)=>{def.pattern??(def.pattern=uppercase$1),$ZodCheckStringFormat.init(inst,def)}),$ZodCheckIncludes=$constructor("$ZodCheckIncludes",(inst,def)=>{$ZodCheck.init(inst,def);const escapedRegex=escapeRegex(def.includes),pattern2=new RegExp(typeof def.position=="number"?`^.{${def.position}}${escapedRegex}`:escapedRegex);def.pattern=pattern2,
inst._zod.onattach.push(inst2=>{const bag=inst2._zod.bag;bag.patterns??(bag.patterns=new Set),bag.patterns.add(pattern2)}),inst._zod.check=payload=>{payload.value.includes(def.includes,def.position)||payload.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:def.includes,input:payload.value,inst,continue:!def.abort})}}),$ZodCheckStartsWith=$constructor("$ZodCheckStartsWith",(inst,def)=>{$ZodCheck.init(inst,def);const pattern2=new RegExp(`^${escapeRegex(def.prefix)}.*`);
def.pattern??(def.pattern=pattern2),inst._zod.onattach.push(inst2=>{const bag=inst2._zod.bag;bag.patterns??(bag.patterns=new Set),bag.patterns.add(pattern2)}),inst._zod.check=payload=>{payload.value.startsWith(def.prefix)||payload.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:def.prefix,input:payload.value,inst,continue:!def.abort})}}),$ZodCheckEndsWith=$constructor("$ZodCheckEndsWith",(inst,def)=>{$ZodCheck.init(inst,def);const pattern2=new RegExp(`.*${escapeRegex(
def.suffix)}$`);def.pattern??(def.pattern=pattern2),inst._zod.onattach.push(inst2=>{const bag=inst2._zod.bag;bag.patterns??(bag.patterns=new Set),bag.patterns.add(pattern2)}),inst._zod.check=payload=>{payload.value.endsWith(def.suffix)||payload.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:def.suffix,input:payload.value,inst,continue:!def.abort})}}),$ZodCheckOverwrite=$constructor("$ZodCheckOverwrite",(inst,def)=>{$ZodCheck.init(inst,def),inst._zod.check=payload=>{
payload.value=def.tx(payload.value)}});class Doc{constructor(args=[]){this.content=[],this.indent=0,this&&(this.args=args)}indented(fn){this.indent+=1,fn(this),this.indent-=1}write(arg){if(typeof arg=="function"){arg(this,{execution:"sync"}),arg(this,{execution:"async"});return}const lines=arg.split(`
`).filter(x=>x),minIndent=Math.min(...lines.map(x=>x.length-x.trimStart().length)),dedented=lines.map(x=>x.slice(minIndent)).map(x=>" ".repeat(this.indent*2)+x);for(const line of dedented)this.content.push(line)}compile(){const F=Function,args=this?.args,lines=[...(this?.content??[""]).map(x=>`  ${x}`)];return new F(...args,lines.join(`
`))}}const version$2={major:4,minor:2,patch:1},$ZodType=$constructor("$ZodType",(inst,def)=>{var _a2;inst??(inst={}),inst._zod.def=def,inst._zod.bag=inst._zod.bag||{},inst._zod.version=version$2;const checks2=[...inst._zod.def.checks??[]];inst._zod.traits.has("$ZodCheck")&&checks2.unshift(inst);for(const ch of checks2)for(const fn of ch._zod.onattach)fn(inst);if(checks2.length===0)(_a2=inst._zod).deferred??(_a2.deferred=[]),inst._zod.deferred?.push(()=>{inst._zod.run=inst._zod.parse});else{const runChecks=(payload,checks3,ctx)=>{
let isAborted=aborted(payload),asyncResult;for(const ch of checks3){if(ch._zod.def.when){if(!ch._zod.def.when(payload))continue}else if(isAborted)continue;const currLen=payload.issues.length,_=ch._zod.check(payload);if(_ instanceof Promise&&ctx?.async===!1)throw new $ZodAsyncError;if(asyncResult||_ instanceof Promise)asyncResult=(asyncResult??Promise.resolve()).then(async()=>{await _,payload.issues.length!==currLen&&(isAborted||(isAborted=aborted(payload,currLen)))});else{if(payload.issues.length===
currLen)continue;isAborted||(isAborted=aborted(payload,currLen))}}return asyncResult?asyncResult.then(()=>payload):payload},handleCanaryResult=(canary,payload,ctx)=>{if(aborted(canary))return canary.aborted=!0,canary;const checkResult=runChecks(payload,checks2,ctx);if(checkResult instanceof Promise){if(ctx.async===!1)throw new $ZodAsyncError;return checkResult.then(checkResult2=>inst._zod.parse(checkResult2,ctx))}return inst._zod.parse(checkResult,ctx)};inst._zod.run=(payload,ctx)=>{if(ctx.skipChecks)
return inst._zod.parse(payload,ctx);if(ctx.direction==="backward"){const canary=inst._zod.parse({value:payload.value,issues:[]},{...ctx,skipChecks:!0});return canary instanceof Promise?canary.then(canary2=>handleCanaryResult(canary2,payload,ctx)):handleCanaryResult(canary,payload,ctx)}const result=inst._zod.parse(payload,ctx);if(result instanceof Promise){if(ctx.async===!1)throw new $ZodAsyncError;return result.then(result2=>runChecks(result2,checks2,ctx))}return runChecks(result,checks2,ctx)}}inst["\
~standard"]={validate:value=>{try{const r2=safeParse$2(inst,value);return r2.success?{value:r2.data}:{issues:r2.error?.issues}}catch{return safeParseAsync$1(inst,value).then(r2=>r2.success?{value:r2.data}:{issues:r2.error?.issues})}},vendor:"zod",version:1}}),$ZodString=$constructor("$ZodString",(inst,def)=>{$ZodType.init(inst,def),inst._zod.pattern=[...inst?._zod.bag?.patterns??[]].pop()??string$3(inst._zod.bag),inst._zod.parse=(payload,_)=>{if(def.coerce)try{payload.value=String(payload.value)}catch{}
return typeof payload.value=="string"||payload.issues.push({expected:"string",code:"invalid_type",input:payload.value,inst}),payload}}),$ZodStringFormat=$constructor("$ZodStringFormat",(inst,def)=>{$ZodCheckStringFormat.init(inst,def),$ZodString.init(inst,def)}),$ZodGUID=$constructor("$ZodGUID",(inst,def)=>{def.pattern??(def.pattern=guid),$ZodStringFormat.init(inst,def)}),$ZodUUID=$constructor("$ZodUUID",(inst,def)=>{if(def.version){const v={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[def.version];
if(v===void 0)throw new Error(`Invalid UUID version: "${def.version}"`);def.pattern??(def.pattern=uuid(v))}else def.pattern??(def.pattern=uuid());$ZodStringFormat.init(inst,def)}),$ZodEmail=$constructor("$ZodEmail",(inst,def)=>{def.pattern??(def.pattern=email),$ZodStringFormat.init(inst,def)}),$ZodURL=$constructor("$ZodURL",(inst,def)=>{$ZodStringFormat.init(inst,def),inst._zod.check=payload=>{try{const trimmed=payload.value.trim(),url2=new URL(trimmed);def.hostname&&(def.hostname.lastIndex=0,def.
hostname.test(url2.hostname)||payload.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:def.hostname.source,input:payload.value,inst,continue:!def.abort})),def.protocol&&(def.protocol.lastIndex=0,def.protocol.test(url2.protocol.endsWith(":")?url2.protocol.slice(0,-1):url2.protocol)||payload.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:def.protocol.source,input:payload.value,inst,continue:!def.abort})),def.normalize?payload.value=url2.
href:payload.value=trimmed;return}catch{payload.issues.push({code:"invalid_format",format:"url",input:payload.value,inst,continue:!def.abort})}}}),$ZodEmoji=$constructor("$ZodEmoji",(inst,def)=>{def.pattern??(def.pattern=emoji()),$ZodStringFormat.init(inst,def)}),$ZodNanoID=$constructor("$ZodNanoID",(inst,def)=>{def.pattern??(def.pattern=nanoid),$ZodStringFormat.init(inst,def)}),$ZodCUID=$constructor("$ZodCUID",(inst,def)=>{def.pattern??(def.pattern=cuid),$ZodStringFormat.init(inst,def)}),$ZodCUID2=$constructor(
"$ZodCUID2",(inst,def)=>{def.pattern??(def.pattern=cuid2),$ZodStringFormat.init(inst,def)}),$ZodULID=$constructor("$ZodULID",(inst,def)=>{def.pattern??(def.pattern=ulid),$ZodStringFormat.init(inst,def)}),$ZodXID=$constructor("$ZodXID",(inst,def)=>{def.pattern??(def.pattern=xid),$ZodStringFormat.init(inst,def)}),$ZodKSUID=$constructor("$ZodKSUID",(inst,def)=>{def.pattern??(def.pattern=ksuid),$ZodStringFormat.init(inst,def)}),$ZodISODateTime=$constructor("$ZodISODateTime",(inst,def)=>{def.pattern??
(def.pattern=datetime$1(def)),$ZodStringFormat.init(inst,def)}),$ZodISODate=$constructor("$ZodISODate",(inst,def)=>{def.pattern??(def.pattern=date$1),$ZodStringFormat.init(inst,def)}),$ZodISOTime=$constructor("$ZodISOTime",(inst,def)=>{def.pattern??(def.pattern=time$1(def)),$ZodStringFormat.init(inst,def)}),$ZodISODuration=$constructor("$ZodISODuration",(inst,def)=>{def.pattern??(def.pattern=duration$1),$ZodStringFormat.init(inst,def)}),$ZodIPv4=$constructor("$ZodIPv4",(inst,def)=>{def.pattern??
(def.pattern=ipv4),$ZodStringFormat.init(inst,def),inst._zod.bag.format="ipv4"}),$ZodIPv6=$constructor("$ZodIPv6",(inst,def)=>{def.pattern??(def.pattern=ipv6),$ZodStringFormat.init(inst,def),inst._zod.bag.format="ipv6",inst._zod.check=payload=>{try{new URL(`http://[${payload.value}]`)}catch{payload.issues.push({code:"invalid_format",format:"ipv6",input:payload.value,inst,continue:!def.abort})}}}),$ZodCIDRv4=$constructor("$ZodCIDRv4",(inst,def)=>{def.pattern??(def.pattern=cidrv4),$ZodStringFormat.
init(inst,def)}),$ZodCIDRv6=$constructor("$ZodCIDRv6",(inst,def)=>{def.pattern??(def.pattern=cidrv6),$ZodStringFormat.init(inst,def),inst._zod.check=payload=>{const parts=payload.value.split("/");try{if(parts.length!==2)throw new Error;const[address,prefix]=parts;if(!prefix)throw new Error;const prefixNum=Number(prefix);if(`${prefixNum}`!==prefix)throw new Error;if(prefixNum<0||prefixNum>128)throw new Error;new URL(`http://[${address}]`)}catch{payload.issues.push({code:"invalid_format",format:"c\
idrv6",input:payload.value,inst,continue:!def.abort})}}});function isValidBase64(data){if(data==="")return!0;if(data.length%4!==0)return!1;try{return atob(data),!0}catch{return!1}}const $ZodBase64=$constructor("$ZodBase64",(inst,def)=>{def.pattern??(def.pattern=base64),$ZodStringFormat.init(inst,def),inst._zod.bag.contentEncoding="base64",inst._zod.check=payload=>{isValidBase64(payload.value)||payload.issues.push({code:"invalid_format",format:"base64",input:payload.value,inst,continue:!def.abort})}});
function isValidBase64URL(data){if(!base64url.test(data))return!1;const base642=data.replace(/[-_]/g,c2=>c2==="-"?"+":"/"),padded=base642.padEnd(Math.ceil(base642.length/4)*4,"=");return isValidBase64(padded)}const $ZodBase64URL=$constructor("$ZodBase64URL",(inst,def)=>{def.pattern??(def.pattern=base64url),$ZodStringFormat.init(inst,def),inst._zod.bag.contentEncoding="base64url",inst._zod.check=payload=>{isValidBase64URL(payload.value)||payload.issues.push({code:"invalid_format",format:"base64ur\
l",input:payload.value,inst,continue:!def.abort})}}),$ZodE164=$constructor("$ZodE164",(inst,def)=>{def.pattern??(def.pattern=e164),$ZodStringFormat.init(inst,def)});function isValidJWT(token2,algorithm=null){try{const tokensParts=token2.split(".");if(tokensParts.length!==3)return!1;const[header]=tokensParts;if(!header)return!1;const parsedHeader=JSON.parse(atob(header));return!("typ"in parsedHeader&&parsedHeader?.typ!=="JWT"||!parsedHeader.alg||algorithm&&(!("alg"in parsedHeader)||parsedHeader.alg!==
algorithm))}catch{return!1}}const $ZodJWT=$constructor("$ZodJWT",(inst,def)=>{$ZodStringFormat.init(inst,def),inst._zod.check=payload=>{isValidJWT(payload.value,def.alg)||payload.issues.push({code:"invalid_format",format:"jwt",input:payload.value,inst,continue:!def.abort})}}),$ZodNumber=$constructor("$ZodNumber",(inst,def)=>{$ZodType.init(inst,def),inst._zod.pattern=inst._zod.bag.pattern??number$3,inst._zod.parse=(payload,_ctx)=>{if(def.coerce)try{payload.value=Number(payload.value)}catch{}const input=payload.
value;if(typeof input=="number"&&!Number.isNaN(input)&&Number.isFinite(input))return payload;const received=typeof input=="number"?Number.isNaN(input)?"NaN":Number.isFinite(input)?void 0:"Infinity":void 0;return payload.issues.push({expected:"number",code:"invalid_type",input,inst,...received?{received}:{}}),payload}}),$ZodNumberFormat=$constructor("$ZodNumberFormat",(inst,def)=>{$ZodCheckNumberFormat.init(inst,def),$ZodNumber.init(inst,def)}),$ZodBoolean=$constructor("$ZodBoolean",(inst,def)=>{
$ZodType.init(inst,def),inst._zod.pattern=boolean$2,inst._zod.parse=(payload,_ctx)=>{if(def.coerce)try{payload.value=!!payload.value}catch{}const input=payload.value;return typeof input=="boolean"||payload.issues.push({expected:"boolean",code:"invalid_type",input,inst}),payload}}),$ZodNull=$constructor("$ZodNull",(inst,def)=>{$ZodType.init(inst,def),inst._zod.pattern=_null$2,inst._zod.values=new Set([null]),inst._zod.parse=(payload,_ctx)=>{const input=payload.value;return input===null||payload.issues.
push({expected:"null",code:"invalid_type",input,inst}),payload}}),$ZodAny=$constructor("$ZodAny",(inst,def)=>{$ZodType.init(inst,def),inst._zod.parse=payload=>payload}),$ZodUnknown=$constructor("$ZodUnknown",(inst,def)=>{$ZodType.init(inst,def),inst._zod.parse=payload=>payload}),$ZodNever=$constructor("$ZodNever",(inst,def)=>{$ZodType.init(inst,def),inst._zod.parse=(payload,_ctx)=>(payload.issues.push({expected:"never",code:"invalid_type",input:payload.value,inst}),payload)});function handleArrayResult(result,final,index2){
result.issues.length&&final.issues.push(...prefixIssues(index2,result.issues)),final.value[index2]=result.value}const $ZodArray=$constructor("$ZodArray",(inst,def)=>{$ZodType.init(inst,def),inst._zod.parse=(payload,ctx)=>{const input=payload.value;if(!Array.isArray(input))return payload.issues.push({expected:"array",code:"invalid_type",input,inst}),payload;payload.value=Array(input.length);const proms=[];for(let i=0;i<input.length;i++){const item=input[i],result=def.element._zod.run({value:item,
issues:[]},ctx);result instanceof Promise?proms.push(result.then(result2=>handleArrayResult(result2,payload,i))):handleArrayResult(result,payload,i)}return proms.length?Promise.all(proms).then(()=>payload):payload}});function handlePropertyResult(result,final,key2,input){result.issues.length&&final.issues.push(...prefixIssues(key2,result.issues)),result.value===void 0?key2 in input&&(final.value[key2]=void 0):final.value[key2]=result.value}function normalizeDef(def){const keys2=Object.keys(def.shape);
for(const k of keys2)if(!def.shape?.[k]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${k}": expected a Zod schema`);const okeys=optionalKeys(def.shape);return{...def,keys:keys2,keySet:new Set(keys2),numKeys:keys2.length,optionalKeys:new Set(okeys)}}function handleCatchall(proms,input,payload,ctx,def,inst){const unrecognized=[],keySet=def.keySet,_catchall=def.catchall._zod,t=_catchall.def.type;for(const key2 in input){if(keySet.has(key2))continue;if(t==="never"){unrecognized.
push(key2);continue}const r2=_catchall.run({value:input[key2],issues:[]},ctx);r2 instanceof Promise?proms.push(r2.then(r3=>handlePropertyResult(r3,payload,key2,input))):handlePropertyResult(r2,payload,key2,input)}return unrecognized.length&&payload.issues.push({code:"unrecognized_keys",keys:unrecognized,input,inst}),proms.length?Promise.all(proms).then(()=>payload):payload}const $ZodObject=$constructor("$ZodObject",(inst,def)=>{if($ZodType.init(inst,def),!Object.getOwnPropertyDescriptor(def,"sha\
pe")?.get){const sh=def.shape;Object.defineProperty(def,"shape",{get:()=>{const newSh={...sh};return Object.defineProperty(def,"shape",{value:newSh}),newSh}})}const _normalized=cached(()=>normalizeDef(def));defineLazy(inst._zod,"propValues",()=>{const shape=def.shape,propValues={};for(const key2 in shape){const field=shape[key2]._zod;if(field.values){propValues[key2]??(propValues[key2]=new Set);for(const v of field.values)propValues[key2].add(v)}}return propValues});const isObject$12=isObject,catchall=def.
catchall;let value;inst._zod.parse=(payload,ctx)=>{value??(value=_normalized.value);const input=payload.value;if(!isObject$12(input))return payload.issues.push({expected:"object",code:"invalid_type",input,inst}),payload;payload.value={};const proms=[],shape=value.shape;for(const key2 of value.keys){const r2=shape[key2]._zod.run({value:input[key2],issues:[]},ctx);r2 instanceof Promise?proms.push(r2.then(r3=>handlePropertyResult(r3,payload,key2,input))):handlePropertyResult(r2,payload,key2,input)}
return catchall?handleCatchall(proms,input,payload,ctx,_normalized.value,inst):proms.length?Promise.all(proms).then(()=>payload):payload}}),$ZodObjectJIT=$constructor("$ZodObjectJIT",(inst,def)=>{$ZodObject.init(inst,def);const superParse=inst._zod.parse,_normalized=cached(()=>normalizeDef(def)),generateFastpass=shape=>{const doc=new Doc(["shape","payload","ctx"]),normalized=_normalized.value,parseStr=key2=>{const k=esc(key2);return`shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`};
doc.write("const input = payload.value;");const ids=Object.create(null);let counter=0;for(const key2 of normalized.keys)ids[key2]=`key_${counter++}`;doc.write("const newResult = {};");for(const key2 of normalized.keys){const id2=ids[key2],k=esc(key2);doc.write(`const ${id2} = ${parseStr(key2)};`),doc.write(`
        if (${id2}.issues.length) {
          payload.issues = payload.issues.concat(${id2}.issues.map(iss => ({
            ...iss,
            path: iss.path ? [${k}, ...iss.path] : [${k}]
          })));
        }
        
        
        if (${id2}.value === undefined) {
          if (${k} in input) {
            newResult[${k}] = undefined;
          }
        } else {
          newResult[${k}] = ${id2}.value;
        }
        
      `)}doc.write("payload.value = newResult;"),doc.write("return payload;");const fn=doc.compile();return(payload,ctx)=>fn(shape,payload,ctx)};let fastpass;const isObject$12=isObject,jit=!globalConfig.jitless,fastEnabled=jit&&allowsEval.value,catchall=def.catchall;let value;inst._zod.parse=(payload,ctx)=>{value??(value=_normalized.value);const input=payload.value;return isObject$12(input)?jit&&fastEnabled&&ctx?.async===!1&&ctx.jitless!==!0?(fastpass||(fastpass=generateFastpass(def.shape)),payload=
fastpass(payload,ctx),catchall?handleCatchall([],input,payload,ctx,value,inst):payload):superParse(payload,ctx):(payload.issues.push({expected:"object",code:"invalid_type",input,inst}),payload)}});function handleUnionResults(results,final,inst,ctx){for(const result of results)if(result.issues.length===0)return final.value=result.value,final;const nonaborted=results.filter(r2=>!aborted(r2));return nonaborted.length===1?(final.value=nonaborted[0].value,nonaborted[0]):(final.issues.push({code:"inva\
lid_union",input:final.value,inst,errors:results.map(result=>result.issues.map(iss=>finalizeIssue(iss,ctx,config())))}),final)}const $ZodUnion=$constructor("$ZodUnion",(inst,def)=>{$ZodType.init(inst,def),defineLazy(inst._zod,"optin",()=>def.options.some(o=>o._zod.optin==="optional")?"optional":void 0),defineLazy(inst._zod,"optout",()=>def.options.some(o=>o._zod.optout==="optional")?"optional":void 0),defineLazy(inst._zod,"values",()=>{if(def.options.every(o=>o._zod.values))return new Set(def.options.
flatMap(option2=>Array.from(option2._zod.values)))}),defineLazy(inst._zod,"pattern",()=>{if(def.options.every(o=>o._zod.pattern)){const patterns=def.options.map(o=>o._zod.pattern);return new RegExp(`^(${patterns.map(p2=>cleanRegex(p2.source)).join("|")})$`)}});const single=def.options.length===1,first=def.options[0]._zod.run;inst._zod.parse=(payload,ctx)=>{if(single)return first(payload,ctx);let async=!1;const results=[];for(const option2 of def.options){const result=option2._zod.run({value:payload.
value,issues:[]},ctx);if(result instanceof Promise)results.push(result),async=!0;else{if(result.issues.length===0)return result;results.push(result)}}return async?Promise.all(results).then(results2=>handleUnionResults(results2,payload,inst,ctx)):handleUnionResults(results,payload,inst,ctx)}}),$ZodDiscriminatedUnion=$constructor("$ZodDiscriminatedUnion",(inst,def)=>{def.inclusive=!1,$ZodUnion.init(inst,def);const _super=inst._zod.parse;defineLazy(inst._zod,"propValues",()=>{const propValues={};for(const option2 of def.
options){const pv=option2._zod.propValues;if(!pv||Object.keys(pv).length===0)throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(option2)}"`);for(const[k,v]of Object.entries(pv)){propValues[k]||(propValues[k]=new Set);for(const val of v)propValues[k].add(val)}}return propValues});const disc=cached(()=>{const opts=def.options,map2=new Map;for(const o of opts){const values=o._zod.propValues?.[def.discriminator];if(!values||values.size===0)throw new Error(`Invalid di\
scriminated union option at index "${def.options.indexOf(o)}"`);for(const v of values){if(map2.has(v))throw new Error(`Duplicate discriminator value "${String(v)}"`);map2.set(v,o)}}return map2});inst._zod.parse=(payload,ctx)=>{const input=payload.value;if(!isObject(input))return payload.issues.push({code:"invalid_type",expected:"object",input,inst}),payload;const opt=disc.value.get(input?.[def.discriminator]);return opt?opt._zod.run(payload,ctx):def.unionFallback?_super(payload,ctx):(payload.issues.
push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:def.discriminator,input,path:[def.discriminator],inst}),payload)}}),$ZodIntersection=$constructor("$ZodIntersection",(inst,def)=>{$ZodType.init(inst,def),inst._zod.parse=(payload,ctx)=>{const input=payload.value,left=def.left._zod.run({value:input,issues:[]},ctx),right=def.right._zod.run({value:input,issues:[]},ctx);return left instanceof Promise||right instanceof Promise?Promise.all([left,right]).then(([left2,right2])=>handleIntersectionResults(
payload,left2,right2)):handleIntersectionResults(payload,left,right)}});function mergeValues(a,b){if(a===b)return{valid:!0,data:a};if(a instanceof Date&&b instanceof Date&&+a==+b)return{valid:!0,data:a};if(isPlainObject$2(a)&&isPlainObject$2(b)){const bKeys=Object.keys(b),sharedKeys=Object.keys(a).filter(key2=>bKeys.indexOf(key2)!==-1),newObj={...a,...b};for(const key2 of sharedKeys){const sharedValue=mergeValues(a[key2],b[key2]);if(!sharedValue.valid)return{valid:!1,mergeErrorPath:[key2,...sharedValue.
mergeErrorPath]};newObj[key2]=sharedValue.data}return{valid:!0,data:newObj}}if(Array.isArray(a)&&Array.isArray(b)){if(a.length!==b.length)return{valid:!1,mergeErrorPath:[]};const newArray=[];for(let index2=0;index2<a.length;index2++){const itemA=a[index2],itemB=b[index2],sharedValue=mergeValues(itemA,itemB);if(!sharedValue.valid)return{valid:!1,mergeErrorPath:[index2,...sharedValue.mergeErrorPath]};newArray.push(sharedValue.data)}return{valid:!0,data:newArray}}return{valid:!1,mergeErrorPath:[]}}
function handleIntersectionResults(result,left,right){if(left.issues.length&&result.issues.push(...left.issues),right.issues.length&&result.issues.push(...right.issues),aborted(result))return result;const merged=mergeValues(left.value,right.value);if(!merged.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(merged.mergeErrorPath)}`);return result.value=merged.data,result}const $ZodRecord=$constructor("$ZodRecord",(inst,def)=>{$ZodType.init(inst,def),inst._zod.parse=(payload,ctx)=>{
const input=payload.value;if(!isPlainObject$2(input))return payload.issues.push({expected:"record",code:"invalid_type",input,inst}),payload;const proms=[],values=def.keyType._zod.values;if(values){payload.value={};const recordKeys=new Set;for(const key2 of values)if(typeof key2=="string"||typeof key2=="number"||typeof key2=="symbol"){recordKeys.add(typeof key2=="number"?key2.toString():key2);const result=def.valueType._zod.run({value:input[key2],issues:[]},ctx);result instanceof Promise?proms.push(
result.then(result2=>{result2.issues.length&&payload.issues.push(...prefixIssues(key2,result2.issues)),payload.value[key2]=result2.value})):(result.issues.length&&payload.issues.push(...prefixIssues(key2,result.issues)),payload.value[key2]=result.value)}let unrecognized;for(const key2 in input)recordKeys.has(key2)||(unrecognized=unrecognized??[],unrecognized.push(key2));unrecognized&&unrecognized.length>0&&payload.issues.push({code:"unrecognized_keys",input,inst,keys:unrecognized})}else{payload.
value={};for(const key2 of Reflect.ownKeys(input)){if(key2==="__proto__")continue;const keyResult=def.keyType._zod.run({value:key2,issues:[]},ctx);if(keyResult instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(keyResult.issues.length){def.mode==="loose"?payload.value[key2]=input[key2]:payload.issues.push({code:"invalid_key",origin:"record",issues:keyResult.issues.map(iss=>finalizeIssue(iss,ctx,config())),input:key2,path:[key2],inst});continue}const result=def.
valueType._zod.run({value:input[key2],issues:[]},ctx);result instanceof Promise?proms.push(result.then(result2=>{result2.issues.length&&payload.issues.push(...prefixIssues(key2,result2.issues)),payload.value[keyResult.value]=result2.value})):(result.issues.length&&payload.issues.push(...prefixIssues(key2,result.issues)),payload.value[keyResult.value]=result.value)}}return proms.length?Promise.all(proms).then(()=>payload):payload}}),$ZodEnum=$constructor("$ZodEnum",(inst,def)=>{$ZodType.init(inst,
def);const values=getEnumValues(def.entries),valuesSet=new Set(values);inst._zod.values=valuesSet,inst._zod.pattern=new RegExp(`^(${values.filter(k=>propertyKeyTypes.has(typeof k)).map(o=>typeof o=="string"?escapeRegex(o):o.toString()).join("|")})$`),inst._zod.parse=(payload,_ctx)=>{const input=payload.value;return valuesSet.has(input)||payload.issues.push({code:"invalid_value",values,input,inst}),payload}}),$ZodLiteral=$constructor("$ZodLiteral",(inst,def)=>{if($ZodType.init(inst,def),def.values.
length===0)throw new Error("Cannot create literal schema with no valid values");const values=new Set(def.values);inst._zod.values=values,inst._zod.pattern=new RegExp(`^(${def.values.map(o=>typeof o=="string"?escapeRegex(o):o?escapeRegex(o.toString()):String(o)).join("|")})$`),inst._zod.parse=(payload,_ctx)=>{const input=payload.value;return values.has(input)||payload.issues.push({code:"invalid_value",values:def.values,input,inst}),payload}}),$ZodTransform=$constructor("$ZodTransform",(inst,def)=>{
$ZodType.init(inst,def),inst._zod.parse=(payload,ctx)=>{if(ctx.direction==="backward")throw new $ZodEncodeError(inst.constructor.name);const _out=def.transform(payload.value,payload);if(ctx.async)return(_out instanceof Promise?_out:Promise.resolve(_out)).then(output2=>(payload.value=output2,payload));if(_out instanceof Promise)throw new $ZodAsyncError;return payload.value=_out,payload}});function handleOptionalResult(result,input){return result.issues.length&&input===void 0?{issues:[],value:void 0}:
result}const $ZodOptional=$constructor("$ZodOptional",(inst,def)=>{$ZodType.init(inst,def),inst._zod.optin="optional",inst._zod.optout="optional",defineLazy(inst._zod,"values",()=>def.innerType._zod.values?new Set([...def.innerType._zod.values,void 0]):void 0),defineLazy(inst._zod,"pattern",()=>{const pattern2=def.innerType._zod.pattern;return pattern2?new RegExp(`^(${cleanRegex(pattern2.source)})?$`):void 0}),inst._zod.parse=(payload,ctx)=>{if(def.innerType._zod.optin==="optional"){const result=def.
innerType._zod.run(payload,ctx);return result instanceof Promise?result.then(r2=>handleOptionalResult(r2,payload.value)):handleOptionalResult(result,payload.value)}return payload.value===void 0?payload:def.innerType._zod.run(payload,ctx)}}),$ZodNullable=$constructor("$ZodNullable",(inst,def)=>{$ZodType.init(inst,def),defineLazy(inst._zod,"optin",()=>def.innerType._zod.optin),defineLazy(inst._zod,"optout",()=>def.innerType._zod.optout),defineLazy(inst._zod,"pattern",()=>{const pattern2=def.innerType.
_zod.pattern;return pattern2?new RegExp(`^(${cleanRegex(pattern2.source)}|null)$`):void 0}),defineLazy(inst._zod,"values",()=>def.innerType._zod.values?new Set([...def.innerType._zod.values,null]):void 0),inst._zod.parse=(payload,ctx)=>payload.value===null?payload:def.innerType._zod.run(payload,ctx)}),$ZodDefault=$constructor("$ZodDefault",(inst,def)=>{$ZodType.init(inst,def),inst._zod.optin="optional",defineLazy(inst._zod,"values",()=>def.innerType._zod.values),inst._zod.parse=(payload,ctx)=>{if(ctx.
direction==="backward")return def.innerType._zod.run(payload,ctx);if(payload.value===void 0)return payload.value=def.defaultValue,payload;const result=def.innerType._zod.run(payload,ctx);return result instanceof Promise?result.then(result2=>handleDefaultResult(result2,def)):handleDefaultResult(result,def)}});function handleDefaultResult(payload,def){return payload.value===void 0&&(payload.value=def.defaultValue),payload}const $ZodPrefault=$constructor("$ZodPrefault",(inst,def)=>{$ZodType.init(inst,
def),inst._zod.optin="optional",defineLazy(inst._zod,"values",()=>def.innerType._zod.values),inst._zod.parse=(payload,ctx)=>(ctx.direction==="backward"||payload.value===void 0&&(payload.value=def.defaultValue),def.innerType._zod.run(payload,ctx))}),$ZodNonOptional=$constructor("$ZodNonOptional",(inst,def)=>{$ZodType.init(inst,def),defineLazy(inst._zod,"values",()=>{const v=def.innerType._zod.values;return v?new Set([...v].filter(x=>x!==void 0)):void 0}),inst._zod.parse=(payload,ctx)=>{const result=def.
innerType._zod.run(payload,ctx);return result instanceof Promise?result.then(result2=>handleNonOptionalResult(result2,inst)):handleNonOptionalResult(result,inst)}});function handleNonOptionalResult(payload,inst){return!payload.issues.length&&payload.value===void 0&&payload.issues.push({code:"invalid_type",expected:"nonoptional",input:payload.value,inst}),payload}const $ZodCatch=$constructor("$ZodCatch",(inst,def)=>{$ZodType.init(inst,def),defineLazy(inst._zod,"optin",()=>def.innerType._zod.optin),
defineLazy(inst._zod,"optout",()=>def.innerType._zod.optout),defineLazy(inst._zod,"values",()=>def.innerType._zod.values),inst._zod.parse=(payload,ctx)=>{if(ctx.direction==="backward")return def.innerType._zod.run(payload,ctx);const result=def.innerType._zod.run(payload,ctx);return result instanceof Promise?result.then(result2=>(payload.value=result2.value,result2.issues.length&&(payload.value=def.catchValue({...payload,error:{issues:result2.issues.map(iss=>finalizeIssue(iss,ctx,config()))},input:payload.
value}),payload.issues=[]),payload)):(payload.value=result.value,result.issues.length&&(payload.value=def.catchValue({...payload,error:{issues:result.issues.map(iss=>finalizeIssue(iss,ctx,config()))},input:payload.value}),payload.issues=[]),payload)}}),$ZodPipe=$constructor("$ZodPipe",(inst,def)=>{$ZodType.init(inst,def),defineLazy(inst._zod,"values",()=>def.in._zod.values),defineLazy(inst._zod,"optin",()=>def.in._zod.optin),defineLazy(inst._zod,"optout",()=>def.out._zod.optout),defineLazy(inst.
_zod,"propValues",()=>def.in._zod.propValues),inst._zod.parse=(payload,ctx)=>{if(ctx.direction==="backward"){const right=def.out._zod.run(payload,ctx);return right instanceof Promise?right.then(right2=>handlePipeResult(right2,def.in,ctx)):handlePipeResult(right,def.in,ctx)}const left=def.in._zod.run(payload,ctx);return left instanceof Promise?left.then(left2=>handlePipeResult(left2,def.out,ctx)):handlePipeResult(left,def.out,ctx)}});function handlePipeResult(left,next2,ctx){return left.issues.length?
(left.aborted=!0,left):next2._zod.run({value:left.value,issues:left.issues},ctx)}const $ZodReadonly=$constructor("$ZodReadonly",(inst,def)=>{$ZodType.init(inst,def),defineLazy(inst._zod,"propValues",()=>def.innerType._zod.propValues),defineLazy(inst._zod,"values",()=>def.innerType._zod.values),defineLazy(inst._zod,"optin",()=>def.innerType?._zod?.optin),defineLazy(inst._zod,"optout",()=>def.innerType?._zod?.optout),inst._zod.parse=(payload,ctx)=>{if(ctx.direction==="backward")return def.innerType.
_zod.run(payload,ctx);const result=def.innerType._zod.run(payload,ctx);return result instanceof Promise?result.then(handleReadonlyResult):handleReadonlyResult(result)}});function handleReadonlyResult(payload){return payload.value=Object.freeze(payload.value),payload}const $ZodCustom=$constructor("$ZodCustom",(inst,def)=>{$ZodCheck.init(inst,def),$ZodType.init(inst,def),inst._zod.parse=(payload,_)=>payload,inst._zod.check=payload=>{const input=payload.value,r2=def.fn(input);if(r2 instanceof Promise)
return r2.then(r3=>handleRefineResult(r3,payload,input,inst));handleRefineResult(r2,payload,input,inst)}});function handleRefineResult(result,payload,input,inst){if(!result){const _iss={code:"custom",input,inst,path:[...inst._zod.def.path??[]],continue:!inst._zod.def.abort};inst._zod.def.params&&(_iss.params=inst._zod.def.params),payload.issues.push(issue(_iss))}}var _a;class $ZodRegistry{constructor(){this._map=new WeakMap,this._idmap=new Map}add(schema,..._meta){const meta=_meta[0];if(this._map.
set(schema,meta),meta&&typeof meta=="object"&&"id"in meta){if(this._idmap.has(meta.id))throw new Error(`ID ${meta.id} already exists in the registry`);this._idmap.set(meta.id,schema)}return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(schema){const meta=this._map.get(schema);return meta&&typeof meta=="object"&&"id"in meta&&this._idmap.delete(meta.id),this._map.delete(schema),this}get(schema){const p2=schema._zod.parent;if(p2){const pm={...this.get(p2)??{}};delete pm.
id;const f={...pm,...this._map.get(schema)};return Object.keys(f).length?f:void 0}return this._map.get(schema)}has(schema){return this._map.has(schema)}}function registry(){return new $ZodRegistry}(_a=globalThis).__zod_globalRegistry??(_a.__zod_globalRegistry=registry());const globalRegistry=globalThis.__zod_globalRegistry;function _string(Class,params){return new Class({type:"string",...normalizeParams(params)})}function _email(Class,params){return new Class({type:"string",format:"email",check:"\
string_format",abort:!1,...normalizeParams(params)})}function _guid(Class,params){return new Class({type:"string",format:"guid",check:"string_format",abort:!1,...normalizeParams(params)})}function _uuid(Class,params){return new Class({type:"string",format:"uuid",check:"string_format",abort:!1,...normalizeParams(params)})}function _uuidv4(Class,params){return new Class({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...normalizeParams(params)})}function _uuidv6(Class,params){
return new Class({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...normalizeParams(params)})}function _uuidv7(Class,params){return new Class({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...normalizeParams(params)})}function _url$2(Class,params){return new Class({type:"string",format:"url",check:"string_format",abort:!1,...normalizeParams(params)})}function _emoji(Class,params){return new Class({type:"string",format:"emoji",check:"string_forma\
t",abort:!1,...normalizeParams(params)})}function _nanoid(Class,params){return new Class({type:"string",format:"nanoid",check:"string_format",abort:!1,...normalizeParams(params)})}function _cuid(Class,params){return new Class({type:"string",format:"cuid",check:"string_format",abort:!1,...normalizeParams(params)})}function _cuid2(Class,params){return new Class({type:"string",format:"cuid2",check:"string_format",abort:!1,...normalizeParams(params)})}function _ulid(Class,params){return new Class({type:"\
string",format:"ulid",check:"string_format",abort:!1,...normalizeParams(params)})}function _xid(Class,params){return new Class({type:"string",format:"xid",check:"string_format",abort:!1,...normalizeParams(params)})}function _ksuid(Class,params){return new Class({type:"string",format:"ksuid",check:"string_format",abort:!1,...normalizeParams(params)})}function _ipv4(Class,params){return new Class({type:"string",format:"ipv4",check:"string_format",abort:!1,...normalizeParams(params)})}function _ipv6(Class,params){
return new Class({type:"string",format:"ipv6",check:"string_format",abort:!1,...normalizeParams(params)})}function _cidrv4(Class,params){return new Class({type:"string",format:"cidrv4",check:"string_format",abort:!1,...normalizeParams(params)})}function _cidrv6(Class,params){return new Class({type:"string",format:"cidrv6",check:"string_format",abort:!1,...normalizeParams(params)})}function _base64(Class,params){return new Class({type:"string",format:"base64",check:"string_format",abort:!1,...normalizeParams(
params)})}function _base64url(Class,params){return new Class({type:"string",format:"base64url",check:"string_format",abort:!1,...normalizeParams(params)})}function _e164(Class,params){return new Class({type:"string",format:"e164",check:"string_format",abort:!1,...normalizeParams(params)})}function _jwt(Class,params){return new Class({type:"string",format:"jwt",check:"string_format",abort:!1,...normalizeParams(params)})}function _isoDateTime(Class,params){return new Class({type:"string",format:"d\
atetime",check:"string_format",offset:!1,local:!1,precision:null,...normalizeParams(params)})}function _isoDate(Class,params){return new Class({type:"string",format:"date",check:"string_format",...normalizeParams(params)})}function _isoTime(Class,params){return new Class({type:"string",format:"time",check:"string_format",precision:null,...normalizeParams(params)})}function _isoDuration(Class,params){return new Class({type:"string",format:"duration",check:"string_format",...normalizeParams(params)})}
function _number(Class,params){return new Class({type:"number",checks:[],...normalizeParams(params)})}function _coercedNumber(Class,params){return new Class({type:"number",coerce:!0,checks:[],...normalizeParams(params)})}function _int(Class,params){return new Class({type:"number",check:"number_format",abort:!1,format:"safeint",...normalizeParams(params)})}function _boolean(Class,params){return new Class({type:"boolean",...normalizeParams(params)})}function _null$1(Class,params){return new Class(
{type:"null",...normalizeParams(params)})}function _any(Class){return new Class({type:"any"})}function _unknown(Class){return new Class({type:"unknown"})}function _never(Class,params){return new Class({type:"never",...normalizeParams(params)})}function _lt(value,params){return new $ZodCheckLessThan({check:"less_than",...normalizeParams(params),value,inclusive:!1})}function _lte(value,params){return new $ZodCheckLessThan({check:"less_than",...normalizeParams(params),value,inclusive:!0})}function _gt(value,params){
return new $ZodCheckGreaterThan({check:"greater_than",...normalizeParams(params),value,inclusive:!1})}function _gte(value,params){return new $ZodCheckGreaterThan({check:"greater_than",...normalizeParams(params),value,inclusive:!0})}function _multipleOf(value,params){return new $ZodCheckMultipleOf({check:"multiple_of",...normalizeParams(params),value})}function _maxLength(maximum,params){return new $ZodCheckMaxLength({check:"max_length",...normalizeParams(params),maximum})}function _minLength(minimum,params){
return new $ZodCheckMinLength({check:"min_length",...normalizeParams(params),minimum})}function _length(length,params){return new $ZodCheckLengthEquals({check:"length_equals",...normalizeParams(params),length})}function _regex(pattern2,params){return new $ZodCheckRegex({check:"string_format",format:"regex",...normalizeParams(params),pattern:pattern2})}function _lowercase(params){return new $ZodCheckLowerCase({check:"string_format",format:"lowercase",...normalizeParams(params)})}function _uppercase(params){
return new $ZodCheckUpperCase({check:"string_format",format:"uppercase",...normalizeParams(params)})}function _includes(includes2,params){return new $ZodCheckIncludes({check:"string_format",format:"includes",...normalizeParams(params),includes:includes2})}function _startsWith(prefix,params){return new $ZodCheckStartsWith({check:"string_format",format:"starts_with",...normalizeParams(params),prefix})}function _endsWith(suffix,params){return new $ZodCheckEndsWith({check:"string_format",format:"end\
s_with",...normalizeParams(params),suffix})}function _overwrite(tx){return new $ZodCheckOverwrite({check:"overwrite",tx})}function _normalize(form){return _overwrite(input=>input.normalize(form))}function _trim(){return _overwrite(input=>input.trim())}function _toLowerCase(){return _overwrite(input=>input.toLowerCase())}function _toUpperCase(){return _overwrite(input=>input.toUpperCase())}function _slugify(){return _overwrite(input=>slugify(input))}function _array(Class,element2,params){return new Class(
{type:"array",element:element2,...normalizeParams(params)})}function _custom(Class,fn,_params){const norm=normalizeParams(_params);return norm.abort??(norm.abort=!0),new Class({type:"custom",check:"custom",fn,...norm})}function _refine(Class,fn,_params){return new Class({type:"custom",check:"custom",fn,...normalizeParams(_params)})}function _superRefine(fn){const ch=_check(payload=>(payload.addIssue=issue$1=>{if(typeof issue$1=="string")payload.issues.push(issue(issue$1,payload.value,ch._zod.def));else{
const _issue=issue$1;_issue.fatal&&(_issue.continue=!1),_issue.code??(_issue.code="custom"),_issue.input??(_issue.input=payload.value),_issue.inst??(_issue.inst=ch),_issue.continue??(_issue.continue=!ch._zod.def.abort),payload.issues.push(issue(_issue))}},fn(payload.value,payload)));return ch}function _check(fn,params){const ch=new $ZodCheck({check:"custom",...normalizeParams(params)});return ch._zod.check=fn,ch}function initializeContext(params){let target2=params?.target??"draft-2020-12";return target2===
"draft-4"&&(target2="draft-04"),target2==="draft-7"&&(target2="draft-07"),{processors:params.processors??{},metadataRegistry:params?.metadata??globalRegistry,target:target2,unrepresentable:params?.unrepresentable??"throw",override:params?.override??(()=>{}),io:params?.io??"output",counter:0,seen:new Map,cycles:params?.cycles??"ref",reused:params?.reused??"inline",external:params?.external??void 0}}function process$1(schema,ctx,_params={path:[],schemaPath:[]}){var _a2;const def=schema._zod.def,seen2=ctx.
seen.get(schema);if(seen2)return seen2.count++,_params.schemaPath.includes(schema)&&(seen2.cycle=_params.path),seen2.schema;const result={schema:{},count:1,cycle:void 0,path:_params.path};ctx.seen.set(schema,result);const overrideSchema=schema._zod.toJSONSchema?.();if(overrideSchema)result.schema=overrideSchema;else{const params={..._params,schemaPath:[..._params.schemaPath,schema],path:_params.path},parent=schema._zod.parent;if(parent)result.ref=parent,process$1(parent,ctx,params),ctx.seen.get(
parent).isParent=!0;else if(schema._zod.processJSONSchema)schema._zod.processJSONSchema(ctx,result.schema,params);else{const _json=result.schema,processor=ctx.processors[def.type];if(!processor)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${def.type}`);processor(schema,ctx,_json,params)}}const meta=ctx.metadataRegistry.get(schema);return meta&&Object.assign(result.schema,meta),ctx.io==="input"&&isTransforming(schema)&&(delete result.schema.examples,delete result.schema.default),
ctx.io==="input"&&result.schema._prefault&&((_a2=result.schema).default??(_a2.default=result.schema._prefault)),delete result.schema._prefault,ctx.seen.get(schema).schema}function extractDefs(ctx,schema){const root2=ctx.seen.get(schema);if(!root2)throw new Error("Unprocessed schema. This is a bug in Zod.");const makeURI=entry=>{const defsSegment=ctx.target==="draft-2020-12"?"$defs":"definitions";if(ctx.external){const externalId=ctx.external.registry.get(entry[0])?.id,uriGenerator=ctx.external.uri??
(id3=>id3);if(externalId)return{ref:uriGenerator(externalId)};const id2=entry[1].defId??entry[1].schema.id??`schema${ctx.counter++}`;return entry[1].defId=id2,{defId:id2,ref:`${uriGenerator("__shared")}#/${defsSegment}/${id2}`}}if(entry[1]===root2)return{ref:"#"};const defUriPrefix=`#/${defsSegment}/`,defId=entry[1].schema.id??`__schema${ctx.counter++}`;return{defId,ref:defUriPrefix+defId}},extractToDef=entry=>{if(entry[1].schema.$ref)return;const seen2=entry[1],{ref:ref2,defId}=makeURI(entry);seen2.
def={...seen2.schema},defId&&(seen2.defId=defId);const schema2=seen2.schema;for(const key2 in schema2)delete schema2[key2];schema2.$ref=ref2};if(ctx.cycles==="throw")for(const entry of ctx.seen.entries()){const seen2=entry[1];if(seen2.cycle)throw new Error(`Cycle detected: #/${seen2.cycle?.join("/")}/<root>

Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const entry of ctx.seen.entries()){const seen2=entry[1];if(schema===entry[0]){extractToDef(entry);continue}if(ctx.external){const ext=ctx.external.registry.get(entry[0])?.id;if(schema!==entry[0]&&ext){extractToDef(entry);continue}}if(ctx.metadataRegistry.get(entry[0])?.id){extractToDef(entry);continue}if(seen2.cycle){extractToDef(entry);continue}if(seen2.count>1&&ctx.reused==="ref"){extractToDef(entry);continue}}}
function finalize(ctx,schema){const root2=ctx.seen.get(schema);if(!root2)throw new Error("Unprocessed schema. This is a bug in Zod.");const flattenRef=zodSchema=>{const seen2=ctx.seen.get(zodSchema),schema2=seen2.def??seen2.schema,_cached={...schema2};if(seen2.ref===null)return;const ref2=seen2.ref;if(seen2.ref=null,ref2){flattenRef(ref2);const refSchema=ctx.seen.get(ref2).schema;refSchema.$ref&&(ctx.target==="draft-07"||ctx.target==="draft-04"||ctx.target==="openapi-3.0")?(schema2.allOf=schema2.
allOf??[],schema2.allOf.push(refSchema)):(Object.assign(schema2,refSchema),Object.assign(schema2,_cached))}seen2.isParent||ctx.override({zodSchema,jsonSchema:schema2,path:seen2.path??[]})};for(const entry of[...ctx.seen.entries()].reverse())flattenRef(entry[0]);const result={};if(ctx.target==="draft-2020-12"?result.$schema="https://json-schema.org/draft/2020-12/schema":ctx.target==="draft-07"?result.$schema="http://json-schema.org/draft-07/schema#":ctx.target==="draft-04"?result.$schema="http://\
json-schema.org/draft-04/schema#":ctx.target,ctx.external?.uri){const id2=ctx.external.registry.get(schema)?.id;if(!id2)throw new Error("Schema is missing an `id` property");result.$id=ctx.external.uri(id2)}Object.assign(result,root2.def??root2.schema);const defs=ctx.external?.defs??{};for(const entry of ctx.seen.entries()){const seen2=entry[1];seen2.def&&seen2.defId&&(defs[seen2.defId]=seen2.def)}ctx.external||Object.keys(defs).length>0&&(ctx.target==="draft-2020-12"?result.$defs=defs:result.definitions=
defs);try{const finalized=JSON.parse(JSON.stringify(result));return Object.defineProperty(finalized,"~standard",{value:{...schema["~standard"],jsonSchema:{input:createStandardJSONSchemaMethod(schema,"input"),output:createStandardJSONSchemaMethod(schema,"output")}},enumerable:!1,writable:!1}),finalized}catch{throw new Error("Error converting schema to JSON.")}}function isTransforming(_schema,_ctx){const ctx=_ctx??{seen:new Set};if(ctx.seen.has(_schema))return!1;ctx.seen.add(_schema);const def=_schema.
_zod.def;if(def.type==="transform")return!0;if(def.type==="array")return isTransforming(def.element,ctx);if(def.type==="set")return isTransforming(def.valueType,ctx);if(def.type==="lazy")return isTransforming(def.getter(),ctx);if(def.type==="promise"||def.type==="optional"||def.type==="nonoptional"||def.type==="nullable"||def.type==="readonly"||def.type==="default"||def.type==="prefault")return isTransforming(def.innerType,ctx);if(def.type==="intersection")return isTransforming(def.left,ctx)||isTransforming(
def.right,ctx);if(def.type==="record"||def.type==="map")return isTransforming(def.keyType,ctx)||isTransforming(def.valueType,ctx);if(def.type==="pipe")return isTransforming(def.in,ctx)||isTransforming(def.out,ctx);if(def.type==="object"){for(const key2 in def.shape)if(isTransforming(def.shape[key2],ctx))return!0;return!1}if(def.type==="union"){for(const option2 of def.options)if(isTransforming(option2,ctx))return!0;return!1}if(def.type==="tuple"){for(const item of def.items)if(isTransforming(item,
ctx))return!0;return!!(def.rest&&isTransforming(def.rest,ctx))}return!1}const createToJSONSchemaMethod=(schema,processors={})=>params=>{const ctx=initializeContext({...params,processors});return process$1(schema,ctx),extractDefs(ctx,schema),finalize(ctx,schema)},createStandardJSONSchemaMethod=(schema,io)=>params=>{const{libraryOptions,target:target2}=params??{},ctx=initializeContext({...libraryOptions??{},target:target2,io,processors:{}});return process$1(schema,ctx),extractDefs(ctx,schema),finalize(
ctx,schema)},formatMap={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},stringProcessor=(schema,ctx,_json,_params)=>{const json2=_json;json2.type="string";const{minimum,maximum,format:format2,patterns,contentEncoding}=schema._zod.bag;if(typeof minimum=="number"&&(json2.minLength=minimum),typeof maximum=="number"&&(json2.maxLength=maximum),format2&&(json2.format=formatMap[format2]??format2,json2.format===""&&delete json2.format),contentEncoding&&(json2.contentEncoding=
contentEncoding),patterns&&patterns.size>0){const regexes=[...patterns];regexes.length===1?json2.pattern=regexes[0].source:regexes.length>1&&(json2.allOf=[...regexes.map(regex=>({...ctx.target==="draft-07"||ctx.target==="draft-04"||ctx.target==="openapi-3.0"?{type:"string"}:{},pattern:regex.source}))])}},numberProcessor=(schema,ctx,_json,_params)=>{const json2=_json,{minimum,maximum,format:format2,multipleOf:multipleOf2,exclusiveMaximum,exclusiveMinimum}=schema._zod.bag;typeof format2=="string"&&
format2.includes("int")?json2.type="integer":json2.type="number",typeof exclusiveMinimum=="number"&&(ctx.target==="draft-04"||ctx.target==="openapi-3.0"?(json2.minimum=exclusiveMinimum,json2.exclusiveMinimum=!0):json2.exclusiveMinimum=exclusiveMinimum),typeof minimum=="number"&&(json2.minimum=minimum,typeof exclusiveMinimum=="number"&&ctx.target!=="draft-04"&&(exclusiveMinimum>=minimum?delete json2.minimum:delete json2.exclusiveMinimum)),typeof exclusiveMaximum=="number"&&(ctx.target==="draft-04"||
ctx.target==="openapi-3.0"?(json2.maximum=exclusiveMaximum,json2.exclusiveMaximum=!0):json2.exclusiveMaximum=exclusiveMaximum),typeof maximum=="number"&&(json2.maximum=maximum,typeof exclusiveMaximum=="number"&&ctx.target!=="draft-04"&&(exclusiveMaximum<=maximum?delete json2.maximum:delete json2.exclusiveMaximum)),typeof multipleOf2=="number"&&(json2.multipleOf=multipleOf2)},booleanProcessor=(_schema,_ctx,json2,_params)=>{json2.type="boolean"},nullProcessor=(_schema,ctx,json2,_params)=>{ctx.target===
"openapi-3.0"?(json2.type="string",json2.nullable=!0,json2.enum=[null]):json2.type="null"},neverProcessor=(_schema,_ctx,json2,_params)=>{json2.not={}},anyProcessor=(_schema,_ctx,_json,_params)=>{},unknownProcessor=(_schema,_ctx,_json,_params)=>{},enumProcessor=(schema,_ctx,json2,_params)=>{const def=schema._zod.def,values=getEnumValues(def.entries);values.every(v=>typeof v=="number")&&(json2.type="number"),values.every(v=>typeof v=="string")&&(json2.type="string"),json2.enum=values},literalProcessor=(schema,ctx,json2,_params)=>{
const def=schema._zod.def,vals=[];for(const val of def.values)if(val===void 0){if(ctx.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof val=="bigint"){if(ctx.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");vals.push(Number(val))}else vals.push(val);if(vals.length!==0)if(vals.length===1){const val=vals[0];json2.type=val===null?"null":typeof val,ctx.target==="draft-04"||ctx.target===
"openapi-3.0"?json2.enum=[val]:json2.const=val}else vals.every(v=>typeof v=="number")&&(json2.type="number"),vals.every(v=>typeof v=="string")&&(json2.type="string"),vals.every(v=>typeof v=="boolean")&&(json2.type="boolean"),vals.every(v=>v===null)&&(json2.type="null"),json2.enum=vals},customProcessor=(_schema,ctx,_json,_params)=>{if(ctx.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},transformProcessor=(_schema,ctx,_json,_params)=>{if(ctx.unrepresentable===
"throw")throw new Error("Transforms cannot be represented in JSON Schema")},arrayProcessor=(schema,ctx,_json,params)=>{const json2=_json,def=schema._zod.def,{minimum,maximum}=schema._zod.bag;typeof minimum=="number"&&(json2.minItems=minimum),typeof maximum=="number"&&(json2.maxItems=maximum),json2.type="array",json2.items=process$1(def.element,ctx,{...params,path:[...params.path,"items"]})},objectProcessor=(schema,ctx,_json,params)=>{const json2=_json,def=schema._zod.def;json2.type="object",json2.
properties={};const shape=def.shape;for(const key2 in shape)json2.properties[key2]=process$1(shape[key2],ctx,{...params,path:[...params.path,"properties",key2]});const allKeys=new Set(Object.keys(shape)),requiredKeys=new Set([...allKeys].filter(key2=>{const v=def.shape[key2]._zod;return ctx.io==="input"?v.optin===void 0:v.optout===void 0}));requiredKeys.size>0&&(json2.required=Array.from(requiredKeys)),def.catchall?._zod.def.type==="never"?json2.additionalProperties=!1:def.catchall?def.catchall&&
(json2.additionalProperties=process$1(def.catchall,ctx,{...params,path:[...params.path,"additionalProperties"]})):ctx.io==="output"&&(json2.additionalProperties=!1)},unionProcessor=(schema,ctx,json2,params)=>{const def=schema._zod.def,isExclusive=def.inclusive===!1,options=def.options.map((x,i)=>process$1(x,ctx,{...params,path:[...params.path,isExclusive?"oneOf":"anyOf",i]}));isExclusive?json2.oneOf=options:json2.anyOf=options},intersectionProcessor=(schema,ctx,json2,params)=>{const def=schema._zod.
def,a=process$1(def.left,ctx,{...params,path:[...params.path,"allOf",0]}),b=process$1(def.right,ctx,{...params,path:[...params.path,"allOf",1]}),isSimpleIntersection=val=>"allOf"in val&&Object.keys(val).length===1,allOf2=[...isSimpleIntersection(a)?a.allOf:[a],...isSimpleIntersection(b)?b.allOf:[b]];json2.allOf=allOf2},recordProcessor=(schema,ctx,_json,params)=>{const json2=_json,def=schema._zod.def;json2.type="object",(ctx.target==="draft-07"||ctx.target==="draft-2020-12")&&(json2.propertyNames=
process$1(def.keyType,ctx,{...params,path:[...params.path,"propertyNames"]})),json2.additionalProperties=process$1(def.valueType,ctx,{...params,path:[...params.path,"additionalProperties"]})},nullableProcessor=(schema,ctx,json2,params)=>{const def=schema._zod.def,inner2=process$1(def.innerType,ctx,params),seen2=ctx.seen.get(schema);ctx.target==="openapi-3.0"?(seen2.ref=def.innerType,json2.nullable=!0):json2.anyOf=[inner2,{type:"null"}]},nonoptionalProcessor=(schema,ctx,_json,params)=>{const def=schema.
_zod.def;process$1(def.innerType,ctx,params);const seen2=ctx.seen.get(schema);seen2.ref=def.innerType},defaultProcessor=(schema,ctx,json2,params)=>{const def=schema._zod.def;process$1(def.innerType,ctx,params);const seen2=ctx.seen.get(schema);seen2.ref=def.innerType,json2.default=JSON.parse(JSON.stringify(def.defaultValue))},prefaultProcessor=(schema,ctx,json2,params)=>{const def=schema._zod.def;process$1(def.innerType,ctx,params);const seen2=ctx.seen.get(schema);seen2.ref=def.innerType,ctx.io===
"input"&&(json2._prefault=JSON.parse(JSON.stringify(def.defaultValue)))},catchProcessor=(schema,ctx,json2,params)=>{const def=schema._zod.def;process$1(def.innerType,ctx,params);const seen2=ctx.seen.get(schema);seen2.ref=def.innerType;let catchValue;try{catchValue=def.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}json2.default=catchValue},pipeProcessor=(schema,ctx,_json,params)=>{const def=schema._zod.def,innerType=ctx.io==="input"?def.in._zod.
def.type==="transform"?def.out:def.in:def.out;process$1(innerType,ctx,params);const seen2=ctx.seen.get(schema);seen2.ref=innerType},readonlyProcessor=(schema,ctx,json2,params)=>{const def=schema._zod.def;process$1(def.innerType,ctx,params);const seen2=ctx.seen.get(schema);seen2.ref=def.innerType,json2.readOnly=!0},optionalProcessor=(schema,ctx,_json,params)=>{const def=schema._zod.def;process$1(def.innerType,ctx,params);const seen2=ctx.seen.get(schema);seen2.ref=def.innerType};function isZ4Schema(s2){
return!!s2._zod}function safeParse$1(schema,data){return isZ4Schema(schema)?safeParse$2(schema,data):schema.safeParse(data)}function getObjectShape(schema){if(!schema)return;let rawShape;if(isZ4Schema(schema)?rawShape=schema._zod?.def?.shape:rawShape=schema.shape,!!rawShape){if(typeof rawShape=="function")try{return rawShape()}catch{return}return rawShape}}function getLiteralValue(schema){if(isZ4Schema(schema)){const def2=schema._zod?.def;if(def2){if(def2.value!==void 0)return def2.value;if(Array.
isArray(def2.values)&&def2.values.length>0)return def2.values[0]}}const def=schema._def;if(def){if(def.value!==void 0)return def.value;if(Array.isArray(def.values)&&def.values.length>0)return def.values[0]}const directValue=schema.value;if(directValue!==void 0)return directValue}const ZodISODateTime=$constructor("ZodISODateTime",(inst,def)=>{$ZodISODateTime.init(inst,def),ZodStringFormat.init(inst,def)});function datetime(params){return _isoDateTime(ZodISODateTime,params)}const ZodISODate=$constructor(
"ZodISODate",(inst,def)=>{$ZodISODate.init(inst,def),ZodStringFormat.init(inst,def)});function date(params){return _isoDate(ZodISODate,params)}const ZodISOTime=$constructor("ZodISOTime",(inst,def)=>{$ZodISOTime.init(inst,def),ZodStringFormat.init(inst,def)});function time(params){return _isoTime(ZodISOTime,params)}const ZodISODuration=$constructor("ZodISODuration",(inst,def)=>{$ZodISODuration.init(inst,def),ZodStringFormat.init(inst,def)});function duration(params){return _isoDuration(ZodISODuration,
params)}const initializer=(inst,issues)=>{$ZodError.init(inst,issues),inst.name="ZodError",Object.defineProperties(inst,{format:{value:mapper=>formatError(inst,mapper)},flatten:{value:mapper=>flattenError$1(inst,mapper)},addIssue:{value:issue2=>{inst.issues.push(issue2),inst.message=JSON.stringify(inst.issues,jsonStringifyReplacer,2)}},addIssues:{value:issues2=>{inst.issues.push(...issues2),inst.message=JSON.stringify(inst.issues,jsonStringifyReplacer,2)}},isEmpty:{get(){return inst.issues.length===
0}}})},ZodRealError=$constructor("ZodError",initializer,{Parent:Error}),parse$3=_parse(ZodRealError),parseAsync=_parseAsync(ZodRealError),safeParse=_safeParse(ZodRealError),safeParseAsync=_safeParseAsync(ZodRealError),encode=_encode(ZodRealError),decode$1=_decode(ZodRealError),encodeAsync=_encodeAsync(ZodRealError),decodeAsync=_decodeAsync(ZodRealError),safeEncode=_safeEncode(ZodRealError),safeDecode=_safeDecode(ZodRealError),safeEncodeAsync=_safeEncodeAsync(ZodRealError),safeDecodeAsync=_safeDecodeAsync(
ZodRealError),ZodType=$constructor("ZodType",(inst,def)=>($ZodType.init(inst,def),Object.assign(inst["~standard"],{jsonSchema:{input:createStandardJSONSchemaMethod(inst,"input"),output:createStandardJSONSchemaMethod(inst,"output")}}),inst.toJSONSchema=createToJSONSchemaMethod(inst,{}),inst.def=def,inst.type=def.type,Object.defineProperty(inst,"_def",{value:def}),inst.check=(...checks2)=>inst.clone(mergeDefs(def,{checks:[...def.checks??[],...checks2.map(ch=>typeof ch=="function"?{_zod:{check:ch,def:{
check:"custom"},onattach:[]}}:ch)]})),inst.clone=(def2,params)=>clone(inst,def2,params),inst.brand=()=>inst,inst.register=((reg,meta)=>(reg.add(inst,meta),inst)),inst.parse=(data,params)=>parse$3(inst,data,params,{callee:inst.parse}),inst.safeParse=(data,params)=>safeParse(inst,data,params),inst.parseAsync=async(data,params)=>parseAsync(inst,data,params,{callee:inst.parseAsync}),inst.safeParseAsync=async(data,params)=>safeParseAsync(inst,data,params),inst.spa=inst.safeParseAsync,inst.encode=(data,params)=>encode(
inst,data,params),inst.decode=(data,params)=>decode$1(inst,data,params),inst.encodeAsync=async(data,params)=>encodeAsync(inst,data,params),inst.decodeAsync=async(data,params)=>decodeAsync(inst,data,params),inst.safeEncode=(data,params)=>safeEncode(inst,data,params),inst.safeDecode=(data,params)=>safeDecode(inst,data,params),inst.safeEncodeAsync=async(data,params)=>safeEncodeAsync(inst,data,params),inst.safeDecodeAsync=async(data,params)=>safeDecodeAsync(inst,data,params),inst.refine=(check,params)=>inst.
check(refine(check,params)),inst.superRefine=refinement=>inst.check(superRefine(refinement)),inst.overwrite=fn=>inst.check(_overwrite(fn)),inst.optional=()=>optional(inst),inst.nullable=()=>nullable(inst),inst.nullish=()=>optional(nullable(inst)),inst.nonoptional=params=>nonoptional(inst,params),inst.array=()=>array(inst),inst.or=arg=>union([inst,arg]),inst.and=arg=>intersection(inst,arg),inst.transform=tx=>pipe(inst,transform$1(tx)),inst.default=def2=>_default(inst,def2),inst.prefault=def2=>prefault(
inst,def2),inst.catch=params=>_catch(inst,params),inst.pipe=target2=>pipe(inst,target2),inst.readonly=()=>readonly(inst),inst.describe=description2=>{const cl=inst.clone();return globalRegistry.add(cl,{description:description2}),cl},Object.defineProperty(inst,"description",{get(){return globalRegistry.get(inst)?.description},configurable:!0}),inst.meta=(...args)=>{if(args.length===0)return globalRegistry.get(inst);const cl=inst.clone();return globalRegistry.add(cl,args[0]),cl},inst.isOptional=()=>inst.
safeParse(void 0).success,inst.isNullable=()=>inst.safeParse(null).success,inst)),_ZodString=$constructor("_ZodString",(inst,def)=>{$ZodString.init(inst,def),ZodType.init(inst,def),inst._zod.processJSONSchema=(ctx,json2,params)=>stringProcessor(inst,ctx,json2);const bag=inst._zod.bag;inst.format=bag.format??null,inst.minLength=bag.minimum??null,inst.maxLength=bag.maximum??null,inst.regex=(...args)=>inst.check(_regex(...args)),inst.includes=(...args)=>inst.check(_includes(...args)),inst.startsWith=
(...args)=>inst.check(_startsWith(...args)),inst.endsWith=(...args)=>inst.check(_endsWith(...args)),inst.min=(...args)=>inst.check(_minLength(...args)),inst.max=(...args)=>inst.check(_maxLength(...args)),inst.length=(...args)=>inst.check(_length(...args)),inst.nonempty=(...args)=>inst.check(_minLength(1,...args)),inst.lowercase=params=>inst.check(_lowercase(params)),inst.uppercase=params=>inst.check(_uppercase(params)),inst.trim=()=>inst.check(_trim()),inst.normalize=(...args)=>inst.check(_normalize(
...args)),inst.toLowerCase=()=>inst.check(_toLowerCase()),inst.toUpperCase=()=>inst.check(_toUpperCase()),inst.slugify=()=>inst.check(_slugify())}),ZodString=$constructor("ZodString",(inst,def)=>{$ZodString.init(inst,def),_ZodString.init(inst,def),inst.email=params=>inst.check(_email(ZodEmail,params)),inst.url=params=>inst.check(_url$2(ZodURL,params)),inst.jwt=params=>inst.check(_jwt(ZodJWT,params)),inst.emoji=params=>inst.check(_emoji(ZodEmoji,params)),inst.guid=params=>inst.check(_guid(ZodGUID,
params)),inst.uuid=params=>inst.check(_uuid(ZodUUID,params)),inst.uuidv4=params=>inst.check(_uuidv4(ZodUUID,params)),inst.uuidv6=params=>inst.check(_uuidv6(ZodUUID,params)),inst.uuidv7=params=>inst.check(_uuidv7(ZodUUID,params)),inst.nanoid=params=>inst.check(_nanoid(ZodNanoID,params)),inst.guid=params=>inst.check(_guid(ZodGUID,params)),inst.cuid=params=>inst.check(_cuid(ZodCUID,params)),inst.cuid2=params=>inst.check(_cuid2(ZodCUID2,params)),inst.ulid=params=>inst.check(_ulid(ZodULID,params)),inst.
base64=params=>inst.check(_base64(ZodBase64,params)),inst.base64url=params=>inst.check(_base64url(ZodBase64URL,params)),inst.xid=params=>inst.check(_xid(ZodXID,params)),inst.ksuid=params=>inst.check(_ksuid(ZodKSUID,params)),inst.ipv4=params=>inst.check(_ipv4(ZodIPv4,params)),inst.ipv6=params=>inst.check(_ipv6(ZodIPv6,params)),inst.cidrv4=params=>inst.check(_cidrv4(ZodCIDRv4,params)),inst.cidrv6=params=>inst.check(_cidrv6(ZodCIDRv6,params)),inst.e164=params=>inst.check(_e164(ZodE164,params)),inst.
datetime=params=>inst.check(datetime(params)),inst.date=params=>inst.check(date(params)),inst.time=params=>inst.check(time(params)),inst.duration=params=>inst.check(duration(params))});function string$2(params){return _string(ZodString,params)}const ZodStringFormat=$constructor("ZodStringFormat",(inst,def)=>{$ZodStringFormat.init(inst,def),_ZodString.init(inst,def)}),ZodEmail=$constructor("ZodEmail",(inst,def)=>{$ZodEmail.init(inst,def),ZodStringFormat.init(inst,def)}),ZodGUID=$constructor("ZodG\
UID",(inst,def)=>{$ZodGUID.init(inst,def),ZodStringFormat.init(inst,def)}),ZodUUID=$constructor("ZodUUID",(inst,def)=>{$ZodUUID.init(inst,def),ZodStringFormat.init(inst,def)}),ZodURL=$constructor("ZodURL",(inst,def)=>{$ZodURL.init(inst,def),ZodStringFormat.init(inst,def)});function url(params){return _url$2(ZodURL,params)}const ZodEmoji=$constructor("ZodEmoji",(inst,def)=>{$ZodEmoji.init(inst,def),ZodStringFormat.init(inst,def)}),ZodNanoID=$constructor("ZodNanoID",(inst,def)=>{$ZodNanoID.init(inst,
def),ZodStringFormat.init(inst,def)}),ZodCUID=$constructor("ZodCUID",(inst,def)=>{$ZodCUID.init(inst,def),ZodStringFormat.init(inst,def)}),ZodCUID2=$constructor("ZodCUID2",(inst,def)=>{$ZodCUID2.init(inst,def),ZodStringFormat.init(inst,def)}),ZodULID=$constructor("ZodULID",(inst,def)=>{$ZodULID.init(inst,def),ZodStringFormat.init(inst,def)}),ZodXID=$constructor("ZodXID",(inst,def)=>{$ZodXID.init(inst,def),ZodStringFormat.init(inst,def)}),ZodKSUID=$constructor("ZodKSUID",(inst,def)=>{$ZodKSUID.init(
inst,def),ZodStringFormat.init(inst,def)}),ZodIPv4=$constructor("ZodIPv4",(inst,def)=>{$ZodIPv4.init(inst,def),ZodStringFormat.init(inst,def)}),ZodIPv6=$constructor("ZodIPv6",(inst,def)=>{$ZodIPv6.init(inst,def),ZodStringFormat.init(inst,def)}),ZodCIDRv4=$constructor("ZodCIDRv4",(inst,def)=>{$ZodCIDRv4.init(inst,def),ZodStringFormat.init(inst,def)}),ZodCIDRv6=$constructor("ZodCIDRv6",(inst,def)=>{$ZodCIDRv6.init(inst,def),ZodStringFormat.init(inst,def)}),ZodBase64=$constructor("ZodBase64",(inst,def)=>{
$ZodBase64.init(inst,def),ZodStringFormat.init(inst,def)}),ZodBase64URL=$constructor("ZodBase64URL",(inst,def)=>{$ZodBase64URL.init(inst,def),ZodStringFormat.init(inst,def)}),ZodE164=$constructor("ZodE164",(inst,def)=>{$ZodE164.init(inst,def),ZodStringFormat.init(inst,def)}),ZodJWT=$constructor("ZodJWT",(inst,def)=>{$ZodJWT.init(inst,def),ZodStringFormat.init(inst,def)}),ZodNumber=$constructor("ZodNumber",(inst,def)=>{$ZodNumber.init(inst,def),ZodType.init(inst,def),inst._zod.processJSONSchema=(ctx,json2,params)=>numberProcessor(
inst,ctx,json2),inst.gt=(value,params)=>inst.check(_gt(value,params)),inst.gte=(value,params)=>inst.check(_gte(value,params)),inst.min=(value,params)=>inst.check(_gte(value,params)),inst.lt=(value,params)=>inst.check(_lt(value,params)),inst.lte=(value,params)=>inst.check(_lte(value,params)),inst.max=(value,params)=>inst.check(_lte(value,params)),inst.int=params=>inst.check(int(params)),inst.safe=params=>inst.check(int(params)),inst.positive=params=>inst.check(_gt(0,params)),inst.nonnegative=params=>inst.
check(_gte(0,params)),inst.negative=params=>inst.check(_lt(0,params)),inst.nonpositive=params=>inst.check(_lte(0,params)),inst.multipleOf=(value,params)=>inst.check(_multipleOf(value,params)),inst.step=(value,params)=>inst.check(_multipleOf(value,params)),inst.finite=()=>inst;const bag=inst._zod.bag;inst.minValue=Math.max(bag.minimum??Number.NEGATIVE_INFINITY,bag.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,inst.maxValue=Math.min(bag.maximum??Number.POSITIVE_INFINITY,bag.exclusiveMaximum??Number.
POSITIVE_INFINITY)??null,inst.isInt=(bag.format??"").includes("int")||Number.isSafeInteger(bag.multipleOf??.5),inst.isFinite=!0,inst.format=bag.format??null});function number$2(params){return _number(ZodNumber,params)}const ZodNumberFormat=$constructor("ZodNumberFormat",(inst,def)=>{$ZodNumberFormat.init(inst,def),ZodNumber.init(inst,def)});function int(params){return _int(ZodNumberFormat,params)}const ZodBoolean=$constructor("ZodBoolean",(inst,def)=>{$ZodBoolean.init(inst,def),ZodType.init(inst,
def),inst._zod.processJSONSchema=(ctx,json2,params)=>booleanProcessor(inst,ctx,json2)});function boolean$1(params){return _boolean(ZodBoolean,params)}const ZodNull=$constructor("ZodNull",(inst,def)=>{$ZodNull.init(inst,def),ZodType.init(inst,def),inst._zod.processJSONSchema=(ctx,json2,params)=>nullProcessor(inst,ctx,json2)});function _null(params){return _null$1(ZodNull,params)}const ZodAny=$constructor("ZodAny",(inst,def)=>{$ZodAny.init(inst,def),ZodType.init(inst,def),inst._zod.processJSONSchema=
(ctx,json2,params)=>anyProcessor()});function any(){return _any(ZodAny)}const ZodUnknown=$constructor("ZodUnknown",(inst,def)=>{$ZodUnknown.init(inst,def),ZodType.init(inst,def),inst._zod.processJSONSchema=(ctx,json2,params)=>unknownProcessor()});function unknown$2(){return _unknown(ZodUnknown)}const ZodNever=$constructor("ZodNever",(inst,def)=>{$ZodNever.init(inst,def),ZodType.init(inst,def),inst._zod.processJSONSchema=(ctx,json2,params)=>neverProcessor(inst,ctx,json2)});function never(params){
return _never(ZodNever,params)}const ZodArray=$constructor("ZodArray",(inst,def)=>{$ZodArray.init(inst,def),ZodType.init(inst,def),inst._zod.processJSONSchema=(ctx,json2,params)=>arrayProcessor(inst,ctx,json2,params),inst.element=def.element,inst.min=(minLength,params)=>inst.check(_minLength(minLength,params)),inst.nonempty=params=>inst.check(_minLength(1,params)),inst.max=(maxLength,params)=>inst.check(_maxLength(maxLength,params)),inst.length=(len,params)=>inst.check(_length(len,params)),inst.
unwrap=()=>inst.element});function array(element2,params){return _array(ZodArray,element2,params)}const ZodObject=$constructor("ZodObject",(inst,def)=>{$ZodObjectJIT.init(inst,def),ZodType.init(inst,def),inst._zod.processJSONSchema=(ctx,json2,params)=>objectProcessor(inst,ctx,json2,params),defineLazy(inst,"shape",()=>def.shape),inst.keyof=()=>_enum$2(Object.keys(inst._zod.def.shape)),inst.catchall=catchall=>inst.clone({...inst._zod.def,catchall}),inst.passthrough=()=>inst.clone({...inst._zod.def,
catchall:unknown$2()}),inst.loose=()=>inst.clone({...inst._zod.def,catchall:unknown$2()}),inst.strict=()=>inst.clone({...inst._zod.def,catchall:never()}),inst.strip=()=>inst.clone({...inst._zod.def,catchall:void 0}),inst.extend=incoming=>extend$2(inst,incoming),inst.safeExtend=incoming=>safeExtend(inst,incoming),inst.merge=other=>merge$1(inst,other),inst.pick=mask=>pick(inst,mask),inst.omit=mask=>omit(inst,mask),inst.partial=(...args)=>partial(ZodOptional,inst,args[0]),inst.required=(...args)=>required$4(
ZodNonOptional,inst,args[0])});function object(shape,params){const def={type:"object",shape:shape??{},...normalizeParams(params)};return new ZodObject(def)}function looseObject(shape,params){return new ZodObject({type:"object",shape,catchall:unknown$2(),...normalizeParams(params)})}const ZodUnion=$constructor("ZodUnion",(inst,def)=>{$ZodUnion.init(inst,def),ZodType.init(inst,def),inst._zod.processJSONSchema=(ctx,json2,params)=>unionProcessor(inst,ctx,json2,params),inst.options=def.options});function union(options,params){
return new ZodUnion({type:"union",options,...normalizeParams(params)})}const ZodDiscriminatedUnion=$constructor("ZodDiscriminatedUnion",(inst,def)=>{ZodUnion.init(inst,def),$ZodDiscriminatedUnion.init(inst,def)});function discriminatedUnion(discriminator2,options,params){return new ZodDiscriminatedUnion({type:"union",options,discriminator:discriminator2,...normalizeParams(params)})}const ZodIntersection=$constructor("ZodIntersection",(inst,def)=>{$ZodIntersection.init(inst,def),ZodType.init(inst,
def),inst._zod.processJSONSchema=(ctx,json2,params)=>intersectionProcessor(inst,ctx,json2,params)});function intersection(left,right){return new ZodIntersection({type:"intersection",left,right})}const ZodRecord=$constructor("ZodRecord",(inst,def)=>{$ZodRecord.init(inst,def),ZodType.init(inst,def),inst._zod.processJSONSchema=(ctx,json2,params)=>recordProcessor(inst,ctx,json2,params),inst.keyType=def.keyType,inst.valueType=def.valueType});function record(keyType,valueType,params){return new ZodRecord(
{type:"record",keyType,valueType,...normalizeParams(params)})}const ZodEnum=$constructor("ZodEnum",(inst,def)=>{$ZodEnum.init(inst,def),ZodType.init(inst,def),inst._zod.processJSONSchema=(ctx,json2,params)=>enumProcessor(inst,ctx,json2),inst.enum=def.entries,inst.options=Object.values(def.entries);const keys2=new Set(Object.keys(def.entries));inst.extract=(values,params)=>{const newEntries={};for(const value of values)if(keys2.has(value))newEntries[value]=def.entries[value];else throw new Error(
`Key ${value} not found in enum`);return new ZodEnum({...def,checks:[],...normalizeParams(params),entries:newEntries})},inst.exclude=(values,params)=>{const newEntries={...def.entries};for(const value of values)if(keys2.has(value))delete newEntries[value];else throw new Error(`Key ${value} not found in enum`);return new ZodEnum({...def,checks:[],...normalizeParams(params),entries:newEntries})}});function _enum$2(values,params){const entries=Array.isArray(values)?Object.fromEntries(values.map(v=>[
v,v])):values;return new ZodEnum({type:"enum",entries,...normalizeParams(params)})}const ZodLiteral=$constructor("ZodLiteral",(inst,def)=>{$ZodLiteral.init(inst,def),ZodType.init(inst,def),inst._zod.processJSONSchema=(ctx,json2,params)=>literalProcessor(inst,ctx,json2),inst.values=new Set(def.values),Object.defineProperty(inst,"value",{get(){if(def.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return def.values[0]}})});function literal(value,params){
return new ZodLiteral({type:"literal",values:Array.isArray(value)?value:[value],...normalizeParams(params)})}const ZodTransform=$constructor("ZodTransform",(inst,def)=>{$ZodTransform.init(inst,def),ZodType.init(inst,def),inst._zod.processJSONSchema=(ctx,json2,params)=>transformProcessor(inst,ctx),inst._zod.parse=(payload,_ctx)=>{if(_ctx.direction==="backward")throw new $ZodEncodeError(inst.constructor.name);payload.addIssue=issue$1=>{if(typeof issue$1=="string")payload.issues.push(issue(issue$1,
payload.value,def));else{const _issue=issue$1;_issue.fatal&&(_issue.continue=!1),_issue.code??(_issue.code="custom"),_issue.input??(_issue.input=payload.value),_issue.inst??(_issue.inst=inst),payload.issues.push(issue(_issue))}};const output=def.transform(payload.value,payload);return output instanceof Promise?output.then(output2=>(payload.value=output2,payload)):(payload.value=output,payload)}});function transform$1(fn){return new ZodTransform({type:"transform",transform:fn})}const ZodOptional=$constructor(
"ZodOptional",(inst,def)=>{$ZodOptional.init(inst,def),ZodType.init(inst,def),inst._zod.processJSONSchema=(ctx,json2,params)=>optionalProcessor(inst,ctx,json2,params),inst.unwrap=()=>inst._zod.def.innerType});function optional(innerType){return new ZodOptional({type:"optional",innerType})}const ZodNullable=$constructor("ZodNullable",(inst,def)=>{$ZodNullable.init(inst,def),ZodType.init(inst,def),inst._zod.processJSONSchema=(ctx,json2,params)=>nullableProcessor(inst,ctx,json2,params),inst.unwrap=
()=>inst._zod.def.innerType});function nullable(innerType){return new ZodNullable({type:"nullable",innerType})}const ZodDefault=$constructor("ZodDefault",(inst,def)=>{$ZodDefault.init(inst,def),ZodType.init(inst,def),inst._zod.processJSONSchema=(ctx,json2,params)=>defaultProcessor(inst,ctx,json2,params),inst.unwrap=()=>inst._zod.def.innerType,inst.removeDefault=inst.unwrap});function _default(innerType,defaultValue){return new ZodDefault({type:"default",innerType,get defaultValue(){return typeof defaultValue==
"function"?defaultValue():shallowClone(defaultValue)}})}const ZodPrefault=$constructor("ZodPrefault",(inst,def)=>{$ZodPrefault.init(inst,def),ZodType.init(inst,def),inst._zod.processJSONSchema=(ctx,json2,params)=>prefaultProcessor(inst,ctx,json2,params),inst.unwrap=()=>inst._zod.def.innerType});function prefault(innerType,defaultValue){return new ZodPrefault({type:"prefault",innerType,get defaultValue(){return typeof defaultValue=="function"?defaultValue():shallowClone(defaultValue)}})}const ZodNonOptional=$constructor(
"ZodNonOptional",(inst,def)=>{$ZodNonOptional.init(inst,def),ZodType.init(inst,def),inst._zod.processJSONSchema=(ctx,json2,params)=>nonoptionalProcessor(inst,ctx,json2,params),inst.unwrap=()=>inst._zod.def.innerType});function nonoptional(innerType,params){return new ZodNonOptional({type:"nonoptional",innerType,...normalizeParams(params)})}const ZodCatch=$constructor("ZodCatch",(inst,def)=>{$ZodCatch.init(inst,def),ZodType.init(inst,def),inst._zod.processJSONSchema=(ctx,json2,params)=>catchProcessor(
inst,ctx,json2,params),inst.unwrap=()=>inst._zod.def.innerType,inst.removeCatch=inst.unwrap});function _catch(innerType,catchValue){return new ZodCatch({type:"catch",innerType,catchValue:typeof catchValue=="function"?catchValue:()=>catchValue})}const ZodPipe=$constructor("ZodPipe",(inst,def)=>{$ZodPipe.init(inst,def),ZodType.init(inst,def),inst._zod.processJSONSchema=(ctx,json2,params)=>pipeProcessor(inst,ctx,json2,params),inst.in=def.in,inst.out=def.out});function pipe(in_,out){return new ZodPipe(
{type:"pipe",in:in_,out})}const ZodReadonly=$constructor("ZodReadonly",(inst,def)=>{$ZodReadonly.init(inst,def),ZodType.init(inst,def),inst._zod.processJSONSchema=(ctx,json2,params)=>readonlyProcessor(inst,ctx,json2,params),inst.unwrap=()=>inst._zod.def.innerType});function readonly(innerType){return new ZodReadonly({type:"readonly",innerType})}const ZodCustom=$constructor("ZodCustom",(inst,def)=>{$ZodCustom.init(inst,def),ZodType.init(inst,def),inst._zod.processJSONSchema=(ctx,json2,params)=>customProcessor(
inst,ctx)});function custom(fn,_params){return _custom(ZodCustom,fn??(()=>!0),_params)}function refine(fn,_params={}){return _refine(ZodCustom,fn,_params)}function superRefine(fn){return _superRefine(fn)}function preprocess$1(fn,schema){return pipe(transform$1(fn),schema)}const ZodIssueCode={custom:"custom"};function number$1(params){return _coercedNumber(ZodNumber,params)}const LATEST_PROTOCOL_VERSION="2025-11-25",SUPPORTED_PROTOCOL_VERSIONS=[LATEST_PROTOCOL_VERSION,"2025-06-18","2025-03-26","2\
024-11-05","2024-10-07"],RELATED_TASK_META_KEY="io.modelcontextprotocol/related-task",JSONRPC_VERSION="2.0",AssertObjectSchema=custom(v=>v!==null&&(typeof v=="object"||typeof v=="function")),ProgressTokenSchema=union([string$2(),number$2().int()]),CursorSchema=string$2();looseObject({ttl:union([number$2(),_null()]).optional(),pollInterval:number$2().optional()});const TaskMetadataSchema=object({ttl:number$2().optional()}),RelatedTaskMetadataSchema=object({taskId:string$2()}),RequestMetaSchema=looseObject(
{progressToken:ProgressTokenSchema.optional(),[RELATED_TASK_META_KEY]:RelatedTaskMetadataSchema.optional()}),BaseRequestParamsSchema=object({_meta:RequestMetaSchema.optional()}),TaskAugmentedRequestParamsSchema=BaseRequestParamsSchema.extend({task:TaskMetadataSchema.optional()}),isTaskAugmentedRequestParams=value=>TaskAugmentedRequestParamsSchema.safeParse(value).success,RequestSchema=object({method:string$2(),params:BaseRequestParamsSchema.loose().optional()}),NotificationsParamsSchema=object({
_meta:RequestMetaSchema.optional()}),NotificationSchema=object({method:string$2(),params:NotificationsParamsSchema.loose().optional()}),ResultSchema=looseObject({_meta:RequestMetaSchema.optional()}),RequestIdSchema=union([string$2(),number$2().int()]),JSONRPCRequestSchema=object({jsonrpc:literal(JSONRPC_VERSION),id:RequestIdSchema,...RequestSchema.shape}).strict(),isJSONRPCRequest=value=>JSONRPCRequestSchema.safeParse(value).success,JSONRPCNotificationSchema=object({jsonrpc:literal(JSONRPC_VERSION),
...NotificationSchema.shape}).strict(),isJSONRPCNotification=value=>JSONRPCNotificationSchema.safeParse(value).success,JSONRPCResultResponseSchema=object({jsonrpc:literal(JSONRPC_VERSION),id:RequestIdSchema,result:ResultSchema}).strict(),isJSONRPCResultResponse=value=>JSONRPCResultResponseSchema.safeParse(value).success;var ErrorCode;(function(ErrorCode2){ErrorCode2[ErrorCode2.ConnectionClosed=-32e3]="ConnectionClosed",ErrorCode2[ErrorCode2.RequestTimeout=-32001]="RequestTimeout",ErrorCode2[ErrorCode2.
ParseError=-32700]="ParseError",ErrorCode2[ErrorCode2.InvalidRequest=-32600]="InvalidRequest",ErrorCode2[ErrorCode2.MethodNotFound=-32601]="MethodNotFound",ErrorCode2[ErrorCode2.InvalidParams=-32602]="InvalidParams",ErrorCode2[ErrorCode2.InternalError=-32603]="InternalError",ErrorCode2[ErrorCode2.UrlElicitationRequired=-32042]="UrlElicitationRequired"})(ErrorCode||(ErrorCode={}));const JSONRPCErrorResponseSchema=object({jsonrpc:literal(JSONRPC_VERSION),id:RequestIdSchema.optional(),error:object(
{code:number$2().int(),message:string$2(),data:unknown$2().optional()})}).strict(),isJSONRPCErrorResponse=value=>JSONRPCErrorResponseSchema.safeParse(value).success,JSONRPCMessageSchema=union([JSONRPCRequestSchema,JSONRPCNotificationSchema,JSONRPCResultResponseSchema,JSONRPCErrorResponseSchema]);union([JSONRPCResultResponseSchema,JSONRPCErrorResponseSchema]);const EmptyResultSchema=ResultSchema.strict(),CancelledNotificationParamsSchema=NotificationsParamsSchema.extend({requestId:RequestIdSchema.
optional(),reason:string$2().optional()}),CancelledNotificationSchema=NotificationSchema.extend({method:literal("notifications/cancelled"),params:CancelledNotificationParamsSchema}),IconSchema=object({src:string$2(),mimeType:string$2().optional(),sizes:array(string$2()).optional(),theme:_enum$2(["light","dark"]).optional()}),IconsSchema=object({icons:array(IconSchema).optional()}),BaseMetadataSchema=object({name:string$2(),title:string$2().optional()}),ImplementationSchema=BaseMetadataSchema.extend(
{...BaseMetadataSchema.shape,...IconsSchema.shape,version:string$2(),websiteUrl:string$2().optional(),description:string$2().optional()}),FormElicitationCapabilitySchema=intersection(object({applyDefaults:boolean$1().optional()}),record(string$2(),unknown$2())),ElicitationCapabilitySchema=preprocess$1(value=>value&&typeof value=="object"&&!Array.isArray(value)&&Object.keys(value).length===0?{form:{}}:value,intersection(object({form:FormElicitationCapabilitySchema.optional(),url:AssertObjectSchema.
optional()}),record(string$2(),unknown$2()).optional())),ClientTasksCapabilitySchema=looseObject({list:AssertObjectSchema.optional(),cancel:AssertObjectSchema.optional(),requests:looseObject({sampling:looseObject({createMessage:AssertObjectSchema.optional()}).optional(),elicitation:looseObject({create:AssertObjectSchema.optional()}).optional()}).optional()}),ServerTasksCapabilitySchema=looseObject({list:AssertObjectSchema.optional(),cancel:AssertObjectSchema.optional(),requests:looseObject({tools:looseObject(
{call:AssertObjectSchema.optional()}).optional()}).optional()}),ClientCapabilitiesSchema=object({experimental:record(string$2(),AssertObjectSchema).optional(),sampling:object({context:AssertObjectSchema.optional(),tools:AssertObjectSchema.optional()}).optional(),elicitation:ElicitationCapabilitySchema.optional(),roots:object({listChanged:boolean$1().optional()}).optional(),tasks:ClientTasksCapabilitySchema.optional()}),InitializeRequestParamsSchema=BaseRequestParamsSchema.extend({protocolVersion:string$2(),
capabilities:ClientCapabilitiesSchema,clientInfo:ImplementationSchema}),InitializeRequestSchema=RequestSchema.extend({method:literal("initialize"),params:InitializeRequestParamsSchema}),ServerCapabilitiesSchema=object({experimental:record(string$2(),AssertObjectSchema).optional(),logging:AssertObjectSchema.optional(),completions:AssertObjectSchema.optional(),prompts:object({listChanged:boolean$1().optional()}).optional(),resources:object({subscribe:boolean$1().optional(),listChanged:boolean$1().
optional()}).optional(),tools:object({listChanged:boolean$1().optional()}).optional(),tasks:ServerTasksCapabilitySchema.optional()}),InitializeResultSchema=ResultSchema.extend({protocolVersion:string$2(),capabilities:ServerCapabilitiesSchema,serverInfo:ImplementationSchema,instructions:string$2().optional()}),InitializedNotificationSchema=NotificationSchema.extend({method:literal("notifications/initialized"),params:NotificationsParamsSchema.optional()}),isInitializedNotification=value=>InitializedNotificationSchema.
safeParse(value).success,PingRequestSchema=RequestSchema.extend({method:literal("ping"),params:BaseRequestParamsSchema.optional()}),ProgressSchema=object({progress:number$2(),total:optional(number$2()),message:optional(string$2())}),ProgressNotificationParamsSchema=object({...NotificationsParamsSchema.shape,...ProgressSchema.shape,progressToken:ProgressTokenSchema}),ProgressNotificationSchema=NotificationSchema.extend({method:literal("notifications/progress"),params:ProgressNotificationParamsSchema}),
PaginatedRequestParamsSchema=BaseRequestParamsSchema.extend({cursor:CursorSchema.optional()}),PaginatedRequestSchema=RequestSchema.extend({params:PaginatedRequestParamsSchema.optional()}),PaginatedResultSchema=ResultSchema.extend({nextCursor:CursorSchema.optional()}),TaskStatusSchema=_enum$2(["working","input_required","completed","failed","cancelled"]),TaskSchema=object({taskId:string$2(),status:TaskStatusSchema,ttl:union([number$2(),_null()]),createdAt:string$2(),lastUpdatedAt:string$2(),pollInterval:optional(
number$2()),statusMessage:optional(string$2())}),CreateTaskResultSchema=ResultSchema.extend({task:TaskSchema}),TaskStatusNotificationParamsSchema=NotificationsParamsSchema.merge(TaskSchema),TaskStatusNotificationSchema=NotificationSchema.extend({method:literal("notifications/tasks/status"),params:TaskStatusNotificationParamsSchema}),GetTaskRequestSchema=RequestSchema.extend({method:literal("tasks/get"),params:BaseRequestParamsSchema.extend({taskId:string$2()})}),GetTaskResultSchema=ResultSchema.
merge(TaskSchema),GetTaskPayloadRequestSchema=RequestSchema.extend({method:literal("tasks/result"),params:BaseRequestParamsSchema.extend({taskId:string$2()})});ResultSchema.loose();const ListTasksRequestSchema=PaginatedRequestSchema.extend({method:literal("tasks/list")}),ListTasksResultSchema=PaginatedResultSchema.extend({tasks:array(TaskSchema)}),CancelTaskRequestSchema=RequestSchema.extend({method:literal("tasks/cancel"),params:BaseRequestParamsSchema.extend({taskId:string$2()})}),CancelTaskResultSchema=ResultSchema.
merge(TaskSchema),ResourceContentsSchema=object({uri:string$2(),mimeType:optional(string$2()),_meta:record(string$2(),unknown$2()).optional()}),TextResourceContentsSchema=ResourceContentsSchema.extend({text:string$2()}),Base64Schema=string$2().refine(val=>{try{return atob(val),!0}catch{return!1}},{message:"Invalid Base64 string"}),BlobResourceContentsSchema=ResourceContentsSchema.extend({blob:Base64Schema}),RoleSchema=_enum$2(["user","assistant"]),AnnotationsSchema=object({audience:array(RoleSchema).
optional(),priority:number$2().min(0).max(1).optional(),lastModified:datetime({offset:!0}).optional()}),ResourceSchema=object({...BaseMetadataSchema.shape,...IconsSchema.shape,uri:string$2(),description:optional(string$2()),mimeType:optional(string$2()),annotations:AnnotationsSchema.optional(),_meta:optional(looseObject({}))}),ResourceTemplateSchema=object({...BaseMetadataSchema.shape,...IconsSchema.shape,uriTemplate:string$2(),description:optional(string$2()),mimeType:optional(string$2()),annotations:AnnotationsSchema.
optional(),_meta:optional(looseObject({}))}),ListResourcesRequestSchema=PaginatedRequestSchema.extend({method:literal("resources/list")}),ListResourcesResultSchema=PaginatedResultSchema.extend({resources:array(ResourceSchema)}),ListResourceTemplatesRequestSchema=PaginatedRequestSchema.extend({method:literal("resources/templates/list")}),ListResourceTemplatesResultSchema=PaginatedResultSchema.extend({resourceTemplates:array(ResourceTemplateSchema)}),ResourceRequestParamsSchema=BaseRequestParamsSchema.
extend({uri:string$2()}),ReadResourceRequestParamsSchema=ResourceRequestParamsSchema,ReadResourceRequestSchema=RequestSchema.extend({method:literal("resources/read"),params:ReadResourceRequestParamsSchema}),ReadResourceResultSchema=ResultSchema.extend({contents:array(union([TextResourceContentsSchema,BlobResourceContentsSchema]))}),ResourceListChangedNotificationSchema=NotificationSchema.extend({method:literal("notifications/resources/list_changed"),params:NotificationsParamsSchema.optional()}),
SubscribeRequestParamsSchema=ResourceRequestParamsSchema,SubscribeRequestSchema=RequestSchema.extend({method:literal("resources/subscribe"),params:SubscribeRequestParamsSchema}),UnsubscribeRequestParamsSchema=ResourceRequestParamsSchema,UnsubscribeRequestSchema=RequestSchema.extend({method:literal("resources/unsubscribe"),params:UnsubscribeRequestParamsSchema}),ResourceUpdatedNotificationParamsSchema=NotificationsParamsSchema.extend({uri:string$2()}),ResourceUpdatedNotificationSchema=NotificationSchema.
extend({method:literal("notifications/resources/updated"),params:ResourceUpdatedNotificationParamsSchema}),PromptArgumentSchema=object({name:string$2(),description:optional(string$2()),required:optional(boolean$1())}),PromptSchema=object({...BaseMetadataSchema.shape,...IconsSchema.shape,description:optional(string$2()),arguments:optional(array(PromptArgumentSchema)),_meta:optional(looseObject({}))}),ListPromptsRequestSchema=PaginatedRequestSchema.extend({method:literal("prompts/list")}),ListPromptsResultSchema=PaginatedResultSchema.
extend({prompts:array(PromptSchema)}),GetPromptRequestParamsSchema=BaseRequestParamsSchema.extend({name:string$2(),arguments:record(string$2(),string$2()).optional()}),GetPromptRequestSchema=RequestSchema.extend({method:literal("prompts/get"),params:GetPromptRequestParamsSchema}),TextContentSchema=object({type:literal("text"),text:string$2(),annotations:AnnotationsSchema.optional(),_meta:record(string$2(),unknown$2()).optional()}),ImageContentSchema=object({type:literal("image"),data:Base64Schema,
mimeType:string$2(),annotations:AnnotationsSchema.optional(),_meta:record(string$2(),unknown$2()).optional()}),AudioContentSchema=object({type:literal("audio"),data:Base64Schema,mimeType:string$2(),annotations:AnnotationsSchema.optional(),_meta:record(string$2(),unknown$2()).optional()}),ToolUseContentSchema=object({type:literal("tool_use"),name:string$2(),id:string$2(),input:record(string$2(),unknown$2()),_meta:record(string$2(),unknown$2()).optional()}),EmbeddedResourceSchema=object({type:literal(
"resource"),resource:union([TextResourceContentsSchema,BlobResourceContentsSchema]),annotations:AnnotationsSchema.optional(),_meta:record(string$2(),unknown$2()).optional()}),ResourceLinkSchema=ResourceSchema.extend({type:literal("resource_link")}),ContentBlockSchema=union([TextContentSchema,ImageContentSchema,AudioContentSchema,ResourceLinkSchema,EmbeddedResourceSchema]),PromptMessageSchema=object({role:RoleSchema,content:ContentBlockSchema}),GetPromptResultSchema=ResultSchema.extend({description:string$2().
optional(),messages:array(PromptMessageSchema)}),PromptListChangedNotificationSchema=NotificationSchema.extend({method:literal("notifications/prompts/list_changed"),params:NotificationsParamsSchema.optional()}),ToolAnnotationsSchema=object({title:string$2().optional(),readOnlyHint:boolean$1().optional(),destructiveHint:boolean$1().optional(),idempotentHint:boolean$1().optional(),openWorldHint:boolean$1().optional()}),ToolExecutionSchema=object({taskSupport:_enum$2(["required","optional","forbidd\
en"]).optional()}),ToolSchema=object({...BaseMetadataSchema.shape,...IconsSchema.shape,description:string$2().optional(),inputSchema:object({type:literal("object"),properties:record(string$2(),AssertObjectSchema).optional(),required:array(string$2()).optional()}).catchall(unknown$2()),outputSchema:object({type:literal("object"),properties:record(string$2(),AssertObjectSchema).optional(),required:array(string$2()).optional()}).catchall(unknown$2()).optional(),annotations:ToolAnnotationsSchema.optional(),
execution:ToolExecutionSchema.optional(),_meta:record(string$2(),unknown$2()).optional()}),ListToolsRequestSchema=PaginatedRequestSchema.extend({method:literal("tools/list")}),ListToolsResultSchema=PaginatedResultSchema.extend({tools:array(ToolSchema)}),CallToolResultSchema=ResultSchema.extend({content:array(ContentBlockSchema).default([]),structuredContent:record(string$2(),unknown$2()).optional(),isError:boolean$1().optional()});CallToolResultSchema.or(ResultSchema.extend({toolResult:unknown$2()}));
const CallToolRequestParamsSchema=TaskAugmentedRequestParamsSchema.extend({name:string$2(),arguments:record(string$2(),unknown$2()).optional()}),CallToolRequestSchema=RequestSchema.extend({method:literal("tools/call"),params:CallToolRequestParamsSchema}),ToolListChangedNotificationSchema=NotificationSchema.extend({method:literal("notifications/tools/list_changed"),params:NotificationsParamsSchema.optional()}),ListChangedOptionsBaseSchema=object({autoRefresh:boolean$1().default(!0),debounceMs:number$2().
int().nonnegative().default(300)}),LoggingLevelSchema=_enum$2(["debug","info","notice","warning","error","critical","alert","emergency"]),SetLevelRequestParamsSchema=BaseRequestParamsSchema.extend({level:LoggingLevelSchema}),SetLevelRequestSchema=RequestSchema.extend({method:literal("logging/setLevel"),params:SetLevelRequestParamsSchema}),LoggingMessageNotificationParamsSchema=NotificationsParamsSchema.extend({level:LoggingLevelSchema,logger:string$2().optional(),data:unknown$2()}),LoggingMessageNotificationSchema=NotificationSchema.
extend({method:literal("notifications/message"),params:LoggingMessageNotificationParamsSchema}),ModelHintSchema=object({name:string$2().optional()}),ModelPreferencesSchema=object({hints:array(ModelHintSchema).optional(),costPriority:number$2().min(0).max(1).optional(),speedPriority:number$2().min(0).max(1).optional(),intelligencePriority:number$2().min(0).max(1).optional()}),ToolChoiceSchema=object({mode:_enum$2(["auto","required","none"]).optional()}),ToolResultContentSchema=object({type:literal(
"tool_result"),toolUseId:string$2().describe("The unique identifier for the corresponding tool call."),content:array(ContentBlockSchema).default([]),structuredContent:object({}).loose().optional(),isError:boolean$1().optional(),_meta:record(string$2(),unknown$2()).optional()}),SamplingContentSchema=discriminatedUnion("type",[TextContentSchema,ImageContentSchema,AudioContentSchema]),SamplingMessageContentBlockSchema=discriminatedUnion("type",[TextContentSchema,ImageContentSchema,AudioContentSchema,
ToolUseContentSchema,ToolResultContentSchema]),SamplingMessageSchema=object({role:RoleSchema,content:union([SamplingMessageContentBlockSchema,array(SamplingMessageContentBlockSchema)]),_meta:record(string$2(),unknown$2()).optional()}),CreateMessageRequestParamsSchema=TaskAugmentedRequestParamsSchema.extend({messages:array(SamplingMessageSchema),modelPreferences:ModelPreferencesSchema.optional(),systemPrompt:string$2().optional(),includeContext:_enum$2(["none","thisServer","allServers"]).optional(),
temperature:number$2().optional(),maxTokens:number$2().int(),stopSequences:array(string$2()).optional(),metadata:AssertObjectSchema.optional(),tools:array(ToolSchema).optional(),toolChoice:ToolChoiceSchema.optional()}),CreateMessageRequestSchema=RequestSchema.extend({method:literal("sampling/createMessage"),params:CreateMessageRequestParamsSchema}),CreateMessageResultSchema=ResultSchema.extend({model:string$2(),stopReason:optional(_enum$2(["endTurn","stopSequence","maxTokens"]).or(string$2())),role:RoleSchema,
content:SamplingContentSchema}),CreateMessageResultWithToolsSchema=ResultSchema.extend({model:string$2(),stopReason:optional(_enum$2(["endTurn","stopSequence","maxTokens","toolUse"]).or(string$2())),role:RoleSchema,content:union([SamplingMessageContentBlockSchema,array(SamplingMessageContentBlockSchema)])}),BooleanSchemaSchema=object({type:literal("boolean"),title:string$2().optional(),description:string$2().optional(),default:boolean$1().optional()}),StringSchemaSchema=object({type:literal("str\
ing"),title:string$2().optional(),description:string$2().optional(),minLength:number$2().optional(),maxLength:number$2().optional(),format:_enum$2(["email","uri","date","date-time"]).optional(),default:string$2().optional()}),NumberSchemaSchema=object({type:_enum$2(["number","integer"]),title:string$2().optional(),description:string$2().optional(),minimum:number$2().optional(),maximum:number$2().optional(),default:number$2().optional()}),UntitledSingleSelectEnumSchemaSchema=object({type:literal(
"string"),title:string$2().optional(),description:string$2().optional(),enum:array(string$2()),default:string$2().optional()}),TitledSingleSelectEnumSchemaSchema=object({type:literal("string"),title:string$2().optional(),description:string$2().optional(),oneOf:array(object({const:string$2(),title:string$2()})),default:string$2().optional()}),LegacyTitledEnumSchemaSchema=object({type:literal("string"),title:string$2().optional(),description:string$2().optional(),enum:array(string$2()),enumNames:array(
string$2()).optional(),default:string$2().optional()}),SingleSelectEnumSchemaSchema=union([UntitledSingleSelectEnumSchemaSchema,TitledSingleSelectEnumSchemaSchema]),UntitledMultiSelectEnumSchemaSchema=object({type:literal("array"),title:string$2().optional(),description:string$2().optional(),minItems:number$2().optional(),maxItems:number$2().optional(),items:object({type:literal("string"),enum:array(string$2())}),default:array(string$2()).optional()}),TitledMultiSelectEnumSchemaSchema=object({type:literal(
"array"),title:string$2().optional(),description:string$2().optional(),minItems:number$2().optional(),maxItems:number$2().optional(),items:object({anyOf:array(object({const:string$2(),title:string$2()}))}),default:array(string$2()).optional()}),MultiSelectEnumSchemaSchema=union([UntitledMultiSelectEnumSchemaSchema,TitledMultiSelectEnumSchemaSchema]),EnumSchemaSchema=union([LegacyTitledEnumSchemaSchema,SingleSelectEnumSchemaSchema,MultiSelectEnumSchemaSchema]),PrimitiveSchemaDefinitionSchema=union(
[EnumSchemaSchema,BooleanSchemaSchema,StringSchemaSchema,NumberSchemaSchema]),ElicitRequestFormParamsSchema=TaskAugmentedRequestParamsSchema.extend({mode:literal("form").optional(),message:string$2(),requestedSchema:object({type:literal("object"),properties:record(string$2(),PrimitiveSchemaDefinitionSchema),required:array(string$2()).optional()})}),ElicitRequestURLParamsSchema=TaskAugmentedRequestParamsSchema.extend({mode:literal("url"),message:string$2(),elicitationId:string$2(),url:string$2().
url()}),ElicitRequestParamsSchema=union([ElicitRequestFormParamsSchema,ElicitRequestURLParamsSchema]),ElicitRequestSchema=RequestSchema.extend({method:literal("elicitation/create"),params:ElicitRequestParamsSchema}),ElicitationCompleteNotificationParamsSchema=NotificationsParamsSchema.extend({elicitationId:string$2()}),ElicitationCompleteNotificationSchema=NotificationSchema.extend({method:literal("notifications/elicitation/complete"),params:ElicitationCompleteNotificationParamsSchema}),ElicitResultSchema=ResultSchema.
extend({action:_enum$2(["accept","decline","cancel"]),content:preprocess$1(val=>val===null?void 0:val,record(string$2(),union([string$2(),number$2(),boolean$1(),array(string$2())])).optional())}),ResourceTemplateReferenceSchema=object({type:literal("ref/resource"),uri:string$2()}),PromptReferenceSchema=object({type:literal("ref/prompt"),name:string$2()}),CompleteRequestParamsSchema=BaseRequestParamsSchema.extend({ref:union([PromptReferenceSchema,ResourceTemplateReferenceSchema]),argument:object(
{name:string$2(),value:string$2()}),context:object({arguments:record(string$2(),string$2()).optional()}).optional()}),CompleteRequestSchema=RequestSchema.extend({method:literal("completion/complete"),params:CompleteRequestParamsSchema}),CompleteResultSchema=ResultSchema.extend({completion:looseObject({values:array(string$2()).max(100),total:optional(number$2().int()),hasMore:optional(boolean$1())})}),RootSchema=object({uri:string$2().startsWith("file://"),name:string$2().optional(),_meta:record(
string$2(),unknown$2()).optional()}),ListRootsRequestSchema=RequestSchema.extend({method:literal("roots/list"),params:BaseRequestParamsSchema.optional()}),ListRootsResultSchema=ResultSchema.extend({roots:array(RootSchema)}),RootsListChangedNotificationSchema=NotificationSchema.extend({method:literal("notifications/roots/list_changed"),params:NotificationsParamsSchema.optional()});union([PingRequestSchema,InitializeRequestSchema,CompleteRequestSchema,SetLevelRequestSchema,GetPromptRequestSchema,ListPromptsRequestSchema,
ListResourcesRequestSchema,ListResourceTemplatesRequestSchema,ReadResourceRequestSchema,SubscribeRequestSchema,UnsubscribeRequestSchema,CallToolRequestSchema,ListToolsRequestSchema,GetTaskRequestSchema,GetTaskPayloadRequestSchema,ListTasksRequestSchema,CancelTaskRequestSchema]);union([CancelledNotificationSchema,ProgressNotificationSchema,InitializedNotificationSchema,RootsListChangedNotificationSchema,TaskStatusNotificationSchema]);union([EmptyResultSchema,CreateMessageResultSchema,CreateMessageResultWithToolsSchema,
ElicitResultSchema,ListRootsResultSchema,GetTaskResultSchema,ListTasksResultSchema,CreateTaskResultSchema]);union([PingRequestSchema,CreateMessageRequestSchema,ElicitRequestSchema,ListRootsRequestSchema,GetTaskRequestSchema,GetTaskPayloadRequestSchema,ListTasksRequestSchema,CancelTaskRequestSchema]);union([CancelledNotificationSchema,ProgressNotificationSchema,LoggingMessageNotificationSchema,ResourceUpdatedNotificationSchema,ResourceListChangedNotificationSchema,ToolListChangedNotificationSchema,
PromptListChangedNotificationSchema,TaskStatusNotificationSchema,ElicitationCompleteNotificationSchema]);union([EmptyResultSchema,InitializeResultSchema,CompleteResultSchema,GetPromptResultSchema,ListPromptsResultSchema,ListResourcesResultSchema,ListResourceTemplatesResultSchema,ReadResourceResultSchema,CallToolResultSchema,ListToolsResultSchema,GetTaskResultSchema,ListTasksResultSchema,CreateTaskResultSchema]);class McpError extends Error{constructor(code2,message,data){super(`MCP error ${code2}\
: ${message}`),this.code=code2,this.data=data,this.name="McpError"}static fromError(code2,message,data){if(code2===ErrorCode.UrlElicitationRequired&&data){const errorData=data;if(errorData.elicitations)return new UrlElicitationRequiredError(errorData.elicitations,message)}return new McpError(code2,message,data)}}class UrlElicitationRequiredError extends McpError{constructor(elicitations,message=`URL elicitation${elicitations.length>1?"s":""} required`){super(ErrorCode.UrlElicitationRequired,message,
{elicitations})}get elicitations(){return this.data?.elicitations??[]}}function isTerminal(status){return status==="completed"||status==="failed"||status==="cancelled"}new Set("ABCDEFGHIJKLMNOPQRSTUVXYZabcdefghijklmnopqrstuvxyz0123456789");function getMethodLiteral(schema){const methodSchema=getObjectShape(schema)?.method;if(!methodSchema)throw new Error("Schema is missing a method literal");const value=getLiteralValue(methodSchema);if(typeof value!="string")throw new Error("Schema method litera\
l must be a string");return value}function parseWithCompat(schema,data){const result=safeParse$1(schema,data);if(!result.success)throw result.error;return result.data}const DEFAULT_REQUEST_TIMEOUT_MSEC=6e4;class Protocol{constructor(_options){this._options=_options,this._requestMessageId=0,this._requestHandlers=new Map,this._requestHandlerAbortControllers=new Map,this._notificationHandlers=new Map,this._responseHandlers=new Map,this._progressHandlers=new Map,this._timeoutInfo=new Map,this._pendingDebouncedNotifications=
new Set,this._taskProgressTokens=new Map,this._requestResolvers=new Map,this.setNotificationHandler(CancelledNotificationSchema,notification=>{this._oncancel(notification)}),this.setNotificationHandler(ProgressNotificationSchema,notification=>{this._onprogress(notification)}),this.setRequestHandler(PingRequestSchema,_request=>({})),this._taskStore=_options?.taskStore,this._taskMessageQueue=_options?.taskMessageQueue,this._taskStore&&(this.setRequestHandler(GetTaskRequestSchema,async(request,extra)=>{
const task=await this._taskStore.getTask(request.params.taskId,extra.sessionId);if(!task)throw new McpError(ErrorCode.InvalidParams,"Failed to retrieve task: Task not found");return{...task}}),this.setRequestHandler(GetTaskPayloadRequestSchema,async(request,extra)=>{const handleTaskResult=async()=>{const taskId=request.params.taskId;if(this._taskMessageQueue){let queuedMessage;for(;queuedMessage=await this._taskMessageQueue.dequeue(taskId,extra.sessionId);){if(queuedMessage.type==="response"||queuedMessage.
type==="error"){const message=queuedMessage.message,requestId=message.id,resolver2=this._requestResolvers.get(requestId);if(resolver2)if(this._requestResolvers.delete(requestId),queuedMessage.type==="response")resolver2(message);else{const errorMessage=message,error2=new McpError(errorMessage.error.code,errorMessage.error.message,errorMessage.error.data);resolver2(error2)}else{const messageType=queuedMessage.type==="response"?"Response":"Error";this._onerror(new Error(`${messageType} handler mis\
sing for request ${requestId}`))}continue}await this._transport?.send(queuedMessage.message,{relatedRequestId:extra.requestId})}}const task=await this._taskStore.getTask(taskId,extra.sessionId);if(!task)throw new McpError(ErrorCode.InvalidParams,`Task not found: ${taskId}`);if(!isTerminal(task.status))return await this._waitForTaskUpdate(taskId,extra.signal),await handleTaskResult();if(isTerminal(task.status)){const result=await this._taskStore.getTaskResult(taskId,extra.sessionId);return this._clearTaskQueue(
taskId),{...result,_meta:{...result._meta,[RELATED_TASK_META_KEY]:{taskId}}}}return await handleTaskResult()};return await handleTaskResult()}),this.setRequestHandler(ListTasksRequestSchema,async(request,extra)=>{try{const{tasks,nextCursor}=await this._taskStore.listTasks(request.params?.cursor,extra.sessionId);return{tasks,nextCursor,_meta:{}}}catch(error2){throw new McpError(ErrorCode.InvalidParams,`Failed to list tasks: ${error2 instanceof Error?error2.message:String(error2)}`)}}),this.setRequestHandler(
CancelTaskRequestSchema,async(request,extra)=>{try{const task=await this._taskStore.getTask(request.params.taskId,extra.sessionId);if(!task)throw new McpError(ErrorCode.InvalidParams,`Task not found: ${request.params.taskId}`);if(isTerminal(task.status))throw new McpError(ErrorCode.InvalidParams,`Cannot cancel task in terminal status: ${task.status}`);await this._taskStore.updateTaskStatus(request.params.taskId,"cancelled","Client cancelled task execution.",extra.sessionId),this._clearTaskQueue(
request.params.taskId);const cancelledTask=await this._taskStore.getTask(request.params.taskId,extra.sessionId);if(!cancelledTask)throw new McpError(ErrorCode.InvalidParams,`Task not found after cancellation: ${request.params.taskId}`);return{_meta:{},...cancelledTask}}catch(error2){throw error2 instanceof McpError?error2:new McpError(ErrorCode.InvalidRequest,`Failed to cancel task: ${error2 instanceof Error?error2.message:String(error2)}`)}}))}async _oncancel(notification){if(!notification.params.
requestId)return;this._requestHandlerAbortControllers.get(notification.params.requestId)?.abort(notification.params.reason)}_setupTimeout(messageId,timeout,maxTotalTimeout,onTimeout,resetTimeoutOnProgress=!1){this._timeoutInfo.set(messageId,{timeoutId:setTimeout(onTimeout,timeout),startTime:Date.now(),timeout,maxTotalTimeout,resetTimeoutOnProgress,onTimeout})}_resetTimeout(messageId){const info2=this._timeoutInfo.get(messageId);if(!info2)return!1;const totalElapsed=Date.now()-info2.startTime;if(info2.
maxTotalTimeout&&totalElapsed>=info2.maxTotalTimeout)throw this._timeoutInfo.delete(messageId),McpError.fromError(ErrorCode.RequestTimeout,"Maximum total timeout exceeded",{maxTotalTimeout:info2.maxTotalTimeout,totalElapsed});return clearTimeout(info2.timeoutId),info2.timeoutId=setTimeout(info2.onTimeout,info2.timeout),!0}_cleanupTimeout(messageId){const info2=this._timeoutInfo.get(messageId);info2&&(clearTimeout(info2.timeoutId),this._timeoutInfo.delete(messageId))}async connect(transport){if(this.
_transport)throw new Error("Already connected to a transport. Call close() before connecting to a new transport, or use a separate Protocol instance per connection.");this._transport=transport;const _onclose=this.transport?.onclose;this._transport.onclose=()=>{_onclose?.(),this._onclose()};const _onerror=this.transport?.onerror;this._transport.onerror=error2=>{_onerror?.(error2),this._onerror(error2)};const _onmessage=this._transport?.onmessage;this._transport.onmessage=(message,extra)=>{_onmessage?.(
message,extra),isJSONRPCResultResponse(message)||isJSONRPCErrorResponse(message)?this._onresponse(message):isJSONRPCRequest(message)?this._onrequest(message,extra):isJSONRPCNotification(message)?this._onnotification(message):this._onerror(new Error(`Unknown message type: ${JSON.stringify(message)}`))},await this._transport.start()}_onclose(){const responseHandlers=this._responseHandlers;this._responseHandlers=new Map,this._progressHandlers.clear(),this._taskProgressTokens.clear(),this._pendingDebouncedNotifications.
clear();for(const controller of this._requestHandlerAbortControllers.values())controller.abort();this._requestHandlerAbortControllers.clear();const error2=McpError.fromError(ErrorCode.ConnectionClosed,"Connection closed");this._transport=void 0,this.onclose?.();for(const handler of responseHandlers.values())handler(error2)}_onerror(error2){this.onerror?.(error2)}_onnotification(notification){const handler=this._notificationHandlers.get(notification.method)??this.fallbackNotificationHandler;handler!==
void 0&&Promise.resolve().then(()=>handler(notification)).catch(error2=>this._onerror(new Error(`Uncaught error in notification handler: ${error2}`)))}_onrequest(request,extra){const handler=this._requestHandlers.get(request.method)??this.fallbackRequestHandler,capturedTransport=this._transport,relatedTaskId=request.params?._meta?.[RELATED_TASK_META_KEY]?.taskId;if(handler===void 0){const errorResponse={jsonrpc:"2.0",id:request.id,error:{code:ErrorCode.MethodNotFound,message:"Method not found"}};
relatedTaskId&&this._taskMessageQueue?this._enqueueTaskMessage(relatedTaskId,{type:"error",message:errorResponse,timestamp:Date.now()},capturedTransport?.sessionId).catch(error2=>this._onerror(new Error(`Failed to enqueue error response: ${error2}`))):capturedTransport?.send(errorResponse).catch(error2=>this._onerror(new Error(`Failed to send an error response: ${error2}`)));return}const abortController=new AbortController;this._requestHandlerAbortControllers.set(request.id,abortController);const taskCreationParams=isTaskAugmentedRequestParams(
request.params)?request.params.task:void 0,taskStore=this._taskStore?this.requestTaskStore(request,capturedTransport?.sessionId):void 0,fullExtra={signal:abortController.signal,sessionId:capturedTransport?.sessionId,_meta:request.params?._meta,sendNotification:async notification=>{if(abortController.signal.aborted)return;const notificationOptions={relatedRequestId:request.id};relatedTaskId&&(notificationOptions.relatedTask={taskId:relatedTaskId}),await this.notification(notification,notificationOptions)},
sendRequest:async(r2,resultSchema,options)=>{if(abortController.signal.aborted)throw new McpError(ErrorCode.ConnectionClosed,"Request was cancelled");const requestOptions={...options,relatedRequestId:request.id};relatedTaskId&&!requestOptions.relatedTask&&(requestOptions.relatedTask={taskId:relatedTaskId});const effectiveTaskId=requestOptions.relatedTask?.taskId??relatedTaskId;return effectiveTaskId&&taskStore&&await taskStore.updateTaskStatus(effectiveTaskId,"input_required"),await this.request(
r2,resultSchema,requestOptions)},authInfo:extra?.authInfo,requestId:request.id,requestInfo:extra?.requestInfo,taskId:relatedTaskId,taskStore,taskRequestedTtl:taskCreationParams?.ttl,closeSSEStream:extra?.closeSSEStream,closeStandaloneSSEStream:extra?.closeStandaloneSSEStream};Promise.resolve().then(()=>{taskCreationParams&&this.assertTaskHandlerCapability(request.method)}).then(()=>handler(request,fullExtra)).then(async result=>{if(abortController.signal.aborted)return;const response={result,jsonrpc:"\
2.0",id:request.id};relatedTaskId&&this._taskMessageQueue?await this._enqueueTaskMessage(relatedTaskId,{type:"response",message:response,timestamp:Date.now()},capturedTransport?.sessionId):await capturedTransport?.send(response)},async error2=>{if(abortController.signal.aborted)return;const errorResponse={jsonrpc:"2.0",id:request.id,error:{code:Number.isSafeInteger(error2.code)?error2.code:ErrorCode.InternalError,message:error2.message??"Internal error",...error2.data!==void 0&&{data:error2.data}}};
relatedTaskId&&this._taskMessageQueue?await this._enqueueTaskMessage(relatedTaskId,{type:"error",message:errorResponse,timestamp:Date.now()},capturedTransport?.sessionId):await capturedTransport?.send(errorResponse)}).catch(error2=>this._onerror(new Error(`Failed to send response: ${error2}`))).finally(()=>{this._requestHandlerAbortControllers.delete(request.id)})}_onprogress(notification){const{progressToken,...params}=notification.params,messageId=Number(progressToken),handler=this._progressHandlers.
get(messageId);if(!handler){this._onerror(new Error(`Received a progress notification for an unknown token: ${JSON.stringify(notification)}`));return}const responseHandler=this._responseHandlers.get(messageId),timeoutInfo=this._timeoutInfo.get(messageId);if(timeoutInfo&&responseHandler&&timeoutInfo.resetTimeoutOnProgress)try{this._resetTimeout(messageId)}catch(error2){this._responseHandlers.delete(messageId),this._progressHandlers.delete(messageId),this._cleanupTimeout(messageId),responseHandler(
error2);return}handler(params)}_onresponse(response){const messageId=Number(response.id),resolver2=this._requestResolvers.get(messageId);if(resolver2){if(this._requestResolvers.delete(messageId),isJSONRPCResultResponse(response))resolver2(response);else{const error2=new McpError(response.error.code,response.error.message,response.error.data);resolver2(error2)}return}const handler=this._responseHandlers.get(messageId);if(handler===void 0){this._onerror(new Error(`Received a response for an unknow\
n message ID: ${JSON.stringify(response)}`));return}this._responseHandlers.delete(messageId),this._cleanupTimeout(messageId);let isTaskResponse=!1;if(isJSONRPCResultResponse(response)&&response.result&&typeof response.result=="object"){const result=response.result;if(result.task&&typeof result.task=="object"){const task=result.task;typeof task.taskId=="string"&&(isTaskResponse=!0,this._taskProgressTokens.set(task.taskId,messageId))}}if(isTaskResponse||this._progressHandlers.delete(messageId),isJSONRPCResultResponse(
response))handler(response);else{const error2=McpError.fromError(response.error.code,response.error.message,response.error.data);handler(error2)}}get transport(){return this._transport}async close(){await this._transport?.close()}async*requestStream(request,resultSchema,options){const{task}=options??{};if(!task){try{yield{type:"result",result:await this.request(request,resultSchema,options)}}catch(error2){yield{type:"error",error:error2 instanceof McpError?error2:new McpError(ErrorCode.InternalError,
String(error2))}}return}let taskId;try{const createResult=await this.request(request,CreateTaskResultSchema,options);if(createResult.task)taskId=createResult.task.taskId,yield{type:"taskCreated",task:createResult.task};else throw new McpError(ErrorCode.InternalError,"Task creation did not return a task");for(;;){const task2=await this.getTask({taskId},options);if(yield{type:"taskStatus",task:task2},isTerminal(task2.status)){task2.status==="completed"?yield{type:"result",result:await this.getTaskResult(
{taskId},resultSchema,options)}:task2.status==="failed"?yield{type:"error",error:new McpError(ErrorCode.InternalError,`Task ${taskId} failed`)}:task2.status==="cancelled"&&(yield{type:"error",error:new McpError(ErrorCode.InternalError,`Task ${taskId} was cancelled`)});return}if(task2.status==="input_required"){yield{type:"result",result:await this.getTaskResult({taskId},resultSchema,options)};return}const pollInterval=task2.pollInterval??this._options?.defaultTaskPollInterval??1e3;await new Promise(
resolve2=>setTimeout(resolve2,pollInterval)),options?.signal?.throwIfAborted()}}catch(error2){yield{type:"error",error:error2 instanceof McpError?error2:new McpError(ErrorCode.InternalError,String(error2))}}}request(request,resultSchema,options){const{relatedRequestId,resumptionToken,onresumptiontoken,task,relatedTask}=options??{};return new Promise((resolve2,reject)=>{const earlyReject=error2=>{reject(error2)};if(!this._transport){earlyReject(new Error("Not connected"));return}if(this._options?.
enforceStrictCapabilities===!0)try{this.assertCapabilityForMethod(request.method),task&&this.assertTaskCapability(request.method)}catch(e){earlyReject(e);return}options?.signal?.throwIfAborted();const messageId=this._requestMessageId++,jsonrpcRequest={...request,jsonrpc:"2.0",id:messageId};options?.onprogress&&(this._progressHandlers.set(messageId,options.onprogress),jsonrpcRequest.params={...request.params,_meta:{...request.params?._meta||{},progressToken:messageId}}),task&&(jsonrpcRequest.params=
{...jsonrpcRequest.params,task}),relatedTask&&(jsonrpcRequest.params={...jsonrpcRequest.params,_meta:{...jsonrpcRequest.params?._meta||{},[RELATED_TASK_META_KEY]:relatedTask}});const cancel=reason=>{this._responseHandlers.delete(messageId),this._progressHandlers.delete(messageId),this._cleanupTimeout(messageId),this._transport?.send({jsonrpc:"2.0",method:"notifications/cancelled",params:{requestId:messageId,reason:String(reason)}},{relatedRequestId,resumptionToken,onresumptiontoken}).catch(error3=>this.
_onerror(new Error(`Failed to send cancellation: ${error3}`)));const error2=reason instanceof McpError?reason:new McpError(ErrorCode.RequestTimeout,String(reason));reject(error2)};this._responseHandlers.set(messageId,response=>{if(!options?.signal?.aborted){if(response instanceof Error)return reject(response);try{const parseResult=safeParse$1(resultSchema,response.result);parseResult.success?resolve2(parseResult.data):reject(parseResult.error)}catch(error2){reject(error2)}}}),options?.signal?.addEventListener(
"abort",()=>{cancel(options?.signal?.reason)});const timeout=options?.timeout??DEFAULT_REQUEST_TIMEOUT_MSEC,timeoutHandler=()=>cancel(McpError.fromError(ErrorCode.RequestTimeout,"Request timed out",{timeout}));this._setupTimeout(messageId,timeout,options?.maxTotalTimeout,timeoutHandler,options?.resetTimeoutOnProgress??!1);const relatedTaskId=relatedTask?.taskId;if(relatedTaskId){const responseResolver=response=>{const handler=this._responseHandlers.get(messageId);handler?handler(response):this._onerror(
new Error(`Response handler missing for side-channeled request ${messageId}`))};this._requestResolvers.set(messageId,responseResolver),this._enqueueTaskMessage(relatedTaskId,{type:"request",message:jsonrpcRequest,timestamp:Date.now()}).catch(error2=>{this._cleanupTimeout(messageId),reject(error2)})}else this._transport.send(jsonrpcRequest,{relatedRequestId,resumptionToken,onresumptiontoken}).catch(error2=>{this._cleanupTimeout(messageId),reject(error2)})})}async getTask(params,options){return this.
request({method:"tasks/get",params},GetTaskResultSchema,options)}async getTaskResult(params,resultSchema,options){return this.request({method:"tasks/result",params},resultSchema,options)}async listTasks(params,options){return this.request({method:"tasks/list",params},ListTasksResultSchema,options)}async cancelTask(params,options){return this.request({method:"tasks/cancel",params},CancelTaskResultSchema,options)}async notification(notification,options){if(!this._transport)throw new Error("Not con\
nected");this.assertNotificationCapability(notification.method);const relatedTaskId=options?.relatedTask?.taskId;if(relatedTaskId){const jsonrpcNotification2={...notification,jsonrpc:"2.0",params:{...notification.params,_meta:{...notification.params?._meta||{},[RELATED_TASK_META_KEY]:options.relatedTask}}};await this._enqueueTaskMessage(relatedTaskId,{type:"notification",message:jsonrpcNotification2,timestamp:Date.now()});return}if((this._options?.debouncedNotificationMethods??[]).includes(notification.
method)&&!notification.params&&!options?.relatedRequestId&&!options?.relatedTask){if(this._pendingDebouncedNotifications.has(notification.method))return;this._pendingDebouncedNotifications.add(notification.method),Promise.resolve().then(()=>{if(this._pendingDebouncedNotifications.delete(notification.method),!this._transport)return;let jsonrpcNotification2={...notification,jsonrpc:"2.0"};options?.relatedTask&&(jsonrpcNotification2={...jsonrpcNotification2,params:{...jsonrpcNotification2.params,_meta:{
...jsonrpcNotification2.params?._meta||{},[RELATED_TASK_META_KEY]:options.relatedTask}}}),this._transport?.send(jsonrpcNotification2,options).catch(error2=>this._onerror(error2))});return}let jsonrpcNotification={...notification,jsonrpc:"2.0"};options?.relatedTask&&(jsonrpcNotification={...jsonrpcNotification,params:{...jsonrpcNotification.params,_meta:{...jsonrpcNotification.params?._meta||{},[RELATED_TASK_META_KEY]:options.relatedTask}}}),await this._transport.send(jsonrpcNotification,options)}setRequestHandler(requestSchema,handler){
const method=getMethodLiteral(requestSchema);this.assertRequestHandlerCapability(method),this._requestHandlers.set(method,(request,extra)=>{const parsed=parseWithCompat(requestSchema,request);return Promise.resolve(handler(parsed,extra))})}removeRequestHandler(method){this._requestHandlers.delete(method)}assertCanSetRequestHandler(method){if(this._requestHandlers.has(method))throw new Error(`A request handler for ${method} already exists, which would be overridden`)}setNotificationHandler(notificationSchema,handler){
const method=getMethodLiteral(notificationSchema);this._notificationHandlers.set(method,notification=>{const parsed=parseWithCompat(notificationSchema,notification);return Promise.resolve(handler(parsed))})}removeNotificationHandler(method){this._notificationHandlers.delete(method)}_cleanupTaskProgressHandler(taskId){const progressToken=this._taskProgressTokens.get(taskId);progressToken!==void 0&&(this._progressHandlers.delete(progressToken),this._taskProgressTokens.delete(taskId))}async _enqueueTaskMessage(taskId,message,sessionId){
if(!this._taskStore||!this._taskMessageQueue)throw new Error("Cannot enqueue task message: taskStore and taskMessageQueue are not configured");const maxQueueSize=this._options?.maxTaskQueueSize;await this._taskMessageQueue.enqueue(taskId,message,sessionId,maxQueueSize)}async _clearTaskQueue(taskId,sessionId){if(this._taskMessageQueue){const messages=await this._taskMessageQueue.dequeueAll(taskId,sessionId);for(const message of messages)if(message.type==="request"&&isJSONRPCRequest(message.message)){
const requestId=message.message.id,resolver2=this._requestResolvers.get(requestId);resolver2?(resolver2(new McpError(ErrorCode.InternalError,"Task cancelled or completed")),this._requestResolvers.delete(requestId)):this._onerror(new Error(`Resolver missing for request ${requestId} during task ${taskId} cleanup`))}}}async _waitForTaskUpdate(taskId,signal){let interval=this._options?.defaultTaskPollInterval??1e3;try{const task=await this._taskStore?.getTask(taskId);task?.pollInterval&&(interval=task.
pollInterval)}catch{}return new Promise((resolve2,reject)=>{if(signal.aborted){reject(new McpError(ErrorCode.InvalidRequest,"Request cancelled"));return}const timeoutId=setTimeout(resolve2,interval);signal.addEventListener("abort",()=>{clearTimeout(timeoutId),reject(new McpError(ErrorCode.InvalidRequest,"Request cancelled"))},{once:!0})})}requestTaskStore(request,sessionId){const taskStore=this._taskStore;if(!taskStore)throw new Error("No task store configured");return{createTask:async taskParams=>{
if(!request)throw new Error("No request provided");return await taskStore.createTask(taskParams,request.id,{method:request.method,params:request.params},sessionId)},getTask:async taskId=>{const task=await taskStore.getTask(taskId,sessionId);if(!task)throw new McpError(ErrorCode.InvalidParams,"Failed to retrieve task: Task not found");return task},storeTaskResult:async(taskId,status,result)=>{await taskStore.storeTaskResult(taskId,status,result,sessionId);const task=await taskStore.getTask(taskId,
sessionId);if(task){const notification=TaskStatusNotificationSchema.parse({method:"notifications/tasks/status",params:task});await this.notification(notification),isTerminal(task.status)&&this._cleanupTaskProgressHandler(taskId)}},getTaskResult:taskId=>taskStore.getTaskResult(taskId,sessionId),updateTaskStatus:async(taskId,status,statusMessage)=>{const task=await taskStore.getTask(taskId,sessionId);if(!task)throw new McpError(ErrorCode.InvalidParams,`Task "${taskId}" not found - it may have been\
 cleaned up`);if(isTerminal(task.status))throw new McpError(ErrorCode.InvalidParams,`Cannot update task "${taskId}" from terminal status "${task.status}" to "${status}". Terminal states (completed, failed, cancelled) cannot transition to other states.`);await taskStore.updateTaskStatus(taskId,status,statusMessage,sessionId);const updatedTask=await taskStore.getTask(taskId,sessionId);if(updatedTask){const notification=TaskStatusNotificationSchema.parse({method:"notifications/tasks/status",params:updatedTask});
await this.notification(notification),isTerminal(updatedTask.status)&&this._cleanupTaskProgressHandler(taskId)}},listTasks:cursor=>taskStore.listTasks(cursor,sessionId)}}}function isPlainObject$1(value){return value!==null&&typeof value=="object"&&!Array.isArray(value)}function mergeCapabilities(base2,additional){const result={...base2};for(const key2 in additional){const k=key2,addValue=additional[k];if(addValue===void 0)continue;const baseValue=result[k];isPlainObject$1(baseValue)&&isPlainObject$1(
addValue)?result[k]={...baseValue,...addValue}:result[k]=addValue}return result}var ajv$1={exports:{}},core$4={},validate$1={},boolSchema$1={},errors$1={},codegen$1={},code$6={},hasRequiredCode$3;function requireCode$3(){return hasRequiredCode$3||(hasRequiredCode$3=1,(function(exports$1){Object.defineProperty(exports$1,"__esModule",{value:!0}),exports$1.regexpCode=exports$1.getEsmExportName=exports$1.getProperty=exports$1.safeStringify=exports$1.stringify=exports$1.strConcat=exports$1.addCodeArg=
exports$1.str=exports$1._=exports$1.nil=exports$1._Code=exports$1.Name=exports$1.IDENTIFIER=exports$1._CodeOrName=void 0;class _CodeOrName{}exports$1._CodeOrName=_CodeOrName,exports$1.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class Name extends _CodeOrName{constructor(s2){if(super(),!exports$1.IDENTIFIER.test(s2))throw new Error("CodeGen: name must be a valid identifier");this.str=s2}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}exports$1.Name=Name;class _Code extends _CodeOrName{constructor(code2){
super(),this._items=typeof code2=="string"?[code2]:code2}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const item=this._items[0];return item===""||item==='""'}get str(){var _a2;return(_a2=this._str)!==null&&_a2!==void 0?_a2:this._str=this._items.reduce((s2,c2)=>`${s2}${c2}`,"")}get names(){var _a2;return(_a2=this._names)!==null&&_a2!==void 0?_a2:this._names=this._items.reduce((names2,c2)=>(c2 instanceof Name&&(names2[c2.str]=(names2[c2.str]||0)+1),names2),{})}}exports$1.
_Code=_Code,exports$1.nil=new _Code("");function _(strs,...args){const code2=[strs[0]];let i=0;for(;i<args.length;)addCodeArg(code2,args[i]),code2.push(strs[++i]);return new _Code(code2)}exports$1._=_;const plus=new _Code("+");function str(strs,...args){const expr=[safeStringify(strs[0])];let i=0;for(;i<args.length;)expr.push(plus),addCodeArg(expr,args[i]),expr.push(plus,safeStringify(strs[++i]));return optimize(expr),new _Code(expr)}exports$1.str=str;function addCodeArg(code2,arg){arg instanceof
_Code?code2.push(...arg._items):arg instanceof Name?code2.push(arg):code2.push(interpolate(arg))}exports$1.addCodeArg=addCodeArg;function optimize(expr){let i=1;for(;i<expr.length-1;){if(expr[i]===plus){const res=mergeExprItems(expr[i-1],expr[i+1]);if(res!==void 0){expr.splice(i-1,3,res);continue}expr[i++]="+"}i++}}function mergeExprItems(a,b){if(b==='""')return a;if(a==='""')return b;if(typeof a=="string")return b instanceof Name||a[a.length-1]!=='"'?void 0:typeof b!="string"?`${a.slice(0,-1)}${b}\
"`:b[0]==='"'?a.slice(0,-1)+b.slice(1):void 0;if(typeof b=="string"&&b[0]==='"'&&!(a instanceof Name))return`"${a}${b.slice(1)}`}function strConcat(c1,c2){return c2.emptyStr()?c1:c1.emptyStr()?c2:str`${c1}${c2}`}exports$1.strConcat=strConcat;function interpolate(x){return typeof x=="number"||typeof x=="boolean"||x===null?x:safeStringify(Array.isArray(x)?x.join(","):x)}function stringify2(x){return new _Code(safeStringify(x))}exports$1.stringify=stringify2;function safeStringify(x){return JSON.stringify(
x).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}exports$1.safeStringify=safeStringify;function getProperty(key2){return typeof key2=="string"&&exports$1.IDENTIFIER.test(key2)?new _Code(`.${key2}`):_`[${key2}]`}exports$1.getProperty=getProperty;function getEsmExportName(key2){if(typeof key2=="string"&&exports$1.IDENTIFIER.test(key2))return new _Code(`${key2}`);throw new Error(`CodeGen: invalid export name: ${key2}, use explicit $id name mapping`)}exports$1.getEsmExportName=getEsmExportName;
function regexpCode(rx){return new _Code(rx.toString())}exports$1.regexpCode=regexpCode})(code$6)),code$6}var scope$1={},hasRequiredScope$1;function requireScope$1(){return hasRequiredScope$1||(hasRequiredScope$1=1,(function(exports$1){Object.defineProperty(exports$1,"__esModule",{value:!0}),exports$1.ValueScope=exports$1.ValueScopeName=exports$1.Scope=exports$1.varKinds=exports$1.UsedValueState=void 0;const code_1=requireCode$3();class ValueError extends Error{constructor(name){super(`CodeGen: \
"code" for ${name} not defined`),this.value=name.value}}var UsedValueState;(function(UsedValueState2){UsedValueState2[UsedValueState2.Started=0]="Started",UsedValueState2[UsedValueState2.Completed=1]="Completed"})(UsedValueState||(exports$1.UsedValueState=UsedValueState={})),exports$1.varKinds={const:new code_1.Name("const"),let:new code_1.Name("let"),var:new code_1.Name("var")};class Scope{constructor({prefixes,parent}={}){this._names={},this._prefixes=prefixes,this._parent=parent}toName(nameOrPrefix){
return nameOrPrefix instanceof code_1.Name?nameOrPrefix:this.name(nameOrPrefix)}name(prefix){return new code_1.Name(this._newName(prefix))}_newName(prefix){const ng=this._names[prefix]||this._nameGroup(prefix);return`${prefix}${ng.index++}`}_nameGroup(prefix){var _a2,_b;if(!((_b=(_a2=this._parent)===null||_a2===void 0?void 0:_a2._prefixes)===null||_b===void 0)&&_b.has(prefix)||this._prefixes&&!this._prefixes.has(prefix))throw new Error(`CodeGen: prefix "${prefix}" is not allowed in this scope`);
return this._names[prefix]={prefix,index:0}}}exports$1.Scope=Scope;class ValueScopeName extends code_1.Name{constructor(prefix,nameStr){super(nameStr),this.prefix=prefix}setValue(value,{property,itemIndex}){this.value=value,this.scopePath=(0,code_1._)`.${new code_1.Name(property)}[${itemIndex}]`}}exports$1.ValueScopeName=ValueScopeName;const line=(0,code_1._)`\n`;class ValueScope extends Scope{constructor(opts){super(opts),this._values={},this._scope=opts.scope,this.opts={...opts,_n:opts.lines?line:
code_1.nil}}get(){return this._scope}name(prefix){return new ValueScopeName(prefix,this._newName(prefix))}value(nameOrPrefix,value){var _a2;if(value.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const name=this.toName(nameOrPrefix),{prefix}=name,valueKey=(_a2=value.key)!==null&&_a2!==void 0?_a2:value.ref;let vs=this._values[prefix];if(vs){const _name=vs.get(valueKey);if(_name)return _name}else vs=this._values[prefix]=new Map;vs.set(valueKey,name);const s2=this._scope[prefix]||
(this._scope[prefix]=[]),itemIndex=s2.length;return s2[itemIndex]=value.ref,name.setValue(value,{property:prefix,itemIndex}),name}getValue(prefix,keyOrRef){const vs=this._values[prefix];if(vs)return vs.get(keyOrRef)}scopeRefs(scopeName,values=this._values){return this._reduceValues(values,name=>{if(name.scopePath===void 0)throw new Error(`CodeGen: name "${name}" has no value`);return(0,code_1._)`${scopeName}${name.scopePath}`})}scopeCode(values=this._values,usedValues,getCode){return this._reduceValues(
values,name=>{if(name.value===void 0)throw new Error(`CodeGen: name "${name}" has no value`);return name.value.code},usedValues,getCode)}_reduceValues(values,valueCode,usedValues={},getCode){let code2=code_1.nil;for(const prefix in values){const vs=values[prefix];if(!vs)continue;const nameSet=usedValues[prefix]=usedValues[prefix]||new Map;vs.forEach(name=>{if(nameSet.has(name))return;nameSet.set(name,UsedValueState.Started);let c2=valueCode(name);if(c2){const def=this.opts.es5?exports$1.varKinds.
var:exports$1.varKinds.const;code2=(0,code_1._)`${code2}${def} ${name} = ${c2};${this.opts._n}`}else if(c2=getCode?.(name))code2=(0,code_1._)`${code2}${c2}${this.opts._n}`;else throw new ValueError(name);nameSet.set(name,UsedValueState.Completed)})}return code2}}exports$1.ValueScope=ValueScope})(scope$1)),scope$1}var hasRequiredCodegen$1;function requireCodegen$1(){return hasRequiredCodegen$1||(hasRequiredCodegen$1=1,(function(exports$1){Object.defineProperty(exports$1,"__esModule",{value:!0}),exports$1.
or=exports$1.and=exports$1.not=exports$1.CodeGen=exports$1.operators=exports$1.varKinds=exports$1.ValueScopeName=exports$1.ValueScope=exports$1.Scope=exports$1.Name=exports$1.regexpCode=exports$1.stringify=exports$1.getProperty=exports$1.nil=exports$1.strConcat=exports$1.str=exports$1._=void 0;const code_1=requireCode$3(),scope_1=requireScope$1();var code_2=requireCode$3();Object.defineProperty(exports$1,"_",{enumerable:!0,get:function(){return code_2._}}),Object.defineProperty(exports$1,"str",{
enumerable:!0,get:function(){return code_2.str}}),Object.defineProperty(exports$1,"strConcat",{enumerable:!0,get:function(){return code_2.strConcat}}),Object.defineProperty(exports$1,"nil",{enumerable:!0,get:function(){return code_2.nil}}),Object.defineProperty(exports$1,"getProperty",{enumerable:!0,get:function(){return code_2.getProperty}}),Object.defineProperty(exports$1,"stringify",{enumerable:!0,get:function(){return code_2.stringify}}),Object.defineProperty(exports$1,"regexpCode",{enumerable:!0,
get:function(){return code_2.regexpCode}}),Object.defineProperty(exports$1,"Name",{enumerable:!0,get:function(){return code_2.Name}});var scope_2=requireScope$1();Object.defineProperty(exports$1,"Scope",{enumerable:!0,get:function(){return scope_2.Scope}}),Object.defineProperty(exports$1,"ValueScope",{enumerable:!0,get:function(){return scope_2.ValueScope}}),Object.defineProperty(exports$1,"ValueScopeName",{enumerable:!0,get:function(){return scope_2.ValueScopeName}}),Object.defineProperty(exports$1,
"varKinds",{enumerable:!0,get:function(){return scope_2.varKinds}}),exports$1.operators={GT:new code_1._Code(">"),GTE:new code_1._Code(">="),LT:new code_1._Code("<"),LTE:new code_1._Code("<="),EQ:new code_1._Code("==="),NEQ:new code_1._Code("!=="),NOT:new code_1._Code("!"),OR:new code_1._Code("||"),AND:new code_1._Code("&&"),ADD:new code_1._Code("+")};class Node2{optimizeNodes(){return this}optimizeNames(_names,_constants){return this}}class Def extends Node2{constructor(varKind,name,rhs){super(),
this.varKind=varKind,this.name=name,this.rhs=rhs}render({es5,_n}){const varKind=es5?scope_1.varKinds.var:this.varKind,rhs=this.rhs===void 0?"":` = ${this.rhs}`;return`${varKind} ${this.name}${rhs};`+_n}optimizeNames(names2,constants2){if(names2[this.name.str])return this.rhs&&(this.rhs=optimizeExpr(this.rhs,names2,constants2)),this}get names(){return this.rhs instanceof code_1._CodeOrName?this.rhs.names:{}}}class Assign extends Node2{constructor(lhs,rhs,sideEffects){super(),this.lhs=lhs,this.rhs=
rhs,this.sideEffects=sideEffects}render({_n}){return`${this.lhs} = ${this.rhs};`+_n}optimizeNames(names2,constants2){if(!(this.lhs instanceof code_1.Name&&!names2[this.lhs.str]&&!this.sideEffects))return this.rhs=optimizeExpr(this.rhs,names2,constants2),this}get names(){const names2=this.lhs instanceof code_1.Name?{}:{...this.lhs.names};return addExprNames(names2,this.rhs)}}class AssignOp extends Assign{constructor(lhs,op2,rhs,sideEffects){super(lhs,rhs,sideEffects),this.op=op2}render({_n}){return`${this.
lhs} ${this.op}= ${this.rhs};`+_n}}class Label2 extends Node2{constructor(label){super(),this.label=label,this.names={}}render({_n}){return`${this.label}:`+_n}}class Break extends Node2{constructor(label){super(),this.label=label,this.names={}}render({_n}){return`break${this.label?` ${this.label}`:""};`+_n}}class Throw extends Node2{constructor(error2){super(),this.error=error2}render({_n}){return`throw ${this.error};`+_n}get names(){return this.error.names}}class AnyCode extends Node2{constructor(code2){
super(),this.code=code2}render({_n}){return`${this.code};`+_n}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(names2,constants2){return this.code=optimizeExpr(this.code,names2,constants2),this}get names(){return this.code instanceof code_1._CodeOrName?this.code.names:{}}}class ParentNode extends Node2{constructor(nodes2=[]){super(),this.nodes=nodes2}render(opts){return this.nodes.reduce((code2,n)=>code2+n.render(opts),"")}optimizeNodes(){const{nodes:nodes2}=this;let i=nodes2.length;
for(;i--;){const n=nodes2[i].optimizeNodes();Array.isArray(n)?nodes2.splice(i,1,...n):n?nodes2[i]=n:nodes2.splice(i,1)}return nodes2.length>0?this:void 0}optimizeNames(names2,constants2){const{nodes:nodes2}=this;let i=nodes2.length;for(;i--;){const n=nodes2[i];n.optimizeNames(names2,constants2)||(subtractNames(names2,n.names),nodes2.splice(i,1))}return nodes2.length>0?this:void 0}get names(){return this.nodes.reduce((names2,n)=>addNames(names2,n.names),{})}}class BlockNode extends ParentNode{render(opts){
return"{"+opts._n+super.render(opts)+"}"+opts._n}}class Root2 extends ParentNode{}class Else extends BlockNode{}Else.kind="else";class If extends BlockNode{constructor(condition,nodes2){super(nodes2),this.condition=condition}render(opts){let code2=`if(${this.condition})`+super.render(opts);return this.else&&(code2+="else "+this.else.render(opts)),code2}optimizeNodes(){super.optimizeNodes();const cond=this.condition;if(cond===!0)return this.nodes;let e=this.else;if(e){const ns=e.optimizeNodes();e=
this.else=Array.isArray(ns)?new Else(ns):ns}if(e)return cond===!1?e instanceof If?e:e.nodes:this.nodes.length?this:new If(not2(cond),e instanceof If?[e]:e.nodes);if(!(cond===!1||!this.nodes.length))return this}optimizeNames(names2,constants2){var _a2;if(this.else=(_a2=this.else)===null||_a2===void 0?void 0:_a2.optimizeNames(names2,constants2),!!(super.optimizeNames(names2,constants2)||this.else))return this.condition=optimizeExpr(this.condition,names2,constants2),this}get names(){const names2=super.
names;return addExprNames(names2,this.condition),this.else&&addNames(names2,this.else.names),names2}}If.kind="if";class For extends BlockNode{}For.kind="for";class ForLoop extends For{constructor(iteration){super(),this.iteration=iteration}render(opts){return`for(${this.iteration})`+super.render(opts)}optimizeNames(names2,constants2){if(super.optimizeNames(names2,constants2))return this.iteration=optimizeExpr(this.iteration,names2,constants2),this}get names(){return addNames(super.names,this.iteration.
names)}}class ForRange extends For{constructor(varKind,name,from,to){super(),this.varKind=varKind,this.name=name,this.from=from,this.to=to}render(opts){const varKind=opts.es5?scope_1.varKinds.var:this.varKind,{name,from,to}=this;return`for(${varKind} ${name}=${from}; ${name}<${to}; ${name}++)`+super.render(opts)}get names(){const names2=addExprNames(super.names,this.from);return addExprNames(names2,this.to)}}class ForIter extends For{constructor(loop2,varKind,name,iterable){super(),this.loop=loop2,
this.varKind=varKind,this.name=name,this.iterable=iterable}render(opts){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(opts)}optimizeNames(names2,constants2){if(super.optimizeNames(names2,constants2))return this.iterable=optimizeExpr(this.iterable,names2,constants2),this}get names(){return addNames(super.names,this.iterable.names)}}class Func extends BlockNode{constructor(name,args,async){super(),this.name=name,this.args=args,this.async=async}render(opts){return`${this.
async?"async ":""}function ${this.name}(${this.args})`+super.render(opts)}}Func.kind="func";class Return extends ParentNode{render(opts){return"return "+super.render(opts)}}Return.kind="return";class Try extends BlockNode{render(opts){let code2="try"+super.render(opts);return this.catch&&(code2+=this.catch.render(opts)),this.finally&&(code2+=this.finally.render(opts)),code2}optimizeNodes(){var _a2,_b;return super.optimizeNodes(),(_a2=this.catch)===null||_a2===void 0||_a2.optimizeNodes(),(_b=this.
finally)===null||_b===void 0||_b.optimizeNodes(),this}optimizeNames(names2,constants2){var _a2,_b;return super.optimizeNames(names2,constants2),(_a2=this.catch)===null||_a2===void 0||_a2.optimizeNames(names2,constants2),(_b=this.finally)===null||_b===void 0||_b.optimizeNames(names2,constants2),this}get names(){const names2=super.names;return this.catch&&addNames(names2,this.catch.names),this.finally&&addNames(names2,this.finally.names),names2}}class Catch extends BlockNode{constructor(error2){super(),
this.error=error2}render(opts){return`catch(${this.error})`+super.render(opts)}}Catch.kind="catch";class Finally extends BlockNode{render(opts){return"finally"+super.render(opts)}}Finally.kind="finally";class CodeGen{constructor(extScope,opts={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...opts,_n:opts.lines?`
`:""},this._extScope=extScope,this._scope=new scope_1.Scope({parent:extScope}),this._nodes=[new Root2]}toString(){return this._root.render(this.opts)}name(prefix){return this._scope.name(prefix)}scopeName(prefix){return this._extScope.name(prefix)}scopeValue(prefixOrName,value){const name=this._extScope.value(prefixOrName,value);return(this._values[name.prefix]||(this._values[name.prefix]=new Set)).add(name),name}getScopeValue(prefix,keyOrRef){return this._extScope.getValue(prefix,keyOrRef)}scopeRefs(scopeName){
return this._extScope.scopeRefs(scopeName,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(varKind,nameOrPrefix,rhs,constant){const name=this._scope.toName(nameOrPrefix);return rhs!==void 0&&constant&&(this._constants[name.str]=rhs),this._leafNode(new Def(varKind,name,rhs)),name}const(nameOrPrefix,rhs,_constant){return this._def(scope_1.varKinds.const,nameOrPrefix,rhs,_constant)}let(nameOrPrefix,rhs,_constant){return this._def(scope_1.varKinds.let,nameOrPrefix,rhs,_constant)}var(nameOrPrefix,rhs,_constant){
return this._def(scope_1.varKinds.var,nameOrPrefix,rhs,_constant)}assign(lhs,rhs,sideEffects){return this._leafNode(new Assign(lhs,rhs,sideEffects))}add(lhs,rhs){return this._leafNode(new AssignOp(lhs,exports$1.operators.ADD,rhs))}code(c2){return typeof c2=="function"?c2():c2!==code_1.nil&&this._leafNode(new AnyCode(c2)),this}object(...keyValues){const code2=["{"];for(const[key2,value]of keyValues)code2.length>1&&code2.push(","),code2.push(key2),(key2!==value||this.opts.es5)&&(code2.push(":"),(0,code_1.
addCodeArg)(code2,value));return code2.push("}"),new code_1._Code(code2)}if(condition,thenBody,elseBody){if(this._blockNode(new If(condition)),thenBody&&elseBody)this.code(thenBody).else().code(elseBody).endIf();else if(thenBody)this.code(thenBody).endIf();else if(elseBody)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(condition){return this._elseNode(new If(condition))}else(){return this._elseNode(new Else)}endIf(){return this._endBlockNode(If,Else)}_for(node2,forBody){
return this._blockNode(node2),forBody&&this.code(forBody).endFor(),this}for(iteration,forBody){return this._for(new ForLoop(iteration),forBody)}forRange(nameOrPrefix,from,to,forBody,varKind=this.opts.es5?scope_1.varKinds.var:scope_1.varKinds.let){const name=this._scope.toName(nameOrPrefix);return this._for(new ForRange(varKind,name,from,to),()=>forBody(name))}forOf(nameOrPrefix,iterable,forBody,varKind=scope_1.varKinds.const){const name=this._scope.toName(nameOrPrefix);if(this.opts.es5){const arr=iterable instanceof
code_1.Name?iterable:this.var("_arr",iterable);return this.forRange("_i",0,(0,code_1._)`${arr}.length`,i=>{this.var(name,(0,code_1._)`${arr}[${i}]`),forBody(name)})}return this._for(new ForIter("of",varKind,name,iterable),()=>forBody(name))}forIn(nameOrPrefix,obj,forBody,varKind=this.opts.es5?scope_1.varKinds.var:scope_1.varKinds.const){if(this.opts.ownProperties)return this.forOf(nameOrPrefix,(0,code_1._)`Object.keys(${obj})`,forBody);const name=this._scope.toName(nameOrPrefix);return this._for(
new ForIter("in",varKind,name,obj),()=>forBody(name))}endFor(){return this._endBlockNode(For)}label(label){return this._leafNode(new Label2(label))}break(label){return this._leafNode(new Break(label))}return(value){const node2=new Return;if(this._blockNode(node2),this.code(value),node2.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Return)}try(tryBody,catchCode,finallyCode){if(!catchCode&&!finallyCode)throw new Error('CodeGen: "try" without "\
catch" and "finally"');const node2=new Try;if(this._blockNode(node2),this.code(tryBody),catchCode){const error2=this.name("e");this._currNode=node2.catch=new Catch(error2),catchCode(error2)}return finallyCode&&(this._currNode=node2.finally=new Finally,this.code(finallyCode)),this._endBlockNode(Catch,Finally)}throw(error2){return this._leafNode(new Throw(error2))}block(body2,nodeCount){return this._blockStarts.push(this._nodes.length),body2&&this.code(body2).endBlock(nodeCount),this}endBlock(nodeCount){
const len=this._blockStarts.pop();if(len===void 0)throw new Error("CodeGen: not in self-balancing block");const toClose=this._nodes.length-len;if(toClose<0||nodeCount!==void 0&&toClose!==nodeCount)throw new Error(`CodeGen: wrong number of nodes: ${toClose} vs ${nodeCount} expected`);return this._nodes.length=len,this}func(name,args=code_1.nil,async,funcBody){return this._blockNode(new Func(name,args,async)),funcBody&&this.code(funcBody).endFunc(),this}endFunc(){return this._endBlockNode(Func)}optimize(n=1){
for(;n-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(node2){return this._currNode.nodes.push(node2),this}_blockNode(node2){this._currNode.nodes.push(node2),this._nodes.push(node2)}_endBlockNode(N1,N2){const n=this._currNode;if(n instanceof N1||N2&&n instanceof N2)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${N2?`${N1.kind}/${N2.kind}`:N1.kind}"`)}_elseNode(node2){const n=this._currNode;if(!(n instanceof If))throw new Error(
'CodeGen: "else" without "if"');return this._currNode=n.else=node2,this}get _root(){return this._nodes[0]}get _currNode(){const ns=this._nodes;return ns[ns.length-1]}set _currNode(node2){const ns=this._nodes;ns[ns.length-1]=node2}}exports$1.CodeGen=CodeGen;function addNames(names2,from){for(const n in from)names2[n]=(names2[n]||0)+(from[n]||0);return names2}function addExprNames(names2,from){return from instanceof code_1._CodeOrName?addNames(names2,from.names):names2}function optimizeExpr(expr,names2,constants2){
if(expr instanceof code_1.Name)return replaceName(expr);if(!canOptimize(expr))return expr;return new code_1._Code(expr._items.reduce((items2,c2)=>(c2 instanceof code_1.Name&&(c2=replaceName(c2)),c2 instanceof code_1._Code?items2.push(...c2._items):items2.push(c2),items2),[]));function replaceName(n){const c2=constants2[n.str];return c2===void 0||names2[n.str]!==1?n:(delete names2[n.str],c2)}function canOptimize(e){return e instanceof code_1._Code&&e._items.some(c2=>c2 instanceof code_1.Name&&names2[c2.
str]===1&&constants2[c2.str]!==void 0)}}function subtractNames(names2,from){for(const n in from)names2[n]=(names2[n]||0)-(from[n]||0)}function not2(x){return typeof x=="boolean"||typeof x=="number"||x===null?!x:(0,code_1._)`!${par(x)}`}exports$1.not=not2;const andCode=mappend(exports$1.operators.AND);function and(...args){return args.reduce(andCode)}exports$1.and=and;const orCode=mappend(exports$1.operators.OR);function or(...args){return args.reduce(orCode)}exports$1.or=or;function mappend(op2){
return(x,y)=>x===code_1.nil?y:y===code_1.nil?x:(0,code_1._)`${par(x)} ${op2} ${par(y)}`}function par(x){return x instanceof code_1.Name?x:(0,code_1._)`(${x})`}})(codegen$1)),codegen$1}var util$1={},hasRequiredUtil$1;function requireUtil$1(){if(hasRequiredUtil$1)return util$1;hasRequiredUtil$1=1,Object.defineProperty(util$1,"__esModule",{value:!0}),util$1.checkStrictMode=util$1.getErrorPath=util$1.Type=util$1.useFunc=util$1.setEvaluated=util$1.evaluatedPropsToName=util$1.mergeEvaluated=util$1.eachItem=
util$1.unescapeJsonPointer=util$1.escapeJsonPointer=util$1.escapeFragment=util$1.unescapeFragment=util$1.schemaRefOrVal=util$1.schemaHasRulesButRef=util$1.schemaHasRules=util$1.checkUnknownRules=util$1.alwaysValidSchema=util$1.toHash=void 0;const codegen_1=requireCodegen$1(),code_1=requireCode$3();function toHash(arr){const hash2={};for(const item of arr)hash2[item]=!0;return hash2}util$1.toHash=toHash;function alwaysValidSchema(it,schema){return typeof schema=="boolean"?schema:Object.keys(schema).
length===0?!0:(checkUnknownRules(it,schema),!schemaHasRules(schema,it.self.RULES.all))}util$1.alwaysValidSchema=alwaysValidSchema;function checkUnknownRules(it,schema=it.schema){const{opts,self:self2}=it;if(!opts.strictSchema||typeof schema=="boolean")return;const rules2=self2.RULES.keywords;for(const key2 in schema)rules2[key2]||checkStrictMode(it,`unknown keyword: "${key2}"`)}util$1.checkUnknownRules=checkUnknownRules;function schemaHasRules(schema,rules2){if(typeof schema=="boolean")return!schema;
for(const key2 in schema)if(rules2[key2])return!0;return!1}util$1.schemaHasRules=schemaHasRules;function schemaHasRulesButRef(schema,RULES){if(typeof schema=="boolean")return!schema;for(const key2 in schema)if(key2!=="$ref"&&RULES.all[key2])return!0;return!1}util$1.schemaHasRulesButRef=schemaHasRulesButRef;function schemaRefOrVal({topSchemaRef,schemaPath},schema,keyword2,$data){if(!$data){if(typeof schema=="number"||typeof schema=="boolean")return schema;if(typeof schema=="string")return(0,codegen_1.
_)`${schema}`}return(0,codegen_1._)`${topSchemaRef}${schemaPath}${(0,codegen_1.getProperty)(keyword2)}`}util$1.schemaRefOrVal=schemaRefOrVal;function unescapeFragment(str){return unescapeJsonPointer(decodeURIComponent(str))}util$1.unescapeFragment=unescapeFragment;function escapeFragment(str){return encodeURIComponent(escapeJsonPointer(str))}util$1.escapeFragment=escapeFragment;function escapeJsonPointer(str){return typeof str=="number"?`${str}`:str.replace(/~/g,"~0").replace(/\//g,"~1")}util$1.
escapeJsonPointer=escapeJsonPointer;function unescapeJsonPointer(str){return str.replace(/~1/g,"/").replace(/~0/g,"~")}util$1.unescapeJsonPointer=unescapeJsonPointer;function eachItem(xs,f){if(Array.isArray(xs))for(const x of xs)f(x);else f(xs)}util$1.eachItem=eachItem;function makeMergeEvaluated({mergeNames,mergeToName,mergeValues:mergeValues2,resultToName}){return(gen,from,to,toName)=>{const res=to===void 0?from:to instanceof codegen_1.Name?(from instanceof codegen_1.Name?mergeNames(gen,from,to):
mergeToName(gen,from,to),to):from instanceof codegen_1.Name?(mergeToName(gen,to,from),from):mergeValues2(from,to);return toName===codegen_1.Name&&!(res instanceof codegen_1.Name)?resultToName(gen,res):res}}util$1.mergeEvaluated={props:makeMergeEvaluated({mergeNames:(gen,from,to)=>gen.if((0,codegen_1._)`${to} !== true && ${from} !== undefined`,()=>{gen.if((0,codegen_1._)`${from} === true`,()=>gen.assign(to,!0),()=>gen.assign(to,(0,codegen_1._)`${to} || {}`).code((0,codegen_1._)`Object.assign(${to}, ${from})`))}),
mergeToName:(gen,from,to)=>gen.if((0,codegen_1._)`${to} !== true`,()=>{from===!0?gen.assign(to,!0):(gen.assign(to,(0,codegen_1._)`${to} || {}`),setEvaluated(gen,to,from))}),mergeValues:(from,to)=>from===!0?!0:{...from,...to},resultToName:evaluatedPropsToName}),items:makeMergeEvaluated({mergeNames:(gen,from,to)=>gen.if((0,codegen_1._)`${to} !== true && ${from} !== undefined`,()=>gen.assign(to,(0,codegen_1._)`${from} === true ? true : ${to} > ${from} ? ${to} : ${from}`)),mergeToName:(gen,from,to)=>gen.
if((0,codegen_1._)`${to} !== true`,()=>gen.assign(to,from===!0?!0:(0,codegen_1._)`${to} > ${from} ? ${to} : ${from}`)),mergeValues:(from,to)=>from===!0?!0:Math.max(from,to),resultToName:(gen,items2)=>gen.var("items",items2)})};function evaluatedPropsToName(gen,ps){if(ps===!0)return gen.var("props",!0);const props=gen.var("props",(0,codegen_1._)`{}`);return ps!==void 0&&setEvaluated(gen,props,ps),props}util$1.evaluatedPropsToName=evaluatedPropsToName;function setEvaluated(gen,props,ps){Object.keys(
ps).forEach(p2=>gen.assign((0,codegen_1._)`${props}${(0,codegen_1.getProperty)(p2)}`,!0))}util$1.setEvaluated=setEvaluated;const snippets={};function useFunc(gen,f){return gen.scopeValue("func",{ref:f,code:snippets[f.code]||(snippets[f.code]=new code_1._Code(f.code))})}util$1.useFunc=useFunc;var Type;(function(Type2){Type2[Type2.Num=0]="Num",Type2[Type2.Str=1]="Str"})(Type||(util$1.Type=Type={}));function getErrorPath(dataProp,dataPropType,jsPropertySyntax){if(dataProp instanceof codegen_1.Name){
const isNumber2=dataPropType===Type.Num;return jsPropertySyntax?isNumber2?(0,codegen_1._)`"[" + ${dataProp} + "]"`:(0,codegen_1._)`"['" + ${dataProp} + "']"`:isNumber2?(0,codegen_1._)`"/" + ${dataProp}`:(0,codegen_1._)`"/" + ${dataProp}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return jsPropertySyntax?(0,codegen_1.getProperty)(dataProp).toString():"/"+escapeJsonPointer(dataProp)}util$1.getErrorPath=getErrorPath;function checkStrictMode(it,msg,mode=it.opts.strictSchema){if(mode){if(msg=`strict m\
ode: ${msg}`,mode===!0)throw new Error(msg);it.self.logger.warn(msg)}}return util$1.checkStrictMode=checkStrictMode,util$1}var names$1={},hasRequiredNames$1;function requireNames$1(){if(hasRequiredNames$1)return names$1;hasRequiredNames$1=1,Object.defineProperty(names$1,"__esModule",{value:!0});const codegen_1=requireCodegen$1(),names2={data:new codegen_1.Name("data"),valCxt:new codegen_1.Name("valCxt"),instancePath:new codegen_1.Name("instancePath"),parentData:new codegen_1.Name("parentData"),parentDataProperty:new codegen_1.
Name("parentDataProperty"),rootData:new codegen_1.Name("rootData"),dynamicAnchors:new codegen_1.Name("dynamicAnchors"),vErrors:new codegen_1.Name("vErrors"),errors:new codegen_1.Name("errors"),this:new codegen_1.Name("this"),self:new codegen_1.Name("self"),scope:new codegen_1.Name("scope"),json:new codegen_1.Name("json"),jsonPos:new codegen_1.Name("jsonPos"),jsonLen:new codegen_1.Name("jsonLen"),jsonPart:new codegen_1.Name("jsonPart")};return names$1.default=names2,names$1}var hasRequiredErrors$1;
function requireErrors$1(){return hasRequiredErrors$1||(hasRequiredErrors$1=1,(function(exports$1){Object.defineProperty(exports$1,"__esModule",{value:!0}),exports$1.extendErrors=exports$1.resetErrorsCount=exports$1.reportExtraError=exports$1.reportError=exports$1.keyword$DataError=exports$1.keywordError=void 0;const codegen_1=requireCodegen$1(),util_1=requireUtil$1(),names_1=requireNames$1();exports$1.keywordError={message:({keyword:keyword2})=>(0,codegen_1.str)`must pass "${keyword2}" keyword validation`},
exports$1.keyword$DataError={message:({keyword:keyword2,schemaType})=>schemaType?(0,codegen_1.str)`"${keyword2}" keyword must be ${schemaType} ($data)`:(0,codegen_1.str)`"${keyword2}" keyword is invalid ($data)`};function reportError(cxt,error2=exports$1.keywordError,errorPaths,overrideAllErrors){const{it}=cxt,{gen,compositeRule,allErrors}=it,errObj=errorObjectCode(cxt,error2,errorPaths);overrideAllErrors??(compositeRule||allErrors)?addError(gen,errObj):returnErrors(it,(0,codegen_1._)`[${errObj}]`)}
exports$1.reportError=reportError;function reportExtraError(cxt,error2=exports$1.keywordError,errorPaths){const{it}=cxt,{gen,compositeRule,allErrors}=it,errObj=errorObjectCode(cxt,error2,errorPaths);addError(gen,errObj),compositeRule||allErrors||returnErrors(it,names_1.default.vErrors)}exports$1.reportExtraError=reportExtraError;function resetErrorsCount(gen,errsCount){gen.assign(names_1.default.errors,errsCount),gen.if((0,codegen_1._)`${names_1.default.vErrors} !== null`,()=>gen.if(errsCount,()=>gen.
assign((0,codegen_1._)`${names_1.default.vErrors}.length`,errsCount),()=>gen.assign(names_1.default.vErrors,null)))}exports$1.resetErrorsCount=resetErrorsCount;function extendErrors({gen,keyword:keyword2,schemaValue,data,errsCount,it}){if(errsCount===void 0)throw new Error("ajv implementation error");const err=gen.name("err");gen.forRange("i",errsCount,names_1.default.errors,i=>{gen.const(err,(0,codegen_1._)`${names_1.default.vErrors}[${i}]`),gen.if((0,codegen_1._)`${err}.instancePath === undefined`,
()=>gen.assign((0,codegen_1._)`${err}.instancePath`,(0,codegen_1.strConcat)(names_1.default.instancePath,it.errorPath))),gen.assign((0,codegen_1._)`${err}.schemaPath`,(0,codegen_1.str)`${it.errSchemaPath}/${keyword2}`),it.opts.verbose&&(gen.assign((0,codegen_1._)`${err}.schema`,schemaValue),gen.assign((0,codegen_1._)`${err}.data`,data))})}exports$1.extendErrors=extendErrors;function addError(gen,errObj){const err=gen.const("err",errObj);gen.if((0,codegen_1._)`${names_1.default.vErrors} === null`,
()=>gen.assign(names_1.default.vErrors,(0,codegen_1._)`[${err}]`),(0,codegen_1._)`${names_1.default.vErrors}.push(${err})`),gen.code((0,codegen_1._)`${names_1.default.errors}++`)}function returnErrors(it,errs){const{gen,validateName,schemaEnv}=it;schemaEnv.$async?gen.throw((0,codegen_1._)`new ${it.ValidationError}(${errs})`):(gen.assign((0,codegen_1._)`${validateName}.errors`,errs),gen.return(!1))}const E={keyword:new codegen_1.Name("keyword"),schemaPath:new codegen_1.Name("schemaPath"),params:new codegen_1.
Name("params"),propertyName:new codegen_1.Name("propertyName"),message:new codegen_1.Name("message"),schema:new codegen_1.Name("schema"),parentSchema:new codegen_1.Name("parentSchema")};function errorObjectCode(cxt,error2,errorPaths){const{createErrors}=cxt.it;return createErrors===!1?(0,codegen_1._)`{}`:errorObject(cxt,error2,errorPaths)}function errorObject(cxt,error2,errorPaths={}){const{gen,it}=cxt,keyValues=[errorInstancePath(it,errorPaths),errorSchemaPath(cxt,errorPaths)];return extraErrorProps(
cxt,error2,keyValues),gen.object(...keyValues)}function errorInstancePath({errorPath},{instancePath}){const instPath=instancePath?(0,codegen_1.str)`${errorPath}${(0,util_1.getErrorPath)(instancePath,util_1.Type.Str)}`:errorPath;return[names_1.default.instancePath,(0,codegen_1.strConcat)(names_1.default.instancePath,instPath)]}function errorSchemaPath({keyword:keyword2,it:{errSchemaPath}},{schemaPath,parentSchema}){let schPath=parentSchema?errSchemaPath:(0,codegen_1.str)`${errSchemaPath}/${keyword2}`;
return schemaPath&&(schPath=(0,codegen_1.str)`${schPath}${(0,util_1.getErrorPath)(schemaPath,util_1.Type.Str)}`),[E.schemaPath,schPath]}function extraErrorProps(cxt,{params,message},keyValues){const{keyword:keyword2,data,schemaValue,it}=cxt,{opts,propertyName,topSchemaRef,schemaPath}=it;keyValues.push([E.keyword,keyword2],[E.params,typeof params=="function"?params(cxt):params||(0,codegen_1._)`{}`]),opts.messages&&keyValues.push([E.message,typeof message=="function"?message(cxt):message]),opts.verbose&&
keyValues.push([E.schema,schemaValue],[E.parentSchema,(0,codegen_1._)`${topSchemaRef}${schemaPath}`],[names_1.default.data,data]),propertyName&&keyValues.push([E.propertyName,propertyName])}})(errors$1)),errors$1}var hasRequiredBoolSchema$1;function requireBoolSchema$1(){if(hasRequiredBoolSchema$1)return boolSchema$1;hasRequiredBoolSchema$1=1,Object.defineProperty(boolSchema$1,"__esModule",{value:!0}),boolSchema$1.boolOrEmptySchema=boolSchema$1.topBoolOrEmptySchema=void 0;const errors_1=requireErrors$1(),
codegen_1=requireCodegen$1(),names_1=requireNames$1(),boolError={message:"boolean schema is false"};function topBoolOrEmptySchema(it){const{gen,schema,validateName}=it;schema===!1?falseSchemaError(it,!1):typeof schema=="object"&&schema.$async===!0?gen.return(names_1.default.data):(gen.assign((0,codegen_1._)`${validateName}.errors`,null),gen.return(!0))}boolSchema$1.topBoolOrEmptySchema=topBoolOrEmptySchema;function boolOrEmptySchema(it,valid2){const{gen,schema}=it;schema===!1?(gen.var(valid2,!1),
falseSchemaError(it)):gen.var(valid2,!0)}boolSchema$1.boolOrEmptySchema=boolOrEmptySchema;function falseSchemaError(it,overrideAllErrors){const{gen,data}=it,cxt={gen,keyword:"false schema",data,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it};(0,errors_1.reportError)(cxt,boolError,void 0,overrideAllErrors)}return boolSchema$1}var dataType$1={},rules$1={},hasRequiredRules$1;function requireRules$1(){if(hasRequiredRules$1)return rules$1;hasRequiredRules$1=1,Object.defineProperty(rules$1,"__esM\
odule",{value:!0}),rules$1.getRules=rules$1.isJSONType=void 0;const _jsonTypes=["string","number","integer","boolean","null","object","array"],jsonTypes=new Set(_jsonTypes);function isJSONType(x){return typeof x=="string"&&jsonTypes.has(x)}rules$1.isJSONType=isJSONType;function getRules(){const groups={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...groups,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},
groups.number,groups.string,groups.array,groups.object],post:{rules:[]},all:{},keywords:{}}}return rules$1.getRules=getRules,rules$1}var applicability$1={},hasRequiredApplicability$1;function requireApplicability$1(){if(hasRequiredApplicability$1)return applicability$1;hasRequiredApplicability$1=1,Object.defineProperty(applicability$1,"__esModule",{value:!0}),applicability$1.shouldUseRule=applicability$1.shouldUseGroup=applicability$1.schemaHasRulesForType=void 0;function schemaHasRulesForType({
schema,self:self2},type2){const group=self2.RULES.types[type2];return group&&group!==!0&&shouldUseGroup(schema,group)}applicability$1.schemaHasRulesForType=schemaHasRulesForType;function shouldUseGroup(schema,group){return group.rules.some(rule=>shouldUseRule(schema,rule))}applicability$1.shouldUseGroup=shouldUseGroup;function shouldUseRule(schema,rule){var _a2;return schema[rule.keyword]!==void 0||((_a2=rule.definition.implements)===null||_a2===void 0?void 0:_a2.some(kwd=>schema[kwd]!==void 0))}
return applicability$1.shouldUseRule=shouldUseRule,applicability$1}var hasRequiredDataType$1;function requireDataType$1(){if(hasRequiredDataType$1)return dataType$1;hasRequiredDataType$1=1,Object.defineProperty(dataType$1,"__esModule",{value:!0}),dataType$1.reportTypeError=dataType$1.checkDataTypes=dataType$1.checkDataType=dataType$1.coerceAndCheckDataType=dataType$1.getJSONTypes=dataType$1.getSchemaTypes=dataType$1.DataType=void 0;const rules_1=requireRules$1(),applicability_1=requireApplicability$1(),
errors_1=requireErrors$1(),codegen_1=requireCodegen$1(),util_1=requireUtil$1();var DataType;(function(DataType2){DataType2[DataType2.Correct=0]="Correct",DataType2[DataType2.Wrong=1]="Wrong"})(DataType||(dataType$1.DataType=DataType={}));function getSchemaTypes(schema){const types2=getJSONTypes(schema.type);if(types2.includes("null")){if(schema.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!types2.length&&schema.nullable!==void 0)throw new Error('"nullable" cann\
ot be used without "type"');schema.nullable===!0&&types2.push("null")}return types2}dataType$1.getSchemaTypes=getSchemaTypes;function getJSONTypes(ts){const types2=Array.isArray(ts)?ts:ts?[ts]:[];if(types2.every(rules_1.isJSONType))return types2;throw new Error("type must be JSONType or JSONType[]: "+types2.join(","))}dataType$1.getJSONTypes=getJSONTypes;function coerceAndCheckDataType(it,types2){const{gen,data,opts}=it,coerceTo=coerceToTypes(types2,opts.coerceTypes),checkTypes=types2.length>0&&
!(coerceTo.length===0&&types2.length===1&&(0,applicability_1.schemaHasRulesForType)(it,types2[0]));if(checkTypes){const wrongType=checkDataTypes(types2,data,opts.strictNumbers,DataType.Wrong);gen.if(wrongType,()=>{coerceTo.length?coerceData(it,types2,coerceTo):reportTypeError(it)})}return checkTypes}dataType$1.coerceAndCheckDataType=coerceAndCheckDataType;const COERCIBLE=new Set(["string","number","integer","boolean","null"]);function coerceToTypes(types2,coerceTypes){return coerceTypes?types2.filter(
t=>COERCIBLE.has(t)||coerceTypes==="array"&&t==="array"):[]}function coerceData(it,types2,coerceTo){const{gen,data,opts}=it,dataType2=gen.let("dataType",(0,codegen_1._)`typeof ${data}`),coerced=gen.let("coerced",(0,codegen_1._)`undefined`);opts.coerceTypes==="array"&&gen.if((0,codegen_1._)`${dataType2} == 'object' && Array.isArray(${data}) && ${data}.length == 1`,()=>gen.assign(data,(0,codegen_1._)`${data}[0]`).assign(dataType2,(0,codegen_1._)`typeof ${data}`).if(checkDataTypes(types2,data,opts.
strictNumbers),()=>gen.assign(coerced,data))),gen.if((0,codegen_1._)`${coerced} !== undefined`);for(const t of coerceTo)(COERCIBLE.has(t)||t==="array"&&opts.coerceTypes==="array")&&coerceSpecificType(t);gen.else(),reportTypeError(it),gen.endIf(),gen.if((0,codegen_1._)`${coerced} !== undefined`,()=>{gen.assign(data,coerced),assignParentData(it,coerced)});function coerceSpecificType(t){switch(t){case"string":gen.elseIf((0,codegen_1._)`${dataType2} == "number" || ${dataType2} == "boolean"`).assign(
coerced,(0,codegen_1._)`"" + ${data}`).elseIf((0,codegen_1._)`${data} === null`).assign(coerced,(0,codegen_1._)`""`);return;case"number":gen.elseIf((0,codegen_1._)`${dataType2} == "boolean" || ${data} === null
              || (${dataType2} == "string" && ${data} && ${data} == +${data})`).assign(coerced,(0,codegen_1._)`+${data}`);return;case"integer":gen.elseIf((0,codegen_1._)`${dataType2} === "boolean" || ${data} === null
              || (${dataType2} === "string" && ${data} && ${data} == +${data} && !(${data} % 1))`).assign(coerced,(0,codegen_1._)`+${data}`);return;case"boolean":gen.elseIf((0,codegen_1._)`${data} === "false" || ${data} === 0 || ${data} === null`).assign(coerced,!1).elseIf((0,codegen_1._)`${data} === "true" || ${data} === 1`).assign(coerced,!0);return;case"null":gen.elseIf((0,codegen_1._)`${data} === "" || ${data} === 0 || ${data} === false`),gen.assign(coerced,null);return;case"array":gen.elseIf(
(0,codegen_1._)`${dataType2} === "string" || ${dataType2} === "number"
              || ${dataType2} === "boolean" || ${data} === null`).assign(coerced,(0,codegen_1._)`[${data}]`)}}}function assignParentData({gen,parentData,parentDataProperty},expr){gen.if((0,codegen_1._)`${parentData} !== undefined`,()=>gen.assign((0,codegen_1._)`${parentData}[${parentDataProperty}]`,expr))}function checkDataType(dataType2,data,strictNums,correct=DataType.Correct){const EQ=correct===DataType.Correct?codegen_1.operators.EQ:codegen_1.operators.NEQ;let cond;switch(dataType2){case"nul\
l":return(0,codegen_1._)`${data} ${EQ} null`;case"array":cond=(0,codegen_1._)`Array.isArray(${data})`;break;case"object":cond=(0,codegen_1._)`${data} && typeof ${data} == "object" && !Array.isArray(${data})`;break;case"integer":cond=numCond((0,codegen_1._)`!(${data} % 1) && !isNaN(${data})`);break;case"number":cond=numCond();break;default:return(0,codegen_1._)`typeof ${data} ${EQ} ${dataType2}`}return correct===DataType.Correct?cond:(0,codegen_1.not)(cond);function numCond(_cond=codegen_1.nil){return(0,codegen_1.
and)((0,codegen_1._)`typeof ${data} == "number"`,_cond,strictNums?(0,codegen_1._)`isFinite(${data})`:codegen_1.nil)}}dataType$1.checkDataType=checkDataType;function checkDataTypes(dataTypes,data,strictNums,correct){if(dataTypes.length===1)return checkDataType(dataTypes[0],data,strictNums,correct);let cond;const types2=(0,util_1.toHash)(dataTypes);if(types2.array&&types2.object){const notObj=(0,codegen_1._)`typeof ${data} != "object"`;cond=types2.null?notObj:(0,codegen_1._)`!${data} || ${notObj}`,
delete types2.null,delete types2.array,delete types2.object}else cond=codegen_1.nil;types2.number&&delete types2.integer;for(const t in types2)cond=(0,codegen_1.and)(cond,checkDataType(t,data,strictNums,correct));return cond}dataType$1.checkDataTypes=checkDataTypes;const typeError={message:({schema})=>`must be ${schema}`,params:({schema,schemaValue})=>typeof schema=="string"?(0,codegen_1._)`{type: ${schema}}`:(0,codegen_1._)`{type: ${schemaValue}}`};function reportTypeError(it){const cxt=getTypeErrorContext(
it);(0,errors_1.reportError)(cxt,typeError)}dataType$1.reportTypeError=reportTypeError;function getTypeErrorContext(it){const{gen,data,schema}=it,schemaCode=(0,util_1.schemaRefOrVal)(it,schema,"type");return{gen,keyword:"type",data,schema:schema.type,schemaCode,schemaValue:schemaCode,parentSchema:schema,params:{},it}}return dataType$1}var defaults$1={},hasRequiredDefaults$1;function requireDefaults$1(){if(hasRequiredDefaults$1)return defaults$1;hasRequiredDefaults$1=1,Object.defineProperty(defaults$1,
"__esModule",{value:!0}),defaults$1.assignDefaults=void 0;const codegen_1=requireCodegen$1(),util_1=requireUtil$1();function assignDefaults(it,ty){const{properties:properties2,items:items2}=it.schema;if(ty==="object"&&properties2)for(const key2 in properties2)assignDefault(it,key2,properties2[key2].default);else ty==="array"&&Array.isArray(items2)&&items2.forEach((sch,i)=>assignDefault(it,i,sch.default))}defaults$1.assignDefaults=assignDefaults;function assignDefault(it,prop2,defaultValue){const{
gen,compositeRule,data,opts}=it;if(defaultValue===void 0)return;const childData=(0,codegen_1._)`${data}${(0,codegen_1.getProperty)(prop2)}`;if(compositeRule){(0,util_1.checkStrictMode)(it,`default is ignored for: ${childData}`);return}let condition=(0,codegen_1._)`${childData} === undefined`;opts.useDefaults==="empty"&&(condition=(0,codegen_1._)`${condition} || ${childData} === null || ${childData} === ""`),gen.if(condition,(0,codegen_1._)`${childData} = ${(0,codegen_1.stringify)(defaultValue)}`)}
return defaults$1}var keyword$1={},code$5={},hasRequiredCode$2;function requireCode$2(){if(hasRequiredCode$2)return code$5;hasRequiredCode$2=1,Object.defineProperty(code$5,"__esModule",{value:!0}),code$5.validateUnion=code$5.validateArray=code$5.usePattern=code$5.callValidateCode=code$5.schemaProperties=code$5.allSchemaProperties=code$5.noPropertyInData=code$5.propertyInData=code$5.isOwnProperty=code$5.hasPropFunc=code$5.reportMissingProp=code$5.checkMissingProp=code$5.checkReportMissingProp=void 0;
const codegen_1=requireCodegen$1(),util_1=requireUtil$1(),names_1=requireNames$1(),util_2=requireUtil$1();function checkReportMissingProp(cxt,prop2){const{gen,data,it}=cxt;gen.if(noPropertyInData(gen,data,prop2,it.opts.ownProperties),()=>{cxt.setParams({missingProperty:(0,codegen_1._)`${prop2}`},!0),cxt.error()})}code$5.checkReportMissingProp=checkReportMissingProp;function checkMissingProp({gen,data,it:{opts}},properties2,missing){return(0,codegen_1.or)(...properties2.map(prop2=>(0,codegen_1.and)(
noPropertyInData(gen,data,prop2,opts.ownProperties),(0,codegen_1._)`${missing} = ${prop2}`)))}code$5.checkMissingProp=checkMissingProp;function reportMissingProp(cxt,missing){cxt.setParams({missingProperty:missing},!0),cxt.error()}code$5.reportMissingProp=reportMissingProp;function hasPropFunc(gen){return gen.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,codegen_1._)`Object.prototype.hasOwnProperty`})}code$5.hasPropFunc=hasPropFunc;function isOwnProperty(gen,data,property){return(0,codegen_1.
_)`${hasPropFunc(gen)}.call(${data}, ${property})`}code$5.isOwnProperty=isOwnProperty;function propertyInData(gen,data,property,ownProperties){const cond=(0,codegen_1._)`${data}${(0,codegen_1.getProperty)(property)} !== undefined`;return ownProperties?(0,codegen_1._)`${cond} && ${isOwnProperty(gen,data,property)}`:cond}code$5.propertyInData=propertyInData;function noPropertyInData(gen,data,property,ownProperties){const cond=(0,codegen_1._)`${data}${(0,codegen_1.getProperty)(property)} === undefined`;
return ownProperties?(0,codegen_1.or)(cond,(0,codegen_1.not)(isOwnProperty(gen,data,property))):cond}code$5.noPropertyInData=noPropertyInData;function allSchemaProperties(schemaMap){return schemaMap?Object.keys(schemaMap).filter(p2=>p2!=="__proto__"):[]}code$5.allSchemaProperties=allSchemaProperties;function schemaProperties(it,schemaMap){return allSchemaProperties(schemaMap).filter(p2=>!(0,util_1.alwaysValidSchema)(it,schemaMap[p2]))}code$5.schemaProperties=schemaProperties;function callValidateCode({
schemaCode,data,it:{gen,topSchemaRef,schemaPath,errorPath},it},func,context,passSchema){const dataAndSchema=passSchema?(0,codegen_1._)`${schemaCode}, ${data}, ${topSchemaRef}${schemaPath}`:data,valCxt=[[names_1.default.instancePath,(0,codegen_1.strConcat)(names_1.default.instancePath,errorPath)],[names_1.default.parentData,it.parentData],[names_1.default.parentDataProperty,it.parentDataProperty],[names_1.default.rootData,names_1.default.rootData]];it.opts.dynamicRef&&valCxt.push([names_1.default.
dynamicAnchors,names_1.default.dynamicAnchors]);const args=(0,codegen_1._)`${dataAndSchema}, ${gen.object(...valCxt)}`;return context!==codegen_1.nil?(0,codegen_1._)`${func}.call(${context}, ${args})`:(0,codegen_1._)`${func}(${args})`}code$5.callValidateCode=callValidateCode;const newRegExp=(0,codegen_1._)`new RegExp`;function usePattern({gen,it:{opts}},pattern2){const u=opts.unicodeRegExp?"u":"",{regExp}=opts.code,rx=regExp(pattern2,u);return gen.scopeValue("pattern",{key:rx.toString(),ref:rx,code:(0,codegen_1.
_)`${regExp.code==="new RegExp"?newRegExp:(0,util_2.useFunc)(gen,regExp)}(${pattern2}, ${u})`})}code$5.usePattern=usePattern;function validateArray(cxt){const{gen,data,keyword:keyword2,it}=cxt,valid2=gen.name("valid");if(it.allErrors){const validArr=gen.let("valid",!0);return validateItems(()=>gen.assign(validArr,!1)),validArr}return gen.var(valid2,!0),validateItems(()=>gen.break()),valid2;function validateItems(notValid){const len=gen.const("len",(0,codegen_1._)`${data}.length`);gen.forRange("i",
0,len,i=>{cxt.subschema({keyword:keyword2,dataProp:i,dataPropType:util_1.Type.Num},valid2),gen.if((0,codegen_1.not)(valid2),notValid)})}}code$5.validateArray=validateArray;function validateUnion(cxt){const{gen,schema,keyword:keyword2,it}=cxt;if(!Array.isArray(schema))throw new Error("ajv implementation error");if(schema.some(sch=>(0,util_1.alwaysValidSchema)(it,sch))&&!it.opts.unevaluated)return;const valid2=gen.let("valid",!1),schValid=gen.name("_valid");gen.block(()=>schema.forEach((_sch,i)=>{
const schCxt=cxt.subschema({keyword:keyword2,schemaProp:i,compositeRule:!0},schValid);gen.assign(valid2,(0,codegen_1._)`${valid2} || ${schValid}`),cxt.mergeValidEvaluated(schCxt,schValid)||gen.if((0,codegen_1.not)(valid2))})),cxt.result(valid2,()=>cxt.reset(),()=>cxt.error(!0))}return code$5.validateUnion=validateUnion,code$5}var hasRequiredKeyword$1;function requireKeyword$1(){if(hasRequiredKeyword$1)return keyword$1;hasRequiredKeyword$1=1,Object.defineProperty(keyword$1,"__esModule",{value:!0}),
keyword$1.validateKeywordUsage=keyword$1.validSchemaType=keyword$1.funcKeywordCode=keyword$1.macroKeywordCode=void 0;const codegen_1=requireCodegen$1(),names_1=requireNames$1(),code_1=requireCode$2(),errors_1=requireErrors$1();function macroKeywordCode(cxt,def){const{gen,keyword:keyword2,schema,parentSchema,it}=cxt,macroSchema=def.macro.call(it.self,schema,parentSchema,it),schemaRef=useKeyword(gen,keyword2,macroSchema);it.opts.validateSchema!==!1&&it.self.validateSchema(macroSchema,!0);const valid2=gen.
name("valid");cxt.subschema({schema:macroSchema,schemaPath:codegen_1.nil,errSchemaPath:`${it.errSchemaPath}/${keyword2}`,topSchemaRef:schemaRef,compositeRule:!0},valid2),cxt.pass(valid2,()=>cxt.error(!0))}keyword$1.macroKeywordCode=macroKeywordCode;function funcKeywordCode(cxt,def){var _a2;const{gen,keyword:keyword2,schema,parentSchema,$data,it}=cxt;checkAsyncKeyword(it,def);const validate2=!$data&&def.compile?def.compile.call(it.self,schema,parentSchema,it):def.validate,validateRef=useKeyword(gen,
keyword2,validate2),valid2=gen.let("valid");cxt.block$data(valid2,validateKeyword),cxt.ok((_a2=def.valid)!==null&&_a2!==void 0?_a2:valid2);function validateKeyword(){if(def.errors===!1)assignValid(),def.modifying&&modifyData(cxt),reportErrs(()=>cxt.error());else{const ruleErrs=def.async?validateAsync():validateSync();def.modifying&&modifyData(cxt),reportErrs(()=>addErrs(cxt,ruleErrs))}}function validateAsync(){const ruleErrs=gen.let("ruleErrs",null);return gen.try(()=>assignValid((0,codegen_1._)`await `),
e=>gen.assign(valid2,!1).if((0,codegen_1._)`${e} instanceof ${it.ValidationError}`,()=>gen.assign(ruleErrs,(0,codegen_1._)`${e}.errors`),()=>gen.throw(e))),ruleErrs}function validateSync(){const validateErrs=(0,codegen_1._)`${validateRef}.errors`;return gen.assign(validateErrs,null),assignValid(codegen_1.nil),validateErrs}function assignValid(_await=def.async?(0,codegen_1._)`await `:codegen_1.nil){const passCxt=it.opts.passContext?names_1.default.this:names_1.default.self,passSchema=!("compile"in
def&&!$data||def.schema===!1);gen.assign(valid2,(0,codegen_1._)`${_await}${(0,code_1.callValidateCode)(cxt,validateRef,passCxt,passSchema)}`,def.modifying)}function reportErrs(errors2){var _a3;gen.if((0,codegen_1.not)((_a3=def.valid)!==null&&_a3!==void 0?_a3:valid2),errors2)}}keyword$1.funcKeywordCode=funcKeywordCode;function modifyData(cxt){const{gen,data,it}=cxt;gen.if(it.parentData,()=>gen.assign(data,(0,codegen_1._)`${it.parentData}[${it.parentDataProperty}]`))}function addErrs(cxt,errs){const{
gen}=cxt;gen.if((0,codegen_1._)`Array.isArray(${errs})`,()=>{gen.assign(names_1.default.vErrors,(0,codegen_1._)`${names_1.default.vErrors} === null ? ${errs} : ${names_1.default.vErrors}.concat(${errs})`).assign(names_1.default.errors,(0,codegen_1._)`${names_1.default.vErrors}.length`),(0,errors_1.extendErrors)(cxt)},()=>cxt.error())}function checkAsyncKeyword({schemaEnv},def){if(def.async&&!schemaEnv.$async)throw new Error("async keyword in sync schema")}function useKeyword(gen,keyword2,result){
if(result===void 0)throw new Error(`keyword "${keyword2}" failed to compile`);return gen.scopeValue("keyword",typeof result=="function"?{ref:result}:{ref:result,code:(0,codegen_1.stringify)(result)})}function validSchemaType(schema,schemaType,allowUndefined=!1){return!schemaType.length||schemaType.some(st=>st==="array"?Array.isArray(schema):st==="object"?schema&&typeof schema=="object"&&!Array.isArray(schema):typeof schema==st||allowUndefined&&typeof schema>"u")}keyword$1.validSchemaType=validSchemaType;
function validateKeywordUsage({schema,opts,self:self2,errSchemaPath},def,keyword2){if(Array.isArray(def.keyword)?!def.keyword.includes(keyword2):def.keyword!==keyword2)throw new Error("ajv implementation error");const deps=def.dependencies;if(deps?.some(kwd=>!Object.prototype.hasOwnProperty.call(schema,kwd)))throw new Error(`parent schema must have dependencies of ${keyword2}: ${deps.join(",")}`);if(def.validateSchema&&!def.validateSchema(schema[keyword2])){const msg=`keyword "${keyword2}" value\
 is invalid at path "${errSchemaPath}": `+self2.errorsText(def.validateSchema.errors);if(opts.validateSchema==="log")self2.logger.error(msg);else throw new Error(msg)}}return keyword$1.validateKeywordUsage=validateKeywordUsage,keyword$1}var subschema$1={},hasRequiredSubschema$1;function requireSubschema$1(){if(hasRequiredSubschema$1)return subschema$1;hasRequiredSubschema$1=1,Object.defineProperty(subschema$1,"__esModule",{value:!0}),subschema$1.extendSubschemaMode=subschema$1.extendSubschemaData=
subschema$1.getSubschema=void 0;const codegen_1=requireCodegen$1(),util_1=requireUtil$1();function getSubschema(it,{keyword:keyword2,schemaProp,schema,schemaPath,errSchemaPath,topSchemaRef}){if(keyword2!==void 0&&schema!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(keyword2!==void 0){const sch=it.schema[keyword2];return schemaProp===void 0?{schema:sch,schemaPath:(0,codegen_1._)`${it.schemaPath}${(0,codegen_1.getProperty)(keyword2)}`,errSchemaPath:`${it.errSchemaPath}\
/${keyword2}`}:{schema:sch[schemaProp],schemaPath:(0,codegen_1._)`${it.schemaPath}${(0,codegen_1.getProperty)(keyword2)}${(0,codegen_1.getProperty)(schemaProp)}`,errSchemaPath:`${it.errSchemaPath}/${keyword2}/${(0,util_1.escapeFragment)(schemaProp)}`}}if(schema!==void 0){if(schemaPath===void 0||errSchemaPath===void 0||topSchemaRef===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema,schemaPath,topSchemaRef,errSchemaPath}}throw new Error(
'either "keyword" or "schema" must be passed')}subschema$1.getSubschema=getSubschema;function extendSubschemaData(subschema2,it,{dataProp,dataPropType:dpType,data,dataTypes,propertyName}){if(data!==void 0&&dataProp!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen}=it;if(dataProp!==void 0){const{errorPath,dataPathArr,opts}=it,nextData=gen.let("data",(0,codegen_1._)`${it.data}${(0,codegen_1.getProperty)(dataProp)}`,!0);dataContextProps(nextData),subschema2.
errorPath=(0,codegen_1.str)`${errorPath}${(0,util_1.getErrorPath)(dataProp,dpType,opts.jsPropertySyntax)}`,subschema2.parentDataProperty=(0,codegen_1._)`${dataProp}`,subschema2.dataPathArr=[...dataPathArr,subschema2.parentDataProperty]}if(data!==void 0){const nextData=data instanceof codegen_1.Name?data:gen.let("data",data,!0);dataContextProps(nextData),propertyName!==void 0&&(subschema2.propertyName=propertyName)}dataTypes&&(subschema2.dataTypes=dataTypes);function dataContextProps(_nextData){subschema2.
data=_nextData,subschema2.dataLevel=it.dataLevel+1,subschema2.dataTypes=[],it.definedProperties=new Set,subschema2.parentData=it.data,subschema2.dataNames=[...it.dataNames,_nextData]}}subschema$1.extendSubschemaData=extendSubschemaData;function extendSubschemaMode(subschema2,{jtdDiscriminator,jtdMetadata,compositeRule,createErrors,allErrors}){compositeRule!==void 0&&(subschema2.compositeRule=compositeRule),createErrors!==void 0&&(subschema2.createErrors=createErrors),allErrors!==void 0&&(subschema2.
allErrors=allErrors),subschema2.jtdDiscriminator=jtdDiscriminator,subschema2.jtdMetadata=jtdMetadata}return subschema$1.extendSubschemaMode=extendSubschemaMode,subschema$1}var resolve$1={},fastDeepEqual,hasRequiredFastDeepEqual;function requireFastDeepEqual(){return hasRequiredFastDeepEqual||(hasRequiredFastDeepEqual=1,fastDeepEqual=function equal2(a,b){if(a===b)return!0;if(a&&b&&typeof a=="object"&&typeof b=="object"){if(a.constructor!==b.constructor)return!1;var length,i,keys2;if(Array.isArray(
a)){if(length=a.length,length!=b.length)return!1;for(i=length;i--!==0;)if(!equal2(a[i],b[i]))return!1;return!0}if(a.constructor===RegExp)return a.source===b.source&&a.flags===b.flags;if(a.valueOf!==Object.prototype.valueOf)return a.valueOf()===b.valueOf();if(a.toString!==Object.prototype.toString)return a.toString()===b.toString();if(keys2=Object.keys(a),length=keys2.length,length!==Object.keys(b).length)return!1;for(i=length;i--!==0;)if(!Object.prototype.hasOwnProperty.call(b,keys2[i]))return!1;
for(i=length;i--!==0;){var key2=keys2[i];if(!equal2(a[key2],b[key2]))return!1}return!0}return a!==a&&b!==b}),fastDeepEqual}var jsonSchemaTraverse$1={exports:{}},hasRequiredJsonSchemaTraverse$1;function requireJsonSchemaTraverse$1(){if(hasRequiredJsonSchemaTraverse$1)return jsonSchemaTraverse$1.exports;hasRequiredJsonSchemaTraverse$1=1;var traverse=jsonSchemaTraverse$1.exports=function(schema,opts,cb){typeof opts=="function"&&(cb=opts,opts={}),cb=opts.cb||cb;var pre=typeof cb=="function"?cb:cb.pre||
function(){},post=cb.post||function(){};_traverse(opts,pre,post,schema,"",schema)};traverse.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},traverse.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},traverse.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},traverse.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,
maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function _traverse(opts,pre,post,schema,jsonPtr,rootSchema,parentJsonPtr,parentKeyword,parentSchema,keyIndex){if(schema&&typeof schema=="object"&&!Array.isArray(schema)){pre(schema,jsonPtr,rootSchema,parentJsonPtr,parentKeyword,parentSchema,keyIndex);for(var key2 in schema){var sch=schema[key2];if(Array.isArray(sch)){if(key2 in traverse.arrayKeywords)for(var i=0;i<sch.length;i++)
_traverse(opts,pre,post,sch[i],jsonPtr+"/"+key2+"/"+i,rootSchema,jsonPtr,key2,schema,i)}else if(key2 in traverse.propsKeywords){if(sch&&typeof sch=="object")for(var prop2 in sch)_traverse(opts,pre,post,sch[prop2],jsonPtr+"/"+key2+"/"+escapeJsonPtr(prop2),rootSchema,jsonPtr,key2,schema,prop2)}else(key2 in traverse.keywords||opts.allKeys&&!(key2 in traverse.skipKeywords))&&_traverse(opts,pre,post,sch,jsonPtr+"/"+key2,rootSchema,jsonPtr,key2,schema)}post(schema,jsonPtr,rootSchema,parentJsonPtr,parentKeyword,
parentSchema,keyIndex)}}function escapeJsonPtr(str){return str.replace(/~/g,"~0").replace(/\//g,"~1")}return jsonSchemaTraverse$1.exports}var hasRequiredResolve$1;function requireResolve$1(){if(hasRequiredResolve$1)return resolve$1;hasRequiredResolve$1=1,Object.defineProperty(resolve$1,"__esModule",{value:!0}),resolve$1.getSchemaRefs=resolve$1.resolveUrl=resolve$1.normalizeId=resolve$1._getFullPath=resolve$1.getFullPath=resolve$1.inlineRef=void 0;const util_1=requireUtil$1(),equal2=requireFastDeepEqual(),
traverse=requireJsonSchemaTraverse$1(),SIMPLE_INLINED=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function inlineRef(schema,limit2=!0){return typeof schema=="boolean"?!0:limit2===!0?!hasRef(schema):limit2?countKeys(schema)<=limit2:!1}resolve$1.inlineRef=inlineRef;const REF_KEYWORDS=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynami\
cAnchor"]);function hasRef(schema){for(const key2 in schema){if(REF_KEYWORDS.has(key2))return!0;const sch=schema[key2];if(Array.isArray(sch)&&sch.some(hasRef)||typeof sch=="object"&&hasRef(sch))return!0}return!1}function countKeys(schema){let count=0;for(const key2 in schema){if(key2==="$ref")return 1/0;if(count++,!SIMPLE_INLINED.has(key2)&&(typeof schema[key2]=="object"&&(0,util_1.eachItem)(schema[key2],sch=>count+=countKeys(sch)),count===1/0))return 1/0}return count}function getFullPath(resolver2,id2="",normalize2){
normalize2!==!1&&(id2=normalizeId(id2));const p2=resolver2.parse(id2);return _getFullPath(resolver2,p2)}resolve$1.getFullPath=getFullPath;function _getFullPath(resolver2,p2){return resolver2.serialize(p2).split("#")[0]+"#"}resolve$1._getFullPath=_getFullPath;const TRAILING_SLASH_HASH=/#\/?$/;function normalizeId(id2){return id2?id2.replace(TRAILING_SLASH_HASH,""):""}resolve$1.normalizeId=normalizeId;function resolveUrl(resolver2,baseId,id2){return id2=normalizeId(id2),resolver2.resolve(baseId,id2)}
resolve$1.resolveUrl=resolveUrl;const ANCHOR=/^[a-z_][-a-z0-9._]*$/i;function getSchemaRefs(schema,baseId){if(typeof schema=="boolean")return{};const{schemaId,uriResolver}=this.opts,schId=normalizeId(schema[schemaId]||baseId),baseIds={"":schId},pathPrefix=getFullPath(uriResolver,schId,!1),localRefs={},schemaRefs=new Set;return traverse(schema,{allKeys:!0},(sch,jsonPtr,_,parentJsonPtr)=>{if(parentJsonPtr===void 0)return;const fullPath=pathPrefix+jsonPtr;let innerBaseId=baseIds[parentJsonPtr];typeof sch[schemaId]==
"string"&&(innerBaseId=addRef.call(this,sch[schemaId])),addAnchor.call(this,sch.$anchor),addAnchor.call(this,sch.$dynamicAnchor),baseIds[jsonPtr]=innerBaseId;function addRef(ref2){const _resolve=this.opts.uriResolver.resolve;if(ref2=normalizeId(innerBaseId?_resolve(innerBaseId,ref2):ref2),schemaRefs.has(ref2))throw ambiguos(ref2);schemaRefs.add(ref2);let schOrRef=this.refs[ref2];return typeof schOrRef=="string"&&(schOrRef=this.refs[schOrRef]),typeof schOrRef=="object"?checkAmbiguosRef(sch,schOrRef.
schema,ref2):ref2!==normalizeId(fullPath)&&(ref2[0]==="#"?(checkAmbiguosRef(sch,localRefs[ref2],ref2),localRefs[ref2]=sch):this.refs[ref2]=fullPath),ref2}function addAnchor(anchor){if(typeof anchor=="string"){if(!ANCHOR.test(anchor))throw new Error(`invalid anchor "${anchor}"`);addRef.call(this,`#${anchor}`)}}}),localRefs;function checkAmbiguosRef(sch1,sch2,ref2){if(sch2!==void 0&&!equal2(sch1,sch2))throw ambiguos(ref2)}function ambiguos(ref2){return new Error(`reference "${ref2}" resolves to mo\
re than one schema`)}}return resolve$1.getSchemaRefs=getSchemaRefs,resolve$1}var hasRequiredValidate$1;function requireValidate$1(){if(hasRequiredValidate$1)return validate$1;hasRequiredValidate$1=1,Object.defineProperty(validate$1,"__esModule",{value:!0}),validate$1.getData=validate$1.KeywordCxt=validate$1.validateFunctionCode=void 0;const boolSchema_1=requireBoolSchema$1(),dataType_1=requireDataType$1(),applicability_1=requireApplicability$1(),dataType_2=requireDataType$1(),defaults_1=requireDefaults$1(),
keyword_1=requireKeyword$1(),subschema_1=requireSubschema$1(),codegen_1=requireCodegen$1(),names_1=requireNames$1(),resolve_1=requireResolve$1(),util_1=requireUtil$1(),errors_1=requireErrors$1();function validateFunctionCode(it){if(isSchemaObj(it)&&(checkKeywords(it),schemaCxtHasRules(it))){topSchemaObjCode(it);return}validateFunction(it,()=>(0,boolSchema_1.topBoolOrEmptySchema)(it))}validate$1.validateFunctionCode=validateFunctionCode;function validateFunction({gen,validateName,schema,schemaEnv,
opts},body2){opts.code.es5?gen.func(validateName,(0,codegen_1._)`${names_1.default.data}, ${names_1.default.valCxt}`,schemaEnv.$async,()=>{gen.code((0,codegen_1._)`"use strict"; ${funcSourceUrl(schema,opts)}`),destructureValCxtES5(gen,opts),gen.code(body2)}):gen.func(validateName,(0,codegen_1._)`${names_1.default.data}, ${destructureValCxt(opts)}`,schemaEnv.$async,()=>gen.code(funcSourceUrl(schema,opts)).code(body2))}function destructureValCxt(opts){return(0,codegen_1._)`{${names_1.default.instancePath}="", ${names_1.
default.parentData}, ${names_1.default.parentDataProperty}, ${names_1.default.rootData}=${names_1.default.data}${opts.dynamicRef?(0,codegen_1._)`, ${names_1.default.dynamicAnchors}={}`:codegen_1.nil}}={}`}function destructureValCxtES5(gen,opts){gen.if(names_1.default.valCxt,()=>{gen.var(names_1.default.instancePath,(0,codegen_1._)`${names_1.default.valCxt}.${names_1.default.instancePath}`),gen.var(names_1.default.parentData,(0,codegen_1._)`${names_1.default.valCxt}.${names_1.default.parentData}`),
gen.var(names_1.default.parentDataProperty,(0,codegen_1._)`${names_1.default.valCxt}.${names_1.default.parentDataProperty}`),gen.var(names_1.default.rootData,(0,codegen_1._)`${names_1.default.valCxt}.${names_1.default.rootData}`),opts.dynamicRef&&gen.var(names_1.default.dynamicAnchors,(0,codegen_1._)`${names_1.default.valCxt}.${names_1.default.dynamicAnchors}`)},()=>{gen.var(names_1.default.instancePath,(0,codegen_1._)`""`),gen.var(names_1.default.parentData,(0,codegen_1._)`undefined`),gen.var(names_1.
default.parentDataProperty,(0,codegen_1._)`undefined`),gen.var(names_1.default.rootData,names_1.default.data),opts.dynamicRef&&gen.var(names_1.default.dynamicAnchors,(0,codegen_1._)`{}`)})}function topSchemaObjCode(it){const{schema,opts,gen}=it;validateFunction(it,()=>{opts.$comment&&schema.$comment&&commentKeyword(it),checkNoDefault(it),gen.let(names_1.default.vErrors,null),gen.let(names_1.default.errors,0),opts.unevaluated&&resetEvaluated(it),typeAndKeywords(it),returnResults(it)})}function resetEvaluated(it){
const{gen,validateName}=it;it.evaluated=gen.const("evaluated",(0,codegen_1._)`${validateName}.evaluated`),gen.if((0,codegen_1._)`${it.evaluated}.dynamicProps`,()=>gen.assign((0,codegen_1._)`${it.evaluated}.props`,(0,codegen_1._)`undefined`)),gen.if((0,codegen_1._)`${it.evaluated}.dynamicItems`,()=>gen.assign((0,codegen_1._)`${it.evaluated}.items`,(0,codegen_1._)`undefined`))}function funcSourceUrl(schema,opts){const schId=typeof schema=="object"&&schema[opts.schemaId];return schId&&(opts.code.source||
opts.code.process)?(0,codegen_1._)`/*# sourceURL=${schId} */`:codegen_1.nil}function subschemaCode(it,valid2){if(isSchemaObj(it)&&(checkKeywords(it),schemaCxtHasRules(it))){subSchemaObjCode(it,valid2);return}(0,boolSchema_1.boolOrEmptySchema)(it,valid2)}function schemaCxtHasRules({schema,self:self2}){if(typeof schema=="boolean")return!schema;for(const key2 in schema)if(self2.RULES.all[key2])return!0;return!1}function isSchemaObj(it){return typeof it.schema!="boolean"}function subSchemaObjCode(it,valid2){
const{schema,gen,opts}=it;opts.$comment&&schema.$comment&&commentKeyword(it),updateContext(it),checkAsyncSchema(it);const errsCount=gen.const("_errs",names_1.default.errors);typeAndKeywords(it,errsCount),gen.var(valid2,(0,codegen_1._)`${errsCount} === ${names_1.default.errors}`)}function checkKeywords(it){(0,util_1.checkUnknownRules)(it),checkRefsAndKeywords(it)}function typeAndKeywords(it,errsCount){if(it.opts.jtd)return schemaKeywords(it,[],!1,errsCount);const types2=(0,dataType_1.getSchemaTypes)(
it.schema),checkedTypes=(0,dataType_1.coerceAndCheckDataType)(it,types2);schemaKeywords(it,types2,!checkedTypes,errsCount)}function checkRefsAndKeywords(it){const{schema,errSchemaPath,opts,self:self2}=it;schema.$ref&&opts.ignoreKeywordsWithRef&&(0,util_1.schemaHasRulesButRef)(schema,self2.RULES)&&self2.logger.warn(`$ref: keywords ignored in schema at path "${errSchemaPath}"`)}function checkNoDefault(it){const{schema,opts}=it;schema.default!==void 0&&opts.useDefaults&&opts.strictSchema&&(0,util_1.
checkStrictMode)(it,"default is ignored in the schema root")}function updateContext(it){const schId=it.schema[it.opts.schemaId];schId&&(it.baseId=(0,resolve_1.resolveUrl)(it.opts.uriResolver,it.baseId,schId))}function checkAsyncSchema(it){if(it.schema.$async&&!it.schemaEnv.$async)throw new Error("async schema in sync schema")}function commentKeyword({gen,schemaEnv,schema,errSchemaPath,opts}){const msg=schema.$comment;if(opts.$comment===!0)gen.code((0,codegen_1._)`${names_1.default.self}.logger.log(${msg})`);else if(typeof opts.
$comment=="function"){const schemaPath=(0,codegen_1.str)`${errSchemaPath}/$comment`,rootName=gen.scopeValue("root",{ref:schemaEnv.root});gen.code((0,codegen_1._)`${names_1.default.self}.opts.$comment(${msg}, ${schemaPath}, ${rootName}.schema)`)}}function returnResults(it){const{gen,schemaEnv,validateName,ValidationError,opts}=it;schemaEnv.$async?gen.if((0,codegen_1._)`${names_1.default.errors} === 0`,()=>gen.return(names_1.default.data),()=>gen.throw((0,codegen_1._)`new ${ValidationError}(${names_1.
default.vErrors})`)):(gen.assign((0,codegen_1._)`${validateName}.errors`,names_1.default.vErrors),opts.unevaluated&&assignEvaluated(it),gen.return((0,codegen_1._)`${names_1.default.errors} === 0`))}function assignEvaluated({gen,evaluated,props,items:items2}){props instanceof codegen_1.Name&&gen.assign((0,codegen_1._)`${evaluated}.props`,props),items2 instanceof codegen_1.Name&&gen.assign((0,codegen_1._)`${evaluated}.items`,items2)}function schemaKeywords(it,types2,typeErrors,errsCount){const{gen,
schema,data,allErrors,opts,self:self2}=it,{RULES}=self2;if(schema.$ref&&(opts.ignoreKeywordsWithRef||!(0,util_1.schemaHasRulesButRef)(schema,RULES))){gen.block(()=>keywordCode(it,"$ref",RULES.all.$ref.definition));return}opts.jtd||checkStrictTypes(it,types2),gen.block(()=>{for(const group of RULES.rules)groupKeywords(group);groupKeywords(RULES.post)});function groupKeywords(group){(0,applicability_1.shouldUseGroup)(schema,group)&&(group.type?(gen.if((0,dataType_2.checkDataType)(group.type,data,opts.
strictNumbers)),iterateKeywords(it,group),types2.length===1&&types2[0]===group.type&&typeErrors&&(gen.else(),(0,dataType_2.reportTypeError)(it)),gen.endIf()):iterateKeywords(it,group),allErrors||gen.if((0,codegen_1._)`${names_1.default.errors} === ${errsCount||0}`))}}function iterateKeywords(it,group){const{gen,schema,opts:{useDefaults}}=it;useDefaults&&(0,defaults_1.assignDefaults)(it,group.type),gen.block(()=>{for(const rule of group.rules)(0,applicability_1.shouldUseRule)(schema,rule)&&keywordCode(
it,rule.keyword,rule.definition,group.type)})}function checkStrictTypes(it,types2){it.schemaEnv.meta||!it.opts.strictTypes||(checkContextTypes(it,types2),it.opts.allowUnionTypes||checkMultipleTypes(it,types2),checkKeywordTypes(it,it.dataTypes))}function checkContextTypes(it,types2){if(types2.length){if(!it.dataTypes.length){it.dataTypes=types2;return}types2.forEach(t=>{includesType(it.dataTypes,t)||strictTypesError(it,`type "${t}" not allowed by context "${it.dataTypes.join(",")}"`)}),narrowSchemaTypes(
it,types2)}}function checkMultipleTypes(it,ts){ts.length>1&&!(ts.length===2&&ts.includes("null"))&&strictTypesError(it,"use allowUnionTypes to allow union type keyword")}function checkKeywordTypes(it,ts){const rules2=it.self.RULES.all;for(const keyword2 in rules2){const rule=rules2[keyword2];if(typeof rule=="object"&&(0,applicability_1.shouldUseRule)(it.schema,rule)){const{type:type2}=rule.definition;type2.length&&!type2.some(t=>hasApplicableType(ts,t))&&strictTypesError(it,`missing type "${type2.
join(",")}" for keyword "${keyword2}"`)}}}function hasApplicableType(schTs,kwdT){return schTs.includes(kwdT)||kwdT==="number"&&schTs.includes("integer")}function includesType(ts,t){return ts.includes(t)||t==="integer"&&ts.includes("number")}function narrowSchemaTypes(it,withTypes){const ts=[];for(const t of it.dataTypes)includesType(withTypes,t)?ts.push(t):withTypes.includes("integer")&&t==="number"&&ts.push("integer");it.dataTypes=ts}function strictTypesError(it,msg){const schemaPath=it.schemaEnv.
baseId+it.errSchemaPath;msg+=` at "${schemaPath}" (strictTypes)`,(0,util_1.checkStrictMode)(it,msg,it.opts.strictTypes)}class KeywordCxt{constructor(it,def,keyword2){if((0,keyword_1.validateKeywordUsage)(it,def,keyword2),this.gen=it.gen,this.allErrors=it.allErrors,this.keyword=keyword2,this.data=it.data,this.schema=it.schema[keyword2],this.$data=def.$data&&it.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,util_1.schemaRefOrVal)(it,this.schema,keyword2,this.$data),this.schemaType=
def.schemaType,this.parentSchema=it.schema,this.params={},this.it=it,this.def=def,this.$data)this.schemaCode=it.gen.const("vSchema",getData(this.$data,it));else if(this.schemaCode=this.schemaValue,!(0,keyword_1.validSchemaType)(this.schema,def.schemaType,def.allowUndefined))throw new Error(`${keyword2} value must be ${JSON.stringify(def.schemaType)}`);("code"in def?def.trackErrors:def.errors!==!1)&&(this.errsCount=it.gen.const("_errs",names_1.default.errors))}result(condition,successAction,failAction){
this.failResult((0,codegen_1.not)(condition),successAction,failAction)}failResult(condition,successAction,failAction){this.gen.if(condition),failAction?failAction():this.error(),successAction?(this.gen.else(),successAction(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(condition,failAction){this.failResult((0,codegen_1.not)(condition),void 0,failAction)}fail(condition){if(condition===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(
condition),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(condition){if(!this.$data)return this.fail(condition);const{schemaCode}=this;this.fail((0,codegen_1._)`${schemaCode} !== undefined && (${(0,codegen_1.or)(this.invalid$data(),condition)})`)}error(append2,errorParams,errorPaths){if(errorParams){this.setParams(errorParams),this._error(append2,errorPaths),this.setParams({});return}this._error(append2,errorPaths)}_error(append2,errorPaths){(append2?errors_1.reportExtraError:
errors_1.reportError)(this,this.def.error,errorPaths)}$dataError(){(0,errors_1.reportError)(this,this.def.$dataError||errors_1.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,errors_1.resetErrorsCount)(this.gen,this.errsCount)}ok(cond){this.allErrors||this.gen.if(cond)}setParams(obj,assign){assign?Object.assign(this.params,obj):this.params=obj}block$data(valid2,codeBlock,$dataValid=codegen_1.nil){this.gen.block(()=>{this.check$data(
valid2,$dataValid),codeBlock()})}check$data(valid2=codegen_1.nil,$dataValid=codegen_1.nil){if(!this.$data)return;const{gen,schemaCode,schemaType,def}=this;gen.if((0,codegen_1.or)((0,codegen_1._)`${schemaCode} === undefined`,$dataValid)),valid2!==codegen_1.nil&&gen.assign(valid2,!0),(schemaType.length||def.validateSchema)&&(gen.elseIf(this.invalid$data()),this.$dataError(),valid2!==codegen_1.nil&&gen.assign(valid2,!1)),gen.else()}invalid$data(){const{gen,schemaCode,schemaType,def,it}=this;return(0,codegen_1.
or)(wrong$DataType(),invalid$DataSchema());function wrong$DataType(){if(schemaType.length){if(!(schemaCode instanceof codegen_1.Name))throw new Error("ajv implementation error");const st=Array.isArray(schemaType)?schemaType:[schemaType];return(0,codegen_1._)`${(0,dataType_2.checkDataTypes)(st,schemaCode,it.opts.strictNumbers,dataType_2.DataType.Wrong)}`}return codegen_1.nil}function invalid$DataSchema(){if(def.validateSchema){const validateSchemaRef=gen.scopeValue("validate$data",{ref:def.validateSchema});
return(0,codegen_1._)`!${validateSchemaRef}(${schemaCode})`}return codegen_1.nil}}subschema(appl,valid2){const subschema2=(0,subschema_1.getSubschema)(this.it,appl);(0,subschema_1.extendSubschemaData)(subschema2,this.it,appl),(0,subschema_1.extendSubschemaMode)(subschema2,appl);const nextContext={...this.it,...subschema2,items:void 0,props:void 0};return subschemaCode(nextContext,valid2),nextContext}mergeEvaluated(schemaCxt,toName){const{it,gen}=this;it.opts.unevaluated&&(it.props!==!0&&schemaCxt.
props!==void 0&&(it.props=util_1.mergeEvaluated.props(gen,schemaCxt.props,it.props,toName)),it.items!==!0&&schemaCxt.items!==void 0&&(it.items=util_1.mergeEvaluated.items(gen,schemaCxt.items,it.items,toName)))}mergeValidEvaluated(schemaCxt,valid2){const{it,gen}=this;if(it.opts.unevaluated&&(it.props!==!0||it.items!==!0))return gen.if(valid2,()=>this.mergeEvaluated(schemaCxt,codegen_1.Name)),!0}}validate$1.KeywordCxt=KeywordCxt;function keywordCode(it,keyword2,def,ruleType){const cxt=new KeywordCxt(
it,def,keyword2);"code"in def?def.code(cxt,ruleType):cxt.$data&&def.validate?(0,keyword_1.funcKeywordCode)(cxt,def):"macro"in def?(0,keyword_1.macroKeywordCode)(cxt,def):(def.compile||def.validate)&&(0,keyword_1.funcKeywordCode)(cxt,def)}const JSON_POINTER=/^\/(?:[^~]|~0|~1)*$/,RELATIVE_JSON_POINTER=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function getData($data,{dataLevel,dataNames,dataPathArr}){let jsonPointer,data;if($data==="")return names_1.default.rootData;if($data[0]==="/"){if(!JSON_POINTER.test(
$data))throw new Error(`Invalid JSON-pointer: ${$data}`);jsonPointer=$data,data=names_1.default.rootData}else{const matches2=RELATIVE_JSON_POINTER.exec($data);if(!matches2)throw new Error(`Invalid JSON-pointer: ${$data}`);const up=+matches2[1];if(jsonPointer=matches2[2],jsonPointer==="#"){if(up>=dataLevel)throw new Error(errorMsg("property/index",up));return dataPathArr[dataLevel-up]}if(up>dataLevel)throw new Error(errorMsg("data",up));if(data=dataNames[dataLevel-up],!jsonPointer)return data}let expr=data;
const segments=jsonPointer.split("/");for(const segment of segments)segment&&(data=(0,codegen_1._)`${data}${(0,codegen_1.getProperty)((0,util_1.unescapeJsonPointer)(segment))}`,expr=(0,codegen_1._)`${expr} && ${data}`);return expr;function errorMsg(pointerType,up){return`Cannot access ${pointerType} ${up} levels up, current level is ${dataLevel}`}}return validate$1.getData=getData,validate$1}var validation_error$1={},hasRequiredValidation_error$1;function requireValidation_error$1(){if(hasRequiredValidation_error$1)
return validation_error$1;hasRequiredValidation_error$1=1,Object.defineProperty(validation_error$1,"__esModule",{value:!0});class ValidationError extends Error{constructor(errors2){super("validation failed"),this.errors=errors2,this.ajv=this.validation=!0}}return validation_error$1.default=ValidationError,validation_error$1}var ref_error$1={},hasRequiredRef_error$1;function requireRef_error$1(){if(hasRequiredRef_error$1)return ref_error$1;hasRequiredRef_error$1=1,Object.defineProperty(ref_error$1,
"__esModule",{value:!0});const resolve_1=requireResolve$1();class MissingRefError extends Error{constructor(resolver2,baseId,ref2,msg){super(msg||`can't resolve reference ${ref2} from id ${baseId}`),this.missingRef=(0,resolve_1.resolveUrl)(resolver2,baseId,ref2),this.missingSchema=(0,resolve_1.normalizeId)((0,resolve_1.getFullPath)(resolver2,this.missingRef))}}return ref_error$1.default=MissingRefError,ref_error$1}var compile$1={},hasRequiredCompile$1;function requireCompile$1(){if(hasRequiredCompile$1)
return compile$1;hasRequiredCompile$1=1,Object.defineProperty(compile$1,"__esModule",{value:!0}),compile$1.resolveSchema=compile$1.getCompilingSchema=compile$1.resolveRef=compile$1.compileSchema=compile$1.SchemaEnv=void 0;const codegen_1=requireCodegen$1(),validation_error_1=requireValidation_error$1(),names_1=requireNames$1(),resolve_1=requireResolve$1(),util_1=requireUtil$1(),validate_1=requireValidate$1();class SchemaEnv{constructor(env2){var _a2;this.refs={},this.dynamicAnchors={};let schema;
typeof env2.schema=="object"&&(schema=env2.schema),this.schema=env2.schema,this.schemaId=env2.schemaId,this.root=env2.root||this,this.baseId=(_a2=env2.baseId)!==null&&_a2!==void 0?_a2:(0,resolve_1.normalizeId)(schema?.[env2.schemaId||"$id"]),this.schemaPath=env2.schemaPath,this.localRefs=env2.localRefs,this.meta=env2.meta,this.$async=schema?.$async,this.refs={}}}compile$1.SchemaEnv=SchemaEnv;function compileSchema(sch){const _sch=getCompilingSchema.call(this,sch);if(_sch)return _sch;const rootId=(0,resolve_1.
getFullPath)(this.opts.uriResolver,sch.root.baseId),{es5,lines}=this.opts.code,{ownProperties}=this.opts,gen=new codegen_1.CodeGen(this.scope,{es5,lines,ownProperties});let _ValidationError;sch.$async&&(_ValidationError=gen.scopeValue("Error",{ref:validation_error_1.default,code:(0,codegen_1._)`require("ajv/dist/runtime/validation_error").default`}));const validateName=gen.scopeName("validate");sch.validateName=validateName;const schemaCxt={gen,allErrors:this.opts.allErrors,data:names_1.default.
data,parentData:names_1.default.parentData,parentDataProperty:names_1.default.parentDataProperty,dataNames:[names_1.default.data],dataPathArr:[codegen_1.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:gen.scopeValue("schema",this.opts.code.source===!0?{ref:sch.schema,code:(0,codegen_1.stringify)(sch.schema)}:{ref:sch.schema}),validateName,ValidationError:_ValidationError,schema:sch.schema,schemaEnv:sch,rootId,baseId:sch.baseId||rootId,schemaPath:codegen_1.nil,errSchemaPath:sch.
schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,codegen_1._)`""`,opts:this.opts,self:this};let sourceCode;try{this._compilations.add(sch),(0,validate_1.validateFunctionCode)(schemaCxt),gen.optimize(this.opts.code.optimize);const validateCode=gen.toString();sourceCode=`${gen.scopeRefs(names_1.default.scope)}return ${validateCode}`,this.opts.code.process&&(sourceCode=this.opts.code.process(sourceCode,sch));const validate2=new Function(`${names_1.default.self}`,`${names_1.default.scope}`,sourceCode)(
this,this.scope.get());if(this.scope.value(validateName,{ref:validate2}),validate2.errors=null,validate2.schema=sch.schema,validate2.schemaEnv=sch,sch.$async&&(validate2.$async=!0),this.opts.code.source===!0&&(validate2.source={validateName,validateCode,scopeValues:gen._values}),this.opts.unevaluated){const{props,items:items2}=schemaCxt;validate2.evaluated={props:props instanceof codegen_1.Name?void 0:props,items:items2 instanceof codegen_1.Name?void 0:items2,dynamicProps:props instanceof codegen_1.
Name,dynamicItems:items2 instanceof codegen_1.Name},validate2.source&&(validate2.source.evaluated=(0,codegen_1.stringify)(validate2.evaluated))}return sch.validate=validate2,sch}catch(e){throw delete sch.validate,delete sch.validateName,sourceCode&&this.logger.error("Error compiling schema, function code:",sourceCode),e}finally{this._compilations.delete(sch)}}compile$1.compileSchema=compileSchema;function resolveRef(root2,baseId,ref2){var _a2;ref2=(0,resolve_1.resolveUrl)(this.opts.uriResolver,baseId,
ref2);const schOrFunc=root2.refs[ref2];if(schOrFunc)return schOrFunc;let _sch=resolve2.call(this,root2,ref2);if(_sch===void 0){const schema=(_a2=root2.localRefs)===null||_a2===void 0?void 0:_a2[ref2],{schemaId}=this.opts;schema&&(_sch=new SchemaEnv({schema,schemaId,root:root2,baseId}))}if(_sch!==void 0)return root2.refs[ref2]=inlineOrCompile.call(this,_sch)}compile$1.resolveRef=resolveRef;function inlineOrCompile(sch){return(0,resolve_1.inlineRef)(sch.schema,this.opts.inlineRefs)?sch.schema:sch.
validate?sch:compileSchema.call(this,sch)}function getCompilingSchema(schEnv){for(const sch of this._compilations)if(sameSchemaEnv(sch,schEnv))return sch}compile$1.getCompilingSchema=getCompilingSchema;function sameSchemaEnv(s1,s2){return s1.schema===s2.schema&&s1.root===s2.root&&s1.baseId===s2.baseId}function resolve2(root2,ref2){let sch;for(;typeof(sch=this.refs[ref2])=="string";)ref2=sch;return sch||this.schemas[ref2]||resolveSchema.call(this,root2,ref2)}function resolveSchema(root2,ref2){const p2=this.
opts.uriResolver.parse(ref2),refPath=(0,resolve_1._getFullPath)(this.opts.uriResolver,p2);let baseId=(0,resolve_1.getFullPath)(this.opts.uriResolver,root2.baseId,void 0);if(Object.keys(root2.schema).length>0&&refPath===baseId)return getJsonPointer.call(this,p2,root2);const id2=(0,resolve_1.normalizeId)(refPath),schOrRef=this.refs[id2]||this.schemas[id2];if(typeof schOrRef=="string"){const sch=resolveSchema.call(this,root2,schOrRef);return typeof sch?.schema!="object"?void 0:getJsonPointer.call(this,
p2,sch)}if(typeof schOrRef?.schema=="object"){if(schOrRef.validate||compileSchema.call(this,schOrRef),id2===(0,resolve_1.normalizeId)(ref2)){const{schema}=schOrRef,{schemaId}=this.opts,schId=schema[schemaId];return schId&&(baseId=(0,resolve_1.resolveUrl)(this.opts.uriResolver,baseId,schId)),new SchemaEnv({schema,schemaId,root:root2,baseId})}return getJsonPointer.call(this,p2,schOrRef)}}compile$1.resolveSchema=resolveSchema;const PREVENT_SCOPE_CHANGE=new Set(["properties","patternProperties","enu\
m","dependencies","definitions"]);function getJsonPointer(parsedRef,{baseId,schema,root:root2}){var _a2;if(((_a2=parsedRef.fragment)===null||_a2===void 0?void 0:_a2[0])!=="/")return;for(const part of parsedRef.fragment.slice(1).split("/")){if(typeof schema=="boolean")return;const partSchema=schema[(0,util_1.unescapeFragment)(part)];if(partSchema===void 0)return;schema=partSchema;const schId=typeof schema=="object"&&schema[this.opts.schemaId];!PREVENT_SCOPE_CHANGE.has(part)&&schId&&(baseId=(0,resolve_1.
resolveUrl)(this.opts.uriResolver,baseId,schId))}let env2;if(typeof schema!="boolean"&&schema.$ref&&!(0,util_1.schemaHasRulesButRef)(schema,this.RULES)){const $ref=(0,resolve_1.resolveUrl)(this.opts.uriResolver,baseId,schema.$ref);env2=resolveSchema.call(this,root2,$ref)}const{schemaId}=this.opts;if(env2=env2||new SchemaEnv({schema,schemaId,root:root2,baseId}),env2.schema!==env2.root.schema)return env2}return compile$1}const $id$3="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/r\
efs/data.json#",description$1="Meta-schema for $data reference (JSON AnySchema extension proposal)",type$3="object",required$3=["$data"],properties$6={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties$3=!1,require$$9$1={$id:$id$3,description:description$1,type:type$3,required:required$3,properties:properties$6,additionalProperties:additionalProperties$3};var uri$1={},fastUri={exports:{}},utils$1,hasRequiredUtils;function requireUtils(){if(hasRequiredUtils)
return utils$1;hasRequiredUtils=1;const isUUID=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),isIPv4=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function stringArrayToHexStripped(input){let acc="",code2=0,i=0;for(i=0;i<input.length;i++)if(code2=input[i].charCodeAt(0),code2!==48){if(!(code2>=48&&code2<=57||code2>=65&&code2<=70||code2>=97&&code2<=102))return"";acc+=input[i];break}for(i+=
1;i<input.length;i++){if(code2=input[i].charCodeAt(0),!(code2>=48&&code2<=57||code2>=65&&code2<=70||code2>=97&&code2<=102))return"";acc+=input[i]}return acc}const nonSimpleDomain=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function consumeIsZone(buffer){return buffer.length=0,!0}function consumeHextets(buffer,address,output){if(buffer.length){const hex=stringArrayToHexStripped(buffer);if(hex!=="")address.push(hex);else return output.error=!0,!1;buffer.length=0}return!0}function getIPV6(input){
let tokenCount=0;const output={error:!1,address:"",zone:""},address=[],buffer=[];let endipv6Encountered=!1,endIpv6=!1,consume=consumeHextets;for(let i=0;i<input.length;i++){const cursor=input[i];if(!(cursor==="["||cursor==="]"))if(cursor===":"){if(endipv6Encountered===!0&&(endIpv6=!0),!consume(buffer,address,output))break;if(++tokenCount>7){output.error=!0;break}i>0&&input[i-1]===":"&&(endipv6Encountered=!0),address.push(":");continue}else if(cursor==="%"){if(!consume(buffer,address,output))break;
consume=consumeIsZone}else{buffer.push(cursor);continue}}return buffer.length&&(consume===consumeIsZone?output.zone=buffer.join(""):endIpv6?address.push(buffer.join("")):address.push(stringArrayToHexStripped(buffer))),output.address=address.join(""),output}function normalizeIPv6(host){if(findToken(host,":")<2)return{host,isIPV6:!1};const ipv62=getIPV6(host);if(ipv62.error)return{host,isIPV6:!1};{let newHost=ipv62.address,escapedHost=ipv62.address;return ipv62.zone&&(newHost+="%"+ipv62.zone,escapedHost+=
"%25"+ipv62.zone),{host:newHost,isIPV6:!0,escapedHost}}}function findToken(str,token2){let ind=0;for(let i=0;i<str.length;i++)str[i]===token2&&ind++;return ind}function removeDotSegments(path2){let input=path2;const output=[];let nextSlash=-1,len=0;for(;len=input.length;){if(len===1){if(input===".")break;if(input==="/"){output.push("/");break}else{output.push(input);break}}else if(len===2){if(input[0]==="."){if(input[1]===".")break;if(input[1]==="/"){input=input.slice(2);continue}}else if(input[0]===
"/"&&(input[1]==="."||input[1]==="/")){output.push("/");break}}else if(len===3&&input==="/.."){output.length!==0&&output.pop(),output.push("/");break}if(input[0]==="."){if(input[1]==="."){if(input[2]==="/"){input=input.slice(3);continue}}else if(input[1]==="/"){input=input.slice(2);continue}}else if(input[0]==="/"&&input[1]==="."){if(input[2]==="/"){input=input.slice(2);continue}else if(input[2]==="."&&input[3]==="/"){input=input.slice(3),output.length!==0&&output.pop();continue}}if((nextSlash=input.
indexOf("/",1))===-1){output.push(input);break}else output.push(input.slice(0,nextSlash)),input=input.slice(nextSlash)}return output.join("")}function normalizeComponentEncoding(component2,esc2){const func=esc2!==!0?escape:unescape;return component2.scheme!==void 0&&(component2.scheme=func(component2.scheme)),component2.userinfo!==void 0&&(component2.userinfo=func(component2.userinfo)),component2.host!==void 0&&(component2.host=func(component2.host)),component2.path!==void 0&&(component2.path=func(
component2.path)),component2.query!==void 0&&(component2.query=func(component2.query)),component2.fragment!==void 0&&(component2.fragment=func(component2.fragment)),component2}function recomposeAuthority(component2){const uriTokens=[];if(component2.userinfo!==void 0&&(uriTokens.push(component2.userinfo),uriTokens.push("@")),component2.host!==void 0){let host=unescape(component2.host);if(!isIPv4(host)){const ipV6res=normalizeIPv6(host);ipV6res.isIPV6===!0?host=`[${ipV6res.escapedHost}]`:host=component2.
host}uriTokens.push(host)}return(typeof component2.port=="number"||typeof component2.port=="string")&&(uriTokens.push(":"),uriTokens.push(String(component2.port))),uriTokens.length?uriTokens.join(""):void 0}return utils$1={nonSimpleDomain,recomposeAuthority,normalizeComponentEncoding,removeDotSegments,isIPv4,isUUID,normalizeIPv6,stringArrayToHexStripped},utils$1}var schemes,hasRequiredSchemes;function requireSchemes(){if(hasRequiredSchemes)return schemes;hasRequiredSchemes=1;const{isUUID}=requireUtils(),
URN_REG=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,supportedSchemeNames=["http","https","ws","wss","urn","urn:uuid"];function isValidSchemeName(name){return supportedSchemeNames.indexOf(name)!==-1}function wsIsSecure(wsComponent){return wsComponent.secure===!0?!0:wsComponent.secure===!1?!1:wsComponent.scheme?wsComponent.scheme.length===3&&(wsComponent.scheme[0]==="w"||wsComponent.scheme[0]==="W")&&(wsComponent.scheme[1]==="s"||wsComponent.scheme[1]==="S")&&(wsComponent.scheme[2]===
"s"||wsComponent.scheme[2]==="S"):!1}function httpParse(component2){return component2.host||(component2.error=component2.error||"HTTP URIs must have a host."),component2}function httpSerialize(component2){const secure=String(component2.scheme).toLowerCase()==="https";return(component2.port===(secure?443:80)||component2.port==="")&&(component2.port=void 0),component2.path||(component2.path="/"),component2}function wsParse(wsComponent){return wsComponent.secure=wsIsSecure(wsComponent),wsComponent.
resourceName=(wsComponent.path||"/")+(wsComponent.query?"?"+wsComponent.query:""),wsComponent.path=void 0,wsComponent.query=void 0,wsComponent}function wsSerialize(wsComponent){if((wsComponent.port===(wsIsSecure(wsComponent)?443:80)||wsComponent.port==="")&&(wsComponent.port=void 0),typeof wsComponent.secure=="boolean"&&(wsComponent.scheme=wsComponent.secure?"wss":"ws",wsComponent.secure=void 0),wsComponent.resourceName){const[path2,query]=wsComponent.resourceName.split("?");wsComponent.path=path2&&
path2!=="/"?path2:void 0,wsComponent.query=query,wsComponent.resourceName=void 0}return wsComponent.fragment=void 0,wsComponent}function urnParse(urnComponent,options){if(!urnComponent.path)return urnComponent.error="URN can not be parsed",urnComponent;const matches2=urnComponent.path.match(URN_REG);if(matches2){const scheme2=options.scheme||urnComponent.scheme||"urn";urnComponent.nid=matches2[1].toLowerCase(),urnComponent.nss=matches2[2];const urnScheme=`${scheme2}:${options.nid||urnComponent.nid}`,
schemeHandler=getSchemeHandler(urnScheme);urnComponent.path=void 0,schemeHandler&&(urnComponent=schemeHandler.parse(urnComponent,options))}else urnComponent.error=urnComponent.error||"URN can not be parsed.";return urnComponent}function urnSerialize(urnComponent,options){if(urnComponent.nid===void 0)throw new Error("URN without nid cannot be serialized");const scheme2=options.scheme||urnComponent.scheme||"urn",nid=urnComponent.nid.toLowerCase(),urnScheme=`${scheme2}:${options.nid||nid}`,schemeHandler=getSchemeHandler(
urnScheme);schemeHandler&&(urnComponent=schemeHandler.serialize(urnComponent,options));const uriComponent=urnComponent,nss=urnComponent.nss;return uriComponent.path=`${nid||options.nid}:${nss}`,options.skipEscape=!0,uriComponent}function urnuuidParse(urnComponent,options){const uuidComponent=urnComponent;return uuidComponent.uuid=uuidComponent.nss,uuidComponent.nss=void 0,!options.tolerant&&(!uuidComponent.uuid||!isUUID(uuidComponent.uuid))&&(uuidComponent.error=uuidComponent.error||"UUID is not\
 valid."),uuidComponent}function urnuuidSerialize(uuidComponent){const urnComponent=uuidComponent;return urnComponent.nss=(uuidComponent.uuid||"").toLowerCase(),urnComponent}const http2={scheme:"http",domainHost:!0,parse:httpParse,serialize:httpSerialize},https={scheme:"https",domainHost:http2.domainHost,parse:httpParse,serialize:httpSerialize},ws={scheme:"ws",domainHost:!0,parse:wsParse,serialize:wsSerialize},wss={scheme:"wss",domainHost:ws.domainHost,parse:ws.parse,serialize:ws.serialize},SCHEMES={
http:http2,https,ws,wss,urn:{scheme:"urn",parse:urnParse,serialize:urnSerialize,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:urnuuidParse,serialize:urnuuidSerialize,skipNormalize:!0}};Object.setPrototypeOf(SCHEMES,null);function getSchemeHandler(scheme2){return scheme2&&(SCHEMES[scheme2]||SCHEMES[scheme2.toLowerCase()])||void 0}return schemes={wsIsSecure,SCHEMES,isValidSchemeName,getSchemeHandler},schemes}var hasRequiredFastUri;function requireFastUri(){if(hasRequiredFastUri)return fastUri.
exports;hasRequiredFastUri=1;const{normalizeIPv6,removeDotSegments,recomposeAuthority,normalizeComponentEncoding,isIPv4,nonSimpleDomain}=requireUtils(),{SCHEMES,getSchemeHandler}=requireSchemes();function normalize2(uri2,options){return typeof uri2=="string"?uri2=serialize2(parse2(uri2,options),options):typeof uri2=="object"&&(uri2=parse2(serialize2(uri2,options),options)),uri2}function resolve2(baseURI,relativeURI,options){const schemelessOptions=options?Object.assign({scheme:"null"},options):{
scheme:"null"},resolved=resolveComponent(parse2(baseURI,schemelessOptions),parse2(relativeURI,schemelessOptions),schemelessOptions,!0);return schemelessOptions.skipEscape=!0,serialize2(resolved,schemelessOptions)}function resolveComponent(base2,relative,options,skipNormalization){const target2={};return skipNormalization||(base2=parse2(serialize2(base2,options),options),relative=parse2(serialize2(relative,options),options)),options=options||{},!options.tolerant&&relative.scheme?(target2.scheme=relative.
scheme,target2.userinfo=relative.userinfo,target2.host=relative.host,target2.port=relative.port,target2.path=removeDotSegments(relative.path||""),target2.query=relative.query):(relative.userinfo!==void 0||relative.host!==void 0||relative.port!==void 0?(target2.userinfo=relative.userinfo,target2.host=relative.host,target2.port=relative.port,target2.path=removeDotSegments(relative.path||""),target2.query=relative.query):(relative.path?(relative.path[0]==="/"?target2.path=removeDotSegments(relative.
path):((base2.userinfo!==void 0||base2.host!==void 0||base2.port!==void 0)&&!base2.path?target2.path="/"+relative.path:base2.path?target2.path=base2.path.slice(0,base2.path.lastIndexOf("/")+1)+relative.path:target2.path=relative.path,target2.path=removeDotSegments(target2.path)),target2.query=relative.query):(target2.path=base2.path,relative.query!==void 0?target2.query=relative.query:target2.query=base2.query),target2.userinfo=base2.userinfo,target2.host=base2.host,target2.port=base2.port),target2.
scheme=base2.scheme),target2.fragment=relative.fragment,target2}function equal2(uriA,uriB,options){return typeof uriA=="string"?(uriA=unescape(uriA),uriA=serialize2(normalizeComponentEncoding(parse2(uriA,options),!0),{...options,skipEscape:!0})):typeof uriA=="object"&&(uriA=serialize2(normalizeComponentEncoding(uriA,!0),{...options,skipEscape:!0})),typeof uriB=="string"?(uriB=unescape(uriB),uriB=serialize2(normalizeComponentEncoding(parse2(uriB,options),!0),{...options,skipEscape:!0})):typeof uriB==
"object"&&(uriB=serialize2(normalizeComponentEncoding(uriB,!0),{...options,skipEscape:!0})),uriA.toLowerCase()===uriB.toLowerCase()}function serialize2(cmpts,opts){const component2={host:cmpts.host,scheme:cmpts.scheme,userinfo:cmpts.userinfo,port:cmpts.port,path:cmpts.path,query:cmpts.query,nid:cmpts.nid,nss:cmpts.nss,uuid:cmpts.uuid,fragment:cmpts.fragment,reference:cmpts.reference,resourceName:cmpts.resourceName,secure:cmpts.secure,error:""},options=Object.assign({},opts),uriTokens=[],schemeHandler=getSchemeHandler(
options.scheme||component2.scheme);schemeHandler&&schemeHandler.serialize&&schemeHandler.serialize(component2,options),component2.path!==void 0&&(options.skipEscape?component2.path=unescape(component2.path):(component2.path=escape(component2.path),component2.scheme!==void 0&&(component2.path=component2.path.split("%3A").join(":")))),options.reference!=="suffix"&&component2.scheme&&uriTokens.push(component2.scheme,":");const authority=recomposeAuthority(component2);if(authority!==void 0&&(options.
reference!=="suffix"&&uriTokens.push("//"),uriTokens.push(authority),component2.path&&component2.path[0]!=="/"&&uriTokens.push("/")),component2.path!==void 0){let s2=component2.path;!options.absolutePath&&(!schemeHandler||!schemeHandler.absolutePath)&&(s2=removeDotSegments(s2)),authority===void 0&&s2[0]==="/"&&s2[1]==="/"&&(s2="/%2F"+s2.slice(2)),uriTokens.push(s2)}return component2.query!==void 0&&uriTokens.push("?",component2.query),component2.fragment!==void 0&&uriTokens.push("#",component2.fragment),
uriTokens.join("")}const URI_PARSE=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function parse2(uri2,opts){const options=Object.assign({},opts),parsed={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let isIP=!1;options.reference==="suffix"&&(options.scheme?uri2=options.scheme+":"+uri2:uri2="//"+uri2);const matches2=uri2.match(URI_PARSE);if(matches2){if(parsed.scheme=matches2[1],
parsed.userinfo=matches2[3],parsed.host=matches2[4],parsed.port=parseInt(matches2[5],10),parsed.path=matches2[6]||"",parsed.query=matches2[7],parsed.fragment=matches2[8],isNaN(parsed.port)&&(parsed.port=matches2[5]),parsed.host)if(isIPv4(parsed.host)===!1){const ipv6result=normalizeIPv6(parsed.host);parsed.host=ipv6result.host.toLowerCase(),isIP=ipv6result.isIPV6}else isIP=!0;parsed.scheme===void 0&&parsed.userinfo===void 0&&parsed.host===void 0&&parsed.port===void 0&&parsed.query===void 0&&!parsed.
path?parsed.reference="same-document":parsed.scheme===void 0?parsed.reference="relative":parsed.fragment===void 0?parsed.reference="absolute":parsed.reference="uri",options.reference&&options.reference!=="suffix"&&options.reference!==parsed.reference&&(parsed.error=parsed.error||"URI is not a "+options.reference+" reference.");const schemeHandler=getSchemeHandler(options.scheme||parsed.scheme);if(!options.unicodeSupport&&(!schemeHandler||!schemeHandler.unicodeSupport)&&parsed.host&&(options.domainHost||
schemeHandler&&schemeHandler.domainHost)&&isIP===!1&&nonSimpleDomain(parsed.host))try{parsed.host=URL.domainToASCII(parsed.host.toLowerCase())}catch(e){parsed.error=parsed.error||"Host's domain name can not be converted to ASCII: "+e}(!schemeHandler||schemeHandler&&!schemeHandler.skipNormalize)&&(uri2.indexOf("%")!==-1&&(parsed.scheme!==void 0&&(parsed.scheme=unescape(parsed.scheme)),parsed.host!==void 0&&(parsed.host=unescape(parsed.host))),parsed.path&&(parsed.path=escape(unescape(parsed.path))),
parsed.fragment&&(parsed.fragment=encodeURI(decodeURIComponent(parsed.fragment)))),schemeHandler&&schemeHandler.parse&&schemeHandler.parse(parsed,options)}else parsed.error=parsed.error||"URI can not be parsed.";return parsed}const fastUri$1={SCHEMES,normalize:normalize2,resolve:resolve2,resolveComponent,equal:equal2,serialize:serialize2,parse:parse2};return fastUri.exports=fastUri$1,fastUri.exports.default=fastUri$1,fastUri.exports.fastUri=fastUri$1,fastUri.exports}var hasRequiredUri$1;function requireUri$1(){
if(hasRequiredUri$1)return uri$1;hasRequiredUri$1=1,Object.defineProperty(uri$1,"__esModule",{value:!0});const uri2=requireFastUri();return uri2.code='require("ajv/dist/runtime/uri").default',uri$1.default=uri2,uri$1}var hasRequiredCore$3;function requireCore$3(){return hasRequiredCore$3||(hasRequiredCore$3=1,(function(exports$1){Object.defineProperty(exports$1,"__esModule",{value:!0}),exports$1.CodeGen=exports$1.Name=exports$1.nil=exports$1.stringify=exports$1.str=exports$1._=exports$1.KeywordCxt=
void 0;var validate_1=requireValidate$1();Object.defineProperty(exports$1,"KeywordCxt",{enumerable:!0,get:function(){return validate_1.KeywordCxt}});var codegen_1=requireCodegen$1();Object.defineProperty(exports$1,"_",{enumerable:!0,get:function(){return codegen_1._}}),Object.defineProperty(exports$1,"str",{enumerable:!0,get:function(){return codegen_1.str}}),Object.defineProperty(exports$1,"stringify",{enumerable:!0,get:function(){return codegen_1.stringify}}),Object.defineProperty(exports$1,"n\
il",{enumerable:!0,get:function(){return codegen_1.nil}}),Object.defineProperty(exports$1,"Name",{enumerable:!0,get:function(){return codegen_1.Name}}),Object.defineProperty(exports$1,"CodeGen",{enumerable:!0,get:function(){return codegen_1.CodeGen}});const validation_error_1=requireValidation_error$1(),ref_error_1=requireRef_error$1(),rules_1=requireRules$1(),compile_1=requireCompile$1(),codegen_2=requireCodegen$1(),resolve_1=requireResolve$1(),dataType_1=requireDataType$1(),util_1=requireUtil$1(),
$dataRefSchema=require$$9$1,uri_1=requireUri$1(),defaultRegExp=(str,flags2)=>new RegExp(str,flags2);defaultRegExp.code="new RegExp";const META_IGNORE_OPTIONS=["removeAdditional","useDefaults","coerceTypes"],EXT_SCOPE_NAMES=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),removedOptions={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',
jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always v\
alidated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},deprecatedOptions={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},MAX_EXPRESSION=200;function requiredOptions(o){var _a2,_b,_c,_d,_e,_f,_g,_h,_j,_k,_l,_m,_o,_p,_q,_r,_s,_t,_u,_v,_w,
_x,_y,_z,_02;const s2=o.strict,_optz=(_a2=o.code)===null||_a2===void 0?void 0:_a2.optimize,optimize=_optz===!0||_optz===void 0?1:_optz||0,regExp=(_c=(_b=o.code)===null||_b===void 0?void 0:_b.regExp)!==null&&_c!==void 0?_c:defaultRegExp,uriResolver=(_d=o.uriResolver)!==null&&_d!==void 0?_d:uri_1.default;return{strictSchema:(_f=(_e=o.strictSchema)!==null&&_e!==void 0?_e:s2)!==null&&_f!==void 0?_f:!0,strictNumbers:(_h=(_g=o.strictNumbers)!==null&&_g!==void 0?_g:s2)!==null&&_h!==void 0?_h:!0,strictTypes:(_k=
(_j=o.strictTypes)!==null&&_j!==void 0?_j:s2)!==null&&_k!==void 0?_k:"log",strictTuples:(_m=(_l=o.strictTuples)!==null&&_l!==void 0?_l:s2)!==null&&_m!==void 0?_m:"log",strictRequired:(_p=(_o=o.strictRequired)!==null&&_o!==void 0?_o:s2)!==null&&_p!==void 0?_p:!1,code:o.code?{...o.code,optimize,regExp}:{optimize,regExp},loopRequired:(_q=o.loopRequired)!==null&&_q!==void 0?_q:MAX_EXPRESSION,loopEnum:(_r=o.loopEnum)!==null&&_r!==void 0?_r:MAX_EXPRESSION,meta:(_s=o.meta)!==null&&_s!==void 0?_s:!0,messages:(_t=
o.messages)!==null&&_t!==void 0?_t:!0,inlineRefs:(_u=o.inlineRefs)!==null&&_u!==void 0?_u:!0,schemaId:(_v=o.schemaId)!==null&&_v!==void 0?_v:"$id",addUsedSchema:(_w=o.addUsedSchema)!==null&&_w!==void 0?_w:!0,validateSchema:(_x=o.validateSchema)!==null&&_x!==void 0?_x:!0,validateFormats:(_y=o.validateFormats)!==null&&_y!==void 0?_y:!0,unicodeRegExp:(_z=o.unicodeRegExp)!==null&&_z!==void 0?_z:!0,int32range:(_02=o.int32range)!==null&&_02!==void 0?_02:!0,uriResolver}}class Ajv2{constructor(opts={}){
this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,opts=this.opts={...opts,...requiredOptions(opts)};const{es5,lines}=this.opts.code;this.scope=new codegen_2.ValueScope({scope:{},prefixes:EXT_SCOPE_NAMES,es5,lines}),this.logger=getLogger(opts.logger);const formatOpt=opts.validateFormats;opts.validateFormats=!1,this.RULES=(0,rules_1.getRules)(),checkOptions.call(this,removedOptions,opts,"NOT SUPPORTED"),checkOptions.call(this,deprecatedOptions,
opts,"DEPRECATED","warn"),this._metaOpts=getMetaSchemaOptions.call(this),opts.formats&&addInitialFormats.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),opts.keywords&&addInitialKeywords.call(this,opts.keywords),typeof opts.meta=="object"&&this.addMetaSchema(opts.meta),addInitialSchemas.call(this),opts.validateFormats=formatOpt}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data,meta,schemaId}=this.opts;let _dataRefSchema=$dataRefSchema;schemaId==="id"&&
(_dataRefSchema={...$dataRefSchema},_dataRefSchema.id=_dataRefSchema.$id,delete _dataRefSchema.$id),meta&&$data&&this.addMetaSchema(_dataRefSchema,_dataRefSchema[schemaId],!1)}defaultMeta(){const{meta,schemaId}=this.opts;return this.opts.defaultMeta=typeof meta=="object"?meta[schemaId]||meta:void 0}validate(schemaKeyRef,data){let v;if(typeof schemaKeyRef=="string"){if(v=this.getSchema(schemaKeyRef),!v)throw new Error(`no schema with key or ref "${schemaKeyRef}"`)}else v=this.compile(schemaKeyRef);
const valid2=v(data);return"$async"in v||(this.errors=v.errors),valid2}compile(schema,_meta){const sch=this._addSchema(schema,_meta);return sch.validate||this._compileSchemaEnv(sch)}compileAsync(schema,meta){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema}=this.opts;return runCompileAsync.call(this,schema,meta);async function runCompileAsync(_schema,_meta){await loadMetaSchema.call(this,_schema.$schema);const sch=this._addSchema(
_schema,_meta);return sch.validate||_compileAsync.call(this,sch)}async function loadMetaSchema($ref){$ref&&!this.getSchema($ref)&&await runCompileAsync.call(this,{$ref},!0)}async function _compileAsync(sch){try{return this._compileSchemaEnv(sch)}catch(e){if(!(e instanceof ref_error_1.default))throw e;return checkLoaded.call(this,e),await loadMissingSchema.call(this,e.missingSchema),_compileAsync.call(this,sch)}}function checkLoaded({missingSchema:ref2,missingRef}){if(this.refs[ref2])throw new Error(
`AnySchema ${ref2} is loaded but ${missingRef} cannot be resolved`)}async function loadMissingSchema(ref2){const _schema=await _loadSchema.call(this,ref2);this.refs[ref2]||await loadMetaSchema.call(this,_schema.$schema),this.refs[ref2]||this.addSchema(_schema,ref2,meta)}async function _loadSchema(ref2){const p2=this._loading[ref2];if(p2)return p2;try{return await(this._loading[ref2]=loadSchema(ref2))}finally{delete this._loading[ref2]}}}addSchema(schema,key2,_meta,_validateSchema=this.opts.validateSchema){
if(Array.isArray(schema)){for(const sch of schema)this.addSchema(sch,void 0,_meta,_validateSchema);return this}let id2;if(typeof schema=="object"){const{schemaId}=this.opts;if(id2=schema[schemaId],id2!==void 0&&typeof id2!="string")throw new Error(`schema ${schemaId} must be string`)}return key2=(0,resolve_1.normalizeId)(key2||id2),this._checkUnique(key2),this.schemas[key2]=this._addSchema(schema,_meta,key2,_validateSchema,!0),this}addMetaSchema(schema,key2,_validateSchema=this.opts.validateSchema){
return this.addSchema(schema,key2,!0,_validateSchema),this}validateSchema(schema,throwOrLogError){if(typeof schema=="boolean")return!0;let $schema2;if($schema2=schema.$schema,$schema2!==void 0&&typeof $schema2!="string")throw new Error("$schema must be a string");if($schema2=$schema2||this.opts.defaultMeta||this.defaultMeta(),!$schema2)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const valid2=this.validate($schema2,schema);if(!valid2&&throwOrLogError){const message="s\
chema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(message);else throw new Error(message)}return valid2}getSchema(keyRef){let sch;for(;typeof(sch=getSchEnv.call(this,keyRef))=="string";)keyRef=sch;if(sch===void 0){const{schemaId}=this.opts,root2=new compile_1.SchemaEnv({schema:{},schemaId});if(sch=compile_1.resolveSchema.call(this,root2,keyRef),!sch)return;this.refs[keyRef]=sch}return sch.validate||this._compileSchemaEnv(sch)}removeSchema(schemaKeyRef){if(schemaKeyRef instanceof
RegExp)return this._removeAllSchemas(this.schemas,schemaKeyRef),this._removeAllSchemas(this.refs,schemaKeyRef),this;switch(typeof schemaKeyRef){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const sch=getSchEnv.call(this,schemaKeyRef);return typeof sch=="object"&&this._cache.delete(sch.schema),delete this.schemas[schemaKeyRef],delete this.refs[schemaKeyRef],this}case"object":{const cacheKey=schemaKeyRef;this._cache.
delete(cacheKey);let id2=schemaKeyRef[this.opts.schemaId];return id2&&(id2=(0,resolve_1.normalizeId)(id2),delete this.schemas[id2],delete this.refs[id2]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(definitions2){for(const def of definitions2)this.addKeyword(def);return this}addKeyword(kwdOrDef,def){let keyword2;if(typeof kwdOrDef=="string")keyword2=kwdOrDef,typeof def=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),def.
keyword=keyword2);else if(typeof kwdOrDef=="object"&&def===void 0){if(def=kwdOrDef,keyword2=def.keyword,Array.isArray(keyword2)&&!keyword2.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(checkKeyword.call(this,keyword2,def),!def)return(0,util_1.eachItem)(keyword2,kwd=>addRule.call(this,kwd)),this;keywordMetaschema.call(this,def);const definition2={...def,type:(0,dataType_1.getJSONTypes)(def.type),schemaType:(0,dataType_1.
getJSONTypes)(def.schemaType)};return(0,util_1.eachItem)(keyword2,definition2.type.length===0?k=>addRule.call(this,k,definition2):k=>definition2.type.forEach(t=>addRule.call(this,k,definition2,t))),this}getKeyword(keyword2){const rule=this.RULES.all[keyword2];return typeof rule=="object"?rule.definition:!!rule}removeKeyword(keyword2){const{RULES}=this;delete RULES.keywords[keyword2],delete RULES.all[keyword2];for(const group of RULES.rules){const i=group.rules.findIndex(rule=>rule.keyword===keyword2);
i>=0&&group.rules.splice(i,1)}return this}addFormat(name,format2){return typeof format2=="string"&&(format2=new RegExp(format2)),this.formats[name]=format2,this}errorsText(errors2=this.errors,{separator=", ",dataVar="data"}={}){return!errors2||errors2.length===0?"No errors":errors2.map(e=>`${dataVar}${e.instancePath} ${e.message}`).reduce((text2,msg)=>text2+separator+msg)}$dataMetaSchema(metaSchema,keywordsJsonPointers){const rules2=this.RULES.all;metaSchema=JSON.parse(JSON.stringify(metaSchema));
for(const jsonPointer of keywordsJsonPointers){const segments=jsonPointer.split("/").slice(1);let keywords2=metaSchema;for(const seg of segments)keywords2=keywords2[seg];for(const key2 in rules2){const rule=rules2[key2];if(typeof rule!="object")continue;const{$data}=rule.definition,schema=keywords2[key2];$data&&schema&&(keywords2[key2]=schemaOrData(schema))}}return metaSchema}_removeAllSchemas(schemas,regex){for(const keyRef in schemas){const sch=schemas[keyRef];(!regex||regex.test(keyRef))&&(typeof sch==
"string"?delete schemas[keyRef]:sch&&!sch.meta&&(this._cache.delete(sch.schema),delete schemas[keyRef]))}}_addSchema(schema,meta,baseId,validateSchema=this.opts.validateSchema,addSchema=this.opts.addUsedSchema){let id2;const{schemaId}=this.opts;if(typeof schema=="object")id2=schema[schemaId];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof schema!="boolean")throw new Error("schema must be object or boolean")}let sch=this._cache.get(schema);if(sch!==void 0)return sch;baseId=
(0,resolve_1.normalizeId)(id2||baseId);const localRefs=resolve_1.getSchemaRefs.call(this,schema,baseId);return sch=new compile_1.SchemaEnv({schema,schemaId,meta,baseId,localRefs}),this._cache.set(sch.schema,sch),addSchema&&!baseId.startsWith("#")&&(baseId&&this._checkUnique(baseId),this.refs[baseId]=sch),validateSchema&&this.validateSchema(schema,!0),sch}_checkUnique(id2){if(this.schemas[id2]||this.refs[id2])throw new Error(`schema with key or id "${id2}" already exists`)}_compileSchemaEnv(sch){
if(sch.meta?this._compileMetaSchema(sch):compile_1.compileSchema.call(this,sch),!sch.validate)throw new Error("ajv implementation error");return sch.validate}_compileMetaSchema(sch){const currentOpts=this.opts;this.opts=this._metaOpts;try{compile_1.compileSchema.call(this,sch)}finally{this.opts=currentOpts}}}Ajv2.ValidationError=validation_error_1.default,Ajv2.MissingRefError=ref_error_1.default,exports$1.default=Ajv2;function checkOptions(checkOpts,options,msg,log="error"){for(const key2 in checkOpts){
const opt=key2;opt in options&&this.logger[log](`${msg}: option ${key2}. ${checkOpts[opt]}`)}}function getSchEnv(keyRef){return keyRef=(0,resolve_1.normalizeId)(keyRef),this.schemas[keyRef]||this.refs[keyRef]}function addInitialSchemas(){const optsSchemas=this.opts.schemas;if(optsSchemas)if(Array.isArray(optsSchemas))this.addSchema(optsSchemas);else for(const key2 in optsSchemas)this.addSchema(optsSchemas[key2],key2)}function addInitialFormats(){for(const name in this.opts.formats){const format2=this.
opts.formats[name];format2&&this.addFormat(name,format2)}}function addInitialKeywords(defs){if(Array.isArray(defs)){this.addVocabulary(defs);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const keyword2 in defs){const def=defs[keyword2];def.keyword||(def.keyword=keyword2),this.addKeyword(def)}}function getMetaSchemaOptions(){const metaOpts={...this.opts};for(const opt of META_IGNORE_OPTIONS)delete metaOpts[opt];return metaOpts}const noLogs={log(){},warn(){},error(){}};
function getLogger(logger){if(logger===!1)return noLogs;if(logger===void 0)return console;if(logger.log&&logger.warn&&logger.error)return logger;throw new Error("logger must implement log, warn and error methods")}const KEYWORD_NAME=/^[a-z_$][a-z0-9_$:-]*$/i;function checkKeyword(keyword2,def){const{RULES}=this;if((0,util_1.eachItem)(keyword2,kwd=>{if(RULES.keywords[kwd])throw new Error(`Keyword ${kwd} is already defined`);if(!KEYWORD_NAME.test(kwd))throw new Error(`Keyword ${kwd} has invalid na\
me`)}),!!def&&def.$data&&!("code"in def||"validate"in def))throw new Error('$data keyword must have "code" or "validate" function')}function addRule(keyword2,definition2,dataType2){var _a2;const post=definition2?.post;if(dataType2&&post)throw new Error('keyword with "post" flag cannot have "type"');const{RULES}=this;let ruleGroup=post?RULES.post:RULES.rules.find(({type:t})=>t===dataType2);if(ruleGroup||(ruleGroup={type:dataType2,rules:[]},RULES.rules.push(ruleGroup)),RULES.keywords[keyword2]=!0,
!definition2)return;const rule={keyword:keyword2,definition:{...definition2,type:(0,dataType_1.getJSONTypes)(definition2.type),schemaType:(0,dataType_1.getJSONTypes)(definition2.schemaType)}};definition2.before?addBeforeRule.call(this,ruleGroup,rule,definition2.before):ruleGroup.rules.push(rule),RULES.all[keyword2]=rule,(_a2=definition2.implements)===null||_a2===void 0||_a2.forEach(kwd=>this.addKeyword(kwd))}function addBeforeRule(ruleGroup,rule,before){const i=ruleGroup.rules.findIndex(_rule=>_rule.
keyword===before);i>=0?ruleGroup.rules.splice(i,0,rule):(ruleGroup.rules.push(rule),this.logger.warn(`rule ${before} is not defined`))}function keywordMetaschema(def){let{metaSchema}=def;metaSchema!==void 0&&(def.$data&&this.opts.$data&&(metaSchema=schemaOrData(metaSchema)),def.validateSchema=this.compile(metaSchema,!0))}const $dataRef={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function schemaOrData(schema){return{anyOf:[schema,$dataRef]}}})(core$4)),
core$4}var draft7$1={},core$3={},id$1={},hasRequiredId$1;function requireId$1(){if(hasRequiredId$1)return id$1;hasRequiredId$1=1,Object.defineProperty(id$1,"__esModule",{value:!0});const def={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return id$1.default=def,id$1}var ref$1={},hasRequiredRef$1;function requireRef$1(){if(hasRequiredRef$1)return ref$1;hasRequiredRef$1=1,Object.defineProperty(ref$1,"__esModule",{value:!0}),ref$1.callRef=ref$1.getValidate=
void 0;const ref_error_1=requireRef_error$1(),code_1=requireCode$2(),codegen_1=requireCodegen$1(),names_1=requireNames$1(),compile_1=requireCompile$1(),util_1=requireUtil$1(),def={keyword:"$ref",schemaType:"string",code(cxt){const{gen,schema:$ref,it}=cxt,{baseId,schemaEnv:env2,validateName,opts,self:self2}=it,{root:root2}=env2;if(($ref==="#"||$ref==="#/")&&baseId===root2.baseId)return callRootRef();const schOrEnv=compile_1.resolveRef.call(self2,root2,baseId,$ref);if(schOrEnv===void 0)throw new ref_error_1.
default(it.opts.uriResolver,baseId,$ref);if(schOrEnv instanceof compile_1.SchemaEnv)return callValidate(schOrEnv);return inlineRefSchema(schOrEnv);function callRootRef(){if(env2===root2)return callRef(cxt,validateName,env2,env2.$async);const rootName=gen.scopeValue("root",{ref:root2});return callRef(cxt,(0,codegen_1._)`${rootName}.validate`,root2,root2.$async)}function callValidate(sch){const v=getValidate(cxt,sch);callRef(cxt,v,sch,sch.$async)}function inlineRefSchema(sch){const schName=gen.scopeValue(
"schema",opts.code.source===!0?{ref:sch,code:(0,codegen_1.stringify)(sch)}:{ref:sch}),valid2=gen.name("valid"),schCxt=cxt.subschema({schema:sch,dataTypes:[],schemaPath:codegen_1.nil,topSchemaRef:schName,errSchemaPath:$ref},valid2);cxt.mergeEvaluated(schCxt),cxt.ok(valid2)}}};function getValidate(cxt,sch){const{gen}=cxt;return sch.validate?gen.scopeValue("validate",{ref:sch.validate}):(0,codegen_1._)`${gen.scopeValue("wrapper",{ref:sch})}.validate`}ref$1.getValidate=getValidate;function callRef(cxt,v,sch,$async){
const{gen,it}=cxt,{allErrors,schemaEnv:env2,opts}=it,passCxt=opts.passContext?names_1.default.this:codegen_1.nil;$async?callAsyncRef():callSyncRef();function callAsyncRef(){if(!env2.$async)throw new Error("async schema referenced by sync schema");const valid2=gen.let("valid");gen.try(()=>{gen.code((0,codegen_1._)`await ${(0,code_1.callValidateCode)(cxt,v,passCxt)}`),addEvaluatedFrom(v),allErrors||gen.assign(valid2,!0)},e=>{gen.if((0,codegen_1._)`!(${e} instanceof ${it.ValidationError})`,()=>gen.
throw(e)),addErrorsFrom(e),allErrors||gen.assign(valid2,!1)}),cxt.ok(valid2)}function callSyncRef(){cxt.result((0,code_1.callValidateCode)(cxt,v,passCxt),()=>addEvaluatedFrom(v),()=>addErrorsFrom(v))}function addErrorsFrom(source2){const errs=(0,codegen_1._)`${source2}.errors`;gen.assign(names_1.default.vErrors,(0,codegen_1._)`${names_1.default.vErrors} === null ? ${errs} : ${names_1.default.vErrors}.concat(${errs})`),gen.assign(names_1.default.errors,(0,codegen_1._)`${names_1.default.vErrors}.length`)}
function addEvaluatedFrom(source2){var _a2;if(!it.opts.unevaluated)return;const schEvaluated=(_a2=sch?.validate)===null||_a2===void 0?void 0:_a2.evaluated;if(it.props!==!0)if(schEvaluated&&!schEvaluated.dynamicProps)schEvaluated.props!==void 0&&(it.props=util_1.mergeEvaluated.props(gen,schEvaluated.props,it.props));else{const props=gen.var("props",(0,codegen_1._)`${source2}.evaluated.props`);it.props=util_1.mergeEvaluated.props(gen,props,it.props,codegen_1.Name)}if(it.items!==!0)if(schEvaluated&&
!schEvaluated.dynamicItems)schEvaluated.items!==void 0&&(it.items=util_1.mergeEvaluated.items(gen,schEvaluated.items,it.items));else{const items2=gen.var("items",(0,codegen_1._)`${source2}.evaluated.items`);it.items=util_1.mergeEvaluated.items(gen,items2,it.items,codegen_1.Name)}}}return ref$1.callRef=callRef,ref$1.default=def,ref$1}var hasRequiredCore$2;function requireCore$2(){if(hasRequiredCore$2)return core$3;hasRequiredCore$2=1,Object.defineProperty(core$3,"__esModule",{value:!0});const id_1=requireId$1(),
ref_1=requireRef$1(),core2=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",id_1.default,ref_1.default];return core$3.default=core2,core$3}var validation$1={},limitNumber$1={},hasRequiredLimitNumber$1;function requireLimitNumber$1(){if(hasRequiredLimitNumber$1)return limitNumber$1;hasRequiredLimitNumber$1=1,Object.defineProperty(limitNumber$1,"__esModule",{value:!0});const codegen_1=requireCodegen$1(),ops=codegen_1.operators,KWDs={maximum:{okStr:"<=",ok:ops.LTE,fail:ops.
GT},minimum:{okStr:">=",ok:ops.GTE,fail:ops.LT},exclusiveMaximum:{okStr:"<",ok:ops.LT,fail:ops.GTE},exclusiveMinimum:{okStr:">",ok:ops.GT,fail:ops.LTE}},error2={message:({keyword:keyword2,schemaCode})=>(0,codegen_1.str)`must be ${KWDs[keyword2].okStr} ${schemaCode}`,params:({keyword:keyword2,schemaCode})=>(0,codegen_1._)`{comparison: ${KWDs[keyword2].okStr}, limit: ${schemaCode}}`},def={keyword:Object.keys(KWDs),type:"number",schemaType:"number",$data:!0,error:error2,code(cxt){const{keyword:keyword2,
data,schemaCode}=cxt;cxt.fail$data((0,codegen_1._)`${data} ${KWDs[keyword2].fail} ${schemaCode} || isNaN(${data})`)}};return limitNumber$1.default=def,limitNumber$1}var multipleOf$1={},hasRequiredMultipleOf$1;function requireMultipleOf$1(){if(hasRequiredMultipleOf$1)return multipleOf$1;hasRequiredMultipleOf$1=1,Object.defineProperty(multipleOf$1,"__esModule",{value:!0});const codegen_1=requireCodegen$1(),def={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode})=>(0,codegen_1.
str)`must be multiple of ${schemaCode}`,params:({schemaCode})=>(0,codegen_1._)`{multipleOf: ${schemaCode}}`},code(cxt){const{gen,data,schemaCode,it}=cxt,prec=it.opts.multipleOfPrecision,res=gen.let("res"),invalid2=prec?(0,codegen_1._)`Math.abs(Math.round(${res}) - ${res}) > 1e-${prec}`:(0,codegen_1._)`${res} !== parseInt(${res})`;cxt.fail$data((0,codegen_1._)`(${schemaCode} === 0 || (${res} = ${data}/${schemaCode}, ${invalid2}))`)}};return multipleOf$1.default=def,multipleOf$1}var limitLength$1={},
ucs2length$1={},hasRequiredUcs2length$1;function requireUcs2length$1(){if(hasRequiredUcs2length$1)return ucs2length$1;hasRequiredUcs2length$1=1,Object.defineProperty(ucs2length$1,"__esModule",{value:!0});function ucs2length2(str){const len=str.length;let length=0,pos=0,value;for(;pos<len;)length++,value=str.charCodeAt(pos++),value>=55296&&value<=56319&&pos<len&&(value=str.charCodeAt(pos),(value&64512)===56320&&pos++);return length}return ucs2length$1.default=ucs2length2,ucs2length2.code='require\
("ajv/dist/runtime/ucs2length").default',ucs2length$1}var hasRequiredLimitLength$1;function requireLimitLength$1(){if(hasRequiredLimitLength$1)return limitLength$1;hasRequiredLimitLength$1=1,Object.defineProperty(limitLength$1,"__esModule",{value:!0});const codegen_1=requireCodegen$1(),util_1=requireUtil$1(),ucs2length_1=requireUcs2length$1(),def={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:keyword2,schemaCode}){const comp=keyword2==="maxL\
ength"?"more":"fewer";return(0,codegen_1.str)`must NOT have ${comp} than ${schemaCode} characters`},params:({schemaCode})=>(0,codegen_1._)`{limit: ${schemaCode}}`},code(cxt){const{keyword:keyword2,data,schemaCode,it}=cxt,op2=keyword2==="maxLength"?codegen_1.operators.GT:codegen_1.operators.LT,len=it.opts.unicode===!1?(0,codegen_1._)`${data}.length`:(0,codegen_1._)`${(0,util_1.useFunc)(cxt.gen,ucs2length_1.default)}(${data})`;cxt.fail$data((0,codegen_1._)`${len} ${op2} ${schemaCode}`)}};return limitLength$1.
default=def,limitLength$1}var pattern$1={},hasRequiredPattern$1;function requirePattern$1(){if(hasRequiredPattern$1)return pattern$1;hasRequiredPattern$1=1,Object.defineProperty(pattern$1,"__esModule",{value:!0});const code_1=requireCode$2(),util_1=requireUtil$1(),codegen_1=requireCodegen$1(),def={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode})=>(0,codegen_1.str)`must match pattern "${schemaCode}"`,params:({schemaCode})=>(0,codegen_1._)`{pattern: ${schemaCode}}`},
code(cxt){const{gen,data,$data,schema,schemaCode,it}=cxt,u=it.opts.unicodeRegExp?"u":"";if($data){const{regExp}=it.opts.code,regExpCode=regExp.code==="new RegExp"?(0,codegen_1._)`new RegExp`:(0,util_1.useFunc)(gen,regExp),valid2=gen.let("valid");gen.try(()=>gen.assign(valid2,(0,codegen_1._)`${regExpCode}(${schemaCode}, ${u}).test(${data})`),()=>gen.assign(valid2,!1)),cxt.fail$data((0,codegen_1._)`!${valid2}`)}else{const regExp=(0,code_1.usePattern)(cxt,schema);cxt.fail$data((0,codegen_1._)`!${regExp}.test(${data})`)}}};
return pattern$1.default=def,pattern$1}var limitProperties$1={},hasRequiredLimitProperties$1;function requireLimitProperties$1(){if(hasRequiredLimitProperties$1)return limitProperties$1;hasRequiredLimitProperties$1=1,Object.defineProperty(limitProperties$1,"__esModule",{value:!0});const codegen_1=requireCodegen$1(),def={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:keyword2,schemaCode}){const comp=keyword2==="maxProperties"?"more":"f\
ewer";return(0,codegen_1.str)`must NOT have ${comp} than ${schemaCode} properties`},params:({schemaCode})=>(0,codegen_1._)`{limit: ${schemaCode}}`},code(cxt){const{keyword:keyword2,data,schemaCode}=cxt,op2=keyword2==="maxProperties"?codegen_1.operators.GT:codegen_1.operators.LT;cxt.fail$data((0,codegen_1._)`Object.keys(${data}).length ${op2} ${schemaCode}`)}};return limitProperties$1.default=def,limitProperties$1}var required$2={},hasRequiredRequired$1;function requireRequired$1(){if(hasRequiredRequired$1)
return required$2;hasRequiredRequired$1=1,Object.defineProperty(required$2,"__esModule",{value:!0});const code_1=requireCode$2(),codegen_1=requireCodegen$1(),util_1=requireUtil$1(),def={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty}})=>(0,codegen_1.str)`must have required property '${missingProperty}'`,params:({params:{missingProperty}})=>(0,codegen_1._)`{missingProperty: ${missingProperty}}`},code(cxt){const{gen,schema,schemaCode,data,$data,
it}=cxt,{opts}=it;if(!$data&&schema.length===0)return;const useLoop=schema.length>=opts.loopRequired;if(it.allErrors?allErrorsMode():exitOnErrorMode(),opts.strictRequired){const props=cxt.parentSchema.properties,{definedProperties}=cxt.it;for(const requiredKey of schema)if(props?.[requiredKey]===void 0&&!definedProperties.has(requiredKey)){const schemaPath=it.schemaEnv.baseId+it.errSchemaPath,msg=`required property "${requiredKey}" is not defined at "${schemaPath}" (strictRequired)`;(0,util_1.checkStrictMode)(
it,msg,it.opts.strictRequired)}}function allErrorsMode(){if(useLoop||$data)cxt.block$data(codegen_1.nil,loopAllRequired);else for(const prop2 of schema)(0,code_1.checkReportMissingProp)(cxt,prop2)}function exitOnErrorMode(){const missing=gen.let("missing");if(useLoop||$data){const valid2=gen.let("valid",!0);cxt.block$data(valid2,()=>loopUntilMissing(missing,valid2)),cxt.ok(valid2)}else gen.if((0,code_1.checkMissingProp)(cxt,schema,missing)),(0,code_1.reportMissingProp)(cxt,missing),gen.else()}function loopAllRequired(){
gen.forOf("prop",schemaCode,prop2=>{cxt.setParams({missingProperty:prop2}),gen.if((0,code_1.noPropertyInData)(gen,data,prop2,opts.ownProperties),()=>cxt.error())})}function loopUntilMissing(missing,valid2){cxt.setParams({missingProperty:missing}),gen.forOf(missing,schemaCode,()=>{gen.assign(valid2,(0,code_1.propertyInData)(gen,data,missing,opts.ownProperties)),gen.if((0,codegen_1.not)(valid2),()=>{cxt.error(),gen.break()})},codegen_1.nil)}}};return required$2.default=def,required$2}var limitItems$1={},
hasRequiredLimitItems$1;function requireLimitItems$1(){if(hasRequiredLimitItems$1)return limitItems$1;hasRequiredLimitItems$1=1,Object.defineProperty(limitItems$1,"__esModule",{value:!0});const codegen_1=requireCodegen$1(),def={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:keyword2,schemaCode}){const comp=keyword2==="maxItems"?"more":"fewer";return(0,codegen_1.str)`must NOT have ${comp} than ${schemaCode} items`},params:({schemaCode})=>(0,codegen_1.
_)`{limit: ${schemaCode}}`},code(cxt){const{keyword:keyword2,data,schemaCode}=cxt,op2=keyword2==="maxItems"?codegen_1.operators.GT:codegen_1.operators.LT;cxt.fail$data((0,codegen_1._)`${data}.length ${op2} ${schemaCode}`)}};return limitItems$1.default=def,limitItems$1}var uniqueItems$1={},equal$1={},hasRequiredEqual$1;function requireEqual$1(){if(hasRequiredEqual$1)return equal$1;hasRequiredEqual$1=1,Object.defineProperty(equal$1,"__esModule",{value:!0});const equal2=requireFastDeepEqual();return equal2.
code='require("ajv/dist/runtime/equal").default',equal$1.default=equal2,equal$1}var hasRequiredUniqueItems$1;function requireUniqueItems$1(){if(hasRequiredUniqueItems$1)return uniqueItems$1;hasRequiredUniqueItems$1=1,Object.defineProperty(uniqueItems$1,"__esModule",{value:!0});const dataType_1=requireDataType$1(),codegen_1=requireCodegen$1(),util_1=requireUtil$1(),equal_1=requireEqual$1(),def={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i,j}})=>(0,codegen_1.
str)`must NOT have duplicate items (items ## ${j} and ${i} are identical)`,params:({params:{i,j}})=>(0,codegen_1._)`{i: ${i}, j: ${j}}`},code(cxt){const{gen,data,$data,schema,parentSchema,schemaCode,it}=cxt;if(!$data&&!schema)return;const valid2=gen.let("valid"),itemTypes=parentSchema.items?(0,dataType_1.getSchemaTypes)(parentSchema.items):[];cxt.block$data(valid2,validateUniqueItems,(0,codegen_1._)`${schemaCode} === false`),cxt.ok(valid2);function validateUniqueItems(){const i=gen.let("i",(0,codegen_1.
_)`${data}.length`),j=gen.let("j");cxt.setParams({i,j}),gen.assign(valid2,!0),gen.if((0,codegen_1._)`${i} > 1`,()=>(canOptimize()?loopN:loopN2)(i,j))}function canOptimize(){return itemTypes.length>0&&!itemTypes.some(t=>t==="object"||t==="array")}function loopN(i,j){const item=gen.name("item"),wrongType=(0,dataType_1.checkDataTypes)(itemTypes,item,it.opts.strictNumbers,dataType_1.DataType.Wrong),indices=gen.const("indices",(0,codegen_1._)`{}`);gen.for((0,codegen_1._)`;${i}--;`,()=>{gen.let(item,(0,codegen_1.
_)`${data}[${i}]`),gen.if(wrongType,(0,codegen_1._)`continue`),itemTypes.length>1&&gen.if((0,codegen_1._)`typeof ${item} == "string"`,(0,codegen_1._)`${item} += "_"`),gen.if((0,codegen_1._)`typeof ${indices}[${item}] == "number"`,()=>{gen.assign(j,(0,codegen_1._)`${indices}[${item}]`),cxt.error(),gen.assign(valid2,!1).break()}).code((0,codegen_1._)`${indices}[${item}] = ${i}`)})}function loopN2(i,j){const eql=(0,util_1.useFunc)(gen,equal_1.default),outer=gen.name("outer");gen.label(outer).for((0,codegen_1.
_)`;${i}--;`,()=>gen.for((0,codegen_1._)`${j} = ${i}; ${j}--;`,()=>gen.if((0,codegen_1._)`${eql}(${data}[${i}], ${data}[${j}])`,()=>{cxt.error(),gen.assign(valid2,!1).break(outer)})))}}};return uniqueItems$1.default=def,uniqueItems$1}var _const$1={},hasRequired_const$1;function require_const$1(){if(hasRequired_const$1)return _const$1;hasRequired_const$1=1,Object.defineProperty(_const$1,"__esModule",{value:!0});const codegen_1=requireCodegen$1(),util_1=requireUtil$1(),equal_1=requireEqual$1(),def={
keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode})=>(0,codegen_1._)`{allowedValue: ${schemaCode}}`},code(cxt){const{gen,data,$data,schemaCode,schema}=cxt;$data||schema&&typeof schema=="object"?cxt.fail$data((0,codegen_1._)`!${(0,util_1.useFunc)(gen,equal_1.default)}(${data}, ${schemaCode})`):cxt.fail((0,codegen_1._)`${schema} !== ${data}`)}};return _const$1.default=def,_const$1}var _enum$1={},hasRequired_enum$1;function require_enum$1(){if(hasRequired_enum$1)
return _enum$1;hasRequired_enum$1=1,Object.defineProperty(_enum$1,"__esModule",{value:!0});const codegen_1=requireCodegen$1(),util_1=requireUtil$1(),equal_1=requireEqual$1(),def={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode})=>(0,codegen_1._)`{allowedValues: ${schemaCode}}`},code(cxt){const{gen,data,$data,schema,schemaCode,it}=cxt;if(!$data&&schema.length===0)throw new Error("enum must have non-empty array");const useLoop=schema.
length>=it.opts.loopEnum;let eql;const getEql=()=>eql??(eql=(0,util_1.useFunc)(gen,equal_1.default));let valid2;if(useLoop||$data)valid2=gen.let("valid"),cxt.block$data(valid2,loopEnum);else{if(!Array.isArray(schema))throw new Error("ajv implementation error");const vSchema=gen.const("vSchema",schemaCode);valid2=(0,codegen_1.or)(...schema.map((_x,i)=>equalCode(vSchema,i)))}cxt.pass(valid2);function loopEnum(){gen.assign(valid2,!1),gen.forOf("v",schemaCode,v=>gen.if((0,codegen_1._)`${getEql()}(${data}, ${v})`,
()=>gen.assign(valid2,!0).break()))}function equalCode(vSchema,i){const sch=schema[i];return typeof sch=="object"&&sch!==null?(0,codegen_1._)`${getEql()}(${data}, ${vSchema}[${i}])`:(0,codegen_1._)`${data} === ${sch}`}}};return _enum$1.default=def,_enum$1}var hasRequiredValidation$1;function requireValidation$1(){if(hasRequiredValidation$1)return validation$1;hasRequiredValidation$1=1,Object.defineProperty(validation$1,"__esModule",{value:!0});const limitNumber_1=requireLimitNumber$1(),multipleOf_1=requireMultipleOf$1(),
limitLength_1=requireLimitLength$1(),pattern_1=requirePattern$1(),limitProperties_1=requireLimitProperties$1(),required_1=requireRequired$1(),limitItems_1=requireLimitItems$1(),uniqueItems_1=requireUniqueItems$1(),const_1=require_const$1(),enum_1=require_enum$1(),validation2=[limitNumber_1.default,multipleOf_1.default,limitLength_1.default,pattern_1.default,limitProperties_1.default,required_1.default,limitItems_1.default,uniqueItems_1.default,{keyword:"type",schemaType:["string","array"]},{keyword:"\
nullable",schemaType:"boolean"},const_1.default,enum_1.default];return validation$1.default=validation2,validation$1}var applicator$1={},additionalItems$1={},hasRequiredAdditionalItems$1;function requireAdditionalItems$1(){if(hasRequiredAdditionalItems$1)return additionalItems$1;hasRequiredAdditionalItems$1=1,Object.defineProperty(additionalItems$1,"__esModule",{value:!0}),additionalItems$1.validateAdditionalItems=void 0;const codegen_1=requireCodegen$1(),util_1=requireUtil$1(),def={keyword:"add\
itionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len}})=>(0,codegen_1.str)`must NOT have more than ${len} items`,params:({params:{len}})=>(0,codegen_1._)`{limit: ${len}}`},code(cxt){const{parentSchema,it}=cxt,{items:items2}=parentSchema;if(!Array.isArray(items2)){(0,util_1.checkStrictMode)(it,'"additionalItems" is ignored when "items" is not an array of schemas');return}validateAdditionalItems(cxt,items2)}};function validateAdditionalItems(cxt,items2){
const{gen,schema,data,keyword:keyword2,it}=cxt;it.items=!0;const len=gen.const("len",(0,codegen_1._)`${data}.length`);if(schema===!1)cxt.setParams({len:items2.length}),cxt.pass((0,codegen_1._)`${len} <= ${items2.length}`);else if(typeof schema=="object"&&!(0,util_1.alwaysValidSchema)(it,schema)){const valid2=gen.var("valid",(0,codegen_1._)`${len} <= ${items2.length}`);gen.if((0,codegen_1.not)(valid2),()=>validateItems(valid2)),cxt.ok(valid2)}function validateItems(valid2){gen.forRange("i",items2.
length,len,i=>{cxt.subschema({keyword:keyword2,dataProp:i,dataPropType:util_1.Type.Num},valid2),it.allErrors||gen.if((0,codegen_1.not)(valid2),()=>gen.break())})}}return additionalItems$1.validateAdditionalItems=validateAdditionalItems,additionalItems$1.default=def,additionalItems$1}var prefixItems$1={},items$1={},hasRequiredItems$1;function requireItems$1(){if(hasRequiredItems$1)return items$1;hasRequiredItems$1=1,Object.defineProperty(items$1,"__esModule",{value:!0}),items$1.validateTuple=void 0;
const codegen_1=requireCodegen$1(),util_1=requireUtil$1(),code_1=requireCode$2(),def={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(cxt){const{schema,it}=cxt;if(Array.isArray(schema))return validateTuple(cxt,"additionalItems",schema);it.items=!0,!(0,util_1.alwaysValidSchema)(it,schema)&&cxt.ok((0,code_1.validateArray)(cxt))}};function validateTuple(cxt,extraItems,schArr=cxt.schema){const{gen,parentSchema,data,keyword:keyword2,it}=cxt;checkStrictTuple(
parentSchema),it.opts.unevaluated&&schArr.length&&it.items!==!0&&(it.items=util_1.mergeEvaluated.items(gen,schArr.length,it.items));const valid2=gen.name("valid"),len=gen.const("len",(0,codegen_1._)`${data}.length`);schArr.forEach((sch,i)=>{(0,util_1.alwaysValidSchema)(it,sch)||(gen.if((0,codegen_1._)`${len} > ${i}`,()=>cxt.subschema({keyword:keyword2,schemaProp:i,dataProp:i},valid2)),cxt.ok(valid2))});function checkStrictTuple(sch){const{opts,errSchemaPath}=it,l=schArr.length,fullTuple=l===sch.
minItems&&(l===sch.maxItems||sch[extraItems]===!1);if(opts.strictTuples&&!fullTuple){const msg=`"${keyword2}" is ${l}-tuple, but minItems or maxItems/${extraItems} are not specified or different at path "${errSchemaPath}"`;(0,util_1.checkStrictMode)(it,msg,opts.strictTuples)}}}return items$1.validateTuple=validateTuple,items$1.default=def,items$1}var hasRequiredPrefixItems$1;function requirePrefixItems$1(){if(hasRequiredPrefixItems$1)return prefixItems$1;hasRequiredPrefixItems$1=1,Object.defineProperty(
prefixItems$1,"__esModule",{value:!0});const items_1=requireItems$1(),def={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:cxt=>(0,items_1.validateTuple)(cxt,"items")};return prefixItems$1.default=def,prefixItems$1}var items2020$1={},hasRequiredItems2020$1;function requireItems2020$1(){if(hasRequiredItems2020$1)return items2020$1;hasRequiredItems2020$1=1,Object.defineProperty(items2020$1,"__esModule",{value:!0});const codegen_1=requireCodegen$1(),util_1=requireUtil$1(),
code_1=requireCode$2(),additionalItems_1=requireAdditionalItems$1(),def={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len}})=>(0,codegen_1.str)`must NOT have more than ${len} items`,params:({params:{len}})=>(0,codegen_1._)`{limit: ${len}}`},code(cxt){const{schema,parentSchema,it}=cxt,{prefixItems:prefixItems2}=parentSchema;it.items=!0,!(0,util_1.alwaysValidSchema)(it,schema)&&(prefixItems2?(0,additionalItems_1.validateAdditionalItems)(
cxt,prefixItems2):cxt.ok((0,code_1.validateArray)(cxt)))}};return items2020$1.default=def,items2020$1}var contains$2={},hasRequiredContains$1;function requireContains$1(){if(hasRequiredContains$1)return contains$2;hasRequiredContains$1=1,Object.defineProperty(contains$2,"__esModule",{value:!0});const codegen_1=requireCodegen$1(),util_1=requireUtil$1(),def={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:min2,max:max2}})=>max2===
void 0?(0,codegen_1.str)`must contain at least ${min2} valid item(s)`:(0,codegen_1.str)`must contain at least ${min2} and no more than ${max2} valid item(s)`,params:({params:{min:min2,max:max2}})=>max2===void 0?(0,codegen_1._)`{minContains: ${min2}}`:(0,codegen_1._)`{minContains: ${min2}, maxContains: ${max2}}`},code(cxt){const{gen,schema,parentSchema,data,it}=cxt;let min2,max2;const{minContains,maxContains}=parentSchema;it.opts.next?(min2=minContains===void 0?1:minContains,max2=maxContains):min2=
1;const len=gen.const("len",(0,codegen_1._)`${data}.length`);if(cxt.setParams({min:min2,max:max2}),max2===void 0&&min2===0){(0,util_1.checkStrictMode)(it,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(max2!==void 0&&min2>max2){(0,util_1.checkStrictMode)(it,'"minContains" > "maxContains" is always invalid'),cxt.fail();return}if((0,util_1.alwaysValidSchema)(it,schema)){let cond=(0,codegen_1._)`${len} >= ${min2}`;max2!==void 0&&(cond=(0,codegen_1._)`${cond} && ${len} <= ${max2}`),
cxt.pass(cond);return}it.items=!0;const valid2=gen.name("valid");max2===void 0&&min2===1?validateItems(valid2,()=>gen.if(valid2,()=>gen.break())):min2===0?(gen.let(valid2,!0),max2!==void 0&&gen.if((0,codegen_1._)`${data}.length > 0`,validateItemsWithCount)):(gen.let(valid2,!1),validateItemsWithCount()),cxt.result(valid2,()=>cxt.reset());function validateItemsWithCount(){const schValid=gen.name("_valid"),count=gen.let("count",0);validateItems(schValid,()=>gen.if(schValid,()=>checkLimits(count)))}
function validateItems(_valid,block2){gen.forRange("i",0,len,i=>{cxt.subschema({keyword:"contains",dataProp:i,dataPropType:util_1.Type.Num,compositeRule:!0},_valid),block2()})}function checkLimits(count){gen.code((0,codegen_1._)`${count}++`),max2===void 0?gen.if((0,codegen_1._)`${count} >= ${min2}`,()=>gen.assign(valid2,!0).break()):(gen.if((0,codegen_1._)`${count} > ${max2}`,()=>gen.assign(valid2,!1).break()),min2===1?gen.assign(valid2,!0):gen.if((0,codegen_1._)`${count} >= ${min2}`,()=>gen.assign(
valid2,!0)))}}};return contains$2.default=def,contains$2}var dependencies$1={},hasRequiredDependencies$1;function requireDependencies$1(){return hasRequiredDependencies$1||(hasRequiredDependencies$1=1,(function(exports$1){Object.defineProperty(exports$1,"__esModule",{value:!0}),exports$1.validateSchemaDeps=exports$1.validatePropertyDeps=exports$1.error=void 0;const codegen_1=requireCodegen$1(),util_1=requireUtil$1(),code_1=requireCode$2();exports$1.error={message:({params:{property,depsCount,deps}})=>{
const property_ies=depsCount===1?"property":"properties";return(0,codegen_1.str)`must have ${property_ies} ${deps} when property ${property} is present`},params:({params:{property,depsCount,deps,missingProperty}})=>(0,codegen_1._)`{property: ${property},
    missingProperty: ${missingProperty},
    depsCount: ${depsCount},
    deps: ${deps}}`};const def={keyword:"dependencies",type:"object",schemaType:"object",error:exports$1.error,code(cxt){const[propDeps,schDeps]=splitDependencies(cxt);validatePropertyDeps(cxt,propDeps),validateSchemaDeps(cxt,schDeps)}};function splitDependencies({schema}){const propertyDeps={},schemaDeps={};for(const key2 in schema){if(key2==="__proto__")continue;const deps=Array.isArray(schema[key2])?propertyDeps:schemaDeps;deps[key2]=schema[key2]}return[propertyDeps,schemaDeps]}function validatePropertyDeps(cxt,propertyDeps=cxt.
schema){const{gen,data,it}=cxt;if(Object.keys(propertyDeps).length===0)return;const missing=gen.let("missing");for(const prop2 in propertyDeps){const deps=propertyDeps[prop2];if(deps.length===0)continue;const hasProperty=(0,code_1.propertyInData)(gen,data,prop2,it.opts.ownProperties);cxt.setParams({property:prop2,depsCount:deps.length,deps:deps.join(", ")}),it.allErrors?gen.if(hasProperty,()=>{for(const depProp of deps)(0,code_1.checkReportMissingProp)(cxt,depProp)}):(gen.if((0,codegen_1._)`${hasProperty} && (${(0,code_1.
checkMissingProp)(cxt,deps,missing)})`),(0,code_1.reportMissingProp)(cxt,missing),gen.else())}}exports$1.validatePropertyDeps=validatePropertyDeps;function validateSchemaDeps(cxt,schemaDeps=cxt.schema){const{gen,data,keyword:keyword2,it}=cxt,valid2=gen.name("valid");for(const prop2 in schemaDeps)(0,util_1.alwaysValidSchema)(it,schemaDeps[prop2])||(gen.if((0,code_1.propertyInData)(gen,data,prop2,it.opts.ownProperties),()=>{const schCxt=cxt.subschema({keyword:keyword2,schemaProp:prop2},valid2);cxt.
mergeValidEvaluated(schCxt,valid2)},()=>gen.var(valid2,!0)),cxt.ok(valid2))}exports$1.validateSchemaDeps=validateSchemaDeps,exports$1.default=def})(dependencies$1)),dependencies$1}var propertyNames$1={},hasRequiredPropertyNames$1;function requirePropertyNames$1(){if(hasRequiredPropertyNames$1)return propertyNames$1;hasRequiredPropertyNames$1=1,Object.defineProperty(propertyNames$1,"__esModule",{value:!0});const codegen_1=requireCodegen$1(),util_1=requireUtil$1(),def={keyword:"propertyNames",type:"\
object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params})=>(0,codegen_1._)`{propertyName: ${params.propertyName}}`},code(cxt){const{gen,schema,data,it}=cxt;if((0,util_1.alwaysValidSchema)(it,schema))return;const valid2=gen.name("valid");gen.forIn("key",data,key2=>{cxt.setParams({propertyName:key2}),cxt.subschema({keyword:"propertyNames",data:key2,dataTypes:["string"],propertyName:key2,compositeRule:!0},valid2),gen.if((0,codegen_1.not)(valid2),()=>{cxt.
error(!0),it.allErrors||gen.break()})}),cxt.ok(valid2)}};return propertyNames$1.default=def,propertyNames$1}var additionalProperties$2={},hasRequiredAdditionalProperties$1;function requireAdditionalProperties$1(){if(hasRequiredAdditionalProperties$1)return additionalProperties$2;hasRequiredAdditionalProperties$1=1,Object.defineProperty(additionalProperties$2,"__esModule",{value:!0});const code_1=requireCode$2(),codegen_1=requireCodegen$1(),names_1=requireNames$1(),util_1=requireUtil$1(),def={keyword:"\
additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params})=>(0,codegen_1._)`{additionalProperty: ${params.additionalProperty}}`},code(cxt){const{gen,schema,parentSchema,data,errsCount,it}=cxt;if(!errsCount)throw new Error("ajv implementation error");const{allErrors,opts}=it;if(it.props=!0,opts.removeAdditional!=="all"&&(0,util_1.alwaysValidSchema)(it,schema))return;const props=(0,code_1.
allSchemaProperties)(parentSchema.properties),patProps=(0,code_1.allSchemaProperties)(parentSchema.patternProperties);checkAdditionalProperties(),cxt.ok((0,codegen_1._)`${errsCount} === ${names_1.default.errors}`);function checkAdditionalProperties(){gen.forIn("key",data,key2=>{!props.length&&!patProps.length?additionalPropertyCode(key2):gen.if(isAdditional(key2),()=>additionalPropertyCode(key2))})}function isAdditional(key2){let definedProp;if(props.length>8){const propsSchema=(0,util_1.schemaRefOrVal)(
it,parentSchema.properties,"properties");definedProp=(0,code_1.isOwnProperty)(gen,propsSchema,key2)}else props.length?definedProp=(0,codegen_1.or)(...props.map(p2=>(0,codegen_1._)`${key2} === ${p2}`)):definedProp=codegen_1.nil;return patProps.length&&(definedProp=(0,codegen_1.or)(definedProp,...patProps.map(p2=>(0,codegen_1._)`${(0,code_1.usePattern)(cxt,p2)}.test(${key2})`))),(0,codegen_1.not)(definedProp)}function deleteAdditional(key2){gen.code((0,codegen_1._)`delete ${data}[${key2}]`)}function additionalPropertyCode(key2){
if(opts.removeAdditional==="all"||opts.removeAdditional&&schema===!1){deleteAdditional(key2);return}if(schema===!1){cxt.setParams({additionalProperty:key2}),cxt.error(),allErrors||gen.break();return}if(typeof schema=="object"&&!(0,util_1.alwaysValidSchema)(it,schema)){const valid2=gen.name("valid");opts.removeAdditional==="failing"?(applyAdditionalSchema(key2,valid2,!1),gen.if((0,codegen_1.not)(valid2),()=>{cxt.reset(),deleteAdditional(key2)})):(applyAdditionalSchema(key2,valid2),allErrors||gen.
if((0,codegen_1.not)(valid2),()=>gen.break()))}}function applyAdditionalSchema(key2,valid2,errors2){const subschema2={keyword:"additionalProperties",dataProp:key2,dataPropType:util_1.Type.Str};errors2===!1&&Object.assign(subschema2,{compositeRule:!0,createErrors:!1,allErrors:!1}),cxt.subschema(subschema2,valid2)}}};return additionalProperties$2.default=def,additionalProperties$2}var properties$5={},hasRequiredProperties$1;function requireProperties$1(){if(hasRequiredProperties$1)return properties$5;
hasRequiredProperties$1=1,Object.defineProperty(properties$5,"__esModule",{value:!0});const validate_1=requireValidate$1(),code_1=requireCode$2(),util_1=requireUtil$1(),additionalProperties_1=requireAdditionalProperties$1(),def={keyword:"properties",type:"object",schemaType:"object",code(cxt){const{gen,schema,parentSchema,data,it}=cxt;it.opts.removeAdditional==="all"&&parentSchema.additionalProperties===void 0&&additionalProperties_1.default.code(new validate_1.KeywordCxt(it,additionalProperties_1.
default,"additionalProperties"));const allProps=(0,code_1.allSchemaProperties)(schema);for(const prop2 of allProps)it.definedProperties.add(prop2);it.opts.unevaluated&&allProps.length&&it.props!==!0&&(it.props=util_1.mergeEvaluated.props(gen,(0,util_1.toHash)(allProps),it.props));const properties2=allProps.filter(p2=>!(0,util_1.alwaysValidSchema)(it,schema[p2]));if(properties2.length===0)return;const valid2=gen.name("valid");for(const prop2 of properties2)hasDefault(prop2)?applyPropertySchema(prop2):
(gen.if((0,code_1.propertyInData)(gen,data,prop2,it.opts.ownProperties)),applyPropertySchema(prop2),it.allErrors||gen.else().var(valid2,!0),gen.endIf()),cxt.it.definedProperties.add(prop2),cxt.ok(valid2);function hasDefault(prop2){return it.opts.useDefaults&&!it.compositeRule&&schema[prop2].default!==void 0}function applyPropertySchema(prop2){cxt.subschema({keyword:"properties",schemaProp:prop2,dataProp:prop2},valid2)}}};return properties$5.default=def,properties$5}var patternProperties$1={},hasRequiredPatternProperties$1;
function requirePatternProperties$1(){if(hasRequiredPatternProperties$1)return patternProperties$1;hasRequiredPatternProperties$1=1,Object.defineProperty(patternProperties$1,"__esModule",{value:!0});const code_1=requireCode$2(),codegen_1=requireCodegen$1(),util_1=requireUtil$1(),util_2=requireUtil$1(),def={keyword:"patternProperties",type:"object",schemaType:"object",code(cxt){const{gen,schema,data,parentSchema,it}=cxt,{opts}=it,patterns=(0,code_1.allSchemaProperties)(schema),alwaysValidPatterns=patterns.
filter(p2=>(0,util_1.alwaysValidSchema)(it,schema[p2]));if(patterns.length===0||alwaysValidPatterns.length===patterns.length&&(!it.opts.unevaluated||it.props===!0))return;const checkProperties=opts.strictSchema&&!opts.allowMatchingProperties&&parentSchema.properties,valid2=gen.name("valid");it.props!==!0&&!(it.props instanceof codegen_1.Name)&&(it.props=(0,util_2.evaluatedPropsToName)(gen,it.props));const{props}=it;validatePatternProperties();function validatePatternProperties(){for(const pat of patterns)
checkProperties&&checkMatchingProperties(pat),it.allErrors?validateProperties(pat):(gen.var(valid2,!0),validateProperties(pat),gen.if(valid2))}function checkMatchingProperties(pat){for(const prop2 in checkProperties)new RegExp(pat).test(prop2)&&(0,util_1.checkStrictMode)(it,`property ${prop2} matches pattern ${pat} (use allowMatchingProperties)`)}function validateProperties(pat){gen.forIn("key",data,key2=>{gen.if((0,codegen_1._)`${(0,code_1.usePattern)(cxt,pat)}.test(${key2})`,()=>{const alwaysValid=alwaysValidPatterns.
includes(pat);alwaysValid||cxt.subschema({keyword:"patternProperties",schemaProp:pat,dataProp:key2,dataPropType:util_2.Type.Str},valid2),it.opts.unevaluated&&props!==!0?gen.assign((0,codegen_1._)`${props}[${key2}]`,!0):!alwaysValid&&!it.allErrors&&gen.if((0,codegen_1.not)(valid2),()=>gen.break())})})}}};return patternProperties$1.default=def,patternProperties$1}var not$1={},hasRequiredNot$1;function requireNot$1(){if(hasRequiredNot$1)return not$1;hasRequiredNot$1=1,Object.defineProperty(not$1,"_\
_esModule",{value:!0});const util_1=requireUtil$1(),def={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(cxt){const{gen,schema,it}=cxt;if((0,util_1.alwaysValidSchema)(it,schema)){cxt.fail();return}const valid2=gen.name("valid");cxt.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},valid2),cxt.failResult(valid2,()=>cxt.reset(),()=>cxt.error())},error:{message:"must NOT be valid"}};return not$1.default=def,not$1}var anyOf$1={},hasRequiredAnyOf$1;function requireAnyOf$1(){
if(hasRequiredAnyOf$1)return anyOf$1;hasRequiredAnyOf$1=1,Object.defineProperty(anyOf$1,"__esModule",{value:!0});const def={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:requireCode$2().validateUnion,error:{message:"must match a schema in anyOf"}};return anyOf$1.default=def,anyOf$1}var oneOf$1={},hasRequiredOneOf$1;function requireOneOf$1(){if(hasRequiredOneOf$1)return oneOf$1;hasRequiredOneOf$1=1,Object.defineProperty(oneOf$1,"__esModule",{value:!0});const codegen_1=requireCodegen$1(),
util_1=requireUtil$1(),def={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params})=>(0,codegen_1._)`{passingSchemas: ${params.passing}}`},code(cxt){const{gen,schema,parentSchema,it}=cxt;if(!Array.isArray(schema))throw new Error("ajv implementation error");if(it.opts.discriminator&&parentSchema.discriminator)return;const schArr=schema,valid2=gen.let("valid",!1),passing=gen.let("passing",null),schValid=gen.name("_valid");cxt.setParams(
{passing}),gen.block(validateOneOf),cxt.result(valid2,()=>cxt.reset(),()=>cxt.error(!0));function validateOneOf(){schArr.forEach((sch,i)=>{let schCxt;(0,util_1.alwaysValidSchema)(it,sch)?gen.var(schValid,!0):schCxt=cxt.subschema({keyword:"oneOf",schemaProp:i,compositeRule:!0},schValid),i>0&&gen.if((0,codegen_1._)`${schValid} && ${valid2}`).assign(valid2,!1).assign(passing,(0,codegen_1._)`[${passing}, ${i}]`).else(),gen.if(schValid,()=>{gen.assign(valid2,!0),gen.assign(passing,i),schCxt&&cxt.mergeEvaluated(
schCxt,codegen_1.Name)})})}}};return oneOf$1.default=def,oneOf$1}var allOf$1={},hasRequiredAllOf$1;function requireAllOf$1(){if(hasRequiredAllOf$1)return allOf$1;hasRequiredAllOf$1=1,Object.defineProperty(allOf$1,"__esModule",{value:!0});const util_1=requireUtil$1(),def={keyword:"allOf",schemaType:"array",code(cxt){const{gen,schema,it}=cxt;if(!Array.isArray(schema))throw new Error("ajv implementation error");const valid2=gen.name("valid");schema.forEach((sch,i)=>{if((0,util_1.alwaysValidSchema)(
it,sch))return;const schCxt=cxt.subschema({keyword:"allOf",schemaProp:i},valid2);cxt.ok(valid2),cxt.mergeEvaluated(schCxt)})}};return allOf$1.default=def,allOf$1}var _if$1={},hasRequired_if$1;function require_if$1(){if(hasRequired_if$1)return _if$1;hasRequired_if$1=1,Object.defineProperty(_if$1,"__esModule",{value:!0});const codegen_1=requireCodegen$1(),util_1=requireUtil$1(),def={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params})=>(0,codegen_1.str)`must match "${params.
ifClause}" schema`,params:({params})=>(0,codegen_1._)`{failingKeyword: ${params.ifClause}}`},code(cxt){const{gen,parentSchema,it}=cxt;parentSchema.then===void 0&&parentSchema.else===void 0&&(0,util_1.checkStrictMode)(it,'"if" without "then" and "else" is ignored');const hasThen=hasSchema(it,"then"),hasElse=hasSchema(it,"else");if(!hasThen&&!hasElse)return;const valid2=gen.let("valid",!0),schValid=gen.name("_valid");if(validateIf(),cxt.reset(),hasThen&&hasElse){const ifClause=gen.let("ifClause");
cxt.setParams({ifClause}),gen.if(schValid,validateClause("then",ifClause),validateClause("else",ifClause))}else hasThen?gen.if(schValid,validateClause("then")):gen.if((0,codegen_1.not)(schValid),validateClause("else"));cxt.pass(valid2,()=>cxt.error(!0));function validateIf(){const schCxt=cxt.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},schValid);cxt.mergeEvaluated(schCxt)}function validateClause(keyword2,ifClause){return()=>{const schCxt=cxt.subschema({keyword:keyword2},
schValid);gen.assign(valid2,schValid),cxt.mergeValidEvaluated(schCxt,valid2),ifClause?gen.assign(ifClause,(0,codegen_1._)`${keyword2}`):cxt.setParams({ifClause:keyword2})}}}};function hasSchema(it,keyword2){const schema=it.schema[keyword2];return schema!==void 0&&!(0,util_1.alwaysValidSchema)(it,schema)}return _if$1.default=def,_if$1}var thenElse$1={},hasRequiredThenElse$1;function requireThenElse$1(){if(hasRequiredThenElse$1)return thenElse$1;hasRequiredThenElse$1=1,Object.defineProperty(thenElse$1,
"__esModule",{value:!0});const util_1=requireUtil$1(),def={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:keyword2,parentSchema,it}){parentSchema.if===void 0&&(0,util_1.checkStrictMode)(it,`"${keyword2}" without "if" is ignored`)}};return thenElse$1.default=def,thenElse$1}var hasRequiredApplicator$1;function requireApplicator$1(){if(hasRequiredApplicator$1)return applicator$1;hasRequiredApplicator$1=1,Object.defineProperty(applicator$1,"__esModule",{value:!0});const additionalItems_1=requireAdditionalItems$1(),
prefixItems_1=requirePrefixItems$1(),items_1=requireItems$1(),items2020_1=requireItems2020$1(),contains_1=requireContains$1(),dependencies_1=requireDependencies$1(),propertyNames_1=requirePropertyNames$1(),additionalProperties_1=requireAdditionalProperties$1(),properties_12=requireProperties$1(),patternProperties_1=requirePatternProperties$1(),not_1=requireNot$1(),anyOf_1=requireAnyOf$1(),oneOf_1=requireOneOf$1(),allOf_1=requireAllOf$1(),if_1=require_if$1(),thenElse_1=requireThenElse$1();function getApplicator(draft2020=!1){
const applicator2=[not_1.default,anyOf_1.default,oneOf_1.default,allOf_1.default,if_1.default,thenElse_1.default,propertyNames_1.default,additionalProperties_1.default,dependencies_1.default,properties_12.default,patternProperties_1.default];return draft2020?applicator2.push(prefixItems_1.default,items2020_1.default):applicator2.push(additionalItems_1.default,items_1.default),applicator2.push(contains_1.default),applicator2}return applicator$1.default=getApplicator,applicator$1}var format$3={},format$2={},
hasRequiredFormat$3;function requireFormat$3(){if(hasRequiredFormat$3)return format$2;hasRequiredFormat$3=1,Object.defineProperty(format$2,"__esModule",{value:!0});const codegen_1=requireCodegen$1(),def={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode})=>(0,codegen_1.str)`must match format "${schemaCode}"`,params:({schemaCode})=>(0,codegen_1._)`{format: ${schemaCode}}`},code(cxt,ruleType){const{gen,data,$data,schema,schemaCode,it}=cxt,{opts,errSchemaPath,
schemaEnv,self:self2}=it;if(!opts.validateFormats)return;$data?validate$DataFormat():validateFormat();function validate$DataFormat(){const fmts=gen.scopeValue("formats",{ref:self2.formats,code:opts.code.formats}),fDef=gen.const("fDef",(0,codegen_1._)`${fmts}[${schemaCode}]`),fType=gen.let("fType"),format2=gen.let("format");gen.if((0,codegen_1._)`typeof ${fDef} == "object" && !(${fDef} instanceof RegExp)`,()=>gen.assign(fType,(0,codegen_1._)`${fDef}.type || "string"`).assign(format2,(0,codegen_1.
_)`${fDef}.validate`),()=>gen.assign(fType,(0,codegen_1._)`"string"`).assign(format2,fDef)),cxt.fail$data((0,codegen_1.or)(unknownFmt(),invalidFmt()));function unknownFmt(){return opts.strictSchema===!1?codegen_1.nil:(0,codegen_1._)`${schemaCode} && !${format2}`}function invalidFmt(){const callFormat=schemaEnv.$async?(0,codegen_1._)`(${fDef}.async ? await ${format2}(${data}) : ${format2}(${data}))`:(0,codegen_1._)`${format2}(${data})`,validData=(0,codegen_1._)`(typeof ${format2} == "function" ? ${callFormat} : ${format2}.test(${data}))`;
return(0,codegen_1._)`${format2} && ${format2} !== true && ${fType} === ${ruleType} && !${validData}`}}function validateFormat(){const formatDef=self2.formats[schema];if(!formatDef){unknownFormat();return}if(formatDef===!0)return;const[fmtType,format2,fmtRef]=getFormat(formatDef);fmtType===ruleType&&cxt.pass(validCondition());function unknownFormat(){if(opts.strictSchema===!1){self2.logger.warn(unknownMsg());return}throw new Error(unknownMsg());function unknownMsg(){return`unknown format "${schema}\
" ignored in schema at path "${errSchemaPath}"`}}function getFormat(fmtDef){const code2=fmtDef instanceof RegExp?(0,codegen_1.regexpCode)(fmtDef):opts.code.formats?(0,codegen_1._)`${opts.code.formats}${(0,codegen_1.getProperty)(schema)}`:void 0,fmt=gen.scopeValue("formats",{key:schema,ref:fmtDef,code:code2});return typeof fmtDef=="object"&&!(fmtDef instanceof RegExp)?[fmtDef.type||"string",fmtDef.validate,(0,codegen_1._)`${fmt}.validate`]:["string",fmtDef,fmt]}function validCondition(){if(typeof formatDef==
"object"&&!(formatDef instanceof RegExp)&&formatDef.async){if(!schemaEnv.$async)throw new Error("async format in sync schema");return(0,codegen_1._)`await ${fmtRef}(${data})`}return typeof format2=="function"?(0,codegen_1._)`${fmtRef}(${data})`:(0,codegen_1._)`${fmtRef}.test(${data})`}}}};return format$2.default=def,format$2}var hasRequiredFormat$2;function requireFormat$2(){if(hasRequiredFormat$2)return format$3;hasRequiredFormat$2=1,Object.defineProperty(format$3,"__esModule",{value:!0});const format2=[
requireFormat$3().default];return format$3.default=format2,format$3}var metadata$1={},hasRequiredMetadata$1;function requireMetadata$1(){return hasRequiredMetadata$1||(hasRequiredMetadata$1=1,Object.defineProperty(metadata$1,"__esModule",{value:!0}),metadata$1.contentVocabulary=metadata$1.metadataVocabulary=void 0,metadata$1.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],metadata$1.contentVocabulary=["contentMediaType","contentEncoding","conte\
ntSchema"]),metadata$1}var hasRequiredDraft7$1;function requireDraft7$1(){if(hasRequiredDraft7$1)return draft7$1;hasRequiredDraft7$1=1,Object.defineProperty(draft7$1,"__esModule",{value:!0});const core_1=requireCore$2(),validation_1=requireValidation$1(),applicator_1=requireApplicator$1(),format_1=requireFormat$2(),metadata_1=requireMetadata$1(),draft7Vocabularies=[core_1.default,validation_1.default,(0,applicator_1.default)(),format_1.default,metadata_1.metadataVocabulary,metadata_1.contentVocabulary];
return draft7$1.default=draft7Vocabularies,draft7$1}var discriminator$1={},types$2={},hasRequiredTypes$1;function requireTypes$1(){if(hasRequiredTypes$1)return types$2;hasRequiredTypes$1=1,Object.defineProperty(types$2,"__esModule",{value:!0}),types$2.DiscrError=void 0;var DiscrError;return(function(DiscrError2){DiscrError2.Tag="tag",DiscrError2.Mapping="mapping"})(DiscrError||(types$2.DiscrError=DiscrError={})),types$2}var hasRequiredDiscriminator$1;function requireDiscriminator$1(){if(hasRequiredDiscriminator$1)
return discriminator$1;hasRequiredDiscriminator$1=1,Object.defineProperty(discriminator$1,"__esModule",{value:!0});const codegen_1=requireCodegen$1(),types_1=requireTypes$1(),compile_1=requireCompile$1(),ref_error_1=requireRef_error$1(),util_1=requireUtil$1(),def={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError,tagName}})=>discrError===types_1.DiscrError.Tag?`tag "${tagName}" must be string`:`value of tag "${tagName}" must be in oneOf`,params:({params:{
discrError,tag,tagName}})=>(0,codegen_1._)`{error: ${discrError}, tag: ${tagName}, tagValue: ${tag}}`},code(cxt){const{gen,data,schema,parentSchema,it}=cxt,{oneOf:oneOf2}=parentSchema;if(!it.opts.discriminator)throw new Error("discriminator: requires discriminator option");const tagName=schema.propertyName;if(typeof tagName!="string")throw new Error("discriminator: requires propertyName");if(schema.mapping)throw new Error("discriminator: mapping is not supported");if(!oneOf2)throw new Error("dis\
criminator: requires oneOf keyword");const valid2=gen.let("valid",!1),tag=gen.const("tag",(0,codegen_1._)`${data}${(0,codegen_1.getProperty)(tagName)}`);gen.if((0,codegen_1._)`typeof ${tag} == "string"`,()=>validateMapping(),()=>cxt.error(!1,{discrError:types_1.DiscrError.Tag,tag,tagName})),cxt.ok(valid2);function validateMapping(){const mapping=getMapping();gen.if(!1);for(const tagValue in mapping)gen.elseIf((0,codegen_1._)`${tag} === ${tagValue}`),gen.assign(valid2,applyTagSchema(mapping[tagValue]));
gen.else(),cxt.error(!1,{discrError:types_1.DiscrError.Mapping,tag,tagName}),gen.endIf()}function applyTagSchema(schemaProp){const _valid=gen.name("valid"),schCxt=cxt.subschema({keyword:"oneOf",schemaProp},_valid);return cxt.mergeEvaluated(schCxt,codegen_1.Name),_valid}function getMapping(){var _a2;const oneOfMapping={},topRequired=hasRequired(parentSchema);let tagRequired=!0;for(let i=0;i<oneOf2.length;i++){let sch=oneOf2[i];if(sch?.$ref&&!(0,util_1.schemaHasRulesButRef)(sch,it.self.RULES)){const ref2=sch.
$ref;if(sch=compile_1.resolveRef.call(it.self,it.schemaEnv.root,it.baseId,ref2),sch instanceof compile_1.SchemaEnv&&(sch=sch.schema),sch===void 0)throw new ref_error_1.default(it.opts.uriResolver,it.baseId,ref2)}const propSch=(_a2=sch?.properties)===null||_a2===void 0?void 0:_a2[tagName];if(typeof propSch!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${tagName}"`);tagRequired=tagRequired&&(topRequired||hasRequired(sch)),addMappings(propSch,
i)}if(!tagRequired)throw new Error(`discriminator: "${tagName}" must be required`);return oneOfMapping;function hasRequired({required:required2}){return Array.isArray(required2)&&required2.includes(tagName)}function addMappings(sch,i){if(sch.const)addMapping(sch.const,i);else if(sch.enum)for(const tagValue of sch.enum)addMapping(tagValue,i);else throw new Error(`discriminator: "properties/${tagName}" must have "const" or "enum"`)}function addMapping(tagValue,i){if(typeof tagValue!="string"||tagValue in
oneOfMapping)throw new Error(`discriminator: "${tagName}" values must be unique strings`);oneOfMapping[tagValue]=i}}}};return discriminator$1.default=def,discriminator$1}const $schema$1="http://json-schema.org/draft-07/schema#",$id$2="http://json-schema.org/draft-07/schema#",title$1="Core schema meta-schema",definitions$1={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},
{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type$2=["object","boolean"],properties$4={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{
type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDe\
fault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},
default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/\
schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},require$$3$1={$schema:$schema$1,$id:$id$2,title:title$1,definitions:definitions$1,type:type$2,properties:properties$4,default:!0};var hasRequiredAjv$1;function requireAjv$1(){return hasRequiredAjv$1||(hasRequiredAjv$1=1,(function(module,exports$1){Object.defineProperty(exports$1,"__esModule",{value:!0}),exports$1.MissingRefError=exports$1.ValidationError=exports$1.CodeGen=exports$1.Name=
exports$1.nil=exports$1.stringify=exports$1.str=exports$1._=exports$1.KeywordCxt=exports$1.Ajv=void 0;const core_1=requireCore$3(),draft7_1=requireDraft7$1(),discriminator_1=requireDiscriminator$1(),draft7MetaSchema=require$$3$1,META_SUPPORT_DATA=["/properties"],META_SCHEMA_ID="http://json-schema.org/draft-07/schema";class Ajv2 extends core_1.default{_addVocabularies(){super._addVocabularies(),draft7_1.default.forEach(v=>this.addVocabulary(v)),this.opts.discriminator&&this.addKeyword(discriminator_1.
default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const metaSchema=this.opts.$data?this.$dataMetaSchema(draft7MetaSchema,META_SUPPORT_DATA):draft7MetaSchema;this.addMetaSchema(metaSchema,META_SCHEMA_ID,!1),this.refs["http://json-schema.org/schema"]=META_SCHEMA_ID}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(META_SCHEMA_ID)?META_SCHEMA_ID:void 0)}}exports$1.Ajv=Ajv2,module.exports=exports$1=Ajv2,module.exports.Ajv=Ajv2,Object.
defineProperty(exports$1,"__esModule",{value:!0}),exports$1.default=Ajv2;var validate_1=requireValidate$1();Object.defineProperty(exports$1,"KeywordCxt",{enumerable:!0,get:function(){return validate_1.KeywordCxt}});var codegen_1=requireCodegen$1();Object.defineProperty(exports$1,"_",{enumerable:!0,get:function(){return codegen_1._}}),Object.defineProperty(exports$1,"str",{enumerable:!0,get:function(){return codegen_1.str}}),Object.defineProperty(exports$1,"stringify",{enumerable:!0,get:function(){
return codegen_1.stringify}}),Object.defineProperty(exports$1,"nil",{enumerable:!0,get:function(){return codegen_1.nil}}),Object.defineProperty(exports$1,"Name",{enumerable:!0,get:function(){return codegen_1.Name}}),Object.defineProperty(exports$1,"CodeGen",{enumerable:!0,get:function(){return codegen_1.CodeGen}});var validation_error_1=requireValidation_error$1();Object.defineProperty(exports$1,"ValidationError",{enumerable:!0,get:function(){return validation_error_1.default}});var ref_error_1=requireRef_error$1();
Object.defineProperty(exports$1,"MissingRefError",{enumerable:!0,get:function(){return ref_error_1.default}})})(ajv$1,ajv$1.exports)),ajv$1.exports}var ajvExports=requireAjv$1();const Ajv=getDefaultExportFromCjs(ajvExports);var dist={exports:{}},formats={},hasRequiredFormats;function requireFormats(){return hasRequiredFormats||(hasRequiredFormats=1,(function(exports$1){Object.defineProperty(exports$1,"__esModule",{value:!0}),exports$1.formatNames=exports$1.fastFormats=exports$1.fullFormats=void 0;
function fmtDef(validate2,compare){return{validate:validate2,compare}}exports$1.fullFormats={date:fmtDef(date2,compareDate),time:fmtDef(getTime(!0),compareTime),"date-time":fmtDef(getDateTime(!0),compareDateTime),"iso-time":fmtDef(getTime(),compareIsoTime),"iso-date-time":fmtDef(getDateTime(),compareIsoDateTime),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:uri2,"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,
"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,
email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,
regex,uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte,int32:{type:"number",validate:validateInt32},int64:{type:"number",validate:validateInt64},float:{type:"number",validate:validateNumber},double:{type:"number",validate:validateNumber},password:!0,binary:!0},exports$1.
fastFormats={...exports$1.fullFormats,date:fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,compareDate),time:fmtDef(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,compareTime),"date-time":fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\dt(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,compareDateTime),"iso-time":fmtDef(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,compareIsoTime),"iso-date-time":fmtDef(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,
compareIsoDateTime),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},exports$1.formatNames=Object.keys(exports$1.fullFormats);function isLeapYear(year){return year%4===0&&(year%100!==0||year%400===0)}const DATE2=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,DAYS=[0,31,28,31,30,31,30,31,31,30,31,30,31];function date2(str){
const matches2=DATE2.exec(str);if(!matches2)return!1;const year=+matches2[1],month=+matches2[2],day=+matches2[3];return month>=1&&month<=12&&day>=1&&day<=(month===2&&isLeapYear(year)?29:DAYS[month])}function compareDate(d1,d2){if(d1&&d2)return d1>d2?1:d1<d2?-1:0}const TIME=/^(\d\d):(\d\d):(\d\d(?:\.\d+)?)(z|([+-])(\d\d)(?::?(\d\d))?)?$/i;function getTime(strictTimeZone){return function(str){const matches2=TIME.exec(str);if(!matches2)return!1;const hr=+matches2[1],min2=+matches2[2],sec=+matches2[3],
tz=matches2[4],tzSign=matches2[5]==="-"?-1:1,tzH=+(matches2[6]||0),tzM=+(matches2[7]||0);if(tzH>23||tzM>59||strictTimeZone&&!tz)return!1;if(hr<=23&&min2<=59&&sec<60)return!0;const utcMin=min2-tzM*tzSign,utcHr=hr-tzH*tzSign-(utcMin<0?1:0);return(utcHr===23||utcHr===-1)&&(utcMin===59||utcMin===-1)&&sec<61}}function compareTime(s1,s2){if(!(s1&&s2))return;const t1=new Date("2020-01-01T"+s1).valueOf(),t2=new Date("2020-01-01T"+s2).valueOf();if(t1&&t2)return t1-t2}function compareIsoTime(t1,t2){if(!(t1&&
t2))return;const a1=TIME.exec(t1),a2=TIME.exec(t2);if(a1&&a2)return t1=a1[1]+a1[2]+a1[3],t2=a2[1]+a2[2]+a2[3],t1>t2?1:t1<t2?-1:0}const DATE_TIME_SEPARATOR=/t|\s/i;function getDateTime(strictTimeZone){const time2=getTime(strictTimeZone);return function(str){const dateTime=str.split(DATE_TIME_SEPARATOR);return dateTime.length===2&&date2(dateTime[0])&&time2(dateTime[1])}}function compareDateTime(dt1,dt2){if(!(dt1&&dt2))return;const d1=new Date(dt1).valueOf(),d2=new Date(dt2).valueOf();if(d1&&d2)return d1-
d2}function compareIsoDateTime(dt1,dt2){if(!(dt1&&dt2))return;const[d1,t1]=dt1.split(DATE_TIME_SEPARATOR),[d2,t2]=dt2.split(DATE_TIME_SEPARATOR),res=compareDate(d1,d2);if(res!==void 0)return res||compareTime(t1,t2)}const NOT_URI_FRAGMENT=/\/|:/,URI=/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;
function uri2(str){return NOT_URI_FRAGMENT.test(str)&&URI.test(str)}const BYTE=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;function byte(str){return BYTE.lastIndex=0,BYTE.test(str)}const MIN_INT32=-2147483648,MAX_INT32=2**31-1;function validateInt32(value){return Number.isInteger(value)&&value<=MAX_INT32&&value>=MIN_INT32}function validateInt64(value){return Number.isInteger(value)}function validateNumber(){return!0}const Z_ANCHOR=/[^\\]\\Z/;function regex(str){if(Z_ANCHOR.
test(str))return!1;try{return new RegExp(str),!0}catch{return!1}}})(formats)),formats}var limit={},ajv={exports:{}},core$2={},validate={},boolSchema={},errors={},codegen={},code$4={},hasRequiredCode$1;function requireCode$1(){return hasRequiredCode$1||(hasRequiredCode$1=1,(function(exports$1){Object.defineProperty(exports$1,"__esModule",{value:!0}),exports$1.regexpCode=exports$1.getEsmExportName=exports$1.getProperty=exports$1.safeStringify=exports$1.stringify=exports$1.strConcat=exports$1.addCodeArg=
exports$1.str=exports$1._=exports$1.nil=exports$1._Code=exports$1.Name=exports$1.IDENTIFIER=exports$1._CodeOrName=void 0;class _CodeOrName{}exports$1._CodeOrName=_CodeOrName,exports$1.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class Name extends _CodeOrName{constructor(s2){if(super(),!exports$1.IDENTIFIER.test(s2))throw new Error("CodeGen: name must be a valid identifier");this.str=s2}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}exports$1.Name=Name;class _Code extends _CodeOrName{constructor(code2){
super(),this._items=typeof code2=="string"?[code2]:code2}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const item=this._items[0];return item===""||item==='""'}get str(){var _a2;return(_a2=this._str)!==null&&_a2!==void 0?_a2:this._str=this._items.reduce((s2,c2)=>`${s2}${c2}`,"")}get names(){var _a2;return(_a2=this._names)!==null&&_a2!==void 0?_a2:this._names=this._items.reduce((names2,c2)=>(c2 instanceof Name&&(names2[c2.str]=(names2[c2.str]||0)+1),names2),{})}}exports$1.
_Code=_Code,exports$1.nil=new _Code("");function _(strs,...args){const code2=[strs[0]];let i=0;for(;i<args.length;)addCodeArg(code2,args[i]),code2.push(strs[++i]);return new _Code(code2)}exports$1._=_;const plus=new _Code("+");function str(strs,...args){const expr=[safeStringify(strs[0])];let i=0;for(;i<args.length;)expr.push(plus),addCodeArg(expr,args[i]),expr.push(plus,safeStringify(strs[++i]));return optimize(expr),new _Code(expr)}exports$1.str=str;function addCodeArg(code2,arg){arg instanceof
_Code?code2.push(...arg._items):arg instanceof Name?code2.push(arg):code2.push(interpolate(arg))}exports$1.addCodeArg=addCodeArg;function optimize(expr){let i=1;for(;i<expr.length-1;){if(expr[i]===plus){const res=mergeExprItems(expr[i-1],expr[i+1]);if(res!==void 0){expr.splice(i-1,3,res);continue}expr[i++]="+"}i++}}function mergeExprItems(a,b){if(b==='""')return a;if(a==='""')return b;if(typeof a=="string")return b instanceof Name||a[a.length-1]!=='"'?void 0:typeof b!="string"?`${a.slice(0,-1)}${b}\
"`:b[0]==='"'?a.slice(0,-1)+b.slice(1):void 0;if(typeof b=="string"&&b[0]==='"'&&!(a instanceof Name))return`"${a}${b.slice(1)}`}function strConcat(c1,c2){return c2.emptyStr()?c1:c1.emptyStr()?c2:str`${c1}${c2}`}exports$1.strConcat=strConcat;function interpolate(x){return typeof x=="number"||typeof x=="boolean"||x===null?x:safeStringify(Array.isArray(x)?x.join(","):x)}function stringify2(x){return new _Code(safeStringify(x))}exports$1.stringify=stringify2;function safeStringify(x){return JSON.stringify(
x).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}exports$1.safeStringify=safeStringify;function getProperty(key2){return typeof key2=="string"&&exports$1.IDENTIFIER.test(key2)?new _Code(`.${key2}`):_`[${key2}]`}exports$1.getProperty=getProperty;function getEsmExportName(key2){if(typeof key2=="string"&&exports$1.IDENTIFIER.test(key2))return new _Code(`${key2}`);throw new Error(`CodeGen: invalid export name: ${key2}, use explicit $id name mapping`)}exports$1.getEsmExportName=getEsmExportName;
function regexpCode(rx){return new _Code(rx.toString())}exports$1.regexpCode=regexpCode})(code$4)),code$4}var scope={},hasRequiredScope;function requireScope(){return hasRequiredScope||(hasRequiredScope=1,(function(exports$1){Object.defineProperty(exports$1,"__esModule",{value:!0}),exports$1.ValueScope=exports$1.ValueScopeName=exports$1.Scope=exports$1.varKinds=exports$1.UsedValueState=void 0;const code_1=requireCode$1();class ValueError extends Error{constructor(name){super(`CodeGen: "code" for\
 ${name} not defined`),this.value=name.value}}var UsedValueState;(function(UsedValueState2){UsedValueState2[UsedValueState2.Started=0]="Started",UsedValueState2[UsedValueState2.Completed=1]="Completed"})(UsedValueState||(exports$1.UsedValueState=UsedValueState={})),exports$1.varKinds={const:new code_1.Name("const"),let:new code_1.Name("let"),var:new code_1.Name("var")};class Scope{constructor({prefixes,parent}={}){this._names={},this._prefixes=prefixes,this._parent=parent}toName(nameOrPrefix){return nameOrPrefix instanceof
code_1.Name?nameOrPrefix:this.name(nameOrPrefix)}name(prefix){return new code_1.Name(this._newName(prefix))}_newName(prefix){const ng=this._names[prefix]||this._nameGroup(prefix);return`${prefix}${ng.index++}`}_nameGroup(prefix){var _a2,_b;if(!((_b=(_a2=this._parent)===null||_a2===void 0?void 0:_a2._prefixes)===null||_b===void 0)&&_b.has(prefix)||this._prefixes&&!this._prefixes.has(prefix))throw new Error(`CodeGen: prefix "${prefix}" is not allowed in this scope`);return this._names[prefix]={prefix,
index:0}}}exports$1.Scope=Scope;class ValueScopeName extends code_1.Name{constructor(prefix,nameStr){super(nameStr),this.prefix=prefix}setValue(value,{property,itemIndex}){this.value=value,this.scopePath=(0,code_1._)`.${new code_1.Name(property)}[${itemIndex}]`}}exports$1.ValueScopeName=ValueScopeName;const line=(0,code_1._)`\n`;class ValueScope extends Scope{constructor(opts){super(opts),this._values={},this._scope=opts.scope,this.opts={...opts,_n:opts.lines?line:code_1.nil}}get(){return this._scope}name(prefix){
return new ValueScopeName(prefix,this._newName(prefix))}value(nameOrPrefix,value){var _a2;if(value.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const name=this.toName(nameOrPrefix),{prefix}=name,valueKey=(_a2=value.key)!==null&&_a2!==void 0?_a2:value.ref;let vs=this._values[prefix];if(vs){const _name=vs.get(valueKey);if(_name)return _name}else vs=this._values[prefix]=new Map;vs.set(valueKey,name);const s2=this._scope[prefix]||(this._scope[prefix]=[]),itemIndex=s2.length;return s2[itemIndex]=
value.ref,name.setValue(value,{property:prefix,itemIndex}),name}getValue(prefix,keyOrRef){const vs=this._values[prefix];if(vs)return vs.get(keyOrRef)}scopeRefs(scopeName,values=this._values){return this._reduceValues(values,name=>{if(name.scopePath===void 0)throw new Error(`CodeGen: name "${name}" has no value`);return(0,code_1._)`${scopeName}${name.scopePath}`})}scopeCode(values=this._values,usedValues,getCode){return this._reduceValues(values,name=>{if(name.value===void 0)throw new Error(`Code\
Gen: name "${name}" has no value`);return name.value.code},usedValues,getCode)}_reduceValues(values,valueCode,usedValues={},getCode){let code2=code_1.nil;for(const prefix in values){const vs=values[prefix];if(!vs)continue;const nameSet=usedValues[prefix]=usedValues[prefix]||new Map;vs.forEach(name=>{if(nameSet.has(name))return;nameSet.set(name,UsedValueState.Started);let c2=valueCode(name);if(c2){const def=this.opts.es5?exports$1.varKinds.var:exports$1.varKinds.const;code2=(0,code_1._)`${code2}${def} ${name} = ${c2};${this.
opts._n}`}else if(c2=getCode?.(name))code2=(0,code_1._)`${code2}${c2}${this.opts._n}`;else throw new ValueError(name);nameSet.set(name,UsedValueState.Completed)})}return code2}}exports$1.ValueScope=ValueScope})(scope)),scope}var hasRequiredCodegen;function requireCodegen(){return hasRequiredCodegen||(hasRequiredCodegen=1,(function(exports$1){Object.defineProperty(exports$1,"__esModule",{value:!0}),exports$1.or=exports$1.and=exports$1.not=exports$1.CodeGen=exports$1.operators=exports$1.varKinds=exports$1.
ValueScopeName=exports$1.ValueScope=exports$1.Scope=exports$1.Name=exports$1.regexpCode=exports$1.stringify=exports$1.getProperty=exports$1.nil=exports$1.strConcat=exports$1.str=exports$1._=void 0;const code_1=requireCode$1(),scope_1=requireScope();var code_2=requireCode$1();Object.defineProperty(exports$1,"_",{enumerable:!0,get:function(){return code_2._}}),Object.defineProperty(exports$1,"str",{enumerable:!0,get:function(){return code_2.str}}),Object.defineProperty(exports$1,"strConcat",{enumerable:!0,
get:function(){return code_2.strConcat}}),Object.defineProperty(exports$1,"nil",{enumerable:!0,get:function(){return code_2.nil}}),Object.defineProperty(exports$1,"getProperty",{enumerable:!0,get:function(){return code_2.getProperty}}),Object.defineProperty(exports$1,"stringify",{enumerable:!0,get:function(){return code_2.stringify}}),Object.defineProperty(exports$1,"regexpCode",{enumerable:!0,get:function(){return code_2.regexpCode}}),Object.defineProperty(exports$1,"Name",{enumerable:!0,get:function(){
return code_2.Name}});var scope_2=requireScope();Object.defineProperty(exports$1,"Scope",{enumerable:!0,get:function(){return scope_2.Scope}}),Object.defineProperty(exports$1,"ValueScope",{enumerable:!0,get:function(){return scope_2.ValueScope}}),Object.defineProperty(exports$1,"ValueScopeName",{enumerable:!0,get:function(){return scope_2.ValueScopeName}}),Object.defineProperty(exports$1,"varKinds",{enumerable:!0,get:function(){return scope_2.varKinds}}),exports$1.operators={GT:new code_1._Code(
">"),GTE:new code_1._Code(">="),LT:new code_1._Code("<"),LTE:new code_1._Code("<="),EQ:new code_1._Code("==="),NEQ:new code_1._Code("!=="),NOT:new code_1._Code("!"),OR:new code_1._Code("||"),AND:new code_1._Code("&&"),ADD:new code_1._Code("+")};class Node2{optimizeNodes(){return this}optimizeNames(_names,_constants){return this}}class Def extends Node2{constructor(varKind,name,rhs){super(),this.varKind=varKind,this.name=name,this.rhs=rhs}render({es5,_n}){const varKind=es5?scope_1.varKinds.var:this.
varKind,rhs=this.rhs===void 0?"":` = ${this.rhs}`;return`${varKind} ${this.name}${rhs};`+_n}optimizeNames(names2,constants2){if(names2[this.name.str])return this.rhs&&(this.rhs=optimizeExpr(this.rhs,names2,constants2)),this}get names(){return this.rhs instanceof code_1._CodeOrName?this.rhs.names:{}}}class Assign extends Node2{constructor(lhs,rhs,sideEffects){super(),this.lhs=lhs,this.rhs=rhs,this.sideEffects=sideEffects}render({_n}){return`${this.lhs} = ${this.rhs};`+_n}optimizeNames(names2,constants2){
if(!(this.lhs instanceof code_1.Name&&!names2[this.lhs.str]&&!this.sideEffects))return this.rhs=optimizeExpr(this.rhs,names2,constants2),this}get names(){const names2=this.lhs instanceof code_1.Name?{}:{...this.lhs.names};return addExprNames(names2,this.rhs)}}class AssignOp extends Assign{constructor(lhs,op2,rhs,sideEffects){super(lhs,rhs,sideEffects),this.op=op2}render({_n}){return`${this.lhs} ${this.op}= ${this.rhs};`+_n}}class Label2 extends Node2{constructor(label){super(),this.label=label,this.
names={}}render({_n}){return`${this.label}:`+_n}}class Break extends Node2{constructor(label){super(),this.label=label,this.names={}}render({_n}){return`break${this.label?` ${this.label}`:""};`+_n}}class Throw extends Node2{constructor(error2){super(),this.error=error2}render({_n}){return`throw ${this.error};`+_n}get names(){return this.error.names}}class AnyCode extends Node2{constructor(code2){super(),this.code=code2}render({_n}){return`${this.code};`+_n}optimizeNodes(){return`${this.code}`?this:
void 0}optimizeNames(names2,constants2){return this.code=optimizeExpr(this.code,names2,constants2),this}get names(){return this.code instanceof code_1._CodeOrName?this.code.names:{}}}class ParentNode extends Node2{constructor(nodes2=[]){super(),this.nodes=nodes2}render(opts){return this.nodes.reduce((code2,n)=>code2+n.render(opts),"")}optimizeNodes(){const{nodes:nodes2}=this;let i=nodes2.length;for(;i--;){const n=nodes2[i].optimizeNodes();Array.isArray(n)?nodes2.splice(i,1,...n):n?nodes2[i]=n:nodes2.
splice(i,1)}return nodes2.length>0?this:void 0}optimizeNames(names2,constants2){const{nodes:nodes2}=this;let i=nodes2.length;for(;i--;){const n=nodes2[i];n.optimizeNames(names2,constants2)||(subtractNames(names2,n.names),nodes2.splice(i,1))}return nodes2.length>0?this:void 0}get names(){return this.nodes.reduce((names2,n)=>addNames(names2,n.names),{})}}class BlockNode extends ParentNode{render(opts){return"{"+opts._n+super.render(opts)+"}"+opts._n}}class Root2 extends ParentNode{}class Else extends BlockNode{}
Else.kind="else";class If extends BlockNode{constructor(condition,nodes2){super(nodes2),this.condition=condition}render(opts){let code2=`if(${this.condition})`+super.render(opts);return this.else&&(code2+="else "+this.else.render(opts)),code2}optimizeNodes(){super.optimizeNodes();const cond=this.condition;if(cond===!0)return this.nodes;let e=this.else;if(e){const ns=e.optimizeNodes();e=this.else=Array.isArray(ns)?new Else(ns):ns}if(e)return cond===!1?e instanceof If?e:e.nodes:this.nodes.length?this:
new If(not2(cond),e instanceof If?[e]:e.nodes);if(!(cond===!1||!this.nodes.length))return this}optimizeNames(names2,constants2){var _a2;if(this.else=(_a2=this.else)===null||_a2===void 0?void 0:_a2.optimizeNames(names2,constants2),!!(super.optimizeNames(names2,constants2)||this.else))return this.condition=optimizeExpr(this.condition,names2,constants2),this}get names(){const names2=super.names;return addExprNames(names2,this.condition),this.else&&addNames(names2,this.else.names),names2}}If.kind="i\
f";class For extends BlockNode{}For.kind="for";class ForLoop extends For{constructor(iteration){super(),this.iteration=iteration}render(opts){return`for(${this.iteration})`+super.render(opts)}optimizeNames(names2,constants2){if(super.optimizeNames(names2,constants2))return this.iteration=optimizeExpr(this.iteration,names2,constants2),this}get names(){return addNames(super.names,this.iteration.names)}}class ForRange extends For{constructor(varKind,name,from,to){super(),this.varKind=varKind,this.name=
name,this.from=from,this.to=to}render(opts){const varKind=opts.es5?scope_1.varKinds.var:this.varKind,{name,from,to}=this;return`for(${varKind} ${name}=${from}; ${name}<${to}; ${name}++)`+super.render(opts)}get names(){const names2=addExprNames(super.names,this.from);return addExprNames(names2,this.to)}}class ForIter extends For{constructor(loop2,varKind,name,iterable){super(),this.loop=loop2,this.varKind=varKind,this.name=name,this.iterable=iterable}render(opts){return`for(${this.varKind} ${this.
name} ${this.loop} ${this.iterable})`+super.render(opts)}optimizeNames(names2,constants2){if(super.optimizeNames(names2,constants2))return this.iterable=optimizeExpr(this.iterable,names2,constants2),this}get names(){return addNames(super.names,this.iterable.names)}}class Func extends BlockNode{constructor(name,args,async){super(),this.name=name,this.args=args,this.async=async}render(opts){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(opts)}}Func.kind="func";class Return extends ParentNode{render(opts){
return"return "+super.render(opts)}}Return.kind="return";class Try extends BlockNode{render(opts){let code2="try"+super.render(opts);return this.catch&&(code2+=this.catch.render(opts)),this.finally&&(code2+=this.finally.render(opts)),code2}optimizeNodes(){var _a2,_b;return super.optimizeNodes(),(_a2=this.catch)===null||_a2===void 0||_a2.optimizeNodes(),(_b=this.finally)===null||_b===void 0||_b.optimizeNodes(),this}optimizeNames(names2,constants2){var _a2,_b;return super.optimizeNames(names2,constants2),
(_a2=this.catch)===null||_a2===void 0||_a2.optimizeNames(names2,constants2),(_b=this.finally)===null||_b===void 0||_b.optimizeNames(names2,constants2),this}get names(){const names2=super.names;return this.catch&&addNames(names2,this.catch.names),this.finally&&addNames(names2,this.finally.names),names2}}class Catch extends BlockNode{constructor(error2){super(),this.error=error2}render(opts){return`catch(${this.error})`+super.render(opts)}}Catch.kind="catch";class Finally extends BlockNode{render(opts){
return"finally"+super.render(opts)}}Finally.kind="finally";class CodeGen{constructor(extScope,opts={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...opts,_n:opts.lines?`
`:""},this._extScope=extScope,this._scope=new scope_1.Scope({parent:extScope}),this._nodes=[new Root2]}toString(){return this._root.render(this.opts)}name(prefix){return this._scope.name(prefix)}scopeName(prefix){return this._extScope.name(prefix)}scopeValue(prefixOrName,value){const name=this._extScope.value(prefixOrName,value);return(this._values[name.prefix]||(this._values[name.prefix]=new Set)).add(name),name}getScopeValue(prefix,keyOrRef){return this._extScope.getValue(prefix,keyOrRef)}scopeRefs(scopeName){
return this._extScope.scopeRefs(scopeName,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(varKind,nameOrPrefix,rhs,constant){const name=this._scope.toName(nameOrPrefix);return rhs!==void 0&&constant&&(this._constants[name.str]=rhs),this._leafNode(new Def(varKind,name,rhs)),name}const(nameOrPrefix,rhs,_constant){return this._def(scope_1.varKinds.const,nameOrPrefix,rhs,_constant)}let(nameOrPrefix,rhs,_constant){return this._def(scope_1.varKinds.let,nameOrPrefix,rhs,_constant)}var(nameOrPrefix,rhs,_constant){
return this._def(scope_1.varKinds.var,nameOrPrefix,rhs,_constant)}assign(lhs,rhs,sideEffects){return this._leafNode(new Assign(lhs,rhs,sideEffects))}add(lhs,rhs){return this._leafNode(new AssignOp(lhs,exports$1.operators.ADD,rhs))}code(c2){return typeof c2=="function"?c2():c2!==code_1.nil&&this._leafNode(new AnyCode(c2)),this}object(...keyValues){const code2=["{"];for(const[key2,value]of keyValues)code2.length>1&&code2.push(","),code2.push(key2),(key2!==value||this.opts.es5)&&(code2.push(":"),(0,code_1.
addCodeArg)(code2,value));return code2.push("}"),new code_1._Code(code2)}if(condition,thenBody,elseBody){if(this._blockNode(new If(condition)),thenBody&&elseBody)this.code(thenBody).else().code(elseBody).endIf();else if(thenBody)this.code(thenBody).endIf();else if(elseBody)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(condition){return this._elseNode(new If(condition))}else(){return this._elseNode(new Else)}endIf(){return this._endBlockNode(If,Else)}_for(node2,forBody){
return this._blockNode(node2),forBody&&this.code(forBody).endFor(),this}for(iteration,forBody){return this._for(new ForLoop(iteration),forBody)}forRange(nameOrPrefix,from,to,forBody,varKind=this.opts.es5?scope_1.varKinds.var:scope_1.varKinds.let){const name=this._scope.toName(nameOrPrefix);return this._for(new ForRange(varKind,name,from,to),()=>forBody(name))}forOf(nameOrPrefix,iterable,forBody,varKind=scope_1.varKinds.const){const name=this._scope.toName(nameOrPrefix);if(this.opts.es5){const arr=iterable instanceof
code_1.Name?iterable:this.var("_arr",iterable);return this.forRange("_i",0,(0,code_1._)`${arr}.length`,i=>{this.var(name,(0,code_1._)`${arr}[${i}]`),forBody(name)})}return this._for(new ForIter("of",varKind,name,iterable),()=>forBody(name))}forIn(nameOrPrefix,obj,forBody,varKind=this.opts.es5?scope_1.varKinds.var:scope_1.varKinds.const){if(this.opts.ownProperties)return this.forOf(nameOrPrefix,(0,code_1._)`Object.keys(${obj})`,forBody);const name=this._scope.toName(nameOrPrefix);return this._for(
new ForIter("in",varKind,name,obj),()=>forBody(name))}endFor(){return this._endBlockNode(For)}label(label){return this._leafNode(new Label2(label))}break(label){return this._leafNode(new Break(label))}return(value){const node2=new Return;if(this._blockNode(node2),this.code(value),node2.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(Return)}try(tryBody,catchCode,finallyCode){if(!catchCode&&!finallyCode)throw new Error('CodeGen: "try" without "\
catch" and "finally"');const node2=new Try;if(this._blockNode(node2),this.code(tryBody),catchCode){const error2=this.name("e");this._currNode=node2.catch=new Catch(error2),catchCode(error2)}return finallyCode&&(this._currNode=node2.finally=new Finally,this.code(finallyCode)),this._endBlockNode(Catch,Finally)}throw(error2){return this._leafNode(new Throw(error2))}block(body2,nodeCount){return this._blockStarts.push(this._nodes.length),body2&&this.code(body2).endBlock(nodeCount),this}endBlock(nodeCount){
const len=this._blockStarts.pop();if(len===void 0)throw new Error("CodeGen: not in self-balancing block");const toClose=this._nodes.length-len;if(toClose<0||nodeCount!==void 0&&toClose!==nodeCount)throw new Error(`CodeGen: wrong number of nodes: ${toClose} vs ${nodeCount} expected`);return this._nodes.length=len,this}func(name,args=code_1.nil,async,funcBody){return this._blockNode(new Func(name,args,async)),funcBody&&this.code(funcBody).endFunc(),this}endFunc(){return this._endBlockNode(Func)}optimize(n=1){
for(;n-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(node2){return this._currNode.nodes.push(node2),this}_blockNode(node2){this._currNode.nodes.push(node2),this._nodes.push(node2)}_endBlockNode(N1,N2){const n=this._currNode;if(n instanceof N1||N2&&n instanceof N2)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${N2?`${N1.kind}/${N2.kind}`:N1.kind}"`)}_elseNode(node2){const n=this._currNode;if(!(n instanceof If))throw new Error(
'CodeGen: "else" without "if"');return this._currNode=n.else=node2,this}get _root(){return this._nodes[0]}get _currNode(){const ns=this._nodes;return ns[ns.length-1]}set _currNode(node2){const ns=this._nodes;ns[ns.length-1]=node2}}exports$1.CodeGen=CodeGen;function addNames(names2,from){for(const n in from)names2[n]=(names2[n]||0)+(from[n]||0);return names2}function addExprNames(names2,from){return from instanceof code_1._CodeOrName?addNames(names2,from.names):names2}function optimizeExpr(expr,names2,constants2){
if(expr instanceof code_1.Name)return replaceName(expr);if(!canOptimize(expr))return expr;return new code_1._Code(expr._items.reduce((items2,c2)=>(c2 instanceof code_1.Name&&(c2=replaceName(c2)),c2 instanceof code_1._Code?items2.push(...c2._items):items2.push(c2),items2),[]));function replaceName(n){const c2=constants2[n.str];return c2===void 0||names2[n.str]!==1?n:(delete names2[n.str],c2)}function canOptimize(e){return e instanceof code_1._Code&&e._items.some(c2=>c2 instanceof code_1.Name&&names2[c2.
str]===1&&constants2[c2.str]!==void 0)}}function subtractNames(names2,from){for(const n in from)names2[n]=(names2[n]||0)-(from[n]||0)}function not2(x){return typeof x=="boolean"||typeof x=="number"||x===null?!x:(0,code_1._)`!${par(x)}`}exports$1.not=not2;const andCode=mappend(exports$1.operators.AND);function and(...args){return args.reduce(andCode)}exports$1.and=and;const orCode=mappend(exports$1.operators.OR);function or(...args){return args.reduce(orCode)}exports$1.or=or;function mappend(op2){
return(x,y)=>x===code_1.nil?y:y===code_1.nil?x:(0,code_1._)`${par(x)} ${op2} ${par(y)}`}function par(x){return x instanceof code_1.Name?x:(0,code_1._)`(${x})`}})(codegen)),codegen}var util={},hasRequiredUtil;function requireUtil(){if(hasRequiredUtil)return util;hasRequiredUtil=1,Object.defineProperty(util,"__esModule",{value:!0}),util.checkStrictMode=util.getErrorPath=util.Type=util.useFunc=util.setEvaluated=util.evaluatedPropsToName=util.mergeEvaluated=util.eachItem=util.unescapeJsonPointer=util.
escapeJsonPointer=util.escapeFragment=util.unescapeFragment=util.schemaRefOrVal=util.schemaHasRulesButRef=util.schemaHasRules=util.checkUnknownRules=util.alwaysValidSchema=util.toHash=void 0;const codegen_1=requireCodegen(),code_1=requireCode$1();function toHash(arr){const hash2={};for(const item of arr)hash2[item]=!0;return hash2}util.toHash=toHash;function alwaysValidSchema(it,schema){return typeof schema=="boolean"?schema:Object.keys(schema).length===0?!0:(checkUnknownRules(it,schema),!schemaHasRules(
schema,it.self.RULES.all))}util.alwaysValidSchema=alwaysValidSchema;function checkUnknownRules(it,schema=it.schema){const{opts,self:self2}=it;if(!opts.strictSchema||typeof schema=="boolean")return;const rules2=self2.RULES.keywords;for(const key2 in schema)rules2[key2]||checkStrictMode(it,`unknown keyword: "${key2}"`)}util.checkUnknownRules=checkUnknownRules;function schemaHasRules(schema,rules2){if(typeof schema=="boolean")return!schema;for(const key2 in schema)if(rules2[key2])return!0;return!1}
util.schemaHasRules=schemaHasRules;function schemaHasRulesButRef(schema,RULES){if(typeof schema=="boolean")return!schema;for(const key2 in schema)if(key2!=="$ref"&&RULES.all[key2])return!0;return!1}util.schemaHasRulesButRef=schemaHasRulesButRef;function schemaRefOrVal({topSchemaRef,schemaPath},schema,keyword2,$data){if(!$data){if(typeof schema=="number"||typeof schema=="boolean")return schema;if(typeof schema=="string")return(0,codegen_1._)`${schema}`}return(0,codegen_1._)`${topSchemaRef}${schemaPath}${(0,codegen_1.
getProperty)(keyword2)}`}util.schemaRefOrVal=schemaRefOrVal;function unescapeFragment(str){return unescapeJsonPointer(decodeURIComponent(str))}util.unescapeFragment=unescapeFragment;function escapeFragment(str){return encodeURIComponent(escapeJsonPointer(str))}util.escapeFragment=escapeFragment;function escapeJsonPointer(str){return typeof str=="number"?`${str}`:str.replace(/~/g,"~0").replace(/\//g,"~1")}util.escapeJsonPointer=escapeJsonPointer;function unescapeJsonPointer(str){return str.replace(
/~1/g,"/").replace(/~0/g,"~")}util.unescapeJsonPointer=unescapeJsonPointer;function eachItem(xs,f){if(Array.isArray(xs))for(const x of xs)f(x);else f(xs)}util.eachItem=eachItem;function makeMergeEvaluated({mergeNames,mergeToName,mergeValues:mergeValues2,resultToName}){return(gen,from,to,toName)=>{const res=to===void 0?from:to instanceof codegen_1.Name?(from instanceof codegen_1.Name?mergeNames(gen,from,to):mergeToName(gen,from,to),to):from instanceof codegen_1.Name?(mergeToName(gen,to,from),from):
mergeValues2(from,to);return toName===codegen_1.Name&&!(res instanceof codegen_1.Name)?resultToName(gen,res):res}}util.mergeEvaluated={props:makeMergeEvaluated({mergeNames:(gen,from,to)=>gen.if((0,codegen_1._)`${to} !== true && ${from} !== undefined`,()=>{gen.if((0,codegen_1._)`${from} === true`,()=>gen.assign(to,!0),()=>gen.assign(to,(0,codegen_1._)`${to} || {}`).code((0,codegen_1._)`Object.assign(${to}, ${from})`))}),mergeToName:(gen,from,to)=>gen.if((0,codegen_1._)`${to} !== true`,()=>{from===
!0?gen.assign(to,!0):(gen.assign(to,(0,codegen_1._)`${to} || {}`),setEvaluated(gen,to,from))}),mergeValues:(from,to)=>from===!0?!0:{...from,...to},resultToName:evaluatedPropsToName}),items:makeMergeEvaluated({mergeNames:(gen,from,to)=>gen.if((0,codegen_1._)`${to} !== true && ${from} !== undefined`,()=>gen.assign(to,(0,codegen_1._)`${from} === true ? true : ${to} > ${from} ? ${to} : ${from}`)),mergeToName:(gen,from,to)=>gen.if((0,codegen_1._)`${to} !== true`,()=>gen.assign(to,from===!0?!0:(0,codegen_1.
_)`${to} > ${from} ? ${to} : ${from}`)),mergeValues:(from,to)=>from===!0?!0:Math.max(from,to),resultToName:(gen,items2)=>gen.var("items",items2)})};function evaluatedPropsToName(gen,ps){if(ps===!0)return gen.var("props",!0);const props=gen.var("props",(0,codegen_1._)`{}`);return ps!==void 0&&setEvaluated(gen,props,ps),props}util.evaluatedPropsToName=evaluatedPropsToName;function setEvaluated(gen,props,ps){Object.keys(ps).forEach(p2=>gen.assign((0,codegen_1._)`${props}${(0,codegen_1.getProperty)(
p2)}`,!0))}util.setEvaluated=setEvaluated;const snippets={};function useFunc(gen,f){return gen.scopeValue("func",{ref:f,code:snippets[f.code]||(snippets[f.code]=new code_1._Code(f.code))})}util.useFunc=useFunc;var Type;(function(Type2){Type2[Type2.Num=0]="Num",Type2[Type2.Str=1]="Str"})(Type||(util.Type=Type={}));function getErrorPath(dataProp,dataPropType,jsPropertySyntax){if(dataProp instanceof codegen_1.Name){const isNumber2=dataPropType===Type.Num;return jsPropertySyntax?isNumber2?(0,codegen_1.
_)`"[" + ${dataProp} + "]"`:(0,codegen_1._)`"['" + ${dataProp} + "']"`:isNumber2?(0,codegen_1._)`"/" + ${dataProp}`:(0,codegen_1._)`"/" + ${dataProp}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return jsPropertySyntax?(0,codegen_1.getProperty)(dataProp).toString():"/"+escapeJsonPointer(dataProp)}util.getErrorPath=getErrorPath;function checkStrictMode(it,msg,mode=it.opts.strictSchema){if(mode){if(msg=`strict mode: ${msg}`,mode===!0)throw new Error(msg);it.self.logger.warn(msg)}}return util.checkStrictMode=
checkStrictMode,util}var names={},hasRequiredNames;function requireNames(){if(hasRequiredNames)return names;hasRequiredNames=1,Object.defineProperty(names,"__esModule",{value:!0});const codegen_1=requireCodegen(),names$12={data:new codegen_1.Name("data"),valCxt:new codegen_1.Name("valCxt"),instancePath:new codegen_1.Name("instancePath"),parentData:new codegen_1.Name("parentData"),parentDataProperty:new codegen_1.Name("parentDataProperty"),rootData:new codegen_1.Name("rootData"),dynamicAnchors:new codegen_1.
Name("dynamicAnchors"),vErrors:new codegen_1.Name("vErrors"),errors:new codegen_1.Name("errors"),this:new codegen_1.Name("this"),self:new codegen_1.Name("self"),scope:new codegen_1.Name("scope"),json:new codegen_1.Name("json"),jsonPos:new codegen_1.Name("jsonPos"),jsonLen:new codegen_1.Name("jsonLen"),jsonPart:new codegen_1.Name("jsonPart")};return names.default=names$12,names}var hasRequiredErrors;function requireErrors(){return hasRequiredErrors||(hasRequiredErrors=1,(function(exports$1){Object.
defineProperty(exports$1,"__esModule",{value:!0}),exports$1.extendErrors=exports$1.resetErrorsCount=exports$1.reportExtraError=exports$1.reportError=exports$1.keyword$DataError=exports$1.keywordError=void 0;const codegen_1=requireCodegen(),util_1=requireUtil(),names_1=requireNames();exports$1.keywordError={message:({keyword:keyword2})=>(0,codegen_1.str)`must pass "${keyword2}" keyword validation`},exports$1.keyword$DataError={message:({keyword:keyword2,schemaType})=>schemaType?(0,codegen_1.str)`"${keyword2}" keyword must be ${schemaType} ($data)`:
(0,codegen_1.str)`"${keyword2}" keyword is invalid ($data)`};function reportError(cxt,error2=exports$1.keywordError,errorPaths,overrideAllErrors){const{it}=cxt,{gen,compositeRule,allErrors}=it,errObj=errorObjectCode(cxt,error2,errorPaths);overrideAllErrors??(compositeRule||allErrors)?addError(gen,errObj):returnErrors(it,(0,codegen_1._)`[${errObj}]`)}exports$1.reportError=reportError;function reportExtraError(cxt,error2=exports$1.keywordError,errorPaths){const{it}=cxt,{gen,compositeRule,allErrors}=it,
errObj=errorObjectCode(cxt,error2,errorPaths);addError(gen,errObj),compositeRule||allErrors||returnErrors(it,names_1.default.vErrors)}exports$1.reportExtraError=reportExtraError;function resetErrorsCount(gen,errsCount){gen.assign(names_1.default.errors,errsCount),gen.if((0,codegen_1._)`${names_1.default.vErrors} !== null`,()=>gen.if(errsCount,()=>gen.assign((0,codegen_1._)`${names_1.default.vErrors}.length`,errsCount),()=>gen.assign(names_1.default.vErrors,null)))}exports$1.resetErrorsCount=resetErrorsCount;
function extendErrors({gen,keyword:keyword2,schemaValue,data,errsCount,it}){if(errsCount===void 0)throw new Error("ajv implementation error");const err=gen.name("err");gen.forRange("i",errsCount,names_1.default.errors,i=>{gen.const(err,(0,codegen_1._)`${names_1.default.vErrors}[${i}]`),gen.if((0,codegen_1._)`${err}.instancePath === undefined`,()=>gen.assign((0,codegen_1._)`${err}.instancePath`,(0,codegen_1.strConcat)(names_1.default.instancePath,it.errorPath))),gen.assign((0,codegen_1._)`${err}.schemaPath`,
(0,codegen_1.str)`${it.errSchemaPath}/${keyword2}`),it.opts.verbose&&(gen.assign((0,codegen_1._)`${err}.schema`,schemaValue),gen.assign((0,codegen_1._)`${err}.data`,data))})}exports$1.extendErrors=extendErrors;function addError(gen,errObj){const err=gen.const("err",errObj);gen.if((0,codegen_1._)`${names_1.default.vErrors} === null`,()=>gen.assign(names_1.default.vErrors,(0,codegen_1._)`[${err}]`),(0,codegen_1._)`${names_1.default.vErrors}.push(${err})`),gen.code((0,codegen_1._)`${names_1.default.
errors}++`)}function returnErrors(it,errs){const{gen,validateName,schemaEnv}=it;schemaEnv.$async?gen.throw((0,codegen_1._)`new ${it.ValidationError}(${errs})`):(gen.assign((0,codegen_1._)`${validateName}.errors`,errs),gen.return(!1))}const E={keyword:new codegen_1.Name("keyword"),schemaPath:new codegen_1.Name("schemaPath"),params:new codegen_1.Name("params"),propertyName:new codegen_1.Name("propertyName"),message:new codegen_1.Name("message"),schema:new codegen_1.Name("schema"),parentSchema:new codegen_1.
Name("parentSchema")};function errorObjectCode(cxt,error2,errorPaths){const{createErrors}=cxt.it;return createErrors===!1?(0,codegen_1._)`{}`:errorObject(cxt,error2,errorPaths)}function errorObject(cxt,error2,errorPaths={}){const{gen,it}=cxt,keyValues=[errorInstancePath(it,errorPaths),errorSchemaPath(cxt,errorPaths)];return extraErrorProps(cxt,error2,keyValues),gen.object(...keyValues)}function errorInstancePath({errorPath},{instancePath}){const instPath=instancePath?(0,codegen_1.str)`${errorPath}${(0,util_1.
getErrorPath)(instancePath,util_1.Type.Str)}`:errorPath;return[names_1.default.instancePath,(0,codegen_1.strConcat)(names_1.default.instancePath,instPath)]}function errorSchemaPath({keyword:keyword2,it:{errSchemaPath}},{schemaPath,parentSchema}){let schPath=parentSchema?errSchemaPath:(0,codegen_1.str)`${errSchemaPath}/${keyword2}`;return schemaPath&&(schPath=(0,codegen_1.str)`${schPath}${(0,util_1.getErrorPath)(schemaPath,util_1.Type.Str)}`),[E.schemaPath,schPath]}function extraErrorProps(cxt,{params,
message},keyValues){const{keyword:keyword2,data,schemaValue,it}=cxt,{opts,propertyName,topSchemaRef,schemaPath}=it;keyValues.push([E.keyword,keyword2],[E.params,typeof params=="function"?params(cxt):params||(0,codegen_1._)`{}`]),opts.messages&&keyValues.push([E.message,typeof message=="function"?message(cxt):message]),opts.verbose&&keyValues.push([E.schema,schemaValue],[E.parentSchema,(0,codegen_1._)`${topSchemaRef}${schemaPath}`],[names_1.default.data,data]),propertyName&&keyValues.push([E.propertyName,
propertyName])}})(errors)),errors}var hasRequiredBoolSchema;function requireBoolSchema(){if(hasRequiredBoolSchema)return boolSchema;hasRequiredBoolSchema=1,Object.defineProperty(boolSchema,"__esModule",{value:!0}),boolSchema.boolOrEmptySchema=boolSchema.topBoolOrEmptySchema=void 0;const errors_1=requireErrors(),codegen_1=requireCodegen(),names_1=requireNames(),boolError={message:"boolean schema is false"};function topBoolOrEmptySchema(it){const{gen,schema,validateName}=it;schema===!1?falseSchemaError(
it,!1):typeof schema=="object"&&schema.$async===!0?gen.return(names_1.default.data):(gen.assign((0,codegen_1._)`${validateName}.errors`,null),gen.return(!0))}boolSchema.topBoolOrEmptySchema=topBoolOrEmptySchema;function boolOrEmptySchema(it,valid2){const{gen,schema}=it;schema===!1?(gen.var(valid2,!1),falseSchemaError(it)):gen.var(valid2,!0)}boolSchema.boolOrEmptySchema=boolOrEmptySchema;function falseSchemaError(it,overrideAllErrors){const{gen,data}=it,cxt={gen,keyword:"false schema",data,schema:!1,
schemaCode:!1,schemaValue:!1,params:{},it};(0,errors_1.reportError)(cxt,boolError,void 0,overrideAllErrors)}return boolSchema}var dataType={},rules={},hasRequiredRules;function requireRules(){if(hasRequiredRules)return rules;hasRequiredRules=1,Object.defineProperty(rules,"__esModule",{value:!0}),rules.getRules=rules.isJSONType=void 0;const _jsonTypes=["string","number","integer","boolean","null","object","array"],jsonTypes=new Set(_jsonTypes);function isJSONType(x){return typeof x=="string"&&jsonTypes.
has(x)}rules.isJSONType=isJSONType;function getRules(){const groups={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...groups,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},groups.number,groups.string,groups.array,groups.object],post:{rules:[]},all:{},keywords:{}}}return rules.getRules=getRules,rules}var applicability={},hasRequiredApplicability;function requireApplicability(){if(hasRequiredApplicability)
return applicability;hasRequiredApplicability=1,Object.defineProperty(applicability,"__esModule",{value:!0}),applicability.shouldUseRule=applicability.shouldUseGroup=applicability.schemaHasRulesForType=void 0;function schemaHasRulesForType({schema,self:self2},type2){const group=self2.RULES.types[type2];return group&&group!==!0&&shouldUseGroup(schema,group)}applicability.schemaHasRulesForType=schemaHasRulesForType;function shouldUseGroup(schema,group){return group.rules.some(rule=>shouldUseRule(schema,
rule))}applicability.shouldUseGroup=shouldUseGroup;function shouldUseRule(schema,rule){var _a2;return schema[rule.keyword]!==void 0||((_a2=rule.definition.implements)===null||_a2===void 0?void 0:_a2.some(kwd=>schema[kwd]!==void 0))}return applicability.shouldUseRule=shouldUseRule,applicability}var hasRequiredDataType;function requireDataType(){if(hasRequiredDataType)return dataType;hasRequiredDataType=1,Object.defineProperty(dataType,"__esModule",{value:!0}),dataType.reportTypeError=dataType.checkDataTypes=
dataType.checkDataType=dataType.coerceAndCheckDataType=dataType.getJSONTypes=dataType.getSchemaTypes=dataType.DataType=void 0;const rules_1=requireRules(),applicability_1=requireApplicability(),errors_1=requireErrors(),codegen_1=requireCodegen(),util_1=requireUtil();var DataType;(function(DataType2){DataType2[DataType2.Correct=0]="Correct",DataType2[DataType2.Wrong=1]="Wrong"})(DataType||(dataType.DataType=DataType={}));function getSchemaTypes(schema){const types2=getJSONTypes(schema.type);if(types2.
includes("null")){if(schema.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!types2.length&&schema.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');schema.nullable===!0&&types2.push("null")}return types2}dataType.getSchemaTypes=getSchemaTypes;function getJSONTypes(ts){const types2=Array.isArray(ts)?ts:ts?[ts]:[];if(types2.every(rules_1.isJSONType))return types2;throw new Error("type must be JSONType or JSONType[]: "+types2.join(","))}dataType.
getJSONTypes=getJSONTypes;function coerceAndCheckDataType(it,types2){const{gen,data,opts}=it,coerceTo=coerceToTypes(types2,opts.coerceTypes),checkTypes=types2.length>0&&!(coerceTo.length===0&&types2.length===1&&(0,applicability_1.schemaHasRulesForType)(it,types2[0]));if(checkTypes){const wrongType=checkDataTypes(types2,data,opts.strictNumbers,DataType.Wrong);gen.if(wrongType,()=>{coerceTo.length?coerceData(it,types2,coerceTo):reportTypeError(it)})}return checkTypes}dataType.coerceAndCheckDataType=
coerceAndCheckDataType;const COERCIBLE=new Set(["string","number","integer","boolean","null"]);function coerceToTypes(types2,coerceTypes){return coerceTypes?types2.filter(t=>COERCIBLE.has(t)||coerceTypes==="array"&&t==="array"):[]}function coerceData(it,types2,coerceTo){const{gen,data,opts}=it,dataType2=gen.let("dataType",(0,codegen_1._)`typeof ${data}`),coerced=gen.let("coerced",(0,codegen_1._)`undefined`);opts.coerceTypes==="array"&&gen.if((0,codegen_1._)`${dataType2} == 'object' && Array.isArray(${data}) && ${data}.length == 1`,
()=>gen.assign(data,(0,codegen_1._)`${data}[0]`).assign(dataType2,(0,codegen_1._)`typeof ${data}`).if(checkDataTypes(types2,data,opts.strictNumbers),()=>gen.assign(coerced,data))),gen.if((0,codegen_1._)`${coerced} !== undefined`);for(const t of coerceTo)(COERCIBLE.has(t)||t==="array"&&opts.coerceTypes==="array")&&coerceSpecificType(t);gen.else(),reportTypeError(it),gen.endIf(),gen.if((0,codegen_1._)`${coerced} !== undefined`,()=>{gen.assign(data,coerced),assignParentData(it,coerced)});function coerceSpecificType(t){
switch(t){case"string":gen.elseIf((0,codegen_1._)`${dataType2} == "number" || ${dataType2} == "boolean"`).assign(coerced,(0,codegen_1._)`"" + ${data}`).elseIf((0,codegen_1._)`${data} === null`).assign(coerced,(0,codegen_1._)`""`);return;case"number":gen.elseIf((0,codegen_1._)`${dataType2} == "boolean" || ${data} === null
              || (${dataType2} == "string" && ${data} && ${data} == +${data})`).assign(coerced,(0,codegen_1._)`+${data}`);return;case"integer":gen.elseIf((0,codegen_1._)`${dataType2} === "boolean" || ${data} === null
              || (${dataType2} === "string" && ${data} && ${data} == +${data} && !(${data} % 1))`).assign(coerced,(0,codegen_1._)`+${data}`);return;case"boolean":gen.elseIf((0,codegen_1._)`${data} === "false" || ${data} === 0 || ${data} === null`).assign(coerced,!1).elseIf((0,codegen_1._)`${data} === "true" || ${data} === 1`).assign(coerced,!0);return;case"null":gen.elseIf((0,codegen_1._)`${data} === "" || ${data} === 0 || ${data} === false`),gen.assign(coerced,null);return;case"array":gen.elseIf(
(0,codegen_1._)`${dataType2} === "string" || ${dataType2} === "number"
              || ${dataType2} === "boolean" || ${data} === null`).assign(coerced,(0,codegen_1._)`[${data}]`)}}}function assignParentData({gen,parentData,parentDataProperty},expr){gen.if((0,codegen_1._)`${parentData} !== undefined`,()=>gen.assign((0,codegen_1._)`${parentData}[${parentDataProperty}]`,expr))}function checkDataType(dataType2,data,strictNums,correct=DataType.Correct){const EQ=correct===DataType.Correct?codegen_1.operators.EQ:codegen_1.operators.NEQ;let cond;switch(dataType2){case"nul\
l":return(0,codegen_1._)`${data} ${EQ} null`;case"array":cond=(0,codegen_1._)`Array.isArray(${data})`;break;case"object":cond=(0,codegen_1._)`${data} && typeof ${data} == "object" && !Array.isArray(${data})`;break;case"integer":cond=numCond((0,codegen_1._)`!(${data} % 1) && !isNaN(${data})`);break;case"number":cond=numCond();break;default:return(0,codegen_1._)`typeof ${data} ${EQ} ${dataType2}`}return correct===DataType.Correct?cond:(0,codegen_1.not)(cond);function numCond(_cond=codegen_1.nil){return(0,codegen_1.
and)((0,codegen_1._)`typeof ${data} == "number"`,_cond,strictNums?(0,codegen_1._)`isFinite(${data})`:codegen_1.nil)}}dataType.checkDataType=checkDataType;function checkDataTypes(dataTypes,data,strictNums,correct){if(dataTypes.length===1)return checkDataType(dataTypes[0],data,strictNums,correct);let cond;const types2=(0,util_1.toHash)(dataTypes);if(types2.array&&types2.object){const notObj=(0,codegen_1._)`typeof ${data} != "object"`;cond=types2.null?notObj:(0,codegen_1._)`!${data} || ${notObj}`,delete types2.
null,delete types2.array,delete types2.object}else cond=codegen_1.nil;types2.number&&delete types2.integer;for(const t in types2)cond=(0,codegen_1.and)(cond,checkDataType(t,data,strictNums,correct));return cond}dataType.checkDataTypes=checkDataTypes;const typeError={message:({schema})=>`must be ${schema}`,params:({schema,schemaValue})=>typeof schema=="string"?(0,codegen_1._)`{type: ${schema}}`:(0,codegen_1._)`{type: ${schemaValue}}`};function reportTypeError(it){const cxt=getTypeErrorContext(it);
(0,errors_1.reportError)(cxt,typeError)}dataType.reportTypeError=reportTypeError;function getTypeErrorContext(it){const{gen,data,schema}=it,schemaCode=(0,util_1.schemaRefOrVal)(it,schema,"type");return{gen,keyword:"type",data,schema:schema.type,schemaCode,schemaValue:schemaCode,parentSchema:schema,params:{},it}}return dataType}var defaults={},hasRequiredDefaults;function requireDefaults(){if(hasRequiredDefaults)return defaults;hasRequiredDefaults=1,Object.defineProperty(defaults,"__esModule",{value:!0}),
defaults.assignDefaults=void 0;const codegen_1=requireCodegen(),util_1=requireUtil();function assignDefaults(it,ty){const{properties:properties2,items:items2}=it.schema;if(ty==="object"&&properties2)for(const key2 in properties2)assignDefault(it,key2,properties2[key2].default);else ty==="array"&&Array.isArray(items2)&&items2.forEach((sch,i)=>assignDefault(it,i,sch.default))}defaults.assignDefaults=assignDefaults;function assignDefault(it,prop2,defaultValue){const{gen,compositeRule,data,opts}=it;
if(defaultValue===void 0)return;const childData=(0,codegen_1._)`${data}${(0,codegen_1.getProperty)(prop2)}`;if(compositeRule){(0,util_1.checkStrictMode)(it,`default is ignored for: ${childData}`);return}let condition=(0,codegen_1._)`${childData} === undefined`;opts.useDefaults==="empty"&&(condition=(0,codegen_1._)`${condition} || ${childData} === null || ${childData} === ""`),gen.if(condition,(0,codegen_1._)`${childData} = ${(0,codegen_1.stringify)(defaultValue)}`)}return defaults}var keyword={},
code$3={},hasRequiredCode;function requireCode(){if(hasRequiredCode)return code$3;hasRequiredCode=1,Object.defineProperty(code$3,"__esModule",{value:!0}),code$3.validateUnion=code$3.validateArray=code$3.usePattern=code$3.callValidateCode=code$3.schemaProperties=code$3.allSchemaProperties=code$3.noPropertyInData=code$3.propertyInData=code$3.isOwnProperty=code$3.hasPropFunc=code$3.reportMissingProp=code$3.checkMissingProp=code$3.checkReportMissingProp=void 0;const codegen_1=requireCodegen(),util_1=requireUtil(),
names_1=requireNames(),util_2=requireUtil();function checkReportMissingProp(cxt,prop2){const{gen,data,it}=cxt;gen.if(noPropertyInData(gen,data,prop2,it.opts.ownProperties),()=>{cxt.setParams({missingProperty:(0,codegen_1._)`${prop2}`},!0),cxt.error()})}code$3.checkReportMissingProp=checkReportMissingProp;function checkMissingProp({gen,data,it:{opts}},properties2,missing){return(0,codegen_1.or)(...properties2.map(prop2=>(0,codegen_1.and)(noPropertyInData(gen,data,prop2,opts.ownProperties),(0,codegen_1.
_)`${missing} = ${prop2}`)))}code$3.checkMissingProp=checkMissingProp;function reportMissingProp(cxt,missing){cxt.setParams({missingProperty:missing},!0),cxt.error()}code$3.reportMissingProp=reportMissingProp;function hasPropFunc(gen){return gen.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,codegen_1._)`Object.prototype.hasOwnProperty`})}code$3.hasPropFunc=hasPropFunc;function isOwnProperty(gen,data,property){return(0,codegen_1._)`${hasPropFunc(gen)}.call(${data}, ${property})`}
code$3.isOwnProperty=isOwnProperty;function propertyInData(gen,data,property,ownProperties){const cond=(0,codegen_1._)`${data}${(0,codegen_1.getProperty)(property)} !== undefined`;return ownProperties?(0,codegen_1._)`${cond} && ${isOwnProperty(gen,data,property)}`:cond}code$3.propertyInData=propertyInData;function noPropertyInData(gen,data,property,ownProperties){const cond=(0,codegen_1._)`${data}${(0,codegen_1.getProperty)(property)} === undefined`;return ownProperties?(0,codegen_1.or)(cond,(0,codegen_1.
not)(isOwnProperty(gen,data,property))):cond}code$3.noPropertyInData=noPropertyInData;function allSchemaProperties(schemaMap){return schemaMap?Object.keys(schemaMap).filter(p2=>p2!=="__proto__"):[]}code$3.allSchemaProperties=allSchemaProperties;function schemaProperties(it,schemaMap){return allSchemaProperties(schemaMap).filter(p2=>!(0,util_1.alwaysValidSchema)(it,schemaMap[p2]))}code$3.schemaProperties=schemaProperties;function callValidateCode({schemaCode,data,it:{gen,topSchemaRef,schemaPath,errorPath},
it},func,context,passSchema){const dataAndSchema=passSchema?(0,codegen_1._)`${schemaCode}, ${data}, ${topSchemaRef}${schemaPath}`:data,valCxt=[[names_1.default.instancePath,(0,codegen_1.strConcat)(names_1.default.instancePath,errorPath)],[names_1.default.parentData,it.parentData],[names_1.default.parentDataProperty,it.parentDataProperty],[names_1.default.rootData,names_1.default.rootData]];it.opts.dynamicRef&&valCxt.push([names_1.default.dynamicAnchors,names_1.default.dynamicAnchors]);const args=(0,codegen_1.
_)`${dataAndSchema}, ${gen.object(...valCxt)}`;return context!==codegen_1.nil?(0,codegen_1._)`${func}.call(${context}, ${args})`:(0,codegen_1._)`${func}(${args})`}code$3.callValidateCode=callValidateCode;const newRegExp=(0,codegen_1._)`new RegExp`;function usePattern({gen,it:{opts}},pattern2){const u=opts.unicodeRegExp?"u":"",{regExp}=opts.code,rx=regExp(pattern2,u);return gen.scopeValue("pattern",{key:rx.toString(),ref:rx,code:(0,codegen_1._)`${regExp.code==="new RegExp"?newRegExp:(0,util_2.useFunc)(
gen,regExp)}(${pattern2}, ${u})`})}code$3.usePattern=usePattern;function validateArray(cxt){const{gen,data,keyword:keyword2,it}=cxt,valid2=gen.name("valid");if(it.allErrors){const validArr=gen.let("valid",!0);return validateItems(()=>gen.assign(validArr,!1)),validArr}return gen.var(valid2,!0),validateItems(()=>gen.break()),valid2;function validateItems(notValid){const len=gen.const("len",(0,codegen_1._)`${data}.length`);gen.forRange("i",0,len,i=>{cxt.subschema({keyword:keyword2,dataProp:i,dataPropType:util_1.
Type.Num},valid2),gen.if((0,codegen_1.not)(valid2),notValid)})}}code$3.validateArray=validateArray;function validateUnion(cxt){const{gen,schema,keyword:keyword2,it}=cxt;if(!Array.isArray(schema))throw new Error("ajv implementation error");if(schema.some(sch=>(0,util_1.alwaysValidSchema)(it,sch))&&!it.opts.unevaluated)return;const valid2=gen.let("valid",!1),schValid=gen.name("_valid");gen.block(()=>schema.forEach((_sch,i)=>{const schCxt=cxt.subschema({keyword:keyword2,schemaProp:i,compositeRule:!0},
schValid);gen.assign(valid2,(0,codegen_1._)`${valid2} || ${schValid}`),cxt.mergeValidEvaluated(schCxt,schValid)||gen.if((0,codegen_1.not)(valid2))})),cxt.result(valid2,()=>cxt.reset(),()=>cxt.error(!0))}return code$3.validateUnion=validateUnion,code$3}var hasRequiredKeyword;function requireKeyword(){if(hasRequiredKeyword)return keyword;hasRequiredKeyword=1,Object.defineProperty(keyword,"__esModule",{value:!0}),keyword.validateKeywordUsage=keyword.validSchemaType=keyword.funcKeywordCode=keyword.macroKeywordCode=
void 0;const codegen_1=requireCodegen(),names_1=requireNames(),code_1=requireCode(),errors_1=requireErrors();function macroKeywordCode(cxt,def){const{gen,keyword:keyword2,schema,parentSchema,it}=cxt,macroSchema=def.macro.call(it.self,schema,parentSchema,it),schemaRef=useKeyword(gen,keyword2,macroSchema);it.opts.validateSchema!==!1&&it.self.validateSchema(macroSchema,!0);const valid2=gen.name("valid");cxt.subschema({schema:macroSchema,schemaPath:codegen_1.nil,errSchemaPath:`${it.errSchemaPath}/${keyword2}`,
topSchemaRef:schemaRef,compositeRule:!0},valid2),cxt.pass(valid2,()=>cxt.error(!0))}keyword.macroKeywordCode=macroKeywordCode;function funcKeywordCode(cxt,def){var _a2;const{gen,keyword:keyword2,schema,parentSchema,$data,it}=cxt;checkAsyncKeyword(it,def);const validate2=!$data&&def.compile?def.compile.call(it.self,schema,parentSchema,it):def.validate,validateRef=useKeyword(gen,keyword2,validate2),valid2=gen.let("valid");cxt.block$data(valid2,validateKeyword),cxt.ok((_a2=def.valid)!==null&&_a2!==
void 0?_a2:valid2);function validateKeyword(){if(def.errors===!1)assignValid(),def.modifying&&modifyData(cxt),reportErrs(()=>cxt.error());else{const ruleErrs=def.async?validateAsync():validateSync();def.modifying&&modifyData(cxt),reportErrs(()=>addErrs(cxt,ruleErrs))}}function validateAsync(){const ruleErrs=gen.let("ruleErrs",null);return gen.try(()=>assignValid((0,codegen_1._)`await `),e=>gen.assign(valid2,!1).if((0,codegen_1._)`${e} instanceof ${it.ValidationError}`,()=>gen.assign(ruleErrs,(0,codegen_1.
_)`${e}.errors`),()=>gen.throw(e))),ruleErrs}function validateSync(){const validateErrs=(0,codegen_1._)`${validateRef}.errors`;return gen.assign(validateErrs,null),assignValid(codegen_1.nil),validateErrs}function assignValid(_await=def.async?(0,codegen_1._)`await `:codegen_1.nil){const passCxt=it.opts.passContext?names_1.default.this:names_1.default.self,passSchema=!("compile"in def&&!$data||def.schema===!1);gen.assign(valid2,(0,codegen_1._)`${_await}${(0,code_1.callValidateCode)(cxt,validateRef,
passCxt,passSchema)}`,def.modifying)}function reportErrs(errors2){var _a3;gen.if((0,codegen_1.not)((_a3=def.valid)!==null&&_a3!==void 0?_a3:valid2),errors2)}}keyword.funcKeywordCode=funcKeywordCode;function modifyData(cxt){const{gen,data,it}=cxt;gen.if(it.parentData,()=>gen.assign(data,(0,codegen_1._)`${it.parentData}[${it.parentDataProperty}]`))}function addErrs(cxt,errs){const{gen}=cxt;gen.if((0,codegen_1._)`Array.isArray(${errs})`,()=>{gen.assign(names_1.default.vErrors,(0,codegen_1._)`${names_1.
default.vErrors} === null ? ${errs} : ${names_1.default.vErrors}.concat(${errs})`).assign(names_1.default.errors,(0,codegen_1._)`${names_1.default.vErrors}.length`),(0,errors_1.extendErrors)(cxt)},()=>cxt.error())}function checkAsyncKeyword({schemaEnv},def){if(def.async&&!schemaEnv.$async)throw new Error("async keyword in sync schema")}function useKeyword(gen,keyword2,result){if(result===void 0)throw new Error(`keyword "${keyword2}" failed to compile`);return gen.scopeValue("keyword",typeof result==
"function"?{ref:result}:{ref:result,code:(0,codegen_1.stringify)(result)})}function validSchemaType(schema,schemaType,allowUndefined=!1){return!schemaType.length||schemaType.some(st=>st==="array"?Array.isArray(schema):st==="object"?schema&&typeof schema=="object"&&!Array.isArray(schema):typeof schema==st||allowUndefined&&typeof schema>"u")}keyword.validSchemaType=validSchemaType;function validateKeywordUsage({schema,opts,self:self2,errSchemaPath},def,keyword2){if(Array.isArray(def.keyword)?!def.
keyword.includes(keyword2):def.keyword!==keyword2)throw new Error("ajv implementation error");const deps=def.dependencies;if(deps?.some(kwd=>!Object.prototype.hasOwnProperty.call(schema,kwd)))throw new Error(`parent schema must have dependencies of ${keyword2}: ${deps.join(",")}`);if(def.validateSchema&&!def.validateSchema(schema[keyword2])){const msg=`keyword "${keyword2}" value is invalid at path "${errSchemaPath}": `+self2.errorsText(def.validateSchema.errors);if(opts.validateSchema==="log")self2.
logger.error(msg);else throw new Error(msg)}}return keyword.validateKeywordUsage=validateKeywordUsage,keyword}var subschema={},hasRequiredSubschema;function requireSubschema(){if(hasRequiredSubschema)return subschema;hasRequiredSubschema=1,Object.defineProperty(subschema,"__esModule",{value:!0}),subschema.extendSubschemaMode=subschema.extendSubschemaData=subschema.getSubschema=void 0;const codegen_1=requireCodegen(),util_1=requireUtil();function getSubschema(it,{keyword:keyword2,schemaProp,schema,
schemaPath,errSchemaPath,topSchemaRef}){if(keyword2!==void 0&&schema!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(keyword2!==void 0){const sch=it.schema[keyword2];return schemaProp===void 0?{schema:sch,schemaPath:(0,codegen_1._)`${it.schemaPath}${(0,codegen_1.getProperty)(keyword2)}`,errSchemaPath:`${it.errSchemaPath}/${keyword2}`}:{schema:sch[schemaProp],schemaPath:(0,codegen_1._)`${it.schemaPath}${(0,codegen_1.getProperty)(keyword2)}${(0,codegen_1.getProperty)(
schemaProp)}`,errSchemaPath:`${it.errSchemaPath}/${keyword2}/${(0,util_1.escapeFragment)(schemaProp)}`}}if(schema!==void 0){if(schemaPath===void 0||errSchemaPath===void 0||topSchemaRef===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema,schemaPath,topSchemaRef,errSchemaPath}}throw new Error('either "keyword" or "schema" must be passed')}subschema.getSubschema=getSubschema;function extendSubschemaData(subschema2,it,{dataProp,dataPropType:dpType,
data,dataTypes,propertyName}){if(data!==void 0&&dataProp!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen}=it;if(dataProp!==void 0){const{errorPath,dataPathArr,opts}=it,nextData=gen.let("data",(0,codegen_1._)`${it.data}${(0,codegen_1.getProperty)(dataProp)}`,!0);dataContextProps(nextData),subschema2.errorPath=(0,codegen_1.str)`${errorPath}${(0,util_1.getErrorPath)(dataProp,dpType,opts.jsPropertySyntax)}`,subschema2.parentDataProperty=(0,codegen_1._)`${dataProp}`,
subschema2.dataPathArr=[...dataPathArr,subschema2.parentDataProperty]}if(data!==void 0){const nextData=data instanceof codegen_1.Name?data:gen.let("data",data,!0);dataContextProps(nextData),propertyName!==void 0&&(subschema2.propertyName=propertyName)}dataTypes&&(subschema2.dataTypes=dataTypes);function dataContextProps(_nextData){subschema2.data=_nextData,subschema2.dataLevel=it.dataLevel+1,subschema2.dataTypes=[],it.definedProperties=new Set,subschema2.parentData=it.data,subschema2.dataNames=[
...it.dataNames,_nextData]}}subschema.extendSubschemaData=extendSubschemaData;function extendSubschemaMode(subschema2,{jtdDiscriminator,jtdMetadata,compositeRule,createErrors,allErrors}){compositeRule!==void 0&&(subschema2.compositeRule=compositeRule),createErrors!==void 0&&(subschema2.createErrors=createErrors),allErrors!==void 0&&(subschema2.allErrors=allErrors),subschema2.jtdDiscriminator=jtdDiscriminator,subschema2.jtdMetadata=jtdMetadata}return subschema.extendSubschemaMode=extendSubschemaMode,
subschema}var resolve={},jsonSchemaTraverse={exports:{}},hasRequiredJsonSchemaTraverse;function requireJsonSchemaTraverse(){if(hasRequiredJsonSchemaTraverse)return jsonSchemaTraverse.exports;hasRequiredJsonSchemaTraverse=1;var traverse=jsonSchemaTraverse.exports=function(schema,opts,cb){typeof opts=="function"&&(cb=opts,opts={}),cb=opts.cb||cb;var pre=typeof cb=="function"?cb:cb.pre||function(){},post=cb.post||function(){};_traverse(opts,pre,post,schema,"",schema)};traverse.keywords={additionalItems:!0,
items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},traverse.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},traverse.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},traverse.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};
function _traverse(opts,pre,post,schema,jsonPtr,rootSchema,parentJsonPtr,parentKeyword,parentSchema,keyIndex){if(schema&&typeof schema=="object"&&!Array.isArray(schema)){pre(schema,jsonPtr,rootSchema,parentJsonPtr,parentKeyword,parentSchema,keyIndex);for(var key2 in schema){var sch=schema[key2];if(Array.isArray(sch)){if(key2 in traverse.arrayKeywords)for(var i=0;i<sch.length;i++)_traverse(opts,pre,post,sch[i],jsonPtr+"/"+key2+"/"+i,rootSchema,jsonPtr,key2,schema,i)}else if(key2 in traverse.propsKeywords){
if(sch&&typeof sch=="object")for(var prop2 in sch)_traverse(opts,pre,post,sch[prop2],jsonPtr+"/"+key2+"/"+escapeJsonPtr(prop2),rootSchema,jsonPtr,key2,schema,prop2)}else(key2 in traverse.keywords||opts.allKeys&&!(key2 in traverse.skipKeywords))&&_traverse(opts,pre,post,sch,jsonPtr+"/"+key2,rootSchema,jsonPtr,key2,schema)}post(schema,jsonPtr,rootSchema,parentJsonPtr,parentKeyword,parentSchema,keyIndex)}}function escapeJsonPtr(str){return str.replace(/~/g,"~0").replace(/\//g,"~1")}return jsonSchemaTraverse.
exports}var hasRequiredResolve;function requireResolve(){if(hasRequiredResolve)return resolve;hasRequiredResolve=1,Object.defineProperty(resolve,"__esModule",{value:!0}),resolve.getSchemaRefs=resolve.resolveUrl=resolve.normalizeId=resolve._getFullPath=resolve.getFullPath=resolve.inlineRef=void 0;const util_1=requireUtil(),equal2=requireFastDeepEqual(),traverse=requireJsonSchemaTraverse(),SIMPLE_INLINED=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","ma\
xItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function inlineRef(schema,limit2=!0){return typeof schema=="boolean"?!0:limit2===!0?!hasRef(schema):limit2?countKeys(schema)<=limit2:!1}resolve.inlineRef=inlineRef;const REF_KEYWORDS=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function hasRef(schema){for(const key2 in schema){if(REF_KEYWORDS.has(key2))return!0;const sch=schema[key2];if(Array.isArray(sch)&&sch.some(
hasRef)||typeof sch=="object"&&hasRef(sch))return!0}return!1}function countKeys(schema){let count=0;for(const key2 in schema){if(key2==="$ref")return 1/0;if(count++,!SIMPLE_INLINED.has(key2)&&(typeof schema[key2]=="object"&&(0,util_1.eachItem)(schema[key2],sch=>count+=countKeys(sch)),count===1/0))return 1/0}return count}function getFullPath(resolver2,id2="",normalize2){normalize2!==!1&&(id2=normalizeId(id2));const p2=resolver2.parse(id2);return _getFullPath(resolver2,p2)}resolve.getFullPath=getFullPath;
function _getFullPath(resolver2,p2){return resolver2.serialize(p2).split("#")[0]+"#"}resolve._getFullPath=_getFullPath;const TRAILING_SLASH_HASH=/#\/?$/;function normalizeId(id2){return id2?id2.replace(TRAILING_SLASH_HASH,""):""}resolve.normalizeId=normalizeId;function resolveUrl(resolver2,baseId,id2){return id2=normalizeId(id2),resolver2.resolve(baseId,id2)}resolve.resolveUrl=resolveUrl;const ANCHOR=/^[a-z_][-a-z0-9._]*$/i;function getSchemaRefs(schema,baseId){if(typeof schema=="boolean")return{};
const{schemaId,uriResolver}=this.opts,schId=normalizeId(schema[schemaId]||baseId),baseIds={"":schId},pathPrefix=getFullPath(uriResolver,schId,!1),localRefs={},schemaRefs=new Set;return traverse(schema,{allKeys:!0},(sch,jsonPtr,_,parentJsonPtr)=>{if(parentJsonPtr===void 0)return;const fullPath=pathPrefix+jsonPtr;let innerBaseId=baseIds[parentJsonPtr];typeof sch[schemaId]=="string"&&(innerBaseId=addRef.call(this,sch[schemaId])),addAnchor.call(this,sch.$anchor),addAnchor.call(this,sch.$dynamicAnchor),
baseIds[jsonPtr]=innerBaseId;function addRef(ref2){const _resolve=this.opts.uriResolver.resolve;if(ref2=normalizeId(innerBaseId?_resolve(innerBaseId,ref2):ref2),schemaRefs.has(ref2))throw ambiguos(ref2);schemaRefs.add(ref2);let schOrRef=this.refs[ref2];return typeof schOrRef=="string"&&(schOrRef=this.refs[schOrRef]),typeof schOrRef=="object"?checkAmbiguosRef(sch,schOrRef.schema,ref2):ref2!==normalizeId(fullPath)&&(ref2[0]==="#"?(checkAmbiguosRef(sch,localRefs[ref2],ref2),localRefs[ref2]=sch):this.
refs[ref2]=fullPath),ref2}function addAnchor(anchor){if(typeof anchor=="string"){if(!ANCHOR.test(anchor))throw new Error(`invalid anchor "${anchor}"`);addRef.call(this,`#${anchor}`)}}}),localRefs;function checkAmbiguosRef(sch1,sch2,ref2){if(sch2!==void 0&&!equal2(sch1,sch2))throw ambiguos(ref2)}function ambiguos(ref2){return new Error(`reference "${ref2}" resolves to more than one schema`)}}return resolve.getSchemaRefs=getSchemaRefs,resolve}var hasRequiredValidate;function requireValidate(){if(hasRequiredValidate)
return validate;hasRequiredValidate=1,Object.defineProperty(validate,"__esModule",{value:!0}),validate.getData=validate.KeywordCxt=validate.validateFunctionCode=void 0;const boolSchema_1=requireBoolSchema(),dataType_1=requireDataType(),applicability_1=requireApplicability(),dataType_2=requireDataType(),defaults_1=requireDefaults(),keyword_1=requireKeyword(),subschema_1=requireSubschema(),codegen_1=requireCodegen(),names_1=requireNames(),resolve_1=requireResolve(),util_1=requireUtil(),errors_1=requireErrors();
function validateFunctionCode(it){if(isSchemaObj(it)&&(checkKeywords(it),schemaCxtHasRules(it))){topSchemaObjCode(it);return}validateFunction(it,()=>(0,boolSchema_1.topBoolOrEmptySchema)(it))}validate.validateFunctionCode=validateFunctionCode;function validateFunction({gen,validateName,schema,schemaEnv,opts},body2){opts.code.es5?gen.func(validateName,(0,codegen_1._)`${names_1.default.data}, ${names_1.default.valCxt}`,schemaEnv.$async,()=>{gen.code((0,codegen_1._)`"use strict"; ${funcSourceUrl(schema,
opts)}`),destructureValCxtES5(gen,opts),gen.code(body2)}):gen.func(validateName,(0,codegen_1._)`${names_1.default.data}, ${destructureValCxt(opts)}`,schemaEnv.$async,()=>gen.code(funcSourceUrl(schema,opts)).code(body2))}function destructureValCxt(opts){return(0,codegen_1._)`{${names_1.default.instancePath}="", ${names_1.default.parentData}, ${names_1.default.parentDataProperty}, ${names_1.default.rootData}=${names_1.default.data}${opts.dynamicRef?(0,codegen_1._)`, ${names_1.default.dynamicAnchors}={}`:
codegen_1.nil}}={}`}function destructureValCxtES5(gen,opts){gen.if(names_1.default.valCxt,()=>{gen.var(names_1.default.instancePath,(0,codegen_1._)`${names_1.default.valCxt}.${names_1.default.instancePath}`),gen.var(names_1.default.parentData,(0,codegen_1._)`${names_1.default.valCxt}.${names_1.default.parentData}`),gen.var(names_1.default.parentDataProperty,(0,codegen_1._)`${names_1.default.valCxt}.${names_1.default.parentDataProperty}`),gen.var(names_1.default.rootData,(0,codegen_1._)`${names_1.
default.valCxt}.${names_1.default.rootData}`),opts.dynamicRef&&gen.var(names_1.default.dynamicAnchors,(0,codegen_1._)`${names_1.default.valCxt}.${names_1.default.dynamicAnchors}`)},()=>{gen.var(names_1.default.instancePath,(0,codegen_1._)`""`),gen.var(names_1.default.parentData,(0,codegen_1._)`undefined`),gen.var(names_1.default.parentDataProperty,(0,codegen_1._)`undefined`),gen.var(names_1.default.rootData,names_1.default.data),opts.dynamicRef&&gen.var(names_1.default.dynamicAnchors,(0,codegen_1.
_)`{}`)})}function topSchemaObjCode(it){const{schema,opts,gen}=it;validateFunction(it,()=>{opts.$comment&&schema.$comment&&commentKeyword(it),checkNoDefault(it),gen.let(names_1.default.vErrors,null),gen.let(names_1.default.errors,0),opts.unevaluated&&resetEvaluated(it),typeAndKeywords(it),returnResults(it)})}function resetEvaluated(it){const{gen,validateName}=it;it.evaluated=gen.const("evaluated",(0,codegen_1._)`${validateName}.evaluated`),gen.if((0,codegen_1._)`${it.evaluated}.dynamicProps`,()=>gen.
assign((0,codegen_1._)`${it.evaluated}.props`,(0,codegen_1._)`undefined`)),gen.if((0,codegen_1._)`${it.evaluated}.dynamicItems`,()=>gen.assign((0,codegen_1._)`${it.evaluated}.items`,(0,codegen_1._)`undefined`))}function funcSourceUrl(schema,opts){const schId=typeof schema=="object"&&schema[opts.schemaId];return schId&&(opts.code.source||opts.code.process)?(0,codegen_1._)`/*# sourceURL=${schId} */`:codegen_1.nil}function subschemaCode(it,valid2){if(isSchemaObj(it)&&(checkKeywords(it),schemaCxtHasRules(
it))){subSchemaObjCode(it,valid2);return}(0,boolSchema_1.boolOrEmptySchema)(it,valid2)}function schemaCxtHasRules({schema,self:self2}){if(typeof schema=="boolean")return!schema;for(const key2 in schema)if(self2.RULES.all[key2])return!0;return!1}function isSchemaObj(it){return typeof it.schema!="boolean"}function subSchemaObjCode(it,valid2){const{schema,gen,opts}=it;opts.$comment&&schema.$comment&&commentKeyword(it),updateContext(it),checkAsyncSchema(it);const errsCount=gen.const("_errs",names_1.
default.errors);typeAndKeywords(it,errsCount),gen.var(valid2,(0,codegen_1._)`${errsCount} === ${names_1.default.errors}`)}function checkKeywords(it){(0,util_1.checkUnknownRules)(it),checkRefsAndKeywords(it)}function typeAndKeywords(it,errsCount){if(it.opts.jtd)return schemaKeywords(it,[],!1,errsCount);const types2=(0,dataType_1.getSchemaTypes)(it.schema),checkedTypes=(0,dataType_1.coerceAndCheckDataType)(it,types2);schemaKeywords(it,types2,!checkedTypes,errsCount)}function checkRefsAndKeywords(it){
const{schema,errSchemaPath,opts,self:self2}=it;schema.$ref&&opts.ignoreKeywordsWithRef&&(0,util_1.schemaHasRulesButRef)(schema,self2.RULES)&&self2.logger.warn(`$ref: keywords ignored in schema at path "${errSchemaPath}"`)}function checkNoDefault(it){const{schema,opts}=it;schema.default!==void 0&&opts.useDefaults&&opts.strictSchema&&(0,util_1.checkStrictMode)(it,"default is ignored in the schema root")}function updateContext(it){const schId=it.schema[it.opts.schemaId];schId&&(it.baseId=(0,resolve_1.
resolveUrl)(it.opts.uriResolver,it.baseId,schId))}function checkAsyncSchema(it){if(it.schema.$async&&!it.schemaEnv.$async)throw new Error("async schema in sync schema")}function commentKeyword({gen,schemaEnv,schema,errSchemaPath,opts}){const msg=schema.$comment;if(opts.$comment===!0)gen.code((0,codegen_1._)`${names_1.default.self}.logger.log(${msg})`);else if(typeof opts.$comment=="function"){const schemaPath=(0,codegen_1.str)`${errSchemaPath}/$comment`,rootName=gen.scopeValue("root",{ref:schemaEnv.
root});gen.code((0,codegen_1._)`${names_1.default.self}.opts.$comment(${msg}, ${schemaPath}, ${rootName}.schema)`)}}function returnResults(it){const{gen,schemaEnv,validateName,ValidationError,opts}=it;schemaEnv.$async?gen.if((0,codegen_1._)`${names_1.default.errors} === 0`,()=>gen.return(names_1.default.data),()=>gen.throw((0,codegen_1._)`new ${ValidationError}(${names_1.default.vErrors})`)):(gen.assign((0,codegen_1._)`${validateName}.errors`,names_1.default.vErrors),opts.unevaluated&&assignEvaluated(
it),gen.return((0,codegen_1._)`${names_1.default.errors} === 0`))}function assignEvaluated({gen,evaluated,props,items:items2}){props instanceof codegen_1.Name&&gen.assign((0,codegen_1._)`${evaluated}.props`,props),items2 instanceof codegen_1.Name&&gen.assign((0,codegen_1._)`${evaluated}.items`,items2)}function schemaKeywords(it,types2,typeErrors,errsCount){const{gen,schema,data,allErrors,opts,self:self2}=it,{RULES}=self2;if(schema.$ref&&(opts.ignoreKeywordsWithRef||!(0,util_1.schemaHasRulesButRef)(
schema,RULES))){gen.block(()=>keywordCode(it,"$ref",RULES.all.$ref.definition));return}opts.jtd||checkStrictTypes(it,types2),gen.block(()=>{for(const group of RULES.rules)groupKeywords(group);groupKeywords(RULES.post)});function groupKeywords(group){(0,applicability_1.shouldUseGroup)(schema,group)&&(group.type?(gen.if((0,dataType_2.checkDataType)(group.type,data,opts.strictNumbers)),iterateKeywords(it,group),types2.length===1&&types2[0]===group.type&&typeErrors&&(gen.else(),(0,dataType_2.reportTypeError)(
it)),gen.endIf()):iterateKeywords(it,group),allErrors||gen.if((0,codegen_1._)`${names_1.default.errors} === ${errsCount||0}`))}}function iterateKeywords(it,group){const{gen,schema,opts:{useDefaults}}=it;useDefaults&&(0,defaults_1.assignDefaults)(it,group.type),gen.block(()=>{for(const rule of group.rules)(0,applicability_1.shouldUseRule)(schema,rule)&&keywordCode(it,rule.keyword,rule.definition,group.type)})}function checkStrictTypes(it,types2){it.schemaEnv.meta||!it.opts.strictTypes||(checkContextTypes(
it,types2),it.opts.allowUnionTypes||checkMultipleTypes(it,types2),checkKeywordTypes(it,it.dataTypes))}function checkContextTypes(it,types2){if(types2.length){if(!it.dataTypes.length){it.dataTypes=types2;return}types2.forEach(t=>{includesType(it.dataTypes,t)||strictTypesError(it,`type "${t}" not allowed by context "${it.dataTypes.join(",")}"`)}),narrowSchemaTypes(it,types2)}}function checkMultipleTypes(it,ts){ts.length>1&&!(ts.length===2&&ts.includes("null"))&&strictTypesError(it,"use allowUnionT\
ypes to allow union type keyword")}function checkKeywordTypes(it,ts){const rules2=it.self.RULES.all;for(const keyword2 in rules2){const rule=rules2[keyword2];if(typeof rule=="object"&&(0,applicability_1.shouldUseRule)(it.schema,rule)){const{type:type2}=rule.definition;type2.length&&!type2.some(t=>hasApplicableType(ts,t))&&strictTypesError(it,`missing type "${type2.join(",")}" for keyword "${keyword2}"`)}}}function hasApplicableType(schTs,kwdT){return schTs.includes(kwdT)||kwdT==="number"&&schTs.
includes("integer")}function includesType(ts,t){return ts.includes(t)||t==="integer"&&ts.includes("number")}function narrowSchemaTypes(it,withTypes){const ts=[];for(const t of it.dataTypes)includesType(withTypes,t)?ts.push(t):withTypes.includes("integer")&&t==="number"&&ts.push("integer");it.dataTypes=ts}function strictTypesError(it,msg){const schemaPath=it.schemaEnv.baseId+it.errSchemaPath;msg+=` at "${schemaPath}" (strictTypes)`,(0,util_1.checkStrictMode)(it,msg,it.opts.strictTypes)}class KeywordCxt{constructor(it,def,keyword2){
if((0,keyword_1.validateKeywordUsage)(it,def,keyword2),this.gen=it.gen,this.allErrors=it.allErrors,this.keyword=keyword2,this.data=it.data,this.schema=it.schema[keyword2],this.$data=def.$data&&it.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,util_1.schemaRefOrVal)(it,this.schema,keyword2,this.$data),this.schemaType=def.schemaType,this.parentSchema=it.schema,this.params={},this.it=it,this.def=def,this.$data)this.schemaCode=it.gen.const("vSchema",getData(this.$data,it));else if(this.
schemaCode=this.schemaValue,!(0,keyword_1.validSchemaType)(this.schema,def.schemaType,def.allowUndefined))throw new Error(`${keyword2} value must be ${JSON.stringify(def.schemaType)}`);("code"in def?def.trackErrors:def.errors!==!1)&&(this.errsCount=it.gen.const("_errs",names_1.default.errors))}result(condition,successAction,failAction){this.failResult((0,codegen_1.not)(condition),successAction,failAction)}failResult(condition,successAction,failAction){this.gen.if(condition),failAction?failAction():
this.error(),successAction?(this.gen.else(),successAction(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(condition,failAction){this.failResult((0,codegen_1.not)(condition),void 0,failAction)}fail(condition){if(condition===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(condition),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(condition){if(!this.$data)return this.fail(condition);const{schemaCode}=this;this.
fail((0,codegen_1._)`${schemaCode} !== undefined && (${(0,codegen_1.or)(this.invalid$data(),condition)})`)}error(append2,errorParams,errorPaths){if(errorParams){this.setParams(errorParams),this._error(append2,errorPaths),this.setParams({});return}this._error(append2,errorPaths)}_error(append2,errorPaths){(append2?errors_1.reportExtraError:errors_1.reportError)(this,this.def.error,errorPaths)}$dataError(){(0,errors_1.reportError)(this,this.def.$dataError||errors_1.keyword$DataError)}reset(){if(this.
errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,errors_1.resetErrorsCount)(this.gen,this.errsCount)}ok(cond){this.allErrors||this.gen.if(cond)}setParams(obj,assign){assign?Object.assign(this.params,obj):this.params=obj}block$data(valid2,codeBlock,$dataValid=codegen_1.nil){this.gen.block(()=>{this.check$data(valid2,$dataValid),codeBlock()})}check$data(valid2=codegen_1.nil,$dataValid=codegen_1.nil){if(!this.$data)return;const{gen,schemaCode,schemaType,def}=this;gen.
if((0,codegen_1.or)((0,codegen_1._)`${schemaCode} === undefined`,$dataValid)),valid2!==codegen_1.nil&&gen.assign(valid2,!0),(schemaType.length||def.validateSchema)&&(gen.elseIf(this.invalid$data()),this.$dataError(),valid2!==codegen_1.nil&&gen.assign(valid2,!1)),gen.else()}invalid$data(){const{gen,schemaCode,schemaType,def,it}=this;return(0,codegen_1.or)(wrong$DataType(),invalid$DataSchema());function wrong$DataType(){if(schemaType.length){if(!(schemaCode instanceof codegen_1.Name))throw new Error(
"ajv implementation error");const st=Array.isArray(schemaType)?schemaType:[schemaType];return(0,codegen_1._)`${(0,dataType_2.checkDataTypes)(st,schemaCode,it.opts.strictNumbers,dataType_2.DataType.Wrong)}`}return codegen_1.nil}function invalid$DataSchema(){if(def.validateSchema){const validateSchemaRef=gen.scopeValue("validate$data",{ref:def.validateSchema});return(0,codegen_1._)`!${validateSchemaRef}(${schemaCode})`}return codegen_1.nil}}subschema(appl,valid2){const subschema2=(0,subschema_1.getSubschema)(
this.it,appl);(0,subschema_1.extendSubschemaData)(subschema2,this.it,appl),(0,subschema_1.extendSubschemaMode)(subschema2,appl);const nextContext={...this.it,...subschema2,items:void 0,props:void 0};return subschemaCode(nextContext,valid2),nextContext}mergeEvaluated(schemaCxt,toName){const{it,gen}=this;it.opts.unevaluated&&(it.props!==!0&&schemaCxt.props!==void 0&&(it.props=util_1.mergeEvaluated.props(gen,schemaCxt.props,it.props,toName)),it.items!==!0&&schemaCxt.items!==void 0&&(it.items=util_1.
mergeEvaluated.items(gen,schemaCxt.items,it.items,toName)))}mergeValidEvaluated(schemaCxt,valid2){const{it,gen}=this;if(it.opts.unevaluated&&(it.props!==!0||it.items!==!0))return gen.if(valid2,()=>this.mergeEvaluated(schemaCxt,codegen_1.Name)),!0}}validate.KeywordCxt=KeywordCxt;function keywordCode(it,keyword2,def,ruleType){const cxt=new KeywordCxt(it,def,keyword2);"code"in def?def.code(cxt,ruleType):cxt.$data&&def.validate?(0,keyword_1.funcKeywordCode)(cxt,def):"macro"in def?(0,keyword_1.macroKeywordCode)(
cxt,def):(def.compile||def.validate)&&(0,keyword_1.funcKeywordCode)(cxt,def)}const JSON_POINTER=/^\/(?:[^~]|~0|~1)*$/,RELATIVE_JSON_POINTER=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function getData($data,{dataLevel,dataNames,dataPathArr}){let jsonPointer,data;if($data==="")return names_1.default.rootData;if($data[0]==="/"){if(!JSON_POINTER.test($data))throw new Error(`Invalid JSON-pointer: ${$data}`);jsonPointer=$data,data=names_1.default.rootData}else{const matches2=RELATIVE_JSON_POINTER.exec($data);
if(!matches2)throw new Error(`Invalid JSON-pointer: ${$data}`);const up=+matches2[1];if(jsonPointer=matches2[2],jsonPointer==="#"){if(up>=dataLevel)throw new Error(errorMsg("property/index",up));return dataPathArr[dataLevel-up]}if(up>dataLevel)throw new Error(errorMsg("data",up));if(data=dataNames[dataLevel-up],!jsonPointer)return data}let expr=data;const segments=jsonPointer.split("/");for(const segment of segments)segment&&(data=(0,codegen_1._)`${data}${(0,codegen_1.getProperty)((0,util_1.unescapeJsonPointer)(
segment))}`,expr=(0,codegen_1._)`${expr} && ${data}`);return expr;function errorMsg(pointerType,up){return`Cannot access ${pointerType} ${up} levels up, current level is ${dataLevel}`}}return validate.getData=getData,validate}var validation_error={},hasRequiredValidation_error;function requireValidation_error(){if(hasRequiredValidation_error)return validation_error;hasRequiredValidation_error=1,Object.defineProperty(validation_error,"__esModule",{value:!0});class ValidationError extends Error{constructor(errors2){
super("validation failed"),this.errors=errors2,this.ajv=this.validation=!0}}return validation_error.default=ValidationError,validation_error}var ref_error={},hasRequiredRef_error;function requireRef_error(){if(hasRequiredRef_error)return ref_error;hasRequiredRef_error=1,Object.defineProperty(ref_error,"__esModule",{value:!0});const resolve_1=requireResolve();class MissingRefError extends Error{constructor(resolver2,baseId,ref2,msg){super(msg||`can't resolve reference ${ref2} from id ${baseId}`),
this.missingRef=(0,resolve_1.resolveUrl)(resolver2,baseId,ref2),this.missingSchema=(0,resolve_1.normalizeId)((0,resolve_1.getFullPath)(resolver2,this.missingRef))}}return ref_error.default=MissingRefError,ref_error}var compile={},hasRequiredCompile;function requireCompile(){if(hasRequiredCompile)return compile;hasRequiredCompile=1,Object.defineProperty(compile,"__esModule",{value:!0}),compile.resolveSchema=compile.getCompilingSchema=compile.resolveRef=compile.compileSchema=compile.SchemaEnv=void 0;
const codegen_1=requireCodegen(),validation_error_1=requireValidation_error(),names_1=requireNames(),resolve_1=requireResolve(),util_1=requireUtil(),validate_1=requireValidate();class SchemaEnv{constructor(env2){var _a2;this.refs={},this.dynamicAnchors={};let schema;typeof env2.schema=="object"&&(schema=env2.schema),this.schema=env2.schema,this.schemaId=env2.schemaId,this.root=env2.root||this,this.baseId=(_a2=env2.baseId)!==null&&_a2!==void 0?_a2:(0,resolve_1.normalizeId)(schema?.[env2.schemaId||
"$id"]),this.schemaPath=env2.schemaPath,this.localRefs=env2.localRefs,this.meta=env2.meta,this.$async=schema?.$async,this.refs={}}}compile.SchemaEnv=SchemaEnv;function compileSchema(sch){const _sch=getCompilingSchema.call(this,sch);if(_sch)return _sch;const rootId=(0,resolve_1.getFullPath)(this.opts.uriResolver,sch.root.baseId),{es5,lines}=this.opts.code,{ownProperties}=this.opts,gen=new codegen_1.CodeGen(this.scope,{es5,lines,ownProperties});let _ValidationError;sch.$async&&(_ValidationError=gen.
scopeValue("Error",{ref:validation_error_1.default,code:(0,codegen_1._)`require("ajv/dist/runtime/validation_error").default`}));const validateName=gen.scopeName("validate");sch.validateName=validateName;const schemaCxt={gen,allErrors:this.opts.allErrors,data:names_1.default.data,parentData:names_1.default.parentData,parentDataProperty:names_1.default.parentDataProperty,dataNames:[names_1.default.data],dataPathArr:[codegen_1.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:gen.
scopeValue("schema",this.opts.code.source===!0?{ref:sch.schema,code:(0,codegen_1.stringify)(sch.schema)}:{ref:sch.schema}),validateName,ValidationError:_ValidationError,schema:sch.schema,schemaEnv:sch,rootId,baseId:sch.baseId||rootId,schemaPath:codegen_1.nil,errSchemaPath:sch.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,codegen_1._)`""`,opts:this.opts,self:this};let sourceCode;try{this._compilations.add(sch),(0,validate_1.validateFunctionCode)(schemaCxt),gen.optimize(this.opts.code.optimize);
const validateCode=gen.toString();sourceCode=`${gen.scopeRefs(names_1.default.scope)}return ${validateCode}`,this.opts.code.process&&(sourceCode=this.opts.code.process(sourceCode,sch));const validate2=new Function(`${names_1.default.self}`,`${names_1.default.scope}`,sourceCode)(this,this.scope.get());if(this.scope.value(validateName,{ref:validate2}),validate2.errors=null,validate2.schema=sch.schema,validate2.schemaEnv=sch,sch.$async&&(validate2.$async=!0),this.opts.code.source===!0&&(validate2.source=
{validateName,validateCode,scopeValues:gen._values}),this.opts.unevaluated){const{props,items:items2}=schemaCxt;validate2.evaluated={props:props instanceof codegen_1.Name?void 0:props,items:items2 instanceof codegen_1.Name?void 0:items2,dynamicProps:props instanceof codegen_1.Name,dynamicItems:items2 instanceof codegen_1.Name},validate2.source&&(validate2.source.evaluated=(0,codegen_1.stringify)(validate2.evaluated))}return sch.validate=validate2,sch}catch(e){throw delete sch.validate,delete sch.
validateName,sourceCode&&this.logger.error("Error compiling schema, function code:",sourceCode),e}finally{this._compilations.delete(sch)}}compile.compileSchema=compileSchema;function resolveRef(root2,baseId,ref2){var _a2;ref2=(0,resolve_1.resolveUrl)(this.opts.uriResolver,baseId,ref2);const schOrFunc=root2.refs[ref2];if(schOrFunc)return schOrFunc;let _sch=resolve2.call(this,root2,ref2);if(_sch===void 0){const schema=(_a2=root2.localRefs)===null||_a2===void 0?void 0:_a2[ref2],{schemaId}=this.opts;
schema&&(_sch=new SchemaEnv({schema,schemaId,root:root2,baseId}))}if(_sch!==void 0)return root2.refs[ref2]=inlineOrCompile.call(this,_sch)}compile.resolveRef=resolveRef;function inlineOrCompile(sch){return(0,resolve_1.inlineRef)(sch.schema,this.opts.inlineRefs)?sch.schema:sch.validate?sch:compileSchema.call(this,sch)}function getCompilingSchema(schEnv){for(const sch of this._compilations)if(sameSchemaEnv(sch,schEnv))return sch}compile.getCompilingSchema=getCompilingSchema;function sameSchemaEnv(s1,s2){
return s1.schema===s2.schema&&s1.root===s2.root&&s1.baseId===s2.baseId}function resolve2(root2,ref2){let sch;for(;typeof(sch=this.refs[ref2])=="string";)ref2=sch;return sch||this.schemas[ref2]||resolveSchema.call(this,root2,ref2)}function resolveSchema(root2,ref2){const p2=this.opts.uriResolver.parse(ref2),refPath=(0,resolve_1._getFullPath)(this.opts.uriResolver,p2);let baseId=(0,resolve_1.getFullPath)(this.opts.uriResolver,root2.baseId,void 0);if(Object.keys(root2.schema).length>0&&refPath===baseId)
return getJsonPointer.call(this,p2,root2);const id2=(0,resolve_1.normalizeId)(refPath),schOrRef=this.refs[id2]||this.schemas[id2];if(typeof schOrRef=="string"){const sch=resolveSchema.call(this,root2,schOrRef);return typeof sch?.schema!="object"?void 0:getJsonPointer.call(this,p2,sch)}if(typeof schOrRef?.schema=="object"){if(schOrRef.validate||compileSchema.call(this,schOrRef),id2===(0,resolve_1.normalizeId)(ref2)){const{schema}=schOrRef,{schemaId}=this.opts,schId=schema[schemaId];return schId&&
(baseId=(0,resolve_1.resolveUrl)(this.opts.uriResolver,baseId,schId)),new SchemaEnv({schema,schemaId,root:root2,baseId})}return getJsonPointer.call(this,p2,schOrRef)}}compile.resolveSchema=resolveSchema;const PREVENT_SCOPE_CHANGE=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function getJsonPointer(parsedRef,{baseId,schema,root:root2}){var _a2;if(((_a2=parsedRef.fragment)===null||_a2===void 0?void 0:_a2[0])!=="/")return;for(const part of parsedRef.fragment.slice(
1).split("/")){if(typeof schema=="boolean")return;const partSchema=schema[(0,util_1.unescapeFragment)(part)];if(partSchema===void 0)return;schema=partSchema;const schId=typeof schema=="object"&&schema[this.opts.schemaId];!PREVENT_SCOPE_CHANGE.has(part)&&schId&&(baseId=(0,resolve_1.resolveUrl)(this.opts.uriResolver,baseId,schId))}let env2;if(typeof schema!="boolean"&&schema.$ref&&!(0,util_1.schemaHasRulesButRef)(schema,this.RULES)){const $ref=(0,resolve_1.resolveUrl)(this.opts.uriResolver,baseId,
schema.$ref);env2=resolveSchema.call(this,root2,$ref)}const{schemaId}=this.opts;if(env2=env2||new SchemaEnv({schema,schemaId,root:root2,baseId}),env2.schema!==env2.root.schema)return env2}return compile}const $id$1="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description="Meta-schema for $data reference (JSON AnySchema extension proposal)",type$1="object",required$1=["$data"],properties$3={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"j\
son-pointer"}]}},additionalProperties$1=!1,require$$9={$id:$id$1,description,type:type$1,required:required$1,properties:properties$3,additionalProperties:additionalProperties$1};var uri={},hasRequiredUri;function requireUri(){if(hasRequiredUri)return uri;hasRequiredUri=1,Object.defineProperty(uri,"__esModule",{value:!0});const uri$12=requireFastUri();return uri$12.code='require("ajv/dist/runtime/uri").default',uri.default=uri$12,uri}var hasRequiredCore$1;function requireCore$1(){return hasRequiredCore$1||
(hasRequiredCore$1=1,(function(exports$1){Object.defineProperty(exports$1,"__esModule",{value:!0}),exports$1.CodeGen=exports$1.Name=exports$1.nil=exports$1.stringify=exports$1.str=exports$1._=exports$1.KeywordCxt=void 0;var validate_1=requireValidate();Object.defineProperty(exports$1,"KeywordCxt",{enumerable:!0,get:function(){return validate_1.KeywordCxt}});var codegen_1=requireCodegen();Object.defineProperty(exports$1,"_",{enumerable:!0,get:function(){return codegen_1._}}),Object.defineProperty(
exports$1,"str",{enumerable:!0,get:function(){return codegen_1.str}}),Object.defineProperty(exports$1,"stringify",{enumerable:!0,get:function(){return codegen_1.stringify}}),Object.defineProperty(exports$1,"nil",{enumerable:!0,get:function(){return codegen_1.nil}}),Object.defineProperty(exports$1,"Name",{enumerable:!0,get:function(){return codegen_1.Name}}),Object.defineProperty(exports$1,"CodeGen",{enumerable:!0,get:function(){return codegen_1.CodeGen}});const validation_error_1=requireValidation_error(),
ref_error_1=requireRef_error(),rules_1=requireRules(),compile_1=requireCompile(),codegen_2=requireCodegen(),resolve_1=requireResolve(),dataType_1=requireDataType(),util_1=requireUtil(),$dataRefSchema=require$$9,uri_1=requireUri(),defaultRegExp=(str,flags2)=>new RegExp(str,flags2);defaultRegExp.code="new RegExp";const META_IGNORE_OPTIONS=["removeAdditional","useDefaults","coerceTypes"],EXT_SCOPE_NAMES=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats",
"validate$data","func","obj","Error"]),removedOptions={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `c\
ode: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},deprecatedOptions={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'\
"minLength"/"maxLength" account for unicode characters by default.'},MAX_EXPRESSION=200;function requiredOptions(o){var _a2,_b,_c,_d,_e,_f,_g,_h,_j,_k,_l,_m,_o,_p,_q,_r,_s,_t,_u,_v,_w,_x,_y,_z,_02;const s2=o.strict,_optz=(_a2=o.code)===null||_a2===void 0?void 0:_a2.optimize,optimize=_optz===!0||_optz===void 0?1:_optz||0,regExp=(_c=(_b=o.code)===null||_b===void 0?void 0:_b.regExp)!==null&&_c!==void 0?_c:defaultRegExp,uriResolver=(_d=o.uriResolver)!==null&&_d!==void 0?_d:uri_1.default;return{strictSchema:(_f=
(_e=o.strictSchema)!==null&&_e!==void 0?_e:s2)!==null&&_f!==void 0?_f:!0,strictNumbers:(_h=(_g=o.strictNumbers)!==null&&_g!==void 0?_g:s2)!==null&&_h!==void 0?_h:!0,strictTypes:(_k=(_j=o.strictTypes)!==null&&_j!==void 0?_j:s2)!==null&&_k!==void 0?_k:"log",strictTuples:(_m=(_l=o.strictTuples)!==null&&_l!==void 0?_l:s2)!==null&&_m!==void 0?_m:"log",strictRequired:(_p=(_o=o.strictRequired)!==null&&_o!==void 0?_o:s2)!==null&&_p!==void 0?_p:!1,code:o.code?{...o.code,optimize,regExp}:{optimize,regExp},
loopRequired:(_q=o.loopRequired)!==null&&_q!==void 0?_q:MAX_EXPRESSION,loopEnum:(_r=o.loopEnum)!==null&&_r!==void 0?_r:MAX_EXPRESSION,meta:(_s=o.meta)!==null&&_s!==void 0?_s:!0,messages:(_t=o.messages)!==null&&_t!==void 0?_t:!0,inlineRefs:(_u=o.inlineRefs)!==null&&_u!==void 0?_u:!0,schemaId:(_v=o.schemaId)!==null&&_v!==void 0?_v:"$id",addUsedSchema:(_w=o.addUsedSchema)!==null&&_w!==void 0?_w:!0,validateSchema:(_x=o.validateSchema)!==null&&_x!==void 0?_x:!0,validateFormats:(_y=o.validateFormats)!==
null&&_y!==void 0?_y:!0,unicodeRegExp:(_z=o.unicodeRegExp)!==null&&_z!==void 0?_z:!0,int32range:(_02=o.int32range)!==null&&_02!==void 0?_02:!0,uriResolver}}class Ajv2{constructor(opts={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,opts=this.opts={...opts,...requiredOptions(opts)};const{es5,lines}=this.opts.code;this.scope=new codegen_2.ValueScope({scope:{},prefixes:EXT_SCOPE_NAMES,es5,lines}),this.logger=getLogger(opts.logger);const formatOpt=opts.
validateFormats;opts.validateFormats=!1,this.RULES=(0,rules_1.getRules)(),checkOptions.call(this,removedOptions,opts,"NOT SUPPORTED"),checkOptions.call(this,deprecatedOptions,opts,"DEPRECATED","warn"),this._metaOpts=getMetaSchemaOptions.call(this),opts.formats&&addInitialFormats.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),opts.keywords&&addInitialKeywords.call(this,opts.keywords),typeof opts.meta=="object"&&this.addMetaSchema(opts.meta),addInitialSchemas.call(this),opts.validateFormats=
formatOpt}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data,meta,schemaId}=this.opts;let _dataRefSchema=$dataRefSchema;schemaId==="id"&&(_dataRefSchema={...$dataRefSchema},_dataRefSchema.id=_dataRefSchema.$id,delete _dataRefSchema.$id),meta&&$data&&this.addMetaSchema(_dataRefSchema,_dataRefSchema[schemaId],!1)}defaultMeta(){const{meta,schemaId}=this.opts;return this.opts.defaultMeta=typeof meta=="object"?meta[schemaId]||meta:void 0}validate(schemaKeyRef,data){let v;
if(typeof schemaKeyRef=="string"){if(v=this.getSchema(schemaKeyRef),!v)throw new Error(`no schema with key or ref "${schemaKeyRef}"`)}else v=this.compile(schemaKeyRef);const valid2=v(data);return"$async"in v||(this.errors=v.errors),valid2}compile(schema,_meta){const sch=this._addSchema(schema,_meta);return sch.validate||this._compileSchemaEnv(sch)}compileAsync(schema,meta){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema}=this.
opts;return runCompileAsync.call(this,schema,meta);async function runCompileAsync(_schema,_meta){await loadMetaSchema.call(this,_schema.$schema);const sch=this._addSchema(_schema,_meta);return sch.validate||_compileAsync.call(this,sch)}async function loadMetaSchema($ref){$ref&&!this.getSchema($ref)&&await runCompileAsync.call(this,{$ref},!0)}async function _compileAsync(sch){try{return this._compileSchemaEnv(sch)}catch(e){if(!(e instanceof ref_error_1.default))throw e;return checkLoaded.call(this,
e),await loadMissingSchema.call(this,e.missingSchema),_compileAsync.call(this,sch)}}function checkLoaded({missingSchema:ref2,missingRef}){if(this.refs[ref2])throw new Error(`AnySchema ${ref2} is loaded but ${missingRef} cannot be resolved`)}async function loadMissingSchema(ref2){const _schema=await _loadSchema.call(this,ref2);this.refs[ref2]||await loadMetaSchema.call(this,_schema.$schema),this.refs[ref2]||this.addSchema(_schema,ref2,meta)}async function _loadSchema(ref2){const p2=this._loading[ref2];
if(p2)return p2;try{return await(this._loading[ref2]=loadSchema(ref2))}finally{delete this._loading[ref2]}}}addSchema(schema,key2,_meta,_validateSchema=this.opts.validateSchema){if(Array.isArray(schema)){for(const sch of schema)this.addSchema(sch,void 0,_meta,_validateSchema);return this}let id2;if(typeof schema=="object"){const{schemaId}=this.opts;if(id2=schema[schemaId],id2!==void 0&&typeof id2!="string")throw new Error(`schema ${schemaId} must be string`)}return key2=(0,resolve_1.normalizeId)(
key2||id2),this._checkUnique(key2),this.schemas[key2]=this._addSchema(schema,_meta,key2,_validateSchema,!0),this}addMetaSchema(schema,key2,_validateSchema=this.opts.validateSchema){return this.addSchema(schema,key2,!0,_validateSchema),this}validateSchema(schema,throwOrLogError){if(typeof schema=="boolean")return!0;let $schema2;if($schema2=schema.$schema,$schema2!==void 0&&typeof $schema2!="string")throw new Error("$schema must be a string");if($schema2=$schema2||this.opts.defaultMeta||this.defaultMeta(),
!$schema2)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const valid2=this.validate($schema2,schema);if(!valid2&&throwOrLogError){const message="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(message);else throw new Error(message)}return valid2}getSchema(keyRef){let sch;for(;typeof(sch=getSchEnv.call(this,keyRef))=="string";)keyRef=sch;if(sch===void 0){const{schemaId}=this.opts,root2=new compile_1.SchemaEnv({schema:{},schemaId});
if(sch=compile_1.resolveSchema.call(this,root2,keyRef),!sch)return;this.refs[keyRef]=sch}return sch.validate||this._compileSchemaEnv(sch)}removeSchema(schemaKeyRef){if(schemaKeyRef instanceof RegExp)return this._removeAllSchemas(this.schemas,schemaKeyRef),this._removeAllSchemas(this.refs,schemaKeyRef),this;switch(typeof schemaKeyRef){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const sch=getSchEnv.call(this,schemaKeyRef);
return typeof sch=="object"&&this._cache.delete(sch.schema),delete this.schemas[schemaKeyRef],delete this.refs[schemaKeyRef],this}case"object":{const cacheKey=schemaKeyRef;this._cache.delete(cacheKey);let id2=schemaKeyRef[this.opts.schemaId];return id2&&(id2=(0,resolve_1.normalizeId)(id2),delete this.schemas[id2],delete this.refs[id2]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(definitions2){for(const def of definitions2)this.addKeyword(def);return this}addKeyword(kwdOrDef,def){
let keyword2;if(typeof kwdOrDef=="string")keyword2=kwdOrDef,typeof def=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),def.keyword=keyword2);else if(typeof kwdOrDef=="object"&&def===void 0){if(def=kwdOrDef,keyword2=def.keyword,Array.isArray(keyword2)&&!keyword2.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(checkKeyword.call(this,keyword2,def),!def)return(0,util_1.
eachItem)(keyword2,kwd=>addRule.call(this,kwd)),this;keywordMetaschema.call(this,def);const definition2={...def,type:(0,dataType_1.getJSONTypes)(def.type),schemaType:(0,dataType_1.getJSONTypes)(def.schemaType)};return(0,util_1.eachItem)(keyword2,definition2.type.length===0?k=>addRule.call(this,k,definition2):k=>definition2.type.forEach(t=>addRule.call(this,k,definition2,t))),this}getKeyword(keyword2){const rule=this.RULES.all[keyword2];return typeof rule=="object"?rule.definition:!!rule}removeKeyword(keyword2){
const{RULES}=this;delete RULES.keywords[keyword2],delete RULES.all[keyword2];for(const group of RULES.rules){const i=group.rules.findIndex(rule=>rule.keyword===keyword2);i>=0&&group.rules.splice(i,1)}return this}addFormat(name,format2){return typeof format2=="string"&&(format2=new RegExp(format2)),this.formats[name]=format2,this}errorsText(errors2=this.errors,{separator=", ",dataVar="data"}={}){return!errors2||errors2.length===0?"No errors":errors2.map(e=>`${dataVar}${e.instancePath} ${e.message}`).
reduce((text2,msg)=>text2+separator+msg)}$dataMetaSchema(metaSchema,keywordsJsonPointers){const rules2=this.RULES.all;metaSchema=JSON.parse(JSON.stringify(metaSchema));for(const jsonPointer of keywordsJsonPointers){const segments=jsonPointer.split("/").slice(1);let keywords2=metaSchema;for(const seg of segments)keywords2=keywords2[seg];for(const key2 in rules2){const rule=rules2[key2];if(typeof rule!="object")continue;const{$data}=rule.definition,schema=keywords2[key2];$data&&schema&&(keywords2[key2]=
schemaOrData(schema))}}return metaSchema}_removeAllSchemas(schemas,regex){for(const keyRef in schemas){const sch=schemas[keyRef];(!regex||regex.test(keyRef))&&(typeof sch=="string"?delete schemas[keyRef]:sch&&!sch.meta&&(this._cache.delete(sch.schema),delete schemas[keyRef]))}}_addSchema(schema,meta,baseId,validateSchema=this.opts.validateSchema,addSchema=this.opts.addUsedSchema){let id2;const{schemaId}=this.opts;if(typeof schema=="object")id2=schema[schemaId];else{if(this.opts.jtd)throw new Error(
"schema must be object");if(typeof schema!="boolean")throw new Error("schema must be object or boolean")}let sch=this._cache.get(schema);if(sch!==void 0)return sch;baseId=(0,resolve_1.normalizeId)(id2||baseId);const localRefs=resolve_1.getSchemaRefs.call(this,schema,baseId);return sch=new compile_1.SchemaEnv({schema,schemaId,meta,baseId,localRefs}),this._cache.set(sch.schema,sch),addSchema&&!baseId.startsWith("#")&&(baseId&&this._checkUnique(baseId),this.refs[baseId]=sch),validateSchema&&this.validateSchema(
schema,!0),sch}_checkUnique(id2){if(this.schemas[id2]||this.refs[id2])throw new Error(`schema with key or id "${id2}" already exists`)}_compileSchemaEnv(sch){if(sch.meta?this._compileMetaSchema(sch):compile_1.compileSchema.call(this,sch),!sch.validate)throw new Error("ajv implementation error");return sch.validate}_compileMetaSchema(sch){const currentOpts=this.opts;this.opts=this._metaOpts;try{compile_1.compileSchema.call(this,sch)}finally{this.opts=currentOpts}}}Ajv2.ValidationError=validation_error_1.
default,Ajv2.MissingRefError=ref_error_1.default,exports$1.default=Ajv2;function checkOptions(checkOpts,options,msg,log="error"){for(const key2 in checkOpts){const opt=key2;opt in options&&this.logger[log](`${msg}: option ${key2}. ${checkOpts[opt]}`)}}function getSchEnv(keyRef){return keyRef=(0,resolve_1.normalizeId)(keyRef),this.schemas[keyRef]||this.refs[keyRef]}function addInitialSchemas(){const optsSchemas=this.opts.schemas;if(optsSchemas)if(Array.isArray(optsSchemas))this.addSchema(optsSchemas);else
for(const key2 in optsSchemas)this.addSchema(optsSchemas[key2],key2)}function addInitialFormats(){for(const name in this.opts.formats){const format2=this.opts.formats[name];format2&&this.addFormat(name,format2)}}function addInitialKeywords(defs){if(Array.isArray(defs)){this.addVocabulary(defs);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const keyword2 in defs){const def=defs[keyword2];def.keyword||(def.keyword=keyword2),this.addKeyword(def)}}function getMetaSchemaOptions(){
const metaOpts={...this.opts};for(const opt of META_IGNORE_OPTIONS)delete metaOpts[opt];return metaOpts}const noLogs={log(){},warn(){},error(){}};function getLogger(logger){if(logger===!1)return noLogs;if(logger===void 0)return console;if(logger.log&&logger.warn&&logger.error)return logger;throw new Error("logger must implement log, warn and error methods")}const KEYWORD_NAME=/^[a-z_$][a-z0-9_$:-]*$/i;function checkKeyword(keyword2,def){const{RULES}=this;if((0,util_1.eachItem)(keyword2,kwd=>{if(RULES.
keywords[kwd])throw new Error(`Keyword ${kwd} is already defined`);if(!KEYWORD_NAME.test(kwd))throw new Error(`Keyword ${kwd} has invalid name`)}),!!def&&def.$data&&!("code"in def||"validate"in def))throw new Error('$data keyword must have "code" or "validate" function')}function addRule(keyword2,definition2,dataType2){var _a2;const post=definition2?.post;if(dataType2&&post)throw new Error('keyword with "post" flag cannot have "type"');const{RULES}=this;let ruleGroup=post?RULES.post:RULES.rules.
find(({type:t})=>t===dataType2);if(ruleGroup||(ruleGroup={type:dataType2,rules:[]},RULES.rules.push(ruleGroup)),RULES.keywords[keyword2]=!0,!definition2)return;const rule={keyword:keyword2,definition:{...definition2,type:(0,dataType_1.getJSONTypes)(definition2.type),schemaType:(0,dataType_1.getJSONTypes)(definition2.schemaType)}};definition2.before?addBeforeRule.call(this,ruleGroup,rule,definition2.before):ruleGroup.rules.push(rule),RULES.all[keyword2]=rule,(_a2=definition2.implements)===null||_a2===
void 0||_a2.forEach(kwd=>this.addKeyword(kwd))}function addBeforeRule(ruleGroup,rule,before){const i=ruleGroup.rules.findIndex(_rule=>_rule.keyword===before);i>=0?ruleGroup.rules.splice(i,0,rule):(ruleGroup.rules.push(rule),this.logger.warn(`rule ${before} is not defined`))}function keywordMetaschema(def){let{metaSchema}=def;metaSchema!==void 0&&(def.$data&&this.opts.$data&&(metaSchema=schemaOrData(metaSchema)),def.validateSchema=this.compile(metaSchema,!0))}const $dataRef={$ref:"https://raw.git\
hubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function schemaOrData(schema){return{anyOf:[schema,$dataRef]}}})(core$2)),core$2}var draft7={},core$1={},id={},hasRequiredId;function requireId(){if(hasRequiredId)return id;hasRequiredId=1,Object.defineProperty(id,"__esModule",{value:!0});const def={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return id.default=def,id}var ref={},hasRequiredRef;function requireRef(){if(hasRequiredRef)
return ref;hasRequiredRef=1,Object.defineProperty(ref,"__esModule",{value:!0}),ref.callRef=ref.getValidate=void 0;const ref_error_1=requireRef_error(),code_1=requireCode(),codegen_1=requireCodegen(),names_1=requireNames(),compile_1=requireCompile(),util_1=requireUtil(),def={keyword:"$ref",schemaType:"string",code(cxt){const{gen,schema:$ref,it}=cxt,{baseId,schemaEnv:env2,validateName,opts,self:self2}=it,{root:root2}=env2;if(($ref==="#"||$ref==="#/")&&baseId===root2.baseId)return callRootRef();const schOrEnv=compile_1.
resolveRef.call(self2,root2,baseId,$ref);if(schOrEnv===void 0)throw new ref_error_1.default(it.opts.uriResolver,baseId,$ref);if(schOrEnv instanceof compile_1.SchemaEnv)return callValidate(schOrEnv);return inlineRefSchema(schOrEnv);function callRootRef(){if(env2===root2)return callRef(cxt,validateName,env2,env2.$async);const rootName=gen.scopeValue("root",{ref:root2});return callRef(cxt,(0,codegen_1._)`${rootName}.validate`,root2,root2.$async)}function callValidate(sch){const v=getValidate(cxt,sch);
callRef(cxt,v,sch,sch.$async)}function inlineRefSchema(sch){const schName=gen.scopeValue("schema",opts.code.source===!0?{ref:sch,code:(0,codegen_1.stringify)(sch)}:{ref:sch}),valid2=gen.name("valid"),schCxt=cxt.subschema({schema:sch,dataTypes:[],schemaPath:codegen_1.nil,topSchemaRef:schName,errSchemaPath:$ref},valid2);cxt.mergeEvaluated(schCxt),cxt.ok(valid2)}}};function getValidate(cxt,sch){const{gen}=cxt;return sch.validate?gen.scopeValue("validate",{ref:sch.validate}):(0,codegen_1._)`${gen.scopeValue(
"wrapper",{ref:sch})}.validate`}ref.getValidate=getValidate;function callRef(cxt,v,sch,$async){const{gen,it}=cxt,{allErrors,schemaEnv:env2,opts}=it,passCxt=opts.passContext?names_1.default.this:codegen_1.nil;$async?callAsyncRef():callSyncRef();function callAsyncRef(){if(!env2.$async)throw new Error("async schema referenced by sync schema");const valid2=gen.let("valid");gen.try(()=>{gen.code((0,codegen_1._)`await ${(0,code_1.callValidateCode)(cxt,v,passCxt)}`),addEvaluatedFrom(v),allErrors||gen.assign(
valid2,!0)},e=>{gen.if((0,codegen_1._)`!(${e} instanceof ${it.ValidationError})`,()=>gen.throw(e)),addErrorsFrom(e),allErrors||gen.assign(valid2,!1)}),cxt.ok(valid2)}function callSyncRef(){cxt.result((0,code_1.callValidateCode)(cxt,v,passCxt),()=>addEvaluatedFrom(v),()=>addErrorsFrom(v))}function addErrorsFrom(source2){const errs=(0,codegen_1._)`${source2}.errors`;gen.assign(names_1.default.vErrors,(0,codegen_1._)`${names_1.default.vErrors} === null ? ${errs} : ${names_1.default.vErrors}.concat(${errs})`),
gen.assign(names_1.default.errors,(0,codegen_1._)`${names_1.default.vErrors}.length`)}function addEvaluatedFrom(source2){var _a2;if(!it.opts.unevaluated)return;const schEvaluated=(_a2=sch?.validate)===null||_a2===void 0?void 0:_a2.evaluated;if(it.props!==!0)if(schEvaluated&&!schEvaluated.dynamicProps)schEvaluated.props!==void 0&&(it.props=util_1.mergeEvaluated.props(gen,schEvaluated.props,it.props));else{const props=gen.var("props",(0,codegen_1._)`${source2}.evaluated.props`);it.props=util_1.mergeEvaluated.
props(gen,props,it.props,codegen_1.Name)}if(it.items!==!0)if(schEvaluated&&!schEvaluated.dynamicItems)schEvaluated.items!==void 0&&(it.items=util_1.mergeEvaluated.items(gen,schEvaluated.items,it.items));else{const items2=gen.var("items",(0,codegen_1._)`${source2}.evaluated.items`);it.items=util_1.mergeEvaluated.items(gen,items2,it.items,codegen_1.Name)}}}return ref.callRef=callRef,ref.default=def,ref}var hasRequiredCore;function requireCore(){if(hasRequiredCore)return core$1;hasRequiredCore=1,Object.
defineProperty(core$1,"__esModule",{value:!0});const id_1=requireId(),ref_1=requireRef(),core2=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",id_1.default,ref_1.default];return core$1.default=core2,core$1}var validation={},limitNumber={},hasRequiredLimitNumber;function requireLimitNumber(){if(hasRequiredLimitNumber)return limitNumber;hasRequiredLimitNumber=1,Object.defineProperty(limitNumber,"__esModule",{value:!0});const codegen_1=requireCodegen(),ops=codegen_1.operators,
KWDs={maximum:{okStr:"<=",ok:ops.LTE,fail:ops.GT},minimum:{okStr:">=",ok:ops.GTE,fail:ops.LT},exclusiveMaximum:{okStr:"<",ok:ops.LT,fail:ops.GTE},exclusiveMinimum:{okStr:">",ok:ops.GT,fail:ops.LTE}},error2={message:({keyword:keyword2,schemaCode})=>(0,codegen_1.str)`must be ${KWDs[keyword2].okStr} ${schemaCode}`,params:({keyword:keyword2,schemaCode})=>(0,codegen_1._)`{comparison: ${KWDs[keyword2].okStr}, limit: ${schemaCode}}`},def={keyword:Object.keys(KWDs),type:"number",schemaType:"number",$data:!0,
error:error2,code(cxt){const{keyword:keyword2,data,schemaCode}=cxt;cxt.fail$data((0,codegen_1._)`${data} ${KWDs[keyword2].fail} ${schemaCode} || isNaN(${data})`)}};return limitNumber.default=def,limitNumber}var multipleOf={},hasRequiredMultipleOf;function requireMultipleOf(){if(hasRequiredMultipleOf)return multipleOf;hasRequiredMultipleOf=1,Object.defineProperty(multipleOf,"__esModule",{value:!0});const codegen_1=requireCodegen(),def={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,
error:{message:({schemaCode})=>(0,codegen_1.str)`must be multiple of ${schemaCode}`,params:({schemaCode})=>(0,codegen_1._)`{multipleOf: ${schemaCode}}`},code(cxt){const{gen,data,schemaCode,it}=cxt,prec=it.opts.multipleOfPrecision,res=gen.let("res"),invalid2=prec?(0,codegen_1._)`Math.abs(Math.round(${res}) - ${res}) > 1e-${prec}`:(0,codegen_1._)`${res} !== parseInt(${res})`;cxt.fail$data((0,codegen_1._)`(${schemaCode} === 0 || (${res} = ${data}/${schemaCode}, ${invalid2}))`)}};return multipleOf.default=
def,multipleOf}var limitLength={},ucs2length={},hasRequiredUcs2length;function requireUcs2length(){if(hasRequiredUcs2length)return ucs2length;hasRequiredUcs2length=1,Object.defineProperty(ucs2length,"__esModule",{value:!0});function ucs2length$12(str){const len=str.length;let length=0,pos=0,value;for(;pos<len;)length++,value=str.charCodeAt(pos++),value>=55296&&value<=56319&&pos<len&&(value=str.charCodeAt(pos),(value&64512)===56320&&pos++);return length}return ucs2length.default=ucs2length$12,ucs2length$12.
code='require("ajv/dist/runtime/ucs2length").default',ucs2length}var hasRequiredLimitLength;function requireLimitLength(){if(hasRequiredLimitLength)return limitLength;hasRequiredLimitLength=1,Object.defineProperty(limitLength,"__esModule",{value:!0});const codegen_1=requireCodegen(),util_1=requireUtil(),ucs2length_1=requireUcs2length(),def={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:keyword2,schemaCode}){const comp=keyword2==="maxLength"?
"more":"fewer";return(0,codegen_1.str)`must NOT have ${comp} than ${schemaCode} characters`},params:({schemaCode})=>(0,codegen_1._)`{limit: ${schemaCode}}`},code(cxt){const{keyword:keyword2,data,schemaCode,it}=cxt,op2=keyword2==="maxLength"?codegen_1.operators.GT:codegen_1.operators.LT,len=it.opts.unicode===!1?(0,codegen_1._)`${data}.length`:(0,codegen_1._)`${(0,util_1.useFunc)(cxt.gen,ucs2length_1.default)}(${data})`;cxt.fail$data((0,codegen_1._)`${len} ${op2} ${schemaCode}`)}};return limitLength.
default=def,limitLength}var pattern={},hasRequiredPattern;function requirePattern(){if(hasRequiredPattern)return pattern;hasRequiredPattern=1,Object.defineProperty(pattern,"__esModule",{value:!0});const code_1=requireCode(),util_1=requireUtil(),codegen_1=requireCodegen(),def={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode})=>(0,codegen_1.str)`must match pattern "${schemaCode}"`,params:({schemaCode})=>(0,codegen_1._)`{pattern: ${schemaCode}}`},code(cxt){const{
gen,data,$data,schema,schemaCode,it}=cxt,u=it.opts.unicodeRegExp?"u":"";if($data){const{regExp}=it.opts.code,regExpCode=regExp.code==="new RegExp"?(0,codegen_1._)`new RegExp`:(0,util_1.useFunc)(gen,regExp),valid2=gen.let("valid");gen.try(()=>gen.assign(valid2,(0,codegen_1._)`${regExpCode}(${schemaCode}, ${u}).test(${data})`),()=>gen.assign(valid2,!1)),cxt.fail$data((0,codegen_1._)`!${valid2}`)}else{const regExp=(0,code_1.usePattern)(cxt,schema);cxt.fail$data((0,codegen_1._)`!${regExp}.test(${data})`)}}};
return pattern.default=def,pattern}var limitProperties={},hasRequiredLimitProperties;function requireLimitProperties(){if(hasRequiredLimitProperties)return limitProperties;hasRequiredLimitProperties=1,Object.defineProperty(limitProperties,"__esModule",{value:!0});const codegen_1=requireCodegen(),def={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:keyword2,schemaCode}){const comp=keyword2==="maxProperties"?"more":"fewer";return(0,codegen_1.
str)`must NOT have ${comp} than ${schemaCode} properties`},params:({schemaCode})=>(0,codegen_1._)`{limit: ${schemaCode}}`},code(cxt){const{keyword:keyword2,data,schemaCode}=cxt,op2=keyword2==="maxProperties"?codegen_1.operators.GT:codegen_1.operators.LT;cxt.fail$data((0,codegen_1._)`Object.keys(${data}).length ${op2} ${schemaCode}`)}};return limitProperties.default=def,limitProperties}var required={},hasRequiredRequired;function requireRequired(){if(hasRequiredRequired)return required;hasRequiredRequired=
1,Object.defineProperty(required,"__esModule",{value:!0});const code_1=requireCode(),codegen_1=requireCodegen(),util_1=requireUtil(),def={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty}})=>(0,codegen_1.str)`must have required property '${missingProperty}'`,params:({params:{missingProperty}})=>(0,codegen_1._)`{missingProperty: ${missingProperty}}`},code(cxt){const{gen,schema,schemaCode,data,$data,it}=cxt,{opts}=it;if(!$data&&schema.length===0)
return;const useLoop=schema.length>=opts.loopRequired;if(it.allErrors?allErrorsMode():exitOnErrorMode(),opts.strictRequired){const props=cxt.parentSchema.properties,{definedProperties}=cxt.it;for(const requiredKey of schema)if(props?.[requiredKey]===void 0&&!definedProperties.has(requiredKey)){const schemaPath=it.schemaEnv.baseId+it.errSchemaPath,msg=`required property "${requiredKey}" is not defined at "${schemaPath}" (strictRequired)`;(0,util_1.checkStrictMode)(it,msg,it.opts.strictRequired)}}
function allErrorsMode(){if(useLoop||$data)cxt.block$data(codegen_1.nil,loopAllRequired);else for(const prop2 of schema)(0,code_1.checkReportMissingProp)(cxt,prop2)}function exitOnErrorMode(){const missing=gen.let("missing");if(useLoop||$data){const valid2=gen.let("valid",!0);cxt.block$data(valid2,()=>loopUntilMissing(missing,valid2)),cxt.ok(valid2)}else gen.if((0,code_1.checkMissingProp)(cxt,schema,missing)),(0,code_1.reportMissingProp)(cxt,missing),gen.else()}function loopAllRequired(){gen.forOf(
"prop",schemaCode,prop2=>{cxt.setParams({missingProperty:prop2}),gen.if((0,code_1.noPropertyInData)(gen,data,prop2,opts.ownProperties),()=>cxt.error())})}function loopUntilMissing(missing,valid2){cxt.setParams({missingProperty:missing}),gen.forOf(missing,schemaCode,()=>{gen.assign(valid2,(0,code_1.propertyInData)(gen,data,missing,opts.ownProperties)),gen.if((0,codegen_1.not)(valid2),()=>{cxt.error(),gen.break()})},codegen_1.nil)}}};return required.default=def,required}var limitItems={},hasRequiredLimitItems;
function requireLimitItems(){if(hasRequiredLimitItems)return limitItems;hasRequiredLimitItems=1,Object.defineProperty(limitItems,"__esModule",{value:!0});const codegen_1=requireCodegen(),def={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:keyword2,schemaCode}){const comp=keyword2==="maxItems"?"more":"fewer";return(0,codegen_1.str)`must NOT have ${comp} than ${schemaCode} items`},params:({schemaCode})=>(0,codegen_1._)`{limit: ${schemaCode}}`},code(cxt){
const{keyword:keyword2,data,schemaCode}=cxt,op2=keyword2==="maxItems"?codegen_1.operators.GT:codegen_1.operators.LT;cxt.fail$data((0,codegen_1._)`${data}.length ${op2} ${schemaCode}`)}};return limitItems.default=def,limitItems}var uniqueItems={},equal={},hasRequiredEqual;function requireEqual(){if(hasRequiredEqual)return equal;hasRequiredEqual=1,Object.defineProperty(equal,"__esModule",{value:!0});const equal$12=requireFastDeepEqual();return equal$12.code='require("ajv/dist/runtime/equal").defau\
lt',equal.default=equal$12,equal}var hasRequiredUniqueItems;function requireUniqueItems(){if(hasRequiredUniqueItems)return uniqueItems;hasRequiredUniqueItems=1,Object.defineProperty(uniqueItems,"__esModule",{value:!0});const dataType_1=requireDataType(),codegen_1=requireCodegen(),util_1=requireUtil(),equal_1=requireEqual(),def={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i,j}})=>(0,codegen_1.str)`must NOT have duplicate items (items ## ${j} and ${i} are identical)`,
params:({params:{i,j}})=>(0,codegen_1._)`{i: ${i}, j: ${j}}`},code(cxt){const{gen,data,$data,schema,parentSchema,schemaCode,it}=cxt;if(!$data&&!schema)return;const valid2=gen.let("valid"),itemTypes=parentSchema.items?(0,dataType_1.getSchemaTypes)(parentSchema.items):[];cxt.block$data(valid2,validateUniqueItems,(0,codegen_1._)`${schemaCode} === false`),cxt.ok(valid2);function validateUniqueItems(){const i=gen.let("i",(0,codegen_1._)`${data}.length`),j=gen.let("j");cxt.setParams({i,j}),gen.assign(
valid2,!0),gen.if((0,codegen_1._)`${i} > 1`,()=>(canOptimize()?loopN:loopN2)(i,j))}function canOptimize(){return itemTypes.length>0&&!itemTypes.some(t=>t==="object"||t==="array")}function loopN(i,j){const item=gen.name("item"),wrongType=(0,dataType_1.checkDataTypes)(itemTypes,item,it.opts.strictNumbers,dataType_1.DataType.Wrong),indices=gen.const("indices",(0,codegen_1._)`{}`);gen.for((0,codegen_1._)`;${i}--;`,()=>{gen.let(item,(0,codegen_1._)`${data}[${i}]`),gen.if(wrongType,(0,codegen_1._)`continue`),
itemTypes.length>1&&gen.if((0,codegen_1._)`typeof ${item} == "string"`,(0,codegen_1._)`${item} += "_"`),gen.if((0,codegen_1._)`typeof ${indices}[${item}] == "number"`,()=>{gen.assign(j,(0,codegen_1._)`${indices}[${item}]`),cxt.error(),gen.assign(valid2,!1).break()}).code((0,codegen_1._)`${indices}[${item}] = ${i}`)})}function loopN2(i,j){const eql=(0,util_1.useFunc)(gen,equal_1.default),outer=gen.name("outer");gen.label(outer).for((0,codegen_1._)`;${i}--;`,()=>gen.for((0,codegen_1._)`${j} = ${i}; ${j}--;`,
()=>gen.if((0,codegen_1._)`${eql}(${data}[${i}], ${data}[${j}])`,()=>{cxt.error(),gen.assign(valid2,!1).break(outer)})))}}};return uniqueItems.default=def,uniqueItems}var _const={},hasRequired_const;function require_const(){if(hasRequired_const)return _const;hasRequired_const=1,Object.defineProperty(_const,"__esModule",{value:!0});const codegen_1=requireCodegen(),util_1=requireUtil(),equal_1=requireEqual(),def={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode})=>(0,codegen_1.
_)`{allowedValue: ${schemaCode}}`},code(cxt){const{gen,data,$data,schemaCode,schema}=cxt;$data||schema&&typeof schema=="object"?cxt.fail$data((0,codegen_1._)`!${(0,util_1.useFunc)(gen,equal_1.default)}(${data}, ${schemaCode})`):cxt.fail((0,codegen_1._)`${schema} !== ${data}`)}};return _const.default=def,_const}var _enum={},hasRequired_enum;function require_enum(){if(hasRequired_enum)return _enum;hasRequired_enum=1,Object.defineProperty(_enum,"__esModule",{value:!0});const codegen_1=requireCodegen(),
util_1=requireUtil(),equal_1=requireEqual(),def={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode})=>(0,codegen_1._)`{allowedValues: ${schemaCode}}`},code(cxt){const{gen,data,$data,schema,schemaCode,it}=cxt;if(!$data&&schema.length===0)throw new Error("enum must have non-empty array");const useLoop=schema.length>=it.opts.loopEnum;let eql;const getEql=()=>eql??(eql=(0,util_1.useFunc)(gen,equal_1.default));let valid2;if(useLoop||
$data)valid2=gen.let("valid"),cxt.block$data(valid2,loopEnum);else{if(!Array.isArray(schema))throw new Error("ajv implementation error");const vSchema=gen.const("vSchema",schemaCode);valid2=(0,codegen_1.or)(...schema.map((_x,i)=>equalCode(vSchema,i)))}cxt.pass(valid2);function loopEnum(){gen.assign(valid2,!1),gen.forOf("v",schemaCode,v=>gen.if((0,codegen_1._)`${getEql()}(${data}, ${v})`,()=>gen.assign(valid2,!0).break()))}function equalCode(vSchema,i){const sch=schema[i];return typeof sch=="obje\
ct"&&sch!==null?(0,codegen_1._)`${getEql()}(${data}, ${vSchema}[${i}])`:(0,codegen_1._)`${data} === ${sch}`}}};return _enum.default=def,_enum}var hasRequiredValidation;function requireValidation(){if(hasRequiredValidation)return validation;hasRequiredValidation=1,Object.defineProperty(validation,"__esModule",{value:!0});const limitNumber_1=requireLimitNumber(),multipleOf_1=requireMultipleOf(),limitLength_1=requireLimitLength(),pattern_1=requirePattern(),limitProperties_1=requireLimitProperties(),
required_1=requireRequired(),limitItems_1=requireLimitItems(),uniqueItems_1=requireUniqueItems(),const_1=require_const(),enum_1=require_enum(),validation$12=[limitNumber_1.default,multipleOf_1.default,limitLength_1.default,pattern_1.default,limitProperties_1.default,required_1.default,limitItems_1.default,uniqueItems_1.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},const_1.default,enum_1.default];return validation.default=validation$12,validation}
var applicator={},additionalItems={},hasRequiredAdditionalItems;function requireAdditionalItems(){if(hasRequiredAdditionalItems)return additionalItems;hasRequiredAdditionalItems=1,Object.defineProperty(additionalItems,"__esModule",{value:!0}),additionalItems.validateAdditionalItems=void 0;const codegen_1=requireCodegen(),util_1=requireUtil(),def={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len}})=>(0,codegen_1.str)`must NOT have more than ${len} items`,
params:({params:{len}})=>(0,codegen_1._)`{limit: ${len}}`},code(cxt){const{parentSchema,it}=cxt,{items:items2}=parentSchema;if(!Array.isArray(items2)){(0,util_1.checkStrictMode)(it,'"additionalItems" is ignored when "items" is not an array of schemas');return}validateAdditionalItems(cxt,items2)}};function validateAdditionalItems(cxt,items2){const{gen,schema,data,keyword:keyword2,it}=cxt;it.items=!0;const len=gen.const("len",(0,codegen_1._)`${data}.length`);if(schema===!1)cxt.setParams({len:items2.
length}),cxt.pass((0,codegen_1._)`${len} <= ${items2.length}`);else if(typeof schema=="object"&&!(0,util_1.alwaysValidSchema)(it,schema)){const valid2=gen.var("valid",(0,codegen_1._)`${len} <= ${items2.length}`);gen.if((0,codegen_1.not)(valid2),()=>validateItems(valid2)),cxt.ok(valid2)}function validateItems(valid2){gen.forRange("i",items2.length,len,i=>{cxt.subschema({keyword:keyword2,dataProp:i,dataPropType:util_1.Type.Num},valid2),it.allErrors||gen.if((0,codegen_1.not)(valid2),()=>gen.break())})}}
return additionalItems.validateAdditionalItems=validateAdditionalItems,additionalItems.default=def,additionalItems}var prefixItems={},items={},hasRequiredItems;function requireItems(){if(hasRequiredItems)return items;hasRequiredItems=1,Object.defineProperty(items,"__esModule",{value:!0}),items.validateTuple=void 0;const codegen_1=requireCodegen(),util_1=requireUtil(),code_1=requireCode(),def={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(cxt){const{
schema,it}=cxt;if(Array.isArray(schema))return validateTuple(cxt,"additionalItems",schema);it.items=!0,!(0,util_1.alwaysValidSchema)(it,schema)&&cxt.ok((0,code_1.validateArray)(cxt))}};function validateTuple(cxt,extraItems,schArr=cxt.schema){const{gen,parentSchema,data,keyword:keyword2,it}=cxt;checkStrictTuple(parentSchema),it.opts.unevaluated&&schArr.length&&it.items!==!0&&(it.items=util_1.mergeEvaluated.items(gen,schArr.length,it.items));const valid2=gen.name("valid"),len=gen.const("len",(0,codegen_1.
_)`${data}.length`);schArr.forEach((sch,i)=>{(0,util_1.alwaysValidSchema)(it,sch)||(gen.if((0,codegen_1._)`${len} > ${i}`,()=>cxt.subschema({keyword:keyword2,schemaProp:i,dataProp:i},valid2)),cxt.ok(valid2))});function checkStrictTuple(sch){const{opts,errSchemaPath}=it,l=schArr.length,fullTuple=l===sch.minItems&&(l===sch.maxItems||sch[extraItems]===!1);if(opts.strictTuples&&!fullTuple){const msg=`"${keyword2}" is ${l}-tuple, but minItems or maxItems/${extraItems} are not specified or different a\
t path "${errSchemaPath}"`;(0,util_1.checkStrictMode)(it,msg,opts.strictTuples)}}}return items.validateTuple=validateTuple,items.default=def,items}var hasRequiredPrefixItems;function requirePrefixItems(){if(hasRequiredPrefixItems)return prefixItems;hasRequiredPrefixItems=1,Object.defineProperty(prefixItems,"__esModule",{value:!0});const items_1=requireItems(),def={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:cxt=>(0,items_1.validateTuple)(cxt,"items")};return prefixItems.
default=def,prefixItems}var items2020={},hasRequiredItems2020;function requireItems2020(){if(hasRequiredItems2020)return items2020;hasRequiredItems2020=1,Object.defineProperty(items2020,"__esModule",{value:!0});const codegen_1=requireCodegen(),util_1=requireUtil(),code_1=requireCode(),additionalItems_1=requireAdditionalItems(),def={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len}})=>(0,codegen_1.str)`must NOT have more than ${len} items`,
params:({params:{len}})=>(0,codegen_1._)`{limit: ${len}}`},code(cxt){const{schema,parentSchema,it}=cxt,{prefixItems:prefixItems2}=parentSchema;it.items=!0,!(0,util_1.alwaysValidSchema)(it,schema)&&(prefixItems2?(0,additionalItems_1.validateAdditionalItems)(cxt,prefixItems2):cxt.ok((0,code_1.validateArray)(cxt)))}};return items2020.default=def,items2020}var contains$1={},hasRequiredContains;function requireContains(){if(hasRequiredContains)return contains$1;hasRequiredContains=1,Object.defineProperty(
contains$1,"__esModule",{value:!0});const codegen_1=requireCodegen(),util_1=requireUtil(),def={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:min2,max:max2}})=>max2===void 0?(0,codegen_1.str)`must contain at least ${min2} valid item(s)`:(0,codegen_1.str)`must contain at least ${min2} and no more than ${max2} valid item(s)`,params:({params:{min:min2,max:max2}})=>max2===void 0?(0,codegen_1._)`{minContains: ${min2}}`:
(0,codegen_1._)`{minContains: ${min2}, maxContains: ${max2}}`},code(cxt){const{gen,schema,parentSchema,data,it}=cxt;let min2,max2;const{minContains,maxContains}=parentSchema;it.opts.next?(min2=minContains===void 0?1:minContains,max2=maxContains):min2=1;const len=gen.const("len",(0,codegen_1._)`${data}.length`);if(cxt.setParams({min:min2,max:max2}),max2===void 0&&min2===0){(0,util_1.checkStrictMode)(it,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(max2!==void 0&&
min2>max2){(0,util_1.checkStrictMode)(it,'"minContains" > "maxContains" is always invalid'),cxt.fail();return}if((0,util_1.alwaysValidSchema)(it,schema)){let cond=(0,codegen_1._)`${len} >= ${min2}`;max2!==void 0&&(cond=(0,codegen_1._)`${cond} && ${len} <= ${max2}`),cxt.pass(cond);return}it.items=!0;const valid2=gen.name("valid");max2===void 0&&min2===1?validateItems(valid2,()=>gen.if(valid2,()=>gen.break())):min2===0?(gen.let(valid2,!0),max2!==void 0&&gen.if((0,codegen_1._)`${data}.length > 0`,validateItemsWithCount)):
(gen.let(valid2,!1),validateItemsWithCount()),cxt.result(valid2,()=>cxt.reset());function validateItemsWithCount(){const schValid=gen.name("_valid"),count=gen.let("count",0);validateItems(schValid,()=>gen.if(schValid,()=>checkLimits(count)))}function validateItems(_valid,block2){gen.forRange("i",0,len,i=>{cxt.subschema({keyword:"contains",dataProp:i,dataPropType:util_1.Type.Num,compositeRule:!0},_valid),block2()})}function checkLimits(count){gen.code((0,codegen_1._)`${count}++`),max2===void 0?gen.
if((0,codegen_1._)`${count} >= ${min2}`,()=>gen.assign(valid2,!0).break()):(gen.if((0,codegen_1._)`${count} > ${max2}`,()=>gen.assign(valid2,!1).break()),min2===1?gen.assign(valid2,!0):gen.if((0,codegen_1._)`${count} >= ${min2}`,()=>gen.assign(valid2,!0)))}}};return contains$1.default=def,contains$1}var dependencies={},hasRequiredDependencies;function requireDependencies(){return hasRequiredDependencies||(hasRequiredDependencies=1,(function(exports$1){Object.defineProperty(exports$1,"__esModule",
{value:!0}),exports$1.validateSchemaDeps=exports$1.validatePropertyDeps=exports$1.error=void 0;const codegen_1=requireCodegen(),util_1=requireUtil(),code_1=requireCode();exports$1.error={message:({params:{property,depsCount,deps}})=>{const property_ies=depsCount===1?"property":"properties";return(0,codegen_1.str)`must have ${property_ies} ${deps} when property ${property} is present`},params:({params:{property,depsCount,deps,missingProperty}})=>(0,codegen_1._)`{property: ${property},
    missingProperty: ${missingProperty},
    depsCount: ${depsCount},
    deps: ${deps}}`};const def={keyword:"dependencies",type:"object",schemaType:"object",error:exports$1.error,code(cxt){const[propDeps,schDeps]=splitDependencies(cxt);validatePropertyDeps(cxt,propDeps),validateSchemaDeps(cxt,schDeps)}};function splitDependencies({schema}){const propertyDeps={},schemaDeps={};for(const key2 in schema){if(key2==="__proto__")continue;const deps=Array.isArray(schema[key2])?propertyDeps:schemaDeps;deps[key2]=schema[key2]}return[propertyDeps,schemaDeps]}function validatePropertyDeps(cxt,propertyDeps=cxt.
schema){const{gen,data,it}=cxt;if(Object.keys(propertyDeps).length===0)return;const missing=gen.let("missing");for(const prop2 in propertyDeps){const deps=propertyDeps[prop2];if(deps.length===0)continue;const hasProperty=(0,code_1.propertyInData)(gen,data,prop2,it.opts.ownProperties);cxt.setParams({property:prop2,depsCount:deps.length,deps:deps.join(", ")}),it.allErrors?gen.if(hasProperty,()=>{for(const depProp of deps)(0,code_1.checkReportMissingProp)(cxt,depProp)}):(gen.if((0,codegen_1._)`${hasProperty} && (${(0,code_1.
checkMissingProp)(cxt,deps,missing)})`),(0,code_1.reportMissingProp)(cxt,missing),gen.else())}}exports$1.validatePropertyDeps=validatePropertyDeps;function validateSchemaDeps(cxt,schemaDeps=cxt.schema){const{gen,data,keyword:keyword2,it}=cxt,valid2=gen.name("valid");for(const prop2 in schemaDeps)(0,util_1.alwaysValidSchema)(it,schemaDeps[prop2])||(gen.if((0,code_1.propertyInData)(gen,data,prop2,it.opts.ownProperties),()=>{const schCxt=cxt.subschema({keyword:keyword2,schemaProp:prop2},valid2);cxt.
mergeValidEvaluated(schCxt,valid2)},()=>gen.var(valid2,!0)),cxt.ok(valid2))}exports$1.validateSchemaDeps=validateSchemaDeps,exports$1.default=def})(dependencies)),dependencies}var propertyNames={},hasRequiredPropertyNames;function requirePropertyNames(){if(hasRequiredPropertyNames)return propertyNames;hasRequiredPropertyNames=1,Object.defineProperty(propertyNames,"__esModule",{value:!0});const codegen_1=requireCodegen(),util_1=requireUtil(),def={keyword:"propertyNames",type:"object",schemaType:[
"object","boolean"],error:{message:"property name must be valid",params:({params})=>(0,codegen_1._)`{propertyName: ${params.propertyName}}`},code(cxt){const{gen,schema,data,it}=cxt;if((0,util_1.alwaysValidSchema)(it,schema))return;const valid2=gen.name("valid");gen.forIn("key",data,key2=>{cxt.setParams({propertyName:key2}),cxt.subschema({keyword:"propertyNames",data:key2,dataTypes:["string"],propertyName:key2,compositeRule:!0},valid2),gen.if((0,codegen_1.not)(valid2),()=>{cxt.error(!0),it.allErrors||
gen.break()})}),cxt.ok(valid2)}};return propertyNames.default=def,propertyNames}var additionalProperties={},hasRequiredAdditionalProperties;function requireAdditionalProperties(){if(hasRequiredAdditionalProperties)return additionalProperties;hasRequiredAdditionalProperties=1,Object.defineProperty(additionalProperties,"__esModule",{value:!0});const code_1=requireCode(),codegen_1=requireCodegen(),names_1=requireNames(),util_1=requireUtil(),def={keyword:"additionalProperties",type:["object"],schemaType:[
"boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params})=>(0,codegen_1._)`{additionalProperty: ${params.additionalProperty}}`},code(cxt){const{gen,schema,parentSchema,data,errsCount,it}=cxt;if(!errsCount)throw new Error("ajv implementation error");const{allErrors,opts}=it;if(it.props=!0,opts.removeAdditional!=="all"&&(0,util_1.alwaysValidSchema)(it,schema))return;const props=(0,code_1.allSchemaProperties)(parentSchema.properties),
patProps=(0,code_1.allSchemaProperties)(parentSchema.patternProperties);checkAdditionalProperties(),cxt.ok((0,codegen_1._)`${errsCount} === ${names_1.default.errors}`);function checkAdditionalProperties(){gen.forIn("key",data,key2=>{!props.length&&!patProps.length?additionalPropertyCode(key2):gen.if(isAdditional(key2),()=>additionalPropertyCode(key2))})}function isAdditional(key2){let definedProp;if(props.length>8){const propsSchema=(0,util_1.schemaRefOrVal)(it,parentSchema.properties,"propertie\
s");definedProp=(0,code_1.isOwnProperty)(gen,propsSchema,key2)}else props.length?definedProp=(0,codegen_1.or)(...props.map(p2=>(0,codegen_1._)`${key2} === ${p2}`)):definedProp=codegen_1.nil;return patProps.length&&(definedProp=(0,codegen_1.or)(definedProp,...patProps.map(p2=>(0,codegen_1._)`${(0,code_1.usePattern)(cxt,p2)}.test(${key2})`))),(0,codegen_1.not)(definedProp)}function deleteAdditional(key2){gen.code((0,codegen_1._)`delete ${data}[${key2}]`)}function additionalPropertyCode(key2){if(opts.
removeAdditional==="all"||opts.removeAdditional&&schema===!1){deleteAdditional(key2);return}if(schema===!1){cxt.setParams({additionalProperty:key2}),cxt.error(),allErrors||gen.break();return}if(typeof schema=="object"&&!(0,util_1.alwaysValidSchema)(it,schema)){const valid2=gen.name("valid");opts.removeAdditional==="failing"?(applyAdditionalSchema(key2,valid2,!1),gen.if((0,codegen_1.not)(valid2),()=>{cxt.reset(),deleteAdditional(key2)})):(applyAdditionalSchema(key2,valid2),allErrors||gen.if((0,codegen_1.
not)(valid2),()=>gen.break()))}}function applyAdditionalSchema(key2,valid2,errors2){const subschema2={keyword:"additionalProperties",dataProp:key2,dataPropType:util_1.Type.Str};errors2===!1&&Object.assign(subschema2,{compositeRule:!0,createErrors:!1,allErrors:!1}),cxt.subschema(subschema2,valid2)}}};return additionalProperties.default=def,additionalProperties}var properties$2={},hasRequiredProperties;function requireProperties(){if(hasRequiredProperties)return properties$2;hasRequiredProperties=
1,Object.defineProperty(properties$2,"__esModule",{value:!0});const validate_1=requireValidate(),code_1=requireCode(),util_1=requireUtil(),additionalProperties_1=requireAdditionalProperties(),def={keyword:"properties",type:"object",schemaType:"object",code(cxt){const{gen,schema,parentSchema,data,it}=cxt;it.opts.removeAdditional==="all"&&parentSchema.additionalProperties===void 0&&additionalProperties_1.default.code(new validate_1.KeywordCxt(it,additionalProperties_1.default,"additionalProperties"));
const allProps=(0,code_1.allSchemaProperties)(schema);for(const prop2 of allProps)it.definedProperties.add(prop2);it.opts.unevaluated&&allProps.length&&it.props!==!0&&(it.props=util_1.mergeEvaluated.props(gen,(0,util_1.toHash)(allProps),it.props));const properties2=allProps.filter(p2=>!(0,util_1.alwaysValidSchema)(it,schema[p2]));if(properties2.length===0)return;const valid2=gen.name("valid");for(const prop2 of properties2)hasDefault(prop2)?applyPropertySchema(prop2):(gen.if((0,code_1.propertyInData)(
gen,data,prop2,it.opts.ownProperties)),applyPropertySchema(prop2),it.allErrors||gen.else().var(valid2,!0),gen.endIf()),cxt.it.definedProperties.add(prop2),cxt.ok(valid2);function hasDefault(prop2){return it.opts.useDefaults&&!it.compositeRule&&schema[prop2].default!==void 0}function applyPropertySchema(prop2){cxt.subschema({keyword:"properties",schemaProp:prop2,dataProp:prop2},valid2)}}};return properties$2.default=def,properties$2}var patternProperties={},hasRequiredPatternProperties;function requirePatternProperties(){
if(hasRequiredPatternProperties)return patternProperties;hasRequiredPatternProperties=1,Object.defineProperty(patternProperties,"__esModule",{value:!0});const code_1=requireCode(),codegen_1=requireCodegen(),util_1=requireUtil(),util_2=requireUtil(),def={keyword:"patternProperties",type:"object",schemaType:"object",code(cxt){const{gen,schema,data,parentSchema,it}=cxt,{opts}=it,patterns=(0,code_1.allSchemaProperties)(schema),alwaysValidPatterns=patterns.filter(p2=>(0,util_1.alwaysValidSchema)(it,schema[p2]));
if(patterns.length===0||alwaysValidPatterns.length===patterns.length&&(!it.opts.unevaluated||it.props===!0))return;const checkProperties=opts.strictSchema&&!opts.allowMatchingProperties&&parentSchema.properties,valid2=gen.name("valid");it.props!==!0&&!(it.props instanceof codegen_1.Name)&&(it.props=(0,util_2.evaluatedPropsToName)(gen,it.props));const{props}=it;validatePatternProperties();function validatePatternProperties(){for(const pat of patterns)checkProperties&&checkMatchingProperties(pat),
it.allErrors?validateProperties(pat):(gen.var(valid2,!0),validateProperties(pat),gen.if(valid2))}function checkMatchingProperties(pat){for(const prop2 in checkProperties)new RegExp(pat).test(prop2)&&(0,util_1.checkStrictMode)(it,`property ${prop2} matches pattern ${pat} (use allowMatchingProperties)`)}function validateProperties(pat){gen.forIn("key",data,key2=>{gen.if((0,codegen_1._)`${(0,code_1.usePattern)(cxt,pat)}.test(${key2})`,()=>{const alwaysValid=alwaysValidPatterns.includes(pat);alwaysValid||
cxt.subschema({keyword:"patternProperties",schemaProp:pat,dataProp:key2,dataPropType:util_2.Type.Str},valid2),it.opts.unevaluated&&props!==!0?gen.assign((0,codegen_1._)`${props}[${key2}]`,!0):!alwaysValid&&!it.allErrors&&gen.if((0,codegen_1.not)(valid2),()=>gen.break())})})}}};return patternProperties.default=def,patternProperties}var not={},hasRequiredNot;function requireNot(){if(hasRequiredNot)return not;hasRequiredNot=1,Object.defineProperty(not,"__esModule",{value:!0});const util_1=requireUtil(),
def={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(cxt){const{gen,schema,it}=cxt;if((0,util_1.alwaysValidSchema)(it,schema)){cxt.fail();return}const valid2=gen.name("valid");cxt.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},valid2),cxt.failResult(valid2,()=>cxt.reset(),()=>cxt.error())},error:{message:"must NOT be valid"}};return not.default=def,not}var anyOf={},hasRequiredAnyOf;function requireAnyOf(){if(hasRequiredAnyOf)return anyOf;hasRequiredAnyOf=
1,Object.defineProperty(anyOf,"__esModule",{value:!0});const def={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:requireCode().validateUnion,error:{message:"must match a schema in anyOf"}};return anyOf.default=def,anyOf}var oneOf={},hasRequiredOneOf;function requireOneOf(){if(hasRequiredOneOf)return oneOf;hasRequiredOneOf=1,Object.defineProperty(oneOf,"__esModule",{value:!0});const codegen_1=requireCodegen(),util_1=requireUtil(),def={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{
message:"must match exactly one schema in oneOf",params:({params})=>(0,codegen_1._)`{passingSchemas: ${params.passing}}`},code(cxt){const{gen,schema,parentSchema,it}=cxt;if(!Array.isArray(schema))throw new Error("ajv implementation error");if(it.opts.discriminator&&parentSchema.discriminator)return;const schArr=schema,valid2=gen.let("valid",!1),passing=gen.let("passing",null),schValid=gen.name("_valid");cxt.setParams({passing}),gen.block(validateOneOf),cxt.result(valid2,()=>cxt.reset(),()=>cxt.error(
!0));function validateOneOf(){schArr.forEach((sch,i)=>{let schCxt;(0,util_1.alwaysValidSchema)(it,sch)?gen.var(schValid,!0):schCxt=cxt.subschema({keyword:"oneOf",schemaProp:i,compositeRule:!0},schValid),i>0&&gen.if((0,codegen_1._)`${schValid} && ${valid2}`).assign(valid2,!1).assign(passing,(0,codegen_1._)`[${passing}, ${i}]`).else(),gen.if(schValid,()=>{gen.assign(valid2,!0),gen.assign(passing,i),schCxt&&cxt.mergeEvaluated(schCxt,codegen_1.Name)})})}}};return oneOf.default=def,oneOf}var allOf={},
hasRequiredAllOf;function requireAllOf(){if(hasRequiredAllOf)return allOf;hasRequiredAllOf=1,Object.defineProperty(allOf,"__esModule",{value:!0});const util_1=requireUtil(),def={keyword:"allOf",schemaType:"array",code(cxt){const{gen,schema,it}=cxt;if(!Array.isArray(schema))throw new Error("ajv implementation error");const valid2=gen.name("valid");schema.forEach((sch,i)=>{if((0,util_1.alwaysValidSchema)(it,sch))return;const schCxt=cxt.subschema({keyword:"allOf",schemaProp:i},valid2);cxt.ok(valid2),
cxt.mergeEvaluated(schCxt)})}};return allOf.default=def,allOf}var _if={},hasRequired_if;function require_if(){if(hasRequired_if)return _if;hasRequired_if=1,Object.defineProperty(_if,"__esModule",{value:!0});const codegen_1=requireCodegen(),util_1=requireUtil(),def={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params})=>(0,codegen_1.str)`must match "${params.ifClause}" schema`,params:({params})=>(0,codegen_1._)`{failingKeyword: ${params.ifClause}}`},code(cxt){const{
gen,parentSchema,it}=cxt;parentSchema.then===void 0&&parentSchema.else===void 0&&(0,util_1.checkStrictMode)(it,'"if" without "then" and "else" is ignored');const hasThen=hasSchema(it,"then"),hasElse=hasSchema(it,"else");if(!hasThen&&!hasElse)return;const valid2=gen.let("valid",!0),schValid=gen.name("_valid");if(validateIf(),cxt.reset(),hasThen&&hasElse){const ifClause=gen.let("ifClause");cxt.setParams({ifClause}),gen.if(schValid,validateClause("then",ifClause),validateClause("else",ifClause))}else
hasThen?gen.if(schValid,validateClause("then")):gen.if((0,codegen_1.not)(schValid),validateClause("else"));cxt.pass(valid2,()=>cxt.error(!0));function validateIf(){const schCxt=cxt.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},schValid);cxt.mergeEvaluated(schCxt)}function validateClause(keyword2,ifClause){return()=>{const schCxt=cxt.subschema({keyword:keyword2},schValid);gen.assign(valid2,schValid),cxt.mergeValidEvaluated(schCxt,valid2),ifClause?gen.assign(ifClause,(0,codegen_1.
_)`${keyword2}`):cxt.setParams({ifClause:keyword2})}}}};function hasSchema(it,keyword2){const schema=it.schema[keyword2];return schema!==void 0&&!(0,util_1.alwaysValidSchema)(it,schema)}return _if.default=def,_if}var thenElse={},hasRequiredThenElse;function requireThenElse(){if(hasRequiredThenElse)return thenElse;hasRequiredThenElse=1,Object.defineProperty(thenElse,"__esModule",{value:!0});const util_1=requireUtil(),def={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:keyword2,
parentSchema,it}){parentSchema.if===void 0&&(0,util_1.checkStrictMode)(it,`"${keyword2}" without "if" is ignored`)}};return thenElse.default=def,thenElse}var hasRequiredApplicator;function requireApplicator(){if(hasRequiredApplicator)return applicator;hasRequiredApplicator=1,Object.defineProperty(applicator,"__esModule",{value:!0});const additionalItems_1=requireAdditionalItems(),prefixItems_1=requirePrefixItems(),items_1=requireItems(),items2020_1=requireItems2020(),contains_1=requireContains(),
dependencies_1=requireDependencies(),propertyNames_1=requirePropertyNames(),additionalProperties_1=requireAdditionalProperties(),properties_12=requireProperties(),patternProperties_1=requirePatternProperties(),not_1=requireNot(),anyOf_1=requireAnyOf(),oneOf_1=requireOneOf(),allOf_1=requireAllOf(),if_1=require_if(),thenElse_1=requireThenElse();function getApplicator(draft2020=!1){const applicator2=[not_1.default,anyOf_1.default,oneOf_1.default,allOf_1.default,if_1.default,thenElse_1.default,propertyNames_1.
default,additionalProperties_1.default,dependencies_1.default,properties_12.default,patternProperties_1.default];return draft2020?applicator2.push(prefixItems_1.default,items2020_1.default):applicator2.push(additionalItems_1.default,items_1.default),applicator2.push(contains_1.default),applicator2}return applicator.default=getApplicator,applicator}var format$1={},format={},hasRequiredFormat$1;function requireFormat$1(){if(hasRequiredFormat$1)return format;hasRequiredFormat$1=1,Object.defineProperty(
format,"__esModule",{value:!0});const codegen_1=requireCodegen(),def={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode})=>(0,codegen_1.str)`must match format "${schemaCode}"`,params:({schemaCode})=>(0,codegen_1._)`{format: ${schemaCode}}`},code(cxt,ruleType){const{gen,data,$data,schema,schemaCode,it}=cxt,{opts,errSchemaPath,schemaEnv,self:self2}=it;if(!opts.validateFormats)return;$data?validate$DataFormat():validateFormat();function validate$DataFormat(){
const fmts=gen.scopeValue("formats",{ref:self2.formats,code:opts.code.formats}),fDef=gen.const("fDef",(0,codegen_1._)`${fmts}[${schemaCode}]`),fType=gen.let("fType"),format2=gen.let("format");gen.if((0,codegen_1._)`typeof ${fDef} == "object" && !(${fDef} instanceof RegExp)`,()=>gen.assign(fType,(0,codegen_1._)`${fDef}.type || "string"`).assign(format2,(0,codegen_1._)`${fDef}.validate`),()=>gen.assign(fType,(0,codegen_1._)`"string"`).assign(format2,fDef)),cxt.fail$data((0,codegen_1.or)(unknownFmt(),
invalidFmt()));function unknownFmt(){return opts.strictSchema===!1?codegen_1.nil:(0,codegen_1._)`${schemaCode} && !${format2}`}function invalidFmt(){const callFormat=schemaEnv.$async?(0,codegen_1._)`(${fDef}.async ? await ${format2}(${data}) : ${format2}(${data}))`:(0,codegen_1._)`${format2}(${data})`,validData=(0,codegen_1._)`(typeof ${format2} == "function" ? ${callFormat} : ${format2}.test(${data}))`;return(0,codegen_1._)`${format2} && ${format2} !== true && ${fType} === ${ruleType} && !${validData}`}}
function validateFormat(){const formatDef=self2.formats[schema];if(!formatDef){unknownFormat();return}if(formatDef===!0)return;const[fmtType,format2,fmtRef]=getFormat(formatDef);fmtType===ruleType&&cxt.pass(validCondition());function unknownFormat(){if(opts.strictSchema===!1){self2.logger.warn(unknownMsg());return}throw new Error(unknownMsg());function unknownMsg(){return`unknown format "${schema}" ignored in schema at path "${errSchemaPath}"`}}function getFormat(fmtDef){const code2=fmtDef instanceof
RegExp?(0,codegen_1.regexpCode)(fmtDef):opts.code.formats?(0,codegen_1._)`${opts.code.formats}${(0,codegen_1.getProperty)(schema)}`:void 0,fmt=gen.scopeValue("formats",{key:schema,ref:fmtDef,code:code2});return typeof fmtDef=="object"&&!(fmtDef instanceof RegExp)?[fmtDef.type||"string",fmtDef.validate,(0,codegen_1._)`${fmt}.validate`]:["string",fmtDef,fmt]}function validCondition(){if(typeof formatDef=="object"&&!(formatDef instanceof RegExp)&&formatDef.async){if(!schemaEnv.$async)throw new Error(
"async format in sync schema");return(0,codegen_1._)`await ${fmtRef}(${data})`}return typeof format2=="function"?(0,codegen_1._)`${fmtRef}(${data})`:(0,codegen_1._)`${fmtRef}.test(${data})`}}}};return format.default=def,format}var hasRequiredFormat;function requireFormat(){if(hasRequiredFormat)return format$1;hasRequiredFormat=1,Object.defineProperty(format$1,"__esModule",{value:!0});const format2=[requireFormat$1().default];return format$1.default=format2,format$1}var metadata={},hasRequiredMetadata;
function requireMetadata(){return hasRequiredMetadata||(hasRequiredMetadata=1,Object.defineProperty(metadata,"__esModule",{value:!0}),metadata.contentVocabulary=metadata.metadataVocabulary=void 0,metadata.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],metadata.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),metadata}var hasRequiredDraft7;function requireDraft7(){if(hasRequiredDraft7)return draft7;hasRequiredDraft7=1,Object.
defineProperty(draft7,"__esModule",{value:!0});const core_1=requireCore(),validation_1=requireValidation(),applicator_1=requireApplicator(),format_1=requireFormat(),metadata_1=requireMetadata(),draft7Vocabularies=[core_1.default,validation_1.default,(0,applicator_1.default)(),format_1.default,metadata_1.metadataVocabulary,metadata_1.contentVocabulary];return draft7.default=draft7Vocabularies,draft7}var discriminator={},types$1={},hasRequiredTypes;function requireTypes(){if(hasRequiredTypes)return types$1;
hasRequiredTypes=1,Object.defineProperty(types$1,"__esModule",{value:!0}),types$1.DiscrError=void 0;var DiscrError;return(function(DiscrError2){DiscrError2.Tag="tag",DiscrError2.Mapping="mapping"})(DiscrError||(types$1.DiscrError=DiscrError={})),types$1}var hasRequiredDiscriminator;function requireDiscriminator(){if(hasRequiredDiscriminator)return discriminator;hasRequiredDiscriminator=1,Object.defineProperty(discriminator,"__esModule",{value:!0});const codegen_1=requireCodegen(),types_1=requireTypes(),
compile_1=requireCompile(),ref_error_1=requireRef_error(),util_1=requireUtil(),def={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError,tagName}})=>discrError===types_1.DiscrError.Tag?`tag "${tagName}" must be string`:`value of tag "${tagName}" must be in oneOf`,params:({params:{discrError,tag,tagName}})=>(0,codegen_1._)`{error: ${discrError}, tag: ${tagName}, tagValue: ${tag}}`},code(cxt){const{gen,data,schema,parentSchema,it}=cxt,{oneOf:oneOf2}=parentSchema;
if(!it.opts.discriminator)throw new Error("discriminator: requires discriminator option");const tagName=schema.propertyName;if(typeof tagName!="string")throw new Error("discriminator: requires propertyName");if(schema.mapping)throw new Error("discriminator: mapping is not supported");if(!oneOf2)throw new Error("discriminator: requires oneOf keyword");const valid2=gen.let("valid",!1),tag=gen.const("tag",(0,codegen_1._)`${data}${(0,codegen_1.getProperty)(tagName)}`);gen.if((0,codegen_1._)`typeof ${tag} == "string"`,
()=>validateMapping(),()=>cxt.error(!1,{discrError:types_1.DiscrError.Tag,tag,tagName})),cxt.ok(valid2);function validateMapping(){const mapping=getMapping();gen.if(!1);for(const tagValue in mapping)gen.elseIf((0,codegen_1._)`${tag} === ${tagValue}`),gen.assign(valid2,applyTagSchema(mapping[tagValue]));gen.else(),cxt.error(!1,{discrError:types_1.DiscrError.Mapping,tag,tagName}),gen.endIf()}function applyTagSchema(schemaProp){const _valid=gen.name("valid"),schCxt=cxt.subschema({keyword:"oneOf",schemaProp},
_valid);return cxt.mergeEvaluated(schCxt,codegen_1.Name),_valid}function getMapping(){var _a2;const oneOfMapping={},topRequired=hasRequired(parentSchema);let tagRequired=!0;for(let i=0;i<oneOf2.length;i++){let sch=oneOf2[i];if(sch?.$ref&&!(0,util_1.schemaHasRulesButRef)(sch,it.self.RULES)){const ref2=sch.$ref;if(sch=compile_1.resolveRef.call(it.self,it.schemaEnv.root,it.baseId,ref2),sch instanceof compile_1.SchemaEnv&&(sch=sch.schema),sch===void 0)throw new ref_error_1.default(it.opts.uriResolver,
it.baseId,ref2)}const propSch=(_a2=sch?.properties)===null||_a2===void 0?void 0:_a2[tagName];if(typeof propSch!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${tagName}"`);tagRequired=tagRequired&&(topRequired||hasRequired(sch)),addMappings(propSch,i)}if(!tagRequired)throw new Error(`discriminator: "${tagName}" must be required`);return oneOfMapping;function hasRequired({required:required2}){return Array.isArray(required2)&&required2.includes(
tagName)}function addMappings(sch,i){if(sch.const)addMapping(sch.const,i);else if(sch.enum)for(const tagValue of sch.enum)addMapping(tagValue,i);else throw new Error(`discriminator: "properties/${tagName}" must have "const" or "enum"`)}function addMapping(tagValue,i){if(typeof tagValue!="string"||tagValue in oneOfMapping)throw new Error(`discriminator: "${tagName}" values must be unique strings`);oneOfMapping[tagValue]=i}}}};return discriminator.default=def,discriminator}const $schema="http://js\
on-schema.org/draft-07/schema#",$id="http://json-schema.org/draft-07/schema#",title="Core schema meta-schema",definitions={schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type=["object","boolean"],
properties$1={$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInte\
ger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{
$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},
type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},require$$3={$schema,$id,title,definitions,type,properties:properties$1,default:!0};var hasRequiredAjv;
function requireAjv(){return hasRequiredAjv||(hasRequiredAjv=1,(function(module,exports$1){Object.defineProperty(exports$1,"__esModule",{value:!0}),exports$1.MissingRefError=exports$1.ValidationError=exports$1.CodeGen=exports$1.Name=exports$1.nil=exports$1.stringify=exports$1.str=exports$1._=exports$1.KeywordCxt=exports$1.Ajv=void 0;const core_1=requireCore$1(),draft7_1=requireDraft7(),discriminator_1=requireDiscriminator(),draft7MetaSchema=require$$3,META_SUPPORT_DATA=["/properties"],META_SCHEMA_ID="\
http://json-schema.org/draft-07/schema";class Ajv2 extends core_1.default{_addVocabularies(){super._addVocabularies(),draft7_1.default.forEach(v=>this.addVocabulary(v)),this.opts.discriminator&&this.addKeyword(discriminator_1.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const metaSchema=this.opts.$data?this.$dataMetaSchema(draft7MetaSchema,META_SUPPORT_DATA):draft7MetaSchema;this.addMetaSchema(metaSchema,META_SCHEMA_ID,!1),this.refs["http://json-schema\
.org/schema"]=META_SCHEMA_ID}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(META_SCHEMA_ID)?META_SCHEMA_ID:void 0)}}exports$1.Ajv=Ajv2,module.exports=exports$1=Ajv2,module.exports.Ajv=Ajv2,Object.defineProperty(exports$1,"__esModule",{value:!0}),exports$1.default=Ajv2;var validate_1=requireValidate();Object.defineProperty(exports$1,"KeywordCxt",{enumerable:!0,get:function(){return validate_1.KeywordCxt}});var codegen_1=requireCodegen();Object.defineProperty(exports$1,
"_",{enumerable:!0,get:function(){return codegen_1._}}),Object.defineProperty(exports$1,"str",{enumerable:!0,get:function(){return codegen_1.str}}),Object.defineProperty(exports$1,"stringify",{enumerable:!0,get:function(){return codegen_1.stringify}}),Object.defineProperty(exports$1,"nil",{enumerable:!0,get:function(){return codegen_1.nil}}),Object.defineProperty(exports$1,"Name",{enumerable:!0,get:function(){return codegen_1.Name}}),Object.defineProperty(exports$1,"CodeGen",{enumerable:!0,get:function(){
return codegen_1.CodeGen}});var validation_error_1=requireValidation_error();Object.defineProperty(exports$1,"ValidationError",{enumerable:!0,get:function(){return validation_error_1.default}});var ref_error_1=requireRef_error();Object.defineProperty(exports$1,"MissingRefError",{enumerable:!0,get:function(){return ref_error_1.default}})})(ajv,ajv.exports)),ajv.exports}var hasRequiredLimit;function requireLimit(){return hasRequiredLimit||(hasRequiredLimit=1,(function(exports$1){Object.defineProperty(
exports$1,"__esModule",{value:!0}),exports$1.formatLimitDefinition=void 0;const ajv_1=requireAjv(),codegen_1=requireCodegen(),ops=codegen_1.operators,KWDs={formatMaximum:{okStr:"<=",ok:ops.LTE,fail:ops.GT},formatMinimum:{okStr:">=",ok:ops.GTE,fail:ops.LT},formatExclusiveMaximum:{okStr:"<",ok:ops.LT,fail:ops.GTE},formatExclusiveMinimum:{okStr:">",ok:ops.GT,fail:ops.LTE}},error2={message:({keyword:keyword2,schemaCode})=>(0,codegen_1.str)`should be ${KWDs[keyword2].okStr} ${schemaCode}`,params:({keyword:keyword2,
schemaCode})=>(0,codegen_1._)`{comparison: ${KWDs[keyword2].okStr}, limit: ${schemaCode}}`};exports$1.formatLimitDefinition={keyword:Object.keys(KWDs),type:"string",schemaType:"string",$data:!0,error:error2,code(cxt){const{gen,data,schemaCode,keyword:keyword2,it}=cxt,{opts,self:self2}=it;if(!opts.validateFormats)return;const fCxt=new ajv_1.KeywordCxt(it,self2.RULES.all.format.definition,"format");fCxt.$data?validate$DataFormat():validateFormat();function validate$DataFormat(){const fmts=gen.scopeValue(
"formats",{ref:self2.formats,code:opts.code.formats}),fmt=gen.const("fmt",(0,codegen_1._)`${fmts}[${fCxt.schemaCode}]`);cxt.fail$data((0,codegen_1.or)((0,codegen_1._)`typeof ${fmt} != "object"`,(0,codegen_1._)`${fmt} instanceof RegExp`,(0,codegen_1._)`typeof ${fmt}.compare != "function"`,compareCode(fmt)))}function validateFormat(){const format2=fCxt.schema,fmtDef=self2.formats[format2];if(!fmtDef||fmtDef===!0)return;if(typeof fmtDef!="object"||fmtDef instanceof RegExp||typeof fmtDef.compare!="f\
unction")throw new Error(`"${keyword2}": format "${format2}" does not define "compare" function`);const fmt=gen.scopeValue("formats",{key:format2,ref:fmtDef,code:opts.code.formats?(0,codegen_1._)`${opts.code.formats}${(0,codegen_1.getProperty)(format2)}`:void 0});cxt.fail$data(compareCode(fmt))}function compareCode(fmt){return(0,codegen_1._)`${fmt}.compare(${data}, ${schemaCode}) ${KWDs[keyword2].fail} 0`}},dependencies:["format"]};const formatLimitPlugin=ajv2=>(ajv2.addKeyword(exports$1.formatLimitDefinition),
ajv2);exports$1.default=formatLimitPlugin})(limit)),limit}var hasRequiredDist;function requireDist(){return hasRequiredDist||(hasRequiredDist=1,(function(module,exports$1){Object.defineProperty(exports$1,"__esModule",{value:!0});const formats_1=requireFormats(),limit_1=requireLimit(),codegen_1=requireCodegen(),fullName=new codegen_1.Name("fullFormats"),fastName=new codegen_1.Name("fastFormats"),formatsPlugin=(ajv2,opts={keywords:!0})=>{if(Array.isArray(opts))return addFormats(ajv2,opts,formats_1.
fullFormats,fullName),ajv2;const[formats2,exportName]=opts.mode==="fast"?[formats_1.fastFormats,fastName]:[formats_1.fullFormats,fullName],list2=opts.formats||formats_1.formatNames;return addFormats(ajv2,list2,formats2,exportName),opts.keywords&&(0,limit_1.default)(ajv2),ajv2};formatsPlugin.get=(name,mode="full")=>{const f=(mode==="fast"?formats_1.fastFormats:formats_1.fullFormats)[name];if(!f)throw new Error(`Unknown format "${name}"`);return f};function addFormats(ajv2,list2,fs,exportName){var _a2,
_b;(_a2=(_b=ajv2.opts.code).formats)!==null&&_a2!==void 0||(_b.formats=(0,codegen_1._)`require("ajv-formats/dist/formats").${exportName}`);for(const f of list2)ajv2.addFormat(f,fs[f])}module.exports=exports$1=formatsPlugin,Object.defineProperty(exports$1,"__esModule",{value:!0}),exports$1.default=formatsPlugin})(dist,dist.exports)),dist.exports}var distExports=requireDist();const _addFormats=getDefaultExportFromCjs(distExports);function createDefaultAjvInstance(){const ajv2=new Ajv({strict:!1,validateFormats:!0,
validateSchema:!1,allErrors:!0});return _addFormats(ajv2),ajv2}class AjvJsonSchemaValidator{constructor(ajv2){this._ajv=ajv2??createDefaultAjvInstance()}getValidator(schema){const ajvValidator="$id"in schema&&typeof schema.$id=="string"?this._ajv.getSchema(schema.$id)??this._ajv.compile(schema):this._ajv.compile(schema);return input=>ajvValidator(input)?{valid:!0,data:input,errorMessage:void 0}:{valid:!1,data:void 0,errorMessage:this._ajv.errorsText(ajvValidator.errors)}}}class ExperimentalClientTasks{constructor(_client){
this._client=_client}async*callToolStream(params,resultSchema=CallToolResultSchema,options){const clientInternal=this._client,optionsWithTask={...options,task:options?.task??(clientInternal.isToolTask(params.name)?{}:void 0)},stream=clientInternal.requestStream({method:"tools/call",params},resultSchema,optionsWithTask),validator=clientInternal.getToolOutputValidator(params.name);for await(const message of stream){if(message.type==="result"&&validator){const result=message.result;if(!result.structuredContent&&
!result.isError){yield{type:"error",error:new McpError(ErrorCode.InvalidRequest,`Tool ${params.name} has an output schema but did not return structured content`)};return}if(result.structuredContent)try{const validationResult=validator(result.structuredContent);if(!validationResult.valid){yield{type:"error",error:new McpError(ErrorCode.InvalidParams,`Structured content does not match the tool's output schema: ${validationResult.errorMessage}`)};return}}catch(error2){if(error2 instanceof McpError){
yield{type:"error",error:error2};return}yield{type:"error",error:new McpError(ErrorCode.InvalidParams,`Failed to validate structured content: ${error2 instanceof Error?error2.message:String(error2)}`)};return}}yield message}}async getTask(taskId,options){return this._client.getTask({taskId},options)}async getTaskResult(taskId,resultSchema,options){return this._client.getTaskResult({taskId},resultSchema,options)}async listTasks(cursor,options){return this._client.listTasks(cursor?{cursor}:void 0,
options)}async cancelTask(taskId,options){return this._client.cancelTask({taskId},options)}requestStream(request,resultSchema,options){return this._client.requestStream(request,resultSchema,options)}}function assertToolsCallTaskCapability(requests,method,entityName){if(!requests)throw new Error(`${entityName} does not support task creation (required for ${method})`);switch(method){case"tools/call":if(!requests.tools?.call)throw new Error(`${entityName} does not support task creation for tools/ca\
ll (required for ${method})`);break}}function assertClientRequestTaskCapability(requests,method,entityName){if(!requests)throw new Error(`${entityName} does not support task creation (required for ${method})`);switch(method){case"sampling/createMessage":if(!requests.sampling?.createMessage)throw new Error(`${entityName} does not support task creation for sampling/createMessage (required for ${method})`);break;case"elicitation/create":if(!requests.elicitation?.create)throw new Error(`${entityName}\
 does not support task creation for elicitation/create (required for ${method})`);break}}function applyElicitationDefaults(schema,data){if(!(!schema||data===null||typeof data!="object")){if(schema.type==="object"&&schema.properties&&typeof schema.properties=="object"){const obj=data,props=schema.properties;for(const key2 of Object.keys(props)){const propSchema=props[key2];obj[key2]===void 0&&Object.prototype.hasOwnProperty.call(propSchema,"default")&&(obj[key2]=propSchema.default),obj[key2]!==void 0&&
applyElicitationDefaults(propSchema,obj[key2])}}if(Array.isArray(schema.anyOf))for(const sub2 of schema.anyOf)typeof sub2!="boolean"&&applyElicitationDefaults(sub2,data);if(Array.isArray(schema.oneOf))for(const sub2 of schema.oneOf)typeof sub2!="boolean"&&applyElicitationDefaults(sub2,data)}}function getSupportedElicitationModes(capabilities){if(!capabilities)return{supportsFormMode:!1,supportsUrlMode:!1};const hasFormCapability=capabilities.form!==void 0,hasUrlCapability=capabilities.url!==void 0;
return{supportsFormMode:hasFormCapability||!hasFormCapability&&!hasUrlCapability,supportsUrlMode:hasUrlCapability}}class Client extends Protocol{constructor(_clientInfo,options){super(options),this._clientInfo=_clientInfo,this._cachedToolOutputValidators=new Map,this._cachedKnownTaskTools=new Set,this._cachedRequiredTaskTools=new Set,this._listChangedDebounceTimers=new Map,this._capabilities=options?.capabilities??{},this._jsonSchemaValidator=options?.jsonSchemaValidator??new AjvJsonSchemaValidator,
options?.listChanged&&(this._pendingListChangedConfig=options.listChanged)}_setupListChangedHandlers(config2){config2.tools&&this._serverCapabilities?.tools?.listChanged&&this._setupListChangedHandler("tools",ToolListChangedNotificationSchema,config2.tools,async()=>(await this.listTools()).tools),config2.prompts&&this._serverCapabilities?.prompts?.listChanged&&this._setupListChangedHandler("prompts",PromptListChangedNotificationSchema,config2.prompts,async()=>(await this.listPrompts()).prompts),
config2.resources&&this._serverCapabilities?.resources?.listChanged&&this._setupListChangedHandler("resources",ResourceListChangedNotificationSchema,config2.resources,async()=>(await this.listResources()).resources)}get experimental(){return this._experimental||(this._experimental={tasks:new ExperimentalClientTasks(this)}),this._experimental}registerCapabilities(capabilities){if(this.transport)throw new Error("Cannot register capabilities after connecting to transport");this._capabilities=mergeCapabilities(
this._capabilities,capabilities)}setRequestHandler(requestSchema,handler){const methodSchema=getObjectShape(requestSchema)?.method;if(!methodSchema)throw new Error("Schema is missing a method literal");let methodValue;if(isZ4Schema(methodSchema)){const v4Schema=methodSchema;methodValue=v4Schema._zod?.def?.value??v4Schema.value}else{const v3Schema=methodSchema;methodValue=v3Schema._def?.value??v3Schema.value}if(typeof methodValue!="string")throw new Error("Schema method literal must be a string");
const method=methodValue;if(method==="elicitation/create"){const wrappedHandler=async(request,extra)=>{const validatedRequest=safeParse$1(ElicitRequestSchema,request);if(!validatedRequest.success){const errorMessage=validatedRequest.error instanceof Error?validatedRequest.error.message:String(validatedRequest.error);throw new McpError(ErrorCode.InvalidParams,`Invalid elicitation request: ${errorMessage}`)}const{params}=validatedRequest.data;params.mode=params.mode??"form";const{supportsFormMode,
supportsUrlMode}=getSupportedElicitationModes(this._capabilities.elicitation);if(params.mode==="form"&&!supportsFormMode)throw new McpError(ErrorCode.InvalidParams,"Client does not support form-mode elicitation requests");if(params.mode==="url"&&!supportsUrlMode)throw new McpError(ErrorCode.InvalidParams,"Client does not support URL-mode elicitation requests");const result=await Promise.resolve(handler(request,extra));if(params.task){const taskValidationResult=safeParse$1(CreateTaskResultSchema,
result);if(!taskValidationResult.success){const errorMessage=taskValidationResult.error instanceof Error?taskValidationResult.error.message:String(taskValidationResult.error);throw new McpError(ErrorCode.InvalidParams,`Invalid task creation result: ${errorMessage}`)}return taskValidationResult.data}const validationResult=safeParse$1(ElicitResultSchema,result);if(!validationResult.success){const errorMessage=validationResult.error instanceof Error?validationResult.error.message:String(validationResult.
error);throw new McpError(ErrorCode.InvalidParams,`Invalid elicitation result: ${errorMessage}`)}const validatedResult=validationResult.data,requestedSchema=params.mode==="form"?params.requestedSchema:void 0;if(params.mode==="form"&&validatedResult.action==="accept"&&validatedResult.content&&requestedSchema&&this._capabilities.elicitation?.form?.applyDefaults)try{applyElicitationDefaults(requestedSchema,validatedResult.content)}catch{}return validatedResult};return super.setRequestHandler(requestSchema,
wrappedHandler)}if(method==="sampling/createMessage"){const wrappedHandler=async(request,extra)=>{const validatedRequest=safeParse$1(CreateMessageRequestSchema,request);if(!validatedRequest.success){const errorMessage=validatedRequest.error instanceof Error?validatedRequest.error.message:String(validatedRequest.error);throw new McpError(ErrorCode.InvalidParams,`Invalid sampling request: ${errorMessage}`)}const{params}=validatedRequest.data,result=await Promise.resolve(handler(request,extra));if(params.
task){const taskValidationResult=safeParse$1(CreateTaskResultSchema,result);if(!taskValidationResult.success){const errorMessage=taskValidationResult.error instanceof Error?taskValidationResult.error.message:String(taskValidationResult.error);throw new McpError(ErrorCode.InvalidParams,`Invalid task creation result: ${errorMessage}`)}return taskValidationResult.data}const resultSchema=params.tools||params.toolChoice?CreateMessageResultWithToolsSchema:CreateMessageResultSchema,validationResult=safeParse$1(
resultSchema,result);if(!validationResult.success){const errorMessage=validationResult.error instanceof Error?validationResult.error.message:String(validationResult.error);throw new McpError(ErrorCode.InvalidParams,`Invalid sampling result: ${errorMessage}`)}return validationResult.data};return super.setRequestHandler(requestSchema,wrappedHandler)}return super.setRequestHandler(requestSchema,handler)}assertCapability(capability,method){if(!this._serverCapabilities?.[capability])throw new Error(`\
Server does not support ${capability} (required for ${method})`)}async connect(transport,options){if(await super.connect(transport),transport.sessionId===void 0)try{const result=await this.request({method:"initialize",params:{protocolVersion:LATEST_PROTOCOL_VERSION,capabilities:this._capabilities,clientInfo:this._clientInfo}},InitializeResultSchema,options);if(result===void 0)throw new Error(`Server sent invalid initialize result: ${result}`);if(!SUPPORTED_PROTOCOL_VERSIONS.includes(result.protocolVersion))
throw new Error(`Server's protocol version is not supported: ${result.protocolVersion}`);this._serverCapabilities=result.capabilities,this._serverVersion=result.serverInfo,transport.setProtocolVersion&&transport.setProtocolVersion(result.protocolVersion),this._instructions=result.instructions,await this.notification({method:"notifications/initialized"}),this._pendingListChangedConfig&&(this._setupListChangedHandlers(this._pendingListChangedConfig),this._pendingListChangedConfig=void 0)}catch(error2){
throw this.close(),error2}}getServerCapabilities(){return this._serverCapabilities}getServerVersion(){return this._serverVersion}getInstructions(){return this._instructions}assertCapabilityForMethod(method){switch(method){case"logging/setLevel":if(!this._serverCapabilities?.logging)throw new Error(`Server does not support logging (required for ${method})`);break;case"prompts/get":case"prompts/list":if(!this._serverCapabilities?.prompts)throw new Error(`Server does not support prompts (required f\
or ${method})`);break;case"resources/list":case"resources/templates/list":case"resources/read":case"resources/subscribe":case"resources/unsubscribe":if(!this._serverCapabilities?.resources)throw new Error(`Server does not support resources (required for ${method})`);if(method==="resources/subscribe"&&!this._serverCapabilities.resources.subscribe)throw new Error(`Server does not support resource subscriptions (required for ${method})`);break;case"tools/call":case"tools/list":if(!this._serverCapabilities?.
tools)throw new Error(`Server does not support tools (required for ${method})`);break;case"completion/complete":if(!this._serverCapabilities?.completions)throw new Error(`Server does not support completions (required for ${method})`);break}}assertNotificationCapability(method){switch(method){case"notifications/roots/list_changed":if(!this._capabilities.roots?.listChanged)throw new Error(`Client does not support roots list changed notifications (required for ${method})`);break}}assertRequestHandlerCapability(method){
if(this._capabilities)switch(method){case"sampling/createMessage":if(!this._capabilities.sampling)throw new Error(`Client does not support sampling capability (required for ${method})`);break;case"elicitation/create":if(!this._capabilities.elicitation)throw new Error(`Client does not support elicitation capability (required for ${method})`);break;case"roots/list":if(!this._capabilities.roots)throw new Error(`Client does not support roots capability (required for ${method})`);break;case"tasks/get":case"\
tasks/list":case"tasks/result":case"tasks/cancel":if(!this._capabilities.tasks)throw new Error(`Client does not support tasks capability (required for ${method})`);break}}assertTaskCapability(method){assertToolsCallTaskCapability(this._serverCapabilities?.tasks?.requests,method,"Server")}assertTaskHandlerCapability(method){this._capabilities&&assertClientRequestTaskCapability(this._capabilities.tasks?.requests,method,"Client")}async ping(options){return this.request({method:"ping"},EmptyResultSchema,
options)}async complete(params,options){return this.request({method:"completion/complete",params},CompleteResultSchema,options)}async setLoggingLevel(level,options){return this.request({method:"logging/setLevel",params:{level}},EmptyResultSchema,options)}async getPrompt(params,options){return this.request({method:"prompts/get",params},GetPromptResultSchema,options)}async listPrompts(params,options){return this.request({method:"prompts/list",params},ListPromptsResultSchema,options)}async listResources(params,options){
return this.request({method:"resources/list",params},ListResourcesResultSchema,options)}async listResourceTemplates(params,options){return this.request({method:"resources/templates/list",params},ListResourceTemplatesResultSchema,options)}async readResource(params,options){return this.request({method:"resources/read",params},ReadResourceResultSchema,options)}async subscribeResource(params,options){return this.request({method:"resources/subscribe",params},EmptyResultSchema,options)}async unsubscribeResource(params,options){
return this.request({method:"resources/unsubscribe",params},EmptyResultSchema,options)}async callTool(params,resultSchema=CallToolResultSchema,options){if(this.isToolTaskRequired(params.name))throw new McpError(ErrorCode.InvalidRequest,`Tool "${params.name}" requires task-based execution. Use client.experimental.tasks.callToolStream() instead.`);const result=await this.request({method:"tools/call",params},resultSchema,options),validator=this.getToolOutputValidator(params.name);if(validator){if(!result.
structuredContent&&!result.isError)throw new McpError(ErrorCode.InvalidRequest,`Tool ${params.name} has an output schema but did not return structured content`);if(result.structuredContent)try{const validationResult=validator(result.structuredContent);if(!validationResult.valid)throw new McpError(ErrorCode.InvalidParams,`Structured content does not match the tool's output schema: ${validationResult.errorMessage}`)}catch(error2){throw error2 instanceof McpError?error2:new McpError(ErrorCode.InvalidParams,
`Failed to validate structured content: ${error2 instanceof Error?error2.message:String(error2)}`)}}return result}isToolTask(toolName){return this._serverCapabilities?.tasks?.requests?.tools?.call?this._cachedKnownTaskTools.has(toolName):!1}isToolTaskRequired(toolName){return this._cachedRequiredTaskTools.has(toolName)}cacheToolMetadata(tools){this._cachedToolOutputValidators.clear(),this._cachedKnownTaskTools.clear(),this._cachedRequiredTaskTools.clear();for(const tool of tools){if(tool.outputSchema){
const toolValidator=this._jsonSchemaValidator.getValidator(tool.outputSchema);this._cachedToolOutputValidators.set(tool.name,toolValidator)}const taskSupport=tool.execution?.taskSupport;(taskSupport==="required"||taskSupport==="optional")&&this._cachedKnownTaskTools.add(tool.name),taskSupport==="required"&&this._cachedRequiredTaskTools.add(tool.name)}}getToolOutputValidator(toolName){return this._cachedToolOutputValidators.get(toolName)}async listTools(params,options){const result=await this.request(
{method:"tools/list",params},ListToolsResultSchema,options);return this.cacheToolMetadata(result.tools),result}_setupListChangedHandler(listType,notificationSchema,options,fetcher){const parseResult=ListChangedOptionsBaseSchema.safeParse(options);if(!parseResult.success)throw new Error(`Invalid ${listType} listChanged options: ${parseResult.error.message}`);if(typeof options.onChanged!="function")throw new Error(`Invalid ${listType} listChanged options: onChanged must be a function`);const{autoRefresh,
debounceMs}=parseResult.data,{onChanged}=options,refresh=async()=>{if(!autoRefresh){onChanged(null,null);return}try{const items2=await fetcher();onChanged(null,items2)}catch(e){const error2=e instanceof Error?e:new Error(String(e));onChanged(error2,null)}},handler=()=>{if(debounceMs){const existingTimer=this._listChangedDebounceTimers.get(listType);existingTimer&&clearTimeout(existingTimer);const timer=setTimeout(refresh,debounceMs);this._listChangedDebounceTimers.set(listType,timer)}else refresh()};
this.setNotificationHandler(notificationSchema,handler)}async sendRootsListChanged(){return this.notification({method:"notifications/roots/list_changed"})}}function normalizeHeaders(headers){return headers?headers instanceof Headers?Object.fromEntries(headers.entries()):Array.isArray(headers)?Object.fromEntries(headers):{...headers}:{}}function createFetchWithInit(baseFetch=fetch,baseInit){return baseInit?async(url2,init2)=>{const mergedInit={...baseInit,...init2,headers:init2?.headers?{...normalizeHeaders(
baseInit.headers),...normalizeHeaders(init2.headers)}:baseInit.headers};return baseFetch(url2,mergedInit)}:baseFetch}let crypto$1;crypto$1=globalThis.crypto;async function getRandomValues(size2){return(await crypto$1).getRandomValues(new Uint8Array(size2))}async function random(size2){const mask="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-._~",evenDistCutoff=Math.pow(2,8)-Math.pow(2,8)%mask.length;let result="";for(;result.length<size2;){const randomBytes=await getRandomValues(
size2-result.length);for(const randomByte of randomBytes)randomByte<evenDistCutoff&&(result+=mask[randomByte%mask.length])}return result}async function generateVerifier(length){return await random(length)}async function generateChallenge(code_verifier){const buffer=await(await crypto$1).subtle.digest("SHA-256",new TextEncoder().encode(code_verifier));return btoa(String.fromCharCode(...new Uint8Array(buffer))).replace(/\//g,"_").replace(/\+/g,"-").replace(/=/g,"")}async function pkceChallenge(length){
if(length||(length=43),length<43||length>128)throw`Expected a length between 43 and 128. Received ${length}.`;const verifier=await generateVerifier(length),challenge=await generateChallenge(verifier);return{code_verifier:verifier,code_challenge:challenge}}const SafeUrlSchema=url().superRefine((val,ctx)=>{if(!URL.canParse(val))return ctx.addIssue({code:ZodIssueCode.custom,message:"URL must be parseable",fatal:!0}),NEVER}).refine(url2=>{const u=new URL(url2);return u.protocol!=="javascript:"&&u.protocol!==
"data:"&&u.protocol!=="vbscript:"},{message:"URL cannot use javascript:, data:, or vbscript: scheme"}),OAuthProtectedResourceMetadataSchema=looseObject({resource:string$2().url(),authorization_servers:array(SafeUrlSchema).optional(),jwks_uri:string$2().url().optional(),scopes_supported:array(string$2()).optional(),bearer_methods_supported:array(string$2()).optional(),resource_signing_alg_values_supported:array(string$2()).optional(),resource_name:string$2().optional(),resource_documentation:string$2().
optional(),resource_policy_uri:string$2().url().optional(),resource_tos_uri:string$2().url().optional(),tls_client_certificate_bound_access_tokens:boolean$1().optional(),authorization_details_types_supported:array(string$2()).optional(),dpop_signing_alg_values_supported:array(string$2()).optional(),dpop_bound_access_tokens_required:boolean$1().optional()}),OAuthMetadataSchema=looseObject({issuer:string$2(),authorization_endpoint:SafeUrlSchema,token_endpoint:SafeUrlSchema,registration_endpoint:SafeUrlSchema.
optional(),scopes_supported:array(string$2()).optional(),response_types_supported:array(string$2()),response_modes_supported:array(string$2()).optional(),grant_types_supported:array(string$2()).optional(),token_endpoint_auth_methods_supported:array(string$2()).optional(),token_endpoint_auth_signing_alg_values_supported:array(string$2()).optional(),service_documentation:SafeUrlSchema.optional(),revocation_endpoint:SafeUrlSchema.optional(),revocation_endpoint_auth_methods_supported:array(string$2()).
optional(),revocation_endpoint_auth_signing_alg_values_supported:array(string$2()).optional(),introspection_endpoint:string$2().optional(),introspection_endpoint_auth_methods_supported:array(string$2()).optional(),introspection_endpoint_auth_signing_alg_values_supported:array(string$2()).optional(),code_challenge_methods_supported:array(string$2()).optional(),client_id_metadata_document_supported:boolean$1().optional()}),OpenIdProviderMetadataSchema=looseObject({issuer:string$2(),authorization_endpoint:SafeUrlSchema,
token_endpoint:SafeUrlSchema,userinfo_endpoint:SafeUrlSchema.optional(),jwks_uri:SafeUrlSchema,registration_endpoint:SafeUrlSchema.optional(),scopes_supported:array(string$2()).optional(),response_types_supported:array(string$2()),response_modes_supported:array(string$2()).optional(),grant_types_supported:array(string$2()).optional(),acr_values_supported:array(string$2()).optional(),subject_types_supported:array(string$2()),id_token_signing_alg_values_supported:array(string$2()),id_token_encryption_alg_values_supported:array(
string$2()).optional(),id_token_encryption_enc_values_supported:array(string$2()).optional(),userinfo_signing_alg_values_supported:array(string$2()).optional(),userinfo_encryption_alg_values_supported:array(string$2()).optional(),userinfo_encryption_enc_values_supported:array(string$2()).optional(),request_object_signing_alg_values_supported:array(string$2()).optional(),request_object_encryption_alg_values_supported:array(string$2()).optional(),request_object_encryption_enc_values_supported:array(
string$2()).optional(),token_endpoint_auth_methods_supported:array(string$2()).optional(),token_endpoint_auth_signing_alg_values_supported:array(string$2()).optional(),display_values_supported:array(string$2()).optional(),claim_types_supported:array(string$2()).optional(),claims_supported:array(string$2()).optional(),service_documentation:string$2().optional(),claims_locales_supported:array(string$2()).optional(),ui_locales_supported:array(string$2()).optional(),claims_parameter_supported:boolean$1().
optional(),request_parameter_supported:boolean$1().optional(),request_uri_parameter_supported:boolean$1().optional(),require_request_uri_registration:boolean$1().optional(),op_policy_uri:SafeUrlSchema.optional(),op_tos_uri:SafeUrlSchema.optional(),client_id_metadata_document_supported:boolean$1().optional()}),OpenIdProviderDiscoveryMetadataSchema=object({...OpenIdProviderMetadataSchema.shape,...OAuthMetadataSchema.pick({code_challenge_methods_supported:!0}).shape}),OAuthTokensSchema=object({access_token:string$2(),
id_token:string$2().optional(),token_type:string$2(),expires_in:number$1().optional(),scope:string$2().optional(),refresh_token:string$2().optional()}).strip(),OAuthErrorResponseSchema=object({error:string$2(),error_description:string$2().optional(),error_uri:string$2().optional()}),OptionalSafeUrlSchema=SafeUrlSchema.optional().or(literal("").transform(()=>{})),OAuthClientMetadataSchema=object({redirect_uris:array(SafeUrlSchema),token_endpoint_auth_method:string$2().optional(),grant_types:array(
string$2()).optional(),response_types:array(string$2()).optional(),client_name:string$2().optional(),client_uri:SafeUrlSchema.optional(),logo_uri:OptionalSafeUrlSchema,scope:string$2().optional(),contacts:array(string$2()).optional(),tos_uri:OptionalSafeUrlSchema,policy_uri:string$2().optional(),jwks_uri:SafeUrlSchema.optional(),jwks:any().optional(),software_id:string$2().optional(),software_version:string$2().optional(),software_statement:string$2().optional()}).strip(),OAuthClientInformationSchema=object(
{client_id:string$2(),client_secret:string$2().optional(),client_id_issued_at:number$2().optional(),client_secret_expires_at:number$2().optional()}).strip(),OAuthClientInformationFullSchema=OAuthClientMetadataSchema.merge(OAuthClientInformationSchema);object({error:string$2(),error_description:string$2().optional()}).strip();object({token:string$2(),token_type_hint:string$2().optional()}).strip();function resourceUrlFromServerUrl(url2){const resourceURL=typeof url2=="string"?new URL(url2):new URL(
url2.href);return resourceURL.hash="",resourceURL}function checkResourceAllowed({requestedResource,configuredResource}){const requested=typeof requestedResource=="string"?new URL(requestedResource):new URL(requestedResource.href),configured=typeof configuredResource=="string"?new URL(configuredResource):new URL(configuredResource.href);if(requested.origin!==configured.origin||requested.pathname.length<configured.pathname.length)return!1;const requestedPath=requested.pathname.endsWith("/")?requested.
pathname:requested.pathname+"/",configuredPath=configured.pathname.endsWith("/")?configured.pathname:configured.pathname+"/";return requestedPath.startsWith(configuredPath)}class OAuthError extends Error{constructor(message,errorUri){super(message),this.errorUri=errorUri,this.name=this.constructor.name}toResponseObject(){const response={error:this.errorCode,error_description:this.message};return this.errorUri&&(response.error_uri=this.errorUri),response}get errorCode(){return this.constructor.errorCode}}
class InvalidRequestError extends OAuthError{}InvalidRequestError.errorCode="invalid_request";class InvalidClientError extends OAuthError{}InvalidClientError.errorCode="invalid_client";class InvalidGrantError extends OAuthError{}InvalidGrantError.errorCode="invalid_grant";class UnauthorizedClientError extends OAuthError{}UnauthorizedClientError.errorCode="unauthorized_client";class UnsupportedGrantTypeError extends OAuthError{}UnsupportedGrantTypeError.errorCode="unsupported_grant_type";class InvalidScopeError extends OAuthError{}
InvalidScopeError.errorCode="invalid_scope";class AccessDeniedError extends OAuthError{}AccessDeniedError.errorCode="access_denied";class ServerError extends OAuthError{}ServerError.errorCode="server_error";class TemporarilyUnavailableError extends OAuthError{}TemporarilyUnavailableError.errorCode="temporarily_unavailable";class UnsupportedResponseTypeError extends OAuthError{}UnsupportedResponseTypeError.errorCode="unsupported_response_type";class UnsupportedTokenTypeError extends OAuthError{}UnsupportedTokenTypeError.
errorCode="unsupported_token_type";class InvalidTokenError extends OAuthError{}InvalidTokenError.errorCode="invalid_token";class MethodNotAllowedError extends OAuthError{}MethodNotAllowedError.errorCode="method_not_allowed";class TooManyRequestsError extends OAuthError{}TooManyRequestsError.errorCode="too_many_requests";class InvalidClientMetadataError extends OAuthError{}InvalidClientMetadataError.errorCode="invalid_client_metadata";class InsufficientScopeError extends OAuthError{}InsufficientScopeError.
errorCode="insufficient_scope";class InvalidTargetError extends OAuthError{}InvalidTargetError.errorCode="invalid_target";const OAUTH_ERRORS={[InvalidRequestError.errorCode]:InvalidRequestError,[InvalidClientError.errorCode]:InvalidClientError,[InvalidGrantError.errorCode]:InvalidGrantError,[UnauthorizedClientError.errorCode]:UnauthorizedClientError,[UnsupportedGrantTypeError.errorCode]:UnsupportedGrantTypeError,[InvalidScopeError.errorCode]:InvalidScopeError,[AccessDeniedError.errorCode]:AccessDeniedError,
[ServerError.errorCode]:ServerError,[TemporarilyUnavailableError.errorCode]:TemporarilyUnavailableError,[UnsupportedResponseTypeError.errorCode]:UnsupportedResponseTypeError,[UnsupportedTokenTypeError.errorCode]:UnsupportedTokenTypeError,[InvalidTokenError.errorCode]:InvalidTokenError,[MethodNotAllowedError.errorCode]:MethodNotAllowedError,[TooManyRequestsError.errorCode]:TooManyRequestsError,[InvalidClientMetadataError.errorCode]:InvalidClientMetadataError,[InsufficientScopeError.errorCode]:InsufficientScopeError,
[InvalidTargetError.errorCode]:InvalidTargetError};class UnauthorizedError extends Error{constructor(message){super(message??"Unauthorized")}}function isClientAuthMethod(method){return["client_secret_basic","client_secret_post","none"].includes(method)}const AUTHORIZATION_CODE_RESPONSE_TYPE="code",AUTHORIZATION_CODE_CHALLENGE_METHOD="S256";function selectClientAuthMethod(clientInformation,supportedMethods){const hasClientSecret=clientInformation.client_secret!==void 0;return supportedMethods.length===
0?hasClientSecret?"client_secret_post":"none":"token_endpoint_auth_method"in clientInformation&&clientInformation.token_endpoint_auth_method&&isClientAuthMethod(clientInformation.token_endpoint_auth_method)&&supportedMethods.includes(clientInformation.token_endpoint_auth_method)?clientInformation.token_endpoint_auth_method:hasClientSecret&&supportedMethods.includes("client_secret_basic")?"client_secret_basic":hasClientSecret&&supportedMethods.includes("client_secret_post")?"client_secret_post":supportedMethods.
includes("none")?"none":hasClientSecret?"client_secret_post":"none"}function applyClientAuthentication(method,clientInformation,headers,params){const{client_id,client_secret}=clientInformation;switch(method){case"client_secret_basic":applyBasicAuth(client_id,client_secret,headers);return;case"client_secret_post":applyPostAuth(client_id,client_secret,params);return;case"none":applyPublicAuth(client_id,params);return;default:throw new Error(`Unsupported client authentication method: ${method}`)}}function applyBasicAuth(clientId,clientSecret,headers){
if(!clientSecret)throw new Error("client_secret_basic authentication requires a client_secret");const credentials=btoa(`${clientId}:${clientSecret}`);headers.set("Authorization",`Basic ${credentials}`)}function applyPostAuth(clientId,clientSecret,params){params.set("client_id",clientId),clientSecret&&params.set("client_secret",clientSecret)}function applyPublicAuth(clientId,params){params.set("client_id",clientId)}async function parseErrorResponse(input){const statusCode=input instanceof Response?
input.status:void 0,body2=input instanceof Response?await input.text():input;try{const result=OAuthErrorResponseSchema.parse(JSON.parse(body2)),{error:error2,error_description,error_uri}=result,errorClass=OAUTH_ERRORS[error2]||ServerError;return new errorClass(error_description||"",error_uri)}catch(error2){const errorMessage=`${statusCode?`HTTP ${statusCode}: `:""}Invalid OAuth error response: ${error2}. Raw body: ${body2}`;return new ServerError(errorMessage)}}async function auth(provider,options){
try{return await authInternal(provider,options)}catch(error2){if(error2 instanceof InvalidClientError||error2 instanceof UnauthorizedClientError)return await provider.invalidateCredentials?.("all"),await authInternal(provider,options);if(error2 instanceof InvalidGrantError)return await provider.invalidateCredentials?.("tokens"),await authInternal(provider,options);throw error2}}async function authInternal(provider,{serverUrl,authorizationCode,scope:scope2,resourceMetadataUrl,fetchFn}){let resourceMetadata,
authorizationServerUrl;try{resourceMetadata=await discoverOAuthProtectedResourceMetadata(serverUrl,{resourceMetadataUrl},fetchFn),resourceMetadata.authorization_servers&&resourceMetadata.authorization_servers.length>0&&(authorizationServerUrl=resourceMetadata.authorization_servers[0])}catch{}authorizationServerUrl||(authorizationServerUrl=new URL("/",serverUrl));const resource=await selectResourceURL(serverUrl,provider,resourceMetadata),metadata2=await discoverAuthorizationServerMetadata(authorizationServerUrl,
{fetchFn});let clientInformation=await Promise.resolve(provider.clientInformation());if(!clientInformation){if(authorizationCode!==void 0)throw new Error("Existing OAuth client information is required when exchanging an authorization code");const supportsUrlBasedClientId=metadata2?.client_id_metadata_document_supported===!0,clientMetadataUrl=provider.clientMetadataUrl;if(clientMetadataUrl&&!isHttpsUrl(clientMetadataUrl))throw new InvalidClientMetadataError(`clientMetadataUrl must be a valid HTTP\
S URL with a non-root pathname, got: ${clientMetadataUrl}`);if(supportsUrlBasedClientId&&clientMetadataUrl)clientInformation={client_id:clientMetadataUrl},await provider.saveClientInformation?.(clientInformation);else{if(!provider.saveClientInformation)throw new Error("OAuth client information must be saveable for dynamic registration");const fullInformation=await registerClient(authorizationServerUrl,{metadata:metadata2,clientMetadata:provider.clientMetadata,fetchFn});await provider.saveClientInformation(
fullInformation),clientInformation=fullInformation}}const nonInteractiveFlow=!provider.redirectUrl;if(authorizationCode!==void 0||nonInteractiveFlow){const tokens2=await fetchToken(provider,authorizationServerUrl,{metadata:metadata2,resource,authorizationCode,fetchFn});return await provider.saveTokens(tokens2),"AUTHORIZED"}const tokens=await provider.tokens();if(tokens?.refresh_token)try{const newTokens=await refreshAuthorization(authorizationServerUrl,{metadata:metadata2,clientInformation,refreshToken:tokens.
refresh_token,resource,addClientAuthentication:provider.addClientAuthentication,fetchFn});return await provider.saveTokens(newTokens),"AUTHORIZED"}catch(error2){if(!(!(error2 instanceof OAuthError)||error2 instanceof ServerError))throw error2}const state2=provider.state?await provider.state():void 0,{authorizationUrl,codeVerifier}=await startAuthorization(authorizationServerUrl,{metadata:metadata2,clientInformation,state:state2,redirectUrl:provider.redirectUrl,scope:scope2||resourceMetadata?.scopes_supported?.
join(" ")||provider.clientMetadata.scope,resource});return await provider.saveCodeVerifier(codeVerifier),await provider.redirectToAuthorization(authorizationUrl),"REDIRECT"}function isHttpsUrl(value){if(!value)return!1;try{const url2=new URL(value);return url2.protocol==="https:"&&url2.pathname!=="/"}catch{return!1}}async function selectResourceURL(serverUrl,provider,resourceMetadata){const defaultResource=resourceUrlFromServerUrl(serverUrl);if(provider.validateResourceURL)return await provider.
validateResourceURL(defaultResource,resourceMetadata?.resource);if(resourceMetadata){if(!checkResourceAllowed({requestedResource:defaultResource,configuredResource:resourceMetadata.resource}))throw new Error(`Protected resource ${resourceMetadata.resource} does not match expected ${defaultResource} (or origin)`);return new URL(resourceMetadata.resource)}}function extractWWWAuthenticateParams(res){const authenticateHeader=res.headers.get("WWW-Authenticate");if(!authenticateHeader)return{};const[type2,
scheme2]=authenticateHeader.split(" ");if(type2.toLowerCase()!=="bearer"||!scheme2)return{};const resourceMetadataMatch=extractFieldFromWwwAuth(res,"resource_metadata")||void 0;let resourceMetadataUrl;if(resourceMetadataMatch)try{resourceMetadataUrl=new URL(resourceMetadataMatch)}catch{}const scope2=extractFieldFromWwwAuth(res,"scope")||void 0,error2=extractFieldFromWwwAuth(res,"error")||void 0;return{resourceMetadataUrl,scope:scope2,error:error2}}function extractFieldFromWwwAuth(response,fieldName){
const wwwAuthHeader=response.headers.get("WWW-Authenticate");if(!wwwAuthHeader)return null;const pattern2=new RegExp(`${fieldName}=(?:"([^"]+)"|([^\\s,]+))`),match=wwwAuthHeader.match(pattern2);return match?match[1]||match[2]:null}async function discoverOAuthProtectedResourceMetadata(serverUrl,opts,fetchFn=fetch){const response=await discoverMetadataWithFallback(serverUrl,"oauth-protected-resource",fetchFn,{protocolVersion:opts?.protocolVersion,metadataUrl:opts?.resourceMetadataUrl});if(!response||
response.status===404)throw await response?.body?.cancel(),new Error("Resource server does not implement OAuth 2.0 Protected Resource Metadata.");if(!response.ok)throw await response.body?.cancel(),new Error(`HTTP ${response.status} trying to load well-known OAuth protected resource metadata.`);return OAuthProtectedResourceMetadataSchema.parse(await response.json())}async function fetchWithCorsRetry(url2,headers,fetchFn=fetch){try{return await fetchFn(url2,{headers})}catch(error2){if(error2 instanceof
TypeError)return headers?fetchWithCorsRetry(url2,void 0,fetchFn):void 0;throw error2}}function buildWellKnownPath(wellKnownPrefix,pathname="",options={}){return pathname.endsWith("/")&&(pathname=pathname.slice(0,-1)),options.prependPathname?`${pathname}/.well-known/${wellKnownPrefix}`:`/.well-known/${wellKnownPrefix}${pathname}`}async function tryMetadataDiscovery(url2,protocolVersion,fetchFn=fetch){return await fetchWithCorsRetry(url2,{"MCP-Protocol-Version":protocolVersion},fetchFn)}function shouldAttemptFallback(response,pathname){
return!response||response.status>=400&&response.status<500&&pathname!=="/"}async function discoverMetadataWithFallback(serverUrl,wellKnownType,fetchFn,opts){const issuer=new URL(serverUrl),protocolVersion=opts?.protocolVersion??LATEST_PROTOCOL_VERSION;let url2;if(opts?.metadataUrl)url2=new URL(opts.metadataUrl);else{const wellKnownPath=buildWellKnownPath(wellKnownType,issuer.pathname);url2=new URL(wellKnownPath,opts?.metadataServerUrl??issuer),url2.search=issuer.search}let response=await tryMetadataDiscovery(
url2,protocolVersion,fetchFn);if(!opts?.metadataUrl&&shouldAttemptFallback(response,issuer.pathname)){const rootUrl=new URL(`/.well-known/${wellKnownType}`,issuer);response=await tryMetadataDiscovery(rootUrl,protocolVersion,fetchFn)}return response}function buildDiscoveryUrls(authorizationServerUrl){const url2=typeof authorizationServerUrl=="string"?new URL(authorizationServerUrl):authorizationServerUrl,hasPath=url2.pathname!=="/",urlsToTry=[];if(!hasPath)return urlsToTry.push({url:new URL("/.we\
ll-known/oauth-authorization-server",url2.origin),type:"oauth"}),urlsToTry.push({url:new URL("/.well-known/openid-configuration",url2.origin),type:"oidc"}),urlsToTry;let pathname=url2.pathname;return pathname.endsWith("/")&&(pathname=pathname.slice(0,-1)),urlsToTry.push({url:new URL(`/.well-known/oauth-authorization-server${pathname}`,url2.origin),type:"oauth"}),urlsToTry.push({url:new URL(`/.well-known/openid-configuration${pathname}`,url2.origin),type:"oidc"}),urlsToTry.push({url:new URL(`${pathname}\
/.well-known/openid-configuration`,url2.origin),type:"oidc"}),urlsToTry}async function discoverAuthorizationServerMetadata(authorizationServerUrl,{fetchFn=fetch,protocolVersion=LATEST_PROTOCOL_VERSION}={}){const headers={"MCP-Protocol-Version":protocolVersion,Accept:"application/json"},urlsToTry=buildDiscoveryUrls(authorizationServerUrl);for(const{url:endpointUrl,type:type2}of urlsToTry){const response=await fetchWithCorsRetry(endpointUrl,headers,fetchFn);if(response){if(!response.ok){if(await response.
body?.cancel(),response.status>=400&&response.status<500)continue;throw new Error(`HTTP ${response.status} trying to load ${type2==="oauth"?"OAuth":"OpenID provider"} metadata from ${endpointUrl}`)}return type2==="oauth"?OAuthMetadataSchema.parse(await response.json()):OpenIdProviderDiscoveryMetadataSchema.parse(await response.json())}}}async function startAuthorization(authorizationServerUrl,{metadata:metadata2,clientInformation,redirectUrl,scope:scope2,state:state2,resource}){let authorizationUrl;
if(metadata2){if(authorizationUrl=new URL(metadata2.authorization_endpoint),!metadata2.response_types_supported.includes(AUTHORIZATION_CODE_RESPONSE_TYPE))throw new Error(`Incompatible auth server: does not support response type ${AUTHORIZATION_CODE_RESPONSE_TYPE}`);if(metadata2.code_challenge_methods_supported&&!metadata2.code_challenge_methods_supported.includes(AUTHORIZATION_CODE_CHALLENGE_METHOD))throw new Error(`Incompatible auth server: does not support code challenge method ${AUTHORIZATION_CODE_CHALLENGE_METHOD}`)}else
authorizationUrl=new URL("/authorize",authorizationServerUrl);const challenge=await pkceChallenge(),codeVerifier=challenge.code_verifier,codeChallenge=challenge.code_challenge;return authorizationUrl.searchParams.set("response_type",AUTHORIZATION_CODE_RESPONSE_TYPE),authorizationUrl.searchParams.set("client_id",clientInformation.client_id),authorizationUrl.searchParams.set("code_challenge",codeChallenge),authorizationUrl.searchParams.set("code_challenge_method",AUTHORIZATION_CODE_CHALLENGE_METHOD),
authorizationUrl.searchParams.set("redirect_uri",String(redirectUrl)),state2&&authorizationUrl.searchParams.set("state",state2),scope2&&authorizationUrl.searchParams.set("scope",scope2),scope2?.includes("offline_access")&&authorizationUrl.searchParams.append("prompt","consent"),resource&&authorizationUrl.searchParams.set("resource",resource.href),{authorizationUrl,codeVerifier}}function prepareAuthorizationCodeRequest(authorizationCode,codeVerifier,redirectUri){return new URLSearchParams({grant_type:"\
authorization_code",code:authorizationCode,code_verifier:codeVerifier,redirect_uri:String(redirectUri)})}async function executeTokenRequest(authorizationServerUrl,{metadata:metadata2,tokenRequestParams,clientInformation,addClientAuthentication,resource,fetchFn}){const tokenUrl=metadata2?.token_endpoint?new URL(metadata2.token_endpoint):new URL("/token",authorizationServerUrl),headers=new Headers({"Content-Type":"application/x-www-form-urlencoded",Accept:"application/json"});if(resource&&tokenRequestParams.
set("resource",resource.href),addClientAuthentication)await addClientAuthentication(headers,tokenRequestParams,tokenUrl,metadata2);else if(clientInformation){const supportedMethods=metadata2?.token_endpoint_auth_methods_supported??[],authMethod=selectClientAuthMethod(clientInformation,supportedMethods);applyClientAuthentication(authMethod,clientInformation,headers,tokenRequestParams)}const response=await(fetchFn??fetch)(tokenUrl,{method:"POST",headers,body:tokenRequestParams});if(!response.ok)throw await parseErrorResponse(
response);return OAuthTokensSchema.parse(await response.json())}async function refreshAuthorization(authorizationServerUrl,{metadata:metadata2,clientInformation,refreshToken,resource,addClientAuthentication,fetchFn}){const tokenRequestParams=new URLSearchParams({grant_type:"refresh_token",refresh_token:refreshToken}),tokens=await executeTokenRequest(authorizationServerUrl,{metadata:metadata2,tokenRequestParams,clientInformation,addClientAuthentication,resource,fetchFn});return{refresh_token:refreshToken,
...tokens}}async function fetchToken(provider,authorizationServerUrl,{metadata:metadata2,resource,authorizationCode,fetchFn}={}){const scope2=provider.clientMetadata.scope;let tokenRequestParams;if(provider.prepareTokenRequest&&(tokenRequestParams=await provider.prepareTokenRequest(scope2)),!tokenRequestParams){if(!authorizationCode)throw new Error("Either provider.prepareTokenRequest() or authorizationCode is required");if(!provider.redirectUrl)throw new Error("redirectUrl is required for autho\
rization_code flow");const codeVerifier=await provider.codeVerifier();tokenRequestParams=prepareAuthorizationCodeRequest(authorizationCode,codeVerifier,provider.redirectUrl)}const clientInformation=await provider.clientInformation();return executeTokenRequest(authorizationServerUrl,{metadata:metadata2,tokenRequestParams,clientInformation:clientInformation??void 0,addClientAuthentication:provider.addClientAuthentication,resource,fetchFn})}async function registerClient(authorizationServerUrl,{metadata:metadata2,
clientMetadata,fetchFn}){let registrationUrl;if(metadata2){if(!metadata2.registration_endpoint)throw new Error("Incompatible auth server: does not support dynamic client registration");registrationUrl=new URL(metadata2.registration_endpoint)}else registrationUrl=new URL("/register",authorizationServerUrl);const response=await(fetchFn??fetch)(registrationUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(clientMetadata)});if(!response.ok)throw await parseErrorResponse(
response);return OAuthClientInformationFullSchema.parse(await response.json())}let ParseError$1=class extends Error{constructor(message,options){super(message),this.name="ParseError",this.type=options.type,this.field=options.field,this.value=options.value,this.line=options.line}};function noop(_arg){}function createParser(callbacks){if(typeof callbacks=="function")throw new TypeError("`callbacks` must be an object, got a function instead. Did you mean `{onEvent: fn}`?");const{onEvent=noop,onError=noop,
onRetry=noop,onComment}=callbacks;let incompleteLine="",isFirstChunk=!0,id2,data="",eventType="";function feed(newChunk){const chunk=isFirstChunk?newChunk.replace(/^\xEF\xBB\xBF/,""):newChunk,[complete,incomplete]=splitLines(`${incompleteLine}${chunk}`);for(const line of complete)parseLine(line);incompleteLine=incomplete,isFirstChunk=!1}function parseLine(line){if(line===""){dispatchEvent2();return}if(line.startsWith(":")){onComment&&onComment(line.slice(line.startsWith(": ")?2:1));return}const fieldSeparatorIndex=line.
indexOf(":");if(fieldSeparatorIndex!==-1){const field=line.slice(0,fieldSeparatorIndex),offset2=line[fieldSeparatorIndex+1]===" "?2:1,value=line.slice(fieldSeparatorIndex+offset2);processField(field,value,line);return}processField(line,"",line)}function processField(field,value,line){switch(field){case"event":eventType=value;break;case"data":data=`${data}${value}
`;break;case"id":id2=value.includes("\0")?void 0:value;break;case"retry":/^\d+$/.test(value)?onRetry(parseInt(value,10)):onError(new ParseError$1(`Invalid \`retry\` value: "${value}"`,{type:"invalid-retry",value,line}));break;default:onError(new ParseError$1(`Unknown field "${field.length>20?`${field.slice(0,20)}…`:field}"`,{type:"unknown-field",field,value,line}));break}}function dispatchEvent2(){data.length>0&&onEvent({id:id2,event:eventType||void 0,data:data.endsWith(`
`)?data.slice(0,-1):data}),id2=void 0,data="",eventType=""}function reset2(options={}){incompleteLine&&options.consume&&parseLine(incompleteLine),isFirstChunk=!0,id2=void 0,data="",eventType="",incompleteLine=""}return{feed,reset:reset2}}function splitLines(chunk){const lines=[];let incompleteLine="",searchIndex=0;for(;searchIndex<chunk.length;){const crIndex=chunk.indexOf("\r",searchIndex),lfIndex=chunk.indexOf(`
`,searchIndex);let lineEnd=-1;if(crIndex!==-1&&lfIndex!==-1?lineEnd=Math.min(crIndex,lfIndex):crIndex!==-1?crIndex===chunk.length-1?lineEnd=-1:lineEnd=crIndex:lfIndex!==-1&&(lineEnd=lfIndex),lineEnd===-1){incompleteLine=chunk.slice(searchIndex);break}else{const line=chunk.slice(searchIndex,lineEnd);lines.push(line),searchIndex=lineEnd+1,chunk[searchIndex-1]==="\r"&&chunk[searchIndex]===`
`&&searchIndex++}}return[lines,incompleteLine]}class EventSourceParserStream extends TransformStream{constructor({onError,onRetry,onComment}={}){let parser;super({start(controller){parser=createParser({onEvent:event2=>{controller.enqueue(event2)},onError(error2){onError==="terminate"?controller.error(error2):typeof onError=="function"&&onError(error2)},onRetry,onComment})},transform(chunk){parser.feed(chunk)}})}}const DEFAULT_STREAMABLE_HTTP_RECONNECTION_OPTIONS={initialReconnectionDelay:1e3,maxReconnectionDelay:3e4,
reconnectionDelayGrowFactor:1.5,maxRetries:2};class StreamableHTTPError extends Error{constructor(code2,message){super(`Streamable HTTP error: ${message}`),this.code=code2}}class StreamableHTTPClientTransport{constructor(url2,opts){this._hasCompletedAuthFlow=!1,this._url=url2,this._resourceMetadataUrl=void 0,this._scope=void 0,this._requestInit=opts?.requestInit,this._authProvider=opts?.authProvider,this._fetch=opts?.fetch,this._fetchWithInit=createFetchWithInit(opts?.fetch,opts?.requestInit),this.
_sessionId=opts?.sessionId,this._reconnectionOptions=opts?.reconnectionOptions??DEFAULT_STREAMABLE_HTTP_RECONNECTION_OPTIONS}async _authThenStart(){if(!this._authProvider)throw new UnauthorizedError("No auth provider");let result;try{result=await auth(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})}catch(error2){throw this.onerror?.(error2),error2}if(result!=="AUTHORIZED")throw new UnauthorizedError;return await this.
_startOrAuthSse({resumptionToken:void 0})}async _commonHeaders(){const headers={};if(this._authProvider){const tokens=await this._authProvider.tokens();tokens&&(headers.Authorization=`Bearer ${tokens.access_token}`)}this._sessionId&&(headers["mcp-session-id"]=this._sessionId),this._protocolVersion&&(headers["mcp-protocol-version"]=this._protocolVersion);const extraHeaders=normalizeHeaders(this._requestInit?.headers);return new Headers({...headers,...extraHeaders})}async _startOrAuthSse(options){
const{resumptionToken}=options;try{const headers=await this._commonHeaders();headers.set("Accept","text/event-stream"),resumptionToken&&headers.set("last-event-id",resumptionToken);const response=await(this._fetch??fetch)(this._url,{method:"GET",headers,signal:this._abortController?.signal});if(!response.ok){if(await response.body?.cancel(),response.status===401&&this._authProvider)return await this._authThenStart();if(response.status===405)return;throw new StreamableHTTPError(response.status,`F\
ailed to open SSE stream: ${response.statusText}`)}this._handleSseStream(response.body,options,!0)}catch(error2){throw this.onerror?.(error2),error2}}_getNextReconnectionDelay(attempt){if(this._serverRetryMs!==void 0)return this._serverRetryMs;const initialDelay=this._reconnectionOptions.initialReconnectionDelay,growFactor=this._reconnectionOptions.reconnectionDelayGrowFactor,maxDelay=this._reconnectionOptions.maxReconnectionDelay;return Math.min(initialDelay*Math.pow(growFactor,attempt),maxDelay)}_scheduleReconnection(options,attemptCount=0){
const maxRetries=this._reconnectionOptions.maxRetries;if(attemptCount>=maxRetries){this.onerror?.(new Error(`Maximum reconnection attempts (${maxRetries}) exceeded.`));return}const delay=this._getNextReconnectionDelay(attemptCount);this._reconnectionTimeout=setTimeout(()=>{this._startOrAuthSse(options).catch(error2=>{this.onerror?.(new Error(`Failed to reconnect SSE stream: ${error2 instanceof Error?error2.message:String(error2)}`)),this._scheduleReconnection(options,attemptCount+1)})},delay)}_handleSseStream(stream,options,isReconnectable){
if(!stream)return;const{onresumptiontoken,replayMessageId}=options;let lastEventId,hasPrimingEvent=!1,receivedResponse=!1;(async()=>{try{const reader=stream.pipeThrough(new TextDecoderStream).pipeThrough(new EventSourceParserStream({onRetry:retryMs=>{this._serverRetryMs=retryMs}})).getReader();for(;;){const{value:event2,done}=await reader.read();if(done)break;if(event2.id&&(lastEventId=event2.id,hasPrimingEvent=!0,onresumptiontoken?.(event2.id)),!!event2.data&&(!event2.event||event2.event==="mes\
sage"))try{const message=JSONRPCMessageSchema.parse(JSON.parse(event2.data));isJSONRPCResultResponse(message)&&(receivedResponse=!0,replayMessageId!==void 0&&(message.id=replayMessageId)),this.onmessage?.(message)}catch(error2){this.onerror?.(error2)}}(isReconnectable||hasPrimingEvent)&&!receivedResponse&&this._abortController&&!this._abortController.signal.aborted&&this._scheduleReconnection({resumptionToken:lastEventId,onresumptiontoken,replayMessageId},0)}catch(error2){if(this.onerror?.(new Error(
`SSE stream disconnected: ${error2}`)),(isReconnectable||hasPrimingEvent)&&!receivedResponse&&this._abortController&&!this._abortController.signal.aborted)try{this._scheduleReconnection({resumptionToken:lastEventId,onresumptiontoken,replayMessageId},0)}catch(error3){this.onerror?.(new Error(`Failed to reconnect: ${error3 instanceof Error?error3.message:String(error3)}`))}}})()}async start(){if(this._abortController)throw new Error("StreamableHTTPClientTransport already started! If using Client c\
lass, note that connect() calls start() automatically.");this._abortController=new AbortController}async finishAuth(authorizationCode){if(!this._authProvider)throw new UnauthorizedError("No auth provider");if(await auth(this._authProvider,{serverUrl:this._url,authorizationCode,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new UnauthorizedError("Failed to authorize")}async close(){this._reconnectionTimeout&&(clearTimeout(this._reconnectionTimeout),
this._reconnectionTimeout=void 0),this._abortController?.abort(),this.onclose?.()}async send(message,options){try{const{resumptionToken,onresumptiontoken}=options||{};if(resumptionToken){this._startOrAuthSse({resumptionToken,replayMessageId:isJSONRPCRequest(message)?message.id:void 0}).catch(err=>this.onerror?.(err));return}const headers=await this._commonHeaders();headers.set("content-type","application/json"),headers.set("accept","application/json, text/event-stream");const init2={...this._requestInit,
method:"POST",headers,body:JSON.stringify(message),signal:this._abortController?.signal},response=await(this._fetch??fetch)(this._url,init2),sessionId=response.headers.get("mcp-session-id");if(sessionId&&(this._sessionId=sessionId),!response.ok){const text2=await response.text().catch(()=>null);if(response.status===401&&this._authProvider){if(this._hasCompletedAuthFlow)throw new StreamableHTTPError(401,"Server returned 401 after successful authentication");const{resourceMetadataUrl,scope:scope2}=extractWWWAuthenticateParams(
response);if(this._resourceMetadataUrl=resourceMetadataUrl,this._scope=scope2,await auth(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new UnauthorizedError;return this._hasCompletedAuthFlow=!0,this.send(message)}if(response.status===403&&this._authProvider){const{resourceMetadataUrl,scope:scope2,error:error2}=extractWWWAuthenticateParams(response);if(error2==="insufficient_scope"){const wwwAuthHeader=response.
headers.get("WWW-Authenticate");if(this._lastUpscopingHeader===wwwAuthHeader)throw new StreamableHTTPError(403,"Server returned 403 after trying upscoping");if(scope2&&(this._scope=scope2),resourceMetadataUrl&&(this._resourceMetadataUrl=resourceMetadataUrl),this._lastUpscopingHeader=wwwAuthHeader??void 0,await auth(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetch})!=="AUTHORIZED")throw new UnauthorizedError;return this.send(
message)}}throw new StreamableHTTPError(response.status,`Error POSTing to endpoint: ${text2}`)}if(this._hasCompletedAuthFlow=!1,this._lastUpscopingHeader=void 0,response.status===202){await response.body?.cancel(),isInitializedNotification(message)&&this._startOrAuthSse({resumptionToken:void 0}).catch(err=>this.onerror?.(err));return}const hasRequests=(Array.isArray(message)?message:[message]).filter(msg=>"method"in msg&&"id"in msg&&msg.id!==void 0).length>0,contentType=response.headers.get("con\
tent-type");if(hasRequests)if(contentType?.includes("text/event-stream"))this._handleSseStream(response.body,{onresumptiontoken},!1);else if(contentType?.includes("application/json")){const data=await response.json(),responseMessages=Array.isArray(data)?data.map(msg=>JSONRPCMessageSchema.parse(msg)):[JSONRPCMessageSchema.parse(data)];for(const msg of responseMessages)this.onmessage?.(msg)}else throw await response.body?.cancel(),new StreamableHTTPError(-1,`Unexpected content type: ${contentType}`);else
await response.body?.cancel()}catch(error2){throw this.onerror?.(error2),error2}}get sessionId(){return this._sessionId}async terminateSession(){if(this._sessionId)try{const headers=await this._commonHeaders(),init2={...this._requestInit,method:"DELETE",headers,signal:this._abortController?.signal},response=await(this._fetch??fetch)(this._url,init2);if(await response.body?.cancel(),!response.ok&&response.status!==405)throw new StreamableHTTPError(response.status,`Failed to terminate session: ${response.
statusText}`);this._sessionId=void 0}catch(error2){throw this.onerror?.(error2),error2}}setProtocolVersion(version2){this._protocolVersion=version2}get protocolVersion(){return this._protocolVersion}async resumeStream(lastEventId,options){await this._startOrAuthSse({resumptionToken:lastEventId,onresumptiontoken:options?.onresumptiontoken})}}class ErrorEvent extends Event{constructor(type2,errorEventInitDict){var _a2,_b;super(type2),this.code=(_a2=errorEventInitDict?.code)!=null?_a2:void 0,this.message=
(_b=errorEventInitDict?.message)!=null?_b:void 0}[Symbol.for("nodejs.util.inspect.custom")](_depth,options,inspect){return inspect(inspectableError(this),options)}[Symbol.for("Deno.customInspect")](inspect,options){return inspect(inspectableError(this),options)}}function syntaxError(message){const DomException=globalThis.DOMException;return typeof DomException=="function"?new DomException(message,"SyntaxError"):new SyntaxError(message)}function flattenError(err){return err instanceof Error?"erro\
rs"in err&&Array.isArray(err.errors)?err.errors.map(flattenError).join(", "):"cause"in err&&err.cause instanceof Error?`${err}: ${flattenError(err.cause)}`:err.message:`${err}`}function inspectableError(err){return{type:err.type,message:err.message,code:err.code,defaultPrevented:err.defaultPrevented,cancelable:err.cancelable,timeStamp:err.timeStamp}}var __typeError2=msg=>{throw TypeError(msg)},__accessCheck2=(obj,member,msg)=>member.has(obj)||__typeError2("Cannot "+msg),__privateGet2=(obj,member,getter)=>(__accessCheck2(
obj,member,"read from private field"),getter?getter.call(obj):member.get(obj)),__privateAdd2=(obj,member,value)=>member.has(obj)?__typeError2("Cannot add the same private member more than once"):member instanceof WeakSet?member.add(obj):member.set(obj,value),__privateSet2=(obj,member,value,setter)=>(__accessCheck2(obj,member,"write to private field"),member.set(obj,value),value),__privateMethod2=(obj,member,method)=>(__accessCheck2(obj,member,"access private method"),method),_readyState,_url$1,_redirectUrl,
_withCredentials,_fetch,_reconnectInterval,_reconnectTimer,_lastEventId,_controller,_parser,_onError,_onMessage,_onOpen,_EventSource_instances,connect_fn,_onFetchResponse,_onFetchError,getRequestOptions_fn,_onEvent,_onRetryChange,failConnection_fn,scheduleReconnect_fn,_reconnect;class EventSource extends EventTarget{constructor(url2,eventSourceInitDict){var _a2,_b;super(),__privateAdd2(this,_EventSource_instances),this.CONNECTING=0,this.OPEN=1,this.CLOSED=2,__privateAdd2(this,_readyState),__privateAdd2(
this,_url$1),__privateAdd2(this,_redirectUrl),__privateAdd2(this,_withCredentials),__privateAdd2(this,_fetch),__privateAdd2(this,_reconnectInterval),__privateAdd2(this,_reconnectTimer),__privateAdd2(this,_lastEventId,null),__privateAdd2(this,_controller),__privateAdd2(this,_parser),__privateAdd2(this,_onError,null),__privateAdd2(this,_onMessage,null),__privateAdd2(this,_onOpen,null),__privateAdd2(this,_onFetchResponse,async response=>{var _a22;__privateGet2(this,_parser).reset();const{body:body2,
redirected,status,headers}=response;if(status===204){__privateMethod2(this,_EventSource_instances,failConnection_fn).call(this,"Server sent HTTP 204, not reconnecting",204),this.close();return}if(redirected?__privateSet2(this,_redirectUrl,new URL(response.url)):__privateSet2(this,_redirectUrl,void 0),status!==200){__privateMethod2(this,_EventSource_instances,failConnection_fn).call(this,`Non-200 status code (${status})`,status);return}if(!(headers.get("content-type")||"").startsWith("text/event-\
stream")){__privateMethod2(this,_EventSource_instances,failConnection_fn).call(this,'Invalid content type, expected "text/event-stream"',status);return}if(__privateGet2(this,_readyState)===this.CLOSED)return;__privateSet2(this,_readyState,this.OPEN);const openEvent=new Event("open");if((_a22=__privateGet2(this,_onOpen))==null||_a22.call(this,openEvent),this.dispatchEvent(openEvent),typeof body2!="object"||!body2||!("getReader"in body2)){__privateMethod2(this,_EventSource_instances,failConnection_fn).
call(this,"Invalid response body, expected a web ReadableStream",status),this.close();return}const decoder=new TextDecoder,reader=body2.getReader();let open2=!0;do{const{done,value}=await reader.read();value&&__privateGet2(this,_parser).feed(decoder.decode(value,{stream:!done})),done&&(open2=!1,__privateGet2(this,_parser).reset(),__privateMethod2(this,_EventSource_instances,scheduleReconnect_fn).call(this))}while(open2)}),__privateAdd2(this,_onFetchError,err=>{__privateSet2(this,_controller,void 0),
!(err.name==="AbortError"||err.type==="aborted")&&__privateMethod2(this,_EventSource_instances,scheduleReconnect_fn).call(this,flattenError(err))}),__privateAdd2(this,_onEvent,event2=>{typeof event2.id=="string"&&__privateSet2(this,_lastEventId,event2.id);const messageEvent=new MessageEvent(event2.event||"message",{data:event2.data,origin:__privateGet2(this,_redirectUrl)?__privateGet2(this,_redirectUrl).origin:__privateGet2(this,_url$1).origin,lastEventId:event2.id||""});__privateGet2(this,_onMessage)&&
(!event2.event||event2.event==="message")&&__privateGet2(this,_onMessage).call(this,messageEvent),this.dispatchEvent(messageEvent)}),__privateAdd2(this,_onRetryChange,value=>{__privateSet2(this,_reconnectInterval,value)}),__privateAdd2(this,_reconnect,()=>{__privateSet2(this,_reconnectTimer,void 0),__privateGet2(this,_readyState)===this.CONNECTING&&__privateMethod2(this,_EventSource_instances,connect_fn).call(this)});try{if(url2 instanceof URL)__privateSet2(this,_url$1,url2);else if(typeof url2==
"string")__privateSet2(this,_url$1,new URL(url2,getBaseURL()));else throw new Error("Invalid URL")}catch{throw syntaxError("An invalid or illegal string was specified")}__privateSet2(this,_parser,createParser({onEvent:__privateGet2(this,_onEvent),onRetry:__privateGet2(this,_onRetryChange)})),__privateSet2(this,_readyState,this.CONNECTING),__privateSet2(this,_reconnectInterval,3e3),__privateSet2(this,_fetch,(_a2=eventSourceInitDict?.fetch)!=null?_a2:globalThis.fetch),__privateSet2(this,_withCredentials,
(_b=eventSourceInitDict?.withCredentials)!=null?_b:!1),__privateMethod2(this,_EventSource_instances,connect_fn).call(this)}get readyState(){return __privateGet2(this,_readyState)}get url(){return __privateGet2(this,_url$1).href}get withCredentials(){return __privateGet2(this,_withCredentials)}get onerror(){return __privateGet2(this,_onError)}set onerror(value){__privateSet2(this,_onError,value)}get onmessage(){return __privateGet2(this,_onMessage)}set onmessage(value){__privateSet2(this,_onMessage,
value)}get onopen(){return __privateGet2(this,_onOpen)}set onopen(value){__privateSet2(this,_onOpen,value)}addEventListener(type2,listener,options){const listen2=listener;super.addEventListener(type2,listen2,options)}removeEventListener(type2,listener,options){const listen2=listener;super.removeEventListener(type2,listen2,options)}close(){__privateGet2(this,_reconnectTimer)&&clearTimeout(__privateGet2(this,_reconnectTimer)),__privateGet2(this,_readyState)!==this.CLOSED&&(__privateGet2(this,_controller)&&
__privateGet2(this,_controller).abort(),__privateSet2(this,_readyState,this.CLOSED),__privateSet2(this,_controller,void 0))}}_readyState=new WeakMap,_url$1=new WeakMap,_redirectUrl=new WeakMap,_withCredentials=new WeakMap,_fetch=new WeakMap,_reconnectInterval=new WeakMap,_reconnectTimer=new WeakMap,_lastEventId=new WeakMap,_controller=new WeakMap,_parser=new WeakMap,_onError=new WeakMap,_onMessage=new WeakMap,_onOpen=new WeakMap,_EventSource_instances=new WeakSet,connect_fn=function(){__privateSet2(
this,_readyState,this.CONNECTING),__privateSet2(this,_controller,new AbortController),__privateGet2(this,_fetch)(__privateGet2(this,_url$1),__privateMethod2(this,_EventSource_instances,getRequestOptions_fn).call(this)).then(__privateGet2(this,_onFetchResponse)).catch(__privateGet2(this,_onFetchError))},_onFetchResponse=new WeakMap,_onFetchError=new WeakMap,getRequestOptions_fn=function(){var _a2;const init2={mode:"cors",redirect:"follow",headers:{Accept:"text/event-stream",...__privateGet2(this,
_lastEventId)?{"Last-Event-ID":__privateGet2(this,_lastEventId)}:void 0},cache:"no-store",signal:(_a2=__privateGet2(this,_controller))==null?void 0:_a2.signal};return"window"in globalThis&&(init2.credentials=this.withCredentials?"include":"same-origin"),init2},_onEvent=new WeakMap,_onRetryChange=new WeakMap,failConnection_fn=function(message,code2){var _a2;__privateGet2(this,_readyState)!==this.CLOSED&&__privateSet2(this,_readyState,this.CLOSED);const errorEvent=new ErrorEvent("error",{code:code2,
message});(_a2=__privateGet2(this,_onError))==null||_a2.call(this,errorEvent),this.dispatchEvent(errorEvent)},scheduleReconnect_fn=function(message,code2){var _a2;if(__privateGet2(this,_readyState)===this.CLOSED)return;__privateSet2(this,_readyState,this.CONNECTING);const errorEvent=new ErrorEvent("error",{code:code2,message});(_a2=__privateGet2(this,_onError))==null||_a2.call(this,errorEvent),this.dispatchEvent(errorEvent),__privateSet2(this,_reconnectTimer,setTimeout(__privateGet2(this,_reconnect),
__privateGet2(this,_reconnectInterval)))},_reconnect=new WeakMap,EventSource.CONNECTING=0,EventSource.OPEN=1,EventSource.CLOSED=2;function getBaseURL(){const doc="document"in globalThis?globalThis.document:void 0;return doc&&typeof doc=="object"&&"baseURI"in doc&&typeof doc.baseURI=="string"?doc.baseURI:void 0}class SseError extends Error{constructor(code2,message,event2){super(`SSE error: ${message}`),this.code=code2,this.event=event2}}class SSEClientTransport{constructor(url2,opts){this._url=url2,
this._resourceMetadataUrl=void 0,this._scope=void 0,this._eventSourceInit=opts?.eventSourceInit,this._requestInit=opts?.requestInit,this._authProvider=opts?.authProvider,this._fetch=opts?.fetch,this._fetchWithInit=createFetchWithInit(opts?.fetch,opts?.requestInit)}async _authThenStart(){if(!this._authProvider)throw new UnauthorizedError("No auth provider");let result;try{result=await auth(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this.
_fetchWithInit})}catch(error2){throw this.onerror?.(error2),error2}if(result!=="AUTHORIZED")throw new UnauthorizedError;return await this._startOrAuth()}async _commonHeaders(){const headers={};if(this._authProvider){const tokens=await this._authProvider.tokens();tokens&&(headers.Authorization=`Bearer ${tokens.access_token}`)}this._protocolVersion&&(headers["mcp-protocol-version"]=this._protocolVersion);const extraHeaders=normalizeHeaders(this._requestInit?.headers);return new Headers({...headers,
...extraHeaders})}_startOrAuth(){const fetchImpl=this?._eventSourceInit?.fetch??this._fetch??fetch;return new Promise((resolve2,reject)=>{this._eventSource=new EventSource(this._url.href,{...this._eventSourceInit,fetch:async(url2,init2)=>{const headers=await this._commonHeaders();headers.set("Accept","text/event-stream");const response=await fetchImpl(url2,{...init2,headers});if(response.status===401&&response.headers.has("www-authenticate")){const{resourceMetadataUrl,scope:scope2}=extractWWWAuthenticateParams(
response);this._resourceMetadataUrl=resourceMetadataUrl,this._scope=scope2}return response}}),this._abortController=new AbortController,this._eventSource.onerror=event2=>{if(event2.code===401&&this._authProvider){this._authThenStart().then(resolve2,reject);return}const error2=new SseError(event2.code,event2.message,event2);reject(error2),this.onerror?.(error2)},this._eventSource.onopen=()=>{},this._eventSource.addEventListener("endpoint",event2=>{const messageEvent=event2;try{if(this._endpoint=new URL(
messageEvent.data,this._url),this._endpoint.origin!==this._url.origin)throw new Error(`Endpoint origin does not match connection origin: ${this._endpoint.origin}`)}catch(error2){reject(error2),this.onerror?.(error2),this.close();return}resolve2()}),this._eventSource.onmessage=event2=>{const messageEvent=event2;let message;try{message=JSONRPCMessageSchema.parse(JSON.parse(messageEvent.data))}catch(error2){this.onerror?.(error2);return}this.onmessage?.(message)}})}async start(){if(this._eventSource)
throw new Error("SSEClientTransport already started! If using Client class, note that connect() calls start() automatically.");return await this._startOrAuth()}async finishAuth(authorizationCode){if(!this._authProvider)throw new UnauthorizedError("No auth provider");if(await auth(this._authProvider,{serverUrl:this._url,authorizationCode,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new UnauthorizedError("Failed to authorize")}async close(){
this._abortController?.abort(),this._eventSource?.close(),this.onclose?.()}async send(message){if(!this._endpoint)throw new Error("Not connected");try{const headers=await this._commonHeaders();headers.set("content-type","application/json");const init2={...this._requestInit,method:"POST",headers,body:JSON.stringify(message),signal:this._abortController?.signal},response=await(this._fetch??fetch)(this._endpoint,init2);if(!response.ok){const text2=await response.text().catch(()=>null);if(response.status===
401&&this._authProvider){const{resourceMetadataUrl,scope:scope2}=extractWWWAuthenticateParams(response);if(this._resourceMetadataUrl=resourceMetadataUrl,this._scope=scope2,await auth(this._authProvider,{serverUrl:this._url,resourceMetadataUrl:this._resourceMetadataUrl,scope:this._scope,fetchFn:this._fetchWithInit})!=="AUTHORIZED")throw new UnauthorizedError;return this.send(message)}throw new Error(`Error POSTing to endpoint (HTTP ${response.status}): ${text2}`)}await response.body?.cancel()}catch(error2){
throw this.onerror?.(error2),error2}}setProtocolVersion(version2){this._protocolVersion=version2}}const SUBPROTOCOL="mcp";class WebSocketClientTransport{constructor(url2){this._url=url2}start(){if(this._socket)throw new Error("WebSocketClientTransport already started! If using Client class, note that connect() calls start() automatically.");return new Promise((resolve2,reject)=>{this._socket=new WebSocket(this._url,SUBPROTOCOL),this._socket.onerror=event2=>{const error2="error"in event2?event2.error:
new Error(`WebSocket error: ${JSON.stringify(event2)}`);reject(error2),this.onerror?.(error2)},this._socket.onopen=()=>{resolve2()},this._socket.onclose=()=>{this.onclose?.()},this._socket.onmessage=event2=>{let message;try{message=JSONRPCMessageSchema.parse(JSON.parse(event2.data))}catch(error2){this.onerror?.(error2);return}this.onmessage?.(message)}})}async close(){this._socket?.close()}send(message){return new Promise((resolve2,reject)=>{if(!this._socket){reject(new Error("Not connected"));return}
this._socket?.send(JSON.stringify(message)),resolve2()})}}class MCPService{static createLog(phase,message,level=MCPLogLevel.INFO,details){return{timestamp:new Date,phase,message,level,details}}static createDiagnosticRequestDetails(input,init2,baseInit,requestHeaders,extraRedactedHeaders){const body2=getRequestBody(input,init2),details={url:getRequestUrl(input),method:getRequestMethod(input,init2,baseInit).toUpperCase(),credentials:init2?.credentials??baseInit.credentials,mode:init2?.mode??baseInit.
mode,headers:sanitizeHeaders(requestHeaders,extraRedactedHeaders,MCP_PARTIAL_REDACT_HEADERS),body:summarizeRequestBody(body2)},jsonRpcMethods=extractJsonRpcMethods(body2);return jsonRpcMethods&&(details.jsonRpcMethods=jsonRpcMethods),details}static summarizeError(error2){return error2 instanceof Error?{name:error2.name,message:error2.message,cause:error2.cause instanceof Error?{name:error2.cause.name,message:error2.cause.message}:error2.cause,stack:error2.stack?.split(`
`).slice(0,6).join(`
`)}:{value:String(error2)}}static getBrowserContext(targetUrl,useProxy){if(!(typeof window>"u"))return{location:window.location.href,origin:window.location.origin,protocol:window.location.protocol,isSecureContext:window.isSecureContext,targetOrigin:targetUrl.origin,targetProtocol:targetUrl.protocol,sameOrigin:window.location.origin===targetUrl.origin,useProxy}}static getConnectionHints(targetUrl,config2,error2){const hints=[],message=error2 instanceof Error?error2.message:String(error2),headerNames=Object.
keys(config2.headers??{});return typeof window<"u"&&(window.location.protocol==="https:"&&targetUrl.protocol==="http:"&&!config2.useProxy&&hints.push("The page is running over HTTPS but the MCP server is HTTP. Browsers often block this as mixed content; enable the proxy or use HTTPS/WSS for the MCP server."),window.location.origin!==targetUrl.origin&&!config2.useProxy&&hints.push("This is a cross-origin browser request. If the server is reachable from curl or Node but not from the browser, missi\
ng CORS headers are the most likely cause.")),headerNames.length>0&&hints.push(`Custom request headers are configured (${headerNames.join(", ")}). That triggers a CORS preflight, so the server must allow OPTIONS and include the matching Access-Control-Allow-Headers response.`),config2.credentials&&config2.credentials!=="omit"&&hints.push("Credentials are enabled for this connection. Cross-origin credentialed requests need Access-Control-Allow-Credentials: true and cannot use a wildcard Access-Co\
ntrol-Allow-Origin."),message.includes("Failed to fetch")&&hints.push('"Failed to fetch" is a browser-level network failure. Common causes are CORS rejection, mixed-content blocking, certificate/TLS errors, DNS failures, or nothing listening on the target port.'),hints}static createDiagnosticFetch(serverName,config2,baseInit,targetUrl,useProxy,onLog){let enabled=!0;const logIfEnabled=log=>{enabled&&onLog?.(log)};return{fetch:async(input,init2)=>{const startedAt=performance.now(),requestHeaders=new Headers(
baseInit.headers);if(typeof Request<"u"&&input instanceof Request)for(const[key2,value]of input.headers.entries())requestHeaders.set(key2,value);if(init2?.headers)for(const[key2,value]of new Headers(init2.headers).entries())requestHeaders.set(key2,value);const request=this.createDiagnosticRequestDetails(input,init2,baseInit,requestHeaders,Object.keys(config2.headers??{})),{method,url:url2}=request;logIfEnabled(this.createLog(MCPConnectionPhase.INITIALIZING,`HTTP ${method} ${url2}`,MCPLogLevel.INFO,
{serverName,request}));try{const response=await fetch(input,{...baseInit,...init2,headers:requestHeaders}),durationMs=Math.round(performance.now()-startedAt);return logIfEnabled(this.createLog(MCPConnectionPhase.INITIALIZING,`HTTP ${response.status} ${method} ${url2} (${durationMs}ms)`,response.ok?MCPLogLevel.INFO:MCPLogLevel.WARN,{response:{url:url2,status:response.status,statusText:response.statusText,headers:sanitizeHeaders(response.headers,void 0,MCP_PARTIAL_REDACT_HEADERS),durationMs}})),response}catch(error2){
const durationMs=Math.round(performance.now()-startedAt);throw logIfEnabled(this.createLog(MCPConnectionPhase.ERROR,`HTTP ${method} ${url2} failed: ${formatDiagnosticErrorMessage(error2)}`,MCPLogLevel.ERROR,{serverName,request,error:this.summarizeError(error2),browser:this.getBrowserContext(targetUrl,useProxy),hints:this.getConnectionHints(targetUrl,config2,error2),durationMs})),error2}},disable:()=>{enabled=!1}}}static isSessionExpiredError(error2){return error2 instanceof StreamableHTTPError&&
error2.code===404}static createTransport(serverName,config2,onLog){if(!config2.url)throw new Error("MCP server configuration is missing url");const useProxy=config2.useProxy??!1,requestInit={};if(config2.headers&&(requestInit.headers=config2.useProxy?buildProxiedHeaders(config2.headers):config2.headers),useProxy&&(requestInit.headers={...getAuthHeaders(),...requestInit.headers}),config2.credentials&&(requestInit.credentials=config2.credentials),config2.transport===MCPTransportType.WEBSOCKET){if(useProxy)
throw new Error("WebSocket transport is not supported when using CORS proxy. Use HTTP transport instead.");const url22=new URL(config2.url);return{transport:new WebSocketClientTransport(url22),type:MCPTransportType.WEBSOCKET,stopPhaseLogging:()=>{}}}const url2=useProxy?buildProxiedUrl(config2.url):new URL(config2.url),{fetch:diagnosticFetch,disable:stopPhaseLogging}=this.createDiagnosticFetch(serverName,config2,requestInit,url2,useProxy,onLog);try{return{transport:new StreamableHTTPClientTransport(
url2,{requestInit,fetch:diagnosticFetch}),type:MCPTransportType.STREAMABLE_HTTP,stopPhaseLogging}}catch(httpError){console.warn("[MCPService] StreamableHTTP failed, trying SSE transport...",httpError);try{return{transport:new SSEClientTransport(url2,{requestInit,fetch:diagnosticFetch,eventSourceInit:{fetch:diagnosticFetch}}),type:MCPTransportType.SSE,stopPhaseLogging}}catch(sseError){const httpMsg=httpError instanceof Error?httpError.message:String(httpError),sseMsg=sseError instanceof Error?sseError.
message:String(sseError);throw new Error(`Failed to create transport. StreamableHTTP: ${httpMsg}; SSE: ${sseMsg}`)}}}static extractServerInfo(impl){if(impl)return{name:impl.name,version:impl.version,title:impl.title,description:impl.description,websiteUrl:impl.websiteUrl,icons:impl.icons?.map(icon=>({src:icon.src,mimeType:icon.mimeType,sizes:icon.sizes,theme:icon.theme}))}}static async connect(serverName,serverConfig,clientInfo,capabilities,onPhase,listChangedHandlers){const startTime=performance.
now(),effectiveClientInfo=clientInfo??DEFAULT_MCP_CONFIG.clientInfo,effectiveCapabilities=capabilities??DEFAULT_MCP_CONFIG.capabilities;onPhase?.(MCPConnectionPhase.TRANSPORT_CREATING,this.createLog(MCPConnectionPhase.TRANSPORT_CREATING,`Creating transport for ${serverConfig.url}`));const{transport,type:transportType,stopPhaseLogging}=this.createTransport(serverName,serverConfig,log=>onPhase?.(log.phase,log));transportType===MCPTransportType.WEBSOCKET&&(transport.onclose=()=>{console.log(`[MCPSe\
rvice][${serverName}] WebSocket closed, notifying for reconnection`),onPhase?.(MCPConnectionPhase.DISCONNECTED,this.createLog(MCPConnectionPhase.DISCONNECTED,"WebSocket connection closed"))}),onPhase?.(MCPConnectionPhase.TRANSPORT_READY,this.createLog(MCPConnectionPhase.TRANSPORT_READY,`Transport ready (${transportType})`),{transportType});const client=new Client({name:effectiveClientInfo.name,version:effectiveClientInfo.version??DEFAULT_CLIENT_VERSION},{capabilities:effectiveCapabilities,listChanged:listChangedHandlers}),
runtimeErrorHandler=error2=>{console.error(`[MCPService][${serverName}] Protocol error after initialize:`,error2)};client.onerror=error2=>{onPhase?.(MCPConnectionPhase.ERROR,this.createLog(MCPConnectionPhase.ERROR,`Protocol error: ${error2.message}`,MCPLogLevel.ERROR,{error:this.summarizeError(error2)}))},onPhase?.(MCPConnectionPhase.INITIALIZING,this.createLog(MCPConnectionPhase.INITIALIZING,"Sending initialize request..."));try{await client.connect(transport),stopPhaseLogging(),client.onerror=
runtimeErrorHandler}catch(error2){client.onerror=runtimeErrorHandler;const url2=serverConfig.useProxy??!1?buildProxiedUrl(serverConfig.url):new URL(serverConfig.url);throw onPhase?.(MCPConnectionPhase.ERROR,this.createLog(MCPConnectionPhase.ERROR,`Connection failed during initialize: ${error2 instanceof Error?error2.message:String(error2)}`,MCPLogLevel.ERROR,{error:this.summarizeError(error2),config:{serverName,configuredUrl:serverConfig.url,effectiveUrl:url2.href,transportType,useProxy:serverConfig.
useProxy??!1,headers:sanitizeHeaders(serverConfig.headers,Object.keys(serverConfig.headers??{}),MCP_PARTIAL_REDACT_HEADERS),credentials:serverConfig.credentials},browser:this.getBrowserContext(url2,serverConfig.useProxy??!1),hints:this.getConnectionHints(url2,serverConfig,error2)})),error2}const serverVersion=client.getServerVersion(),serverCapabilities=client.getServerCapabilities(),instructions=client.getInstructions(),serverInfo=this.extractServerInfo(serverVersion);onPhase?.(MCPConnectionPhase.
CAPABILITIES_EXCHANGED,this.createLog(MCPConnectionPhase.CAPABILITIES_EXCHANGED,"Capabilities exchanged successfully",MCPLogLevel.INFO,{serverCapabilities,serverInfo}),{serverInfo,serverCapabilities,clientCapabilities:effectiveCapabilities,instructions}),onPhase?.(MCPConnectionPhase.LISTING_TOOLS,this.createLog(MCPConnectionPhase.LISTING_TOOLS,"Listing available tools...")),console.log(`[MCPService][${serverName}] Connected, listing tools...`);const tools=await this.listTools({client,transport,tools:[],
serverName,transportType,connectionTimeMs:0}),connectionTimeMs=Math.round(performance.now()-startTime);return onPhase?.(MCPConnectionPhase.CONNECTED,this.createLog(MCPConnectionPhase.CONNECTED,`Connection established with ${tools.length} tools (${connectionTimeMs}ms)`)),console.log(`[MCPService][${serverName}] Initialization complete with ${tools.length} tools in ${connectionTimeMs}ms`),{client,transport,tools,serverName,transportType,serverInfo,serverCapabilities,clientCapabilities:effectiveCapabilities,
protocolVersion:DEFAULT_MCP_CONFIG.protocolVersion,instructions,connectionTimeMs}}static async disconnect(connection){console.log(`[MCPService][${connection.serverName}] Disconnecting...`);try{connection.transport.onclose&&(connection.transport.onclose=void 0),await connection.client.close()}catch(error2){console.warn(`[MCPService][${connection.serverName}] Error during disconnect:`,error2)}}static async listTools(connection){try{return(await connection.client.listTools()).tools??[]}catch(error2){
if(this.isSessionExpiredError(error2))throw error2;return console.warn(`[MCPService][${connection.serverName}] Failed to list tools:`,error2),[]}}static async listPrompts(connection){try{return(await connection.client.listPrompts()).prompts??[]}catch(error2){if(this.isSessionExpiredError(error2))throw error2;return console.warn(`[MCPService][${connection.serverName}] Failed to list prompts:`,error2),[]}}static async getPrompt(connection,name,args){try{return await connection.client.getPrompt({name,
arguments:args})}catch(error2){throw console.error(`[MCPService][${connection.serverName}] Failed to get prompt:`,error2),error2}}static async callTool(connection,params,signal){throwIfAborted(signal);try{const result=await connection.client.callTool({name:params.name,arguments:params.arguments},void 0,{signal});return{content:this.formatToolResult(result),isError:result.isError??!1}}catch(error2){if(isAbortError(error2)||this.isSessionExpiredError(error2))throw error2;const message=error2 instanceof
Error?error2.message:String(error2);throw new Error(`Tool "${params.name}" execution failed on server "${connection.serverName}": ${message}`,{cause:error2 instanceof Error?error2:void 0})}}static formatToolResult(result){const content2=result.content;return Array.isArray(content2)?content2.map(item=>this.formatSingleContent(item)).filter(Boolean).join(`
`):""}static formatSingleContent(content2){if(content2.type===MCPContentType.TEXT&&content2.text)return content2.text;if(content2.type===MCPContentType.IMAGE&&content2.data)return createBase64DataUrl(content2.mimeType??DEFAULT_IMAGE_MIME_TYPE,content2.data);if(content2.type===MCPContentType.RESOURCE&&content2.resource){const resource=content2.resource;return resource.text?resource.text:resource.blob?resource.blob:JSON.stringify(resource)}return content2.data&&content2.mimeType?createBase64DataUrl(
content2.mimeType,content2.data):JSON.stringify(content2)}static async complete(connection,ref2,argument){try{return(await connection.client.complete({ref:ref2,argument})).completion}catch(error2){return console.error("[MCPService] Failed to get completions:",error2),null}}static async listResources(connection,cursor){try{const result=await connection.client.listResources(cursor?{cursor}:void 0);return{resources:result.resources??[],nextCursor:result.nextCursor}}catch(error2){if(this.isSessionExpiredError(
error2))throw error2;return console.warn(`[MCPService][${connection.serverName}] Failed to list resources:`,error2),{resources:[]}}}static async listAllResources(connection){const allResources=[];let cursor;do{const result=await this.listResources(connection,cursor);allResources.push(...result.resources),cursor=result.nextCursor}while(cursor);return allResources}static async listResourceTemplates(connection,cursor){try{const result=await connection.client.listResourceTemplates(cursor?{cursor}:void 0);
return{resourceTemplates:result.resourceTemplates??[],nextCursor:result.nextCursor}}catch(error2){if(this.isSessionExpiredError(error2))throw error2;return console.warn(`[MCPService][${connection.serverName}] Failed to list resource templates:`,error2),{resourceTemplates:[]}}}static async listAllResourceTemplates(connection){const allTemplates=[];let cursor;do{const result=await this.listResourceTemplates(connection,cursor);allTemplates.push(...result.resourceTemplates),cursor=result.nextCursor}while(cursor);
return allTemplates}static async readResource(connection,uri2){try{const result=await connection.client.readResource({uri:uri2});return{contents:result.contents??[],_meta:result._meta}}catch(error2){throw console.error(`[MCPService][${connection.serverName}] Failed to read resource:`,error2),error2}}static async subscribeResource(connection,uri2){try{await connection.client.subscribeResource({uri:uri2}),console.log(`[MCPService][${connection.serverName}] Subscribed to resource: ${uri2}`)}catch(error2){
throw console.error(`[MCPService][${connection.serverName}] Failed to subscribe to resource:`,error2),error2}}static async unsubscribeResource(connection,uri2){try{await connection.client.unsubscribeResource({uri:uri2}),console.log(`[MCPService][${connection.serverName}] Unsubscribed from resource: ${uri2}`)}catch(error2){throw console.error(`[MCPService][${connection.serverName}] Failed to unsubscribe from resource:`,error2),error2}}static supportsResources(connection){return connection.serverCapabilities?.
resources!==void 0}static supportsResourceSubscriptions(connection){return!!connection.serverCapabilities?.resources?.subscribe}}function generateAttachmentId(){return`${MCP_RESOURCE_ATTACHMENT_ID_PREFIX}-${Date.now()}-${Math.random().toString(36).substring(2,9)}`}class MCPResourceStore{#_serverResources=state$1(proxy(new SvelteMap));get _serverResources(){return get$3(this.#_serverResources)}set _serverResources(value){set$1(this.#_serverResources,value,!0)}#_cachedResources=state$1(proxy(new SvelteMap));get _cachedResources(){
return get$3(this.#_cachedResources)}set _cachedResources(value){set$1(this.#_cachedResources,value,!0)}#_subscriptions=state$1(proxy(new SvelteMap));get _subscriptions(){return get$3(this.#_subscriptions)}set _subscriptions(value){set$1(this.#_subscriptions,value,!0)}#_attachments=state$1(proxy([]));get _attachments(){return get$3(this.#_attachments)}set _attachments(value){set$1(this.#_attachments,value,!0)}#_isLoading=state$1(!1);get _isLoading(){return get$3(this.#_isLoading)}set _isLoading(value){
set$1(this.#_isLoading,value,!0)}get serverResources(){return this._serverResources}get cachedResources(){return this._cachedResources}get subscriptions(){return this._subscriptions}get attachments(){return this._attachments}get isLoading(){return this._isLoading}get totalResourceCount(){let count=0;for(const serverRes of this._serverResources.values())count+=serverRes.resources.length;return count}get totalTemplateCount(){let count=0;for(const serverRes of this._serverResources.values())count+=
serverRes.templates.length;return count}get attachmentCount(){return this._attachments.length}get hasAttachments(){return this._attachments.length>0}setServerResources(serverName,resources,templates){this._serverResources.set(serverName,{serverName,resources,templates,lastFetched:new Date,loading:!1,error:void 0}),console.log(`[MCPResources][${serverName}] Set ${resources.length} resources, ${templates.length} templates`)}setServerLoading(serverName,loading){const existing=this._serverResources.
get(serverName);existing?this._serverResources.set(serverName,{...existing,loading}):this._serverResources.set(serverName,{serverName,resources:[],templates:[],loading,error:void 0})}setServerError(serverName,error2){const existing=this._serverResources.get(serverName);existing?this._serverResources.set(serverName,{...existing,loading:!1,error:error2}):this._serverResources.set(serverName,{serverName,resources:[],templates:[],loading:!1,error:error2})}getServerResources(serverName){return this._serverResources.
get(serverName)}getAllResourceInfos(){const result=[];for(const[serverName,serverRes]of this._serverResources)for(const resource of serverRes.resources)result.push({uri:resource.uri,name:resource.name,title:resource.title,description:resource.description,mimeType:resource.mimeType,serverName,annotations:resource.annotations,icons:resource.icons});return result}getAllTemplateInfos(){const result=[];for(const[serverName,serverRes]of this._serverResources)for(const template of serverRes.templates)result.
push({uriTemplate:template.uriTemplate,name:template.name,title:template.title,description:template.description,mimeType:template.mimeType,serverName,annotations:template.annotations,icons:template.icons});return result}clearServerResources(serverName){this._serverResources.delete(serverName);for(const[uri2,cached2]of this._cachedResources)cached2.resource.serverName===serverName&&this._cachedResources.delete(uri2);for(const[uri2,sub2]of this._subscriptions)sub2.serverName===serverName&&this._subscriptions.
delete(uri2);console.log(`[MCPResources][${serverName}] Cleared all resources`)}cacheResourceContent(resource,content2){if(this._cachedResources.size>=MCP_RESOURCE_CACHE_MAX_ENTRIES){const oldestKey=this._cachedResources.keys().next().value;oldestKey&&this._cachedResources.delete(oldestKey)}this._cachedResources.set(resource.uri,{resource,content:content2,fetchedAt:new Date,subscribed:this._subscriptions.has(resource.uri)}),console.log(`[MCPResources] Cached content for: ${resource.uri}`)}getCachedContent(uri2){
const cached2=this._cachedResources.get(uri2);if(!cached2)return;if(Date.now()-cached2.fetchedAt.getTime()>MCP_RESOURCE_CACHE_TTL_MS&&!cached2.subscribed){this._cachedResources.delete(uri2);return}return cached2}invalidateCache(uri2){this._cachedResources.delete(uri2),console.log(`[MCPResources] Invalidated cache for: ${uri2}`)}clearCache(){this._cachedResources.clear(),console.log("[MCPResources] Cleared all cached content")}addSubscription(uri2,serverName){this._subscriptions.set(uri2,{uri:uri2,
serverName,subscribedAt:new Date});const cached2=this._cachedResources.get(uri2);cached2&&this._cachedResources.set(uri2,{...cached2,subscribed:!0}),console.log(`[MCPResources] Added subscription: ${uri2}`)}removeSubscription(uri2){this._subscriptions.delete(uri2);const cached2=this._cachedResources.get(uri2);cached2&&this._cachedResources.set(uri2,{...cached2,subscribed:!1}),console.log(`[MCPResources] Removed subscription: ${uri2}`)}isSubscribed(uri2){return this._subscriptions.has(uri2)}handleResourceUpdate(uri2){
this.invalidateCache(uri2);const sub2=this._subscriptions.get(uri2);sub2&&this._subscriptions.set(uri2,{...sub2,lastUpdate:new Date}),console.log(`[MCPResources] Resource updated: ${uri2}`)}handleResourcesListChanged(serverName){const existing=this._serverResources.get(serverName);existing&&this._serverResources.set(serverName,{...existing,lastFetched:void 0}),console.log(`[MCPResources][${serverName}] Resources list changed, needs refresh`)}addAttachment(resource){const attachment={id:generateAttachmentId(),
resource,loading:!0};return this._attachments=[...this._attachments,attachment],console.log(`[MCPResources] Added attachment: ${resource.uri}`),attachment}updateAttachmentContent(attachmentId,content2){this._attachments=this._attachments.map(att=>att.id===attachmentId?{...att,content:content2,loading:!1,error:void 0}:att)}updateAttachmentError(attachmentId,error2){this._attachments=this._attachments.map(att=>att.id===attachmentId?{...att,loading:!1,error:error2}:att)}removeAttachment(attachmentId){
this._attachments=this._attachments.filter(att=>att.id!==attachmentId),console.log(`[MCPResources] Removed attachment: ${attachmentId}`)}clearAttachments(){this._attachments=[],console.log("[MCPResources] Cleared all attachments")}getAttachment(attachmentId){return this._attachments.find(att=>att.id===attachmentId)}isAttached(uri2){const normalizedUri=normalizeResourceUri(uri2);return this._attachments.some(att=>att.resource.uri===uri2||normalizeResourceUri(att.resource.uri)===normalizedUri)}setLoading(loading){
this._isLoading=loading}findResourceByUri(uri2){const normalizedUri=normalizeResourceUri(uri2);for(const[serverName,serverRes]of this._serverResources){const resource=serverRes.resources.find(r2=>r2.uri===uri2)??serverRes.resources.find(r2=>normalizeResourceUri(r2.uri)===normalizedUri);if(resource)return{uri:resource.uri,name:resource.name,title:resource.title,description:resource.description,mimeType:resource.mimeType,serverName,annotations:resource.annotations,icons:resource.icons}}}findServerForUri(uri2){
for(const[serverName,serverRes]of this._serverResources)if(serverRes.resources.some(r2=>r2.uri===uri2))return serverName}clear(){this._serverResources.clear(),this._cachedResources.clear(),this._subscriptions.clear(),this._attachments=[],this._isLoading=!1,console.log("[MCPResources] Cleared all state")}formatAttachmentsForContext(){if(this._attachments.length===0)return"";const parts=[];for(const attachment of this._attachments){if(attachment.error||!attachment.content||attachment.content.length===
0)continue;const resourceName=attachment.resource.title||attachment.resource.name,serverName=attachment.resource.serverName;for(const content2 of attachment.content)"text"in content2&&content2.text?parts.push(`

--- Resource: ${resourceName} (from ${serverName}) ---
${content2.text}`):"blob"in content2&&content2.blob&&parts.push(`

--- Resource: ${resourceName} (from ${serverName}) ---
[${BINARY_CONTENT_LABEL}: ${content2.mimeType||RESOURCE_UNKNOWN_TYPE}]`)}return parts.join("")}toMessageExtras(){const extras=[];for(const attachment of this._attachments){if(attachment.error||!attachment.content||attachment.content.length===0)continue;const resourceName=attachment.resource.title||attachment.resource.name,contentParts=[];for(const content2 of attachment.content)"text"in content2&&content2.text?contentParts.push(content2.text):"blob"in content2&&content2.blob&&contentParts.push(`\
[${BINARY_CONTENT_LABEL}: ${content2.mimeType||RESOURCE_UNKNOWN_TYPE}]`);contentParts.length>0&&extras.push({type:AttachmentType.MCP_RESOURCE,name:resourceName,uri:attachment.resource.uri,serverName:attachment.resource.serverName,content:contentParts.join(NEWLINE_SEPARATOR),mimeType:attachment.resource.mimeType})}return extras}}const mcpResourceStore=new MCPResourceStore,mcpResources=()=>mcpResourceStore.serverResources,mcpResourceAttachments=()=>mcpResourceStore.attachments,mcpHasResourceAttachments=()=>mcpResourceStore.
hasAttachments,mcpTotalResourceCount=()=>mcpResourceStore.totalResourceCount,mcpResourcesLoading=()=>mcpResourceStore.isLoading;class MCPStore{#_isInitializing=state$1(!1);get _isInitializing(){return get$3(this.#_isInitializing)}set _isInitializing(value){set$1(this.#_isInitializing,value,!0)}#_error=state$1(null);get _error(){return get$3(this.#_error)}set _error(value){set$1(this.#_error,value,!0)}#_toolCount=state$1(0);get _toolCount(){return get$3(this.#_toolCount)}set _toolCount(value){set$1(
this.#_toolCount,value,!0)}#_connectedServers=state$1(proxy([]));get _connectedServers(){return get$3(this.#_connectedServers)}set _connectedServers(value){set$1(this.#_connectedServers,value,!0)}#_healthChecks=state$1(proxy({}));get _healthChecks(){return get$3(this.#_healthChecks)}set _healthChecks(value){set$1(this.#_healthChecks,value,!0)}#_proxyAvailable=state$1(!1);get _proxyAvailable(){return get$3(this.#_proxyAvailable)}set _proxyAvailable(value){set$1(this.#_proxyAvailable,value,!0)}connections=new Map;toolsIndex=new Map;serverConfigs=new Map;reconnectingServers=new Set;configSignature=null;initPromise=null;activeFlowCount=0;constructor(){
this.probeProxy()}async probeProxy(){try{const response=await fetch(`${base}${CORS_PROXY_ENDPOINT}`,{method:"HEAD"});this._proxyAvailable=response.status!==404}catch{this._proxyAvailable=!1}}get isProxyAvailable(){return this._proxyAvailable}#generateServerId(id2,index2){return typeof id2=="string"&&id2.trim()?id2.trim():`${MCP_SERVER_ID_PREFIX}-${index2+1}`}#parseServerSettings(rawServers){if(!rawServers)return[];let parsed;if(typeof rawServers=="string"){const trimmed=rawServers.trim();if(!trimmed)
return[];try{parsed=JSON.parse(trimmed)}catch(error2){return console.warn("[MCP] Failed to parse mcpServers JSON:",error2),[]}}else parsed=rawServers;return Array.isArray(parsed)?parsed.map((entry,index2)=>{const url2=typeof entry?.url=="string"?entry.url.trim():"",headers=typeof entry?.headers=="string"?entry.headers.trim():void 0;return{id:this.#generateServerId(entry?.id,index2),enabled:!!entry?.enabled,url:url2,name:entry?.name,requestTimeoutSeconds:DEFAULT_MCP_CONFIG.requestTimeoutSeconds,headers:headers||
void 0,useProxy:!!entry?.useProxy}}):[]}#buildServerConfig(entry,connectionTimeoutMs=DEFAULT_MCP_CONFIG.connectionTimeoutMs){if(!entry?.url)return;let headers;if(entry.headers)try{const parsed=JSON.parse(entry.headers);typeof parsed=="object"&&parsed!==null&&!Array.isArray(parsed)&&(headers=parsed)}catch{console.warn("[MCP] Failed to parse custom headers JSON:",entry.headers)}return{url:entry.url,transport:detectMcpTransportFromUrl(entry.url),handshakeTimeoutMs:connectionTimeoutMs,requestTimeoutMs:Math.
round(entry.requestTimeoutSeconds*1e3),headers,useProxy:entry.useProxy}}#checkServerEnabled(server,perChatOverrides){return perChatOverrides?.find(o=>o.serverId===server.id)?.enabled??!1}#buildMcpClientConfig(cfg,perChatOverrides){const rawServers=this.#parseServerSettings(cfg.mcpServers);if(!rawServers.length)return;const servers={};for(const[index2,entry]of rawServers.entries()){if(!this.#checkServerEnabled(entry,perChatOverrides))continue;const normalized=this.#buildServerConfig(entry);normalized&&
(servers[this.#generateServerId(entry.id,index2)]=normalized)}if(Object.keys(servers).length!==0)return{protocolVersion:DEFAULT_MCP_CONFIG.protocolVersion,capabilities:DEFAULT_MCP_CONFIG.capabilities,clientInfo:DEFAULT_MCP_CONFIG.clientInfo,requestTimeoutMs:Math.round(DEFAULT_MCP_CONFIG.requestTimeoutSeconds*1e3),servers}}#buildCapabilitiesInfo(serverCaps,clientCaps){return{server:{tools:serverCaps?.tools?{listChanged:serverCaps.tools.listChanged}:void 0,prompts:serverCaps?.prompts?{listChanged:serverCaps.
prompts.listChanged}:void 0,resources:serverCaps?.resources?{subscribe:serverCaps.resources.subscribe,listChanged:serverCaps.resources.listChanged}:void 0,logging:!!serverCaps?.logging,completions:!!serverCaps?.completions,tasks:!!serverCaps?.tasks},client:{roots:clientCaps?.roots?{listChanged:clientCaps.roots.listChanged}:void 0,sampling:!!clientCaps?.sampling,elicitation:clientCaps?.elicitation?{form:!!clientCaps.elicitation.form,url:!!clientCaps.elicitation.url}:void 0,tasks:!!clientCaps?.tasks}}}get isInitializing(){
return this._isInitializing}get isInitialized(){return this.connections.size>0}get error(){return this._error}get toolCount(){return this._toolCount}get connectedServerCount(){return this._connectedServers.length}get connectedServerNames(){return this._connectedServers}get isEnabled(){const mcpConfig=this.#buildMcpClientConfig(config$1());return mcpConfig!=null&&Object.keys(mcpConfig.servers).length>0}get availableTools(){return Array.from(this.toolsIndex.keys())}updateState(state2){state2.isInitializing!==
void 0&&(this._isInitializing=state2.isInitializing),state2.error!==void 0&&(this._error=state2.error),state2.toolCount!==void 0&&(this._toolCount=state2.toolCount),state2.connectedServers!==void 0&&(this._connectedServers=state2.connectedServers)}updateHealthCheck(serverId,state2){this._healthChecks={...this._healthChecks,[serverId]:state2}}getHealthCheckState(serverId){return this._healthChecks[serverId]??{status:HealthCheckStatus.IDLE}}hasHealthCheck(serverId){return serverId in this._healthChecks&&
this._healthChecks[serverId].status!==HealthCheckStatus.IDLE}clearHealthCheck(serverId){const{[serverId]:_removed,...rest}=this._healthChecks;this._healthChecks=rest}clearAllHealthChecks(){this._healthChecks={}}clearError(){this._error=null}getServers(){return parseMcpServerSettings(config$1().mcpServers)}getConnections(){return this.connections}getServerLabel(server){const healthState=this.getHealthCheckState(server.id);return healthState?.status===HealthCheckStatus.SUCCESS&&(healthState.serverInfo?.
title||healthState.serverInfo?.name||server.name)||server.url}getServerById(serverId){return this.getServers().find(s2=>s2.id===serverId)}getServerDisplayName(serverId){const server=this.getServerById(serverId);return server?this.getServerLabel(server):serverId}#isValidIconUri(src){try{return src.startsWith(UrlProtocol.DATA)?!0:new URL(src).protocol===UrlProtocol.HTTPS}catch{return!1}}#getMcpIconUrl(icons,isDark=!1){if(!icons?.length)return null;const validIcons=icons.filter(icon=>!(!icon.src||!this.#isValidIconUri(
icon.src)||icon.mimeType&&!MCP_ALLOWED_ICON_MIME_TYPES.has(icon.mimeType)));if(validIcons.length===0)return null;const preferredTheme=isDark?ColorMode.DARK:ColorMode.LIGHT,themedIcon=validIcons.find(icon=>icon.theme===preferredTheme);if(themedIcon)return themedIcon.src;const universalIcons=validIcons.filter(icon=>!icon.theme);return universalIcons.length===EXPECTED_THEMED_ICON_PAIR_COUNT?universalIcons[isDark?1:0].src:universalIcons.length>0?universalIcons[0].src:validIcons[0].src}getServerFavicon(serverId){
const server=this.getServerById(serverId);if(!server)return null;const isDark=derivedMode.current===ColorMode.DARK,healthState=this.getHealthCheckState(serverId);if(healthState.status===HealthCheckStatus.SUCCESS&&healthState.serverInfo?.icons){const mcpIconUrl=this.#getMcpIconUrl(healthState.serverInfo.icons,isDark);if(mcpIconUrl)return mcpIconUrl}const fallbackUrl=this.#getServerFaviconFallback(server.url);return fallbackUrl||null}#getServerFaviconFallback(serverUrl){try{const url2=new URL(serverUrl),
rootDomain=extractRootDomain(url2);if(!rootDomain)return null;const origin2=`${url2.protocol}//${rootDomain}`,candidates=["favicon.ico","favicon.svg","favicon.png"];for(const path2 of candidates){const faviconUrl=`${origin2}/${path2}`;if(this.#isValidIconUri(faviconUrl))return faviconUrl}}catch{}return null}isAnyServerLoading(){return this.getServers().some(s2=>{const state2=this.getHealthCheckState(s2.id);return state2.status===HealthCheckStatus.IDLE||state2.status===HealthCheckStatus.CONNECTING})}getServersSorted(){
const servers=this.getServers();return this.isAnyServerLoading()?servers:[...servers].sort((a,b)=>this.getServerLabel(a).localeCompare(this.getServerLabel(b)))}addServer(serverData){const servers=this.getServers(),newServer={id:serverData.id||(uuid$1()??`server-${Date.now()}`),enabled:serverData.enabled,url:serverData.url.trim(),name:serverData.name,headers:serverData.headers?.trim()||void 0,requestTimeoutSeconds:DEFAULT_MCP_CONFIG.requestTimeoutSeconds,useProxy:serverData.useProxy};settingsStore.
updateConfig(SETTINGS_KEYS.MCP_SERVERS,JSON.stringify([...servers,newServer]))}updateServer(id2,updates){const servers=this.getServers();settingsStore.updateConfig(SETTINGS_KEYS.MCP_SERVERS,JSON.stringify(servers.map(server=>server.id===id2?{...server,...updates}:server)))}removeServer(id2){const servers=this.getServers();settingsStore.updateConfig(SETTINGS_KEYS.MCP_SERVERS,JSON.stringify(servers.filter(s2=>s2.id!==id2))),this.clearHealthCheck(id2)}hasAvailableServers(){return parseMcpServerSettings(
config$1().mcpServers).some(s2=>s2.enabled&&s2.url.trim())}hasEnabledServers(perChatOverrides){return!!this.#buildMcpClientConfig(config$1(),perChatOverrides)}getEnabledServersForConversation(perChatOverrides){return this.getServers().filter(server=>this.#checkServerEnabled(server,perChatOverrides))}async ensureInitialized(perChatOverrides){const mcpConfig=this.#buildMcpClientConfig(config$1(),perChatOverrides),signature=mcpConfig?JSON.stringify(mcpConfig):null;return signature?this.isInitialized&&
this.configSignature===signature?!0:this.initPromise&&this.configSignature===signature?this.initPromise:((this.connections.size>0||this.initPromise)&&await this.shutdown(),this.initialize(signature,mcpConfig)):(await this.shutdown(),!1)}async initialize(signature,mcpConfig){this.updateState({isInitializing:!0,error:null}),this.configSignature=signature;const serverEntries=Object.entries(mcpConfig.servers);return serverEntries.length===0?(this.updateState({isInitializing:!1,toolCount:0,connectedServers:[]}),
!1):(this.initPromise=this.doInitialize(signature,mcpConfig,serverEntries),this.initPromise)}async doInitialize(signature,mcpConfig,serverEntries){const clientInfo=mcpConfig.clientInfo??DEFAULT_MCP_CONFIG.clientInfo,capabilities=mcpConfig.capabilities??DEFAULT_MCP_CONFIG.capabilities,results=await Promise.allSettled(serverEntries.map(async([name,serverConfig])=>{this.serverConfigs.set(name,serverConfig);const listChangedHandlers=this.createListChangedHandlers(name),connection=await MCPService.connect(
name,serverConfig,clientInfo,capabilities,phase=>{phase===MCPConnectionPhase.DISCONNECTED&&(console.log(`[MCPStore][${name}] Connection lost, starting auto-reconnect`),this.autoReconnect(name))},listChangedHandlers);return{name,connection}}));if(this.configSignature!==signature){for(const result of results)result.status==="fulfilled"&&await MCPService.disconnect(result.value.connection).catch(console.warn);return!1}for(const result of results)if(result.status==="fulfilled"){const{name,connection}=result.
value;this.connections.set(name,connection);for(const tool of connection.tools)this.toolsIndex.has(tool.name)&&console.warn(`[MCPStore] Tool name conflict: "${tool.name}" exists in "${this.toolsIndex.get(tool.name)}" and "${name}". Using tool from "${name}".`),this.toolsIndex.set(tool.name,name)}else console.error("[MCPStore] Failed to connect:",result.reason);return this.connections.size===0&&serverEntries.length>0?(this.updateState({isInitializing:!1,error:"All MCP server connections failed",toolCount:0,
connectedServers:[]}),this.initPromise=null,!1):(this.updateState({isInitializing:!1,error:null,toolCount:this.toolsIndex.size,connectedServers:Array.from(this.connections.keys())}),this.initPromise=null,!0)}createListChangedHandlers(serverName){return{tools:{onChanged:(error2,tools)=>{if(error2){console.warn(`[MCPStore][${serverName}] Tools list changed error:`,error2);return}this.handleToolsListChanged(serverName,tools??[])}},prompts:{onChanged:error2=>{if(error2){console.warn(`[MCPStore][${serverName}\
] Prompts list changed error:`,error2);return}}}}}handleToolsListChanged(serverName,tools){const connection=this.connections.get(serverName);if(connection){for(const[toolName,ownerServer]of this.toolsIndex.entries())ownerServer===serverName&&this.toolsIndex.delete(toolName);connection.tools=tools;for(const tool of tools)this.toolsIndex.has(tool.name)&&console.warn(`[MCPStore] Tool name conflict after list change: "${tool.name}" exists in "${this.toolsIndex.get(tool.name)}" and "${serverName}". U\
sing tool from "${serverName}".`),this.toolsIndex.set(tool.name,serverName);this.updateState({toolCount:this.toolsIndex.size})}}acquireConnection(){this.activeFlowCount++}async releaseConnection(shutdownIfUnused=!1){this.activeFlowCount=Math.max(0,this.activeFlowCount-1),shutdownIfUnused&&this.activeFlowCount===0&&await this.shutdown()}getActiveFlowCount(){return this.activeFlowCount}async shutdown(){this.initPromise&&(await this.initPromise.catch(()=>{}),this.initPromise=null),this.connections.
size!==0&&(await Promise.all(Array.from(this.connections.values()).map(conn=>MCPService.disconnect(conn).catch(error2=>console.warn(`[MCPStore] Error disconnecting ${conn.serverName}:`,error2)))),this.connections.clear(),this.toolsIndex.clear(),this.serverConfigs.clear(),this.configSignature=null,this.updateState({isInitializing:!1,error:null,toolCount:0,connectedServers:[]}))}async reconnectServer(serverName){const serverConfig=this.serverConfigs.get(serverName);if(!serverConfig)throw new Error(
`[MCPStore] No config found for ${serverName}, cannot reconnect`);const oldConnection=this.connections.get(serverName);oldConnection&&(await MCPService.disconnect(oldConnection).catch(console.warn),this.connections.delete(serverName)),console.log(`[MCPStore][${serverName}] Session expired, reconnecting with fresh session...`);const listChangedHandlers=this.createListChangedHandlers(serverName),connection=await MCPService.connect(serverName,serverConfig,DEFAULT_MCP_CONFIG.clientInfo,DEFAULT_MCP_CONFIG.
capabilities,phase=>{phase===MCPConnectionPhase.DISCONNECTED&&(console.log(`[MCPStore][${serverName}] Connection lost, starting auto-reconnect`),this.autoReconnect(serverName))},listChangedHandlers);this.connections.set(serverName,connection);for(const tool of connection.tools)this.toolsIndex.set(tool.name,serverName);console.log(`[MCPStore][${serverName}] Session recovered successfully`)}async autoReconnect(serverName){if(this.reconnectingServers.has(serverName)){console.log(`[MCPStore][${serverName}\
] Reconnection already in progress, skipping`);return}const serverConfig=this.serverConfigs.get(serverName);if(!serverConfig){console.error(`[MCPStore] No config found for ${serverName}, cannot reconnect`);return}this.reconnectingServers.add(serverName);let backoff=MCP_RECONNECT_INITIAL_DELAY,needsReconnect=!1;try{for(;;){await new Promise(resolve2=>setTimeout(resolve2,backoff)),console.log(`[MCPStore][${serverName}] Auto-reconnecting...`);try{const timeoutPromise=new Promise((_,reject)=>setTimeout(
()=>reject(new Error(`Reconnect attempt timed out after ${MCP_RECONNECT_ATTEMPT_TIMEOUT_MS}ms`)),MCP_RECONNECT_ATTEMPT_TIMEOUT_MS));needsReconnect=!1;const listChangedHandlers=this.createListChangedHandlers(serverName),connectPromise=MCPService.connect(serverName,serverConfig,DEFAULT_MCP_CONFIG.clientInfo,DEFAULT_MCP_CONFIG.capabilities,phase=>{phase===MCPConnectionPhase.DISCONNECTED&&(this.reconnectingServers.has(serverName)?needsReconnect=!0:(console.log(`[MCPStore][${serverName}] Connection l\
ost, restarting auto-reconnect`),this.autoReconnect(serverName)))},listChangedHandlers),connection=await Promise.race([connectPromise,timeoutPromise]);this.connections.set(serverName,connection);for(const tool of connection.tools)this.toolsIndex.set(tool.name,serverName);console.log(`[MCPStore][${serverName}] Reconnected successfully`);break}catch(error2){console.warn(`[MCPStore][${serverName}] Reconnection failed:`,error2),backoff=Math.min(backoff*MCP_RECONNECT_BACKOFF_MULTIPLIER,MCP_RECONNECT_MAX_DELAY)}}}finally{
this.reconnectingServers.delete(serverName),needsReconnect&&(console.log(`[MCPStore][${serverName}] Deferred disconnect detected, restarting auto-reconnect`),this.autoReconnect(serverName))}}getToolDefinitionsForLLM(){const tools=[];for(const connection of this.connections.values())for(const tool of connection.tools){const rawSchema=tool.inputSchema??{type:JsonSchemaType.OBJECT,properties:{},required:[]};tools.push({type:ToolCallType.FUNCTION,function:{name:tool.name,description:tool.description,
parameters:this.normalizeSchemaProperties(rawSchema)}})}return tools}normalizeSchemaProperties(schema){if(!schema||typeof schema!="object")return schema;const normalized={...schema};if(normalized.properties&&typeof normalized.properties=="object"){const props=normalized.properties,normalizedProps={};for(const[key2,prop2]of Object.entries(props)){if(!prop2||typeof prop2!="object"){normalizedProps[key2]=prop2;continue}const normalizedProp={...prop2};if(!normalizedProp.type&&normalizedProp.default!==
void 0){const defaultVal=normalizedProp.default;typeof defaultVal=="string"?normalizedProp.type="string":typeof defaultVal=="number"?normalizedProp.type=Number.isInteger(defaultVal)?"integer":"number":typeof defaultVal=="boolean"?normalizedProp.type="boolean":Array.isArray(defaultVal)?normalizedProp.type="array":typeof defaultVal=="object"&&defaultVal!==null&&(normalizedProp.type="object")}normalizedProp.properties&&Object.assign(normalizedProp,this.normalizeSchemaProperties(normalizedProp)),normalizedProp.
items&&typeof normalizedProp.items=="object"&&(normalizedProp.items=this.normalizeSchemaProperties(normalizedProp.items)),normalizedProps[key2]=normalizedProp}normalized.properties=normalizedProps}return normalized}getToolNames(){return Array.from(this.toolsIndex.keys())}hasTool(toolName){return this.toolsIndex.has(toolName)}getToolServer(toolName){return this.toolsIndex.get(toolName)}hasPromptsSupport(){for(const connection of this.connections.values())if(connection.serverCapabilities?.prompts)
return!0;return!1}hasPromptsCapability(perChatOverrides){if(perChatOverrides!==void 0){const enabledServerIds=new Set(perChatOverrides.filter(o=>o.enabled).map(o=>o.serverId));if(enabledServerIds.size===0)return!1;for(const[serverId,state2]of Object.entries(this._healthChecks))if(enabledServerIds.has(serverId)&&state2.status===HealthCheckStatus.SUCCESS&&state2.capabilities?.server?.prompts!==void 0)return!0;for(const[serverName,connection]of this.connections)if(enabledServerIds.has(serverName)&&
connection.serverCapabilities?.prompts)return!0;return!1}for(const state2 of Object.values(this._healthChecks))if(state2.status===HealthCheckStatus.SUCCESS&&state2.capabilities?.server?.prompts!==void 0)return!0;for(const connection of this.connections.values())if(connection.serverCapabilities?.prompts)return!0;return!1}async getAllPrompts(){const results=[];for(const[serverName,connection]of this.connections){if(!connection.serverCapabilities?.prompts)continue;const prompts=await MCPService.listPrompts(
connection);for(const prompt of prompts)results.push({name:prompt.name,description:prompt.description,title:prompt.title,serverName,arguments:prompt.arguments?.map(arg=>({name:arg.name,description:arg.description,required:arg.required}))})}return results}async getPrompt(serverName,promptName,args){const connection=this.connections.get(serverName);if(!connection)throw new Error(`Server "${serverName}" not found for prompt "${promptName}"`);return MCPService.getPrompt(connection,promptName,args)}async executeTool(toolCall,signal){
const toolName=toolCall.function.name,serverName=this.toolsIndex.get(toolName);if(!serverName)throw new Error(`Unknown tool: ${toolName}`);const connection=this.connections.get(serverName);if(!connection)throw new Error(`Server "${serverName}" is not connected`);const args=this.parseToolArguments(toolCall.function.arguments);try{return await MCPService.callTool(connection,{name:toolName,arguments:args},signal)}catch(error2){if(MCPService.isSessionExpiredError(error2)){await this.reconnectServer(
serverName);const newConnection=this.connections.get(serverName);if(!newConnection)throw new Error(`Failed to reconnect to "${serverName}"`);return MCPService.callTool(newConnection,{name:toolName,arguments:args},signal)}throw error2}}async executeToolByName(toolName,args,signal){const serverName=this.toolsIndex.get(toolName);if(!serverName)throw new Error(`Unknown tool: ${toolName}`);const connection=this.connections.get(serverName);if(!connection)throw new Error(`Server "${serverName}" is not \
connected`);try{return await MCPService.callTool(connection,{name:toolName,arguments:args},signal)}catch(error2){if(MCPService.isSessionExpiredError(error2)){await this.reconnectServer(serverName);const newConnection=this.connections.get(serverName);if(!newConnection)throw new Error(`Failed to reconnect to "${serverName}"`);return MCPService.callTool(newConnection,{name:toolName,arguments:args},signal)}throw error2}}parseToolArguments(args){if(typeof args=="string"){const trimmed=args.trim();if(trimmed===
"")return{};try{const parsed=JSON.parse(trimmed);if(typeof parsed!="object"||parsed===null||Array.isArray(parsed))throw new Error(`Tool arguments must be an object, got ${Array.isArray(parsed)?"array":typeof parsed}`);return parsed}catch(error2){throw new Error(`Failed to parse tool arguments as JSON: ${error2.message}`)}}if(typeof args=="object"&&args!==null&&!Array.isArray(args))return args;throw new Error(`Invalid tool arguments type: ${typeof args}`)}async getPromptCompletions(serverName,promptName,argumentName,argumentValue){
const connection=this.connections.get(serverName);return connection?connection.serverCapabilities?.completions?MCPService.complete(connection,{type:MCPRefType.PROMPT,name:promptName},{name:argumentName,value:argumentValue}):null:(console.warn(`[MCPStore] Server "${serverName}" is not connected`),null)}async getResourceCompletions(serverName,uriTemplate,argumentName,argumentValue){const connection=this.connections.get(serverName);return connection?connection.serverCapabilities?.completions?MCPService.
complete(connection,{type:MCPRefType.RESOURCE,uri:uriTemplate},{name:argumentName,value:argumentValue}):null:(console.warn(`[MCPStore] Server "${serverName}" is not connected`),null)}async readResourceByUri(serverName,uri2){const connection=this.connections.get(serverName);if(!connection)return console.error(`[MCPStore] No connection found for server: ${serverName}`),null;try{return(await MCPService.readResource(connection,uri2)).contents}catch(error2){return console.error(`[MCPStore] Failed to \
read resource ${uri2}:`,error2),null}}parseHeaders(headersJson){if(headersJson?.trim())try{const parsed=JSON.parse(headersJson);if(typeof parsed=="object"&&parsed!==null&&!Array.isArray(parsed))return parsed}catch{console.warn("[MCPStore] Failed to parse custom headers JSON:",headersJson)}}async runHealthChecksForServers(servers,skipIfChecked=!0,promoteToActive=!1){const serversToCheck=skipIfChecked?servers.filter(s2=>!this.hasHealthCheck(s2.id)&&s2.url.trim()):servers.filter(s2=>s2.url.trim());
if(serversToCheck.length===0)return;const BATCH_SIZE=5;for(let i=0;i<serversToCheck.length;i+=BATCH_SIZE){const batch=serversToCheck.slice(i,i+BATCH_SIZE);await Promise.allSettled(batch.map(server=>this.runHealthCheck(server,promoteToActive)))}}getExistingConnection(serverId){return this.connections.get(serverId)}async runHealthCheck(server,promoteToActive=!1){const existingConnection=this.connections.get(server.id);if(existingConnection)try{const tools=await MCPService.listTools(existingConnection),
capabilities=this.#buildCapabilitiesInfo(existingConnection.serverCapabilities,existingConnection.clientCapabilities);this.updateHealthCheck(server.id,{status:HealthCheckStatus.SUCCESS,tools:tools.map(tool=>({name:tool.name,description:tool.description,title:tool.title})),serverInfo:existingConnection.serverInfo,capabilities,transportType:existingConnection.transportType,protocolVersion:existingConnection.protocolVersion,instructions:existingConnection.instructions,connectionTimeMs:existingConnection.
connectionTimeMs,logs:[]});return}catch(error2){console.warn(`[MCPStore] Failed to reuse connection for ${server.id}, creating new one:`,error2),this.connections.delete(server.id)}const trimmedUrl=server.url.trim(),logs=[];let currentPhase=MCPConnectionPhase.IDLE;if(!trimmedUrl){this.updateHealthCheck(server.id,{status:HealthCheckStatus.ERROR,message:"Please enter a server URL first.",logs:[]});return}this.updateHealthCheck(server.id,{status:HealthCheckStatus.CONNECTING,phase:MCPConnectionPhase.
TRANSPORT_CREATING,logs:[]});const timeoutMs=Math.round(server.requestTimeoutSeconds*1e3),headers=this.parseHeaders(server.headers);try{const serverConfig={url:trimmedUrl,transport:detectMcpTransportFromUrl(trimmedUrl),handshakeTimeoutMs:DEFAULT_MCP_CONFIG.connectionTimeoutMs,requestTimeoutMs:timeoutMs,headers,useProxy:server.useProxy};this.serverConfigs.set(server.id,serverConfig);const connection=await MCPService.connect(server.id,serverConfig,DEFAULT_MCP_CONFIG.clientInfo,DEFAULT_MCP_CONFIG.capabilities,
(phase,log)=>{currentPhase=phase,logs.push(log),this.updateHealthCheck(server.id,{status:HealthCheckStatus.CONNECTING,phase,logs:[...logs]}),phase===MCPConnectionPhase.DISCONNECTED&&promoteToActive&&(console.log(`[MCPStore][${server.id}] Connection lost during health check, starting auto-reconnect`),this.autoReconnect(server.id))}),tools=connection.tools.map(tool=>({name:tool.name,description:tool.description,title:tool.title})),capabilities=this.#buildCapabilitiesInfo(connection.serverCapabilities,
connection.clientCapabilities);this.updateHealthCheck(server.id,{status:HealthCheckStatus.SUCCESS,tools,serverInfo:connection.serverInfo,capabilities,transportType:connection.transportType,protocolVersion:connection.protocolVersion,instructions:connection.instructions,connectionTimeMs:connection.connectionTimeMs,logs}),promoteToActive&&server.enabled?this.promoteHealthCheckToConnection(server.id,connection):await MCPService.disconnect(connection)}catch(error2){const message=error2 instanceof Error?
error2.message:"Unknown error occurred";logs.at(-1)?.phase!==MCPConnectionPhase.ERROR&&logs.push({timestamp:new Date,phase:MCPConnectionPhase.ERROR,message:`Connection failed: ${message}`,level:MCPLogLevel.ERROR}),this.updateHealthCheck(server.id,{status:HealthCheckStatus.ERROR,message,phase:currentPhase,logs})}}promoteHealthCheckToConnection(serverId,connection){for(const tool of connection.tools)this.toolsIndex.has(tool.name)&&console.warn(`[MCPStore] Tool name conflict during promotion: "${tool.
name}" exists in "${this.toolsIndex.get(tool.name)}" and "${serverId}". Using tool from "${serverId}".`),this.toolsIndex.set(tool.name,serverId);this.connections.set(serverId,connection),this.updateState({toolCount:this.toolsIndex.size,connectedServers:Array.from(this.connections.keys())})}getServersStatus(){const statuses=[];for(const[name,connection]of this.connections)statuses.push({name,isConnected:!0,toolCount:connection.tools.length,error:void 0});return statuses}getServerInstructions(){const results=[];
for(const[serverName,connection]of this.connections)connection.instructions&&results.push({serverName,serverTitle:connection.serverInfo?.title||connection.serverInfo?.name,instructions:connection.instructions});return results}getHealthCheckInstructions(){const results=[];for(const[serverId,state2]of Object.entries(this._healthChecks))state2.status===HealthCheckStatus.SUCCESS&&state2.instructions&&results.push({serverId,serverTitle:state2.serverInfo?.title||state2.serverInfo?.name,instructions:state2.
instructions});return results}hasServerInstructions(){for(const connection of this.connections.values())if(connection.instructions)return!0;return!1}hasResourcesCapability(perChatOverrides){if(perChatOverrides!==void 0){const enabledServerIds=new Set(perChatOverrides.filter(o=>o.enabled).map(o=>o.serverId));if(enabledServerIds.size===0)return!1;for(const[serverId,state2]of Object.entries(this._healthChecks))if(enabledServerIds.has(serverId)&&state2.status===HealthCheckStatus.SUCCESS&&state2.capabilities?.
server?.resources!==void 0)return!0;for(const[serverName,connection]of this.connections)if(enabledServerIds.has(serverName)&&MCPService.supportsResources(connection))return!0;return!1}for(const state2 of Object.values(this._healthChecks))if(state2.status===HealthCheckStatus.SUCCESS&&state2.capabilities?.server?.resources!==void 0)return!0;for(const connection of this.connections.values())if(MCPService.supportsResources(connection))return!0;return!1}getServersWithResources(){const servers=[];for(const[
name,connection]of this.connections)MCPService.supportsResources(connection)&&!servers.includes(name)&&servers.push(name);for(const[serverId,state2]of Object.entries(this._healthChecks))!servers.includes(serverId)&&state2.status===HealthCheckStatus.SUCCESS&&state2.capabilities?.server?.resources!==void 0&&servers.push(serverId);return servers}async fetchAllResources(forceRefresh=!1){const serversWithResources=this.getServersWithResources();if(serversWithResources.length!==0){if(!forceRefresh&&serversWithResources.
every(serverName=>{const serverRes=mcpResourceStore.getServerResources(serverName);return!serverRes||!serverRes.lastFetched?!1:Date.now()-serverRes.lastFetched.getTime()<DEFAULT_CACHE_TTL_MS})){console.log("[MCPStore] Using cached resources");return}mcpResourceStore.setLoading(!0);try{await Promise.all(serversWithResources.map(serverName=>this.fetchServerResources(serverName)))}finally{mcpResourceStore.setLoading(!1)}}}async fetchServerResources(serverName){const connection=this.connections.get(
serverName);if(!connection){console.warn(`[MCPStore] No connection found for server: ${serverName}`);return}if(MCPService.supportsResources(connection)){mcpResourceStore.setServerLoading(serverName,!0);try{const[resources,templates]=await Promise.all([MCPService.listAllResources(connection),MCPService.listAllResourceTemplates(connection)]);mcpResourceStore.setServerResources(serverName,resources,templates)}catch(error2){const message=error2 instanceof Error?error2.message:String(error2);mcpResourceStore.
setServerError(serverName,message),console.error(`[MCPStore][${serverName}] Failed to fetch resources:`,error2)}}}async readResource(uri2){const cached2=mcpResourceStore.getCachedContent(uri2);if(cached2)return cached2.content;const serverName=mcpResourceStore.findServerForUri(uri2);if(!serverName)return console.error(`[MCPStore] No server found for resource URI: ${uri2}`),null;const connection=this.connections.get(serverName);if(!connection)return console.error(`[MCPStore] No connection found f\
or server: ${serverName}`),null;try{const result=await MCPService.readResource(connection,uri2),resourceInfo=mcpResourceStore.findResourceByUri(uri2);return resourceInfo&&mcpResourceStore.cacheResourceContent(resourceInfo,result.contents),result.contents}catch(error2){return console.error(`[MCPStore] Failed to read resource ${uri2}:`,error2),null}}async subscribeToResource(uri2){const serverName=mcpResourceStore.findServerForUri(uri2);if(!serverName)return console.error(`[MCPStore] No server fou\
nd for resource URI: ${uri2}`),!1;const connection=this.connections.get(serverName);if(!connection)return console.error(`[MCPStore] No connection found for server: ${serverName}`),!1;if(!MCPService.supportsResourceSubscriptions(connection))return!1;try{return await MCPService.subscribeResource(connection,uri2),mcpResourceStore.addSubscription(uri2,serverName),!0}catch(error2){return console.error(`[MCPStore] Failed to subscribe to resource ${uri2}:`,error2),!1}}async unsubscribeFromResource(uri2){
const serverName=mcpResourceStore.findServerForUri(uri2);if(!serverName)return console.error(`[MCPStore] No server found for resource URI: ${uri2}`),!1;const connection=this.connections.get(serverName);if(!connection)return console.error(`[MCPStore] No connection found for server: ${serverName}`),!1;try{return await MCPService.unsubscribeResource(connection,uri2),mcpResourceStore.removeSubscription(uri2),!0}catch(error2){return console.error(`[MCPStore] Failed to unsubscribe from resource ${uri2}\
:`,error2),!1}}async attachResource(uri2){const resourceInfo=mcpResourceStore.findResourceByUri(uri2);if(!resourceInfo)return console.error(`[MCPStore] Resource not found: ${uri2}`),null;if(mcpResourceStore.isAttached(uri2))return null;const attachment=mcpResourceStore.addAttachment(resourceInfo);try{const content2=await this.readResource(uri2);content2?mcpResourceStore.updateAttachmentContent(attachment.id,content2):mcpResourceStore.updateAttachmentError(attachment.id,"Failed to read resource")}catch(error2){
const message=error2 instanceof Error?error2.message:String(error2);mcpResourceStore.updateAttachmentError(attachment.id,message)}return mcpResourceStore.getAttachment(attachment.id)??null}removeResourceAttachment(attachmentId){mcpResourceStore.removeAttachment(attachmentId)}clearResourceAttachments(){mcpResourceStore.clearAttachments()}getResourceContextForChat(){return mcpResourceStore.formatAttachmentsForContext()}consumeResourceAttachmentsAsExtras(){const extras=mcpResourceStore.toMessageExtras();
return extras.length>0&&mcpResourceStore.clearAttachments(),extras}}const mcpStore=new MCPStore;var root_2$1a=from_html('<button type="button"><!> <span class="max-w-[150px] truncate text-xs"> </span> <!></button>'),root_8$t=from_html('<img class="h-3 w-3 shrink-0 rounded-sm"/>'),root_7$u=from_html('<div class="flex items-center gap-1 text-xs"><!> <span class="truncate"> </span></div>'),root_1$14=from_html("<!> <!>",1);function ChatAttachmentsListItemMcpResource($$anchor,$$props){push$1($$props,
!0);const ResourceIcon=user_derived(()=>getResourceIcon($$props.attachment.resource.mimeType,$$props.attachment.resource.uri)),serverName=user_derived(()=>mcpStore.getServerDisplayName($$props.attachment.resource.serverName)),favicon=user_derived(()=>mcpStore.getServerFavicon($$props.attachment.resource.serverName));function getStatusClass(attachment){return attachment.error?"border-red-500/50 bg-red-500/10":(attachment.loading,"border-border/50 bg-muted/30")}var fragment=comment$2(),node2=first_child(
fragment);component(node2,()=>Root$5,($$anchor2,Tooltip_Root)=>{Tooltip_Root($$anchor2,{children:($$anchor3,$$slotProps)=>{var fragment_1=root_1$14(),node_1=first_child(fragment_1);component(node_1,()=>Tooltip_trigger,($$anchor4,Tooltip_Trigger)=>{Tooltip_Trigger($$anchor4,{children:($$anchor5,$$slotProps2)=>{var button=root_2$1a(),node_2=child(button);{var consequent=$$anchor6=>{Loader_circle($$anchor6,{class:"h-3 w-3 animate-spin text-muted-foreground"})},consequent_1=$$anchor6=>{Circle_alert(
$$anchor6,{class:"h-3 w-3 text-red-500"})},alternate=$$anchor6=>{var fragment_4=comment$2(),node_3=first_child(fragment_4);component(node_3,()=>get$3(ResourceIcon),($$anchor7,ResourceIcon_1)=>{ResourceIcon_1($$anchor7,{class:"h-3 w-3 text-muted-foreground"})}),append($$anchor6,fragment_4)};if_block(node_2,$$render=>{$$props.attachment.loading?$$render(consequent):$$props.attachment.error?$$render(consequent_1,1):$$render(alternate,-1)})}var span=sibling(node_2,2),text2=child(span,!0);reset(span);
var node_4=sibling(span,2);{var consequent_2=$$anchor6=>{ActionIcon($$anchor6,{class:"-my-2 -mr-1.5 bg-transparent",get icon(){return X},iconSize:"h-2 w-2",onclick:()=>$$props.onRemove?.($$props.attachment.id),stopPropagationOnClick:!0,tooltip:"Remove"})};if_block(node_4,$$render=>{$$props.onRemove&&$$render(consequent_2)})}reset(button),template_effect(($0,$1)=>{set_class(button,1,$0),button.disabled=!$$props.onclick,set_text(text2,$1)},[()=>clsx(["flex flex-shrink-0 items-center gap-1.5 rounde\
d-md border px-2 py-0.75 text-sm transition-colors",getStatusClass($$props.attachment),$$props.onclick&&"cursor-pointer hover:bg-muted/50",$$props.class]),()=>getResourceDisplayName($$props.attachment.resource)]),delegated("click",button,function(...$$args){$$props.onclick?.apply(this,$$args)}),append($$anchor5,button)},$$slots:{default:!0}})});var node_5=sibling(node_1,2);component(node_5,()=>Tooltip_content,($$anchor4,Tooltip_Content)=>{Tooltip_Content($$anchor4,{children:($$anchor5,$$slotProps2)=>{
var div=root_7$u(),node_6=child(div);{var consequent_3=$$anchor6=>{var img=root_8$t();template_effect(()=>{set_attribute(img,"alt",$$props.attachment.resource.serverName),set_attribute(img,"src",get$3(favicon))}),event("error",img,e=>{e.currentTarget.style.display="none"}),replay_events(img),append($$anchor6,img)};if_block(node_6,$$render=>{get$3(favicon)&&$$render(consequent_3)})}var span_1=sibling(node_6,2),text_1=child(span_1,!0);reset(span_1),reset(div),template_effect(()=>set_text(text_1,get$3(
serverName))),append($$anchor5,div)},$$slots:{default:!0}})}),append($$anchor3,fragment_1)},$$slots:{default:!0}})}),append($$anchor,fragment),pop()}delegate(["click"]);const info$1=($$anchor,text2=noop$3)=>{var fragment=comment$2(),node_2=first_child(fragment);{var consequent_1=$$anchor2=>{var span=root_6$u(),text_3=child(span,!0);reset(span),template_effect(()=>set_text(text_3,text2())),append($$anchor2,span)};if_block(node_2,$$render=>{text2()&&$$render(consequent_1)})}append($$anchor,fragment)};
var root_2$19=from_html("<div></div>"),root_1$13=from_html('<div class="relative"><div> </div> <!></div>'),root_3$Y=from_html('<div class="absolute top-2 right-2 opacity-0 transition-opacity group-hover:opacity-100"><!></div>'),root_4$E=from_html('<div class="flex h-8 w-8 items-center justify-center rounded bg-primary/10 text-xs font-medium text-primary"> </div>'),root_6$u=from_html('<span class="text-xs text-muted-foreground"> </span>'),root_9$m=from_html('<div class="flex items-start gap-3"><d\
iv class="flex min-w-0 flex-1 flex-col items-start text-left"><span class="w-full truncate text-sm font-medium text-foreground"> </span> <!> <!></div></div>'),root_11$f=from_html('<span class="mb-3 block truncate text-sm font-medium text-foreground"> </span> <!>',1),root_7$t=from_html('<button type="button"><!> <div><!></div></button>'),root_13$f=from_html('<button type="button"><!> <div class="flex flex-col items-start gap-0.5"><span> </span> <!></div> <!></button>');function ChatAttachmentsListItemThumbnailFile($$anchor,$$props){
push$1($$props,!0);const textPreview=($$anchor2,content2=noop$3)=>{var div=root_1$13(),div_1=child(div),text_1=child(div_1,!0);reset(div_1);var node2=sibling(div_1,2);{var consequent=$$anchor3=>{var div_2=root_2$19();template_effect(()=>set_class(div_2,1,`pointer-events-none absolute right-0 bottom-0 left-0 h-4 bg-gradient-to-t from-muted to-transparent ${readonly2()?"h-6":""}`)),append($$anchor3,div_2)};if_block(node2,$$render=>{content2().length>150&&$$render(consequent)})}reset(div),template_effect(
$0=>{set_class(div_1,1,`font-mono text-xs leading-relaxed break-words whitespace-pre-wrap text-muted-foreground ${readonly2()?"":"max-h-3rem line-height-1.2"}`),set_text(text_1,$0)},[()=>getPreviewText(content2())]),append($$anchor2,div)},removeButton=$$anchor2=>{var div_3=root_3$Y(),node_1=child(div_3);ActionIcon(node_1,{get icon(){return X},tooltip:"Remove",stopPropagationOnClick:!0,onclick:()=>$$props.onRemove?.($$props.id)}),reset(div_3),append($$anchor2,div_3)},fileIcon=$$anchor2=>{var div_4=root_4$E(),
text_2=child(div_4,!0);reset(div_4),template_effect(()=>set_text(text_2,get$3(fileTypeLabel))),append($$anchor2,div_4)};let className=prop($$props,"class",3,""),readonly2=prop($$props,"readonly",3,!1),isPdf=user_derived(()=>isPdfFile$1($$props.attachment,$$props.uploadedFile)),isPdfWithContent=user_derived(()=>get$3(isPdf)&&!!$$props.textContent),isText=user_derived(()=>isTextFile($$props.attachment,$$props.uploadedFile)),isTextWithContent=user_derived(()=>get$3(isText)&&!!$$props.textContent),fileTypeLabel=user_derived(
()=>{if($$props.uploadedFile?.type)return getFileTypeLabel($$props.uploadedFile.type);if($$props.attachment){if("mimeType"in $$props.attachment&&$$props.attachment.mimeType)return getFileTypeLabel($$props.attachment.mimeType);if($$props.attachment.type)return getFileTypeLabel($$props.attachment.type)}return getFileTypeLabel($$props.name)}),pdfProcessingMode=user_derived(()=>$$props.attachment?.type===AttachmentType.PDF?$$props.attachment.processedAsImages?"Sent as Image":"Sent as Text":null);var fragment_1=comment$2(),
node_3=first_child(fragment_1);{var consequent_6=$$anchor2=>{var button=root_7$t(),node_4=child(button);{var consequent_2=$$anchor3=>{removeButton($$anchor3)};if_block(node_4,$$render=>{readonly2()||$$render(consequent_2)})}var div_5=sibling(node_4,2),node_5=child(div_5);{var consequent_4=$$anchor3=>{var div_6=root_9$m(),div_7=child(div_6),span_1=child(div_7),text_4=child(span_1,!0);reset(span_1);var node_6=sibling(span_1,2);{let $0=user_derived(()=>get$3(pdfProcessingMode)||($$props.size?formatFileSize(
$$props.size):void 0));info$1(node_6,()=>get$3($0))}var node_7=sibling(node_6,2);{var consequent_3=$$anchor4=>{textPreview($$anchor4,()=>$$props.textContent)};if_block(node_7,$$render=>{$$props.textContent&&$$render(consequent_3)})}reset(div_7),reset(div_6),template_effect(()=>set_text(text_4,$$props.name)),append($$anchor3,div_6)},alternate=$$anchor3=>{var fragment_4=root_11$f(),span_2=first_child(fragment_4),text_5=child(span_2,!0);reset(span_2);var node_8=sibling(span_2,2);{var consequent_5=$$anchor4=>{
textPreview($$anchor4,()=>$$props.textContent)};if_block(node_8,$$render=>{$$props.textContent&&$$render(consequent_5)})}template_effect(()=>set_text(text_5,$$props.name)),append($$anchor3,fragment_4)};if_block(node_5,$$render=>{readonly2()?$$render(consequent_4):$$render(alternate,-1)})}reset(div_5),reset(button),template_effect(()=>{set_attribute(button,"aria-label",readonly2()?`Preview ${$$props.name}`:void 0),set_class(button,1,`rounded-lg border border-border bg-muted p-3 ${className()??""}\
 cursor-pointer ${readonly2()?"w-full max-w-2xl transition-shadow hover:shadow-md":`group relative text-left ${$$props.textContent?"max-h-24 max-w-72":"max-w-36"}`} overflow-hidden`),set_class(div_5,1,clsx([!readonly2()&&"pr-8","overflow-hidden"]))}),delegated("click",button,function(...$$args){$$props.onclick?.apply(this,$$args)}),append($$anchor2,button)},alternate_1=$$anchor2=>{var button_1=root_13$f(),node_9=child(button_1);fileIcon(node_9);var div_8=sibling(node_9,2),span_3=child(div_8),text_6=child(
span_3,!0);reset(span_3);var node_10=sibling(span_3,2);{let $0=user_derived(()=>get$3(pdfProcessingMode)||($$props.size?formatFileSize($$props.size):void 0));info$1(node_10,()=>get$3($0))}reset(div_8);var node_11=sibling(div_8,2);{var consequent_7=$$anchor3=>{removeButton($$anchor3)};if_block(node_11,$$render=>{readonly2()||$$render(consequent_7)})}reset(button_1),template_effect(()=>{set_class(button_1,1,`group flex items-center gap-3 rounded-lg border border-border bg-muted p-3 ${className()??
""} relative`),set_class(span_3,1,`max-w-24 truncate text-sm font-medium text-foreground ${readonly2()?"":"group-hover:pr-6"} md:max-w-32`),set_text(text_6,$$props.name)}),delegated("click",button_1,function(...$$args){$$props.onclick?.apply(this,$$args)}),append($$anchor2,button_1)};if_block(node_3,$$render=>{get$3(isTextWithContent)||get$3(isPdfWithContent)?$$render(consequent_6):$$render(alternate_1,-1)})}append($$anchor,fragment_1),pop()}delegate(["click"]);var root_1$12=from_html("<img/>"),
root_2$18=from_html('<button class="block h-full w-full rounded-lg focus:ring-2 focus:ring-primary focus:ring-offset-2 focus:outline-none" type="button"><!></button>'),root_4$D=from_html('<div class="absolute top-1 right-1 flex items-center justify-center opacity-0 transition-opacity group-hover:opacity-100"><!></div>'),root$1I=from_html("<div><!> <!></div>");function ChatAttachmentsListItemThumbnailImage($$anchor,$$props){push$1($$props,!0);const image2=$$anchor2=>{var img=root_1$12();template_effect(
()=>{set_attribute(img,"src",$$props.preview),set_attribute(img,"alt",$$props.name),set_class(img,1,`${height()??""} ${width()??""} cursor-pointer object-cover ${imageClass()??""}`)}),append($$anchor2,img)};let className=prop($$props,"class",3,""),height=prop($$props,"height",3,"h-16"),imageClass=prop($$props,"imageClass",3,""),readonly2=prop($$props,"readonly",3,!1),width=prop($$props,"width",3,"w-auto");var div=root$1I(),node2=child(div);{var consequent=$$anchor2=>{var button=root_2$18(),node_1=child(
button);image2(node_1),reset(button),template_effect(()=>set_attribute(button,"aria-label",`Preview ${$$props.name??""}`)),delegated("click",button,function(...$$args){$$props.onclick?.apply(this,$$args)}),append($$anchor2,button)},alternate=$$anchor2=>{image2($$anchor2)};if_block(node2,$$render=>{$$props.onclick?$$render(consequent):$$render(alternate,-1)})}var node_2=sibling(node2,2);{var consequent_1=$$anchor2=>{var div_1=root_4$D(),node_3=child(div_1);ActionIcon(node_3,{class:"text-white",get icon(){
return X},onclick:()=>$$props.onRemove?.($$props.id),stopPropagationOnClick:!0,tooltip:"Remove"}),reset(div_1),append($$anchor2,div_1)};if_block(node_2,$$render=>{readonly2()||$$render(consequent_1)})}reset(div),template_effect(()=>set_class(div,1,`group relative overflow-hidden rounded-lg bg-muted shadow-lg dark:border dark:border-muted ${className()??""}`)),append($$anchor,div),pop()}delegate(["click"]);class ModelsService{static async list(){return apiFetch(API_MODELS.LIST)}static async listRouter(){
return apiFetch(API_MODELS.LIST)}static async load(modelId,extraArgs){const payload={model:modelId};return extraArgs&&extraArgs.length>0&&(payload.extra_args=extraArgs),apiPost(API_MODELS.LOAD,payload)}static async unload(modelId){return apiPost(API_MODELS.UNLOAD,{model:modelId})}static isModelLoaded(model){return model.status.value===ServerModelStatus.LOADED}static isModelLoading(model){return model.status.value===ServerModelStatus.LOADING}static parseModelId(modelId){const result={raw:modelId,
orgName:null,modelName:null,params:null,activatedParams:null,quantization:null,tags:[]},colonIdx=modelId.indexOf(MODEL_ID_QUANTIZATION_SEPARATOR);let modelPath;colonIdx!==MODEL_ID_NOT_FOUND?(result.quantization=modelId.slice(colonIdx+1)||null,modelPath=modelId.slice(0,colonIdx)):modelPath=modelId;const slashIdx=modelPath.indexOf(MODEL_ID_ORG_SEPARATOR);let modelStr;slashIdx!==MODEL_ID_NOT_FOUND?(result.orgName=modelPath.slice(0,slashIdx),modelStr=modelPath.slice(slashIdx+1)):modelStr=modelPath;const dotIdx=modelStr.
lastIndexOf(".");if(dotIdx!==MODEL_ID_NOT_FOUND&&!result.quantization){const afterDot=modelStr.slice(dotIdx+1);MODEL_QUANTIZATION_SEGMENT_RE.test(afterDot)&&(result.quantization=afterDot,modelStr=modelStr.slice(0,dotIdx))}const segments=modelStr.split(MODEL_ID_SEGMENT_SEPARATOR);if(!result.quantization&&segments.length>1){const last=segments[segments.length-1],secondLast=segments.length>2?segments[segments.length-2]:null;MODEL_QUANTIZATION_SEGMENT_RE.test(last)&&(secondLast&&MODEL_CUSTOM_QUANTIZATION_PREFIX_RE.
test(secondLast)?(result.quantization=`${secondLast}-${last}`,segments.splice(segments.length-2,2)):(result.quantization=last,segments.pop()))}let paramsIdx=MODEL_ID_NOT_FOUND,activatedParamsIdx=MODEL_ID_NOT_FOUND;for(let i=0;i<segments.length;i++){const seg=segments[i];paramsIdx===MODEL_ID_NOT_FOUND&&MODEL_PARAMS_RE.test(seg)?(paramsIdx=i,result.params=seg.toUpperCase()):paramsIdx!==MODEL_ID_NOT_FOUND&&MODEL_ACTIVATED_PARAMS_RE.test(seg)&&(activatedParamsIdx=i,result.activatedParams=seg.toUpperCase())}
const pivotIdx=paramsIdx!==MODEL_ID_NOT_FOUND?paramsIdx:segments.length;return result.modelName=segments.slice(0,pivotIdx).join(MODEL_ID_SEGMENT_SEPARATOR)||null,paramsIdx!==MODEL_ID_NOT_FOUND&&(result.tags=segments.slice(paramsIdx+1).filter((_,relIdx)=>{const absIdx=paramsIdx+1+relIdx;return absIdx===activatedParamsIdx?!1:!MODEL_IGNORED_SEGMENTS.has(segments[absIdx].toUpperCase())})),result}}class RouterService{static chat(id2){return`${ROUTES.CHAT}/${id2}`}static settings(section){return`${ROUTES.
SETTINGS}/${section}`}}class ConversationsStore{#conversations=state$1(proxy([]));get conversations(){return get$3(this.#conversations)}set conversations(value){set$1(this.#conversations,value,!0)}#activeConversation=state$1(null);get activeConversation(){return get$3(this.#activeConversation)}set activeConversation(value){set$1(this.#activeConversation,value,!0)}#activeMessages=state$1(proxy([]));get activeMessages(){return get$3(this.#activeMessages)}set activeMessages(value){set$1(this.#activeMessages,
value,!0)}#isInitialized=state$1(!1);get isInitialized(){return get$3(this.#isInitialized)}set isInitialized(value){set$1(this.#isInitialized,value,!0)}#pendingMcpServerOverrides=state$1(proxy(ConversationsStore.loadMcpDefaults()));get pendingMcpServerOverrides(){return get$3(this.#pendingMcpServerOverrides)}set pendingMcpServerOverrides(value){set$1(this.#pendingMcpServerOverrides,value,!0)}static loadMcpDefaults(){if(typeof globalThis.localStorage>"u")return[];try{const raw2=localStorage.getItem(
MCP_DEFAULT_ENABLED_LOCALSTORAGE_KEY);if(!raw2)return[];const parsed=JSON.parse(raw2);return Array.isArray(parsed)?parsed.filter(o=>typeof o=="object"&&o!==null&&"serverId"in o&&"enabled"in o):[]}catch{return[]}}saveMcpDefaults(){if(typeof globalThis.localStorage>"u")return;const plain=this.pendingMcpServerOverrides.map(o=>({serverId:o.serverId,enabled:o.enabled}));plain.length>0?localStorage.setItem(MCP_DEFAULT_ENABLED_LOCALSTORAGE_KEY,JSON.stringify(plain)):localStorage.removeItem(MCP_DEFAULT_ENABLED_LOCALSTORAGE_KEY)}titleUpdateConfirmationCallback;messageUpdateCallback=null;async init(){
if(!this.isInitialized)try{await runLegacyMigration(),await this.loadConversations(),this.isInitialized=!0}catch(error2){console.error("Failed to initialize conversations:",error2)}}async initialize(){return this.init()}registerMessageUpdateCallback(callback){this.messageUpdateCallback=callback}addMessageToActive(message){this.activeMessages.push(message)}updateMessageAtIndex(index2,updates){index2!==-1&&this.activeMessages[index2]&&(this.activeMessages[index2]={...this.activeMessages[index2],...updates})}findMessageIndex(messageId){
return this.activeMessages.findIndex(m=>m.id===messageId)}sliceActiveMessages(startIndex){this.activeMessages=this.activeMessages.slice(0,startIndex)}removeMessageAtIndex(index2){if(index2!==-1)return this.activeMessages.splice(index2,1)[0]}setTitleUpdateConfirmationCallback(callback){this.titleUpdateConfirmationCallback=callback}async loadConversations(){const conversations2=await DatabaseService.getAllConversations();this.conversations=conversations2}async createConversation(name){const conversationName=name||
`Chat ${new Date().toLocaleString()}`,conversation=await DatabaseService.createConversation(conversationName);if(this.pendingMcpServerOverrides.length>0){const plainOverrides=this.pendingMcpServerOverrides.map(o=>({serverId:o.serverId,enabled:o.enabled}));conversation.mcpServerOverrides=plainOverrides,await DatabaseService.updateConversation(conversation.id,{mcpServerOverrides:plainOverrides}),this.pendingMcpServerOverrides=[]}return this.conversations=[conversation,...this.conversations],this.activeConversation=
conversation,this.activeMessages=[],await goto(RouterService.chat(conversation.id)),conversation.id}async loadConversation(convId){try{const conversation=await DatabaseService.getConversation(convId);if(!conversation)return!1;if(this.pendingMcpServerOverrides=[],this.activeConversation=conversation,conversation.currNode){const allMessages=await DatabaseService.getConversationMessages(convId),filteredMessages=filterByLeafNodeId(allMessages,conversation.currNode,!1);this.activeMessages=filteredMessages}else{
const messages=await DatabaseService.getConversationMessages(convId);this.activeMessages=messages}return!0}catch(error2){return console.error("Failed to load conversation:",error2),!1}}clearActiveConversation(){this.activeConversation=null,this.activeMessages=[],this.pendingMcpServerOverrides=ConversationsStore.loadMcpDefaults()}async deleteConversation(convId,options){try{if(await DatabaseService.deleteConversation(convId,options),options?.deleteWithForks){const idsToRemove=new SvelteSet([convId]),
queue=[convId];for(;queue.length>0;){const parentId=queue.pop();for(const c2 of this.conversations)c2.forkedFromConversationId===parentId&&!idsToRemove.has(c2.id)&&(idsToRemove.add(c2.id),queue.push(c2.id))}this.conversations=this.conversations.filter(c2=>!idsToRemove.has(c2.id)),this.activeConversation&&idsToRemove.has(this.activeConversation.id)&&(this.clearActiveConversation(),await goto(ROUTES.NEW_CHAT))}else{const newParent=this.conversations.find(c2=>c2.id===convId)?.forkedFromConversationId;
this.conversations=this.conversations.filter(c2=>c2.id!==convId).map(c2=>c2.forkedFromConversationId===convId?{...c2,forkedFromConversationId:newParent}:c2),this.activeConversation?.id===convId&&(this.clearActiveConversation(),await goto(ROUTES.NEW_CHAT))}}catch(error2){console.error("Failed to delete conversation:",error2)}}async deleteAll(){try{const allConversations=await DatabaseService.getAllConversations();for(const conv of allConversations)await DatabaseService.deleteConversation(conv.id);
this.clearActiveConversation(),this.conversations=[],toast.success("All conversations deleted"),await goto(ROUTES.NEW_CHAT)}catch(error2){console.error("Failed to delete all conversations:",error2),toast.error("Failed to delete conversations")}}async refreshActiveMessages(){if(!this.activeConversation)return;const allMessages=await DatabaseService.getConversationMessages(this.activeConversation.id);if(allMessages.length===0){this.activeMessages=[];return}const leafNodeId=this.activeConversation.
currNode||allMessages.reduce((latest,msg)=>msg.timestamp>latest.timestamp?msg:latest).id,currentPath=filterByLeafNodeId(allMessages,leafNodeId,!1);this.activeMessages=currentPath}async getConversationMessages(convId){return await DatabaseService.getConversationMessages(convId)}async updateConversationName(convId,name){try{await DatabaseService.updateConversation(convId,{name});const convIndex=this.conversations.findIndex(c2=>c2.id===convId);convIndex!==-1&&(this.conversations[convIndex].name=name,
this.conversations=[...this.conversations]),this.activeConversation?.id===convId&&(this.activeConversation={...this.activeConversation,name})}catch(error2){console.error("Failed to update conversation name:",error2)}}async updateConversationTitleWithConfirmation(convId,newTitle){try{if(config$1().askForTitleConfirmation&&this.titleUpdateConfirmationCallback){const conversation=await DatabaseService.getConversation(convId);if(!conversation||!await this.titleUpdateConfirmationCallback(conversation.
name,newTitle))return!1}return await this.updateConversationName(convId,newTitle),!0}catch(error2){return console.error("Failed to update conversation title with confirmation:",error2),!1}}updateConversationTimestamp(){if(!this.activeConversation)return;const chatIndex=this.conversations.findIndex(c2=>c2.id===this.activeConversation.id);if(chatIndex!==-1){this.conversations[chatIndex].lastModified=Date.now();const updatedConv=this.conversations.splice(chatIndex,1)[0];this.conversations=[updatedConv,
...this.conversations]}}async updateCurrentNode(nodeId){this.activeConversation&&(await DatabaseService.updateCurrentNode(this.activeConversation.id,nodeId),this.activeConversation={...this.activeConversation,currNode:nodeId})}async navigateToSibling(siblingId){if(!this.activeConversation)return;const allMessages=await DatabaseService.getConversationMessages(this.activeConversation.id),rootMessage=allMessages.find(m=>m.type==="root"&&m.parent===null),currentFirstUserMessage=this.activeMessages.find(
m=>m.role===MessageRole.USER&&m.parent===rootMessage?.id),currentLeafNodeId=findLeafNode(allMessages,siblingId);if(await DatabaseService.updateCurrentNode(this.activeConversation.id,currentLeafNodeId),this.activeConversation={...this.activeConversation,currNode:currentLeafNodeId},await this.refreshActiveMessages(),rootMessage&&this.activeMessages.length>0){const newFirstUserMessage=this.activeMessages.find(m=>m.role===MessageRole.USER&&m.parent===rootMessage.id);newFirstUserMessage&&newFirstUserMessage.
content.trim()&&(!currentFirstUserMessage||newFirstUserMessage.id!==currentFirstUserMessage.id||newFirstUserMessage.content.trim()!==currentFirstUserMessage.content.trim())&&await this.updateConversationTitleWithConfirmation(this.activeConversation.id,generateConversationTitle(newFirstUserMessage.content,!!config$1().titleGenerationUseFirstLine))}}getMcpServerOverride(serverId){return this.activeConversation?this.activeConversation.mcpServerOverrides?.find(o=>o.serverId===serverId):this.pendingMcpServerOverrides.
find(o=>o.serverId===serverId)}getAllMcpServerOverrides(){return this.activeConversation?.mcpServerOverrides?this.activeConversation.mcpServerOverrides:this.pendingMcpServerOverrides}isMcpServerEnabledForChat(serverId){return this.getMcpServerOverride(serverId)?.enabled??!1}async setMcpServerOverride(serverId,enabled){if(!this.activeConversation){this.setPendingMcpServerOverride(serverId,enabled);return}const currentOverrides=(this.activeConversation.mcpServerOverrides||[]).map(o=>({serverId:o.serverId,
enabled:o.enabled}));let newOverrides;if(enabled===void 0)newOverrides=currentOverrides.filter(o=>o.serverId!==serverId);else{const existingIndex=currentOverrides.findIndex(o=>o.serverId===serverId);existingIndex>=0?(newOverrides=[...currentOverrides],newOverrides[existingIndex]={serverId,enabled}):newOverrides=[...currentOverrides,{serverId,enabled}]}await DatabaseService.updateConversation(this.activeConversation.id,{mcpServerOverrides:newOverrides.length>0?newOverrides:void 0}),this.activeConversation=
{...this.activeConversation,mcpServerOverrides:newOverrides.length>0?newOverrides:void 0};const convIndex=this.conversations.findIndex(c2=>c2.id===this.activeConversation.id);convIndex!==-1&&(this.conversations[convIndex].mcpServerOverrides=newOverrides.length>0?newOverrides:void 0,this.conversations=[...this.conversations])}setPendingMcpServerOverride(serverId,enabled){if(enabled===void 0)this.pendingMcpServerOverrides=this.pendingMcpServerOverrides.filter(o=>o.serverId!==serverId);else{const existingIndex=this.
pendingMcpServerOverrides.findIndex(o=>o.serverId===serverId);if(existingIndex>=0){const newOverrides=[...this.pendingMcpServerOverrides];newOverrides[existingIndex]={serverId,enabled},this.pendingMcpServerOverrides=newOverrides}else this.pendingMcpServerOverrides=[...this.pendingMcpServerOverrides,{serverId,enabled}]}this.saveMcpDefaults()}async toggleMcpServerForChat(serverId){const currentEnabled=this.isMcpServerEnabledForChat(serverId);await this.setMcpServerOverride(serverId,!currentEnabled)}async removeMcpServerOverride(serverId){
await this.setMcpServerOverride(serverId,void 0)}clearPendingMcpServerOverrides(){this.pendingMcpServerOverrides=[],this.saveMcpDefaults()}async forkConversation(messageId,options){if(!this.activeConversation)return null;try{const newConv=await DatabaseService.forkConversation(this.activeConversation.id,messageId,options);return this.conversations=[newConv,...this.conversations],await goto(RouterService.chat(newConv.id)),toast.success("Conversation forked"),newConv.id}catch(error2){return console.
error("Failed to fork conversation:",error2),toast.error("Failed to fork conversation"),null}}generateConversationFilename(conversation,msgs){const sanitizedName=(conversation.name??"").trim().toLowerCase().replace(NON_ALPHANUMERIC_REGEX,EXPORT_CONV_NONALNUM_REPLACEMENT).replace(MULTIPLE_UNDERSCORE_REGEX,"_").substring(0,EXPORT_CONV_NAME_SUFFIX_MAX_LENGTH),formattedDate=(msgs?.length?new Date(Math.max(...msgs.map(m=>m.timestamp))):new Date).toISOString().slice(0,ISO_TIMESTAMP_SLICE_LENGTH).replace(
ISO_DATE_TIME_SEPARATOR,ISO_DATE_TIME_SEPARATOR_REPLACEMENT).replaceAll(ISO_TIME_SEPARATOR,ISO_TIME_SEPARATOR_REPLACEMENT),trimmedConvId=conversation.id?.slice(0,EXPORT_CONV_ID_TRIM_LENGTH)??"";return`${formattedDate}_conv_${trimmedConvId}_${sanitizedName}.json`}downloadConversationFile(data,filename){const conversation="conv"in data?data.conv:Array.isArray(data)?data[0]?.conv:void 0,msgs="messages"in data?data.messages:Array.isArray(data)?data[0]?.messages:void 0;if(!conversation){console.error(
"Invalid data: missing conversation");return}let downloadFilename;filename?downloadFilename=filename:Array.isArray(data)&&data.length>1?downloadFilename=`${new Date().toISOString().split(ISO_DATE_TIME_SEPARATOR)[0]}_conversations.json`:downloadFilename=this.generateConversationFilename(conversation,msgs);const blob=new Blob([JSON.stringify(data,null,2)],{type:"application/json"}),url2=URL.createObjectURL(blob),a=document.createElement("a");a.href=url2,a.download=downloadFilename,document.body.appendChild(
a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(url2)}async downloadConversation(convId){let conversation,messages;if(this.activeConversation?.id===convId)conversation=this.activeConversation,messages=this.activeMessages;else{if(conversation=await DatabaseService.getConversation(convId),!conversation)return;messages=await DatabaseService.getConversationMessages(convId)}this.downloadConversationFile({conv:conversation,messages})}async importConversations(){return new Promise((resolve2,reject)=>{
const input=document.createElement("input");input.type=HtmlInputType.FILE,input.accept=FileExtensionText.JSON,input.onchange=async e=>{const file=e.target?.files?.[0];if(!file){reject(new Error("No file selected"));return}try{const text2=await file.text(),parsedData=JSON.parse(text2);let importedData;if(Array.isArray(parsedData))importedData=parsedData;else if(parsedData&&typeof parsedData=="object"&&"conv"in parsedData&&"messages"in parsedData)importedData=[parsedData];else throw new Error("Inv\
alid file format");const result=await DatabaseService.importConversations(importedData);toast.success(`Imported ${result.imported} conversation(s), skipped ${result.skipped}`),await this.loadConversations();const importedConversations=(Array.isArray(importedData)?importedData:[importedData]).map(item=>item.conv);resolve2(importedConversations)}catch(err){const message=err instanceof Error?err.message:"Unknown error";console.error("Failed to import conversations:",err),toast.error("Import failed",
{description:message}),reject(new Error(`Import failed: ${message}`))}},input.click()})}async importConversationsData(data){const result=await DatabaseService.importConversations(data);return await this.loadConversations(),result}}const conversationsStore=new ConversationsStore;conversationsStore.init();const conversations=()=>conversationsStore.conversations,activeConversation=()=>conversationsStore.activeConversation,activeMessages=()=>conversationsStore.activeMessages,isConversationsInitialized=()=>conversationsStore.
isInitialized;function buildConversationTree(convs){const childrenByParent=new SvelteMap,forkIds=new SvelteSet;for(const conv of convs)if(conv.forkedFromConversationId){forkIds.add(conv.id);const siblings2=childrenByParent.get(conv.forkedFromConversationId)||[];siblings2.push(conv),childrenByParent.set(conv.forkedFromConversationId,siblings2)}const result=[],visited=new SvelteSet;function walk(conv,depth){visited.add(conv.id),result.push({conversation:conv,depth});const children=childrenByParent.
get(conv.id);if(children){children.sort((a,b)=>b.lastModified-a.lastModified);for(const child2 of children)walk(child2,depth+1)}}const roots=convs.filter(c2=>!forkIds.has(c2.id));for(const root2 of roots)walk(root2,0);for(const conv of convs)visited.has(conv.id)||walk(conv,1);return result}class ModelsStore{#models=state$1(proxy([]));get models(){return get$3(this.#models)}set models(value){set$1(this.#models,value,!0)}#routerModels=state$1(proxy([]));get routerModels(){return get$3(this.#routerModels)}set routerModels(value){
set$1(this.#routerModels,value,!0)}#loading=state$1(!1);get loading(){return get$3(this.#loading)}set loading(value){set$1(this.#loading,value,!0)}#updating=state$1(!1);get updating(){return get$3(this.#updating)}set updating(value){set$1(this.#updating,value,!0)}#error=state$1(null);get error(){return get$3(this.#error)}set error(value){set$1(this.#error,value,!0)}#selectedModelId=state$1(null);get selectedModelId(){return get$3(this.#selectedModelId)}set selectedModelId(value){set$1(this.#selectedModelId,
value,!0)}#selectedModelName=state$1(null);get selectedModelName(){return get$3(this.#selectedModelName)}set selectedModelName(value){set$1(this.#selectedModelName,value,!0)}inflightFetch=null;#modelUsage=state$1(proxy(new Map));get modelUsage(){return get$3(this.#modelUsage)}set modelUsage(value){set$1(this.#modelUsage,value,!0)}modelLoadingStates=new SvelteMap;#favoriteModelIds=state$1(proxy(this.loadFavoritesFromStorage()));get favoriteModelIds(){return get$3(this.#favoriteModelIds)}set favoriteModelIds(value){
set$1(this.#favoriteModelIds,value,!0)}modelPropsCache=new TTLCache({ttlMs:MODEL_PROPS_CACHE_TTL_MS,maxEntries:MODEL_PROPS_CACHE_MAX_ENTRIES});#modelPropsFetching=state$1(proxy(new Set));get modelPropsFetching(){return get$3(this.#modelPropsFetching)}set modelPropsFetching(value){set$1(this.#modelPropsFetching,value,!0)}#propsCacheVersion=state$1(0);get propsCacheVersion(){return get$3(this.#propsCacheVersion)}set propsCacheVersion(value){set$1(this.#propsCacheVersion,value,!0)}get selectedModel(){
return this.selectedModelId?this.models.find(model=>model.id===this.selectedModelId)??null:null}get loadedModelIds(){return this.routerModels.filter(m=>m.status.value===ServerModelStatus.LOADED||m.status.value===ServerModelStatus.SLEEPING).map(m=>m.id)}get loadingModelIds(){return Array.from(this.modelLoadingStates.entries()).filter(([,loading])=>loading).map(([id2])=>id2)}get singleModelName(){if(serverStore.isRouterMode)return null;const props=serverStore.props;return props?.model_alias?props.
model_alias:props?.model_path&&props.model_path.split(/(\\|\/)/).pop()||null}getModelModalities(modelId){const model=this.models.find(m=>m.model===modelId||m.id===modelId);if(model?.modalities)return model.modalities;const props=this.modelPropsCache.get(modelId);return props?.modalities?{vision:props.modalities.vision??!1,audio:props.modalities.audio??!1}:null}modelSupportsVision(modelId){return this.getModelModalities(modelId)?.vision??!1}modelSupportsAudio(modelId){return this.getModelModalities(
modelId)?.audio??!1}getModelModalitiesArray(modelId){const modalities=this.getModelModalities(modelId);if(!modalities)return[];const result=[];return modalities.vision&&result.push(ModelModality.VISION),modalities.audio&&result.push(ModelModality.AUDIO),result}getModelProps(modelId){return this.modelPropsCache.get(modelId)}getModelContextSize(modelId){const nCtx=this.getModelProps(modelId)?.default_generation_settings?.n_ctx;return typeof nCtx=="number"?nCtx:null}get selectedModelContextSize(){return this.
selectedModelName?this.getModelContextSize(this.selectedModelName):null}isModelPropsFetching(modelId){return this.modelPropsFetching.has(modelId)}isModelLoaded(modelId){const model=this.routerModels.find(m=>m.id===modelId);return model?.status.value===ServerModelStatus.LOADED||model?.status.value===ServerModelStatus.SLEEPING||!1}isModelOperationInProgress(modelId){return this.modelLoadingStates.get(modelId)??!1}getModelStatus(modelId){return this.routerModels.find(m=>m.id===modelId)?.status.value??
null}getModelUsage(modelId){return this.modelUsage.get(modelId)??new SvelteSet}isModelInUse(modelId){const usage=this.modelUsage.get(modelId);return usage!==void 0&&usage.size>0}async fetch(force=!1){if(this.inflightFetch)return this.inflightFetch;if(!(this.models.length>0&&!force)){this.inflightFetch=this.runFetch();try{await this.inflightFetch}finally{this.inflightFetch=null}}}async runFetch(){this.loading=!0,this.error=null;try{serverStore.props||await serverStore.fetch();const response=await ModelsService.
list(),models=response.data.map((item,index2)=>{const details=response.models?.[index2],rawCapabilities=Array.isArray(details?.capabilities)?details?.capabilities:[],displayNameSource=details?.name&&details.name.trim().length>0?details.name:item.id,displayName=this.toDisplayName(displayNameSource),modelId=details?.model||item.id;return{id:item.id,name:displayName,model:modelId,description:details?.description,capabilities:rawCapabilities.filter(value=>!!value),details:details?.details,meta:item.
meta??null,parsedId:ModelsService.parseModelId(modelId),aliases:item.aliases??[],tags:item.tags??[]}});this.models=models;const serverProps2=serverStore.props;if(serverStore.isModelMode&&this.models.length>0&&serverProps2?.modalities){const modalities={vision:serverProps2.modalities.vision??!1,audio:serverProps2.modalities.audio??!1};this.modelPropsCache.set(this.models[0].model,serverProps2),this.models=this.models.map((model,index2)=>index2===0?{...model,modalities}:model)}}catch(error2){throw this.
models=[],this.error=error2 instanceof Error?error2.message:"Failed to load models",error2}finally{this.loading=!1}}async fetchRouterModels(){try{const response=await ModelsService.listRouter();this.routerModels=response.data,await this.fetchModalitiesForLoadedModels();const o=this.models.filter(option2=>this.getModelProps(option2.model)?.webui!==!1);o.length===1&&this.isModelLoaded(o[0].model)&&this.selectModelById(o[0].id)}catch(error2){console.warn("Failed to fetch router models:",error2),this.
routerModels=[]}}async fetchModelProps(modelId){const cached2=this.modelPropsCache.get(modelId);if(cached2)return cached2;if(serverStore.isRouterMode&&!this.isModelLoaded(modelId)||this.modelPropsFetching.has(modelId))return null;this.modelPropsFetching.add(modelId);try{const props=await PropsService.fetchForModel(modelId);return this.modelPropsCache.set(modelId,props),props}catch(error2){return console.warn(`Failed to fetch props for model ${modelId}:`,error2),null}finally{this.modelPropsFetching.
delete(modelId)}}async fetchModalitiesForLoadedModels(){const loadedModelIds2=this.loadedModelIds;if(loadedModelIds2.length===0)return;const propsPromises=loadedModelIds2.map(modelId=>this.fetchModelProps(modelId));try{const results=await Promise.all(propsPromises);this.models=this.models.map(model=>{const modelIndex=loadedModelIds2.indexOf(model.model);if(modelIndex===-1)return model;const props=results[modelIndex];if(!props?.modalities)return model;const modalities={vision:props.modalities.vision??
!1,audio:props.modalities.audio??!1};return{...model,modalities}}),this.propsCacheVersion++}catch(error2){console.warn("Failed to fetch modalities for loaded models:",error2)}}getModelFromLastAssistantResponse(){const messages=conversationsStore.activeMessages;if(!messages||messages.length===0)return null;for(let i=messages.length-1;i>=0;i--)if(messages[i].model)return messages[i].model;return null}async selectModelFromLastAssistantResponse(){const lastModel=this.getModelFromLastAssistantResponse();
if(!lastModel||this.selectedModelName===lastModel)return!1;const matchingModel=this.models.find(option2=>option2.model===lastModel);if(!matchingModel)return!1;if(!this.isModelLoaded(lastModel))return console.log("[modelsStore] last assistant model not loaded:",lastModel),!1;try{return await this.selectModelById(matchingModel.id),console.log(`[modelsStore] Automatically selected model: ${lastModel} from last message`),!0}catch(error2){return console.warn("[modelsStore] Failed to automatically sel\
ect model from last message:",error2),!1}}async ensureFirstModelSelected(){if(this.selectedModelName)return;const availableModels=this.models.filter(option2=>this.getModelProps(option2.model)?.webui!==!1);if(availableModels.length===0)return;const lastModel=this.getModelFromLastAssistantResponse();if(lastModel){const lastModelOption=availableModels.find(m=>m.model===lastModel);if(lastModelOption){await this.selectModelById(lastModelOption.id),this.isModelLoaded(lastModel)&&await this.fetchModelProps(
lastModel);return}}const loadedModel=availableModels.find(m=>this.isModelLoaded(m.model));if(loadedModel){await this.selectModelById(loadedModel.id),await this.fetchModelProps(loadedModel.model);return}const firstModel=availableModels[0];await this.selectModelById(firstModel.id)}async updateModelModalities(modelId){try{const props=await this.fetchModelProps(modelId);if(!props?.modalities)return;const modalities={vision:props.modalities.vision??!1,audio:props.modalities.audio??!1};this.models=this.
models.map(model=>model.model===modelId?{...model,modalities}:model),this.propsCacheVersion++}catch(error2){console.warn(`Failed to update modalities for model ${modelId}:`,error2)}}async selectModelById(modelId){if(!modelId||this.updating||this.selectedModelId===modelId)return;const option2=this.models.find(model=>model.id===modelId);if(!option2)throw new Error("Selected model is not available");this.updating=!0,this.error=null;try{this.selectedModelId=option2.id,this.selectedModelName=option2.
model}finally{this.updating=!1}}selectModelByName(modelName){const option2=this.models.find(model=>model.model===modelName);option2&&(this.selectedModelId=option2.id,this.selectedModelName=option2.model)}clearSelection(){this.selectedModelId=null,this.selectedModelName=null}findModelByName(modelName){return this.models.find(model=>model.model===modelName)??null}findModelById(modelId){return this.models.find(model=>model.id===modelId)??null}hasModel(modelName){return this.models.some(model=>model.
model===modelName)}static STATUS_POLL_INTERVAL=500;async pollForModelStatus(modelId,expectedStatus){let attempt=0;for(;;){await this.fetchRouterModels();const currentStatus=this.getModelStatus(modelId);if(currentStatus===expectedStatus)return;if(currentStatus===ServerModelStatus.FAILED)throw new Error(`Model failed to ${expectedStatus===ServerModelStatus.LOADED?"load":"unload"}`);if(expectedStatus===ServerModelStatus.LOADED&&currentStatus===ServerModelStatus.UNLOADED&&attempt>2)throw new Error("\
Model was unloaded unexpectedly during loading");attempt++,await new Promise(resolve2=>setTimeout(resolve2,ModelsStore.STATUS_POLL_INTERVAL))}}async loadModel(modelId){if(!this.isModelLoaded(modelId)&&!this.modelLoadingStates.get(modelId)){this.modelLoadingStates.set(modelId,!0),this.error=null;try{await ModelsService.load(modelId),await this.pollForModelStatus(modelId,ServerModelStatus.LOADED),await this.updateModelModalities(modelId),toast.success(`Model loaded: ${this.toDisplayName(modelId)}`)}catch(error2){
throw this.error=error2 instanceof Error?error2.message:"Failed to load model",toast.error(`Failed to load model: ${this.toDisplayName(modelId)}`),error2}finally{this.modelLoadingStates.set(modelId,!1)}}}async unloadModel(modelId){if(this.isModelLoaded(modelId)&&!this.modelLoadingStates.get(modelId)){this.modelLoadingStates.set(modelId,!0),this.error=null;try{await ModelsService.unload(modelId),await this.pollForModelStatus(modelId,ServerModelStatus.UNLOADED),toast.info(`Model unloaded: ${this.toDisplayName(
modelId)}`)}catch(error2){throw this.error=error2 instanceof Error?error2.message:"Failed to unload model",toast.error(`Failed to unload model: ${this.toDisplayName(modelId)}`),error2}finally{this.modelLoadingStates.set(modelId,!1)}}}async ensureModelLoaded(modelId){this.isModelLoaded(modelId)||await this.loadModel(modelId)}isFavorite(modelId){return this.favoriteModelIds.has(modelId)}toggleFavorite(modelId){const next2=new SvelteSet(this.favoriteModelIds);next2.has(modelId)?next2.delete(modelId):
next2.add(modelId),this.favoriteModelIds=next2;try{localStorage.setItem(FAVORITE_MODELS_LOCALSTORAGE_KEY,JSON.stringify([...next2]))}catch{toast.error("Failed to save favorite models to local storage")}}loadFavoritesFromStorage(){try{const raw2=localStorage.getItem(FAVORITE_MODELS_LOCALSTORAGE_KEY);return raw2?new Set(JSON.parse(raw2)):new Set}catch{return toast.error("Failed to load favorite models from local storage"),new Set}}toDisplayName(id2){const candidate=id2.split(/\\|\//).pop();return candidate&&
candidate.trim().length>0?candidate:id2}clear(){this.models=[],this.routerModels=[],this.loading=!1,this.updating=!1,this.error=null,this.selectedModelId=null,this.selectedModelName=null,this.modelUsage.clear(),this.modelLoadingStates.clear(),this.modelPropsCache.clear(),this.modelPropsFetching.clear()}pruneExpiredCache(){return this.modelPropsCache.prune()}}const modelsStore=new ModelsStore,modelOptions=()=>modelsStore.models,routerModels=()=>modelsStore.routerModels,modelsLoading=()=>modelsStore.
loading,modelsUpdating=()=>modelsStore.updating,selectedModelId=()=>modelsStore.selectedModelId,selectedModelName=()=>modelsStore.selectedModelName,propsCacheVersion=()=>modelsStore.propsCacheVersion,singleModelName=()=>modelsStore.singleModelName,selectedModelContextSize=()=>modelsStore.selectedModelContextSize;var root_1$11=from_html("<!> <!>",1),root$1H=from_html('<div><div class="relative flex min-h-0 flex-1 items-center justify-center overflow-hidden"><!> <div class="flex h-full w-full flex\
-col items-center justify-start overflow-auto py-4"><!> <!></div></div></div>');function ChatAttachmentsPreview($$anchor,$$props){push$1($$props,!0);let uploadedFiles=prop($$props,"uploadedFiles",19,()=>[]),attachments=prop($$props,"attachments",19,()=>[]),className=prop($$props,"class",3,""),previewFocusIndex=prop($$props,"previewFocusIndex",3,0),allItems=user_derived(()=>getAttachmentDisplayItems({uploadedFiles:uploadedFiles(),attachments:attachments()}).filter(item=>!isMcpPrompt(item)&&!isMcpResource(
item)).map(item=>({...item,isImage:isImageFile(item.attachment,item.uploadedFile),isAudio:isAudioFile(item.attachment,item.uploadedFile)}))),currentIndex=state$1(0);user_effect(()=>{previewFocusIndex()>=0&&previewFocusIndex()<get$3(allItems).length&&set$1(currentIndex,previewFocusIndex())}),user_effect(()=>{const handler=e=>{e.detail<0?set$1(currentIndex,get$3(currentIndex)>0?get$3(currentIndex)-1:get$3(allItems).length-1,!0):set$1(currentIndex,get$3(currentIndex)<get$3(allItems).length-1?get$3(
currentIndex)+1:0,!0)};return document.addEventListener("chat-attachments-nav",handler),()=>document.removeEventListener("chat-attachments-nav",handler)}),user_effect(()=>{const index2=get$3(currentIndex);setTimeout(()=>{document.querySelector(`[data-thumbnail-index="${index2}"]`)?.scrollIntoView({behavior:"smooth",inline:"center",block:"nearest"})},0)});let currentItem=user_derived(()=>get$3(allItems)[get$3(currentIndex)]??null),displayName=user_derived(()=>get$3(currentItem)?.name||get$3(currentItem)?.
uploadedFile?.name||get$3(currentItem)?.attachment?.name||"Unknown File"),isAudio=user_derived(()=>get$3(currentItem)?isAudioFile(get$3(currentItem).attachment,get$3(currentItem).uploadedFile):!1),isImage2=user_derived(()=>get$3(currentItem)?isImageFile(get$3(currentItem).attachment,get$3(currentItem).uploadedFile):!1),isPdf=user_derived(()=>get$3(currentItem)?isPdfFile$1(get$3(currentItem).attachment,get$3(currentItem).uploadedFile):!1),isText=user_derived(()=>get$3(currentItem)?isTextFile(get$3(
currentItem).attachment,get$3(currentItem).uploadedFile):!1),displayPreview=user_derived(()=>get$3(currentItem)?.uploadedFile?.preview||(get$3(isImage2)&&get$3(currentItem)?.attachment&&"base64Url"in get$3(currentItem).attachment?get$3(currentItem).attachment.base64Url:get$3(currentItem)?.preview)),displayTextContent=user_derived(()=>get$3(currentItem)?.uploadedFile?.textContent||(get$3(currentItem)?.attachment&&"content"in get$3(currentItem).attachment?get$3(currentItem).attachment.content:get$3(
currentItem)?.textContent)),language2=user_derived(()=>getLanguageFromFilename(get$3(displayName))),fileSize=user_derived(()=>get$3(currentItem)?.size?formatFileSize(get$3(currentItem).size):""),hasVisionModality=user_derived(()=>get$3(currentItem)&&$$props.activeModelId?modelsStore.modelSupportsVision($$props.activeModelId):!1),audioSrc=user_derived(()=>get$3(isAudio)&&get$3(currentItem)?get$3(currentItem).uploadedFile?.preview??(get$3(currentItem).attachment&&"mimeType"in get$3(currentItem).attachment&&
"base64Data"in get$3(currentItem).attachment?createBase64DataUrl(get$3(currentItem).attachment.mimeType,get$3(currentItem).attachment.base64Data):null):null);function prev2(){set$1(currentIndex,get$3(currentIndex)>0?get$3(currentIndex)-1:get$3(allItems).length-1,!0)}function next2(){set$1(currentIndex,get$3(currentIndex)<get$3(allItems).length-1?get$3(currentIndex)+1:0,!0)}function onNavigate(index2){set$1(currentIndex,index2,!0)}var $$exports={prev:prev2,next:next2},div=root$1H(),div_1=child(div),
node2=child(div_1);{let $0=user_derived(()=>get$3(allItems).length>1);ChatAttachmentsPreviewNavButtons(node2,{onPrev:prev2,onNext:next2,get show(){return get$3($0)}})}var div_2=sibling(node2,2),node_1=child(div_2);{var consequent=$$anchor2=>{var fragment=root_1$11(),node_2=first_child(fragment);ChatAttachmentsPreviewFileInfo(node_2,{get displayName(){return get$3(displayName)},get fileSize(){return get$3(fileSize)}});var node_3=sibling(node_2,2);ChatAttachmentsPreviewCurrentItem(node_3,{get currentItem(){
return get$3(currentItem)},get isImage(){return get$3(isImage2)},get isAudio(){return get$3(isAudio)},get isPdf(){return get$3(isPdf)},get isText(){return get$3(isText)},get displayPreview(){return get$3(displayPreview)},get displayTextContent(){return get$3(displayTextContent)},get audioSrc(){return get$3(audioSrc)},get language(){return get$3(language2)},get hasVisionModality(){return get$3(hasVisionModality)},get activeModelId(){return $$props.activeModelId}}),append($$anchor2,fragment)};if_block(
node_1,$$render=>{get$3(currentItem)&&$$render(consequent)})}var node_4=sibling(node_1,2);return ChatAttachmentsPreviewThumbnailStrip(node_4,{get items(){return get$3(allItems)},get currentIndex(){return get$3(currentIndex)},onNavigate}),reset(div_2),reset(div_1),reset(div),template_effect(()=>set_class(div,1,`${className()??""} flex flex-col text-white`)),append($$anchor,div),pop($$exports)}var root_1$10=from_html("<!> <!>",1);function ChatAttachmentsPreviewNavButtons($$anchor,$$props){var fragment=comment$2(),
node2=first_child(fragment);{var consequent=$$anchor2=>{var fragment_1=root_1$10(),node_1=first_child(fragment_1);Button(node_1,{variant:"secondary",size:"icon",class:"absolute top-1/2 left-4 z-10 h-8 w-8 -translate-y-1/2 rounded-full bg-background/5 p-0 text-white!",get onclick(){return $$props.onPrev},"aria-label":"Previous",children:($$anchor3,$$slotProps)=>{Chevron_left($$anchor3,{class:"size-4"})},$$slots:{default:!0}});var node_2=sibling(node_1,2);Button(node_2,{variant:"secondary",size:"i\
con",class:"absolute top-1/2 right-4 z-10 h-8 w-8 -translate-y-1/2 rounded-full bg-background/5 p-0 text-white!",get onclick(){return $$props.onNext},"aria-label":"Next",children:($$anchor3,$$slotProps)=>{Chevron_right($$anchor3,{class:"size-4"})},$$slots:{default:!0}}),append($$anchor2,fragment_1)};if_block(node2,$$render=>{$$props.show&&$$render(consequent)})}append($$anchor,fragment)}var root_1$$=from_html('<p class="text-xs text-white/60"> </p>'),root$1G=from_html('<div class="sticky top-0 z\
-[20] mb-4 rounded-lg bg-black/5 px-4 py-2 text-center backdrop-blur-md"><p class="font-medium text-white"> </p> <!></div>');function ChatAttachmentsPreviewFileInfo($$anchor,$$props){var div=root$1G(),p2=child(div),text2=child(p2,!0);reset(p2);var node2=sibling(p2,2);{var consequent=$$anchor2=>{var p_1=root_1$$(),text_1=child(p_1,!0);reset(p_1),template_effect(()=>set_text(text_1,$$props.fileSize)),append($$anchor2,p_1)};if_block(node2,$$render=>{$$props.fileSize&&$$render(consequent)})}reset(div),
template_effect(()=>set_text(text2,$$props.displayName)),append($$anchor,div)}var root_1$_=from_html('<div data-slot="checkbox-indicator" class="text-current transition-none"><!></div>');function Checkbox($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),checked=prop($$props,"checked",15,!1),indeterminate=prop($$props,"indeterminate",15,!1),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","checked","indeterminate","class"]);var fragment=comment$2(),node2=first_child(
fragment);{const children=($$anchor2,$$arg0)=>{let checked2=()=>$$arg0?.().checked,indeterminate2=()=>$$arg0?.().indeterminate;var div=root_1$_(),node_1=child(div);{var consequent=$$anchor3=>{Check($$anchor3,{class:"size-3.5"})},consequent_1=$$anchor3=>{Minus($$anchor3,{class:"size-3.5"})};if_block(node_1,$$render=>{checked2()?$$render(consequent):indeterminate2()&&$$render(consequent_1,1)})}reset(div),append($$anchor2,div)};let $0=user_derived(()=>cn$1("peer flex size-4 shrink-0 items-center ju\
stify-center rounded-[4px] border border-input shadow-xs transition-shadow outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[state=checked]:border-primary data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:bg-input/30 dark:aria-invalid:ring-destructive/40 dark:data-[state=checked]:bg-primary",$$props.class));
component(node2,()=>Checkbox$1,($$anchor2,CheckboxPrimitive_Root)=>{CheckboxPrimitive_Root($$anchor2,spread_props({"data-slot":"checkbox",get class(){return get$3($0)}},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)},get checked(){return checked()},set checked($$value){checked($$value)},get indeterminate(){return indeterminate()},set indeterminate($$value){indeterminate($$value)},children,$$slots:{default:!0}}))})}append($$anchor,fragment),pop()}var root_1$Z=from_html("<i\
nput/>"),root_2$17=from_html("<input/>");function Input($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),value=prop($$props,"value",15),files=prop($$props,"files",15),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","value","type","files","class"]);var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{var input=root_1$Z();attribute_effect(input,$0=>({"data-slot":"input",class:$0,type:"file",...restProps}),[()=>cn$1("flex h-9 \
w-full min-w-0 rounded-md border border-input bg-transparent px-3 pt-1.5 text-sm font-medium shadow-xs ring-offset-background transition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30","focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50","aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:r\
ing-destructive/40",$$props.class)],void 0,void 0,void 0,!0),bind_this(input,$$value=>ref2($$value),()=>ref2()),bind_files(input,files),bind_value(input,value),append($$anchor2,input)},alternate=$$anchor2=>{var input_1=root_2$17();attribute_effect(input_1,$0=>({"data-slot":"input",class:$0,style:"backdrop-filter: blur(0.5rem);",type:$$props.type,...restProps}),[()=>cn$1("flex h-9 w-full min-w-0 rounded-md border border-input bg-background px-3 py-1 text-base shadow-xs ring-offset-background tran\
sition-[color,box-shadow] outline-none selection:bg-primary selection:text-primary-foreground placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50 md:text-sm dark:bg-input/30","focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50","aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",$$props.class)],void 0,void 0,void 0,!0),bind_this(input_1,$$value=>ref2($$value),()=>ref2()),bind_value(input_1,
value),append($$anchor2,input_1)};if_block(node2,$$render=>{$$props.type==="file"?$$render(consequent):$$render(alternate,-1)})}append($$anchor,fragment),pop()}var root_1$Y=from_html('<button type="button" class="absolute top-1/2 right-3 -translate-y-1/2 transform cursor-pointer text-muted-foreground transition-colors hover:text-foreground"><!></button>'),root$1F=from_html("<div><!> <!> <!></div>");function SearchInput($$anchor,$$props){push$1($$props,!0);let value=prop($$props,"value",15,""),placeholder=prop(
$$props,"placeholder",3,"Search..."),ref2=prop($$props,"ref",15,null),isCancelAlwaysVisible=prop($$props,"isCancelAlwaysVisible",3,!1),showClearButton=user_derived(()=>isCancelAlwaysVisible()||!!value()||!!$$props.onClose);function handleInput(event2){const target2=event2.target;value(target2.value),$$props.onInput?.(target2.value)}function handleClear(){value()?(value(""),$$props.onInput?.(""),ref2()?.focus()):$$props.onClose?.()}var div=root$1F(),node2=child(div);Search(node2,{class:"absolute \
top-1/2 left-3 z-10 h-4 w-4 -translate-y-1/2 transform text-muted-foreground"});var node_1=sibling(node2,2);{let $0=user_derived(()=>get$3(showClearButton)?"pr-9":"");Input(node_1,{get id(){return $$props.id},get class(){return`pl-9 ${get$3($0)??""}`},oninput:handleInput,get onkeydown(){return $$props.onKeyDown},get placeholder(){return placeholder()},type:"search",get value(){return value()},set value($$value){value($$value)},get ref(){return ref2()},set ref($$value){ref2($$value)}})}var node_2=sibling(
node_1,2);{var consequent=$$anchor2=>{var button=root_1$Y(),node_3=child(button);X(node_3,{class:"h-4 w-4"}),reset(button),template_effect(()=>set_attribute(button,"aria-label",value()?"Clear search":"Close")),delegated("click",button,handleClear),append($$anchor2,button)};if_block(node_2,$$render=>{get$3(showClearButton)&&$$render(consequent)})}reset(div),template_effect(()=>set_class(div,1,`relative ${$$props.class??""}`)),append($$anchor,div),pop()}delegate(["click"]);var root_1$X=from_html("\
<!> <!>",1);function Scroll_area_scrollbar($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),orientation=prop($$props,"orientation",3,"vertical"),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class","orientation","children"]);var fragment=comment$2(),node2=first_child(fragment);{let $0=user_derived(()=>cn$1("flex touch-none p-px transition-colors select-none",orientation()==="vertical"&&"h-full w-2.5 border-l border-l-transparent",orientation()==="h\
orizontal"&&"h-2.5 flex-col border-t border-t-transparent",$$props.class));component(node2,()=>Scroll_area_scrollbar$1,($$anchor2,ScrollAreaPrimitive_Scrollbar)=>{ScrollAreaPrimitive_Scrollbar($$anchor2,spread_props({"data-slot":"scroll-area-scrollbar",get orientation(){return orientation()},get class(){return get$3($0)}},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)},children:($$anchor3,$$slotProps)=>{var fragment_1=root_1$X(),node_1=first_child(fragment_1);snippet(node_1,
()=>$$props.children??noop$3);var node_2=sibling(node_1,2);component(node_2,()=>Scroll_area_thumb,($$anchor4,ScrollAreaPrimitive_Thumb)=>{ScrollAreaPrimitive_Thumb($$anchor4,{"data-slot":"scroll-area-thumb",class:"relative flex-1 rounded-full bg-border"})}),append($$anchor3,fragment_1)},$$slots:{default:!0}}))})}append($$anchor,fragment),pop()}var root_1$W=from_html("<!> <!> <!> <!>",1);function Scroll_area($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),orientation=prop(
$$props,"orientation",3,"vertical"),scrollbarXClasses=prop($$props,"scrollbarXClasses",3,""),scrollbarYClasses=prop($$props,"scrollbarYClasses",3,""),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class","orientation","scrollbarXClasses","scrollbarYClasses","children"]);var fragment=comment$2(),node2=first_child(fragment);{let $0=user_derived(()=>cn$1("relative",$$props.class));component(node2,()=>Scroll_area$1,($$anchor2,ScrollAreaPrimitive_Root)=>{ScrollAreaPrimitive_Root(
$$anchor2,spread_props({"data-slot":"scroll-area",get class(){return get$3($0)}},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)},children:($$anchor3,$$slotProps)=>{var fragment_1=root_1$W(),node_1=first_child(fragment_1);component(node_1,()=>Scroll_area_viewport,($$anchor4,ScrollAreaPrimitive_Viewport)=>{ScrollAreaPrimitive_Viewport($$anchor4,{"data-slot":"scroll-area-viewport",class:"size-full rounded-[inherit] ring-ring/10 outline-ring/50 transition-[color,box-shadow] f\
ocus-visible:ring-4 focus-visible:outline-1 dark:ring-ring/20 dark:outline-ring/40",children:($$anchor5,$$slotProps2)=>{var fragment_2=comment$2(),node_2=first_child(fragment_2);snippet(node_2,()=>$$props.children??noop$3),append($$anchor5,fragment_2)},$$slots:{default:!0}})});var node_3=sibling(node_1,2);{var consequent=$$anchor4=>{Scroll_area_scrollbar($$anchor4,{orientation:"vertical",get class(){return scrollbarYClasses()}})};if_block(node_3,$$render=>{(orientation()==="vertical"||orientation()===
"both")&&$$render(consequent)})}var node_4=sibling(node_3,2);{var consequent_1=$$anchor4=>{Scroll_area_scrollbar($$anchor4,{orientation:"horizontal",get class(){return scrollbarXClasses()}})};if_block(node_4,$$render=>{(orientation()==="horizontal"||orientation()==="both")&&$$render(consequent_1)})}var node_5=sibling(node_4,2);component(node_5,()=>Scroll_area_corner,($$anchor4,ScrollAreaPrimitive_Corner)=>{ScrollAreaPrimitive_Corner($$anchor4,{})}),append($$anchor3,fragment_1)},$$slots:{default:!0}}))})}
append($$anchor,fragment),pop()}var root_3$X=from_html('<tr><td colspan="3" class="p-8 text-center text-sm text-muted-foreground"><!></td></tr>'),root_7$s=from_html('<tr class="cursor-pointer border-b transition-colors hover:bg-muted/50"><td class="p-3"><!></td><td class="p-3 text-sm"><div class="max-w-[17rem] truncate"> </div></td><td class="p-3 text-sm text-muted-foreground"> </td></tr>'),root_2$16=from_html('<table class="w-full"><thead class="sticky top-0 z-10 bg-muted"><tr class="border-b">\
<th class="w-12 p-3 text-left"><!></th><th class="p-3 text-left text-sm font-medium">Conversation Name</th><th class="w-32 p-3 text-left text-sm font-medium">Messages</th></tr></thead><tbody><!></tbody></table>'),root$1E=from_html('<div class="space-y-4"><!> <div class="flex items-center justify-between text-sm text-muted-foreground"><span> <!></span></div> <div class="overflow-hidden rounded-md border"><!></div> <div class="flex justify-end gap-2"><!> <!></div></div>');function ConversationSelection($$anchor,$$props){
push$1($$props,!0);let messageCountMap=prop($$props,"messageCountMap",19,()=>new Map),searchQuery=state$1(""),selectedIds=state$1(getInitialSelectedIds()),lastClickedId=state$1(null);function getInitialSelectedIds(){return new SvelteSet($$props.conversations.map(c2=>c2.id))}let filteredConversations=user_derived(()=>$$props.conversations.filter(conv=>(conv.name||"Untitled conversation").toLowerCase().includes(get$3(searchQuery).toLowerCase()))),allSelected=user_derived(()=>get$3(filteredConversations).
length>0&&get$3(filteredConversations).every(conv=>get$3(selectedIds).has(conv.id))),someSelected=user_derived(()=>get$3(filteredConversations).some(conv=>get$3(selectedIds).has(conv.id))&&!get$3(allSelected));function toggleConversation(id2,shiftKey=!1){const newSet=new SvelteSet(get$3(selectedIds));if(shiftKey&&get$3(lastClickedId)!==null){const lastIndex=get$3(filteredConversations).findIndex(c2=>c2.id===get$3(lastClickedId)),currentIndex=get$3(filteredConversations).findIndex(c2=>c2.id===id2);
if(lastIndex!==-1&&currentIndex!==-1){const start2=Math.min(lastIndex,currentIndex),end=Math.max(lastIndex,currentIndex),shouldSelect=!newSet.has(id2);for(let i=start2;i<=end;i++)shouldSelect?newSet.add(get$3(filteredConversations)[i].id):newSet.delete(get$3(filteredConversations)[i].id);set$1(selectedIds,newSet);return}}newSet.has(id2)?newSet.delete(id2):newSet.add(id2),set$1(selectedIds,newSet),set$1(lastClickedId,id2,!0)}function toggleAll(){if(get$3(allSelected)){const newSet=new SvelteSet(get$3(
selectedIds));get$3(filteredConversations).forEach(conv=>newSet.delete(conv.id)),set$1(selectedIds,newSet)}else{const newSet=new SvelteSet(get$3(selectedIds));get$3(filteredConversations).forEach(conv=>newSet.add(conv.id)),set$1(selectedIds,newSet)}}function handleConfirm(){const selected=$$props.conversations.filter(conv=>get$3(selectedIds).has(conv.id));$$props.onConfirm(selected)}function handleCancel(){set$1(selectedIds,getInitialSelectedIds()),set$1(searchQuery,""),set$1(lastClickedId,null),
$$props.onCancel()}function reset$1(){set$1(selectedIds,getInitialSelectedIds()),set$1(searchQuery,""),set$1(lastClickedId,null)}var $$exports={reset:reset$1},div=root$1E(),node2=child(div);SearchInput(node2,{placeholder:"Search conversations...",get value(){return get$3(searchQuery)},set value($$value){set$1(searchQuery,$$value,!0)}});var div_1=sibling(node2,2),span=child(div_1),text2=child(span),node_1=sibling(text2);{var consequent=$$anchor2=>{var text_1=text$8();template_effect(()=>set_text(
text_1,`(${get$3(filteredConversations).length??""} shown)`)),append($$anchor2,text_1)};if_block(node_1,$$render=>{get$3(searchQuery)&&$$render(consequent)})}reset(span),reset(div_1);var div_2=sibling(div_1,2),node_2=child(div_2);Scroll_area(node_2,{class:"h-[400px]",children:($$anchor2,$$slotProps)=>{var table2=root_2$16(),thead2=child(table2),tr2=child(thead2),th=child(tr2),node_3=child(th);Checkbox(node_3,{get checked(){return get$3(allSelected)},get indeterminate(){return get$3(someSelected)},
onCheckedChange:toggleAll}),reset(th),next$1(2),reset(tr2),reset(thead2);var tbody2=sibling(thead2),node_4=child(tbody2);{var consequent_2=$$anchor3=>{var tr_1=root_3$X(),td=child(tr_1),node_5=child(td);{var consequent_1=$$anchor4=>{var text_2=text$8();template_effect(()=>set_text(text_2,`No conversations found matching "${get$3(searchQuery)??""}"`)),append($$anchor4,text_2)},alternate=$$anchor4=>{var text_3=text$8("No conversations available");append($$anchor4,text_3)};if_block(node_5,$$render=>{
get$3(searchQuery)?$$render(consequent_1):$$render(alternate,-1)})}reset(td),reset(tr_1),append($$anchor3,tr_1)},alternate_1=$$anchor3=>{var fragment_2=comment$2(),node_6=first_child(fragment_2);each(node_6,17,()=>get$3(filteredConversations),conv=>conv.id,($$anchor4,conv)=>{var tr_2=root_7$s(),td_1=child(tr_2),node_7=child(td_1);{let $0=user_derived(()=>get$3(selectedIds).has(get$3(conv).id));Checkbox(node_7,{get checked(){return get$3($0)},onclick:event2=>{event2.preventDefault(),event2.stopPropagation(),
toggleConversation(get$3(conv).id,event2.shiftKey)}})}reset(td_1);var td_2=sibling(td_1),div_3=child(td_2),text_4=child(div_3,!0);reset(div_3),reset(td_2);var td_3=sibling(td_2),text_5=child(td_3,!0);reset(td_3),reset(tr_2),template_effect($0=>{set_attribute(div_3,"title",get$3(conv).name||"Untitled conversation"),set_text(text_4,get$3(conv).name||"Untitled conversation"),set_text(text_5,$0)},[()=>messageCountMap().get(get$3(conv).id)??0]),delegated("click",tr_2,event2=>toggleConversation(get$3(
conv).id,event2.shiftKey)),append($$anchor4,tr_2)}),append($$anchor3,fragment_2)};if_block(node_4,$$render=>{get$3(filteredConversations).length===0?$$render(consequent_2):$$render(alternate_1,-1)})}reset(tbody2),reset(table2),append($$anchor2,table2)},$$slots:{default:!0}}),reset(div_2);var div_4=sibling(div_2,2),node_8=child(div_4);Button(node_8,{variant:"outline",onclick:handleCancel,children:($$anchor2,$$slotProps)=>{next$1();var text_6=text$8("Cancel");append($$anchor2,text_6)},$$slots:{default:!0}});
var node_9=sibling(node_8,2);{let $0=user_derived(()=>get$3(selectedIds).size===0);Button(node_9,{onclick:handleConfirm,get disabled(){return get$3($0)},children:($$anchor2,$$slotProps)=>{next$1();var text_7=text$8();template_effect(()=>set_text(text_7,`${$$props.mode==="export"?"Export":"Import"} (${get$3(selectedIds).size??""})`)),append($$anchor2,text_7)},$$slots:{default:!0}})}return reset(div_4),reset(div),template_effect(()=>set_text(text2,`${get$3(selectedIds).size??""} of ${$$props.conversations.
length??""} selected `)),append($$anchor,div),pop($$exports)}delegate(["click"]);var root$1D=from_html('<div><button aria-label="Scroll left"><!></button> <div><!></div> <button aria-label="Scroll right"><!></button></div>');function HorizontalScrollCarousel($$anchor,$$props){push$1($$props,!0);let className=prop($$props,"class",3,""),gapSize=prop($$props,"gapSize",3,"3"),canScrollLeft=state$1(!1),canScrollRight=state$1(!1),scrollContainer=state$1(void 0);function scrollLeft(event2){event2?.stopPropagation(),
event2?.preventDefault(),get$3(scrollContainer)&&get$3(scrollContainer).scrollBy({left:get$3(scrollContainer).clientWidth*-.67,behavior:"smooth"})}function scrollRight(event2){event2?.stopPropagation(),event2?.preventDefault(),get$3(scrollContainer)&&get$3(scrollContainer).scrollBy({left:get$3(scrollContainer).clientWidth*.67,behavior:"smooth"})}function updateScrollButtons(){if(!get$3(scrollContainer))return;const{scrollLeft:scrollLeft2,scrollWidth,clientWidth}=get$3(scrollContainer);set$1(canScrollLeft,
scrollLeft2>0),set$1(canScrollRight,scrollLeft2<scrollWidth-clientWidth-1);const isScrollable=scrollWidth>clientWidth;$$props.onScrollableChange?.(isScrollable)}function resetScroll(){get$3(scrollContainer)&&(get$3(scrollContainer).scrollLeft=0,setTimeout(()=>{updateScrollButtons()},0))}user_effect(()=>{get$3(scrollContainer)&&setTimeout(()=>{updateScrollButtons()},0)});var $$exports={resetScroll},div=root$1D(),button=child(div),node2=child(button);Chevron_left(node2,{class:"h-4 w-4"}),reset(button);
var div_1=sibling(button,2),node_1=child(div_1);snippet(node_1,()=>$$props.children??noop$3),reset(div_1),bind_this(div_1,$$value=>set$1(scrollContainer,$$value),()=>get$3(scrollContainer));var button_1=sibling(div_1,2),node_2=child(button_1);return Chevron_right(node_2,{class:"h-4 w-4"}),reset(button_1),reset(div),template_effect(()=>{set_class(div,1,`relative ${className()??""}`),set_class(button,1,`absolute top-1/2 left-4 z-10 flex h-6 w-6 -translate-y-1/2 items-center justify-center rounded-\
full bg-background/25 shadow-md backdrop-blur-xs transition-opacity hover:bg-background/45 ${get$3(canScrollLeft)?"opacity-100":"pointer-events-none opacity-0"}`),set_class(div_1,1,`scrollbar-hide flex items-start gap-${gapSize()??""} overflow-x-auto`),set_class(button_1,1,`absolute top-1/2 right-4 z-10 flex h-6 w-6 -translate-y-1/2 items-center justify-center rounded-full bg-background/25 shadow-md backdrop-blur-xs transition-opacity hover:bg-background/45 ${get$3(canScrollRight)?"opacity-100":
"pointer-events-none opacity-0"}`)}),delegated("click",button,scrollLeft),event("scroll",div_1,updateScrollButtons),delegated("click",button_1,scrollRight),append($$anchor,div),pop($$exports)}delegate(["click"]);var root_3$W=from_html('<span class="block truncate"> </span>'),root_4$C=from_html("<p> </p>"),root_2$15=from_html("<!> <!>",1),root_5$u=from_html("<span> </span>");function TruncatedText($$anchor,$$props){push$1($$props,!0);let className=prop($$props,"class",3,""),showTooltip=prop($$props,
"showTooltip",3,!0),textElement=state$1(void 0),isTruncated=state$1(!1);function checkTruncation(){get$3(textElement)&&set$1(isTruncated,get$3(textElement).scrollWidth>get$3(textElement).clientWidth)}user_effect(()=>{if(get$3(textElement)){checkTruncation();const observer=new ResizeObserver(checkTruncation);return observer.observe(get$3(textElement)),()=>observer.disconnect()}});var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{var fragment_1=comment$2(),node_1=first_child(
fragment_1);component(node_1,()=>Root$5,($$anchor3,Tooltip_Root)=>{Tooltip_Root($$anchor3,{children:($$anchor4,$$slotProps)=>{var fragment_2=root_2$15(),node_2=first_child(fragment_2);component(node_2,()=>Tooltip_trigger,($$anchor5,Tooltip_Trigger)=>{Tooltip_Trigger($$anchor5,{get class(){return`${className()??""} min-w-0`},children:($$anchor6,$$slotProps2)=>{var span=root_3$W(),text_1=child(span,!0);reset(span),bind_this(span,$$value=>set$1(textElement,$$value),()=>get$3(textElement)),template_effect(
()=>set_text(text_1,$$props.text)),append($$anchor6,span)},$$slots:{default:!0}})});var node_3=sibling(node_2,2);component(node_3,()=>Tooltip_content,($$anchor5,Tooltip_Content)=>{Tooltip_Content($$anchor5,{class:"z-[9999]",children:($$anchor6,$$slotProps2)=>{var p2=root_4$C(),text_2=child(p2,!0);reset(p2),template_effect(()=>set_text(text_2,$$props.text)),append($$anchor6,p2)},$$slots:{default:!0}})}),append($$anchor4,fragment_2)},$$slots:{default:!0}})}),append($$anchor2,fragment_1)},alternate=$$anchor2=>{
var span_1=root_5$u(),text_3=child(span_1,!0);reset(span_1),bind_this(span_1,$$value=>set$1(textElement,$$value),()=>get$3(textElement)),template_effect(()=>{set_class(span_1,1,`${className()??""} block min-w-0 truncate`),set_text(text_3,$$props.text)}),append($$anchor2,span_1)};if_block(node2,$$render=>{get$3(isTruncated)&&showTooltip()?$$render(consequent):$$render(alternate,-1)})}append($$anchor,fragment),pop()}var root_3$V=from_html("<span>⌘</span>"),root_5$t=from_html("<span></span>"),root_1$V=from_html(
"<!> <!>",1),root$1C=from_html("<kbd></kbd>");function KeyboardShortcutInfo($$anchor,$$props){push$1($$props,!0);let variant=prop($$props,"variant",3,"default"),className=prop($$props,"class",3,""),variantClasses=user_derived(()=>variant()==="destructive"?"text-destructive":"text-muted-foreground");var kbd=root$1C();each(kbd,21,()=>$$props.keys,index$2,($$anchor2,key2,index2)=>{var fragment=root_1$V(),node2=first_child(fragment);{var consequent=$$anchor3=>{{let $0=user_derived(()=>variant()==="d\
estructive"?"text-destructive":"");Arrow_big_up($$anchor3,{get class(){return`h-1 w-1 ${get$3($0)??""} -mr-1`}})}},consequent_1=$$anchor3=>{var span=root_3$V();template_effect(()=>set_class(span,1,clsx(variant()==="destructive"?"text-destructive":""))),append($$anchor3,span)},alternate=$$anchor3=>{var text2=text$8();template_effect($0=>set_text(text2,$0),[()=>get$3(key2).toUpperCase()]),append($$anchor3,text2)};if_block(node2,$$render=>{get$3(key2)==="shift"?$$render(consequent):get$3(key2)==="c\
md"?$$render(consequent_1,1):$$render(alternate,-1)})}var node_1=sibling(node2,2);{var consequent_2=$$anchor3=>{var span_1=root_5$t();append($$anchor3,span_1)};if_block(node_1,$$render=>{index2<$$props.keys.length-1&&$$render(consequent_2)})}append($$anchor2,fragment)}),reset(kbd),template_effect(()=>set_class(kbd,1,`px-1 pointer-events-none inline-flex select-none items-center gap-0.5 font-sans text-md font-medium opacity-0 transition-opacity -my-1 ${get$3(variantClasses)??""} ${className()??""}`)),
append($$anchor,kbd),pop()}var root$1B=from_html('<div class="code-block-actions"><!> <!></div>');function CodeBlockActions($$anchor,$$props){push$1($$props,!0);let disabled=prop($$props,"disabled",3,!1);const showPreview=user_derived(()=>$$props.language?.toLowerCase()===FileTypeText.HTML);var div=root$1B(),node2=child(div);{let $0=user_derived(()=>!disabled()),$1=user_derived(()=>disabled()?"Code incomplete":"Copy code");ActionIconCopyToClipboard(node2,{get text(){return $$props.code},get canCopy(){
return get$3($0)},get ariaLabel(){return get$3($1)}})}var node_1=sibling(node2,2);{var consequent=$$anchor2=>{{let $0=user_derived(()=>disabled()?"Code incomplete":"Preview code");ActionIcon($$anchor2,{get icon(){return Eye},get tooltip(){return get$3($0)},get disabled(){return disabled()},onclick:()=>$$props.onPreview($$props.code,$$props.language)})}};if_block(node_1,$$render=>{get$3(showPreview)&&$$render(consequent)})}reset(div),append($$anchor,div),pop()}var root_4$B=from_html('<img class="\
h-12 w-12 object-cover"/>'),root_5$s=from_html('<div class="bg-foreground-muted/50 flex h-12 w-12 flex-col items-center justify-center gap-0.5 py-1"><!> <span class="font-mono text-[9px] text-white/60"> </span></div>'),root_3$U=from_html("<button><!></button>"),root_1$U=from_html('<div class="sticky bottom-0 z-10 mt-4 flex-shrink-0"><!></div>');function ChatAttachmentsPreviewThumbnailStrip($$anchor,$$props){push$1($$props,!0);function getFileExtension(name){const parts=name.split(".");return parts.
length>1?parts.pop()?.toUpperCase()??"":""}var fragment=comment$2(),node2=first_child(fragment);{var consequent_2=$$anchor2=>{var div=root_1$U(),node_1=child(div);HorizontalScrollCarousel(node_1,{class:"max-w-full",children:($$anchor3,$$slotProps)=>{var fragment_1=comment$2(),node_2=first_child(fragment_1);each(node_2,19,()=>$$props.items,item=>item.id,($$anchor4,item,index2)=>{var button=root_3$U(),node_3=child(button);{var consequent=$$anchor5=>{var img=root_4$B();template_effect(()=>{set_attribute(
img,"src",get$3(item).preview),set_attribute(img,"alt",get$3(item).name)}),append($$anchor5,img)},alternate_1=$$anchor5=>{var div_1=root_5$s(),node_4=child(div_1);{var consequent_1=$$anchor6=>{Music($$anchor6,{class:"h-4 w-4 text-white/70"})},alternate=$$anchor6=>{File_text($$anchor6,{class:"h-4 w-4 text-white/70"})};if_block(node_4,$$render=>{get$3(item).isAudio?$$render(consequent_1):$$render(alternate,-1)})}var span=sibling(node_4,2),text2=child(span,!0);reset(span),reset(div_1),template_effect(
$0=>set_text(text2,$0),[()=>getFileExtension(get$3(item).name)]),append($$anchor5,div_1)};if_block(node_3,$$render=>{get$3(item).isImage&&get$3(item).preview?$$render(consequent):$$render(alternate_1,-1)})}reset(button),template_effect(()=>{set_attribute(button,"data-thumbnail-index",get$3(index2)),set_class(button,1,clsx(["relative flex-shrink-0 cursor-pointer overflow-hidden rounded border-2 bg-black/80 backdrop-blur-sm transition-all hover:opacity-90",get$3(index2)===$$props.currentIndex?"bor\
der-white":"border-transparent opacity-60","[&:not(:first-child)]:last:mr-4 [&:not(:last-child)]:first:ml-4"])),set_attribute(button,"aria-label",`Go to ${get$3(item).name}`)}),delegated("click",button,()=>$$props.onNavigate(get$3(index2))),append($$anchor4,button)}),append($$anchor3,fragment_1)},$$slots:{default:!0}}),reset(div),append($$anchor2,div)};if_block(node2,$$render=>{$$props.items.length>1&&$$render(consequent_2)})}append($$anchor,fragment),pop()}delegate(["click"]);const alertVariants=tv(
{base:"relative grid w-full grid-cols-[0_1fr] items-start gap-y-0.5 rounded-lg border px-4 py-3 text-sm has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] has-[>svg]:gap-x-3 [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",variants:{variant:{default:"bg-card text-card-foreground",destructive:"text-destructive bg-card *:data-[slot=alert-description]:text-destructive/90 [&>svg]:text-current"}},defaultVariants:{variant:"default"}});var root$1A=from_html("<div><!></div>");function Alert($$anchor,$$props){
push$1($$props,!0);let ref2=prop($$props,"ref",15,null),variant=prop($$props,"variant",3,"default"),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class","variant","children"]);var div=root$1A();attribute_effect(div,$0=>({"data-slot":"alert",class:$0,...restProps,role:"alert"}),[()=>cn$1(alertVariants({variant:variant()}),$$props.class)]);var node2=child(div);snippet(node2,()=>$$props.children??noop$3),reset(div),bind_this(div,$$value=>ref2($$value),()=>ref2()),append($$anchor,
div),pop()}var root$1z=from_html("<div><!></div>");function Alert_description($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class","children"]);var div=root$1z();attribute_effect(div,$0=>({"data-slot":"alert-description",class:$0,...restProps}),[()=>cn$1("col-start-2 grid justify-items-start gap-1 text-sm text-muted-foreground [&_p]:leading-relaxed",$$props.class)]);var node2=child(div);snippet(node2,
()=>$$props.children??noop$3),reset(div),bind_this(div,$$value=>ref2($$value),()=>ref2()),append($$anchor,div),pop()}var root$1y=from_html("<div><!></div>");function Alert_title($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class","children"]);var div=root$1y();attribute_effect(div,$0=>({"data-slot":"alert-title",class:$0,...restProps}),[()=>cn$1("col-start-2 line-clamp-1 min-h-4 font-medium tracking\
-tight",$$props.class)]);var node2=child(div);snippet(node2,()=>$$props.children??noop$3),reset(div),bind_this(div,$$value=>ref2($$value),()=>ref2()),append($$anchor,div),pop()}class AudioRecorder{mediaRecorder=null;audioChunks=[];stream=null;recordingState=!1;async startRecording(){try{this.stream=await navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}}),this.initializeRecorder(this.stream),this.audioChunks=[],this.mediaRecorder.start(100),this.
recordingState=!0}catch(error2){throw console.error("Failed to start recording:",error2),new Error("Failed to access microphone. Please check permissions.")}}async stopRecording(){return new Promise((resolve2,reject)=>{const recorder=this.mediaRecorder,chunks=this.audioChunks,stream=this.stream;if(!recorder||recorder.state==="inactive"){reject(new Error("No active recording to stop"));return}this.mediaRecorder=null,this.audioChunks=[],this.stream=null,this.recordingState=!1,recorder.onstop=()=>{
const audioBlob=new Blob(chunks,{type:recorder.mimeType||MimeTypeAudio.WAV});if(stream)for(const track2 of stream.getTracks())track2.stop();resolve2(audioBlob)},recorder.onerror=event2=>{if(console.error("Recording error:",event2),stream)for(const track2 of stream.getTracks())track2.stop();reject(new Error("Recording failed"))},recorder.stop()})}isRecording(){return this.recordingState}cancelRecording(){const recorder=this.mediaRecorder,stream=this.stream;if(this.mediaRecorder=null,this.audioChunks=
[],this.stream=null,this.recordingState=!1,recorder&&recorder.state!=="inactive"&&(recorder.onstop=null,recorder.onerror=null,recorder.stop()),stream)for(const track2 of stream.getTracks())track2.stop()}initializeRecorder(stream){const options={};MediaRecorder.isTypeSupported(MimeTypeAudio.WAV)?options.mimeType=MimeTypeAudio.WAV:MediaRecorder.isTypeSupported(MimeTypeAudio.WEBM_OPUS)?options.mimeType=MimeTypeAudio.WEBM_OPUS:MediaRecorder.isTypeSupported(MimeTypeAudio.WEBM)?options.mimeType=MimeTypeAudio.
WEBM:MediaRecorder.isTypeSupported(MimeTypeAudio.MP4)?options.mimeType=MimeTypeAudio.MP4:console.warn("No preferred audio format supported, using default"),this.mediaRecorder=new MediaRecorder(stream,options),this.mediaRecorder.ondataavailable=event2=>{event2.data.size>0&&this.audioChunks.push(event2.data)},this.mediaRecorder.onstop=()=>{this.recordingState=!1},this.mediaRecorder.onerror=event2=>{console.error("MediaRecorder error:",event2),this.recordingState=!1}}}async function convertToWav(audioBlob){
try{if(audioBlob.type.includes("wav"))return audioBlob;const arrayBuffer=await audioBlob.arrayBuffer(),audioContext=new(window.AudioContext||window.webkitAudioContext);try{const audioBuffer=await audioContext.decodeAudioData(arrayBuffer);return audioBufferToWav(audioBuffer)}finally{audioContext.close()}}catch(error2){return console.error("Failed to convert audio to WAV:",error2),audioBlob}}function audioBufferToWav(buffer){const length=buffer.length,numberOfChannels=buffer.numberOfChannels,sampleRate=buffer.
sampleRate,blockAlign=numberOfChannels*2,byteRate=sampleRate*blockAlign,dataSize=length*blockAlign,bufferSize=44+dataSize,arrayBuffer=new ArrayBuffer(bufferSize),view=new DataView(arrayBuffer),writeString=(offset2,string2)=>{for(let i=0;i<string2.length;i++)view.setUint8(offset2+i,string2.charCodeAt(i))};writeString(0,"RIFF"),view.setUint32(4,bufferSize-8,!0),writeString(8,"WAVE"),writeString(12,"fmt "),view.setUint32(16,16,!0),view.setUint16(20,1,!0),view.setUint16(22,numberOfChannels,!0),view.
setUint32(24,sampleRate,!0),view.setUint32(28,byteRate,!0),view.setUint16(32,blockAlign,!0),view.setUint16(34,16,!0),writeString(36,"data"),view.setUint32(40,dataSize,!0);const channels=new Array(numberOfChannels);for(let c2=0;c2<numberOfChannels;c2++)channels[c2]=buffer.getChannelData(c2);const pcm=new Int16Array(arrayBuffer,44,length*numberOfChannels);let p2=0;for(let i=0;i<length;i++)for(let c2=0;c2<numberOfChannels;c2++){let s2=channels[c2][i];s2>1?s2=1:s2<-1&&(s2=-1),pcm[p2++]=s2*32767}return new Blob(
[arrayBuffer],{type:MimeTypeAudio.WAV})}function createAudioFile(audioBlob,filename){const timestamp=new Date().toISOString().replace(/[:.]/g,"-"),extension2=audioBlob.type.includes("wav")?"wav":"mp3",defaultFilename=`recording-${timestamp}.${extension2}`;return new File([audioBlob],defaultFilename,{type:audioBlob.type,lastModified:Date.now()})}function isAudioRecordingSupported(){return!!(typeof navigator<"u"&&navigator.mediaDevices&&typeof navigator.mediaDevices.getUserMedia=="function"&&typeof window<
"u"&&window.MediaRecorder)}const isNodeJS=typeof process=="object"&&process+""=="[object process]"&&!process.versions.nw&&!(process.versions.electron&&process.type&&process.type!=="browser"),FONT_IDENTITY_MATRIX=[.001,0,0,.001,0,0],LINE_FACTOR=1.35,RenderingIntentFlag={ANY:1,DISPLAY:2,PRINT:4,ANNOTATIONS_FORMS:16,ANNOTATIONS_STORAGE:32,ANNOTATIONS_DISABLE:64,IS_EDITING:128,OPLIST:256},AnnotationMode={DISABLE:0,ENABLE:1,ENABLE_FORMS:2,ENABLE_STORAGE:3},AnnotationEditorPrefix="pdfjs_internal_edito\
r_",AnnotationEditorType={DISABLE:-1,NONE:0,FREETEXT:3,HIGHLIGHT:9,STAMP:13,INK:15,SIGNATURE:101,COMMENT:102},AnnotationEditorParamsType={RESIZE:1,CREATE:2,FREETEXT_SIZE:11,FREETEXT_COLOR:12,FREETEXT_OPACITY:13,INK_COLOR:21,INK_THICKNESS:22,INK_OPACITY:23,HIGHLIGHT_COLOR:31,HIGHLIGHT_THICKNESS:32,HIGHLIGHT_FREE:33,HIGHLIGHT_SHOW_ALL:34,DRAW_STEP:41},PermissionFlag={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048},
TextRenderingMode={FILL:0,STROKE:1,FILL_STROKE:2,INVISIBLE:3,FILL_STROKE_MASK:3,ADD_TO_PATH_FLAG:4},util_ImageKind={GRAYSCALE_1BPP:1,RGB_24BPP:2,RGBA_32BPP:3},AnnotationType={TEXT:1,LINK:2,FREETEXT:3,LINE:4,SQUARE:5,CIRCLE:6,POLYGON:7,POLYLINE:8,HIGHLIGHT:9,UNDERLINE:10,SQUIGGLY:11,STRIKEOUT:12,STAMP:13,CARET:14,INK:15,POPUP:16,FILEATTACHMENT:17,SOUND:18,MOVIE:19,WIDGET:20,SCREEN:21,PRINTERMARK:22,TRAPNET:23,WATERMARK:24,THREED:25,REDACT:26},AnnotationBorderStyleType={SOLID:1,DASHED:2,BEVELED:3,
INSET:4,UNDERLINE:5},VerbosityLevel={ERRORS:0,WARNINGS:1,INFOS:5},OPS={dependency:1,setLineWidth:2,setLineCap:3,setLineJoin:4,setMiterLimit:5,setDash:6,setRenderingIntent:7,setFlatness:8,setGState:9,save:10,restore:11,transform:12,moveTo:13,lineTo:14,curveTo:15,curveTo2:16,curveTo3:17,closePath:18,rectangle:19,stroke:20,closeStroke:21,fill:22,eoFill:23,fillStroke:24,eoFillStroke:25,closeFillStroke:26,closeEOFillStroke:27,endPath:28,clip:29,eoClip:30,beginText:31,endText:32,setCharSpacing:33,setWordSpacing:34,
setHScale:35,setLeading:36,setFont:37,setTextRenderingMode:38,setTextRise:39,moveText:40,setLeadingMoveText:41,setTextMatrix:42,nextLine:43,showText:44,showSpacedText:45,nextLineShowText:46,nextLineSetSpacingShowText:47,setCharWidth:48,setCharWidthAndBounds:49,setStrokeColorSpace:50,setFillColorSpace:51,setStrokeColor:52,setStrokeColorN:53,setFillColor:54,setFillColorN:55,setStrokeGray:56,setFillGray:57,setStrokeRGBColor:58,setFillRGBColor:59,setStrokeCMYKColor:60,setFillCMYKColor:61,shadingFill:62,
beginInlineImage:63,beginImageData:64,endInlineImage:65,paintXObject:66,markPoint:67,markPointProps:68,beginMarkedContent:69,beginMarkedContentProps:70,endMarkedContent:71,beginCompat:72,endCompat:73,paintFormXObjectBegin:74,paintFormXObjectEnd:75,beginGroup:76,endGroup:77,beginAnnotation:80,endAnnotation:81,paintImageMaskXObject:83,paintImageMaskXObjectGroup:84,paintImageXObject:85,paintInlineImageXObject:86,paintInlineImageXObjectGroup:87,paintImageXObjectRepeat:88,paintImageMaskXObjectRepeat:89,
paintSolidColorImageMask:90,constructPath:91,setStrokeTransparent:92,setFillTransparent:93,rawFillPath:94},DrawOPS={moveTo:0,lineTo:1,curveTo:2,closePath:3},PasswordResponses={NEED_PASSWORD:1,INCORRECT_PASSWORD:2};let verbosity=VerbosityLevel.WARNINGS;function setVerbosityLevel(level){Number.isInteger(level)&&(verbosity=level)}function getVerbosityLevel(){return verbosity}function info(msg){verbosity>=VerbosityLevel.INFOS&&console.log(`Info: ${msg}`)}function warn(msg){verbosity>=VerbosityLevel.
WARNINGS&&console.log(`Warning: ${msg}`)}function unreachable(msg){throw new Error(msg)}function assert$1(cond,msg){cond||unreachable(msg)}function _isValidProtocol(url2){switch(url2?.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}function createValidAbsoluteUrl(url2,baseUrl=null,options=null){if(!url2)return null;if(options&&typeof url2=="string"&&(options.addDefaultProtocol&&url2.startsWith("www.")&&url2.match(/\./g)?.length>=2&&(url2=`http://${url2}`),
options.tryConvertEncoding))try{url2=stringToUTF8String(url2)}catch{}const absoluteUrl=baseUrl?URL.parse(url2,baseUrl):URL.parse(url2);return _isValidProtocol(absoluteUrl)?absoluteUrl:null}function updateUrlHash(url2,hash2,allowRel=!1){const res=URL.parse(url2);return res?(res.hash=hash2,res.href):allowRel&&createValidAbsoluteUrl(url2,"http://example.com")?url2.split("#",1)[0]+`${hash2?`#${hash2}`:""}`:""}function shadow(obj,prop2,value,nonSerializable=!1){return Object.defineProperty(obj,prop2,
{value,enumerable:!nonSerializable,configurable:!0,writable:!1}),value}const BaseException=(function(){function BaseException2(message,name){this.message=message,this.name=name}return BaseException2.prototype=new Error,BaseException2.constructor=BaseException2,BaseException2})();class PasswordException extends BaseException{constructor(msg,code2){super(msg,"PasswordException"),this.code=code2}}class UnknownErrorException extends BaseException{constructor(msg,details){super(msg,"UnknownErrorExcep\
tion"),this.details=details}}class InvalidPDFException extends BaseException{constructor(msg){super(msg,"InvalidPDFException")}}class ResponseException extends BaseException{constructor(msg,status,missing){super(msg,"ResponseException"),this.status=status,this.missing=missing}}class FormatError extends BaseException{constructor(msg){super(msg,"FormatError")}}class AbortException extends BaseException{constructor(msg){super(msg,"AbortException")}}function bytesToString(bytes){(typeof bytes!="obje\
ct"||bytes?.length===void 0)&&unreachable("Invalid argument for bytesToString");const length=bytes.length,MAX_ARGUMENT_COUNT=8192;if(length<MAX_ARGUMENT_COUNT)return String.fromCharCode.apply(null,bytes);const strBuf=[];for(let i=0;i<length;i+=MAX_ARGUMENT_COUNT){const chunkEnd=Math.min(i+MAX_ARGUMENT_COUNT,length),chunk=bytes.subarray(i,chunkEnd);strBuf.push(String.fromCharCode.apply(null,chunk))}return strBuf.join("")}function stringToBytes(str){typeof str!="string"&&unreachable("Invalid argum\
ent for stringToBytes");const length=str.length,bytes=new Uint8Array(length);for(let i=0;i<length;++i)bytes[i]=str.charCodeAt(i)&255;return bytes}function string32(value){return String.fromCharCode(value>>24&255,value>>16&255,value>>8&255,value&255)}function isLittleEndian(){const buffer8=new Uint8Array(4);return buffer8[0]=1,new Uint32Array(buffer8.buffer,0,1)[0]===1}function isEvalSupported(){try{return new Function(""),!0}catch{return!1}}class util_FeatureTest{static get isLittleEndian(){return shadow(
this,"isLittleEndian",isLittleEndian())}static get isEvalSupported(){return shadow(this,"isEvalSupported",isEvalSupported())}static get isOffscreenCanvasSupported(){return shadow(this,"isOffscreenCanvasSupported",typeof OffscreenCanvas<"u")}static get isImageDecoderSupported(){return shadow(this,"isImageDecoderSupported",typeof ImageDecoder<"u")}static get platform(){const{platform:platform2,userAgent}=navigator;return shadow(this,"platform",{isAndroid:userAgent.includes("Android"),isLinux:platform2.
includes("Linux"),isMac:platform2.includes("Mac"),isWindows:platform2.includes("Win"),isFirefox:userAgent.includes("Firefox")})}static get isCSSRoundSupported(){return shadow(this,"isCSSRoundSupported",globalThis.CSS?.supports?.("width: round(1.5px, 1px)"))}}const hexNumbers=Array.from(Array(256).keys(),n=>n.toString(16).padStart(2,"0"));class Util{static makeHexColor(r2,g,b){return`#${hexNumbers[r2]}${hexNumbers[g]}${hexNumbers[b]}`}static scaleMinMax(transform2,minMax){let temp;transform2[0]?(transform2[0]<
0&&(temp=minMax[0],minMax[0]=minMax[2],minMax[2]=temp),minMax[0]*=transform2[0],minMax[2]*=transform2[0],transform2[3]<0&&(temp=minMax[1],minMax[1]=minMax[3],minMax[3]=temp),minMax[1]*=transform2[3],minMax[3]*=transform2[3]):(temp=minMax[0],minMax[0]=minMax[1],minMax[1]=temp,temp=minMax[2],minMax[2]=minMax[3],minMax[3]=temp,transform2[1]<0&&(temp=minMax[1],minMax[1]=minMax[3],minMax[3]=temp),minMax[1]*=transform2[1],minMax[3]*=transform2[1],transform2[2]<0&&(temp=minMax[0],minMax[0]=minMax[2],minMax[2]=
temp),minMax[0]*=transform2[2],minMax[2]*=transform2[2]),minMax[0]+=transform2[4],minMax[1]+=transform2[5],minMax[2]+=transform2[4],minMax[3]+=transform2[5]}static transform(m1,m2){return[m1[0]*m2[0]+m1[2]*m2[1],m1[1]*m2[0]+m1[3]*m2[1],m1[0]*m2[2]+m1[2]*m2[3],m1[1]*m2[2]+m1[3]*m2[3],m1[0]*m2[4]+m1[2]*m2[5]+m1[4],m1[1]*m2[4]+m1[3]*m2[5]+m1[5]]}static applyTransform(p2,m,pos=0){const p0=p2[pos],p1=p2[pos+1];p2[pos]=p0*m[0]+p1*m[2]+m[4],p2[pos+1]=p0*m[1]+p1*m[3]+m[5]}static applyTransformToBezier(p2,transform2,pos=0){
const m0=transform2[0],m1=transform2[1],m2=transform2[2],m3=transform2[3],m4=transform2[4],m5=transform2[5];for(let i=0;i<6;i+=2){const pI=p2[pos+i],pI1=p2[pos+i+1];p2[pos+i]=pI*m0+pI1*m2+m4,p2[pos+i+1]=pI*m1+pI1*m3+m5}}static applyInverseTransform(p2,m){const p0=p2[0],p1=p2[1],d2=m[0]*m[3]-m[1]*m[2];p2[0]=(p0*m[3]-p1*m[2]+m[2]*m[5]-m[4]*m[3])/d2,p2[1]=(-p0*m[1]+p1*m[0]+m[4]*m[1]-m[5]*m[0])/d2}static axialAlignedBoundingBox(rect,transform2,output){const m0=transform2[0],m1=transform2[1],m2=transform2[2],
m3=transform2[3],m4=transform2[4],m5=transform2[5],r0=rect[0],r1=rect[1],r2=rect[2],r3=rect[3];let a0=m0*r0+m4,a2=a0,a1=m0*r2+m4,a3=a1,b0=m3*r1+m5,b2=b0,b1=m3*r3+m5,b3=b1;if(m1!==0||m2!==0){const m1r0=m1*r0,m1r2=m1*r2,m2r1=m2*r1,m2r3=m2*r3;a0+=m2r1,a3+=m2r1,a1+=m2r3,a2+=m2r3,b0+=m1r0,b3+=m1r0,b1+=m1r2,b2+=m1r2}output[0]=Math.min(output[0],a0,a1,a2,a3),output[1]=Math.min(output[1],b0,b1,b2,b3),output[2]=Math.max(output[2],a0,a1,a2,a3),output[3]=Math.max(output[3],b0,b1,b2,b3)}static inverseTransform(m){
const d2=m[0]*m[3]-m[1]*m[2];return[m[3]/d2,-m[1]/d2,-m[2]/d2,m[0]/d2,(m[2]*m[5]-m[4]*m[3])/d2,(m[4]*m[1]-m[5]*m[0])/d2]}static singularValueDecompose2dScale(matrix,output){const m0=matrix[0],m1=matrix[1],m2=matrix[2],m3=matrix[3],a=m0**2+m1**2,b=m0*m2+m1*m3,c2=m2**2+m3**2,first=(a+c2)/2,second=Math.sqrt(first**2-(a*c2-b**2));output[0]=Math.sqrt(first+second||1),output[1]=Math.sqrt(first-second||1)}static normalizeRect(rect){const r2=rect.slice(0);return rect[0]>rect[2]&&(r2[0]=rect[2],r2[2]=rect[0]),
rect[1]>rect[3]&&(r2[1]=rect[3],r2[3]=rect[1]),r2}static intersect(rect1,rect2){const xLow=Math.max(Math.min(rect1[0],rect1[2]),Math.min(rect2[0],rect2[2])),xHigh=Math.min(Math.max(rect1[0],rect1[2]),Math.max(rect2[0],rect2[2]));if(xLow>xHigh)return null;const yLow=Math.max(Math.min(rect1[1],rect1[3]),Math.min(rect2[1],rect2[3])),yHigh=Math.min(Math.max(rect1[1],rect1[3]),Math.max(rect2[1],rect2[3]));return yLow>yHigh?null:[xLow,yLow,xHigh,yHigh]}static pointBoundingBox(x,y,minMax){minMax[0]=Math.
min(minMax[0],x),minMax[1]=Math.min(minMax[1],y),minMax[2]=Math.max(minMax[2],x),minMax[3]=Math.max(minMax[3],y)}static rectBoundingBox(x0,y0,x1,y1,minMax){minMax[0]=Math.min(minMax[0],x0,x1),minMax[1]=Math.min(minMax[1],y0,y1),minMax[2]=Math.max(minMax[2],x0,x1),minMax[3]=Math.max(minMax[3],y0,y1)}static#getExtremumOnCurve(x0,x1,x2,x3,y0,y1,y2,y3,t,minMax){if(t<=0||t>=1)return;const mt=1-t,tt=t*t,ttt=tt*t,x=mt*(mt*(mt*x0+3*t*x1)+3*tt*x2)+ttt*x3,y=mt*(mt*(mt*y0+3*t*y1)+3*tt*y2)+ttt*y3;minMax[0]=
Math.min(minMax[0],x),minMax[1]=Math.min(minMax[1],y),minMax[2]=Math.max(minMax[2],x),minMax[3]=Math.max(minMax[3],y)}static#getExtremum(x0,x1,x2,x3,y0,y1,y2,y3,a,b,c2,minMax){if(Math.abs(a)<1e-12){Math.abs(b)>=1e-12&&this.#getExtremumOnCurve(x0,x1,x2,x3,y0,y1,y2,y3,-c2/b,minMax);return}const delta=b**2-4*c2*a;if(delta<0)return;const sqrtDelta=Math.sqrt(delta),a2=2*a;this.#getExtremumOnCurve(x0,x1,x2,x3,y0,y1,y2,y3,(-b+sqrtDelta)/a2,minMax),this.#getExtremumOnCurve(x0,x1,x2,x3,y0,y1,y2,y3,(-b-sqrtDelta)/
a2,minMax)}static bezierBoundingBox(x0,y0,x1,y1,x2,y2,x3,y3,minMax){minMax[0]=Math.min(minMax[0],x0,x3),minMax[1]=Math.min(minMax[1],y0,y3),minMax[2]=Math.max(minMax[2],x0,x3),minMax[3]=Math.max(minMax[3],y0,y3),this.#getExtremum(x0,x1,x2,x3,y0,y1,y2,y3,3*(-x0+3*(x1-x2)+x3),6*(x0-2*x1+x2),3*(x1-x0),minMax),this.#getExtremum(x0,x1,x2,x3,y0,y1,y2,y3,3*(-y0+3*(y1-y2)+y3),6*(y0-2*y1+y2),3*(y1-y0),minMax)}}function stringToUTF8String(str){return decodeURIComponent(escape(str))}let NormalizeRegex=null,
NormalizationMap=null;function normalizeUnicode(str){return NormalizeRegex||(NormalizeRegex=/([\u00a0\u00b5\u037e\u0eb3\u2000-\u200a\u202f\u2126\ufb00-\ufb04\ufb06\ufb20-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufba1\ufba4-\ufba9\ufbae-\ufbb1\ufbd3-\ufbdc\ufbde-\ufbe7\ufbea-\ufbf8\ufbfc-\ufbfd\ufc00-\ufc5d\ufc64-\ufcf1\ufcf5-\ufd3d\ufd88\ufdf4\ufdfa-\ufdfb\ufe71\ufe77\ufe79\ufe7b\ufe7d]+)|(\ufb05+)/gu,NormalizationMap=new Map([["ﬅ","ſt"]])),str.replaceAll(NormalizeRegex,(_,p1,p2)=>p1?
p1.normalize("NFKC"):NormalizationMap.get(p2))}function getUuid(){if(typeof crypto.randomUUID=="function")return crypto.randomUUID();const buf=new Uint8Array(32);return crypto.getRandomValues(buf),bytesToString(buf)}const AnnotationPrefix="pdfjs_internal_id_";function _isValidExplicitDest(validRef,validName,dest){if(!Array.isArray(dest)||dest.length<2)return!1;const[page2,zoom,...args]=dest;if(!validRef(page2)&&!Number.isInteger(page2)||!validName(zoom))return!1;const argsLen=args.length;let allowNull=!0;
switch(zoom.name){case"XYZ":if(argsLen<2||argsLen>3)return!1;break;case"Fit":case"FitB":return argsLen===0;case"FitH":case"FitBH":case"FitV":case"FitBV":if(argsLen>1)return!1;break;case"FitR":if(argsLen!==4)return!1;allowNull=!1;break;default:return!1}for(const arg of args)if(!(typeof arg=="number"||allowNull&&arg===null))return!1;return!0}function MathClamp(v,min2,max2){return Math.min(Math.max(v,min2),max2)}function toBase64Util(arr){return Uint8Array.prototype.toBase64?arr.toBase64():btoa(bytesToString(
arr))}function fromBase64Util(str){return Uint8Array.fromBase64?Uint8Array.fromBase64(str):stringToBytes(atob(str))}typeof Promise.try!="function"&&(Promise.try=function(fn,...args){return new Promise(resolve2=>{resolve2(fn(...args))})});typeof Math.sumPrecise!="function"&&(Math.sumPrecise=function(numbers){return numbers.reduce((a,b)=>a+b,0)});const SVG_NS="http://www.w3.org/2000/svg";class PixelsPerInch{static CSS=96;static PDF=72;static PDF_TO_CSS_UNITS=this.CSS/this.PDF}async function fetchData(url2,type2="\
text"){if(isValidFetchUrl(url2,document.baseURI)){const response=await fetch(url2);if(!response.ok)throw new Error(response.statusText);switch(type2){case"arraybuffer":return response.arrayBuffer();case"blob":return response.blob();case"json":return response.json()}return response.text()}return new Promise((resolve2,reject)=>{const request=new XMLHttpRequest;request.open("GET",url2,!0),request.responseType=type2,request.onreadystatechange=()=>{if(request.readyState===XMLHttpRequest.DONE){if(request.
status===200||request.status===0){switch(type2){case"arraybuffer":case"blob":case"json":resolve2(request.response);return}resolve2(request.responseText);return}reject(new Error(request.statusText))}},request.send(null)})}class PageViewport{constructor({viewBox,userUnit,scale:scale2,rotation,offsetX=0,offsetY=0,dontFlip=!1}){this.viewBox=viewBox,this.userUnit=userUnit,this.scale=scale2,this.rotation=rotation,this.offsetX=offsetX,this.offsetY=offsetY,scale2*=userUnit;const centerX=(viewBox[2]+viewBox[0])/
2,centerY=(viewBox[3]+viewBox[1])/2;let rotateA,rotateB,rotateC,rotateD;switch(rotation%=360,rotation<0&&(rotation+=360),rotation){case 180:rotateA=-1,rotateB=0,rotateC=0,rotateD=1;break;case 90:rotateA=0,rotateB=1,rotateC=1,rotateD=0;break;case 270:rotateA=0,rotateB=-1,rotateC=-1,rotateD=0;break;case 0:rotateA=1,rotateB=0,rotateC=0,rotateD=-1;break;default:throw new Error("PageViewport: Invalid rotation, must be a multiple of 90 degrees.")}dontFlip&&(rotateC=-rotateC,rotateD=-rotateD);let offsetCanvasX,
offsetCanvasY,width,height;rotateA===0?(offsetCanvasX=Math.abs(centerY-viewBox[1])*scale2+offsetX,offsetCanvasY=Math.abs(centerX-viewBox[0])*scale2+offsetY,width=(viewBox[3]-viewBox[1])*scale2,height=(viewBox[2]-viewBox[0])*scale2):(offsetCanvasX=Math.abs(centerX-viewBox[0])*scale2+offsetX,offsetCanvasY=Math.abs(centerY-viewBox[1])*scale2+offsetY,width=(viewBox[2]-viewBox[0])*scale2,height=(viewBox[3]-viewBox[1])*scale2),this.transform=[rotateA*scale2,rotateB*scale2,rotateC*scale2,rotateD*scale2,
offsetCanvasX-rotateA*scale2*centerX-rotateC*scale2*centerY,offsetCanvasY-rotateB*scale2*centerX-rotateD*scale2*centerY],this.width=width,this.height=height}get rawDims(){const dims=this.viewBox;return shadow(this,"rawDims",{pageWidth:dims[2]-dims[0],pageHeight:dims[3]-dims[1],pageX:dims[0],pageY:dims[1]})}clone({scale:scale2=this.scale,rotation=this.rotation,offsetX=this.offsetX,offsetY=this.offsetY,dontFlip=!1}={}){return new PageViewport({viewBox:this.viewBox.slice(),userUnit:this.userUnit,scale:scale2,
rotation,offsetX,offsetY,dontFlip})}convertToViewportPoint(x,y){const p2=[x,y];return Util.applyTransform(p2,this.transform),p2}convertToViewportRectangle(rect){const topLeft=[rect[0],rect[1]];Util.applyTransform(topLeft,this.transform);const bottomRight=[rect[2],rect[3]];return Util.applyTransform(bottomRight,this.transform),[topLeft[0],topLeft[1],bottomRight[0],bottomRight[1]]}convertToPdfPoint(x,y){const p2=[x,y];return Util.applyInverseTransform(p2,this.transform),p2}}class RenderingCancelledException extends BaseException{constructor(msg,extraDelay=0){
super(msg,"RenderingCancelledException"),this.extraDelay=extraDelay}}function isDataScheme(url2){const ii=url2.length;let i=0;for(;i<ii&&url2[i].trim()==="";)i++;return url2.substring(i,i+5).toLowerCase()==="data:"}function isPdfFile(filename){return typeof filename=="string"&&/\.pdf$/i.test(filename)}function getFilenameFromUrl(url2){return[url2]=url2.split(/[#?]/,1),url2.substring(url2.lastIndexOf("/")+1)}function getPdfFilenameFromUrl(url2,defaultFilename="document.pdf"){if(typeof url2!="stri\
ng")return defaultFilename;if(isDataScheme(url2))return warn('getPdfFilenameFromUrl: ignore "data:"-URL for performance reasons.'),defaultFilename;const newURL=(urlString=>{try{return new URL(urlString)}catch{try{return new URL(decodeURIComponent(urlString))}catch{try{return new URL(urlString,"https://foo.bar")}catch{try{return new URL(decodeURIComponent(urlString),"https://foo.bar")}catch{return null}}}}})(url2);if(!newURL)return defaultFilename;const decode2=name=>{try{let decoded=decodeURIComponent(
name);return decoded.includes("/")?(decoded=decoded.split("/").at(-1),decoded.test(/^\.pdf$/i)?decoded:name):decoded}catch{return name}},pdfRegex=/\.pdf$/i,filename=newURL.pathname.split("/").at(-1);if(pdfRegex.test(filename))return decode2(filename);if(newURL.searchParams.size>0){const values=Array.from(newURL.searchParams.values()).reverse();for(const value of values)if(pdfRegex.test(value))return decode2(value);const keys2=Array.from(newURL.searchParams.keys()).reverse();for(const key2 of keys2)
if(pdfRegex.test(key2))return decode2(key2)}if(newURL.hash){const hashFilename=/[^/?#=]+\.pdf\b(?!.*\.pdf\b)/i.exec(newURL.hash);if(hashFilename)return decode2(hashFilename[0])}return defaultFilename}class StatTimer{started=Object.create(null);times=[];time(name){name in this.started&&warn(`Timer is already running for ${name}`),this.started[name]=Date.now()}timeEnd(name){name in this.started||warn(`Timer has not been started for ${name}`),this.times.push({name,start:this.started[name],end:Date.
now()}),delete this.started[name]}toString(){const outBuf=[];let longest=0;for(const{name}of this.times)longest=Math.max(name.length,longest);for(const{name,start:start2,end}of this.times)outBuf.push(`${name.padEnd(longest)} ${end-start2}ms
`);return outBuf.join("")}}function isValidFetchUrl(url2,baseUrl){const res=baseUrl?URL.parse(url2,baseUrl):URL.parse(url2);return res?.protocol==="http:"||res?.protocol==="https:"}function noContextMenu(e){e.preventDefault()}function stopEvent(e){e.preventDefault(),e.stopPropagation()}function deprecated(details){console.log("Deprecated API usage: "+details)}class PDFDateString{static#regex;static toDateObject(input){if(input instanceof Date)return input;if(!input||typeof input!="string")return null;
this.#regex||=new RegExp("^D:(\\d{4})(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?(\\d{2})?([Z|+|-])?(\\d{2})?'?(\\d{2})?'?");const matches2=this.#regex.exec(input);if(!matches2)return null;const year=parseInt(matches2[1],10);let month=parseInt(matches2[2],10);month=month>=1&&month<=12?month-1:0;let day=parseInt(matches2[3],10);day=day>=1&&day<=31?day:1;let hour=parseInt(matches2[4],10);hour=hour>=0&&hour<=23?hour:0;let minute=parseInt(matches2[5],10);minute=minute>=0&&minute<=59?minute:0;let second=parseInt(
matches2[6],10);second=second>=0&&second<=59?second:0;const universalTimeRelation=matches2[7]||"Z";let offsetHour=parseInt(matches2[8],10);offsetHour=offsetHour>=0&&offsetHour<=23?offsetHour:0;let offsetMinute=parseInt(matches2[9],10)||0;return offsetMinute=offsetMinute>=0&&offsetMinute<=59?offsetMinute:0,universalTimeRelation==="-"?(hour+=offsetHour,minute+=offsetMinute):universalTimeRelation==="+"&&(hour-=offsetHour,minute-=offsetMinute),new Date(Date.UTC(year,month,day,hour,minute,second))}}function getXfaPageViewport(xfaPage,{
scale:scale2=1,rotation=0}){const{width,height}=xfaPage.attributes.style,viewBox=[0,0,parseInt(width),parseInt(height)];return new PageViewport({viewBox,userUnit:1,scale:scale2,rotation})}function getRGB(color){if(color.startsWith("#")){const colorRGB=parseInt(color.slice(1),16);return[(colorRGB&16711680)>>16,(colorRGB&65280)>>8,colorRGB&255]}return color.startsWith("rgb(")?color.slice(4,-1).split(",").map(x=>parseInt(x)):color.startsWith("rgba(")?color.slice(5,-1).split(",").map(x=>parseInt(x)).
slice(0,3):(warn(`Not a valid color format: "${color}"`),[0,0,0])}function getColorValues(colors){const span=document.createElement("span");span.style.visibility="hidden",span.style.colorScheme="only light",document.body.append(span);for(const name of colors.keys()){span.style.color=name;const computedColor=window.getComputedStyle(span).color;colors.set(name,getRGB(computedColor))}span.remove()}function getCurrentTransform(ctx){const{a,b,c:c2,d:d2,e,f}=ctx.getTransform();return[a,b,c2,d2,e,f]}function getCurrentTransformInverse(ctx){
const{a,b,c:c2,d:d2,e,f}=ctx.getTransform().invertSelf();return[a,b,c2,d2,e,f]}function setLayerDimensions(div,viewport,mustFlip=!1,mustRotate=!0){if(viewport instanceof PageViewport){const{pageWidth,pageHeight}=viewport.rawDims,{style:style2}=div,useRound=util_FeatureTest.isCSSRoundSupported,w=`var(--total-scale-factor) * ${pageWidth}px`,h2=`var(--total-scale-factor) * ${pageHeight}px`,widthStr=useRound?`round(down, ${w}, var(--scale-round-x))`:`calc(${w})`,heightStr=useRound?`round(down, ${h2}\
, var(--scale-round-y))`:`calc(${h2})`;!mustFlip||viewport.rotation%180===0?(style2.width=widthStr,style2.height=heightStr):(style2.width=heightStr,style2.height=widthStr)}mustRotate&&div.setAttribute("data-main-rotation",viewport.rotation)}class OutputScale{constructor(){const{pixelRatio}=OutputScale;this.sx=pixelRatio,this.sy=pixelRatio}get scaled(){return this.sx!==1||this.sy!==1}get symmetric(){return this.sx===this.sy}limitCanvas(width,height,maxPixels,maxDim,capAreaFactor=-1){let maxAreaScale=1/0,
maxWidthScale=1/0,maxHeightScale=1/0;maxPixels=OutputScale.capPixels(maxPixels,capAreaFactor),maxPixels>0&&(maxAreaScale=Math.sqrt(maxPixels/(width*height))),maxDim!==-1&&(maxWidthScale=maxDim/width,maxHeightScale=maxDim/height);const maxScale=Math.min(maxAreaScale,maxWidthScale,maxHeightScale);return this.sx>maxScale||this.sy>maxScale?(this.sx=maxScale,this.sy=maxScale,!0):!1}static get pixelRatio(){return globalThis.devicePixelRatio||1}static capPixels(maxPixels,capAreaFactor){if(capAreaFactor>=
0){const winPixels=Math.ceil(window.screen.availWidth*window.screen.availHeight*this.pixelRatio**2*(1+capAreaFactor/100));return maxPixels>0?Math.min(maxPixels,winPixels):winPixels}return maxPixels}}const SupportedImageMimeTypes=["image/apng","image/avif","image/bmp","image/gif","image/jpeg","image/png","image/svg+xml","image/webp","image/x-icon"];class EditorToolbar{#toolbar=null;#colorPicker=null;#editor;#buttons=null;#altText=null;#comment=null;#signatureDescriptionButton=null;static#l10nRemove=null;constructor(editor){
this.#editor=editor,EditorToolbar.#l10nRemove||=Object.freeze({freetext:"pdfjs-editor-remove-freetext-button",highlight:"pdfjs-editor-remove-highlight-button",ink:"pdfjs-editor-remove-ink-button",stamp:"pdfjs-editor-remove-stamp-button",signature:"pdfjs-editor-remove-signature-button"})}render(){const editToolbar=this.#toolbar=document.createElement("div");editToolbar.classList.add("editToolbar","hidden"),editToolbar.setAttribute("role","toolbar");const signal=this.#editor._uiManager._signal;editToolbar.
addEventListener("contextmenu",noContextMenu,{signal}),editToolbar.addEventListener("pointerdown",EditorToolbar.#pointerDown,{signal});const buttons=this.#buttons=document.createElement("div");buttons.className="buttons",editToolbar.append(buttons);const position2=this.#editor.toolbarPosition;if(position2){const{style:style2}=editToolbar,x=this.#editor._uiManager.direction==="ltr"?1-position2[0]:position2[0];style2.insetInlineEnd=`${100*x}%`,style2.top=`calc(${100*position2[1]}% + var(--editor-t\
oolbar-vert-offset))`}return editToolbar}get div(){return this.#toolbar}static#pointerDown(e){e.stopPropagation()}#focusIn(e){this.#editor._focusEventsAllowed=!1,stopEvent(e)}#focusOut(e){this.#editor._focusEventsAllowed=!0,stopEvent(e)}#addListenersToElement(element2){const signal=this.#editor._uiManager._signal;element2.addEventListener("focusin",this.#focusIn.bind(this),{capture:!0,signal}),element2.addEventListener("focusout",this.#focusOut.bind(this),{capture:!0,signal}),element2.addEventListener(
"contextmenu",noContextMenu,{signal})}hide(){this.#toolbar.classList.add("hidden"),this.#colorPicker?.hideDropdown()}show(){this.#toolbar.classList.remove("hidden"),this.#altText?.shown(),this.#comment?.shown()}addDeleteButton(){const{editorType,_uiManager}=this.#editor,button=document.createElement("button");button.className="delete",button.tabIndex=0,button.setAttribute("data-l10n-id",EditorToolbar.#l10nRemove[editorType]),this.#addListenersToElement(button),button.addEventListener("click",e=>{
_uiManager.delete()},{signal:_uiManager._signal}),this.#buttons.append(button)}get#divider(){const divider=document.createElement("div");return divider.className="divider",divider}async addAltText(altText){const button=await altText.render();this.#addListenersToElement(button),this.#buttons.append(button,this.#divider),this.#altText=altText}addComment(comment2){if(this.#comment)return;const button=comment2.render();button&&(this.#addListenersToElement(button),this.#buttons.prepend(button,this.#divider),
this.#comment=comment2,comment2.toolbar=this)}addColorPicker(colorPicker){if(this.#colorPicker)return;this.#colorPicker=colorPicker;const button=colorPicker.renderButton();this.#addListenersToElement(button),this.#buttons.append(button,this.#divider)}async addEditSignatureButton(signatureManager){const button=this.#signatureDescriptionButton=await signatureManager.renderEditButton(this.#editor);this.#addListenersToElement(button),this.#buttons.append(button,this.#divider)}async addButton(name,tool){
switch(name){case"colorPicker":this.addColorPicker(tool);break;case"altText":await this.addAltText(tool);break;case"editSignature":await this.addEditSignatureButton(tool);break;case"delete":this.addDeleteButton();break;case"comment":this.addComment(tool);break}}updateEditSignatureButton(description2){this.#signatureDescriptionButton&&(this.#signatureDescriptionButton.title=description2)}remove(){this.#toolbar.remove(),this.#colorPicker?.destroy(),this.#colorPicker=null}}class HighlightToolbar{#buttons=null;#toolbar=null;#uiManager;constructor(uiManager){
this.#uiManager=uiManager}#render(){const editToolbar=this.#toolbar=document.createElement("div");editToolbar.className="editToolbar",editToolbar.setAttribute("role","toolbar"),editToolbar.addEventListener("contextmenu",noContextMenu,{signal:this.#uiManager._signal});const buttons=this.#buttons=document.createElement("div");return buttons.className="buttons",editToolbar.append(buttons),this.#addHighlightButton(),editToolbar}#getLastPoint(boxes,isLTR){let lastY=0,lastX=0;for(const box2 of boxes){
const y=box2.y+box2.height;if(y<lastY)continue;const x=box2.x+(isLTR?box2.width:0);if(y>lastY){lastX=x,lastY=y;continue}isLTR?x>lastX&&(lastX=x):x<lastX&&(lastX=x)}return[isLTR?1-lastX:lastX,lastY]}show(parent,boxes,isLTR){const[x,y]=this.#getLastPoint(boxes,isLTR),{style:style2}=this.#toolbar||=this.#render();parent.append(this.#toolbar),style2.insetInlineEnd=`${100*x}%`,style2.top=`calc(${100*y}% + var(--editor-toolbar-vert-offset))`}hide(){this.#toolbar.remove()}#addHighlightButton(){const button=document.
createElement("button");button.className="highlightButton",button.tabIndex=0,button.setAttribute("data-l10n-id","pdfjs-highlight-floating-button1");const span=document.createElement("span");button.append(span),span.className="visuallyHidden",span.setAttribute("data-l10n-id","pdfjs-highlight-floating-button-label");const signal=this.#uiManager._signal;button.addEventListener("contextmenu",noContextMenu,{signal}),button.addEventListener("click",()=>{this.#uiManager.highlightSelection("floating_but\
ton")},{signal}),this.#buttons.append(button)}}function bindEvents(obj,element2,names2){for(const name of names2)element2.addEventListener(name,obj[name].bind(obj))}class IdManager{#id=0;get id(){return`${AnnotationEditorPrefix}${this.#id++}`}}class ImageManager{#baseId=getUuid();#id=0;#cache=null;static get _isSVGFittingCanvas(){const svg2='data:image/svg+xml;charset=UTF-8,<svg viewBox="0 0 1 1" width="1" height="1" xmlns="http://www.w3.org/2000/svg"><rect width="1" height="1" style="fill:red;"\
/></svg>',ctx=new OffscreenCanvas(1,3).getContext("2d",{willReadFrequently:!0}),image2=new Image;image2.src=svg2;const promise=image2.decode().then(()=>(ctx.drawImage(image2,0,0,1,1,0,0,1,3),new Uint32Array(ctx.getImageData(0,0,1,1).data.buffer)[0]===0));return shadow(this,"_isSVGFittingCanvas",promise)}async#get(key2,rawData){this.#cache||=new Map;let data=this.#cache.get(key2);if(data===null)return null;if(data?.bitmap)return data.refCounter+=1,data;try{data||={bitmap:null,id:`image_${this.#baseId}\
_${this.#id++}`,refCounter:0,isSvg:!1};let image2;if(typeof rawData=="string"?(data.url=rawData,image2=await fetchData(rawData,"blob")):rawData instanceof File?image2=data.file=rawData:rawData instanceof Blob&&(image2=rawData),image2.type==="image/svg+xml"){const mustRemoveAspectRatioPromise=ImageManager._isSVGFittingCanvas,fileReader=new FileReader,imageElement=new Image,imagePromise=new Promise((resolve2,reject)=>{imageElement.onload=()=>{data.bitmap=imageElement,data.isSvg=!0,resolve2()},fileReader.
onload=async()=>{const url2=data.svgUrl=fileReader.result;imageElement.src=await mustRemoveAspectRatioPromise?`${url2}#svgView(preserveAspectRatio(none))`:url2},imageElement.onerror=fileReader.onerror=reject});fileReader.readAsDataURL(image2),await imagePromise}else data.bitmap=await createImageBitmap(image2);data.refCounter=1}catch(e){warn(e),data=null}return this.#cache.set(key2,data),data&&this.#cache.set(data.id,data),data}async getFromFile(file){const{lastModified,name,size:size2,type:type2}=file;
return this.#get(`${lastModified}_${name}_${size2}_${type2}`,file)}async getFromUrl(url2){return this.#get(url2,url2)}async getFromBlob(id2,blobPromise){const blob=await blobPromise;return this.#get(id2,blob)}async getFromId(id2){this.#cache||=new Map;const data=this.#cache.get(id2);if(!data)return null;if(data.bitmap)return data.refCounter+=1,data;if(data.file)return this.getFromFile(data.file);if(data.blobPromise){const{blobPromise}=data;return delete data.blobPromise,this.getFromBlob(data.id,
blobPromise)}return this.getFromUrl(data.url)}getFromCanvas(id2,canvas){this.#cache||=new Map;let data=this.#cache.get(id2);if(data?.bitmap)return data.refCounter+=1,data;const offscreen=new OffscreenCanvas(canvas.width,canvas.height);return offscreen.getContext("2d").drawImage(canvas,0,0),data={bitmap:offscreen.transferToImageBitmap(),id:`image_${this.#baseId}_${this.#id++}`,refCounter:1,isSvg:!1},this.#cache.set(id2,data),this.#cache.set(data.id,data),data}getSvgUrl(id2){const data=this.#cache.
get(id2);return data?.isSvg?data.svgUrl:null}deleteId(id2){this.#cache||=new Map;const data=this.#cache.get(id2);if(!data||(data.refCounter-=1,data.refCounter!==0))return;const{bitmap}=data;if(!data.url&&!data.file){const canvas=new OffscreenCanvas(bitmap.width,bitmap.height);canvas.getContext("bitmaprenderer").transferFromImageBitmap(bitmap),data.blobPromise=canvas.convertToBlob()}bitmap.close?.(),data.bitmap=null}isValidId(id2){return id2.startsWith(`image_${this.#baseId}_`)}}class CommandManager{#commands=[];#locked=!1;#maxSize;#position=-1;constructor(maxSize=128){
this.#maxSize=maxSize}add({cmd,undo,post,mustExec,type:type2=NaN,overwriteIfSameType=!1,keepUndo=!1}){if(mustExec&&cmd(),this.#locked)return;const save={cmd,undo,post,type:type2};if(this.#position===-1){this.#commands.length>0&&(this.#commands.length=0),this.#position=0,this.#commands.push(save);return}if(overwriteIfSameType&&this.#commands[this.#position].type===type2){keepUndo&&(save.undo=this.#commands[this.#position].undo),this.#commands[this.#position]=save;return}const next2=this.#position+
1;next2===this.#maxSize?this.#commands.splice(0,1):(this.#position=next2,next2<this.#commands.length&&this.#commands.splice(next2)),this.#commands.push(save)}undo(){if(this.#position===-1)return;this.#locked=!0;const{undo,post}=this.#commands[this.#position];undo(),post?.(),this.#locked=!1,this.#position-=1}redo(){if(this.#position<this.#commands.length-1){this.#position+=1,this.#locked=!0;const{cmd,post}=this.#commands[this.#position];cmd(),post?.(),this.#locked=!1}}hasSomethingToUndo(){return this.#position!==
-1}hasSomethingToRedo(){return this.#position<this.#commands.length-1}cleanType(type2){if(this.#position!==-1){for(let i=this.#position;i>=0;i--)if(this.#commands[i].type!==type2){this.#commands.splice(i+1,this.#position-i),this.#position=i;return}this.#commands.length=0,this.#position=-1}}destroy(){this.#commands=null}}class KeyboardManager{constructor(callbacks){this.buffer=[],this.callbacks=new Map,this.allKeys=new Set;const{isMac}=util_FeatureTest.platform;for(const[keys2,callback,options={}]of callbacks)
for(const key2 of keys2){const isMacKey=key2.startsWith("mac+");isMac&&isMacKey?(this.callbacks.set(key2.slice(4),{callback,options}),this.allKeys.add(key2.split("+").at(-1))):!isMac&&!isMacKey&&(this.callbacks.set(key2,{callback,options}),this.allKeys.add(key2.split("+").at(-1)))}}#serialize(event2){event2.altKey&&this.buffer.push("alt"),event2.ctrlKey&&this.buffer.push("ctrl"),event2.metaKey&&this.buffer.push("meta"),event2.shiftKey&&this.buffer.push("shift"),this.buffer.push(event2.key);const str=this.
buffer.join("+");return this.buffer.length=0,str}exec(self2,event2){if(!this.allKeys.has(event2.key))return;const info2=this.callbacks.get(this.#serialize(event2));if(!info2)return;const{callback,options:{bubbles=!1,args=[],checker=null}}=info2;checker&&!checker(self2,event2)||(callback.bind(self2,...args,event2)(),bubbles||stopEvent(event2))}}class ColorManager{static _colorsMapping=new Map([["CanvasText",[0,0,0]],["Canvas",[255,255,255]]]);get _colors(){const colors=new Map([["CanvasText",null],
["Canvas",null]]);return getColorValues(colors),shadow(this,"_colors",colors)}convert(color){const rgb=getRGB(color);if(!window.matchMedia("(forced-colors: active)").matches)return rgb;for(const[name,RGB]of this._colors)if(RGB.every((x,i)=>x===rgb[i]))return ColorManager._colorsMapping.get(name);return rgb}getHexCode(name){const rgb=this._colors.get(name);return rgb?Util.makeHexColor(...rgb):name}}class AnnotationEditorUIManager{#abortController=new AbortController;#activeEditor=null;#allEditors=new Map;#allLayers=new Map;#altTextManager=null;#annotationStorage=null;#changedExistingAnnotations=null;#commandManager=new CommandManager;#commentManager=null;#copyPasteAC=null;#currentDrawingSession=null;#currentPageIndex=0;#deletedAnnotationsElementIds=new Set;#draggingEditors=null;#editorTypes=null;#editorsToRescale=new Set;_editorUndoBar=null;#enableHighlightFloatingButton=!1;#enableUpdatedAddImage=!1;#enableNewAltTextWhenAddingImage=!1;#filterFactory=null;#focusMainContainerTimeoutId=null;#focusManagerAC=null;#highlightColors=null;#highlightWhenShiftUp=!1;#highlightToolbar=null;#idManager=new IdManager;#isEnabled=!1;#isWaiting=!1;#keyboardManagerAC=null;#lastActiveElement=null;#mainHighlightColorPicker=null;#missingCanvases=null;#mlManager=null;#mode=AnnotationEditorType.
NONE;#selectedEditors=new Set;#selectedTextNode=null;#signatureManager=null;#pageColors=null;#showAllStates=null;#previousStates={isEditing:!1,isEmpty:!0,hasSomethingToUndo:!1,hasSomethingToRedo:!1,hasSelectedEditor:!1,hasSelectedText:!1};#translation=[0,0];#translationTimeoutId=null;#container=null;#viewer=null;#viewerAlert=null;#updateModeCapability=null;static TRANSLATE_SMALL=1;static TRANSLATE_BIG=10;static get _keyboardManager(){const proto=AnnotationEditorUIManager.prototype,arrowChecker=self2=>self2.#container.
contains(document.activeElement)&&document.activeElement.tagName!=="BUTTON"&&self2.hasSomethingToControl(),textInputChecker=(_self,{target:el})=>{if(el instanceof HTMLInputElement){const{type:type2}=el;return type2!=="text"&&type2!=="number"}return!0},small=this.TRANSLATE_SMALL,big=this.TRANSLATE_BIG;return shadow(this,"_keyboardManager",new KeyboardManager([[["ctrl+a","mac+meta+a"],proto.selectAll,{checker:textInputChecker}],[["ctrl+z","mac+meta+z"],proto.undo,{checker:textInputChecker}],[["ctr\
l+y","ctrl+shift+z","mac+meta+shift+z","ctrl+shift+Z","mac+meta+shift+Z"],proto.redo,{checker:textInputChecker}],[["Backspace","alt+Backspace","ctrl+Backspace","shift+Backspace","mac+Backspace","mac+alt+Backspace","mac+ctrl+Backspace","Delete","ctrl+Delete","shift+Delete","mac+Delete"],proto.delete,{checker:textInputChecker}],[["Enter","mac+Enter"],proto.addNewEditorFromKeyboard,{checker:(self2,{target:el})=>!(el instanceof HTMLButtonElement)&&self2.#container.contains(el)&&!self2.isEnterHandled}],
[[" ","mac+ "],proto.addNewEditorFromKeyboard,{checker:(self2,{target:el})=>!(el instanceof HTMLButtonElement)&&self2.#container.contains(document.activeElement)}],[["Escape","mac+Escape"],proto.unselectAll],[["ArrowLeft","mac+ArrowLeft"],proto.translateSelectedEditors,{args:[-small,0],checker:arrowChecker}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],proto.translateSelectedEditors,{args:[-big,0],checker:arrowChecker}],[["ArrowRight","mac+ArrowRight"],proto.translateSelectedEditors,{args:[small,0],
checker:arrowChecker}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],proto.translateSelectedEditors,{args:[big,0],checker:arrowChecker}],[["ArrowUp","mac+ArrowUp"],proto.translateSelectedEditors,{args:[0,-small],checker:arrowChecker}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],proto.translateSelectedEditors,{args:[0,-big],checker:arrowChecker}],[["ArrowDown","mac+ArrowDown"],proto.translateSelectedEditors,{args:[0,small],checker:arrowChecker}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],proto.translateSelectedEditors,
{args:[0,big],checker:arrowChecker}]]))}constructor(container2,viewer,viewerAlert,altTextManager,commentManager,signatureManager,eventBus,pdfDocument,pageColors,highlightColors,enableHighlightFloatingButton,enableUpdatedAddImage,enableNewAltTextWhenAddingImage,mlManager,editorUndoBar,supportsPinchToZoom){const signal=this._signal=this.#abortController.signal;this.#container=container2,this.#viewer=viewer,this.#viewerAlert=viewerAlert,this.#altTextManager=altTextManager,this.#commentManager=commentManager,
this.#signatureManager=signatureManager,this._eventBus=eventBus,eventBus._on("editingaction",this.onEditingAction.bind(this),{signal}),eventBus._on("pagechanging",this.onPageChanging.bind(this),{signal}),eventBus._on("scalechanging",this.onScaleChanging.bind(this),{signal}),eventBus._on("rotationchanging",this.onRotationChanging.bind(this),{signal}),eventBus._on("setpreference",this.onSetPreference.bind(this),{signal}),eventBus._on("switchannotationeditorparams",evt=>this.updateParams(evt.type,evt.
value),{signal}),this.#addSelectionListener(),this.#addDragAndDropListeners(),this.#addKeyboardManager(),this.#annotationStorage=pdfDocument.annotationStorage,this.#filterFactory=pdfDocument.filterFactory,this.#pageColors=pageColors,this.#highlightColors=highlightColors||null,this.#enableHighlightFloatingButton=enableHighlightFloatingButton,this.#enableUpdatedAddImage=enableUpdatedAddImage,this.#enableNewAltTextWhenAddingImage=enableNewAltTextWhenAddingImage,this.#mlManager=mlManager||null,this.
viewParameters={realScale:PixelsPerInch.PDF_TO_CSS_UNITS,rotation:0},this.isShiftKeyDown=!1,this._editorUndoBar=editorUndoBar||null,this._supportsPinchToZoom=supportsPinchToZoom!==!1}destroy(){this.#updateModeCapability?.resolve(),this.#updateModeCapability=null,this.#abortController?.abort(),this.#abortController=null,this._signal=null;for(const layer of this.#allLayers.values())layer.destroy();this.#allLayers.clear(),this.#allEditors.clear(),this.#editorsToRescale.clear(),this.#missingCanvases?.
clear(),this.#activeEditor=null,this.#selectedEditors.clear(),this.#commandManager.destroy(),this.#altTextManager?.destroy(),this.#commentManager?.destroy(),this.#signatureManager?.destroy(),this.#highlightToolbar?.hide(),this.#highlightToolbar=null,this.#mainHighlightColorPicker?.destroy(),this.#mainHighlightColorPicker=null,this.#focusMainContainerTimeoutId&&(clearTimeout(this.#focusMainContainerTimeoutId),this.#focusMainContainerTimeoutId=null),this.#translationTimeoutId&&(clearTimeout(this.#translationTimeoutId),
this.#translationTimeoutId=null),this._editorUndoBar?.destroy()}combinedSignal(ac){return AbortSignal.any([this._signal,ac.signal])}get mlManager(){return this.#mlManager}get useNewAltTextFlow(){return this.#enableUpdatedAddImage}get useNewAltTextWhenAddingImage(){return this.#enableNewAltTextWhenAddingImage}get hcmFilter(){return shadow(this,"hcmFilter",this.#pageColors?this.#filterFactory.addHCMFilter(this.#pageColors.foreground,this.#pageColors.background):"none")}get direction(){return shadow(
this,"direction",getComputedStyle(this.#container).direction)}get _highlightColors(){return shadow(this,"_highlightColors",this.#highlightColors?new Map(this.#highlightColors.split(",").map(pair=>(pair=pair.split("=").map(x=>x.trim()),pair[1]=pair[1].toUpperCase(),pair))):null)}get highlightColors(){const{_highlightColors}=this;if(!_highlightColors)return shadow(this,"highlightColors",null);const map2=new Map,hasHCM=!!this.#pageColors;for(const[name,color]of _highlightColors){const isNameForHCM=name.
endsWith("_HCM");if(hasHCM&&isNameForHCM){map2.set(name.replace("_HCM",""),color);continue}!hasHCM&&!isNameForHCM&&map2.set(name,color)}return shadow(this,"highlightColors",map2)}get highlightColorNames(){return shadow(this,"highlightColorNames",this.highlightColors?new Map(Array.from(this.highlightColors,e=>e.reverse())):null)}getNonHCMColor(color){if(!this._highlightColors)return color;const colorName=this.highlightColorNames.get(color);return this._highlightColors.get(colorName)||color}getNonHCMColorName(color){
return this.highlightColorNames.get(color)||color}setCurrentDrawingSession(layer){layer?(this.unselectAll(),this.disableUserSelect(!0)):this.disableUserSelect(!1),this.#currentDrawingSession=layer}setMainHighlightColorPicker(colorPicker){this.#mainHighlightColorPicker=colorPicker}editAltText(editor,firstTime=!1){this.#altTextManager?.editAltText(this,editor,firstTime)}hasCommentManager(){return!!this.#commentManager}editComment(editor,position2){this.#commentManager?.open(this,editor,position2)}getSignature(editor){
this.#signatureManager?.getSignature({uiManager:this,editor})}get signatureManager(){return this.#signatureManager}switchToMode(mode,callback){this._eventBus.on("annotationeditormodechanged",callback,{once:!0,signal:this._signal}),this._eventBus.dispatch("showannotationeditorui",{source:this,mode})}setPreference(name,value){this._eventBus.dispatch("setpreference",{source:this,name,value})}onSetPreference({name,value}){name==="enableNewAltTextWhenAddingImage"&&(this.#enableNewAltTextWhenAddingImage=
value)}onPageChanging({pageNumber}){this.#currentPageIndex=pageNumber-1}focusMainContainer(){this.#container.focus()}findParent(x,y){for(const layer of this.#allLayers.values()){const{x:layerX,y:layerY,width,height}=layer.div.getBoundingClientRect();if(x>=layerX&&x<=layerX+width&&y>=layerY&&y<=layerY+height)return layer}return null}disableUserSelect(value=!1){this.#viewer.classList.toggle("noUserSelect",value)}addShouldRescale(editor){this.#editorsToRescale.add(editor)}removeShouldRescale(editor){
this.#editorsToRescale.delete(editor)}onScaleChanging({scale:scale2}){this.commitOrRemove(),this.viewParameters.realScale=scale2*PixelsPerInch.PDF_TO_CSS_UNITS;for(const editor of this.#editorsToRescale)editor.onScaleChanging();this.#currentDrawingSession?.onScaleChanging()}onRotationChanging({pagesRotation}){this.commitOrRemove(),this.viewParameters.rotation=pagesRotation}#getAnchorElementForSelection({anchorNode}){return anchorNode.nodeType===Node.TEXT_NODE?anchorNode.parentElement:anchorNode}#getLayerForTextLayer(textLayer){
const{currentLayer}=this;if(currentLayer.hasTextLayer(textLayer))return currentLayer;for(const layer of this.#allLayers.values())if(layer.hasTextLayer(textLayer))return layer;return null}highlightSelection(methodOfCreation=""){const selection=document.getSelection();if(!selection||selection.isCollapsed)return;const{anchorNode,anchorOffset,focusNode,focusOffset}=selection,text2=selection.toString(),textLayer=this.#getAnchorElementForSelection(selection).closest(".textLayer"),boxes=this.getSelectionBoxes(
textLayer);if(!boxes)return;selection.empty();const layer=this.#getLayerForTextLayer(textLayer),isNoneMode=this.#mode===AnnotationEditorType.NONE,callback=()=>{layer?.createAndAddNewEditor({x:0,y:0},!1,{methodOfCreation,boxes,anchorNode,anchorOffset,focusNode,focusOffset,text:text2}),isNoneMode&&this.showAllEditors("highlight",!0,!0)};if(isNoneMode){this.switchToMode(AnnotationEditorType.HIGHLIGHT,callback);return}callback()}#displayHighlightToolbar(){const selection=document.getSelection();if(!selection||
selection.isCollapsed)return;const textLayer=this.#getAnchorElementForSelection(selection).closest(".textLayer"),boxes=this.getSelectionBoxes(textLayer);boxes&&(this.#highlightToolbar||=new HighlightToolbar(this),this.#highlightToolbar.show(textLayer,boxes,this.direction==="ltr"))}addToAnnotationStorage(editor){!editor.isEmpty()&&this.#annotationStorage&&!this.#annotationStorage.has(editor.id)&&this.#annotationStorage.setValue(editor.id,editor)}a11yAlert(messageId,args=null){const viewerAlert=this.#viewerAlert;
viewerAlert&&(viewerAlert.setAttribute("data-l10n-id",messageId),args?viewerAlert.setAttribute("data-l10n-args",JSON.stringify(args)):viewerAlert.removeAttribute("data-l10n-args"))}#selectionChange(){const selection=document.getSelection();if(!selection||selection.isCollapsed){this.#selectedTextNode&&(this.#highlightToolbar?.hide(),this.#selectedTextNode=null,this.#dispatchUpdateStates({hasSelectedText:!1}));return}const{anchorNode}=selection;if(anchorNode===this.#selectedTextNode)return;const textLayer=this.#getAnchorElementForSelection(
selection).closest(".textLayer");if(!textLayer){this.#selectedTextNode&&(this.#highlightToolbar?.hide(),this.#selectedTextNode=null,this.#dispatchUpdateStates({hasSelectedText:!1}));return}if(this.#highlightToolbar?.hide(),this.#selectedTextNode=anchorNode,this.#dispatchUpdateStates({hasSelectedText:!0}),!(this.#mode!==AnnotationEditorType.HIGHLIGHT&&this.#mode!==AnnotationEditorType.NONE)&&(this.#mode===AnnotationEditorType.HIGHLIGHT&&this.showAllEditors("highlight",!0,!0),this.#highlightWhenShiftUp=
this.isShiftKeyDown,!this.isShiftKeyDown)){const activeLayer=this.#mode===AnnotationEditorType.HIGHLIGHT?this.#getLayerForTextLayer(textLayer):null;activeLayer?.toggleDrawing();const ac=new AbortController,signal=this.combinedSignal(ac),pointerup=e=>{e.type==="pointerup"&&e.button!==0||(ac.abort(),activeLayer?.toggleDrawing(!0),e.type==="pointerup"&&this.#onSelectEnd("main_toolbar"))};window.addEventListener("pointerup",pointerup,{signal}),window.addEventListener("blur",pointerup,{signal})}}#onSelectEnd(methodOfCreation=""){
this.#mode===AnnotationEditorType.HIGHLIGHT?this.highlightSelection(methodOfCreation):this.#enableHighlightFloatingButton&&this.#displayHighlightToolbar()}#addSelectionListener(){document.addEventListener("selectionchange",this.#selectionChange.bind(this),{signal:this._signal})}#addFocusManager(){if(this.#focusManagerAC)return;this.#focusManagerAC=new AbortController;const signal=this.combinedSignal(this.#focusManagerAC);window.addEventListener("focus",this.focus.bind(this),{signal}),window.addEventListener(
"blur",this.blur.bind(this),{signal})}#removeFocusManager(){this.#focusManagerAC?.abort(),this.#focusManagerAC=null}blur(){if(this.isShiftKeyDown=!1,this.#highlightWhenShiftUp&&(this.#highlightWhenShiftUp=!1,this.#onSelectEnd("main_toolbar")),!this.hasSelection)return;const{activeElement}=document;for(const editor of this.#selectedEditors)if(editor.div.contains(activeElement)){this.#lastActiveElement=[editor,activeElement],editor._focusEventsAllowed=!1;break}}focus(){if(!this.#lastActiveElement)
return;const[lastEditor,lastActiveElement]=this.#lastActiveElement;this.#lastActiveElement=null,lastActiveElement.addEventListener("focusin",()=>{lastEditor._focusEventsAllowed=!0},{once:!0,signal:this._signal}),lastActiveElement.focus()}#addKeyboardManager(){if(this.#keyboardManagerAC)return;this.#keyboardManagerAC=new AbortController;const signal=this.combinedSignal(this.#keyboardManagerAC);window.addEventListener("keydown",this.keydown.bind(this),{signal}),window.addEventListener("keyup",this.
keyup.bind(this),{signal})}#removeKeyboardManager(){this.#keyboardManagerAC?.abort(),this.#keyboardManagerAC=null}#addCopyPasteListeners(){if(this.#copyPasteAC)return;this.#copyPasteAC=new AbortController;const signal=this.combinedSignal(this.#copyPasteAC);document.addEventListener("copy",this.copy.bind(this),{signal}),document.addEventListener("cut",this.cut.bind(this),{signal}),document.addEventListener("paste",this.paste.bind(this),{signal})}#removeCopyPasteListeners(){this.#copyPasteAC?.abort(),
this.#copyPasteAC=null}#addDragAndDropListeners(){const signal=this._signal;document.addEventListener("dragover",this.dragOver.bind(this),{signal}),document.addEventListener("drop",this.drop.bind(this),{signal})}addEditListeners(){this.#addKeyboardManager(),this.#addCopyPasteListeners()}removeEditListeners(){this.#removeKeyboardManager(),this.#removeCopyPasteListeners()}dragOver(event2){for(const{type:type2}of event2.dataTransfer.items)for(const editorType of this.#editorTypes)if(editorType.isHandlingMimeForPasting(
type2)){event2.dataTransfer.dropEffect="copy",event2.preventDefault();return}}drop(event2){for(const item of event2.dataTransfer.items)for(const editorType of this.#editorTypes)if(editorType.isHandlingMimeForPasting(item.type)){editorType.paste(item,this.currentLayer),event2.preventDefault();return}}copy(event2){if(event2.preventDefault(),this.#activeEditor?.commitOrRemove(),!this.hasSelection)return;const editors=[];for(const editor of this.#selectedEditors){const serialized=editor.serialize(!0);
serialized&&editors.push(serialized)}editors.length!==0&&event2.clipboardData.setData("application/pdfjs",JSON.stringify(editors))}cut(event2){this.copy(event2),this.delete()}async paste(event2){event2.preventDefault();const{clipboardData}=event2;for(const item of clipboardData.items)for(const editorType of this.#editorTypes)if(editorType.isHandlingMimeForPasting(item.type)){editorType.paste(item,this.currentLayer);return}let data=clipboardData.getData("application/pdfjs");if(!data)return;try{data=
JSON.parse(data)}catch(ex){warn(`paste: "${ex.message}".`);return}if(!Array.isArray(data))return;this.unselectAll();const layer=this.currentLayer;try{const newEditors=[];for(const editor of data){const deserializedEditor=await layer.deserialize(editor);if(!deserializedEditor)return;newEditors.push(deserializedEditor)}const cmd=()=>{for(const editor of newEditors)this.#addEditorToLayer(editor);this.#selectEditors(newEditors)},undo=()=>{for(const editor of newEditors)editor.remove()};this.addCommands(
{cmd,undo,mustExec:!0})}catch(ex){warn(`paste: "${ex.message}".`)}}keydown(event2){!this.isShiftKeyDown&&event2.key==="Shift"&&(this.isShiftKeyDown=!0),this.#mode!==AnnotationEditorType.NONE&&!this.isEditorHandlingKeyboard&&AnnotationEditorUIManager._keyboardManager.exec(this,event2)}keyup(event2){this.isShiftKeyDown&&event2.key==="Shift"&&(this.isShiftKeyDown=!1,this.#highlightWhenShiftUp&&(this.#highlightWhenShiftUp=!1,this.#onSelectEnd("main_toolbar")))}onEditingAction({name}){switch(name){case"\
undo":case"redo":case"delete":case"selectAll":this[name]();break;case"highlightSelection":this.highlightSelection("context_menu");break}}#dispatchUpdateStates(details){Object.entries(details).some(([key2,value])=>this.#previousStates[key2]!==value)&&(this._eventBus.dispatch("annotationeditorstateschanged",{source:this,details:Object.assign(this.#previousStates,details)}),this.#mode===AnnotationEditorType.HIGHLIGHT&&details.hasSelectedEditor===!1&&this.#dispatchUpdateUI([[AnnotationEditorParamsType.
HIGHLIGHT_FREE,!0]]))}#dispatchUpdateUI(details){this._eventBus.dispatch("annotationeditorparamschanged",{source:this,details})}setEditingState(isEditing2){isEditing2?(this.#addFocusManager(),this.#addCopyPasteListeners(),this.#dispatchUpdateStates({isEditing:this.#mode!==AnnotationEditorType.NONE,isEmpty:this.#isEmpty(),hasSomethingToUndo:this.#commandManager.hasSomethingToUndo(),hasSomethingToRedo:this.#commandManager.hasSomethingToRedo(),hasSelectedEditor:!1})):(this.#removeFocusManager(),this.#removeCopyPasteListeners(),
this.#dispatchUpdateStates({isEditing:!1}),this.disableUserSelect(!1))}registerEditorTypes(types2){if(!this.#editorTypes){this.#editorTypes=types2;for(const editorType of this.#editorTypes)this.#dispatchUpdateUI(editorType.defaultPropertiesToUpdate)}}getId(){return this.#idManager.id}get currentLayer(){return this.#allLayers.get(this.#currentPageIndex)}getLayer(pageIndex){return this.#allLayers.get(pageIndex)}get currentPageIndex(){return this.#currentPageIndex}addLayer(layer){this.#allLayers.set(
layer.pageIndex,layer),this.#isEnabled?layer.enable():layer.disable()}removeLayer(layer){this.#allLayers.delete(layer.pageIndex)}async updateMode(mode,editId=null,isFromKeyboard=!1,mustEnterInEditMode=!1,editComment=!1){if(this.#mode!==mode&&!(this.#updateModeCapability&&(await this.#updateModeCapability.promise,!this.#updateModeCapability))){if(this.#updateModeCapability=Promise.withResolvers(),this.#currentDrawingSession?.commitOrRemove(),this.#mode=mode,mode===AnnotationEditorType.NONE){this.
setEditingState(!1),this.#disableAll(),this._editorUndoBar?.hide(),this.#updateModeCapability.resolve();return}mode===AnnotationEditorType.SIGNATURE&&await this.#signatureManager?.loadSignatures(),this.setEditingState(!0),await this.#enableAll(),this.unselectAll();for(const layer of this.#allLayers.values())layer.updateMode(mode);if(!editId){isFromKeyboard&&this.addNewEditorFromKeyboard(),this.#updateModeCapability.resolve();return}for(const editor of this.#allEditors.values())editor.annotationElementId===
editId||editor.id===editId?(this.setSelected(editor),editComment?editor.editComment():mustEnterInEditMode&&editor.enterInEditMode()):editor.unselect();this.#updateModeCapability.resolve()}}addNewEditorFromKeyboard(){this.currentLayer.canCreateNewEmptyEditor()&&this.currentLayer.addNewEditor()}updateToolbar(options){options.mode!==this.#mode&&this._eventBus.dispatch("switchannotationeditormode",{source:this,...options})}updateParams(type2,value){if(this.#editorTypes){switch(type2){case AnnotationEditorParamsType.
CREATE:this.currentLayer.addNewEditor(value);return;case AnnotationEditorParamsType.HIGHLIGHT_SHOW_ALL:this._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",data:{type:"highlight",action:"toggle_visibility"}}}),(this.#showAllStates||=new Map).set(type2,value),this.showAllEditors("highlight",value);break}if(this.hasSelection)for(const editor of this.#selectedEditors)editor.updateParams(type2,value);else for(const editorType of this.#editorTypes)editorType.updateDefaultParams(
type2,value)}}showAllEditors(type2,visible,updateButton=!1){for(const editor of this.#allEditors.values())editor.editorType===type2&&editor.show(visible);(this.#showAllStates?.get(AnnotationEditorParamsType.HIGHLIGHT_SHOW_ALL)??!0)!==visible&&this.#dispatchUpdateUI([[AnnotationEditorParamsType.HIGHLIGHT_SHOW_ALL,visible]])}enableWaiting(mustWait=!1){if(this.#isWaiting!==mustWait){this.#isWaiting=mustWait;for(const layer of this.#allLayers.values())mustWait?layer.disableClick():layer.enableClick(),
layer.div.classList.toggle("waiting",mustWait)}}async#enableAll(){if(!this.#isEnabled){this.#isEnabled=!0;const promises=[];for(const layer of this.#allLayers.values())promises.push(layer.enable());await Promise.all(promises);for(const editor of this.#allEditors.values())editor.enable()}}#disableAll(){if(this.unselectAll(),this.#isEnabled){this.#isEnabled=!1;for(const layer of this.#allLayers.values())layer.disable();for(const editor of this.#allEditors.values())editor.disable()}}getEditors(pageIndex){
const editors=[];for(const editor of this.#allEditors.values())editor.pageIndex===pageIndex&&editors.push(editor);return editors}getEditor(id2){return this.#allEditors.get(id2)}addEditor(editor){this.#allEditors.set(editor.id,editor)}removeEditor(editor){editor.div.contains(document.activeElement)&&(this.#focusMainContainerTimeoutId&&clearTimeout(this.#focusMainContainerTimeoutId),this.#focusMainContainerTimeoutId=setTimeout(()=>{this.focusMainContainer(),this.#focusMainContainerTimeoutId=null},
0)),this.#allEditors.delete(editor.id),editor.annotationElementId&&this.#missingCanvases?.delete(editor.annotationElementId),this.unselect(editor),(!editor.annotationElementId||!this.#deletedAnnotationsElementIds.has(editor.annotationElementId))&&this.#annotationStorage?.remove(editor.id)}addDeletedAnnotationElement(editor){this.#deletedAnnotationsElementIds.add(editor.annotationElementId),this.addChangedExistingAnnotation(editor),editor.deleted=!0}isDeletedAnnotationElement(annotationElementId){
return this.#deletedAnnotationsElementIds.has(annotationElementId)}removeDeletedAnnotationElement(editor){this.#deletedAnnotationsElementIds.delete(editor.annotationElementId),this.removeChangedExistingAnnotation(editor),editor.deleted=!1}#addEditorToLayer(editor){const layer=this.#allLayers.get(editor.pageIndex);layer?layer.addOrRebuild(editor):(this.addEditor(editor),this.addToAnnotationStorage(editor))}setActiveEditor(editor){this.#activeEditor!==editor&&(this.#activeEditor=editor,editor&&this.#dispatchUpdateUI(
editor.propertiesToUpdate))}get#lastSelectedEditor(){let ed=null;for(ed of this.#selectedEditors);return ed}updateUI(editor){this.#lastSelectedEditor===editor&&this.#dispatchUpdateUI(editor.propertiesToUpdate)}updateUIForDefaultProperties(editorType){this.#dispatchUpdateUI(editorType.defaultPropertiesToUpdate)}toggleSelected(editor){if(this.#selectedEditors.has(editor)){this.#selectedEditors.delete(editor),editor.unselect(),this.#dispatchUpdateStates({hasSelectedEditor:this.hasSelection});return}
this.#selectedEditors.add(editor),editor.select(),this.#dispatchUpdateUI(editor.propertiesToUpdate),this.#dispatchUpdateStates({hasSelectedEditor:!0})}setSelected(editor){this.updateToolbar({mode:editor.mode,editId:editor.id}),this.#currentDrawingSession?.commitOrRemove();for(const ed of this.#selectedEditors)ed!==editor&&ed.unselect();this.#selectedEditors.clear(),this.#selectedEditors.add(editor),editor.select(),this.#dispatchUpdateUI(editor.propertiesToUpdate),this.#dispatchUpdateStates({hasSelectedEditor:!0})}isSelected(editor){
return this.#selectedEditors.has(editor)}get firstSelectedEditor(){return this.#selectedEditors.values().next().value}unselect(editor){editor.unselect(),this.#selectedEditors.delete(editor),this.#dispatchUpdateStates({hasSelectedEditor:this.hasSelection})}get hasSelection(){return this.#selectedEditors.size!==0}get isEnterHandled(){return this.#selectedEditors.size===1&&this.firstSelectedEditor.isEnterHandled}undo(){this.#commandManager.undo(),this.#dispatchUpdateStates({hasSomethingToUndo:this.#commandManager.
hasSomethingToUndo(),hasSomethingToRedo:!0,isEmpty:this.#isEmpty()}),this._editorUndoBar?.hide()}redo(){this.#commandManager.redo(),this.#dispatchUpdateStates({hasSomethingToUndo:!0,hasSomethingToRedo:this.#commandManager.hasSomethingToRedo(),isEmpty:this.#isEmpty()})}addCommands(params){this.#commandManager.add(params),this.#dispatchUpdateStates({hasSomethingToUndo:!0,hasSomethingToRedo:!1,isEmpty:this.#isEmpty()})}cleanUndoStack(type2){this.#commandManager.cleanType(type2)}#isEmpty(){if(this.#allEditors.
size===0)return!0;if(this.#allEditors.size===1)for(const editor of this.#allEditors.values())return editor.isEmpty();return!1}delete(){this.commitOrRemove();const drawingEditor=this.currentLayer?.endDrawingSession(!0);if(!this.hasSelection&&!drawingEditor)return;const editors=drawingEditor?[drawingEditor]:[...this.#selectedEditors],cmd=()=>{this._editorUndoBar?.show(undo,editors.length===1?editors[0].editorType:editors.length);for(const editor of editors)editor.remove()},undo=()=>{for(const editor of editors)
this.#addEditorToLayer(editor)};this.addCommands({cmd,undo,mustExec:!0})}commitOrRemove(){this.#activeEditor?.commitOrRemove()}hasSomethingToControl(){return this.#activeEditor||this.hasSelection}#selectEditors(editors){for(const editor of this.#selectedEditors)editor.unselect();this.#selectedEditors.clear();for(const editor of editors)editor.isEmpty()||(this.#selectedEditors.add(editor),editor.select());this.#dispatchUpdateStates({hasSelectedEditor:this.hasSelection})}selectAll(){for(const editor of this.#selectedEditors)
editor.commit();this.#selectEditors(this.#allEditors.values())}unselectAll(){if(!(this.#activeEditor&&(this.#activeEditor.commitOrRemove(),this.#mode!==AnnotationEditorType.NONE))&&!this.#currentDrawingSession?.commitOrRemove()&&this.hasSelection){for(const editor of this.#selectedEditors)editor.unselect();this.#selectedEditors.clear(),this.#dispatchUpdateStates({hasSelectedEditor:!1})}}translateSelectedEditors(x,y,noCommit=!1){if(noCommit||this.commitOrRemove(),!this.hasSelection)return;this.#translation[0]+=
x,this.#translation[1]+=y;const[totalX,totalY]=this.#translation,editors=[...this.#selectedEditors],TIME_TO_WAIT=1e3;this.#translationTimeoutId&&clearTimeout(this.#translationTimeoutId),this.#translationTimeoutId=setTimeout(()=>{this.#translationTimeoutId=null,this.#translation[0]=this.#translation[1]=0,this.addCommands({cmd:()=>{for(const editor of editors)this.#allEditors.has(editor.id)&&(editor.translateInPage(totalX,totalY),editor.translationDone())},undo:()=>{for(const editor of editors)this.#allEditors.
has(editor.id)&&(editor.translateInPage(-totalX,-totalY),editor.translationDone())},mustExec:!1})},TIME_TO_WAIT);for(const editor of editors)editor.translateInPage(x,y),editor.translationDone()}setUpDragSession(){if(this.hasSelection){this.disableUserSelect(!0),this.#draggingEditors=new Map;for(const editor of this.#selectedEditors)this.#draggingEditors.set(editor,{savedX:editor.x,savedY:editor.y,savedPageIndex:editor.pageIndex,newX:0,newY:0,newPageIndex:-1})}}endDragSession(){if(!this.#draggingEditors)
return!1;this.disableUserSelect(!1);const map2=this.#draggingEditors;this.#draggingEditors=null;let mustBeAddedInUndoStack=!1;for(const[{x,y,pageIndex},value]of map2)value.newX=x,value.newY=y,value.newPageIndex=pageIndex,mustBeAddedInUndoStack||=x!==value.savedX||y!==value.savedY||pageIndex!==value.savedPageIndex;if(!mustBeAddedInUndoStack)return!1;const move2=(editor,x,y,pageIndex)=>{if(this.#allEditors.has(editor.id)){const parent=this.#allLayers.get(pageIndex);parent?editor._setParentAndPosition(
parent,x,y):(editor.pageIndex=pageIndex,editor.x=x,editor.y=y)}};return this.addCommands({cmd:()=>{for(const[editor,{newX,newY,newPageIndex}]of map2)move2(editor,newX,newY,newPageIndex)},undo:()=>{for(const[editor,{savedX,savedY,savedPageIndex}]of map2)move2(editor,savedX,savedY,savedPageIndex)},mustExec:!0}),!0}dragSelectedEditors(tx,ty){if(this.#draggingEditors)for(const editor of this.#draggingEditors.keys())editor.drag(tx,ty)}rebuild(editor){if(editor.parent===null){const parent=this.getLayer(
editor.pageIndex);parent?(parent.changeParent(editor),parent.addOrRebuild(editor)):(this.addEditor(editor),this.addToAnnotationStorage(editor),editor.rebuild())}else editor.parent.addOrRebuild(editor)}get isEditorHandlingKeyboard(){return this.getActive()?.shouldGetKeyboardEvents()||this.#selectedEditors.size===1&&this.firstSelectedEditor.shouldGetKeyboardEvents()}isActive(editor){return this.#activeEditor===editor}getActive(){return this.#activeEditor}getMode(){return this.#mode}get imageManager(){
return shadow(this,"imageManager",new ImageManager)}getSelectionBoxes(textLayer){if(!textLayer)return null;const selection=document.getSelection();for(let i=0,ii=selection.rangeCount;i<ii;i++)if(!textLayer.contains(selection.getRangeAt(i).commonAncestorContainer))return null;const{x:layerX,y:layerY,width:parentWidth,height:parentHeight}=textLayer.getBoundingClientRect();let rotator;switch(textLayer.getAttribute("data-main-rotation")){case"90":rotator=(x,y,w,h2)=>({x:(y-layerY)/parentHeight,y:1-(x+
w-layerX)/parentWidth,width:h2/parentHeight,height:w/parentWidth});break;case"180":rotator=(x,y,w,h2)=>({x:1-(x+w-layerX)/parentWidth,y:1-(y+h2-layerY)/parentHeight,width:w/parentWidth,height:h2/parentHeight});break;case"270":rotator=(x,y,w,h2)=>({x:1-(y+h2-layerY)/parentHeight,y:(x-layerX)/parentWidth,width:h2/parentHeight,height:w/parentWidth});break;default:rotator=(x,y,w,h2)=>({x:(x-layerX)/parentWidth,y:(y-layerY)/parentHeight,width:w/parentWidth,height:h2/parentHeight});break}const boxes=[];
for(let i=0,ii=selection.rangeCount;i<ii;i++){const range=selection.getRangeAt(i);if(!range.collapsed)for(const{x,y,width,height}of range.getClientRects())width===0||height===0||boxes.push(rotator(x,y,width,height))}return boxes.length===0?null:boxes}addChangedExistingAnnotation({annotationElementId,id:id2}){(this.#changedExistingAnnotations||=new Map).set(annotationElementId,id2)}removeChangedExistingAnnotation({annotationElementId}){this.#changedExistingAnnotations?.delete(annotationElementId)}renderAnnotationElement(annotation){
const editorId=this.#changedExistingAnnotations?.get(annotation.data.id);if(!editorId)return;const editor=this.#annotationStorage.getRawValue(editorId);editor&&(this.#mode===AnnotationEditorType.NONE&&!editor.hasBeenModified||editor.renderAnnotationElement(annotation))}setMissingCanvas(annotationId,annotationElementId,canvas){const editor=this.#missingCanvases?.get(annotationId);editor&&(editor.setCanvas(annotationElementId,canvas),this.#missingCanvases.delete(annotationId))}addMissingCanvas(annotationId,editor){
(this.#missingCanvases||=new Map).set(annotationId,editor)}}class AltText{#altText=null;#altTextDecorative=!1;#altTextButton=null;#altTextButtonLabel=null;#altTextTooltip=null;#altTextTooltipTimeout=null;#altTextWasFromKeyBoard=!1;#badge=null;#editor=null;#guessedText=null;#textWithDisclaimer=null;#useNewAltTextFlow=!1;static#l10nNewButton=null;static _l10n=null;constructor(editor){this.#editor=editor,this.#useNewAltTextFlow=editor._uiManager.useNewAltTextFlow,AltText.#l10nNewButton||=Object.freeze(
{added:"pdfjs-editor-new-alt-text-added-button","added-label":"pdfjs-editor-new-alt-text-added-button-label",missing:"pdfjs-editor-new-alt-text-missing-button","missing-label":"pdfjs-editor-new-alt-text-missing-button-label",review:"pdfjs-editor-new-alt-text-to-review-button","review-label":"pdfjs-editor-new-alt-text-to-review-button-label"})}static initialize(l10n){AltText._l10n??=l10n}async render(){const altText=this.#altTextButton=document.createElement("button");altText.className="altText",
altText.tabIndex="0";const label=this.#altTextButtonLabel=document.createElement("span");altText.append(label),this.#useNewAltTextFlow?(altText.classList.add("new"),altText.setAttribute("data-l10n-id",AltText.#l10nNewButton.missing),label.setAttribute("data-l10n-id",AltText.#l10nNewButton["missing-label"])):(altText.setAttribute("data-l10n-id","pdfjs-editor-alt-text-button"),label.setAttribute("data-l10n-id","pdfjs-editor-alt-text-button-label"));const signal=this.#editor._uiManager._signal;altText.
addEventListener("contextmenu",noContextMenu,{signal}),altText.addEventListener("pointerdown",event2=>event2.stopPropagation(),{signal});const onClick=event2=>{event2.preventDefault(),this.#editor._uiManager.editAltText(this.#editor),this.#useNewAltTextFlow&&this.#editor._reportTelemetry({action:"pdfjs.image.alt_text.image_status_label_clicked",data:{label:this.#label}})};return altText.addEventListener("click",onClick,{capture:!0,signal}),altText.addEventListener("keydown",event2=>{event2.target===
altText&&event2.key==="Enter"&&(this.#altTextWasFromKeyBoard=!0,onClick(event2))},{signal}),await this.#setState(),altText}get#label(){return this.#altText&&"added"||this.#altText===null&&this.guessedText&&"review"||"missing"}finish(){this.#altTextButton&&(this.#altTextButton.focus({focusVisible:this.#altTextWasFromKeyBoard}),this.#altTextWasFromKeyBoard=!1)}isEmpty(){return this.#useNewAltTextFlow?this.#altText===null:!this.#altText&&!this.#altTextDecorative}hasData(){return this.#useNewAltTextFlow?
this.#altText!==null||!!this.#guessedText:this.isEmpty()}get guessedText(){return this.#guessedText}async setGuessedText(guessedText){this.#altText===null&&(this.#guessedText=guessedText,this.#textWithDisclaimer=await AltText._l10n.get("pdfjs-editor-new-alt-text-generated-alt-text-with-disclaimer",{generatedAltText:guessedText}),this.#setState())}toggleAltTextBadge(visibility=!1){if(!this.#useNewAltTextFlow||this.#altText){this.#badge?.remove(),this.#badge=null;return}if(!this.#badge){const badge=this.#badge=
document.createElement("div");badge.className="noAltTextBadge",this.#editor.div.append(badge)}this.#badge.classList.toggle("hidden",!visibility)}serialize(isForCopying){let altText=this.#altText;return!isForCopying&&this.#guessedText===altText&&(altText=this.#textWithDisclaimer),{altText,decorative:this.#altTextDecorative,guessedText:this.#guessedText,textWithDisclaimer:this.#textWithDisclaimer}}get data(){return{altText:this.#altText,decorative:this.#altTextDecorative}}set data({altText,decorative,
guessedText,textWithDisclaimer,cancel=!1}){guessedText&&(this.#guessedText=guessedText,this.#textWithDisclaimer=textWithDisclaimer),!(this.#altText===altText&&this.#altTextDecorative===decorative)&&(cancel||(this.#altText=altText,this.#altTextDecorative=decorative),this.#setState())}toggle(enabled=!1){this.#altTextButton&&(!enabled&&this.#altTextTooltipTimeout&&(clearTimeout(this.#altTextTooltipTimeout),this.#altTextTooltipTimeout=null),this.#altTextButton.disabled=!enabled)}shown(){this.#editor.
_reportTelemetry({action:"pdfjs.image.alt_text.image_status_label_displayed",data:{label:this.#label}})}destroy(){this.#altTextButton?.remove(),this.#altTextButton=null,this.#altTextButtonLabel=null,this.#altTextTooltip=null,this.#badge?.remove(),this.#badge=null}async#setState(){const button=this.#altTextButton;if(!button)return;if(this.#useNewAltTextFlow){if(button.classList.toggle("done",!!this.#altText),button.setAttribute("data-l10n-id",AltText.#l10nNewButton[this.#label]),this.#altTextButtonLabel?.
setAttribute("data-l10n-id",AltText.#l10nNewButton[`${this.#label}-label`]),!this.#altText){this.#altTextTooltip?.remove();return}}else{if(!this.#altText&&!this.#altTextDecorative){button.classList.remove("done"),this.#altTextTooltip?.remove();return}button.classList.add("done"),button.setAttribute("data-l10n-id","pdfjs-editor-alt-text-edit-button")}let tooltip=this.#altTextTooltip;if(!tooltip){this.#altTextTooltip=tooltip=document.createElement("span"),tooltip.className="tooltip",tooltip.setAttribute(
"role","tooltip"),tooltip.id=`alt-text-tooltip-${this.#editor.id}`;const DELAY_TO_SHOW_TOOLTIP=100,signal=this.#editor._uiManager._signal;signal.addEventListener("abort",()=>{clearTimeout(this.#altTextTooltipTimeout),this.#altTextTooltipTimeout=null},{once:!0}),button.addEventListener("mouseenter",()=>{this.#altTextTooltipTimeout=setTimeout(()=>{this.#altTextTooltipTimeout=null,this.#altTextTooltip.classList.add("show"),this.#editor._reportTelemetry({action:"alt_text_tooltip"})},DELAY_TO_SHOW_TOOLTIP)},
{signal}),button.addEventListener("mouseleave",()=>{this.#altTextTooltipTimeout&&(clearTimeout(this.#altTextTooltipTimeout),this.#altTextTooltipTimeout=null),this.#altTextTooltip?.classList.remove("show")},{signal})}this.#altTextDecorative?tooltip.setAttribute("data-l10n-id","pdfjs-editor-alt-text-decorative-tooltip"):(tooltip.removeAttribute("data-l10n-id"),tooltip.textContent=this.#altText),tooltip.parentNode||button.append(tooltip),this.#editor.getElementForAltText()?.setAttribute("aria-descr\
ibedby",tooltip.id)}}let Comment$1=class{#commentButton=null;#commentWasFromKeyBoard=!1;#editor=null;#initialText=null;#text=null;#date=null;#deleted=!1;constructor(editor){this.#editor=editor,this.toolbar=null}render(){if(!this.#editor._uiManager.hasCommentManager())return null;const comment2=this.#commentButton=document.createElement("button");comment2.className="comment",comment2.tabIndex="0",comment2.setAttribute("data-l10n-id","pdfjs-editor-edit-comment-button");const signal=this.#editor._uiManager.
_signal;comment2.addEventListener("contextmenu",noContextMenu,{signal}),comment2.addEventListener("pointerdown",event2=>event2.stopPropagation(),{signal});const onClick=event2=>{event2.preventDefault(),this.edit()};return comment2.addEventListener("click",onClick,{capture:!0,signal}),comment2.addEventListener("keydown",event2=>{event2.target===comment2&&event2.key==="Enter"&&(this.#commentWasFromKeyBoard=!0,onClick(event2))},{signal}),comment2}edit(){const{bottom,left,right}=this.#editor.getClientDimensions(),
position2={top:bottom};this.#editor._uiManager.direction==="ltr"?position2.right=right:position2.left=left,this.#editor._uiManager.editComment(this.#editor,position2)}finish(){this.#commentButton&&(this.#commentButton.focus({focusVisible:this.#commentWasFromKeyBoard}),this.#commentWasFromKeyBoard=!1)}isDeleted(){return this.#deleted||this.#text===""}hasBeenEdited(){return this.isDeleted()||this.#text!==this.#initialText}serialize(){return this.data}get data(){return{text:this.#text,date:this.#date,
deleted:this.#deleted}}set data(text2){if(text2===null){this.#text="",this.#deleted=!0;return}this.#text=text2,this.#date=new Date,this.#deleted=!1}setInitialText(text2){this.#initialText=text2,this.data=text2}toggle(enabled=!1){this.#commentButton&&(this.#commentButton.disabled=!enabled)}shown(){}destroy(){this.#commentButton?.remove(),this.#commentButton=null,this.#text="",this.#date=null,this.#editor=null,this.#commentWasFromKeyBoard=!1,this.#deleted=!1}};class TouchManager{#container;#isPinching=!1;#isPinchingStopped=null;#isPinchingDisabled;#onPinchStart;#onPinching;#onPinchEnd;#pointerDownAC=null;#signal;#touchInfo=null;#touchManagerAC;#touchMoveAC=null;constructor({
container:container2,isPinchingDisabled=null,isPinchingStopped=null,onPinchStart=null,onPinching=null,onPinchEnd=null,signal}){this.#container=container2,this.#isPinchingStopped=isPinchingStopped,this.#isPinchingDisabled=isPinchingDisabled,this.#onPinchStart=onPinchStart,this.#onPinching=onPinching,this.#onPinchEnd=onPinchEnd,this.#touchManagerAC=new AbortController,this.#signal=AbortSignal.any([signal,this.#touchManagerAC.signal]),container2.addEventListener("touchstart",this.#onTouchStart.bind(
this),{passive:!1,signal:this.#signal})}get MIN_TOUCH_DISTANCE_TO_PINCH(){return 35/OutputScale.pixelRatio}#onTouchStart(evt){if(this.#isPinchingDisabled?.())return;if(evt.touches.length===1){if(this.#pointerDownAC)return;const pointerDownAC=this.#pointerDownAC=new AbortController,signal=AbortSignal.any([this.#signal,pointerDownAC.signal]),container2=this.#container,opts={capture:!0,signal,passive:!1},cancelPointerDown=e=>{e.pointerType==="touch"&&(this.#pointerDownAC?.abort(),this.#pointerDownAC=
null)};container2.addEventListener("pointerdown",e=>{e.pointerType==="touch"&&(stopEvent(e),cancelPointerDown(e))},opts),container2.addEventListener("pointerup",cancelPointerDown,opts),container2.addEventListener("pointercancel",cancelPointerDown,opts);return}if(!this.#touchMoveAC){this.#touchMoveAC=new AbortController;const signal=AbortSignal.any([this.#signal,this.#touchMoveAC.signal]),container2=this.#container,opt={signal,capture:!1,passive:!1};container2.addEventListener("touchmove",this.#onTouchMove.
bind(this),opt);const onTouchEnd=this.#onTouchEnd.bind(this);container2.addEventListener("touchend",onTouchEnd,opt),container2.addEventListener("touchcancel",onTouchEnd,opt),opt.capture=!0,container2.addEventListener("pointerdown",stopEvent,opt),container2.addEventListener("pointermove",stopEvent,opt),container2.addEventListener("pointercancel",stopEvent,opt),container2.addEventListener("pointerup",stopEvent,opt),this.#onPinchStart?.()}if(stopEvent(evt),evt.touches.length!==2||this.#isPinchingStopped?.()){
this.#touchInfo=null;return}let[touch0,touch1]=evt.touches;touch0.identifier>touch1.identifier&&([touch0,touch1]=[touch1,touch0]),this.#touchInfo={touch0X:touch0.screenX,touch0Y:touch0.screenY,touch1X:touch1.screenX,touch1Y:touch1.screenY}}#onTouchMove(evt){if(!this.#touchInfo||evt.touches.length!==2)return;stopEvent(evt);let[touch0,touch1]=evt.touches;touch0.identifier>touch1.identifier&&([touch0,touch1]=[touch1,touch0]);const{screenX:screen0X,screenY:screen0Y}=touch0,{screenX:screen1X,screenY:screen1Y}=touch1,
touchInfo=this.#touchInfo,{touch0X:pTouch0X,touch0Y:pTouch0Y,touch1X:pTouch1X,touch1Y:pTouch1Y}=touchInfo,prevGapX=pTouch1X-pTouch0X,prevGapY=pTouch1Y-pTouch0Y,currGapX=screen1X-screen0X,currGapY=screen1Y-screen0Y,distance=Math.hypot(currGapX,currGapY)||1,pDistance=Math.hypot(prevGapX,prevGapY)||1;if(!this.#isPinching&&Math.abs(pDistance-distance)<=TouchManager.MIN_TOUCH_DISTANCE_TO_PINCH)return;if(touchInfo.touch0X=screen0X,touchInfo.touch0Y=screen0Y,touchInfo.touch1X=screen1X,touchInfo.touch1Y=
screen1Y,!this.#isPinching){this.#isPinching=!0;return}const origin2=[(screen0X+screen1X)/2,(screen0Y+screen1Y)/2];this.#onPinching?.(origin2,pDistance,distance)}#onTouchEnd(evt){evt.touches.length>=2||(this.#touchMoveAC&&(this.#touchMoveAC.abort(),this.#touchMoveAC=null,this.#onPinchEnd?.()),this.#touchInfo&&(stopEvent(evt),this.#touchInfo=null,this.#isPinching=!1))}destroy(){this.#touchManagerAC?.abort(),this.#touchManagerAC=null,this.#pointerDownAC?.abort(),this.#pointerDownAC=null}}class AnnotationEditor{#accessibilityData=null;#allResizerDivs=null;#altText=null;#comment=null;#disabled=!1;#dragPointerId=null;#dragPointerType="";#keepAspectRatio=!1;#resizersDiv=null;#lastPointerCoords=null;#savedDimensions=null;#focusAC=null;#focusedResizerName="";#hasBeenClicked=!1;#initialRect=null;#isEditing=!1;#isInEditMode=!1;#isResizerEnabledForKeyboard=!1;#moveInDOMTimeout=null;#prevDragX=0;#prevDragY=0;#telemetryTimeouts=null;#touchManager=null;isSelected=!1;_isCopy=!1;_editToolbar=null;_initialOptions=Object.
create(null);_initialData=null;_isVisible=!0;_uiManager=null;_focusEventsAllowed=!0;static _l10n=null;static _l10nResizer=null;#isDraggable=!1;#zIndex=AnnotationEditor._zIndex++;static _borderLineWidth=-1;static _colorManager=new ColorManager;static _zIndex=1;static _telemetryTimeout=1e3;static get _resizerKeyboardManager(){const resize=AnnotationEditor.prototype._resizeWithKeyboard,small=AnnotationEditorUIManager.TRANSLATE_SMALL,big=AnnotationEditorUIManager.TRANSLATE_BIG;return shadow(this,"_r\
esizerKeyboardManager",new KeyboardManager([[["ArrowLeft","mac+ArrowLeft"],resize,{args:[-small,0]}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],resize,{args:[-big,0]}],[["ArrowRight","mac+ArrowRight"],resize,{args:[small,0]}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],resize,{args:[big,0]}],[["ArrowUp","mac+ArrowUp"],resize,{args:[0,-small]}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],resize,{args:[0,-big]}],[["ArrowDown","mac+ArrowDown"],resize,{args:[0,small]}],[["ctrl+ArrowDown","mac+shift+ArrowDo\
wn"],resize,{args:[0,big]}],[["Escape","mac+Escape"],AnnotationEditor.prototype._stopResizingWithKeyboard]]))}constructor(parameters){this.parent=parameters.parent,this.id=parameters.id,this.width=this.height=null,this.pageIndex=parameters.parent.pageIndex,this.name=parameters.name,this.div=null,this._uiManager=parameters.uiManager,this.annotationElementId=null,this._willKeepAspectRatio=!1,this._initialOptions.isCentered=parameters.isCentered,this._structTreeParentId=null,this.annotationElementId=
parameters.annotationElementId||null;const{rotation,rawDims:{pageWidth,pageHeight,pageX,pageY}}=this.parent.viewport;this.rotation=rotation,this.pageRotation=(360+rotation-this._uiManager.viewParameters.rotation)%360,this.pageDimensions=[pageWidth,pageHeight],this.pageTranslation=[pageX,pageY];const[width,height]=this.parentDimensions;this.x=parameters.x/width,this.y=parameters.y/height,this.isAttachedToDOM=!1,this.deleted=!1}get editorType(){return Object.getPrototypeOf(this).constructor._type}get mode(){
return Object.getPrototypeOf(this).constructor._editorType}static get isDrawer(){return!1}static get _defaultLineColor(){return shadow(this,"_defaultLineColor",this._colorManager.getHexCode("CanvasText"))}static deleteAnnotationElement(editor){const fakeEditor=new FakeEditor({id:editor.parent.getNextId(),parent:editor.parent,uiManager:editor._uiManager});fakeEditor.annotationElementId=editor.annotationElementId,fakeEditor.deleted=!0,fakeEditor._uiManager.addToAnnotationStorage(fakeEditor)}static initialize(l10n,_uiManager){
if(AnnotationEditor._l10n??=l10n,AnnotationEditor._l10nResizer||=Object.freeze({topLeft:"pdfjs-editor-resizer-top-left",topMiddle:"pdfjs-editor-resizer-top-middle",topRight:"pdfjs-editor-resizer-top-right",middleRight:"pdfjs-editor-resizer-middle-right",bottomRight:"pdfjs-editor-resizer-bottom-right",bottomMiddle:"pdfjs-editor-resizer-bottom-middle",bottomLeft:"pdfjs-editor-resizer-bottom-left",middleLeft:"pdfjs-editor-resizer-middle-left"}),AnnotationEditor._borderLineWidth!==-1)return;const style2=getComputedStyle(
document.documentElement);AnnotationEditor._borderLineWidth=parseFloat(style2.getPropertyValue("--outline-width"))||0}static updateDefaultParams(_type,_value){}static get defaultPropertiesToUpdate(){return[]}static isHandlingMimeForPasting(mime){return!1}static paste(item,parent){unreachable("Not implemented")}get propertiesToUpdate(){return[]}get _isDraggable(){return this.#isDraggable}set _isDraggable(value){this.#isDraggable=value,this.div?.classList.toggle("draggable",value)}get isEnterHandled(){
return!0}center(){const[pageWidth,pageHeight]=this.pageDimensions;switch(this.parentRotation){case 90:this.x-=this.height*pageHeight/(pageWidth*2),this.y+=this.width*pageWidth/(pageHeight*2);break;case 180:this.x+=this.width/2,this.y+=this.height/2;break;case 270:this.x+=this.height*pageHeight/(pageWidth*2),this.y-=this.width*pageWidth/(pageHeight*2);break;default:this.x-=this.width/2,this.y-=this.height/2;break}this.fixAndSetPosition()}addCommands(params){this._uiManager.addCommands(params)}get currentLayer(){
return this._uiManager.currentLayer}setInBackground(){this.div.style.zIndex=0}setInForeground(){this.div.style.zIndex=this.#zIndex}setParent(parent){parent!==null?(this.pageIndex=parent.pageIndex,this.pageDimensions=parent.pageDimensions):this.#stopResizing(),this.parent=parent}focusin(event2){this._focusEventsAllowed&&(this.#hasBeenClicked?this.#hasBeenClicked=!1:this.parent.setSelected(this))}focusout(event2){!this._focusEventsAllowed||!this.isAttachedToDOM||event2.relatedTarget?.closest(`#${this.
id}`)||(event2.preventDefault(),this.parent?.isMultipleSelection||this.commitOrRemove())}commitOrRemove(){this.isEmpty()?this.remove():this.commit()}commit(){this.isInEditMode()&&this.addToAnnotationStorage()}addToAnnotationStorage(){this._uiManager.addToAnnotationStorage(this)}setAt(x,y,tx,ty){const[width,height]=this.parentDimensions;[tx,ty]=this.screenToPageTranslation(tx,ty),this.x=(x+tx)/width,this.y=(y+ty)/height,this.fixAndSetPosition()}_moveAfterPaste(baseX,baseY){const[parentWidth,parentHeight]=this.
parentDimensions;this.setAt(baseX*parentWidth,baseY*parentHeight,this.width*parentWidth,this.height*parentHeight),this._onTranslated()}#translate([width,height],x,y){[x,y]=this.screenToPageTranslation(x,y),this.x+=x/width,this.y+=y/height,this._onTranslating(this.x,this.y),this.fixAndSetPosition()}translate(x,y){this.#translate(this.parentDimensions,x,y)}translateInPage(x,y){this.#initialRect||=[this.x,this.y,this.width,this.height],this.#translate(this.pageDimensions,x,y),this.div.scrollIntoView(
{block:"nearest"})}translationDone(){this._onTranslated(this.x,this.y)}drag(tx,ty){this.#initialRect||=[this.x,this.y,this.width,this.height];const{div,parentDimensions:[parentWidth,parentHeight]}=this;if(this.x+=tx/parentWidth,this.y+=ty/parentHeight,this.parent&&(this.x<0||this.x>1||this.y<0||this.y>1)){const{x:x2,y:y2}=this.div.getBoundingClientRect();this.parent.findNewParent(this,x2,y2)&&(this.x-=Math.floor(this.x),this.y-=Math.floor(this.y))}let{x,y}=this;const[bx,by]=this.getBaseTranslation();
x+=bx,y+=by;const{style:style2}=div;style2.left=`${(100*x).toFixed(2)}%`,style2.top=`${(100*y).toFixed(2)}%`,this._onTranslating(x,y),div.scrollIntoView({block:"nearest"})}_onTranslating(x,y){}_onTranslated(x,y){}get _hasBeenMoved(){return!!this.#initialRect&&(this.#initialRect[0]!==this.x||this.#initialRect[1]!==this.y)}get _hasBeenResized(){return!!this.#initialRect&&(this.#initialRect[2]!==this.width||this.#initialRect[3]!==this.height)}getBaseTranslation(){const[parentWidth,parentHeight]=this.
parentDimensions,{_borderLineWidth}=AnnotationEditor,x=_borderLineWidth/parentWidth,y=_borderLineWidth/parentHeight;switch(this.rotation){case 90:return[-x,y];case 180:return[x,y];case 270:return[x,-y];default:return[-x,-y]}}get _mustFixPosition(){return!0}fixAndSetPosition(rotation=this.rotation){const{div:{style:style2},pageDimensions:[pageWidth,pageHeight]}=this;let{x,y,width,height}=this;if(width*=pageWidth,height*=pageHeight,x*=pageWidth,y*=pageHeight,this._mustFixPosition)switch(rotation){case 0:
x=MathClamp(x,0,pageWidth-width),y=MathClamp(y,0,pageHeight-height);break;case 90:x=MathClamp(x,0,pageWidth-height),y=MathClamp(y,width,pageHeight);break;case 180:x=MathClamp(x,width,pageWidth),y=MathClamp(y,height,pageHeight);break;case 270:x=MathClamp(x,height,pageWidth),y=MathClamp(y,0,pageHeight-width);break}this.x=x/=pageWidth,this.y=y/=pageHeight;const[bx,by]=this.getBaseTranslation();x+=bx,y+=by,style2.left=`${(100*x).toFixed(2)}%`,style2.top=`${(100*y).toFixed(2)}%`,this.moveInDOM()}static#rotatePoint(x,y,angle){
switch(angle){case 90:return[y,-x];case 180:return[-x,-y];case 270:return[-y,x];default:return[x,y]}}screenToPageTranslation(x,y){return AnnotationEditor.#rotatePoint(x,y,this.parentRotation)}pageTranslationToScreen(x,y){return AnnotationEditor.#rotatePoint(x,y,360-this.parentRotation)}#getRotationMatrix(rotation){switch(rotation){case 90:{const[pageWidth,pageHeight]=this.pageDimensions;return[0,-pageWidth/pageHeight,pageHeight/pageWidth,0]}case 180:return[-1,0,0,-1];case 270:{const[pageWidth,pageHeight]=this.
pageDimensions;return[0,pageWidth/pageHeight,-pageHeight/pageWidth,0]}default:return[1,0,0,1]}}get parentScale(){return this._uiManager.viewParameters.realScale}get parentRotation(){return(this._uiManager.viewParameters.rotation+this.pageRotation)%360}get parentDimensions(){const{parentScale,pageDimensions:[pageWidth,pageHeight]}=this;return[pageWidth*parentScale,pageHeight*parentScale]}setDims(width,height){const[parentWidth,parentHeight]=this.parentDimensions,{style:style2}=this.div;style2.width=
`${(100*width/parentWidth).toFixed(2)}%`,this.#keepAspectRatio||(style2.height=`${(100*height/parentHeight).toFixed(2)}%`)}fixDims(){const{style:style2}=this.div,{height,width}=style2,widthPercent=width.endsWith("%"),heightPercent=!this.#keepAspectRatio&&height.endsWith("%");if(widthPercent&&heightPercent)return;const[parentWidth,parentHeight]=this.parentDimensions;widthPercent||(style2.width=`${(100*parseFloat(width)/parentWidth).toFixed(2)}%`),!this.#keepAspectRatio&&!heightPercent&&(style2.height=
`${(100*parseFloat(height)/parentHeight).toFixed(2)}%`)}getInitialTranslation(){return[0,0]}#createResizers(){if(this.#resizersDiv)return;this.#resizersDiv=document.createElement("div"),this.#resizersDiv.classList.add("resizers");const classes=this._willKeepAspectRatio?["topLeft","topRight","bottomRight","bottomLeft"]:["topLeft","topMiddle","topRight","middleRight","bottomRight","bottomMiddle","bottomLeft","middleLeft"],signal=this._uiManager._signal;for(const name of classes){const div=document.
createElement("div");this.#resizersDiv.append(div),div.classList.add("resizer",name),div.setAttribute("data-resizer-name",name),div.addEventListener("pointerdown",this.#resizerPointerdown.bind(this,name),{signal}),div.addEventListener("contextmenu",noContextMenu,{signal}),div.tabIndex=-1}this.div.prepend(this.#resizersDiv)}#resizerPointerdown(name,event2){event2.preventDefault();const{isMac}=util_FeatureTest.platform;if(event2.button!==0||event2.ctrlKey&&isMac)return;this.#altText?.toggle(!1);const savedDraggable=this.
_isDraggable;this._isDraggable=!1,this.#lastPointerCoords=[event2.screenX,event2.screenY];const ac=new AbortController,signal=this._uiManager.combinedSignal(ac);this.parent.togglePointerEvents(!1),window.addEventListener("pointermove",this.#resizerPointermove.bind(this,name),{passive:!0,capture:!0,signal}),window.addEventListener("touchmove",stopEvent,{passive:!1,signal}),window.addEventListener("contextmenu",noContextMenu,{signal}),this.#savedDimensions={savedX:this.x,savedY:this.y,savedWidth:this.
width,savedHeight:this.height};const savedParentCursor=this.parent.div.style.cursor,savedCursor=this.div.style.cursor;this.div.style.cursor=this.parent.div.style.cursor=window.getComputedStyle(event2.target).cursor;const pointerUpCallback=()=>{ac.abort(),this.parent.togglePointerEvents(!0),this.#altText?.toggle(!0),this._isDraggable=savedDraggable,this.parent.div.style.cursor=savedParentCursor,this.div.style.cursor=savedCursor,this.#addResizeToUndoStack()};window.addEventListener("pointerup",pointerUpCallback,
{signal}),window.addEventListener("blur",pointerUpCallback,{signal})}#resize(x,y,width,height){this.width=width,this.height=height,this.x=x,this.y=y;const[parentWidth,parentHeight]=this.parentDimensions;this.setDims(parentWidth*width,parentHeight*height),this.fixAndSetPosition(),this._onResized()}_onResized(){}#addResizeToUndoStack(){if(!this.#savedDimensions)return;const{savedX,savedY,savedWidth,savedHeight}=this.#savedDimensions;this.#savedDimensions=null;const newX=this.x,newY=this.y,newWidth=this.
width,newHeight=this.height;newX===savedX&&newY===savedY&&newWidth===savedWidth&&newHeight===savedHeight||this.addCommands({cmd:this.#resize.bind(this,newX,newY,newWidth,newHeight),undo:this.#resize.bind(this,savedX,savedY,savedWidth,savedHeight),mustExec:!0})}static _round(x){return Math.round(x*1e4)/1e4}#resizerPointermove(name,event2){const[parentWidth,parentHeight]=this.parentDimensions,savedX=this.x,savedY=this.y,savedWidth=this.width,savedHeight=this.height,minWidth=AnnotationEditor.MIN_SIZE/
parentWidth,minHeight=AnnotationEditor.MIN_SIZE/parentHeight,rotationMatrix=this.#getRotationMatrix(this.rotation),transf=(x,y)=>[rotationMatrix[0]*x+rotationMatrix[2]*y,rotationMatrix[1]*x+rotationMatrix[3]*y],invRotationMatrix=this.#getRotationMatrix(360-this.rotation),invTransf=(x,y)=>[invRotationMatrix[0]*x+invRotationMatrix[2]*y,invRotationMatrix[1]*x+invRotationMatrix[3]*y];let getPoint2,getOpposite,isDiagonal=!1,isHorizontal=!1;switch(name){case"topLeft":isDiagonal=!0,getPoint2=(w,h2)=>[0,
0],getOpposite=(w,h2)=>[w,h2];break;case"topMiddle":getPoint2=(w,h2)=>[w/2,0],getOpposite=(w,h2)=>[w/2,h2];break;case"topRight":isDiagonal=!0,getPoint2=(w,h2)=>[w,0],getOpposite=(w,h2)=>[0,h2];break;case"middleRight":isHorizontal=!0,getPoint2=(w,h2)=>[w,h2/2],getOpposite=(w,h2)=>[0,h2/2];break;case"bottomRight":isDiagonal=!0,getPoint2=(w,h2)=>[w,h2],getOpposite=(w,h2)=>[0,0];break;case"bottomMiddle":getPoint2=(w,h2)=>[w/2,h2],getOpposite=(w,h2)=>[w/2,0];break;case"bottomLeft":isDiagonal=!0,getPoint2=
(w,h2)=>[0,h2],getOpposite=(w,h2)=>[w,0];break;case"middleLeft":isHorizontal=!0,getPoint2=(w,h2)=>[0,h2/2],getOpposite=(w,h2)=>[w,h2/2];break}const point2=getPoint2(savedWidth,savedHeight),oppositePoint=getOpposite(savedWidth,savedHeight);let transfOppositePoint=transf(...oppositePoint);const oppositeX=AnnotationEditor._round(savedX+transfOppositePoint[0]),oppositeY=AnnotationEditor._round(savedY+transfOppositePoint[1]);let ratioX=1,ratioY=1,deltaX,deltaY;if(event2.fromKeyboard)({deltaX,deltaY}=
event2);else{const{screenX,screenY}=event2,[lastScreenX,lastScreenY]=this.#lastPointerCoords;[deltaX,deltaY]=this.screenToPageTranslation(screenX-lastScreenX,screenY-lastScreenY),this.#lastPointerCoords[0]=screenX,this.#lastPointerCoords[1]=screenY}if([deltaX,deltaY]=invTransf(deltaX/parentWidth,deltaY/parentHeight),isDiagonal){const oldDiag=Math.hypot(savedWidth,savedHeight);ratioX=ratioY=Math.max(Math.min(Math.hypot(oppositePoint[0]-point2[0]-deltaX,oppositePoint[1]-point2[1]-deltaY)/oldDiag,1/
savedWidth,1/savedHeight),minWidth/savedWidth,minHeight/savedHeight)}else isHorizontal?ratioX=MathClamp(Math.abs(oppositePoint[0]-point2[0]-deltaX),minWidth,1)/savedWidth:ratioY=MathClamp(Math.abs(oppositePoint[1]-point2[1]-deltaY),minHeight,1)/savedHeight;const newWidth=AnnotationEditor._round(savedWidth*ratioX),newHeight=AnnotationEditor._round(savedHeight*ratioY);transfOppositePoint=transf(...getOpposite(newWidth,newHeight));const newX=oppositeX-transfOppositePoint[0],newY=oppositeY-transfOppositePoint[1];
this.#initialRect||=[this.x,this.y,this.width,this.height],this.width=newWidth,this.height=newHeight,this.x=newX,this.y=newY,this.setDims(parentWidth*newWidth,parentHeight*newHeight),this.fixAndSetPosition(),this._onResizing()}_onResizing(){}altTextFinish(){this.#altText?.finish()}get toolbarButtons(){return null}async addEditToolbar(){if(this._editToolbar||this.#isInEditMode)return this._editToolbar;this._editToolbar=new EditorToolbar(this),this.div.append(this._editToolbar.render()),this._editToolbar.
addButton("comment",this.addCommentButton());const{toolbarButtons}=this;if(toolbarButtons)for(const[name,tool]of toolbarButtons)await this._editToolbar.addButton(name,tool);return this._editToolbar.addButton("delete"),this._editToolbar}removeEditToolbar(){this._editToolbar&&(this._editToolbar.remove(),this._editToolbar=null,this.#altText?.destroy())}addContainer(container2){const editToolbarDiv=this._editToolbar?.div;editToolbarDiv?editToolbarDiv.before(container2):this.div.append(container2)}getClientDimensions(){
return this.div.getBoundingClientRect()}createAltText(){return this.#altText||(AltText.initialize(AnnotationEditor._l10n),this.#altText=new AltText(this),this.#accessibilityData&&(this.#altText.data=this.#accessibilityData,this.#accessibilityData=null)),this.#altText}get altTextData(){return this.#altText?.data}set altTextData(data){this.#altText&&(this.#altText.data=data)}get guessedAltText(){return this.#altText?.guessedText}async setGuessedAltText(text2){await this.#altText?.setGuessedText(text2)}serializeAltText(isForCopying){
return this.#altText?.serialize(isForCopying)}hasAltText(){return!!this.#altText&&!this.#altText.isEmpty()}hasAltTextData(){return this.#altText?.hasData()??!1}addCommentButton(){return this.#comment?this.#comment:this.#comment=new Comment$1(this)}get commentColor(){return null}get comment(){const comment2=this.#comment;return{text:comment2.data.text,date:comment2.data.date,deleted:comment2.isDeleted(),color:this.commentColor}}set comment(text2){this.#comment||(this.#comment=new Comment$1(this)),
this.#comment.data=text2}setCommentData(text2){this.#comment||(this.#comment=new Comment$1(this)),this.#comment.setInitialText(text2)}get hasEditedComment(){return this.#comment?.hasBeenEdited()}async editComment(){this.#comment||(this.#comment=new Comment$1(this)),this.#comment.edit()}addComment(serialized){this.hasEditedComment&&(serialized.popup={contents:this.comment.text,deleted:this.comment.deleted})}render(){const div=this.div=document.createElement("div");div.setAttribute("data-editor-ro\
tation",(360-this.rotation)%360),div.className=this.name,div.setAttribute("id",this.id),div.tabIndex=this.#disabled?-1:0,div.setAttribute("role","application"),this.defaultL10nId&&div.setAttribute("data-l10n-id",this.defaultL10nId),this._isVisible||div.classList.add("hidden"),this.setInForeground(),this.#addFocusListeners();const[parentWidth,parentHeight]=this.parentDimensions;this.parentRotation%180!==0&&(div.style.maxWidth=`${(100*parentHeight/parentWidth).toFixed(2)}%`,div.style.maxHeight=`${(100*
parentWidth/parentHeight).toFixed(2)}%`);const[tx,ty]=this.getInitialTranslation();return this.translate(tx,ty),bindEvents(this,div,["keydown","pointerdown","dblclick"]),this.isResizable&&this._uiManager._supportsPinchToZoom&&(this.#touchManager||=new TouchManager({container:div,isPinchingDisabled:()=>!this.isSelected,onPinchStart:this.#touchPinchStartCallback.bind(this),onPinching:this.#touchPinchCallback.bind(this),onPinchEnd:this.#touchPinchEndCallback.bind(this),signal:this._uiManager._signal})),
this._uiManager._editorUndoBar?.hide(),div}#touchPinchStartCallback(){this.#savedDimensions={savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height},this.#altText?.toggle(!1),this.parent.togglePointerEvents(!1)}#touchPinchCallback(_origin,prevDistance,distance){let factor=.7*(distance/prevDistance)+1-.7;if(factor===1)return;const rotationMatrix=this.#getRotationMatrix(this.rotation),transf=(x,y)=>[rotationMatrix[0]*x+rotationMatrix[2]*y,rotationMatrix[1]*x+rotationMatrix[3]*y],
[parentWidth,parentHeight]=this.parentDimensions,savedX=this.x,savedY=this.y,savedWidth=this.width,savedHeight=this.height,minWidth=AnnotationEditor.MIN_SIZE/parentWidth,minHeight=AnnotationEditor.MIN_SIZE/parentHeight;factor=Math.max(Math.min(factor,1/savedWidth,1/savedHeight),minWidth/savedWidth,minHeight/savedHeight);const newWidth=AnnotationEditor._round(savedWidth*factor),newHeight=AnnotationEditor._round(savedHeight*factor);if(newWidth===savedWidth&&newHeight===savedHeight)return;this.#initialRect||=
[savedX,savedY,savedWidth,savedHeight];const transfCenterPoint=transf(savedWidth/2,savedHeight/2),centerX=AnnotationEditor._round(savedX+transfCenterPoint[0]),centerY=AnnotationEditor._round(savedY+transfCenterPoint[1]),newTransfCenterPoint=transf(newWidth/2,newHeight/2);this.x=centerX-newTransfCenterPoint[0],this.y=centerY-newTransfCenterPoint[1],this.width=newWidth,this.height=newHeight,this.setDims(parentWidth*newWidth,parentHeight*newHeight),this.fixAndSetPosition(),this._onResizing()}#touchPinchEndCallback(){
this.#altText?.toggle(!0),this.parent.togglePointerEvents(!0),this.#addResizeToUndoStack()}pointerdown(event2){const{isMac}=util_FeatureTest.platform;if(event2.button!==0||event2.ctrlKey&&isMac){event2.preventDefault();return}if(this.#hasBeenClicked=!0,this._isDraggable){this.#setUpDragSession(event2);return}this.#selectOnPointerEvent(event2)}#selectOnPointerEvent(event2){const{isMac}=util_FeatureTest.platform;event2.ctrlKey&&!isMac||event2.shiftKey||event2.metaKey&&isMac?this.parent.toggleSelected(
this):this.parent.setSelected(this)}#setUpDragSession(event2){const{isSelected}=this;this._uiManager.setUpDragSession();let hasDraggingStarted=!1;const ac=new AbortController,signal=this._uiManager.combinedSignal(ac),opts={capture:!0,passive:!1,signal},cancelDrag=e=>{ac.abort(),this.#dragPointerId=null,this.#hasBeenClicked=!1,this._uiManager.endDragSession()||this.#selectOnPointerEvent(e),hasDraggingStarted&&this._onStopDragging()};isSelected&&(this.#prevDragX=event2.clientX,this.#prevDragY=event2.
clientY,this.#dragPointerId=event2.pointerId,this.#dragPointerType=event2.pointerType,window.addEventListener("pointermove",e=>{hasDraggingStarted||(hasDraggingStarted=!0,this._onStartDragging());const{clientX:x,clientY:y,pointerId}=e;if(pointerId!==this.#dragPointerId){stopEvent(e);return}const[tx,ty]=this.screenToPageTranslation(x-this.#prevDragX,y-this.#prevDragY);this.#prevDragX=x,this.#prevDragY=y,this._uiManager.dragSelectedEditors(tx,ty)},opts),window.addEventListener("touchmove",stopEvent,
opts),window.addEventListener("pointerdown",e=>{e.pointerType===this.#dragPointerType&&(this.#touchManager||e.isPrimary)&&cancelDrag(e),stopEvent(e)},opts));const pointerUpCallback=e=>{if(!this.#dragPointerId||this.#dragPointerId===e.pointerId){cancelDrag(e);return}stopEvent(e)};window.addEventListener("pointerup",pointerUpCallback,{signal}),window.addEventListener("blur",pointerUpCallback,{signal})}_onStartDragging(){}_onStopDragging(){}moveInDOM(){this.#moveInDOMTimeout&&clearTimeout(this.#moveInDOMTimeout),
this.#moveInDOMTimeout=setTimeout(()=>{this.#moveInDOMTimeout=null,this.parent?.moveEditorInDOM(this)},0)}_setParentAndPosition(parent,x,y){parent.changeParent(this),this.x=x,this.y=y,this.fixAndSetPosition(),this._onTranslated()}getRect(tx,ty,rotation=this.rotation){const scale2=this.parentScale,[pageWidth,pageHeight]=this.pageDimensions,[pageX,pageY]=this.pageTranslation,shiftX=tx/scale2,shiftY=ty/scale2,x=this.x*pageWidth,y=this.y*pageHeight,width=this.width*pageWidth,height=this.height*pageHeight;
switch(rotation){case 0:return[x+shiftX+pageX,pageHeight-y-shiftY-height+pageY,x+shiftX+width+pageX,pageHeight-y-shiftY+pageY];case 90:return[x+shiftY+pageX,pageHeight-y+shiftX+pageY,x+shiftY+height+pageX,pageHeight-y+shiftX+width+pageY];case 180:return[x-shiftX-width+pageX,pageHeight-y+shiftY+pageY,x-shiftX+pageX,pageHeight-y+shiftY+height+pageY];case 270:return[x-shiftY-height+pageX,pageHeight-y-shiftX-width+pageY,x-shiftY+pageX,pageHeight-y-shiftX+pageY];default:throw new Error("Invalid rotat\
ion")}}getRectInCurrentCoords(rect,pageHeight){const[x1,y1,x2,y2]=rect,width=x2-x1,height=y2-y1;switch(this.rotation){case 0:return[x1,pageHeight-y2,width,height];case 90:return[x1,pageHeight-y1,height,width];case 180:return[x2,pageHeight-y1,width,height];case 270:return[x2,pageHeight-y2,height,width];default:throw new Error("Invalid rotation")}}onceAdded(focus2){}isEmpty(){return!1}enableEditMode(){return this.isInEditMode()?!1:(this.parent.setEditingState(!1),this.#isInEditMode=!0,!0)}disableEditMode(){
return this.isInEditMode()?(this.parent.setEditingState(!0),this.#isInEditMode=!1,!0):!1}isInEditMode(){return this.#isInEditMode}shouldGetKeyboardEvents(){return this.#isResizerEnabledForKeyboard}needsToBeRebuilt(){return this.div&&!this.isAttachedToDOM}get isOnScreen(){const{top,left,bottom,right}=this.getClientDimensions(),{innerHeight,innerWidth}=window;return left<innerWidth&&right>0&&top<innerHeight&&bottom>0}#addFocusListeners(){if(this.#focusAC||!this.div)return;this.#focusAC=new AbortController;
const signal=this._uiManager.combinedSignal(this.#focusAC);this.div.addEventListener("focusin",this.focusin.bind(this),{signal}),this.div.addEventListener("focusout",this.focusout.bind(this),{signal})}rebuild(){this.#addFocusListeners()}rotate(_angle){}resize(){}serializeDeleted(){return{id:this.annotationElementId,deleted:!0,pageIndex:this.pageIndex,popupRef:this._initialData?.popupRef||""}}serialize(isForCopying=!1,context=null){unreachable("An editor must be serializable")}static async deserialize(data,parent,uiManager){
const editor=new this.prototype.constructor({parent,id:parent.getNextId(),uiManager,annotationElementId:data.annotationElementId});editor.rotation=data.rotation,editor.#accessibilityData=data.accessibilityData,editor._isCopy=data.isCopy||!1;const[pageWidth,pageHeight]=editor.pageDimensions,[x,y,width,height]=editor.getRectInCurrentCoords(data.rect,pageHeight);return editor.x=x/pageWidth,editor.y=y/pageHeight,editor.width=width/pageWidth,editor.height=height/pageHeight,editor}get hasBeenModified(){
return!!this.annotationElementId&&(this.deleted||this.serialize()!==null)}remove(){if(this.#focusAC?.abort(),this.#focusAC=null,this.isEmpty()||this.commit(),this.parent?this.parent.remove(this):this._uiManager.removeEditor(this),this.#moveInDOMTimeout&&(clearTimeout(this.#moveInDOMTimeout),this.#moveInDOMTimeout=null),this.#stopResizing(),this.removeEditToolbar(),this.#telemetryTimeouts){for(const timeout of this.#telemetryTimeouts.values())clearTimeout(timeout);this.#telemetryTimeouts=null}this.
parent=null,this.#touchManager?.destroy(),this.#touchManager=null}get isResizable(){return!1}makeResizable(){this.isResizable&&(this.#createResizers(),this.#resizersDiv.classList.remove("hidden"))}get toolbarPosition(){return null}keydown(event2){if(!this.isResizable||event2.target!==this.div||event2.key!=="Enter")return;this._uiManager.setSelected(this),this.#savedDimensions={savedX:this.x,savedY:this.y,savedWidth:this.width,savedHeight:this.height};const children=this.#resizersDiv.children;if(!this.#allResizerDivs){
this.#allResizerDivs=Array.from(children);const boundResizerKeydown=this.#resizerKeydown.bind(this),boundResizerBlur=this.#resizerBlur.bind(this),signal=this._uiManager._signal;for(const div of this.#allResizerDivs){const name=div.getAttribute("data-resizer-name");div.setAttribute("role","spinbutton"),div.addEventListener("keydown",boundResizerKeydown,{signal}),div.addEventListener("blur",boundResizerBlur,{signal}),div.addEventListener("focus",this.#resizerFocus.bind(this,name),{signal}),div.setAttribute(
"data-l10n-id",AnnotationEditor._l10nResizer[name])}}const first=this.#allResizerDivs[0];let firstPosition=0;for(const div of children){if(div===first)break;firstPosition++}const nextFirstPosition=(360-this.rotation+this.parentRotation)%360/90*(this.#allResizerDivs.length/4);if(nextFirstPosition!==firstPosition){if(nextFirstPosition<firstPosition)for(let i2=0;i2<firstPosition-nextFirstPosition;i2++)this.#resizersDiv.append(this.#resizersDiv.firstChild);else if(nextFirstPosition>firstPosition)for(let i2=0;i2<
nextFirstPosition-firstPosition;i2++)this.#resizersDiv.firstChild.before(this.#resizersDiv.lastChild);let i=0;for(const child2 of children){const name=this.#allResizerDivs[i++].getAttribute("data-resizer-name");child2.setAttribute("data-l10n-id",AnnotationEditor._l10nResizer[name])}}this.#setResizerTabIndex(0),this.#isResizerEnabledForKeyboard=!0,this.#resizersDiv.firstChild.focus({focusVisible:!0}),event2.preventDefault(),event2.stopImmediatePropagation()}#resizerKeydown(event2){AnnotationEditor.
_resizerKeyboardManager.exec(this,event2)}#resizerBlur(event2){this.#isResizerEnabledForKeyboard&&event2.relatedTarget?.parentNode!==this.#resizersDiv&&this.#stopResizing()}#resizerFocus(name){this.#focusedResizerName=this.#isResizerEnabledForKeyboard?name:""}#setResizerTabIndex(value){if(this.#allResizerDivs)for(const div of this.#allResizerDivs)div.tabIndex=value}_resizeWithKeyboard(x,y){this.#isResizerEnabledForKeyboard&&this.#resizerPointermove(this.#focusedResizerName,{deltaX:x,deltaY:y,fromKeyboard:!0})}#stopResizing(){
this.#isResizerEnabledForKeyboard=!1,this.#setResizerTabIndex(-1),this.#addResizeToUndoStack()}_stopResizingWithKeyboard(){this.#stopResizing(),this.div.focus()}select(){if(!(this.isSelected&&this._editToolbar)){if(this.isSelected=!0,this.makeResizable(),this.div?.classList.add("selectedEditor"),!this._editToolbar){this.addEditToolbar().then(()=>{this.div?.classList.contains("selectedEditor")&&this._editToolbar?.show()});return}this._editToolbar?.show(),this.#altText?.toggleAltTextBadge(!1)}}unselect(){
this.isSelected&&(this.isSelected=!1,this.#resizersDiv?.classList.add("hidden"),this.div?.classList.remove("selectedEditor"),this.div?.contains(document.activeElement)&&this._uiManager.currentLayer.div.focus({preventScroll:!0}),this._editToolbar?.hide(),this.#altText?.toggleAltTextBadge(!0))}updateParams(type2,value){}disableEditing(){}enableEditing(){}get canChangeContent(){return!1}enterInEditMode(){this.canChangeContent&&(this.enableEditMode(),this.div.focus())}dblclick(event2){this.enterInEditMode(),
this.parent.updateToolbar({mode:this.constructor._editorType,editId:this.id})}getElementForAltText(){return this.div}get contentDiv(){return this.div}get isEditing(){return this.#isEditing}set isEditing(value){this.#isEditing=value,this.parent&&(value?(this.parent.setSelected(this),this.parent.setActiveEditor(this)):this.parent.setActiveEditor(null))}setAspectRatio(width,height){this.#keepAspectRatio=!0;const aspectRatio=width/height,{style:style2}=this.div;style2.aspectRatio=aspectRatio,style2.
height="auto"}static get MIN_SIZE(){return 16}static canCreateNewEmptyEditor(){return!0}get telemetryInitialData(){return{action:"added"}}get telemetryFinalData(){return null}_reportTelemetry(data,mustWait=!1){if(mustWait){this.#telemetryTimeouts||=new Map;const{action:action2}=data;let timeout=this.#telemetryTimeouts.get(action2);timeout&&clearTimeout(timeout),timeout=setTimeout(()=>{this._reportTelemetry(data),this.#telemetryTimeouts.delete(action2),this.#telemetryTimeouts.size===0&&(this.#telemetryTimeouts=
null)},AnnotationEditor._telemetryTimeout),this.#telemetryTimeouts.set(action2,timeout);return}data.type||=this.editorType,this._uiManager._eventBus.dispatch("reporttelemetry",{source:this,details:{type:"editing",data}})}show(visible=this._isVisible){this.div.classList.toggle("hidden",!visible),this._isVisible=visible}enable(){this.div&&(this.div.tabIndex=0),this.#disabled=!1}disable(){this.div&&(this.div.tabIndex=-1),this.#disabled=!0}renderAnnotationElement(annotation){let content2=annotation.
container.querySelector(".annotationContent");if(!content2)content2=document.createElement("div"),content2.classList.add("annotationContent",this.editorType),annotation.container.prepend(content2);else if(content2.nodeName==="CANVAS"){const canvas=content2;content2=document.createElement("div"),content2.classList.add("annotationContent",this.editorType),canvas.before(content2)}return content2}resetAnnotationElement(annotation){const{firstChild}=annotation.container;firstChild?.nodeName==="DIV"&&
firstChild.classList.contains("annotationContent")&&firstChild.remove()}}class FakeEditor extends AnnotationEditor{constructor(params){super(params),this.annotationElementId=params.annotationElementId,this.deleted=!0}serialize(){return this.serializeDeleted()}}const SEED=3285377520,MASK_HIGH=4294901760,MASK_LOW=65535;class MurmurHash3_64{constructor(seed){this.h1=seed?seed&4294967295:SEED,this.h2=seed?seed&4294967295:SEED}update(input){let data,length;if(typeof input=="string"){data=new Uint8Array(
input.length*2),length=0;for(let i=0,ii=input.length;i<ii;i++){const code2=input.charCodeAt(i);code2<=255?data[length++]=code2:(data[length++]=code2>>>8,data[length++]=code2&255)}}else if(ArrayBuffer.isView(input))data=input.slice(),length=data.byteLength;else throw new Error("Invalid data format, must be a string or TypedArray.");const blockCounts=length>>2,tailLength=length-blockCounts*4,dataUint32=new Uint32Array(data.buffer,0,blockCounts);let k1=0,k2=0,h1=this.h1,h2=this.h2;const C1=3432918353,
C2=461845907,C1_LOW=C1&MASK_LOW,C2_LOW=C2&MASK_LOW;for(let i=0;i<blockCounts;i++)i&1?(k1=dataUint32[i],k1=k1*C1&MASK_HIGH|k1*C1_LOW&MASK_LOW,k1=k1<<15|k1>>>17,k1=k1*C2&MASK_HIGH|k1*C2_LOW&MASK_LOW,h1^=k1,h1=h1<<13|h1>>>19,h1=h1*5+3864292196):(k2=dataUint32[i],k2=k2*C1&MASK_HIGH|k2*C1_LOW&MASK_LOW,k2=k2<<15|k2>>>17,k2=k2*C2&MASK_HIGH|k2*C2_LOW&MASK_LOW,h2^=k2,h2=h2<<13|h2>>>19,h2=h2*5+3864292196);switch(k1=0,tailLength){case 3:k1^=data[blockCounts*4+2]<<16;case 2:k1^=data[blockCounts*4+1]<<8;case 1:
k1^=data[blockCounts*4],k1=k1*C1&MASK_HIGH|k1*C1_LOW&MASK_LOW,k1=k1<<15|k1>>>17,k1=k1*C2&MASK_HIGH|k1*C2_LOW&MASK_LOW,blockCounts&1?h1^=k1:h2^=k1}this.h1=h1,this.h2=h2}hexdigest(){let h1=this.h1,h2=this.h2;return h1^=h2>>>1,h1=h1*3981806797&MASK_HIGH|h1*36045&MASK_LOW,h2=h2*4283543511&MASK_HIGH|((h2<<16|h1>>>16)*2950163797&MASK_HIGH)>>>16,h1^=h2>>>1,h1=h1*444984403&MASK_HIGH|h1*60499&MASK_LOW,h2=h2*3301882366&MASK_HIGH|((h2<<16|h1>>>16)*3120437893&MASK_HIGH)>>>16,h1^=h2>>>1,(h1>>>0).toString(16).
padStart(8,"0")+(h2>>>0).toString(16).padStart(8,"0")}}const SerializableEmpty=Object.freeze({map:null,hash:"",transfer:void 0});class AnnotationStorage{#modified=!1;#modifiedIds=null;#storage=new Map;constructor(){this.onSetModified=null,this.onResetModified=null,this.onAnnotationEditor=null}getValue(key2,defaultValue){const value=this.#storage.get(key2);return value===void 0?defaultValue:Object.assign(defaultValue,value)}getRawValue(key2){return this.#storage.get(key2)}remove(key2){if(this.#storage.
delete(key2),this.#storage.size===0&&this.resetModified(),typeof this.onAnnotationEditor=="function"){for(const value of this.#storage.values())if(value instanceof AnnotationEditor)return;this.onAnnotationEditor(null)}}setValue(key2,value){const obj=this.#storage.get(key2);let modified=!1;if(obj!==void 0)for(const[entry,val]of Object.entries(value))obj[entry]!==val&&(modified=!0,obj[entry]=val);else modified=!0,this.#storage.set(key2,value);modified&&this.#setModified(),value instanceof AnnotationEditor&&
typeof this.onAnnotationEditor=="function"&&this.onAnnotationEditor(value.constructor._type)}has(key2){return this.#storage.has(key2)}get size(){return this.#storage.size}#setModified(){this.#modified||(this.#modified=!0,typeof this.onSetModified=="function"&&this.onSetModified())}resetModified(){this.#modified&&(this.#modified=!1,typeof this.onResetModified=="function"&&this.onResetModified())}get print(){return new PrintAnnotationStorage(this)}get serializable(){if(this.#storage.size===0)return SerializableEmpty;
const map2=new Map,hash2=new MurmurHash3_64,transfer=[],context=Object.create(null);let hasBitmap=!1;for(const[key2,val]of this.#storage){const serialized=val instanceof AnnotationEditor?val.serialize(!1,context):val;serialized&&(map2.set(key2,serialized),hash2.update(`${key2}:${JSON.stringify(serialized)}`),hasBitmap||=!!serialized.bitmap)}if(hasBitmap)for(const value of map2.values())value.bitmap&&transfer.push(value.bitmap);return map2.size>0?{map:map2,hash:hash2.hexdigest(),transfer}:SerializableEmpty}get editorStats(){
let stats=null;const typeToEditor=new Map;for(const value of this.#storage.values()){if(!(value instanceof AnnotationEditor))continue;const editorStats=value.telemetryFinalData;if(!editorStats)continue;const{type:type2}=editorStats;typeToEditor.has(type2)||typeToEditor.set(type2,Object.getPrototypeOf(value).constructor),stats||=Object.create(null);const map2=stats[type2]||=new Map;for(const[key2,val]of Object.entries(editorStats)){if(key2==="type")continue;let counters=map2.get(key2);counters||(counters=
new Map,map2.set(key2,counters));const count=counters.get(val)??0;counters.set(val,count+1)}}for(const[type2,editor]of typeToEditor)stats[type2]=editor.computeTelemetryFinalData(stats[type2]);return stats}resetModifiedIds(){this.#modifiedIds=null}get modifiedIds(){if(this.#modifiedIds)return this.#modifiedIds;const ids=[];for(const value of this.#storage.values())!(value instanceof AnnotationEditor)||!value.annotationElementId||!value.serialize()||ids.push(value.annotationElementId);return this.#modifiedIds=
{ids:new Set(ids),hash:ids.join(",")}}[Symbol.iterator](){return this.#storage.entries()}}class PrintAnnotationStorage extends AnnotationStorage{#serializable;constructor(parent){super();const{map:map2,hash:hash2,transfer}=parent.serializable,clone2=structuredClone(map2,transfer?{transfer}:null);this.#serializable={map:clone2,hash:hash2,transfer}}get print(){unreachable("Should not call PrintAnnotationStorage.print")}get serializable(){return this.#serializable}get modifiedIds(){return shadow(this,
"modifiedIds",{ids:new Set,hash:""})}}class FontLoader{#systemFonts=new Set;constructor({ownerDocument=globalThis.document,styleElement:styleElement2=null}){this._document=ownerDocument,this.nativeFontFaces=new Set,this.styleElement=null,this.loadingRequests=[],this.loadTestFontId=0}addNativeFontFace(nativeFontFace){this.nativeFontFaces.add(nativeFontFace),this._document.fonts.add(nativeFontFace)}removeNativeFontFace(nativeFontFace){this.nativeFontFaces.delete(nativeFontFace),this._document.fonts.
delete(nativeFontFace)}insertRule(rule){this.styleElement||(this.styleElement=this._document.createElement("style"),this._document.documentElement.getElementsByTagName("head")[0].append(this.styleElement));const styleSheet=this.styleElement.sheet;styleSheet.insertRule(rule,styleSheet.cssRules.length)}clear(){for(const nativeFontFace of this.nativeFontFaces)this._document.fonts.delete(nativeFontFace);this.nativeFontFaces.clear(),this.#systemFonts.clear(),this.styleElement&&(this.styleElement.remove(),
this.styleElement=null)}async loadSystemFont({systemFontInfo:info2,disableFontFace,_inspectFont}){if(!(!info2||this.#systemFonts.has(info2.loadedName))){if(assert$1(!disableFontFace,"loadSystemFont shouldn't be called when `disableFontFace` is set."),this.isFontLoadingAPISupported){const{loadedName,src,style:style2}=info2,fontFace=new FontFace(loadedName,src,style2);this.addNativeFontFace(fontFace);try{await fontFace.load(),this.#systemFonts.add(loadedName),_inspectFont?.(info2)}catch{warn(`Cann\
ot load system font: ${info2.baseFontName}, installing it could help to improve PDF rendering.`),this.removeNativeFontFace(fontFace)}return}unreachable("Not implemented: loadSystemFont without the Font Loading API.")}}async bind(font){if(font.attached||font.missingFile&&!font.systemFontInfo)return;if(font.attached=!0,font.systemFontInfo){await this.loadSystemFont(font);return}if(this.isFontLoadingAPISupported){const nativeFontFace=font.createNativeFontFace();if(nativeFontFace){this.addNativeFontFace(
nativeFontFace);try{await nativeFontFace.loaded}catch(ex){throw warn(`Failed to load font '${nativeFontFace.family}': '${ex}'.`),font.disableFontFace=!0,ex}}return}const rule=font.createFontFaceRule();if(rule){if(this.insertRule(rule),this.isSyncFontLoadingSupported)return;await new Promise(resolve2=>{const request=this._queueLoadingCallback(resolve2);this._prepareFontLoadEvent(font,request)})}}get isFontLoadingAPISupported(){const hasFonts=!!this._document?.fonts;return shadow(this,"isFontLoadi\
ngAPISupported",hasFonts)}get isSyncFontLoadingSupported(){return shadow(this,"isSyncFontLoadingSupported",isNodeJS||util_FeatureTest.platform.isFirefox)}_queueLoadingCallback(callback){function completeRequest(){for(assert$1(!request.done,"completeRequest() cannot be called twice."),request.done=!0;loadingRequests.length>0&&loadingRequests[0].done;){const otherRequest=loadingRequests.shift();setTimeout(otherRequest.callback,0)}}const{loadingRequests}=this,request={done:!1,complete:completeRequest,
callback};return loadingRequests.push(request),request}get _loadTestFont(){const testFont=atob("T1RUTwALAIAAAwAwQ0ZGIDHtZg4AAAOYAAAAgUZGVE1lkzZwAAAEHAAAABxHREVGABQAFQAABDgAAAAeT1MvMlYNYwkAAAEgAAAAYGNtYXABDQLUAAACNAAAAUJoZWFk/xVFDQAAALwAAAA2aGhlYQdkA+oAAAD0AAAAJGhtdHgD6AAAAAAEWAAAAAZtYXhwAAJQAAAAARgAAAAGbmFtZVjmdH4AAAGAAAAAsXBvc3T/hgAzAAADeAAAACAAAQAAAAEAALZRFsRfDzz1AAsD6AAAAADOBOTLAAAAAM4KHDwAAAAAA+gDIQAAAAgAAgAAAAAAAAABAAADIQAAAFoD6AAAAAAD6AABAAAAAAAAAAAAAAAAAAAAAQAAUAAAAgAAAAQD6AH0AAUAAAKKArwA\
AACMAooCvAAAAeAAMQECAAACAAYJAAAAAAAAAAAAAQAAAAAAAAAAAAAAAFBmRWQAwAAuAC4DIP84AFoDIQAAAAAAAQAAAAAAAAAAACAAIAABAAAADgCuAAEAAAAAAAAAAQAAAAEAAAAAAAEAAQAAAAEAAAAAAAIAAQAAAAEAAAAAAAMAAQAAAAEAAAAAAAQAAQAAAAEAAAAAAAUAAQAAAAEAAAAAAAYAAQAAAAMAAQQJAAAAAgABAAMAAQQJAAEAAgABAAMAAQQJAAIAAgABAAMAAQQJAAMAAgABAAMAAQQJAAQAAgABAAMAAQQJAAUAAgABAAMAAQQJAAYAAgABWABYAAAAAAAAAwAAAAMAAAAcAAEAAAAAADwAAwABAAAAHAAEACAAAAAEAAQAAQAAAC7//wAAAC7////TAAEAAAAAAAABBgAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEA\
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAMAAAAAAAD/gwAyAAAAAQAAAAAAAAAAAAAAAAAAAAABAAQEAAEBAQJYAAEBASH4DwD4GwHEAvgcA/gXBIwMAYuL+nz5tQXkD5j3CBLnEQACAQEBIVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYAAABAQAADwACAQEEE/t3Dov6fAH6fAT+fPp8+nwHDosMCvm1Cvm1DAz6fBQAAAAA\
AAABAAAAAMmJbzEAAAAAzgTjFQAAAADOBOQpAAEAAAAAAAAADAAUAAQAAAABAAAAAgABAAAAAAAAAAAD6AAAAAAAAA==");return shadow(this,"_loadTestFont",testFont)}_prepareFontLoadEvent(font,request){function int32(data2,offset2){return data2.charCodeAt(offset2)<<24|data2.charCodeAt(offset2+1)<<16|data2.charCodeAt(offset2+2)<<8|data2.charCodeAt(offset2+3)&255}function spliceString(s2,offset2,remove2,insert){const chunk1=s2.substring(0,offset2),chunk2=s2.substring(offset2+remove2);return chunk1+insert+chunk2}let i,ii;const canvas=this.
_document.createElement("canvas");canvas.width=1,canvas.height=1;const ctx=canvas.getContext("2d");let called=0;function isFontReady(name,callback){if(++called>30){warn("Load test font never loaded."),callback();return}if(ctx.font="30px "+name,ctx.fillText(".",0,20),ctx.getImageData(0,0,1,1).data[3]>0){callback();return}setTimeout(isFontReady.bind(null,name,callback))}const loadTestFontId=`lt${Date.now()}${this.loadTestFontId++}`;let data=this._loadTestFont;data=spliceString(data,976,loadTestFontId.
length,loadTestFontId);const CFF_CHECKSUM_OFFSET=16,XXXX_VALUE=1482184792;let checksum=int32(data,CFF_CHECKSUM_OFFSET);for(i=0,ii=loadTestFontId.length-3;i<ii;i+=4)checksum=checksum-XXXX_VALUE+int32(loadTestFontId,i)|0;i<loadTestFontId.length&&(checksum=checksum-XXXX_VALUE+int32(loadTestFontId+"XXX",i)|0),data=spliceString(data,CFF_CHECKSUM_OFFSET,4,string32(checksum));const url2=`url(data:font/opentype;base64,${btoa(data)});`,rule=`@font-face {font-family:"${loadTestFontId}";src:${url2}}`;this.
insertRule(rule);const div=this._document.createElement("div");div.style.visibility="hidden",div.style.width=div.style.height="10px",div.style.position="absolute",div.style.top=div.style.left="0px";for(const name of[font.loadedName,loadTestFontId]){const span=this._document.createElement("span");span.textContent="Hi",span.style.fontFamily=name,div.append(span)}this._document.body.append(div),isFontReady(loadTestFontId,()=>{div.remove(),request.complete()})}}class FontFaceObject{constructor(translatedData,inspectFont=null){
this.compiledGlyphs=Object.create(null);for(const i in translatedData)this[i]=translatedData[i];this._inspectFont=inspectFont}createNativeFontFace(){if(!this.data||this.disableFontFace)return null;let nativeFontFace;if(!this.cssFontInfo)nativeFontFace=new FontFace(this.loadedName,this.data,{});else{const css2={weight:this.cssFontInfo.fontWeight};this.cssFontInfo.italicAngle&&(css2.style=`oblique ${this.cssFontInfo.italicAngle}deg`),nativeFontFace=new FontFace(this.cssFontInfo.fontFamily,this.data,
css2)}return this._inspectFont?.(this),nativeFontFace}createFontFaceRule(){if(!this.data||this.disableFontFace)return null;const url2=`url(data:${this.mimetype};base64,${toBase64Util(this.data)});`;let rule;if(!this.cssFontInfo)rule=`@font-face {font-family:"${this.loadedName}";src:${url2}}`;else{let css2=`font-weight: ${this.cssFontInfo.fontWeight};`;this.cssFontInfo.italicAngle&&(css2+=`font-style: oblique ${this.cssFontInfo.italicAngle}deg;`),rule=`@font-face {font-family:"${this.cssFontInfo.
fontFamily}";${css2}src:${url2}}`}return this._inspectFont?.(this,url2),rule}getPathGenerator(objs,character){if(this.compiledGlyphs[character]!==void 0)return this.compiledGlyphs[character];const objId=this.loadedName+"_path_"+character;let cmds;try{cmds=objs.get(objId)}catch(ex){warn(`getPathGenerator - ignoring character: "${ex}".`)}const path2=new Path2D(cmds||"");return this.fontExtraProperties||objs.delete(objId),this.compiledGlyphs[character]=path2}}function getUrlProp(val){if(val instanceof
URL)return val.href;if(typeof val=="string"){if(isNodeJS)return val;const url2=URL.parse(val,window.location);if(url2)return url2.href}throw new Error("Invalid PDF url data: either string or URL-object is expected in the url property.")}function getDataProp(val){if(isNodeJS&&typeof Buffer<"u"&&val instanceof Buffer)throw new Error("Please provide binary data as `Uint8Array`, rather than `Buffer`.");if(val instanceof Uint8Array&&val.byteLength===val.buffer.byteLength)return val;if(typeof val=="st\
ring")return stringToBytes(val);if(val instanceof ArrayBuffer||ArrayBuffer.isView(val)||typeof val=="object"&&!isNaN(val?.length))return new Uint8Array(val);throw new Error("Invalid PDF binary data: either TypedArray, string, or array-like object is expected in the data property.")}function getFactoryUrlProp(val){if(typeof val!="string")return null;if(val.endsWith("/"))return val;throw new Error(`Invalid factory url: "${val}" must include trailing slash.`)}const isRefProxy=v=>typeof v=="object"&&
Number.isInteger(v?.num)&&v.num>=0&&Number.isInteger(v?.gen)&&v.gen>=0,isNameProxy=v=>typeof v=="object"&&typeof v?.name=="string",isValidExplicitDest=_isValidExplicitDest.bind(null,isRefProxy,isNameProxy);class LoopbackPort{#listeners=new Map;#deferred=Promise.resolve();postMessage(obj,transfer){const event2={data:structuredClone(obj,transfer?{transfer}:null)};this.#deferred.then(()=>{for(const[listener]of this.#listeners)listener.call(this,event2)})}addEventListener(name,listener,options=null){
let rmAbort=null;if(options?.signal instanceof AbortSignal){const{signal}=options;if(signal.aborted){warn("LoopbackPort - cannot use an `aborted` signal.");return}const onAbort=()=>this.removeEventListener(name,listener);rmAbort=()=>signal.removeEventListener("abort",onAbort),signal.addEventListener("abort",onAbort)}this.#listeners.set(listener,rmAbort)}removeEventListener(name,listener){this.#listeners.get(listener)?.(),this.#listeners.delete(listener)}terminate(){for(const[,rmAbort]of this.#listeners)
rmAbort?.();this.#listeners.clear()}}const CallbackKind={DATA:1,ERROR:2},StreamKind={CANCEL:1,CANCEL_COMPLETE:2,CLOSE:3,ENQUEUE:4,ERROR:5,PULL:6,PULL_COMPLETE:7,START_COMPLETE:8};function onFn(){}function wrapReason(ex){if(ex instanceof AbortException||ex instanceof InvalidPDFException||ex instanceof PasswordException||ex instanceof ResponseException||ex instanceof UnknownErrorException)return ex;switch(ex instanceof Error||typeof ex=="object"&&ex!==null||unreachable('wrapReason: Expected "reaso\
n" to be a (possibly cloned) Error.'),ex.name){case"AbortException":return new AbortException(ex.message);case"InvalidPDFException":return new InvalidPDFException(ex.message);case"PasswordException":return new PasswordException(ex.message,ex.code);case"ResponseException":return new ResponseException(ex.message,ex.status,ex.missing);case"UnknownErrorException":return new UnknownErrorException(ex.message,ex.details)}return new UnknownErrorException(ex.message,ex.toString())}class MessageHandler{#messageAC=new AbortController;constructor(sourceName,targetName,comObj){
this.sourceName=sourceName,this.targetName=targetName,this.comObj=comObj,this.callbackId=1,this.streamId=1,this.streamSinks=Object.create(null),this.streamControllers=Object.create(null),this.callbackCapabilities=Object.create(null),this.actionHandler=Object.create(null),comObj.addEventListener("message",this.#onMessage.bind(this),{signal:this.#messageAC.signal})}#onMessage({data}){if(data.targetName!==this.sourceName)return;if(data.stream){this.#processStreamMessage(data);return}if(data.callback){
const callbackId=data.callbackId,capability=this.callbackCapabilities[callbackId];if(!capability)throw new Error(`Cannot resolve callback ${callbackId}`);if(delete this.callbackCapabilities[callbackId],data.callback===CallbackKind.DATA)capability.resolve(data.data);else if(data.callback===CallbackKind.ERROR)capability.reject(wrapReason(data.reason));else throw new Error("Unexpected callback case");return}const action2=this.actionHandler[data.action];if(!action2)throw new Error(`Unknown action fr\
om worker: ${data.action}`);if(data.callbackId){const sourceName=this.sourceName,targetName=data.sourceName,comObj=this.comObj;Promise.try(action2,data.data).then(function(result){comObj.postMessage({sourceName,targetName,callback:CallbackKind.DATA,callbackId:data.callbackId,data:result})},function(reason){comObj.postMessage({sourceName,targetName,callback:CallbackKind.ERROR,callbackId:data.callbackId,reason:wrapReason(reason)})});return}if(data.streamId){this.#createStreamSink(data);return}action2(
data.data)}on(actionName,handler){const ah=this.actionHandler;if(ah[actionName])throw new Error(`There is already an actionName called "${actionName}"`);ah[actionName]=handler}send(actionName,data,transfers){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:actionName,data},transfers)}sendWithPromise(actionName,data,transfers){const callbackId=this.callbackId++,capability=Promise.withResolvers();this.callbackCapabilities[callbackId]=capability;try{this.comObj.
postMessage({sourceName:this.sourceName,targetName:this.targetName,action:actionName,callbackId,data},transfers)}catch(ex){capability.reject(ex)}return capability.promise}sendWithStream(actionName,data,queueingStrategy,transfers){const streamId=this.streamId++,sourceName=this.sourceName,targetName=this.targetName,comObj=this.comObj;return new ReadableStream({start:controller=>{const startCapability=Promise.withResolvers();return this.streamControllers[streamId]={controller,startCall:startCapability,
pullCall:null,cancelCall:null,isClosed:!1},comObj.postMessage({sourceName,targetName,action:actionName,streamId,data,desiredSize:controller.desiredSize},transfers),startCapability.promise},pull:controller=>{const pullCapability=Promise.withResolvers();return this.streamControllers[streamId].pullCall=pullCapability,comObj.postMessage({sourceName,targetName,stream:StreamKind.PULL,streamId,desiredSize:controller.desiredSize}),pullCapability.promise},cancel:reason=>{assert$1(reason instanceof Error,
"cancel must have a valid reason");const cancelCapability=Promise.withResolvers();return this.streamControllers[streamId].cancelCall=cancelCapability,this.streamControllers[streamId].isClosed=!0,comObj.postMessage({sourceName,targetName,stream:StreamKind.CANCEL,streamId,reason:wrapReason(reason)}),cancelCapability.promise}},queueingStrategy)}#createStreamSink(data){const streamId=data.streamId,sourceName=this.sourceName,targetName=data.sourceName,comObj=this.comObj,self2=this,action2=this.actionHandler[data.
action],streamSink={enqueue(chunk,size2=1,transfers){if(this.isCancelled)return;const lastDesiredSize=this.desiredSize;this.desiredSize-=size2,lastDesiredSize>0&&this.desiredSize<=0&&(this.sinkCapability=Promise.withResolvers(),this.ready=this.sinkCapability.promise),comObj.postMessage({sourceName,targetName,stream:StreamKind.ENQUEUE,streamId,chunk},transfers)},close(){this.isCancelled||(this.isCancelled=!0,comObj.postMessage({sourceName,targetName,stream:StreamKind.CLOSE,streamId}),delete self2.
streamSinks[streamId])},error(reason){assert$1(reason instanceof Error,"error must have a valid reason"),!this.isCancelled&&(this.isCancelled=!0,comObj.postMessage({sourceName,targetName,stream:StreamKind.ERROR,streamId,reason:wrapReason(reason)}))},sinkCapability:Promise.withResolvers(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:data.desiredSize,ready:null};streamSink.sinkCapability.resolve(),streamSink.ready=streamSink.sinkCapability.promise,this.streamSinks[streamId]=streamSink,Promise.
try(action2,data.data,streamSink).then(function(){comObj.postMessage({sourceName,targetName,stream:StreamKind.START_COMPLETE,streamId,success:!0})},function(reason){comObj.postMessage({sourceName,targetName,stream:StreamKind.START_COMPLETE,streamId,reason:wrapReason(reason)})})}#processStreamMessage(data){const streamId=data.streamId,sourceName=this.sourceName,targetName=data.sourceName,comObj=this.comObj,streamController=this.streamControllers[streamId],streamSink=this.streamSinks[streamId];switch(data.
stream){case StreamKind.START_COMPLETE:data.success?streamController.startCall.resolve():streamController.startCall.reject(wrapReason(data.reason));break;case StreamKind.PULL_COMPLETE:data.success?streamController.pullCall.resolve():streamController.pullCall.reject(wrapReason(data.reason));break;case StreamKind.PULL:if(!streamSink){comObj.postMessage({sourceName,targetName,stream:StreamKind.PULL_COMPLETE,streamId,success:!0});break}streamSink.desiredSize<=0&&data.desiredSize>0&&streamSink.sinkCapability.
resolve(),streamSink.desiredSize=data.desiredSize,Promise.try(streamSink.onPull||onFn).then(function(){comObj.postMessage({sourceName,targetName,stream:StreamKind.PULL_COMPLETE,streamId,success:!0})},function(reason){comObj.postMessage({sourceName,targetName,stream:StreamKind.PULL_COMPLETE,streamId,reason:wrapReason(reason)})});break;case StreamKind.ENQUEUE:if(assert$1(streamController,"enqueue should have stream controller"),streamController.isClosed)break;streamController.controller.enqueue(data.
chunk);break;case StreamKind.CLOSE:if(assert$1(streamController,"close should have stream controller"),streamController.isClosed)break;streamController.isClosed=!0,streamController.controller.close(),this.#deleteStreamController(streamController,streamId);break;case StreamKind.ERROR:assert$1(streamController,"error should have stream controller"),streamController.controller.error(wrapReason(data.reason)),this.#deleteStreamController(streamController,streamId);break;case StreamKind.CANCEL_COMPLETE:
data.success?streamController.cancelCall.resolve():streamController.cancelCall.reject(wrapReason(data.reason)),this.#deleteStreamController(streamController,streamId);break;case StreamKind.CANCEL:if(!streamSink)break;const dataReason=wrapReason(data.reason);Promise.try(streamSink.onCancel||onFn,dataReason).then(function(){comObj.postMessage({sourceName,targetName,stream:StreamKind.CANCEL_COMPLETE,streamId,success:!0})},function(reason){comObj.postMessage({sourceName,targetName,stream:StreamKind.
CANCEL_COMPLETE,streamId,reason:wrapReason(reason)})}),streamSink.sinkCapability.reject(dataReason),streamSink.isCancelled=!0,delete this.streamSinks[streamId];break;default:throw new Error("Unexpected stream case")}}async#deleteStreamController(streamController,streamId){await Promise.allSettled([streamController.startCall?.promise,streamController.pullCall?.promise,streamController.cancelCall?.promise]),delete this.streamControllers[streamId]}destroy(){this.#messageAC?.abort(),this.#messageAC=
null}}class BaseCanvasFactory{#enableHWA=!1;constructor({enableHWA=!1}){this.#enableHWA=enableHWA}create(width,height){if(width<=0||height<=0)throw new Error("Invalid canvas size");const canvas=this._createCanvas(width,height);return{canvas,context:canvas.getContext("2d",{willReadFrequently:!this.#enableHWA})}}reset(canvasAndContext,width,height){if(!canvasAndContext.canvas)throw new Error("Canvas is not specified");if(width<=0||height<=0)throw new Error("Invalid canvas size");canvasAndContext.canvas.
width=width,canvasAndContext.canvas.height=height}destroy(canvasAndContext){if(!canvasAndContext.canvas)throw new Error("Canvas is not specified");canvasAndContext.canvas.width=0,canvasAndContext.canvas.height=0,canvasAndContext.canvas=null,canvasAndContext.context=null}_createCanvas(width,height){unreachable("Abstract method `_createCanvas` called.")}}class DOMCanvasFactory extends BaseCanvasFactory{constructor({ownerDocument=globalThis.document,enableHWA=!1}){super({enableHWA}),this._document=
ownerDocument}_createCanvas(width,height){const canvas=this._document.createElement("canvas");return canvas.width=width,canvas.height=height,canvas}}class BaseCMapReaderFactory{constructor({baseUrl=null,isCompressed=!0}){this.baseUrl=baseUrl,this.isCompressed=isCompressed}async fetch({name}){if(!this.baseUrl)throw new Error("Ensure that the `cMapUrl` and `cMapPacked` API parameters are provided.");if(!name)throw new Error("CMap name must be specified.");const url2=this.baseUrl+name+(this.isCompressed?
".bcmap":"");return this._fetch(url2).then(cMapData=>({cMapData,isCompressed:this.isCompressed})).catch(reason=>{throw new Error(`Unable to load ${this.isCompressed?"binary ":""}CMap at: ${url2}`)})}async _fetch(url2){unreachable("Abstract method `_fetch` called.")}}class DOMCMapReaderFactory extends BaseCMapReaderFactory{async _fetch(url2){const data=await fetchData(url2,this.isCompressed?"arraybuffer":"text");return data instanceof ArrayBuffer?new Uint8Array(data):stringToBytes(data)}}class BaseFilterFactory{addFilter(maps){
return"none"}addHCMFilter(fgColor,bgColor){return"none"}addAlphaFilter(map2){return"none"}addLuminosityFilter(map2){return"none"}addHighlightHCMFilter(filterName,fgColor,bgColor,newFgColor,newBgColor){return"none"}destroy(keepHCM=!1){}}class DOMFilterFactory extends BaseFilterFactory{#baseUrl;#_cache;#_defs;#docId;#document;#_hcmCache;#id=0;constructor({docId,ownerDocument=globalThis.document}){super(),this.#docId=docId,this.#document=ownerDocument}get#cache(){return this.#_cache||=new Map}get#hcmCache(){
return this.#_hcmCache||=new Map}get#defs(){if(!this.#_defs){const div=this.#document.createElement("div"),{style:style2}=div;style2.visibility="hidden",style2.contain="strict",style2.width=style2.height=0,style2.position="absolute",style2.top=style2.left=0,style2.zIndex=-1;const svg2=this.#document.createElementNS(SVG_NS,"svg");svg2.setAttribute("width",0),svg2.setAttribute("height",0),this.#_defs=this.#document.createElementNS(SVG_NS,"defs"),div.append(svg2),svg2.append(this.#_defs),this.#document.
body.append(div)}return this.#_defs}#createTables(maps){if(maps.length===1){const mapR2=maps[0],buffer=new Array(256);for(let i=0;i<256;i++)buffer[i]=mapR2[i]/255;const table2=buffer.join(",");return[table2,table2,table2]}const[mapR,mapG,mapB]=maps,bufferR=new Array(256),bufferG=new Array(256),bufferB=new Array(256);for(let i=0;i<256;i++)bufferR[i]=mapR[i]/255,bufferG[i]=mapG[i]/255,bufferB[i]=mapB[i]/255;return[bufferR.join(","),bufferG.join(","),bufferB.join(",")]}#createUrl(id2){if(this.#baseUrl===
void 0){this.#baseUrl="";const url2=this.#document.URL;url2!==this.#document.baseURI&&(isDataScheme(url2)?warn('#createUrl: ignore "data:"-URL for performance reasons.'):this.#baseUrl=updateUrlHash(url2,""))}return`url(${this.#baseUrl}#${id2})`}addFilter(maps){if(!maps)return"none";let value=this.#cache.get(maps);if(value)return value;const[tableR,tableG,tableB]=this.#createTables(maps),key2=maps.length===1?tableR:`${tableR}${tableG}${tableB}`;if(value=this.#cache.get(key2),value)return this.#cache.
set(maps,value),value;const id2=`g_${this.#docId}_transfer_map_${this.#id++}`,url2=this.#createUrl(id2);this.#cache.set(maps,url2),this.#cache.set(key2,url2);const filter=this.#createFilter(id2);return this.#addTransferMapConversion(tableR,tableG,tableB,filter),url2}addHCMFilter(fgColor,bgColor){const key2=`${fgColor}-${bgColor}`,filterName="base";let info2=this.#hcmCache.get(filterName);if(info2?.key===key2||(info2?(info2.filter?.remove(),info2.key=key2,info2.url="none",info2.filter=null):(info2=
{key:key2,url:"none",filter:null},this.#hcmCache.set(filterName,info2)),!fgColor||!bgColor))return info2.url;const fgRGB=this.#getRGB(fgColor);fgColor=Util.makeHexColor(...fgRGB);const bgRGB=this.#getRGB(bgColor);if(bgColor=Util.makeHexColor(...bgRGB),this.#defs.style.color="",fgColor==="#000000"&&bgColor==="#ffffff"||fgColor===bgColor)return info2.url;const map2=new Array(256);for(let i=0;i<=255;i++){const x=i/255;map2[i]=x<=.03928?x/12.92:((x+.055)/1.055)**2.4}const table2=map2.join(","),id2=`\
g_${this.#docId}_hcm_filter`,filter=info2.filter=this.#createFilter(id2);this.#addTransferMapConversion(table2,table2,table2,filter),this.#addGrayConversion(filter);const getSteps=(c2,n)=>{const start2=fgRGB[c2]/255,end=bgRGB[c2]/255,arr=new Array(n+1);for(let i=0;i<=n;i++)arr[i]=start2+i/n*(end-start2);return arr.join(",")};return this.#addTransferMapConversion(getSteps(0,5),getSteps(1,5),getSteps(2,5),filter),info2.url=this.#createUrl(id2),info2.url}addAlphaFilter(map2){let value=this.#cache.get(
map2);if(value)return value;const[tableA]=this.#createTables([map2]),key2=`alpha_${tableA}`;if(value=this.#cache.get(key2),value)return this.#cache.set(map2,value),value;const id2=`g_${this.#docId}_alpha_map_${this.#id++}`,url2=this.#createUrl(id2);this.#cache.set(map2,url2),this.#cache.set(key2,url2);const filter=this.#createFilter(id2);return this.#addTransferMapAlphaConversion(tableA,filter),url2}addLuminosityFilter(map2){let value=this.#cache.get(map2||"luminosity");if(value)return value;let tableA,
key2;if(map2?([tableA]=this.#createTables([map2]),key2=`luminosity_${tableA}`):key2="luminosity",value=this.#cache.get(key2),value)return this.#cache.set(map2,value),value;const id2=`g_${this.#docId}_luminosity_map_${this.#id++}`,url2=this.#createUrl(id2);this.#cache.set(map2,url2),this.#cache.set(key2,url2);const filter=this.#createFilter(id2);return this.#addLuminosityConversion(filter),map2&&this.#addTransferMapAlphaConversion(tableA,filter),url2}addHighlightHCMFilter(filterName,fgColor,bgColor,newFgColor,newBgColor){
const key2=`${fgColor}-${bgColor}-${newFgColor}-${newBgColor}`;let info2=this.#hcmCache.get(filterName);if(info2?.key===key2||(info2?(info2.filter?.remove(),info2.key=key2,info2.url="none",info2.filter=null):(info2={key:key2,url:"none",filter:null},this.#hcmCache.set(filterName,info2)),!fgColor||!bgColor))return info2.url;const[fgRGB,bgRGB]=[fgColor,bgColor].map(this.#getRGB.bind(this));let fgGray=Math.round(.2126*fgRGB[0]+.7152*fgRGB[1]+.0722*fgRGB[2]),bgGray=Math.round(.2126*bgRGB[0]+.7152*bgRGB[1]+
.0722*bgRGB[2]),[newFgRGB,newBgRGB]=[newFgColor,newBgColor].map(this.#getRGB.bind(this));bgGray<fgGray&&([fgGray,bgGray,newFgRGB,newBgRGB]=[bgGray,fgGray,newBgRGB,newFgRGB]),this.#defs.style.color="";const getSteps=(fg,bg,n)=>{const arr=new Array(256),step=(bgGray-fgGray)/n,newStart=fg/255,newStep=(bg-fg)/(255*n);let prev2=0;for(let i=0;i<=n;i++){const k=Math.round(fgGray+i*step),value=newStart+i*newStep;for(let j=prev2;j<=k;j++)arr[j]=value;prev2=k+1}for(let i=prev2;i<256;i++)arr[i]=arr[prev2-1];
return arr.join(",")},id2=`g_${this.#docId}_hcm_${filterName}_filter`,filter=info2.filter=this.#createFilter(id2);return this.#addGrayConversion(filter),this.#addTransferMapConversion(getSteps(newFgRGB[0],newBgRGB[0],5),getSteps(newFgRGB[1],newBgRGB[1],5),getSteps(newFgRGB[2],newBgRGB[2],5),filter),info2.url=this.#createUrl(id2),info2.url}destroy(keepHCM=!1){keepHCM&&this.#_hcmCache?.size||(this.#_defs?.parentNode.parentNode.remove(),this.#_defs=null,this.#_cache?.clear(),this.#_cache=null,this.#_hcmCache?.
clear(),this.#_hcmCache=null,this.#id=0)}#addLuminosityConversion(filter){const feColorMatrix=this.#document.createElementNS(SVG_NS,"feColorMatrix");feColorMatrix.setAttribute("type","matrix"),feColorMatrix.setAttribute("values","0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3 0.59 0.11 0 0"),filter.append(feColorMatrix)}#addGrayConversion(filter){const feColorMatrix=this.#document.createElementNS(SVG_NS,"feColorMatrix");feColorMatrix.setAttribute("type","matrix"),feColorMatrix.setAttribute("values","0.2126 0\
.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0.2126 0.7152 0.0722 0 0 0 0 0 1 0"),filter.append(feColorMatrix)}#createFilter(id2){const filter=this.#document.createElementNS(SVG_NS,"filter");return filter.setAttribute("color-interpolation-filters","sRGB"),filter.setAttribute("id",id2),this.#defs.append(filter),filter}#appendFeFunc(feComponentTransfer,func,table2){const feFunc=this.#document.createElementNS(SVG_NS,func);feFunc.setAttribute("type","discrete"),feFunc.setAttribute("tableValues",table2),
feComponentTransfer.append(feFunc)}#addTransferMapConversion(rTable,gTable,bTable,filter){const feComponentTransfer=this.#document.createElementNS(SVG_NS,"feComponentTransfer");filter.append(feComponentTransfer),this.#appendFeFunc(feComponentTransfer,"feFuncR",rTable),this.#appendFeFunc(feComponentTransfer,"feFuncG",gTable),this.#appendFeFunc(feComponentTransfer,"feFuncB",bTable)}#addTransferMapAlphaConversion(aTable,filter){const feComponentTransfer=this.#document.createElementNS(SVG_NS,"feComp\
onentTransfer");filter.append(feComponentTransfer),this.#appendFeFunc(feComponentTransfer,"feFuncA",aTable)}#getRGB(color){return this.#defs.style.color=color,getRGB(getComputedStyle(this.#defs).getPropertyValue("color"))}}class BaseStandardFontDataFactory{constructor({baseUrl=null}){this.baseUrl=baseUrl}async fetch({filename}){if(!this.baseUrl)throw new Error("Ensure that the `standardFontDataUrl` API parameter is provided.");if(!filename)throw new Error("Font filename must be specified.");const url2=`${this.
baseUrl}${filename}`;return this._fetch(url2).catch(reason=>{throw new Error(`Unable to load font data at: ${url2}`)})}async _fetch(url2){unreachable("Abstract method `_fetch` called.")}}class DOMStandardFontDataFactory extends BaseStandardFontDataFactory{async _fetch(url2){const data=await fetchData(url2,"arraybuffer");return new Uint8Array(data)}}class BaseWasmFactory{constructor({baseUrl=null}){this.baseUrl=baseUrl}async fetch({filename}){if(!this.baseUrl)throw new Error("Ensure that the `was\
mUrl` API parameter is provided.");if(!filename)throw new Error("Wasm filename must be specified.");const url2=`${this.baseUrl}${filename}`;return this._fetch(url2).catch(reason=>{throw new Error(`Unable to load wasm data at: ${url2}`)})}async _fetch(url2){unreachable("Abstract method `_fetch` called.")}}class DOMWasmFactory extends BaseWasmFactory{async _fetch(url2){const data=await fetchData(url2,"arraybuffer");return new Uint8Array(data)}}isNodeJS&&warn("Please use the `legacy` build in Node.\
js environments.");async function node_utils_fetchData(url2){const data=await process.getBuiltinModule("fs").promises.readFile(url2);return new Uint8Array(data)}class NodeFilterFactory extends BaseFilterFactory{}class NodeCanvasFactory extends BaseCanvasFactory{_createCanvas(width,height){return process.getBuiltinModule("module").createRequire(import.meta.url)("@napi-rs/canvas").createCanvas(width,height)}}class NodeCMapReaderFactory extends BaseCMapReaderFactory{async _fetch(url2){return node_utils_fetchData(
url2)}}class NodeStandardFontDataFactory extends BaseStandardFontDataFactory{async _fetch(url2){return node_utils_fetchData(url2)}}class NodeWasmFactory extends BaseWasmFactory{async _fetch(url2){return node_utils_fetchData(url2)}}const PathType={FILL:"Fill",STROKE:"Stroke",SHADING:"Shading"};function applyBoundingBox(ctx,bbox){if(!bbox)return;const width=bbox[2]-bbox[0],height=bbox[3]-bbox[1],region=new Path2D;region.rect(bbox[0],bbox[1],width,height),ctx.clip(region)}class BaseShadingPattern{isModifyingCurrentTransform(){
return!1}getPattern(){unreachable("Abstract method `getPattern` called.")}}class RadialAxialShadingPattern extends BaseShadingPattern{constructor(IR){super(),this._type=IR[1],this._bbox=IR[2],this._colorStops=IR[3],this._p0=IR[4],this._p1=IR[5],this._r0=IR[6],this._r1=IR[7],this.matrix=null}_createGradient(ctx){let grad;this._type==="axial"?grad=ctx.createLinearGradient(this._p0[0],this._p0[1],this._p1[0],this._p1[1]):this._type==="radial"&&(grad=ctx.createRadialGradient(this._p0[0],this._p0[1],
this._r0,this._p1[0],this._p1[1],this._r1));for(const colorStop of this._colorStops)grad.addColorStop(colorStop[0],colorStop[1]);return grad}getPattern(ctx,owner,inverse,pathType){let pattern2;if(pathType===PathType.STROKE||pathType===PathType.FILL){const ownerBBox=owner.current.getClippedPathBoundingBox(pathType,getCurrentTransform(ctx))||[0,0,0,0],width=Math.ceil(ownerBBox[2]-ownerBBox[0])||1,height=Math.ceil(ownerBBox[3]-ownerBBox[1])||1,tmpCanvas=owner.cachedCanvases.getCanvas("pattern",width,
height),tmpCtx=tmpCanvas.context;tmpCtx.clearRect(0,0,tmpCtx.canvas.width,tmpCtx.canvas.height),tmpCtx.beginPath(),tmpCtx.rect(0,0,tmpCtx.canvas.width,tmpCtx.canvas.height),tmpCtx.translate(-ownerBBox[0],-ownerBBox[1]),inverse=Util.transform(inverse,[1,0,0,1,ownerBBox[0],ownerBBox[1]]),tmpCtx.transform(...owner.baseTransform),this.matrix&&tmpCtx.transform(...this.matrix),applyBoundingBox(tmpCtx,this._bbox),tmpCtx.fillStyle=this._createGradient(tmpCtx),tmpCtx.fill(),pattern2=ctx.createPattern(tmpCanvas.
canvas,"no-repeat");const domMatrix=new DOMMatrix(inverse);pattern2.setTransform(domMatrix)}else applyBoundingBox(ctx,this._bbox),pattern2=this._createGradient(ctx);return pattern2}}function drawTriangle(data,context,p1,p2,p3,c1,c2,c3){const coords=context.coords,colors=context.colors,bytes=data.data,rowSize=data.width*4;let tmp;coords[p1+1]>coords[p2+1]&&(tmp=p1,p1=p2,p2=tmp,tmp=c1,c1=c2,c2=tmp),coords[p2+1]>coords[p3+1]&&(tmp=p2,p2=p3,p3=tmp,tmp=c2,c2=c3,c3=tmp),coords[p1+1]>coords[p2+1]&&(tmp=
p1,p1=p2,p2=tmp,tmp=c1,c1=c2,c2=tmp);const x1=(coords[p1]+context.offsetX)*context.scaleX,y1=(coords[p1+1]+context.offsetY)*context.scaleY,x2=(coords[p2]+context.offsetX)*context.scaleX,y2=(coords[p2+1]+context.offsetY)*context.scaleY,x3=(coords[p3]+context.offsetX)*context.scaleX,y3=(coords[p3+1]+context.offsetY)*context.scaleY;if(y1>=y3)return;const c1r=colors[c1],c1g=colors[c1+1],c1b=colors[c1+2],c2r=colors[c2],c2g=colors[c2+1],c2b=colors[c2+2],c3r=colors[c3],c3g=colors[c3+1],c3b=colors[c3+2],
minY=Math.round(y1),maxY=Math.round(y3);let xa,car,cag,cab,xb,cbr,cbg,cbb;for(let y=minY;y<=maxY;y++){if(y<y2){const k2=y<y1?0:(y1-y)/(y1-y2);xa=x1-(x1-x2)*k2,car=c1r-(c1r-c2r)*k2,cag=c1g-(c1g-c2g)*k2,cab=c1b-(c1b-c2b)*k2}else{let k2;y>y3?k2=1:y2===y3?k2=0:k2=(y2-y)/(y2-y3),xa=x2-(x2-x3)*k2,car=c2r-(c2r-c3r)*k2,cag=c2g-(c2g-c3g)*k2,cab=c2b-(c2b-c3b)*k2}let k;y<y1?k=0:y>y3?k=1:k=(y1-y)/(y1-y3),xb=x1-(x1-x3)*k,cbr=c1r-(c1r-c3r)*k,cbg=c1g-(c1g-c3g)*k,cbb=c1b-(c1b-c3b)*k;const x1_=Math.round(Math.min(
xa,xb)),x2_=Math.round(Math.max(xa,xb));let j=rowSize*y+x1_*4;for(let x=x1_;x<=x2_;x++)k=(xa-x)/(xa-xb),k<0?k=0:k>1&&(k=1),bytes[j++]=car-(car-cbr)*k|0,bytes[j++]=cag-(cag-cbg)*k|0,bytes[j++]=cab-(cab-cbb)*k|0,bytes[j++]=255}}function drawFigure(data,figure,context){const ps=figure.coords,cs=figure.colors;let i,ii;switch(figure.type){case"lattice":const verticesPerRow=figure.verticesPerRow,rows=Math.floor(ps.length/verticesPerRow)-1,cols=verticesPerRow-1;for(i=0;i<rows;i++){let q2=i*verticesPerRow;
for(let j=0;j<cols;j++,q2++)drawTriangle(data,context,ps[q2],ps[q2+1],ps[q2+verticesPerRow],cs[q2],cs[q2+1],cs[q2+verticesPerRow]),drawTriangle(data,context,ps[q2+verticesPerRow+1],ps[q2+1],ps[q2+verticesPerRow],cs[q2+verticesPerRow+1],cs[q2+1],cs[q2+verticesPerRow])}break;case"triangles":for(i=0,ii=ps.length;i<ii;i+=3)drawTriangle(data,context,ps[i],ps[i+1],ps[i+2],cs[i],cs[i+1],cs[i+2]);break;default:throw new Error("illegal figure")}}class MeshShadingPattern extends BaseShadingPattern{constructor(IR){
super(),this._coords=IR[2],this._colors=IR[3],this._figures=IR[4],this._bounds=IR[5],this._bbox=IR[6],this._background=IR[7],this.matrix=null}_createMeshCanvas(combinedScale,backgroundColor,cachedCanvases){const offsetX=Math.floor(this._bounds[0]),offsetY=Math.floor(this._bounds[1]),boundsWidth=Math.ceil(this._bounds[2])-offsetX,boundsHeight=Math.ceil(this._bounds[3])-offsetY,width=Math.min(Math.ceil(Math.abs(boundsWidth*combinedScale[0]*1.1)),3e3),height=Math.min(Math.ceil(Math.abs(boundsHeight*
combinedScale[1]*1.1)),3e3),scaleX=boundsWidth/width,scaleY=boundsHeight/height,context={coords:this._coords,colors:this._colors,offsetX:-offsetX,offsetY:-offsetY,scaleX:1/scaleX,scaleY:1/scaleY},paddedWidth=width+4,paddedHeight=height+4,tmpCanvas=cachedCanvases.getCanvas("mesh",paddedWidth,paddedHeight),tmpCtx=tmpCanvas.context,data=tmpCtx.createImageData(width,height);if(backgroundColor){const bytes=data.data;for(let i=0,ii=bytes.length;i<ii;i+=4)bytes[i]=backgroundColor[0],bytes[i+1]=backgroundColor[1],
bytes[i+2]=backgroundColor[2],bytes[i+3]=255}for(const figure of this._figures)drawFigure(data,figure,context);return tmpCtx.putImageData(data,2,2),{canvas:tmpCanvas.canvas,offsetX:offsetX-2*scaleX,offsetY:offsetY-2*scaleY,scaleX,scaleY}}isModifyingCurrentTransform(){return!0}getPattern(ctx,owner,inverse,pathType){applyBoundingBox(ctx,this._bbox);const scale2=new Float32Array(2);if(pathType===PathType.SHADING)Util.singularValueDecompose2dScale(getCurrentTransform(ctx),scale2);else if(this.matrix){
Util.singularValueDecompose2dScale(this.matrix,scale2);const[matrixScaleX,matrixScaleY]=scale2;Util.singularValueDecompose2dScale(owner.baseTransform,scale2),scale2[0]*=matrixScaleX,scale2[1]*=matrixScaleY}else Util.singularValueDecompose2dScale(owner.baseTransform,scale2);const temporaryPatternCanvas=this._createMeshCanvas(scale2,pathType===PathType.SHADING?null:this._background,owner.cachedCanvases);return pathType!==PathType.SHADING&&(ctx.setTransform(...owner.baseTransform),this.matrix&&ctx.
transform(...this.matrix)),ctx.translate(temporaryPatternCanvas.offsetX,temporaryPatternCanvas.offsetY),ctx.scale(temporaryPatternCanvas.scaleX,temporaryPatternCanvas.scaleY),ctx.createPattern(temporaryPatternCanvas.canvas,"no-repeat")}}class DummyShadingPattern extends BaseShadingPattern{getPattern(){return"hotpink"}}function getShadingPattern(IR){switch(IR[0]){case"RadialAxial":return new RadialAxialShadingPattern(IR);case"Mesh":return new MeshShadingPattern(IR);case"Dummy":return new DummyShadingPattern}
throw new Error(`Unknown IR type: ${IR[0]}`)}const PaintType={COLORED:1,UNCOLORED:2};class TilingPattern{static MAX_PATTERN_SIZE=3e3;constructor(IR,ctx,canvasGraphicsFactory,baseTransform){this.color=IR[1],this.operatorList=IR[2],this.matrix=IR[3],this.bbox=IR[4],this.xstep=IR[5],this.ystep=IR[6],this.paintType=IR[7],this.tilingType=IR[8],this.ctx=ctx,this.canvasGraphicsFactory=canvasGraphicsFactory,this.baseTransform=baseTransform}createPatternCanvas(owner){const{bbox,operatorList,paintType,tilingType,
color,canvasGraphicsFactory}=this;let{xstep,ystep}=this;xstep=Math.abs(xstep),ystep=Math.abs(ystep),info("TilingType: "+tilingType);const x0=bbox[0],y0=bbox[1],x1=bbox[2],y1=bbox[3],width=x1-x0,height=y1-y0,scale2=new Float32Array(2);Util.singularValueDecompose2dScale(this.matrix,scale2);const[matrixScaleX,matrixScaleY]=scale2;Util.singularValueDecompose2dScale(this.baseTransform,scale2);const combinedScaleX=matrixScaleX*scale2[0],combinedScaleY=matrixScaleY*scale2[1];let canvasWidth=width,canvasHeight=height,
redrawHorizontally=!1,redrawVertically=!1;const xScaledStep=Math.ceil(xstep*combinedScaleX),yScaledStep=Math.ceil(ystep*combinedScaleY),xScaledWidth=Math.ceil(width*combinedScaleX),yScaledHeight=Math.ceil(height*combinedScaleY);xScaledStep>=xScaledWidth?canvasWidth=xstep:redrawHorizontally=!0,yScaledStep>=yScaledHeight?canvasHeight=ystep:redrawVertically=!0;const dimx=this.getSizeAndScale(canvasWidth,this.ctx.canvas.width,combinedScaleX),dimy=this.getSizeAndScale(canvasHeight,this.ctx.canvas.height,
combinedScaleY),tmpCanvas=owner.cachedCanvases.getCanvas("pattern",dimx.size,dimy.size),tmpCtx=tmpCanvas.context,graphics=canvasGraphicsFactory.createCanvasGraphics(tmpCtx);if(graphics.groupLevel=owner.groupLevel,this.setFillAndStrokeStyleToContext(graphics,paintType,color),tmpCtx.translate(-dimx.scale*x0,-dimy.scale*y0),graphics.transform(dimx.scale,0,0,dimy.scale,0,0),tmpCtx.save(),this.clipBbox(graphics,x0,y0,x1,y1),graphics.baseTransform=getCurrentTransform(graphics.ctx),graphics.executeOperatorList(
operatorList),graphics.endDrawing(),tmpCtx.restore(),redrawHorizontally||redrawVertically){const image2=tmpCanvas.canvas;redrawHorizontally&&(canvasWidth=xstep),redrawVertically&&(canvasHeight=ystep);const dimx2=this.getSizeAndScale(canvasWidth,this.ctx.canvas.width,combinedScaleX),dimy2=this.getSizeAndScale(canvasHeight,this.ctx.canvas.height,combinedScaleY),xSize=dimx2.size,ySize=dimy2.size,tmpCanvas2=owner.cachedCanvases.getCanvas("pattern-workaround",xSize,ySize),tmpCtx2=tmpCanvas2.context,ii=redrawHorizontally?
Math.floor(width/xstep):0,jj=redrawVertically?Math.floor(height/ystep):0;for(let i=0;i<=ii;i++)for(let j=0;j<=jj;j++)tmpCtx2.drawImage(image2,xSize*i,ySize*j,xSize,ySize,0,0,xSize,ySize);return{canvas:tmpCanvas2.canvas,scaleX:dimx2.scale,scaleY:dimy2.scale,offsetX:x0,offsetY:y0}}return{canvas:tmpCanvas.canvas,scaleX:dimx.scale,scaleY:dimy.scale,offsetX:x0,offsetY:y0}}getSizeAndScale(step,realOutputSize,scale2){const maxSize=Math.max(TilingPattern.MAX_PATTERN_SIZE,realOutputSize);let size2=Math.ceil(
step*scale2);return size2>=maxSize?size2=maxSize:scale2=size2/step,{scale:scale2,size:size2}}clipBbox(graphics,x0,y0,x1,y1){const bboxWidth=x1-x0,bboxHeight=y1-y0;graphics.ctx.rect(x0,y0,bboxWidth,bboxHeight),Util.axialAlignedBoundingBox([x0,y0,x1,y1],getCurrentTransform(graphics.ctx),graphics.current.minMax),graphics.clip(),graphics.endPath()}setFillAndStrokeStyleToContext(graphics,paintType,color){const context=graphics.ctx,current2=graphics.current;switch(paintType){case PaintType.COLORED:const{
fillStyle,strokeStyle}=this.ctx;context.fillStyle=current2.fillColor=fillStyle,context.strokeStyle=current2.strokeColor=strokeStyle;break;case PaintType.UNCOLORED:context.fillStyle=context.strokeStyle=color,current2.fillColor=current2.strokeColor=color;break;default:throw new FormatError(`Unsupported paint type: ${paintType}`)}}isModifyingCurrentTransform(){return!1}getPattern(ctx,owner,inverse,pathType){let matrix=inverse;pathType!==PathType.SHADING&&(matrix=Util.transform(matrix,owner.baseTransform),
this.matrix&&(matrix=Util.transform(matrix,this.matrix)));const temporaryPatternCanvas=this.createPatternCanvas(owner);let domMatrix=new DOMMatrix(matrix);domMatrix=domMatrix.translate(temporaryPatternCanvas.offsetX,temporaryPatternCanvas.offsetY),domMatrix=domMatrix.scale(1/temporaryPatternCanvas.scaleX,1/temporaryPatternCanvas.scaleY);const pattern2=ctx.createPattern(temporaryPatternCanvas.canvas,"repeat");return pattern2.setTransform(domMatrix),pattern2}}function convertBlackAndWhiteToRGBA({src,
srcPos=0,dest,width,height,nonBlackColor=4294967295,inverseDecode=!1}){const black=util_FeatureTest.isLittleEndian?4278190080:255,[zeroMapping,oneMapping]=inverseDecode?[nonBlackColor,black]:[black,nonBlackColor],widthInSource=width>>3,widthRemainder=width&7,srcLength=src.length;dest=new Uint32Array(dest.buffer);let destPos=0;for(let i=0;i<height;i++){for(const max2=srcPos+widthInSource;srcPos<max2;srcPos++){const elem2=srcPos<srcLength?src[srcPos]:255;dest[destPos++]=elem2&128?oneMapping:zeroMapping,
dest[destPos++]=elem2&64?oneMapping:zeroMapping,dest[destPos++]=elem2&32?oneMapping:zeroMapping,dest[destPos++]=elem2&16?oneMapping:zeroMapping,dest[destPos++]=elem2&8?oneMapping:zeroMapping,dest[destPos++]=elem2&4?oneMapping:zeroMapping,dest[destPos++]=elem2&2?oneMapping:zeroMapping,dest[destPos++]=elem2&1?oneMapping:zeroMapping}if(widthRemainder===0)continue;const elem=srcPos<srcLength?src[srcPos++]:255;for(let j=0;j<widthRemainder;j++)dest[destPos++]=elem&1<<7-j?oneMapping:zeroMapping}return{
srcPos,destPos}}const MIN_FONT_SIZE=16,MAX_FONT_SIZE=100,EXECUTION_TIME=15,EXECUTION_STEPS=10,FULL_CHUNK_HEIGHT=16,SCALE_MATRIX=new DOMMatrix,XY=new Float32Array(2),MIN_MAX_INIT=new Float32Array([1/0,1/0,-1/0,-1/0]);function mirrorContextOperations(ctx,destCtx){if(ctx._removeMirroring)throw new Error("Context is already forwarding operations.");ctx.__originalSave=ctx.save,ctx.__originalRestore=ctx.restore,ctx.__originalRotate=ctx.rotate,ctx.__originalScale=ctx.scale,ctx.__originalTranslate=ctx.translate,
ctx.__originalTransform=ctx.transform,ctx.__originalSetTransform=ctx.setTransform,ctx.__originalResetTransform=ctx.resetTransform,ctx.__originalClip=ctx.clip,ctx.__originalMoveTo=ctx.moveTo,ctx.__originalLineTo=ctx.lineTo,ctx.__originalBezierCurveTo=ctx.bezierCurveTo,ctx.__originalRect=ctx.rect,ctx.__originalClosePath=ctx.closePath,ctx.__originalBeginPath=ctx.beginPath,ctx._removeMirroring=()=>{ctx.save=ctx.__originalSave,ctx.restore=ctx.__originalRestore,ctx.rotate=ctx.__originalRotate,ctx.scale=
ctx.__originalScale,ctx.translate=ctx.__originalTranslate,ctx.transform=ctx.__originalTransform,ctx.setTransform=ctx.__originalSetTransform,ctx.resetTransform=ctx.__originalResetTransform,ctx.clip=ctx.__originalClip,ctx.moveTo=ctx.__originalMoveTo,ctx.lineTo=ctx.__originalLineTo,ctx.bezierCurveTo=ctx.__originalBezierCurveTo,ctx.rect=ctx.__originalRect,ctx.closePath=ctx.__originalClosePath,ctx.beginPath=ctx.__originalBeginPath,delete ctx._removeMirroring},ctx.save=function(){destCtx.save(),this.__originalSave()},
ctx.restore=function(){destCtx.restore(),this.__originalRestore()},ctx.translate=function(x,y){destCtx.translate(x,y),this.__originalTranslate(x,y)},ctx.scale=function(x,y){destCtx.scale(x,y),this.__originalScale(x,y)},ctx.transform=function(a,b,c2,d2,e,f){destCtx.transform(a,b,c2,d2,e,f),this.__originalTransform(a,b,c2,d2,e,f)},ctx.setTransform=function(a,b,c2,d2,e,f){destCtx.setTransform(a,b,c2,d2,e,f),this.__originalSetTransform(a,b,c2,d2,e,f)},ctx.resetTransform=function(){destCtx.resetTransform(),
this.__originalResetTransform()},ctx.rotate=function(angle){destCtx.rotate(angle),this.__originalRotate(angle)},ctx.clip=function(rule){destCtx.clip(rule),this.__originalClip(rule)},ctx.moveTo=function(x,y){destCtx.moveTo(x,y),this.__originalMoveTo(x,y)},ctx.lineTo=function(x,y){destCtx.lineTo(x,y),this.__originalLineTo(x,y)},ctx.bezierCurveTo=function(cp1x,cp1y,cp2x,cp2y,x,y){destCtx.bezierCurveTo(cp1x,cp1y,cp2x,cp2y,x,y),this.__originalBezierCurveTo(cp1x,cp1y,cp2x,cp2y,x,y)},ctx.rect=function(x,y,width,height){
destCtx.rect(x,y,width,height),this.__originalRect(x,y,width,height)},ctx.closePath=function(){destCtx.closePath(),this.__originalClosePath()},ctx.beginPath=function(){destCtx.beginPath(),this.__originalBeginPath()}}class CachedCanvases{constructor(canvasFactory){this.canvasFactory=canvasFactory,this.cache=Object.create(null)}getCanvas(id2,width,height){let canvasEntry;return this.cache[id2]!==void 0?(canvasEntry=this.cache[id2],this.canvasFactory.reset(canvasEntry,width,height)):(canvasEntry=this.
canvasFactory.create(width,height),this.cache[id2]=canvasEntry),canvasEntry}delete(id2){delete this.cache[id2]}clear(){for(const id2 in this.cache){const canvasEntry=this.cache[id2];this.canvasFactory.destroy(canvasEntry),delete this.cache[id2]}}}function drawImageAtIntegerCoords(ctx,srcImg,srcX,srcY,srcW,srcH,destX,destY,destW,destH){const[a,b,c2,d2,tx,ty]=getCurrentTransform(ctx);if(b===0&&c2===0){const tlX=destX*a+tx,rTlX=Math.round(tlX),tlY=destY*d2+ty,rTlY=Math.round(tlY),brX=(destX+destW)*
a+tx,rWidth=Math.abs(Math.round(brX)-rTlX)||1,brY=(destY+destH)*d2+ty,rHeight=Math.abs(Math.round(brY)-rTlY)||1;return ctx.setTransform(Math.sign(a),0,0,Math.sign(d2),rTlX,rTlY),ctx.drawImage(srcImg,srcX,srcY,srcW,srcH,0,0,rWidth,rHeight),ctx.setTransform(a,b,c2,d2,tx,ty),[rWidth,rHeight]}if(a===0&&d2===0){const tlX=destY*c2+tx,rTlX=Math.round(tlX),tlY=destX*b+ty,rTlY=Math.round(tlY),brX=(destY+destH)*c2+tx,rWidth=Math.abs(Math.round(brX)-rTlX)||1,brY=(destX+destW)*b+ty,rHeight=Math.abs(Math.round(
brY)-rTlY)||1;return ctx.setTransform(0,Math.sign(b),Math.sign(c2),0,rTlX,rTlY),ctx.drawImage(srcImg,srcX,srcY,srcW,srcH,0,0,rHeight,rWidth),ctx.setTransform(a,b,c2,d2,tx,ty),[rHeight,rWidth]}ctx.drawImage(srcImg,srcX,srcY,srcW,srcH,destX,destY,destW,destH);const scaleX=Math.hypot(a,b),scaleY=Math.hypot(c2,d2);return[scaleX*destW,scaleY*destH]}class CanvasExtraState{alphaIsShape=!1;fontSize=0;fontSizeScale=1;textMatrix=null;textMatrixScale=1;fontMatrix=FONT_IDENTITY_MATRIX;leading=0;x=0;y=0;lineX=0;lineY=0;charSpacing=0;wordSpacing=0;textHScale=1;textRenderingMode=TextRenderingMode.
FILL;textRise=0;fillColor="#000000";strokeColor="#000000";patternFill=!1;patternStroke=!1;fillAlpha=1;strokeAlpha=1;lineWidth=1;activeSMask=null;transferMaps="none";constructor(width,height){this.clipBox=new Float32Array([0,0,width,height]),this.minMax=MIN_MAX_INIT.slice()}clone(){const clone2=Object.create(this);return clone2.clipBox=this.clipBox.slice(),clone2.minMax=this.minMax.slice(),clone2}getPathBoundingBox(pathType=PathType.FILL,transform2=null){const box2=this.minMax.slice();if(pathType===
PathType.STROKE){transform2||unreachable("Stroke bounding box must include transform."),Util.singularValueDecompose2dScale(transform2,XY);const xStrokePad=XY[0]*this.lineWidth/2,yStrokePad=XY[1]*this.lineWidth/2;box2[0]-=xStrokePad,box2[1]-=yStrokePad,box2[2]+=xStrokePad,box2[3]+=yStrokePad}return box2}updateClipFromPath(){const intersect=Util.intersect(this.clipBox,this.getPathBoundingBox());this.startNewPathAndClipBox(intersect||[0,0,0,0])}isEmptyClip(){return this.minMax[0]===1/0}startNewPathAndClipBox(box2){
this.clipBox.set(box2,0),this.minMax.set(MIN_MAX_INIT,0)}getClippedPathBoundingBox(pathType=PathType.FILL,transform2=null){return Util.intersect(this.clipBox,this.getPathBoundingBox(pathType,transform2))}}function putBinaryImageData(ctx,imgData){if(imgData instanceof ImageData){ctx.putImageData(imgData,0,0);return}const height=imgData.height,width=imgData.width,partialChunkHeight=height%FULL_CHUNK_HEIGHT,fullChunks=(height-partialChunkHeight)/FULL_CHUNK_HEIGHT,totalChunks=partialChunkHeight===0?
fullChunks:fullChunks+1,chunkImgData=ctx.createImageData(width,FULL_CHUNK_HEIGHT);let srcPos=0,destPos;const src=imgData.data,dest=chunkImgData.data;let i,j,thisChunkHeight,elemsInThisChunk;if(imgData.kind===util_ImageKind.GRAYSCALE_1BPP){const srcLength=src.byteLength,dest32=new Uint32Array(dest.buffer,0,dest.byteLength>>2),dest32DataLength=dest32.length,fullSrcDiff=width+7>>3,white=4294967295,black=util_FeatureTest.isLittleEndian?4278190080:255;for(i=0;i<totalChunks;i++){for(thisChunkHeight=i<
fullChunks?FULL_CHUNK_HEIGHT:partialChunkHeight,destPos=0,j=0;j<thisChunkHeight;j++){const srcDiff=srcLength-srcPos;let k=0;const kEnd=srcDiff>fullSrcDiff?width:srcDiff*8-7,kEndUnrolled=kEnd&-8;let mask=0,srcByte=0;for(;k<kEndUnrolled;k+=8)srcByte=src[srcPos++],dest32[destPos++]=srcByte&128?white:black,dest32[destPos++]=srcByte&64?white:black,dest32[destPos++]=srcByte&32?white:black,dest32[destPos++]=srcByte&16?white:black,dest32[destPos++]=srcByte&8?white:black,dest32[destPos++]=srcByte&4?white:
black,dest32[destPos++]=srcByte&2?white:black,dest32[destPos++]=srcByte&1?white:black;for(;k<kEnd;k++)mask===0&&(srcByte=src[srcPos++],mask=128),dest32[destPos++]=srcByte&mask?white:black,mask>>=1}for(;destPos<dest32DataLength;)dest32[destPos++]=0;ctx.putImageData(chunkImgData,0,i*FULL_CHUNK_HEIGHT)}}else if(imgData.kind===util_ImageKind.RGBA_32BPP){for(j=0,elemsInThisChunk=width*FULL_CHUNK_HEIGHT*4,i=0;i<fullChunks;i++)dest.set(src.subarray(srcPos,srcPos+elemsInThisChunk)),srcPos+=elemsInThisChunk,
ctx.putImageData(chunkImgData,0,j),j+=FULL_CHUNK_HEIGHT;i<totalChunks&&(elemsInThisChunk=width*partialChunkHeight*4,dest.set(src.subarray(srcPos,srcPos+elemsInThisChunk)),ctx.putImageData(chunkImgData,0,j))}else if(imgData.kind===util_ImageKind.RGB_24BPP)for(thisChunkHeight=FULL_CHUNK_HEIGHT,elemsInThisChunk=width*thisChunkHeight,i=0;i<totalChunks;i++){for(i>=fullChunks&&(thisChunkHeight=partialChunkHeight,elemsInThisChunk=width*thisChunkHeight),destPos=0,j=elemsInThisChunk;j--;)dest[destPos++]=
src[srcPos++],dest[destPos++]=src[srcPos++],dest[destPos++]=src[srcPos++],dest[destPos++]=255;ctx.putImageData(chunkImgData,0,i*FULL_CHUNK_HEIGHT)}else throw new Error(`bad image kind: ${imgData.kind}`)}function putBinaryImageMask(ctx,imgData){if(imgData.bitmap){ctx.drawImage(imgData.bitmap,0,0);return}const height=imgData.height,width=imgData.width,partialChunkHeight=height%FULL_CHUNK_HEIGHT,fullChunks=(height-partialChunkHeight)/FULL_CHUNK_HEIGHT,totalChunks=partialChunkHeight===0?fullChunks:fullChunks+
1,chunkImgData=ctx.createImageData(width,FULL_CHUNK_HEIGHT);let srcPos=0;const src=imgData.data,dest=chunkImgData.data;for(let i=0;i<totalChunks;i++){const thisChunkHeight=i<fullChunks?FULL_CHUNK_HEIGHT:partialChunkHeight;({srcPos}=convertBlackAndWhiteToRGBA({src,srcPos,dest,width,height:thisChunkHeight,nonBlackColor:0})),ctx.putImageData(chunkImgData,0,i*FULL_CHUNK_HEIGHT)}}function copyCtxState(sourceCtx,destCtx){const properties2=["strokeStyle","fillStyle","fillRule","globalAlpha","lineWidth",
"lineCap","lineJoin","miterLimit","globalCompositeOperation","font","filter"];for(const property of properties2)sourceCtx[property]!==void 0&&(destCtx[property]=sourceCtx[property]);sourceCtx.setLineDash!==void 0&&(destCtx.setLineDash(sourceCtx.getLineDash()),destCtx.lineDashOffset=sourceCtx.lineDashOffset)}function resetCtxToDefault(ctx){ctx.strokeStyle=ctx.fillStyle="#000000",ctx.fillRule="nonzero",ctx.globalAlpha=1,ctx.lineWidth=1,ctx.lineCap="butt",ctx.lineJoin="miter",ctx.miterLimit=10,ctx.
globalCompositeOperation="source-over",ctx.font="10px sans-serif",ctx.setLineDash!==void 0&&(ctx.setLineDash([]),ctx.lineDashOffset=0);const{filter}=ctx;filter!=="none"&&filter!==""&&(ctx.filter="none")}function getImageSmoothingEnabled(transform2,interpolate){if(interpolate)return!0;Util.singularValueDecompose2dScale(transform2,XY);const actualScale=Math.fround(OutputScale.pixelRatio*PixelsPerInch.PDF_TO_CSS_UNITS);return XY[0]<=actualScale&&XY[1]<=actualScale}const LINE_CAP_STYLES=["butt","rou\
nd","square"],LINE_JOIN_STYLES=["miter","round","bevel"],NORMAL_CLIP={},EO_CLIP={};class CanvasGraphics{constructor(canvasCtx,commonObjs,objs,canvasFactory,filterFactory,{optionalContentConfig,markedContentStack=null},annotationCanvasMap,pageColors){this.ctx=canvasCtx,this.current=new CanvasExtraState(this.ctx.canvas.width,this.ctx.canvas.height),this.stateStack=[],this.pendingClip=null,this.pendingEOFill=!1,this.res=null,this.xobjs=null,this.commonObjs=commonObjs,this.objs=objs,this.canvasFactory=
canvasFactory,this.filterFactory=filterFactory,this.groupStack=[],this.baseTransform=null,this.baseTransformStack=[],this.groupLevel=0,this.smaskStack=[],this.smaskCounter=0,this.tempSMask=null,this.suspendedCtx=null,this.contentVisible=!0,this.markedContentStack=markedContentStack||[],this.optionalContentConfig=optionalContentConfig,this.cachedCanvases=new CachedCanvases(this.canvasFactory),this.cachedPatterns=new Map,this.annotationCanvasMap=annotationCanvasMap,this.viewportScale=1,this.outputScaleX=
1,this.outputScaleY=1,this.pageColors=pageColors,this._cachedScaleForStroking=[-1,0],this._cachedGetSinglePixelWidth=null,this._cachedBitmapsMap=new Map}getObject(data,fallback2=null){return typeof data=="string"?data.startsWith("g_")?this.commonObjs.get(data):this.objs.get(data):fallback2}beginDrawing({transform:transform2,viewport,transparency=!1,background=null}){const width=this.ctx.canvas.width,height=this.ctx.canvas.height,savedFillStyle=this.ctx.fillStyle;if(this.ctx.fillStyle=background||
"#ffffff",this.ctx.fillRect(0,0,width,height),this.ctx.fillStyle=savedFillStyle,transparency){const transparentCanvas=this.cachedCanvases.getCanvas("transparent",width,height);this.compositeCtx=this.ctx,this.transparentCanvas=transparentCanvas.canvas,this.ctx=transparentCanvas.context,this.ctx.save(),this.ctx.transform(...getCurrentTransform(this.compositeCtx))}this.ctx.save(),resetCtxToDefault(this.ctx),transform2&&(this.ctx.transform(...transform2),this.outputScaleX=transform2[0],this.outputScaleY=
transform2[0]),this.ctx.transform(...viewport.transform),this.viewportScale=viewport.scale,this.baseTransform=getCurrentTransform(this.ctx)}executeOperatorList(operatorList,executionStartIdx,continueCallback,stepper){const argsArray=operatorList.argsArray,fnArray=operatorList.fnArray;let i=executionStartIdx||0;const argsArrayLen=argsArray.length;if(argsArrayLen===i)return i;const chunkOperations=argsArrayLen-i>EXECUTION_STEPS&&typeof continueCallback=="function",endTime=chunkOperations?Date.now()+
EXECUTION_TIME:0;let steps=0;const commonObjs=this.commonObjs,objs=this.objs;let fnId;for(;;){if(stepper!==void 0&&i===stepper.nextBreakPoint)return stepper.breakIt(i,continueCallback),i;if(fnId=fnArray[i],fnId!==OPS.dependency)this[fnId].apply(this,argsArray[i]);else for(const depObjId of argsArray[i]){const objsPool=depObjId.startsWith("g_")?commonObjs:objs;if(!objsPool.has(depObjId))return objsPool.get(depObjId,continueCallback),i}if(i++,i===argsArrayLen)return i;if(chunkOperations&&++steps>EXECUTION_STEPS){
if(Date.now()>endTime)return continueCallback(),i;steps=0}}}#restoreInitialState(){for(;this.stateStack.length||this.inSMaskMode;)this.restore();this.current.activeSMask=null,this.ctx.restore(),this.transparentCanvas&&(this.ctx=this.compositeCtx,this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.drawImage(this.transparentCanvas,0,0),this.ctx.restore(),this.transparentCanvas=null)}endDrawing(){this.#restoreInitialState(),this.cachedCanvases.clear(),this.cachedPatterns.clear();for(const cache2 of this.
_cachedBitmapsMap.values()){for(const canvas of cache2.values())typeof HTMLCanvasElement<"u"&&canvas instanceof HTMLCanvasElement&&(canvas.width=canvas.height=0);cache2.clear()}this._cachedBitmapsMap.clear(),this.#drawFilter()}#drawFilter(){if(this.pageColors){const hcmFilterId=this.filterFactory.addHCMFilter(this.pageColors.foreground,this.pageColors.background);if(hcmFilterId!=="none"){const savedFilter=this.ctx.filter;this.ctx.filter=hcmFilterId,this.ctx.drawImage(this.ctx.canvas,0,0),this.ctx.
filter=savedFilter}}}_scaleImage(img,inverseTransform){const width=img.width??img.displayWidth,height=img.height??img.displayHeight;let widthScale=Math.max(Math.hypot(inverseTransform[0],inverseTransform[1]),1),heightScale=Math.max(Math.hypot(inverseTransform[2],inverseTransform[3]),1),paintWidth=width,paintHeight=height,tmpCanvasId="prescale1",tmpCanvas,tmpCtx;for(;widthScale>2&&paintWidth>1||heightScale>2&&paintHeight>1;){let newWidth=paintWidth,newHeight=paintHeight;widthScale>2&&paintWidth>1&&
(newWidth=paintWidth>=16384?Math.floor(paintWidth/2)-1||1:Math.ceil(paintWidth/2),widthScale/=paintWidth/newWidth),heightScale>2&&paintHeight>1&&(newHeight=paintHeight>=16384?Math.floor(paintHeight/2)-1||1:Math.ceil(paintHeight)/2,heightScale/=paintHeight/newHeight),tmpCanvas=this.cachedCanvases.getCanvas(tmpCanvasId,newWidth,newHeight),tmpCtx=tmpCanvas.context,tmpCtx.clearRect(0,0,newWidth,newHeight),tmpCtx.drawImage(img,0,0,paintWidth,paintHeight,0,0,newWidth,newHeight),img=tmpCanvas.canvas,paintWidth=
newWidth,paintHeight=newHeight,tmpCanvasId=tmpCanvasId==="prescale1"?"prescale2":"prescale1"}return{img,paintWidth,paintHeight}}_createMaskCanvas(img){const ctx=this.ctx,{width,height}=img,fillColor=this.current.fillColor,isPatternFill=this.current.patternFill,currentTransform=getCurrentTransform(ctx);let cache2,cacheKey,scaled,maskCanvas;if((img.bitmap||img.data)&&img.count>1){const mainKey=img.bitmap||img.data.buffer;cacheKey=JSON.stringify(isPatternFill?currentTransform:[currentTransform.slice(
0,4),fillColor]),cache2=this._cachedBitmapsMap.get(mainKey),cache2||(cache2=new Map,this._cachedBitmapsMap.set(mainKey,cache2));const cachedImage=cache2.get(cacheKey);if(cachedImage&&!isPatternFill){const offsetX2=Math.round(Math.min(currentTransform[0],currentTransform[2])+currentTransform[4]),offsetY2=Math.round(Math.min(currentTransform[1],currentTransform[3])+currentTransform[5]);return{canvas:cachedImage,offsetX:offsetX2,offsetY:offsetY2}}scaled=cachedImage}scaled||(maskCanvas=this.cachedCanvases.
getCanvas("maskCanvas",width,height),putBinaryImageMask(maskCanvas.context,img));let maskToCanvas=Util.transform(currentTransform,[1/width,0,0,-1/height,0,0]);maskToCanvas=Util.transform(maskToCanvas,[1,0,0,1,0,-height]);const minMax=MIN_MAX_INIT.slice();Util.axialAlignedBoundingBox([0,0,width,height],maskToCanvas,minMax);const[minX,minY,maxX,maxY]=minMax,drawnWidth=Math.round(maxX-minX)||1,drawnHeight=Math.round(maxY-minY)||1,fillCanvas=this.cachedCanvases.getCanvas("fillCanvas",drawnWidth,drawnHeight),
fillCtx=fillCanvas.context,offsetX=minX,offsetY=minY;fillCtx.translate(-offsetX,-offsetY),fillCtx.transform(...maskToCanvas),scaled||(scaled=this._scaleImage(maskCanvas.canvas,getCurrentTransformInverse(fillCtx)),scaled=scaled.img,cache2&&isPatternFill&&cache2.set(cacheKey,scaled)),fillCtx.imageSmoothingEnabled=getImageSmoothingEnabled(getCurrentTransform(fillCtx),img.interpolate),drawImageAtIntegerCoords(fillCtx,scaled,0,0,scaled.width,scaled.height,0,0,width,height),fillCtx.globalCompositeOperation=
"source-in";const inverse=Util.transform(getCurrentTransformInverse(fillCtx),[1,0,0,1,-offsetX,-offsetY]);return fillCtx.fillStyle=isPatternFill?fillColor.getPattern(ctx,this,inverse,PathType.FILL):fillColor,fillCtx.fillRect(0,0,width,height),cache2&&!isPatternFill&&(this.cachedCanvases.delete("fillCanvas"),cache2.set(cacheKey,fillCanvas.canvas)),{canvas:fillCanvas.canvas,offsetX:Math.round(offsetX),offsetY:Math.round(offsetY)}}setLineWidth(width){width!==this.current.lineWidth&&(this._cachedScaleForStroking[0]=
-1),this.current.lineWidth=width,this.ctx.lineWidth=width}setLineCap(style2){this.ctx.lineCap=LINE_CAP_STYLES[style2]}setLineJoin(style2){this.ctx.lineJoin=LINE_JOIN_STYLES[style2]}setMiterLimit(limit2){this.ctx.miterLimit=limit2}setDash(dashArray,dashPhase){const ctx=this.ctx;ctx.setLineDash!==void 0&&(ctx.setLineDash(dashArray),ctx.lineDashOffset=dashPhase)}setRenderingIntent(intent){}setFlatness(flatness){}setGState(states){for(const[key2,value]of states)switch(key2){case"LW":this.setLineWidth(
value);break;case"LC":this.setLineCap(value);break;case"LJ":this.setLineJoin(value);break;case"ML":this.setMiterLimit(value);break;case"D":this.setDash(value[0],value[1]);break;case"RI":this.setRenderingIntent(value);break;case"FL":this.setFlatness(value);break;case"Font":this.setFont(value[0],value[1]);break;case"CA":this.current.strokeAlpha=value;break;case"ca":this.ctx.globalAlpha=this.current.fillAlpha=value;break;case"BM":this.ctx.globalCompositeOperation=value;break;case"SMask":this.current.
activeSMask=value?this.tempSMask:null,this.tempSMask=null,this.checkSMaskState();break;case"TR":this.ctx.filter=this.current.transferMaps=this.filterFactory.addFilter(value);break}}get inSMaskMode(){return!!this.suspendedCtx}checkSMaskState(){const inSMaskMode=this.inSMaskMode;this.current.activeSMask&&!inSMaskMode?this.beginSMaskMode():!this.current.activeSMask&&inSMaskMode&&this.endSMaskMode()}beginSMaskMode(){if(this.inSMaskMode)throw new Error("beginSMaskMode called while already in smask mo\
de");const drawnWidth=this.ctx.canvas.width,drawnHeight=this.ctx.canvas.height,cacheId="smaskGroupAt"+this.groupLevel,scratchCanvas=this.cachedCanvases.getCanvas(cacheId,drawnWidth,drawnHeight);this.suspendedCtx=this.ctx;const ctx=this.ctx=scratchCanvas.context;ctx.setTransform(this.suspendedCtx.getTransform()),copyCtxState(this.suspendedCtx,ctx),mirrorContextOperations(ctx,this.suspendedCtx),this.setGState([["BM","source-over"]])}endSMaskMode(){if(!this.inSMaskMode)throw new Error("endSMaskMode\
 called while not in smask mode");this.ctx._removeMirroring(),copyCtxState(this.ctx,this.suspendedCtx),this.ctx=this.suspendedCtx,this.suspendedCtx=null}compose(dirtyBox){if(!this.current.activeSMask)return;dirtyBox?(dirtyBox[0]=Math.floor(dirtyBox[0]),dirtyBox[1]=Math.floor(dirtyBox[1]),dirtyBox[2]=Math.ceil(dirtyBox[2]),dirtyBox[3]=Math.ceil(dirtyBox[3])):dirtyBox=[0,0,this.ctx.canvas.width,this.ctx.canvas.height];const smask=this.current.activeSMask,suspendedCtx=this.suspendedCtx;this.composeSMask(
suspendedCtx,smask,this.ctx,dirtyBox),this.ctx.save(),this.ctx.setTransform(1,0,0,1,0,0),this.ctx.clearRect(0,0,this.ctx.canvas.width,this.ctx.canvas.height),this.ctx.restore()}composeSMask(ctx,smask,layerCtx,layerBox){const layerOffsetX=layerBox[0],layerOffsetY=layerBox[1],layerWidth=layerBox[2]-layerOffsetX,layerHeight=layerBox[3]-layerOffsetY;layerWidth===0||layerHeight===0||(this.genericComposeSMask(smask.context,layerCtx,layerWidth,layerHeight,smask.subtype,smask.backdrop,smask.transferMap,
layerOffsetX,layerOffsetY,smask.offsetX,smask.offsetY),ctx.save(),ctx.globalAlpha=1,ctx.globalCompositeOperation="source-over",ctx.setTransform(1,0,0,1,0,0),ctx.drawImage(layerCtx.canvas,0,0),ctx.restore())}genericComposeSMask(maskCtx,layerCtx,width,height,subtype,backdrop,transferMap,layerOffsetX,layerOffsetY,maskOffsetX,maskOffsetY){let maskCanvas=maskCtx.canvas,maskX=layerOffsetX-maskOffsetX,maskY=layerOffsetY-maskOffsetY;if(backdrop)if(maskX<0||maskY<0||maskX+width>maskCanvas.width||maskY+height>
maskCanvas.height){const canvas=this.cachedCanvases.getCanvas("maskExtension",width,height),ctx=canvas.context;ctx.drawImage(maskCanvas,-maskX,-maskY),ctx.globalCompositeOperation="destination-atop",ctx.fillStyle=backdrop,ctx.fillRect(0,0,width,height),ctx.globalCompositeOperation="source-over",maskCanvas=canvas.canvas,maskX=maskY=0}else{maskCtx.save(),maskCtx.globalAlpha=1,maskCtx.setTransform(1,0,0,1,0,0);const clip2=new Path2D;clip2.rect(maskX,maskY,width,height),maskCtx.clip(clip2),maskCtx.globalCompositeOperation=
"destination-atop",maskCtx.fillStyle=backdrop,maskCtx.fillRect(maskX,maskY,width,height),maskCtx.restore()}layerCtx.save(),layerCtx.globalAlpha=1,layerCtx.setTransform(1,0,0,1,0,0),subtype==="Alpha"&&transferMap?layerCtx.filter=this.filterFactory.addAlphaFilter(transferMap):subtype==="Luminosity"&&(layerCtx.filter=this.filterFactory.addLuminosityFilter(transferMap));const clip=new Path2D;clip.rect(layerOffsetX,layerOffsetY,width,height),layerCtx.clip(clip),layerCtx.globalCompositeOperation="dest\
ination-in",layerCtx.drawImage(maskCanvas,maskX,maskY,width,height,layerOffsetX,layerOffsetY,width,height),layerCtx.restore()}save(){this.inSMaskMode&&copyCtxState(this.ctx,this.suspendedCtx),this.ctx.save();const old=this.current;this.stateStack.push(old),this.current=old.clone()}restore(){if(this.stateStack.length===0){this.inSMaskMode&&this.endSMaskMode();return}this.current=this.stateStack.pop(),this.ctx.restore(),this.inSMaskMode&&copyCtxState(this.suspendedCtx,this.ctx),this.checkSMaskState(),
this.pendingClip=null,this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null}transform(a,b,c2,d2,e,f){this.ctx.transform(a,b,c2,d2,e,f),this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null}constructPath(op2,data,minMax){let[path2]=data;if(!minMax){path2||=data[0]=new Path2D,this[op2](path2);return}if(!(path2 instanceof Path2D)){const path2d=data[0]=new Path2D;for(let i=0,ii=path2.length;i<ii;)switch(path2[i++]){case DrawOPS.moveTo:path2d.moveTo(path2[i++],path2[i++]);
break;case DrawOPS.lineTo:path2d.lineTo(path2[i++],path2[i++]);break;case DrawOPS.curveTo:path2d.bezierCurveTo(path2[i++],path2[i++],path2[i++],path2[i++],path2[i++],path2[i++]);break;case DrawOPS.closePath:path2d.closePath();break;default:warn(`Unrecognized drawing path operator: ${path2[i-1]}`);break}path2=path2d}Util.axialAlignedBoundingBox(minMax,getCurrentTransform(this.ctx),this.current.minMax),this[op2](path2)}closePath(){this.ctx.closePath()}stroke(path2,consumePath=!0){const ctx=this.ctx,
strokeColor=this.current.strokeColor;if(ctx.globalAlpha=this.current.strokeAlpha,this.contentVisible)if(typeof strokeColor=="object"&&strokeColor?.getPattern){const baseTransform=strokeColor.isModifyingCurrentTransform()?ctx.getTransform():null;if(ctx.save(),ctx.strokeStyle=strokeColor.getPattern(ctx,this,getCurrentTransformInverse(ctx),PathType.STROKE),baseTransform){const newPath=new Path2D;newPath.addPath(path2,ctx.getTransform().invertSelf().multiplySelf(baseTransform)),path2=newPath}this.rescaleAndStroke(
path2,!1),ctx.restore()}else this.rescaleAndStroke(path2,!0);consumePath&&this.consumePath(path2,this.current.getClippedPathBoundingBox(PathType.STROKE,getCurrentTransform(this.ctx))),ctx.globalAlpha=this.current.fillAlpha}closeStroke(path2){this.stroke(path2)}fill(path2,consumePath=!0){const ctx=this.ctx,fillColor=this.current.fillColor,isPatternFill=this.current.patternFill;let needRestore=!1;if(isPatternFill){const baseTransform=fillColor.isModifyingCurrentTransform()?ctx.getTransform():null;
if(ctx.save(),ctx.fillStyle=fillColor.getPattern(ctx,this,getCurrentTransformInverse(ctx),PathType.FILL),baseTransform){const newPath=new Path2D;newPath.addPath(path2,ctx.getTransform().invertSelf().multiplySelf(baseTransform)),path2=newPath}needRestore=!0}const intersect=this.current.getClippedPathBoundingBox();this.contentVisible&&intersect!==null&&(this.pendingEOFill?(ctx.fill(path2,"evenodd"),this.pendingEOFill=!1):ctx.fill(path2)),needRestore&&ctx.restore(),consumePath&&this.consumePath(path2,
intersect)}eoFill(path2){this.pendingEOFill=!0,this.fill(path2)}fillStroke(path2){this.fill(path2,!1),this.stroke(path2,!1),this.consumePath(path2)}eoFillStroke(path2){this.pendingEOFill=!0,this.fillStroke(path2)}closeFillStroke(path2){this.fillStroke(path2)}closeEOFillStroke(path2){this.pendingEOFill=!0,this.fillStroke(path2)}endPath(path2){this.consumePath(path2)}rawFillPath(path2){this.ctx.fill(path2)}clip(){this.pendingClip=NORMAL_CLIP}eoClip(){this.pendingClip=EO_CLIP}beginText(){this.current.
textMatrix=null,this.current.textMatrixScale=1,this.current.x=this.current.lineX=0,this.current.y=this.current.lineY=0}endText(){const paths=this.pendingTextPaths,ctx=this.ctx;if(paths===void 0)return;const newPath=new Path2D,invTransf=ctx.getTransform().invertSelf();for(const{transform:transform2,x,y,fontSize,path:path2}of paths)path2&&newPath.addPath(path2,new DOMMatrix(transform2).preMultiplySelf(invTransf).translate(x,y).scale(fontSize,-fontSize));ctx.clip(newPath),delete this.pendingTextPaths}setCharSpacing(spacing2){
this.current.charSpacing=spacing2}setWordSpacing(spacing2){this.current.wordSpacing=spacing2}setHScale(scale2){this.current.textHScale=scale2/100}setLeading(leading){this.current.leading=-leading}setFont(fontRefName,size2){const fontObj=this.commonObjs.get(fontRefName),current2=this.current;if(!fontObj)throw new Error(`Can't find font for ${fontRefName}`);if(current2.fontMatrix=fontObj.fontMatrix||FONT_IDENTITY_MATRIX,(current2.fontMatrix[0]===0||current2.fontMatrix[3]===0)&&warn("Invalid font m\
atrix for font "+fontRefName),size2<0?(size2=-size2,current2.fontDirection=-1):current2.fontDirection=1,this.current.font=fontObj,this.current.fontSize=size2,fontObj.isType3Font)return;const name=fontObj.loadedName||"sans-serif",typeface=fontObj.systemFontInfo?.css||`"${name}", ${fontObj.fallbackName}`;let bold="normal";fontObj.black?bold="900":fontObj.bold&&(bold="bold");const italic=fontObj.italic?"italic":"normal";let browserFontSize=size2;size2<MIN_FONT_SIZE?browserFontSize=MIN_FONT_SIZE:size2>
MAX_FONT_SIZE&&(browserFontSize=MAX_FONT_SIZE),this.current.fontSizeScale=size2/browserFontSize,this.ctx.font=`${italic} ${bold} ${browserFontSize}px ${typeface}`}setTextRenderingMode(mode){this.current.textRenderingMode=mode}setTextRise(rise){this.current.textRise=rise}moveText(x,y){this.current.x=this.current.lineX+=x,this.current.y=this.current.lineY+=y}setLeadingMoveText(x,y){this.setLeading(-y),this.moveText(x,y)}setTextMatrix(matrix){const{current:current2}=this;current2.textMatrix=matrix,
current2.textMatrixScale=Math.hypot(matrix[0],matrix[1]),current2.x=current2.lineX=0,current2.y=current2.lineY=0}nextLine(){this.moveText(0,this.current.leading)}#getScaledPath(path2,currentTransform,transform2){const newPath=new Path2D;return newPath.addPath(path2,new DOMMatrix(transform2).invertSelf().multiplySelf(currentTransform)),newPath}paintChar(character,x,y,patternFillTransform,patternStrokeTransform){const ctx=this.ctx,current2=this.current,font=current2.font,textRenderingMode=current2.
textRenderingMode,fontSize=current2.fontSize/current2.fontSizeScale,fillStrokeMode=textRenderingMode&TextRenderingMode.FILL_STROKE_MASK,isAddToPathSet=!!(textRenderingMode&TextRenderingMode.ADD_TO_PATH_FLAG),patternFill=current2.patternFill&&!font.missingFile,patternStroke=current2.patternStroke&&!font.missingFile;let path2;if((font.disableFontFace||isAddToPathSet||patternFill||patternStroke)&&!font.missingFile&&(path2=font.getPathGenerator(this.commonObjs,character)),path2&&(font.disableFontFace||
patternFill||patternStroke)){ctx.save(),ctx.translate(x,y),ctx.scale(fontSize,-fontSize);let currentTransform;if((fillStrokeMode===TextRenderingMode.FILL||fillStrokeMode===TextRenderingMode.FILL_STROKE)&&(patternFillTransform?(currentTransform=ctx.getTransform(),ctx.setTransform(...patternFillTransform),ctx.fill(this.#getScaledPath(path2,currentTransform,patternFillTransform))):ctx.fill(path2)),fillStrokeMode===TextRenderingMode.STROKE||fillStrokeMode===TextRenderingMode.FILL_STROKE)if(patternStrokeTransform){
currentTransform||=ctx.getTransform(),ctx.setTransform(...patternStrokeTransform);const{a,b,c:c2,d:d2}=currentTransform,invPatternTransform=Util.inverseTransform(patternStrokeTransform),transf=Util.transform([a,b,c2,d2,0,0],invPatternTransform);Util.singularValueDecompose2dScale(transf,XY),ctx.lineWidth*=Math.max(XY[0],XY[1])/fontSize,ctx.stroke(this.#getScaledPath(path2,currentTransform,patternStrokeTransform))}else ctx.lineWidth/=fontSize,ctx.stroke(path2);ctx.restore()}else(fillStrokeMode===TextRenderingMode.
FILL||fillStrokeMode===TextRenderingMode.FILL_STROKE)&&ctx.fillText(character,x,y),(fillStrokeMode===TextRenderingMode.STROKE||fillStrokeMode===TextRenderingMode.FILL_STROKE)&&ctx.strokeText(character,x,y);isAddToPathSet&&(this.pendingTextPaths||=[]).push({transform:getCurrentTransform(ctx),x,y,fontSize,path:path2})}get isFontSubpixelAAEnabled(){const{context:ctx}=this.cachedCanvases.getCanvas("isFontSubpixelAAEnabled",10,10);ctx.scale(1.5,1),ctx.fillText("I",0,10);const data=ctx.getImageData(0,
0,10,10).data;let enabled=!1;for(let i=3;i<data.length;i+=4)if(data[i]>0&&data[i]<255){enabled=!0;break}return shadow(this,"isFontSubpixelAAEnabled",enabled)}showText(glyphs){const current2=this.current,font=current2.font;if(font.isType3Font)return this.showType3Text(glyphs);const fontSize=current2.fontSize;if(fontSize===0)return;const ctx=this.ctx,fontSizeScale=current2.fontSizeScale,charSpacing=current2.charSpacing,wordSpacing=current2.wordSpacing,fontDirection=current2.fontDirection,textHScale=current2.
textHScale*fontDirection,glyphsLength=glyphs.length,vertical=font.vertical,spacingDir=vertical?1:-1,defaultVMetrics=font.defaultVMetrics,widthAdvanceScale=fontSize*current2.fontMatrix[0],simpleFillText=current2.textRenderingMode===TextRenderingMode.FILL&&!font.disableFontFace&&!current2.patternFill;ctx.save(),current2.textMatrix&&ctx.transform(...current2.textMatrix),ctx.translate(current2.x,current2.y+current2.textRise),fontDirection>0?ctx.scale(textHScale,-1):ctx.scale(textHScale,1);let patternFillTransform,
patternStrokeTransform;if(current2.patternFill){ctx.save();const pattern2=current2.fillColor.getPattern(ctx,this,getCurrentTransformInverse(ctx),PathType.FILL);patternFillTransform=getCurrentTransform(ctx),ctx.restore(),ctx.fillStyle=pattern2}if(current2.patternStroke){ctx.save();const pattern2=current2.strokeColor.getPattern(ctx,this,getCurrentTransformInverse(ctx),PathType.STROKE);patternStrokeTransform=getCurrentTransform(ctx),ctx.restore(),ctx.strokeStyle=pattern2}let lineWidth=current2.lineWidth;
const scale2=current2.textMatrixScale;if(scale2===0||lineWidth===0){const fillStrokeMode=current2.textRenderingMode&TextRenderingMode.FILL_STROKE_MASK;(fillStrokeMode===TextRenderingMode.STROKE||fillStrokeMode===TextRenderingMode.FILL_STROKE)&&(lineWidth=this.getSinglePixelWidth())}else lineWidth/=scale2;if(fontSizeScale!==1&&(ctx.scale(fontSizeScale,fontSizeScale),lineWidth/=fontSizeScale),ctx.lineWidth=lineWidth,font.isInvalidPDFjsFont){const chars=[];let width=0;for(const glyph of glyphs)chars.
push(glyph.unicode),width+=glyph.width;ctx.fillText(chars.join(""),0,0),current2.x+=width*widthAdvanceScale*textHScale,ctx.restore(),this.compose();return}let x=0,i;for(i=0;i<glyphsLength;++i){const glyph=glyphs[i];if(typeof glyph=="number"){x+=spacingDir*glyph*fontSize/1e3;continue}let restoreNeeded=!1;const spacing2=(glyph.isSpace?wordSpacing:0)+charSpacing,character=glyph.fontChar,accent2=glyph.accent;let scaledX,scaledY,width=glyph.width;if(vertical){const vmetric=glyph.vmetric||defaultVMetrics,
vx=-(glyph.vmetric?vmetric[1]:width*.5)*widthAdvanceScale,vy=vmetric[2]*widthAdvanceScale;width=vmetric?-vmetric[0]:width,scaledX=vx/fontSizeScale,scaledY=(x+vy)/fontSizeScale}else scaledX=x/fontSizeScale,scaledY=0;if(font.remeasure&&width>0){const measuredWidth=ctx.measureText(character).width*1e3/fontSize*fontSizeScale;if(width<measuredWidth&&this.isFontSubpixelAAEnabled){const characterScaleX=width/measuredWidth;restoreNeeded=!0,ctx.save(),ctx.scale(characterScaleX,1),scaledX/=characterScaleX}else
width!==measuredWidth&&(scaledX+=(width-measuredWidth)/2e3*fontSize/fontSizeScale)}if(this.contentVisible&&(glyph.isInFont||font.missingFile)){if(simpleFillText&&!accent2)ctx.fillText(character,scaledX,scaledY);else if(this.paintChar(character,scaledX,scaledY,patternFillTransform,patternStrokeTransform),accent2){const scaledAccentX=scaledX+fontSize*accent2.offset.x/fontSizeScale,scaledAccentY=scaledY-fontSize*accent2.offset.y/fontSizeScale;this.paintChar(accent2.fontChar,scaledAccentX,scaledAccentY,
patternFillTransform,patternStrokeTransform)}}const charWidth=vertical?width*widthAdvanceScale-spacing2*fontDirection:width*widthAdvanceScale+spacing2*fontDirection;x+=charWidth,restoreNeeded&&ctx.restore()}vertical?current2.y-=x:current2.x+=x*textHScale,ctx.restore(),this.compose()}showType3Text(glyphs){const ctx=this.ctx,current2=this.current,font=current2.font,fontSize=current2.fontSize,fontDirection=current2.fontDirection,spacingDir=font.vertical?1:-1,charSpacing=current2.charSpacing,wordSpacing=current2.
wordSpacing,textHScale=current2.textHScale*fontDirection,fontMatrix=current2.fontMatrix||FONT_IDENTITY_MATRIX,glyphsLength=glyphs.length,isTextInvisible=current2.textRenderingMode===TextRenderingMode.INVISIBLE;let i,glyph,width,spacingLength;if(!(isTextInvisible||fontSize===0)){for(this._cachedScaleForStroking[0]=-1,this._cachedGetSinglePixelWidth=null,ctx.save(),current2.textMatrix&&ctx.transform(...current2.textMatrix),ctx.translate(current2.x,current2.y+current2.textRise),ctx.scale(textHScale,
fontDirection),i=0;i<glyphsLength;++i){if(glyph=glyphs[i],typeof glyph=="number"){spacingLength=spacingDir*glyph*fontSize/1e3,this.ctx.translate(spacingLength,0),current2.x+=spacingLength*textHScale;continue}const spacing2=(glyph.isSpace?wordSpacing:0)+charSpacing,operatorList=font.charProcOperatorList[glyph.operatorListId];operatorList?this.contentVisible&&(this.save(),ctx.scale(fontSize,fontSize),ctx.transform(...fontMatrix),this.executeOperatorList(operatorList),this.restore()):warn(`Type3 ch\
aracter "${glyph.operatorListId}" is not available.`);const p2=[glyph.width,0];Util.applyTransform(p2,fontMatrix),width=p2[0]*fontSize+spacing2,ctx.translate(width,0),current2.x+=width*textHScale}ctx.restore()}}setCharWidth(xWidth,yWidth){}setCharWidthAndBounds(xWidth,yWidth,llx,lly,urx,ury){const clip=new Path2D;clip.rect(llx,lly,urx-llx,ury-lly),this.ctx.clip(clip),this.endPath()}getColorN_Pattern(IR){let pattern2;if(IR[0]==="TilingPattern"){const baseTransform=this.baseTransform||getCurrentTransform(
this.ctx),canvasGraphicsFactory={createCanvasGraphics:ctx=>new CanvasGraphics(ctx,this.commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig:this.optionalContentConfig,markedContentStack:this.markedContentStack})};pattern2=new TilingPattern(IR,this.ctx,canvasGraphicsFactory,baseTransform)}else pattern2=this._getPattern(IR[1],IR[2]);return pattern2}setStrokeColorN(){this.current.strokeColor=this.getColorN_Pattern(arguments),this.current.patternStroke=!0}setFillColorN(){
this.current.fillColor=this.getColorN_Pattern(arguments),this.current.patternFill=!0}setStrokeRGBColor(color){this.ctx.strokeStyle=this.current.strokeColor=color,this.current.patternStroke=!1}setStrokeTransparent(){this.ctx.strokeStyle=this.current.strokeColor="transparent",this.current.patternStroke=!1}setFillRGBColor(color){this.ctx.fillStyle=this.current.fillColor=color,this.current.patternFill=!1}setFillTransparent(){this.ctx.fillStyle=this.current.fillColor="transparent",this.current.patternFill=
!1}_getPattern(objId,matrix=null){let pattern2;return this.cachedPatterns.has(objId)?pattern2=this.cachedPatterns.get(objId):(pattern2=getShadingPattern(this.getObject(objId)),this.cachedPatterns.set(objId,pattern2)),matrix&&(pattern2.matrix=matrix),pattern2}shadingFill(objId){if(!this.contentVisible)return;const ctx=this.ctx;this.save();const pattern2=this._getPattern(objId);ctx.fillStyle=pattern2.getPattern(ctx,this,getCurrentTransformInverse(ctx),PathType.SHADING);const inv=getCurrentTransformInverse(
ctx);if(inv){const{width,height}=ctx.canvas,minMax=MIN_MAX_INIT.slice();Util.axialAlignedBoundingBox([0,0,width,height],inv,minMax);const[x0,y0,x1,y1]=minMax;this.ctx.fillRect(x0,y0,x1-x0,y1-y0)}else this.ctx.fillRect(-1e10,-1e10,2e10,2e10);this.compose(this.current.getClippedPathBoundingBox()),this.restore()}beginInlineImage(){unreachable("Should not call beginInlineImage")}beginImageData(){unreachable("Should not call beginImageData")}paintFormXObjectBegin(matrix,bbox){if(this.contentVisible&&
(this.save(),this.baseTransformStack.push(this.baseTransform),matrix&&this.transform(...matrix),this.baseTransform=getCurrentTransform(this.ctx),bbox)){Util.axialAlignedBoundingBox(bbox,this.baseTransform,this.current.minMax);const[x0,y0,x1,y1]=bbox,clip=new Path2D;clip.rect(x0,y0,x1-x0,y1-y0),this.ctx.clip(clip),this.endPath()}}paintFormXObjectEnd(){this.contentVisible&&(this.restore(),this.baseTransform=this.baseTransformStack.pop())}beginGroup(group){if(!this.contentVisible)return;this.save(),
this.inSMaskMode&&(this.endSMaskMode(),this.current.activeSMask=null);const currentCtx=this.ctx;group.isolated||info("TODO: Support non-isolated groups."),group.knockout&&warn("Knockout groups not supported.");const currentTransform=getCurrentTransform(currentCtx);if(group.matrix&&currentCtx.transform(...group.matrix),!group.bbox)throw new Error("Bounding box is required.");let bounds=MIN_MAX_INIT.slice();Util.axialAlignedBoundingBox(group.bbox,getCurrentTransform(currentCtx),bounds);const canvasBounds=[
0,0,currentCtx.canvas.width,currentCtx.canvas.height];bounds=Util.intersect(bounds,canvasBounds)||[0,0,0,0];const offsetX=Math.floor(bounds[0]),offsetY=Math.floor(bounds[1]),drawnWidth=Math.max(Math.ceil(bounds[2])-offsetX,1),drawnHeight=Math.max(Math.ceil(bounds[3])-offsetY,1);this.current.startNewPathAndClipBox([0,0,drawnWidth,drawnHeight]);let cacheId="groupAt"+this.groupLevel;group.smask&&(cacheId+="_smask_"+this.smaskCounter++%2);const scratchCanvas=this.cachedCanvases.getCanvas(cacheId,drawnWidth,
drawnHeight),groupCtx=scratchCanvas.context;groupCtx.translate(-offsetX,-offsetY),groupCtx.transform(...currentTransform);let clip=new Path2D;const[x0,y0,x1,y1]=group.bbox;if(clip.rect(x0,y0,x1-x0,y1-y0),group.matrix){const path2=new Path2D;path2.addPath(clip,new DOMMatrix(group.matrix)),clip=path2}groupCtx.clip(clip),group.smask?this.smaskStack.push({canvas:scratchCanvas.canvas,context:groupCtx,offsetX,offsetY,subtype:group.smask.subtype,backdrop:group.smask.backdrop,transferMap:group.smask.transferMap||
null,startTransformInverse:null}):(currentCtx.setTransform(1,0,0,1,0,0),currentCtx.translate(offsetX,offsetY),currentCtx.save()),copyCtxState(currentCtx,groupCtx),this.ctx=groupCtx,this.setGState([["BM","source-over"],["ca",1],["CA",1]]),this.groupStack.push(currentCtx),this.groupLevel++}endGroup(group){if(!this.contentVisible)return;this.groupLevel--;const groupCtx=this.ctx,ctx=this.groupStack.pop();if(this.ctx=ctx,this.ctx.imageSmoothingEnabled=!1,group.smask)this.tempSMask=this.smaskStack.pop(),
this.restore();else{this.ctx.restore();const currentMtx=getCurrentTransform(this.ctx);this.restore(),this.ctx.save(),this.ctx.setTransform(...currentMtx);const dirtyBox=MIN_MAX_INIT.slice();Util.axialAlignedBoundingBox([0,0,groupCtx.canvas.width,groupCtx.canvas.height],currentMtx,dirtyBox),this.ctx.drawImage(groupCtx.canvas,0,0),this.ctx.restore(),this.compose(dirtyBox)}}beginAnnotation(id2,rect,transform2,matrix,hasOwnCanvas){if(this.#restoreInitialState(),resetCtxToDefault(this.ctx),this.ctx.save(),
this.save(),this.baseTransform&&this.ctx.setTransform(...this.baseTransform),rect){const width=rect[2]-rect[0],height=rect[3]-rect[1];if(hasOwnCanvas&&this.annotationCanvasMap){transform2=transform2.slice(),transform2[4]-=rect[0],transform2[5]-=rect[1],rect=rect.slice(),rect[0]=rect[1]=0,rect[2]=width,rect[3]=height,Util.singularValueDecompose2dScale(getCurrentTransform(this.ctx),XY);const{viewportScale}=this,canvasWidth=Math.ceil(width*this.outputScaleX*viewportScale),canvasHeight=Math.ceil(height*
this.outputScaleY*viewportScale);this.annotationCanvas=this.canvasFactory.create(canvasWidth,canvasHeight);const{canvas,context}=this.annotationCanvas;this.annotationCanvasMap.set(id2,canvas),this.annotationCanvas.savedCtx=this.ctx,this.ctx=context,this.ctx.save(),this.ctx.setTransform(XY[0],0,0,-XY[1],0,height*XY[1]),resetCtxToDefault(this.ctx)}else{resetCtxToDefault(this.ctx),this.endPath();const clip=new Path2D;clip.rect(rect[0],rect[1],width,height),this.ctx.clip(clip)}}this.current=new CanvasExtraState(
this.ctx.canvas.width,this.ctx.canvas.height),this.transform(...transform2),this.transform(...matrix)}endAnnotation(){this.annotationCanvas&&(this.ctx.restore(),this.#drawFilter(),this.ctx=this.annotationCanvas.savedCtx,delete this.annotationCanvas.savedCtx,delete this.annotationCanvas)}paintImageMaskXObject(img){if(!this.contentVisible)return;const count=img.count;img=this.getObject(img.data,img),img.count=count;const ctx=this.ctx,mask=this._createMaskCanvas(img),maskCanvas=mask.canvas;ctx.save(),
ctx.setTransform(1,0,0,1,0,0),ctx.drawImage(maskCanvas,mask.offsetX,mask.offsetY),ctx.restore(),this.compose()}paintImageMaskXObjectRepeat(img,scaleX,skewX=0,skewY=0,scaleY,positions){if(!this.contentVisible)return;img=this.getObject(img.data,img);const ctx=this.ctx;ctx.save();const currentTransform=getCurrentTransform(ctx);ctx.transform(scaleX,skewX,skewY,scaleY,0,0);const mask=this._createMaskCanvas(img);ctx.setTransform(1,0,0,1,mask.offsetX-currentTransform[4],mask.offsetY-currentTransform[5]);
for(let i=0,ii=positions.length;i<ii;i+=2){const trans=Util.transform(currentTransform,[scaleX,skewX,skewY,scaleY,positions[i],positions[i+1]]);ctx.drawImage(mask.canvas,trans[4],trans[5])}ctx.restore(),this.compose()}paintImageMaskXObjectGroup(images){if(!this.contentVisible)return;const ctx=this.ctx,fillColor=this.current.fillColor,isPatternFill=this.current.patternFill;for(const image2 of images){const{data,width,height,transform:transform2}=image2,maskCanvas=this.cachedCanvases.getCanvas("ma\
skCanvas",width,height),maskCtx=maskCanvas.context;maskCtx.save();const img=this.getObject(data,image2);putBinaryImageMask(maskCtx,img),maskCtx.globalCompositeOperation="source-in",maskCtx.fillStyle=isPatternFill?fillColor.getPattern(maskCtx,this,getCurrentTransformInverse(ctx),PathType.FILL):fillColor,maskCtx.fillRect(0,0,width,height),maskCtx.restore(),ctx.save(),ctx.transform(...transform2),ctx.scale(1,-1),drawImageAtIntegerCoords(ctx,maskCanvas.canvas,0,0,width,height,0,-1,1,1),ctx.restore()}
this.compose()}paintImageXObject(objId){if(!this.contentVisible)return;const imgData=this.getObject(objId);if(!imgData){warn("Dependent image isn't ready yet");return}this.paintInlineImageXObject(imgData)}paintImageXObjectRepeat(objId,scaleX,scaleY,positions){if(!this.contentVisible)return;const imgData=this.getObject(objId);if(!imgData){warn("Dependent image isn't ready yet");return}const width=imgData.width,height=imgData.height,map2=[];for(let i=0,ii=positions.length;i<ii;i+=2)map2.push({transform:[
scaleX,0,0,scaleY,positions[i],positions[i+1]],x:0,y:0,w:width,h:height});this.paintInlineImageXObjectGroup(imgData,map2)}applyTransferMapsToCanvas(ctx){return this.current.transferMaps!=="none"&&(ctx.filter=this.current.transferMaps,ctx.drawImage(ctx.canvas,0,0),ctx.filter="none"),ctx.canvas}applyTransferMapsToBitmap(imgData){if(this.current.transferMaps==="none")return imgData.bitmap;const{bitmap,width,height}=imgData,tmpCanvas=this.cachedCanvases.getCanvas("inlineImage",width,height),tmpCtx=tmpCanvas.
context;return tmpCtx.filter=this.current.transferMaps,tmpCtx.drawImage(bitmap,0,0),tmpCtx.filter="none",tmpCanvas.canvas}paintInlineImageXObject(imgData){if(!this.contentVisible)return;const width=imgData.width,height=imgData.height,ctx=this.ctx;this.save();const{filter}=ctx;filter!=="none"&&filter!==""&&(ctx.filter="none"),ctx.scale(1/width,-1/height);let imgToPaint;if(imgData.bitmap)imgToPaint=this.applyTransferMapsToBitmap(imgData);else if(typeof HTMLElement=="function"&&imgData instanceof HTMLElement||
!imgData.data)imgToPaint=imgData;else{const tmpCtx=this.cachedCanvases.getCanvas("inlineImage",width,height).context;putBinaryImageData(tmpCtx,imgData),imgToPaint=this.applyTransferMapsToCanvas(tmpCtx)}const scaled=this._scaleImage(imgToPaint,getCurrentTransformInverse(ctx));ctx.imageSmoothingEnabled=getImageSmoothingEnabled(getCurrentTransform(ctx),imgData.interpolate),drawImageAtIntegerCoords(ctx,scaled.img,0,0,scaled.paintWidth,scaled.paintHeight,0,-height,width,height),this.compose(),this.restore()}paintInlineImageXObjectGroup(imgData,map2){
if(!this.contentVisible)return;const ctx=this.ctx;let imgToPaint;if(imgData.bitmap)imgToPaint=imgData.bitmap;else{const w=imgData.width,h2=imgData.height,tmpCtx=this.cachedCanvases.getCanvas("inlineImage",w,h2).context;putBinaryImageData(tmpCtx,imgData),imgToPaint=this.applyTransferMapsToCanvas(tmpCtx)}for(const entry of map2)ctx.save(),ctx.transform(...entry.transform),ctx.scale(1,-1),drawImageAtIntegerCoords(ctx,imgToPaint,entry.x,entry.y,entry.w,entry.h,0,-1,1,1),ctx.restore();this.compose()}paintSolidColorImageMask(){
this.contentVisible&&(this.ctx.fillRect(0,0,1,1),this.compose())}markPoint(tag){}markPointProps(tag,properties2){}beginMarkedContent(tag){this.markedContentStack.push({visible:!0})}beginMarkedContentProps(tag,properties2){tag==="OC"?this.markedContentStack.push({visible:this.optionalContentConfig.isVisible(properties2)}):this.markedContentStack.push({visible:!0}),this.contentVisible=this.isContentVisible()}endMarkedContent(){this.markedContentStack.pop(),this.contentVisible=this.isContentVisible()}beginCompat(){}endCompat(){}consumePath(path2,clipBox){
const isEmpty=this.current.isEmptyClip();this.pendingClip&&this.current.updateClipFromPath(),this.pendingClip||this.compose(clipBox);const ctx=this.ctx;this.pendingClip&&(isEmpty||(this.pendingClip===EO_CLIP?ctx.clip(path2,"evenodd"):ctx.clip(path2)),this.pendingClip=null),this.current.startNewPathAndClipBox(this.current.clipBox)}getSinglePixelWidth(){if(!this._cachedGetSinglePixelWidth){const m=getCurrentTransform(this.ctx);if(m[1]===0&&m[2]===0)this._cachedGetSinglePixelWidth=1/Math.min(Math.abs(
m[0]),Math.abs(m[3]));else{const absDet=Math.abs(m[0]*m[3]-m[2]*m[1]),normX=Math.hypot(m[0],m[2]),normY=Math.hypot(m[1],m[3]);this._cachedGetSinglePixelWidth=Math.max(normX,normY)/absDet}}return this._cachedGetSinglePixelWidth}getScaleForStroking(){if(this._cachedScaleForStroking[0]===-1){const{lineWidth}=this.current,{a,b,c:c2,d:d2}=this.ctx.getTransform();let scaleX,scaleY;if(b===0&&c2===0){const normX=Math.abs(a),normY=Math.abs(d2);if(normX===normY)if(lineWidth===0)scaleX=scaleY=1/normX;else{
const scaledLineWidth=normX*lineWidth;scaleX=scaleY=scaledLineWidth<1?1/scaledLineWidth:1}else if(lineWidth===0)scaleX=1/normX,scaleY=1/normY;else{const scaledXLineWidth=normX*lineWidth,scaledYLineWidth=normY*lineWidth;scaleX=scaledXLineWidth<1?1/scaledXLineWidth:1,scaleY=scaledYLineWidth<1?1/scaledYLineWidth:1}}else{const absDet=Math.abs(a*d2-b*c2),normX=Math.hypot(a,b),normY=Math.hypot(c2,d2);if(lineWidth===0)scaleX=normY/absDet,scaleY=normX/absDet;else{const baseArea=lineWidth*absDet;scaleX=normY>
baseArea?normY/baseArea:1,scaleY=normX>baseArea?normX/baseArea:1}}this._cachedScaleForStroking[0]=scaleX,this._cachedScaleForStroking[1]=scaleY}return this._cachedScaleForStroking}rescaleAndStroke(path2,saveRestore){const{ctx,current:{lineWidth}}=this,[scaleX,scaleY]=this.getScaleForStroking();if(scaleX===scaleY){ctx.lineWidth=(lineWidth||1)*scaleX,ctx.stroke(path2);return}const dashes=ctx.getLineDash();saveRestore&&ctx.save(),ctx.scale(scaleX,scaleY),SCALE_MATRIX.a=1/scaleX,SCALE_MATRIX.d=1/scaleY;
const newPath=new Path2D;if(newPath.addPath(path2,SCALE_MATRIX),dashes.length>0){const scale2=Math.max(scaleX,scaleY);ctx.setLineDash(dashes.map(x=>x/scale2)),ctx.lineDashOffset/=scale2}ctx.lineWidth=lineWidth||1,ctx.stroke(newPath),saveRestore&&ctx.restore()}isContentVisible(){for(let i=this.markedContentStack.length-1;i>=0;i--)if(!this.markedContentStack[i].visible)return!1;return!0}}for(const op2 in OPS)CanvasGraphics.prototype[op2]!==void 0&&(CanvasGraphics.prototype[OPS[op2]]=CanvasGraphics.
prototype[op2]);class GlobalWorkerOptions{static#port=null;static#src="";static get workerPort(){return this.#port}static set workerPort(val){if(!(typeof Worker<"u"&&val instanceof Worker)&&val!==null)throw new Error("Invalid `workerPort` type.");this.#port=val}static get workerSrc(){return this.#src}static set workerSrc(val){if(typeof val!="string")throw new Error("Invalid `workerSrc` type.");this.#src=val}}class Metadata{#map;#data;constructor({parsedData,rawData}){this.#map=parsedData,this.#data=
rawData}getRaw(){return this.#data}get(name){return this.#map.get(name)??null}[Symbol.iterator](){return this.#map.entries()}}const INTERNAL=Symbol("INTERNAL");class OptionalContentGroup{#isDisplay=!1;#isPrint=!1;#userSet=!1;#visible=!0;constructor(renderingIntent,{name,intent,usage,rbGroups}){this.#isDisplay=!!(renderingIntent&RenderingIntentFlag.DISPLAY),this.#isPrint=!!(renderingIntent&RenderingIntentFlag.PRINT),this.name=name,this.intent=intent,this.usage=usage,this.rbGroups=rbGroups}get visible(){
if(this.#userSet)return this.#visible;if(!this.#visible)return!1;const{print,view}=this.usage;return this.#isDisplay?view?.viewState!=="OFF":this.#isPrint?print?.printState!=="OFF":!0}_setVisible(internal,visible,userSet=!1){internal!==INTERNAL&&unreachable("Internal method `_setVisible` called."),this.#userSet=userSet,this.#visible=visible}}class OptionalContentConfig{#cachedGetHash=null;#groups=new Map;#initialHash=null;#order=null;constructor(data,renderingIntent=RenderingIntentFlag.DISPLAY){
if(this.renderingIntent=renderingIntent,this.name=null,this.creator=null,data!==null){this.name=data.name,this.creator=data.creator,this.#order=data.order;for(const group of data.groups)this.#groups.set(group.id,new OptionalContentGroup(renderingIntent,group));if(data.baseState==="OFF")for(const group of this.#groups.values())group._setVisible(INTERNAL,!1);for(const on2 of data.on)this.#groups.get(on2)._setVisible(INTERNAL,!0);for(const off of data.off)this.#groups.get(off)._setVisible(INTERNAL,
!1);this.#initialHash=this.getHash()}}#evaluateVisibilityExpression(array2){const length=array2.length;if(length<2)return!0;const operator2=array2[0];for(let i=1;i<length;i++){const element2=array2[i];let state2;if(Array.isArray(element2))state2=this.#evaluateVisibilityExpression(element2);else if(this.#groups.has(element2))state2=this.#groups.get(element2).visible;else return warn(`Optional content group not found: ${element2}`),!0;switch(operator2){case"And":if(!state2)return!1;break;case"Or":
if(state2)return!0;break;case"Not":return!state2;default:return!0}}return operator2==="And"}isVisible(group){if(this.#groups.size===0)return!0;if(!group)return info("Optional content group not defined."),!0;if(group.type==="OCG")return this.#groups.has(group.id)?this.#groups.get(group.id).visible:(warn(`Optional content group not found: ${group.id}`),!0);if(group.type==="OCMD"){if(group.expression)return this.#evaluateVisibilityExpression(group.expression);if(!group.policy||group.policy==="AnyOn"){
for(const id2 of group.ids){if(!this.#groups.has(id2))return warn(`Optional content group not found: ${id2}`),!0;if(this.#groups.get(id2).visible)return!0}return!1}else if(group.policy==="AllOn"){for(const id2 of group.ids){if(!this.#groups.has(id2))return warn(`Optional content group not found: ${id2}`),!0;if(!this.#groups.get(id2).visible)return!1}return!0}else if(group.policy==="AnyOff"){for(const id2 of group.ids){if(!this.#groups.has(id2))return warn(`Optional content group not found: ${id2}`),
!0;if(!this.#groups.get(id2).visible)return!0}return!1}else if(group.policy==="AllOff"){for(const id2 of group.ids){if(!this.#groups.has(id2))return warn(`Optional content group not found: ${id2}`),!0;if(this.#groups.get(id2).visible)return!1}return!0}return warn(`Unknown optional content policy ${group.policy}.`),!0}return warn(`Unknown group type ${group.type}.`),!0}setVisibility(id2,visible=!0,preserveRB=!0){const group=this.#groups.get(id2);if(!group){warn(`Optional content group not found: ${id2}`);
return}if(preserveRB&&visible&&group.rbGroups.length)for(const rbGroup of group.rbGroups)for(const otherId of rbGroup)otherId!==id2&&this.#groups.get(otherId)?._setVisible(INTERNAL,!1,!0);group._setVisible(INTERNAL,!!visible,!0),this.#cachedGetHash=null}setOCGState({state:state2,preserveRB}){let operator2;for(const elem of state2){switch(elem){case"ON":case"OFF":case"Toggle":operator2=elem;continue}const group=this.#groups.get(elem);if(group)switch(operator2){case"ON":this.setVisibility(elem,!0,
preserveRB);break;case"OFF":this.setVisibility(elem,!1,preserveRB);break;case"Toggle":this.setVisibility(elem,!group.visible,preserveRB);break}}this.#cachedGetHash=null}get hasInitialVisibility(){return this.#initialHash===null||this.getHash()===this.#initialHash}getOrder(){return this.#groups.size?this.#order?this.#order.slice():[...this.#groups.keys()]:null}getGroup(id2){return this.#groups.get(id2)||null}getHash(){if(this.#cachedGetHash!==null)return this.#cachedGetHash;const hash2=new MurmurHash3_64;
for(const[id2,group]of this.#groups)hash2.update(`${id2}:${group.visible}`);return this.#cachedGetHash=hash2.hexdigest()}[Symbol.iterator](){return this.#groups.entries()}}class PDFDataTransportStream{constructor(pdfDataRangeTransport,{disableRange=!1,disableStream=!1}){assert$1(pdfDataRangeTransport,'PDFDataTransportStream - missing required "pdfDataRangeTransport" argument.');const{length,initialData,progressiveDone,contentDispositionFilename}=pdfDataRangeTransport;if(this._queuedChunks=[],this.
_progressiveDone=progressiveDone,this._contentDispositionFilename=contentDispositionFilename,initialData?.length>0){const buffer=initialData instanceof Uint8Array&&initialData.byteLength===initialData.buffer.byteLength?initialData.buffer:new Uint8Array(initialData).buffer;this._queuedChunks.push(buffer)}this._pdfDataRangeTransport=pdfDataRangeTransport,this._isStreamingSupported=!disableStream,this._isRangeSupported=!disableRange,this._contentLength=length,this._fullRequestReader=null,this._rangeReaders=
[],pdfDataRangeTransport.addRangeListener((begin,chunk)=>{this._onReceiveData({begin,chunk})}),pdfDataRangeTransport.addProgressListener((loaded,total)=>{this._onProgress({loaded,total})}),pdfDataRangeTransport.addProgressiveReadListener(chunk=>{this._onReceiveData({chunk})}),pdfDataRangeTransport.addProgressiveDoneListener(()=>{this._onProgressiveDone()}),pdfDataRangeTransport.transportReady()}_onReceiveData({begin,chunk}){const buffer=chunk instanceof Uint8Array&&chunk.byteLength===chunk.buffer.
byteLength?chunk.buffer:new Uint8Array(chunk).buffer;if(begin===void 0)this._fullRequestReader?this._fullRequestReader._enqueue(buffer):this._queuedChunks.push(buffer);else{const found=this._rangeReaders.some(function(rangeReader){return rangeReader._begin!==begin?!1:(rangeReader._enqueue(buffer),!0)});assert$1(found,"_onReceiveData - no `PDFDataTransportStreamRangeReader` instance found.")}}get _progressiveDataLength(){return this._fullRequestReader?._loaded??0}_onProgress(evt){evt.total===void 0?
this._rangeReaders[0]?.onProgress?.({loaded:evt.loaded}):this._fullRequestReader?.onProgress?.({loaded:evt.loaded,total:evt.total})}_onProgressiveDone(){this._fullRequestReader?.progressiveDone(),this._progressiveDone=!0}_removeRangeReader(reader){const i=this._rangeReaders.indexOf(reader);i>=0&&this._rangeReaders.splice(i,1)}getFullReader(){assert$1(!this._fullRequestReader,"PDFDataTransportStream.getFullReader can only be called once.");const queuedChunks=this._queuedChunks;return this._queuedChunks=
null,new PDFDataTransportStreamReader(this,queuedChunks,this._progressiveDone,this._contentDispositionFilename)}getRangeReader(begin,end){if(end<=this._progressiveDataLength)return null;const reader=new PDFDataTransportStreamRangeReader(this,begin,end);return this._pdfDataRangeTransport.requestDataRange(begin,end),this._rangeReaders.push(reader),reader}cancelAllRequests(reason){this._fullRequestReader?.cancel(reason);for(const reader of this._rangeReaders.slice(0))reader.cancel(reason);this._pdfDataRangeTransport.
abort()}}class PDFDataTransportStreamReader{constructor(stream,queuedChunks,progressiveDone=!1,contentDispositionFilename=null){this._stream=stream,this._done=progressiveDone||!1,this._filename=isPdfFile(contentDispositionFilename)?contentDispositionFilename:null,this._queuedChunks=queuedChunks||[],this._loaded=0;for(const chunk of this._queuedChunks)this._loaded+=chunk.byteLength;this._requests=[],this._headersReady=Promise.resolve(),stream._fullRequestReader=this,this.onProgress=null}_enqueue(chunk){
this._done||(this._requests.length>0?this._requests.shift().resolve({value:chunk,done:!1}):this._queuedChunks.push(chunk),this._loaded+=chunk.byteLength)}get headersReady(){return this._headersReady}get filename(){return this._filename}get isRangeSupported(){return this._stream._isRangeSupported}get isStreamingSupported(){return this._stream._isStreamingSupported}get contentLength(){return this._stream._contentLength}async read(){if(this._queuedChunks.length>0)return{value:this._queuedChunks.shift(),
done:!1};if(this._done)return{value:void 0,done:!0};const requestCapability=Promise.withResolvers();return this._requests.push(requestCapability),requestCapability.promise}cancel(reason){this._done=!0;for(const requestCapability of this._requests)requestCapability.resolve({value:void 0,done:!0});this._requests.length=0}progressiveDone(){this._done||(this._done=!0)}}class PDFDataTransportStreamRangeReader{constructor(stream,begin,end){this._stream=stream,this._begin=begin,this._end=end,this._queuedChunk=
null,this._requests=[],this._done=!1,this.onProgress=null}_enqueue(chunk){if(!this._done){if(this._requests.length===0)this._queuedChunk=chunk;else{this._requests.shift().resolve({value:chunk,done:!1});for(const requestCapability of this._requests)requestCapability.resolve({value:void 0,done:!0});this._requests.length=0}this._done=!0,this._stream._removeRangeReader(this)}}get isStreamingSupported(){return!1}async read(){if(this._queuedChunk){const chunk=this._queuedChunk;return this._queuedChunk=
null,{value:chunk,done:!1}}if(this._done)return{value:void 0,done:!0};const requestCapability=Promise.withResolvers();return this._requests.push(requestCapability),requestCapability.promise}cancel(reason){this._done=!0;for(const requestCapability of this._requests)requestCapability.resolve({value:void 0,done:!0});this._requests.length=0,this._stream._removeRangeReader(this)}}function getFilenameFromContentDispositionHeader(contentDisposition){let needsEncodingFixup=!0,tmp=toParamRegExp("filename\
\\*","i").exec(contentDisposition);if(tmp){tmp=tmp[1];let filename=rfc2616unquote(tmp);return filename=unescape(filename),filename=rfc5987decode(filename),filename=rfc2047decode(filename),fixupEncoding(filename)}if(tmp=rfc2231getparam(contentDisposition),tmp){const filename=rfc2047decode(tmp);return fixupEncoding(filename)}if(tmp=toParamRegExp("filename","i").exec(contentDisposition),tmp){tmp=tmp[1];let filename=rfc2616unquote(tmp);return filename=rfc2047decode(filename),fixupEncoding(filename)}
function toParamRegExp(attributePattern,flags2){return new RegExp("(?:^|;)\\s*"+attributePattern+'\\s*=\\s*([^";\\s][^;\\s]*|"(?:[^"\\\\]|\\\\"?)+"?)',flags2)}function textdecode(encoding,value){if(encoding){if(!/^[\x00-\xFF]+$/.test(value))return value;try{const decoder=new TextDecoder(encoding,{fatal:!0}),buffer=stringToBytes(value);value=decoder.decode(buffer),needsEncodingFixup=!1}catch{}}return value}function fixupEncoding(value){return needsEncodingFixup&&/[\x80-\xff]/.test(value)&&(value=
textdecode("utf-8",value),needsEncodingFixup&&(value=textdecode("iso-8859-1",value))),value}function rfc2231getparam(contentDispositionStr){const matches2=[];let match;const iter=toParamRegExp("filename\\*((?!0\\d)\\d+)(\\*?)","ig");for(;(match=iter.exec(contentDispositionStr))!==null;){let[,n,quot,part]=match;if(n=parseInt(n,10),n in matches2){if(n===0)break;continue}matches2[n]=[quot,part]}const parts=[];for(let n=0;n<matches2.length&&n in matches2;++n){let[quot,part]=matches2[n];part=rfc2616unquote(
part),quot&&(part=unescape(part),n===0&&(part=rfc5987decode(part))),parts.push(part)}return parts.join("")}function rfc2616unquote(value){if(value.startsWith('"')){const parts=value.slice(1).split('\\"');for(let i=0;i<parts.length;++i){const quotindex=parts[i].indexOf('"');quotindex!==-1&&(parts[i]=parts[i].slice(0,quotindex),parts.length=i+1),parts[i]=parts[i].replaceAll(/\\(.)/g,"$1")}value=parts.join('"')}return value}function rfc5987decode(extvalue){const encodingend=extvalue.indexOf("'");if(encodingend===
-1)return extvalue;const encoding=extvalue.slice(0,encodingend),value=extvalue.slice(encodingend+1).replace(/^[^']*'/,"");return textdecode(encoding,value)}function rfc2047decode(value){return!value.startsWith("=?")||/[\x00-\x19\x80-\xff]/.test(value)?value:value.replaceAll(/=\?([\w-]*)\?([QqBb])\?((?:[^?]|\?(?!=))*)\?=/g,function(matches2,charset,encoding,text2){if(encoding==="q"||encoding==="Q")return text2=text2.replaceAll("_"," "),text2=text2.replaceAll(/=([0-9a-fA-F]{2})/g,function(match,hex){
return String.fromCharCode(parseInt(hex,16))}),textdecode(charset,text2);try{text2=atob(text2)}catch{}return textdecode(charset,text2)})}return""}function createHeaders(isHttp,httpHeaders){const headers=new Headers;if(!isHttp||!httpHeaders||typeof httpHeaders!="object")return headers;for(const key2 in httpHeaders){const val=httpHeaders[key2];val!==void 0&&headers.append(key2,val)}return headers}function getResponseOrigin(url2){return URL.parse(url2)?.origin??null}function validateRangeRequestCapabilities({
responseHeaders,isHttp,rangeChunkSize,disableRange}){const returnValues={allowRangeRequests:!1,suggestedLength:void 0},length=parseInt(responseHeaders.get("Content-Length"),10);return!Number.isInteger(length)||(returnValues.suggestedLength=length,length<=2*rangeChunkSize)||disableRange||!isHttp||responseHeaders.get("Accept-Ranges")!=="bytes"||(responseHeaders.get("Content-Encoding")||"identity")!=="identity"||(returnValues.allowRangeRequests=!0),returnValues}function extractFilenameFromHeader(responseHeaders){
const contentDisposition=responseHeaders.get("Content-Disposition");if(contentDisposition){let filename=getFilenameFromContentDispositionHeader(contentDisposition);if(filename.includes("%"))try{filename=decodeURIComponent(filename)}catch{}if(isPdfFile(filename))return filename}return null}function createResponseError(status,url2){return new ResponseException(`Unexpected server response (${status}) while retrieving PDF "${url2}".`,status,status===404||status===0&&url2.startsWith("file:"))}function validateResponseStatus(status){
return status===200||status===206}function createFetchOptions(headers,withCredentials,abortController){return{method:"GET",headers,signal:abortController.signal,mode:"cors",credentials:withCredentials?"include":"same-origin",redirect:"follow"}}function getArrayBuffer(val){return val instanceof Uint8Array?val.buffer:val instanceof ArrayBuffer?val:(warn(`getArrayBuffer - unexpected data format: ${val}`),new Uint8Array(val).buffer)}class PDFFetchStream{_responseOrigin=null;constructor(source2){this.
source=source2,this.isHttp=/^https?:/i.test(source2.url),this.headers=createHeaders(this.isHttp,source2.httpHeaders),this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){return this._fullRequestReader?._loaded??0}getFullReader(){return assert$1(!this._fullRequestReader,"PDFFetchStream.getFullReader can only be called once."),this._fullRequestReader=new PDFFetchStreamReader(this),this._fullRequestReader}getRangeReader(begin,end){if(end<=this._progressiveDataLength)
return null;const reader=new PDFFetchStreamRangeReader(this,begin,end);return this._rangeRequestReaders.push(reader),reader}cancelAllRequests(reason){this._fullRequestReader?.cancel(reason);for(const reader of this._rangeRequestReaders.slice(0))reader.cancel(reason)}}class PDFFetchStreamReader{constructor(stream){this._stream=stream,this._reader=null,this._loaded=0,this._filename=null;const source2=stream.source;this._withCredentials=source2.withCredentials||!1,this._contentLength=source2.length,
this._headersCapability=Promise.withResolvers(),this._disableRange=source2.disableRange||!1,this._rangeChunkSize=source2.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._abortController=new AbortController,this._isStreamingSupported=!source2.disableStream,this._isRangeSupported=!source2.disableRange;const headers=new Headers(stream.headers),url2=source2.url;fetch(url2,createFetchOptions(headers,this._withCredentials,this._abortController)).then(response=>{
if(stream._responseOrigin=getResponseOrigin(response.url),!validateResponseStatus(response.status))throw createResponseError(response.status,url2);this._reader=response.body.getReader(),this._headersCapability.resolve();const responseHeaders=response.headers,{allowRangeRequests,suggestedLength}=validateRangeRequestCapabilities({responseHeaders,isHttp:stream.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});this._isRangeSupported=allowRangeRequests,this._contentLength=suggestedLength||
this._contentLength,this._filename=extractFilenameFromHeader(responseHeaders),!this._isStreamingSupported&&this._isRangeSupported&&this.cancel(new AbortException("Streaming is disabled."))}).catch(this._headersCapability.reject),this.onProgress=null}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){
await this._headersCapability.promise;const{value,done}=await this._reader.read();return done?{value,done}:(this._loaded+=value.byteLength,this.onProgress?.({loaded:this._loaded,total:this._contentLength}),{value:getArrayBuffer(value),done:!1})}cancel(reason){this._reader?.cancel(reason),this._abortController.abort()}}class PDFFetchStreamRangeReader{constructor(stream,begin,end){this._stream=stream,this._reader=null,this._loaded=0;const source2=stream.source;this._withCredentials=source2.withCredentials||
!1,this._readCapability=Promise.withResolvers(),this._isStreamingSupported=!source2.disableStream,this._abortController=new AbortController;const headers=new Headers(stream.headers);headers.append("Range",`bytes=${begin}-${end-1}`);const url2=source2.url;fetch(url2,createFetchOptions(headers,this._withCredentials,this._abortController)).then(response=>{const responseOrigin=getResponseOrigin(response.url);if(responseOrigin!==stream._responseOrigin)throw new Error(`Expected range response-origin "${responseOrigin}\
" to match "${stream._responseOrigin}".`);if(!validateResponseStatus(response.status))throw createResponseError(response.status,url2);this._readCapability.resolve(),this._reader=response.body.getReader()}).catch(this._readCapability.reject),this.onProgress=null}get isStreamingSupported(){return this._isStreamingSupported}async read(){await this._readCapability.promise;const{value,done}=await this._reader.read();return done?{value,done}:(this._loaded+=value.byteLength,this.onProgress?.({loaded:this.
_loaded}),{value:getArrayBuffer(value),done:!1})}cancel(reason){this._reader?.cancel(reason),this._abortController.abort()}}const OK_RESPONSE=200,PARTIAL_CONTENT_RESPONSE=206;function network_getArrayBuffer(xhr){const data=xhr.response;return typeof data!="string"?data:stringToBytes(data).buffer}class NetworkManager{_responseOrigin=null;constructor({url:url2,httpHeaders,withCredentials}){this.url=url2,this.isHttp=/^https?:/i.test(url2),this.headers=createHeaders(this.isHttp,httpHeaders),this.withCredentials=
withCredentials||!1,this.currXhrId=0,this.pendingRequests=Object.create(null)}request(args){const xhr=new XMLHttpRequest,xhrId=this.currXhrId++,pendingRequest=this.pendingRequests[xhrId]={xhr};xhr.open("GET",this.url),xhr.withCredentials=this.withCredentials;for(const[key2,val]of this.headers)xhr.setRequestHeader(key2,val);return this.isHttp&&"begin"in args&&"end"in args?(xhr.setRequestHeader("Range",`bytes=${args.begin}-${args.end-1}`),pendingRequest.expectedStatus=PARTIAL_CONTENT_RESPONSE):pendingRequest.
expectedStatus=OK_RESPONSE,xhr.responseType="arraybuffer",assert$1(args.onError,"Expected `onError` callback to be provided."),xhr.onerror=()=>{args.onError(xhr.status)},xhr.onreadystatechange=this.onStateChange.bind(this,xhrId),xhr.onprogress=this.onProgress.bind(this,xhrId),pendingRequest.onHeadersReceived=args.onHeadersReceived,pendingRequest.onDone=args.onDone,pendingRequest.onError=args.onError,pendingRequest.onProgress=args.onProgress,xhr.send(null),xhrId}onProgress(xhrId,evt){const pendingRequest=this.
pendingRequests[xhrId];pendingRequest&&pendingRequest.onProgress?.(evt)}onStateChange(xhrId,evt){const pendingRequest=this.pendingRequests[xhrId];if(!pendingRequest)return;const xhr=pendingRequest.xhr;if(xhr.readyState>=2&&pendingRequest.onHeadersReceived&&(pendingRequest.onHeadersReceived(),delete pendingRequest.onHeadersReceived),xhr.readyState!==4||!(xhrId in this.pendingRequests))return;if(delete this.pendingRequests[xhrId],xhr.status===0&&this.isHttp){pendingRequest.onError(xhr.status);return}
const xhrStatus=xhr.status||OK_RESPONSE;if(!(xhrStatus===OK_RESPONSE&&pendingRequest.expectedStatus===PARTIAL_CONTENT_RESPONSE)&&xhrStatus!==pendingRequest.expectedStatus){pendingRequest.onError(xhr.status);return}const chunk=network_getArrayBuffer(xhr);if(xhrStatus===PARTIAL_CONTENT_RESPONSE){const rangeHeader=xhr.getResponseHeader("Content-Range"),matches2=/bytes (\d+)-(\d+)\/(\d+)/.exec(rangeHeader);matches2?pendingRequest.onDone({begin:parseInt(matches2[1],10),chunk}):(warn('Missing or inval\
id "Content-Range" header.'),pendingRequest.onError(0))}else chunk?pendingRequest.onDone({begin:0,chunk}):pendingRequest.onError(xhr.status)}getRequestXhr(xhrId){return this.pendingRequests[xhrId].xhr}isPendingRequest(xhrId){return xhrId in this.pendingRequests}abortRequest(xhrId){const xhr=this.pendingRequests[xhrId].xhr;delete this.pendingRequests[xhrId],xhr.abort()}}class PDFNetworkStream{constructor(source2){this._source=source2,this._manager=new NetworkManager(source2),this._rangeChunkSize=
source2.rangeChunkSize,this._fullRequestReader=null,this._rangeRequestReaders=[]}_onRangeRequestReaderClosed(reader){const i=this._rangeRequestReaders.indexOf(reader);i>=0&&this._rangeRequestReaders.splice(i,1)}getFullReader(){return assert$1(!this._fullRequestReader,"PDFNetworkStream.getFullReader can only be called once."),this._fullRequestReader=new PDFNetworkStreamFullRequestReader(this._manager,this._source),this._fullRequestReader}getRangeReader(begin,end){const reader=new PDFNetworkStreamRangeRequestReader(
this._manager,begin,end);return reader.onClosed=this._onRangeRequestReaderClosed.bind(this),this._rangeRequestReaders.push(reader),reader}cancelAllRequests(reason){this._fullRequestReader?.cancel(reason);for(const reader of this._rangeRequestReaders.slice(0))reader.cancel(reason)}}class PDFNetworkStreamFullRequestReader{constructor(manager,source2){this._manager=manager,this._url=source2.url,this._fullRequestId=manager.request({onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.
bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)}),this._headersCapability=Promise.withResolvers(),this._disableRange=source2.disableRange||!1,this._contentLength=source2.length,this._rangeChunkSize=source2.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._isStreamingSupported=!1,this._isRangeSupported=!1,this._cachedChunks=[],this._requests=[],this._done=!1,this._storedError=void 0,this._filename=null,this.onProgress=null}_onHeadersReceived(){
const fullRequestXhrId=this._fullRequestId,fullRequestXhr=this._manager.getRequestXhr(fullRequestXhrId);this._manager._responseOrigin=getResponseOrigin(fullRequestXhr.responseURL);const rawResponseHeaders=fullRequestXhr.getAllResponseHeaders(),responseHeaders=new Headers(rawResponseHeaders?rawResponseHeaders.trimStart().replace(/[^\S ]+$/,"").split(/[\r\n]+/).map(x=>{const[key2,...val]=x.split(": ");return[key2,val.join(": ")]}):[]),{allowRangeRequests,suggestedLength}=validateRangeRequestCapabilities(
{responseHeaders,isHttp:this._manager.isHttp,rangeChunkSize:this._rangeChunkSize,disableRange:this._disableRange});allowRangeRequests&&(this._isRangeSupported=!0),this._contentLength=suggestedLength||this._contentLength,this._filename=extractFilenameFromHeader(responseHeaders),this._isRangeSupported&&this._manager.abortRequest(fullRequestXhrId),this._headersCapability.resolve()}_onDone(data){if(data&&(this._requests.length>0?this._requests.shift().resolve({value:data.chunk,done:!1}):this._cachedChunks.
push(data.chunk)),this._done=!0,!(this._cachedChunks.length>0)){for(const requestCapability of this._requests)requestCapability.resolve({value:void 0,done:!0});this._requests.length=0}}_onError(status){this._storedError=createResponseError(status,this._url),this._headersCapability.reject(this._storedError);for(const requestCapability of this._requests)requestCapability.reject(this._storedError);this._requests.length=0,this._cachedChunks.length=0}_onProgress(evt){this.onProgress?.({loaded:evt.loaded,
total:evt.lengthComputable?evt.total:this._contentLength})}get filename(){return this._filename}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}get contentLength(){return this._contentLength}get headersReady(){return this._headersCapability.promise}async read(){if(await this._headersCapability.promise,this._storedError)throw this._storedError;if(this._cachedChunks.length>0)return{value:this._cachedChunks.shift(),done:!1};if(this._done)
return{value:void 0,done:!0};const requestCapability=Promise.withResolvers();return this._requests.push(requestCapability),requestCapability.promise}cancel(reason){this._done=!0,this._headersCapability.reject(reason);for(const requestCapability of this._requests)requestCapability.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._fullRequestId)&&this._manager.abortRequest(this._fullRequestId),this._fullRequestReader=null}}class PDFNetworkStreamRangeRequestReader{constructor(manager,begin,end){
this._manager=manager,this._url=manager.url,this._requestId=manager.request({begin,end,onHeadersReceived:this._onHeadersReceived.bind(this),onDone:this._onDone.bind(this),onError:this._onError.bind(this),onProgress:this._onProgress.bind(this)}),this._requests=[],this._queuedChunk=null,this._done=!1,this._storedError=void 0,this.onProgress=null,this.onClosed=null}_onHeadersReceived(){const responseOrigin=getResponseOrigin(this._manager.getRequestXhr(this._requestId)?.responseURL);responseOrigin!==
this._manager._responseOrigin&&(this._storedError=new Error(`Expected range response-origin "${responseOrigin}" to match "${this._manager._responseOrigin}".`),this._onError(0))}_close(){this.onClosed?.(this)}_onDone(data){const chunk=data.chunk;this._requests.length>0?this._requests.shift().resolve({value:chunk,done:!1}):this._queuedChunk=chunk,this._done=!0;for(const requestCapability of this._requests)requestCapability.resolve({value:void 0,done:!0});this._requests.length=0,this._close()}_onError(status){
this._storedError??=createResponseError(status,this._url);for(const requestCapability of this._requests)requestCapability.reject(this._storedError);this._requests.length=0,this._queuedChunk=null}_onProgress(evt){this.isStreamingSupported||this.onProgress?.({loaded:evt.loaded})}get isStreamingSupported(){return!1}async read(){if(this._storedError)throw this._storedError;if(this._queuedChunk!==null){const chunk=this._queuedChunk;return this._queuedChunk=null,{value:chunk,done:!1}}if(this._done)return{
value:void 0,done:!0};const requestCapability=Promise.withResolvers();return this._requests.push(requestCapability),requestCapability.promise}cancel(reason){this._done=!0;for(const requestCapability of this._requests)requestCapability.resolve({value:void 0,done:!0});this._requests.length=0,this._manager.isPendingRequest(this._requestId)&&this._manager.abortRequest(this._requestId),this._close()}}const urlRegex=/^[a-z][a-z0-9\-+.]+:/i;function parseUrlOrPath(sourceUrl){if(urlRegex.test(sourceUrl))
return new URL(sourceUrl);const url2=process.getBuiltinModule("url");return new URL(url2.pathToFileURL(sourceUrl))}class PDFNodeStream{constructor(source2){this.source=source2,this.url=parseUrlOrPath(source2.url),assert$1(this.url.protocol==="file:","PDFNodeStream only supports file:// URLs."),this._fullRequestReader=null,this._rangeRequestReaders=[]}get _progressiveDataLength(){return this._fullRequestReader?._loaded??0}getFullReader(){return assert$1(!this._fullRequestReader,"PDFNodeStream.get\
FullReader can only be called once."),this._fullRequestReader=new PDFNodeStreamFsFullReader(this),this._fullRequestReader}getRangeReader(start2,end){if(end<=this._progressiveDataLength)return null;const rangeReader=new PDFNodeStreamFsRangeReader(this,start2,end);return this._rangeRequestReaders.push(rangeReader),rangeReader}cancelAllRequests(reason){this._fullRequestReader?.cancel(reason);for(const reader of this._rangeRequestReaders.slice(0))reader.cancel(reason)}}class PDFNodeStreamFsFullReader{constructor(stream){
this._url=stream.url,this._done=!1,this._storedError=null,this.onProgress=null;const source2=stream.source;this._contentLength=source2.length,this._loaded=0,this._filename=null,this._disableRange=source2.disableRange||!1,this._rangeChunkSize=source2.rangeChunkSize,!this._rangeChunkSize&&!this._disableRange&&(this._disableRange=!0),this._isStreamingSupported=!source2.disableStream,this._isRangeSupported=!source2.disableRange,this._readableStream=null,this._readCapability=Promise.withResolvers(),this.
_headersCapability=Promise.withResolvers();const fs=process.getBuiltinModule("fs");fs.promises.lstat(this._url).then(stat=>{this._contentLength=stat.size,this._setReadableStream(fs.createReadStream(this._url)),this._headersCapability.resolve()},error2=>{error2.code==="ENOENT"&&(error2=createResponseError(0,this._url.href)),this._storedError=error2,this._headersCapability.reject(error2)})}get headersReady(){return this._headersCapability.promise}get filename(){return this._filename}get contentLength(){
return this._contentLength}get isRangeSupported(){return this._isRangeSupported}get isStreamingSupported(){return this._isStreamingSupported}async read(){if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const chunk=this._readableStream.read();return chunk===null?(this._readCapability=Promise.withResolvers(),this.read()):(this._loaded+=chunk.length,this.onProgress?.({loaded:this._loaded,total:this._contentLength}),{value:new Uint8Array(
chunk).buffer,done:!1})}cancel(reason){if(!this._readableStream){this._error(reason);return}this._readableStream.destroy(reason)}_error(reason){this._storedError=reason,this._readCapability.resolve()}_setReadableStream(readableStream){this._readableStream=readableStream,readableStream.on("readable",()=>{this._readCapability.resolve()}),readableStream.on("end",()=>{readableStream.destroy(),this._done=!0,this._readCapability.resolve()}),readableStream.on("error",reason=>{this._error(reason)}),!this.
_isStreamingSupported&&this._isRangeSupported&&this._error(new AbortException("streaming is disabled")),this._storedError&&this._readableStream.destroy(this._storedError)}}class PDFNodeStreamFsRangeReader{constructor(stream,start2,end){this._url=stream.url,this._done=!1,this._storedError=null,this.onProgress=null,this._loaded=0,this._readableStream=null,this._readCapability=Promise.withResolvers();const source2=stream.source;this._isStreamingSupported=!source2.disableStream;const fs=process.getBuiltinModule(
"fs");this._setReadableStream(fs.createReadStream(this._url,{start:start2,end:end-1}))}get isStreamingSupported(){return this._isStreamingSupported}async read(){if(await this._readCapability.promise,this._done)return{value:void 0,done:!0};if(this._storedError)throw this._storedError;const chunk=this._readableStream.read();return chunk===null?(this._readCapability=Promise.withResolvers(),this.read()):(this._loaded+=chunk.length,this.onProgress?.({loaded:this._loaded}),{value:new Uint8Array(chunk).
buffer,done:!1})}cancel(reason){if(!this._readableStream){this._error(reason);return}this._readableStream.destroy(reason)}_error(reason){this._storedError=reason,this._readCapability.resolve()}_setReadableStream(readableStream){this._readableStream=readableStream,readableStream.on("readable",()=>{this._readCapability.resolve()}),readableStream.on("end",()=>{readableStream.destroy(),this._done=!0,this._readCapability.resolve()}),readableStream.on("error",reason=>{this._error(reason)}),this._storedError&&
this._readableStream.destroy(this._storedError)}}const INITIAL_DATA=Symbol("INITIAL_DATA");class PDFObjects{#objs=Object.create(null);#ensureObj(objId){return this.#objs[objId]||={...Promise.withResolvers(),data:INITIAL_DATA}}get(objId,callback=null){if(callback){const obj2=this.#ensureObj(objId);return obj2.promise.then(()=>callback(obj2.data)),null}const obj=this.#objs[objId];if(!obj||obj.data===INITIAL_DATA)throw new Error(`Requesting object that isn't resolved yet ${objId}.`);return obj.data}has(objId){
const obj=this.#objs[objId];return!!obj&&obj.data!==INITIAL_DATA}delete(objId){const obj=this.#objs[objId];return!obj||obj.data===INITIAL_DATA?!1:(delete this.#objs[objId],!0)}resolve(objId,data=null){const obj=this.#ensureObj(objId);obj.data=data,obj.resolve()}clear(){for(const objId in this.#objs){const{data}=this.#objs[objId];data?.bitmap?.close()}this.#objs=Object.create(null)}*[Symbol.iterator](){for(const objId in this.#objs){const{data}=this.#objs[objId];data!==INITIAL_DATA&&(yield[objId,
data])}}}const MAX_TEXT_DIVS_TO_RENDER=1e5,DEFAULT_FONT_SIZE=30;class TextLayer{#capability=Promise.withResolvers();#container=null;#disableProcessItems=!1;#fontInspectorEnabled=!!globalThis.FontInspector?.enabled;#lang=null;#layoutTextParams=null;#pageHeight=0;#pageWidth=0;#reader=null;#rootContainer=null;#rotation=0;#scale=0;#styleCache=Object.create(null);#textContentItemsStr=[];#textContentSource=null;#textDivs=[];#textDivProperties=new WeakMap;#transform=null;static#ascentCache=new Map;static#canvasContexts=new Map;static#canvasCtxFonts=new WeakMap;static#minFontSize=null;static#pendingTextLayers=new Set;constructor({
textContentSource,container:container2,viewport}){if(textContentSource instanceof ReadableStream)this.#textContentSource=textContentSource;else if(typeof textContentSource=="object")this.#textContentSource=new ReadableStream({start(controller){controller.enqueue(textContentSource),controller.close()}});else throw new Error('No "textContentSource" parameter specified.');this.#container=this.#rootContainer=container2,this.#scale=viewport.scale*OutputScale.pixelRatio,this.#rotation=viewport.rotation,
this.#layoutTextParams={div:null,properties:null,ctx:null};const{pageWidth,pageHeight,pageX,pageY}=viewport.rawDims;this.#transform=[1,0,0,-1,-pageX,pageY+pageHeight],this.#pageWidth=pageWidth,this.#pageHeight=pageHeight,TextLayer.#ensureMinFontSizeComputed(),setLayerDimensions(container2,viewport),this.#capability.promise.finally(()=>{TextLayer.#pendingTextLayers.delete(this),this.#layoutTextParams=null,this.#styleCache=null}).catch(()=>{})}static get fontFamilyMap(){const{isWindows,isFirefox}=util_FeatureTest.
platform;return shadow(this,"fontFamilyMap",new Map([["sans-serif",`${isWindows&&isFirefox?"Calibri, ":""}sans-serif`],["monospace",`${isWindows&&isFirefox?"Lucida Console, ":""}monospace`]]))}render(){const pump=()=>{this.#reader.read().then(({value,done})=>{if(done){this.#capability.resolve();return}this.#lang??=value.lang,Object.assign(this.#styleCache,value.styles),this.#processItems(value.items),pump()},this.#capability.reject)};return this.#reader=this.#textContentSource.getReader(),TextLayer.#pendingTextLayers.
add(this),pump(),this.#capability.promise}update({viewport,onBefore=null}){const scale2=viewport.scale*OutputScale.pixelRatio,rotation=viewport.rotation;if(rotation!==this.#rotation&&(onBefore?.(),this.#rotation=rotation,setLayerDimensions(this.#rootContainer,{rotation})),scale2!==this.#scale){onBefore?.(),this.#scale=scale2;const params={div:null,properties:null,ctx:TextLayer.#getCtx(this.#lang)};for(const div of this.#textDivs)params.properties=this.#textDivProperties.get(div),params.div=div,this.#layout(
params)}}cancel(){const abortEx=new AbortException("TextLayer task cancelled.");this.#reader?.cancel(abortEx).catch(()=>{}),this.#reader=null,this.#capability.reject(abortEx)}get textDivs(){return this.#textDivs}get textContentItemsStr(){return this.#textContentItemsStr}#processItems(items2){if(this.#disableProcessItems)return;this.#layoutTextParams.ctx??=TextLayer.#getCtx(this.#lang);const textDivs=this.#textDivs,textContentItemsStr=this.#textContentItemsStr;for(const item of items2){if(textDivs.
length>MAX_TEXT_DIVS_TO_RENDER){warn("Ignoring additional textDivs for performance reasons."),this.#disableProcessItems=!0;return}if(item.str===void 0){if(item.type==="beginMarkedContentProps"||item.type==="beginMarkedContent"){const parent=this.#container;this.#container=document.createElement("span"),this.#container.classList.add("markedContent"),item.id&&this.#container.setAttribute("id",`${item.id}`),parent.append(this.#container)}else item.type==="endMarkedContent"&&(this.#container=this.#container.
parentNode);continue}textContentItemsStr.push(item.str),this.#appendText(item)}}#appendText(geom){const textDiv=document.createElement("span"),textDivProperties={angle:0,canvasWidth:0,hasText:geom.str!=="",hasEOL:geom.hasEOL,fontSize:0};this.#textDivs.push(textDiv);const tx=Util.transform(this.#transform,geom.transform);let angle=Math.atan2(tx[1],tx[0]);const style2=this.#styleCache[geom.fontName];style2.vertical&&(angle+=Math.PI/2);let fontFamily=this.#fontInspectorEnabled&&style2.fontSubstitution||
style2.fontFamily;fontFamily=TextLayer.fontFamilyMap.get(fontFamily)||fontFamily;const fontHeight=Math.hypot(tx[2],tx[3]),fontAscent=fontHeight*TextLayer.#getAscent(fontFamily,style2,this.#lang);let left,top;angle===0?(left=tx[4],top=tx[5]-fontAscent):(left=tx[4]+fontAscent*Math.sin(angle),top=tx[5]-fontAscent*Math.cos(angle));const scaleFactorStr="calc(var(--total-scale-factor) *",divStyle=textDiv.style;this.#container===this.#rootContainer?(divStyle.left=`${(100*left/this.#pageWidth).toFixed(2)}\
%`,divStyle.top=`${(100*top/this.#pageHeight).toFixed(2)}%`):(divStyle.left=`${scaleFactorStr}${left.toFixed(2)}px)`,divStyle.top=`${scaleFactorStr}${top.toFixed(2)}px)`),divStyle.fontSize=`${scaleFactorStr}${(TextLayer.#minFontSize*fontHeight).toFixed(2)}px)`,divStyle.fontFamily=fontFamily,textDivProperties.fontSize=fontHeight,textDiv.setAttribute("role","presentation"),textDiv.textContent=geom.str,textDiv.dir=geom.dir,this.#fontInspectorEnabled&&(textDiv.dataset.fontName=style2.fontSubstitutionLoadedName||
geom.fontName),angle!==0&&(textDivProperties.angle=angle*(180/Math.PI));let shouldScaleText=!1;if(geom.str.length>1)shouldScaleText=!0;else if(geom.str!==" "&&geom.transform[0]!==geom.transform[3]){const absScaleX=Math.abs(geom.transform[0]),absScaleY=Math.abs(geom.transform[3]);absScaleX!==absScaleY&&Math.max(absScaleX,absScaleY)/Math.min(absScaleX,absScaleY)>1.5&&(shouldScaleText=!0)}if(shouldScaleText&&(textDivProperties.canvasWidth=style2.vertical?geom.height:geom.width),this.#textDivProperties.
set(textDiv,textDivProperties),this.#layoutTextParams.div=textDiv,this.#layoutTextParams.properties=textDivProperties,this.#layout(this.#layoutTextParams),textDivProperties.hasText&&this.#container.append(textDiv),textDivProperties.hasEOL){const br2=document.createElement("br");br2.setAttribute("role","presentation"),this.#container.append(br2)}}#layout(params){const{div,properties:properties2,ctx}=params,{style:style2}=div;let transform2="";if(TextLayer.#minFontSize>1&&(transform2=`scale(${1/TextLayer.#minFontSize}\
)`),properties2.canvasWidth!==0&&properties2.hasText){const{fontFamily}=style2,{canvasWidth,fontSize}=properties2;TextLayer.#ensureCtxFont(ctx,fontSize*this.#scale,fontFamily);const{width}=ctx.measureText(div.textContent);width>0&&(transform2=`scaleX(${canvasWidth*this.#scale/width}) ${transform2}`)}properties2.angle!==0&&(transform2=`rotate(${properties2.angle}deg) ${transform2}`),transform2.length>0&&(style2.transform=transform2)}static cleanup(){if(!(this.#pendingTextLayers.size>0)){this.#ascentCache.
clear();for(const{canvas}of this.#canvasContexts.values())canvas.remove();this.#canvasContexts.clear()}}static#getCtx(lang=null){let ctx=this.#canvasContexts.get(lang||="");if(!ctx){const canvas=document.createElement("canvas");canvas.className="hiddenCanvasElement",canvas.lang=lang,document.body.append(canvas),ctx=canvas.getContext("2d",{alpha:!1,willReadFrequently:!0}),this.#canvasContexts.set(lang,ctx),this.#canvasCtxFonts.set(ctx,{size:0,family:""})}return ctx}static#ensureCtxFont(ctx,size2,family){
const cached2=this.#canvasCtxFonts.get(ctx);size2===cached2.size&&family===cached2.family||(ctx.font=`${size2}px ${family}`,cached2.size=size2,cached2.family=family)}static#ensureMinFontSizeComputed(){if(this.#minFontSize!==null)return;const div=document.createElement("div");div.style.opacity=0,div.style.lineHeight=1,div.style.fontSize="1px",div.style.position="absolute",div.textContent="X",document.body.append(div),this.#minFontSize=div.getBoundingClientRect().height,div.remove()}static#getAscent(fontFamily,style2,lang){
const cachedAscent=this.#ascentCache.get(fontFamily);if(cachedAscent)return cachedAscent;const ctx=this.#getCtx(lang);ctx.canvas.width=ctx.canvas.height=DEFAULT_FONT_SIZE,this.#ensureCtxFont(ctx,DEFAULT_FONT_SIZE,fontFamily);const metrics=ctx.measureText(""),ascent=metrics.fontBoundingBoxAscent,descent=Math.abs(metrics.fontBoundingBoxDescent);ctx.canvas.width=ctx.canvas.height=0;let ratio=.8;return ascent?ratio=ascent/(ascent+descent):(util_FeatureTest.platform.isFirefox&&warn("Enable the `dom.t\
extMetrics.fontBoundingBox.enabled` preference in `about:config` to improve TextLayer rendering."),style2.ascent?ratio=style2.ascent:style2.descent&&(ratio=1+style2.descent)),this.#ascentCache.set(fontFamily,ratio),ratio}}class XfaText{static textContent(xfa){const items2=[],output={items:items2,styles:Object.create(null)};function walk(node2){if(!node2)return;let str=null;const name=node2.name;if(name==="#text")str=node2.value;else if(XfaText.shouldBuildText(name))node2?.attributes?.textContent?
str=node2.attributes.textContent:node2.value&&(str=node2.value);else return;if(str!==null&&items2.push({str}),!!node2.children)for(const child2 of node2.children)walk(child2)}return walk(xfa),output}static shouldBuildText(name){return!(name==="textarea"||name==="input"||name==="option"||name==="select")}}const RENDERING_CANCELLED_TIMEOUT=100;function getDocument(src={}){typeof src=="string"||src instanceof URL?src={url:src}:(src instanceof ArrayBuffer||ArrayBuffer.isView(src))&&(src={data:src});
const task=new PDFDocumentLoadingTask,{docId}=task,url2=src.url?getUrlProp(src.url):null,data=src.data?getDataProp(src.data):null,httpHeaders=src.httpHeaders||null,withCredentials=src.withCredentials===!0,password=src.password??null,rangeTransport=src.range instanceof PDFDataRangeTransport?src.range:null,rangeChunkSize=Number.isInteger(src.rangeChunkSize)&&src.rangeChunkSize>0?src.rangeChunkSize:2**16;let worker=src.worker instanceof PDFWorker?src.worker:null;const verbosity2=src.verbosity,docBaseUrl=typeof src.
docBaseUrl=="string"&&!isDataScheme(src.docBaseUrl)?src.docBaseUrl:null,cMapUrl=getFactoryUrlProp(src.cMapUrl),cMapPacked=src.cMapPacked!==!1,CMapReaderFactory=src.CMapReaderFactory||(isNodeJS?NodeCMapReaderFactory:DOMCMapReaderFactory),iccUrl=getFactoryUrlProp(src.iccUrl),standardFontDataUrl=getFactoryUrlProp(src.standardFontDataUrl),StandardFontDataFactory=src.StandardFontDataFactory||(isNodeJS?NodeStandardFontDataFactory:DOMStandardFontDataFactory),wasmUrl=getFactoryUrlProp(src.wasmUrl),WasmFactory=src.
WasmFactory||(isNodeJS?NodeWasmFactory:DOMWasmFactory),ignoreErrors=src.stopAtErrors!==!0,maxImageSize=Number.isInteger(src.maxImageSize)&&src.maxImageSize>-1?src.maxImageSize:-1,isEvalSupported2=src.isEvalSupported!==!1,isOffscreenCanvasSupported=typeof src.isOffscreenCanvasSupported=="boolean"?src.isOffscreenCanvasSupported:!isNodeJS,isImageDecoderSupported=typeof src.isImageDecoderSupported=="boolean"?src.isImageDecoderSupported:!isNodeJS&&(util_FeatureTest.platform.isFirefox||!globalThis.chrome),
canvasMaxAreaInBytes=Number.isInteger(src.canvasMaxAreaInBytes)?src.canvasMaxAreaInBytes:-1,disableFontFace=typeof src.disableFontFace=="boolean"?src.disableFontFace:isNodeJS,fontExtraProperties=src.fontExtraProperties===!0,enableXfa=src.enableXfa===!0,ownerDocument=src.ownerDocument||globalThis.document,disableRange=src.disableRange===!0,disableStream=src.disableStream===!0,disableAutoFetch=src.disableAutoFetch===!0,pdfBug=src.pdfBug===!0,CanvasFactory=src.CanvasFactory||(isNodeJS?NodeCanvasFactory:
DOMCanvasFactory),FilterFactory=src.FilterFactory||(isNodeJS?NodeFilterFactory:DOMFilterFactory),enableHWA=src.enableHWA===!0,useWasm=src.useWasm!==!1,length=rangeTransport?rangeTransport.length:src.length??NaN,useSystemFonts=typeof src.useSystemFonts=="boolean"?src.useSystemFonts:!isNodeJS&&!disableFontFace,useWorkerFetch=typeof src.useWorkerFetch=="boolean"?src.useWorkerFetch:!!(CMapReaderFactory===DOMCMapReaderFactory&&StandardFontDataFactory===DOMStandardFontDataFactory&&WasmFactory===DOMWasmFactory&&
cMapUrl&&standardFontDataUrl&&wasmUrl&&isValidFetchUrl(cMapUrl,document.baseURI)&&isValidFetchUrl(standardFontDataUrl,document.baseURI)&&isValidFetchUrl(wasmUrl,document.baseURI)),styleElement2=null;setVerbosityLevel(verbosity2);const transportFactory={canvasFactory:new CanvasFactory({ownerDocument,enableHWA}),filterFactory:new FilterFactory({docId,ownerDocument}),cMapReaderFactory:useWorkerFetch?null:new CMapReaderFactory({baseUrl:cMapUrl,isCompressed:cMapPacked}),standardFontDataFactory:useWorkerFetch?
null:new StandardFontDataFactory({baseUrl:standardFontDataUrl}),wasmFactory:useWorkerFetch?null:new WasmFactory({baseUrl:wasmUrl})};worker||(worker=PDFWorker.create({verbosity:verbosity2,port:GlobalWorkerOptions.workerPort}),task._worker=worker);const docParams={docId,apiVersion:"5.4.54",data,password,disableAutoFetch,rangeChunkSize,length,docBaseUrl,enableXfa,evaluatorOptions:{maxImageSize,disableFontFace,ignoreErrors,isEvalSupported:isEvalSupported2,isOffscreenCanvasSupported,isImageDecoderSupported,
canvasMaxAreaInBytes,fontExtraProperties,useSystemFonts,useWasm,useWorkerFetch,cMapUrl,iccUrl,standardFontDataUrl,wasmUrl}},transportParams={ownerDocument,pdfBug,styleElement:styleElement2,loadingParams:{disableAutoFetch,enableXfa}};return worker.promise.then(function(){if(task.destroyed)throw new Error("Loading aborted");if(worker.destroyed)throw new Error("Worker was destroyed");const workerIdPromise=worker.messageHandler.sendWithPromise("GetDocRequest",docParams,data?[data.buffer]:null);let networkStream;
if(rangeTransport)networkStream=new PDFDataTransportStream(rangeTransport,{disableRange,disableStream});else if(!data){if(!url2)throw new Error("getDocument - no `url` parameter provided.");const NetworkStream=isValidFetchUrl(url2)?PDFFetchStream:isNodeJS?PDFNodeStream:PDFNetworkStream;networkStream=new NetworkStream({url:url2,length,httpHeaders,withCredentials,rangeChunkSize,disableRange,disableStream})}return workerIdPromise.then(workerId=>{if(task.destroyed)throw new Error("Loading aborted");
if(worker.destroyed)throw new Error("Worker was destroyed");const messageHandler=new MessageHandler(docId,workerId,worker.port),transport=new WorkerTransport(messageHandler,task,networkStream,transportParams,transportFactory,enableHWA);task._transport=transport,messageHandler.send("Ready",null)})}).catch(task._capability.reject),task}class PDFDocumentLoadingTask{static#docId=0;_capability=Promise.withResolvers();_transport=null;_worker=null;docId=`d${PDFDocumentLoadingTask.#docId++}`;destroyed=!1;onPassword=null;onProgress=null;get promise(){
return this._capability.promise}async destroy(){this.destroyed=!0;try{this._worker?.port&&(this._worker._pendingDestroy=!0),await this._transport?.destroy()}catch(ex){throw this._worker?.port&&delete this._worker._pendingDestroy,ex}this._transport=null,this._worker?.destroy(),this._worker=null}async getData(){return this._transport.getData()}}class PDFDataRangeTransport{#capability=Promise.withResolvers();#progressiveDoneListeners=[];#progressiveReadListeners=[];#progressListeners=[];#rangeListeners=[];constructor(length,initialData,progressiveDone=!1,contentDispositionFilename=null){
this.length=length,this.initialData=initialData,this.progressiveDone=progressiveDone,this.contentDispositionFilename=contentDispositionFilename}addRangeListener(listener){this.#rangeListeners.push(listener)}addProgressListener(listener){this.#progressListeners.push(listener)}addProgressiveReadListener(listener){this.#progressiveReadListeners.push(listener)}addProgressiveDoneListener(listener){this.#progressiveDoneListeners.push(listener)}onDataRange(begin,chunk){for(const listener of this.#rangeListeners)
listener(begin,chunk)}onDataProgress(loaded,total){this.#capability.promise.then(()=>{for(const listener of this.#progressListeners)listener(loaded,total)})}onDataProgressiveRead(chunk){this.#capability.promise.then(()=>{for(const listener of this.#progressiveReadListeners)listener(chunk)})}onDataProgressiveDone(){this.#capability.promise.then(()=>{for(const listener of this.#progressiveDoneListeners)listener()})}transportReady(){this.#capability.resolve()}requestDataRange(begin,end){unreachable(
"Abstract method PDFDataRangeTransport.requestDataRange")}abort(){}}class PDFDocumentProxy{constructor(pdfInfo,transport){this._pdfInfo=pdfInfo,this._transport=transport}get annotationStorage(){return this._transport.annotationStorage}get canvasFactory(){return this._transport.canvasFactory}get filterFactory(){return this._transport.filterFactory}get numPages(){return this._pdfInfo.numPages}get fingerprints(){return this._pdfInfo.fingerprints}get isPureXfa(){return shadow(this,"isPureXfa",!!this.
_transport._htmlForXfa)}get allXfaHtml(){return this._transport._htmlForXfa}getPage(pageNumber){return this._transport.getPage(pageNumber)}getPageIndex(ref2){return this._transport.getPageIndex(ref2)}getDestinations(){return this._transport.getDestinations()}getDestination(id2){return this._transport.getDestination(id2)}getPageLabels(){return this._transport.getPageLabels()}getPageLayout(){return this._transport.getPageLayout()}getPageMode(){return this._transport.getPageMode()}getViewerPreferences(){
return this._transport.getViewerPreferences()}getOpenAction(){return this._transport.getOpenAction()}getAttachments(){return this._transport.getAttachments()}getJSActions(){return this._transport.getDocJSActions()}getOutline(){return this._transport.getOutline()}getOptionalContentConfig({intent="display"}={}){const{renderingIntent}=this._transport.getRenderingIntent(intent);return this._transport.getOptionalContentConfig(renderingIntent)}getPermissions(){return this._transport.getPermissions()}getMetadata(){
return this._transport.getMetadata()}getMarkInfo(){return this._transport.getMarkInfo()}getData(){return this._transport.getData()}saveDocument(){return this._transport.saveDocument()}getDownloadInfo(){return this._transport.downloadInfoCapability.promise}cleanup(keepLoadedFonts=!1){return this._transport.startCleanup(keepLoadedFonts||this.isPureXfa)}destroy(){return this.loadingTask.destroy()}cachedPageNumber(ref2){return this._transport.cachedPageNumber(ref2)}get loadingParams(){return this._transport.
loadingParams}get loadingTask(){return this._transport.loadingTask}getFieldObjects(){return this._transport.getFieldObjects()}hasJSActions(){return this._transport.hasJSActions()}getCalculationOrderIds(){return this._transport.getCalculationOrderIds()}}class PDFPageProxy{#pendingCleanup=!1;constructor(pageIndex,pageInfo,transport,pdfBug=!1){this._pageIndex=pageIndex,this._pageInfo=pageInfo,this._transport=transport,this._stats=pdfBug?new StatTimer:null,this._pdfBug=pdfBug,this.commonObjs=transport.
commonObjs,this.objs=new PDFObjects,this._intentStates=new Map,this.destroyed=!1}get pageNumber(){return this._pageIndex+1}get rotate(){return this._pageInfo.rotate}get ref(){return this._pageInfo.ref}get userUnit(){return this._pageInfo.userUnit}get view(){return this._pageInfo.view}getViewport({scale:scale2,rotation=this.rotate,offsetX=0,offsetY=0,dontFlip=!1}={}){return new PageViewport({viewBox:this.view,userUnit:this.userUnit,scale:scale2,rotation,offsetX,offsetY,dontFlip})}getAnnotations({
intent="display"}={}){const{renderingIntent}=this._transport.getRenderingIntent(intent);return this._transport.getAnnotations(this._pageIndex,renderingIntent)}getJSActions(){return this._transport.getPageJSActions(this._pageIndex)}get filterFactory(){return this._transport.filterFactory}get isPureXfa(){return shadow(this,"isPureXfa",!!this._transport._htmlForXfa)}async getXfa(){return this._transport._htmlForXfa?.children[this._pageIndex]||null}render({canvasContext,canvas=canvasContext.canvas,viewport,
intent="display",annotationMode=AnnotationMode.ENABLE,transform:transform2=null,background=null,optionalContentConfigPromise=null,annotationCanvasMap=null,pageColors=null,printAnnotationStorage=null,isEditing:isEditing2=!1}){this._stats?.time("Overall");const intentArgs=this._transport.getRenderingIntent(intent,annotationMode,printAnnotationStorage,isEditing2),{renderingIntent,cacheKey}=intentArgs;this.#pendingCleanup=!1,optionalContentConfigPromise||=this._transport.getOptionalContentConfig(renderingIntent);
let intentState=this._intentStates.get(cacheKey);intentState||(intentState=Object.create(null),this._intentStates.set(cacheKey,intentState)),intentState.streamReaderCancelTimeout&&(clearTimeout(intentState.streamReaderCancelTimeout),intentState.streamReaderCancelTimeout=null);const intentPrint=!!(renderingIntent&RenderingIntentFlag.PRINT);intentState.displayReadyCapability||(intentState.displayReadyCapability=Promise.withResolvers(),intentState.operatorList={fnArray:[],argsArray:[],lastChunk:!1,
separateAnnots:null},this._stats?.time("Page Request"),this._pumpOperatorList(intentArgs));const complete=error2=>{intentState.renderTasks.delete(internalRenderTask),intentPrint&&(this.#pendingCleanup=!0),this.#tryCleanup(),error2?(internalRenderTask.capability.reject(error2),this._abortOperatorList({intentState,reason:error2 instanceof Error?error2:new Error(error2)})):internalRenderTask.capability.resolve(),this._stats&&(this._stats.timeEnd("Rendering"),this._stats.timeEnd("Overall"),globalThis.
Stats?.enabled&&globalThis.Stats.add(this.pageNumber,this._stats))},internalRenderTask=new InternalRenderTask({callback:complete,params:{canvas,canvasContext,viewport,transform:transform2,background},objs:this.objs,commonObjs:this.commonObjs,annotationCanvasMap,operatorList:intentState.operatorList,pageIndex:this._pageIndex,canvasFactory:this._transport.canvasFactory,filterFactory:this._transport.filterFactory,useRequestAnimationFrame:!intentPrint,pdfBug:this._pdfBug,pageColors,enableHWA:this._transport.
enableHWA});(intentState.renderTasks||=new Set).add(internalRenderTask);const renderTask=internalRenderTask.task;return Promise.all([intentState.displayReadyCapability.promise,optionalContentConfigPromise]).then(([transparency,optionalContentConfig])=>{if(this.destroyed){complete();return}if(this._stats?.time("Rendering"),!(optionalContentConfig.renderingIntent&renderingIntent))throw new Error("Must use the same `intent`-argument when calling the `PDFPageProxy.render` and `PDFDocumentProxy.getOp\
tionalContentConfig` methods.");internalRenderTask.initializeGraphics({transparency,optionalContentConfig}),internalRenderTask.operatorListChanged()}).catch(complete),renderTask}getOperatorList({intent="display",annotationMode=AnnotationMode.ENABLE,printAnnotationStorage=null,isEditing:isEditing2=!1}={}){function operatorListChanged(){intentState.operatorList.lastChunk&&(intentState.opListReadCapability.resolve(intentState.operatorList),intentState.renderTasks.delete(opListTask))}const intentArgs=this.
_transport.getRenderingIntent(intent,annotationMode,printAnnotationStorage,isEditing2,!0);let intentState=this._intentStates.get(intentArgs.cacheKey);intentState||(intentState=Object.create(null),this._intentStates.set(intentArgs.cacheKey,intentState));let opListTask;return intentState.opListReadCapability||(opListTask=Object.create(null),opListTask.operatorListChanged=operatorListChanged,intentState.opListReadCapability=Promise.withResolvers(),(intentState.renderTasks||=new Set).add(opListTask),
intentState.operatorList={fnArray:[],argsArray:[],lastChunk:!1,separateAnnots:null},this._stats?.time("Page Request"),this._pumpOperatorList(intentArgs)),intentState.opListReadCapability.promise}streamTextContent({includeMarkedContent=!1,disableNormalization=!1}={}){return this._transport.messageHandler.sendWithStream("GetTextContent",{pageIndex:this._pageIndex,includeMarkedContent:includeMarkedContent===!0,disableNormalization:disableNormalization===!0},{highWaterMark:100,size(textContent){return textContent.
items.length}})}getTextContent(params={}){if(this._transport._htmlForXfa)return this.getXfa().then(xfa=>XfaText.textContent(xfa));const readableStream=this.streamTextContent(params);return new Promise(function(resolve2,reject){function pump(){reader.read().then(function({value,done}){if(done){resolve2(textContent);return}textContent.lang??=value.lang,Object.assign(textContent.styles,value.styles),textContent.items.push(...value.items),pump()},reject)}const reader=readableStream.getReader(),textContent={
items:[],styles:Object.create(null),lang:null};pump()})}getStructTree(){return this._transport.getStructTree(this._pageIndex)}_destroy(){this.destroyed=!0;const waitOn=[];for(const intentState of this._intentStates.values())if(this._abortOperatorList({intentState,reason:new Error("Page was destroyed."),force:!0}),!intentState.opListReadCapability)for(const internalRenderTask of intentState.renderTasks)waitOn.push(internalRenderTask.completed),internalRenderTask.cancel();return this.objs.clear(),
this.#pendingCleanup=!1,Promise.all(waitOn)}cleanup(resetStats=!1){this.#pendingCleanup=!0;const success=this.#tryCleanup();return resetStats&&success&&(this._stats&&=new StatTimer),success}#tryCleanup(){if(!this.#pendingCleanup||this.destroyed)return!1;for(const{renderTasks,operatorList}of this._intentStates.values())if(renderTasks.size>0||!operatorList.lastChunk)return!1;return this._intentStates.clear(),this.objs.clear(),this.#pendingCleanup=!1,!0}_startRenderPage(transparency,cacheKey){const intentState=this.
_intentStates.get(cacheKey);intentState&&(this._stats?.timeEnd("Page Request"),intentState.displayReadyCapability?.resolve(transparency))}_renderPageChunk(operatorListChunk,intentState){for(let i=0,ii=operatorListChunk.length;i<ii;i++)intentState.operatorList.fnArray.push(operatorListChunk.fnArray[i]),intentState.operatorList.argsArray.push(operatorListChunk.argsArray[i]);intentState.operatorList.lastChunk=operatorListChunk.lastChunk,intentState.operatorList.separateAnnots=operatorListChunk.separateAnnots;
for(const internalRenderTask of intentState.renderTasks)internalRenderTask.operatorListChanged();operatorListChunk.lastChunk&&this.#tryCleanup()}_pumpOperatorList({renderingIntent,cacheKey,annotationStorageSerializable,modifiedIds}){const{map:map2,transfer}=annotationStorageSerializable,reader=this._transport.messageHandler.sendWithStream("GetOperatorList",{pageIndex:this._pageIndex,intent:renderingIntent,cacheKey,annotationStorage:map2,modifiedIds},transfer).getReader(),intentState=this._intentStates.
get(cacheKey);intentState.streamReader=reader;const pump=()=>{reader.read().then(({value,done})=>{if(done){intentState.streamReader=null;return}this._transport.destroyed||(this._renderPageChunk(value,intentState),pump())},reason=>{if(intentState.streamReader=null,!this._transport.destroyed){if(intentState.operatorList){intentState.operatorList.lastChunk=!0;for(const internalRenderTask of intentState.renderTasks)internalRenderTask.operatorListChanged();this.#tryCleanup()}if(intentState.displayReadyCapability)
intentState.displayReadyCapability.reject(reason);else if(intentState.opListReadCapability)intentState.opListReadCapability.reject(reason);else throw reason}})};pump()}_abortOperatorList({intentState,reason,force=!1}){if(intentState.streamReader){if(intentState.streamReaderCancelTimeout&&(clearTimeout(intentState.streamReaderCancelTimeout),intentState.streamReaderCancelTimeout=null),!force){if(intentState.renderTasks.size>0)return;if(reason instanceof RenderingCancelledException){let delay=RENDERING_CANCELLED_TIMEOUT;
reason.extraDelay>0&&reason.extraDelay<1e3&&(delay+=reason.extraDelay),intentState.streamReaderCancelTimeout=setTimeout(()=>{intentState.streamReaderCancelTimeout=null,this._abortOperatorList({intentState,reason,force:!0})},delay);return}}if(intentState.streamReader.cancel(new AbortException(reason.message)).catch(()=>{}),intentState.streamReader=null,!this._transport.destroyed){for(const[curCacheKey,curIntentState]of this._intentStates)if(curIntentState===intentState){this._intentStates.delete(
curCacheKey);break}this.cleanup()}}}get stats(){return this._stats}}var _capability,_messageHandler,_port,_webWorker,_fakeWorkerId,_isWorkerDisabled,_workerPorts,_PDFWorker_instances,resolve_fn,initializeFromPort_fn,initialize_fn,setupFakeWorker_fn,_PDFWorker_static,mainThreadWorkerMessageHandler_get;const _PDFWorker=class _PDFWorker{constructor({name=null,port=null,verbosity:verbosity2=getVerbosityLevel()}={}){__privateAdd(this,_PDFWorker_instances);__privateAdd(this,_capability,Promise.withResolvers());
__privateAdd(this,_messageHandler,null);__privateAdd(this,_port,null);__privateAdd(this,_webWorker,null);if(this.name=name,this.destroyed=!1,this.verbosity=verbosity2,port){if(__privateGet(_PDFWorker,_workerPorts).has(port))throw new Error("Cannot use more than one PDFWorker per port.");__privateGet(_PDFWorker,_workerPorts).set(port,this),__privateMethod(this,_PDFWorker_instances,initializeFromPort_fn).call(this,port)}else __privateMethod(this,_PDFWorker_instances,initialize_fn).call(this)}get promise(){
return __privateGet(this,_capability).promise}get port(){return __privateGet(this,_port)}get messageHandler(){return __privateGet(this,_messageHandler)}destroy(){this.destroyed=!0,__privateGet(this,_webWorker)?.terminate(),__privateSet(this,_webWorker,null),__privateGet(_PDFWorker,_workerPorts).delete(__privateGet(this,_port)),__privateSet(this,_port,null),__privateGet(this,_messageHandler)?.destroy(),__privateSet(this,_messageHandler,null)}static create(params){const cachedPort=__privateGet(this,
_workerPorts).get(params?.port);if(cachedPort){if(cachedPort._pendingDestroy)throw new Error("PDFWorker.create - the worker is being destroyed.\nPlease remember to await `PDFDocumentLoadingTask.destroy()`-calls.");return cachedPort}return new _PDFWorker(params)}static get workerSrc(){if(GlobalWorkerOptions.workerSrc)return GlobalWorkerOptions.workerSrc;throw new Error('No "GlobalWorkerOptions.workerSrc" specified.')}static get _setupFakeWorkerGlobal(){return shadow(this,"_setupFakeWorkerGlobal",
(async()=>__privateGet(this,_PDFWorker_static,mainThreadWorkerMessageHandler_get)?__privateGet(this,_PDFWorker_static,mainThreadWorkerMessageHandler_get):(await import(this.workerSrc)).WorkerMessageHandler)())}};_capability=new WeakMap,_messageHandler=new WeakMap,_port=new WeakMap,_webWorker=new WeakMap,_fakeWorkerId=new WeakMap,_isWorkerDisabled=new WeakMap,_workerPorts=new WeakMap,_PDFWorker_instances=new WeakSet,resolve_fn=function(){__privateGet(this,_capability).resolve(),__privateGet(this,
_messageHandler).send("configure",{verbosity:this.verbosity})},initializeFromPort_fn=function(port){__privateSet(this,_port,port),__privateSet(this,_messageHandler,new MessageHandler("main","worker",port)),__privateGet(this,_messageHandler).on("ready",()=>{}),__privateMethod(this,_PDFWorker_instances,resolve_fn).call(this)},initialize_fn=function(){if(__privateGet(_PDFWorker,_isWorkerDisabled)||__privateGet(_PDFWorker,_PDFWorker_static,mainThreadWorkerMessageHandler_get)){__privateMethod(this,_PDFWorker_instances,
setupFakeWorker_fn).call(this);return}let{workerSrc}=_PDFWorker;try{_PDFWorker._isSameOrigin(window.location,workerSrc)||(workerSrc=_PDFWorker._createCDNWrapper(new URL(workerSrc,window.location).href));const worker=new Worker(workerSrc,{type:"module"}),messageHandler=new MessageHandler("main","worker",worker),terminateEarly=()=>{ac.abort(),messageHandler.destroy(),worker.terminate(),this.destroyed?__privateGet(this,_capability).reject(new Error("Worker was destroyed")):__privateMethod(this,_PDFWorker_instances,
setupFakeWorker_fn).call(this)},ac=new AbortController;worker.addEventListener("error",()=>{__privateGet(this,_webWorker)||terminateEarly()},{signal:ac.signal}),messageHandler.on("test",data=>{if(ac.abort(),this.destroyed||!data){terminateEarly();return}__privateSet(this,_messageHandler,messageHandler),__privateSet(this,_port,worker),__privateSet(this,_webWorker,worker),__privateMethod(this,_PDFWorker_instances,resolve_fn).call(this)}),messageHandler.on("ready",data=>{if(ac.abort(),this.destroyed){
terminateEarly();return}try{sendTest()}catch{__privateMethod(this,_PDFWorker_instances,setupFakeWorker_fn).call(this)}});const sendTest=()=>{const testObj=new Uint8Array;messageHandler.send("test",testObj,[testObj.buffer])};sendTest();return}catch{info("The worker has been disabled.")}__privateMethod(this,_PDFWorker_instances,setupFakeWorker_fn).call(this)},setupFakeWorker_fn=function(){__privateGet(_PDFWorker,_isWorkerDisabled)||(warn("Setting up fake worker."),__privateSet(_PDFWorker,_isWorkerDisabled,
!0)),_PDFWorker._setupFakeWorkerGlobal.then(WorkerMessageHandler=>{if(this.destroyed){__privateGet(this,_capability).reject(new Error("Worker was destroyed"));return}const port=new LoopbackPort;__privateSet(this,_port,port);const id2=`fake${__privateWrapper(_PDFWorker,_fakeWorkerId)._++}`,workerHandler=new MessageHandler(id2+"_worker",id2,port);WorkerMessageHandler.setup(workerHandler,port),__privateSet(this,_messageHandler,new MessageHandler(id2,id2+"_worker",port)),__privateMethod(this,_PDFWorker_instances,
resolve_fn).call(this)}).catch(reason=>{__privateGet(this,_capability).reject(new Error(`Setting up fake worker failed: "${reason.message}".`))})},_PDFWorker_static=new WeakSet,mainThreadWorkerMessageHandler_get=function(){try{return globalThis.pdfjsWorker?.WorkerMessageHandler||null}catch{return null}},__privateAdd(_PDFWorker,_PDFWorker_static),__privateAdd(_PDFWorker,_fakeWorkerId,0),__privateAdd(_PDFWorker,_isWorkerDisabled,!1),__privateAdd(_PDFWorker,_workerPorts,new WeakMap),isNodeJS&&(__privateSet(
_PDFWorker,_isWorkerDisabled,!0),GlobalWorkerOptions.workerSrc||="./pdf.worker.mjs"),_PDFWorker._isSameOrigin=(baseUrl,otherUrl)=>{const base2=URL.parse(baseUrl);if(!base2?.origin||base2.origin==="null")return!1;const other=new URL(otherUrl,base2);return base2.origin===other.origin},_PDFWorker._createCDNWrapper=url2=>{const wrapper=`await import("${url2}");`;return URL.createObjectURL(new Blob([wrapper],{type:"text/javascript"}))},_PDFWorker.fromPort=params=>{if(deprecated("`PDFWorker.fromPort` \
- please use `PDFWorker.create` instead."),!params?.port)throw new Error("PDFWorker.fromPort - invalid method signature.");return _PDFWorker.create(params)};let PDFWorker=_PDFWorker;class WorkerTransport{#methodPromises=new Map;#pageCache=new Map;#pagePromises=new Map;#pageRefCache=new Map;#passwordCapability=null;constructor(messageHandler,loadingTask,networkStream,params,factory,enableHWA){this.messageHandler=messageHandler,this.loadingTask=loadingTask,this.commonObjs=new PDFObjects,this.fontLoader=
new FontLoader({ownerDocument:params.ownerDocument,styleElement:params.styleElement}),this.loadingParams=params.loadingParams,this._params=params,this.canvasFactory=factory.canvasFactory,this.filterFactory=factory.filterFactory,this.cMapReaderFactory=factory.cMapReaderFactory,this.standardFontDataFactory=factory.standardFontDataFactory,this.wasmFactory=factory.wasmFactory,this.destroyed=!1,this.destroyCapability=null,this._networkStream=networkStream,this._fullReader=null,this._lastProgress=null,
this.downloadInfoCapability=Promise.withResolvers(),this.enableHWA=enableHWA,this.setupMessageHandler()}#cacheSimpleMethod(name,data=null){const cachedPromise=this.#methodPromises.get(name);if(cachedPromise)return cachedPromise;const promise=this.messageHandler.sendWithPromise(name,data);return this.#methodPromises.set(name,promise),promise}get annotationStorage(){return shadow(this,"annotationStorage",new AnnotationStorage)}getRenderingIntent(intent,annotationMode=AnnotationMode.ENABLE,printAnnotationStorage=null,isEditing2=!1,isOpList=!1){
let renderingIntent=RenderingIntentFlag.DISPLAY,annotationStorageSerializable=SerializableEmpty;switch(intent){case"any":renderingIntent=RenderingIntentFlag.ANY;break;case"display":break;case"print":renderingIntent=RenderingIntentFlag.PRINT;break;default:warn(`getRenderingIntent - invalid intent: ${intent}`)}const annotationStorage=renderingIntent&RenderingIntentFlag.PRINT&&printAnnotationStorage instanceof PrintAnnotationStorage?printAnnotationStorage:this.annotationStorage;switch(annotationMode){case AnnotationMode.
DISABLE:renderingIntent+=RenderingIntentFlag.ANNOTATIONS_DISABLE;break;case AnnotationMode.ENABLE:break;case AnnotationMode.ENABLE_FORMS:renderingIntent+=RenderingIntentFlag.ANNOTATIONS_FORMS;break;case AnnotationMode.ENABLE_STORAGE:renderingIntent+=RenderingIntentFlag.ANNOTATIONS_STORAGE,annotationStorageSerializable=annotationStorage.serializable;break;default:warn(`getRenderingIntent - invalid annotationMode: ${annotationMode}`)}isEditing2&&(renderingIntent+=RenderingIntentFlag.IS_EDITING),isOpList&&
(renderingIntent+=RenderingIntentFlag.OPLIST);const{ids:modifiedIds,hash:modifiedIdsHash}=annotationStorage.modifiedIds,cacheKeyBuf=[renderingIntent,annotationStorageSerializable.hash,modifiedIdsHash];return{renderingIntent,cacheKey:cacheKeyBuf.join("_"),annotationStorageSerializable,modifiedIds}}destroy(){if(this.destroyCapability)return this.destroyCapability.promise;this.destroyed=!0,this.destroyCapability=Promise.withResolvers(),this.#passwordCapability?.reject(new Error("Worker was destroye\
d during onPassword callback"));const waitOn=[];for(const page2 of this.#pageCache.values())waitOn.push(page2._destroy());this.#pageCache.clear(),this.#pagePromises.clear(),this.#pageRefCache.clear(),this.hasOwnProperty("annotationStorage")&&this.annotationStorage.resetModified();const terminated=this.messageHandler.sendWithPromise("Terminate",null);return waitOn.push(terminated),Promise.all(waitOn).then(()=>{this.commonObjs.clear(),this.fontLoader.clear(),this.#methodPromises.clear(),this.filterFactory.
destroy(),TextLayer.cleanup(),this._networkStream?.cancelAllRequests(new AbortException("Worker was terminated.")),this.messageHandler?.destroy(),this.messageHandler=null,this.destroyCapability.resolve()},this.destroyCapability.reject),this.destroyCapability.promise}setupMessageHandler(){const{messageHandler,loadingTask}=this;messageHandler.on("GetReader",(data,sink)=>{assert$1(this._networkStream,"GetReader - no `IPDFStream` instance available."),this._fullReader=this._networkStream.getFullReader(),
this._fullReader.onProgress=evt=>{this._lastProgress={loaded:evt.loaded,total:evt.total}},sink.onPull=()=>{this._fullReader.read().then(function({value,done}){if(done){sink.close();return}assert$1(value instanceof ArrayBuffer,"GetReader - expected an ArrayBuffer."),sink.enqueue(new Uint8Array(value),1,[value])}).catch(reason=>{sink.error(reason)})},sink.onCancel=reason=>{this._fullReader.cancel(reason),sink.ready.catch(readyReason=>{if(!this.destroyed)throw readyReason})}}),messageHandler.on("Re\
aderHeadersReady",async data=>{await this._fullReader.headersReady;const{isStreamingSupported,isRangeSupported,contentLength}=this._fullReader;return(!isStreamingSupported||!isRangeSupported)&&(this._lastProgress&&loadingTask.onProgress?.(this._lastProgress),this._fullReader.onProgress=evt=>{loadingTask.onProgress?.({loaded:evt.loaded,total:evt.total})}),{isStreamingSupported,isRangeSupported,contentLength}}),messageHandler.on("GetRangeReader",(data,sink)=>{assert$1(this._networkStream,"GetRange\
Reader - no `IPDFStream` instance available.");const rangeReader=this._networkStream.getRangeReader(data.begin,data.end);if(!rangeReader){sink.close();return}sink.onPull=()=>{rangeReader.read().then(function({value,done}){if(done){sink.close();return}assert$1(value instanceof ArrayBuffer,"GetRangeReader - expected an ArrayBuffer."),sink.enqueue(new Uint8Array(value),1,[value])}).catch(reason=>{sink.error(reason)})},sink.onCancel=reason=>{rangeReader.cancel(reason),sink.ready.catch(readyReason=>{
if(!this.destroyed)throw readyReason})}}),messageHandler.on("GetDoc",({pdfInfo})=>{this._numPages=pdfInfo.numPages,this._htmlForXfa=pdfInfo.htmlForXfa,delete pdfInfo.htmlForXfa,loadingTask._capability.resolve(new PDFDocumentProxy(pdfInfo,this))}),messageHandler.on("DocException",ex=>{loadingTask._capability.reject(wrapReason(ex))}),messageHandler.on("PasswordRequest",ex=>{this.#passwordCapability=Promise.withResolvers();try{if(!loadingTask.onPassword)throw wrapReason(ex);const updatePassword=password=>{
password instanceof Error?this.#passwordCapability.reject(password):this.#passwordCapability.resolve({password})};loadingTask.onPassword(updatePassword,ex.code)}catch(err){this.#passwordCapability.reject(err)}return this.#passwordCapability.promise}),messageHandler.on("DataLoaded",data=>{loadingTask.onProgress?.({loaded:data.length,total:data.length}),this.downloadInfoCapability.resolve(data)}),messageHandler.on("StartRenderPage",data=>{if(this.destroyed)return;this.#pageCache.get(data.pageIndex).
_startRenderPage(data.transparency,data.cacheKey)}),messageHandler.on("commonobj",([id2,type2,exportedData])=>{if(this.destroyed||this.commonObjs.has(id2))return null;switch(type2){case"Font":if("error"in exportedData){const exportedError=exportedData.error;warn(`Error during font loading: ${exportedError}`),this.commonObjs.resolve(id2,exportedError);break}const inspectFont=this._params.pdfBug&&globalThis.FontInspector?.enabled?(font2,url2)=>globalThis.FontInspector.fontAdded(font2,url2):null,font=new FontFaceObject(
exportedData,inspectFont);this.fontLoader.bind(font).catch(()=>messageHandler.sendWithPromise("FontFallback",{id:id2})).finally(()=>{!font.fontExtraProperties&&font.data&&(font.data=null),this.commonObjs.resolve(id2,font)});break;case"CopyLocalImage":const{imageRef}=exportedData;assert$1(imageRef,"The imageRef must be defined.");for(const pageProxy of this.#pageCache.values())for(const[,data]of pageProxy.objs)if(data?.ref===imageRef)return data.dataLen?(this.commonObjs.resolve(id2,structuredClone(
data)),data.dataLen):null;break;case"FontPath":case"Image":case"Pattern":this.commonObjs.resolve(id2,exportedData);break;default:throw new Error(`Got unknown common object type ${type2}`)}return null}),messageHandler.on("obj",([id2,pageIndex,type2,imageData])=>{if(this.destroyed)return;const pageProxy=this.#pageCache.get(pageIndex);if(!pageProxy.objs.has(id2)){if(pageProxy._intentStates.size===0){imageData?.bitmap?.close();return}switch(type2){case"Image":case"Pattern":pageProxy.objs.resolve(id2,
imageData);break;default:throw new Error(`Got unknown object type ${type2}`)}}}),messageHandler.on("DocProgress",data=>{this.destroyed||loadingTask.onProgress?.({loaded:data.loaded,total:data.total})}),messageHandler.on("FetchBinaryData",async data=>{if(this.destroyed)throw new Error("Worker was destroyed.");const factory=this[data.type];if(!factory)throw new Error(`${data.type} not initialized, see the \`useWorkerFetch\` parameter.`);return factory.fetch(data)})}getData(){return this.messageHandler.
sendWithPromise("GetData",null)}saveDocument(){this.annotationStorage.size<=0&&warn("saveDocument called while `annotationStorage` is empty, please use the getData-method instead.");const{map:map2,transfer}=this.annotationStorage.serializable;return this.messageHandler.sendWithPromise("SaveDocument",{isPureXfa:!!this._htmlForXfa,numPages:this._numPages,annotationStorage:map2,filename:this._fullReader?.filename??null},transfer).finally(()=>{this.annotationStorage.resetModified()})}getPage(pageNumber){
if(!Number.isInteger(pageNumber)||pageNumber<=0||pageNumber>this._numPages)return Promise.reject(new Error("Invalid page request."));const pageIndex=pageNumber-1,cachedPromise=this.#pagePromises.get(pageIndex);if(cachedPromise)return cachedPromise;const promise=this.messageHandler.sendWithPromise("GetPage",{pageIndex}).then(pageInfo=>{if(this.destroyed)throw new Error("Transport destroyed");pageInfo.refStr&&this.#pageRefCache.set(pageInfo.refStr,pageNumber);const page2=new PDFPageProxy(pageIndex,
pageInfo,this,this._params.pdfBug);return this.#pageCache.set(pageIndex,page2),page2});return this.#pagePromises.set(pageIndex,promise),promise}getPageIndex(ref2){return isRefProxy(ref2)?this.messageHandler.sendWithPromise("GetPageIndex",{num:ref2.num,gen:ref2.gen}):Promise.reject(new Error("Invalid pageIndex request."))}getAnnotations(pageIndex,intent){return this.messageHandler.sendWithPromise("GetAnnotations",{pageIndex,intent})}getFieldObjects(){return this.#cacheSimpleMethod("GetFieldObject\
s")}hasJSActions(){return this.#cacheSimpleMethod("HasJSActions")}getCalculationOrderIds(){return this.messageHandler.sendWithPromise("GetCalculationOrderIds",null)}getDestinations(){return this.messageHandler.sendWithPromise("GetDestinations",null)}getDestination(id2){return typeof id2!="string"?Promise.reject(new Error("Invalid destination request.")):this.messageHandler.sendWithPromise("GetDestination",{id:id2})}getPageLabels(){return this.messageHandler.sendWithPromise("GetPageLabels",null)}getPageLayout(){
return this.messageHandler.sendWithPromise("GetPageLayout",null)}getPageMode(){return this.messageHandler.sendWithPromise("GetPageMode",null)}getViewerPreferences(){return this.messageHandler.sendWithPromise("GetViewerPreferences",null)}getOpenAction(){return this.messageHandler.sendWithPromise("GetOpenAction",null)}getAttachments(){return this.messageHandler.sendWithPromise("GetAttachments",null)}getDocJSActions(){return this.#cacheSimpleMethod("GetDocJSActions")}getPageJSActions(pageIndex){return this.
messageHandler.sendWithPromise("GetPageJSActions",{pageIndex})}getStructTree(pageIndex){return this.messageHandler.sendWithPromise("GetStructTree",{pageIndex})}getOutline(){return this.messageHandler.sendWithPromise("GetOutline",null)}getOptionalContentConfig(renderingIntent){return this.#cacheSimpleMethod("GetOptionalContentConfig").then(data=>new OptionalContentConfig(data,renderingIntent))}getPermissions(){return this.messageHandler.sendWithPromise("GetPermissions",null)}getMetadata(){const name="\
GetMetadata",cachedPromise=this.#methodPromises.get(name);if(cachedPromise)return cachedPromise;const promise=this.messageHandler.sendWithPromise(name,null).then(results=>({info:results[0],metadata:results[1]?new Metadata(results[1]):null,contentDispositionFilename:this._fullReader?.filename??null,contentLength:this._fullReader?.contentLength??null}));return this.#methodPromises.set(name,promise),promise}getMarkInfo(){return this.messageHandler.sendWithPromise("GetMarkInfo",null)}async startCleanup(keepLoadedFonts=!1){
if(!this.destroyed){await this.messageHandler.sendWithPromise("Cleanup",null);for(const page2 of this.#pageCache.values())if(!page2.cleanup())throw new Error(`startCleanup: Page ${page2.pageNumber} is currently rendering.`);this.commonObjs.clear(),keepLoadedFonts||this.fontLoader.clear(),this.#methodPromises.clear(),this.filterFactory.destroy(!0),TextLayer.cleanup()}}cachedPageNumber(ref2){if(!isRefProxy(ref2))return null;const refStr=ref2.gen===0?`${ref2.num}R`:`${ref2.num}R${ref2.gen}`;return this.#pageRefCache.
get(refStr)??null}}class RenderTask{#internalRenderTask=null;onContinue=null;onError=null;constructor(internalRenderTask){this.#internalRenderTask=internalRenderTask}get promise(){return this.#internalRenderTask.capability.promise}cancel(extraDelay=0){this.#internalRenderTask.cancel(null,extraDelay)}get separateAnnots(){const{separateAnnots}=this.#internalRenderTask.operatorList;if(!separateAnnots)return!1;const{annotationCanvasMap}=this.#internalRenderTask;return separateAnnots.form||separateAnnots.
canvas&&annotationCanvasMap?.size>0}}class InternalRenderTask{#rAF=null;static#canvasInUse=new WeakSet;constructor({callback,params,objs,commonObjs,annotationCanvasMap,operatorList,pageIndex,canvasFactory,filterFactory,useRequestAnimationFrame=!1,pdfBug=!1,pageColors=null,enableHWA=!1}){this.callback=callback,this.params=params,this.objs=objs,this.commonObjs=commonObjs,this.annotationCanvasMap=annotationCanvasMap,this.operatorListIdx=null,this.operatorList=operatorList,this._pageIndex=pageIndex,
this.canvasFactory=canvasFactory,this.filterFactory=filterFactory,this._pdfBug=pdfBug,this.pageColors=pageColors,this.running=!1,this.graphicsReadyCallback=null,this.graphicsReady=!1,this._useRequestAnimationFrame=useRequestAnimationFrame===!0&&typeof window<"u",this.cancelled=!1,this.capability=Promise.withResolvers(),this.task=new RenderTask(this),this._cancelBound=this.cancel.bind(this),this._continueBound=this._continue.bind(this),this._scheduleNextBound=this._scheduleNext.bind(this),this._nextBound=
this._next.bind(this),this._canvas=params.canvas,this._canvasContext=params.canvas?null:params.canvasContext,this._enableHWA=enableHWA}get completed(){return this.capability.promise.catch(function(){})}initializeGraphics({transparency=!1,optionalContentConfig}){if(this.cancelled)return;if(this._canvas){if(InternalRenderTask.#canvasInUse.has(this._canvas))throw new Error("Cannot use the same canvas during multiple render() operations. Use different canvas or ensure previous operations were cancel\
led or completed.");InternalRenderTask.#canvasInUse.add(this._canvas)}this._pdfBug&&globalThis.StepperManager?.enabled&&(this.stepper=globalThis.StepperManager.create(this._pageIndex),this.stepper.init(this.operatorList),this.stepper.nextBreakPoint=this.stepper.getNextBreakPoint());const{viewport,transform:transform2,background}=this.params,canvasContext=this._canvasContext||this._canvas.getContext("2d",{alpha:!1,willReadFrequently:!this._enableHWA});this.gfx=new CanvasGraphics(canvasContext,this.
commonObjs,this.objs,this.canvasFactory,this.filterFactory,{optionalContentConfig},this.annotationCanvasMap,this.pageColors),this.gfx.beginDrawing({transform:transform2,viewport,transparency,background}),this.operatorListIdx=0,this.graphicsReady=!0,this.graphicsReadyCallback?.()}cancel(error2=null,extraDelay=0){this.running=!1,this.cancelled=!0,this.gfx?.endDrawing(),this.#rAF&&(window.cancelAnimationFrame(this.#rAF),this.#rAF=null),InternalRenderTask.#canvasInUse.delete(this._canvas),error2||=new RenderingCancelledException(
`Rendering cancelled, page ${this._pageIndex+1}`,extraDelay),this.callback(error2),this.task.onError?.(error2)}operatorListChanged(){if(!this.graphicsReady){this.graphicsReadyCallback||=this._continueBound;return}this.stepper?.updateOperatorList(this.operatorList),!this.running&&this._continue()}_continue(){this.running=!0,!this.cancelled&&(this.task.onContinue?this.task.onContinue(this._scheduleNextBound):this._scheduleNext())}_scheduleNext(){this._useRequestAnimationFrame?this.#rAF=window.requestAnimationFrame(
()=>{this.#rAF=null,this._nextBound().catch(this._cancelBound)}):Promise.resolve().then(this._nextBound).catch(this._cancelBound)}async _next(){this.cancelled||(this.operatorListIdx=this.gfx.executeOperatorList(this.operatorList,this.operatorListIdx,this._continueBound,this.stepper),this.operatorListIdx===this.operatorList.argsArray.length&&(this.running=!1,this.operatorList.lastChunk&&(this.gfx.endDrawing(),InternalRenderTask.#canvasInUse.delete(this._canvas),this.callback())))}}const version$1="\
5.4.54",build="295fb3ec4";class ColorPicker{#button=null;#buttonSwatch=null;#defaultColor;#dropdown=null;#dropdownWasFromKeyboard=!1;#isMainColorPicker=!1;#editor=null;#eventBus;#openDropdownAC=null;#uiManager=null;static#l10nColor=null;static get _keyboardManager(){return shadow(this,"_keyboardManager",new KeyboardManager([[["Escape","mac+Escape"],ColorPicker.prototype._hideDropdownFromKeyboard],[[" ","mac+ "],ColorPicker.prototype._colorSelectFromKeyboard],[["ArrowDown","ArrowRight","mac+Arrow\
Down","mac+ArrowRight"],ColorPicker.prototype._moveToNext],[["ArrowUp","ArrowLeft","mac+ArrowUp","mac+ArrowLeft"],ColorPicker.prototype._moveToPrevious],[["Home","mac+Home"],ColorPicker.prototype._moveToBeginning],[["End","mac+End"],ColorPicker.prototype._moveToEnd]]))}constructor({editor=null,uiManager=null}){editor?(this.#isMainColorPicker=!1,this.#editor=editor):this.#isMainColorPicker=!0,this.#uiManager=editor?._uiManager||uiManager,this.#eventBus=this.#uiManager._eventBus,this.#defaultColor=
editor?.color?.toUpperCase()||this.#uiManager?.highlightColors.values().next().value||"#FFFF98",ColorPicker.#l10nColor||=Object.freeze({blue:"pdfjs-editor-colorpicker-blue",green:"pdfjs-editor-colorpicker-green",pink:"pdfjs-editor-colorpicker-pink",red:"pdfjs-editor-colorpicker-red",yellow:"pdfjs-editor-colorpicker-yellow"})}renderButton(){const button=this.#button=document.createElement("button");button.className="colorPicker",button.tabIndex="0",button.setAttribute("data-l10n-id","pdfjs-editor\
-colorpicker-button"),button.ariaHasPopup="true",this.#editor&&(button.ariaControls=`${this.#editor.id}_colorpicker_dropdown`);const signal=this.#uiManager._signal;button.addEventListener("click",this.#openDropdown.bind(this),{signal}),button.addEventListener("keydown",this.#keyDown.bind(this),{signal});const swatch=this.#buttonSwatch=document.createElement("span");return swatch.className="swatch",swatch.ariaHidden="true",swatch.style.backgroundColor=this.#defaultColor,button.append(swatch),button}renderMainDropdown(){
const dropdown=this.#dropdown=this.#getDropdownRoot();return dropdown.ariaOrientation="horizontal",dropdown.ariaLabelledBy="highlightColorPickerLabel",dropdown}#getDropdownRoot(){const div=document.createElement("div"),signal=this.#uiManager._signal;div.addEventListener("contextmenu",noContextMenu,{signal}),div.className="dropdown",div.role="listbox",div.ariaMultiSelectable="false",div.ariaOrientation="vertical",div.setAttribute("data-l10n-id","pdfjs-editor-colorpicker-dropdown"),this.#editor&&(div.
id=`${this.#editor.id}_colorpicker_dropdown`);for(const[name,color]of this.#uiManager.highlightColors){const button=document.createElement("button");button.tabIndex="0",button.role="option",button.setAttribute("data-color",color),button.title=name,button.setAttribute("data-l10n-id",ColorPicker.#l10nColor[name]);const swatch=document.createElement("span");button.append(swatch),swatch.className="swatch",swatch.style.backgroundColor=color,button.ariaSelected=color===this.#defaultColor,button.addEventListener(
"click",this.#colorSelect.bind(this,color),{signal}),div.append(button)}return div.addEventListener("keydown",this.#keyDown.bind(this),{signal}),div}#colorSelect(color,event2){event2.stopPropagation(),this.#eventBus.dispatch("switchannotationeditorparams",{source:this,type:AnnotationEditorParamsType.HIGHLIGHT_COLOR,value:color}),this.updateColor(color)}_colorSelectFromKeyboard(event2){if(event2.target===this.#button){this.#openDropdown(event2);return}const color=event2.target.getAttribute("data-\
color");color&&this.#colorSelect(color,event2)}_moveToNext(event2){if(!this.#isDropdownVisible){this.#openDropdown(event2);return}if(event2.target===this.#button){this.#dropdown.firstChild?.focus();return}event2.target.nextSibling?.focus()}_moveToPrevious(event2){if(event2.target===this.#dropdown?.firstChild||event2.target===this.#button){this.#isDropdownVisible&&this._hideDropdownFromKeyboard();return}this.#isDropdownVisible||this.#openDropdown(event2),event2.target.previousSibling?.focus()}_moveToBeginning(event2){
if(!this.#isDropdownVisible){this.#openDropdown(event2);return}this.#dropdown.firstChild?.focus()}_moveToEnd(event2){if(!this.#isDropdownVisible){this.#openDropdown(event2);return}this.#dropdown.lastChild?.focus()}#keyDown(event2){ColorPicker._keyboardManager.exec(this,event2)}#openDropdown(event2){if(this.#isDropdownVisible){this.hideDropdown();return}if(this.#dropdownWasFromKeyboard=event2.detail===0,this.#openDropdownAC||(this.#openDropdownAC=new AbortController,window.addEventListener("point\
erdown",this.#pointerDown.bind(this),{signal:this.#uiManager.combinedSignal(this.#openDropdownAC)})),this.#button.ariaExpanded="true",this.#dropdown){this.#dropdown.classList.remove("hidden");return}const root2=this.#dropdown=this.#getDropdownRoot();this.#button.append(root2)}#pointerDown(event2){this.#dropdown?.contains(event2.target)||this.hideDropdown()}hideDropdown(){this.#dropdown?.classList.add("hidden"),this.#button.ariaExpanded="false",this.#openDropdownAC?.abort(),this.#openDropdownAC=null}get#isDropdownVisible(){
return this.#dropdown&&!this.#dropdown.classList.contains("hidden")}_hideDropdownFromKeyboard(){if(!this.#isMainColorPicker){if(!this.#isDropdownVisible){this.#editor?.unselect();return}this.hideDropdown(),this.#button.focus({preventScroll:!0,focusVisible:this.#dropdownWasFromKeyboard})}}updateColor(color){if(this.#buttonSwatch&&(this.#buttonSwatch.style.backgroundColor=color),!this.#dropdown)return;const i=this.#uiManager.highlightColors.values();for(const child2 of this.#dropdown.children)child2.
ariaSelected=i.next().value===color.toUpperCase()}destroy(){this.#button?.remove(),this.#button=null,this.#buttonSwatch=null,this.#dropdown?.remove(),this.#dropdown=null}}class BasicColorPicker{#input=null;#editor=null;#uiManager=null;static#l10nColor=null;constructor(editor){this.#editor=editor,this.#uiManager=editor._uiManager,BasicColorPicker.#l10nColor||=Object.freeze({freetext:"pdfjs-editor-color-picker-free-text-input",ink:"pdfjs-editor-color-picker-ink-input"})}renderButton(){if(this.#input)
return this.#input;const{editorType,colorType,colorValue}=this.#editor,input=this.#input=document.createElement("input");return input.type="color",input.value=colorValue||"#000000",input.className="basicColorPicker",input.tabIndex=0,input.setAttribute("data-l10n-id",BasicColorPicker.#l10nColor[editorType]),input.addEventListener("input",()=>{this.#uiManager.updateParams(colorType,input.value)},{signal:this.#uiManager._signal}),input}update(value){this.#input&&(this.#input.value=value)}destroy(){
this.#input?.remove(),this.#input=null}hideDropdown(){}}function makeColorComp(n){return Math.floor(Math.max(0,Math.min(1,n))*255).toString(16).padStart(2,"0")}function scaleAndClamp(x){return Math.max(0,Math.min(255,255*x))}class ColorConverters{static CMYK_G([c2,y,m,k]){return["G",1-Math.min(1,.3*c2+.59*m+.11*y+k)]}static G_CMYK([g]){return["CMYK",0,0,0,1-g]}static G_RGB([g]){return["RGB",g,g,g]}static G_rgb([g]){return g=scaleAndClamp(g),[g,g,g]}static G_HTML([g]){const G=makeColorComp(g);return`\
#${G}${G}${G}`}static RGB_G([r2,g,b]){return["G",.3*r2+.59*g+.11*b]}static RGB_rgb(color){return color.map(scaleAndClamp)}static RGB_HTML(color){return`#${color.map(makeColorComp).join("")}`}static T_HTML(){return"#00000000"}static T_rgb(){return[null]}static CMYK_RGB([c2,y,m,k]){return["RGB",1-Math.min(1,c2+k),1-Math.min(1,m+k),1-Math.min(1,y+k)]}static CMYK_rgb([c2,y,m,k]){return[scaleAndClamp(1-Math.min(1,c2+k)),scaleAndClamp(1-Math.min(1,m+k)),scaleAndClamp(1-Math.min(1,y+k))]}static CMYK_HTML(components2){
const rgb=this.CMYK_RGB(components2).slice(1);return this.RGB_HTML(rgb)}static RGB_CMYK([r2,g,b]){const c2=1-r2,m=1-g,y=1-b,k=Math.min(c2,m,y);return["CMYK",c2,m,y,k]}}class BaseSVGFactory{create(width,height,skipDimensions=!1){if(width<=0||height<=0)throw new Error("Invalid SVG dimensions");const svg2=this._createSVG("svg:svg");return svg2.setAttribute("version","1.1"),skipDimensions||(svg2.setAttribute("width",`${width}px`),svg2.setAttribute("height",`${height}px`)),svg2.setAttribute("preserve\
AspectRatio","none"),svg2.setAttribute("viewBox",`0 0 ${width} ${height}`),svg2}createElement(type2){if(typeof type2!="string")throw new Error("Invalid SVG element type");return this._createSVG(type2)}_createSVG(type2){unreachable("Abstract method `_createSVG` called.")}}class DOMSVGFactory extends BaseSVGFactory{_createSVG(type2){return document.createElementNS(SVG_NS,type2)}}class XfaLayer{static setupStorage(html2,id2,element2,storage,intent){const storedData=storage.getValue(id2,{value:null});
switch(element2.name){case"textarea":if(storedData.value!==null&&(html2.textContent=storedData.value),intent==="print")break;html2.addEventListener("input",event2=>{storage.setValue(id2,{value:event2.target.value})});break;case"input":if(element2.attributes.type==="radio"||element2.attributes.type==="checkbox"){if(storedData.value===element2.attributes.xfaOn?html2.setAttribute("checked",!0):storedData.value===element2.attributes.xfaOff&&html2.removeAttribute("checked"),intent==="print")break;html2.
addEventListener("change",event2=>{storage.setValue(id2,{value:event2.target.checked?event2.target.getAttribute("xfaOn"):event2.target.getAttribute("xfaOff")})})}else{if(storedData.value!==null&&html2.setAttribute("value",storedData.value),intent==="print")break;html2.addEventListener("input",event2=>{storage.setValue(id2,{value:event2.target.value})})}break;case"select":if(storedData.value!==null){html2.setAttribute("value",storedData.value);for(const option2 of element2.children)option2.attributes.
value===storedData.value?option2.attributes.selected=!0:option2.attributes.hasOwnProperty("selected")&&delete option2.attributes.selected}html2.addEventListener("input",event2=>{const options=event2.target.options,value=options.selectedIndex===-1?"":options[options.selectedIndex].value;storage.setValue(id2,{value})});break}}static setAttributes({html:html2,element:element2,storage=null,intent,linkService}){const{attributes}=element2,isHTMLAnchorElement=html2 instanceof HTMLAnchorElement;attributes.
type==="radio"&&(attributes.name=`${attributes.name}-${intent}`);for(const[key2,value]of Object.entries(attributes))if(value!=null)switch(key2){case"class":value.length&&html2.setAttribute(key2,value.join(" "));break;case"dataId":break;case"id":html2.setAttribute("data-element-id",value);break;case"style":Object.assign(html2.style,value);break;case"textContent":html2.textContent=value;break;default:(!isHTMLAnchorElement||key2!=="href"&&key2!=="newWindow")&&html2.setAttribute(key2,value)}isHTMLAnchorElement&&
linkService.addLinkAttributes(html2,attributes.href,attributes.newWindow),storage&&attributes.dataId&&this.setupStorage(html2,attributes.dataId,element2,storage)}static render(parameters){const storage=parameters.annotationStorage,linkService=parameters.linkService,root2=parameters.xfaHtml,intent=parameters.intent||"display",rootHtml=document.createElement(root2.name);root2.attributes&&this.setAttributes({html:rootHtml,element:root2,intent,linkService});const isNotForRichText=intent!=="richText",
rootDiv=parameters.div;if(rootDiv.append(rootHtml),parameters.viewport){const transform2=`matrix(${parameters.viewport.transform.join(",")})`;rootDiv.style.transform=transform2}isNotForRichText&&rootDiv.setAttribute("class","xfaLayer xfaFont");const textDivs=[];if(root2.children.length===0){if(root2.value){const node2=document.createTextNode(root2.value);rootHtml.append(node2),isNotForRichText&&XfaText.shouldBuildText(root2.name)&&textDivs.push(node2)}return{textDivs}}const stack=[[root2,-1,rootHtml]];
for(;stack.length>0;){const[parent,i,html2]=stack.at(-1);if(i+1===parent.children.length){stack.pop();continue}const child2=parent.children[++stack.at(-1)[1]];if(child2===null)continue;const{name}=child2;if(name==="#text"){const node2=document.createTextNode(child2.value);textDivs.push(node2),html2.append(node2);continue}const childHtml=child2?.attributes?.xmlns?document.createElementNS(child2.attributes.xmlns,name):document.createElement(name);if(html2.append(childHtml),child2.attributes&&this.
setAttributes({html:childHtml,element:child2,storage,intent,linkService}),child2.children?.length>0)stack.push([child2,-1,childHtml]);else if(child2.value){const node2=document.createTextNode(child2.value);isNotForRichText&&XfaText.shouldBuildText(name)&&textDivs.push(node2),childHtml.append(node2)}}for(const el of rootDiv.querySelectorAll(".xfaNonInteractive input, .xfaNonInteractive textarea"))el.setAttribute("readOnly",!0);return{textDivs}}static update(parameters){const transform2=`matrix(${parameters.
viewport.transform.join(",")})`;parameters.div.style.transform=transform2,parameters.div.hidden=!1}}const annotation_layer_DEFAULT_FONT_SIZE=9,GetElementsByNameSet=new WeakSet,TIMEZONE_OFFSET=new Date().getTimezoneOffset()*60*1e3;class AnnotationElementFactory{static create(parameters){switch(parameters.data.annotationType){case AnnotationType.LINK:return new LinkAnnotationElement(parameters);case AnnotationType.TEXT:return new TextAnnotationElement(parameters);case AnnotationType.WIDGET:switch(parameters.
data.fieldType){case"Tx":return new TextWidgetAnnotationElement(parameters);case"Btn":return parameters.data.radioButton?new RadioButtonWidgetAnnotationElement(parameters):parameters.data.checkBox?new CheckboxWidgetAnnotationElement(parameters):new PushButtonWidgetAnnotationElement(parameters);case"Ch":return new ChoiceWidgetAnnotationElement(parameters);case"Sig":return new SignatureWidgetAnnotationElement(parameters)}return new WidgetAnnotationElement(parameters);case AnnotationType.POPUP:return new PopupAnnotationElement(
parameters);case AnnotationType.FREETEXT:return new FreeTextAnnotationElement(parameters);case AnnotationType.LINE:return new LineAnnotationElement(parameters);case AnnotationType.SQUARE:return new SquareAnnotationElement(parameters);case AnnotationType.CIRCLE:return new CircleAnnotationElement(parameters);case AnnotationType.POLYLINE:return new PolylineAnnotationElement(parameters);case AnnotationType.CARET:return new CaretAnnotationElement(parameters);case AnnotationType.INK:return new InkAnnotationElement(
parameters);case AnnotationType.POLYGON:return new PolygonAnnotationElement(parameters);case AnnotationType.HIGHLIGHT:return new HighlightAnnotationElement(parameters);case AnnotationType.UNDERLINE:return new UnderlineAnnotationElement(parameters);case AnnotationType.SQUIGGLY:return new SquigglyAnnotationElement(parameters);case AnnotationType.STRIKEOUT:return new StrikeOutAnnotationElement(parameters);case AnnotationType.STAMP:return new StampAnnotationElement(parameters);case AnnotationType.FILEATTACHMENT:
return new FileAttachmentAnnotationElement(parameters);default:return new AnnotationElement(parameters)}}}class AnnotationElement{#updates=null;#hasBorder=!1;#popupElement=null;constructor(parameters,{isRenderable=!1,ignoreBorder=!1,createQuadrilaterals=!1}={}){this.isRenderable=isRenderable,this.data=parameters.data,this.layer=parameters.layer,this.linkService=parameters.linkService,this.downloadManager=parameters.downloadManager,this.imageResourcesPath=parameters.imageResourcesPath,this.renderForms=
parameters.renderForms,this.svgFactory=parameters.svgFactory,this.annotationStorage=parameters.annotationStorage,this.enableScripting=parameters.enableScripting,this.hasJSActions=parameters.hasJSActions,this._fieldObjects=parameters.fieldObjects,this.parent=parameters.parent,isRenderable&&(this.container=this._createContainer(ignoreBorder)),createQuadrilaterals&&this._createQuadrilaterals()}static _hasPopupData({contentsObj,richText}){return!!(contentsObj?.str||richText?.str)}get _isEditable(){return this.
data.isEditable}get hasPopupData(){return AnnotationElement._hasPopupData(this.data)}updateEdited(params){if(!this.container)return;params.rect&&(this.#updates||={rect:this.data.rect.slice(0)});const{rect,popup:newPopup}=params;rect&&this.#setRectEdited(rect);let popup=this.#popupElement?.popup||this.popup;!popup&&newPopup?.text&&(this._createPopup(newPopup),popup=this.#popupElement.popup),popup&&(popup.updateEdited(params),newPopup?.deleted&&(popup.remove(),this.#popupElement=null,this.popup=null))}resetEdited(){
this.#updates&&(this.#setRectEdited(this.#updates.rect),this.#popupElement?.popup.resetEdited(),this.#updates=null)}#setRectEdited(rect){const{container:{style:style2},data:{rect:currentRect,rotation},parent:{viewport:{rawDims:{pageWidth,pageHeight,pageX,pageY}}}}=this;currentRect?.splice(0,4,...rect),style2.left=`${100*(rect[0]-pageX)/pageWidth}%`,style2.top=`${100*(pageHeight-rect[3]+pageY)/pageHeight}%`,rotation===0?(style2.width=`${100*(rect[2]-rect[0])/pageWidth}%`,style2.height=`${100*(rect[3]-
rect[1])/pageHeight}%`):this.setRotation(rotation)}_createContainer(ignoreBorder){const{data,parent:{page:page2,viewport}}=this,container2=document.createElement("section");container2.setAttribute("data-annotation-id",data.id),!(this instanceof WidgetAnnotationElement)&&!(this instanceof LinkAnnotationElement)&&(container2.tabIndex=0);const{style:style2}=container2;if(style2.zIndex=this.parent.zIndex++,data.alternativeText&&(container2.title=data.alternativeText),data.noRotate&&container2.classList.
add("norotate"),!data.rect||this instanceof PopupAnnotationElement){const{rotation:rotation2}=data;return!data.hasOwnCanvas&&rotation2!==0&&this.setRotation(rotation2,container2),container2}const{width,height}=this;if(!ignoreBorder&&data.borderStyle.width>0){style2.borderWidth=`${data.borderStyle.width}px`;const horizontalRadius=data.borderStyle.horizontalCornerRadius,verticalRadius=data.borderStyle.verticalCornerRadius;if(horizontalRadius>0||verticalRadius>0){const radius=`calc(${horizontalRadius}\
px * var(--total-scale-factor)) / calc(${verticalRadius}px * var(--total-scale-factor))`;style2.borderRadius=radius}else if(this instanceof RadioButtonWidgetAnnotationElement){const radius=`calc(${width}px * var(--total-scale-factor)) / calc(${height}px * var(--total-scale-factor))`;style2.borderRadius=radius}switch(data.borderStyle.style){case AnnotationBorderStyleType.SOLID:style2.borderStyle="solid";break;case AnnotationBorderStyleType.DASHED:style2.borderStyle="dashed";break;case AnnotationBorderStyleType.
BEVELED:warn("Unimplemented border style: beveled");break;case AnnotationBorderStyleType.INSET:warn("Unimplemented border style: inset");break;case AnnotationBorderStyleType.UNDERLINE:style2.borderBottomStyle="solid";break}const borderColor=data.borderColor||null;borderColor?(this.#hasBorder=!0,style2.borderColor=Util.makeHexColor(borderColor[0]|0,borderColor[1]|0,borderColor[2]|0)):style2.borderWidth=0}const rect=Util.normalizeRect([data.rect[0],page2.view[3]-data.rect[1]+page2.view[1],data.rect[2],
page2.view[3]-data.rect[3]+page2.view[1]]),{pageWidth,pageHeight,pageX,pageY}=viewport.rawDims;style2.left=`${100*(rect[0]-pageX)/pageWidth}%`,style2.top=`${100*(rect[1]-pageY)/pageHeight}%`;const{rotation}=data;return data.hasOwnCanvas||rotation===0?(style2.width=`${100*width/pageWidth}%`,style2.height=`${100*height/pageHeight}%`):this.setRotation(rotation,container2),container2}setRotation(angle,container2=this.container){if(!this.data.rect)return;const{pageWidth,pageHeight}=this.parent.viewport.
rawDims;let{width,height}=this;angle%180!==0&&([width,height]=[height,width]),container2.style.width=`${100*width/pageWidth}%`,container2.style.height=`${100*height/pageHeight}%`,container2.setAttribute("data-main-rotation",(360-angle)%360)}get _commonActions(){const setColor=(jsName,styleName,event2)=>{const color=event2.detail[jsName],colorType=color[0],colorArray=color.slice(1);event2.target.style[styleName]=ColorConverters[`${colorType}_HTML`](colorArray),this.annotationStorage.setValue(this.
data.id,{[styleName]:ColorConverters[`${colorType}_rgb`](colorArray)})};return shadow(this,"_commonActions",{display:event2=>{const{display}=event2.detail,hidden2=display%2===1;this.container.style.visibility=hidden2?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noView:hidden2,noPrint:display===1||display===2})},print:event2=>{this.annotationStorage.setValue(this.data.id,{noPrint:!event2.detail.print})},hidden:event2=>{const{hidden:hidden2}=event2.detail;this.container.style.visibility=
hidden2?"hidden":"visible",this.annotationStorage.setValue(this.data.id,{noPrint:hidden2,noView:hidden2})},focus:event2=>{setTimeout(()=>event2.target.focus({preventScroll:!1}),0)},userName:event2=>{event2.target.title=event2.detail.userName},readonly:event2=>{event2.target.disabled=event2.detail.readonly},required:event2=>{this._setRequired(event2.target,event2.detail.required)},bgColor:event2=>{setColor("bgColor","backgroundColor",event2)},fillColor:event2=>{setColor("fillColor","backgroundCol\
or",event2)},fgColor:event2=>{setColor("fgColor","color",event2)},textColor:event2=>{setColor("textColor","color",event2)},borderColor:event2=>{setColor("borderColor","borderColor",event2)},strokeColor:event2=>{setColor("strokeColor","borderColor",event2)},rotation:event2=>{const angle=event2.detail.rotation;this.setRotation(angle),this.annotationStorage.setValue(this.data.id,{rotation:angle})}})}_dispatchEventFromSandbox(actions,jsEvent){const commonActions=this._commonActions;for(const name of Object.
keys(jsEvent.detail))(actions[name]||commonActions[name])?.(jsEvent)}_setDefaultPropertiesFromJS(element2){if(!this.enableScripting)return;const storedData=this.annotationStorage.getRawValue(this.data.id);if(!storedData)return;const commonActions=this._commonActions;for(const[actionName,detail]of Object.entries(storedData)){const action2=commonActions[actionName];if(action2){const eventProxy={detail:{[actionName]:detail},target:element2};action2(eventProxy),delete storedData[actionName]}}}_createQuadrilaterals(){
if(!this.container)return;const{quadPoints}=this.data;if(!quadPoints)return;const[rectBlX,rectBlY,rectTrX,rectTrY]=this.data.rect.map(x=>Math.fround(x));if(quadPoints.length===8){const[trX,trY,blX,blY]=quadPoints.subarray(2,6);if(rectTrX===trX&&rectTrY===trY&&rectBlX===blX&&rectBlY===blY)return}const{style:style2}=this.container;let svgBuffer;if(this.#hasBorder){const{borderColor,borderWidth}=style2;style2.borderWidth=0,svgBuffer=["url('data:image/svg+xml;utf8,",'<svg xmlns="http://www.w3.org/20\
00/svg"',' preserveAspectRatio="none" viewBox="0 0 1 1">',`<g fill="transparent" stroke="${borderColor}" stroke-width="${borderWidth}">`],this.container.classList.add("hasBorder")}const width=rectTrX-rectBlX,height=rectTrY-rectBlY,{svgFactory}=this,svg2=svgFactory.createElement("svg");svg2.classList.add("quadrilateralsContainer"),svg2.setAttribute("width",0),svg2.setAttribute("height",0),svg2.role="none";const defs=svgFactory.createElement("defs");svg2.append(defs);const clipPath=svgFactory.createElement(
"clipPath"),id2=`clippath_${this.data.id}`;clipPath.setAttribute("id",id2),clipPath.setAttribute("clipPathUnits","objectBoundingBox"),defs.append(clipPath);for(let i=2,ii=quadPoints.length;i<ii;i+=8){const trX=quadPoints[i],trY=quadPoints[i+1],blX=quadPoints[i+2],blY=quadPoints[i+3],rect=svgFactory.createElement("rect"),x=(blX-rectBlX)/width,y=(rectTrY-trY)/height,rectWidth=(trX-blX)/width,rectHeight=(trY-blY)/height;rect.setAttribute("x",x),rect.setAttribute("y",y),rect.setAttribute("width",rectWidth),
rect.setAttribute("height",rectHeight),clipPath.append(rect),svgBuffer?.push(`<rect vector-effect="non-scaling-stroke" x="${x}" y="${y}" width="${rectWidth}" height="${rectHeight}"/>`)}this.#hasBorder&&(svgBuffer.push("</g></svg>')"),style2.backgroundImage=svgBuffer.join("")),this.container.append(svg2),this.container.style.clipPath=`url(#${id2})`}_createPopup(popupData=null){const{data}=this;let contentsObj,modificationDate;popupData?(contentsObj={str:popupData.text},modificationDate=popupData.
date):(contentsObj=data.contentsObj,modificationDate=data.modificationDate);const popup=this.#popupElement=new PopupAnnotationElement({data:{color:data.color,titleObj:data.titleObj,modificationDate,contentsObj,richText:data.richText,parentRect:data.rect,borderStyle:0,id:`popup_${data.id}`,rotation:data.rotation,noRotate:!0},linkService:this.linkService,parent:this.parent,elements:[this]});this.parent.div.append(popup.render())}get hasPopupElement(){return!!(this.#popupElement||this.popup||this.data.
popupRef)}render(){unreachable("Abstract method `AnnotationElement.render` called")}_getElementsByName(name,skipId=null){const fields=[];if(this._fieldObjects){const fieldObj=this._fieldObjects[name];if(fieldObj)for(const{page:page2,id:id2,exportValues}of fieldObj){if(page2===-1||id2===skipId)continue;const exportValue=typeof exportValues=="string"?exportValues:null,domElement=document.querySelector(`[data-element-id="${id2}"]`);if(domElement&&!GetElementsByNameSet.has(domElement)){warn(`_getEle\
mentsByName - element not allowed: ${id2}`);continue}fields.push({id:id2,exportValue,domElement})}return fields}for(const domElement of document.getElementsByName(name)){const{exportValue}=domElement,id2=domElement.getAttribute("data-element-id");id2!==skipId&&GetElementsByNameSet.has(domElement)&&fields.push({id:id2,exportValue,domElement})}return fields}show(){this.container&&(this.container.hidden=!1),this.popup?.maybeShow()}hide(){this.container&&(this.container.hidden=!0),this.popup?.forceHide()}getElementsToTriggerPopup(){
return this.container}addHighlightArea(){const triggers=this.getElementsToTriggerPopup();if(Array.isArray(triggers))for(const element2 of triggers)element2.classList.add("highlightArea");else triggers.classList.add("highlightArea")}_editOnDoubleClick(){if(!this._isEditable)return;const{annotationEditorType:mode,data:{id:editId}}=this;this.container.addEventListener("dblclick",()=>{this.linkService.eventBus?.dispatch("switchannotationeditormode",{source:this,mode,editId,mustEnterInEditMode:!0})})}get width(){
return this.data.rect[2]-this.data.rect[0]}get height(){return this.data.rect[3]-this.data.rect[1]}}class LinkAnnotationElement extends AnnotationElement{constructor(parameters,options=null){super(parameters,{isRenderable:!0,ignoreBorder:!!options?.ignoreBorder,createQuadrilaterals:!0}),this.isTooltipOnly=parameters.data.isTooltipOnly}render(){const{data,linkService}=this,link2=document.createElement("a");link2.setAttribute("data-element-id",data.id);let isBound=!1;return data.url?(linkService.addLinkAttributes(
link2,data.url,data.newWindow),isBound=!0):data.action?(this._bindNamedAction(link2,data.action,data.overlaidText),isBound=!0):data.attachment?(this.#bindAttachment(link2,data.attachment,data.overlaidText,data.attachmentDest),isBound=!0):data.setOCGState?(this.#bindSetOCGState(link2,data.setOCGState,data.overlaidText),isBound=!0):data.dest?(this._bindLink(link2,data.dest,data.overlaidText),isBound=!0):(data.actions&&(data.actions.Action||data.actions["Mouse Up"]||data.actions["Mouse Down"])&&this.
enableScripting&&this.hasJSActions&&(this._bindJSAction(link2,data),isBound=!0),data.resetForm?(this._bindResetFormAction(link2,data.resetForm),isBound=!0):this.isTooltipOnly&&!isBound&&(this._bindLink(link2,""),isBound=!0)),this.container.classList.add("linkAnnotation"),isBound&&this.container.append(link2),this.container}#setInternalLink(){this.container.setAttribute("data-internal-link","")}_bindLink(link2,destination,overlaidText=""){link2.href=this.linkService.getDestinationHash(destination),
link2.onclick=()=>(destination&&this.linkService.goToDestination(destination),!1),(destination||destination==="")&&this.#setInternalLink(),overlaidText&&(link2.title=overlaidText)}_bindNamedAction(link2,action2,overlaidText=""){link2.href=this.linkService.getAnchorUrl(""),link2.onclick=()=>(this.linkService.executeNamedAction(action2),!1),overlaidText&&(link2.title=overlaidText),this.#setInternalLink()}#bindAttachment(link2,attachment,overlaidText="",dest=null){link2.href=this.linkService.getAnchorUrl(
""),attachment.description?link2.title=attachment.description:overlaidText&&(link2.title=overlaidText),link2.onclick=()=>(this.downloadManager?.openOrDownloadData(attachment.content,attachment.filename,dest),!1),this.#setInternalLink()}#bindSetOCGState(link2,action2,overlaidText=""){link2.href=this.linkService.getAnchorUrl(""),link2.onclick=()=>(this.linkService.executeSetOCGState(action2),!1),overlaidText&&(link2.title=overlaidText),this.#setInternalLink()}_bindJSAction(link2,data){link2.href=this.
linkService.getAnchorUrl("");const map2=new Map([["Action","onclick"],["Mouse Up","onmouseup"],["Mouse Down","onmousedown"]]);for(const name of Object.keys(data.actions)){const jsName=map2.get(name);jsName&&(link2[jsName]=()=>(this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:data.id,name}}),!1))}data.overlaidText&&(link2.title=data.overlaidText),link2.onclick||(link2.onclick=()=>!1),this.#setInternalLink()}_bindResetFormAction(link2,resetForm){const otherClickAction=link2.
onclick;if(otherClickAction||(link2.href=this.linkService.getAnchorUrl("")),this.#setInternalLink(),!this._fieldObjects){warn('_bindResetFormAction - "resetForm" action not supported, ensure that the `fieldObjects` parameter is provided.'),otherClickAction||(link2.onclick=()=>!1);return}link2.onclick=()=>{otherClickAction?.();const{fields:resetFormFields,refs:resetFormRefs,include}=resetForm,allFields=[];if(resetFormFields.length!==0||resetFormRefs.length!==0){const fieldIds=new Set(resetFormRefs);
for(const fieldName of resetFormFields){const fields=this._fieldObjects[fieldName]||[];for(const{id:id2}of fields)fieldIds.add(id2)}for(const fields of Object.values(this._fieldObjects))for(const field of fields)fieldIds.has(field.id)===include&&allFields.push(field)}else for(const fields of Object.values(this._fieldObjects))allFields.push(...fields);const storage=this.annotationStorage,allIds=[];for(const field of allFields){const{id:id2}=field;switch(allIds.push(id2),field.type){case"text":{const value=field.
defaultValue||"";storage.setValue(id2,{value});break}case"checkbox":case"radiobutton":{const value=field.defaultValue===field.exportValues;storage.setValue(id2,{value});break}case"combobox":case"listbox":{const value=field.defaultValue||"";storage.setValue(id2,{value});break}default:continue}const domElement=document.querySelector(`[data-element-id="${id2}"]`);if(domElement){if(!GetElementsByNameSet.has(domElement)){warn(`_bindResetFormAction - element not allowed: ${id2}`);continue}}else continue;
domElement.dispatchEvent(new Event("resetform"))}return this.enableScripting&&this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:"app",ids:allIds,name:"ResetForm"}}),!1}}}class TextAnnotationElement extends AnnotationElement{constructor(parameters){super(parameters,{isRenderable:!0})}render(){this.container.classList.add("textAnnotation");const image2=document.createElement("img");return image2.src=this.imageResourcesPath+"annotation-"+this.data.name.toLowerCase()+
".svg",image2.setAttribute("data-l10n-id","pdfjs-text-annotation-type"),image2.setAttribute("data-l10n-args",JSON.stringify({type:this.data.name})),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container.append(image2),this.container}}class WidgetAnnotationElement extends AnnotationElement{render(){return this.container}showElementAndHideCanvas(element2){this.data.hasOwnCanvas&&(element2.previousSibling?.nodeName==="CANVAS"&&(element2.previousSibling.hidden=!0),element2.hidden=
!1)}_getKeyModifier(event2){return util_FeatureTest.platform.isMac?event2.metaKey:event2.ctrlKey}_setEventListener(element2,elementData,baseName,eventName,valueGetter){baseName.includes("mouse")?element2.addEventListener(baseName,event2=>{this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:eventName,value:valueGetter(event2),shift:event2.shiftKey,modifier:this._getKeyModifier(event2)}})}):element2.addEventListener(baseName,event2=>{if(baseName===
"blur"){if(!elementData.focused||!event2.relatedTarget)return;elementData.focused=!1}else if(baseName==="focus"){if(elementData.focused)return;elementData.focused=!0}valueGetter&&this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:this.data.id,name:eventName,value:valueGetter(event2)}})})}_setEventListeners(element2,elementData,names2,getter){for(const[baseName,eventName]of names2)(eventName==="Action"||this.data.actions?.[eventName])&&((eventName==="Focus"||eventName===
"Blur")&&(elementData||={focused:!1}),this._setEventListener(element2,elementData,baseName,eventName,getter),eventName==="Focus"&&!this.data.actions?.Blur?this._setEventListener(element2,elementData,"blur","Blur",null):eventName==="Blur"&&!this.data.actions?.Focus&&this._setEventListener(element2,elementData,"focus","Focus",null))}_setBackgroundColor(element2){const color=this.data.backgroundColor||null;element2.style.backgroundColor=color===null?"transparent":Util.makeHexColor(color[0],color[1],
color[2])}_setTextStyle(element2){const TEXT_ALIGNMENT=["left","center","right"],{fontColor}=this.data.defaultAppearanceData,fontSize=this.data.defaultAppearanceData.fontSize||annotation_layer_DEFAULT_FONT_SIZE,style2=element2.style;let computedFontSize;const BORDER_SIZE=2,roundToOneDecimal=x=>Math.round(10*x)/10;if(this.data.multiLine){const height=Math.abs(this.data.rect[3]-this.data.rect[1]-BORDER_SIZE),numberOfLines=Math.round(height/(LINE_FACTOR*fontSize))||1,lineHeight=height/numberOfLines;
computedFontSize=Math.min(fontSize,roundToOneDecimal(lineHeight/LINE_FACTOR))}else{const height=Math.abs(this.data.rect[3]-this.data.rect[1]-BORDER_SIZE);computedFontSize=Math.min(fontSize,roundToOneDecimal(height/LINE_FACTOR))}style2.fontSize=`calc(${computedFontSize}px * var(--total-scale-factor))`,style2.color=Util.makeHexColor(fontColor[0],fontColor[1],fontColor[2]),this.data.textAlignment!==null&&(style2.textAlign=TEXT_ALIGNMENT[this.data.textAlignment])}_setRequired(element2,isRequired){isRequired?
element2.setAttribute("required",!0):element2.removeAttribute("required"),element2.setAttribute("aria-required",isRequired)}}class TextWidgetAnnotationElement extends WidgetAnnotationElement{constructor(parameters){const isRenderable=parameters.renderForms||parameters.data.hasOwnCanvas||!parameters.data.hasAppearance&&!!parameters.data.fieldValue;super(parameters,{isRenderable})}setPropertyOnSiblings(base2,key2,value,keyInStorage){const storage=this.annotationStorage;for(const element2 of this._getElementsByName(
base2.name,base2.id))element2.domElement&&(element2.domElement[key2]=value),storage.setValue(element2.id,{[keyInStorage]:value})}render(){const storage=this.annotationStorage,id2=this.data.id;this.container.classList.add("textWidgetAnnotation");let element2=null;if(this.renderForms){const storedData=storage.getValue(id2,{value:this.data.fieldValue});let textContent=storedData.value||"";const maxLen=storage.getValue(id2,{charLimit:this.data.maxLen}).charLimit;maxLen&&textContent.length>maxLen&&(textContent=
textContent.slice(0,maxLen));let fieldFormattedValues=storedData.formattedValue||this.data.textContent?.join(`
`)||null;fieldFormattedValues&&this.data.comb&&(fieldFormattedValues=fieldFormattedValues.replaceAll(/\s+/g,""));const elementData={userValue:textContent,formattedValue:fieldFormattedValues,lastCommittedValue:null,commitKey:1,focused:!1};this.data.multiLine?(element2=document.createElement("textarea"),element2.textContent=fieldFormattedValues??textContent,this.data.doNotScroll&&(element2.style.overflowY="hidden")):(element2=document.createElement("input"),element2.type=this.data.password?"passwo\
rd":"text",element2.setAttribute("value",fieldFormattedValues??textContent),this.data.doNotScroll&&(element2.style.overflowX="hidden")),this.data.hasOwnCanvas&&(element2.hidden=!0),GetElementsByNameSet.add(element2),element2.setAttribute("data-element-id",id2),element2.disabled=this.data.readOnly,element2.name=this.data.fieldName,element2.tabIndex=0;const{datetimeFormat,datetimeType,timeStep}=this.data,hasDateOrTime=!!datetimeType&&this.enableScripting;datetimeFormat&&(element2.title=datetimeFormat),
this._setRequired(element2,this.data.required),maxLen&&(element2.maxLength=maxLen),element2.addEventListener("input",event2=>{storage.setValue(id2,{value:event2.target.value}),this.setPropertyOnSiblings(element2,"value",event2.target.value,"value"),elementData.formattedValue=null}),element2.addEventListener("resetform",event2=>{const defaultValue=this.data.defaultFieldValue??"";element2.value=elementData.userValue=defaultValue,elementData.formattedValue=null});let blurListener=event2=>{const{formattedValue}=elementData;
formattedValue!=null&&(event2.target.value=formattedValue),event2.target.scrollLeft=0};if(this.enableScripting&&this.hasJSActions){element2.addEventListener("focus",event2=>{if(elementData.focused)return;const{target:target2}=event2;if(hasDateOrTime&&(target2.type=datetimeType,timeStep&&(target2.step=timeStep)),elementData.userValue){const value=elementData.userValue;if(hasDateOrTime)if(datetimeType==="time"){const date2=new Date(value),parts=[date2.getHours(),date2.getMinutes(),date2.getSeconds()];
target2.value=parts.map(v=>v.toString().padStart(2,"0")).join(":")}else target2.value=new Date(value-TIMEZONE_OFFSET).toISOString().split(datetimeType==="date"?"T":".",1)[0];else target2.value=value}elementData.lastCommittedValue=target2.value,elementData.commitKey=1,this.data.actions?.Focus||(elementData.focused=!0)}),element2.addEventListener("updatefromsandbox",jsEvent=>{this.showElementAndHideCanvas(jsEvent.target);const actions={value(event2){elementData.userValue=event2.detail.value??"",hasDateOrTime||
storage.setValue(id2,{value:elementData.userValue.toString()}),event2.target.value=elementData.userValue},formattedValue(event2){const{formattedValue}=event2.detail;elementData.formattedValue=formattedValue,formattedValue!=null&&event2.target!==document.activeElement&&(event2.target.value=formattedValue);const data={formattedValue};hasDateOrTime&&(data.value=formattedValue),storage.setValue(id2,data)},selRange(event2){event2.target.setSelectionRange(...event2.detail.selRange)},charLimit:event2=>{
const{charLimit}=event2.detail,{target:target2}=event2;if(charLimit===0){target2.removeAttribute("maxLength");return}target2.setAttribute("maxLength",charLimit);let value=elementData.userValue;!value||value.length<=charLimit||(value=value.slice(0,charLimit),target2.value=elementData.userValue=value,storage.setValue(id2,{value}),this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:id2,name:"Keystroke",value,willCommit:!0,commitKey:1,selStart:target2.selectionStart,
selEnd:target2.selectionEnd}}))}};this._dispatchEventFromSandbox(actions,jsEvent)}),element2.addEventListener("keydown",event2=>{elementData.commitKey=1;let commitKey=-1;if(event2.key==="Escape"?commitKey=0:event2.key==="Enter"&&!this.data.multiLine?commitKey=2:event2.key==="Tab"&&(elementData.commitKey=3),commitKey===-1)return;const{value}=event2.target;elementData.lastCommittedValue!==value&&(elementData.lastCommittedValue=value,elementData.userValue=value,this.linkService.eventBus?.dispatch("\
dispatcheventinsandbox",{source:this,detail:{id:id2,name:"Keystroke",value,willCommit:!0,commitKey,selStart:event2.target.selectionStart,selEnd:event2.target.selectionEnd}}))});const _blurListener=blurListener;blurListener=null,element2.addEventListener("blur",event2=>{if(!elementData.focused||!event2.relatedTarget)return;this.data.actions?.Blur||(elementData.focused=!1);const{target:target2}=event2;let{value}=target2;if(hasDateOrTime){if(value&&datetimeType==="time"){const parts=value.split(":").
map(v=>parseInt(v,10));value=new Date(2e3,0,1,parts[0],parts[1],parts[2]||0).valueOf(),target2.step=""}else value=new Date(value).valueOf();target2.type="text"}elementData.userValue=value,elementData.lastCommittedValue!==value&&this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:id2,name:"Keystroke",value,willCommit:!0,commitKey:elementData.commitKey,selStart:event2.target.selectionStart,selEnd:event2.target.selectionEnd}}),_blurListener(event2)}),this.data.actions?.
Keystroke&&element2.addEventListener("beforeinput",event2=>{elementData.lastCommittedValue=null;const{data,target:target2}=event2,{value,selectionStart,selectionEnd}=target2;let selStart=selectionStart,selEnd=selectionEnd;switch(event2.inputType){case"deleteWordBackward":{const match=value.substring(0,selectionStart).match(/\w*[^\w]*$/);match&&(selStart-=match[0].length);break}case"deleteWordForward":{const match=value.substring(selectionStart).match(/^[^\w]*\w*/);match&&(selEnd+=match[0].length);
break}case"deleteContentBackward":selectionStart===selectionEnd&&(selStart-=1);break;case"deleteContentForward":selectionStart===selectionEnd&&(selEnd+=1);break}event2.preventDefault(),this.linkService.eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:id2,name:"Keystroke",value,change:data||"",willCommit:!1,selStart,selEnd}})}),this._setEventListeners(element2,elementData,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","M\
ouse Exit"],["mouseup","Mouse Up"]],event2=>event2.target.value)}if(blurListener&&element2.addEventListener("blur",blurListener),this.data.comb){const combWidth=(this.data.rect[2]-this.data.rect[0])/maxLen;element2.classList.add("comb"),element2.style.letterSpacing=`calc(${combWidth}px * var(--total-scale-factor) - 1ch)`}}else element2=document.createElement("div"),element2.textContent=this.data.fieldValue,element2.style.verticalAlign="middle",element2.style.display="table-cell",this.data.hasOwnCanvas&&
(element2.hidden=!0);return this._setTextStyle(element2),this._setBackgroundColor(element2),this._setDefaultPropertiesFromJS(element2),this.container.append(element2),this.container}}class SignatureWidgetAnnotationElement extends WidgetAnnotationElement{constructor(parameters){super(parameters,{isRenderable:!!parameters.data.hasOwnCanvas})}}class CheckboxWidgetAnnotationElement extends WidgetAnnotationElement{constructor(parameters){super(parameters,{isRenderable:parameters.renderForms})}render(){
const storage=this.annotationStorage,data=this.data,id2=data.id;let value=storage.getValue(id2,{value:data.exportValue===data.fieldValue}).value;typeof value=="string"&&(value=value!=="Off",storage.setValue(id2,{value})),this.container.classList.add("buttonWidgetAnnotation","checkBox");const element2=document.createElement("input");return GetElementsByNameSet.add(element2),element2.setAttribute("data-element-id",id2),element2.disabled=data.readOnly,this._setRequired(element2,this.data.required),
element2.type="checkbox",element2.name=data.fieldName,value&&element2.setAttribute("checked",!0),element2.setAttribute("exportValue",data.exportValue),element2.tabIndex=0,element2.addEventListener("change",event2=>{const{name,checked}=event2.target;for(const checkbox of this._getElementsByName(name,id2)){const curChecked=checked&&checkbox.exportValue===data.exportValue;checkbox.domElement&&(checkbox.domElement.checked=curChecked),storage.setValue(checkbox.id,{value:curChecked})}storage.setValue(
id2,{value:checked})}),element2.addEventListener("resetform",event2=>{const defaultValue=data.defaultFieldValue||"Off";event2.target.checked=defaultValue===data.exportValue}),this.enableScripting&&this.hasJSActions&&(element2.addEventListener("updatefromsandbox",jsEvent=>{const actions={value(event2){event2.target.checked=event2.detail.value!=="Off",storage.setValue(id2,{value:event2.target.checked})}};this._dispatchEventFromSandbox(actions,jsEvent)}),this._setEventListeners(element2,null,[["cha\
nge","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],event2=>event2.target.checked)),this._setBackgroundColor(element2),this._setDefaultPropertiesFromJS(element2),this.container.append(element2),this.container}}class RadioButtonWidgetAnnotationElement extends WidgetAnnotationElement{constructor(parameters){super(parameters,{isRenderable:parameters.renderForms})}render(){this.
container.classList.add("buttonWidgetAnnotation","radioButton");const storage=this.annotationStorage,data=this.data,id2=data.id;let value=storage.getValue(id2,{value:data.fieldValue===data.buttonValue}).value;if(typeof value=="string"&&(value=value!==data.buttonValue,storage.setValue(id2,{value})),value)for(const radio of this._getElementsByName(data.fieldName,id2))storage.setValue(radio.id,{value:!1});const element2=document.createElement("input");if(GetElementsByNameSet.add(element2),element2.
setAttribute("data-element-id",id2),element2.disabled=data.readOnly,this._setRequired(element2,this.data.required),element2.type="radio",element2.name=data.fieldName,value&&element2.setAttribute("checked",!0),element2.tabIndex=0,element2.addEventListener("change",event2=>{const{name,checked}=event2.target;for(const radio of this._getElementsByName(name,id2))storage.setValue(radio.id,{value:!1});storage.setValue(id2,{value:checked})}),element2.addEventListener("resetform",event2=>{const defaultValue=data.
defaultFieldValue;event2.target.checked=defaultValue!=null&&defaultValue===data.buttonValue}),this.enableScripting&&this.hasJSActions){const pdfButtonValue=data.buttonValue;element2.addEventListener("updatefromsandbox",jsEvent=>{const actions={value:event2=>{const checked=pdfButtonValue===event2.detail.value;for(const radio of this._getElementsByName(event2.target.name)){const curChecked=checked&&radio.id===id2;radio.domElement&&(radio.domElement.checked=curChecked),storage.setValue(radio.id,{value:curChecked})}}};
this._dispatchEventFromSandbox(actions,jsEvent)}),this._setEventListeners(element2,null,[["change","Validate"],["change","Action"],["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"]],event2=>event2.target.checked)}return this._setBackgroundColor(element2),this._setDefaultPropertiesFromJS(element2),this.container.append(element2),this.container}}class PushButtonWidgetAnnotationElement extends LinkAnnotationElement{constructor(parameters){
super(parameters,{ignoreBorder:parameters.data.hasAppearance})}render(){const container2=super.render();container2.classList.add("buttonWidgetAnnotation","pushButton");const linkElement=container2.lastChild;return this.enableScripting&&this.hasJSActions&&linkElement&&(this._setDefaultPropertiesFromJS(linkElement),linkElement.addEventListener("updatefromsandbox",jsEvent=>{this._dispatchEventFromSandbox({},jsEvent)})),container2}}class ChoiceWidgetAnnotationElement extends WidgetAnnotationElement{constructor(parameters){
super(parameters,{isRenderable:parameters.renderForms})}render(){this.container.classList.add("choiceWidgetAnnotation");const storage=this.annotationStorage,id2=this.data.id,storedData=storage.getValue(id2,{value:this.data.fieldValue}),selectElement=document.createElement("select");GetElementsByNameSet.add(selectElement),selectElement.setAttribute("data-element-id",id2),selectElement.disabled=this.data.readOnly,this._setRequired(selectElement,this.data.required),selectElement.name=this.data.fieldName,
selectElement.tabIndex=0;let addAnEmptyEntry=this.data.combo&&this.data.options.length>0;this.data.combo||(selectElement.size=this.data.options.length,this.data.multiSelect&&(selectElement.multiple=!0)),selectElement.addEventListener("resetform",event2=>{const defaultValue=this.data.defaultFieldValue;for(const option2 of selectElement.options)option2.selected=option2.value===defaultValue});for(const option2 of this.data.options){const optionElement=document.createElement("option");optionElement.
textContent=option2.displayValue,optionElement.value=option2.exportValue,storedData.value.includes(option2.exportValue)&&(optionElement.setAttribute("selected",!0),addAnEmptyEntry=!1),selectElement.append(optionElement)}let removeEmptyEntry=null;if(addAnEmptyEntry){const noneOptionElement=document.createElement("option");noneOptionElement.value=" ",noneOptionElement.setAttribute("hidden",!0),noneOptionElement.setAttribute("selected",!0),selectElement.prepend(noneOptionElement),removeEmptyEntry=()=>{
noneOptionElement.remove(),selectElement.removeEventListener("input",removeEmptyEntry),removeEmptyEntry=null},selectElement.addEventListener("input",removeEmptyEntry)}const getValue=isExport=>{const name=isExport?"value":"textContent",{options,multiple}=selectElement;return multiple?Array.prototype.filter.call(options,option2=>option2.selected).map(option2=>option2[name]):options.selectedIndex===-1?null:options[options.selectedIndex][name]};let selectedValues=getValue(!1);const getItems=event2=>{
const options=event2.target.options;return Array.prototype.map.call(options,option2=>({displayValue:option2.textContent,exportValue:option2.value}))};return this.enableScripting&&this.hasJSActions?(selectElement.addEventListener("updatefromsandbox",jsEvent=>{const actions={value(event2){removeEmptyEntry?.();const value=event2.detail.value,values=new Set(Array.isArray(value)?value:[value]);for(const option2 of selectElement.options)option2.selected=values.has(option2.value);storage.setValue(id2,{
value:getValue(!0)}),selectedValues=getValue(!1)},multipleSelection(event2){selectElement.multiple=!0},remove(event2){const options=selectElement.options,index2=event2.detail.remove;options[index2].selected=!1,selectElement.remove(index2),options.length>0&&Array.prototype.findIndex.call(options,option2=>option2.selected)===-1&&(options[0].selected=!0),storage.setValue(id2,{value:getValue(!0),items:getItems(event2)}),selectedValues=getValue(!1)},clear(event2){for(;selectElement.length!==0;)selectElement.
remove(0);storage.setValue(id2,{value:null,items:[]}),selectedValues=getValue(!1)},insert(event2){const{index:index2,displayValue,exportValue}=event2.detail.insert,selectChild=selectElement.children[index2],optionElement=document.createElement("option");optionElement.textContent=displayValue,optionElement.value=exportValue,selectChild?selectChild.before(optionElement):selectElement.append(optionElement),storage.setValue(id2,{value:getValue(!0),items:getItems(event2)}),selectedValues=getValue(!1)},
items(event2){const{items:items2}=event2.detail;for(;selectElement.length!==0;)selectElement.remove(0);for(const item of items2){const{displayValue,exportValue}=item,optionElement=document.createElement("option");optionElement.textContent=displayValue,optionElement.value=exportValue,selectElement.append(optionElement)}selectElement.options.length>0&&(selectElement.options[0].selected=!0),storage.setValue(id2,{value:getValue(!0),items:getItems(event2)}),selectedValues=getValue(!1)},indices(event2){
const indices=new Set(event2.detail.indices);for(const option2 of event2.target.options)option2.selected=indices.has(option2.index);storage.setValue(id2,{value:getValue(!0)}),selectedValues=getValue(!1)},editable(event2){event2.target.disabled=!event2.detail.editable}};this._dispatchEventFromSandbox(actions,jsEvent)}),selectElement.addEventListener("input",event2=>{const exportValue=getValue(!0),change=getValue(!1);storage.setValue(id2,{value:exportValue}),event2.preventDefault(),this.linkService.
eventBus?.dispatch("dispatcheventinsandbox",{source:this,detail:{id:id2,name:"Keystroke",value:selectedValues,change,changeEx:exportValue,willCommit:!1,commitKey:1,keyDown:!1}})}),this._setEventListeners(selectElement,null,[["focus","Focus"],["blur","Blur"],["mousedown","Mouse Down"],["mouseenter","Mouse Enter"],["mouseleave","Mouse Exit"],["mouseup","Mouse Up"],["input","Action"],["input","Validate"]],event2=>event2.target.value)):selectElement.addEventListener("input",function(event2){storage.
setValue(id2,{value:getValue(!0)})}),this.data.combo&&this._setTextStyle(selectElement),this._setBackgroundColor(selectElement),this._setDefaultPropertiesFromJS(selectElement),this.container.append(selectElement),this.container}}class PopupAnnotationElement extends AnnotationElement{constructor(parameters){const{data,elements}=parameters;super(parameters,{isRenderable:AnnotationElement._hasPopupData(data)}),this.elements=elements,this.popup=null}render(){const{container:container2}=this;container2.
classList.add("popupAnnotation"),container2.role="comment";const popup=this.popup=new PopupElement({container:this.container,color:this.data.color,titleObj:this.data.titleObj,modificationDate:this.data.modificationDate||this.data.creationDate,contentsObj:this.data.contentsObj,richText:this.data.richText,rect:this.data.rect,parentRect:this.data.parentRect||null,parent:this.parent,elements:this.elements,open:this.data.open}),elementIds=[];for(const element2 of this.elements)element2.popup=popup,element2.
container.ariaHasPopup="dialog",elementIds.push(element2.data.id),element2.addHighlightArea();return this.container.setAttribute("aria-controls",elementIds.map(id2=>`${AnnotationPrefix}${id2}`).join(",")),this.container}}class PopupElement{#boundKeyDown=this.#keyDown.bind(this);#boundHide=this.#hide.bind(this);#boundShow=this.#show.bind(this);#boundToggle=this.#toggle.bind(this);#color=null;#container=null;#contentsObj=null;#dateObj=null;#elements=null;#parent=null;#parentRect=null;#pinned=!1;#popup=null;#popupAbortController=null;#position=null;#rect=null;#richText=null;#titleObj=null;#updates=null;#wasVisible=!1;constructor({
container:container2,color,elements,titleObj,modificationDate,contentsObj,richText,parent,rect,parentRect,open:open2}){this.#container=container2,this.#titleObj=titleObj,this.#contentsObj=contentsObj,this.#richText=richText,this.#parent=parent,this.#color=color,this.#rect=rect,this.#parentRect=parentRect,this.#elements=elements,this.#dateObj=PDFDateString.toDateObject(modificationDate),this.trigger=elements.flatMap(e=>e.getElementsToTriggerPopup()),this.#addEventListeners(),this.#container.hidden=
!0,open2&&this.#toggle()}#addEventListeners(){if(this.#popupAbortController)return;this.#popupAbortController=new AbortController;const{signal}=this.#popupAbortController;for(const element2 of this.trigger)element2.addEventListener("click",this.#boundToggle,{signal}),element2.addEventListener("mouseenter",this.#boundShow,{signal}),element2.addEventListener("mouseleave",this.#boundHide,{signal}),element2.classList.add("popupTriggerArea");for(const element2 of this.#elements)element2.container?.addEventListener(
"keydown",this.#boundKeyDown,{signal})}render(){if(this.#popup)return;const popup=this.#popup=document.createElement("div");if(popup.className="popup",this.#color){const baseColor=popup.style.outlineColor=Util.makeHexColor(...this.#color);popup.style.backgroundColor=`color-mix(in srgb, ${baseColor} 30%, white)`}const header=document.createElement("span");if(header.className="header",this.#titleObj?.str){const title2=document.createElement("span");title2.className="title",header.append(title2),{dir:title2.
dir,str:title2.textContent}=this.#titleObj}if(popup.append(header),this.#dateObj){const modificationDate=document.createElement("time");modificationDate.className="popupDate",modificationDate.setAttribute("data-l10n-id","pdfjs-annotation-date-time-string"),modificationDate.setAttribute("data-l10n-args",JSON.stringify({dateObj:this.#dateObj.valueOf()})),modificationDate.dateTime=this.#dateObj.toISOString(),header.append(modificationDate)}const html2=this.#html;if(html2)XfaLayer.render({xfaHtml:html2,
intent:"richText",div:popup}),popup.lastChild.classList.add("richText","popupContent");else{const contents=this._formatContents(this.#contentsObj);popup.append(contents)}this.#container.append(popup)}get#html(){const richText=this.#richText,contentsObj=this.#contentsObj;return richText?.str&&(!contentsObj?.str||contentsObj.str===richText.str)&&this.#richText.html||null}get#fontSize(){return this.#html?.attributes?.style?.fontSize||0}get#fontColor(){return this.#html?.attributes?.style?.color||null}#makePopupContent(text2){
const popupLines=[],popupContent={str:text2,html:{name:"div",attributes:{dir:"auto"},children:[{name:"p",children:popupLines}]}},lineAttributes={style:{color:this.#fontColor,fontSize:this.#fontSize?`calc(${this.#fontSize}px * var(--total-scale-factor))`:""}};for(const line of text2.split(`
`))popupLines.push({name:"span",value:line,attributes:lineAttributes});return popupContent}_formatContents({str,dir}){const p2=document.createElement("p");p2.classList.add("popupContent"),p2.dir=dir;const lines=str.split(/(?:\r\n?|\n)/);for(let i=0,ii=lines.length;i<ii;++i){const line=lines[i];p2.append(document.createTextNode(line)),i<ii-1&&p2.append(document.createElement("br"))}return p2}#keyDown(event2){event2.altKey||event2.shiftKey||event2.ctrlKey||event2.metaKey||(event2.key==="Enter"||event2.
key==="Escape"&&this.#pinned)&&this.#toggle()}updateEdited({rect,popup,deleted}){if(deleted||popup?.deleted){this.remove();return}this.#addEventListeners(),this.#updates||={contentsObj:this.#contentsObj,richText:this.#richText},rect&&(this.#position=null),popup&&(this.#richText=this.#makePopupContent(popup.text),this.#dateObj=PDFDateString.toDateObject(popup.date),this.#contentsObj=null),this.#popup?.remove(),this.#popup=null}resetEdited(){this.#updates&&({contentsObj:this.#contentsObj,richText:this.#richText}=
this.#updates,this.#updates=null,this.#popup?.remove(),this.#popup=null,this.#position=null)}remove(){this.#popupAbortController?.abort(),this.#popupAbortController=null,this.#popup?.remove(),this.#popup=null,this.#wasVisible=!1,this.#pinned=!1;for(const element2 of this.trigger)element2.classList.remove("popupTriggerArea")}#setPosition(){if(this.#position!==null)return;const{page:{view},viewport:{rawDims:{pageWidth,pageHeight,pageX,pageY}}}=this.#parent;let useParentRect=!!this.#parentRect,rect=useParentRect?
this.#parentRect:this.#rect;for(const element2 of this.#elements)if(!rect||Util.intersect(element2.data.rect,rect)!==null){rect=element2.data.rect,useParentRect=!0;break}const normalizedRect=Util.normalizeRect([rect[0],view[3]-rect[1]+view[1],rect[2],view[3]-rect[3]+view[1]]),parentWidth=useParentRect?rect[2]-rect[0]+5:0,popupLeft=normalizedRect[0]+parentWidth,popupTop=normalizedRect[1];this.#position=[100*(popupLeft-pageX)/pageWidth,100*(popupTop-pageY)/pageHeight];const{style:style2}=this.#container;
style2.left=`${this.#position[0]}%`,style2.top=`${this.#position[1]}%`}#toggle(){this.#pinned=!this.#pinned,this.#pinned?(this.#show(),this.#container.addEventListener("click",this.#boundToggle),this.#container.addEventListener("keydown",this.#boundKeyDown)):(this.#hide(),this.#container.removeEventListener("click",this.#boundToggle),this.#container.removeEventListener("keydown",this.#boundKeyDown))}#show(){this.#popup||this.render(),this.isVisible?this.#pinned&&this.#container.classList.add("fo\
cused"):(this.#setPosition(),this.#container.hidden=!1,this.#container.style.zIndex=parseInt(this.#container.style.zIndex)+1e3)}#hide(){this.#container.classList.remove("focused"),!(this.#pinned||!this.isVisible)&&(this.#container.hidden=!0,this.#container.style.zIndex=parseInt(this.#container.style.zIndex)-1e3)}forceHide(){this.#wasVisible=this.isVisible,this.#wasVisible&&(this.#container.hidden=!0)}maybeShow(){this.#addEventListeners(),this.#wasVisible&&(this.#popup||this.#show(),this.#wasVisible=
!1,this.#container.hidden=!1)}get isVisible(){return this.#container.hidden===!1}}class FreeTextAnnotationElement extends AnnotationElement{constructor(parameters){super(parameters,{isRenderable:!0,ignoreBorder:!0}),this.textContent=parameters.data.textContent,this.textPosition=parameters.data.textPosition,this.annotationEditorType=AnnotationEditorType.FREETEXT}render(){if(this.container.classList.add("freeTextAnnotation"),this.textContent){const content2=document.createElement("div");content2.classList.
add("annotationTextContent"),content2.setAttribute("role","comment");for(const line of this.textContent){const lineSpan=document.createElement("span");lineSpan.textContent=line,content2.append(lineSpan)}this.container.append(content2)}return!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this._editOnDoubleClick(),this.container}}class LineAnnotationElement extends AnnotationElement{#line=null;constructor(parameters){super(parameters,{isRenderable:!0,ignoreBorder:!0})}render(){this.container.
classList.add("lineAnnotation");const{data,width,height}=this,svg2=this.svgFactory.create(width,height,!0),line=this.#line=this.svgFactory.createElement("svg:line");return line.setAttribute("x1",data.rect[2]-data.lineCoordinates[0]),line.setAttribute("y1",data.rect[3]-data.lineCoordinates[1]),line.setAttribute("x2",data.rect[2]-data.lineCoordinates[2]),line.setAttribute("y2",data.rect[3]-data.lineCoordinates[3]),line.setAttribute("stroke-width",data.borderStyle.width||1),line.setAttribute("strok\
e","transparent"),line.setAttribute("fill","transparent"),svg2.append(line),this.container.append(svg2),!data.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return this.#line}addHighlightArea(){this.container.classList.add("highlightArea")}}class SquareAnnotationElement extends AnnotationElement{#square=null;constructor(parameters){super(parameters,{isRenderable:!0,ignoreBorder:!0})}render(){this.container.classList.add("squareAnnotation");const{data,
width,height}=this,svg2=this.svgFactory.create(width,height,!0),borderWidth=data.borderStyle.width,square=this.#square=this.svgFactory.createElement("svg:rect");return square.setAttribute("x",borderWidth/2),square.setAttribute("y",borderWidth/2),square.setAttribute("width",width-borderWidth),square.setAttribute("height",height-borderWidth),square.setAttribute("stroke-width",borderWidth||1),square.setAttribute("stroke","transparent"),square.setAttribute("fill","transparent"),svg2.append(square),this.
container.append(svg2),!data.popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return this.#square}addHighlightArea(){this.container.classList.add("highlightArea")}}class CircleAnnotationElement extends AnnotationElement{#circle=null;constructor(parameters){super(parameters,{isRenderable:!0,ignoreBorder:!0})}render(){this.container.classList.add("circleAnnotation");const{data,width,height}=this,svg2=this.svgFactory.create(width,height,!0),borderWidth=data.
borderStyle.width,circle=this.#circle=this.svgFactory.createElement("svg:ellipse");return circle.setAttribute("cx",width/2),circle.setAttribute("cy",height/2),circle.setAttribute("rx",width/2-borderWidth/2),circle.setAttribute("ry",height/2-borderWidth/2),circle.setAttribute("stroke-width",borderWidth||1),circle.setAttribute("stroke","transparent"),circle.setAttribute("fill","transparent"),svg2.append(circle),this.container.append(svg2),!data.popupRef&&this.hasPopupData&&this._createPopup(),this.
container}getElementsToTriggerPopup(){return this.#circle}addHighlightArea(){this.container.classList.add("highlightArea")}}class PolylineAnnotationElement extends AnnotationElement{#polyline=null;constructor(parameters){super(parameters,{isRenderable:!0,ignoreBorder:!0}),this.containerClassName="polylineAnnotation",this.svgElementName="svg:polyline"}render(){this.container.classList.add(this.containerClassName);const{data:{rect,vertices,borderStyle,popupRef},width,height}=this;if(!vertices)return this.
container;const svg2=this.svgFactory.create(width,height,!0);let points=[];for(let i=0,ii=vertices.length;i<ii;i+=2){const x=vertices[i]-rect[0],y=rect[3]-vertices[i+1];points.push(`${x},${y}`)}points=points.join(" ");const polyline=this.#polyline=this.svgFactory.createElement(this.svgElementName);return polyline.setAttribute("points",points),polyline.setAttribute("stroke-width",borderStyle.width||1),polyline.setAttribute("stroke","transparent"),polyline.setAttribute("fill","transparent"),svg2.append(
polyline),this.container.append(svg2),!popupRef&&this.hasPopupData&&this._createPopup(),this.container}getElementsToTriggerPopup(){return this.#polyline}addHighlightArea(){this.container.classList.add("highlightArea")}}class PolygonAnnotationElement extends PolylineAnnotationElement{constructor(parameters){super(parameters),this.containerClassName="polygonAnnotation",this.svgElementName="svg:polygon"}}class CaretAnnotationElement extends AnnotationElement{constructor(parameters){super(parameters,
{isRenderable:!0,ignoreBorder:!0})}render(){return this.container.classList.add("caretAnnotation"),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),this.container}}class InkAnnotationElement extends AnnotationElement{#polylinesGroupElement=null;#polylines=[];constructor(parameters){super(parameters,{isRenderable:!0,ignoreBorder:!0}),this.containerClassName="inkAnnotation",this.svgElementName="svg:polyline",this.annotationEditorType=this.data.it==="InkHighlight"?AnnotationEditorType.HIGHLIGHT:
AnnotationEditorType.INK}#getTransform(rotation,rect){switch(rotation){case 90:return{transform:`rotate(90) translate(${-rect[0]},${rect[1]}) scale(1,-1)`,width:rect[3]-rect[1],height:rect[2]-rect[0]};case 180:return{transform:`rotate(180) translate(${-rect[2]},${rect[1]}) scale(1,-1)`,width:rect[2]-rect[0],height:rect[3]-rect[1]};case 270:return{transform:`rotate(270) translate(${-rect[2]},${rect[3]}) scale(1,-1)`,width:rect[3]-rect[1],height:rect[2]-rect[0]};default:return{transform:`translate\
(${-rect[0]},${rect[3]}) scale(1,-1)`,width:rect[2]-rect[0],height:rect[3]-rect[1]}}}render(){this.container.classList.add(this.containerClassName);const{data:{rect,rotation,inkLists,borderStyle,popupRef}}=this,{transform:transform2,width,height}=this.#getTransform(rotation,rect),svg2=this.svgFactory.create(width,height,!0),g=this.#polylinesGroupElement=this.svgFactory.createElement("svg:g");svg2.append(g),g.setAttribute("stroke-width",borderStyle.width||1),g.setAttribute("stroke-linecap","round"),
g.setAttribute("stroke-linejoin","round"),g.setAttribute("stroke-miterlimit",10),g.setAttribute("stroke","transparent"),g.setAttribute("fill","transparent"),g.setAttribute("transform",transform2);for(let i=0,ii=inkLists.length;i<ii;i++){const polyline=this.svgFactory.createElement(this.svgElementName);this.#polylines.push(polyline),polyline.setAttribute("points",inkLists[i].join(",")),g.append(polyline)}return!popupRef&&this.hasPopupData&&this._createPopup(),this.container.append(svg2),this._editOnDoubleClick(),
this.container}updateEdited(params){super.updateEdited(params);const{thickness,points,rect}=params,g=this.#polylinesGroupElement;if(thickness>=0&&g.setAttribute("stroke-width",thickness||1),points)for(let i=0,ii=this.#polylines.length;i<ii;i++)this.#polylines[i].setAttribute("points",points[i].join(","));if(rect){const{transform:transform2,width,height}=this.#getTransform(this.data.rotation,rect);g.parentElement.setAttribute("viewBox",`0 0 ${width} ${height}`),g.setAttribute("transform",transform2)}}getElementsToTriggerPopup(){
return this.#polylines}addHighlightArea(){this.container.classList.add("highlightArea")}}class HighlightAnnotationElement extends AnnotationElement{constructor(parameters){super(parameters,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0}),this.annotationEditorType=AnnotationEditorType.HIGHLIGHT}render(){const{data:{overlaidText,popupRef}}=this;if(!popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("highlightAnnotation"),this._editOnDoubleClick(),overlaidText){
const mark2=document.createElement("mark");mark2.classList.add("overlaidText"),mark2.textContent=overlaidText,this.container.append(mark2)}return this.container}}class UnderlineAnnotationElement extends AnnotationElement{constructor(parameters){super(parameters,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){const{data:{overlaidText,popupRef}}=this;if(!popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("underlineAnnotation"),overlaidText){const underline=document.
createElement("u");underline.classList.add("overlaidText"),underline.textContent=overlaidText,this.container.append(underline)}return this.container}}class SquigglyAnnotationElement extends AnnotationElement{constructor(parameters){super(parameters,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){const{data:{overlaidText,popupRef}}=this;if(!popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("squigglyAnnotation"),overlaidText){const underline=document.
createElement("u");underline.classList.add("overlaidText"),underline.textContent=overlaidText,this.container.append(underline)}return this.container}}class StrikeOutAnnotationElement extends AnnotationElement{constructor(parameters){super(parameters,{isRenderable:!0,ignoreBorder:!0,createQuadrilaterals:!0})}render(){const{data:{overlaidText,popupRef}}=this;if(!popupRef&&this.hasPopupData&&this._createPopup(),this.container.classList.add("strikeoutAnnotation"),overlaidText){const strikeout=document.
createElement("s");strikeout.classList.add("overlaidText"),strikeout.textContent=overlaidText,this.container.append(strikeout)}return this.container}}class StampAnnotationElement extends AnnotationElement{constructor(parameters){super(parameters,{isRenderable:!0,ignoreBorder:!0}),this.annotationEditorType=AnnotationEditorType.STAMP}render(){return this.container.classList.add("stampAnnotation"),this.container.setAttribute("role","img"),!this.data.popupRef&&this.hasPopupData&&this._createPopup(),
this._editOnDoubleClick(),this.container}}class FileAttachmentAnnotationElement extends AnnotationElement{#trigger=null;constructor(parameters){super(parameters,{isRenderable:!0});const{file}=this.data;this.filename=file.filename,this.content=file.content,this.linkService.eventBus?.dispatch("fileattachmentannotation",{source:this,...file})}render(){this.container.classList.add("fileAttachmentAnnotation");const{container:container2,data}=this;let trigger;data.hasAppearance||data.fillAlpha===0?trigger=
document.createElement("div"):(trigger=document.createElement("img"),trigger.src=`${this.imageResourcesPath}annotation-${/paperclip/i.test(data.name)?"paperclip":"pushpin"}.svg`,data.fillAlpha&&data.fillAlpha<1&&(trigger.style=`filter: opacity(${Math.round(data.fillAlpha*100)}%);`)),trigger.addEventListener("dblclick",this.#download.bind(this)),this.#trigger=trigger;const{isMac}=util_FeatureTest.platform;return container2.addEventListener("keydown",evt=>{evt.key==="Enter"&&(isMac?evt.metaKey:evt.
ctrlKey)&&this.#download()}),!data.popupRef&&this.hasPopupData?this._createPopup():trigger.classList.add("popupTriggerArea"),container2.append(trigger),container2}getElementsToTriggerPopup(){return this.#trigger}addHighlightArea(){this.container.classList.add("highlightArea")}#download(){this.downloadManager?.openOrDownloadData(this.content,this.filename)}}class AnnotationLayer{#accessibilityManager=null;#annotationCanvasMap=null;#editableAnnotations=new Map;#structTreeLayer=null;constructor({div,
accessibilityManager,annotationCanvasMap,annotationEditorUIManager,page:page2,viewport,structTreeLayer}){this.div=div,this.#accessibilityManager=accessibilityManager,this.#annotationCanvasMap=annotationCanvasMap,this.#structTreeLayer=structTreeLayer||null,this.page=page2,this.viewport=viewport,this.zIndex=0,this._annotationEditorUIManager=annotationEditorUIManager}hasEditableAnnotations(){return this.#editableAnnotations.size>0}async#appendElement(element2,id2,popupElements){const contentElement=element2.
firstChild||element2,annotationId=contentElement.id=`${AnnotationPrefix}${id2}`,ariaAttributes=await this.#structTreeLayer?.getAriaAttributes(annotationId);if(ariaAttributes)for(const[key2,value]of ariaAttributes)contentElement.setAttribute(key2,value);popupElements?popupElements.at(-1).container.after(element2):(this.div.append(element2),this.#accessibilityManager?.moveElementInDOM(this.div,element2,contentElement,!1))}async render(params){const{annotations}=params,layer=this.div;setLayerDimensions(
layer,this.viewport);const popupToElements=new Map,elementParams={data:null,layer,linkService:params.linkService,downloadManager:params.downloadManager,imageResourcesPath:params.imageResourcesPath||"",renderForms:params.renderForms!==!1,svgFactory:new DOMSVGFactory,annotationStorage:params.annotationStorage||new AnnotationStorage,enableScripting:params.enableScripting===!0,hasJSActions:params.hasJSActions,fieldObjects:params.fieldObjects,parent:this,elements:null};for(const data of annotations){
if(data.noHTML)continue;const isPopupAnnotation=data.annotationType===AnnotationType.POPUP;if(isPopupAnnotation){const elements=popupToElements.get(data.id);if(!elements)continue;elementParams.elements=elements}else if(data.rect[2]===data.rect[0]||data.rect[3]===data.rect[1])continue;elementParams.data=data;const element2=AnnotationElementFactory.create(elementParams);if(!element2.isRenderable)continue;if(!isPopupAnnotation&&data.popupRef){const elements=popupToElements.get(data.popupRef);elements?
elements.push(element2):popupToElements.set(data.popupRef,[element2])}const rendered=element2.render();data.hidden&&(rendered.style.visibility="hidden"),await this.#appendElement(rendered,data.id,elementParams.elements),element2._isEditable&&(this.#editableAnnotations.set(element2.data.id,element2),this._annotationEditorUIManager?.renderAnnotationElement(element2))}this.#setAnnotationCanvasMap()}async addLinkAnnotations(annotations,linkService){const elementParams={data:null,layer:this.div,linkService,
svgFactory:new DOMSVGFactory,parent:this};for(const data of annotations){data.borderStyle||=AnnotationLayer._defaultBorderStyle,elementParams.data=data;const element2=AnnotationElementFactory.create(elementParams);if(!element2.isRenderable)continue;const rendered=element2.render();await this.#appendElement(rendered,data.id,null)}}update({viewport}){const layer=this.div;this.viewport=viewport,setLayerDimensions(layer,{rotation:viewport.rotation}),this.#setAnnotationCanvasMap(),layer.hidden=!1}#setAnnotationCanvasMap(){
if(!this.#annotationCanvasMap)return;const layer=this.div;for(const[id2,canvas]of this.#annotationCanvasMap){const element2=layer.querySelector(`[data-annotation-id="${id2}"]`);if(!element2)continue;canvas.className="annotationContent";const{firstChild}=element2;firstChild?firstChild.nodeName==="CANVAS"?firstChild.replaceWith(canvas):firstChild.classList.contains("annotationContent")?firstChild.after(canvas):firstChild.before(canvas):element2.append(canvas);const editableAnnotation=this.#editableAnnotations.
get(id2);editableAnnotation&&(editableAnnotation._hasNoCanvas?(this._annotationEditorUIManager?.setMissingCanvas(id2,element2.id,canvas),editableAnnotation._hasNoCanvas=!1):editableAnnotation.canvas=canvas)}this.#annotationCanvasMap.clear()}getEditableAnnotations(){return Array.from(this.#editableAnnotations.values())}getEditableAnnotation(id2){return this.#editableAnnotations.get(id2)}static get _defaultBorderStyle(){return shadow(this,"_defaultBorderStyle",Object.freeze({width:1,rawWidth:1,style:AnnotationBorderStyleType.
SOLID,dashArray:[3],horizontalCornerRadius:0,verticalCornerRadius:0}))}}const EOL_PATTERN=/\r\n?|\n/g;class FreeTextEditor extends AnnotationEditor{#color;#content="";#editorDivId=`${this.id}-editor`;#editModeAC=null;#fontSize;_colorPicker=null;static _freeTextDefaultContent="";static _internalPadding=0;static _defaultColor=null;static _defaultFontSize=10;static get _keyboardManager(){const proto=FreeTextEditor.prototype,arrowChecker=self2=>self2.isEmpty(),small=AnnotationEditorUIManager.TRANSLATE_SMALL,
big=AnnotationEditorUIManager.TRANSLATE_BIG;return shadow(this,"_keyboardManager",new KeyboardManager([[["ctrl+s","mac+meta+s","ctrl+p","mac+meta+p"],proto.commitOrRemove,{bubbles:!0}],[["ctrl+Enter","mac+meta+Enter","Escape","mac+Escape"],proto.commitOrRemove],[["ArrowLeft","mac+ArrowLeft"],proto._translateEmpty,{args:[-small,0],checker:arrowChecker}],[["ctrl+ArrowLeft","mac+shift+ArrowLeft"],proto._translateEmpty,{args:[-big,0],checker:arrowChecker}],[["ArrowRight","mac+ArrowRight"],proto._translateEmpty,
{args:[small,0],checker:arrowChecker}],[["ctrl+ArrowRight","mac+shift+ArrowRight"],proto._translateEmpty,{args:[big,0],checker:arrowChecker}],[["ArrowUp","mac+ArrowUp"],proto._translateEmpty,{args:[0,-small],checker:arrowChecker}],[["ctrl+ArrowUp","mac+shift+ArrowUp"],proto._translateEmpty,{args:[0,-big],checker:arrowChecker}],[["ArrowDown","mac+ArrowDown"],proto._translateEmpty,{args:[0,small],checker:arrowChecker}],[["ctrl+ArrowDown","mac+shift+ArrowDown"],proto._translateEmpty,{args:[0,big],checker:arrowChecker}]]))}static _type="\
freetext";static _editorType=AnnotationEditorType.FREETEXT;constructor(params){super({...params,name:"freeTextEditor"}),this.#color=params.color||FreeTextEditor._defaultColor||AnnotationEditor._defaultLineColor,this.#fontSize=params.fontSize||FreeTextEditor._defaultFontSize,this.annotationElementId||this._uiManager.a11yAlert("pdfjs-editor-freetext-added-alert")}static initialize(l10n,uiManager){AnnotationEditor.initialize(l10n,uiManager);const style2=getComputedStyle(document.documentElement);this.
_internalPadding=parseFloat(style2.getPropertyValue("--freetext-padding"))}static updateDefaultParams(type2,value){switch(type2){case AnnotationEditorParamsType.FREETEXT_SIZE:FreeTextEditor._defaultFontSize=value;break;case AnnotationEditorParamsType.FREETEXT_COLOR:FreeTextEditor._defaultColor=value;break}}updateParams(type2,value){switch(type2){case AnnotationEditorParamsType.FREETEXT_SIZE:this.#updateFontSize(value);break;case AnnotationEditorParamsType.FREETEXT_COLOR:this.#updateColor(value);
break}}static get defaultPropertiesToUpdate(){return[[AnnotationEditorParamsType.FREETEXT_SIZE,FreeTextEditor._defaultFontSize],[AnnotationEditorParamsType.FREETEXT_COLOR,FreeTextEditor._defaultColor||AnnotationEditor._defaultLineColor]]}get propertiesToUpdate(){return[[AnnotationEditorParamsType.FREETEXT_SIZE,this.#fontSize],[AnnotationEditorParamsType.FREETEXT_COLOR,this.#color]]}get toolbarButtons(){return this._colorPicker||=new BasicColorPicker(this),[["colorPicker",this._colorPicker]]}get colorType(){
return AnnotationEditorParamsType.FREETEXT_COLOR}get colorValue(){return this.#color}#updateFontSize(fontSize){const setFontsize=size2=>{this.editorDiv.style.fontSize=`calc(${size2}px * var(--total-scale-factor))`,this.translate(0,-(size2-this.#fontSize)*this.parentScale),this.#fontSize=size2,this.#setEditorDimensions()},savedFontsize=this.#fontSize;this.addCommands({cmd:setFontsize.bind(this,fontSize),undo:setFontsize.bind(this,savedFontsize),post:this._uiManager.updateUI.bind(this._uiManager,this),
mustExec:!0,type:AnnotationEditorParamsType.FREETEXT_SIZE,overwriteIfSameType:!0,keepUndo:!0})}#updateColor(color){const setColor=col=>{this.#color=this.editorDiv.style.color=col,this._colorPicker?.update(col)},savedColor=this.#color;this.addCommands({cmd:setColor.bind(this,color),undo:setColor.bind(this,savedColor),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:AnnotationEditorParamsType.FREETEXT_COLOR,overwriteIfSameType:!0,keepUndo:!0})}_translateEmpty(x,y){this._uiManager.
translateSelectedEditors(x,y,!0)}getInitialTranslation(){const scale2=this.parentScale;return[-FreeTextEditor._internalPadding*scale2,-(FreeTextEditor._internalPadding+this.#fontSize)*scale2]}rebuild(){this.parent&&(super.rebuild(),this.div!==null&&(this.isAttachedToDOM||this.parent.add(this)))}enableEditMode(){if(!super.enableEditMode())return!1;this.overlayDiv.classList.remove("enabled"),this.editorDiv.contentEditable=!0,this._isDraggable=!1,this.div.removeAttribute("aria-activedescendant"),this.#editModeAC=
new AbortController;const signal=this._uiManager.combinedSignal(this.#editModeAC);return this.editorDiv.addEventListener("keydown",this.editorDivKeydown.bind(this),{signal}),this.editorDiv.addEventListener("focus",this.editorDivFocus.bind(this),{signal}),this.editorDiv.addEventListener("blur",this.editorDivBlur.bind(this),{signal}),this.editorDiv.addEventListener("input",this.editorDivInput.bind(this),{signal}),this.editorDiv.addEventListener("paste",this.editorDivPaste.bind(this),{signal}),!0}disableEditMode(){
return super.disableEditMode()?(this.overlayDiv.classList.add("enabled"),this.editorDiv.contentEditable=!1,this.div.setAttribute("aria-activedescendant",this.#editorDivId),this._isDraggable=!0,this.#editModeAC?.abort(),this.#editModeAC=null,this.div.focus({preventScroll:!0}),this.isEditing=!1,this.parent.div.classList.add("freetextEditing"),!0):!1}focusin(event2){this._focusEventsAllowed&&(super.focusin(event2),event2.target!==this.editorDiv&&this.editorDiv.focus())}onceAdded(focus2){this.width||
(this.enableEditMode(),focus2&&this.editorDiv.focus(),this._initialOptions?.isCentered&&this.center(),this._initialOptions=null)}isEmpty(){return!this.editorDiv||this.editorDiv.innerText.trim()===""}remove(){this.isEditing=!1,this.parent&&(this.parent.setEditingState(!0),this.parent.div.classList.add("freetextEditing")),super.remove()}#extractText(){const buffer=[];this.editorDiv.normalize();let prevChild=null;for(const child2 of this.editorDiv.childNodes)prevChild?.nodeType===Node.TEXT_NODE&&child2.
nodeName==="BR"||(buffer.push(FreeTextEditor.#getNodeContent(child2)),prevChild=child2);return buffer.join(`
`)}#setEditorDimensions(){const[parentWidth,parentHeight]=this.parentDimensions;let rect;if(this.isAttachedToDOM)rect=this.div.getBoundingClientRect();else{const{currentLayer,div}=this,savedDisplay=div.style.display,savedVisibility=div.classList.contains("hidden");div.classList.remove("hidden"),div.style.display="hidden",currentLayer.div.append(this.div),rect=div.getBoundingClientRect(),div.remove(),div.style.display=savedDisplay,div.classList.toggle("hidden",savedVisibility)}this.rotation%180===
this.parentRotation%180?(this.width=rect.width/parentWidth,this.height=rect.height/parentHeight):(this.width=rect.height/parentWidth,this.height=rect.width/parentHeight),this.fixAndSetPosition()}commit(){if(!this.isInEditMode())return;super.commit(),this.disableEditMode();const savedText=this.#content,newText=this.#content=this.#extractText().trimEnd();if(savedText===newText)return;const setText=text2=>{if(this.#content=text2,!text2){this.remove();return}this.#setContent(),this._uiManager.rebuild(
this),this.#setEditorDimensions()};this.addCommands({cmd:()=>{setText(newText)},undo:()=>{setText(savedText)},mustExec:!1}),this.#setEditorDimensions()}shouldGetKeyboardEvents(){return this.isInEditMode()}enterInEditMode(){this.enableEditMode(),this.editorDiv.focus()}keydown(event2){event2.target===this.div&&event2.key==="Enter"&&(this.enterInEditMode(),event2.preventDefault())}editorDivKeydown(event2){FreeTextEditor._keyboardManager.exec(this,event2)}editorDivFocus(event2){this.isEditing=!0}editorDivBlur(event2){
this.isEditing=!1}editorDivInput(event2){this.parent.div.classList.toggle("freetextEditing",this.isEmpty())}disableEditing(){this.editorDiv.setAttribute("role","comment"),this.editorDiv.removeAttribute("aria-multiline")}enableEditing(){this.editorDiv.setAttribute("role","textbox"),this.editorDiv.setAttribute("aria-multiline",!0)}get canChangeContent(){return!0}render(){if(this.div)return this.div;let baseX,baseY;(this._isCopy||this.annotationElementId)&&(baseX=this.x,baseY=this.y),super.render(),
this.editorDiv=document.createElement("div"),this.editorDiv.className="internal",this.editorDiv.setAttribute("id",this.#editorDivId),this.editorDiv.setAttribute("data-l10n-id","pdfjs-free-text2"),this.editorDiv.setAttribute("data-l10n-attrs","default-content"),this.enableEditing(),this.editorDiv.contentEditable=!0;const{style:style2}=this.editorDiv;if(style2.fontSize=`calc(${this.#fontSize}px * var(--total-scale-factor))`,style2.color=this.#color,this.div.append(this.editorDiv),this.overlayDiv=document.
createElement("div"),this.overlayDiv.classList.add("overlay","enabled"),this.div.append(this.overlayDiv),this._isCopy||this.annotationElementId){const[parentWidth,parentHeight]=this.parentDimensions;if(this.annotationElementId){const{position:position2}=this._initialData;let[tx,ty]=this.getInitialTranslation();[tx,ty]=this.pageTranslationToScreen(tx,ty);const[pageWidth,pageHeight]=this.pageDimensions,[pageX,pageY]=this.pageTranslation;let posX,posY;switch(this.rotation){case 0:posX=baseX+(position2[0]-
pageX)/pageWidth,posY=baseY+this.height-(position2[1]-pageY)/pageHeight;break;case 90:posX=baseX+(position2[0]-pageX)/pageWidth,posY=baseY-(position2[1]-pageY)/pageHeight,[tx,ty]=[ty,-tx];break;case 180:posX=baseX-this.width+(position2[0]-pageX)/pageWidth,posY=baseY-(position2[1]-pageY)/pageHeight,[tx,ty]=[-tx,-ty];break;case 270:posX=baseX+(position2[0]-pageX-this.height*pageHeight)/pageWidth,posY=baseY+(position2[1]-pageY-this.width*pageWidth)/pageHeight,[tx,ty]=[-ty,tx];break}this.setAt(posX*
parentWidth,posY*parentHeight,tx,ty)}else this._moveAfterPaste(baseX,baseY);this.#setContent(),this._isDraggable=!0,this.editorDiv.contentEditable=!1}else this._isDraggable=!1,this.editorDiv.contentEditable=!0;return this.div}static#getNodeContent(node2){return(node2.nodeType===Node.TEXT_NODE?node2.nodeValue:node2.innerText).replaceAll(EOL_PATTERN,"")}editorDivPaste(event2){const clipboardData=event2.clipboardData||window.clipboardData,{types:types2}=clipboardData;if(types2.length===1&&types2[0]===
"text/plain")return;event2.preventDefault();const paste=FreeTextEditor.#deserializeContent(clipboardData.getData("text")||"").replaceAll(EOL_PATTERN,`
`);if(!paste)return;const selection=window.getSelection();if(!selection.rangeCount)return;this.editorDiv.normalize(),selection.deleteFromDocument();const range=selection.getRangeAt(0);if(!paste.includes(`
`)){range.insertNode(document.createTextNode(paste)),this.editorDiv.normalize(),selection.collapseToStart();return}const{startContainer,startOffset}=range,bufferBefore=[],bufferAfter=[];if(startContainer.nodeType===Node.TEXT_NODE){const parent=startContainer.parentElement;if(bufferAfter.push(startContainer.nodeValue.slice(startOffset).replaceAll(EOL_PATTERN,"")),parent!==this.editorDiv){let buffer=bufferBefore;for(const child2 of this.editorDiv.childNodes){if(child2===parent){buffer=bufferAfter;
continue}buffer.push(FreeTextEditor.#getNodeContent(child2))}}bufferBefore.push(startContainer.nodeValue.slice(0,startOffset).replaceAll(EOL_PATTERN,""))}else if(startContainer===this.editorDiv){let buffer=bufferBefore,i=0;for(const child2 of this.editorDiv.childNodes)i++===startOffset&&(buffer=bufferAfter),buffer.push(FreeTextEditor.#getNodeContent(child2))}this.#content=`${bufferBefore.join(`
`)}${paste}${bufferAfter.join(`
`)}`,this.#setContent();const newRange=new Range;let beforeLength=Math.sumPrecise(bufferBefore.map(line=>line.length));for(const{firstChild}of this.editorDiv.childNodes)if(firstChild.nodeType===Node.TEXT_NODE){const length=firstChild.nodeValue.length;if(beforeLength<=length){newRange.setStart(firstChild,beforeLength),newRange.setEnd(firstChild,beforeLength);break}beforeLength-=length}selection.removeAllRanges(),selection.addRange(newRange)}#setContent(){if(this.editorDiv.replaceChildren(),!!this.#content)
for(const line of this.#content.split(`
`)){const div=document.createElement("div");div.append(line?document.createTextNode(line):document.createElement("br")),this.editorDiv.append(div)}}#serializeContent(){return this.#content.replaceAll(" "," ")}static#deserializeContent(content2){return content2.replaceAll(" "," ")}get contentDiv(){return this.editorDiv}static async deserialize(data,parent,uiManager){let initialData=null;if(data instanceof FreeTextAnnotationElement){const{data:{defaultAppearanceData:{fontSize,fontColor},rect,rotation,
id:id2,popupRef,contentsObj},textContent,textPosition,parent:{page:{pageNumber}}}=data;if(!textContent||textContent.length===0)return null;initialData=data={annotationType:AnnotationEditorType.FREETEXT,color:Array.from(fontColor),fontSize,value:textContent.join(`
`),position:textPosition,pageIndex:pageNumber-1,rect:rect.slice(0),rotation,annotationElementId:id2,id:id2,deleted:!1,popupRef,comment:contentsObj?.str||null}}const editor=await super.deserialize(data,parent,uiManager);return editor.#fontSize=data.fontSize,editor.#color=Util.makeHexColor(...data.color),editor.#content=FreeTextEditor.#deserializeContent(data.value),editor._initialData=initialData,data.comment&&editor.setCommentData(data.comment),editor}serialize(isForCopying=!1){if(this.isEmpty())
return null;if(this.deleted)return this.serializeDeleted();const padding=FreeTextEditor._internalPadding*this.parentScale,rect=this.getRect(padding,padding),color=AnnotationEditor._colorManager.convert(this.isAttachedToDOM?getComputedStyle(this.editorDiv).color:this.#color),serialized={annotationType:AnnotationEditorType.FREETEXT,color,fontSize:this.#fontSize,value:this.#serializeContent(),pageIndex:this.pageIndex,rect,rotation:this.rotation,structTreeParentId:this._structTreeParentId};return this.
addComment(serialized),isForCopying?(serialized.isCopy=!0,serialized):this.annotationElementId&&!this.#hasElementChanged(serialized)?null:(serialized.id=this.annotationElementId,serialized)}#hasElementChanged(serialized){const{value,fontSize,color,pageIndex}=this._initialData;return this.hasEditedComment||this._hasBeenMoved||serialized.value!==value||serialized.fontSize!==fontSize||serialized.color.some((c2,i)=>c2!==color[i])||serialized.pageIndex!==pageIndex}renderAnnotationElement(annotation){
const content2=super.renderAnnotationElement(annotation),{style:style2}=content2;style2.fontSize=`calc(${this.#fontSize}px * var(--total-scale-factor))`,style2.color=this.#color,content2.replaceChildren();for(const line of this.#content.split(`
`)){const div=document.createElement("div");div.append(line?document.createTextNode(line):document.createElement("br")),content2.append(div)}const padding=FreeTextEditor._internalPadding*this.parentScale,params={rect:this.getRect(padding,padding)};return params.popup=this.hasEditedComment?this.comment:{text:this.#content},annotation.updateEdited(params),content2}resetAnnotationElement(annotation){super.resetAnnotationElement(annotation),annotation.resetEdited()}}class Outline{static PRECISION=1e-4;toSVGPath(){
unreachable("Abstract method `toSVGPath` must be implemented.")}get box(){unreachable("Abstract getter `box` must be implemented.")}serialize(_bbox,_rotation){unreachable("Abstract method `serialize` must be implemented.")}static _rescale(src,tx,ty,sx,sy,dest){dest||=new Float32Array(src.length);for(let i=0,ii=src.length;i<ii;i+=2)dest[i]=tx+src[i]*sx,dest[i+1]=ty+src[i+1]*sy;return dest}static _rescaleAndSwap(src,tx,ty,sx,sy,dest){dest||=new Float32Array(src.length);for(let i=0,ii=src.length;i<
ii;i+=2)dest[i]=tx+src[i+1]*sx,dest[i+1]=ty+src[i]*sy;return dest}static _translate(src,tx,ty,dest){dest||=new Float32Array(src.length);for(let i=0,ii=src.length;i<ii;i+=2)dest[i]=tx+src[i],dest[i+1]=ty+src[i+1];return dest}static svgRound(x){return Math.round(x*1e4)}static _normalizePoint(x,y,parentWidth,parentHeight,rotation){switch(rotation){case 90:return[1-y/parentWidth,x/parentHeight];case 180:return[1-x/parentWidth,1-y/parentHeight];case 270:return[y/parentWidth,1-x/parentHeight];default:
return[x/parentWidth,y/parentHeight]}}static _normalizePagePoint(x,y,rotation){switch(rotation){case 90:return[1-y,x];case 180:return[1-x,1-y];case 270:return[y,1-x];default:return[x,y]}}static createBezierPoints(x1,y1,x2,y2,x3,y3){return[(x1+5*x2)/6,(y1+5*y2)/6,(5*x2+x3)/6,(5*y2+y3)/6,(x2+x3)/2,(y2+y3)/2]}}class FreeDrawOutliner{#box;#bottom=[];#innerMargin;#isLTR;#top=[];#last=new Float32Array(18);#lastX;#lastY;#min;#min_dist;#scaleFactor;#thickness;#points=[];static#MIN_DIST=8;static#MIN_DIFF=2;static#MIN=FreeDrawOutliner.#MIN_DIST+
FreeDrawOutliner.#MIN_DIFF;constructor({x,y},box2,scaleFactor,thickness,isLTR,innerMargin=0){this.#box=box2,this.#thickness=thickness*scaleFactor,this.#isLTR=isLTR,this.#last.set([NaN,NaN,NaN,NaN,x,y],6),this.#innerMargin=innerMargin,this.#min_dist=FreeDrawOutliner.#MIN_DIST*scaleFactor,this.#min=FreeDrawOutliner.#MIN*scaleFactor,this.#scaleFactor=scaleFactor,this.#points.push(x,y)}isEmpty(){return isNaN(this.#last[8])}#getLastCoords(){const lastTop=this.#last.subarray(4,6),lastBottom=this.#last.
subarray(16,18),[x,y,width,height]=this.#box;return[(this.#lastX+(lastTop[0]-lastBottom[0])/2-x)/width,(this.#lastY+(lastTop[1]-lastBottom[1])/2-y)/height,(this.#lastX+(lastBottom[0]-lastTop[0])/2-x)/width,(this.#lastY+(lastBottom[1]-lastTop[1])/2-y)/height]}add({x,y}){this.#lastX=x,this.#lastY=y;const[layerX,layerY,layerWidth,layerHeight]=this.#box;let[x1,y1,x2,y2]=this.#last.subarray(8,12);const diffX=x-x2,diffY=y-y2,d2=Math.hypot(diffX,diffY);if(d2<this.#min)return!1;const diffD=d2-this.#min_dist,
K=diffD/d2,shiftX=K*diffX,shiftY=K*diffY;let x0=x1,y0=y1;x1=x2,y1=y2,x2+=shiftX,y2+=shiftY,this.#points?.push(x,y);const nX=-shiftY/diffD,nY=shiftX/diffD,thX=nX*this.#thickness,thY=nY*this.#thickness;return this.#last.set(this.#last.subarray(2,8),0),this.#last.set([x2+thX,y2+thY],4),this.#last.set(this.#last.subarray(14,18),12),this.#last.set([x2-thX,y2-thY],16),isNaN(this.#last[6])?(this.#top.length===0&&(this.#last.set([x1+thX,y1+thY],2),this.#top.push(NaN,NaN,NaN,NaN,(x1+thX-layerX)/layerWidth,
(y1+thY-layerY)/layerHeight),this.#last.set([x1-thX,y1-thY],14),this.#bottom.push(NaN,NaN,NaN,NaN,(x1-thX-layerX)/layerWidth,(y1-thY-layerY)/layerHeight)),this.#last.set([x0,y0,x1,y1,x2,y2],6),!this.isEmpty()):(this.#last.set([x0,y0,x1,y1,x2,y2],6),Math.abs(Math.atan2(y0-y1,x0-x1)-Math.atan2(shiftY,shiftX))<Math.PI/2?([x1,y1,x2,y2]=this.#last.subarray(2,6),this.#top.push(NaN,NaN,NaN,NaN,((x1+x2)/2-layerX)/layerWidth,((y1+y2)/2-layerY)/layerHeight),[x1,y1,x0,y0]=this.#last.subarray(14,18),this.#bottom.
push(NaN,NaN,NaN,NaN,((x0+x1)/2-layerX)/layerWidth,((y0+y1)/2-layerY)/layerHeight),!0):([x0,y0,x1,y1,x2,y2]=this.#last.subarray(0,6),this.#top.push(((x0+5*x1)/6-layerX)/layerWidth,((y0+5*y1)/6-layerY)/layerHeight,((5*x1+x2)/6-layerX)/layerWidth,((5*y1+y2)/6-layerY)/layerHeight,((x1+x2)/2-layerX)/layerWidth,((y1+y2)/2-layerY)/layerHeight),[x2,y2,x1,y1,x0,y0]=this.#last.subarray(12,18),this.#bottom.push(((x0+5*x1)/6-layerX)/layerWidth,((y0+5*y1)/6-layerY)/layerHeight,((5*x1+x2)/6-layerX)/layerWidth,
((5*y1+y2)/6-layerY)/layerHeight,((x1+x2)/2-layerX)/layerWidth,((y1+y2)/2-layerY)/layerHeight),!0))}toSVGPath(){if(this.isEmpty())return"";const top=this.#top,bottom=this.#bottom;if(isNaN(this.#last[6])&&!this.isEmpty())return this.#toSVGPathTwoPoints();const buffer=[];buffer.push(`M${top[4]} ${top[5]}`);for(let i=6;i<top.length;i+=6)isNaN(top[i])?buffer.push(`L${top[i+4]} ${top[i+5]}`):buffer.push(`C${top[i]} ${top[i+1]} ${top[i+2]} ${top[i+3]} ${top[i+4]} ${top[i+5]}`);this.#toSVGPathEnd(buffer);
for(let i=bottom.length-6;i>=6;i-=6)isNaN(bottom[i])?buffer.push(`L${bottom[i+4]} ${bottom[i+5]}`):buffer.push(`C${bottom[i]} ${bottom[i+1]} ${bottom[i+2]} ${bottom[i+3]} ${bottom[i+4]} ${bottom[i+5]}`);return this.#toSVGPathStart(buffer),buffer.join(" ")}#toSVGPathTwoPoints(){const[x,y,width,height]=this.#box,[lastTopX,lastTopY,lastBottomX,lastBottomY]=this.#getLastCoords();return`M${(this.#last[2]-x)/width} ${(this.#last[3]-y)/height} L${(this.#last[4]-x)/width} ${(this.#last[5]-y)/height} L${lastTopX}\
 ${lastTopY} L${lastBottomX} ${lastBottomY} L${(this.#last[16]-x)/width} ${(this.#last[17]-y)/height} L${(this.#last[14]-x)/width} ${(this.#last[15]-y)/height} Z`}#toSVGPathStart(buffer){const bottom=this.#bottom;buffer.push(`L${bottom[4]} ${bottom[5]} Z`)}#toSVGPathEnd(buffer){const[x,y,width,height]=this.#box,lastTop=this.#last.subarray(4,6),lastBottom=this.#last.subarray(16,18),[lastTopX,lastTopY,lastBottomX,lastBottomY]=this.#getLastCoords();buffer.push(`L${(lastTop[0]-x)/width} ${(lastTop[1]-
y)/height} L${lastTopX} ${lastTopY} L${lastBottomX} ${lastBottomY} L${(lastBottom[0]-x)/width} ${(lastBottom[1]-y)/height}`)}newFreeDrawOutline(outline,points,box2,scaleFactor,innerMargin,isLTR){return new FreeDrawOutline(outline,points,box2,scaleFactor,innerMargin,isLTR)}getOutlines(){const top=this.#top,bottom=this.#bottom,last=this.#last,[layerX,layerY,layerWidth,layerHeight]=this.#box,points=new Float32Array((this.#points?.length??0)+2);for(let i=0,ii=points.length-2;i<ii;i+=2)points[i]=(this.#points[i]-
layerX)/layerWidth,points[i+1]=(this.#points[i+1]-layerY)/layerHeight;if(points[points.length-2]=(this.#lastX-layerX)/layerWidth,points[points.length-1]=(this.#lastY-layerY)/layerHeight,isNaN(last[6])&&!this.isEmpty())return this.#getOutlineTwoPoints(points);const outline=new Float32Array(this.#top.length+24+this.#bottom.length);let N=top.length;for(let i=0;i<N;i+=2){if(isNaN(top[i])){outline[i]=outline[i+1]=NaN;continue}outline[i]=top[i],outline[i+1]=top[i+1]}N=this.#getOutlineEnd(outline,N);for(let i=bottom.
length-6;i>=6;i-=6)for(let j=0;j<6;j+=2){if(isNaN(bottom[i+j])){outline[N]=outline[N+1]=NaN,N+=2;continue}outline[N]=bottom[i+j],outline[N+1]=bottom[i+j+1],N+=2}return this.#getOutlineStart(outline,N),this.newFreeDrawOutline(outline,points,this.#box,this.#scaleFactor,this.#innerMargin,this.#isLTR)}#getOutlineTwoPoints(points){const last=this.#last,[layerX,layerY,layerWidth,layerHeight]=this.#box,[lastTopX,lastTopY,lastBottomX,lastBottomY]=this.#getLastCoords(),outline=new Float32Array(36);return outline.
set([NaN,NaN,NaN,NaN,(last[2]-layerX)/layerWidth,(last[3]-layerY)/layerHeight,NaN,NaN,NaN,NaN,(last[4]-layerX)/layerWidth,(last[5]-layerY)/layerHeight,NaN,NaN,NaN,NaN,lastTopX,lastTopY,NaN,NaN,NaN,NaN,lastBottomX,lastBottomY,NaN,NaN,NaN,NaN,(last[16]-layerX)/layerWidth,(last[17]-layerY)/layerHeight,NaN,NaN,NaN,NaN,(last[14]-layerX)/layerWidth,(last[15]-layerY)/layerHeight],0),this.newFreeDrawOutline(outline,points,this.#box,this.#scaleFactor,this.#innerMargin,this.#isLTR)}#getOutlineStart(outline,pos){
const bottom=this.#bottom;return outline.set([NaN,NaN,NaN,NaN,bottom[4],bottom[5]],pos),pos+=6}#getOutlineEnd(outline,pos){const lastTop=this.#last.subarray(4,6),lastBottom=this.#last.subarray(16,18),[layerX,layerY,layerWidth,layerHeight]=this.#box,[lastTopX,lastTopY,lastBottomX,lastBottomY]=this.#getLastCoords();return outline.set([NaN,NaN,NaN,NaN,(lastTop[0]-layerX)/layerWidth,(lastTop[1]-layerY)/layerHeight,NaN,NaN,NaN,NaN,lastTopX,lastTopY,NaN,NaN,NaN,NaN,lastBottomX,lastBottomY,NaN,NaN,NaN,
NaN,(lastBottom[0]-layerX)/layerWidth,(lastBottom[1]-layerY)/layerHeight],pos),pos+=24}}class FreeDrawOutline extends Outline{#box;#bbox=new Float32Array(4);#innerMargin;#isLTR;#points;#scaleFactor;#outline;constructor(outline,points,box2,scaleFactor,innerMargin,isLTR){super(),this.#outline=outline,this.#points=points,this.#box=box2,this.#scaleFactor=scaleFactor,this.#innerMargin=innerMargin,this.#isLTR=isLTR,this.lastPoint=[NaN,NaN],this.#computeMinMax(isLTR);const[x,y,width,height]=this.#bbox;
for(let i=0,ii=outline.length;i<ii;i+=2)outline[i]=(outline[i]-x)/width,outline[i+1]=(outline[i+1]-y)/height;for(let i=0,ii=points.length;i<ii;i+=2)points[i]=(points[i]-x)/width,points[i+1]=(points[i+1]-y)/height}toSVGPath(){const buffer=[`M${this.#outline[4]} ${this.#outline[5]}`];for(let i=6,ii=this.#outline.length;i<ii;i+=6){if(isNaN(this.#outline[i])){buffer.push(`L${this.#outline[i+4]} ${this.#outline[i+5]}`);continue}buffer.push(`C${this.#outline[i]} ${this.#outline[i+1]} ${this.#outline[i+
2]} ${this.#outline[i+3]} ${this.#outline[i+4]} ${this.#outline[i+5]}`)}return buffer.push("Z"),buffer.join(" ")}serialize([blX,blY,trX,trY],rotation){const width=trX-blX,height=trY-blY;let outline,points;switch(rotation){case 0:outline=Outline._rescale(this.#outline,blX,trY,width,-height),points=Outline._rescale(this.#points,blX,trY,width,-height);break;case 90:outline=Outline._rescaleAndSwap(this.#outline,blX,blY,width,height),points=Outline._rescaleAndSwap(this.#points,blX,blY,width,height);break;case 180:
outline=Outline._rescale(this.#outline,trX,blY,-width,height),points=Outline._rescale(this.#points,trX,blY,-width,height);break;case 270:outline=Outline._rescaleAndSwap(this.#outline,trX,trY,-width,-height),points=Outline._rescaleAndSwap(this.#points,trX,trY,-width,-height);break}return{outline:Array.from(outline),points:[Array.from(points)]}}#computeMinMax(isLTR){const outline=this.#outline;let lastX=outline[4],lastY=outline[5];const minMax=[lastX,lastY,lastX,lastY];let lastPointX=lastX,lastPointY=lastY;
const ltrCallback=isLTR?Math.max:Math.min;for(let i=6,ii=outline.length;i<ii;i+=6){const x=outline[i+4],y=outline[i+5];if(isNaN(outline[i]))Util.pointBoundingBox(x,y,minMax),lastPointY<y?(lastPointX=x,lastPointY=y):lastPointY===y&&(lastPointX=ltrCallback(lastPointX,x));else{const bbox2=[1/0,1/0,-1/0,-1/0];Util.bezierBoundingBox(lastX,lastY,...outline.slice(i,i+6),bbox2),Util.rectBoundingBox(...bbox2,minMax),lastPointY<bbox2[3]?(lastPointX=bbox2[2],lastPointY=bbox2[3]):lastPointY===bbox2[3]&&(lastPointX=
ltrCallback(lastPointX,bbox2[2]))}lastX=x,lastY=y}const bbox=this.#bbox;bbox[0]=minMax[0]-this.#innerMargin,bbox[1]=minMax[1]-this.#innerMargin,bbox[2]=minMax[2]-minMax[0]+2*this.#innerMargin,bbox[3]=minMax[3]-minMax[1]+2*this.#innerMargin,this.lastPoint=[lastPointX,lastPointY]}get box(){return this.#bbox}newOutliner(point2,box2,scaleFactor,thickness,isLTR,innerMargin=0){return new FreeDrawOutliner(point2,box2,scaleFactor,thickness,isLTR,innerMargin)}getNewOutline(thickness,innerMargin){const[x,
y,width,height]=this.#bbox,[layerX,layerY,layerWidth,layerHeight]=this.#box,sx=width*layerWidth,sy=height*layerHeight,tx=x*layerWidth+layerX,ty=y*layerHeight+layerY,outliner=this.newOutliner({x:this.#points[0]*sx+tx,y:this.#points[1]*sy+ty},this.#box,this.#scaleFactor,thickness,this.#isLTR,innerMargin??this.#innerMargin);for(let i=2;i<this.#points.length;i+=2)outliner.add({x:this.#points[i]*sx+tx,y:this.#points[i+1]*sy+ty});return outliner.getOutlines()}}class HighlightOutliner{#box;#lastPoint;#verticalEdges=[];#intervals=[];constructor(boxes,borderWidth=0,innerMargin=0,isLTR=!0){
const minMax=[1/0,1/0,-1/0,-1/0],EPSILON=10**-4;for(const{x,y,width,height}of boxes){const x1=Math.floor((x-borderWidth)/EPSILON)*EPSILON,x2=Math.ceil((x+width+borderWidth)/EPSILON)*EPSILON,y1=Math.floor((y-borderWidth)/EPSILON)*EPSILON,y2=Math.ceil((y+height+borderWidth)/EPSILON)*EPSILON,left=[x1,y1,y2,!0],right=[x2,y1,y2,!1];this.#verticalEdges.push(left,right),Util.rectBoundingBox(x1,y1,x2,y2,minMax)}const bboxWidth=minMax[2]-minMax[0]+2*innerMargin,bboxHeight=minMax[3]-minMax[1]+2*innerMargin,
shiftedMinX=minMax[0]-innerMargin,shiftedMinY=minMax[1]-innerMargin,lastEdge=this.#verticalEdges.at(isLTR?-1:-2),lastPoint=[lastEdge[0],lastEdge[2]];for(const edge of this.#verticalEdges){const[x,y1,y2]=edge;edge[0]=(x-shiftedMinX)/bboxWidth,edge[1]=(y1-shiftedMinY)/bboxHeight,edge[2]=(y2-shiftedMinY)/bboxHeight}this.#box=new Float32Array([shiftedMinX,shiftedMinY,bboxWidth,bboxHeight]),this.#lastPoint=lastPoint}getOutlines(){this.#verticalEdges.sort((a,b)=>a[0]-b[0]||a[1]-b[1]||a[2]-b[2]);const outlineVerticalEdges=[];
for(const edge of this.#verticalEdges)edge[3]?(outlineVerticalEdges.push(...this.#breakEdge(edge)),this.#insert(edge)):(this.#remove(edge),outlineVerticalEdges.push(...this.#breakEdge(edge)));return this.#getOutlines(outlineVerticalEdges)}#getOutlines(outlineVerticalEdges){const edges=[],allEdges=new Set;for(const edge of outlineVerticalEdges){const[x,y1,y2]=edge;edges.push([x,y1,edge],[x,y2,edge])}edges.sort((a,b)=>a[1]-b[1]||a[0]-b[0]);for(let i=0,ii=edges.length;i<ii;i+=2){const edge1=edges[i][2],
edge2=edges[i+1][2];edge1.push(edge2),edge2.push(edge1),allEdges.add(edge1),allEdges.add(edge2)}const outlines=[];let outline;for(;allEdges.size>0;){const edge=allEdges.values().next().value;let[x,y1,y2,edge1,edge2]=edge;allEdges.delete(edge);let lastPointX=x,lastPointY=y1;for(outline=[x,y2],outlines.push(outline);;){let e;if(allEdges.has(edge1))e=edge1;else if(allEdges.has(edge2))e=edge2;else break;allEdges.delete(e),[x,y1,y2,edge1,edge2]=e,lastPointX!==x&&(outline.push(lastPointX,lastPointY,x,
lastPointY===y1?y1:y2),lastPointX=x),lastPointY=lastPointY===y1?y2:y1}outline.push(lastPointX,lastPointY)}return new HighlightOutline(outlines,this.#box,this.#lastPoint)}#binarySearch(y){const array2=this.#intervals;let start2=0,end=array2.length-1;for(;start2<=end;){const middle=start2+end>>1,y1=array2[middle][0];if(y1===y)return middle;y1<y?start2=middle+1:end=middle-1}return end+1}#insert([,y1,y2]){const index2=this.#binarySearch(y1);this.#intervals.splice(index2,0,[y1,y2])}#remove([,y1,y2]){
const index2=this.#binarySearch(y1);for(let i=index2;i<this.#intervals.length;i++){const[start2,end]=this.#intervals[i];if(start2!==y1)break;if(start2===y1&&end===y2){this.#intervals.splice(i,1);return}}for(let i=index2-1;i>=0;i--){const[start2,end]=this.#intervals[i];if(start2!==y1)break;if(start2===y1&&end===y2){this.#intervals.splice(i,1);return}}}#breakEdge(edge){const[x,y1,y2]=edge,results=[[x,y1,y2]],index2=this.#binarySearch(y2);for(let i=0;i<index2;i++){const[start2,end]=this.#intervals[i];
for(let j=0,jj=results.length;j<jj;j++){const[,y3,y4]=results[j];if(!(end<=y3||y4<=start2)){if(y3>=start2){if(y4>end)results[j][1]=end;else{if(jj===1)return[];results.splice(j,1),j--,jj--}continue}results[j][2]=start2,y4>end&&results.push([x,end,y4])}}}return results}}class HighlightOutline extends Outline{#box;#outlines;constructor(outlines,box2,lastPoint){super(),this.#outlines=outlines,this.#box=box2,this.lastPoint=lastPoint}toSVGPath(){const buffer=[];for(const polygon of this.#outlines){let[
prevX,prevY]=polygon;buffer.push(`M${prevX} ${prevY}`);for(let i=2;i<polygon.length;i+=2){const x=polygon[i],y=polygon[i+1];x===prevX?(buffer.push(`V${y}`),prevY=y):y===prevY&&(buffer.push(`H${x}`),prevX=x)}buffer.push("Z")}return buffer.join(" ")}serialize([blX,blY,trX,trY],_rotation){const outlines=[],width=trX-blX,height=trY-blY;for(const outline of this.#outlines){const points=new Array(outline.length);for(let i=0;i<outline.length;i+=2)points[i]=blX+outline[i]*width,points[i+1]=trY-outline[i+
1]*height;outlines.push(points)}return outlines}get box(){return this.#box}get classNamesForOutlining(){return["highlightOutline"]}}class FreeHighlightOutliner extends FreeDrawOutliner{newFreeDrawOutline(outline,points,box2,scaleFactor,innerMargin,isLTR){return new FreeHighlightOutline(outline,points,box2,scaleFactor,innerMargin,isLTR)}}class FreeHighlightOutline extends FreeDrawOutline{newOutliner(point2,box2,scaleFactor,thickness,isLTR,innerMargin=0){return new FreeHighlightOutliner(point2,box2,
scaleFactor,thickness,isLTR,innerMargin)}}class HighlightEditor extends AnnotationEditor{#anchorNode=null;#anchorOffset=0;#boxes;#clipPathId=null;#colorPicker=null;#focusOutlines=null;#focusNode=null;#focusOffset=0;#highlightDiv=null;#highlightOutlines=null;#id=null;#isFreeHighlight=!1;#lastPoint=null;#opacity;#outlineId=null;#text="";#thickness;#methodOfCreation="";static _defaultColor=null;static _defaultOpacity=1;static _defaultThickness=12;static _type="highlight";static _editorType=AnnotationEditorType.
HIGHLIGHT;static _freeHighlightId=-1;static _freeHighlight=null;static _freeHighlightClipId="";static get _keyboardManager(){const proto=HighlightEditor.prototype;return shadow(this,"_keyboardManager",new KeyboardManager([[["ArrowLeft","mac+ArrowLeft"],proto._moveCaret,{args:[0]}],[["ArrowRight","mac+ArrowRight"],proto._moveCaret,{args:[1]}],[["ArrowUp","mac+ArrowUp"],proto._moveCaret,{args:[2]}],[["ArrowDown","mac+ArrowDown"],proto._moveCaret,{args:[3]}]]))}constructor(params){super({...params,
name:"highlightEditor"}),this.color=params.color||HighlightEditor._defaultColor,this.#thickness=params.thickness||HighlightEditor._defaultThickness,this.#opacity=params.opacity||HighlightEditor._defaultOpacity,this.#boxes=params.boxes||null,this.#methodOfCreation=params.methodOfCreation||"",this.#text=params.text||"",this._isDraggable=!1,this.defaultL10nId="pdfjs-editor-highlight-editor",params.highlightId>-1?(this.#isFreeHighlight=!0,this.#createFreeOutlines(params),this.#addToDrawLayer()):this.#boxes&&
(this.#anchorNode=params.anchorNode,this.#anchorOffset=params.anchorOffset,this.#focusNode=params.focusNode,this.#focusOffset=params.focusOffset,this.#createOutlines(),this.#addToDrawLayer(),this.rotate(this.rotation)),this.annotationElementId||this._uiManager.a11yAlert("pdfjs-editor-highlight-added-alert")}get telemetryInitialData(){return{action:"added",type:this.#isFreeHighlight?"free_highlight":"highlight",color:this._uiManager.getNonHCMColorName(this.color),thickness:this.#thickness,methodOfCreation:this.#methodOfCreation}}get telemetryFinalData(){
return{type:"highlight",color:this._uiManager.getNonHCMColorName(this.color)}}get commentColor(){return this.color}static computeTelemetryFinalData(data){return{numberOfColors:data.get("color").size}}#createOutlines(){const outliner=new HighlightOutliner(this.#boxes,.001);this.#highlightOutlines=outliner.getOutlines(),[this.x,this.y,this.width,this.height]=this.#highlightOutlines.box;const outlinerForOutline=new HighlightOutliner(this.#boxes,.0025,.001,this._uiManager.direction==="ltr");this.#focusOutlines=
outlinerForOutline.getOutlines();const{lastPoint}=this.#focusOutlines;this.#lastPoint=[(lastPoint[0]-this.x)/this.width,(lastPoint[1]-this.y)/this.height]}#createFreeOutlines({highlightOutlines,highlightId,clipPathId}){this.#highlightOutlines=highlightOutlines;const extraThickness=1.5;if(this.#focusOutlines=highlightOutlines.getNewOutline(this.#thickness/2+extraThickness,.0025),highlightId>=0)this.#id=highlightId,this.#clipPathId=clipPathId,this.parent.drawLayer.finalizeDraw(highlightId,{bbox:highlightOutlines.
box,path:{d:highlightOutlines.toSVGPath()}}),this.#outlineId=this.parent.drawLayer.drawOutline({rootClass:{highlightOutline:!0,free:!0},bbox:this.#focusOutlines.box,path:{d:this.#focusOutlines.toSVGPath()}},!0);else if(this.parent){const angle=this.parent.viewport.rotation;this.parent.drawLayer.updateProperties(this.#id,{bbox:HighlightEditor.#rotateBbox(this.#highlightOutlines.box,(angle-this.rotation+360)%360),path:{d:highlightOutlines.toSVGPath()}}),this.parent.drawLayer.updateProperties(this.#outlineId,
{bbox:HighlightEditor.#rotateBbox(this.#focusOutlines.box,angle),path:{d:this.#focusOutlines.toSVGPath()}})}const[x,y,width,height]=highlightOutlines.box;switch(this.rotation){case 0:this.x=x,this.y=y,this.width=width,this.height=height;break;case 90:{const[pageWidth,pageHeight]=this.parentDimensions;this.x=y,this.y=1-x,this.width=width*pageHeight/pageWidth,this.height=height*pageWidth/pageHeight;break}case 180:this.x=1-x,this.y=1-y,this.width=width,this.height=height;break;case 270:{const[pageWidth,
pageHeight]=this.parentDimensions;this.x=1-y,this.y=x,this.width=width*pageHeight/pageWidth,this.height=height*pageWidth/pageHeight;break}}const{lastPoint}=this.#focusOutlines;this.#lastPoint=[(lastPoint[0]-x)/width,(lastPoint[1]-y)/height]}static initialize(l10n,uiManager){AnnotationEditor.initialize(l10n,uiManager),HighlightEditor._defaultColor||=uiManager.highlightColors?.values().next().value||"#fff066"}static updateDefaultParams(type2,value){switch(type2){case AnnotationEditorParamsType.HIGHLIGHT_COLOR:
HighlightEditor._defaultColor=value;break;case AnnotationEditorParamsType.HIGHLIGHT_THICKNESS:HighlightEditor._defaultThickness=value;break}}translateInPage(x,y){}get toolbarPosition(){return this.#lastPoint}updateParams(type2,value){switch(type2){case AnnotationEditorParamsType.HIGHLIGHT_COLOR:this.#updateColor(value);break;case AnnotationEditorParamsType.HIGHLIGHT_THICKNESS:this.#updateThickness(value);break}}static get defaultPropertiesToUpdate(){return[[AnnotationEditorParamsType.HIGHLIGHT_COLOR,
HighlightEditor._defaultColor],[AnnotationEditorParamsType.HIGHLIGHT_THICKNESS,HighlightEditor._defaultThickness]]}get propertiesToUpdate(){return[[AnnotationEditorParamsType.HIGHLIGHT_COLOR,this.color||HighlightEditor._defaultColor],[AnnotationEditorParamsType.HIGHLIGHT_THICKNESS,this.#thickness||HighlightEditor._defaultThickness],[AnnotationEditorParamsType.HIGHLIGHT_FREE,this.#isFreeHighlight]]}#updateColor(color){const setColorAndOpacity=(col,opa)=>{this.color=col,this.#opacity=opa,this.parent?.
drawLayer.updateProperties(this.#id,{root:{fill:col,"fill-opacity":opa}}),this.#colorPicker?.updateColor(col)},savedColor=this.color,savedOpacity=this.#opacity;this.addCommands({cmd:setColorAndOpacity.bind(this,color,HighlightEditor._defaultOpacity),undo:setColorAndOpacity.bind(this,savedColor,savedOpacity),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:AnnotationEditorParamsType.HIGHLIGHT_COLOR,overwriteIfSameType:!0,keepUndo:!0}),this._reportTelemetry({action:"color_\
changed",color:this._uiManager.getNonHCMColorName(color)},!0)}#updateThickness(thickness){const savedThickness=this.#thickness,setThickness=th=>{this.#thickness=th,this.#changeThickness(th)};this.addCommands({cmd:setThickness.bind(this,thickness),undo:setThickness.bind(this,savedThickness),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:AnnotationEditorParamsType.INK_THICKNESS,overwriteIfSameType:!0,keepUndo:!0}),this._reportTelemetry({action:"thickness_changed",thickness},
!0)}get toolbarButtons(){return this._uiManager.highlightColors?[["colorPicker",this.#colorPicker=new ColorPicker({editor:this})]]:super.toolbarButtons}disableEditing(){super.disableEditing(),this.div.classList.toggle("disabled",!0)}enableEditing(){super.enableEditing(),this.div.classList.toggle("disabled",!1)}fixAndSetPosition(){return super.fixAndSetPosition(this.#getRotation())}getBaseTranslation(){return[0,0]}getRect(tx,ty){return super.getRect(tx,ty,this.#getRotation())}onceAdded(focus2){this.
annotationElementId||this.parent.addUndoableEditor(this),focus2&&this.div.focus()}remove(){this.#cleanDrawLayer(),this._reportTelemetry({action:"deleted"}),super.remove()}rebuild(){this.parent&&(super.rebuild(),this.div!==null&&(this.#addToDrawLayer(),this.isAttachedToDOM||this.parent.add(this)))}setParent(parent){let mustBeSelected=!1;this.parent&&!parent?this.#cleanDrawLayer():parent&&(this.#addToDrawLayer(parent),mustBeSelected=!this.parent&&this.div?.classList.contains("selectedEditor")),super.
setParent(parent),this.show(this._isVisible),mustBeSelected&&this.select()}#changeThickness(thickness){if(!this.#isFreeHighlight)return;this.#createFreeOutlines({highlightOutlines:this.#highlightOutlines.getNewOutline(thickness/2)}),this.fixAndSetPosition();const[parentWidth,parentHeight]=this.parentDimensions;this.setDims(this.width*parentWidth,this.height*parentHeight)}#cleanDrawLayer(){this.#id===null||!this.parent||(this.parent.drawLayer.remove(this.#id),this.#id=null,this.parent.drawLayer.remove(
this.#outlineId),this.#outlineId=null)}#addToDrawLayer(parent=this.parent){this.#id===null&&({id:this.#id,clipPathId:this.#clipPathId}=parent.drawLayer.draw({bbox:this.#highlightOutlines.box,root:{viewBox:"0 0 1 1",fill:this.color,"fill-opacity":this.#opacity},rootClass:{highlight:!0,free:this.#isFreeHighlight},path:{d:this.#highlightOutlines.toSVGPath()}},!1,!0),this.#outlineId=parent.drawLayer.drawOutline({rootClass:{highlightOutline:!0,free:this.#isFreeHighlight},bbox:this.#focusOutlines.box,
path:{d:this.#focusOutlines.toSVGPath()}},this.#isFreeHighlight),this.#highlightDiv&&(this.#highlightDiv.style.clipPath=this.#clipPathId))}static#rotateBbox([x,y,width,height],angle){switch(angle){case 90:return[1-y-height,x,height,width];case 180:return[1-x-width,1-y-height,width,height];case 270:return[y,1-x-width,height,width]}return[x,y,width,height]}rotate(angle){const{drawLayer}=this.parent;let box2;this.#isFreeHighlight?(angle=(angle-this.rotation+360)%360,box2=HighlightEditor.#rotateBbox(
this.#highlightOutlines.box,angle)):box2=HighlightEditor.#rotateBbox([this.x,this.y,this.width,this.height],angle),drawLayer.updateProperties(this.#id,{bbox:box2,root:{"data-main-rotation":angle}}),drawLayer.updateProperties(this.#outlineId,{bbox:HighlightEditor.#rotateBbox(this.#focusOutlines.box,angle),root:{"data-main-rotation":angle}})}render(){if(this.div)return this.div;const div=super.render();this.#text&&(div.setAttribute("aria-label",this.#text),div.setAttribute("role","mark")),this.#isFreeHighlight?
div.classList.add("free"):this.div.addEventListener("keydown",this.#keydown.bind(this),{signal:this._uiManager._signal});const highlightDiv=this.#highlightDiv=document.createElement("div");div.append(highlightDiv),highlightDiv.setAttribute("aria-hidden","true"),highlightDiv.className="internal",highlightDiv.style.clipPath=this.#clipPathId;const[parentWidth,parentHeight]=this.parentDimensions;return this.setDims(this.width*parentWidth,this.height*parentHeight),bindEvents(this,this.#highlightDiv,[
"pointerover","pointerleave"]),this.enableEditing(),div}pointerover(){this.isSelected||this.parent?.drawLayer.updateProperties(this.#outlineId,{rootClass:{hovered:!0}})}pointerleave(){this.isSelected||this.parent?.drawLayer.updateProperties(this.#outlineId,{rootClass:{hovered:!1}})}#keydown(event2){HighlightEditor._keyboardManager.exec(this,event2)}_moveCaret(direction){switch(this.parent.unselect(this),direction){case 0:case 2:this.#setCaret(!0);break;case 1:case 3:this.#setCaret(!1);break}}#setCaret(start2){
if(!this.#anchorNode)return;const selection=window.getSelection();start2?selection.setPosition(this.#anchorNode,this.#anchorOffset):selection.setPosition(this.#focusNode,this.#focusOffset)}select(){super.select(),this.#outlineId&&this.parent?.drawLayer.updateProperties(this.#outlineId,{rootClass:{hovered:!1,selected:!0}})}unselect(){super.unselect(),this.#outlineId&&(this.parent?.drawLayer.updateProperties(this.#outlineId,{rootClass:{selected:!1}}),this.#isFreeHighlight||this.#setCaret(!1))}get _mustFixPosition(){
return!this.#isFreeHighlight}show(visible=this._isVisible){super.show(visible),this.parent&&(this.parent.drawLayer.updateProperties(this.#id,{rootClass:{hidden:!visible}}),this.parent.drawLayer.updateProperties(this.#outlineId,{rootClass:{hidden:!visible}}))}#getRotation(){return this.#isFreeHighlight?this.rotation:0}#serializeBoxes(){if(this.#isFreeHighlight)return null;const[pageWidth,pageHeight]=this.pageDimensions,[pageX,pageY]=this.pageTranslation,boxes=this.#boxes,quadPoints=new Float32Array(
boxes.length*8);let i=0;for(const{x,y,width,height}of boxes){const sx=x*pageWidth+pageX,sy=(1-y)*pageHeight+pageY;quadPoints[i]=quadPoints[i+4]=sx,quadPoints[i+1]=quadPoints[i+3]=sy,quadPoints[i+2]=quadPoints[i+6]=sx+width*pageWidth,quadPoints[i+5]=quadPoints[i+7]=sy-height*pageHeight,i+=8}return quadPoints}#serializeOutlines(rect){return this.#highlightOutlines.serialize(rect,this.#getRotation())}static startHighlighting(parent,isLTR,{target:textLayer,x,y}){const{x:layerX,y:layerY,width:parentWidth,
height:parentHeight}=textLayer.getBoundingClientRect(),ac=new AbortController,signal=parent.combinedSignal(ac),pointerUpCallback=e=>{ac.abort(),this.#endHighlight(parent,e)};window.addEventListener("blur",pointerUpCallback,{signal}),window.addEventListener("pointerup",pointerUpCallback,{signal}),window.addEventListener("pointerdown",stopEvent,{capture:!0,passive:!1,signal}),window.addEventListener("contextmenu",noContextMenu,{signal}),textLayer.addEventListener("pointermove",this.#highlightMove.
bind(this,parent),{signal}),this._freeHighlight=new FreeHighlightOutliner({x,y},[layerX,layerY,parentWidth,parentHeight],parent.scale,this._defaultThickness/2,isLTR,.001),{id:this._freeHighlightId,clipPathId:this._freeHighlightClipId}=parent.drawLayer.draw({bbox:[0,0,1,1],root:{viewBox:"0 0 1 1",fill:this._defaultColor,"fill-opacity":this._defaultOpacity},rootClass:{highlight:!0,free:!0},path:{d:this._freeHighlight.toSVGPath()}},!0,!0)}static#highlightMove(parent,event2){this._freeHighlight.add(
event2)&&parent.drawLayer.updateProperties(this._freeHighlightId,{path:{d:this._freeHighlight.toSVGPath()}})}static#endHighlight(parent,event2){this._freeHighlight.isEmpty()?parent.drawLayer.remove(this._freeHighlightId):parent.createAndAddNewEditor(event2,!1,{highlightId:this._freeHighlightId,highlightOutlines:this._freeHighlight.getOutlines(),clipPathId:this._freeHighlightClipId,methodOfCreation:"main_toolbar"}),this._freeHighlightId=-1,this._freeHighlight=null,this._freeHighlightClipId=""}static async deserialize(data,parent,uiManager){
let initialData=null;if(data instanceof HighlightAnnotationElement){const{data:{quadPoints:quadPoints2,rect,rotation,id:id2,color:color2,opacity:opacity2,popupRef,contentsObj},parent:{page:{pageNumber}}}=data;initialData=data={annotationType:AnnotationEditorType.HIGHLIGHT,color:Array.from(color2),opacity:opacity2,quadPoints:quadPoints2,boxes:null,pageIndex:pageNumber-1,rect:rect.slice(0),rotation,annotationElementId:id2,id:id2,deleted:!1,popupRef,comment:contentsObj?.str||null}}else if(data instanceof
InkAnnotationElement){const{data:{inkLists:inkLists2,rect,rotation,id:id2,color:color2,borderStyle:{rawWidth:thickness},popupRef,contentsObj},parent:{page:{pageNumber}}}=data;initialData=data={annotationType:AnnotationEditorType.HIGHLIGHT,color:Array.from(color2),thickness,inkLists:inkLists2,boxes:null,pageIndex:pageNumber-1,rect:rect.slice(0),rotation,annotationElementId:id2,id:id2,deleted:!1,popupRef,comment:contentsObj?.str||null}}const{color,quadPoints,inkLists,opacity}=data,editor=await super.
deserialize(data,parent,uiManager);editor.color=Util.makeHexColor(...color),editor.#opacity=opacity||1,inkLists&&(editor.#thickness=data.thickness),editor._initialData=initialData,data.comment&&editor.setCommentData(data.comment);const[pageWidth,pageHeight]=editor.pageDimensions,[pageX,pageY]=editor.pageTranslation;if(quadPoints){const boxes=editor.#boxes=[];for(let i=0;i<quadPoints.length;i+=8)boxes.push({x:(quadPoints[i]-pageX)/pageWidth,y:1-(quadPoints[i+1]-pageY)/pageHeight,width:(quadPoints[i+
2]-quadPoints[i])/pageWidth,height:(quadPoints[i+1]-quadPoints[i+5])/pageHeight});editor.#createOutlines(),editor.#addToDrawLayer(),editor.rotate(editor.rotation)}else if(inkLists){editor.#isFreeHighlight=!0;const points=inkLists[0],point2={x:points[0]-pageX,y:pageHeight-(points[1]-pageY)},outliner=new FreeHighlightOutliner(point2,[0,0,pageWidth,pageHeight],1,editor.#thickness/2,!0,.001);for(let i=0,ii=points.length;i<ii;i+=2)point2.x=points[i]-pageX,point2.y=pageHeight-(points[i+1]-pageY),outliner.
add(point2);const{id:id2,clipPathId}=parent.drawLayer.draw({bbox:[0,0,1,1],root:{viewBox:"0 0 1 1",fill:editor.color,"fill-opacity":editor._defaultOpacity},rootClass:{highlight:!0,free:!0},path:{d:outliner.toSVGPath()}},!0,!0);editor.#createFreeOutlines({highlightOutlines:outliner.getOutlines(),highlightId:id2,clipPathId}),editor.#addToDrawLayer(),editor.rotate(editor.parentRotation)}return editor}serialize(isForCopying=!1){if(this.isEmpty()||isForCopying)return null;if(this.deleted)return this.
serializeDeleted();const rect=this.getRect(0,0),color=AnnotationEditor._colorManager.convert(this._uiManager.getNonHCMColor(this.color)),serialized={annotationType:AnnotationEditorType.HIGHLIGHT,color,opacity:this.#opacity,thickness:this.#thickness,quadPoints:this.#serializeBoxes(),outlines:this.#serializeOutlines(rect),pageIndex:this.pageIndex,rect,rotation:this.#getRotation(),structTreeParentId:this._structTreeParentId};return this.addComment(serialized),this.annotationElementId&&!this.#hasElementChanged(
serialized)?null:(serialized.id=this.annotationElementId,serialized)}#hasElementChanged(serialized){const{color}=this._initialData;return this.hasEditedComment||serialized.color.some((c2,i)=>c2!==color[i])}renderAnnotationElement(annotation){const params={rect:this.getRect(0,0)};return this.hasEditedComment&&(params.popup=this.comment),annotation.updateEdited(params),null}static canCreateNewEmptyEditor(){return!1}}class DrawingOptions{#svgProperties=Object.create(null);updateProperty(name,value){
this[name]=value,this.updateSVGProperty(name,value)}updateProperties(properties2){if(properties2)for(const[name,value]of Object.entries(properties2))name.startsWith("_")||this.updateProperty(name,value)}updateSVGProperty(name,value){this.#svgProperties[name]=value}toSVGProperties(){const root2=this.#svgProperties;return this.#svgProperties=Object.create(null),{root:root2}}reset(){this.#svgProperties=Object.create(null)}updateAll(options=this){this.updateProperties(options)}clone(){unreachable("N\
ot implemented")}}class DrawingEditor extends AnnotationEditor{#drawOutlines=null;#mustBeCommitted;_colorPicker=null;_drawId=null;static _currentDrawId=-1;static _currentParent=null;static#currentDraw=null;static#currentDrawingAC=null;static#currentDrawingOptions=null;static#currentPointerId=NaN;static#currentPointerType=null;static#currentPointerIds=null;static#currentMoveTimestamp=NaN;static _INNER_MARGIN=3;constructor(params){super(params),this.#mustBeCommitted=params.mustBeCommitted||!1,this.
_addOutlines(params)}_addOutlines(params){params.drawOutlines&&(this.#createDrawOutlines(params),this.#addToDrawLayer())}#createDrawOutlines({drawOutlines,drawId,drawingOptions}){this.#drawOutlines=drawOutlines,this._drawingOptions||=drawingOptions,this.annotationElementId||this._uiManager.a11yAlert(`pdfjs-editor-${this.editorType}-added-alert`),drawId>=0?(this._drawId=drawId,this.parent.drawLayer.finalizeDraw(drawId,drawOutlines.defaultProperties)):this._drawId=this.#createDrawing(drawOutlines,
this.parent),this.#updateBbox(drawOutlines.box)}#createDrawing(drawOutlines,parent){const{id:id2}=parent.drawLayer.draw(DrawingEditor._mergeSVGProperties(this._drawingOptions.toSVGProperties(),drawOutlines.defaultSVGProperties),!1,!1);return id2}static _mergeSVGProperties(p1,p2){const p1Keys=new Set(Object.keys(p1));for(const[key2,value]of Object.entries(p2))p1Keys.has(key2)?Object.assign(p1[key2],value):p1[key2]=value;return p1}static getDefaultDrawingOptions(_options){unreachable("Not implemen\
ted")}static get typesMap(){unreachable("Not implemented")}static get isDrawer(){return!0}static get supportMultipleDrawings(){return!1}static updateDefaultParams(type2,value){const propertyName=this.typesMap.get(type2);propertyName&&this._defaultDrawingOptions.updateProperty(propertyName,value),this._currentParent&&(DrawingEditor.#currentDraw.updateProperty(propertyName,value),this._currentParent.drawLayer.updateProperties(this._currentDrawId,this._defaultDrawingOptions.toSVGProperties()))}updateParams(type2,value){
const propertyName=this.constructor.typesMap.get(type2);propertyName&&this._updateProperty(type2,propertyName,value)}static get defaultPropertiesToUpdate(){const properties2=[],options=this._defaultDrawingOptions;for(const[type2,name]of this.typesMap)properties2.push([type2,options[name]]);return properties2}get propertiesToUpdate(){const properties2=[],{_drawingOptions}=this;for(const[type2,name]of this.constructor.typesMap)properties2.push([type2,_drawingOptions[name]]);return properties2}_updateProperty(type2,name,value){
const options=this._drawingOptions,savedValue=options[name],setter=val=>{options.updateProperty(name,val);const bbox=this.#drawOutlines.updateProperty(name,val);bbox&&this.#updateBbox(bbox),this.parent?.drawLayer.updateProperties(this._drawId,options.toSVGProperties()),type2===this.colorType&&this._colorPicker?.update(val)};this.addCommands({cmd:setter.bind(this,value),undo:setter.bind(this,savedValue),post:this._uiManager.updateUI.bind(this._uiManager,this),mustExec:!0,type:type2,overwriteIfSameType:!0,
keepUndo:!0})}_onResizing(){this.parent?.drawLayer.updateProperties(this._drawId,DrawingEditor._mergeSVGProperties(this.#drawOutlines.getPathResizingSVGProperties(this.#convertToDrawSpace()),{bbox:this.#rotateBox()}))}_onResized(){this.parent?.drawLayer.updateProperties(this._drawId,DrawingEditor._mergeSVGProperties(this.#drawOutlines.getPathResizedSVGProperties(this.#convertToDrawSpace()),{bbox:this.#rotateBox()}))}_onTranslating(_x,_y){this.parent?.drawLayer.updateProperties(this._drawId,{bbox:this.#rotateBox()})}_onTranslated(){
this.parent?.drawLayer.updateProperties(this._drawId,DrawingEditor._mergeSVGProperties(this.#drawOutlines.getPathTranslatedSVGProperties(this.#convertToDrawSpace(),this.parentDimensions),{bbox:this.#rotateBox()}))}_onStartDragging(){this.parent?.drawLayer.updateProperties(this._drawId,{rootClass:{moving:!0}})}_onStopDragging(){this.parent?.drawLayer.updateProperties(this._drawId,{rootClass:{moving:!1}})}commit(){super.commit(),this.disableEditMode(),this.disableEditing()}disableEditing(){super.disableEditing(),
this.div.classList.toggle("disabled",!0)}enableEditing(){super.enableEditing(),this.div.classList.toggle("disabled",!1)}getBaseTranslation(){return[0,0]}get isResizable(){return!0}onceAdded(focus2){this.annotationElementId||this.parent.addUndoableEditor(this),this._isDraggable=!0,this.#mustBeCommitted&&(this.#mustBeCommitted=!1,this.commit(),this.parent.setSelected(this),focus2&&this.isOnScreen&&this.div.focus())}remove(){this.#cleanDrawLayer(),super.remove()}rebuild(){this.parent&&(super.rebuild(),
this.div!==null&&(this.#addToDrawLayer(),this.#updateBbox(this.#drawOutlines.box),this.isAttachedToDOM||this.parent.add(this)))}setParent(parent){let mustBeSelected=!1;this.parent&&!parent?(this._uiManager.removeShouldRescale(this),this.#cleanDrawLayer()):parent&&(this._uiManager.addShouldRescale(this),this.#addToDrawLayer(parent),mustBeSelected=!this.parent&&this.div?.classList.contains("selectedEditor")),super.setParent(parent),mustBeSelected&&this.select()}#cleanDrawLayer(){this._drawId===null||
!this.parent||(this.parent.drawLayer.remove(this._drawId),this._drawId=null,this._drawingOptions.reset())}#addToDrawLayer(parent=this.parent){if(!(this._drawId!==null&&this.parent===parent)){if(this._drawId!==null){this.parent.drawLayer.updateParent(this._drawId,parent.drawLayer);return}this._drawingOptions.updateAll(),this._drawId=this.#createDrawing(this.#drawOutlines,parent)}}#convertToParentSpace([x,y,width,height]){const{parentDimensions:[pW,pH],rotation}=this;switch(rotation){case 90:return[
y,1-x,width*(pH/pW),height*(pW/pH)];case 180:return[1-x,1-y,width,height];case 270:return[1-y,x,width*(pH/pW),height*(pW/pH)];default:return[x,y,width,height]}}#convertToDrawSpace(){const{x,y,width,height,parentDimensions:[pW,pH],rotation}=this;switch(rotation){case 90:return[1-y,x,width*(pW/pH),height*(pH/pW)];case 180:return[1-x,1-y,width,height];case 270:return[y,1-x,width*(pW/pH),height*(pH/pW)];default:return[x,y,width,height]}}#updateBbox(bbox){if([this.x,this.y,this.width,this.height]=this.#convertToParentSpace(
bbox),this.div){this.fixAndSetPosition();const[parentWidth,parentHeight]=this.parentDimensions;this.setDims(this.width*parentWidth,this.height*parentHeight)}this._onResized()}#rotateBox(){const{x,y,width,height,rotation,parentRotation,parentDimensions:[pW,pH]}=this;switch((rotation*4+parentRotation)/90){case 1:return[1-y-height,x,height,width];case 2:return[1-x-width,1-y-height,width,height];case 3:return[y,1-x-width,height,width];case 4:return[x,y-width*(pW/pH),height*(pH/pW),width*(pW/pH)];case 5:
return[1-y,x,width*(pW/pH),height*(pH/pW)];case 6:return[1-x-height*(pH/pW),1-y,height*(pH/pW),width*(pW/pH)];case 7:return[y-width*(pW/pH),1-x-height*(pH/pW),width*(pW/pH),height*(pH/pW)];case 8:return[x-width,y-height,width,height];case 9:return[1-y,x-width,height,width];case 10:return[1-x,1-y,width,height];case 11:return[y-height,1-x,height,width];case 12:return[x-height*(pH/pW),y,height*(pH/pW),width*(pW/pH)];case 13:return[1-y-width*(pW/pH),x-height*(pH/pW),width*(pW/pH),height*(pH/pW)];case 14:
return[1-x,1-y-width*(pW/pH),height*(pH/pW),width*(pW/pH)];case 15:return[y,1-x,width*(pW/pH),height*(pH/pW)];default:return[x,y,width,height]}}rotate(){this.parent&&this.parent.drawLayer.updateProperties(this._drawId,DrawingEditor._mergeSVGProperties({bbox:this.#rotateBox()},this.#drawOutlines.updateRotation((this.parentRotation-this.rotation+360)%360)))}onScaleChanging(){this.parent&&this.#updateBbox(this.#drawOutlines.updateParentDimensions(this.parentDimensions,this.parent.scale))}static onScaleChangingWhenDrawing(){}render(){
if(this.div)return this.div;let baseX,baseY;this._isCopy&&(baseX=this.x,baseY=this.y);const div=super.render();div.classList.add("draw");const drawDiv=document.createElement("div");div.append(drawDiv),drawDiv.setAttribute("aria-hidden","true"),drawDiv.className="internal";const[parentWidth,parentHeight]=this.parentDimensions;return this.setDims(this.width*parentWidth,this.height*parentHeight),this._uiManager.addShouldRescale(this),this.disableEditing(),this._isCopy&&this._moveAfterPaste(baseX,baseY),
div}static createDrawerInstance(_x,_y,_parentWidth,_parentHeight,_rotation){unreachable("Not implemented")}static startDrawing(parent,uiManager,_isLTR,event2){const{target:target2,offsetX:x,offsetY:y,pointerId,pointerType}=event2;if(DrawingEditor.#currentPointerType&&DrawingEditor.#currentPointerType!==pointerType)return;const{viewport:{rotation}}=parent,{width:parentWidth,height:parentHeight}=target2.getBoundingClientRect(),ac=DrawingEditor.#currentDrawingAC=new AbortController,signal=parent.combinedSignal(
ac);if(DrawingEditor.#currentPointerId||=pointerId,DrawingEditor.#currentPointerType??=pointerType,window.addEventListener("pointerup",e=>{DrawingEditor.#currentPointerId===e.pointerId?this._endDraw(e):DrawingEditor.#currentPointerIds?.delete(e.pointerId)},{signal}),window.addEventListener("pointercancel",e=>{DrawingEditor.#currentPointerId===e.pointerId?this._currentParent.endDrawingSession():DrawingEditor.#currentPointerIds?.delete(e.pointerId)},{signal}),window.addEventListener("pointerdown",
e=>{DrawingEditor.#currentPointerType===e.pointerType&&((DrawingEditor.#currentPointerIds||=new Set).add(e.pointerId),DrawingEditor.#currentDraw.isCancellable()&&(DrawingEditor.#currentDraw.removeLastElement(),DrawingEditor.#currentDraw.isEmpty()?this._currentParent.endDrawingSession(!0):this._endDraw(null)))},{capture:!0,passive:!1,signal}),window.addEventListener("contextmenu",noContextMenu,{signal}),target2.addEventListener("pointermove",this._drawMove.bind(this),{signal}),target2.addEventListener(
"touchmove",e=>{e.timeStamp===DrawingEditor.#currentMoveTimestamp&&stopEvent(e)},{signal}),parent.toggleDrawing(),uiManager._editorUndoBar?.hide(),DrawingEditor.#currentDraw){parent.drawLayer.updateProperties(this._currentDrawId,DrawingEditor.#currentDraw.startNew(x,y,parentWidth,parentHeight,rotation));return}uiManager.updateUIForDefaultProperties(this),DrawingEditor.#currentDraw=this.createDrawerInstance(x,y,parentWidth,parentHeight,rotation),DrawingEditor.#currentDrawingOptions=this.getDefaultDrawingOptions(),
this._currentParent=parent,{id:this._currentDrawId}=parent.drawLayer.draw(this._mergeSVGProperties(DrawingEditor.#currentDrawingOptions.toSVGProperties(),DrawingEditor.#currentDraw.defaultSVGProperties),!0,!1)}static _drawMove(event2){if(DrawingEditor.#currentMoveTimestamp=-1,!DrawingEditor.#currentDraw)return;const{offsetX,offsetY,pointerId}=event2;if(DrawingEditor.#currentPointerId===pointerId){if(DrawingEditor.#currentPointerIds?.size>=1){this._endDraw(event2);return}this._currentParent.drawLayer.
updateProperties(this._currentDrawId,DrawingEditor.#currentDraw.add(offsetX,offsetY)),DrawingEditor.#currentMoveTimestamp=event2.timeStamp,stopEvent(event2)}}static _cleanup(all2){all2&&(this._currentDrawId=-1,this._currentParent=null,DrawingEditor.#currentDraw=null,DrawingEditor.#currentDrawingOptions=null,DrawingEditor.#currentPointerType=null,DrawingEditor.#currentMoveTimestamp=NaN),DrawingEditor.#currentDrawingAC&&(DrawingEditor.#currentDrawingAC.abort(),DrawingEditor.#currentDrawingAC=null,
DrawingEditor.#currentPointerId=NaN,DrawingEditor.#currentPointerIds=null)}static _endDraw(event2){const parent=this._currentParent;if(parent){if(parent.toggleDrawing(!0),this._cleanup(!1),event2?.target===parent.div&&parent.drawLayer.updateProperties(this._currentDrawId,DrawingEditor.#currentDraw.end(event2.offsetX,event2.offsetY)),this.supportMultipleDrawings){const draw=DrawingEditor.#currentDraw,drawId=this._currentDrawId,lastElement=draw.getLastElement();parent.addCommands({cmd:()=>{parent.
drawLayer.updateProperties(drawId,draw.setLastElement(lastElement))},undo:()=>{parent.drawLayer.updateProperties(drawId,draw.removeLastElement())},mustExec:!1,type:AnnotationEditorParamsType.DRAW_STEP});return}this.endDrawing(!1)}}static endDrawing(isAborted){const parent=this._currentParent;if(!parent)return null;if(parent.toggleDrawing(!0),parent.cleanUndoStack(AnnotationEditorParamsType.DRAW_STEP),!DrawingEditor.#currentDraw.isEmpty()){const{pageDimensions:[pageWidth,pageHeight],scale:scale2}=parent,
editor=parent.createAndAddNewEditor({offsetX:0,offsetY:0},!1,{drawId:this._currentDrawId,drawOutlines:DrawingEditor.#currentDraw.getOutlines(pageWidth*scale2,pageHeight*scale2,scale2,this._INNER_MARGIN),drawingOptions:DrawingEditor.#currentDrawingOptions,mustBeCommitted:!isAborted});return this._cleanup(!0),editor}return parent.drawLayer.remove(this._currentDrawId),this._cleanup(!0),null}createDrawingOptions(_data){}static deserializeDraw(_pageX,_pageY,_pageWidth,_pageHeight,_innerWidth,_data){unreachable(
"Not implemented")}static async deserialize(data,parent,uiManager){const{rawDims:{pageWidth,pageHeight,pageX,pageY}}=parent.viewport,drawOutlines=this.deserializeDraw(pageX,pageY,pageWidth,pageHeight,this._INNER_MARGIN,data),editor=await super.deserialize(data,parent,uiManager);return editor.createDrawingOptions(data),editor.#createDrawOutlines({drawOutlines}),editor.#addToDrawLayer(),editor.onScaleChanging(),editor.rotate(),editor}serializeDraw(isForCopying){const[pageX,pageY]=this.pageTranslation,
[pageWidth,pageHeight]=this.pageDimensions;return this.#drawOutlines.serialize([pageX,pageY,pageWidth,pageHeight],isForCopying)}renderAnnotationElement(annotation){return annotation.updateEdited({rect:this.getRect(0,0)}),null}static canCreateNewEmptyEditor(){return!1}}class InkDrawOutliner{#last=new Float64Array(6);#line;#lines;#rotation;#thickness;#points;#lastSVGPath="";#lastIndex=0;#outlines=new InkDrawOutline;#parentWidth;#parentHeight;constructor(x,y,parentWidth,parentHeight,rotation,thickness){
this.#parentWidth=parentWidth,this.#parentHeight=parentHeight,this.#rotation=rotation,this.#thickness=thickness,[x,y]=this.#normalizePoint(x,y);const line=this.#line=[NaN,NaN,NaN,NaN,x,y];this.#points=[x,y],this.#lines=[{line,points:this.#points}],this.#last.set(line,0)}updateProperty(name,value){name==="stroke-width"&&(this.#thickness=value)}#normalizePoint(x,y){return Outline._normalizePoint(x,y,this.#parentWidth,this.#parentHeight,this.#rotation)}isEmpty(){return!this.#lines||this.#lines.length===
0}isCancellable(){return this.#points.length<=10}add(x,y){[x,y]=this.#normalizePoint(x,y);const[x1,y1,x2,y2]=this.#last.subarray(2,6),diffX=x-x2,diffY=y-y2;return Math.hypot(this.#parentWidth*diffX,this.#parentHeight*diffY)<=2?null:(this.#points.push(x,y),isNaN(x1)?(this.#last.set([x2,y2,x,y],2),this.#line.push(NaN,NaN,NaN,NaN,x,y),{path:{d:this.toSVGPath()}}):(isNaN(this.#last[0])&&this.#line.splice(6,6),this.#last.set([x1,y1,x2,y2,x,y],0),this.#line.push(...Outline.createBezierPoints(x1,y1,x2,
y2,x,y)),{path:{d:this.toSVGPath()}}))}end(x,y){const change=this.add(x,y);return change||(this.#points.length===2?{path:{d:this.toSVGPath()}}:null)}startNew(x,y,parentWidth,parentHeight,rotation){this.#parentWidth=parentWidth,this.#parentHeight=parentHeight,this.#rotation=rotation,[x,y]=this.#normalizePoint(x,y);const line=this.#line=[NaN,NaN,NaN,NaN,x,y];this.#points=[x,y];const last=this.#lines.at(-1);return last&&(last.line=new Float32Array(last.line),last.points=new Float32Array(last.points)),
this.#lines.push({line,points:this.#points}),this.#last.set(line,0),this.#lastIndex=0,this.toSVGPath(),null}getLastElement(){return this.#lines.at(-1)}setLastElement(element2){return this.#lines?(this.#lines.push(element2),this.#line=element2.line,this.#points=element2.points,this.#lastIndex=0,{path:{d:this.toSVGPath()}}):this.#outlines.setLastElement(element2)}removeLastElement(){if(!this.#lines)return this.#outlines.removeLastElement();this.#lines.pop(),this.#lastSVGPath="";for(let i=0,ii=this.#lines.
length;i<ii;i++){const{line,points}=this.#lines[i];this.#line=line,this.#points=points,this.#lastIndex=0,this.toSVGPath()}return{path:{d:this.#lastSVGPath}}}toSVGPath(){const firstX=Outline.svgRound(this.#line[4]),firstY=Outline.svgRound(this.#line[5]);if(this.#points.length===2)return this.#lastSVGPath=`${this.#lastSVGPath} M ${firstX} ${firstY} Z`,this.#lastSVGPath;if(this.#points.length<=6){const i=this.#lastSVGPath.lastIndexOf("M");this.#lastSVGPath=`${this.#lastSVGPath.slice(0,i)} M ${firstX}\
 ${firstY}`,this.#lastIndex=6}if(this.#points.length===4){const secondX=Outline.svgRound(this.#line[10]),secondY=Outline.svgRound(this.#line[11]);return this.#lastSVGPath=`${this.#lastSVGPath} L ${secondX} ${secondY}`,this.#lastIndex=12,this.#lastSVGPath}const buffer=[];this.#lastIndex===0&&(buffer.push(`M ${firstX} ${firstY}`),this.#lastIndex=6);for(let i=this.#lastIndex,ii=this.#line.length;i<ii;i+=6){const[c1x,c1y,c2x,c2y,x,y]=this.#line.slice(i,i+6).map(Outline.svgRound);buffer.push(`C${c1x}\
 ${c1y} ${c2x} ${c2y} ${x} ${y}`)}return this.#lastSVGPath+=buffer.join(" "),this.#lastIndex=this.#line.length,this.#lastSVGPath}getOutlines(parentWidth,parentHeight,scale2,innerMargin){const last=this.#lines.at(-1);return last.line=new Float32Array(last.line),last.points=new Float32Array(last.points),this.#outlines.build(this.#lines,parentWidth,parentHeight,scale2,this.#rotation,this.#thickness,innerMargin),this.#last=null,this.#line=null,this.#lines=null,this.#lastSVGPath=null,this.#outlines}get defaultSVGProperties(){
return{root:{viewBox:"0 0 10000 10000"},rootClass:{draw:!0},bbox:[0,0,1,1]}}}class InkDrawOutline extends Outline{#bbox;#currentRotation=0;#innerMargin;#lines;#parentWidth;#parentHeight;#parentScale;#rotation;#thickness;build(lines,parentWidth,parentHeight,parentScale,rotation,thickness,innerMargin){this.#parentWidth=parentWidth,this.#parentHeight=parentHeight,this.#parentScale=parentScale,this.#rotation=rotation,this.#thickness=thickness,this.#innerMargin=innerMargin??0,this.#lines=lines,this.#computeBbox()}get thickness(){
return this.#thickness}setLastElement(element2){return this.#lines.push(element2),{path:{d:this.toSVGPath()}}}removeLastElement(){return this.#lines.pop(),{path:{d:this.toSVGPath()}}}toSVGPath(){const buffer=[];for(const{line}of this.#lines){if(buffer.push(`M${Outline.svgRound(line[4])} ${Outline.svgRound(line[5])}`),line.length===6){buffer.push("Z");continue}if(line.length===12&&isNaN(line[6])){buffer.push(`L${Outline.svgRound(line[10])} ${Outline.svgRound(line[11])}`);continue}for(let i=6,ii=line.
length;i<ii;i+=6){const[c1x,c1y,c2x,c2y,x,y]=line.subarray(i,i+6).map(Outline.svgRound);buffer.push(`C${c1x} ${c1y} ${c2x} ${c2y} ${x} ${y}`)}}return buffer.join("")}serialize([pageX,pageY,pageWidth,pageHeight],isForCopying){const serializedLines=[],serializedPoints=[],[x,y,width,height]=this.#getBBoxWithNoMargin();let tx,ty,sx,sy,x1,y1,x2,y2,rescaleFn;switch(this.#rotation){case 0:rescaleFn=Outline._rescale,tx=pageX,ty=pageY+pageHeight,sx=pageWidth,sy=-pageHeight,x1=pageX+x*pageWidth,y1=pageY+(1-
y-height)*pageHeight,x2=pageX+(x+width)*pageWidth,y2=pageY+(1-y)*pageHeight;break;case 90:rescaleFn=Outline._rescaleAndSwap,tx=pageX,ty=pageY,sx=pageWidth,sy=pageHeight,x1=pageX+y*pageWidth,y1=pageY+x*pageHeight,x2=pageX+(y+height)*pageWidth,y2=pageY+(x+width)*pageHeight;break;case 180:rescaleFn=Outline._rescale,tx=pageX+pageWidth,ty=pageY,sx=-pageWidth,sy=pageHeight,x1=pageX+(1-x-width)*pageWidth,y1=pageY+y*pageHeight,x2=pageX+(1-x)*pageWidth,y2=pageY+(y+height)*pageHeight;break;case 270:rescaleFn=
Outline._rescaleAndSwap,tx=pageX+pageWidth,ty=pageY+pageHeight,sx=-pageWidth,sy=-pageHeight,x1=pageX+(1-y-height)*pageWidth,y1=pageY+(1-x-width)*pageHeight,x2=pageX+(1-y)*pageWidth,y2=pageY+(1-x)*pageHeight;break}for(const{line,points}of this.#lines)serializedLines.push(rescaleFn(line,tx,ty,sx,sy,isForCopying?new Array(line.length):null)),serializedPoints.push(rescaleFn(points,tx,ty,sx,sy,isForCopying?new Array(points.length):null));return{lines:serializedLines,points:serializedPoints,rect:[x1,y1,
x2,y2]}}static deserialize(pageX,pageY,pageWidth,pageHeight,innerMargin,{paths:{lines,points},rotation,thickness}){const newLines=[];let tx,ty,sx,sy,rescaleFn;switch(rotation){case 0:rescaleFn=Outline._rescale,tx=-pageX/pageWidth,ty=pageY/pageHeight+1,sx=1/pageWidth,sy=-1/pageHeight;break;case 90:rescaleFn=Outline._rescaleAndSwap,tx=-pageY/pageHeight,ty=-pageX/pageWidth,sx=1/pageHeight,sy=1/pageWidth;break;case 180:rescaleFn=Outline._rescale,tx=pageX/pageWidth+1,ty=-pageY/pageHeight,sx=-1/pageWidth,
sy=1/pageHeight;break;case 270:rescaleFn=Outline._rescaleAndSwap,tx=pageY/pageHeight+1,ty=pageX/pageWidth+1,sx=-1/pageHeight,sy=-1/pageWidth;break}if(!lines){lines=[];for(const point2 of points){const len=point2.length;if(len===2){lines.push(new Float32Array([NaN,NaN,NaN,NaN,point2[0],point2[1]]));continue}if(len===4){lines.push(new Float32Array([NaN,NaN,NaN,NaN,point2[0],point2[1],NaN,NaN,NaN,NaN,point2[2],point2[3]]));continue}const line=new Float32Array(3*(len-2));lines.push(line);let[x1,y1,x2,
y2]=point2.subarray(0,4);line.set([NaN,NaN,NaN,NaN,x1,y1],0);for(let i=4;i<len;i+=2){const x=point2[i],y=point2[i+1];line.set(Outline.createBezierPoints(x1,y1,x2,y2,x,y),(i-2)*3),[x1,y1,x2,y2]=[x2,y2,x,y]}}}for(let i=0,ii=lines.length;i<ii;i++)newLines.push({line:rescaleFn(lines[i].map(x=>x??NaN),tx,ty,sx,sy),points:rescaleFn(points[i].map(x=>x??NaN),tx,ty,sx,sy)});const outlines=new this.prototype.constructor;return outlines.build(newLines,pageWidth,pageHeight,1,rotation,thickness,innerMargin),
outlines}#getMarginComponents(thickness=this.#thickness){const margin=this.#innerMargin+thickness/2*this.#parentScale;return this.#rotation%180===0?[margin/this.#parentWidth,margin/this.#parentHeight]:[margin/this.#parentHeight,margin/this.#parentWidth]}#getBBoxWithNoMargin(){const[x,y,width,height]=this.#bbox,[marginX,marginY]=this.#getMarginComponents(0);return[x+marginX,y+marginY,width-2*marginX,height-2*marginY]}#computeBbox(){const bbox=this.#bbox=new Float32Array([1/0,1/0,-1/0,-1/0]);for(const{
line}of this.#lines){if(line.length<=12){for(let i=4,ii=line.length;i<ii;i+=6)Util.pointBoundingBox(line[i],line[i+1],bbox);continue}let lastX=line[4],lastY=line[5];for(let i=6,ii=line.length;i<ii;i+=6){const[c1x,c1y,c2x,c2y,x,y]=line.subarray(i,i+6);Util.bezierBoundingBox(lastX,lastY,c1x,c1y,c2x,c2y,x,y,bbox),lastX=x,lastY=y}}const[marginX,marginY]=this.#getMarginComponents();bbox[0]=MathClamp(bbox[0]-marginX,0,1),bbox[1]=MathClamp(bbox[1]-marginY,0,1),bbox[2]=MathClamp(bbox[2]+marginX,0,1),bbox[3]=
MathClamp(bbox[3]+marginY,0,1),bbox[2]-=bbox[0],bbox[3]-=bbox[1]}get box(){return this.#bbox}updateProperty(name,value){return name==="stroke-width"?this.#updateThickness(value):null}#updateThickness(thickness){const[oldMarginX,oldMarginY]=this.#getMarginComponents();this.#thickness=thickness;const[newMarginX,newMarginY]=this.#getMarginComponents(),[diffMarginX,diffMarginY]=[newMarginX-oldMarginX,newMarginY-oldMarginY],bbox=this.#bbox;return bbox[0]-=diffMarginX,bbox[1]-=diffMarginY,bbox[2]+=2*diffMarginX,
bbox[3]+=2*diffMarginY,bbox}updateParentDimensions([width,height],scale2){const[oldMarginX,oldMarginY]=this.#getMarginComponents();this.#parentWidth=width,this.#parentHeight=height,this.#parentScale=scale2;const[newMarginX,newMarginY]=this.#getMarginComponents(),diffMarginX=newMarginX-oldMarginX,diffMarginY=newMarginY-oldMarginY,bbox=this.#bbox;return bbox[0]-=diffMarginX,bbox[1]-=diffMarginY,bbox[2]+=2*diffMarginX,bbox[3]+=2*diffMarginY,bbox}updateRotation(rotation){return this.#currentRotation=
rotation,{path:{transform:this.rotationTransform}}}get viewBox(){return this.#bbox.map(Outline.svgRound).join(" ")}get defaultProperties(){const[x,y]=this.#bbox;return{root:{viewBox:this.viewBox},path:{"transform-origin":`${Outline.svgRound(x)} ${Outline.svgRound(y)}`}}}get rotationTransform(){const[,,width,height]=this.#bbox;let a=0,b=0,c2=0,d2=0,e=0,f=0;switch(this.#currentRotation){case 90:b=height/width,c2=-width/height,e=width;break;case 180:a=-1,d2=-1,e=width,f=height;break;case 270:b=-height/
width,c2=width/height,f=height;break;default:return""}return`matrix(${a} ${b} ${c2} ${d2} ${Outline.svgRound(e)} ${Outline.svgRound(f)})`}getPathResizingSVGProperties([newX,newY,newWidth,newHeight]){const[marginX,marginY]=this.#getMarginComponents(),[x,y,width,height]=this.#bbox;if(Math.abs(width-marginX)<=Outline.PRECISION||Math.abs(height-marginY)<=Outline.PRECISION){const tx=newX+newWidth/2-(x+width/2),ty=newY+newHeight/2-(y+height/2);return{path:{"transform-origin":`${Outline.svgRound(newX)}\
 ${Outline.svgRound(newY)}`,transform:`${this.rotationTransform} translate(${tx} ${ty})`}}}const s1x=(newWidth-2*marginX)/(width-2*marginX),s1y=(newHeight-2*marginY)/(height-2*marginY),s2x=width/newWidth,s2y=height/newHeight;return{path:{"transform-origin":`${Outline.svgRound(x)} ${Outline.svgRound(y)}`,transform:`${this.rotationTransform} scale(${s2x} ${s2y}) translate(${Outline.svgRound(marginX)} ${Outline.svgRound(marginY)}) scale(${s1x} ${s1y}) translate(${Outline.svgRound(-marginX)} ${Outline.
svgRound(-marginY)})`}}}getPathResizedSVGProperties([newX,newY,newWidth,newHeight]){const[marginX,marginY]=this.#getMarginComponents(),bbox=this.#bbox,[x,y,width,height]=bbox;if(bbox[0]=newX,bbox[1]=newY,bbox[2]=newWidth,bbox[3]=newHeight,Math.abs(width-marginX)<=Outline.PRECISION||Math.abs(height-marginY)<=Outline.PRECISION){const tx2=newX+newWidth/2-(x+width/2),ty2=newY+newHeight/2-(y+height/2);for(const{line,points}of this.#lines)Outline._translate(line,tx2,ty2,line),Outline._translate(points,
tx2,ty2,points);return{root:{viewBox:this.viewBox},path:{"transform-origin":`${Outline.svgRound(newX)} ${Outline.svgRound(newY)}`,transform:this.rotationTransform||null,d:this.toSVGPath()}}}const s1x=(newWidth-2*marginX)/(width-2*marginX),s1y=(newHeight-2*marginY)/(height-2*marginY),tx=-s1x*(x+marginX)+newX+marginX,ty=-s1y*(y+marginY)+newY+marginY;if(s1x!==1||s1y!==1||tx!==0||ty!==0)for(const{line,points}of this.#lines)Outline._rescale(line,tx,ty,s1x,s1y,line),Outline._rescale(points,tx,ty,s1x,s1y,
points);return{root:{viewBox:this.viewBox},path:{"transform-origin":`${Outline.svgRound(newX)} ${Outline.svgRound(newY)}`,transform:this.rotationTransform||null,d:this.toSVGPath()}}}getPathTranslatedSVGProperties([newX,newY],parentDimensions){const[newParentWidth,newParentHeight]=parentDimensions,bbox=this.#bbox,tx=newX-bbox[0],ty=newY-bbox[1];if(this.#parentWidth===newParentWidth&&this.#parentHeight===newParentHeight)for(const{line,points}of this.#lines)Outline._translate(line,tx,ty,line),Outline.
_translate(points,tx,ty,points);else{const sx=this.#parentWidth/newParentWidth,sy=this.#parentHeight/newParentHeight;this.#parentWidth=newParentWidth,this.#parentHeight=newParentHeight;for(const{line,points}of this.#lines)Outline._rescale(line,tx,ty,sx,sy,line),Outline._rescale(points,tx,ty,sx,sy,points);bbox[2]*=sx,bbox[3]*=sy}return bbox[0]=newX,bbox[1]=newY,{root:{viewBox:this.viewBox},path:{d:this.toSVGPath(),"transform-origin":`${Outline.svgRound(newX)} ${Outline.svgRound(newY)}`}}}get defaultSVGProperties(){
const bbox=this.#bbox;return{root:{viewBox:this.viewBox},rootClass:{draw:!0},path:{d:this.toSVGPath(),"transform-origin":`${Outline.svgRound(bbox[0])} ${Outline.svgRound(bbox[1])}`,transform:this.rotationTransform||null},bbox}}}class InkDrawingOptions extends DrawingOptions{constructor(viewerParameters){super(),this._viewParameters=viewerParameters,super.updateProperties({fill:"none",stroke:AnnotationEditor._defaultLineColor,"stroke-opacity":1,"stroke-width":1,"stroke-linecap":"round","stroke-li\
nejoin":"round","stroke-miterlimit":10})}updateSVGProperty(name,value){name==="stroke-width"&&(value??=this["stroke-width"],value*=this._viewParameters.realScale),super.updateSVGProperty(name,value)}clone(){const clone2=new InkDrawingOptions(this._viewParameters);return clone2.updateAll(this),clone2}}class InkEditor extends DrawingEditor{static _type="ink";static _editorType=AnnotationEditorType.INK;static _defaultDrawingOptions=null;constructor(params){super({...params,name:"inkEditor"}),this._willKeepAspectRatio=
!0,this.defaultL10nId="pdfjs-editor-ink-editor"}static initialize(l10n,uiManager){AnnotationEditor.initialize(l10n,uiManager),this._defaultDrawingOptions=new InkDrawingOptions(uiManager.viewParameters)}static getDefaultDrawingOptions(options){const clone2=this._defaultDrawingOptions.clone();return clone2.updateProperties(options),clone2}static get supportMultipleDrawings(){return!0}static get typesMap(){return shadow(this,"typesMap",new Map([[AnnotationEditorParamsType.INK_THICKNESS,"stroke-widt\
h"],[AnnotationEditorParamsType.INK_COLOR,"stroke"],[AnnotationEditorParamsType.INK_OPACITY,"stroke-opacity"]]))}static createDrawerInstance(x,y,parentWidth,parentHeight,rotation){return new InkDrawOutliner(x,y,parentWidth,parentHeight,rotation,this._defaultDrawingOptions["stroke-width"])}static deserializeDraw(pageX,pageY,pageWidth,pageHeight,innerMargin,data){return InkDrawOutline.deserialize(pageX,pageY,pageWidth,pageHeight,innerMargin,data)}static async deserialize(data,parent,uiManager){let initialData=null;
if(data instanceof InkAnnotationElement){const{data:{inkLists,rect,rotation,id:id2,color,opacity,borderStyle:{rawWidth:thickness},popupRef,contentsObj},parent:{page:{pageNumber}}}=data;initialData=data={annotationType:AnnotationEditorType.INK,color:Array.from(color),thickness,opacity,paths:{points:inkLists},boxes:null,pageIndex:pageNumber-1,rect:rect.slice(0),rotation,annotationElementId:id2,id:id2,deleted:!1,popupRef,comment:contentsObj?.str||null}}const editor=await super.deserialize(data,parent,
uiManager);return editor._initialData=initialData,data.comment&&editor.setCommentData(data.comment),editor}get toolbarButtons(){return this._colorPicker||=new BasicColorPicker(this),[["colorPicker",this._colorPicker]]}get colorType(){return AnnotationEditorParamsType.INK_COLOR}get colorValue(){return this._drawingOptions.stroke}onScaleChanging(){if(!this.parent)return;super.onScaleChanging();const{_drawId,_drawingOptions,parent}=this;_drawingOptions.updateSVGProperty("stroke-width"),parent.drawLayer.
updateProperties(_drawId,_drawingOptions.toSVGProperties())}static onScaleChangingWhenDrawing(){const parent=this._currentParent;parent&&(super.onScaleChangingWhenDrawing(),this._defaultDrawingOptions.updateSVGProperty("stroke-width"),parent.drawLayer.updateProperties(this._currentDrawId,this._defaultDrawingOptions.toSVGProperties()))}createDrawingOptions({color,thickness,opacity}){this._drawingOptions=InkEditor.getDefaultDrawingOptions({stroke:Util.makeHexColor(...color),"stroke-width":thickness,
"stroke-opacity":opacity})}serialize(isForCopying=!1){if(this.isEmpty())return null;if(this.deleted)return this.serializeDeleted();const{lines,points,rect}=this.serializeDraw(isForCopying),{_drawingOptions:{stroke,"stroke-opacity":opacity,"stroke-width":thickness}}=this,serialized={annotationType:AnnotationEditorType.INK,color:AnnotationEditor._colorManager.convert(stroke),opacity,thickness,paths:{lines,points},pageIndex:this.pageIndex,rect,rotation:this.rotation,structTreeParentId:this._structTreeParentId};
return this.addComment(serialized),isForCopying?(serialized.isCopy=!0,serialized):this.annotationElementId&&!this.#hasElementChanged(serialized)?null:(serialized.id=this.annotationElementId,serialized)}#hasElementChanged(serialized){const{color,thickness,opacity,pageIndex}=this._initialData;return this.hasEditedComment||this._hasBeenMoved||this._hasBeenResized||serialized.color.some((c2,i)=>c2!==color[i])||serialized.thickness!==thickness||serialized.opacity!==opacity||serialized.pageIndex!==pageIndex}renderAnnotationElement(annotation){
const{points,rect}=this.serializeDraw(!1),params={rect,thickness:this._drawingOptions["stroke-width"],points};return this.hasEditedComment&&(params.popup=this.comment),annotation.updateEdited(params),null}}class ContourDrawOutline extends InkDrawOutline{toSVGPath(){let path2=super.toSVGPath();return path2.endsWith("Z")||(path2+="Z"),path2}}const BASE_HEADER_LENGTH=8,POINTS_PROPERTIES_NUMBER=3;class SignatureExtractor{static#PARAMETERS={maxDim:512,sigmaSFactor:.02,sigmaR:25,kernelSize:16};static#neighborIndexToId(i0,j0,i,j){
return i-=i0,j-=j0,i===0?j>0?0:4:i===1?j+6:2-j}static#neighborIdToIndex=new Int32Array([0,1,-1,1,-1,0,-1,-1,0,-1,1,-1,1,0,1,1]);static#clockwiseNonZero(buf,width,i0,j0,i,j,offset2){const id2=this.#neighborIndexToId(i0,j0,i,j);for(let k=0;k<8;k++){const kk=(-k+id2-offset2+16)%8,shiftI=this.#neighborIdToIndex[2*kk],shiftJ=this.#neighborIdToIndex[2*kk+1];if(buf[(i0+shiftI)*width+(j0+shiftJ)]!==0)return kk}return-1}static#counterClockwiseNonZero(buf,width,i0,j0,i,j,offset2){const id2=this.#neighborIndexToId(
i0,j0,i,j);for(let k=0;k<8;k++){const kk=(k+id2+offset2+16)%8,shiftI=this.#neighborIdToIndex[2*kk],shiftJ=this.#neighborIdToIndex[2*kk+1];if(buf[(i0+shiftI)*width+(j0+shiftJ)]!==0)return kk}return-1}static#findContours(buf,width,height,threshold){const N=buf.length,types2=new Int32Array(N);for(let i=0;i<N;i++)types2[i]=buf[i]<=threshold?1:0;for(let i=1;i<height-1;i++)types2[i*width]=types2[i*width+width-1]=0;for(let i=0;i<width;i++)types2[i]=types2[width*height-1-i]=0;let nbd=1,lnbd;const contours=[];
for(let i=1;i<height-1;i++){lnbd=1;for(let j=1;j<width-1;j++){const ij=i*width+j,pix=types2[ij];if(pix===0)continue;let i2=i,j2=j;if(pix===1&&types2[ij-1]===0)nbd+=1,j2-=1;else if(pix>=1&&types2[ij+1]===0)nbd+=1,j2+=1,pix>1&&(lnbd=pix);else{pix!==1&&(lnbd=Math.abs(pix));continue}const points=[j,i],isHole=j2===j+1,contour={isHole,points,id:nbd,parent:0};contours.push(contour);let contour0;for(const c2 of contours)if(c2.id===lnbd){contour0=c2;break}contour0?contour0.isHole?contour.parent=isHole?contour0.
parent:lnbd:contour.parent=isHole?lnbd:contour0.parent:contour.parent=isHole?lnbd:0;const k=this.#clockwiseNonZero(types2,width,i,j,i2,j2,0);if(k===-1){types2[ij]=-nbd,types2[ij]!==1&&(lnbd=Math.abs(types2[ij]));continue}let shiftI=this.#neighborIdToIndex[2*k],shiftJ=this.#neighborIdToIndex[2*k+1];const i1=i+shiftI,j1=j+shiftJ;i2=i1,j2=j1;let i3=i,j3=j;for(;;){const kk=this.#counterClockwiseNonZero(types2,width,i3,j3,i2,j2,1);shiftI=this.#neighborIdToIndex[2*kk],shiftJ=this.#neighborIdToIndex[2*
kk+1];const i4=i3+shiftI,j4=j3+shiftJ;points.push(j4,i4);const ij3=i3*width+j3;if(types2[ij3+1]===0?types2[ij3]=-nbd:types2[ij3]===1&&(types2[ij3]=nbd),i4===i&&j4===j&&i3===i1&&j3===j1){types2[ij]!==1&&(lnbd=Math.abs(types2[ij]));break}else i2=i3,j2=j3,i3=i4,j3=j4}}}return contours}static#douglasPeuckerHelper(points,start2,end,output){if(end-start2<=4){for(let i=start2;i<end-2;i+=2)output.push(points[i],points[i+1]);return}const ax=points[start2],ay=points[start2+1],abx=points[end-4]-ax,aby=points[end-
3]-ay,dist2=Math.hypot(abx,aby),nabx=abx/dist2,naby=aby/dist2,aa=nabx*ay-naby*ax,m=aby/abx,invS=1/dist2,phi=Math.atan(m),cosPhi=Math.cos(phi),sinPhi=Math.sin(phi),tmax=invS*(Math.abs(cosPhi)+Math.abs(sinPhi)),poly=invS*(1-tmax+tmax**2),partialPhi=Math.max(Math.atan(Math.abs(sinPhi+cosPhi)*poly),Math.atan(Math.abs(sinPhi-cosPhi)*poly));let dmax=0,index2=start2;for(let i=start2+2;i<end-2;i+=2){const d2=Math.abs(aa-nabx*points[i+1]+naby*points[i]);d2>dmax&&(index2=i,dmax=d2)}dmax>(dist2*partialPhi)**
2?(this.#douglasPeuckerHelper(points,start2,index2+2,output),this.#douglasPeuckerHelper(points,index2,end,output)):output.push(ax,ay)}static#douglasPeucker(points){const output=[],len=points.length;return this.#douglasPeuckerHelper(points,0,len,output),output.push(points[len-2],points[len-1]),output.length<=4?null:output}static#bilateralFilter(buf,width,height,sigmaS,sigmaR,kernelSize){const kernel=new Float32Array(kernelSize**2),sigmaS2=-2*sigmaS**2,halfSize=kernelSize>>1;for(let i=0;i<kernelSize;i++){
const x=(i-halfSize)**2;for(let j=0;j<kernelSize;j++)kernel[i*kernelSize+j]=Math.exp((x+(j-halfSize)**2)/sigmaS2)}const rangeValues=new Float32Array(256),sigmaR2=-2*sigmaR**2;for(let i=0;i<256;i++)rangeValues[i]=Math.exp(i**2/sigmaR2);const N=buf.length,out=new Uint8Array(N),histogram=new Uint32Array(256);for(let i=0;i<height;i++)for(let j=0;j<width;j++){const ij=i*width+j,center=buf[ij];let sum=0,norm=0;for(let k=0;k<kernelSize;k++){const y=i+k-halfSize;if(!(y<0||y>=height))for(let l=0;l<kernelSize;l++){
const x=j+l-halfSize;if(x<0||x>=width)continue;const neighbour=buf[y*width+x],w=kernel[k*kernelSize+l]*rangeValues[Math.abs(neighbour-center)];sum+=neighbour*w,norm+=w}}const pix=out[ij]=Math.round(sum/norm);histogram[pix]++}return[out,histogram]}static#getHistogram(buf){const histogram=new Uint32Array(256);for(const g of buf)histogram[g]++;return histogram}static#toUint8(buf){const N=buf.length,out=new Uint8ClampedArray(N>>2);let max2=-1/0,min2=1/0;for(let i=0,ii=out.length;i<ii;i++){const pix=out[i]=
buf[i<<2];max2=Math.max(max2,pix),min2=Math.min(min2,pix)}const ratio=255/(max2-min2);for(let i=0,ii=out.length;i<ii;i++)out[i]=(out[i]-min2)*ratio;return out}static#guessThreshold(histogram){let i,M=-1/0,L=-1/0;const min2=histogram.findIndex(v=>v!==0);let pos=min2,spos=min2;for(i=min2;i<256;i++){const v=histogram[i];v>M&&(i-pos>L&&(L=i-pos,spos=i-1),M=v,pos=i)}for(i=spos-1;i>=0&&!(histogram[i]>histogram[i+1]);i--);return i}static#getGrayPixels(bitmap){const originalBitmap=bitmap,{width,height}=bitmap,
{maxDim}=this.#PARAMETERS;let newWidth=width,newHeight=height;if(width>maxDim||height>maxDim){let prevWidth=width,prevHeight=height,steps=Math.log2(Math.max(width,height)/maxDim);const isteps=Math.floor(steps);steps=steps===isteps?isteps-1:isteps;for(let i=0;i<steps;i++){newWidth=Math.ceil(prevWidth/2),newHeight=Math.ceil(prevHeight/2);const offscreen2=new OffscreenCanvas(newWidth,newHeight);offscreen2.getContext("2d").drawImage(bitmap,0,0,prevWidth,prevHeight,0,0,newWidth,newHeight),prevWidth=newWidth,
prevHeight=newHeight,bitmap!==originalBitmap&&bitmap.close(),bitmap=offscreen2.transferToImageBitmap()}const ratio=Math.min(maxDim/newWidth,maxDim/newHeight);newWidth=Math.round(newWidth*ratio),newHeight=Math.round(newHeight*ratio)}const ctx=new OffscreenCanvas(newWidth,newHeight).getContext("2d",{willReadFrequently:!0});ctx.fillStyle="white",ctx.fillRect(0,0,newWidth,newHeight),ctx.filter="grayscale(1)",ctx.drawImage(bitmap,0,0,bitmap.width,bitmap.height,0,0,newWidth,newHeight);const grayImage=ctx.
getImageData(0,0,newWidth,newHeight).data;return[this.#toUint8(grayImage),newWidth,newHeight]}static extractContoursFromText(text2,{fontFamily,fontStyle,fontWeight},pageWidth,pageHeight,rotation,innerMargin){let canvas=new OffscreenCanvas(1,1),ctx=canvas.getContext("2d",{alpha:!1});const fontSize=200,font=ctx.font=`${fontStyle} ${fontWeight} ${fontSize}px ${fontFamily}`,{actualBoundingBoxLeft,actualBoundingBoxRight,actualBoundingBoxAscent,actualBoundingBoxDescent,fontBoundingBoxAscent,fontBoundingBoxDescent,
width}=ctx.measureText(text2),SCALE=1.5,canvasWidth=Math.ceil(Math.max(Math.abs(actualBoundingBoxLeft)+Math.abs(actualBoundingBoxRight)||0,width)*SCALE),canvasHeight=Math.ceil(Math.max(Math.abs(actualBoundingBoxAscent)+Math.abs(actualBoundingBoxDescent)||fontSize,Math.abs(fontBoundingBoxAscent)+Math.abs(fontBoundingBoxDescent)||fontSize)*SCALE);canvas=new OffscreenCanvas(canvasWidth,canvasHeight),ctx=canvas.getContext("2d",{alpha:!0,willReadFrequently:!0}),ctx.font=font,ctx.filter="grayscale(1)",
ctx.fillStyle="white",ctx.fillRect(0,0,canvasWidth,canvasHeight),ctx.fillStyle="black",ctx.fillText(text2,canvasWidth*(SCALE-1)/2,canvasHeight*(3-SCALE)/2);const uint8Buf=this.#toUint8(ctx.getImageData(0,0,canvasWidth,canvasHeight).data),histogram=this.#getHistogram(uint8Buf),threshold=this.#guessThreshold(histogram),contourList=this.#findContours(uint8Buf,canvasWidth,canvasHeight,threshold);return this.processDrawnLines({lines:{curves:contourList,width:canvasWidth,height:canvasHeight},pageWidth,
pageHeight,rotation,innerMargin,mustSmooth:!0,areContours:!0})}static process(bitmap,pageWidth,pageHeight,rotation,innerMargin){const[uint8Buf,width,height]=this.#getGrayPixels(bitmap),[buffer,histogram]=this.#bilateralFilter(uint8Buf,width,height,Math.hypot(width,height)*this.#PARAMETERS.sigmaSFactor,this.#PARAMETERS.sigmaR,this.#PARAMETERS.kernelSize),threshold=this.#guessThreshold(histogram),contourList=this.#findContours(buffer,width,height,threshold);return this.processDrawnLines({lines:{curves:contourList,
width,height},pageWidth,pageHeight,rotation,innerMargin,mustSmooth:!0,areContours:!0})}static processDrawnLines({lines,pageWidth,pageHeight,rotation,innerMargin,mustSmooth,areContours}){rotation%180!==0&&([pageWidth,pageHeight]=[pageHeight,pageWidth]);const{curves,width,height}=lines,thickness=lines.thickness??0,linesAndPoints=[],ratio=Math.min(pageWidth/width,pageHeight/height),xScale=ratio/pageWidth,yScale=ratio/pageHeight,newCurves=[];for(const{points}of curves){const reducedPoints=mustSmooth?
this.#douglasPeucker(points):points;if(!reducedPoints)continue;newCurves.push(reducedPoints);const len=reducedPoints.length,newPoints=new Float32Array(len),line=new Float32Array(3*(len===2?2:len-2));if(linesAndPoints.push({line,points:newPoints}),len===2){newPoints[0]=reducedPoints[0]*xScale,newPoints[1]=reducedPoints[1]*yScale,line.set([NaN,NaN,NaN,NaN,newPoints[0],newPoints[1]],0);continue}let[x1,y1,x2,y2]=reducedPoints;x1*=xScale,y1*=yScale,x2*=xScale,y2*=yScale,newPoints.set([x1,y1,x2,y2],0),
line.set([NaN,NaN,NaN,NaN,x1,y1],0);for(let i=4;i<len;i+=2){const x=newPoints[i]=reducedPoints[i]*xScale,y=newPoints[i+1]=reducedPoints[i+1]*yScale;line.set(Outline.createBezierPoints(x1,y1,x2,y2,x,y),(i-2)*3),[x1,y1,x2,y2]=[x2,y2,x,y]}}if(linesAndPoints.length===0)return null;const outline=areContours?new ContourDrawOutline:new InkDrawOutline;return outline.build(linesAndPoints,pageWidth,pageHeight,1,rotation,areContours?0:thickness,innerMargin),{outline,newCurves,areContours,thickness,width,height}}static async compressSignature({
outlines,areContours,thickness,width,height}){let minDiff=1/0,maxDiff=-1/0,outlinesLength=0;for(const points of outlines){outlinesLength+=points.length;for(let i=2,ii=points.length;i<ii;i++){const dx=points[i]-points[i-2];minDiff=Math.min(minDiff,dx),maxDiff=Math.max(maxDiff,dx)}}let bufferType;minDiff>=-128&&maxDiff<=127?bufferType=Int8Array:minDiff>=-32768&&maxDiff<=32767?bufferType=Int16Array:bufferType=Int32Array;const len=outlines.length,headerLength=BASE_HEADER_LENGTH+POINTS_PROPERTIES_NUMBER*
len,header=new Uint32Array(headerLength);let offset2=0;header[offset2++]=headerLength*Uint32Array.BYTES_PER_ELEMENT+(outlinesLength-2*len)*bufferType.BYTES_PER_ELEMENT,header[offset2++]=0,header[offset2++]=width,header[offset2++]=height,header[offset2++]=areContours?0:1,header[offset2++]=Math.max(0,Math.floor(thickness??0)),header[offset2++]=len,header[offset2++]=bufferType.BYTES_PER_ELEMENT;for(const points of outlines)header[offset2++]=points.length-2,header[offset2++]=points[0],header[offset2++]=
points[1];const cs=new CompressionStream("deflate-raw"),writer=cs.writable.getWriter();await writer.ready,writer.write(header);const BufferCtor=bufferType.prototype.constructor;for(const points of outlines){const diffs=new BufferCtor(points.length-2);for(let i=2,ii=points.length;i<ii;i++)diffs[i-2]=points[i]-points[i-2];writer.write(diffs)}writer.close();const buf=await new Response(cs.readable).arrayBuffer(),bytes=new Uint8Array(buf);return toBase64Util(bytes)}static async decompressSignature(signatureData){
try{const bytes=fromBase64Util(signatureData),{readable,writable:writable2}=new DecompressionStream("deflate-raw"),writer=writable2.getWriter();await writer.ready,writer.write(bytes).then(async()=>{await writer.ready,await writer.close()}).catch(()=>{});let data=null,offset2=0;for await(const chunk of readable)data||=new Uint8Array(new Uint32Array(chunk.buffer,0,4)[0]),data.set(chunk,offset2),offset2+=chunk.length;const header=new Uint32Array(data.buffer,0,data.length>>2),version2=header[1];if(version2!==
0)throw new Error(`Invalid version: ${version2}`);const width=header[2],height=header[3],areContours=header[4]===0,thickness=header[5],numberOfDrawings=header[6],bufferType=header[7],outlines=[],diffsOffset=(BASE_HEADER_LENGTH+POINTS_PROPERTIES_NUMBER*numberOfDrawings)*Uint32Array.BYTES_PER_ELEMENT;let diffs;switch(bufferType){case Int8Array.BYTES_PER_ELEMENT:diffs=new Int8Array(data.buffer,diffsOffset);break;case Int16Array.BYTES_PER_ELEMENT:diffs=new Int16Array(data.buffer,diffsOffset);break;case Int32Array.
BYTES_PER_ELEMENT:diffs=new Int32Array(data.buffer,diffsOffset);break}offset2=0;for(let i=0;i<numberOfDrawings;i++){const len=header[POINTS_PROPERTIES_NUMBER*i+BASE_HEADER_LENGTH],points=new Float32Array(len+2);outlines.push(points);for(let j=0;j<POINTS_PROPERTIES_NUMBER-1;j++)points[j]=header[POINTS_PROPERTIES_NUMBER*i+BASE_HEADER_LENGTH+j+1];for(let j=0;j<len;j++)points[j+2]=points[j]+diffs[offset2++]}return{areContours,thickness,outlines,width,height}}catch(e){return warn(`decompressSignature\
: ${e}`),null}}}class SignatureOptions extends DrawingOptions{constructor(){super(),super.updateProperties({fill:AnnotationEditor._defaultLineColor,"stroke-width":0})}clone(){const clone2=new SignatureOptions;return clone2.updateAll(this),clone2}}class DrawnSignatureOptions extends InkDrawingOptions{constructor(viewerParameters){super(viewerParameters),super.updateProperties({stroke:AnnotationEditor._defaultLineColor,"stroke-width":1})}clone(){const clone2=new DrawnSignatureOptions(this._viewParameters);
return clone2.updateAll(this),clone2}}class SignatureEditor extends DrawingEditor{#isExtracted=!1;#description=null;#signatureData=null;#signatureUUID=null;static _type="signature";static _editorType=AnnotationEditorType.SIGNATURE;static _defaultDrawingOptions=null;constructor(params){super({...params,mustBeCommitted:!0,name:"signatureEditor"}),this._willKeepAspectRatio=!0,this.#signatureData=params.signatureData||null,this.#description=null,this.defaultL10nId="pdfjs-editor-signature-editor1"}static initialize(l10n,uiManager){
AnnotationEditor.initialize(l10n,uiManager),this._defaultDrawingOptions=new SignatureOptions,this._defaultDrawnSignatureOptions=new DrawnSignatureOptions(uiManager.viewParameters)}static getDefaultDrawingOptions(options){const clone2=this._defaultDrawingOptions.clone();return clone2.updateProperties(options),clone2}static get supportMultipleDrawings(){return!1}static get typesMap(){return shadow(this,"typesMap",new Map)}static get isDrawer(){return!1}get telemetryFinalData(){return{type:"signatu\
re",hasDescription:!!this.#description}}static computeTelemetryFinalData(data){const hasDescriptionStats=data.get("hasDescription");return{hasAltText:hasDescriptionStats.get(!0)??0,hasNoAltText:hasDescriptionStats.get(!1)??0}}get isResizable(){return!0}onScaleChanging(){this._drawId!==null&&super.onScaleChanging()}render(){if(this.div)return this.div;let baseX,baseY;const{_isCopy}=this;if(_isCopy&&(this._isCopy=!1,baseX=this.x,baseY=this.y),super.render(),this._drawId===null)if(this.#signatureData){
const{lines,mustSmooth,areContours,description:description2,uuid:uuid2,heightInPage}=this.#signatureData,{rawDims:{pageWidth,pageHeight},rotation}=this.parent.viewport,outline=SignatureExtractor.processDrawnLines({lines,pageWidth,pageHeight,rotation,innerMargin:SignatureEditor._INNER_MARGIN,mustSmooth,areContours});this.addSignature(outline,heightInPage,description2,uuid2)}else this.div.setAttribute("data-l10n-args",JSON.stringify({description:""})),this.div.hidden=!0,this._uiManager.getSignature(
this);else this.div.setAttribute("data-l10n-args",JSON.stringify({description:this.#description||""}));return _isCopy&&(this._isCopy=!0,this._moveAfterPaste(baseX,baseY)),this.div}setUuid(uuid2){this.#signatureUUID=uuid2,this.addEditToolbar()}getUuid(){return this.#signatureUUID}get description(){return this.#description}set description(description2){this.#description=description2,this.div&&(this.div.setAttribute("data-l10n-args",JSON.stringify({description:description2})),super.addEditToolbar().
then(toolbar=>{toolbar?.updateEditSignatureButton(description2)}))}getSignaturePreview(){const{newCurves,areContours,thickness,width,height}=this.#signatureData,maxDim=Math.max(width,height),outlineData=SignatureExtractor.processDrawnLines({lines:{curves:newCurves.map(points=>({points})),thickness,width,height},pageWidth:maxDim,pageHeight:maxDim,rotation:0,innerMargin:0,mustSmooth:!1,areContours});return{areContours,outline:outlineData.outline}}get toolbarButtons(){return this._uiManager.signatureManager?
[["editSignature",this._uiManager.signatureManager]]:super.toolbarButtons}addSignature(data,heightInPage,description2,uuid2){const{x:savedX,y:savedY}=this,{outline}=this.#signatureData=data;this.#isExtracted=outline instanceof ContourDrawOutline,this.description=description2;let drawingOptions;this.#isExtracted?drawingOptions=SignatureEditor.getDefaultDrawingOptions():(drawingOptions=SignatureEditor._defaultDrawnSignatureOptions.clone(),drawingOptions.updateProperties({"stroke-width":outline.thickness})),
this._addOutlines({drawOutlines:outline,drawingOptions});const[parentWidth,parentHeight]=this.parentDimensions,[,pageHeight]=this.pageDimensions;let newHeight=heightInPage/pageHeight;newHeight=newHeight>=1?.5:newHeight,this.width*=newHeight/this.height,this.width>=1&&(newHeight*=.9/this.width,this.width=.9),this.height=newHeight,this.setDims(parentWidth*this.width,parentHeight*this.height),this.x=savedX,this.y=savedY,this.center(),this._onResized(),this.onScaleChanging(),this.rotate(),this._uiManager.
addToAnnotationStorage(this),this.setUuid(uuid2),this._reportTelemetry({action:"pdfjs.signature.inserted",data:{hasBeenSaved:!!uuid2,hasDescription:!!description2}}),this.div.hidden=!1}getFromImage(bitmap){const{rawDims:{pageWidth,pageHeight},rotation}=this.parent.viewport;return SignatureExtractor.process(bitmap,pageWidth,pageHeight,rotation,SignatureEditor._INNER_MARGIN)}getFromText(text2,fontInfo){const{rawDims:{pageWidth,pageHeight},rotation}=this.parent.viewport;return SignatureExtractor.extractContoursFromText(
text2,fontInfo,pageWidth,pageHeight,rotation,SignatureEditor._INNER_MARGIN)}getDrawnSignature(curves){const{rawDims:{pageWidth,pageHeight},rotation}=this.parent.viewport;return SignatureExtractor.processDrawnLines({lines:curves,pageWidth,pageHeight,rotation,innerMargin:SignatureEditor._INNER_MARGIN,mustSmooth:!1,areContours:!1})}createDrawingOptions({areContours,thickness}){areContours?this._drawingOptions=SignatureEditor.getDefaultDrawingOptions():(this._drawingOptions=SignatureEditor._defaultDrawnSignatureOptions.
clone(),this._drawingOptions.updateProperties({"stroke-width":thickness}))}serialize(isForCopying=!1){if(this.isEmpty())return null;const{lines,points,rect}=this.serializeDraw(isForCopying),{_drawingOptions:{"stroke-width":thickness}}=this,serialized={annotationType:AnnotationEditorType.SIGNATURE,isSignature:!0,areContours:this.#isExtracted,color:[0,0,0],thickness:this.#isExtracted?0:thickness,pageIndex:this.pageIndex,rect,rotation:this.rotation,structTreeParentId:this._structTreeParentId};return this.
addComment(serialized),isForCopying?(serialized.paths={lines,points},serialized.uuid=this.#signatureUUID,serialized.isCopy=!0):serialized.lines=lines,this.#description&&(serialized.accessibilityData={type:"Figure",alt:this.#description}),serialized}static deserializeDraw(pageX,pageY,pageWidth,pageHeight,innerMargin,data){return data.areContours?ContourDrawOutline.deserialize(pageX,pageY,pageWidth,pageHeight,innerMargin,data):InkDrawOutline.deserialize(pageX,pageY,pageWidth,pageHeight,innerMargin,
data)}static async deserialize(data,parent,uiManager){const editor=await super.deserialize(data,parent,uiManager);return editor.#isExtracted=data.areContours,editor.description=data.accessibilityData?.alt||"",editor.#signatureUUID=data.uuid,editor}}class StampEditor extends AnnotationEditor{#bitmap=null;#bitmapId=null;#bitmapPromise=null;#bitmapUrl=null;#bitmapFile=null;#bitmapFileName="";#canvas=null;#missingCanvas=!1;#resizeTimeoutId=null;#isSvg=!1;#hasBeenAddedInUndoStack=!1;static _type="sta\
mp";static _editorType=AnnotationEditorType.STAMP;constructor(params){super({...params,name:"stampEditor"}),this.#bitmapUrl=params.bitmapUrl,this.#bitmapFile=params.bitmapFile,this.defaultL10nId="pdfjs-editor-stamp-editor"}static initialize(l10n,uiManager){AnnotationEditor.initialize(l10n,uiManager)}static isHandlingMimeForPasting(mime){return SupportedImageMimeTypes.includes(mime)}static paste(item,parent){parent.pasteEditor({mode:AnnotationEditorType.STAMP},{bitmapFile:item.getAsFile()})}altTextFinish(){
this._uiManager.useNewAltTextFlow&&(this.div.hidden=!1),super.altTextFinish()}get telemetryFinalData(){return{type:"stamp",hasAltText:!!this.altTextData?.altText}}static computeTelemetryFinalData(data){const hasAltTextStats=data.get("hasAltText");return{hasAltText:hasAltTextStats.get(!0)??0,hasNoAltText:hasAltTextStats.get(!1)??0}}#getBitmapFetched(data,fromId=!1){if(!data){this.remove();return}this.#bitmap=data.bitmap,fromId||(this.#bitmapId=data.id,this.#isSvg=data.isSvg),data.file&&(this.#bitmapFileName=
data.file.name),this.#createCanvas()}#getBitmapDone(){if(this.#bitmapPromise=null,this._uiManager.enableWaiting(!1),!!this.#canvas){if(this._uiManager.useNewAltTextWhenAddingImage&&this._uiManager.useNewAltTextFlow&&this.#bitmap){this.addEditToolbar().then(()=>{this._editToolbar.hide(),this._uiManager.editAltText(this,!0)});return}if(!this._uiManager.useNewAltTextWhenAddingImage&&this._uiManager.useNewAltTextFlow&&this.#bitmap){this._reportTelemetry({action:"pdfjs.image.image_added",data:{alt_text_modal:!1,
alt_text_type:"empty"}});try{this.mlGuessAltText()}catch{}}this.div.focus()}}async mlGuessAltText(imageData=null,updateAltTextData=!0){if(this.hasAltTextData())return null;const{mlManager}=this._uiManager;if(!mlManager)throw new Error("No ML.");if(!await mlManager.isEnabledFor("altText"))throw new Error("ML isn't enabled for alt text.");const{data,width,height}=imageData||this.copyCanvas(null,null,!0).imageData,response=await mlManager.guess({name:"altText",request:{data,width,height,channels:data.
length/(width*height)}});if(!response)throw new Error("No response from the AI service.");if(response.error)throw new Error("Error from the AI service.");if(response.cancel)return null;if(!response.output)throw new Error("No valid response from the AI service.");const altText=response.output;return await this.setGuessedAltText(altText),updateAltTextData&&!this.hasAltTextData()&&(this.altTextData={alt:altText,decorative:!1}),altText}#getBitmap(){if(this.#bitmapId){this._uiManager.enableWaiting(!0),
this._uiManager.imageManager.getFromId(this.#bitmapId).then(data=>this.#getBitmapFetched(data,!0)).finally(()=>this.#getBitmapDone());return}if(this.#bitmapUrl){const url2=this.#bitmapUrl;this.#bitmapUrl=null,this._uiManager.enableWaiting(!0),this.#bitmapPromise=this._uiManager.imageManager.getFromUrl(url2).then(data=>this.#getBitmapFetched(data)).finally(()=>this.#getBitmapDone());return}if(this.#bitmapFile){const file=this.#bitmapFile;this.#bitmapFile=null,this._uiManager.enableWaiting(!0),this.#bitmapPromise=
this._uiManager.imageManager.getFromFile(file).then(data=>this.#getBitmapFetched(data)).finally(()=>this.#getBitmapDone());return}const input=document.createElement("input");input.type="file",input.accept=SupportedImageMimeTypes.join(",");const signal=this._uiManager._signal;this.#bitmapPromise=new Promise(resolve2=>{input.addEventListener("change",async()=>{if(!input.files||input.files.length===0)this.remove();else{this._uiManager.enableWaiting(!0);const data=await this._uiManager.imageManager.
getFromFile(input.files[0]);this._reportTelemetry({action:"pdfjs.image.image_selected",data:{alt_text_modal:this._uiManager.useNewAltTextFlow}}),this.#getBitmapFetched(data)}resolve2()},{signal}),input.addEventListener("cancel",()=>{this.remove(),resolve2()},{signal})}).finally(()=>this.#getBitmapDone()),input.click()}remove(){this.#bitmapId&&(this.#bitmap=null,this._uiManager.imageManager.deleteId(this.#bitmapId),this.#canvas?.remove(),this.#canvas=null,this.#resizeTimeoutId&&(clearTimeout(this.#resizeTimeoutId),
this.#resizeTimeoutId=null)),super.remove()}rebuild(){if(!this.parent){this.#bitmapId&&this.#getBitmap();return}super.rebuild(),this.div!==null&&(this.#bitmapId&&this.#canvas===null&&this.#getBitmap(),this.isAttachedToDOM||this.parent.add(this))}onceAdded(focus2){this._isDraggable=!0,focus2&&this.div.focus()}isEmpty(){return!(this.#bitmapPromise||this.#bitmap||this.#bitmapUrl||this.#bitmapFile||this.#bitmapId||this.#missingCanvas)}get toolbarButtons(){return[["altText",this.createAltText()]]}get isResizable(){
return!0}render(){if(this.div)return this.div;let baseX,baseY;return this._isCopy&&(baseX=this.x,baseY=this.y),super.render(),this.div.hidden=!0,this.createAltText(),this.#missingCanvas||(this.#bitmap?this.#createCanvas():this.#getBitmap()),this._isCopy&&this._moveAfterPaste(baseX,baseY),this._uiManager.addShouldRescale(this),this.div}setCanvas(annotationElementId,canvas){const{id:bitmapId,bitmap}=this._uiManager.imageManager.getFromCanvas(annotationElementId,canvas);canvas.remove(),bitmapId&&this.
_uiManager.imageManager.isValidId(bitmapId)&&(this.#bitmapId=bitmapId,bitmap&&(this.#bitmap=bitmap),this.#missingCanvas=!1,this.#createCanvas())}_onResized(){this.onScaleChanging()}onScaleChanging(){if(!this.parent)return;this.#resizeTimeoutId!==null&&clearTimeout(this.#resizeTimeoutId);const TIME_TO_WAIT=200;this.#resizeTimeoutId=setTimeout(()=>{this.#resizeTimeoutId=null,this.#drawBitmap()},TIME_TO_WAIT)}#createCanvas(){const{div}=this;let{width,height}=this.#bitmap;const[pageWidth,pageHeight]=this.
pageDimensions,MAX_RATIO=.75;if(this.width)width=this.width*pageWidth,height=this.height*pageHeight;else if(width>MAX_RATIO*pageWidth||height>MAX_RATIO*pageHeight){const factor=Math.min(MAX_RATIO*pageWidth/width,MAX_RATIO*pageHeight/height);width*=factor,height*=factor}const[parentWidth,parentHeight]=this.parentDimensions;this.setDims(width*parentWidth/pageWidth,height*parentHeight/pageHeight),this._uiManager.enableWaiting(!1);const canvas=this.#canvas=document.createElement("canvas");canvas.setAttribute(
"role","img"),this.addContainer(canvas),this.width=width/pageWidth,this.height=height/pageHeight,this._initialOptions?.isCentered?this.center():this.fixAndSetPosition(),this._initialOptions=null,(!this._uiManager.useNewAltTextWhenAddingImage||!this._uiManager.useNewAltTextFlow||this.annotationElementId)&&(div.hidden=!1),this.#drawBitmap(),this.#hasBeenAddedInUndoStack||(this.parent.addUndoableEditor(this),this.#hasBeenAddedInUndoStack=!0),this._reportTelemetry({action:"inserted_image"}),this.#bitmapFileName&&
this.div.setAttribute("aria-description",this.#bitmapFileName),this.annotationElementId||this._uiManager.a11yAlert("pdfjs-editor-stamp-added-alert")}copyCanvas(maxDataDimension,maxPreviewDimension,createImageData=!1){maxDataDimension||(maxDataDimension=224);const{width:bitmapWidth,height:bitmapHeight}=this.#bitmap,outputScale=new OutputScale;let bitmap=this.#bitmap,width=bitmapWidth,height=bitmapHeight,canvas=null;if(maxPreviewDimension){if(bitmapWidth>maxPreviewDimension||bitmapHeight>maxPreviewDimension){
const ratio=Math.min(maxPreviewDimension/bitmapWidth,maxPreviewDimension/bitmapHeight);width=Math.floor(bitmapWidth*ratio),height=Math.floor(bitmapHeight*ratio)}canvas=document.createElement("canvas");const scaledWidth=canvas.width=Math.ceil(width*outputScale.sx),scaledHeight=canvas.height=Math.ceil(height*outputScale.sy);this.#isSvg||(bitmap=this.#scaleBitmap(scaledWidth,scaledHeight));const ctx=canvas.getContext("2d");ctx.filter=this._uiManager.hcmFilter;let white="white",black="#cfcfd8";this.
_uiManager.hcmFilter!=="none"?black="black":window.matchMedia?.("(prefers-color-scheme: dark)").matches&&(white="#8f8f9d",black="#42414d");const boxDim=15,boxDimWidth=boxDim*outputScale.sx,boxDimHeight=boxDim*outputScale.sy,pattern2=new OffscreenCanvas(boxDimWidth*2,boxDimHeight*2),patternCtx=pattern2.getContext("2d");patternCtx.fillStyle=white,patternCtx.fillRect(0,0,boxDimWidth*2,boxDimHeight*2),patternCtx.fillStyle=black,patternCtx.fillRect(0,0,boxDimWidth,boxDimHeight),patternCtx.fillRect(boxDimWidth,
boxDimHeight,boxDimWidth,boxDimHeight),ctx.fillStyle=ctx.createPattern(pattern2,"repeat"),ctx.fillRect(0,0,scaledWidth,scaledHeight),ctx.drawImage(bitmap,0,0,bitmap.width,bitmap.height,0,0,scaledWidth,scaledHeight)}let imageData=null;if(createImageData){let dataWidth,dataHeight;if(outputScale.symmetric&&bitmap.width<maxDataDimension&&bitmap.height<maxDataDimension)dataWidth=bitmap.width,dataHeight=bitmap.height;else if(bitmap=this.#bitmap,bitmapWidth>maxDataDimension||bitmapHeight>maxDataDimension){
const ratio=Math.min(maxDataDimension/bitmapWidth,maxDataDimension/bitmapHeight);dataWidth=Math.floor(bitmapWidth*ratio),dataHeight=Math.floor(bitmapHeight*ratio),this.#isSvg||(bitmap=this.#scaleBitmap(dataWidth,dataHeight))}const offscreenCtx=new OffscreenCanvas(dataWidth,dataHeight).getContext("2d",{willReadFrequently:!0});offscreenCtx.drawImage(bitmap,0,0,bitmap.width,bitmap.height,0,0,dataWidth,dataHeight),imageData={width:dataWidth,height:dataHeight,data:offscreenCtx.getImageData(0,0,dataWidth,
dataHeight).data}}return{canvas,width,height,imageData}}#scaleBitmap(width,height){const{width:bitmapWidth,height:bitmapHeight}=this.#bitmap;let newWidth=bitmapWidth,newHeight=bitmapHeight,bitmap=this.#bitmap;for(;newWidth>2*width||newHeight>2*height;){const prevWidth=newWidth,prevHeight=newHeight;newWidth>2*width&&(newWidth=newWidth>=16384?Math.floor(newWidth/2)-1:Math.ceil(newWidth/2)),newHeight>2*height&&(newHeight=newHeight>=16384?Math.floor(newHeight/2)-1:Math.ceil(newHeight/2));const offscreen=new OffscreenCanvas(
newWidth,newHeight);offscreen.getContext("2d").drawImage(bitmap,0,0,prevWidth,prevHeight,0,0,newWidth,newHeight),bitmap=offscreen.transferToImageBitmap()}return bitmap}#drawBitmap(){const[parentWidth,parentHeight]=this.parentDimensions,{width,height}=this,outputScale=new OutputScale,scaledWidth=Math.ceil(width*parentWidth*outputScale.sx),scaledHeight=Math.ceil(height*parentHeight*outputScale.sy),canvas=this.#canvas;if(!canvas||canvas.width===scaledWidth&&canvas.height===scaledHeight)return;canvas.
width=scaledWidth,canvas.height=scaledHeight;const bitmap=this.#isSvg?this.#bitmap:this.#scaleBitmap(scaledWidth,scaledHeight),ctx=canvas.getContext("2d");ctx.filter=this._uiManager.hcmFilter,ctx.drawImage(bitmap,0,0,bitmap.width,bitmap.height,0,0,scaledWidth,scaledHeight)}#serializeBitmap(toUrl){if(toUrl){if(this.#isSvg){const url2=this._uiManager.imageManager.getSvgUrl(this.#bitmapId);if(url2)return url2}const canvas=document.createElement("canvas");return{width:canvas.width,height:canvas.height}=
this.#bitmap,canvas.getContext("2d").drawImage(this.#bitmap,0,0),canvas.toDataURL()}if(this.#isSvg){const[pageWidth,pageHeight]=this.pageDimensions,width=Math.round(this.width*pageWidth*PixelsPerInch.PDF_TO_CSS_UNITS),height=Math.round(this.height*pageHeight*PixelsPerInch.PDF_TO_CSS_UNITS),offscreen=new OffscreenCanvas(width,height);return offscreen.getContext("2d").drawImage(this.#bitmap,0,0,this.#bitmap.width,this.#bitmap.height,0,0,width,height),offscreen.transferToImageBitmap()}return structuredClone(
this.#bitmap)}static async deserialize(data,parent,uiManager){let initialData=null,missingCanvas=!1;if(data instanceof StampAnnotationElement){const{data:{rect:rect2,rotation,id:id2,structParent,popupRef,contentsObj},container:container2,parent:{page:{pageNumber}},canvas}=data;let bitmapId2,bitmap2;canvas?(delete data.canvas,{id:bitmapId2,bitmap:bitmap2}=uiManager.imageManager.getFromCanvas(container2.id,canvas),canvas.remove()):(missingCanvas=!0,data._hasNoCanvas=!0);const altText=(await parent.
_structTree.getAriaAttributes(`${AnnotationPrefix}${id2}`))?.get("aria-label")||"";initialData=data={annotationType:AnnotationEditorType.STAMP,bitmapId:bitmapId2,bitmap:bitmap2,pageIndex:pageNumber-1,rect:rect2.slice(0),rotation,annotationElementId:id2,id:id2,deleted:!1,accessibilityData:{decorative:!1,altText},isSvg:!1,structParent,popupRef,comment:contentsObj?.str||null}}const editor=await super.deserialize(data,parent,uiManager),{rect,bitmap,bitmapUrl,bitmapId,isSvg,accessibilityData}=data;missingCanvas?
(uiManager.addMissingCanvas(data.id,editor),editor.#missingCanvas=!0):bitmapId&&uiManager.imageManager.isValidId(bitmapId)?(editor.#bitmapId=bitmapId,bitmap&&(editor.#bitmap=bitmap)):editor.#bitmapUrl=bitmapUrl,editor.#isSvg=isSvg;const[parentWidth,parentHeight]=editor.pageDimensions;return editor.width=(rect[2]-rect[0])/parentWidth,editor.height=(rect[3]-rect[1])/parentHeight,accessibilityData&&(editor.altTextData=accessibilityData),editor._initialData=initialData,data.comment&&editor.setCommentData(
data.comment),editor.#hasBeenAddedInUndoStack=!!initialData,editor}serialize(isForCopying=!1,context=null){if(this.isEmpty())return null;if(this.deleted)return this.serializeDeleted();const serialized={annotationType:AnnotationEditorType.STAMP,bitmapId:this.#bitmapId,pageIndex:this.pageIndex,rect:this.getRect(0,0),rotation:this.rotation,isSvg:this.#isSvg,structTreeParentId:this._structTreeParentId};if(this.addComment(serialized),isForCopying)return serialized.bitmapUrl=this.#serializeBitmap(!0),
serialized.accessibilityData=this.serializeAltText(!0),serialized.isCopy=!0,serialized;const{decorative,altText}=this.serializeAltText(!1);if(!decorative&&altText&&(serialized.accessibilityData={type:"Figure",alt:altText}),this.annotationElementId){const changes=this.#hasElementChanged(serialized);if(changes.isSame)return null;changes.isSameAltText?delete serialized.accessibilityData:serialized.accessibilityData.structParent=this._initialData.structParent??-1}if(serialized.id=this.annotationElementId,
context===null)return serialized;context.stamps||=new Map;const area=this.#isSvg?(serialized.rect[2]-serialized.rect[0])*(serialized.rect[3]-serialized.rect[1]):null;if(!context.stamps.has(this.#bitmapId))context.stamps.set(this.#bitmapId,{area,serialized}),serialized.bitmap=this.#serializeBitmap(!1);else if(this.#isSvg){const prevData=context.stamps.get(this.#bitmapId);area>prevData.area&&(prevData.area=area,prevData.serialized.bitmap.close(),prevData.serialized.bitmap=this.#serializeBitmap(!1))}
return serialized}#hasElementChanged(serialized){const{pageIndex,accessibilityData:{altText}}=this._initialData,isSamePageIndex=serialized.pageIndex===pageIndex,isSameAltText=(serialized.accessibilityData?.alt||"")===altText;return{isSame:!this.hasEditedComment&&!this._hasBeenMoved&&!this._hasBeenResized&&isSamePageIndex&&isSameAltText,isSameAltText}}renderAnnotationElement(annotation){const params={rect:this.getRect(0,0)};return this.hasEditedComment&&(params.popup=this.comment),annotation.updateEdited(
params),null}}class AnnotationEditorLayer{#accessibilityManager;#allowClick=!1;#annotationLayer=null;#clickAC=null;#editorFocusTimeoutId=null;#editors=new Map;#hadPointerDown=!1;#isDisabling=!1;#isEnabling=!1;#drawingAC=null;#focusedElement=null;#textLayer=null;#textSelectionAC=null;#textLayerDblClickAC=null;#lastPointerDownTimestamp=-1;#uiManager;static _initialized=!1;static#editorTypes=new Map([FreeTextEditor,InkEditor,StampEditor,HighlightEditor,SignatureEditor].map(type2=>[type2._editorType,
type2]));constructor({uiManager,pageIndex,div,structTreeLayer,accessibilityManager,annotationLayer,drawLayer,textLayer,viewport,l10n}){const editorTypes=[...AnnotationEditorLayer.#editorTypes.values()];if(!AnnotationEditorLayer._initialized){AnnotationEditorLayer._initialized=!0;for(const editorType of editorTypes)editorType.initialize(l10n,uiManager)}uiManager.registerEditorTypes(editorTypes),this.#uiManager=uiManager,this.pageIndex=pageIndex,this.div=div,this.#accessibilityManager=accessibilityManager,
this.#annotationLayer=annotationLayer,this.viewport=viewport,this.#textLayer=textLayer,this.drawLayer=drawLayer,this._structTree=structTreeLayer,this.#uiManager.addLayer(this)}get isEmpty(){return this.#editors.size===0}get isInvisible(){return this.isEmpty&&this.#uiManager.getMode()===AnnotationEditorType.NONE}updateToolbar(options){this.#uiManager.updateToolbar(options)}updateMode(mode=this.#uiManager.getMode()){switch(this.#cleanup(),mode){case AnnotationEditorType.NONE:this.disableTextSelection(),
this.togglePointerEvents(!1),this.toggleAnnotationLayerPointerEvents(!0),this.disableClick();return;case AnnotationEditorType.INK:this.disableTextSelection(),this.togglePointerEvents(!0),this.enableClick();break;case AnnotationEditorType.HIGHLIGHT:this.enableTextSelection(),this.togglePointerEvents(!1),this.disableClick();break;default:this.disableTextSelection(),this.togglePointerEvents(!0),this.enableClick()}this.toggleAnnotationLayerPointerEvents(!1);const{classList}=this.div;for(const editorType of AnnotationEditorLayer.#editorTypes.
values())classList.toggle(`${editorType._type}Editing`,mode===editorType._editorType);this.div.hidden=!1}hasTextLayer(textLayer){return textLayer===this.#textLayer?.div}setEditingState(isEditing2){this.#uiManager.setEditingState(isEditing2)}addCommands(params){this.#uiManager.addCommands(params)}cleanUndoStack(type2){this.#uiManager.cleanUndoStack(type2)}toggleDrawing(enabled=!1){this.div.classList.toggle("drawing",!enabled)}togglePointerEvents(enabled=!1){this.div.classList.toggle("disabled",!enabled)}toggleAnnotationLayerPointerEvents(enabled=!1){
this.#annotationLayer?.div.classList.toggle("disabled",!enabled)}async enable(){this.#isEnabling=!0,this.div.tabIndex=0,this.togglePointerEvents(!0),this.#textLayerDblClickAC?.abort(),this.#textLayerDblClickAC=null;const annotationElementIds=new Set;for(const editor of this.#editors.values())editor.enableEditing(),editor.show(!0),editor.annotationElementId&&(this.#uiManager.removeChangedExistingAnnotation(editor),annotationElementIds.add(editor.annotationElementId));if(!this.#annotationLayer){this.#isEnabling=
!1;return}const editables=this.#annotationLayer.getEditableAnnotations();for(const editable of editables){if(editable.hide(),this.#uiManager.isDeletedAnnotationElement(editable.data.id)||annotationElementIds.has(editable.data.id))continue;const editor=await this.deserialize(editable);editor&&(this.addOrRebuild(editor),editor.enableEditing())}this.#isEnabling=!1}disable(){if(this.#isDisabling=!0,this.div.tabIndex=-1,this.togglePointerEvents(!1),this.#textLayer&&!this.#textLayerDblClickAC){this.#textLayerDblClickAC=
new AbortController;const signal=this.#uiManager.combinedSignal(this.#textLayerDblClickAC);this.#textLayer.div.addEventListener("pointerdown",e=>{const{clientX,clientY,timeStamp}=e,lastPointerDownTimestamp=this.#lastPointerDownTimestamp;if(timeStamp-lastPointerDownTimestamp>500){this.#lastPointerDownTimestamp=timeStamp;return}this.#lastPointerDownTimestamp=-1;const{classList:classList2}=this.div;classList2.toggle("getElements",!0);const elements=document.elementsFromPoint(clientX,clientY);if(classList2.
toggle("getElements",!1),!this.div.contains(elements[0]))return;let id2;const regex=new RegExp(`^${AnnotationEditorPrefix}[0-9]+$`);for(const element2 of elements)if(regex.test(element2.id)){id2=element2.id;break}if(!id2)return;const editor=this.#editors.get(id2);editor?.annotationElementId===null&&(e.stopPropagation(),e.preventDefault(),editor.dblclick())},{signal,capture:!0})}const changedAnnotations=new Map,resetAnnotations=new Map;for(const editor of this.#editors.values())if(editor.disableEditing(),
!!editor.annotationElementId){if(editor.serialize()!==null){changedAnnotations.set(editor.annotationElementId,editor);continue}else resetAnnotations.set(editor.annotationElementId,editor);this.getEditableAnnotation(editor.annotationElementId)?.show(),editor.remove()}if(this.#annotationLayer){const editables=this.#annotationLayer.getEditableAnnotations();for(const editable of editables){const{id:id2}=editable.data;if(this.#uiManager.isDeletedAnnotationElement(id2)){editable.updateEdited({deleted:!0});
continue}let editor=resetAnnotations.get(id2);if(editor){editor.resetAnnotationElement(editable),editor.show(!1),editable.show();continue}editor=changedAnnotations.get(id2),editor&&(this.#uiManager.addChangedExistingAnnotation(editor),editor.renderAnnotationElement(editable)&&editor.show(!1)),editable.show()}}this.#cleanup(),this.isEmpty&&(this.div.hidden=!0);const{classList}=this.div;for(const editorType of AnnotationEditorLayer.#editorTypes.values())classList.remove(`${editorType._type}Editing`);
this.disableTextSelection(),this.toggleAnnotationLayerPointerEvents(!0),this.#isDisabling=!1}getEditableAnnotation(id2){return this.#annotationLayer?.getEditableAnnotation(id2)||null}setActiveEditor(editor){this.#uiManager.getActive()!==editor&&this.#uiManager.setActiveEditor(editor)}enableTextSelection(){if(this.div.tabIndex=-1,this.#textLayer?.div&&!this.#textSelectionAC){this.#textSelectionAC=new AbortController;const signal=this.#uiManager.combinedSignal(this.#textSelectionAC);this.#textLayer.
div.addEventListener("pointerdown",this.#textLayerPointerDown.bind(this),{signal}),this.#textLayer.div.classList.add("highlighting")}}disableTextSelection(){this.div.tabIndex=0,this.#textLayer?.div&&this.#textSelectionAC&&(this.#textSelectionAC.abort(),this.#textSelectionAC=null,this.#textLayer.div.classList.remove("highlighting"))}#textLayerPointerDown(event2){this.#uiManager.unselectAll();const{target:target2}=event2;if(target2===this.#textLayer.div||(target2.getAttribute("role")==="img"||target2.
classList.contains("endOfContent"))&&this.#textLayer.div.contains(target2)){const{isMac}=util_FeatureTest.platform;if(event2.button!==0||event2.ctrlKey&&isMac)return;this.#uiManager.showAllEditors("highlight",!0,!0),this.#textLayer.div.classList.add("free"),this.toggleDrawing(),HighlightEditor.startHighlighting(this,this.#uiManager.direction==="ltr",{target:this.#textLayer.div,x:event2.x,y:event2.y}),this.#textLayer.div.addEventListener("pointerup",()=>{this.#textLayer.div.classList.remove("free"),
this.toggleDrawing(!0)},{once:!0,signal:this.#uiManager._signal}),event2.preventDefault()}}enableClick(){if(this.#clickAC)return;this.#clickAC=new AbortController;const signal=this.#uiManager.combinedSignal(this.#clickAC);this.div.addEventListener("pointerdown",this.pointerdown.bind(this),{signal});const pointerup=this.pointerup.bind(this);this.div.addEventListener("pointerup",pointerup,{signal}),this.div.addEventListener("pointercancel",pointerup,{signal})}disableClick(){this.#clickAC?.abort(),
this.#clickAC=null}attach(editor){this.#editors.set(editor.id,editor);const{annotationElementId}=editor;annotationElementId&&this.#uiManager.isDeletedAnnotationElement(annotationElementId)&&this.#uiManager.removeDeletedAnnotationElement(editor)}detach(editor){this.#editors.delete(editor.id),this.#accessibilityManager?.removePointerInTextLayer(editor.contentDiv),!this.#isDisabling&&editor.annotationElementId&&this.#uiManager.addDeletedAnnotationElement(editor)}remove(editor){this.detach(editor),this.#uiManager.
removeEditor(editor),editor.div.remove(),editor.isAttachedToDOM=!1}changeParent(editor){editor.parent!==this&&(editor.parent&&editor.annotationElementId&&(this.#uiManager.addDeletedAnnotationElement(editor.annotationElementId),AnnotationEditor.deleteAnnotationElement(editor),editor.annotationElementId=null),this.attach(editor),editor.parent?.detach(editor),editor.setParent(this),editor.div&&editor.isAttachedToDOM&&(editor.div.remove(),this.div.append(editor.div)))}add(editor){if(!(editor.parent===
this&&editor.isAttachedToDOM)){if(this.changeParent(editor),this.#uiManager.addEditor(editor),this.attach(editor),!editor.isAttachedToDOM){const div=editor.render();this.div.append(div),editor.isAttachedToDOM=!0}editor.fixAndSetPosition(),editor.onceAdded(!this.#isEnabling),this.#uiManager.addToAnnotationStorage(editor),editor._reportTelemetry(editor.telemetryInitialData)}}moveEditorInDOM(editor){if(!editor.isAttachedToDOM)return;const{activeElement}=document;editor.div.contains(activeElement)&&
!this.#editorFocusTimeoutId&&(editor._focusEventsAllowed=!1,this.#editorFocusTimeoutId=setTimeout(()=>{this.#editorFocusTimeoutId=null,editor.div.contains(document.activeElement)?editor._focusEventsAllowed=!0:(editor.div.addEventListener("focusin",()=>{editor._focusEventsAllowed=!0},{once:!0,signal:this.#uiManager._signal}),activeElement.focus())},0)),editor._structTreeParentId=this.#accessibilityManager?.moveElementInDOM(this.div,editor.div,editor.contentDiv,!0)}addOrRebuild(editor){editor.needsToBeRebuilt()?
(editor.parent||=this,editor.rebuild(),editor.show()):this.add(editor)}addUndoableEditor(editor){const cmd=()=>editor._uiManager.rebuild(editor),undo=()=>{editor.remove()};this.addCommands({cmd,undo,mustExec:!1})}getNextId(){return this.#uiManager.getId()}get#currentEditorType(){return AnnotationEditorLayer.#editorTypes.get(this.#uiManager.getMode())}combinedSignal(ac){return this.#uiManager.combinedSignal(ac)}#createNewEditor(params){const editorType=this.#currentEditorType;return editorType?new editorType.
prototype.constructor(params):null}canCreateNewEmptyEditor(){return this.#currentEditorType?.canCreateNewEmptyEditor()}async pasteEditor(options,params){this.updateToolbar(options),await this.#uiManager.updateMode(options.mode);const{offsetX,offsetY}=this.#getCenterPoint(),id2=this.getNextId(),editor=this.#createNewEditor({parent:this,id:id2,x:offsetX,y:offsetY,uiManager:this.#uiManager,isCentered:!0,...params});editor&&this.add(editor)}async deserialize(data){return await AnnotationEditorLayer.#editorTypes.
get(data.annotationType??data.annotationEditorType)?.deserialize(data,this,this.#uiManager)||null}createAndAddNewEditor(event2,isCentered,data={}){const id2=this.getNextId(),editor=this.#createNewEditor({parent:this,id:id2,x:event2.offsetX,y:event2.offsetY,uiManager:this.#uiManager,isCentered,...data});return editor&&this.add(editor),editor}#getCenterPoint(){const{x,y,width,height}=this.div.getBoundingClientRect(),tlX=Math.max(0,x),tlY=Math.max(0,y),brX=Math.min(window.innerWidth,x+width),brY=Math.
min(window.innerHeight,y+height),centerX=(tlX+brX)/2-x,centerY=(tlY+brY)/2-y,[offsetX,offsetY]=this.viewport.rotation%180===0?[centerX,centerY]:[centerY,centerX];return{offsetX,offsetY}}addNewEditor(data={}){this.createAndAddNewEditor(this.#getCenterPoint(),!0,data)}setSelected(editor){this.#uiManager.setSelected(editor)}toggleSelected(editor){this.#uiManager.toggleSelected(editor)}unselect(editor){this.#uiManager.unselect(editor)}pointerup(event2){const{isMac}=util_FeatureTest.platform;if(event2.
button!==0||event2.ctrlKey&&isMac||event2.target!==this.div||!this.#hadPointerDown||(this.#hadPointerDown=!1,this.#currentEditorType?.isDrawer&&this.#currentEditorType.supportMultipleDrawings))return;if(!this.#allowClick){this.#allowClick=!0;return}const currentMode=this.#uiManager.getMode();if(currentMode===AnnotationEditorType.STAMP||currentMode===AnnotationEditorType.SIGNATURE){this.#uiManager.unselectAll();return}this.createAndAddNewEditor(event2,!1)}pointerdown(event2){if(this.#uiManager.getMode()===
AnnotationEditorType.HIGHLIGHT&&this.enableTextSelection(),this.#hadPointerDown){this.#hadPointerDown=!1;return}const{isMac}=util_FeatureTest.platform;if(event2.button!==0||event2.ctrlKey&&isMac||event2.target!==this.div)return;if(this.#hadPointerDown=!0,this.#currentEditorType?.isDrawer){this.startDrawingSession(event2);return}const editor=this.#uiManager.getActive();this.#allowClick=!editor||editor.isEmpty()}startDrawingSession(event2){if(this.div.focus({preventScroll:!0}),this.#drawingAC){this.#currentEditorType.
startDrawing(this,this.#uiManager,!1,event2);return}this.#uiManager.setCurrentDrawingSession(this),this.#drawingAC=new AbortController;const signal=this.#uiManager.combinedSignal(this.#drawingAC);this.div.addEventListener("blur",({relatedTarget})=>{relatedTarget&&!this.div.contains(relatedTarget)&&(this.#focusedElement=null,this.commitOrRemove())},{signal}),this.#currentEditorType.startDrawing(this,this.#uiManager,!1,event2)}pause(on2){if(on2){const{activeElement}=document;this.div.contains(activeElement)&&
(this.#focusedElement=activeElement);return}this.#focusedElement&&setTimeout(()=>{this.#focusedElement?.focus(),this.#focusedElement=null},0)}endDrawingSession(isAborted=!1){return this.#drawingAC?(this.#uiManager.setCurrentDrawingSession(null),this.#drawingAC.abort(),this.#drawingAC=null,this.#focusedElement=null,this.#currentEditorType.endDrawing(isAborted)):null}findNewParent(editor,x,y){const layer=this.#uiManager.findParent(x,y);return layer===null||layer===this?!1:(layer.changeParent(editor),
!0)}commitOrRemove(){return this.#drawingAC?(this.endDrawingSession(),!0):!1}onScaleChanging(){this.#drawingAC&&this.#currentEditorType.onScaleChangingWhenDrawing(this)}destroy(){this.commitOrRemove(),this.#uiManager.getActive()?.parent===this&&(this.#uiManager.commitOrRemove(),this.#uiManager.setActiveEditor(null)),this.#editorFocusTimeoutId&&(clearTimeout(this.#editorFocusTimeoutId),this.#editorFocusTimeoutId=null);for(const editor of this.#editors.values())this.#accessibilityManager?.removePointerInTextLayer(
editor.contentDiv),editor.setParent(null),editor.isAttachedToDOM=!1,editor.div.remove();this.div=null,this.#editors.clear(),this.#uiManager.removeLayer(this)}#cleanup(){for(const editor of this.#editors.values())editor.isEmpty()&&editor.remove()}render({viewport}){this.viewport=viewport,setLayerDimensions(this.div,viewport);for(const editor of this.#uiManager.getEditors(this.pageIndex))this.add(editor),editor.rebuild();this.updateMode()}update({viewport}){this.#uiManager.commitOrRemove(),this.#cleanup();
const oldRotation=this.viewport.rotation,rotation=viewport.rotation;if(this.viewport=viewport,setLayerDimensions(this.div,{rotation}),oldRotation!==rotation)for(const editor of this.#editors.values())editor.rotate(rotation)}get pageDimensions(){const{pageWidth,pageHeight}=this.viewport.rawDims;return[pageWidth,pageHeight]}get scale(){return this.#uiManager.viewParameters.realScale}}class DrawLayer{#parent=null;#mapping=new Map;#toUpdate=new Map;static#id=0;constructor({pageIndex}){this.pageIndex=
pageIndex}setParent(parent){if(!this.#parent){this.#parent=parent;return}if(this.#parent!==parent){if(this.#mapping.size>0)for(const root2 of this.#mapping.values())root2.remove(),parent.append(root2);this.#parent=parent}}static get _svgFactory(){return shadow(this,"_svgFactory",new DOMSVGFactory)}static#setBox(element2,[x,y,width,height]){const{style:style2}=element2;style2.top=`${100*y}%`,style2.left=`${100*x}%`,style2.width=`${100*width}%`,style2.height=`${100*height}%`}#createSVG(){const svg2=DrawLayer.
_svgFactory.create(1,1,!0);return this.#parent.append(svg2),svg2.setAttribute("aria-hidden",!0),svg2}#createClipPath(defs,pathId){const clipPath=DrawLayer._svgFactory.createElement("clipPath");defs.append(clipPath);const clipPathId=`clip_${pathId}`;clipPath.setAttribute("id",clipPathId),clipPath.setAttribute("clipPathUnits","objectBoundingBox");const clipPathUse=DrawLayer._svgFactory.createElement("use");return clipPath.append(clipPathUse),clipPathUse.setAttribute("href",`#${pathId}`),clipPathUse.
classList.add("clip"),clipPathId}#updateProperties(element2,properties2){for(const[key2,value]of Object.entries(properties2))value===null?element2.removeAttribute(key2):element2.setAttribute(key2,value)}draw(properties2,isPathUpdatable=!1,hasClip=!1){const id2=DrawLayer.#id++,root2=this.#createSVG(),defs=DrawLayer._svgFactory.createElement("defs");root2.append(defs);const path2=DrawLayer._svgFactory.createElement("path");defs.append(path2);const pathId=`path_p${this.pageIndex}_${id2}`;path2.setAttribute(
"id",pathId),path2.setAttribute("vector-effect","non-scaling-stroke"),isPathUpdatable&&this.#toUpdate.set(id2,path2);const clipPathId=hasClip?this.#createClipPath(defs,pathId):null,use=DrawLayer._svgFactory.createElement("use");return root2.append(use),use.setAttribute("href",`#${pathId}`),this.updateProperties(root2,properties2),this.#mapping.set(id2,root2),{id:id2,clipPathId:`url(#${clipPathId})`}}drawOutline(properties2,mustRemoveSelfIntersections){const id2=DrawLayer.#id++,root2=this.#createSVG(),
defs=DrawLayer._svgFactory.createElement("defs");root2.append(defs);const path2=DrawLayer._svgFactory.createElement("path");defs.append(path2);const pathId=`path_p${this.pageIndex}_${id2}`;path2.setAttribute("id",pathId),path2.setAttribute("vector-effect","non-scaling-stroke");let maskId;if(mustRemoveSelfIntersections){const mask=DrawLayer._svgFactory.createElement("mask");defs.append(mask),maskId=`mask_p${this.pageIndex}_${id2}`,mask.setAttribute("id",maskId),mask.setAttribute("maskUnits","obje\
ctBoundingBox");const rect=DrawLayer._svgFactory.createElement("rect");mask.append(rect),rect.setAttribute("width","1"),rect.setAttribute("height","1"),rect.setAttribute("fill","white");const use=DrawLayer._svgFactory.createElement("use");mask.append(use),use.setAttribute("href",`#${pathId}`),use.setAttribute("stroke","none"),use.setAttribute("fill","black"),use.setAttribute("fill-rule","nonzero"),use.classList.add("mask")}const use1=DrawLayer._svgFactory.createElement("use");root2.append(use1),
use1.setAttribute("href",`#${pathId}`),maskId&&use1.setAttribute("mask",`url(#${maskId})`);const use2=use1.cloneNode();return root2.append(use2),use1.classList.add("mainOutline"),use2.classList.add("secondaryOutline"),this.updateProperties(root2,properties2),this.#mapping.set(id2,root2),id2}finalizeDraw(id2,properties2){this.#toUpdate.delete(id2),this.updateProperties(id2,properties2)}updateProperties(elementOrId,properties2){if(!properties2)return;const{root:root2,bbox,rootClass,path:path2}=properties2,
element2=typeof elementOrId=="number"?this.#mapping.get(elementOrId):elementOrId;if(element2){if(root2&&this.#updateProperties(element2,root2),bbox&&DrawLayer.#setBox(element2,bbox),rootClass){const{classList}=element2;for(const[className,value]of Object.entries(rootClass))classList.toggle(className,value)}if(path2){const pathElement=element2.firstChild.firstChild;this.#updateProperties(pathElement,path2)}}}updateParent(id2,layer){if(layer===this)return;const root2=this.#mapping.get(id2);root2&&
(layer.#parent.append(root2),this.#mapping.delete(id2),layer.#mapping.set(id2,root2))}remove(id2){this.#toUpdate.delete(id2),this.#parent!==null&&(this.#mapping.get(id2).remove(),this.#mapping.delete(id2))}destroy(){this.#parent=null;for(const root2 of this.#mapping.values())root2.remove();this.#mapping.clear(),this.#toUpdate.clear()}}globalThis._pdfjsTestingUtils={HighlightOutliner};globalThis.pdfjsLib={AbortException,AnnotationEditorLayer,AnnotationEditorParamsType,AnnotationEditorType,AnnotationEditorUIManager,
AnnotationLayer,AnnotationMode,AnnotationType,build,ColorPicker,createValidAbsoluteUrl,DOMSVGFactory,DrawLayer,FeatureTest:util_FeatureTest,fetchData,getDocument,getFilenameFromUrl,getPdfFilenameFromUrl,getRGB,getUuid,getXfaPageViewport,GlobalWorkerOptions,ImageKind:util_ImageKind,InvalidPDFException,isDataScheme,isPdfFile,isValidExplicitDest,MathClamp,noContextMenu,normalizeUnicode,OPS,OutputScale,PasswordResponses,PDFDataRangeTransport,PDFDateString,PDFWorker,PermissionFlag,PixelsPerInch,RenderingCancelledException,
ResponseException,setLayerDimensions,shadow,SignatureExtractor,stopEvent,SupportedImageMimeTypes,TextLayer,TouchManager,updateUrlHash,Util,VerbosityLevel,version:version$1,XfaLayer};__vitePreload(()=>Promise.resolve().then(()=>pdf_worker_min$1),[],import.meta.url).then(workerModule=>{const workerBlob=new Blob([workerModule.default],{type:"application/javascript"});GlobalWorkerOptions.workerSrc=URL.createObjectURL(workerBlob)}).catch(()=>{console.warn("Failed to load PDF.js worker, \
PDF processing may not work")});async function getFileAsBuffer(file){return new Promise((resolve2,reject)=>{const reader=new FileReader;reader.onload=event2=>{event2.target?.result?resolve2(event2.target.result):reject(new Error("Failed to read file."))},reader.onerror=()=>{reject(new Error("Failed to read file."))},reader.readAsArrayBuffer(file)})}async function convertPDFToText(file){try{const buffer=await getFileAsBuffer(file),pdf=await getDocument(buffer).promise,numPages=pdf.numPages,textContentPromises=[];
for(let i=1;i<=numPages;i++)textContentPromises.push(pdf.getPage(i).then(page2=>page2.getTextContent()));return(await Promise.all(textContentPromises)).flatMap(textContent=>textContent.items.map(item=>item.str??"")).join(`
`)}catch(error2){throw console.error("Error converting PDF to text:",error2),new Error(`Failed to convert PDF to text: ${error2 instanceof Error?error2.message:"Unknown error"}`)}}async function convertPDFToImage(file,scale2=1.5){try{const buffer=await getFileAsBuffer(file),doc=await getDocument(buffer).promise,pages=[];for(let i=1;i<=doc.numPages;i++){const page2=await doc.getPage(i),viewport=page2.getViewport({scale:scale2}),canvas=document.createElement("canvas"),ctx=canvas.getContext("2d");if(canvas.
width=viewport.width,canvas.height=viewport.height,!ctx)throw new Error("Failed to get 2D context from canvas");const task=page2.render({canvasContext:ctx,viewport,canvas});pages.push(task.promise.then(()=>canvas.toDataURL(MimeTypeImage.PNG)))}return await Promise.all(pages)}catch(error2){throw console.error("Error converting PDF to images:",error2),new Error(`Failed to convert PDF to images: ${error2 instanceof Error?error2.message:"Unknown error"}`)}}function svgBase64UrlToPngDataURL(base64UrlSvg,backgroundColor="\
white"){return new Promise((resolve2,reject)=>{try{const img=new Image;img.onload=()=>{const canvas=document.createElement("canvas"),ctx=canvas.getContext("2d");if(!ctx){reject(new Error("Failed to get 2D canvas context."));return}const targetWidth=img.naturalWidth||300,targetHeight=img.naturalHeight||300;canvas.width=targetWidth,canvas.height=targetHeight,backgroundColor&&(ctx.fillStyle=backgroundColor,ctx.fillRect(0,0,canvas.width,canvas.height)),ctx.drawImage(img,0,0,targetWidth,targetHeight),
resolve2(canvas.toDataURL(MimeTypeImage.PNG))},img.onerror=()=>{reject(new Error("Failed to load SVG image. Ensure the SVG data is valid."))},img.src=base64UrlSvg}catch(error2){const errorMessage=`Error converting SVG to PNG: ${error2 instanceof Error?error2.message:String(error2)}`;console.error(errorMessage,error2),reject(new Error(errorMessage))}})}function isSvgMimeType(mimeType){return mimeType===MimeTypeImage.SVG}function webpBase64UrlToPngDataURL(base64UrlWebp,backgroundColor="white"){return new Promise(
(resolve2,reject)=>{try{const img=new Image;img.onload=()=>{const canvas=document.createElement("canvas"),ctx=canvas.getContext("2d");if(!ctx){reject(new Error("Failed to get 2D canvas context."));return}const targetWidth=img.naturalWidth||300,targetHeight=img.naturalHeight||300;canvas.width=targetWidth,canvas.height=targetHeight,backgroundColor&&(ctx.fillStyle=backgroundColor,ctx.fillRect(0,0,canvas.width,canvas.height)),ctx.drawImage(img,0,0,targetWidth,targetHeight),resolve2(canvas.toDataURL(
MimeTypeImage.PNG))},img.onerror=()=>{reject(new Error("Failed to load WebP image. Ensure the WebP data is valid."))},img.src=base64UrlWebp}catch(error2){const errorMessage=`Error converting WebP to PNG: ${error2 instanceof Error?error2.message:String(error2)}`;console.error(errorMessage,error2),reject(new Error(errorMessage))}})}function isWebpMimeType(mimeType){return mimeType===MimeTypeImage.WEBP}function readFileAsBase64(file){return new Promise((resolve2,reject)=>{const reader=new FileReader;
reader.onload=()=>{const base642=reader.result.split(",")[1];resolve2(base642)},reader.onerror=()=>reject(reader.error),reader.readAsDataURL(file)})}async function parseFilesToMessageExtras(files,activeModelId){const extras=[],emptyFiles=[];for(const file of files){if(file.type===SpecialFileType.MCP_PROMPT&&file.mcpPrompt){extras.push({type:AttachmentType.MCP_PROMPT,name:file.name,size:file.size,serverName:file.mcpPrompt.serverName,promptName:file.mcpPrompt.promptName,content:file.textContent??"",
arguments:file.mcpPrompt.arguments});continue}if(getFileTypeCategory(file.type)===FileTypeCategory.IMAGE){if(file.preview){let base64Url=file.preview;if(isSvgMimeType(file.type))try{base64Url=await svgBase64UrlToPngDataURL(base64Url)}catch(error2){console.error("Failed to convert SVG to PNG for database storage:",error2)}else if(isWebpMimeType(file.type))try{base64Url=await webpBase64UrlToPngDataURL(base64Url)}catch(error2){console.error("Failed to convert WebP to PNG for database storage:",error2)}
extras.push({type:AttachmentType.IMAGE,name:file.name,size:file.size,base64Url})}}else if(getFileTypeCategory(file.type)===FileTypeCategory.AUDIO)try{const base64Data=await readFileAsBase64(file.file);extras.push({type:AttachmentType.AUDIO,name:file.name,size:file.size,base64Data,mimeType:file.type})}catch(error2){console.error(`Failed to process audio file ${file.name}:`,error2)}else if(getFileTypeCategory(file.type)===FileTypeCategory.PDF)try{const base64Data=await readFileAsBase64(file.file),
currentConfig=config$1(),hasVisionSupport=activeModelId?modelsStore.modelSupportsVision(activeModelId):!1;let shouldProcessAsImages=!!currentConfig.pdfAsImage&&hasVisionSupport;if(currentConfig.pdfAsImage&&!hasVisionSupport&&(console.log("Non-vision model detected: forcing PDF-to-text mode and updating settings"),settingsStore.updateConfig(SETTINGS_KEYS.PDF_AS_IMAGE,!1),toast.warning("PDF setting changed: Non-vision model detected, PDFs will be processed as text instead of images.",{duration:5e3}),
shouldProcessAsImages=!1),shouldProcessAsImages)try{const images=await convertPDFToImage(file.file);toast.success(`PDF "${file.name}" processed as ${images.length} images for vision model.`,{duration:3e3}),extras.push({type:AttachmentType.PDF,name:file.name,size:file.size,content:`PDF file with ${images.length} pages`,images,processedAsImages:!0,base64Data})}catch(imageError){console.warn(`Failed to process PDF ${file.name} as images, falling back to text:`,imageError);const content2=await convertPDFToText(
file.file);extras.push({type:AttachmentType.PDF,name:file.name,size:file.size,content:content2,processedAsImages:!1,base64Data})}else{const content2=await convertPDFToText(file.file);toast.success(`PDF "${file.name}" processed as text content.`,{duration:3e3}),extras.push({type:AttachmentType.PDF,name:file.name,size:file.size,content:content2,processedAsImages:!1,base64Data})}}catch(error2){console.error(`Failed to process PDF file ${file.name}:`,error2)}else try{const content2=await readFileAsText(
file.file);content2.trim()===""?(console.warn(`File ${file.name} is empty and will be skipped`),emptyFiles.push(file.name)):isLikelyTextFile(content2)?extras.push({type:AttachmentType.TEXT,name:file.name,size:file.size,content:content2}):console.warn(`File ${file.name} appears to be binary and will be skipped`)}catch(error2){console.error(`Failed to read file ${file.name}:`,error2)}}return{extras,emptyFiles}}function readFileAsDataURL(file){return new Promise((resolve2,reject)=>{const reader=new FileReader;
reader.onload=()=>resolve2(reader.result),reader.onerror=()=>reject(reader.error),reader.readAsDataURL(file)})}function readFileAsUTF8(file){return new Promise((resolve2,reject)=>{const reader=new FileReader;reader.onload=()=>resolve2(reader.result),reader.onerror=()=>reject(reader.error),reader.readAsText(file)})}async function processFilesToChatUploaded(files,activeModelId){const results=[];for(const file of files){const base2={id:Date.now().toString()+Math.random().toString(36).substr(2,9),name:file.
name,size:file.size,type:file.type,file};try{if(getFileTypeCategory(file.type)===FileTypeCategory.IMAGE){let preview=await readFileAsDataURL(file);if(isSvgMimeType(file.type))try{preview=await svgBase64UrlToPngDataURL(preview)}catch(err){console.error("Failed to convert SVG to PNG:",err)}else if(isWebpMimeType(file.type))try{preview=await webpBase64UrlToPngDataURL(preview)}catch(err){console.error("Failed to convert WebP to PNG:",err)}results.push({...base2,preview})}else if(getFileTypeCategory(
file.type)===FileTypeCategory.PDF){try{const textContent=await convertPDFToText(file);results.push({...base2,textContent})}catch(err){console.warn("Failed to extract text from PDF, adding without content:",err),results.push(base2)}const hasVisionSupport=activeModelId?modelsStore.modelSupportsVision(activeModelId):!1,currentConfig=settingsStore.config;hasVisionSupport&&!currentConfig.pdfAsImage&&toast.info("You can enable parsing PDF as images with vision models.",{duration:8e3,action:{label:"Ena\
ble PDF as Images",onClick:()=>{settingsStore.updateConfig(SETTINGS_KEYS.PDF_AS_IMAGE,!0),toast.success("PDF parsing as images enabled!",{duration:3e3})}}})}else if(getFileTypeCategory(file.type)===FileTypeCategory.AUDIO){const preview=await readFileAsDataURL(file);results.push({...base2,preview})}else try{const textContent=await readFileAsUTF8(file);results.push({...base2,textContent})}catch(err){console.warn("Failed to read file as text, adding without content:",err),results.push(base2)}}catch(error2){
console.error("Error processing file",file.name,error2),results.push(base2)}}return results}var root_1$T=from_html("<!> Text",1),root_3$T=from_html('<div class="mr-1 h-4 w-4 animate-spin rounded-full border-2 border-current border-t-transparent"></div>'),root_2$14=from_html("<!> Pages",1),root_8$s=from_html('<span class="inline-flex">The selected model does not support vision. Only the extracted  <span class="mx-1 cursor-pointer underline">text</span> will be sent to the model.</span>'),root_6$t=from_html(
"<!> <!> <!>",1),root_9$l=from_html('<div class="flex flex-1 items-center justify-center p-8"><div class="text-center"><div class="mx-auto mb-4 h-8 w-8 animate-spin rounded-full border-4 border-white border-t-transparent"></div> <p class="text-white/70">Converting PDF to images...</p></div></div>'),root_10$g=from_html('<div class="flex flex-1 items-center justify-center p-8"><div class="text-center"><!> <p class="mb-4 text-white/70">Failed to load PDF images</p> <p class="text-sm text-white/50">\
 </p></div></div>'),root_12$a=from_html('<p class="mb-2 text-sm text-white/50"> </p> <img class="mx-auto max-w-[85vw] rounded-lg shadow-lg"/> <div class="h-4"></div>',1),root_13$e=from_html('<div class="flex flex-1 items-center justify-center p-8"><div class="text-center"><!> <p class="text-white/70">No PDF pages available</p></div></div>'),root_14$6=from_html('<div class="px-4 pb-4"><!></div>'),root$1x=from_html('<div class="mb-4 flex items-center justify-end gap-2"><!> <!></div> <!> <!> <!>',1);
function ChatAttachmentsPreviewCurrentItemPdf($$anchor,$$props){push$1($$props,!0);let pdfViewMode=state$1(proxy(PdfViewMode.PAGES)),pdfImages=state$1(proxy([])),pdfImagesLoading=state$1(!1),pdfImagesError=state$1(null),language2=user_derived(()=>getLanguageFromFilename($$props.displayName));async function loadPdfImages(){if(!(get$3(pdfImages).length>0||get$3(pdfImagesLoading)||!$$props.currentItem)){set$1(pdfImagesLoading,!0),set$1(pdfImagesError,null);try{let file=null;if($$props.currentItem.uploadedFile?.
file)file=$$props.currentItem.uploadedFile.file;else if($$props.currentItem.attachment){if("images"in $$props.currentItem.attachment&&$$props.currentItem.attachment.images&&Array.isArray($$props.currentItem.attachment.images)&&$$props.currentItem.attachment.images.length>0){set$1(pdfImages,$$props.currentItem.attachment.images,!0);return}if("base64Data"in $$props.currentItem.attachment&&$$props.currentItem.attachment.base64Data){const base64Data=$$props.currentItem.attachment.base64Data,byteCharacters=atob(
base64Data),byteNumbers=new Array(byteCharacters.length);for(let i=0;i<byteCharacters.length;i++)byteNumbers[i]=byteCharacters.charCodeAt(i);const byteArray=new Uint8Array(byteNumbers);file=new File([byteArray],$$props.displayName,{type:"application/pdf"})}}if(file)set$1(pdfImages,await convertPDFToImage(file),!0);else throw new Error("No PDF file available for conversion")}catch(error2){set$1(pdfImagesError,error2 instanceof Error?error2.message:"Failed to load PDF images",!0)}finally{set$1(pdfImagesLoading,
!1)}}}user_effect(()=>{get$3(pdfViewMode)===PdfViewMode.PAGES&&loadPdfImages()});var fragment=root$1x(),div=first_child(fragment),node2=child(div);{let $0=user_derived(()=>get$3(pdfViewMode)===PdfViewMode.TEXT?"default":"outline");Button(node2,{get variant(){return get$3($0)},size:"sm",onclick:()=>set$1(pdfViewMode,PdfViewMode.TEXT,!0),get disabled(){return get$3(pdfImagesLoading)},children:($$anchor2,$$slotProps)=>{var fragment_1=root_1$T(),node_1=first_child(fragment_1);File_text(node_1,{class:"\
mr-1 h-4 w-4"}),next$1(),append($$anchor2,fragment_1)},$$slots:{default:!0}})}var node_2=sibling(node2,2);{let $0=user_derived(()=>get$3(pdfViewMode)===PdfViewMode.PAGES?"default":"outline");Button(node_2,{get variant(){return get$3($0)},size:"sm",onclick:()=>set$1(pdfViewMode,PdfViewMode.PAGES,!0),get disabled(){return get$3(pdfImagesLoading)},children:($$anchor2,$$slotProps)=>{var fragment_2=root_2$14(),node_3=first_child(fragment_2);{var consequent=$$anchor3=>{var div_1=root_3$T();append($$anchor3,
div_1)},alternate=$$anchor3=>{Eye($$anchor3,{class:"mr-1 h-4 w-4"})};if_block(node_3,$$render=>{get$3(pdfImagesLoading)?$$render(consequent):$$render(alternate,-1)})}next$1(),append($$anchor2,fragment_2)},$$slots:{default:!0}})}reset(div);var node_4=sibling(div,2);{var consequent_1=$$anchor2=>{var fragment_4=comment$2(),node_5=first_child(fragment_4);component(node_5,()=>Alert,($$anchor3,Alert_Root)=>{Alert_Root($$anchor3,{class:"mb-4 max-w-4xl",children:($$anchor4,$$slotProps)=>{var fragment_5=root_6$t(),
node_6=first_child(fragment_5);Info$1(node_6,{class:"h-4 w-4"});var node_7=sibling(node_6,2);component(node_7,()=>Alert_title,($$anchor5,Alert_Title)=>{Alert_Title($$anchor5,{children:($$anchor6,$$slotProps2)=>{next$1();var text2=text$8("Preview only");append($$anchor6,text2)},$$slots:{default:!0}})});var node_8=sibling(node_7,2);component(node_8,()=>Alert_description,($$anchor5,Alert_Description)=>{Alert_Description($$anchor5,{children:($$anchor6,$$slotProps2)=>{var span=root_8$s(),span_1=sibling(
child(span));next$1(),reset(span),delegated("click",span_1,()=>set$1(pdfViewMode,PdfViewMode.TEXT,!0)),append($$anchor6,span)},$$slots:{default:!0}})}),append($$anchor4,fragment_5)},$$slots:{default:!0}})}),append($$anchor2,fragment_4)};if_block(node_4,$$render=>{!$$props.hasVisionModality&&$$props.activeModelId&&$$props.currentItem&&$$render(consequent_1)})}var node_9=sibling(node_4,2);{var consequent_2=$$anchor2=>{var div_2=root_9$l();append($$anchor2,div_2)},consequent_3=$$anchor2=>{var div_3=root_10$g(),
div_4=child(div_3),node_10=child(div_4);File_text(node_10,{class:"mx-auto mb-4 h-16 w-16 text-white/50"});var p2=sibling(node_10,4),text_1=child(p2,!0);reset(p2),reset(div_4),reset(div_3),template_effect(()=>set_text(text_1,get$3(pdfImagesError))),append($$anchor2,div_3)},consequent_4=$$anchor2=>{var fragment_6=comment$2(),node_11=first_child(fragment_6);each(node_11,18,()=>get$3(pdfImages),image2=>image2,($$anchor3,image2,index2)=>{var fragment_7=root_12$a(),p_1=first_child(fragment_7),text_2=child(
p_1);reset(p_1);var img=sibling(p_1,2);next$1(2),template_effect(()=>{set_text(text_2,`Page ${get$3(index2)+1}`),set_attribute(img,"src",image2),set_attribute(img,"alt",`PDF Page ${get$3(index2)+1}`)}),append($$anchor3,fragment_7)}),append($$anchor2,fragment_6)},alternate_1=$$anchor2=>{var div_5=root_13$e(),div_6=child(div_5),node_12=child(div_6);File_text(node_12,{class:"mx-auto mb-4 h-16 w-16 text-white/50"}),next$1(2),reset(div_6),reset(div_5),append($$anchor2,div_5)};if_block(node_9,$$render=>{
get$3(pdfImagesLoading)?$$render(consequent_2):get$3(pdfImagesError)?$$render(consequent_3,1):get$3(pdfImages).length>0?$$render(consequent_4,2):$$render(alternate_1,-1)})}var node_13=sibling(node_9,2);{var consequent_5=$$anchor2=>{var div_7=root_14$6(),node_14=child(div_7);SyntaxHighlightedCode(node_14,{class:"max-w-4xl",get code(){return $$props.displayTextContent},get language(){return get$3(language2)},maxHeight:"none"}),reset(div_7),append($$anchor2,div_7)};if_block(node_13,$$render=>{get$3(
pdfViewMode)===PdfViewMode.TEXT&&$$props.displayTextContent&&$$render(consequent_5)})}append($$anchor,fragment),pop()}delegate(["click"]);var root_1$S=from_html('<div class="flex flex-1 items-center justify-center"><img class="max-h-[80vh] max-w-[80vw] rounded-lg object-contain shadow-lg"/></div>');function ChatAttachmentsPreviewCurrentItemImage($$anchor,$$props){push$1($$props,!0);var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{var div=root_1$S(),img=child(div);
reset(div),template_effect(()=>{set_attribute(img,"src",$$props.displayPreview),set_attribute(img,"alt",$$props.currentItem?.name||"preview")}),append($$anchor2,div)};if_block(node2,$$render=>{$$props.displayPreview&&$$render(consequent)})}append($$anchor,fragment),pop()}var root_1$R=from_html('<audio controls="" class="mb-4 w-full">Your browser does not support the audio element.</audio>'),root_2$13=from_html('<p class="mb-4 text-white/70">Audio preview not available</p>'),root$1w=from_html('<d\
iv class="flex flex-1 items-center justify-center p-8"><div class="w-full max-w-md text-center"><!> <!> <p class="text-sm text-white/50"> </p></div></div>');function ChatAttachmentsPreviewCurrentItemAudio($$anchor,$$props){push$1($$props,!0);var div=root$1w(),div_1=child(div),node2=child(div_1);Music(node2,{class:"mx-auto mb-4 h-16 w-16 text-white/50"});var node_1=sibling(node2,2);{var consequent=$$anchor2=>{var audio=root_1$R();template_effect(()=>set_attribute(audio,"src",$$props.audioSrc)),append(
$$anchor2,audio)},alternate=$$anchor2=>{var p2=root_2$13();append($$anchor2,p2)};if_block(node_1,$$render=>{$$props.audioSrc?$$render(consequent):$$render(alternate,-1)})}var p_1=sibling(node_1,2),text2=child(p_1,!0);reset(p_1),reset(div_1),reset(div),template_effect(()=>set_text(text2,$$props.currentItem?.name||"Audio")),append($$anchor,div),pop()}var root_1$Q=from_html('<div class="px-4 pb-4"><!></div>');function ChatAttachmentsPreviewCurrentItemText($$anchor,$$props){var fragment=comment$2(),
node2=first_child(fragment);{var consequent=$$anchor2=>{var div=root_1$Q(),node_1=child(div);SyntaxHighlightedCode(node_1,{class:"max-w-4xl",get code(){return $$props.displayTextContent},get language(){return $$props.language},maxHeight:"none"}),reset(div),append($$anchor2,div)};if_block(node2,$$render=>{$$props.displayTextContent&&$$render(consequent)})}append($$anchor,fragment)}var root$1v=from_html('<div class="flex flex-1 items-center justify-center p-8"><div class="text-center"><!> <p class\
="text-white/70">Preview not available for this file type</p></div></div>');function ChatAttachmentsPreviewCurrentItemUnavailable($$anchor,$$props){var div=root$1v(),div_1=child(div),node2=child(div_1);component(node2,()=>$$props.IconComponent,($$anchor2,IconComponent_1)=>{IconComponent_1($$anchor2,{class:"mx-auto mb-4 h-16 w-16 text-white/50"})}),next$1(2),reset(div_1),reset(div),append($$anchor,div)}function ChatAttachmentsPreviewCurrentItem($$anchor,$$props){push$1($$props,!0);let IconComponent=user_derived(
()=>$$props.isImage?Image$1:$$props.isText||$$props.isPdf?File_text:$$props.isAudio?Music:File$1),isUnavailable=user_derived(()=>!$$props.isPdf&&!$$props.isImage&&!($$props.isText&&$$props.displayTextContent)&&!$$props.isAudio);var fragment=comment$2(),node2=first_child(fragment);{var consequent_5=$$anchor2=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);key$1(node_1,()=>$$props.currentItem.id,$$anchor3=>{var fragment_2=comment$2(),node_2=first_child(fragment_2);{var consequent=$$anchor4=>{
ChatAttachmentsPreviewCurrentItemPdf($$anchor4,{get currentItem(){return $$props.currentItem},get displayName(){return $$props.currentItem.name},get displayTextContent(){return $$props.displayTextContent},get hasVisionModality(){return $$props.hasVisionModality},get activeModelId(){return $$props.activeModelId}})},consequent_1=$$anchor4=>{ChatAttachmentsPreviewCurrentItemImage($$anchor4,{get currentItem(){return $$props.currentItem},get displayPreview(){return $$props.displayPreview}})},consequent_2=$$anchor4=>{
ChatAttachmentsPreviewCurrentItemText($$anchor4,{get displayTextContent(){return $$props.displayTextContent},get language(){return $$props.language}})},consequent_3=$$anchor4=>{ChatAttachmentsPreviewCurrentItemAudio($$anchor4,{get currentItem(){return $$props.currentItem},get audioSrc(){return $$props.audioSrc}})},consequent_4=$$anchor4=>{ChatAttachmentsPreviewCurrentItemUnavailable($$anchor4,{get IconComponent(){return get$3(IconComponent)}})};if_block(node_2,$$render=>{$$props.isPdf?$$render(consequent):
$$props.isImage?$$render(consequent_1,1):$$props.isText&&$$props.displayTextContent?$$render(consequent_2,2):$$props.isAudio?$$render(consequent_3,3):get$3(isUnavailable)&&$$render(consequent_4,4)})}append($$anchor3,fragment_2)}),append($$anchor2,fragment_1)};if_block(node2,$$render=>{$$props.currentItem&&$$render(consequent_5)})}append($$anchor,fragment),pop()}class ChatService{static async generateTitle(message,model,signal){let titleResponse="";try{await ChatService.sendMessage([message],{model:model||
void 0,stream:!0,custom:{chat_template_kwargs:{enable_thinking:!1}},onChunk:chunk=>{titleResponse+=chunk}},void 0,signal)}catch{return""}return titleResponse}static async sendMessage(messages,options={},conversationId,signal){const{stream,onChunk,onComplete,onError,onReasoningChunk,onToolCallChunk,onModel,onTimings,tools,temperature,max_tokens,dynatemp_range,dynatemp_exponent,top_k,top_p,min_p,xtc_probability,xtc_threshold,typ_p,repeat_last_n,repeat_penalty,presence_penalty,frequency_penalty,dry_multiplier,
dry_base,dry_allowed_length,dry_penalty_last_n,samplers,backend_sampling,custom:custom2,timings_per_token,disableReasoningParsing,excludeReasoningFromContext}=options,normalizedMessages=messages.map(msg=>{if("id"in msg&&"convId"in msg&&"timestamp"in msg){const dbMsg=msg;return ChatService.convertDbMessageToApiChatMessageData(dbMsg)}else return msg}).filter(msg=>msg.role===MessageRole.SYSTEM?(typeof msg.content=="string"?msg.content:"").trim().length>0:!0);options.model&&!modelsStore.modelSupportsVision(
options.model)&&normalizedMessages.forEach(msg=>{Array.isArray(msg.content)&&(msg.content=msg.content.filter(part=>part.type===ContentPartType.IMAGE_URL?(console.info(`[ChatService] Skipping image attachment in message history (model "${options.model}" does not support vision)`),!1):!0),msg.content.length===1&&msg.content[0].type===ContentPartType.TEXT&&typeof msg.content[0].text=="string"&&(msg.content=msg.content[0].text))});const requestBody={messages:normalizedMessages.map(msg=>{const mapped={
role:msg.role,content:msg.content,tool_calls:msg.tool_calls,tool_call_id:msg.tool_call_id};return!excludeReasoningFromContext&&msg.reasoning_content&&(mapped.reasoning_content=msg.reasoning_content),mapped}),stream,return_progress:stream?!0:void 0,tools:tools&&tools.length>0?tools:void 0};if(options.model&&(requestBody.model=options.model),requestBody.reasoning_format=disableReasoningParsing?ReasoningFormat.NONE:ReasoningFormat.AUTO,temperature!==void 0&&(requestBody.temperature=temperature),max_tokens!==
void 0&&(requestBody.max_tokens=max_tokens!==null&&max_tokens!==0?max_tokens:-1),dynatemp_range!==void 0&&(requestBody.dynatemp_range=dynatemp_range),dynatemp_exponent!==void 0&&(requestBody.dynatemp_exponent=dynatemp_exponent),top_k!==void 0&&(requestBody.top_k=top_k),top_p!==void 0&&(requestBody.top_p=top_p),min_p!==void 0&&(requestBody.min_p=min_p),xtc_probability!==void 0&&(requestBody.xtc_probability=xtc_probability),xtc_threshold!==void 0&&(requestBody.xtc_threshold=xtc_threshold),typ_p!==
void 0&&(requestBody.typ_p=typ_p),repeat_last_n!==void 0&&(requestBody.repeat_last_n=repeat_last_n),repeat_penalty!==void 0&&(requestBody.repeat_penalty=repeat_penalty),presence_penalty!==void 0&&(requestBody.presence_penalty=presence_penalty),frequency_penalty!==void 0&&(requestBody.frequency_penalty=frequency_penalty),dry_multiplier!==void 0&&(requestBody.dry_multiplier=dry_multiplier),dry_base!==void 0&&(requestBody.dry_base=dry_base),dry_allowed_length!==void 0&&(requestBody.dry_allowed_length=
dry_allowed_length),dry_penalty_last_n!==void 0&&(requestBody.dry_penalty_last_n=dry_penalty_last_n),samplers!==void 0&&(requestBody.samplers=typeof samplers=="string"?samplers.split(";").filter(s2=>s2.trim()):samplers),backend_sampling!==void 0&&(requestBody.backend_sampling=backend_sampling),timings_per_token!==void 0&&(requestBody.timings_per_token=timings_per_token),custom2)try{const customParams=typeof custom2=="string"?JSON.parse(custom2):custom2;Object.assign(requestBody,customParams)}catch(error2){
console.warn("Failed to parse custom parameters:",error2)}try{const response=await fetch("./v1/chat/completions",{method:"POST",headers:getJsonHeaders(),body:JSON.stringify(requestBody),signal});if(!response.ok){const error2=await ChatService.parseErrorResponse(response);throw onError&&onError(error2),error2}if(stream){await ChatService.handleStreamResponse(response,onChunk,onComplete,onError,onReasoningChunk,onToolCallChunk,onModel,onTimings,conversationId,signal);return}else return ChatService.
handleNonStreamResponse(response,onComplete,onError,onToolCallChunk,onModel)}catch(error2){if(isAbortError(error2)){console.log("Chat completion request was aborted");return}let userFriendlyError;throw error2 instanceof Error?error2.name==="TypeError"&&error2.message.includes("fetch")?(userFriendlyError=new Error("Unable to connect to server - please check if the server is running"),userFriendlyError.name="NetworkError"):error2.message.includes("ECONNREFUSED")?(userFriendlyError=new Error("Conne\
ction refused - server may be offline"),userFriendlyError.name="NetworkError"):error2.message.includes("ETIMEDOUT")?(userFriendlyError=new Error("Request timed out - the server took too long to respond"),userFriendlyError.name="TimeoutError"):userFriendlyError=error2:userFriendlyError=new Error("Unknown error occurred while sending message"),console.error("Error in sendMessage:",error2),onError&&onError(userFriendlyError),userFriendlyError}}static async areAllSlotsIdle(model,signal){try{const url2=model?
`./slots?model=${encodeURIComponent(model)}`:"./slots",res=await fetch(url2,{signal});return res.ok?(await res.json()).every(s2=>!s2.is_processing):!0}catch{return!0}}static async preEncode(messages,model,excludeReasoning,signal){const requestBody={messages:messages.map(msg=>"id"in msg&&"convId"in msg&&"timestamp"in msg?ChatService.convertDbMessageToApiChatMessageData(msg):msg).filter(msg=>msg.role===MessageRole.SYSTEM?(typeof msg.content=="string"?msg.content:"").trim().length>0:!0).map(msg=>{const mapped={
role:msg.role,content:excludeReasoning?ChatService.stripReasoningContent(msg.content):msg.content,tool_calls:msg.tool_calls,tool_call_id:msg.tool_call_id};return!excludeReasoning&&msg.reasoning_content&&(mapped.reasoning_content=msg.reasoning_content),mapped}),stream:!1,n_predict:0};model&&(requestBody.model=model);try{await fetch("./v1/chat/completions",{method:"POST",headers:getJsonHeaders(),body:JSON.stringify(requestBody),signal})}catch(error2){isAbortError(error2)||console.warn("[ChatServic\
e] Pre-encode request failed:",error2)}}static async handleStreamResponse(response,onChunk,onComplete,onError,onReasoningChunk,onToolCallChunk,onModel,onTimings,conversationId,abortSignal){const reader=response.body?.getReader();if(!reader)throw new Error("No response body");const decoder=new TextDecoder;let aggregatedContent="",fullReasoningContent="",aggregatedToolCalls=[],lastTimings,streamFinished=!1,modelEmitted=!1,toolCallIndexOffset=0,hasOpenToolCallBatch=!1;const finalizeOpenToolCallBatch=()=>{
hasOpenToolCallBatch&&(toolCallIndexOffset=aggregatedToolCalls.length,hasOpenToolCallBatch=!1)},processToolCallDelta=toolCalls=>{if(!toolCalls||toolCalls.length===0||(aggregatedToolCalls=ChatService.mergeToolCallDeltas(aggregatedToolCalls,toolCalls,toolCallIndexOffset),aggregatedToolCalls.length===0))return;hasOpenToolCallBatch=!0;const serializedToolCalls=JSON.stringify(aggregatedToolCalls);serializedToolCalls&&(abortSignal?.aborted||onToolCallChunk?.(serializedToolCalls))};try{let chunk="";for(;!abortSignal?.
aborted;){const{done,value}=await reader.read();if(done||abortSignal?.aborted)break;chunk+=decoder.decode(value,{stream:!0});const lines=chunk.split(`
`);chunk=lines.pop()||"";for(const line of lines){if(abortSignal?.aborted)break;if(line.startsWith(UrlProtocol.DATA)){const data=line.slice(6);if(data==="[DONE]"){streamFinished=!0;continue}try{const parsed=JSON.parse(data),choice=parsed.choices?.[0],content2=choice?.delta?.content,reasoningContent=choice?.delta?.reasoning_content,toolCalls=choice?.delta?.tool_calls,timings=parsed.timings,promptProgress=parsed.prompt_progress,chunkModel=ChatService.extractModelName(parsed);chunkModel&&!modelEmitted&&
(modelEmitted=!0,onModel?.(chunkModel)),promptProgress&&ChatService.notifyTimings(void 0,promptProgress,onTimings),timings&&(ChatService.notifyTimings(timings,promptProgress,onTimings),lastTimings=timings),content2&&(finalizeOpenToolCallBatch(),aggregatedContent+=content2,abortSignal?.aborted||onChunk?.(content2)),reasoningContent&&(finalizeOpenToolCallBatch(),fullReasoningContent+=reasoningContent,abortSignal?.aborted||onReasoningChunk?.(reasoningContent)),processToolCallDelta(toolCalls)}catch(e){
console.error("Error parsing JSON chunk:",e)}}}if(abortSignal?.aborted)break}if(abortSignal?.aborted)return;if(streamFinished){finalizeOpenToolCallBatch();const finalToolCalls=aggregatedToolCalls.length>0?JSON.stringify(aggregatedToolCalls):void 0;onComplete?.(aggregatedContent,fullReasoningContent||void 0,lastTimings,finalToolCalls)}}catch(error2){const err=error2 instanceof Error?error2:new Error("Stream error");throw onError?.(err),err}finally{reader.releaseLock()}}static async handleNonStreamResponse(response,onComplete,onError,onToolCallChunk,onModel){
try{const responseText=await response.text();if(!responseText.trim())throw new Error("No response received from server. Please try again.");const data=JSON.parse(responseText),responseModel=ChatService.extractModelName(data);responseModel&&onModel?.(responseModel);const content2=data.choices[0]?.message?.content||"",reasoningContent=data.choices[0]?.message?.reasoning_content,toolCalls=data.choices[0]?.message?.tool_calls;let serializedToolCalls;if(toolCalls&&toolCalls.length>0){const mergedToolCalls=ChatService.
mergeToolCallDeltas([],toolCalls);mergedToolCalls.length>0&&(serializedToolCalls=JSON.stringify(mergedToolCalls),serializedToolCalls&&onToolCallChunk?.(serializedToolCalls))}if(!content2.trim()&&!serializedToolCalls)throw new Error("No response received from server. Please try again.");return onComplete?.(content2,reasoningContent,void 0,serializedToolCalls),content2}catch(error2){const err=error2 instanceof Error?error2:new Error("Parse error");throw onError?.(err),err}}static mergeToolCallDeltas(existing,deltas,indexOffset=0){
const result=existing.map(call=>({...call,function:call.function?{...call.function}:void 0}));for(const delta of deltas){const index2=typeof delta.index=="number"&&delta.index>=0?delta.index+indexOffset:result.length;for(;result.length<=index2;)result.push({function:void 0});const target2=result[index2];if(delta.id&&(target2.id=delta.id),delta.type&&(target2.type=delta.type),delta.function){const fn=target2.function?{...target2.function}:{};delta.function.name&&(fn.name=delta.function.name),delta.
function.arguments&&(fn.arguments=(fn.arguments??"")+delta.function.arguments),target2.function=fn}}return result}static convertDbMessageToApiChatMessageData(message){if(message.role===MessageRole.TOOL&&message.toolCallId)return{role:MessageRole.TOOL,content:message.content,tool_call_id:message.toolCallId};let toolCalls;if(message.toolCalls)try{toolCalls=JSON.parse(message.toolCalls)}catch{}if(!message.extra||message.extra.length===0){const result2={role:message.role,content:message.content};return message.
reasoningContent&&(result2.reasoning_content=message.reasoningContent),toolCalls&&toolCalls.length>0&&(result2.tool_calls=toolCalls),result2}const contentParts=[];message.content&&contentParts.push({type:ContentPartType.TEXT,text:message.content});const imageFiles=message.extra.filter(extra=>extra.type===AttachmentType.IMAGE);for(const image2 of imageFiles)contentParts.push({type:ContentPartType.IMAGE_URL,image_url:{url:image2.base64Url}});const textFiles=message.extra.filter(extra=>extra.type===
AttachmentType.TEXT);for(const textFile of textFiles)contentParts.push({type:ContentPartType.TEXT,text:formatAttachmentText("File",textFile.name,textFile.content)});const legacyContextFiles=message.extra.filter(extra=>extra.type===AttachmentType.LEGACY_CONTEXT);for(const legacyContextFile of legacyContextFiles)contentParts.push({type:ContentPartType.TEXT,text:formatAttachmentText("File",legacyContextFile.name,legacyContextFile.content)});const audioFiles=message.extra.filter(extra=>extra.type===
AttachmentType.AUDIO);for(const audio of audioFiles)contentParts.push({type:ContentPartType.INPUT_AUDIO,input_audio:{data:audio.base64Data,format:audio.mimeType.includes("wav")?"wav":"mp3"}});const pdfFiles=message.extra.filter(extra=>extra.type===AttachmentType.PDF);for(const pdfFile of pdfFiles)if(pdfFile.processedAsImages&&pdfFile.images)for(let i=0;i<pdfFile.images.length;i++)contentParts.push({type:ContentPartType.IMAGE_URL,image_url:{url:pdfFile.images[i]}});else contentParts.push({type:ContentPartType.
TEXT,text:formatAttachmentText(ATTACHMENT_LABEL_PDF_FILE,pdfFile.name,pdfFile.content)});const mcpPrompts=message.extra.filter(extra=>extra.type===AttachmentType.MCP_PROMPT);for(const mcpPrompt of mcpPrompts)contentParts.push({type:ContentPartType.TEXT,text:formatAttachmentText(ATTACHMENT_LABEL_MCP_PROMPT,mcpPrompt.name,mcpPrompt.content,mcpPrompt.serverName)});const mcpResources2=message.extra.filter(extra=>extra.type===AttachmentType.MCP_RESOURCE);for(const mcpResource of mcpResources2)contentParts.
push({type:ContentPartType.TEXT,text:formatAttachmentText(ATTACHMENT_LABEL_MCP_RESOURCE,mcpResource.name,mcpResource.content,mcpResource.serverName)});const result={role:message.role,content:contentParts};return message.reasoningContent&&(result.reasoning_content=message.reasoningContent),toolCalls&&toolCalls.length>0&&(result.tool_calls=toolCalls),result}static stripReasoningContent(content2){const stripFromString=text2=>text2.replace(LEGACY_AGENTIC_REGEX.REASONING_BLOCK,"").trim();return typeof content2==
"string"?stripFromString(content2):content2.map(part=>part.type===ContentPartType.TEXT&&part.text?{...part,text:stripFromString(part.text)}:part)}static async parseErrorResponse(response){try{const errorText=await response.text(),errorData=JSON.parse(errorText),message=errorData.error?.message||"Unknown server error",error2=new Error(message);return error2.name=response.status===400?"ServerError":"HttpError",errorData.error&&"n_prompt_tokens"in errorData.error&&"n_ctx"in errorData.error&&(error2.
contextInfo={n_prompt_tokens:errorData.error.n_prompt_tokens,n_ctx:errorData.error.n_ctx}),error2}catch{const fallback2=new Error(`Server error (${response.status}): ${response.statusText}`);return fallback2.name="HttpError",fallback2}}static extractModelName(data){const asRecord=value=>typeof value=="object"&&value!==null?value:void 0,getTrimmedString=value=>typeof value=="string"&&value.trim()?value.trim():void 0,root2=asRecord(data);if(!root2)return;const rootModel=getTrimmedString(root2.model);
if(rootModel)return rootModel;const firstChoice=Array.isArray(root2.choices)?asRecord(root2.choices[0]):void 0;if(!firstChoice)return;const deltaModel=getTrimmedString(asRecord(firstChoice.delta)?.model);if(deltaModel)return deltaModel;const messageModel=getTrimmedString(asRecord(firstChoice.message)?.model);if(messageModel)return messageModel}static notifyTimings(timings,promptProgress,onTimingsCallback){!onTimingsCallback||!timings&&!promptProgress||onTimingsCallback(timings,promptProgress)}}class ToolsService{static async list(){
return apiFetch(API_TOOLS.LIST)}static async executeTool(toolName,params,signal){const result=await apiFetch(API_TOOLS.EXECUTE,{method:"POST",body:JSON.stringify({tool:toolName,params}),signal});return ToolResponseField.ERROR in result?{content:String(result[ToolResponseField.ERROR]),isError:!0}:ToolResponseField.PLAIN_TEXT in result?{content:String(result[ToolResponseField.PLAIN_TEXT]),isError:!1}:{content:JSON.stringify(result),isError:!1}}}class ToolsStore{#_builtinTools=state$1(proxy([]));get _builtinTools(){
return get$3(this.#_builtinTools)}set _builtinTools(value){set$1(this.#_builtinTools,value,!0)}#_loading=state$1(!1);get _loading(){return get$3(this.#_loading)}set _loading(value){set$1(this.#_loading,value,!0)}#_error=state$1(null);get _error(){return get$3(this.#_error)}set _error(value){set$1(this.#_error,value,!0)}#_disabledTools=state$1(proxy(new SvelteSet));get _disabledTools(){return get$3(this.#_disabledTools)}set _disabledTools(value){set$1(this.#_disabledTools,value,!0)}#_toolsEndpointUnreachable=state$1(
!1);get _toolsEndpointUnreachable(){return get$3(this.#_toolsEndpointUnreachable)}set _toolsEndpointUnreachable(value){set$1(this.#_toolsEndpointUnreachable,value,!0)}constructor(){try{const stored=localStorage.getItem(DISABLED_TOOLS_LOCALSTORAGE_KEY);if(stored){const parsed=JSON.parse(stored);if(Array.isArray(parsed))for(const name of parsed)typeof name=="string"&&this._disabledTools.add(name)}}catch(err){console.error("[ToolsStore] Failed to load disabled tools from localStorage:",err)}this.fetchBuiltinTools()}persistDisabledTools(){
try{localStorage.setItem(DISABLED_TOOLS_LOCALSTORAGE_KEY,JSON.stringify([...this._disabledTools]))}catch{}}get builtinTools(){return this._builtinTools}get mcpTools(){return mcpStore.getToolDefinitionsForLLM()}get customTools(){const raw2=config$1().custom;if(!raw2||typeof raw2!="string")return[];try{const parsed=JSON.parse(raw2);return Array.isArray(parsed)?parsed.filter(t=>typeof t=="object"&&t!==null&&"type"in t&&t.type==="function"&&"function"in t&&typeof t.function?.name=="string"):[]}catch{
return[]}}get allTools(){const entries=[];for(const def of this._builtinTools)entries.push({source:ToolSource.BUILTIN,definition:def});const connections=mcpStore.getConnections();if(connections.size>0)for(const[serverId,connection]of connections){const serverName=mcpStore.getServerDisplayName(serverId);for(const tool of connection.tools){const rawSchema=tool.inputSchema??{type:JsonSchemaType.OBJECT,properties:{},required:[]};entries.push({source:ToolSource.MCP,serverName,serverId,definition:{type:ToolCallType.
FUNCTION,function:{name:tool.name,description:tool.description,parameters:rawSchema}}})}}else for(const{serverId,serverName,tools}of this.getMcpToolsFromHealthChecks())for(const tool of tools)entries.push({source:ToolSource.MCP,serverName,serverId,definition:{type:ToolCallType.FUNCTION,function:{name:tool.name,description:tool.description,parameters:{type:JsonSchemaType.OBJECT,properties:{},required:[]}}}});for(const def of this.customTools)entries.push({source:ToolSource.CUSTOM,definition:def});
return entries}get toolGroups(){const groups=[];this._builtinTools.length>0&&groups.push({source:ToolSource.BUILTIN,label:TOOL_GROUP_LABELS[ToolSource.BUILTIN],tools:this._builtinTools});const connections=mcpStore.getConnections();if(connections.size>0)for(const[serverId,connection]of connections){if(connection.tools.length===0)continue;const label=mcpStore.getServerDisplayName(serverId),tools=connection.tools.map(tool=>{const rawSchema=tool.inputSchema??{type:JsonSchemaType.OBJECT,properties:{},
required:[]};return{type:ToolCallType.FUNCTION,function:{name:tool.name,description:tool.description,parameters:rawSchema}}});groups.push({source:ToolSource.MCP,label,serverId,tools})}else for(const{serverId,serverName,tools}of this.getMcpToolsFromHealthChecks()){if(tools.length===0)continue;const defs=tools.map(tool=>({type:ToolCallType.FUNCTION,function:{name:tool.name,description:tool.description,parameters:{type:JsonSchemaType.OBJECT,properties:{},required:[]}}}));groups.push({source:ToolSource.
MCP,label:serverName,serverId,tools:defs})}const custom2=this.customTools;return custom2.length>0&&groups.push({source:ToolSource.CUSTOM,label:TOOL_GROUP_LABELS[ToolSource.CUSTOM],tools:custom2}),groups}get enabledToolDefinitions(){return this.allTools.filter(t=>!this._disabledTools.has(t.definition.function.name)).map(t=>t.definition)}getEnabledToolsForLLM(){const disabled=this._disabledTools,result=[];for(const tool of this._builtinTools)disabled.has(tool.function.name)||result.push(tool);for(const tool of mcpStore.
getToolDefinitionsForLLM())disabled.has(tool.function.name)||result.push(tool);for(const tool of this.customTools)disabled.has(tool.function.name)||result.push(tool);return result}get allToolDefinitions(){return this.allTools.map(t=>t.definition)}get loading(){return this._loading}get error(){return this._error}get isToolsEndpointUnreachable(){return this._toolsEndpointUnreachable}get disabledTools(){return this._disabledTools}isToolEnabled(toolName){return!this._disabledTools.has(toolName)}toggleTool(toolName){
this._disabledTools.has(toolName)?this._disabledTools.delete(toolName):this._disabledTools.add(toolName),this.persistDisabledTools()}setToolEnabled(toolName,enabled){enabled?this._disabledTools.delete(toolName):this._disabledTools.add(toolName)}enableAllToolsForServer(serverId){const connection=mcpStore.getConnections().get(serverId);if(connection){for(const tool of connection.tools)this._disabledTools.delete(tool.name);this.persistDisabledTools()}}toggleGroup(group){const allEnabled=group.tools.
every(t=>this.isToolEnabled(t.function.name));for(const tool of group.tools)this.setToolEnabled(tool.function.name,!allEnabled);this.persistDisabledTools()}isGroupFullyEnabled(group){return group.tools.length>0&&group.tools.every(t=>this.isToolEnabled(t.function.name))}isGroupPartiallyEnabled(group){const enabledCount=group.tools.filter(t=>this.isToolEnabled(t.function.name)).length;return enabledCount>0&&enabledCount<group.tools.length}getMcpToolsFromHealthChecks(){const result=[];for(const server of mcpStore.
getServersSorted().filter(s2=>s2.enabled)){const health=mcpStore.getHealthCheckState(server.id);health.status===HealthCheckStatus.SUCCESS&&health.tools.length>0&&result.push({serverId:server.id,serverName:mcpStore.getServerLabel(server),tools:health.tools})}return result}getToolSource(toolName){if(this._builtinTools.some(t=>t.function.name===toolName))return ToolSource.BUILTIN;for(const entry of this.allTools)if(entry.definition.function.name===toolName)return entry.source;return null}getToolServerLabel(toolName){
for(const entry of this.allTools)if(entry.definition.function.name===toolName){if(entry.serverName)return mcpStore.getServerDisplayName(entry.serverName);if(entry.source===ToolSource.BUILTIN)return TOOL_SERVER_LABELS[ToolSource.BUILTIN];if(entry.source===ToolSource.CUSTOM)return TOOL_SERVER_LABELS[ToolSource.CUSTOM]}return""}getPermissionKey(toolName){for(const entry of this.allTools)if(entry.definition.function.name===toolName)switch(entry.source){case ToolSource.BUILTIN:return`builtin:${toolName}`;case ToolSource.
CUSTOM:return`custom:${toolName}`;case ToolSource.MCP:return entry.serverId?`mcp-${entry.serverId}:${toolName}`:`mcp:${toolName}`;default:return null}return null}get hasEnabledTools(){return this.getEnabledToolsForLLM().length>0}async fetchBuiltinTools(){if(!this._loading){this._loading=!0,this._error=null,this._toolsEndpointUnreachable=!1;try{const toolInfos=await ToolsService.list();this._builtinTools=toolInfos.map(info2=>info2.definition)}catch(err){const errorMessage=err instanceof Error?err.
message:String(err);this._error=errorMessage,(errorMessage.includes("404")||errorMessage.toLowerCase().includes("not found"))&&(this._toolsEndpointUnreachable=!0),console.error("[ToolsStore] Failed to fetch built-in tools:",err)}finally{this._loading=!1}}}}const toolsStore=new ToolsStore;class PermissionsStore{#_tools=state$1(proxy(new SvelteSet));get _tools(){return get$3(this.#_tools)}set _tools(value){set$1(this.#_tools,value,!0)}constructor(){try{const stored=localStorage.getItem(ALWAYS_ALLOWED_TOOLS_LOCALSTORAGE_KEY);
if(stored)for(const name of JSON.parse(stored))typeof name=="string"&&this._tools.add(name)}catch(err){console.error(`Failed to load permissions from localStorage ("${ALWAYS_ALLOWED_TOOLS_LOCALSTORAGE_KEY}"):`,err)}}get tools(){return this._tools}hasTool(key2){return this._tools.has(key2)}allowTool(key2){this._tools.add(key2),this._persist()}allowTools(keys2){for(const key2 of keys2)this._tools.add(key2);this._persist()}revokeTool(key2){this._tools.delete(key2),this._persist()}_persist(){try{localStorage.
setItem(ALWAYS_ALLOWED_TOOLS_LOCALSTORAGE_KEY,JSON.stringify([...this._tools]))}catch(err){console.error(`Failed to persist to localStorage ("${ALWAYS_ALLOWED_TOOLS_LOCALSTORAGE_KEY}"):`,err)}}}const permissionsStore=new PermissionsStore;function createDefaultSession(){return{isRunning:!1,currentTurn:0,totalToolCalls:0,lastError:null,streamingToolCall:null,pendingPermissionRequest:null}}function toAgenticMessages(messages){return messages.map(message=>message.role===MessageRole.ASSISTANT&&message.
tool_calls&&message.tool_calls.length>0?{role:MessageRole.ASSISTANT,content:message.content,reasoning_content:message.reasoning_content,tool_calls:message.tool_calls.map((call,index2)=>({id:call.id??`call_${index2}`,type:call.type??ToolCallType.FUNCTION,function:{name:call.function?.name??"",arguments:call.function?.arguments??""}}))}:message.role===MessageRole.ASSISTANT?{role:MessageRole.ASSISTANT,content:message.content,reasoning_content:message.reasoning_content}:message.role===MessageRole.TOOL&&
message.tool_call_id?{role:MessageRole.TOOL,tool_call_id:message.tool_call_id,content:typeof message.content=="string"?message.content:""}:{role:message.role,content:message.content})}class AgenticStore{_sessions=new SvelteMap;_pendingPermissions=new SvelteMap;_permissionResolvers=new Map;_pendingContinueRequests=new SvelteMap;_continueResolvers=new Map;_steeringMessages=new SvelteMap;get isReady(){return!0}get isAnyRunning(){for(const session of this._sessions.values())if(session.isRunning)return!0;
return!1}getSession(conversationId){let session=this._sessions.get(conversationId);return session||(session=createDefaultSession(),this._sessions.set(conversationId,session)),session}updateSession(conversationId,update2){const session=this.getSession(conversationId);this._sessions.set(conversationId,{...session,...update2})}clearSession(conversationId){this._sessions.delete(conversationId)}getActiveSessions(){const active=[];for(const[conversationId,session]of this._sessions.entries())session.isRunning&&
active.push({conversationId,session});return active}isRunning(conversationId){return this.getSession(conversationId).isRunning}currentTurn(conversationId){return this.getSession(conversationId).currentTurn}totalToolCalls(conversationId){return this.getSession(conversationId).totalToolCalls}lastError(conversationId){return this.getSession(conversationId).lastError}streamingToolCall(conversationId){return this.getSession(conversationId).streamingToolCall}pendingPermissionRequest(conversationId){return this.
_pendingPermissions.get(conversationId)??null}pendingContinueRequest(conversationId){return this._pendingContinueRequests.get(conversationId)??!1}resolveContinue(conversationId,shouldContinue){const resolver2=this._continueResolvers.get(conversationId);resolver2&&(this._continueResolvers.delete(conversationId),resolver2(shouldContinue))}resolvePermission(conversationId,decision){const resolver2=this._permissionResolvers.get(conversationId);resolver2&&(this._permissionResolvers.delete(conversationId),
resolver2(decision))}clearError(conversationId){this.updateSession(conversationId,{lastError:null})}hasPendingSteeringMessage(conversationId){return this._steeringMessages.has(conversationId)}pendingSteeringMessageContent(conversationId){return this._steeringMessages.get(conversationId)?.content??null}pendingSteeringMessageExtras(conversationId){return this._steeringMessages.get(conversationId)?.extras}injectSteeringMessage(conversationId,content2,extras){this._steeringMessages.set(conversationId,
{content:content2,extras})}clearSteeringMessage(conversationId){this._steeringMessages.delete(conversationId)}consumePendingSteeringMessage(conversationId){const msg=this._steeringMessages.get(conversationId);return msg?(this._steeringMessages.delete(conversationId),msg):null}getConfig(settings,perChatOverrides){const maxTurns=Number(settings.agenticMaxTurns)||DEFAULT_AGENTIC_CONFIG.maxTurns,maxToolPreviewLines=Number(settings.agenticMaxToolPreviewLines)||DEFAULT_AGENTIC_CONFIG.maxToolPreviewLines;
return{enabled:(mcpStore.hasEnabledServers(perChatOverrides)||toolsStore.builtinTools.length>0||toolsStore.customTools.length>0)&&DEFAULT_AGENTIC_CONFIG.enabled,maxTurns,maxToolPreviewLines}}parseToolArguments(args){if(typeof args=="object")return args;const trimmed=args.trim();return trimmed===""?{}:JSON.parse(trimmed)}async requestPermission(conversationId,toolName,serverLabel,signal){const permissionKey=toolsStore.getPermissionKey(toolName);return permissionKey&&permissionsStore.hasTool(permissionKey)?
ToolPermissionDecision.ONCE:(this._pendingPermissions.set(conversationId,{toolName,serverLabel}),new Promise(resolve2=>{if(signal?.aborted){this._pendingPermissions.set(conversationId,null),resolve2(ToolPermissionDecision.DENY);return}this._permissionResolvers.set(conversationId,decision=>{if(this._pendingPermissions.set(conversationId,null),decision===ToolPermissionDecision.ALWAYS&&permissionKey)permissionsStore.allowTool(permissionKey);else if(decision===ToolPermissionDecision.ALWAYS_SERVER){const serverToolKeys=toolsStore.
allTools.filter(t=>t.serverName?t.serverName===serverLabel:toolsStore.getToolServerLabel(t.definition.function.name)===serverLabel).map(t=>toolsStore.getPermissionKey(t.definition.function.name)).filter(k=>k!==null);permissionsStore.allowTools(serverToolKeys)}resolve2(decision)}),signal?.addEventListener("abort",()=>{this._permissionResolvers.get(conversationId)&&(this._permissionResolvers.delete(conversationId),this._pendingPermissions.set(conversationId,null),resolve2(ToolPermissionDecision.DENY))},
{once:!0})}))}async requestContinue(conversationId,signal){return this._pendingContinueRequests.set(conversationId,!0),new Promise(resolve2=>{if(signal?.aborted){this._pendingContinueRequests.set(conversationId,!1),resolve2(!1);return}this._continueResolvers.set(conversationId,shouldContinue=>{this._pendingContinueRequests.set(conversationId,!1),resolve2(shouldContinue)}),signal?.addEventListener("abort",()=>{this._continueResolvers.get(conversationId)&&(this._continueResolvers.delete(conversationId),
this._pendingContinueRequests.set(conversationId,!1),resolve2(!1))},{once:!0})})}async runAgenticFlow(params){const{conversationId,messages,options={},callbacks,signal,perChatOverrides}=params;this._pendingPermissions.set(conversationId,null),this._permissionResolvers.delete(conversationId),this._pendingContinueRequests.set(conversationId,!1),this._continueResolvers.delete(conversationId),this._steeringMessages.delete(conversationId),toolsStore.builtinTools.length===0&&!toolsStore.loading&&await toolsStore.
fetchBuiltinTools();const agenticConfig=this.getConfig(config$1(),perChatOverrides);if(!agenticConfig.enabled)return{handled:!1};const hasMcpServers=mcpStore.hasEnabledServers(perChatOverrides);hasMcpServers&&(await mcpStore.ensureInitialized(perChatOverrides)||console.log("[AgenticStore] MCP not initialized"));const tools=toolsStore.getEnabledToolsForLLM();if(tools.length===0)return{handled:!1};console.log(`[AgenticStore] Starting agentic flow with ${tools.length} tools`);const normalizedMessages=messages.
map(msg=>"id"in msg&&"convId"in msg&&"timestamp"in msg?ChatService.convertDbMessageToApiChatMessageData(msg):msg).filter(msg=>msg.role===MessageRole.SYSTEM?(typeof msg.content=="string"?msg.content:"").trim().length>0:!0);this.updateSession(conversationId,{isRunning:!0,currentTurn:0,totalToolCalls:0,lastError:null}),hasMcpServers&&mcpStore.acquireConnection();try{return await this.executeAgenticLoop({conversationId,messages:normalizedMessages,options,tools,agenticConfig,callbacks,signal}),{handled:!0}}catch(error2){
const normalizedError=error2 instanceof Error?error2:new Error(String(error2));return this.updateSession(conversationId,{lastError:normalizedError}),callbacks.onError?.(normalizedError),{handled:!0,error:normalizedError}}finally{this.updateSession(conversationId,{isRunning:!1}),hasMcpServers&&await mcpStore.releaseConnection().catch(err=>console.warn("[AgenticStore] Failed to release MCP connection:",err))}}async executeAgenticLoop(params){const{conversationId,messages,options,tools,agenticConfig,
callbacks,signal}=params,{onChunk,onReasoningChunk,onToolCallsStreaming,onAttachments,onModel,onAssistantTurnComplete,createToolResultMessage,createAssistantMessage,onFlowComplete,onTimings,onTurnComplete}=callbacks,sessionMessages=toAgenticMessages(messages);let capturedTimings,totalToolCallCount=0;const agenticTimings={turns:0,toolCallsCount:0,toolsMs:0,toolCalls:[],perTurn:[],llm:{predicted_n:0,predicted_ms:0,prompt_n:0,prompt_ms:0}},maxTurns=agenticConfig.maxTurns,effectiveModel=options.model||
modelsStore.models[0]?.model||"";let turn=0;for(;;){if(turn>=maxTurns){const shouldContinue=await this.requestContinue(conversationId,signal);if(await new Promise(r2=>setTimeout(r2,0)),!shouldContinue||signal?.aborted){onFlowComplete?.(this.buildFinalTimings(capturedTimings,agenticTimings));return}turn=0}if(this.updateSession(conversationId,{currentTurn:turn+1}),agenticTimings.turns=turn+1,signal?.aborted){onFlowComplete?.(this.buildFinalTimings(capturedTimings,agenticTimings));return}turn>0&&createAssistantMessage&&
await createAssistantMessage();let turnContent="",turnReasoningContent="",turnToolCalls=[],lastStreamingToolCallName="",lastStreamingToolCallArgsLength=0,turnTimings;const turnStats={turn:turn+1,llm:{predicted_n:0,predicted_ms:0,prompt_n:0,prompt_ms:0},toolCalls:[],toolsMs:0};try{await ChatService.sendMessage(sessionMessages,{...options,stream:!0,tools:tools.length>0?tools:void 0,onChunk:chunk=>{turnContent+=chunk,onChunk?.(chunk)},onReasoningChunk:chunk=>{turnReasoningContent+=chunk,onReasoningChunk?.(
chunk)},onToolCallChunk:serialized=>{try{if(turnToolCalls=JSON.parse(serialized),onToolCallsStreaming?.(turnToolCalls),turnToolCalls.length>0&&turnToolCalls[0]?.function){const name=turnToolCalls[0].function.name||"",args=turnToolCalls[0].function.arguments||"",argsLengthBucket=Math.floor(args.length/100);(name!==lastStreamingToolCallName||argsLengthBucket!==lastStreamingToolCallArgsLength)&&(lastStreamingToolCallName=name,lastStreamingToolCallArgsLength=argsLengthBucket,this.updateSession(conversationId,
{streamingToolCall:{name,arguments:args}}))}}catch{}},onModel,onTimings:(timings,progress)=>{onTimings?.(timings,progress),timings&&(capturedTimings=timings,turnTimings=timings)},onComplete:()=>{},onError:error2=>{throw error2}},void 0,signal),this.updateSession(conversationId,{streamingToolCall:null}),turnTimings&&(agenticTimings.llm.predicted_n+=turnTimings.predicted_n||0,agenticTimings.llm.predicted_ms+=turnTimings.predicted_ms||0,agenticTimings.llm.prompt_n+=turnTimings.prompt_n||0,agenticTimings.
llm.prompt_ms+=turnTimings.prompt_ms||0,turnStats.llm.predicted_n=turnTimings.predicted_n||0,turnStats.llm.predicted_ms=turnTimings.predicted_ms||0,turnStats.llm.prompt_n=turnTimings.prompt_n||0,turnStats.llm.prompt_ms=turnTimings.prompt_ms||0)}catch(error2){if(signal?.aborted){await onAssistantTurnComplete?.(turnContent,turnReasoningContent||void 0,this.buildFinalTimings(capturedTimings,agenticTimings),void 0),onFlowComplete?.(this.buildFinalTimings(capturedTimings,agenticTimings));return}const normalizedError=error2 instanceof
Error?error2:new Error("LLM stream error");throw onChunk?.(`${LLM_ERROR_BLOCK_START}${normalizedError.message}${LLM_ERROR_BLOCK_END}`),await onAssistantTurnComplete?.(turnContent+`${LLM_ERROR_BLOCK_START}${normalizedError.message}${LLM_ERROR_BLOCK_END}`,turnReasoningContent||void 0,this.buildFinalTimings(capturedTimings,agenticTimings),void 0),onFlowComplete?.(this.buildFinalTimings(capturedTimings,agenticTimings)),normalizedError}if(this._steeringMessages.has(conversationId)){console.log("[Agen\
ticStore] Steering message detected after turn, exiting agentic flow"),await onAssistantTurnComplete?.(turnContent,turnReasoningContent||void 0,this.buildFinalTimings(capturedTimings,agenticTimings),turnToolCalls.length>0?this.normalizeToolCalls(turnToolCalls):void 0),onFlowComplete?.(this.buildFinalTimings(capturedTimings,agenticTimings));return}if(turnToolCalls.length===0){agenticTimings.perTurn.push(turnStats);const finalTimings=this.buildFinalTimings(capturedTimings,agenticTimings);await onAssistantTurnComplete?.(
turnContent,turnReasoningContent||void 0,finalTimings,void 0),finalTimings&&onTurnComplete?.(finalTimings),onFlowComplete?.(finalTimings);return}const normalizedCalls=this.normalizeToolCalls(turnToolCalls);if(normalizedCalls.length===0){await onAssistantTurnComplete?.(turnContent,turnReasoningContent||void 0,this.buildFinalTimings(capturedTimings,agenticTimings),void 0),onFlowComplete?.(this.buildFinalTimings(capturedTimings,agenticTimings));return}totalToolCallCount+=normalizedCalls.length,this.
updateSession(conversationId,{totalToolCalls:totalToolCallCount}),await onAssistantTurnComplete?.(turnContent,turnReasoningContent||void 0,turnTimings,normalizedCalls),sessionMessages.push({role:MessageRole.ASSISTANT,content:turnContent||void 0,reasoning_content:turnReasoningContent||void 0,tool_calls:normalizedCalls});for(let i=0;i<normalizedCalls.length;i++){const toolCall=normalizedCalls[i];if(signal?.aborted){onFlowComplete?.(this.buildFinalTimings(capturedTimings,agenticTimings));return}if(this.
_steeringMessages.has(conversationId)){console.log(`[AgenticStore] Steering message detected, skipping ${normalizedCalls.length-i} remaining tool call(s)`);for(let j=i;j<normalizedCalls.length;j++){const remainingCall=normalizedCalls[j],interruptedContent="Tool execution was interrupted by a new user message.";createToolResultMessage&&await createToolResultMessage(remainingCall.id,interruptedContent),sessionMessages.push({role:MessageRole.TOOL,tool_call_id:remainingCall.id,content:interruptedContent})}
break}const toolName=toolCall.function.name,serverLabel=toolsStore.getToolServerLabel(toolName),permission=await this.requestPermission(conversationId,toolName,serverLabel,signal);if(await new Promise(r2=>setTimeout(r2,0)),signal?.aborted){onFlowComplete?.(this.buildFinalTimings(capturedTimings,agenticTimings));return}const toolStartTime=performance.now(),toolSource=toolsStore.getToolSource(toolName);let result,toolSuccess=!0;if(permission===ToolPermissionDecision.DENY)result="Tool execution was\
 denied by the user.",toolSuccess=!1;else try{if(toolSource===ToolSource.BUILTIN){const args=this.parseToolArguments(toolCall.function.arguments),executionResult=await ToolsService.executeTool(toolName,args,signal);result=executionResult.content,executionResult.isError&&(toolSuccess=!1)}else{const mcpCall={id:toolCall.id,function:{name:toolName,arguments:toolCall.function.arguments}};result=(await mcpStore.executeTool(mcpCall,signal)).content}}catch(error2){if(isAbortError(error2)){onFlowComplete?.(
this.buildFinalTimings(capturedTimings,agenticTimings));return}result=`Error: ${error2 instanceof Error?error2.message:String(error2)}`,toolSuccess=!1}const toolDurationMs=performance.now()-toolStartTime,toolTiming={name:toolCall.function.name,duration_ms:Math.round(toolDurationMs),success:toolSuccess};if(agenticTimings.toolCalls.push(toolTiming),agenticTimings.toolCallsCount++,agenticTimings.toolsMs+=Math.round(toolDurationMs),turnStats.toolCalls.push(toolTiming),turnStats.toolsMs+=Math.round(toolDurationMs),
signal?.aborted){onFlowComplete?.(this.buildFinalTimings(capturedTimings,agenticTimings));return}const{cleanedResult,attachments}=this.extractBase64Attachments(result);let toolResultMessage;createToolResultMessage&&(toolResultMessage=await createToolResultMessage(toolCall.id,cleanedResult,attachments.length>0?attachments:void 0)),attachments.length>0&&toolResultMessage&&onAttachments?.(toolResultMessage.id,attachments);const contentParts=[{type:ContentPartType.TEXT,text:cleanedResult}];for(const attachment of attachments)
attachment.type===AttachmentType.IMAGE&&(modelsStore.modelSupportsVision(effectiveModel)?contentParts.push({type:ContentPartType.IMAGE_URL,image_url:{url:attachment.base64Url}}):console.info(`[AgenticStore] Skipping image attachment (model "${effectiveModel}" does not support vision)`));sessionMessages.push({role:MessageRole.TOOL,tool_call_id:toolCall.id,content:contentParts.length===1?cleanedResult:contentParts})}if(turnStats.toolCalls.length>0){agenticTimings.perTurn.push(turnStats);const intermediateTimings=this.
buildFinalTimings(capturedTimings,agenticTimings);intermediateTimings&&onTurnComplete?.(intermediateTimings)}if(this._steeringMessages.has(conversationId)){console.log("[AgenticStore] Steering message detected after tool execution, exiting agentic flow"),onFlowComplete?.(this.buildFinalTimings(capturedTimings,agenticTimings));return}turn++}}buildFinalTimings(capturedTimings,agenticTimings){return agenticTimings.toolCallsCount===0?capturedTimings:{predicted_n:capturedTimings?.predicted_n,predicted_ms:capturedTimings?.
predicted_ms,prompt_n:capturedTimings?.prompt_n,prompt_ms:capturedTimings?.prompt_ms,cache_n:capturedTimings?.cache_n,agentic:agenticTimings}}normalizeToolCalls(toolCalls){return toolCalls?toolCalls.map((call,index2)=>({id:call?.id??`tool_${index2}`,type:call?.type??ToolCallType.FUNCTION,function:{name:call?.function?.name??"",arguments:call?.function?.arguments??""}})):[]}extractBase64Attachments(result){if(!result.trim())return{cleanedResult:result,attachments:[]};const lines=result.split(NEWLINE_SEPARATOR),
attachments=[];let attachmentIndex=0;return{cleanedResult:lines.map(line=>{const trimmedLine=line.trim(),match=trimmedLine.match(DATA_URI_BASE64_REGEX);if(!match)return line;const mimeType=match[1].toLowerCase();if(!match[2])return line;attachmentIndex+=1;const name=this.buildAttachmentName(mimeType,attachmentIndex);return mimeType.startsWith(MimeTypePrefix.IMAGE)?(attachments.push({type:AttachmentType.IMAGE,name,base64Url:trimmedLine}),`[Attachment saved: ${name}]`):line}).join(NEWLINE_SEPARATOR),
attachments}}buildAttachmentName(mimeType,index2){const extension2=IMAGE_MIME_TO_EXTENSION[mimeType]??DEFAULT_IMAGE_EXTENSION;return`${MCP_ATTACHMENT_NAME_PREFIX}-${Date.now()}-${index2}.${extension2}`}}const agenticStore=new AgenticStore;function agenticPendingPermissionRequest(conversationId){return agenticStore.pendingPermissionRequest(conversationId)}function agenticResolvePermission(conversationId,decision){agenticStore.resolvePermission(conversationId,decision)}function agenticPendingContinueRequest(conversationId){
return agenticStore.pendingContinueRequest(conversationId)}function agenticResolveContinue(conversationId,shouldContinue){agenticStore.resolveContinue(conversationId,shouldContinue)}function agenticInjectSteeringMessage(conversationId,content2,extras){agenticStore.injectSteeringMessage(conversationId,content2,extras)}function agenticPendingSteeringMessageContent(conversationId){return agenticStore.pendingSteeringMessageContent(conversationId)}function agenticPendingSteeringMessageExtras(conversationId){
return agenticStore.pendingSteeringMessageExtras(conversationId)}function agenticClearSteeringMessage(conversationId){agenticStore.clearSteeringMessage(conversationId)}class ChatStore{#activeProcessingState=state$1(null);get activeProcessingState(){return get$3(this.#activeProcessingState)}set activeProcessingState(value){set$1(this.#activeProcessingState,value,!0)}#currentResponse=state$1("");get currentResponse(){return get$3(this.#currentResponse)}set currentResponse(value){set$1(this.#currentResponse,
value,!0)}#errorDialogState=state$1(null);get errorDialogState(){return get$3(this.#errorDialogState)}set errorDialogState(value){set$1(this.#errorDialogState,value,!0)}#isLoading=state$1(!1);get isLoading(){return get$3(this.#isLoading)}set isLoading(value){set$1(this.#isLoading,value,!0)}chatLoadingStates=new SvelteMap;chatStreamingStates=new SvelteMap;abortControllers=new SvelteMap;preEncodeAbortController=null;processingStates=new SvelteMap;conversationStateTimestamps=new SvelteMap;#activeConversationId=state$1(
null);get activeConversationId(){return get$3(this.#activeConversationId)}set activeConversationId(value){set$1(this.#activeConversationId,value,!0)}#isStreamingActive=state$1(!1);get isStreamingActive(){return get$3(this.#isStreamingActive)}set isStreamingActive(value){set$1(this.#isStreamingActive,value,!0)}#isEditModeActive=state$1(!1);get isEditModeActive(){return get$3(this.#isEditModeActive)}set isEditModeActive(value){set$1(this.#isEditModeActive,value,!0)}#addFilesHandler=state$1(null);get addFilesHandler(){
return get$3(this.#addFilesHandler)}set addFilesHandler(value){set$1(this.#addFilesHandler,value,!0)}#pendingEditMessageId=state$1(null);get pendingEditMessageId(){return get$3(this.#pendingEditMessageId)}set pendingEditMessageId(value){set$1(this.#pendingEditMessageId,value,!0)}messageUpdateCallback=null;#_pendingDraftMessage=state$1("");get _pendingDraftMessage(){return get$3(this.#_pendingDraftMessage)}set _pendingDraftMessage(value){set$1(this.#_pendingDraftMessage,value,!0)}#_pendingDraftFiles=state$1(
proxy([]));get _pendingDraftFiles(){return get$3(this.#_pendingDraftFiles)}set _pendingDraftFiles(value){set$1(this.#_pendingDraftFiles,value,!0)}_pendingMessages=new SvelteMap;setChatLoading(convId,loading){this.touchConversationState(convId),loading?(this.chatLoadingStates.set(convId,!0),convId===conversationsStore.activeConversation?.id&&(this.isLoading=!0)):(this.chatLoadingStates.delete(convId),convId===conversationsStore.activeConversation?.id&&(this.isLoading=!1))}setChatStreaming(convId,response,messageId){
this.touchConversationState(convId),this.chatStreamingStates.set(convId,{response,messageId}),convId===conversationsStore.activeConversation?.id&&(this.currentResponse=response)}clearChatStreaming(convId){this.chatStreamingStates.delete(convId),convId===conversationsStore.activeConversation?.id&&(this.currentResponse="")}getChatStreaming(convId){return this.chatStreamingStates.get(convId)}syncLoadingStateForChat(convId){this.isLoading=this.chatLoadingStates.get(convId)||!1;const s2=this.chatStreamingStates.
get(convId);if(this.currentResponse=s2?.response||"",this.isStreamingActive=s2!==void 0,this.setActiveProcessingConversation(convId),s2?.response&&s2?.messageId){const idx=conversationsStore.findMessageIndex(s2.messageId);idx!==-1&&conversationsStore.updateMessageAtIndex(idx,{content:s2.response})}}clearUIState(){this.isLoading=!1,this.currentResponse="",this.isStreamingActive=!1}setActiveProcessingConversation(conversationId){this.activeConversationId=conversationId,this.activeProcessingState=conversationId&&
this.processingStates.get(conversationId)||null}getProcessingState(conversationId){return this.processingStates.get(conversationId)||null}setProcessingState(conversationId,state2){state2===null?this.processingStates.delete(conversationId):this.processingStates.set(conversationId,state2),conversationId===this.activeConversationId&&(this.activeProcessingState=state2)}clearProcessingState(conversationId){this.processingStates.delete(conversationId),conversationId===this.activeConversationId&&(this.
activeProcessingState=null)}getActiveProcessingState(){return this.activeProcessingState}getCurrentProcessingStateSync(){return this.activeProcessingState}setStreamingActive(active){this.isStreamingActive=active}isStreaming(){return this.isStreamingActive}getOrCreateAbortController(convId){let c2=this.abortControllers.get(convId);return(!c2||c2.signal.aborted)&&(c2=new AbortController,this.abortControllers.set(convId,c2)),c2}abortRequest(convId){if(convId){const c2=this.abortControllers.get(convId);
c2&&(c2.abort(),this.abortControllers.delete(convId))}else{for(const c2 of this.abortControllers.values())c2.abort();this.abortControllers.clear()}}abortCurrentFlow(convId){const c2=this.abortControllers.get(convId);c2&&(c2.abort(),this.abortControllers.delete(convId))}showErrorDialog(state2){this.errorDialogState=state2}dismissErrorDialog(){this.errorDialogState=null}clearEditMode(){this.isEditModeActive=!1,this.addFilesHandler=null}isEditing(){return this.isEditModeActive}setEditModeActive(handler){
this.isEditModeActive=!0,this.addFilesHandler=handler}getAddFilesHandler(){return this.addFilesHandler}clearPendingEditMessageId(){this.pendingEditMessageId=null}savePendingDraft(message,files){this._pendingDraftMessage=message,this._pendingDraftFiles=[...files]}consumePendingDraft(){if(!this._pendingDraftMessage&&this._pendingDraftFiles.length===0)return null;const d2={message:this._pendingDraftMessage,files:[...this._pendingDraftFiles]};return this._pendingDraftMessage="",this._pendingDraftFiles=
[],d2}hasPendingDraft(){return!!this._pendingDraftMessage||this._pendingDraftFiles.length>0}getAllLoadingChats(){return Array.from(this.chatLoadingStates.keys())}getAllStreamingChats(){return Array.from(this.chatStreamingStates.keys())}getChatStreamingPublic(convId){return this.getChatStreaming(convId)}isChatLoadingPublic(convId){return this.chatLoadingStates.get(convId)||!1}isChatLoadingInternal(convId){return this.chatLoadingStates.has(convId)||this.chatStreamingStates.has(convId)}hasPendingMessage(convId){
return this._pendingMessages.has(convId)}pendingMessageContent(convId){return this._pendingMessages.get(convId)?.content??null}pendingMessageExtras(convId){return this._pendingMessages.get(convId)?.extras}injectPendingMessage(convId,content2,extras){this._pendingMessages.set(convId,{content:content2,extras})}clearPendingMessage(convId){this._pendingMessages.delete(convId)}consumePendingMessage(convId){const msg=this._pendingMessages.get(convId);return msg?(this._pendingMessages.delete(convId),msg):
null}touchConversationState(convId){this.conversationStateTimestamps.set(convId,{lastAccessed:Date.now()})}cleanupOldConversationStates(activeConversationIds){const now2=Date.now(),activeIdsList=activeConversationIds??[],preserveIds=this.activeConversationId?[...activeIdsList,this.activeConversationId]:activeIdsList,allConvIds=[...new Set([...this.chatLoadingStates.keys(),...this.chatStreamingStates.keys(),...this.abortControllers.keys(),...this.processingStates.keys(),...this.conversationStateTimestamps.
keys()])],cleanupCandidates=[];for(const convId of allConvIds){if(preserveIds.includes(convId)||this.chatLoadingStates.get(convId)||this.chatStreamingStates.has(convId))continue;const ts=this.conversationStateTimestamps.get(convId);cleanupCandidates.push({convId,lastAccessed:ts?.lastAccessed??0})}cleanupCandidates.sort((a,b)=>a.lastAccessed-b.lastAccessed);let cleanedUp=0;for(const{convId,lastAccessed}of cleanupCandidates)(cleanupCandidates.length-cleanedUp>MAX_INACTIVE_CONVERSATION_STATES||now2-
lastAccessed>INACTIVE_CONVERSATION_STATE_MAX_AGE_MS)&&(this.cleanupConversationState(convId),cleanedUp++);return cleanedUp}cleanupConversationState(convId){const c2=this.abortControllers.get(convId);c2&&!c2.signal.aborted&&c2.abort(),this.chatLoadingStates.delete(convId),this.chatStreamingStates.delete(convId),this.abortControllers.delete(convId),this.processingStates.delete(convId),this.conversationStateTimestamps.delete(convId)}getTrackedConversationCount(){return new Set([...this.chatLoadingStates.
keys(),...this.chatStreamingStates.keys(),...this.abortControllers.keys(),...this.processingStates.keys()]).size}getMessageByIdWithRole(messageId,expectedRole){const index2=conversationsStore.findMessageIndex(messageId);if(index2===-1)return null;const message=conversationsStore.activeMessages[index2];return expectedRole&&message.role!==expectedRole?null:{message,index:index2}}async addMessage(role,content2,type2=MessageType.TEXT,parent="-1",extras){const activeConv=conversationsStore.activeConversation;
if(!activeConv)throw new Error("No active conversation");let parentId=null;if(parent==="-1"){const am=conversationsStore.activeMessages;if(am.length>0)parentId=am[am.length-1].id;else{const r2=(await conversationsStore.getConversationMessages(activeConv.id)).find(m=>m.parent===null&&m.type==="root");parentId=r2?r2.id:await DatabaseService.createRootMessage(activeConv.id)}}else parentId=parent;const message=await DatabaseService.createMessageBranch({convId:activeConv.id,role,content:content2,type:type2,
timestamp:Date.now(),toolCalls:"",children:[],extra:extras},parentId);return conversationsStore.addMessageToActive(message),await conversationsStore.updateCurrentNode(message.id),conversationsStore.updateConversationTimestamp(),message}async addSystemPrompt(){let activeConv=conversationsStore.activeConversation;if(activeConv||(await conversationsStore.createConversation(),activeConv=conversationsStore.activeConversation),!!activeConv)try{const allMessages=await conversationsStore.getConversationMessages(
activeConv.id),rootMessage=allMessages.find(m=>m.type==="root"&&m.parent===null),rootId=rootMessage?rootMessage.id:await DatabaseService.createRootMessage(activeConv.id),existingSystemMessage=allMessages.find(m=>m.role===MessageRole.SYSTEM&&m.parent===rootId);if(existingSystemMessage){this.pendingEditMessageId=existingSystemMessage.id,conversationsStore.activeMessages.some(m=>m.id===existingSystemMessage.id)||conversationsStore.activeMessages.unshift(existingSystemMessage);return}const firstActiveMessage=conversationsStore.
activeMessages.find(m=>m.parent===rootId),systemMessage=await DatabaseService.createSystemMessage(activeConv.id,SYSTEM_MESSAGE_PLACEHOLDER,rootId);if(firstActiveMessage){await DatabaseService.updateMessage(firstActiveMessage.id,{parent:systemMessage.id}),await DatabaseService.updateMessage(systemMessage.id,{children:[firstActiveMessage.id]});const updatedRootChildren=rootMessage?rootMessage.children.filter(id2=>id2!==firstActiveMessage.id):[];await DatabaseService.updateMessage(rootId,{children:[
...updatedRootChildren.filter(id2=>id2!==systemMessage.id),systemMessage.id]});const firstMsgIndex=conversationsStore.findMessageIndex(firstActiveMessage.id);firstMsgIndex!==-1&&conversationsStore.updateMessageAtIndex(firstMsgIndex,{parent:systemMessage.id})}conversationsStore.activeMessages.unshift(systemMessage),this.pendingEditMessageId=systemMessage.id,conversationsStore.updateConversationTimestamp()}catch(error2){console.error("Failed to add system prompt:",error2)}}async removeSystemPromptPlaceholder(messageId){
const activeConv=conversationsStore.activeConversation;if(!activeConv)return!1;try{const allMessages=await conversationsStore.getConversationMessages(activeConv.id),systemMessage=findMessageById(allMessages,messageId);if(!systemMessage||systemMessage.role!==MessageRole.SYSTEM)return!1;const rootMessage=allMessages.find(m=>m.type==="root"&&m.parent===null);if(!rootMessage)return!1;if(allMessages.length===2&&systemMessage.children.length===0)return await conversationsStore.deleteConversation(activeConv.
id),!0;for(const childId of systemMessage.children){await DatabaseService.updateMessage(childId,{parent:rootMessage.id});const childIndex=conversationsStore.findMessageIndex(childId);childIndex!==-1&&conversationsStore.updateMessageAtIndex(childIndex,{parent:rootMessage.id})}await DatabaseService.updateMessage(rootMessage.id,{children:[...rootMessage.children.filter(id2=>id2!==messageId),...systemMessage.children]}),await DatabaseService.deleteMessage(messageId);const systemIndex=conversationsStore.
findMessageIndex(messageId);return systemIndex!==-1&&conversationsStore.activeMessages.splice(systemIndex,1),conversationsStore.updateConversationTimestamp(),!1}catch(error2){return console.error("Failed to remove system prompt placeholder:",error2),!1}}async createAssistantMessage(parentId){const activeConv=conversationsStore.activeConversation;if(!activeConv)throw new Error("No active conversation");return await DatabaseService.createMessageBranch({convId:activeConv.id,type:MessageType.TEXT,role:MessageRole.
ASSISTANT,content:"",timestamp:Date.now(),toolCalls:"",children:[],model:null},parentId||null)}async sendMessage(content2,extras){if(!content2.trim()&&(!extras||extras.length===0))return;const activeConv=conversationsStore.activeConversation;if(activeConv&&agenticStore.isRunning(activeConv.id)){agenticStore.injectSteeringMessage(activeConv.id,content2,extras);return}if(activeConv&&this.isChatLoadingInternal(activeConv.id)){this.injectPendingMessage(activeConv.id,content2,extras);return}this.cancelPreEncode();
const resourceExtras=mcpStore.consumeResourceAttachmentsAsExtras(),allExtras=resourceExtras.length>0?[...extras||[],...resourceExtras]:extras;let isNewConversation=!1;activeConv||(await conversationsStore.createConversation(),isNewConversation=!0);const currentConv=conversationsStore.activeConversation;if(currentConv){this.showErrorDialog(null),this.setChatLoading(currentConv.id,!0),this.clearChatStreaming(currentConv.id);try{let parentIdForUserMessage;if(isNewConversation){const rootId=await DatabaseService.
createRootMessage(currentConv.id),systemPrompt=config$1().systemMessage?.toString().trim();if(systemPrompt){const systemMessage=await DatabaseService.createSystemMessage(currentConv.id,systemPrompt,rootId);conversationsStore.addMessageToActive(systemMessage),parentIdForUserMessage=systemMessage.id}else parentIdForUserMessage=rootId}const userMessage=await this.addMessage(MessageRole.USER,content2,MessageType.TEXT,parentIdForUserMessage??"-1",allExtras);isNewConversation&&content2&&await conversationsStore.
updateConversationName(currentConv.id,generateConversationTitle(content2,!!config$1().titleGenerationUseFirstLine));const assistantMessage=await this.createAssistantMessage(userMessage.id);conversationsStore.addMessageToActive(assistantMessage),await this.streamChatCompletion(conversationsStore.activeMessages.slice(0,-1),assistantMessage,void 0,void 0,void 0,config$1().titleGenerationUseLLM&&isNewConversation?content2:void 0)}catch(error2){if(isAbortError(error2)){this.setChatLoading(currentConv.
id,!1);return}console.error("Failed to send message:",error2),this.setChatLoading(currentConv.id,!1);const dialogType=error2 instanceof Error&&error2.name==="TimeoutError"?ErrorDialogType.TIMEOUT:ErrorDialogType.SERVER,contextInfo=error2.contextInfo;this.showErrorDialog({type:dialogType,message:error2 instanceof Error?error2.message:"Unknown error",contextInfo})}}}async streamChatCompletion(allMessages,assistantMessage,onComplete,onError,modelOverride,firstUserMessageContent){let effectiveModel=modelOverride;
if(isRouterMode()&&!effectiveModel){const conversationModel=this.getConversationModel(allMessages);effectiveModel=selectedModelName()||conversationModel}isRouterMode()&&effectiveModel&&(modelsStore.getModelProps(effectiveModel)||await modelsStore.fetchModelProps(effectiveModel));let currentMessageId=assistantMessage.id,streamedContent="",streamedReasoningContent="",resolvedModel=null,modelPersisted=!1;const convId=assistantMessage.convId,recordModel=(modelName,persistImmediately=!0)=>{if(!modelName)
return;const n=normalizeModelName(modelName);if(!n||n===resolvedModel)return;resolvedModel=n;const idx=conversationsStore.findMessageIndex(currentMessageId);conversationsStore.updateMessageAtIndex(idx,{model:n}),persistImmediately&&!modelPersisted&&(modelPersisted=!0,DatabaseService.updateMessage(currentMessageId,{model:n}).catch(()=>{modelPersisted=!1,resolvedModel=null}))},updateStreamingUI=()=>{this.setChatStreaming(convId,streamedContent,currentMessageId);const idx=conversationsStore.findMessageIndex(
currentMessageId);conversationsStore.updateMessageAtIndex(idx,{content:streamedContent})},cleanupStreamingState=()=>{this.setStreamingActive(!1),this.setChatLoading(convId,!1),this.clearChatStreaming(convId),this.setProcessingState(convId,null)};this.setStreamingActive(!0),this.setActiveProcessingConversation(convId);const abortController=this.getOrCreateAbortController(convId),streamCallbacks={onChunk:chunk=>{streamedContent+=chunk,updateStreamingUI()},onReasoningChunk:chunk=>{streamedReasoningContent+=
chunk;const idx=conversationsStore.findMessageIndex(currentMessageId);conversationsStore.updateMessageAtIndex(idx,{reasoningContent:streamedReasoningContent})},onToolCallsStreaming:toolCalls=>{const idx=conversationsStore.findMessageIndex(currentMessageId);conversationsStore.updateMessageAtIndex(idx,{toolCalls:JSON.stringify(toolCalls)})},onAttachments:(messageId,extras)=>{if(!extras.length)return;const idx=conversationsStore.findMessageIndex(messageId);if(idx===-1)return;const updatedExtras=[...conversationsStore.
activeMessages[idx].extra||[],...extras];conversationsStore.updateMessageAtIndex(idx,{extra:updatedExtras}),DatabaseService.updateMessage(messageId,{extra:updatedExtras}).catch(console.error)},onModel:modelName=>recordModel(modelName),onTurnComplete:intermediateTimings=>{const idx=conversationsStore.findMessageIndex(assistantMessage.id);conversationsStore.updateMessageAtIndex(idx,{timings:intermediateTimings})},onTimings:(timings,promptProgress)=>{const tokensPerSecond=timings?.predicted_ms&&timings?.
predicted_n?timings.predicted_n/timings.predicted_ms*1e3:0;this.updateProcessingStateFromTimings({prompt_n:timings?.prompt_n||0,prompt_ms:timings?.prompt_ms,predicted_n:timings?.predicted_n||0,predicted_per_second:tokensPerSecond,cache_n:timings?.cache_n||0,prompt_progress:promptProgress},convId)},onAssistantTurnComplete:async(content2,reasoningContent,timings,toolCalls)=>{const updateData={content:content2,reasoningContent:reasoningContent||void 0,toolCalls:toolCalls?JSON.stringify(toolCalls):"",
timings};resolvedModel&&!modelPersisted&&(updateData.model=resolvedModel),await DatabaseService.updateMessage(currentMessageId,updateData);const idx=conversationsStore.findMessageIndex(currentMessageId),uiUpdate={content:content2,reasoningContent:reasoningContent||void 0,toolCalls:toolCalls?JSON.stringify(toolCalls):""};timings&&(uiUpdate.timings=timings),resolvedModel&&(uiUpdate.model=resolvedModel),conversationsStore.updateMessageAtIndex(idx,uiUpdate),await conversationsStore.updateCurrentNode(
currentMessageId)},createToolResultMessage:async(toolCallId,content2,extras)=>{const msg=await DatabaseService.createMessageBranch({convId,type:MessageType.TEXT,role:MessageRole.TOOL,content:content2,toolCallId,timestamp:Date.now(),toolCalls:"",children:[],extra:extras},currentMessageId);return conversationsStore.addMessageToActive(msg),await conversationsStore.updateCurrentNode(msg.id),msg},createAssistantMessage:async()=>{streamedContent="",streamedReasoningContent="";const lastMsg=conversationsStore.
activeMessages[conversationsStore.activeMessages.length-1],msg=await DatabaseService.createMessageBranch({convId,type:MessageType.TEXT,role:MessageRole.ASSISTANT,content:"",timestamp:Date.now(),toolCalls:"",children:[],model:resolvedModel},lastMsg.id);return conversationsStore.addMessageToActive(msg),currentMessageId=msg.id,msg},onFlowComplete:finalTimings=>{if(finalTimings){const idx=conversationsStore.findMessageIndex(assistantMessage.id);conversationsStore.updateMessageAtIndex(idx,{timings:finalTimings}),
DatabaseService.updateMessage(assistantMessage.id,{timings:finalTimings}).catch(console.error)}cleanupStreamingState(),onComplete&&onComplete(streamedContent),isRouterMode()&&modelsStore.fetchRouterModels().catch(console.error),config$1().preEncodeConversation&&this.triggerPreEncode(allMessages,assistantMessage,streamedContent,effectiveModel,!!config$1().excludeReasoningFromContext)},onError:error2=>{if(this.setStreamingActive(!1),isAbortError(error2)){cleanupStreamingState();const pending=this.
consumePendingMessage(convId);pending&&this.sendMessage(pending.content,pending.extras);return}console.error("Streaming error:",error2),cleanupStreamingState(),this.clearPendingMessage(convId);const idx=conversationsStore.findMessageIndex(assistantMessage.id);if(idx!==-1){const failedMessage=conversationsStore.removeMessageAtIndex(idx);failedMessage&&DatabaseService.deleteMessage(failedMessage.id).catch(console.error)}const contextInfo=error2.contextInfo;this.showErrorDialog({type:error2.name===
"TimeoutError"?ErrorDialogType.TIMEOUT:ErrorDialogType.SERVER,message:error2.message,contextInfo}),onError&&onError(error2)}},perChatOverrides=conversationsStore.activeConversation?.mcpServerOverrides;if((await agenticStore.runAgenticFlow({conversationId:convId,messages:allMessages,options:{...this.getApiOptions(),...effectiveModel?{model:effectiveModel}:{}},callbacks:streamCallbacks,signal:abortController.signal,perChatOverrides})).handled){firstUserMessageContent&&await this.generateTitleWithLLM(
firstUserMessageContent,streamedContent,convId);const pending=agenticStore.consumePendingSteeringMessage(convId);pending&&await this.sendMessage(pending.content,pending.extras);return}await ChatService.sendMessage(allMessages,{...this.getApiOptions(),...effectiveModel?{model:effectiveModel}:{},stream:!0,onChunk:streamCallbacks.onChunk,onReasoningChunk:streamCallbacks.onReasoningChunk,onModel:streamCallbacks.onModel,onTimings:streamCallbacks.onTimings,onComplete:async(finalContent,reasoningContent,timings,toolCalls)=>{
const content2=streamedContent||finalContent||"",reasoning=streamedReasoningContent||reasoningContent,updateData={content:content2,reasoningContent:reasoning||void 0,toolCalls:toolCalls||"",timings};resolvedModel&&!modelPersisted&&(updateData.model=resolvedModel),await DatabaseService.updateMessage(currentMessageId,updateData);const idx=conversationsStore.findMessageIndex(currentMessageId),uiUpdate={content:content2,reasoningContent:reasoning||void 0,toolCalls:toolCalls||""};timings&&(uiUpdate.timings=
timings),resolvedModel&&(uiUpdate.model=resolvedModel),conversationsStore.updateMessageAtIndex(idx,uiUpdate),await conversationsStore.updateCurrentNode(currentMessageId),cleanupStreamingState(),onComplete&&await onComplete(content2),isRouterMode()&&modelsStore.fetchRouterModels().catch(console.error),firstUserMessageContent&&await this.generateTitleWithLLM(firstUserMessageContent,streamedContent,convId);const pending=this.consumePendingMessage(convId);pending&&await this.sendMessage(pending.content,
pending.extras)},onError:streamCallbacks.onError},convId,abortController.signal)}async stopGeneration(){const activeConv=conversationsStore.activeConversation;activeConv&&await this.stopGenerationForChat(activeConv.id)}async stopGenerationForChat(convId){await this.savePartialResponseIfNeeded(convId),this.setStreamingActive(!1),this.abortRequest(convId),this.setChatLoading(convId,!1),this.clearChatStreaming(convId),this.setProcessingState(convId,null),this.clearPendingMessage(convId)}async generateTitleWithLLM(userContent,assistantContent,convId){
const effectiveModel=isRouterMode()&&selectedModelName()?selectedModelName():void 0,configValue=config$1(),titlePrompt=(typeof configValue.titleGenerationPrompt=="string"&&configValue.titleGenerationPrompt.trim()?configValue.titleGenerationPrompt:TITLE_GENERATION.DEFAULT_PROMPT).replace("{{USER}}",String(userContent||"")).replace("{{ASSISTANT}}",String(assistantContent||"")),titleMessage={role:MessageRole.USER,content:titlePrompt},titleResponse=await ChatService.generateTitle(titleMessage,effectiveModel);
if(!titleResponse)return;let cleanTitle=titleResponse.trim();if(cleanTitle=cleanTitle.replace(TITLE_GENERATION.PREFIX_PATTERN,"").replace(TITLE_GENERATION.QUOTE_PATTERN,"").trim(),!cleanTitle||cleanTitle.length<TITLE_GENERATION.MIN_LENGTH){const firstLine=userContent.split(`
`).find(l=>l.trim().length>0);cleanTitle=firstLine?firstLine.trim():TITLE_GENERATION.FALLBACK}cleanTitle&&cleanTitle.length>=TITLE_GENERATION.MIN_LENGTH&&await conversationsStore.updateConversationName(convId,cleanTitle)}async savePartialResponseIfNeeded(convId){const conversationId=convId||conversationsStore.activeConversation?.id;if(!conversationId)return;const streamingState=this.getChatStreaming(conversationId);if(!streamingState||!streamingState.response.trim())return;const messages=conversationId===
conversationsStore.activeConversation?.id?conversationsStore.activeMessages:await conversationsStore.getConversationMessages(conversationId);if(!messages.length)return;const lastMessage=messages[messages.length-1];if(lastMessage?.role===MessageRole.ASSISTANT)try{const updateData={content:streamingState.response},lastKnownState=this.getProcessingState(conversationId);lastKnownState&&(updateData.timings={prompt_n:lastKnownState.promptTokens||0,prompt_ms:lastKnownState.promptMs,predicted_n:lastKnownState.
tokensDecoded||0,cache_n:lastKnownState.cacheTokens||0,predicted_ms:lastKnownState.tokensPerSecond&&lastKnownState.tokensDecoded?lastKnownState.tokensDecoded/lastKnownState.tokensPerSecond*1e3:void 0}),await DatabaseService.updateMessage(lastMessage.id,updateData),lastMessage.content=streamingState.response,updateData.timings&&(lastMessage.timings=updateData.timings)}catch(error2){lastMessage.content=streamingState.response,console.error("Failed to save partial response:",error2)}}async updateMessage(messageId,newContent){
const activeConv=conversationsStore.activeConversation;if(!activeConv)return;this.isChatLoadingInternal(activeConv.id)&&await this.stopGeneration();const result=this.getMessageByIdWithRole(messageId,MessageRole.USER);if(!result)return;const{message:messageToUpdate,index:messageIndex}=result,originalContent=messageToUpdate.content;try{const rootMessage=(await conversationsStore.getConversationMessages(activeConv.id)).find(m=>m.type==="root"&&m.parent===null),isFirstUserMessage=rootMessage&&messageToUpdate.
parent===rootMessage.id;conversationsStore.updateMessageAtIndex(messageIndex,{content:newContent}),await DatabaseService.updateMessage(messageId,{content:newContent}),isFirstUserMessage&&newContent.trim()&&await conversationsStore.updateConversationTitleWithConfirmation(activeConv.id,generateConversationTitle(newContent,!!config$1().titleGenerationUseFirstLine));const messagesToRemove=conversationsStore.activeMessages.slice(messageIndex+1);for(const message of messagesToRemove)await DatabaseService.
deleteMessage(message.id);conversationsStore.sliceActiveMessages(messageIndex+1),conversationsStore.updateConversationTimestamp(),this.setChatLoading(activeConv.id,!0),this.clearChatStreaming(activeConv.id);const assistantMessage=await this.createAssistantMessage();conversationsStore.addMessageToActive(assistantMessage),await conversationsStore.updateCurrentNode(assistantMessage.id),await this.streamChatCompletion(conversationsStore.activeMessages.slice(0,-1),assistantMessage,void 0,()=>{conversationsStore.
updateMessageAtIndex(conversationsStore.findMessageIndex(messageId),{content:originalContent})})}catch(error2){isAbortError(error2)||console.error("Failed to update message:",error2)}}async regenerateMessage(messageId){const activeConv=conversationsStore.activeConversation;if(!activeConv||this.isChatLoadingInternal(activeConv.id))return;this.cancelPreEncode();const result=this.getMessageByIdWithRole(messageId,MessageRole.ASSISTANT);if(!result)return;const{index:messageIndex}=result;try{const messagesToRemove=conversationsStore.
activeMessages.slice(messageIndex);for(const message of messagesToRemove)await DatabaseService.deleteMessage(message.id);conversationsStore.sliceActiveMessages(messageIndex),conversationsStore.updateConversationTimestamp(),this.setChatLoading(activeConv.id,!0),this.clearChatStreaming(activeConv.id);const parentMessageId=conversationsStore.activeMessages.length>0?conversationsStore.activeMessages[conversationsStore.activeMessages.length-1].id:void 0,assistantMessage=await this.createAssistantMessage(
parentMessageId);conversationsStore.addMessageToActive(assistantMessage),await this.streamChatCompletion(conversationsStore.activeMessages.slice(0,-1),assistantMessage)}catch(error2){isAbortError(error2)||console.error("Failed to regenerate message:",error2),this.setChatLoading(activeConv?.id||"",!1)}}async regenerateMessageWithBranching(messageId,modelOverride){const activeConv=conversationsStore.activeConversation;if(!(!activeConv||this.isChatLoadingInternal(activeConv.id))){this.cancelPreEncode();
try{const idx=conversationsStore.findMessageIndex(messageId);if(idx===-1)return;const msg=conversationsStore.activeMessages[idx];if(msg.role!==MessageRole.ASSISTANT)return;const allMessages=await conversationsStore.getConversationMessages(activeConv.id),parentMessage=findMessageById(allMessages,msg.parent);if(!parentMessage)return;this.setChatLoading(activeConv.id,!0),this.clearChatStreaming(activeConv.id);const newAssistantMessage=await DatabaseService.createMessageBranch({convId:msg.convId,type:msg.
type,timestamp:Date.now(),role:msg.role,content:"",toolCalls:"",children:[],model:null},parentMessage.id);await conversationsStore.updateCurrentNode(newAssistantMessage.id),conversationsStore.updateConversationTimestamp(),await conversationsStore.refreshActiveMessages();const conversationPath=filterByLeafNodeId(allMessages,parentMessage.id,!1),modelToUse=modelOverride||msg.model||void 0;await this.streamChatCompletion(conversationPath,newAssistantMessage,void 0,void 0,modelToUse)}catch(error2){isAbortError(
error2)||console.error("Failed to regenerate message with branching:",error2),this.setChatLoading(activeConv?.id||"",!1)}}}async getDeletionInfo(messageId){const activeConv=conversationsStore.activeConversation;if(!activeConv)return{totalCount:0,userMessages:0,assistantMessages:0,messageTypes:[]};const allMessages=await conversationsStore.getConversationMessages(activeConv.id);if(findMessageById(allMessages,messageId)?.role===MessageRole.SYSTEM){const messagesToDelete2=allMessages.filter(m=>m.id===
messageId);let userMessages2=0,assistantMessages2=0;const messageTypes2=[];for(const msg of messagesToDelete2)msg.role===MessageRole.USER?(userMessages2++,messageTypes2.includes("user message")||messageTypes2.push("user message")):msg.role===MessageRole.ASSISTANT&&(assistantMessages2++,messageTypes2.includes("assistant response")||messageTypes2.push("assistant response"));return{totalCount:1,userMessages:userMessages2,assistantMessages:assistantMessages2,messageTypes:messageTypes2}}const descendants=findDescendantMessages(
allMessages,messageId),allToDelete=[messageId,...descendants],messagesToDelete=allMessages.filter(m=>allToDelete.includes(m.id));let userMessages=0,assistantMessages=0;const messageTypes=[];for(const msg of messagesToDelete)msg.role===MessageRole.USER?(userMessages++,messageTypes.includes("user message")||messageTypes.push("user message")):msg.role===MessageRole.ASSISTANT&&(assistantMessages++,messageTypes.includes("assistant response")||messageTypes.push("assistant response"));return{totalCount:allToDelete.
length,userMessages,assistantMessages,messageTypes}}async deleteMessage(messageId){const activeConv=conversationsStore.activeConversation;if(activeConv)try{const allMessages=await conversationsStore.getConversationMessages(activeConv.id),messageToDelete=findMessageById(allMessages,messageId);if(!messageToDelete)return;if(filterByLeafNodeId(allMessages,activeConv.currNode||"",!1).some(m=>m.id===messageId)&&messageToDelete.parent){const siblings2=allMessages.filter(m=>m.parent===messageToDelete.parent&&
m.id!==messageId);if(siblings2.length>0){const latestSibling=siblings2.reduce((latest,sibling2)=>sibling2.timestamp>latest.timestamp?sibling2:latest);await conversationsStore.updateCurrentNode(findLeafNode(allMessages,latestSibling.id))}else messageToDelete.parent&&await conversationsStore.updateCurrentNode(findLeafNode(allMessages,messageToDelete.parent))}await DatabaseService.deleteMessageCascading(activeConv.id,messageId),await conversationsStore.refreshActiveMessages(),conversationsStore.updateConversationTimestamp()}catch(error2){
console.error("Failed to delete message:",error2)}}async continueAssistantMessage(messageId){const activeConv=conversationsStore.activeConversation;if(!activeConv||this.isChatLoadingInternal(activeConv.id))return;const result=this.getMessageByIdWithRole(messageId,MessageRole.ASSISTANT);if(!result)return;const{message:msg,index:idx}=result;try{this.showErrorDialog(null),this.setChatLoading(activeConv.id,!0),this.clearChatStreaming(activeConv.id);const allMessages=await conversationsStore.getConversationMessages(
activeConv.id),dbMessage=findMessageById(allMessages,messageId);if(!dbMessage){this.setChatLoading(activeConv.id,!1);return}const originalContent=dbMessage.content,originalReasoning=dbMessage.reasoningContent||"",contextWithContinue=[...conversationsStore.activeMessages.slice(0,idx),{role:MessageRole.ASSISTANT,content:originalContent}];let appendedContent="",appendedReasoning="",hasReceivedContent=!1;const updateStreamingContent=fullContent=>{this.setChatStreaming(msg.convId,fullContent,msg.id),
conversationsStore.updateMessageAtIndex(idx,{content:fullContent})},abortController=this.getOrCreateAbortController(msg.convId);await ChatService.sendMessage(contextWithContinue,{...this.getApiOptions(),onChunk:chunk=>{appendedContent+=chunk,hasReceivedContent=!0,updateStreamingContent(originalContent+appendedContent)},onReasoningChunk:chunk=>{appendedReasoning+=chunk,hasReceivedContent=!0,conversationsStore.updateMessageAtIndex(idx,{reasoningContent:originalReasoning+appendedReasoning})},onTimings:(timings,promptProgress)=>{
const tokensPerSecond=timings?.predicted_ms&&timings?.predicted_n?timings.predicted_n/timings.predicted_ms*1e3:0;this.updateProcessingStateFromTimings({prompt_n:timings?.prompt_n||0,prompt_ms:timings?.prompt_ms,predicted_n:timings?.predicted_n||0,predicted_per_second:tokensPerSecond,cache_n:timings?.cache_n||0,prompt_progress:promptProgress},msg.convId)},onComplete:async(finalContent,reasoningContent,timings)=>{const finalAppendedContent=hasReceivedContent?appendedContent:finalContent||"",finalAppendedReasoning=hasReceivedContent?
appendedReasoning:reasoningContent||"",fullContent=originalContent+finalAppendedContent,fullReasoning=originalReasoning+finalAppendedReasoning||void 0;await DatabaseService.updateMessage(msg.id,{content:fullContent,reasoningContent:fullReasoning,timestamp:Date.now(),timings}),conversationsStore.updateMessageAtIndex(idx,{content:fullContent,reasoningContent:fullReasoning,timestamp:Date.now(),timings}),conversationsStore.updateConversationTimestamp(),this.setChatLoading(msg.convId,!1),this.clearChatStreaming(
msg.convId),this.setProcessingState(msg.convId,null)},onError:async error2=>{if(isAbortError(error2)){hasReceivedContent&&appendedContent&&(await DatabaseService.updateMessage(msg.id,{content:originalContent+appendedContent,reasoningContent:originalReasoning+appendedReasoning||void 0,timestamp:Date.now()}),conversationsStore.updateMessageAtIndex(idx,{content:originalContent+appendedContent,reasoningContent:originalReasoning+appendedReasoning||void 0,timestamp:Date.now()})),this.setChatLoading(msg.
convId,!1),this.clearChatStreaming(msg.convId),this.setProcessingState(msg.convId,null);return}console.error("Continue generation error:",error2),conversationsStore.updateMessageAtIndex(idx,{content:originalContent}),await DatabaseService.updateMessage(msg.id,{content:originalContent}),this.setChatLoading(msg.convId,!1),this.clearChatStreaming(msg.convId),this.setProcessingState(msg.convId,null),this.showErrorDialog({type:error2.name==="TimeoutError"?ErrorDialogType.TIMEOUT:ErrorDialogType.SERVER,
message:error2.message})}},msg.convId,abortController.signal)}catch(error2){isAbortError(error2)||console.error("Failed to continue message:",error2),activeConv&&this.setChatLoading(activeConv.id,!1)}}async editAssistantMessage(messageId,newContent,shouldBranch){const activeConv=conversationsStore.activeConversation;if(!activeConv||this.isChatLoadingInternal(activeConv.id))return;const result=this.getMessageByIdWithRole(messageId,MessageRole.ASSISTANT);if(!result)return;const{message:msg,index:idx}=result;
try{if(shouldBranch){const newMessage=await DatabaseService.createMessageBranch({convId:msg.convId,type:msg.type,timestamp:Date.now(),role:msg.role,content:newContent,toolCalls:msg.toolCalls||"",children:[],model:msg.model},msg.parent);await conversationsStore.updateCurrentNode(newMessage.id)}else await DatabaseService.updateMessage(msg.id,{content:newContent}),conversationsStore.updateMessageAtIndex(idx,{content:newContent});conversationsStore.updateConversationTimestamp(),await conversationsStore.
refreshActiveMessages()}catch(error2){console.error("Failed to edit assistant message:",error2)}}async editUserMessagePreserveResponses(messageId,newContent,newExtras){const activeConv=conversationsStore.activeConversation;if(!activeConv)return;const result=this.getMessageByIdWithRole(messageId,MessageRole.USER);if(!result)return;const{message:msg,index:idx}=result;try{const updateData={content:newContent};newExtras!==void 0&&(updateData.extra=JSON.parse(JSON.stringify(newExtras))),await DatabaseService.
updateMessage(messageId,updateData),conversationsStore.updateMessageAtIndex(idx,updateData);const rootMessage=(await conversationsStore.getConversationMessages(activeConv.id)).find(m=>m.type==="root"&&m.parent===null);rootMessage&&msg.parent===rootMessage.id&&newContent.trim()&&await conversationsStore.updateConversationTitleWithConfirmation(activeConv.id,generateConversationTitle(newContent,!!config$1().titleGenerationUseFirstLine)),conversationsStore.updateConversationTimestamp()}catch(error2){
console.error("Failed to edit user message:",error2)}}async editMessageWithBranching(messageId,newContent,newExtras){const activeConv=conversationsStore.activeConversation;if(!activeConv||this.isChatLoadingInternal(activeConv.id))return;let result=this.getMessageByIdWithRole(messageId,MessageRole.USER);if(result||(result=this.getMessageByIdWithRole(messageId,MessageRole.SYSTEM)),!result)return;const{message:msg,index:idx}=result;try{const allMessages=await conversationsStore.getConversationMessages(
activeConv.id),rootMessage=allMessages.find(m=>m.type==="root"&&m.parent===null),isFirstUserMessage=msg.role===MessageRole.USER&&rootMessage&&msg.parent===rootMessage.id,extrasToUse=newExtras!==void 0?JSON.parse(JSON.stringify(newExtras)):msg.extra?JSON.parse(JSON.stringify(msg.extra)):void 0;let messageIdForResponse;const dbMsg=findMessageById(allMessages,msg.id);if(dbMsg?dbMsg.children.length>0:msg.children.length>0){const parentId=msg.parent||rootMessage?.id;if(!parentId)return;const newMessage=await DatabaseService.
createMessageBranch({convId:msg.convId,type:msg.type,timestamp:Date.now(),role:msg.role,content:newContent,toolCalls:msg.toolCalls||"",children:[],extra:extrasToUse,model:msg.model},parentId);await conversationsStore.updateCurrentNode(newMessage.id),messageIdForResponse=newMessage.id}else{const updates={content:newContent,timestamp:Date.now(),extra:extrasToUse};await DatabaseService.updateMessage(msg.id,updates),conversationsStore.updateMessageAtIndex(idx,updates),messageIdForResponse=msg.id}conversationsStore.
updateConversationTimestamp(),isFirstUserMessage&&newContent.trim()&&await conversationsStore.updateConversationTitleWithConfirmation(activeConv.id,generateConversationTitle(newContent,!!config$1().titleGenerationUseFirstLine)),await conversationsStore.refreshActiveMessages(),msg.role===MessageRole.USER&&await this.generateResponseForMessage(messageIdForResponse)}catch(error2){console.error("Failed to edit message with branching:",error2)}}async generateResponseForMessage(userMessageId){const activeConv=conversationsStore.
activeConversation;if(activeConv){this.showErrorDialog(null),this.setChatLoading(activeConv.id,!0),this.clearChatStreaming(activeConv.id);try{const allMessages=await conversationsStore.getConversationMessages(activeConv.id),conversationPath=filterByLeafNodeId(allMessages,userMessageId,!1),assistantMessage=await DatabaseService.createMessageBranch({convId:activeConv.id,type:MessageType.TEXT,timestamp:Date.now(),role:MessageRole.ASSISTANT,content:"",toolCalls:"",children:[],model:null},userMessageId);
conversationsStore.addMessageToActive(assistantMessage),await this.streamChatCompletion(conversationPath,assistantMessage)}catch(error2){console.error("Failed to generate response:",error2),this.setChatLoading(activeConv.id,!1)}}}getContextTotal(){const activeConvId=this.activeConversationId,activeState=activeConvId?this.getProcessingState(activeConvId):null;if(activeState&&typeof activeState.contextTotal=="number"&&activeState.contextTotal>0)return activeState.contextTotal;if(isRouterMode()){const modelContextSize=selectedModelContextSize();
if(typeof modelContextSize=="number"&&modelContextSize>0)return modelContextSize}else{const propsContextSize=contextSize();if(typeof propsContextSize=="number"&&propsContextSize>0)return propsContextSize}return null}updateProcessingStateFromTimings(timingData,conversationId){const processingState=this.parseTimingData(timingData);if(processingState===null){console.warn("Failed to parse timing data - skipping update");return}const targetId=conversationId||this.activeConversationId;targetId&&this.setProcessingState(
targetId,processingState)}parseTimingData(timingData){const promptTokens=timingData.prompt_n||0,promptMs=timingData.prompt_ms||void 0,predictedTokens=timingData.predicted_n||0,tokensPerSecond=timingData.predicted_per_second||0,cacheTokens=timingData.cache_n||0,promptProgress=timingData.prompt_progress,contextTotal=this.getContextTotal(),currentConfig=config$1(),outputTokensMax=currentConfig.max_tokens||-1,contextUsed=promptTokens+cacheTokens+predictedTokens,outputTokensUsed=predictedTokens,progressCache=promptProgress?.
cache||0,progressActualDone=(promptProgress?.processed??0)-progressCache,progressActualTotal=(promptProgress?.total??0)-progressCache,progressPercent=promptProgress?Math.round(progressActualDone/progressActualTotal*100):void 0;return{status:predictedTokens>0?"generating":promptProgress?"preparing":"idle",tokensDecoded:predictedTokens,tokensRemaining:outputTokensMax-predictedTokens,contextUsed,contextTotal,outputTokensUsed,outputTokensMax,hasNextToken:predictedTokens>0,tokensPerSecond,temperature:currentConfig.
temperature??.8,topP:currentConfig.top_p??.95,speculative:!1,progressPercent,promptProgress,promptTokens,promptMs,cacheTokens}}restoreProcessingStateFromMessages(messages,conversationId){for(let i=messages.length-1;i>=0;i--){const message=messages[i];if(message.role===MessageRole.ASSISTANT&&message.timings){const restoredState=this.parseTimingData({prompt_n:message.timings.prompt_n||0,prompt_ms:message.timings.prompt_ms,predicted_n:message.timings.predicted_n||0,predicted_per_second:message.timings.
predicted_n&&message.timings.predicted_ms?message.timings.predicted_n/message.timings.predicted_ms*1e3:0,cache_n:message.timings.cache_n||0});if(restoredState){this.setProcessingState(conversationId,restoredState);return}}}}getConversationModel(messages){for(let i=messages.length-1;i>=0;i--){const message=messages[i];if(message.role===MessageRole.ASSISTANT&&message.model)return message.model}return null}getApiOptions(){const currentConfig=config$1(),hasValue=value=>value!=null&&value!=="",apiOptions={
stream:!0,timings_per_token:!0};if(isRouterMode()){const modelName=selectedModelName();modelName&&(apiOptions.model=modelName)}return currentConfig.systemMessage&&(apiOptions.systemMessage=currentConfig.systemMessage),currentConfig.disableReasoningParsing&&(apiOptions.disableReasoningParsing=!0),currentConfig.excludeReasoningFromContext&&(apiOptions.excludeReasoningFromContext=!0),hasValue(currentConfig.temperature)&&(apiOptions.temperature=Number(currentConfig.temperature)),hasValue(currentConfig.
max_tokens)&&(apiOptions.max_tokens=Number(currentConfig.max_tokens)),hasValue(currentConfig.dynatemp_range)&&(apiOptions.dynatemp_range=Number(currentConfig.dynatemp_range)),hasValue(currentConfig.dynatemp_exponent)&&(apiOptions.dynatemp_exponent=Number(currentConfig.dynatemp_exponent)),hasValue(currentConfig.top_k)&&(apiOptions.top_k=Number(currentConfig.top_k)),hasValue(currentConfig.top_p)&&(apiOptions.top_p=Number(currentConfig.top_p)),hasValue(currentConfig.min_p)&&(apiOptions.min_p=Number(
currentConfig.min_p)),hasValue(currentConfig.xtc_probability)&&(apiOptions.xtc_probability=Number(currentConfig.xtc_probability)),hasValue(currentConfig.xtc_threshold)&&(apiOptions.xtc_threshold=Number(currentConfig.xtc_threshold)),hasValue(currentConfig.typ_p)&&(apiOptions.typ_p=Number(currentConfig.typ_p)),hasValue(currentConfig.repeat_last_n)&&(apiOptions.repeat_last_n=Number(currentConfig.repeat_last_n)),hasValue(currentConfig.repeat_penalty)&&(apiOptions.repeat_penalty=Number(currentConfig.
repeat_penalty)),hasValue(currentConfig.presence_penalty)&&(apiOptions.presence_penalty=Number(currentConfig.presence_penalty)),hasValue(currentConfig.frequency_penalty)&&(apiOptions.frequency_penalty=Number(currentConfig.frequency_penalty)),hasValue(currentConfig.dry_multiplier)&&(apiOptions.dry_multiplier=Number(currentConfig.dry_multiplier)),hasValue(currentConfig.dry_base)&&(apiOptions.dry_base=Number(currentConfig.dry_base)),hasValue(currentConfig.dry_allowed_length)&&(apiOptions.dry_allowed_length=
Number(currentConfig.dry_allowed_length)),hasValue(currentConfig.dry_penalty_last_n)&&(apiOptions.dry_penalty_last_n=Number(currentConfig.dry_penalty_last_n)),currentConfig.samplers&&(apiOptions.samplers=currentConfig.samplers),apiOptions.backend_sampling=currentConfig.backend_sampling,currentConfig.custom&&(apiOptions.custom=currentConfig.custom),apiOptions}cancelPreEncode(){this.preEncodeAbortController&&(this.preEncodeAbortController.abort(),this.preEncodeAbortController=null)}async triggerPreEncode(allMessages,assistantMessage,assistantContent,model,excludeReasoning){
this.cancelPreEncode(),this.preEncodeAbortController=new AbortController;const signal=this.preEncodeAbortController.signal;try{if(!await ChatService.areAllSlotsIdle(model,signal)||signal.aborted)return;const messagesWithAssistant=[...allMessages,{...assistantMessage,content:assistantContent}];await ChatService.preEncode(messagesWithAssistant,model,excludeReasoning,signal)}catch(err){isAbortError(err)||console.warn("[ChatStore] Pre-encode failed:",err)}}}const chatStore=new ChatStore,activeProcessingState=()=>chatStore.
activeProcessingState,errorDialog=()=>chatStore.errorDialogState,getAddFilesHandler=()=>chatStore.getAddFilesHandler(),getAllLoadingChats=()=>chatStore.getAllLoadingChats(),isChatStreaming=()=>chatStore.isStreaming(),isEditing=()=>chatStore.isEditing(),isLoading=()=>chatStore.isLoading,pendingEditMessageId=()=>chatStore.pendingEditMessageId,chatPendingMessageContent=convId=>chatStore.pendingMessageContent(convId),chatPendingMessageExtras=convId=>chatStore.pendingMessageExtras(convId),chatClearPendingMessage=convId=>chatStore.
clearPendingMessage(convId),chatInjectPendingMessage=(convId,content2,extras)=>chatStore.injectPendingMessage(convId,content2,extras);var root$1u=from_html('<!> <form><!> <div data-slot="input-area"><!> <div class="flex-column relative min-h-[48px] items-center rounded-3xl py-2 pb-2.25 shadow-sm transition-all focus-within:shadow-md md:!py-3"><!> <!> <!></div></div></form> <!>',1);function ChatForm($$anchor,$$props){push$1($$props,!0);let attachments=prop($$props,"attachments",19,()=>[]),className=prop(
$$props,"class",3,""),disabled=prop($$props,"disabled",3,!1),isLoading2=prop($$props,"isLoading",3,!1),placeholder=prop($$props,"placeholder",3,"Type a message..."),showMcpPromptButton=prop($$props,"showMcpPromptButton",3,!1),showAddButton=prop($$props,"showAddButton",3,!0),showModelSelector=prop($$props,"showModelSelector",3,!0),uploadedFiles=prop($$props,"uploadedFiles",31,()=>proxy([])),value=prop($$props,"value",15,""),audioRecorder,chatFormActionsRef=state$1(void 0),fileInputRef=state$1(void 0),
pickersRef=state$1(void 0),textareaRef=state$1(void 0),isRecording=state$1(!1),recordingSupported=state$1(!1),isPromptPickerOpen=state$1(!1),promptSearchQuery=state$1(""),isInlineResourcePickerOpen=state$1(!1),resourceSearchQuery=state$1(""),isResourceDialogOpen=state$1(!1),preSelectedResourceUri=state$1(void 0),currentConfig=user_derived(config$1),pasteLongTextToFileLength=user_derived(()=>{const n=Number(get$3(currentConfig).pasteLongTextToFileLen);return Number.isNaN(n)?Number(SETTING_CONFIG_DEFAULT.
pasteLongTextToFileLen):n}),isRouter=user_derived(isRouterMode),conversationModel=user_derived(()=>chatStore.getConversationModel(activeMessages())),activeModelId=user_derived(()=>{const options=modelOptions();if(!get$3(isRouter))return options.length>0?options[0].model:null;const selectedId=selectedModelId();if(selectedId){const model=options.find(m=>m.id===selectedId);if(model)return model.model}if(get$3(conversationModel)){const model=options.find(m=>m.model===get$3(conversationModel));if(model)
return model.model}return null}),hasModelSelected=user_derived(()=>!get$3(isRouter)||!!get$3(conversationModel)||!!selectedModelId()),hasLoadingAttachments=user_derived(()=>uploadedFiles().some(f=>f.isLoading)),hasAttachments=user_derived(()=>attachments()&&attachments().length>0||uploadedFiles()&&uploadedFiles().length>0),canSubmit=user_derived(()=>value().trim().length>0||get$3(hasAttachments));onMount$1(()=>{set$1(recordingSupported,isAudioRecordingSupported(),!0),audioRecorder=new AudioRecorder});
function focus2(){get$3(textareaRef)?.focus()}function resetTextareaHeight(){get$3(textareaRef)?.resetHeight()}function openModelSelector(){get$3(chatFormActionsRef)?.openModelSelector()}function checkModelSelected(){return get$3(hasModelSelected)?!0:(get$3(chatFormActionsRef)?.openModelSelector(),!1)}function handleFileSelect(files){$$props.onFilesAdd?.(files)}function handleFileUpload(){get$3(fileInputRef)?.click()}function handleFileRemove(fileId){if(fileId.startsWith("attachment-")){const index2=parseInt(
fileId.replace("attachment-",""),10);!isNaN(index2)&&index2>=0&&index2<attachments().length&&$$props.onAttachmentRemove?.(index2)}else $$props.onUploadedFileRemove?.(fileId)}function handleInput(){const perChatOverrides=conversationsStore.getAllMcpServerOverrides(),hasServers=mcpStore.hasEnabledServers(perChatOverrides);value().startsWith(PROMPT_TRIGGER_PREFIX)&&hasServers?(set$1(isPromptPickerOpen,!0),set$1(promptSearchQuery,value().slice(1),!0),set$1(isInlineResourcePickerOpen,!1),set$1(resourceSearchQuery,
"")):value().startsWith(RESOURCE_TRIGGER_PREFIX)&&hasServers&&mcpStore.hasResourcesCapability(perChatOverrides)?(set$1(isInlineResourcePickerOpen,!0),set$1(resourceSearchQuery,value().slice(1),!0),set$1(isPromptPickerOpen,!1),set$1(promptSearchQuery,"")):(set$1(isPromptPickerOpen,!1),set$1(promptSearchQuery,""),set$1(isInlineResourcePickerOpen,!1),set$1(resourceSearchQuery,""))}function handleKeydown(event2){if(!get$3(pickersRef)?.handleKeydown(event2)){if(event2.key===KeyboardKey.ESCAPE&&get$3(
isPromptPickerOpen)){set$1(isPromptPickerOpen,!1),set$1(promptSearchQuery,"");return}if(event2.key===KeyboardKey.ESCAPE&&get$3(isInlineResourcePickerOpen)){set$1(isInlineResourcePickerOpen,!1),set$1(resourceSearchQuery,"");return}if(event2.key===KeyboardKey.ENTER&&!event2.shiftKey&&!isIMEComposing(event2)){const isModifier=event2.ctrlKey||event2.metaKey;if(get$3(currentConfig).sendOnEnter!==!1||isModifier){if(event2.preventDefault(),!get$3(canSubmit)||disabled()||get$3(hasLoadingAttachments))return;
$$props.onSubmit?.()}}}}function handlePaste(event2){if(!event2.clipboardData)return;const files=Array.from(event2.clipboardData.items).filter(item=>item.kind==="file").map(item=>item.getAsFile()).filter(file=>file!==null);if(files.length>0){event2.preventDefault(),$$props.onFilesAdd?.(files);return}const text2=event2.clipboardData.getData(MimeTypeText.PLAIN);if(text2.startsWith(CLIPBOARD_CONTENT_QUOTE_PREFIX)){const parsed=parseClipboardContent(text2);if(parsed.textAttachments.length>0||parsed.
mcpPromptAttachments.length>0){if(event2.preventDefault(),value(parsed.message),$$props.onValueChange?.(parsed.message),parsed.textAttachments.length>0){const attachmentFiles=parsed.textAttachments.map(att=>new File([att.content],att.name,{type:MimeTypeText.PLAIN}));$$props.onFilesAdd?.(attachmentFiles)}if(parsed.mcpPromptAttachments.length>0){const mcpPromptFiles=parsed.mcpPromptAttachments.map(att=>({id:uuid$1(),name:att.name,size:att.content.length,type:SpecialFileType.MCP_PROMPT,file:new File(
[att.content],`${att.name}${FileExtensionText.TXT}`,{type:MimeTypeText.PLAIN}),isLoading:!1,textContent:att.content,mcpPrompt:{serverName:att.serverName,promptName:att.promptName,arguments:att.arguments}}));uploadedFiles([...uploadedFiles(),...mcpPromptFiles]),$$props.onUploadedFilesChange?.(uploadedFiles())}setTimeout(()=>{get$3(textareaRef)?.focus()},10);return}}if(text2.length>0&&get$3(pasteLongTextToFileLength)>0&&text2.length>get$3(pasteLongTextToFileLength)){event2.preventDefault();const textFile=new File(
[text2],"Pasted",{type:MimeTypeText.PLAIN});$$props.onFilesAdd?.([textFile])}}function handlePromptLoadStart(placeholderId,promptInfo,args){value().startsWith(PROMPT_TRIGGER_PREFIX)&&(value(""),$$props.onValueChange?.("")),set$1(isPromptPickerOpen,!1),set$1(promptSearchQuery,"");const promptName=promptInfo.title||promptInfo.name,placeholder2={id:placeholderId,name:promptName,size:INITIAL_FILE_SIZE,type:SpecialFileType.MCP_PROMPT,file:new File([],"loading"),isLoading:!0,mcpPrompt:{serverName:promptInfo.
serverName,promptName:promptInfo.name,arguments:args?{...args}:void 0}};uploadedFiles([...uploadedFiles(),placeholder2]),$$props.onUploadedFilesChange?.(uploadedFiles()),get$3(textareaRef)?.focus()}function handlePromptLoadComplete(placeholderId,result){const promptText=result.messages?.map(msg=>typeof msg.content=="string"?msg.content:msg.content.type===ContentPartType.TEXT?msg.content.text:"").filter(Boolean).join(PROMPT_CONTENT_SEPARATOR);uploadedFiles(uploadedFiles().map(f=>f.id===placeholderId?
{...f,isLoading:!1,textContent:promptText,size:promptText.length,file:new File([promptText],`${f.name}${FileExtensionText.TXT}`,{type:MimeTypeText.PLAIN})}:f)),$$props.onUploadedFilesChange?.(uploadedFiles())}function handlePromptLoadError(placeholderId,error2){uploadedFiles(uploadedFiles().map(f=>f.id===placeholderId?{...f,isLoading:!1,loadError:error2}:f)),$$props.onUploadedFilesChange?.(uploadedFiles())}function handlePromptPickerClose(){set$1(isPromptPickerOpen,!1),set$1(promptSearchQuery,""),
get$3(textareaRef)?.focus()}function handleInlineResourcePickerClose(){set$1(isInlineResourcePickerOpen,!1),set$1(resourceSearchQuery,""),get$3(textareaRef)?.focus()}function handleInlineResourceSelect(){value().startsWith(RESOURCE_TRIGGER_PREFIX)&&(value(""),$$props.onValueChange?.("")),set$1(isInlineResourcePickerOpen,!1),set$1(resourceSearchQuery,""),get$3(textareaRef)?.focus()}function handleBrowseResources(){set$1(isInlineResourcePickerOpen,!1),set$1(resourceSearchQuery,""),value().startsWith(
RESOURCE_TRIGGER_PREFIX)&&(value(""),$$props.onValueChange?.("")),set$1(isResourceDialogOpen,!0)}async function handleMicClick(){if(!audioRecorder||!get$3(recordingSupported)){console.warn("Audio recording not supported");return}if(get$3(isRecording)){set$1(isRecording,!1);try{const audioBlob=await audioRecorder.stopRecording(),wavBlob=await convertToWav(audioBlob),audioFile=createAudioFile(wavBlob);$$props.onFilesAdd?.([audioFile])}catch(error2){console.error("Failed to stop recording:",error2)}}else
try{await audioRecorder.startRecording(),set$1(isRecording,!0)}catch(error2){console.error("Failed to start recording:",error2)}}var $$exports={focus:focus2,resetTextareaHeight,openModelSelector,checkModelSelected},fragment=root$1u(),node2=first_child(fragment);bind_this(ChatFormFileInputInvisible(node2,{onFileSelect:handleFileSelect}),$$value=>set$1(fileInputRef,$$value,!0),()=>get$3(fileInputRef));var form=sibling(node2,2),node_1=child(form);bind_this(ChatFormPickers(node_1,{get isPromptPickerOpen(){
return get$3(isPromptPickerOpen)},get promptSearchQuery(){return get$3(promptSearchQuery)},get isInlineResourcePickerOpen(){return get$3(isInlineResourcePickerOpen)},get resourceSearchQuery(){return get$3(resourceSearchQuery)},onPromptPickerClose:handlePromptPickerClose,onInlineResourcePickerClose:handleInlineResourcePickerClose,onInlineResourceSelect:handleInlineResourceSelect,onPromptLoadStart:handlePromptLoadStart,onPromptLoadComplete:handlePromptLoadComplete,onPromptLoadError:handlePromptLoadError,
onInlineResourceBrowse:handleBrowseResources}),$$value=>set$1(pickersRef,$$value,!0),()=>get$3(pickersRef));var div=sibling(node_1,2),node_2=child(div);{let $0=user_derived(()=>get$3(activeModelId)??void 0);ChatAttachmentsList(node_2,{get attachments(){return attachments()},onFileRemove:handleFileRemove,limitToSingleRow:!0,class:"py-5",style:"scroll-padding: 1rem;",get activeModelId(){return get$3($0)},get uploadedFiles(){return uploadedFiles()},set uploadedFiles($$value){uploadedFiles($$value)}})}
var div_1=sibling(node_2,2),node_3=child(div_1);bind_this(ChatFormTextarea(node_3,{class:"px-5 py-1.5 md:pt-0",onKeydown:handleKeydown,onInput:()=>{handleInput(),$$props.onValueChange?.(value())},get disabled(){return disabled()},get placeholder(){return placeholder()},get value(){return value()},set value($$value){value($$value)}}),$$value=>set$1(textareaRef,$$value,!0),()=>get$3(textareaRef));var node_4=sibling(node_3,2);{var consequent=$$anchor2=>{ChatFormMcpResourcesList($$anchor2,{class:"mb\
-3",onResourceClick:uri2=>{set$1(preSelectedResourceUri,uri2,!0),set$1(isResourceDialogOpen,!0)}})},d2=user_derived(()=>mcpHasResourceAttachments());if_block(node_4,$$render=>{get$3(d2)&&$$render(consequent)})}var node_5=sibling(node_4,2);{let $0=user_derived(()=>showMcpPromptButton()?()=>set$1(isPromptPickerOpen,!0):void 0);bind_this(ChatFormActions(node_5,{class:"px-3",get canSend(){return get$3(canSubmit)},get disabled(){return disabled()},get isLoading(){return isLoading2()},get isRecording(){
return get$3(isRecording)},get showAddButton(){return showAddButton()},get showModelSelector(){return showModelSelector()},get uploadedFiles(){return uploadedFiles()},onFileUpload:handleFileUpload,onMicClick:handleMicClick,get onStop(){return $$props.onStop},onSystemPromptClick:()=>$$props.onSystemPromptClick?.({message:value(),files:uploadedFiles()}),get onMcpPromptClick(){return get$3($0)},onMcpResourcesClick:()=>set$1(isResourceDialogOpen,!0)}),$$value=>set$1(chatFormActionsRef,$$value,!0),()=>get$3(
chatFormActionsRef))}reset(div_1),reset(div),reset(form);var node_6=sibling(form,2);return DialogMcpResourcesBrowser(node_6,{get preSelectedUri(){return get$3(preSelectedResourceUri)},onAttach:resource=>{mcpStore.attachResource(resource.uri)},onOpenChange:newOpen=>{newOpen||set$1(preSelectedResourceUri,void 0)},get open(){return get$3(isResourceDialogOpen)},set open($$value){set$1(isResourceDialogOpen,$$value,!0)}}),template_effect(()=>{set_class(form,1,`relative ${className()??""}`),set_class(div,
1,`${INPUT_CLASSES??""} overflow-hidden rounded-3xl backdrop-blur-md ${disabled()?"cursor-not-allowed opacity-60":""}`)}),event("submit",form,event2=>{event2.preventDefault(),!(!get$3(canSubmit)||disabled()||get$3(hasLoadingAttachments))&&$$props.onSubmit?.()}),event("paste",div_1,handlePaste),append($$anchor,fragment),pop($$exports)}function Dropdown_menu_content($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),sideOffset=prop($$props,"sideOffset",3,4),restProps=rest_props(
$$props,["$$slots","$$events","$$legacy","ref","sideOffset","portalProps","class"]);var fragment=comment$2(),node2=first_child(fragment);component(node2,()=>Portal$2,($$anchor2,DropdownMenuPrimitive_Portal)=>{DropdownMenuPrimitive_Portal($$anchor2,spread_props(()=>$$props.portalProps,{children:($$anchor3,$$slotProps)=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);{let $0=user_derived(()=>cn$1("z-50 max-h-(--bits-dropdown-menu-content-available-height) min-w-[8rem] origin-(--bits-dro\
pdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border border-border bg-popover p-1.5 text-popover-foreground shadow-md outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:fill-mode-forwards data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=op\
en]:fade-in-0 data-[state=open]:zoom-in-95 dark:border-border/20",$$props.class));component(node_1,()=>Dropdown_menu_content$1,($$anchor4,DropdownMenuPrimitive_Content)=>{DropdownMenuPrimitive_Content($$anchor4,spread_props({"data-slot":"dropdown-menu-content",get sideOffset(){return sideOffset()},get class(){return get$3($0)}},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)}}))})}append($$anchor3,fragment_1)},$$slots:{default:!0}}))}),append($$anchor,fragment),pop()}function Dropdown_menu_item($$anchor,$$props){
push$1($$props,!0);let ref2=prop($$props,"ref",15,null),variant=prop($$props,"variant",3,"default"),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class","inset","variant"]);var fragment=comment$2(),node2=first_child(fragment);{let $0=user_derived(()=>cn$1("relative flex cursor-pointer items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground data-[disabled]:pointer-events-none data-[disab\
led]:opacity-50 data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:data-highlighted:bg-destructive/10 data-[variant=destructive]:data-highlighted:text-destructive dark:data-[variant=destructive]:data-highlighted:bg-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:*:[svg]:!text-destructive",$$props.class));component(node2,()=>Menu_item,
($$anchor2,DropdownMenuPrimitive_Item)=>{DropdownMenuPrimitive_Item($$anchor2,spread_props({"data-slot":"dropdown-menu-item",get"data-inset"(){return $$props.inset},get"data-variant"(){return variant()},get class(){return get$3($0)}},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)}}))})}append($$anchor,fragment),pop()}function Dropdown_menu_separator($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events",
"$$legacy","ref","class"]);var fragment=comment$2(),node2=first_child(fragment);{let $0=user_derived(()=>cn$1("-mx-1 my-1 h-px bg-border/20",$$props.class));component(node2,()=>Menu_separator,($$anchor2,DropdownMenuPrimitive_Separator)=>{DropdownMenuPrimitive_Separator($$anchor2,spread_props({"data-slot":"dropdown-menu-separator",get class(){return get$3($0)}},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)}}))})}append($$anchor,fragment),pop()}function Dropdown_menu_trigger($$anchor,$$props){
push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref"]);var fragment=comment$2(),node2=first_child(fragment);component(node2,()=>Menu_trigger,($$anchor2,DropdownMenuPrimitive_Trigger)=>{DropdownMenuPrimitive_Trigger($$anchor2,spread_props({"data-slot":"dropdown-menu-trigger"},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)}}))}),append($$anchor,fragment),pop()}function Dropdown_menu_sub_content($$anchor,$$props){
push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class"]);var fragment=comment$2(),node2=first_child(fragment);{let $0=user_derived(()=>cn$1("z-50 max-h-(--bits-dropdown-menu-content-available-height) min-w-[8rem] origin-(--bits-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border border-border bg-popover p-1.5 text-popover-foreground shadow-md outline-none data-[side=bottom]:slide-\
in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:fill-mode-forwards data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 dark:border-border/20",$$props.class));component(node2,()=>Menu_sub_content,($$anchor2,DropdownMenuPrimitive_SubContent)=>{DropdownMenuPrimitive_SubContent(
$$anchor2,spread_props({"data-slot":"dropdown-menu-sub-content",get class(){return get$3($0)}},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)}}))})}append($$anchor,fragment),pop()}var root_1$P=from_html("<!> <!>",1);function Dropdown_menu_sub_trigger($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class","inset","children"]);var fragment=comment$2(),node2=first_child(fragment);{
let $0=user_derived(()=>cn$1("flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-highlighted:bg-accent data-highlighted:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[state=open]:bg-accent data-[state=open]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",$$props.class));component(
node2,()=>Menu_sub_trigger,($$anchor2,DropdownMenuPrimitive_SubTrigger)=>{DropdownMenuPrimitive_SubTrigger($$anchor2,spread_props({"data-slot":"dropdown-menu-sub-trigger",get"data-inset"(){return $$props.inset},get class(){return get$3($0)}},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)},children:($$anchor3,$$slotProps)=>{var fragment_1=root_1$P(),node_1=first_child(fragment_1);snippet(node_1,()=>$$props.children??noop$3);var node_2=sibling(node_1,2);Chevron_right(node_2,
{class:"ml-auto size-4"}),append($$anchor3,fragment_1)},$$slots:{default:!0}}))})}append($$anchor,fragment),pop()}const Sub=Menu_sub,Root$4=Menu;function useAttachmentMenu(getFlags,getCallbacks,close2){const modalityFlags=user_derived(getFlags),callbacks=user_derived(()=>{const cbs=getCallbacks(),wrap2=fn=>()=>{close2(),fn?.()};return{[AttachmentAction.FILE_UPLOAD]:wrap2(cbs.onFileUpload),[AttachmentAction.SYSTEM_PROMPT_CLICK]:wrap2(cbs.onSystemPromptClick),[AttachmentAction.MCP_PROMPT_CLICK]:wrap2(
cbs.onMcpPromptClick),[AttachmentAction.MCP_RESOURCES_CLICK]:wrap2(cbs.onMcpResourcesClick)}});function isItemEnabled(enabledWhen){return!enabledWhen||enabledWhen==="always"?!0:!!get$3(modalityFlags)[enabledWhen]}function isItemVisible(visibleWhen){return visibleWhen?!!get$3(modalityFlags)[visibleWhen]:!0}function getSystemMessageTooltip(){return page$1.params.id?"Inject custom system message at the beginning of the conversation":"Add custom system message for a new conversation"}return{get callbacks(){
return get$3(callbacks)},isItemEnabled,isItemVisible,getSystemMessageTooltip}}var root_6$s=from_html("<!> <span> </span>",1),root_10$f=from_html("<!> <span> </span>",1),root_11$e=from_html("<p> </p>"),root_8$r=from_html("<!> <!>",1),root_16$6=from_html("<!> <span> </span>",1),root_17$8=from_html("<p>PDFs will be converted to text. Image-based PDFs may not work properly.</p>"),root_13$d=from_html("<!> <!>",1),root_22$2=from_html("<!> <span> </span>",1),root_23$5=from_html("<p> </p>"),root_20$5=from_html(
"<!> <!>",1),root_26$2=from_html("<!> <span> </span>",1),root_3$S=from_html("<!> <!> <!> <!> <!> <!> <!>",1),root_1$O=from_html("<!> <!>",1),root$1t=from_html("<div><!></div>");function ChatFormActionAddDropdown($$anchor,$$props){push$1($$props,!0);let className=prop($$props,"class",3,""),disabled=prop($$props,"disabled",3,!1),hasAudioModality=prop($$props,"hasAudioModality",3,!1),hasVisionModality=prop($$props,"hasVisionModality",3,!1),hasMcpPromptsSupport=prop($$props,"hasMcpPromptsSupport",3,
!1),hasMcpResourcesSupport=prop($$props,"hasMcpResourcesSupport",3,!1),dropdownOpen=state$1(!1);function handleMcpSettingsClick(){set$1(dropdownOpen,!1),$$props.onMcpSettingsClick?.()}const attachmentMenu=useAttachmentMenu(()=>({hasVisionModality:hasVisionModality(),hasAudioModality:hasAudioModality(),hasMcpPromptsSupport:hasMcpPromptsSupport(),hasMcpResourcesSupport:hasMcpResourcesSupport()}),()=>({onFileUpload:$$props.onFileUpload,onSystemPromptClick:$$props.onSystemPromptClick,onMcpPromptClick:$$props.
onMcpPromptClick,onMcpResourcesClick:$$props.onMcpResourcesClick}),()=>{set$1(dropdownOpen,!1)});var div=root$1t(),node2=child(div);component(node2,()=>Root$4,($$anchor2,DropdownMenu_Root)=>{DropdownMenu_Root($$anchor2,{get open(){return get$3(dropdownOpen)},set open($$value){set$1(dropdownOpen,$$value,!0)},children:($$anchor3,$$slotProps)=>{var fragment=root_1$O(),node_1=first_child(fragment);component(node_1,()=>Dropdown_menu_trigger,($$anchor4,DropdownMenu_Trigger)=>{DropdownMenu_Trigger($$anchor4,
{name:"Attach files",get disabled(){return disabled()},children:($$anchor5,$$slotProps2)=>{var fragment_1=comment$2(),node_2=first_child(fragment_1);snippet(node_2,()=>$$props.trigger,()=>({disabled:disabled()})),append($$anchor5,fragment_1)},$$slots:{default:!0}})});var node_3=sibling(node_1,2);component(node_3,()=>Dropdown_menu_content,($$anchor4,DropdownMenu_Content)=>{DropdownMenu_Content($$anchor4,{align:"start",class:"w-48",children:($$anchor5,$$slotProps2)=>{var fragment_2=root_3$S(),node_4=first_child(
fragment_2);each(node_4,17,()=>ATTACHMENT_FILE_ITEMS,item=>item.id,($$anchor6,item)=>{const enabled=user_derived(()=>attachmentMenu.isItemEnabled(get$3(item).enabledWhen));var fragment_3=comment$2(),node_5=first_child(fragment_3);{var consequent=$$anchor7=>{var fragment_4=comment$2(),node_6=first_child(fragment_4);{let $0=user_derived(()=>get$3(item).class??"");component(node_6,()=>Dropdown_menu_item,($$anchor8,DropdownMenu_Item)=>{DropdownMenu_Item($$anchor8,{get class(){return`${get$3($0)??""}\
 flex cursor-pointer items-center gap-2`},onclick:()=>attachmentMenu.callbacks[get$3(item).action](),children:($$anchor9,$$slotProps3)=>{var fragment_5=root_6$s(),node_7=first_child(fragment_5);component(node_7,()=>get$3(item).icon,($$anchor10,item_icon)=>{item_icon($$anchor10,{class:"h-4 w-4"})});var span=sibling(node_7,2),text2=child(span,!0);reset(span),template_effect(()=>set_text(text2,get$3(item).label)),append($$anchor9,fragment_5)},$$slots:{default:!0}})})}append($$anchor7,fragment_4)},consequent_1=$$anchor7=>{
var fragment_6=comment$2(),node_8=first_child(fragment_6);component(node_8,()=>Root$5,($$anchor8,Tooltip_Root)=>{Tooltip_Root($$anchor8,{get delayDuration(){return TOOLTIP_DELAY_DURATION},children:($$anchor9,$$slotProps3)=>{var fragment_7=root_8$r(),node_9=first_child(fragment_7);component(node_9,()=>Tooltip_trigger,($$anchor10,Tooltip_Trigger)=>{Tooltip_Trigger($$anchor10,{class:"w-full",children:($$anchor11,$$slotProps4)=>{var fragment_8=comment$2(),node_10=first_child(fragment_8);{let $0=user_derived(
()=>get$3(item).class??"");component(node_10,()=>Dropdown_menu_item,($$anchor12,DropdownMenu_Item_1)=>{DropdownMenu_Item_1($$anchor12,{get class(){return`${get$3($0)??""} flex cursor-pointer items-center gap-2`},disabled:!0,children:($$anchor13,$$slotProps5)=>{var fragment_9=root_10$f(),node_11=first_child(fragment_9);component(node_11,()=>get$3(item).icon,($$anchor14,item_icon_1)=>{item_icon_1($$anchor14,{class:"h-4 w-4"})});var span_1=sibling(node_11,2),text_1=child(span_1,!0);reset(span_1),template_effect(
()=>set_text(text_1,get$3(item).label)),append($$anchor13,fragment_9)},$$slots:{default:!0}})})}append($$anchor11,fragment_8)},$$slots:{default:!0}})});var node_12=sibling(node_9,2);component(node_12,()=>Tooltip_content,($$anchor10,Tooltip_Content)=>{Tooltip_Content($$anchor10,{side:"right",children:($$anchor11,$$slotProps4)=>{var p2=root_11$e(),text_2=child(p2,!0);reset(p2),template_effect(()=>set_text(text_2,get$3(item).disabledTooltip)),append($$anchor11,p2)},$$slots:{default:!0}})}),append($$anchor9,
fragment_7)},$$slots:{default:!0}})}),append($$anchor7,fragment_6)};if_block(node_5,$$render=>{get$3(enabled)?$$render(consequent):get$3(item).disabledTooltip&&$$render(consequent_1,1)})}append($$anchor6,fragment_3)});var node_13=sibling(node_4,2);{var consequent_3=$$anchor6=>{var fragment_10=comment$2(),node_14=first_child(fragment_10);component(node_14,()=>Root$5,($$anchor7,Tooltip_Root_1)=>{Tooltip_Root_1($$anchor7,{get delayDuration(){return TOOLTIP_DELAY_DURATION},children:($$anchor8,$$slotProps3)=>{
var fragment_11=root_13$d(),node_15=first_child(fragment_11);component(node_15,()=>Tooltip_trigger,($$anchor9,Tooltip_Trigger_1)=>{Tooltip_Trigger_1($$anchor9,{class:"w-full",children:($$anchor10,$$slotProps4)=>{var fragment_12=comment$2(),node_16=first_child(fragment_12);component(node_16,()=>Dropdown_menu_item,($$anchor11,DropdownMenu_Item_2)=>{DropdownMenu_Item_2($$anchor11,{class:"flex cursor-pointer items-center gap-2",get onclick(){return attachmentMenu.callbacks.onFileUpload},children:($$anchor12,$$slotProps5)=>{
const pdfItem=user_derived(()=>ATTACHMENT_FILE_ITEMS.find(i=>i.id===AttachmentMenuItemId.PDF));var fragment_13=comment$2(),node_17=first_child(fragment_13);{var consequent_2=$$anchor13=>{var fragment_14=root_16$6(),node_18=first_child(fragment_14);component(node_18,()=>get$3(pdfItem).icon,($$anchor14,pdfItem_icon)=>{pdfItem_icon($$anchor14,{class:"h-4 w-4"})});var span_2=sibling(node_18,2),text_3=child(span_2,!0);reset(span_2),template_effect(()=>set_text(text_3,get$3(pdfItem).label)),append($$anchor13,
fragment_14)};if_block(node_17,$$render=>{get$3(pdfItem)&&$$render(consequent_2)})}append($$anchor12,fragment_13)},$$slots:{default:!0}})}),append($$anchor10,fragment_12)},$$slots:{default:!0}})});var node_19=sibling(node_15,2);component(node_19,()=>Tooltip_content,($$anchor9,Tooltip_Content_1)=>{Tooltip_Content_1($$anchor9,{side:"right",children:($$anchor10,$$slotProps4)=>{var p_1=root_17$8();append($$anchor10,p_1)},$$slots:{default:!0}})}),append($$anchor8,fragment_11)},$$slots:{default:!0}})}),
append($$anchor6,fragment_10)},d2=user_derived(()=>!attachmentMenu.isItemEnabled("hasVisionModality"));if_block(node_13,$$render=>{get$3(d2)&&$$render(consequent_3)})}var node_20=sibling(node_13,2);component(node_20,()=>Dropdown_menu_separator,($$anchor6,DropdownMenu_Separator)=>{DropdownMenu_Separator($$anchor6,{})});var node_21=sibling(node_20,2);each(node_21,17,()=>ATTACHMENT_EXTRA_ITEMS,item=>item.id,($$anchor6,item)=>{var fragment_15=comment$2(),node_22=first_child(fragment_15);{var consequent_4=$$anchor7=>{
var fragment_16=comment$2(),node_23=first_child(fragment_16);component(node_23,()=>Root$5,($$anchor8,Tooltip_Root_2)=>{Tooltip_Root_2($$anchor8,{get delayDuration(){return TOOLTIP_DELAY_DURATION},children:($$anchor9,$$slotProps3)=>{var fragment_17=root_20$5(),node_24=first_child(fragment_17);component(node_24,()=>Tooltip_trigger,($$anchor10,Tooltip_Trigger_2)=>{Tooltip_Trigger_2($$anchor10,{class:"w-full",children:($$anchor11,$$slotProps4)=>{var fragment_18=comment$2(),node_25=first_child(fragment_18);
component(node_25,()=>Dropdown_menu_item,($$anchor12,DropdownMenu_Item_3)=>{DropdownMenu_Item_3($$anchor12,{class:"flex cursor-pointer items-center gap-2",onclick:()=>attachmentMenu.callbacks[get$3(item).action](),children:($$anchor13,$$slotProps5)=>{var fragment_19=root_22$2(),node_26=first_child(fragment_19);component(node_26,()=>get$3(item).icon,($$anchor14,item_icon_2)=>{item_icon_2($$anchor14,{class:"h-4 w-4"})});var span_3=sibling(node_26,2),text_4=child(span_3,!0);reset(span_3),template_effect(
()=>set_text(text_4,get$3(item).label)),append($$anchor13,fragment_19)},$$slots:{default:!0}})}),append($$anchor11,fragment_18)},$$slots:{default:!0}})});var node_27=sibling(node_24,2);component(node_27,()=>Tooltip_content,($$anchor10,Tooltip_Content_2)=>{Tooltip_Content_2($$anchor10,{side:"right",children:($$anchor11,$$slotProps4)=>{var p_2=root_23$5(),text_5=child(p_2,!0);reset(p_2),template_effect($0=>set_text(text_5,$0),[()=>attachmentMenu.getSystemMessageTooltip()]),append($$anchor11,p_2)},
$$slots:{default:!0}})}),append($$anchor9,fragment_17)},$$slots:{default:!0}})}),append($$anchor7,fragment_16)};if_block(node_22,$$render=>{get$3(item).id===AttachmentMenuItemId.SYSTEM_MESSAGE&&$$render(consequent_4)})}append($$anchor6,fragment_15)});var node_28=sibling(node_21,2);ChatFormActionAddToolsSubmenu(node_28,{});var node_29=sibling(node_28,2);ChatFormActionAddMcpServersSubmenu(node_29,{onMcpSettingsClick:handleMcpSettingsClick});var node_30=sibling(node_29,2);each(node_30,17,()=>ATTACHMENT_MCP_ITEMS,
item=>item.id,($$anchor6,item)=>{var fragment_20=comment$2(),node_31=first_child(fragment_20);{var consequent_5=$$anchor7=>{var fragment_21=comment$2(),node_32=first_child(fragment_21);component(node_32,()=>Dropdown_menu_item,($$anchor8,DropdownMenu_Item_4)=>{DropdownMenu_Item_4($$anchor8,{class:"flex cursor-pointer items-center gap-2",onclick:()=>attachmentMenu.callbacks[get$3(item).action](),children:($$anchor9,$$slotProps3)=>{var fragment_22=root_26$2(),node_33=first_child(fragment_22);component(
node_33,()=>get$3(item).icon,($$anchor10,item_icon_3)=>{item_icon_3($$anchor10,{class:"h-4 w-4"})});var span_4=sibling(node_33,2),text_6=child(span_4,!0);reset(span_4),template_effect(()=>set_text(text_6,get$3(item).label)),append($$anchor9,fragment_22)},$$slots:{default:!0}})}),append($$anchor7,fragment_21)},d_12=user_derived(()=>attachmentMenu.isItemVisible(get$3(item).visibleWhen));if_block(node_31,$$render=>{get$3(d_12)&&$$render(consequent_5)})}append($$anchor6,fragment_20)}),append($$anchor5,
fragment_2)},$$slots:{default:!0}})}),append($$anchor3,fragment)},$$slots:{default:!0}})}),reset(div),template_effect(()=>set_class(div,1,`flex items-center gap-1 ${className()??""}`)),append($$anchor,div),pop()}function Sheet_overlay($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class"]);var fragment=comment$2(),node2=first_child(fragment);{let $0=user_derived(()=>cn$1("fixed inset-0 z-50 bg-black/5\
0 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:fill-mode-forwards data-[state=open]:animate-in data-[state=open]:fade-in-0",$$props.class));component(node2,()=>Dialog_overlay$1,($$anchor2,SheetPrimitive_Overlay)=>{SheetPrimitive_Overlay($$anchor2,spread_props({"data-slot":"sheet-overlay",get class(){return get$3($0)}},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)}}))})}append($$anchor,fragment),pop()}const sheetVariants=tv({base:`bor\
der-border/30 dark:border-border/20 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fill-mode-forwards fixed z-50 flex flex-col gap-4 shadow-sm transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500 ${PANEL_CLASSES}`,variants:{side:{top:"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",bottom:"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inse\
t-x-0 bottom-0 h-auto border-t",left:"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",right:"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm"}},defaultVariants:{side:"right"}});var root_3$R=from_html('<!> <span class="sr-only">Close</span>',1),root_2$12=from_html("<!> <!>",1),root_1$N=from_html("<!> <!>",1);function Sheet_content($$anchor,$$props){
push$1($$props,!0);let ref2=prop($$props,"ref",15,null),side=prop($$props,"side",3,"right"),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class","side","portalProps","children"]);var fragment=comment$2(),node2=first_child(fragment);component(node2,()=>Portal$2,($$anchor2,SheetPrimitive_Portal)=>{SheetPrimitive_Portal($$anchor2,spread_props(()=>$$props.portalProps,{children:($$anchor3,$$slotProps)=>{var fragment_1=root_1$N(),node_1=first_child(fragment_1);Sheet_overlay(node_1,
{});var node_2=sibling(node_1,2);{let $0=user_derived(()=>cn$1(sheetVariants({side:side()}),$$props.class));component(node_2,()=>Dialog_content$1,($$anchor4,SheetPrimitive_Content)=>{SheetPrimitive_Content($$anchor4,spread_props({"data-slot":"sheet-content",get class(){return get$3($0)}},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)},children:($$anchor5,$$slotProps2)=>{var fragment_2=root_2$12(),node_3=first_child(fragment_2);snippet(node_3,()=>$$props.children??noop$3);
var node_4=sibling(node_3,2);component(node_4,()=>Dialog_close,($$anchor6,SheetPrimitive_Close)=>{SheetPrimitive_Close($$anchor6,{class:"absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:outline-hidden disabled:pointer-events-none",children:($$anchor7,$$slotProps3)=>{var fragment_3=root_3$R(),node_5=first_child(fragment_3);X(node_5,{class:"size-4"}),next$1(
2),append($$anchor7,fragment_3)},$$slots:{default:!0}})}),append($$anchor5,fragment_2)},$$slots:{default:!0}}))})}append($$anchor3,fragment_1)},$$slots:{default:!0}}))}),append($$anchor,fragment),pop()}var root$1s=from_html("<div><!></div>");function Sheet_header($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class","children"]);var div=root$1s();attribute_effect(div,$0=>({"data-slot":"sheet-header",class:$0,
...restProps}),[()=>cn$1("flex flex-col gap-1.5 p-4",$$props.class)]);var node2=child(div);snippet(node2,()=>$$props.children??noop$3),reset(div),bind_this(div,$$value=>ref2($$value),()=>ref2()),append($$anchor,div),pop()}function Sheet_title($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class"]);var fragment=comment$2(),node2=first_child(fragment);{let $0=user_derived(()=>cn$1("font-semibold text-fo\
reground",$$props.class));component(node2,()=>Dialog_title$1,($$anchor2,SheetPrimitive_Title)=>{SheetPrimitive_Title($$anchor2,spread_props({"data-slot":"sheet-title",get class(){return get$3($0)}},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)}}))})}append($$anchor,fragment),pop()}function Sheet_description($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class"]);var fragment=comment$2(),
node2=first_child(fragment);{let $0=user_derived(()=>cn$1("text-sm text-muted-foreground",$$props.class));component(node2,()=>Dialog_description$1,($$anchor2,SheetPrimitive_Description)=>{SheetPrimitive_Description($$anchor2,spread_props({"data-slot":"sheet-description",get class(){return get$3($0)}},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)}}))})}append($$anchor,fragment),pop()}const Root$3=Dialog;var root_3$Q=from_html("<!> <!>",1),root_7$r=from_html('<button type=\
"button"><!> <span> </span></button>'),root_10$e=from_html('<button type="button" disabled=""><!> <span> </span></button>'),root_11$d=from_html("<p> </p>"),root_9$k=from_html("<!> <!>",1),root_15$9=from_html('<button type="button"><!> <span> </span></button>'),root_16$5=from_html("<p>PDFs will be converted to text. Image-based PDFs may not work properly.</p>"),root_14$5=from_html("<!> <!>",1),root_20$4=from_html('<button type="button"><!> <span> </span></button>'),root_21$3=from_html("<p> </p>"),
root_19$9=from_html("<!> <!>",1),root_23$4=from_html('<button type="button"><!> <span> </span></button>'),root_2$11=from_html('<!> <div class="flex flex-col gap-1 px-1.5 pb-2"><!> <!> <!> <div class="my-2 border-t"></div> <a class="flex items-center gap-3 px-3 py-2"><!> <span class="text-sm">MCP Servers</span></a> <a class="flex items-center gap-3 px-3 py-2"><!> <span class="text-sm">Tools</span></a> <!></div>',1),root_1$M=from_html("<!> <!>",1),root$1r=from_html("<div><!></div>");function ChatFormActionAddSheet($$anchor,$$props){
push$1($$props,!0);let className=prop($$props,"class",3,""),disabled=prop($$props,"disabled",3,!1),hasAudioModality=prop($$props,"hasAudioModality",3,!1),hasVisionModality=prop($$props,"hasVisionModality",3,!1),hasMcpPromptsSupport=prop($$props,"hasMcpPromptsSupport",3,!1),hasMcpResourcesSupport=prop($$props,"hasMcpResourcesSupport",3,!1),sheetOpen=state$1(!1);const attachmentMenu=useAttachmentMenu(()=>({hasVisionModality:hasVisionModality(),hasAudioModality:hasAudioModality(),hasMcpPromptsSupport:hasMcpPromptsSupport(),
hasMcpResourcesSupport:hasMcpResourcesSupport()}),()=>({onFileUpload:$$props.onFileUpload,onSystemPromptClick:$$props.onSystemPromptClick,onMcpPromptClick:$$props.onMcpPromptClick,onMcpResourcesClick:$$props.onMcpResourcesClick}),()=>{set$1(sheetOpen,!1)}),sheetItemClass="flex w-full items-center gap-3 rounded-md px-3 py-2.5 text-left text-sm transition-colors hover:bg-accent active:bg-accent disabled:cursor-not-allowed disabled:opacity-50";var div=root$1r(),node2=child(div);component(node2,()=>Root$3,
($$anchor2,Sheet_Root)=>{Sheet_Root($$anchor2,{get open(){return get$3(sheetOpen)},set open($$value){set$1(sheetOpen,$$value,!0)},children:($$anchor3,$$slotProps)=>{var fragment=root_1$M(),node_1=first_child(fragment);snippet(node_1,()=>$$props.trigger,()=>({disabled:disabled(),onclick:()=>set$1(sheetOpen,!0)}));var node_2=sibling(node_1,2);component(node_2,()=>Sheet_content,($$anchor4,Sheet_Content)=>{Sheet_Content($$anchor4,{side:"bottom",class:"max-h-[85vh] gap-0 overflow-y-auto",children:($$anchor5,$$slotProps2)=>{
var fragment_1=root_2$11(),node_3=first_child(fragment_1);component(node_3,()=>Sheet_header,($$anchor6,Sheet_Header)=>{Sheet_Header($$anchor6,{children:($$anchor7,$$slotProps3)=>{var fragment_2=root_3$Q(),node_4=first_child(fragment_2);component(node_4,()=>Sheet_title,($$anchor8,Sheet_Title)=>{Sheet_Title($$anchor8,{children:($$anchor9,$$slotProps4)=>{next$1();var text2=text$8("Add to chat");append($$anchor9,text2)},$$slots:{default:!0}})});var node_5=sibling(node_4,2);component(node_5,()=>Sheet_description,
($$anchor8,Sheet_Description)=>{Sheet_Description($$anchor8,{class:"sr-only",children:($$anchor9,$$slotProps4)=>{next$1();var text_1=text$8("Add files, system prompt or configure MCP servers");append($$anchor9,text_1)},$$slots:{default:!0}})}),append($$anchor7,fragment_2)},$$slots:{default:!0}})});var div_1=sibling(node_3,2),node_6=child(div_1);each(node_6,17,()=>ATTACHMENT_FILE_ITEMS,item=>item.id,($$anchor6,item)=>{const enabled=user_derived(()=>attachmentMenu.isItemEnabled(get$3(item).enabledWhen));
var fragment_3=comment$2(),node_7=first_child(fragment_3);{var consequent=$$anchor7=>{var button=root_7$r();set_class(button,1,clsx(sheetItemClass));var node_8=child(button);component(node_8,()=>get$3(item).icon,($$anchor8,item_icon)=>{item_icon($$anchor8,{class:"h-4 w-4 shrink-0"})});var span=sibling(node_8,2),text_2=child(span,!0);reset(span),reset(button),template_effect(()=>set_text(text_2,get$3(item).label)),delegated("click",button,()=>attachmentMenu.callbacks[get$3(item).action]()),append(
$$anchor7,button)},consequent_1=$$anchor7=>{var fragment_4=comment$2(),node_9=first_child(fragment_4);component(node_9,()=>Root$5,($$anchor8,Tooltip_Root)=>{Tooltip_Root($$anchor8,{get delayDuration(){return TOOLTIP_DELAY_DURATION},children:($$anchor9,$$slotProps3)=>{var fragment_5=root_9$k(),node_10=first_child(fragment_5);component(node_10,()=>Tooltip_trigger,($$anchor10,Tooltip_Trigger)=>{Tooltip_Trigger($$anchor10,{children:($$anchor11,$$slotProps4)=>{var button_1=root_10$e();set_class(button_1,
1,clsx(sheetItemClass));var node_11=child(button_1);component(node_11,()=>get$3(item).icon,($$anchor12,item_icon_1)=>{item_icon_1($$anchor12,{class:"h-4 w-4 shrink-0"})});var span_1=sibling(node_11,2),text_3=child(span_1,!0);reset(span_1),reset(button_1),template_effect(()=>set_text(text_3,get$3(item).label)),append($$anchor11,button_1)},$$slots:{default:!0}})});var node_12=sibling(node_10,2);component(node_12,()=>Tooltip_content,($$anchor10,Tooltip_Content)=>{Tooltip_Content($$anchor10,{side:"r\
ight",children:($$anchor11,$$slotProps4)=>{var p2=root_11$d(),text_4=child(p2,!0);reset(p2),template_effect(()=>set_text(text_4,get$3(item).disabledTooltip)),append($$anchor11,p2)},$$slots:{default:!0}})}),append($$anchor9,fragment_5)},$$slots:{default:!0}})}),append($$anchor7,fragment_4)};if_block(node_7,$$render=>{get$3(enabled)?$$render(consequent):get$3(item).disabledTooltip&&$$render(consequent_1,1)})}append($$anchor6,fragment_3)});var node_13=sibling(node_6,2);{var consequent_3=$$anchor6=>{
const pdfItem=user_derived(()=>ATTACHMENT_FILE_ITEMS.find(i=>i.id===AttachmentMenuItemId.PDF));var fragment_6=comment$2(),node_14=first_child(fragment_6);{var consequent_2=$$anchor7=>{var fragment_7=comment$2(),node_15=first_child(fragment_7);component(node_15,()=>Root$5,($$anchor8,Tooltip_Root_1)=>{Tooltip_Root_1($$anchor8,{get delayDuration(){return TOOLTIP_DELAY_DURATION},children:($$anchor9,$$slotProps3)=>{var fragment_8=root_14$5(),node_16=first_child(fragment_8);component(node_16,()=>Tooltip_trigger,
($$anchor10,Tooltip_Trigger_1)=>{Tooltip_Trigger_1($$anchor10,{children:($$anchor11,$$slotProps4)=>{var button_2=root_15$9();set_class(button_2,1,clsx(sheetItemClass));var node_17=child(button_2);component(node_17,()=>get$3(pdfItem).icon,($$anchor12,pdfItem_icon)=>{pdfItem_icon($$anchor12,{class:"h-4 w-4 shrink-0"})});var span_2=sibling(node_17,2),text_5=child(span_2,!0);reset(span_2),reset(button_2),template_effect(()=>set_text(text_5,get$3(pdfItem).label)),delegated("click",button_2,()=>attachmentMenu.
callbacks[get$3(pdfItem).action]()),append($$anchor11,button_2)},$$slots:{default:!0}})});var node_18=sibling(node_16,2);component(node_18,()=>Tooltip_content,($$anchor10,Tooltip_Content_1)=>{Tooltip_Content_1($$anchor10,{side:"right",children:($$anchor11,$$slotProps4)=>{var p_1=root_16$5();append($$anchor11,p_1)},$$slots:{default:!0}})}),append($$anchor9,fragment_8)},$$slots:{default:!0}})}),append($$anchor7,fragment_7)};if_block(node_14,$$render=>{get$3(pdfItem)&&$$render(consequent_2)})}append(
$$anchor6,fragment_6)},d2=user_derived(()=>!attachmentMenu.isItemEnabled("hasVisionModality"));if_block(node_13,$$render=>{get$3(d2)&&$$render(consequent_3)})}var node_19=sibling(node_13,2);each(node_19,17,()=>ATTACHMENT_EXTRA_ITEMS,item=>item.id,($$anchor6,item)=>{var fragment_9=comment$2(),node_20=first_child(fragment_9);{var consequent_4=$$anchor7=>{var fragment_10=comment$2(),node_21=first_child(fragment_10);component(node_21,()=>Root$5,($$anchor8,Tooltip_Root_2)=>{Tooltip_Root_2($$anchor8,{
get delayDuration(){return TOOLTIP_DELAY_DURATION},children:($$anchor9,$$slotProps3)=>{var fragment_11=root_19$9(),node_22=first_child(fragment_11);component(node_22,()=>Tooltip_trigger,($$anchor10,Tooltip_Trigger_2)=>{Tooltip_Trigger_2($$anchor10,{children:($$anchor11,$$slotProps4)=>{var button_3=root_20$4();set_class(button_3,1,clsx(sheetItemClass));var node_23=child(button_3);component(node_23,()=>get$3(item).icon,($$anchor12,item_icon_2)=>{item_icon_2($$anchor12,{class:"h-4 w-4 shrink-0"})});
var span_3=sibling(node_23,2),text_6=child(span_3,!0);reset(span_3),reset(button_3),template_effect(()=>set_text(text_6,get$3(item).label)),delegated("click",button_3,()=>attachmentMenu.callbacks[get$3(item).action]()),append($$anchor11,button_3)},$$slots:{default:!0}})});var node_24=sibling(node_22,2);component(node_24,()=>Tooltip_content,($$anchor10,Tooltip_Content_2)=>{Tooltip_Content_2($$anchor10,{side:"right",children:($$anchor11,$$slotProps4)=>{var p_2=root_21$3(),text_7=child(p_2,!0);reset(
p_2),template_effect($0=>set_text(text_7,$0),[()=>attachmentMenu.getSystemMessageTooltip()]),append($$anchor11,p_2)},$$slots:{default:!0}})}),append($$anchor9,fragment_11)},$$slots:{default:!0}})}),append($$anchor7,fragment_10)};if_block(node_20,$$render=>{get$3(item).id===AttachmentMenuItemId.SYSTEM_MESSAGE&&$$render(consequent_4)})}append($$anchor6,fragment_9)});var a=sibling(node_19,4),node_25=child(a);McpLogo(node_25,{class:"inline h-4 w-4"}),next$1(2),reset(a);var a_1=sibling(a,2),node_26=child(
a_1);Pencil_ruler(node_26,{class:"inline h-4 w-4"}),next$1(2),reset(a_1);var node_27=sibling(a_1,2);each(node_27,17,()=>ATTACHMENT_MCP_ITEMS,item=>item.id,($$anchor6,item)=>{var fragment_12=comment$2(),node_28=first_child(fragment_12);{var consequent_5=$$anchor7=>{var button_4=root_23$4();set_class(button_4,1,clsx(sheetItemClass));var node_29=child(button_4);component(node_29,()=>get$3(item).icon,($$anchor8,item_icon_3)=>{item_icon_3($$anchor8,{class:"h-4 w-4 shrink-0"})});var span_4=sibling(node_29,
2),text_8=child(span_4,!0);reset(span_4),reset(button_4),template_effect(()=>set_text(text_8,get$3(item).label)),delegated("click",button_4,()=>attachmentMenu.callbacks[get$3(item).action]()),append($$anchor7,button_4)},d_12=user_derived(()=>attachmentMenu.isItemVisible(get$3(item).visibleWhen));if_block(node_28,$$render=>{get$3(d_12)&&$$render(consequent_5)})}append($$anchor6,fragment_12)}),reset(div_1),template_effect($0=>{set_attribute(a,"href",ROUTES.MCP_SERVERS),set_attribute(a_1,"href",$0)},
[()=>RouterService.settings(SETTINGS_SECTION_SLUGS.TOOLS)]),append($$anchor5,fragment_1)},$$slots:{default:!0}})}),append($$anchor3,fragment)},$$slots:{default:!0}})}),reset(div),template_effect(()=>set_class(div,1,`flex items-center gap-1 ${className()??""}`)),append($$anchor,div),pop()}delegate(["click"]);var root_3$P=from_html('<span class="sr-only"> </span> <!>',1),root_4$A=from_html("<p> </p>"),root_1$L=from_html("<!> <!>",1);function ChatFormActionAddButton($$anchor,$$props){let disabled=prop(
$$props,"disabled",3,!1);var fragment=comment$2(),node2=first_child(fragment);component(node2,()=>Root$5,($$anchor2,Tooltip_Root)=>{Tooltip_Root($$anchor2,{children:($$anchor3,$$slotProps)=>{var fragment_1=root_1$L(),node_1=first_child(fragment_1);component(node_1,()=>Tooltip_trigger,($$anchor4,Tooltip_Trigger)=>{Tooltip_Trigger($$anchor4,{class:"w-full",children:($$anchor5,$$slotProps2)=>{Button($$anchor5,{class:"file-upload-button h-8 w-8 rounded-full p-0",get disabled(){return disabled()},get onclick(){
return $$props.onclick},variant:"secondary",type:"button",children:($$anchor6,$$slotProps3)=>{var fragment_3=root_3$P(),span=first_child(fragment_3),text2=child(span,!0);reset(span);var node_2=sibling(span,2);Plus(node_2,{class:"h-4 w-4"}),template_effect(()=>set_text(text2,ATTACHMENT_TOOLTIP_TEXT)),append($$anchor6,fragment_3)},$$slots:{default:!0}})},$$slots:{default:!0}})});var node_3=sibling(node_1,2);component(node_3,()=>Tooltip_content,($$anchor4,Tooltip_Content)=>{Tooltip_Content($$anchor4,
{children:($$anchor5,$$slotProps2)=>{var p2=root_4$A(),text_1=child(p2,!0);reset(p2),template_effect(()=>set_text(text_1,ATTACHMENT_TOOLTIP_TEXT)),append($$anchor5,p2)},$$slots:{default:!0}})}),append($$anchor3,fragment_1)},$$slots:{default:!0}})}),append($$anchor,fragment)}function ChatFormActionsAdd($$anchor,$$props){push$1($$props,!0);let disabled=prop($$props,"disabled",3,!1),hasAudioModality=prop($$props,"hasAudioModality",3,!1),hasMcpPromptsSupport=prop($$props,"hasMcpPromptsSupport",3,!1),
hasMcpResourcesSupport=prop($$props,"hasMcpResourcesSupport",3,!1),hasVisionModality=prop($$props,"hasVisionModality",3,!1);const isMobile=new IsMobile;var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{ChatFormActionAddSheet($$anchor2,{get disabled(){return disabled()},get hasAudioModality(){return hasAudioModality()},get hasVisionModality(){return hasVisionModality()},get hasMcpPromptsSupport(){return hasMcpPromptsSupport()},get hasMcpResourcesSupport(){return hasMcpResourcesSupport()},
get onFileUpload(){return $$props.onFileUpload},get onMcpPromptClick(){return $$props.onMcpPromptClick},get onMcpResourcesClick(){return $$props.onMcpResourcesClick},trigger:($$anchor3,$$arg0)=>{let disabled2=()=>$$arg0?.().disabled,onclick=()=>$$arg0?.().onclick;ChatFormActionAddButton($$anchor3,{get disabled(){return disabled2()},get onclick(){return onclick()}})},$$slots:{trigger:!0}})},alternate=$$anchor2=>{ChatFormActionAddDropdown($$anchor2,{get disabled(){return disabled()},get hasAudioModality(){
return hasAudioModality()},get hasVisionModality(){return hasVisionModality()},get hasMcpPromptsSupport(){return hasMcpPromptsSupport()},get hasMcpResourcesSupport(){return hasMcpResourcesSupport()},get onFileUpload(){return $$props.onFileUpload},get onMcpPromptClick(){return $$props.onMcpPromptClick},get onMcpResourcesClick(){return $$props.onMcpResourcesClick},get onMcpSettingsClick(){return $$props.onMcpSettingsClick},get onSystemPromptClick(){return $$props.onSystemPromptClick},trigger:$$anchor3=>{
ChatFormActionAddButton($$anchor3,{get disabled(){return disabled()}})},$$slots:{trigger:!0}})};if_block(node2,$$render=>{isMobile.current?$$render(consequent):$$render(alternate,-1)})}append($$anchor,fragment),pop()}var root_3$O=from_html('<span class="sr-only"> </span> <!>',1),root_7$q=from_html("<p>Current model does not support audio</p>"),root_1$K=from_html("<!> <!>",1),root$1q=from_html("<div><!></div>");function ChatFormActionRecord($$anchor,$$props){let className=prop($$props,"class",3,""),
disabled=prop($$props,"disabled",3,!1),hasAudioModality=prop($$props,"hasAudioModality",3,!1),isLoading2=prop($$props,"isLoading",3,!1),isRecording=prop($$props,"isRecording",3,!1);var div=root$1q(),node2=child(div);component(node2,()=>Root$5,($$anchor2,Tooltip_Root)=>{Tooltip_Root($$anchor2,{children:($$anchor3,$$slotProps)=>{var fragment=root_1$K(),node_1=first_child(fragment);component(node_1,()=>Tooltip_trigger,($$anchor4,Tooltip_Trigger)=>{Tooltip_Trigger($$anchor4,{children:($$anchor5,$$slotProps2)=>{
{let $0=user_derived(()=>isRecording()?"animate-pulse bg-red-500 text-white hover:bg-red-600":""),$1=user_derived(()=>disabled()||isLoading2()||!hasAudioModality());Button($$anchor5,{get class(){return`h-8 w-8 rounded-full p-0 ${get$3($0)??""}`},get disabled(){return get$3($1)},get onclick(){return $$props.onMicClick},type:"button",children:($$anchor6,$$slotProps3)=>{var fragment_2=root_3$O(),span=first_child(fragment_2),text2=child(span,!0);reset(span);var node_2=sibling(span,2);{var consequent=$$anchor7=>{
Square($$anchor7,{class:"h-4 w-4 animate-pulse fill-white"})},alternate=$$anchor7=>{Mic($$anchor7,{class:"h-4 w-4"})};if_block(node_2,$$render=>{isRecording()?$$render(consequent):$$render(alternate,-1)})}template_effect(()=>set_text(text2,isRecording()?"Stop recording":"Start recording")),append($$anchor6,fragment_2)},$$slots:{default:!0}})}},$$slots:{default:!0}})});var node_3=sibling(node_1,2);{var consequent_1=$$anchor4=>{var fragment_5=comment$2(),node_4=first_child(fragment_5);component(node_4,
()=>Tooltip_content,($$anchor5,Tooltip_Content)=>{Tooltip_Content($$anchor5,{children:($$anchor6,$$slotProps2)=>{var p2=root_7$q();append($$anchor6,p2)},$$slots:{default:!0}})}),append($$anchor4,fragment_5)};if_block(node_3,$$render=>{hasAudioModality()||$$render(consequent_1)})}append($$anchor3,fragment)},$$slots:{default:!0}})}),reset(div),template_effect(()=>set_class(div,1,`flex items-center gap-1 ${className()??""}`)),append($$anchor,div)}var root_1$J=from_html('<div class="mr-auto flex ite\
ms-center gap-2"><!></div>'),root_4$z=from_html('<span class="sr-only">Stop</span> <!>',1),root$1p=from_html('<div style="container-type: inline-size"><!> <!> <!></div>');function ChatFormActions($$anchor,$$props){push$1($$props,!0);let canSend=prop($$props,"canSend",3,!1),canSubmit=prop($$props,"canSubmit",3,!1),className=prop($$props,"class",3,""),disabled=prop($$props,"disabled",3,!1),isLoading2=prop($$props,"isLoading",3,!1),isRecording=prop($$props,"isRecording",3,!1),showAddButton=prop($$props,
"showAddButton",3,!0),showModelSelector=prop($$props,"showModelSelector",3,!0),uploadedFiles=prop($$props,"uploadedFiles",19,()=>[]),currentConfig=user_derived(config$1),hasMcpPromptsSupport=user_derived(()=>{const perChatOverrides=conversationsStore.getAllMcpServerOverrides();return mcpStore.hasPromptsCapability(perChatOverrides)}),hasMcpResourcesSupport=user_derived(()=>{const perChatOverrides=conversationsStore.getAllMcpServerOverrides();return mcpStore.hasResourcesCapability(perChatOverrides)}),
hasAudioModality=state$1(!1),hasVisionModality=state$1(!1),hasModelSelected=state$1(!1),isSelectedModelInCache=state$1(!0),submitTooltip=state$1(""),hasAudioAttachments=user_derived(()=>uploadedFiles().some(file=>getFileTypeCategory(file.type)===FileTypeCategory.AUDIO)),shouldShowRecordButton=user_derived(()=>get$3(hasAudioModality)&&!canSubmit()&&!get$3(hasAudioAttachments)&&get$3(currentConfig).autoMicOnEmpty),selectorModelRef=state$1(void 0);function openModelSelector(){get$3(selectorModelRef)?.
open()}var $$exports={openModelSelector},div=root$1p(),node2=child(div);{var consequent=$$anchor2=>{var div_1=root_1$J(),node_1=child(div_1);ChatFormActionsAdd(node_1,{get disabled(){return disabled()},get hasAudioModality(){return get$3(hasAudioModality)},get hasVisionModality(){return get$3(hasVisionModality)},get hasMcpPromptsSupport(){return get$3(hasMcpPromptsSupport)},get hasMcpResourcesSupport(){return get$3(hasMcpResourcesSupport)},get onFileUpload(){return $$props.onFileUpload},get onSystemPromptClick(){
return $$props.onSystemPromptClick},get onMcpPromptClick(){return $$props.onMcpPromptClick},get onMcpResourcesClick(){return $$props.onMcpResourcesClick},onMcpSettingsClick:()=>goto(ROUTES.MCP_SERVERS)}),reset(div_1),append($$anchor2,div_1)};if_block(node2,$$render=>{showAddButton()&&$$render(consequent)})}var node_2=sibling(node2,2);{var consequent_1=$$anchor2=>{bind_this(ChatFormActionModels($$anchor2,{get disabled(){return disabled()},forceForegroundText:!0,useGlobalSelection:!0,get hasAudioModality(){
return get$3(hasAudioModality)},set hasAudioModality($$value){set$1(hasAudioModality,$$value,!0)},get hasVisionModality(){return get$3(hasVisionModality)},set hasVisionModality($$value){set$1(hasVisionModality,$$value,!0)},get hasModelSelected(){return get$3(hasModelSelected)},set hasModelSelected($$value){set$1(hasModelSelected,$$value,!0)},get isSelectedModelInCache(){return get$3(isSelectedModelInCache)},set isSelectedModelInCache($$value){set$1(isSelectedModelInCache,$$value,!0)},get submitTooltip(){
return get$3(submitTooltip)},set submitTooltip($$value){set$1(submitTooltip,$$value,!0)}}),$$value=>set$1(selectorModelRef,$$value,!0),()=>get$3(selectorModelRef))};if_block(node_2,$$render=>{showModelSelector()&&$$render(consequent_1)})}var node_3=sibling(node_2,2);{var consequent_2=$$anchor2=>{Button($$anchor2,{type:"button",variant:"secondary",get onclick(){return $$props.onStop},class:"group h-8 w-8 rounded-full p-0 hover:bg-destructive/10!",children:($$anchor3,$$slotProps)=>{var fragment_2=root_4$z(),
node_4=sibling(first_child(fragment_2),2);Square(node_4,{class:"h-8 w-8 fill-muted-foreground stroke-muted-foreground group-hover:fill-destructive group-hover:stroke-destructive hover:fill-destructive hover:stroke-destructive"}),append($$anchor3,fragment_2)},$$slots:{default:!0}})},consequent_3=$$anchor2=>{ChatFormActionRecord($$anchor2,{get disabled(){return disabled()},get hasAudioModality(){return get$3(hasAudioModality)},get isLoading(){return isLoading2()},get isRecording(){return isRecording()},
get onMicClick(){return $$props.onMicClick}})},alternate=$$anchor2=>{{let $0=user_derived(()=>canSend()&&(showModelSelector()?get$3(hasModelSelected)&&get$3(isSelectedModelInCache):!0)),$1=user_derived(()=>showModelSelector()&&get$3(hasModelSelected)&&!get$3(isSelectedModelInCache));ChatFormActionSubmit($$anchor2,{get canSend(){return get$3($0)},get disabled(){return disabled()},get tooltipLabel(){return get$3(submitTooltip)},get showErrorState(){return get$3($1)}})}};if_block(node_3,$$render=>{
isLoading2()&&!canSubmit()?$$render(consequent_2):get$3(shouldShowRecordButton)?$$render(consequent_3,1):$$render(alternate,-1)})}return reset(div),template_effect(()=>set_class(div,1,`flex w-full items-center gap-3 ${className()??""} ${showAddButton()?"":"justify-end"}`)),append($$anchor,div),pop($$exports)}var root_2$10=from_html('<span class="sr-only">Send</span> <!>',1),root_6$r=from_html("<p> </p>"),root_4$y=from_html("<!> <!>",1);function ChatFormActionSubmit($$anchor,$$props){const submitButton=($$anchor2,$$arg0)=>{
let props=derived_safe_equal(()=>fallback($$arg0?.(),()=>({}),!0));{let $0=user_derived(()=>["h-8 w-8 rounded-full p-0",showErrorState()&&"bg-red-400/10 text-red-400 hover:bg-red-400/20 hover:text-red-400 disabled:opacity-100"]);Button($$anchor2,spread_props({type:"submit",get disabled(){return get$3(isDisabled)},get class(){return get$3($0)}},()=>get$3(props),{children:($$anchor3,$$slotProps)=>{var fragment_1=root_2$10(),node2=sibling(first_child(fragment_1),2);Arrow_up(node2,{class:"h-12 w-12"}),
append($$anchor3,fragment_1)},$$slots:{default:!0}}))}};let canSend=prop($$props,"canSend",3,!1),disabled=prop($$props,"disabled",3,!1),showErrorState=prop($$props,"showErrorState",3,!1),isDisabled=user_derived(()=>!canSend()||disabled());var fragment_2=comment$2(),node_1=first_child(fragment_2);{var consequent=$$anchor2=>{var fragment_3=comment$2(),node_2=first_child(fragment_3);component(node_2,()=>Root$5,($$anchor3,Tooltip_Root)=>{Tooltip_Root($$anchor3,{children:($$anchor4,$$slotProps)=>{var fragment_4=root_4$y(),
node_3=first_child(fragment_4);component(node_3,()=>Tooltip_trigger,($$anchor5,Tooltip_Trigger)=>{Tooltip_Trigger($$anchor5,{children:($$anchor6,$$slotProps2)=>{submitButton($$anchor6)},$$slots:{default:!0}})});var node_4=sibling(node_3,2);component(node_4,()=>Tooltip_content,($$anchor5,Tooltip_Content)=>{Tooltip_Content($$anchor5,{children:($$anchor6,$$slotProps2)=>{var p2=root_6$r(),text2=child(p2,!0);reset(p2),template_effect(()=>set_text(text2,$$props.tooltipLabel)),append($$anchor6,p2)},$$slots:{
default:!0}})}),append($$anchor4,fragment_4)},$$slots:{default:!0}})}),append($$anchor2,fragment_3)},alternate=$$anchor2=>{submitButton($$anchor2)};if_block(node_1,$$render=>{$$props.tooltipLabel?$$render(consequent):$$render(alternate,-1)})}append($$anchor,fragment_2)}function ChatFormActionModels($$anchor,$$props){push$1($$props,!0);let disabled=prop($$props,"disabled",3,!1),forceForegroundText=prop($$props,"forceForegroundText",3,!1),hasAudioModality=prop($$props,"hasAudioModality",15,!1),hasVisionModality=prop(
$$props,"hasVisionModality",15,!1),hasModelSelected=prop($$props,"hasModelSelected",15,!1),isSelectedModelInCache=prop($$props,"isSelectedModelInCache",15,!0),submitTooltip=prop($$props,"submitTooltip",15,""),useGlobalSelection=prop($$props,"useGlobalSelection",3,!1),isRouter=user_derived(isRouterMode),isOffline=user_derived(()=>!!serverError()),conversationModel=user_derived(()=>chatStore.getConversationModel(activeMessages())),lastSyncedConversationModel=null;user_effect(()=>{if(get$3(conversationModel)&&
get$3(conversationModel)!==lastSyncedConversationModel)lastSyncedConversationModel=get$3(conversationModel),modelsStore.selectModelByName(get$3(conversationModel));else if(get$3(isRouter)&&!modelsStore.selectedModelId&&modelsStore.loadedModelIds.length>0){lastSyncedConversationModel=null;const first=modelOptions().find(m=>modelsStore.loadedModelIds.includes(m.model));first&&modelsStore.selectModelById(first.id)}});let activeModelId=user_derived(()=>{const options=modelOptions();if(!get$3(isRouter))
return options.length>0?options[0].model:null;const selectedId=selectedModelId();if(selectedId){const model=options.find(m=>m.id===selectedId);if(model)return model.model}if(get$3(conversationModel)){const model=options.find(m=>m.model===get$3(conversationModel));if(model)return model.model}return null}),modelPropsVersion=state$1(0);user_effect(()=>{get$3(activeModelId)&&(modelsStore.getModelProps(get$3(activeModelId))||modelsStore.fetchModelProps(get$3(activeModelId)).then(()=>{update$1(modelPropsVersion)}))}),
user_effect(()=>{hasAudioModality(get$3(activeModelId)?modelsStore.modelSupportsAudio(get$3(activeModelId)):!1)}),user_effect(()=>{get$3(modelPropsVersion),hasVisionModality(get$3(activeModelId)?modelsStore.modelSupportsVision(get$3(activeModelId)):!1)}),user_effect(()=>{hasModelSelected(!get$3(isRouter)||!!get$3(conversationModel)||!!selectedModelId())}),user_effect(()=>{if(!get$3(isRouter))isSelectedModelInCache(!0);else if(get$3(conversationModel))isSelectedModelInCache(modelOptions().some(option2=>option2.
model===get$3(conversationModel)));else{const currentModelId=selectedModelId();isSelectedModelInCache(currentModelId?modelOptions().some(option2=>option2.id===currentModelId):!1)}}),user_effect(()=>{hasModelSelected()?isSelectedModelInCache()?submitTooltip(""):submitTooltip("Selected model is not available, please select another"):submitTooltip("Please select a model first")});let selectorModelRef=state$1(void 0),isMobile=new IsMobile;function open2(){get$3(selectorModelRef)?.open()}var $$exports={
open:open2},fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{{let $0=user_derived(()=>disabled()||get$3(isOffline));bind_this(ModelsSelectorSheet($$anchor2,{get disabled(){return get$3($0)},get currentModel(){return $$props.currentModel},get forceForegroundText(){return forceForegroundText()},get useGlobalSelection(){return useGlobalSelection()}}),$$value=>set$1(selectorModelRef,$$value,!0),()=>get$3(selectorModelRef))}},alternate=$$anchor2=>{{let $0=user_derived(()=>disabled()||
get$3(isOffline));bind_this(ModelsSelectorDropdown($$anchor2,{get disabled(){return get$3($0)},get currentModel(){return $$props.currentModel},get forceForegroundText(){return forceForegroundText()},get useGlobalSelection(){return useGlobalSelection()}}),$$value=>set$1(selectorModelRef,$$value,!0),()=>get$3(selectorModelRef))}};if_block(node2,$$render=>{isMobile.current?$$render(consequent):$$render(alternate,-1)})}return append($$anchor,fragment),pop($$exports)}function Collapsible($$anchor,$$props){
push$1($$props,!0);let ref2=prop($$props,"ref",15,null),open2=prop($$props,"open",15,!1),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","open"]);var fragment=comment$2(),node2=first_child(fragment);component(node2,()=>Collapsible$1,($$anchor2,CollapsiblePrimitive_Root)=>{CollapsiblePrimitive_Root($$anchor2,spread_props({"data-slot":"collapsible"},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)},get open(){return open2()},set open($$value){open2($$value)}}))}),
append($$anchor,fragment),pop()}function Collapsible_trigger($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref"]);var fragment=comment$2(),node2=first_child(fragment);component(node2,()=>Collapsible_trigger$1,($$anchor2,CollapsiblePrimitive_Trigger)=>{CollapsiblePrimitive_Trigger($$anchor2,spread_props({"data-slot":"collapsible-trigger"},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)}}))}),
append($$anchor,fragment),pop()}function Collapsible_content($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref"]);var fragment=comment$2(),node2=first_child(fragment);component(node2,()=>Collapsible_content$1,($$anchor2,CollapsiblePrimitive_Content)=>{CollapsiblePrimitive_Content($$anchor2,spread_props({"data-slot":"collapsible-content"},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)}}))}),
append($$anchor,fragment),pop()}function useToolsPanel(){const expandedGroups=new SvelteSet,groups=user_derived(()=>toolsStore.toolGroups),activeGroups=user_derived(()=>get$3(groups).filter(g=>g.source!==ToolSource.MCP||!g.serverId||conversationsStore.isMcpServerEnabledForChat(g.serverId))),totalToolCount=user_derived(()=>get$3(activeGroups).reduce((n,g)=>n+g.tools.length,0)),noToolsInfoMessage=user_derived(()=>toolsStore.loading||toolsStore.toolGroups.length>0?null:toolsStore.isToolsEndpointUnreachable?
"To enable Built-In Tools you need to run llama-server with --tools all or --tools <name> flag. To see MCP Tools you need to add / enable MCP Server(s).":toolsStore.error?null:"To enable Built-In Tools you need to run llama-server with --tools all or --tools <name> flag. To see MCP Tools you need to add / enable MCP Server(s).");function getGroupCheckedState(group){return{checked:toolsStore.isGroupFullyEnabled(group),indeterminate:toolsStore.isGroupPartiallyEnabled(group)}}function getEnabledToolCount(group){
return group.tools.filter(tool=>toolsStore.isToolEnabled(tool.function.name)).length}function getFavicon(group){if(group.source!==ToolSource.MCP)return null;for(const server of mcpStore.getServersSorted())if(mcpStore.getServerLabel(server)===group.label)return mcpStore.getServerFavicon(server.id);return null}function isGroupDisabled(group){return group.source===ToolSource.MCP&&!!group.serverId&&!conversationsStore.isMcpServerEnabledForChat(group.serverId)}function toggleGroupExpanded(label){expandedGroups.
has(label)?expandedGroups.delete(label):expandedGroups.add(label)}function handleOpen(){toolsStore.builtinTools.length===0&&!toolsStore.loading&&toolsStore.fetchBuiltinTools(),mcpStore.runHealthChecksForServers(mcpStore.getServersSorted().filter(s2=>s2.enabled))}return{expandedGroups,get groups(){return get$3(groups)},get activeGroups(){return get$3(activeGroups)},get totalToolCount(){return get$3(totalToolCount)},get noToolsInfoMessage(){return get$3(noToolsInfoMessage)},getGroupCheckedState,getEnabledToolCount,
getFavicon,isGroupDisabled,toggleGroupExpanded,handleOpen}}var root_2$$=from_html("<!> <span>Tools</span>",1),root_5$r=from_html('<div class="px-3 py-4 text-center text-sm text-muted-foreground"><!> Loading tools...</div>'),root_6$q=from_html('<div class="grid gap-2.5 px-3 py-4 text-sm text-muted-foreground"><span class="flex gap-2"><!> <span>Run llama-server with <code>--tools</code> flag to enable <strong>Built-in Tools</strong>.</span></span> <span class="flex gap-2"><!> <span> <strong>MCP To\
ols</strong>.</span></span></div>'),root_7$p=from_html('<div class="px-3 py-4 text-center text-sm text-muted-foreground">Failed to load tools</div>'),root_8$q=from_html('<div class="flex gap-2 px-3 py-4 text-sm text-muted-foreground"><!> <span> </span></div>'),root_9$j=from_html('<div class="px-3 py-4 text-center text-sm text-muted-foreground">No tools available</div>'),root_16$4=from_html('<img alt="" class="h-4 w-4 shrink-0 rounded-sm"/>'),root_13$c=from_html('<!> <span class="inline-flex min-\
w-0 items-center gap-1.5 font-medium"><!> <span class="truncate"> </span></span> <span class="ml-auto shrink-0 text-xs text-muted-foreground"> </span>',1),root_19$8=from_html("<p> </p>"),root_17$7=from_html("<!> <!>",1),root_21$2=from_html('<button type="button" class="flex w-full items-center gap-2 rounded px-2 py-1.5 text-left text-sm transition-colors hover:bg-muted/50"><!> <span class="min-w-0 flex-1 truncate font-mono text-[12px]"> </span></button>'),root_20$3=from_html('<div class="ml-4 fl\
ex flex-col gap-0.5 border-l border-border/50 pl-2"></div>'),root_12$9=from_html('<div class="flex items-center gap-1"><!> <!></div> <!>',1),root_10$d=from_html('<div class="max-h-80 overflow-y-auto p-2 pr-1"></div>'),root_1$I=from_html("<!> <!>",1);function ChatFormActionAddToolsSubmenu($$anchor,$$props){push$1($$props,!0);const toolsPanel=useToolsPanel(),hasMcpServersAvailable=user_derived(()=>mcpStore.getServersSorted().length>0);var fragment=comment$2(),node2=first_child(fragment);component(
node2,()=>Sub,($$anchor2,DropdownMenu_Sub)=>{DropdownMenu_Sub($$anchor2,{onOpenChange:open2=>open2&&toolsPanel.handleOpen(),children:($$anchor3,$$slotProps)=>{var fragment_1=root_1$I(),node_1=first_child(fragment_1);component(node_1,()=>Dropdown_menu_sub_trigger,($$anchor4,DropdownMenu_SubTrigger)=>{DropdownMenu_SubTrigger($$anchor4,{class:"flex cursor-pointer items-center gap-2",children:($$anchor5,$$slotProps2)=>{var fragment_2=root_2$$(),node_2=first_child(fragment_2);Pencil_ruler(node_2,{class:"\
h-4 w-4"}),next$1(2),append($$anchor5,fragment_2)},$$slots:{default:!0}})});var node_3=sibling(node_1,2);component(node_3,()=>Dropdown_menu_sub_content,($$anchor4,DropdownMenu_SubContent)=>{DropdownMenu_SubContent($$anchor4,{class:"w-72 p-0",children:($$anchor5,$$slotProps2)=>{var fragment_3=comment$2(),node_4=first_child(fragment_3);{var consequent_4=$$anchor6=>{var fragment_4=comment$2(),node_5=first_child(fragment_4);{var consequent=$$anchor7=>{var div=root_5$r(),node_6=child(div);Loader_circle(
node_6,{class:"mx-auto mb-1 h-4 w-4 animate-spin"}),next$1(),reset(div),append($$anchor7,div)},consequent_1=$$anchor7=>{var div_1=root_6$q(),span=child(div_1),node_7=child(span);Info$1(node_7,{class:"mt-0.5 h-4 w-4 shrink-0"}),next$1(2),reset(span);var span_1=sibling(span,2),node_8=child(span_1);Info$1(node_8,{class:"mt-0.5 h-4 w-4 shrink-0"});var span_2=sibling(node_8,2),text2=child(span_2);next$1(2),reset(span_2),reset(span_1),reset(div_1),template_effect(()=>set_text(text2,`${get$3(hasMcpServersAvailable)?
"Enable":"Add"} MCP Server(s) to access `)),append($$anchor7,div_1)},consequent_2=$$anchor7=>{var div_2=root_7$p();append($$anchor7,div_2)},consequent_3=$$anchor7=>{var div_3=root_8$q(),node_9=child(div_3);Info$1(node_9,{class:"mt-0.5 h-4 w-4 shrink-0"});var span_3=sibling(node_9,2),text_1=child(span_3,!0);reset(span_3),reset(div_3),template_effect(()=>set_text(text_1,toolsPanel.noToolsInfoMessage)),append($$anchor7,div_3)},alternate=$$anchor7=>{var div_4=root_9$j();append($$anchor7,div_4)};if_block(
node_5,$$render=>{toolsStore.loading?$$render(consequent):toolsStore.isToolsEndpointUnreachable?$$render(consequent_1,1):toolsStore.error?$$render(consequent_2,2):toolsPanel.noToolsInfoMessage?$$render(consequent_3,3):$$render(alternate,-1)})}append($$anchor6,fragment_4)},alternate_2=$$anchor6=>{var div_5=root_10$d();each(div_5,21,()=>toolsPanel.activeGroups,group=>group.label,($$anchor7,group)=>{const isExpanded=user_derived(()=>toolsPanel.expandedGroups.has(get$3(group).label)),computed_const=user_derived(
()=>{const{checked,indeterminate}=toolsPanel.getGroupCheckedState(get$3(group));return{checked,indeterminate}}),favicon=user_derived(()=>toolsPanel.getFavicon(get$3(group)));var fragment_5=comment$2(),node_10=first_child(fragment_5);component(node_10,()=>Collapsible,($$anchor8,Collapsible_Root)=>{Collapsible_Root($$anchor8,{get open(){return get$3(isExpanded)},onOpenChange:()=>toolsPanel.toggleGroupExpanded(get$3(group).label),children:($$anchor9,$$slotProps3)=>{var fragment_6=root_12$9(),div_6=first_child(
fragment_6),node_11=child(div_6);component(node_11,()=>Collapsible_trigger,($$anchor10,Collapsible_Trigger)=>{Collapsible_Trigger($$anchor10,{class:"flex min-w-0 flex-1 items-center gap-2 rounded px-2 py-1.5 text-sm hover:bg-muted/50",children:($$anchor11,$$slotProps4)=>{var fragment_7=root_13$c(),node_12=first_child(fragment_7);{var consequent_5=$$anchor12=>{Chevron_down($$anchor12,{class:"h-3.5 w-3.5 shrink-0"})},alternate_1=$$anchor12=>{Chevron_right($$anchor12,{class:"h-3.5 w-3.5 shrink-0"})};
if_block(node_12,$$render=>{get$3(isExpanded)?$$render(consequent_5):$$render(alternate_1,-1)})}var span_4=sibling(node_12,2),node_13=child(span_4);{var consequent_6=$$anchor12=>{var img=root_16$4();template_effect(()=>set_attribute(img,"src",get$3(favicon))),event("error",img,e=>{e.currentTarget.style.display="none"}),replay_events(img),append($$anchor12,img)};if_block(node_13,$$render=>{get$3(favicon)&&$$render(consequent_6)})}var span_5=sibling(node_13,2),text_2=child(span_5,!0);reset(span_5),
reset(span_4);var span_6=sibling(span_4,2),text_3=child(span_6);reset(span_6),template_effect($0=>{set_text(text_2,get$3(group).label),set_text(text_3,`${$0??""}/${get$3(group).tools.length??""}`)},[()=>toolsPanel.getEnabledToolCount(get$3(group))]),append($$anchor11,fragment_7)},$$slots:{default:!0}})});var node_14=sibling(node_11,2);component(node_14,()=>Root$5,($$anchor10,Tooltip_Root)=>{Tooltip_Root($$anchor10,{children:($$anchor11,$$slotProps4)=>{var fragment_10=root_17$7(),node_15=first_child(
fragment_10);component(node_15,()=>Tooltip_trigger,($$anchor12,Tooltip_Trigger)=>{Tooltip_Trigger($$anchor12,{children:($$anchor13,$$slotProps5)=>{Checkbox($$anchor13,{get checked(){return get$3(computed_const).checked},get indeterminate(){return get$3(computed_const).indeterminate},onCheckedChange:()=>toolsStore.toggleGroup(get$3(group)),class:"mr-2 h-4 w-4 shrink-0"})},$$slots:{default:!0}})});var node_16=sibling(node_15,2);component(node_16,()=>Tooltip_content,($$anchor12,Tooltip_Content)=>{Tooltip_Content(
$$anchor12,{side:"right",children:($$anchor13,$$slotProps5)=>{var p2=root_19$8(),text_4=child(p2);reset(p2),template_effect(()=>set_text(text_4,`${get$3(computed_const).checked?"Disable":"Enable"}
										${get$3(group).tools.length??""} tool${get$3(group).tools.length!==1?"s":""}`)),append($$anchor13,p2)},$$slots:{default:!0}})}),append($$anchor11,fragment_10)},$$slots:{default:!0}})}),reset(div_6);var node_17=sibling(div_6,2);component(node_17,()=>Collapsible_content,($$anchor10,Collapsible_Content)=>{Collapsible_Content($$anchor10,{children:($$anchor11,$$slotProps4)=>{var div_7=root_20$3();each(div_7,21,()=>get$3(group).tools,tool=>tool.function.name,($$anchor12,tool)=>{var button=root_21$2(),
node_18=child(button);{let $0=user_derived(()=>toolsStore.isToolEnabled(get$3(tool).function.name));Checkbox(node_18,{get checked(){return get$3($0)},onCheckedChange:()=>toolsStore.toggleTool(get$3(tool).function.name),class:"h-4 w-4 shrink-0"})}var span_7=sibling(node_18,2),text_5=child(span_7,!0);reset(span_7),reset(button),template_effect(()=>set_text(text_5,get$3(tool).function.name)),delegated("click",button,()=>toolsStore.toggleTool(get$3(tool).function.name)),append($$anchor12,button)}),reset(
div_7),append($$anchor11,div_7)},$$slots:{default:!0}})}),append($$anchor9,fragment_6)},$$slots:{default:!0}})}),append($$anchor7,fragment_5)}),reset(div_5),append($$anchor6,div_5)};if_block(node_4,$$render=>{toolsPanel.totalToolCount===0?$$render(consequent_4):$$render(alternate_2,-1)})}append($$anchor5,fragment_3)},$$slots:{default:!0}})}),append($$anchor3,fragment_1)},$$slots:{default:!0}})}),append($$anchor,fragment),pop()}delegate(["click"]);function Switch($$anchor,$$props){push$1($$props,
!0);let ref2=prop($$props,"ref",15,null),checked=prop($$props,"checked",15,!1),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class","checked"]);var fragment=comment$2(),node2=first_child(fragment);{let $0=user_derived(()=>cn$1("peer inline-flex h-[1.15rem] w-8 shrink-0 cursor-pointer items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allo\
wed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input dark:data-[state=unchecked]:bg-input/80",$$props.class));component(node2,()=>Switch$1,($$anchor2,SwitchPrimitive_Root)=>{SwitchPrimitive_Root($$anchor2,spread_props({"data-slot":"switch",get class(){return get$3($0)}},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)},get checked(){return checked()},set checked($$value){checked($$value)},children:($$anchor3,$$slotProps)=>{var fragment_1=comment$2(),
node_1=first_child(fragment_1);{let $02=user_derived(()=>cn$1("pointer-events-none block size-4 rounded-full bg-background ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0 dark:data-[state=checked]:bg-primary-foreground dark:data-[state=unchecked]:bg-foreground"));component(node_1,()=>Switch_thumb,($$anchor4,SwitchPrimitive_Thumb)=>{SwitchPrimitive_Thumb($$anchor4,{"data-slot":"switch-thumb",get class(){return get$3($02)}})})}append(
$$anchor3,fragment_1)},$$slots:{default:!0}}))})}append($$anchor,fragment),pop()}var root_3$N=from_html("<!> <span>MCP Servers</span>",1),root_7$o=from_html("<!> <span>Manage MCP Servers</span>",1),root_10$c=from_html('<span class="shrink-0 rounded bg-destructive/15 px-1.5 py-0.5 text-xs text-destructive">Error</span>'),root_9$i=from_html('<button type="button" class="flex w-full items-center justify-between gap-2 rounded-sm px-2 py-2 text-left transition-colors hover:bg-accent disabled:cursor-n\
ot-allowed disabled:opacity-50"><div class="flex min-w-0 flex-1 items-center gap-2"><div class="min-w-0 flex-1"><!></div> <!></div> <!></button>'),root_8$p=from_html('<div class="max-h-64 overflow-y-auto"></div>'),root_12$8=from_html("<!> <span>Add MCP Servers</span>",1),root_11$c=from_html('<div class="px-2 py-3 text-center text-sm text-muted-foreground">No MCP servers configured</div> <!> <!>',1),root_2$_=from_html("<!> <!>",1);function ChatFormActionAddMcpServersSubmenu($$anchor,$$props){push$1(
$$props,!0);let mcpSearchQuery=state$1(""),allMcpServers=user_derived(()=>mcpStore.getServersSorted()),mcpServers=user_derived(()=>get$3(allMcpServers).filter(s2=>s2.enabled)),hasMcpServers=user_derived(()=>get$3(mcpServers).length>0),filteredMcpServers=user_derived(()=>{const query=get$3(mcpSearchQuery).toLowerCase().trim();return query?get$3(mcpServers).filter(s2=>{const name=getServerLabel(s2).toLowerCase(),url2=s2.url.toLowerCase();return name.includes(query)||url2.includes(query)}):get$3(mcpServers)});
function getServerLabel(server){return mcpStore.getServerLabel(server)}function isServerEnabledForChat(serverId){return conversationsStore.isMcpServerEnabledForChat(serverId)}async function toggleServerForChat(serverId){await conversationsStore.toggleMcpServerForChat(serverId)}function handleMcpSubMenuOpen(open2){open2&&(set$1(mcpSearchQuery,""),mcpStore.runHealthChecksForServers(get$3(allMcpServers)))}function handleMcpSettingsClick(){$$props.onMcpSettingsClick?.(),goto(`${get$3(hasMcpServers)?
"":"?add"}${ROUTES.MCP_SERVERS}`)}var fragment=comment$2(),node2=first_child(fragment);component(node2,()=>Root$4,($$anchor2,DropdownMenu_Root)=>{DropdownMenu_Root($$anchor2,{children:($$anchor3,$$slotProps)=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);component(node_1,()=>Sub,($$anchor4,DropdownMenu_Sub)=>{DropdownMenu_Sub($$anchor4,{onOpenChange:handleMcpSubMenuOpen,children:($$anchor5,$$slotProps2)=>{var fragment_2=root_2$_(),node_2=first_child(fragment_2);component(node_2,()=>Dropdown_menu_sub_trigger,
($$anchor6,DropdownMenu_SubTrigger)=>{DropdownMenu_SubTrigger($$anchor6,{class:"flex cursor-pointer items-center gap-2",children:($$anchor7,$$slotProps3)=>{var fragment_3=root_3$N(),node_3=first_child(fragment_3);McpLogo(node_3,{class:"h-4 w-4"}),next$1(2),append($$anchor7,fragment_3)},$$slots:{default:!0}})});var node_4=sibling(node_2,2);component(node_4,()=>Dropdown_menu_sub_content,($$anchor6,DropdownMenu_SubContent)=>{DropdownMenu_SubContent($$anchor6,{class:"w-72 pt-0",children:($$anchor7,$$slotProps3)=>{
var fragment_4=comment$2(),node_5=first_child(fragment_4);{var consequent_1=$$anchor8=>{{const footer2=$$anchor9=>{var fragment_6=comment$2(),node_6=first_child(fragment_6);component(node_6,()=>Dropdown_menu_item,($$anchor10,DropdownMenu_Item)=>{DropdownMenu_Item($$anchor10,{class:"flex cursor-pointer items-center gap-2",onclick:handleMcpSettingsClick,children:($$anchor11,$$slotProps4)=>{var fragment_7=root_7$o(),node_7=first_child(fragment_7);Settings$1(node_7,{class:"h-4 w-4"}),next$1(2),append(
$$anchor11,fragment_7)},$$slots:{default:!0}})}),append($$anchor9,fragment_6)};let $0=user_derived(()=>get$3(filteredMcpServers).length===0);DropdownMenuSearchable($$anchor8,{placeholder:"Search servers...",emptyMessage:"No servers found",get isEmpty(){return get$3($0)},get searchValue(){return get$3(mcpSearchQuery)},set searchValue($$value){set$1(mcpSearchQuery,$$value,!0)},footer:footer2,children:($$anchor9,$$slotProps4)=>{var div=root_8$p();each(div,21,()=>get$3(filteredMcpServers),server=>server.
id,($$anchor10,server)=>{const healthState=user_derived(()=>mcpStore.getHealthCheckState(get$3(server).id)),hasError=user_derived(()=>get$3(healthState).status===HealthCheckStatus.ERROR),isEnabledForChat=user_derived(()=>isServerEnabledForChat(get$3(server).id)),displayName=user_derived(()=>getServerLabel(get$3(server))),faviconUrl=user_derived(()=>mcpStore.getServerFavicon(get$3(server).id));var button=root_9$i(),div_1=child(button),div_2=child(div_1),node_8=child(div_2);McpServerIdentity(node_8,
{get displayName(){return get$3(displayName)},get faviconUrl(){return get$3(faviconUrl)},iconClass:"h-4 w-4",iconRounded:"rounded-sm",showVersion:!1,nameClass:"text-sm"}),reset(div_2);var node_9=sibling(div_2,2);{var consequent=$$anchor11=>{var span=root_10$c();append($$anchor11,span)};if_block(node_9,$$render=>{get$3(hasError)&&$$render(consequent)})}reset(div_1);var node_10=sibling(div_1,2);Switch(node_10,{get checked(){return get$3(isEnabledForChat)},get disabled(){return get$3(hasError)},onclick:e=>e.
stopPropagation(),onCheckedChange:()=>toggleServerForChat(get$3(server).id)}),reset(button),template_effect(()=>button.disabled=get$3(hasError)),delegated("click",button,()=>!get$3(hasError)&&toggleServerForChat(get$3(server).id)),append($$anchor10,button)}),reset(div),append($$anchor9,div)},$$slots:{footer:!0,default:!0}})}},alternate=$$anchor8=>{var fragment_8=root_11$c(),node_11=sibling(first_child(fragment_8),2);component(node_11,()=>Dropdown_menu_separator,($$anchor9,DropdownMenu_Separator)=>{
DropdownMenu_Separator($$anchor9,{})});var node_12=sibling(node_11,2);component(node_12,()=>Dropdown_menu_item,($$anchor9,DropdownMenu_Item_1)=>{DropdownMenu_Item_1($$anchor9,{class:"flex cursor-pointer items-center gap-2",onclick:handleMcpSettingsClick,children:($$anchor10,$$slotProps4)=>{var fragment_9=root_12$8(),node_13=first_child(fragment_9);Plus(node_13,{class:"h-4 w-4"}),next$1(2),append($$anchor10,fragment_9)},$$slots:{default:!0}})}),append($$anchor8,fragment_8)};if_block(node_5,$$render=>{
get$3(hasMcpServers)?$$render(consequent_1):$$render(alternate,-1)})}append($$anchor7,fragment_4)},$$slots:{default:!0}})}),append($$anchor5,fragment_2)},$$slots:{default:!0}})}),append($$anchor3,fragment_1)},$$slots:{default:!0}})}),append($$anchor,fragment),pop()}delegate(["click"]);var root$1o=from_html('<input type="file"/>');function ChatFormFileInputInvisible($$anchor,$$props){push$1($$props,!0);let className=prop($$props,"class",3,""),multiple=prop($$props,"multiple",3,!0),fileInputElement;
function click(){fileInputElement?.click()}function handleFileSelect(event2){const input=event2.target;input.files&&$$props.onFileSelect?.(Array.from(input.files))}var $$exports={click},input_1=root$1o();return bind_this(input_1,$$value=>fileInputElement=$$value,()=>fileInputElement),template_effect(()=>{input_1.multiple=multiple(),set_class(input_1,1,`hidden ${className()??""}`)}),delegated("change",input_1,handleFileSelect),append($$anchor,input_1),pop($$exports)}delegate(["change"]);var root_1$H=from_html(
"<div><!></div>");function ChatFormMcpResourcesList($$anchor,$$props){push$1($$props,!0);const attachments=user_derived(mcpResourceAttachments),hasAttachments=user_derived(mcpHasResourceAttachments);function handleRemove(attachmentId){mcpStore.removeResourceAttachment(attachmentId)}function handleResourceClick(uri2){$$props.onResourceClick?.(uri2)}var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{var div=root_1$H(),node_1=child(div);HorizontalScrollCarousel(node_1,
{gapSize:"2",children:($$anchor3,$$slotProps)=>{var fragment_1=comment$2(),node_2=first_child(fragment_1);each(node_2,19,()=>get$3(attachments),attachment=>attachment.id,($$anchor4,attachment,i)=>{{let $0=user_derived(()=>get$3(i)===0?"ml-3":"");ChatAttachmentsListItemMcpResource($$anchor4,{get class(){return get$3($0)},get attachment(){return get$3(attachment)},onRemove:handleRemove,onclick:()=>handleResourceClick(get$3(attachment).resource.uri)})}}),append($$anchor3,fragment_1)},$$slots:{default:!0}}),
reset(div),template_effect(()=>set_class(div,1,clsx($$props.class))),append($$anchor2,div)};if_block(node2,$$render=>{get$3(hasAttachments)&&$$render(consequent)})}append($$anchor,fragment),pop()}var root$1n=from_html('<div><textarea style="max-height: var(--max-message-height);"></textarea></div>');function ChatFormTextarea($$anchor,$$props){push$1($$props,!0);let className=prop($$props,"class",3,""),disabled=prop($$props,"disabled",3,!1),placeholder=prop($$props,"placeholder",3,"Ask anything..\
."),value=prop($$props,"value",15,""),textareaElement;onMount$1(()=>{textareaElement&&(autoResizeTextarea(textareaElement),textareaElement.focus())});function getElement(){return textareaElement}function focus2(){textareaElement?.focus()}function resetHeight(){textareaElement&&(textareaElement.style.height="1rem")}var $$exports={getElement,focus:focus2,resetHeight},div=root$1n(),textarea=child(div);return remove_textarea_child(textarea),bind_this(textarea,$$value=>textareaElement=$$value,()=>textareaElement),
reset(div),template_effect(()=>{set_class(div,1,`flex-1 ${className()??""}`),set_class(textarea,1,clsx(["text-md min-h-12 w-full resize-none border-0 bg-transparent p-0 leading-6 outline-none placeholder:text-muted-foreground focus-visible:ring-0 focus-visible:ring-offset-0",disabled()&&"cursor-not-allowed"])),textarea.disabled=disabled(),set_attribute(textarea,"placeholder",placeholder())}),delegated("keydown",textarea,function(...$$args){$$props.onKeydown?.apply(this,$$args)}),delegated("input",
textarea,event2=>{autoResizeTextarea(event2.currentTarget),$$props.onInput?.()}),event("paste",textarea,function(...$$args){$$props.onPaste?.apply(this,$$args)}),bind_value(textarea,value),append($$anchor,div),pop($$exports)}delegate(["keydown","input"]);const badgeVariants=tv({base:"focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive inline-flex w-fit shrink-0 items-center justify-center gap-\
1 overflow-hidden whitespace-nowrap rounded-md border px-2 py-0.5 text-xs font-medium transition-[color,box-shadow] focus-visible:ring-[3px] [&>svg]:pointer-events-none [&>svg]:size-3",variants:{variant:{default:"bg-primary text-primary-foreground [a&]:hover:bg-primary/90 border-transparent",secondary:"bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90 border-transparent",tertiary:"bg-foreground/15 dark:bg-foreground/10 text-foreground [a&]:hover:bg-foreground/25 border-transparen\
t",destructive:"bg-destructive [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/70 border-transparent text-white",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function Badge($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),variant=prop($$props,"variant",3,"default"),restProps=rest_props($$props,["$$slots","$$events","$$legac\
y","ref","href","class","variant","children"]);var fragment=comment$2(),node2=first_child(fragment);element$4(node2,()=>$$props.href?"a":"span",!1,($$element,$$anchor2)=>{bind_this($$element,$$value=>ref2($$value),()=>ref2()),attribute_effect($$element,$0=>({"data-slot":"badge",href:$$props.href,class:$0,...restProps}),[()=>cn$1(badgeVariants({variant:variant()}),$$props.class,"backdrop-blur-sm")]);var fragment_1=comment$2(),node_1=first_child(fragment_1);snippet(node_1,()=>$$props.children??noop$3),
append($$anchor2,fragment_1)}),append($$anchor,fragment),pop()}var root_2$Z=from_html('<div class="p-4"><!> <!></div>');function ChatFormPickerMcpPrompts($$anchor,$$props){push$1($$props,!0);let className=prop($$props,"class",3,""),isOpen=prop($$props,"isOpen",7,!1),searchQuery=prop($$props,"searchQuery",3,""),prompts=state$1(proxy([])),isLoading2=state$1(!1),selectedPrompt=state$1(null),promptArgs=state$1(proxy({})),selectedIndex=state$1(0),internalSearchQuery=state$1(""),promptError=state$1(null),
selectedIndexBeforeArgumentForm=state$1(null),suggestions=proxy({}),loadingSuggestions=proxy({}),activeAutocomplete=state$1(null),autocompleteIndex=state$1(0),serverSettingsMap=user_derived(()=>{const servers=mcpStore.getServers(),map2=new SvelteMap;for(const server of servers)map2.set(server.id,server);return map2});user_effect(()=>{isOpen()?(loadPrompts(),set$1(selectedIndex,0)):(set$1(selectedPrompt,null),set$1(promptArgs,{},!0),set$1(promptError,null))}),user_effect(()=>{get$3(filteredPrompts).
length>0&&get$3(selectedIndex)>=get$3(filteredPrompts).length&&set$1(selectedIndex,0)});async function loadPrompts(){set$1(isLoading2,!0);try{const perChatOverrides=conversationsStore.getAllMcpServerOverrides();if(!await mcpStore.ensureInitialized(perChatOverrides)){set$1(prompts,[],!0);return}set$1(prompts,await mcpStore.getAllPrompts(),!0)}catch(error2){console.error("[ChatFormPickerMcpPrompts] Failed to load prompts:",error2),set$1(prompts,[],!0)}finally{set$1(isLoading2,!1)}}function handlePromptClick(prompt){
const args=prompt.arguments??[];args.length>0?(set$1(selectedIndexBeforeArgumentForm,get$3(selectedIndex),!0),set$1(selectedPrompt,prompt,!0),set$1(promptArgs,{},!0),set$1(promptError,null),requestAnimationFrame(()=>{const firstInput=document.querySelector(`#arg-${args[0].name}`);firstInput&&firstInput.focus()})):executePrompt(prompt,{})}async function executePrompt(prompt,args){set$1(promptError,null);const placeholderId=uuid$1(),nonEmptyArgs=Object.fromEntries(Object.entries(args).filter(([,value])=>value.
trim()!=="")),argsToPass=Object.keys(nonEmptyArgs).length>0?nonEmptyArgs:void 0;$$props.onPromptLoadStart?.(placeholderId,prompt,argsToPass),$$props.onClose?.();try{const result=await mcpStore.getPrompt(prompt.serverName,prompt.name,args);$$props.onPromptLoadComplete?.(placeholderId,result)}catch(error2){const errorMessage=error2 instanceof Error?error2.message:"Unknown error executing prompt";$$props.onPromptLoadError?.(placeholderId,errorMessage)}}function handleArgumentSubmit(event2){event2.preventDefault(),
get$3(selectedPrompt)&&executePrompt(get$3(selectedPrompt),get$3(promptArgs))}const fetchCompletions=debounce(async(argName,value)=>{if(!get$3(selectedPrompt)||value.length<1){suggestions[argName]=[];return}loadingSuggestions[argName]=!0;try{const result=await mcpStore.getPromptCompletions(get$3(selectedPrompt).serverName,get$3(selectedPrompt).name,argName,value);if(result&&result.values.length>0){const filteredValues=result.values.filter(v=>v.trim()!=="");filteredValues.length>0?(suggestions[argName]=
filteredValues,set$1(activeAutocomplete,argName,!0),set$1(autocompleteIndex,0)):suggestions[argName]=[]}else suggestions[argName]=[]}catch(error2){console.error("[ChatFormPickerMcpPrompts] Failed to fetch completions:",error2),suggestions[argName]=[]}finally{loadingSuggestions[argName]=!1}},200);function handleArgInput(argName,value){get$3(promptArgs)[argName]=value,fetchCompletions(argName,value)}function selectSuggestion(argName,value){get$3(promptArgs)[argName]=value,suggestions[argName]=[],set$1(
activeAutocomplete,null)}function handleArgKeydown(event2,argName){const argSuggestions=suggestions[argName]??[];if(event2.key===KeyboardKey.ESCAPE){event2.preventDefault(),event2.stopPropagation(),handleCancelArgumentForm();return}argSuggestions.length===0||get$3(activeAutocomplete)!==argName||(event2.key===KeyboardKey.ARROW_DOWN?(event2.preventDefault(),set$1(autocompleteIndex,Math.min(get$3(autocompleteIndex)+1,argSuggestions.length-1),!0)):event2.key===KeyboardKey.ARROW_UP?(event2.preventDefault(),
set$1(autocompleteIndex,Math.max(get$3(autocompleteIndex)-1,0),!0)):event2.key===KeyboardKey.ENTER&&argSuggestions[get$3(autocompleteIndex)]&&(event2.preventDefault(),event2.stopPropagation(),selectSuggestion(argName,argSuggestions[get$3(autocompleteIndex)])))}function handleArgBlur(argName){setTimeout(()=>{get$3(activeAutocomplete)===argName&&(suggestions[argName]=[],set$1(activeAutocomplete,null))},150)}function handleArgFocus(argName){(suggestions[argName]?.length??0)>0&&set$1(activeAutocomplete,
argName,!0)}function handleCancelArgumentForm(){get$3(selectedIndexBeforeArgumentForm)!==null&&(set$1(selectedIndex,get$3(selectedIndexBeforeArgumentForm),!0),set$1(selectedIndexBeforeArgumentForm,null)),set$1(selectedPrompt,null),set$1(promptArgs,{},!0),set$1(promptError,null)}function handleKeydown(event2){return isOpen()?event2.key===KeyboardKey.ESCAPE?(event2.preventDefault(),get$3(selectedPrompt)?handleCancelArgumentForm():$$props.onClose?.(),!0):event2.key===KeyboardKey.ARROW_DOWN?(event2.
preventDefault(),get$3(filteredPrompts).length>0&&set$1(selectedIndex,(get$3(selectedIndex)+1)%get$3(filteredPrompts).length),!0):event2.key===KeyboardKey.ARROW_UP?(event2.preventDefault(),get$3(filteredPrompts).length>0&&set$1(selectedIndex,get$3(selectedIndex)===0?get$3(filteredPrompts).length-1:get$3(selectedIndex)-1,!0),!0):event2.key===KeyboardKey.ENTER&&!get$3(selectedPrompt)?(event2.preventDefault(),get$3(filteredPrompts)[get$3(selectedIndex)]&&handlePromptClick(get$3(filteredPrompts)[get$3(
selectedIndex)]),!0):!1:!1}let filteredPrompts=user_derived(()=>{const sortedServers=mcpStore.getServersSorted(),serverOrderMap=new Map(sortedServers.map((server,index2)=>[server.id,index2])),sortedPrompts=[...get$3(prompts)].sort((a,b)=>{const orderA=serverOrderMap.get(a.serverName)??Number.MAX_SAFE_INTEGER,orderB=serverOrderMap.get(b.serverName)??Number.MAX_SAFE_INTEGER;return orderA-orderB}),query=(searchQuery()||get$3(internalSearchQuery)).toLowerCase();return query?sortedPrompts.filter(prompt=>prompt.
name.toLowerCase().includes(query)||prompt.title?.toLowerCase().includes(query)||prompt.description?.toLowerCase().includes(query)):sortedPrompts}),showSearchInput=user_derived(()=>get$3(prompts).length>3);var $$exports={handleKeydown};return ChatFormPickerPopover($$anchor,{get class(){return className()},srLabel:"Open prompt picker",get onClose(){return $$props.onClose},onKeydown:handleKeydown,get isOpen(){return isOpen()},set isOpen($$value){isOpen($$value)},children:($$anchor2,$$slotProps)=>{
var fragment_1=comment$2(),node2=first_child(fragment_1);{var consequent_1=$$anchor3=>{const prompt=user_derived(()=>get$3(selectedPrompt)),server=user_derived(()=>get$3(serverSettingsMap).get(get$3(prompt).serverName)),serverLabel=user_derived(()=>get$3(server)?mcpStore.getServerLabel(get$3(server)):get$3(prompt).serverName);var div=root_2$Z(),node_1=child(div);{const titleExtra=$$anchor4=>{var fragment_2=comment$2(),node_2=first_child(fragment_2);{var consequent=$$anchor5=>{Badge($$anchor5,{variant:"\
secondary",children:($$anchor6,$$slotProps2)=>{next$1();var text2=text$8();template_effect(()=>set_text(text2,`${get$3(prompt).arguments.length??""} arg${get$3(prompt).arguments.length>1?"s":""}`)),append($$anchor6,text2)},$$slots:{default:!0}})};if_block(node_2,$$render=>{get$3(prompt).arguments?.length&&$$render(consequent)})}append($$anchor4,fragment_2)};let $0=user_derived(()=>get$3(prompt).title||get$3(prompt).name);ChatFormPickerItemHeader(node_1,{get server(){return get$3(server)},get serverLabel(){
return get$3(serverLabel)},get title(){return get$3($0)},get description(){return get$3(prompt).description},titleExtra,$$slots:{titleExtra:!0}})}var node_3=sibling(node_1,2);ChatFormPromptPickerArgumentForm(node_3,{get prompt(){return get$3(selectedPrompt)},get promptArgs(){return get$3(promptArgs)},get suggestions(){return suggestions},get loadingSuggestions(){return loadingSuggestions},get activeAutocomplete(){return get$3(activeAutocomplete)},get autocompleteIndex(){return get$3(autocompleteIndex)},
get promptError(){return get$3(promptError)},onArgInput:handleArgInput,onArgKeydown:handleArgKeydown,onArgBlur:handleArgBlur,onArgFocus:handleArgFocus,onSelectSuggestion:selectSuggestion,onSubmit:handleArgumentSubmit,onCancel:handleCancelArgumentForm}),reset(div),append($$anchor3,div)},alternate=$$anchor3=>{ChatFormPickerList($$anchor3,{get items(){return get$3(filteredPrompts)},get isLoading(){return get$3(isLoading2)},get selectedIndex(){return get$3(selectedIndex)},get showSearchInput(){return get$3(
showSearchInput)},searchPlaceholder:"Search prompts...",emptyMessage:"No MCP prompts available",itemKey:prompt=>prompt.serverName+":"+prompt.name,get searchQuery(){return get$3(internalSearchQuery)},set searchQuery($$value){set$1(internalSearchQuery,$$value,!0)},item:($$anchor4,prompt=noop$3,index2=noop$3,isSelected=noop$3)=>{const server=user_derived(()=>get$3(serverSettingsMap).get(prompt().serverName)),serverLabel=user_derived(()=>get$3(server)?mcpStore.getServerLabel(get$3(server)):prompt().
serverName);ChatFormPickerListItem($$anchor4,{get dataIndex(){return index2()},get isSelected(){return isSelected()},onclick:()=>handlePromptClick(prompt()),children:($$anchor5,$$slotProps2)=>{{const titleExtra=$$anchor6=>{var fragment_8=comment$2(),node_4=first_child(fragment_8);{var consequent_2=$$anchor7=>{Badge($$anchor7,{variant:"secondary",children:($$anchor8,$$slotProps3)=>{next$1();var text_1=text$8();template_effect(()=>set_text(text_1,`${prompt().arguments.length??""} arg${prompt().arguments.
length>1?"s":""}`)),append($$anchor8,text_1)},$$slots:{default:!0}})};if_block(node_4,$$render=>{prompt().arguments?.length&&$$render(consequent_2)})}append($$anchor6,fragment_8)};let $0=user_derived(()=>prompt().title||prompt().name);ChatFormPickerItemHeader($$anchor5,{get server(){return get$3(server)},get serverLabel(){return get$3(serverLabel)},get title(){return get$3($0)},get description(){return prompt().description},titleExtra,$$slots:{titleExtra:!0}})}},$$slots:{default:!0}})},skeleton:$$anchor4=>{
ChatFormPickerListItemSkeleton($$anchor4,{titleWidth:"w-32",showBadge:!0})},$$slots:{item:!0,skeleton:!0}})};if_block(node2,$$render=>{get$3(selectedPrompt)?$$render(consequent_1):$$render(alternate,-1)})}append($$anchor2,fragment_1)},$$slots:{default:!0}}),pop($$exports)}function Label($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class"]);var fragment=comment$2(),node2=first_child(fragment);{let $0=user_derived(
()=>cn$1("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",$$props.class));component(node2,()=>Label$1,($$anchor2,LabelPrimitive_Root)=>{LabelPrimitive_Root($$anchor2,spread_props({"data-slot":"label",get class(){return get$3($0)}},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)}}))})}append($$anchor,fragment),pop()}
var root_2$Y=from_html('<span class="text-destructive">*</span>'),root_3$M=from_html('<span class="text-xs text-muted-foreground/50">...</span>'),root_1$G=from_html("<span> <!></span> <!>",1),root_5$q=from_html('<button type="button"> </button>'),root_4$x=from_html('<div class="absolute top-full right-0 left-0 z-10 mt-1 max-h-32 overflow-y-auto rounded-lg border border-border/50 bg-background shadow-lg"></div>'),root$1m=from_html('<div class="relative grid gap-1"><!> <!> <!></div>');function ChatFormPromptPickerArgumentInput($$anchor,$$props){
push$1($$props,!0);let value=prop($$props,"value",3,""),suggestions=prop($$props,"suggestions",19,()=>[]),isLoadingSuggestions=prop($$props,"isLoadingSuggestions",3,!1),isAutocompleteActive=prop($$props,"isAutocompleteActive",3,!1),autocompleteIndex=prop($$props,"autocompleteIndex",3,0);var div=root$1m(),node2=child(div);Label(node2,{get for(){return`arg-${$$props.argument.name??""}`},class:"mb-1 text-muted-foreground",children:($$anchor2,$$slotProps)=>{var fragment=root_1$G(),span=first_child(fragment),
text2=child(span),node_1=sibling(text2);{var consequent=$$anchor3=>{var span_1=root_2$Y();append($$anchor3,span_1)};if_block(node_1,$$render=>{$$props.argument.required&&$$render(consequent)})}reset(span);var node_2=sibling(span,2);{var consequent_1=$$anchor3=>{var span_2=root_3$M();append($$anchor3,span_2)};if_block(node_2,$$render=>{isLoadingSuggestions()&&$$render(consequent_1)})}template_effect(()=>set_text(text2,`${$$props.argument.name??""} `)),append($$anchor2,fragment)},$$slots:{default:!0}});
var node_3=sibling(node2,2);{let $0=user_derived(()=>$$props.argument.description||$$props.argument.name);Input(node_3,{get id(){return`arg-${$$props.argument.name??""}`},type:"text",get value(){return value()},oninput:e=>$$props.onInput(e.currentTarget.value),get onkeydown(){return $$props.onKeydown},get onblur(){return $$props.onBlur},get onfocus(){return $$props.onFocus},get placeholder(){return get$3($0)},get required(){return $$props.argument.required},autocomplete:"off"})}var node_4=sibling(
node_3,2);{var consequent_2=$$anchor2=>{var div_1=root_4$x();each(div_1,22,suggestions,suggestion=>suggestion,($$anchor3,suggestion,i)=>{var button=root_5$q(),text_1=child(button,!0);reset(button),template_effect(()=>{set_class(button,1,`w-full px-3 py-1.5 text-left text-sm hover:bg-accent ${get$3(i)===autocompleteIndex()?"bg-accent":""}`),set_text(text_1,suggestion)}),delegated("mousedown",button,()=>$$props.onSelectSuggestion(suggestion)),append($$anchor3,button)}),reset(div_1),transition(3,div_1,
()=>fly,()=>({y:-5,duration:100})),append($$anchor2,div_1)};if_block(node_4,$$render=>{isAutocompleteActive()&&suggestions().length>0&&$$render(consequent_2)})}reset(div),append($$anchor,div),pop()}delegate(["mousedown"]);var root_2$X=from_html('<div class="flex items-start gap-2 rounded-lg border border-destructive/50 bg-destructive/10 px-3 py-2 text-sm text-destructive" role="alert"><span class="shrink-0">⚠</span> <span> </span></div>'),root$1l=from_html('<form class="space-y-3 pt-4"><!> <!>\
 <div class="mt-8 flex justify-end gap-2"><!> <!></div></form>');function ChatFormPromptPickerArgumentForm($$anchor,$$props){push$1($$props,!0);var form=root$1l(),node2=child(form);each(node2,17,()=>$$props.prompt.arguments??[],arg=>arg.name,($$anchor2,arg)=>{{let $0=user_derived(()=>$$props.promptArgs[get$3(arg).name]??""),$1=user_derived(()=>$$props.suggestions[get$3(arg).name]??[]),$2=user_derived(()=>$$props.loadingSuggestions[get$3(arg).name]??!1),$3=user_derived(()=>$$props.activeAutocomplete===
get$3(arg).name),$4=user_derived(()=>$$props.activeAutocomplete===get$3(arg).name?$$props.autocompleteIndex:0);ChatFormPromptPickerArgumentInput($$anchor2,{get argument(){return get$3(arg)},get value(){return get$3($0)},get suggestions(){return get$3($1)},get isLoadingSuggestions(){return get$3($2)},get isAutocompleteActive(){return get$3($3)},get autocompleteIndex(){return get$3($4)},onInput:value=>$$props.onArgInput(get$3(arg).name,value),onKeydown:e=>$$props.onArgKeydown(e,get$3(arg).name),onBlur:()=>$$props.
onArgBlur(get$3(arg).name),onFocus:()=>$$props.onArgFocus(get$3(arg).name),onSelectSuggestion:value=>$$props.onSelectSuggestion(get$3(arg).name,value)})}});var node_1=sibling(node2,2);{var consequent=$$anchor2=>{var div=root_2$X(),span=sibling(child(div),2),text2=child(span,!0);reset(span),reset(div),template_effect(()=>set_text(text2,$$props.promptError)),append($$anchor2,div)};if_block(node_1,$$render=>{$$props.promptError&&$$render(consequent)})}var div_1=sibling(node_1,2),node_2=child(div_1);
Button(node_2,{type:"button",size:"sm",get onclick(){return $$props.onCancel},variant:"secondary",children:($$anchor2,$$slotProps)=>{next$1();var text_1=text$8("Cancel");append($$anchor2,text_1)},$$slots:{default:!0}});var node_3=sibling(node_2,2);Button(node_3,{size:"sm",type:"submit",children:($$anchor2,$$slotProps)=>{next$1();var text_2=text$8("Use Prompt");append($$anchor2,text_2)},$$slots:{default:!0}}),reset(div_1),reset(form),event("submit",form,function(...$$args){$$props.onSubmit?.apply(
this,$$args)}),append($$anchor,form),pop()}function Popover($$anchor,$$props){push$1($$props,!0);let open2=prop($$props,"open",15,!1),restProps=rest_props($$props,["$$slots","$$events","$$legacy","open"]);var fragment=comment$2(),node2=first_child(fragment);component(node2,()=>Popover$1,($$anchor2,PopoverPrimitive_Root)=>{PopoverPrimitive_Root($$anchor2,spread_props(()=>restProps,{get open(){return open2()},set open($$value){open2($$value)}}))}),append($$anchor,fragment),pop()}function Popover_portal($$anchor,$$props){
let restProps=rest_props($$props,["$$slots","$$events","$$legacy"]);var fragment=comment$2(),node2=first_child(fragment);component(node2,()=>Portal$2,($$anchor2,PopoverPrimitive_Portal)=>{PopoverPrimitive_Portal($$anchor2,spread_props(()=>restProps))}),append($$anchor,fragment)}function Popover_content($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),sideOffset=prop($$props,"sideOffset",3,4),align=prop($$props,"align",3,"center"),collisionPadding=prop($$props,"collisionP\
adding",3,8),avoidCollisions=prop($$props,"avoidCollisions",3,!0),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class","sideOffset","side","align","collisionPadding","avoidCollisions","portalProps"]);Popover_portal($$anchor,spread_props(()=>$$props.portalProps,{children:($$anchor2,$$slotProps)=>{var fragment_1=comment$2(),node2=first_child(fragment_1);{let $0=user_derived(()=>cn$1("z-50 w-72 origin-(--bits-popover-content-transform-origin) rounded-md border bg-popover p-4 \
text-popover-foreground shadow-md outline-hidden data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-end-2 data-[side=right]:slide-in-from-start-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:fill-mode-forwards data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",$$props.class));component(node2,()=>Popover_content$1,($$anchor3,PopoverPrimitive_Content)=>{
PopoverPrimitive_Content($$anchor3,spread_props({"data-slot":"popover-content",get sideOffset(){return sideOffset()},get side(){return $$props.side},get align(){return align()},get collisionPadding(){return collisionPadding()},get avoidCollisions(){return avoidCollisions()},get class(){return get$3($0)}},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)}}))})}append($$anchor2,fragment_1)},$$slots:{default:!0}})),pop()}function Popover_trigger($$anchor,$$props){push$1($$props,
!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class"]);var fragment=comment$2(),node2=first_child(fragment);{let $0=user_derived(()=>cn$1("",$$props.class));component(node2,()=>Popover_trigger$1,($$anchor2,PopoverPrimitive_Trigger)=>{PopoverPrimitive_Trigger($$anchor2,spread_props({"data-slot":"popover-trigger",get class(){return get$3($0)}},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)}}))})}append($$anchor,
fragment),pop()}var root_2$W=from_html('<span class="sr-only"> </span>'),root_1$F=from_html("<!> <!>",1);function ChatFormPickerPopover($$anchor,$$props){push$1($$props,!0);let className=prop($$props,"class",3,""),isOpen=prop($$props,"isOpen",15,!1),srLabel=prop($$props,"srLabel",3,"Open picker");var fragment=comment$2(),node2=first_child(fragment);component(node2,()=>Popover,($$anchor2,Popover_Root)=>{Popover_Root($$anchor2,{onOpenChange:open2=>{open2||$$props.onClose?.()},get open(){return isOpen()},
set open($$value){isOpen($$value)},children:($$anchor3,$$slotProps)=>{var fragment_1=root_1$F(),node_1=first_child(fragment_1);component(node_1,()=>Popover_trigger,($$anchor4,Popover_Trigger)=>{Popover_Trigger($$anchor4,{class:"pointer-events-none absolute inset-0 opacity-0",tabindex:-1,"aria-hidden":"true",children:($$anchor5,$$slotProps2)=>{var span=root_2$W(),text2=child(span,!0);reset(span),template_effect(()=>set_text(text2,srLabel())),append($$anchor5,span)},$$slots:{default:!0}})});var node_2=sibling(
node_1,2);component(node_2,()=>Popover_content,($$anchor4,Popover_Content)=>{Popover_Content($$anchor4,{side:"top",align:"start",sideOffset:12,get class(){return`w-[var(--bits-popover-anchor-width)] max-w-none rounded-xl border-border/50 p-0 shadow-xl ${className()??""}`},get onkeydown(){return $$props.onKeydown},onOpenAutoFocus:event2=>event2.preventDefault(),children:($$anchor5,$$slotProps2)=>{var fragment_2=comment$2(),node_3=first_child(fragment_2);snippet(node_3,()=>$$props.children),append(
$$anchor5,fragment_2)},$$slots:{default:!0}})}),append($$anchor3,fragment_1)},$$slots:{default:!0}})}),append($$anchor,fragment),pop()}var root_2$V=from_html('<div class="absolute top-0 right-0 left-0 z-10 p-2 pb-0"><!></div>'),root_5$p=from_html('<div class="py-6 text-center text-sm text-muted-foreground"> </div>'),root_1$E=from_html("<!> <div><!></div> <!>",1);function ChatFormPickerList($$anchor,$$props){push$1($$props,!0);let searchQuery=prop($$props,"searchQuery",15),searchPlaceholder=prop(
$$props,"searchPlaceholder",3,"Search..."),emptyMessage=prop($$props,"emptyMessage",3,"No items available"),listContainer=state$1(null);user_effect(()=>{if(get$3(listContainer)&&$$props.selectedIndex>=0&&$$props.selectedIndex<$$props.items.length){const selectedElement=get$3(listContainer).querySelector(`[data-picker-index="${$$props.selectedIndex}"]`);selectedElement&&selectedElement.scrollIntoView({behavior:"smooth",block:"center",inline:"nearest"})}}),Scroll_area($$anchor,{children:($$anchor2,$$slotProps)=>{
var fragment_1=root_1$E(),node2=first_child(fragment_1);{var consequent=$$anchor3=>{var div=root_2$V(),node_1=child(div);SearchInput(node_1,{get placeholder(){return searchPlaceholder()},get value(){return searchQuery()},set value($$value){searchQuery($$value)}}),reset(div),append($$anchor3,div)};if_block(node2,$$render=>{$$props.showSearchInput&&$$render(consequent)})}var div_1=sibling(node2,2),node_2=child(div_1);{var consequent_2=$$anchor3=>{var fragment_2=comment$2(),node_3=first_child(fragment_2);
{var consequent_1=$$anchor4=>{var fragment_3=comment$2(),node_4=first_child(fragment_3);snippet(node_4,()=>$$props.skeleton),append($$anchor4,fragment_3)};if_block(node_3,$$render=>{$$props.skeleton&&$$render(consequent_1)})}append($$anchor3,fragment_2)},consequent_3=$$anchor3=>{var div_2=root_5$p(),text2=child(div_2,!0);reset(div_2),template_effect(()=>set_text(text2,emptyMessage())),append($$anchor3,div_2)},alternate=$$anchor3=>{var fragment_4=comment$2(),node_5=first_child(fragment_4);each(node_5,
19,()=>$$props.items,(itemData,index2)=>$$props.itemKey(itemData,index2),($$anchor4,itemData,index2)=>{var fragment_5=comment$2(),node_6=first_child(fragment_5);snippet(node_6,()=>$$props.item,()=>get$3(itemData),()=>get$3(index2),()=>get$3(index2)===$$props.selectedIndex),append($$anchor4,fragment_5)}),append($$anchor3,fragment_4)};if_block(node_2,$$render=>{$$props.isLoading?$$render(consequent_2):$$props.items.length===0?$$render(consequent_3,1):$$render(alternate,-1)})}reset(div_1),bind_this(
div_1,$$value=>set$1(listContainer,$$value),()=>get$3(listContainer));var node_7=sibling(div_1,2);{var consequent_4=$$anchor3=>{var fragment_6=comment$2(),node_8=first_child(fragment_6);snippet(node_8,()=>$$props.footer),append($$anchor3,fragment_6)};if_block(node_7,$$render=>{$$props.footer&&$$render(consequent_4)})}template_effect(()=>set_class(div_1,1,clsx([`${CHAT_FORM_POPOVER_MAX_HEIGHT} p-2`,$$props.showSearchInput&&"pt-13"]))),append($$anchor2,fragment_1)},$$slots:{default:!0}}),pop()}var root$1k=from_html(
'<button type="button"><!></button>');function ChatFormPickerListItem($$anchor,$$props){let isSelected=prop($$props,"isSelected",3,!1);var button=root$1k(),node2=child(button);snippet(node2,()=>$$props.children),reset(button),template_effect(()=>{set_attribute(button,"data-picker-index",$$props.dataIndex),set_class(button,1,`flex w-full cursor-pointer items-start gap-3 rounded-lg px-3 py-2 text-left hover:bg-accent/50 ${isSelected()?"bg-accent/50":""}`)}),delegated("click",button,function(...$$args){
$$props.onclick?.apply(this,$$args)}),append($$anchor,button)}delegate(["click"]);var root_1$D=from_html('<img alt="" class="h-3 w-3 shrink-0 rounded-sm"/>'),root_3$L=from_html('<p class="mt-0.5 truncate text-sm text-muted-foreground"> </p>'),root$1j=from_html('<div class="min-w-0 flex-1"><div class="mb-0.5 flex items-center gap-1.5 text-xs text-muted-foreground"><!> <span> </span></div> <div class="flex items-center gap-2"><span class="font-medium"> </span> <!></div> <!> <!></div>');function ChatFormPickerItemHeader($$anchor,$$props){
push$1($$props,!0);let faviconUrl=user_derived(()=>$$props.server?mcpStore.getServerFavicon($$props.server.id):null);var div=root$1j(),div_1=child(div),node2=child(div_1);{var consequent=$$anchor2=>{var img=root_1$D();template_effect(()=>set_attribute(img,"src",get$3(faviconUrl))),event("error",img,e=>{e.currentTarget.style.display="none"}),replay_events(img),append($$anchor2,img)};if_block(node2,$$render=>{get$3(faviconUrl)&&$$render(consequent)})}var span=sibling(node2,2),text2=child(span,!0);
reset(span),reset(div_1);var div_2=sibling(div_1,2),span_1=child(div_2),text_1=child(span_1,!0);reset(span_1);var node_1=sibling(span_1,2);{var consequent_1=$$anchor2=>{var fragment=comment$2(),node_2=first_child(fragment);snippet(node_2,()=>$$props.titleExtra),append($$anchor2,fragment)};if_block(node_1,$$render=>{$$props.titleExtra&&$$render(consequent_1)})}reset(div_2);var node_3=sibling(div_2,2);{var consequent_2=$$anchor2=>{var p2=root_3$L(),text_2=child(p2,!0);reset(p2),template_effect(()=>set_text(
text_2,$$props.description)),append($$anchor2,p2)};if_block(node_3,$$render=>{$$props.description&&$$render(consequent_2)})}var node_4=sibling(node_3,2);{var consequent_3=$$anchor2=>{var fragment_1=comment$2(),node_5=first_child(fragment_1);snippet(node_5,()=>$$props.subtitle),append($$anchor2,fragment_1)};if_block(node_4,$$render=>{$$props.subtitle&&$$render(consequent_3)})}reset(div),template_effect(()=>{set_text(text2,$$props.serverLabel),set_text(text_1,$$props.title)}),append($$anchor,div),
pop()}var root_1$C=from_html('<div class="h-4 w-12 animate-pulse rounded-full bg-muted"></div>'),root$1i=from_html('<div class="flex w-full items-start gap-3 rounded-lg px-3 py-2"><div class="min-w-0 flex-1 space-y-2"><div class="mb-2 flex items-center gap-1.5"><div class="h-3 w-3 shrink-0 animate-pulse rounded-sm bg-muted"></div> <div class="h-3 w-24 animate-pulse rounded bg-muted"></div></div> <div class="flex items-center gap-2"><div></div> <!></div> <div class="h-3 w-full animate-pulse round\
ed bg-muted"></div></div></div>');function ChatFormPickerListItemSkeleton($$anchor,$$props){let titleWidth=prop($$props,"titleWidth",3,"w-48"),showBadge=prop($$props,"showBadge",3,!1);var div=root$1i(),div_1=child(div),div_2=sibling(child(div_1),2),div_3=child(div_2),node2=sibling(div_3,2);{var consequent=$$anchor2=>{var div_4=root_1$C();append($$anchor2,div_4)};if_block(node2,$$render=>{showBadge()&&$$render(consequent)})}reset(div_2),next$1(2),reset(div_1),reset(div),template_effect(()=>set_class(
div_3,1,`h-4 ${titleWidth()??""} animate-pulse rounded bg-muted`)),append($$anchor,div)}var root_5$o=from_html('<span class="inline-flex items-center rounded-full bg-primary/10 px-1.5 py-0.5 text-[10px] font-medium text-primary">attached</span>'),root_6$p=from_html('<p class="mt-0.5 truncate text-xs text-muted-foreground/60"> </p>'),root_10$b=from_html("<!> Browse all",1);function ChatFormPickerMcpResources($$anchor,$$props){push$1($$props,!0);let className=prop($$props,"class",3,""),isOpen=prop(
$$props,"isOpen",7,!1),searchQuery=prop($$props,"searchQuery",3,""),resources=state$1(proxy([])),isLoading2=state$1(!1),selectedIndex=state$1(0),internalSearchQuery=state$1(""),serverSettingsMap=user_derived(()=>{const servers=mcpStore.getServers(),map2=new SvelteMap;for(const server of servers)map2.set(server.id,server);return map2});user_effect(()=>{isOpen()&&(loadResources(),set$1(selectedIndex,0))}),user_effect(()=>{get$3(filteredResources).length>0&&get$3(selectedIndex)>=get$3(filteredResources).
length&&set$1(selectedIndex,0)});async function loadResources(){set$1(isLoading2,!0);try{const perChatOverrides=conversationsStore.getAllMcpServerOverrides();if(!await mcpStore.ensureInitialized(perChatOverrides)){set$1(resources,[],!0);return}await mcpStore.fetchAllResources(),set$1(resources,mcpResourceStore.getAllResourceInfos(),!0)}catch(error2){console.error("[ChatFormPickerMcpResources] Failed to load resources:",error2),set$1(resources,[],!0)}finally{set$1(isLoading2,!1)}}function handleResourceClick(resource){
mcpStore.attachResource(resource.uri),$$props.onResourceSelect?.(resource),$$props.onClose?.()}function isResourceAttached(uri2){return mcpResourceStore.isAttached(uri2)}function handleKeydown(event2){return isOpen()?event2.key===KeyboardKey.ESCAPE?(event2.preventDefault(),$$props.onClose?.(),!0):event2.key===KeyboardKey.ARROW_DOWN?(event2.preventDefault(),get$3(filteredResources).length>0&&set$1(selectedIndex,(get$3(selectedIndex)+1)%get$3(filteredResources).length),!0):event2.key===KeyboardKey.
ARROW_UP?(event2.preventDefault(),get$3(filteredResources).length>0&&set$1(selectedIndex,get$3(selectedIndex)===0?get$3(filteredResources).length-1:get$3(selectedIndex)-1,!0),!0):event2.key===KeyboardKey.ENTER?(event2.preventDefault(),get$3(filteredResources)[get$3(selectedIndex)]&&handleResourceClick(get$3(filteredResources)[get$3(selectedIndex)]),!0):!1:!1}let filteredResources=user_derived(()=>{const sortedServers=mcpStore.getServersSorted(),serverOrderMap=new Map(sortedServers.map((server,index2)=>[
server.id,index2])),sortedResources=[...get$3(resources)].sort((a,b)=>{const orderA=serverOrderMap.get(a.serverName)??Number.MAX_SAFE_INTEGER,orderB=serverOrderMap.get(b.serverName)??Number.MAX_SAFE_INTEGER;return orderA-orderB}),query=(searchQuery()||get$3(internalSearchQuery)).toLowerCase();return query?sortedResources.filter(resource=>resource.name.toLowerCase().includes(query)||resource.title?.toLowerCase().includes(query)||resource.description?.toLowerCase().includes(query)||resource.uri.toLowerCase().
includes(query)):sortedResources}),showSearchInput=user_derived(()=>get$3(resources).length>3);var $$exports={handleKeydown};return ChatFormPickerPopover($$anchor,{get class(){return className()},srLabel:"Open resource picker",get onClose(){return $$props.onClose},onKeydown:handleKeydown,get isOpen(){return isOpen()},set isOpen($$value){isOpen($$value)},children:($$anchor2,$$slotProps)=>{ChatFormPickerList($$anchor2,{get items(){return get$3(filteredResources)},get isLoading(){return get$3(isLoading2)},
get selectedIndex(){return get$3(selectedIndex)},get showSearchInput(){return get$3(showSearchInput)},searchPlaceholder:"Search resources...",emptyMessage:"No MCP resources available",itemKey:resource=>resource.serverName+":"+resource.uri,get searchQuery(){return get$3(internalSearchQuery)},set searchQuery($$value){set$1(internalSearchQuery,$$value,!0)},item:($$anchor3,resource=noop$3,index2=noop$3,isSelected=noop$3)=>{const server=user_derived(()=>get$3(serverSettingsMap).get(resource().serverName)),
serverLabel=user_derived(()=>get$3(server)?mcpStore.getServerLabel(get$3(server)):resource().serverName);ChatFormPickerListItem($$anchor3,{get dataIndex(){return index2()},get isSelected(){return isSelected()},onclick:()=>handleResourceClick(resource()),children:($$anchor4,$$slotProps2)=>{{const titleExtra=$$anchor5=>{var fragment_4=comment$2(),node2=first_child(fragment_4);{var consequent=$$anchor6=>{var span=root_5$o();append($$anchor6,span)},d2=user_derived(()=>isResourceAttached(resource().uri));
if_block(node2,$$render=>{get$3(d2)&&$$render(consequent)})}append($$anchor5,fragment_4)},subtitle=$$anchor5=>{var p2=root_6$p(),text2=child(p2,!0);reset(p2),template_effect(()=>set_text(text2,resource().uri)),append($$anchor5,p2)};let $0=user_derived(()=>resource().title||resource().name);ChatFormPickerItemHeader($$anchor4,{get server(){return get$3(server)},get serverLabel(){return get$3(serverLabel)},get title(){return get$3($0)},get description(){return resource().description},titleExtra,subtitle,
$$slots:{titleExtra:!0,subtitle:!0}})}},$$slots:{default:!0}})},skeleton:$$anchor3=>{ChatFormPickerListItemSkeleton($$anchor3,{})},footer:$$anchor3=>{var fragment_6=comment$2(),node_1=first_child(fragment_6);{var consequent_1=$$anchor4=>{Button($$anchor4,{class:"fixed right-3 bottom-3",type:"button",get onclick(){return $$props.onBrowse},variant:"secondary",size:"sm",children:($$anchor5,$$slotProps2)=>{var fragment_8=root_10$b(),node_2=first_child(fragment_8);Folder_open(node_2,{class:"h-3 w-3"}),
next$1(),append($$anchor5,fragment_8)},$$slots:{default:!0}})};if_block(node_1,$$render=>{$$props.onBrowse&&get$3(resources).length>3&&$$render(consequent_1)})}append($$anchor3,fragment_6)},$$slots:{item:!0,skeleton:!0,footer:!0}})},$$slots:{default:!0}}),pop($$exports)}var root$1h=from_html("<!> <!>",1);function ChatFormPickers($$anchor,$$props){push$1($$props,!0);let promptPickerRef=state$1(void 0),resourcePickerRef=state$1(void 0);function handleKeydown(event2){return!!($$props.isPromptPickerOpen&&
get$3(promptPickerRef)?.handleKeydown(event2)||$$props.isInlineResourcePickerOpen&&get$3(resourcePickerRef)?.handleKeydown(event2))}var $$exports={handleKeydown},fragment=root$1h(),node2=first_child(fragment);bind_this(ChatFormPickerMcpPrompts(node2,{get isOpen(){return $$props.isPromptPickerOpen},get searchQuery(){return $$props.promptSearchQuery},get onClose(){return $$props.onPromptPickerClose},get onPromptLoadStart(){return $$props.onPromptLoadStart},get onPromptLoadComplete(){return $$props.
onPromptLoadComplete},get onPromptLoadError(){return $$props.onPromptLoadError}}),$$value=>set$1(promptPickerRef,$$value,!0),()=>get$3(promptPickerRef));var node_1=sibling(node2,2);return bind_this(ChatFormPickerMcpResources(node_1,{get isOpen(){return $$props.isInlineResourcePickerOpen},get searchQuery(){return $$props.resourceSearchQuery},get onClose(){return $$props.onInlineResourcePickerClose},get onResourceSelect(){return $$props.onInlineResourceSelect},get onBrowse(){return $$props.onInlineResourceBrowse}}),
$$value=>set$1(resourcePickerRef,$$value,!0),()=>get$3(resourcePickerRef)),append($$anchor,fragment),pop($$exports)}const MESSAGE_EDIT_KEY=Symbol.for(CONTEXT_KEY_MESSAGE_EDIT);function setMessageEditContext(ctx){return setContext(MESSAGE_EDIT_KEY,ctx)}function getMessageEditContext(){return getContext(MESSAGE_EDIT_KEY)}const CHAT_ACTIONS_KEY=Symbol.for(CONTEXT_KEY_CHAT_ACTIONS);function setChatActionsContext(ctx){return setContext(CHAT_ACTIONS_KEY,ctx)}function getChatActionsContext(){return getContext(
CHAT_ACTIONS_KEY)}const CHAT_SETTINGS_CONFIG_KEY=Symbol.for(CONTEXT_KEY_CHAT_SETTINGS_CONFIG);function setChatSettingsConfigContext(ctx){return setContext(CHAT_SETTINGS_CONFIG_KEY,ctx)}const PROCESSING_INFO_KEY=Symbol.for(CONTEXT_KEY_PROCESSING_INFO);function setProcessingInfoContext(ctx){return setContext(PROCESSING_INFO_KEY,ctx)}function getProcessingInfoContext(){return getContext(PROCESSING_INFO_KEY)}var root$1g=from_html("<!> <!>",1);function ChatMessages($$anchor,$$props){push$1($$props,!0);
let messages=prop($$props,"messages",19,()=>[]),allConversationMessages=state$1(proxy([]));const currentConfig=config$1();setChatActionsContext({copy:async message=>{const asPlainText=!!currentConfig.copyTextAttachmentsAsPlainText,clipboardContent=formatMessageForClipboard(message.content,message.extra,asPlainText);await copyToClipboard(clipboardContent,"Message copied to clipboard")},delete:async message=>{await chatStore.deleteMessage(message.id),refreshAllMessages()},navigateToSibling:async siblingId=>{
await conversationsStore.navigateToSibling(siblingId)},editWithBranching:async(message,newContent,newExtras)=>{$$props.onUserAction?.(),await chatStore.editMessageWithBranching(message.id,newContent,newExtras),refreshAllMessages()},editWithReplacement:async(message,newContent,shouldBranch)=>{$$props.onUserAction?.(),await chatStore.editAssistantMessage(message.id,newContent,shouldBranch),refreshAllMessages()},editUserMessagePreserveResponses:async(message,newContent,newExtras)=>{$$props.onUserAction?.(),
await chatStore.editUserMessagePreserveResponses(message.id,newContent,newExtras),refreshAllMessages()},regenerateWithBranching:async(message,modelOverride)=>{$$props.onUserAction?.(),await chatStore.regenerateMessageWithBranching(message.id,modelOverride),refreshAllMessages()},continueAssistantMessage:async message=>{$$props.onUserAction?.(),await chatStore.continueAssistantMessage(message.id),refreshAllMessages()},forkConversation:async(message,options)=>{await conversationsStore.forkConversation(
message.id,options)}});function refreshAllMessages(){const conversation=activeConversation();conversation?conversationsStore.getConversationMessages(conversation.id).then(messages2=>{set$1(allConversationMessages,messages2,!0)}):set$1(allConversationMessages,[],!0)}user_effect(()=>{activeConversation()&&refreshAllMessages()});let displayMessages=user_derived(()=>{if(!messages().length)return[];const filteredMessages=currentConfig.showSystemMessage?messages():messages().filter(msg=>msg.type!==MessageRole.
SYSTEM),result=[];for(let i=0;i<filteredMessages.length;i++){const msg=filteredMessages[i];if(msg.role===MessageRole.TOOL)continue;const toolMessages=[];if(msg.role===MessageRole.ASSISTANT&&hasAgenticContent(msg)){let j=i+1;for(;j<filteredMessages.length;){const next2=filteredMessages[j];if(next2.role===MessageRole.TOOL)toolMessages.push(next2),j++;else if(next2.role===MessageRole.ASSISTANT)toolMessages.push(next2),j++;else break}i=j-1}else if(msg.role===MessageRole.ASSISTANT){let j=i+1;for(;j<filteredMessages.
length&&filteredMessages[j].role===MessageRole.TOOL;)toolMessages.push(filteredMessages[j]),j++}const siblingInfo=getMessageSiblings(get$3(allConversationMessages),msg.id);result.push({message:msg,toolMessages,isLastAssistantMessage:!1,siblingInfo:siblingInfo||{message:msg,siblingIds:[msg.id],currentIndex:0,totalSiblings:1}})}for(let i=result.length-1;i>=0;i--)if(result[i].message.role===MessageRole.ASSISTANT){result[i].isLastAssistantMessage=!0;break}return result});var fragment=root$1g(),node2=first_child(
fragment);each(node2,17,()=>get$3(displayMessages),({message,toolMessages,isLastAssistantMessage,siblingInfo})=>message.id,($$anchor2,$$item)=>{let message=()=>get$3($$item).message,toolMessages=()=>get$3($$item).toolMessages,isLastAssistantMessage=()=>get$3($$item).isLastAssistantMessage,siblingInfo=()=>get$3($$item).siblingInfo;ChatMessage($$anchor2,{class:"mx-auto mt-12 w-full max-w-[48rem]",get message(){return message()},get toolMessages(){return toolMessages()},get isLastAssistantMessage(){
return isLastAssistantMessage()},get siblingInfo(){return siblingInfo()}})});var node_1=sibling(node2,2);{var consequent_1=$$anchor2=>{const convId=user_derived(()=>activeConversation().id),pendingContent=user_derived(()=>agenticPendingSteeringMessageContent(get$3(convId)));var fragment_2=comment$2(),node_2=first_child(fragment_2);{var consequent=$$anchor3=>{{let $0=user_derived(()=>agenticPendingSteeringMessageExtras(get$3(convId)));ChatMessageUserPending($$anchor3,{class:"mx-auto mt-12 w-full \
max-w-[48rem]",get content(){return get$3(pendingContent)},get extras(){return get$3($0)},onSendImmediately:()=>chatStore.abortCurrentFlow(get$3(convId)),onEdit:(newContent,extras)=>agenticInjectSteeringMessage(get$3(convId),newContent,extras),onDelete:()=>agenticClearSteeringMessage(get$3(convId))})}};if_block(node_2,$$render=>{get$3(pendingContent)&&$$render(consequent)})}append($$anchor2,fragment_2)},d2=user_derived(()=>activeConversation()&&agenticPendingSteeringMessageContent(activeConversation().
id)),consequent_3=$$anchor2=>{const convId=user_derived(()=>activeConversation().id),pendingContent=user_derived(()=>chatPendingMessageContent(get$3(convId)));var fragment_4=comment$2(),node_3=first_child(fragment_4);{var consequent_2=$$anchor3=>{{let $0=user_derived(()=>chatPendingMessageExtras(get$3(convId)));ChatMessageUserPending($$anchor3,{class:"mx-auto mt-12 w-full max-w-[48rem]",get content(){return get$3(pendingContent)},get extras(){return get$3($0)},onSendImmediately:()=>chatStore.abortCurrentFlow(
get$3(convId)),onEdit:(newContent,extras)=>chatInjectPendingMessage(get$3(convId),newContent,extras),onDelete:()=>chatClearPendingMessage(get$3(convId))})}};if_block(node_3,$$render=>{get$3(pendingContent)&&$$render(consequent_2)})}append($$anchor2,fragment_4)},d_12=user_derived(()=>activeConversation()&&chatPendingMessageContent(activeConversation().id));if_block(node_1,$$render=>{get$3(d2)?$$render(consequent_1):get$3(d_12)&&$$render(consequent_3,1)})}append($$anchor,fragment),pop()}function isElementInViewport(node2){
const rect=node2.getBoundingClientRect();return rect.top<window.innerHeight&&rect.bottom>0&&rect.left<window.innerWidth&&rect.right>0}function fadeInView(node2,options={}){const{duration:duration2=300,y=0,skipIfVisible=!1}=options;skipIfVisible&&isElementInViewport(node2)||(node2.style.opacity="0",node2.style.transform=`translateY(${y}px)`,node2.style.transition=`opacity ${duration2}ms ease-out, transform ${duration2}ms ease-out`,user_effect(()=>{const observer=new IntersectionObserver(entries=>{
for(const entry of entries)entry.isIntersecting&&(requestAnimationFrame(()=>{node2.style.opacity="1",node2.style.transform="translateY(0)"}),observer.disconnect())},{threshold:.05});return observer.observe(node2),()=>{observer.disconnect()}}))}var root$1f=from_html("<div><!></div>");function ChatMessage($$anchor,$$props){push$1($$props,!0);let className=prop($$props,"class",3,""),toolMessages=prop($$props,"toolMessages",19,()=>[]),isLastAssistantMessage=prop($$props,"isLastAssistantMessage",3,!1),
siblingInfo=prop($$props,"siblingInfo",3,null);const chatActions=getChatActionsContext();let deletionInfo=state$1(null),editedContent=user_derived(()=>$$props.message.content),rawEditContent=user_derived(()=>{if($$props.message.role!==MessageRole.ASSISTANT)return;const sections=deriveAgenticSections($$props.message,toolMessages(),[],!1),parts=[];for(const section of sections)switch(section.type){case AgenticSectionType.REASONING:case AgenticSectionType.REASONING_PENDING:parts.push(`${REASONING_TAGS.
START}
${section.content}
${REASONING_TAGS.END}`);break;case AgenticSectionType.TEXT:parts.push(section.content);break;case AgenticSectionType.TOOL_CALL:case AgenticSectionType.TOOL_CALL_PENDING:case AgenticSectionType.TOOL_CALL_STREAMING:{const callObj={name:section.toolName};if(section.toolArgs)try{callObj.arguments=JSON.parse(section.toolArgs)}catch{callObj.arguments=section.toolArgs}parts.push(JSON.stringify(callObj,null,2)),section.toolResult&&parts.push(`[Tool Result]
${section.toolResult}`);break}}return parts.join(`


`)}),editedExtras=user_derived(()=>$$props.message.extra?[...$$props.message.extra]:[]),editedUploadedFiles=state$1(proxy([])),isEditing2=state$1(!1),showDeleteDialog=state$1(!1),shouldBranchAfterEdit=state$1(!1),textareaElement=state$1(void 0),showSaveOnlyOption=user_derived(()=>$$props.message.role===MessageRole.USER),showBranchAfterEditOption=user_derived(()=>$$props.message.role===MessageRole.ASSISTANT);setMessageEditContext({get isEditing(){return get$3(isEditing2)},get editedContent(){return get$3(
editedContent)},get editedExtras(){return get$3(editedExtras)},get editedUploadedFiles(){return get$3(editedUploadedFiles)},get originalContent(){return $$props.message.role===MessageRole.ASSISTANT?get$3(rawEditContent)??$$props.message.content:$$props.message.content},get originalExtras(){return $$props.message.extra||[]},get showSaveOnlyOption(){return get$3(showSaveOnlyOption)},get showBranchAfterEditOption(){return get$3(showBranchAfterEditOption)},get shouldBranchAfterEdit(){return get$3(shouldBranchAfterEdit)},
get messageRole(){return $$props.message.role},get rawEditContent(){return get$3(rawEditContent)},setContent:content2=>{set$1(editedContent,content2)},setExtras:extras=>{set$1(editedExtras,extras)},setUploadedFiles:files=>{set$1(editedUploadedFiles,files,!0)},setShouldBranchAfterEdit:value=>{set$1(shouldBranchAfterEdit,value,!0)},save:handleSaveEdit,saveOnly:handleSaveEditOnly,cancel:handleCancelEdit,startEdit:handleEdit});let mcpPromptExtra=user_derived(()=>{if($$props.message.role!==MessageRole.
USER||$$props.message.content.trim()||!$$props.message.extra||$$props.message.extra.length!==1)return null;const extra=$$props.message.extra[0];return extra.type===AttachmentType.MCP_PROMPT?extra:null});user_effect(()=>{const pendingId=pendingEditMessageId();pendingId&&pendingId===$$props.message.id&&!get$3(isEditing2)&&(handleEdit(),chatStore.clearPendingEditMessageId())});async function handleCancelEdit(){if(set$1(isEditing2,!1),$$props.message.role===MessageRole.SYSTEM){await chatStore.removeSystemPromptPlaceholder(
$$props.message.id)&&goto(ROUTES.START);return}set$1(editedContent,$$props.message.role===MessageRole.ASSISTANT?get$3(rawEditContent)||$$props.message.content||"":$$props.message.content),set$1(editedExtras,$$props.message.extra?[...$$props.message.extra]:[]),set$1(editedUploadedFiles,[],!0)}function handleCopy(){chatActions.copy($$props.message)}async function handleConfirmDelete(){$$props.message.role===MessageRole.SYSTEM?await chatStore.removeSystemPromptPlaceholder($$props.message.id)&&goto(
ROUTES.START):chatActions.delete($$props.message),set$1(showDeleteDialog,!1)}async function handleDelete2(){set$1(deletionInfo,await chatStore.getDeletionInfo($$props.message.id),!0),set$1(showDeleteDialog,!0)}function handleEdit(){set$1(isEditing2,!0),$$props.message.role===MessageRole.SYSTEM&&$$props.message.content===SYSTEM_MESSAGE_PLACEHOLDER?set$1(editedContent,""):$$props.message.role===MessageRole.ASSISTANT?set$1(editedContent,get$3(rawEditContent)||$$props.message.content||""):set$1(editedContent,
$$props.message.content),get$3(textareaElement)?.focus(),set$1(editedExtras,$$props.message.extra?[...$$props.message.extra]:[]),set$1(editedUploadedFiles,[],!0),setTimeout(()=>{get$3(textareaElement)&&(get$3(textareaElement).focus(),get$3(textareaElement).setSelectionRange(get$3(textareaElement).value.length,get$3(textareaElement).value.length))},0)}function handleRegenerate(modelOverride){chatActions.regenerateWithBranching($$props.message,modelOverride)}function handleContinue(){chatActions.continueAssistantMessage(
$$props.message)}function handleForkConversation(options){chatActions.forkConversation($$props.message,options)}function handleNavigateToSibling(siblingId){chatActions.navigateToSibling(siblingId)}async function handleSaveEdit(){if($$props.message.role===MessageRole.SYSTEM){const newContent=get$3(editedContent).trim();if(!newContent){const conversationDeleted=await chatStore.removeSystemPromptPlaceholder($$props.message.id);set$1(isEditing2,!1),conversationDeleted&&goto(ROUTES.START);return}await DatabaseService.
updateMessage($$props.message.id,{content:newContent});const index2=conversationsStore.findMessageIndex($$props.message.id);index2!==-1&&conversationsStore.updateMessageAtIndex(index2,{content:newContent})}else if($$props.message.role===MessageRole.USER){const finalExtras=await getMergedExtras();chatActions.editWithBranching($$props.message,get$3(editedContent).trim(),finalExtras)}else chatActions.editWithReplacement($$props.message,get$3(editedContent),get$3(shouldBranchAfterEdit));set$1(isEditing2,
!1),set$1(shouldBranchAfterEdit,!1),set$1(editedUploadedFiles,[],!0)}async function handleSaveEditOnly(){if($$props.message.role===MessageRole.USER){const finalExtras=await getMergedExtras();chatActions.editUserMessagePreserveResponses($$props.message,get$3(editedContent).trim(),finalExtras)}set$1(isEditing2,!1),set$1(editedUploadedFiles,[],!0)}async function getMergedExtras(){if(get$3(editedUploadedFiles).length===0)return get$3(editedExtras);const plainFiles=snapshot(get$3(editedUploadedFiles)),
newExtras=(await parseFilesToMessageExtras(plainFiles))?.extras||[];return[...get$3(editedExtras),...newExtras]}function handleShowDeleteDialogChange(show){set$1(showDeleteDialog,show,!0)}var div=root$1f(),node2=child(div);{var consequent=$$anchor2=>{ChatMessageSystem($$anchor2,{get class(){return className()},get deletionInfo(){return get$3(deletionInfo)},get message(){return $$props.message},onConfirmDelete:handleConfirmDelete,onCopy:handleCopy,onDelete:handleDelete2,onEdit:handleEdit,onNavigateToSibling:handleNavigateToSibling,
onShowDeleteDialogChange:handleShowDeleteDialogChange,get showDeleteDialog(){return get$3(showDeleteDialog)},get siblingInfo(){return siblingInfo()},get textareaElement(){return get$3(textareaElement)},set textareaElement($$value){set$1(textareaElement,$$value,!0)}})},consequent_1=$$anchor2=>{ChatMessageMcpPrompt($$anchor2,{get class(){return className()},get deletionInfo(){return get$3(deletionInfo)},get message(){return $$props.message},get mcpPrompt(){return get$3(mcpPromptExtra)},onConfirmDelete:handleConfirmDelete,
onCopy:handleCopy,onDelete:handleDelete2,onEdit:handleEdit,onNavigateToSibling:handleNavigateToSibling,onShowDeleteDialogChange:handleShowDeleteDialogChange,get showDeleteDialog(){return get$3(showDeleteDialog)},get siblingInfo(){return siblingInfo()}})},consequent_2=$$anchor2=>{ChatMessageUser($$anchor2,{get class(){return className()},get deletionInfo(){return get$3(deletionInfo)},get message(){return $$props.message},onConfirmDelete:handleConfirmDelete,onCopy:handleCopy,onDelete:handleDelete2,
onEdit:handleEdit,onForkConversation:handleForkConversation,onNavigateToSibling:handleNavigateToSibling,onShowDeleteDialogChange:handleShowDeleteDialogChange,get showDeleteDialog(){return get$3(showDeleteDialog)},get siblingInfo(){return siblingInfo()}})},alternate=$$anchor2=>{ChatMessageAssistant($$anchor2,{get class(){return className()},get deletionInfo(){return get$3(deletionInfo)},get isLastAssistantMessage(){return isLastAssistantMessage()},get message(){return $$props.message},get toolMessages(){
return toolMessages()},get messageContent(){return $$props.message.content},onConfirmDelete:handleConfirmDelete,onContinue:handleContinue,onCopy:handleCopy,onDelete:handleDelete2,onEdit:handleEdit,onForkConversation:handleForkConversation,onNavigateToSibling:handleNavigateToSibling,onRegenerate:handleRegenerate,onShowDeleteDialogChange:handleShowDeleteDialogChange,get showDeleteDialog(){return get$3(showDeleteDialog)},get siblingInfo(){return siblingInfo()},get textareaElement(){return get$3(textareaElement)},
set textareaElement($$value){set$1(textareaElement,$$value,!0)}})};if_block(node2,$$render=>{$$props.message.role===MessageRole.SYSTEM?$$render(consequent):get$3(mcpPromptExtra)?$$render(consequent_1,1):$$props.message.role===MessageRole.USER?$$render(consequent_2,2):$$render(alternate,-1)})}reset(div),action(div,$$node=>fadeInView?.($$node)),append($$anchor,div),pop()}var root_2$U=from_html('<div class="agentic-text svelte-1uhcmx5"><!></div>'),root_7$n=from_html('<div class="rounded bg-muted/30\
 p-2 text-xs text-muted-foreground italic">Receiving arguments...</div>'),root_8$o=from_html('<div class="rounded bg-yellow-500/10 p-2 text-xs text-yellow-600 italic dark:text-yellow-400">Response was truncated</div>'),root_4$w=from_html('<div class="pt-3"><div class="my-3 flex items-center gap-2 text-xs text-muted-foreground"><span>Arguments:</span> <!></div> <!></div>'),root_11$b=from_html('<div class="pt-3"><div class="my-3 text-xs text-muted-foreground">Arguments:</div> <!></div>'),root_13$b=from_html(
'<div class="rounded bg-muted/30 p-2 text-xs text-muted-foreground italic">Waiting for result...</div>'),root_16$3=from_html('<img class="mt-2 mb-2 h-auto max-w-full rounded-lg" loading="lazy"/>'),root_15$8=from_html('<div class="font-mono text-xs leading-relaxed whitespace-pre-wrap"> </div> <!>',1),root_14$4=from_html('<div class="overflow-auto rounded-lg border border-border bg-muted p-4"></div>'),root_17$6=from_html('<div class="rounded bg-muted/30 p-2 text-xs text-muted-foreground italic">No\
 output</div>'),root_10$a=from_html('<!> <div class="pt-3"><div class="my-3 flex items-center gap-2 text-xs text-muted-foreground"><span>Result:</span> <!></div> <!></div>',1),root_19$7=from_html('<div class="pt-3"><div class="text-xs leading-relaxed break-words whitespace-pre-wrap"> </div></div>'),root_21$1=from_html('<div class="pt-3"><div class="text-xs leading-relaxed break-words whitespace-pre-wrap"> </div></div>'),root_25$2=from_html('<div class="turn-stats svelte-1uhcmx5"><!></div>'),root_23$3=from_html(
'<div class="agentic-turn my-2 hover:bg-muted/80 dark:hover:bg-muted/30 svelte-1uhcmx5"><span class="agentic-turn-label svelte-1uhcmx5"></span> <!> <!></div>'),root$1e=from_html('<div class="agentic-content svelte-1uhcmx5"><!> <!> <!></div>');function ChatMessageAgenticContent($$anchor,$$props){push$1($$props,!0);const renderSection=($$anchor2,section=noop$3,index2=noop$3)=>{var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor3=>{var div=root_2$U(),node_1=child(div);{let $0=user_derived(
()=>$$props.message?.extra);MarkdownContent(node_1,{get content(){return section().content},get attachments(){return get$3($0)}})}reset(div),append($$anchor3,div)},consequent_4=$$anchor3=>{const streamingIcon=user_derived(()=>(isStreaming(),Loader_circle)),streamingIconClass=user_derived(()=>isStreaming()?"h-4 w-4 animate-spin":"h-4 w-4");{let $0=user_derived(()=>isExpanded(index2(),section())),$1=user_derived(()=>section().toolName||"Tool call"),$2=user_derived(()=>isStreaming()?"":"incomplete");
CollapsibleContentBlock($$anchor3,{get open(){return get$3($0)},class:"my-2",get icon(){return get$3(streamingIcon)},get iconClass(){return get$3(streamingIconClass)},get title(){return get$3($1)},get subtitle(){return get$3($2)},get isStreaming(){return isStreaming()},onToggle:()=>toggleExpanded(index2(),section()),children:($$anchor4,$$slotProps)=>{var div_1=root_4$w(),div_2=child(div_1),node_2=sibling(child(div_2),2);{var consequent_1=$$anchor5=>{Loader_circle($$anchor5,{class:"h-3 w-3 animat\
e-spin"})};if_block(node_2,$$render=>{isStreaming()&&$$render(consequent_1)})}reset(div_2);var node_3=sibling(div_2,2);{var consequent_2=$$anchor5=>{{let $02=user_derived(()=>formatJsonPretty(section().toolArgs));SyntaxHighlightedCode($$anchor5,{get code(){return get$3($02)},get language(){return FileTypeText.JSON},maxHeight:"20rem",class:"text-xs"})}},consequent_3=$$anchor5=>{var div_3=root_7$n();append($$anchor5,div_3)},alternate=$$anchor5=>{var div_4=root_8$o();append($$anchor5,div_4)};if_block(
node_3,$$render=>{section().toolArgs?$$render(consequent_2):isStreaming()?$$render(consequent_3,1):$$render(alternate,-1)})}reset(div_1),append($$anchor4,div_1)},$$slots:{default:!0}})}},consequent_10=$$anchor3=>{const isPending=user_derived(()=>section().type===AgenticSectionType.TOOL_CALL_PENDING),toolIcon=user_derived(()=>get$3(isPending)?Loader_circle:Wrench),toolIconClass=user_derived(()=>get$3(isPending)?"h-4 w-4 animate-spin":"h-4 w-4");{let $0=user_derived(()=>isExpanded(index2(),section())),
$1=user_derived(()=>section().toolName||""),$2=user_derived(()=>get$3(isPending)?"executing...":void 0);CollapsibleContentBlock($$anchor3,{get open(){return get$3($0)},class:"my-2",get icon(){return get$3(toolIcon)},get iconClass(){return get$3(toolIconClass)},get title(){return get$3($1)},get subtitle(){return get$3($2)},get isStreaming(){return get$3(isPending)},onToggle:()=>toggleExpanded(index2(),section()),children:($$anchor4,$$slotProps)=>{var fragment_5=root_10$a(),node_4=first_child(fragment_5);
{var consequent_5=$$anchor5=>{var div_5=root_11$b(),node_5=sibling(child(div_5),2);{let $02=user_derived(()=>formatJsonPretty(section().toolArgs));SyntaxHighlightedCode(node_5,{get code(){return get$3($02)},get language(){return FileTypeText.JSON},maxHeight:"20rem",class:"text-xs"})}reset(div_5),append($$anchor5,div_5)};if_block(node_4,$$render=>{section().toolArgs&&section().toolArgs!=="{}"&&$$render(consequent_5)})}var div_6=sibling(node_4,2),div_7=child(div_6),node_6=sibling(child(div_7),2);{
var consequent_6=$$anchor5=>{Loader_circle($$anchor5,{class:"h-3 w-3 animate-spin"})};if_block(node_6,$$render=>{get$3(isPending)&&$$render(consequent_6)})}reset(div_7);var node_7=sibling(div_7,2);{var consequent_7=$$anchor5=>{var div_8=root_13$b();append($$anchor5,div_8)},consequent_9=$$anchor5=>{var div_9=root_14$4();each(div_9,21,()=>section().parsedLines,index$2,($$anchor6,line)=>{var fragment_7=root_15$8(),div_10=first_child(fragment_7),text2=child(div_10,!0);reset(div_10);var node_8=sibling(
div_10,2);{var consequent_8=$$anchor7=>{var img=root_16$3();template_effect(()=>{set_attribute(img,"src",get$3(line).image.base64Url),set_attribute(img,"alt",get$3(line).image.name)}),append($$anchor7,img)};if_block(node_8,$$render=>{get$3(line).image&&$$render(consequent_8)})}template_effect(()=>set_text(text2,get$3(line).text)),append($$anchor6,fragment_7)}),reset(div_9),append($$anchor5,div_9)},alternate_1=$$anchor5=>{var div_11=root_17$6();append($$anchor5,div_11)};if_block(node_7,$$render=>{
get$3(isPending)?$$render(consequent_7):section().toolResult?$$render(consequent_9,1):$$render(alternate_1,-1)})}reset(div_6),append($$anchor4,fragment_5)},$$slots:{default:!0}})}},consequent_11=$$anchor3=>{{let $0=user_derived(()=>isExpanded(index2(),section()));CollapsibleContentBlock($$anchor3,{get open(){return get$3($0)},class:"my-2",get icon(){return Brain},title:"Reasoning",onToggle:()=>toggleExpanded(index2(),section()),children:($$anchor4,$$slotProps)=>{var div_12=root_19$7(),div_13=child(
div_12),text_1=child(div_13,!0);reset(div_13),reset(div_12),template_effect(()=>set_text(text_1,section().content)),append($$anchor4,div_12)},$$slots:{default:!0}})}},consequent_12=$$anchor3=>{const reasoningTitle=user_derived(()=>isStreaming()?"Reasoning...":"Reasoning"),reasoningSubtitle=user_derived(()=>isStreaming()?"":"incomplete");{let $0=user_derived(()=>isExpanded(index2(),section()));CollapsibleContentBlock($$anchor3,{get open(){return get$3($0)},class:"my-2",get icon(){return Brain},get title(){
return get$3(reasoningTitle)},get subtitle(){return get$3(reasoningSubtitle)},get isStreaming(){return isStreaming()},onToggle:()=>toggleExpanded(index2(),section()),children:($$anchor4,$$slotProps)=>{var div_14=root_21$1(),div_15=child(div_14),text_2=child(div_15,!0);reset(div_15),reset(div_14),template_effect(()=>set_text(text_2,section().content)),append($$anchor4,div_14)},$$slots:{default:!0}})}};if_block(node2,$$render=>{section().type===AgenticSectionType.TEXT?$$render(consequent):section().
type===AgenticSectionType.TOOL_CALL_STREAMING?$$render(consequent_4,1):section().type===AgenticSectionType.TOOL_CALL||section().type===AgenticSectionType.TOOL_CALL_PENDING?$$render(consequent_10,2):section().type===AgenticSectionType.REASONING?$$render(consequent_11,3):section().type===AgenticSectionType.REASONING_PENDING&&$$render(consequent_12,4)})}append($$anchor2,fragment)};let toolMessages=prop($$props,"toolMessages",19,()=>[]),isStreaming=prop($$props,"isStreaming",3,!1),isLastAssistantMessage=prop(
$$props,"isLastAssistantMessage",3,!1),highlightTurns=prop($$props,"highlightTurns",3,!1),expandedStates=proxy({});const showToolCallInProgress=user_derived(()=>config$1().showToolCallInProgress),showThoughtInProgress=user_derived(()=>config$1().showThoughtInProgress);let permissionDismissed=state$1(!1);const pendingPermission=user_derived(()=>isStreaming()&&isLastAssistantMessage()?agenticPendingPermissionRequest($$props.message.convId):null);let prevPendingRef=null;user_effect(()=>{get$3(pendingPermission)!==
prevPendingRef&&(prevPendingRef=get$3(pendingPermission),get$3(pendingPermission)&&set$1(permissionDismissed,!1))});function handlePermission(decision){set$1(permissionDismissed,!0),agenticResolvePermission($$props.message.convId,decision)}let continueDismissed=state$1(!1);const pendingContinue=user_derived(()=>isStreaming()&&isLastAssistantMessage()?agenticPendingContinueRequest($$props.message.convId):!1);let prevContinueRef=!1;user_effect(()=>{get$3(pendingContinue)!==prevContinueRef&&(prevContinueRef=
get$3(pendingContinue),get$3(pendingContinue)&&set$1(continueDismissed,!1))});function handleContinue(shouldContinue){set$1(continueDismissed,!0),agenticResolveContinue($$props.message.convId,shouldContinue)}const sections=user_derived(()=>deriveAgenticSections($$props.message,toolMessages(),[],isStreaming())),sectionsParsed=user_derived(()=>get$3(sections).map(section=>({...section,parsedLines:section.toolResult?parseToolResultWithImages(section.toolResult,section.toolResultExtras||$$props.message?.
extra):[]}))),turnGroups=user_derived(()=>{const turns=[];let currentTurn=[],currentIndices=[],prevWasTool=!1;for(let i=0;i<get$3(sectionsParsed).length;i++){const section=get$3(sectionsParsed)[i],isTool=section.type===AgenticSectionType.TOOL_CALL||section.type===AgenticSectionType.TOOL_CALL_PENDING||section.type===AgenticSectionType.TOOL_CALL_STREAMING;!isTool&&prevWasTool&&currentTurn.length>0&&(turns.push({sections:currentTurn,flatIndices:currentIndices}),currentTurn=[],currentIndices=[]),currentTurn.
push(section),currentIndices.push(i),prevWasTool=isTool}return currentTurn.length>0&&turns.push({sections:currentTurn,flatIndices:currentIndices}),turns});function getDefaultExpanded(section){return section.type===AgenticSectionType.TOOL_CALL_PENDING||section.type===AgenticSectionType.TOOL_CALL_STREAMING?get$3(showToolCallInProgress):section.type===AgenticSectionType.REASONING_PENDING?get$3(showThoughtInProgress):!1}function isExpanded(index2,section){return expandedStates[index2]!==void 0?expandedStates[index2]:
getDefaultExpanded(section)}function toggleExpanded(index2,section){const currentState=isExpanded(index2,section);expandedStates[index2]=!currentState}function buildTurnAgenticTimings(stats){return{turns:1,toolCallsCount:stats.toolCalls.length,toolsMs:stats.toolsMs,toolCalls:stats.toolCalls,llm:stats.llm}}var div_16=root$1e(),node_9=child(div_16);{var consequent_14=$$anchor2=>{var fragment_10=comment$2(),node_10=first_child(fragment_10);each(node_10,17,()=>get$3(turnGroups),index$2,($$anchor3,turn,turnIndex)=>{
const turnStats=user_derived(()=>$$props.message?.timings?.agentic?.perTurn?.[turnIndex]);var div_17=root_23$3(),span=child(div_17);span.textContent=`Turn ${turnIndex+1}`;var node_11=sibling(span,2);each(node_11,19,()=>get$3(turn).sections,(section,sIdx)=>get$3(turn).flatIndices[sIdx],($$anchor4,section,sIdx)=>{renderSection($$anchor4,()=>get$3(section),()=>get$3(turn).flatIndices[get$3(sIdx)])});var node_12=sibling(node_11,2);{var consequent_13=$$anchor4=>{var div_18=root_25$2(),node_13=child(div_18);
{let $0=user_derived(()=>get$3(turnStats).toolCalls.length>0?buildTurnAgenticTimings(get$3(turnStats)):void 0);ChatMessageStatistics(node_13,{get promptTokens(){return get$3(turnStats).llm.prompt_n},get promptMs(){return get$3(turnStats).llm.prompt_ms},get predictedTokens(){return get$3(turnStats).llm.predicted_n},get predictedMs(){return get$3(turnStats).llm.predicted_ms},get agenticTimings(){return get$3($0)},get initialView(){return ChatMessageStatsView.GENERATION},hideSummary:!0})}reset(div_18),
append($$anchor4,div_18)};if_block(node_12,$$render=>{get$3(turnStats)&&$$render(consequent_13)})}reset(div_17),append($$anchor3,div_17)}),append($$anchor2,fragment_10)},alternate_2=$$anchor2=>{var fragment_12=comment$2(),node_14=first_child(fragment_12);each(node_14,17,()=>get$3(sectionsParsed),index$2,($$anchor3,section,index2)=>{renderSection($$anchor3,()=>get$3(section),()=>index2)}),append($$anchor2,fragment_12)};if_block(node_9,$$render=>{highlightTurns()&&get$3(turnGroups).length>1?$$render(
consequent_14):$$render(alternate_2,-1)})}var node_15=sibling(node_9,2);{var consequent_15=$$anchor2=>{ChatMessageActionCardPermissionRequest($$anchor2,{get toolName(){return get$3(pendingPermission).toolName},get serverLabel(){return get$3(pendingPermission).serverLabel},onDecision:handlePermission})};if_block(node_15,$$render=>{get$3(pendingPermission)&&!get$3(permissionDismissed)&&$$render(consequent_15)})}var node_16=sibling(node_15,2);{var consequent_16=$$anchor2=>{ChatMessageActionCardContinueRequest(
$$anchor2,{onDecision:handleContinue})};if_block(node_16,$$render=>{get$3(pendingContinue)&&!get$3(continueDismissed)&&$$render(consequent_16)})}reset(div_16),append($$anchor,div_16),pop()}var root$1d=from_html("<div><!></div>");function Button_group_root($$anchor,$$props){push$1($$props,!0);let restProps=rest_props($$props,["$$slots","$$events","$$legacy","class","children"]);var div=root$1d();attribute_effect(div,$0=>({class:$0,...restProps}),[()=>cn$1("flex items-center [&>*:first-child]:roun\
ded-r-none [&>*:last-child]:rounded-l-none [&>*:not(:first-child):not(:last-child)]:rounded-none",$$props.class)]);var node2=child(div);snippet(node2,()=>$$props.children),reset(div),append($$anchor,div),pop()}var root$1c=from_html("<div></div>");function Button_group_separator($$anchor,$$props){push$1($$props,!0);let restProps=rest_props($$props,["$$slots","$$events","$$legacy"]);var div=root$1c();attribute_effect(div,$0=>({class:$0,...restProps}),[()=>cn$1("shrink-0 self-stretch bg-border","w-\
px")]),append($$anchor,div),pop()}var root_2$T=from_html('from <span class="font-semibold"> </span>',1),root_1$B=from_html('Allow use of <span class="font-semibold"> </span> <!> ?',1),root_5$n=from_html("<!> <!> <!>",1),root_10$9=from_html("Always allow <pre> </pre> tool",1),root_9$h=from_html("<!> <!>",1),root_4$v=from_html("<!> <!>",1),root_3$K=from_html("<!> <!>",1);function ChatMessageActionCardPermissionRequest($$anchor,$$props){push$1($$props,!0),ChatMessageActionCard($$anchor,{get icon(){
return Shield_question},message:$$anchor2=>{next$1();var fragment_1=root_1$B(),span=sibling(first_child(fragment_1)),text2=child(span,!0);reset(span);var node2=sibling(span,2);{var consequent=$$anchor3=>{var fragment_2=root_2$T(),span_1=sibling(first_child(fragment_2)),text_1=child(span_1,!0);reset(span_1),template_effect(()=>set_text(text_1,$$props.serverLabel)),append($$anchor3,fragment_2)};if_block(node2,$$render=>{$$props.serverLabel&&$$render(consequent)})}next$1(),template_effect(()=>set_text(
text2,$$props.toolName)),append($$anchor2,fragment_1)},actions:$$anchor2=>{var fragment_3=root_3$K(),node_1=first_child(fragment_3);component(node_1,()=>Root$4,($$anchor3,DropdownMenu_Root)=>{DropdownMenu_Root($$anchor3,{children:($$anchor4,$$slotProps)=>{var fragment_4=root_4$v(),node_2=first_child(fragment_4);component(node_2,()=>Button_group_root,($$anchor5,ButtonGroup_Root)=>{ButtonGroup_Root($$anchor5,{class:"overflow-hidden rounded-md bg-foreground text-white shadow-sm dark:bg-secondary da\
rk:text-foreground",children:($$anchor6,$$slotProps2)=>{var fragment_5=root_5$n(),node_3=first_child(fragment_5);Button(node_3,{class:"rounded-none! shadow-none!",size:"sm",onclick:()=>$$props.onDecision(ToolPermissionDecision.ONCE),children:($$anchor7,$$slotProps3)=>{next$1();var text_2=text$8("Allow once");append($$anchor7,text_2)},$$slots:{default:!0}});var node_4=sibling(node_3,2);component(node_4,()=>Button_group_separator,($$anchor7,ButtonGroup_Separator)=>{ButtonGroup_Separator($$anchor7,
{})});var node_5=sibling(node_4,2);component(node_5,()=>Dropdown_menu_trigger,($$anchor7,DropdownMenu_Trigger)=>{DropdownMenu_Trigger($$anchor7,{children:($$anchor8,$$slotProps3)=>{Button($$anchor8,{size:"sm",class:"rounded-none! !ps-2 shadow-none!",children:($$anchor9,$$slotProps4)=>{Chevron_down($$anchor9,{class:"h-3.5 w-3.5"})},$$slots:{default:!0}})},$$slots:{default:!0}})}),append($$anchor6,fragment_5)},$$slots:{default:!0}})});var node_6=sibling(node_2,2);component(node_6,()=>Dropdown_menu_content,
($$anchor5,DropdownMenu_Content)=>{DropdownMenu_Content($$anchor5,{align:"start",class:"min-w-[8rem]",children:($$anchor6,$$slotProps2)=>{var fragment_8=root_9$h(),node_7=first_child(fragment_8);component(node_7,()=>Dropdown_menu_item,($$anchor7,DropdownMenu_Item)=>{DropdownMenu_Item($$anchor7,{onclick:()=>$$props.onDecision(ToolPermissionDecision.ALWAYS),children:($$anchor8,$$slotProps3)=>{next$1();var fragment_9=root_10$9(),pre=sibling(first_child(fragment_9)),text_3=child(pre,!0);reset(pre),next$1(),
template_effect(()=>set_text(text_3,$$props.toolName)),append($$anchor8,fragment_9)},$$slots:{default:!0}})});var node_8=sibling(node_7,2);{var consequent_1=$$anchor7=>{var fragment_10=comment$2(),node_9=first_child(fragment_10);component(node_9,()=>Dropdown_menu_item,($$anchor8,DropdownMenu_Item_1)=>{DropdownMenu_Item_1($$anchor8,{onclick:()=>$$props.onDecision(ToolPermissionDecision.ALWAYS_SERVER),children:($$anchor9,$$slotProps3)=>{next$1();var text_4=text$8();template_effect(()=>set_text(text_4,
`Always allow all tools from ${$$props.serverLabel??""}`)),append($$anchor9,text_4)},$$slots:{default:!0}})}),append($$anchor7,fragment_10)},alternate=$$anchor7=>{const source2=user_derived(()=>toolsStore.getToolSource($$props.toolName)),providerName=user_derived(()=>get$3(source2)===ToolSource.BUILTIN?TOOL_SERVER_LABELS[ToolSource.BUILTIN]:get$3(source2)===ToolSource.CUSTOM?TOOL_SERVER_LABELS[ToolSource.CUSTOM]:"MCP Tools");var fragment_12=comment$2(),node_10=first_child(fragment_12);component(
node_10,()=>Dropdown_menu_item,($$anchor8,DropdownMenu_Item_2)=>{DropdownMenu_Item_2($$anchor8,{onclick:()=>$$props.onDecision(ToolPermissionDecision.ALWAYS_SERVER),children:($$anchor9,$$slotProps3)=>{next$1();var text_5=text$8();template_effect(()=>set_text(text_5,`Approve all tools from ${get$3(providerName)??""}`)),append($$anchor9,text_5)},$$slots:{default:!0}})}),append($$anchor7,fragment_12)};if_block(node_8,$$render=>{$$props.serverLabel?$$render(consequent_1):$$render(alternate,-1)})}append(
$$anchor6,fragment_8)},$$slots:{default:!0}})}),append($$anchor4,fragment_4)},$$slots:{default:!0}})});var node_11=sibling(node_1,2);Button(node_11,{variant:"destructive",size:"sm",class:"text-destructive hover:text-destructive",onclick:()=>$$props.onDecision(ToolPermissionDecision.DENY),children:($$anchor3,$$slotProps)=>{next$1();var text_6=text$8("Deny");append($$anchor3,text_6)},$$slots:{default:!0}}),append($$anchor2,fragment_3)}}),pop()}var root$1b=from_html('<div class="my-2 rounded-lg bor\
der border-border bg-card p-3"><div class="mb-3 flex items-center gap-2 text-sm"><!> <span><!></span></div> <div class="flex flex-wrap items-center gap-2"><!></div></div>');function ChatMessageActionCard($$anchor,$$props){var div=root$1b(),div_1=child(div),node2=child(div_1);component(node2,()=>$$props.icon,($$anchor2,IconComponent_1)=>{IconComponent_1($$anchor2,{class:"h-4 w-4 shrink-0 text-muted-foreground"})});var span=sibling(node2,2),node_1=child(span);snippet(node_1,()=>$$props.message),reset(
span),reset(div_1);var div_2=sibling(div_1,2),node_2=child(div_2);snippet(node_2,()=>$$props.actions),reset(div_2),reset(div),append($$anchor,div)}var root_2$S=from_html("<!> <!>",1);function ChatMessageActionCardContinueRequest($$anchor,$$props){push$1($$props,!0),ChatMessageActionCard($$anchor,{get icon(){return Rotate_cw},message:$$anchor2=>{next$1();var text2=text$8("Agentic turn limit reached. Continue?");append($$anchor2,text2)},actions:$$anchor2=>{var fragment_1=root_2$S(),node2=first_child(
fragment_1);Button(node2,{size:"sm",onclick:()=>$$props.onDecision(!0),children:($$anchor3,$$slotProps)=>{next$1();var text_1=text$8("Continue");append($$anchor3,text_1)},$$slots:{default:!0}});var node_1=sibling(node2,2);Button(node_1,{variant:"destructive",size:"sm",class:"text-destructive hover:text-destructive",onclick:()=>$$props.onDecision(!1),children:($$anchor3,$$slotProps)=>{next$1();var text_2=text$8("Stop");append($$anchor3,text_2)},$$slots:{default:!0}}),append($$anchor2,fragment_1)}}),
pop()}var root_6$o=from_html('<div class="flex items-center gap-2"><span class="text-xs text-muted-foreground">Show raw output</span> <!></div>'),root_7$m=from_html('<div class="flex flex-col gap-4 py-2"><div class="flex flex-col gap-2"><!> <!></div> <div class="flex items-center gap-2"><!> <!></div></div>'),root$1a=from_html('<div><div><!> <div class="pointer-events-auto inset-0 flex items-center gap-1 opacity-100 transition-all duration-150"><!> <!> <!> <!> <!> <!></div></div> <!></div> <!> <!\
>',1);function ChatMessageActionIcons($$anchor,$$props){push$1($$props,!0);let siblingInfo=prop($$props,"siblingInfo",3,null),showDeleteDialog=prop($$props,"showDeleteDialog",7),showRawOutputSwitch=prop($$props,"showRawOutputSwitch",3,!1),rawOutputEnabled=prop($$props,"rawOutputEnabled",3,!1),showForkDialog=state$1(!1),forkName=state$1(""),forkIncludeAttachments=state$1(!0);function handleConfirmDelete(){$$props.onConfirmDelete(),$$props.onShowDeleteDialogChange(!1)}function handleOpenForkDialog(){
const conv=activeConversation();set$1(forkName,`Fork of ${conv?.name??"Conversation"}`),set$1(forkIncludeAttachments,!0),set$1(showForkDialog,!0)}function handleConfirmFork(){$$props.onForkConversation?.({name:get$3(forkName).trim(),includeAttachments:get$3(forkIncludeAttachments)}),set$1(showForkDialog,!1)}var fragment=root$1a(),div=first_child(fragment),div_1=child(div),node2=child(div_1);{var consequent=$$anchor2=>{ChatMessageActionIconsBranchingControls($$anchor2,{get siblingInfo(){return siblingInfo()},
get onNavigateToSibling(){return $$props.onNavigateToSibling}})};if_block(node2,$$render=>{siblingInfo()&&siblingInfo().totalSiblings>1&&$$render(consequent)})}var div_2=sibling(node2,2),node_1=child(div_2);ActionIcon(node_1,{get icon(){return Copy},tooltip:"Copy",get onclick(){return $$props.onCopy}});var node_2=sibling(node_1,2);{var consequent_1=$$anchor2=>{ActionIcon($$anchor2,{get icon(){return Square_pen},tooltip:"Edit",get onclick(){return $$props.onEdit}})};if_block(node_2,$$render=>{$$props.
onEdit&&$$render(consequent_1)})}var node_3=sibling(node_2,2);{var consequent_2=$$anchor2=>{ActionIcon($$anchor2,{get icon(){return Refresh_cw},tooltip:"Regenerate",onclick:()=>$$props.onRegenerate()})};if_block(node_3,$$render=>{$$props.role===MessageRole.ASSISTANT&&$$props.onRegenerate&&$$render(consequent_2)})}var node_4=sibling(node_3,2);{var consequent_3=$$anchor2=>{ActionIcon($$anchor2,{get icon(){return Arrow_right},tooltip:"Continue",get onclick(){return $$props.onContinue}})};if_block(node_4,
$$render=>{$$props.role===MessageRole.ASSISTANT&&$$props.onContinue&&$$render(consequent_3)})}var node_5=sibling(node_4,2);{var consequent_4=$$anchor2=>{ActionIcon($$anchor2,{get icon(){return Git_branch},tooltip:"Fork conversation",onclick:handleOpenForkDialog})};if_block(node_5,$$render=>{$$props.onForkConversation&&$$render(consequent_4)})}var node_6=sibling(node_5,2);ActionIcon(node_6,{get icon(){return Trash_2},tooltip:"Delete",get onclick(){return $$props.onDelete}}),reset(div_2),reset(div_1);
var node_7=sibling(div_1,2);{var consequent_5=$$anchor2=>{var div_3=root_6$o(),node_8=sibling(child(div_3),2);Switch(node_8,{get checked(){return rawOutputEnabled()},onCheckedChange:checked=>$$props.onRawOutputToggle?.(checked)}),reset(div_3),append($$anchor2,div_3)};if_block(node_7,$$render=>{showRawOutputSwitch()&&$$render(consequent_5)})}reset(div);var node_9=sibling(div,2);{let $0=user_derived(()=>$$props.deletionInfo&&$$props.deletionInfo.totalCount>1?`This will delete ${$$props.deletionInfo.
totalCount} messages including: ${$$props.deletionInfo.userMessages} user message${$$props.deletionInfo.userMessages>1?"s":""} and ${$$props.deletionInfo.assistantMessages} assistant response${$$props.deletionInfo.assistantMessages>1?"s":""}. All messages in this branch and their responses will be permanently removed. This action cannot be undone.`:"Are you sure you want to delete this message? This action cannot be undone."),$1=user_derived(()=>$$props.deletionInfo&&$$props.deletionInfo.totalCount>
1?`Delete ${$$props.deletionInfo.totalCount} Messages`:"Delete");DialogConfirmation(node_9,{title:"Delete Message",get description(){return get$3($0)},get confirmText(){return get$3($1)},cancelText:"Cancel",variant:"destructive",get icon(){return Trash_2},onConfirm:handleConfirmDelete,onCancel:()=>$$props.onShowDeleteDialogChange(!1),get open(){return showDeleteDialog()},set open($$value){showDeleteDialog($$value)}})}var node_10=sibling(node_9,2);DialogConfirmation(node_10,{title:"Fork Conversat\
ion",description:"Create a new conversation branching from this message.",confirmText:"Fork",cancelText:"Cancel",get icon(){return Git_branch},onConfirm:handleConfirmFork,onCancel:()=>set$1(showForkDialog,!1),get open(){return get$3(showForkDialog)},set open($$value){set$1(showForkDialog,$$value,!0)},children:($$anchor2,$$slotProps)=>{var div_4=root_7$m(),div_5=child(div_4),node_11=child(div_5);Label(node_11,{for:"fork-name",children:($$anchor3,$$slotProps2)=>{next$1();var text2=text$8("Title");
append($$anchor3,text2)},$$slots:{default:!0}});var node_12=sibling(node_11,2);Input(node_12,{id:"fork-name",class:"text-foreground",placeholder:"Enter fork name",type:"text",get value(){return get$3(forkName)},set value($$value){set$1(forkName,$$value,!0)}}),reset(div_5);var div_6=sibling(div_5,2),node_13=child(div_6);Checkbox(node_13,{id:"fork-attachments",get checked(){return get$3(forkIncludeAttachments)},onCheckedChange:checked=>{set$1(forkIncludeAttachments,checked===!0)}});var node_14=sibling(
node_13,2);Label(node_14,{for:"fork-attachments",class:"cursor-pointer text-sm font-normal",children:($$anchor3,$$slotProps2)=>{next$1();var text_1=text$8("Include all attachments");append($$anchor3,text_1)},$$slots:{default:!0}}),reset(div_6),reset(div_4),append($$anchor2,div_4)},$$slots:{default:!0}}),template_effect(()=>{set_class(div,1,`relative ${$$props.justify==="start"?"mt-2":""} flex h-6 items-center justify-between`),set_class(div_1,1,`${$$props.actionsPosition==="left"?"left-0":"right\
-0"} flex items-center gap-2 opacity-100 transition-opacity`)}),append($$anchor,fragment),pop()}var root_1$A=from_html('<div role="navigation"><!> <span class="px-1 font-mono text-xs"> </span> <!></div>');function ChatMessageActionIconsBranchingControls($$anchor,$$props){push$1($$props,!0);let className=prop($$props,"class",3,""),hasPrevious=user_derived(()=>$$props.siblingInfo&&$$props.siblingInfo.currentIndex>0),hasNext=user_derived(()=>$$props.siblingInfo&&$$props.siblingInfo.currentIndex<$$props.
siblingInfo.totalSiblings-1),nextSiblingId=user_derived(()=>get$3(hasNext)?$$props.siblingInfo.siblingIds[$$props.siblingInfo.currentIndex+1]:null),previousSiblingId=user_derived(()=>get$3(hasPrevious)?$$props.siblingInfo.siblingIds[$$props.siblingInfo.currentIndex-1]:null);var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{var div=root_1$A(),node_1=child(div);{let $0=user_derived(()=>!get$3(hasPrevious)),$1=user_derived(()=>get$3(hasPrevious)?"":"!cursor-not-allowe\
d opacity-30");ActionIcon(node_1,{get icon(){return Chevron_left},tooltip:"Previous version",get disabled(){return get$3($0)},get class(){return`h-5 w-5 p-0 ${get$3($1)??""}`},onclick:()=>$$props.onNavigateToSibling?.(get$3(previousSiblingId))})}var span=sibling(node_1,2),text2=child(span);reset(span);var node_2=sibling(span,2);{let $0=user_derived(()=>!get$3(hasNext)),$1=user_derived(()=>get$3(hasNext)?"":"opacity-30");ActionIcon(node_2,{get icon(){return Chevron_right},tooltip:"Next version",get disabled(){
return get$3($0)},get class(){return`h-5 w-5 p-0 ${get$3($1)??""}`},onclick:()=>$$props.onNavigateToSibling?.(get$3(nextSiblingId))})}reset(div),template_effect(()=>{set_attribute(div,"aria-label",`Message version ${$$props.siblingInfo.currentIndex+1} of ${$$props.siblingInfo.totalSiblings??""}`),set_class(div,1,`flex items-center gap-1 text-xs text-muted-foreground ${className()??""}`),set_text(text2,`${$$props.siblingInfo.currentIndex+1}/${$$props.siblingInfo.totalSiblings??""}`)}),append($$anchor2,
div)};if_block(node2,$$render=>{$$props.siblingInfo&&$$props.siblingInfo.totalSiblings>1&&$$render(consequent)})}append($$anchor,fragment),pop()}var root_3$J=from_html('<button type="button"><!> <span class="sr-only">Reading</span></button>'),root_4$u=from_html("<p>Reading (prompt processing)</p>"),root_2$R=from_html("<!> <!>",1),root_6$n=from_html('<button type="button"><!> <span class="sr-only">Generation</span></button>'),root_7$l=from_html("<p> </p>"),root_5$m=from_html("<!> <!>",1),root_10$8=from_html(
'<button type="button"><!> <span class="sr-only">Tools</span></button>'),root_11$a=from_html("<p>Tool calls</p>"),root_9$g=from_html("<!> <!>",1),root_14$3=from_html('<button type="button"><!> <span class="sr-only">Summary</span></button>'),root_15$7=from_html("<p>Agentic summary</p>"),root_13$a=from_html("<!> <!>",1),root_8$n=from_html("<!> <!>",1),root_16$2=from_html("<!> <!> <!>",1),root_17$5=from_html("<!> <!> <!>",1),root_18$4=from_html("<!> <!> <!>",1),root_19$6=from_html("<!> <!> <!>",1),
root$19=from_html('<div class="inline-flex items-center text-xs text-muted-foreground"><div class="inline-flex items-center rounded-sm bg-muted-foreground/15 p-0.5"><!> <!> <!></div> <div class="flex items-center gap-1 px-2"><!></div></div>');function ChatMessageStatistics($$anchor,$$props){push$1($$props,!0);let isLive=prop($$props,"isLive",3,!1),isProcessingPrompt=prop($$props,"isProcessingPrompt",3,!1),initialView=prop($$props,"initialView",19,()=>ChatMessageStatsView.GENERATION),hideSummary=prop(
$$props,"hideSummary",3,!1),activeView=user_derived(initialView),hasAutoSwitchedToGeneration=state$1(!1);user_effect(()=>{$$props.onActiveViewChange?.(get$3(activeView))}),user_effect(()=>{isLive()&&(!get$3(hasAutoSwitchedToGeneration)&&!isProcessingPrompt()&&$$props.predictedTokens&&$$props.predictedTokens>0?(set$1(activeView,ChatMessageStatsView.GENERATION),set$1(hasAutoSwitchedToGeneration,!0)):get$3(hasAutoSwitchedToGeneration)||set$1(activeView,ChatMessageStatsView.READING))});let hasGenerationStats=user_derived(
()=>$$props.predictedTokens!==void 0&&$$props.predictedTokens>0&&$$props.predictedMs!==void 0&&$$props.predictedMs>0),tokensPerSecond=user_derived(()=>get$3(hasGenerationStats)?$$props.predictedTokens/$$props.predictedMs*MS_PER_SECOND:0),formattedTime=user_derived(()=>$$props.predictedMs!==void 0?formatPerformanceTime($$props.predictedMs):DEFAULT_PERFORMANCE_TIME),promptTokensPerSecond=user_derived(()=>$$props.promptTokens!==void 0&&$$props.promptMs!==void 0&&$$props.promptMs>0?$$props.promptTokens/
$$props.promptMs*MS_PER_SECOND:void 0),formattedPromptTime=user_derived(()=>$$props.promptMs!==void 0?formatPerformanceTime($$props.promptMs):void 0),hasPromptStats=user_derived(()=>$$props.promptTokens!==void 0&&$$props.promptMs!==void 0&&get$3(promptTokensPerSecond)!==void 0&&get$3(formattedPromptTime)!==void 0),isGenerationDisabled=user_derived(()=>isLive()&&!get$3(hasGenerationStats)),hasAgenticStats=user_derived(()=>$$props.agenticTimings!==void 0&&$$props.agenticTimings.toolCallsCount>0),agenticToolsPerSecond=user_derived(
()=>get$3(hasAgenticStats)&&$$props.agenticTimings.toolsMs>0?$$props.agenticTimings.toolCallsCount/$$props.agenticTimings.toolsMs*MS_PER_SECOND:0),formattedAgenticToolsTime=user_derived(()=>get$3(hasAgenticStats)?formatPerformanceTime($$props.agenticTimings.toolsMs):DEFAULT_PERFORMANCE_TIME),agenticTotalTimeMs=user_derived(()=>get$3(hasAgenticStats)?$$props.agenticTimings.toolsMs+$$props.agenticTimings.llm.predicted_ms+$$props.agenticTimings.llm.prompt_ms:0),formattedAgenticTotalTime=user_derived(
()=>formatPerformanceTime(get$3(agenticTotalTimeMs)));var div=root$19(),div_1=child(div),node2=child(div_1);{var consequent=$$anchor2=>{var fragment=comment$2(),node_1=first_child(fragment);component(node_1,()=>Root$5,($$anchor3,Tooltip_Root)=>{Tooltip_Root($$anchor3,{children:($$anchor4,$$slotProps)=>{var fragment_1=root_2$R(),node_2=first_child(fragment_1);component(node_2,()=>Tooltip_trigger,($$anchor5,Tooltip_Trigger)=>{Tooltip_Trigger($$anchor5,{children:($$anchor6,$$slotProps2)=>{var button=root_3$J(),
node_3=child(button);Book_open_text(node_3,{class:"h-3 w-3"}),next$1(2),reset(button),template_effect(()=>set_class(button,1,`inline-flex h-5 w-5 items-center justify-center rounded-sm transition-colors ${get$3(activeView)===ChatMessageStatsView.READING?"bg-background text-foreground shadow-sm":"hover:text-foreground"}`)),delegated("click",button,()=>set$1(activeView,ChatMessageStatsView.READING)),append($$anchor6,button)},$$slots:{default:!0}})});var node_4=sibling(node_2,2);component(node_4,()=>Tooltip_content,
($$anchor5,Tooltip_Content)=>{Tooltip_Content($$anchor5,{children:($$anchor6,$$slotProps2)=>{var p2=root_4$u();append($$anchor6,p2)},$$slots:{default:!0}})}),append($$anchor4,fragment_1)},$$slots:{default:!0}})}),append($$anchor2,fragment)};if_block(node2,$$render=>{(get$3(hasPromptStats)||isLive())&&$$render(consequent)})}var node_5=sibling(node2,2);component(node_5,()=>Root$5,($$anchor2,Tooltip_Root_1)=>{Tooltip_Root_1($$anchor2,{children:($$anchor3,$$slotProps)=>{var fragment_2=root_5$m(),node_6=first_child(
fragment_2);component(node_6,()=>Tooltip_trigger,($$anchor4,Tooltip_Trigger_1)=>{Tooltip_Trigger_1($$anchor4,{children:($$anchor5,$$slotProps2)=>{var button_1=root_6$n(),node_7=child(button_1);Sparkles(node_7,{class:"h-3 w-3"}),next$1(2),reset(button_1),template_effect(()=>{set_class(button_1,1,`inline-flex h-5 w-5 items-center justify-center rounded-sm transition-colors ${get$3(activeView)===ChatMessageStatsView.GENERATION?"bg-background text-foreground shadow-sm":get$3(isGenerationDisabled)?"c\
ursor-not-allowed opacity-40":"hover:text-foreground"}`),button_1.disabled=get$3(isGenerationDisabled)}),delegated("click",button_1,()=>!get$3(isGenerationDisabled)&&set$1(activeView,ChatMessageStatsView.GENERATION)),append($$anchor5,button_1)},$$slots:{default:!0}})});var node_8=sibling(node_6,2);component(node_8,()=>Tooltip_content,($$anchor4,Tooltip_Content_1)=>{Tooltip_Content_1($$anchor4,{children:($$anchor5,$$slotProps2)=>{var p_1=root_7$l(),text2=child(p_1,!0);reset(p_1),template_effect(()=>set_text(
text2,get$3(isGenerationDisabled)?"Generation (waiting for tokens...)":"Generation (token output)")),append($$anchor5,p_1)},$$slots:{default:!0}})}),append($$anchor3,fragment_2)},$$slots:{default:!0}})});var node_9=sibling(node_5,2);{var consequent_2=$$anchor2=>{var fragment_3=root_8$n(),node_10=first_child(fragment_3);component(node_10,()=>Root$5,($$anchor3,Tooltip_Root_2)=>{Tooltip_Root_2($$anchor3,{children:($$anchor4,$$slotProps)=>{var fragment_4=root_9$g(),node_11=first_child(fragment_4);component(
node_11,()=>Tooltip_trigger,($$anchor5,Tooltip_Trigger_2)=>{Tooltip_Trigger_2($$anchor5,{children:($$anchor6,$$slotProps2)=>{var button_2=root_10$8(),node_12=child(button_2);Wrench(node_12,{class:"h-3 w-3"}),next$1(2),reset(button_2),template_effect(()=>set_class(button_2,1,`inline-flex h-5 w-5 items-center justify-center rounded-sm transition-colors ${get$3(activeView)===ChatMessageStatsView.TOOLS?"bg-background text-foreground shadow-sm":"hover:text-foreground"}`)),delegated("click",button_2,()=>set$1(
activeView,ChatMessageStatsView.TOOLS)),append($$anchor6,button_2)},$$slots:{default:!0}})});var node_13=sibling(node_11,2);component(node_13,()=>Tooltip_content,($$anchor5,Tooltip_Content_2)=>{Tooltip_Content_2($$anchor5,{children:($$anchor6,$$slotProps2)=>{var p_2=root_11$a();append($$anchor6,p_2)},$$slots:{default:!0}})}),append($$anchor4,fragment_4)},$$slots:{default:!0}})});var node_14=sibling(node_10,2);{var consequent_1=$$anchor3=>{var fragment_5=comment$2(),node_15=first_child(fragment_5);
component(node_15,()=>Root$5,($$anchor4,Tooltip_Root_3)=>{Tooltip_Root_3($$anchor4,{children:($$anchor5,$$slotProps)=>{var fragment_6=root_13$a(),node_16=first_child(fragment_6);component(node_16,()=>Tooltip_trigger,($$anchor6,Tooltip_Trigger_3)=>{Tooltip_Trigger_3($$anchor6,{children:($$anchor7,$$slotProps2)=>{var button_3=root_14$3(),node_17=child(button_3);Layers(node_17,{class:"h-3 w-3"}),next$1(2),reset(button_3),template_effect(()=>set_class(button_3,1,`inline-flex h-5 w-5 items-center jus\
tify-center rounded-sm transition-colors ${get$3(activeView)===ChatMessageStatsView.SUMMARY?"bg-background text-foreground shadow-sm":"hover:text-foreground"}`)),delegated("click",button_3,()=>set$1(activeView,ChatMessageStatsView.SUMMARY)),append($$anchor7,button_3)},$$slots:{default:!0}})});var node_18=sibling(node_16,2);component(node_18,()=>Tooltip_content,($$anchor6,Tooltip_Content_3)=>{Tooltip_Content_3($$anchor6,{children:($$anchor7,$$slotProps2)=>{var p_3=root_15$7();append($$anchor7,p_3)},
$$slots:{default:!0}})}),append($$anchor5,fragment_6)},$$slots:{default:!0}})}),append($$anchor3,fragment_5)};if_block(node_14,$$render=>{hideSummary()||$$render(consequent_1)})}append($$anchor2,fragment_3)};if_block(node_9,$$render=>{get$3(hasAgenticStats)&&$$render(consequent_2)})}reset(div_1);var div_2=sibling(div_1,2),node_19=child(div_2);{var consequent_3=$$anchor2=>{var fragment_7=root_16$2(),node_20=first_child(fragment_7);{let $0=user_derived(()=>$$props.predictedTokens?.toLocaleString());
ChatMessageStatisticsBadge(node_20,{class:"bg-transparent",get icon(){return Whole_word},get value(){return`${get$3($0)??""} tokens`},tooltipLabel:"Generated tokens"})}var node_21=sibling(node_20,2);ChatMessageStatisticsBadge(node_21,{class:"bg-transparent",get icon(){return Clock},get value(){return get$3(formattedTime)},tooltipLabel:"Generation time"});var node_22=sibling(node_21,2);{let $0=user_derived(()=>get$3(tokensPerSecond).toFixed(2));ChatMessageStatisticsBadge(node_22,{class:"bg-transp\
arent",get icon(){return Gauge},get value(){return`${get$3($0)??""} t/s`},tooltipLabel:"Generation speed"})}append($$anchor2,fragment_7)},consequent_4=$$anchor2=>{var fragment_8=root_17$5(),node_23=first_child(fragment_8);ChatMessageStatisticsBadge(node_23,{class:"bg-transparent",get icon(){return Wrench},get value(){return`${$$props.agenticTimings.toolCallsCount??""} calls`},tooltipLabel:"Tool calls executed"});var node_24=sibling(node_23,2);ChatMessageStatisticsBadge(node_24,{class:"bg-transpa\
rent",get icon(){return Clock},get value(){return get$3(formattedAgenticToolsTime)},tooltipLabel:"Tool execution time"});var node_25=sibling(node_24,2);{let $0=user_derived(()=>get$3(agenticToolsPerSecond).toFixed(2));ChatMessageStatisticsBadge(node_25,{class:"bg-transparent",get icon(){return Gauge},get value(){return`${get$3($0)??""} calls/s`},tooltipLabel:"Tool execution rate"})}append($$anchor2,fragment_8)},consequent_5=$$anchor2=>{var fragment_9=root_18$4(),node_26=first_child(fragment_9);ChatMessageStatisticsBadge(
node_26,{class:"bg-transparent",get icon(){return Layers},get value(){return`${$$props.agenticTimings.turns??""} turns`},tooltipLabel:"Agentic turns (LLM calls)"});var node_27=sibling(node_26,2);{let $0=user_derived(()=>$$props.agenticTimings.llm.predicted_n.toLocaleString());ChatMessageStatisticsBadge(node_27,{class:"bg-transparent",get icon(){return Whole_word},get value(){return`${get$3($0)??""} tokens`},tooltipLabel:"Total tokens generated"})}var node_28=sibling(node_27,2);ChatMessageStatisticsBadge(
node_28,{class:"bg-transparent",get icon(){return Clock},get value(){return get$3(formattedAgenticTotalTime)},tooltipLabel:"Total time (LLM + tools)"}),append($$anchor2,fragment_9)},consequent_6=$$anchor2=>{var fragment_10=root_19$6(),node_29=first_child(fragment_10);ChatMessageStatisticsBadge(node_29,{class:"bg-transparent",get icon(){return Whole_word},get value(){return`${$$props.promptTokens??""} tokens`},tooltipLabel:"Prompt tokens"});var node_30=sibling(node_29,2);{let $0=user_derived(()=>get$3(
formattedPromptTime)??"0s");ChatMessageStatisticsBadge(node_30,{class:"bg-transparent",get icon(){return Clock},get value(){return get$3($0)},tooltipLabel:"Prompt processing time"})}var node_31=sibling(node_30,2);{let $0=user_derived(()=>get$3(promptTokensPerSecond).toFixed(2));ChatMessageStatisticsBadge(node_31,{class:"bg-transparent",get icon(){return Gauge},get value(){return`${get$3($0)??""} tokens/s`},tooltipLabel:"Prompt processing speed"})}append($$anchor2,fragment_10)};if_block(node_19,$$render=>{
get$3(activeView)===ChatMessageStatsView.GENERATION&&get$3(hasGenerationStats)?$$render(consequent_3):get$3(activeView)===ChatMessageStatsView.TOOLS&&get$3(hasAgenticStats)?$$render(consequent_4,1):get$3(activeView)===ChatMessageStatsView.SUMMARY&&get$3(hasAgenticStats)?$$render(consequent_5,2):get$3(hasPromptStats)&&$$render(consequent_6,3)})}reset(div_2),reset(div),append($$anchor,div),pop()}delegate(["click"]);var root_6$m=from_html("<p> </p>"),root_2$Q=from_html("<!> <!>",1);function ChatMessageStatisticsBadge($$anchor,$$props){
push$1($$props,!0);let className=prop($$props,"class",3,"");function handleClick(){copyToClipboard(String($$props.value))}var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);component(node_1,()=>Root$5,($$anchor3,Tooltip_Root)=>{Tooltip_Root($$anchor3,{children:($$anchor4,$$slotProps)=>{var fragment_2=root_2$Q(),node_2=first_child(fragment_2);component(node_2,()=>Tooltip_trigger,($$anchor5,Tooltip_Trigger)=>{Tooltip_Trigger(
$$anchor5,{children:($$anchor6,$$slotProps2)=>{BadgeInfo($$anchor6,{get class(){return className()},onclick:handleClick,icon:$$anchor7=>{var fragment_4=comment$2(),node_3=first_child(fragment_4);component(node_3,()=>$$props.icon,($$anchor8,IconComponent_1)=>{IconComponent_1($$anchor8,{class:"h-3 w-3"})}),append($$anchor7,fragment_4)},children:($$anchor7,$$slotProps3)=>{next$1();var text2=text$8();template_effect(()=>set_text(text2,$$props.value)),append($$anchor7,text2)},$$slots:{icon:!0,default:!0}})},
$$slots:{default:!0}})});var node_4=sibling(node_2,2);component(node_4,()=>Tooltip_content,($$anchor5,Tooltip_Content)=>{Tooltip_Content($$anchor5,{children:($$anchor6,$$slotProps2)=>{var p2=root_6$m(),text_1=child(p2,!0);reset(p2),template_effect(()=>set_text(text_1,$$props.tooltipLabel)),append($$anchor6,p2)},$$slots:{default:!0}})}),append($$anchor4,fragment_2)},$$slots:{default:!0}})}),append($$anchor2,fragment_1)},alternate=$$anchor2=>{BadgeInfo($$anchor2,{get class(){return className()},onclick:handleClick,
icon:$$anchor3=>{var fragment_7=comment$2(),node_5=first_child(fragment_7);component(node_5,()=>$$props.icon,($$anchor4,IconComponent_2)=>{IconComponent_2($$anchor4,{class:"h-3 w-3"})}),append($$anchor3,fragment_7)},children:($$anchor3,$$slotProps)=>{next$1();var text_2=text$8();template_effect(()=>set_text(text_2,$$props.value)),append($$anchor3,text_2)},$$slots:{icon:!0,default:!0}})};if_block(node2,$$render=>{$$props.tooltipLabel?$$render(consequent):$$render(alternate,-1)})}append($$anchor,fragment),
pop()}var root_3$I=from_html('<div class="max-w-[80%]"><!></div>'),root_2$P=from_html("<!> <!>",1),root$18=from_html('<div aria-label="MCP Prompt message with actions" role="group"><!></div>');function ChatMessageMcpPrompt($$anchor,$$props){push$1($$props,!0);let className=prop($$props,"class",3,""),siblingInfo=prop($$props,"siblingInfo",3,null);const editCtx=getMessageEditContext();var div=root$18(),node2=child(div);{var consequent=$$anchor2=>{ChatMessageEditForm($$anchor2,{})},alternate=$$anchor2=>{
var fragment_1=root_2$P(),node_1=first_child(fragment_1);ChatMessageMcpPromptContent(node_1,{get prompt(){return $$props.mcpPrompt},get variant(){return McpPromptVariant.MESSAGE},class:"w-full max-w-[80%]"});var node_2=sibling(node_1,2);{var consequent_1=$$anchor3=>{var div_1=root_3$I(),node_3=child(div_1);ChatMessageActionIcons(node_3,{actionsPosition:"right",get deletionInfo(){return $$props.deletionInfo},justify:"end",get onConfirmDelete(){return $$props.onConfirmDelete},get onCopy(){return $$props.
onCopy},get onDelete(){return $$props.onDelete},get onEdit(){return $$props.onEdit},get onNavigateToSibling(){return $$props.onNavigateToSibling},get onShowDeleteDialogChange(){return $$props.onShowDeleteDialogChange},get siblingInfo(){return siblingInfo()},get showDeleteDialog(){return $$props.showDeleteDialog},get role(){return MessageRole.USER}}),reset(div_1),append($$anchor3,div_1)};if_block(node_2,$$render=>{$$props.message.timestamp&&$$render(consequent_1)})}append($$anchor2,fragment_1)};if_block(
node2,$$render=>{editCtx.isEditing?$$render(consequent):$$render(alternate,-1)})}reset(div),template_effect(()=>set_class(div,1,`group flex flex-col items-end gap-3 md:gap-2 ${className()??""}`)),append($$anchor,div),pop()}var root$17=from_html("<div><!></div>");function Card($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class","children"]);var div=root$17();attribute_effect(div,$0=>({"data-slot":"ca\
rd",class:$0,...restProps}),[()=>cn$1("flex flex-col gap-6 rounded-xl bg-card py-6 text-card-foreground shadow-sm",BOX_BORDER,$$props.class)]);var node2=child(div);snippet(node2,()=>$$props.children??noop$3),reset(div),bind_this(div,$$value=>ref2($$value),()=>ref2()),append($$anchor,div),pop()}var root_3$H=from_html('<img alt="" class="h-3.5 w-3.5 shrink-0 rounded-sm"/>'),root_4$t=from_html("<span> </span>"),root_1$z=from_html("<!> <!>",1),root_8$m=from_html("<span> </span>"),root_9$f=from_html(
'<span class="max-w-xs break-all"> </span>'),root_7$k=from_html("<!> <!>",1),root_5$l=from_html('<div class="flex flex-wrap justify-end gap-1"></div>'),root_11$9=from_html("<div><span> </span></div>"),root_13$9=from_html('<div><div class="space-y-2"><div class="h-3 w-3/4 animate-pulse rounded bg-foreground/20"></div> <div class="h-3 w-full animate-pulse rounded bg-foreground/20"></div> <div class="h-3 w-5/6 animate-pulse rounded bg-foreground/20"></div></div></div>'),root_17$4=from_html("<span> \
</span>"),root_18$3=from_html("<span> </span>"),root_15$6=from_html("<div><span></span></div>"),root$16=from_html('<div><div class="flex items-center justify-between gap-2"><div class="inline-flex flex-wrap items-center gap-1.25 text-xs text-muted-foreground"><!> <!></div> <!></div> <!></div>');function ChatMessageMcpPromptContent($$anchor,$$props){push$1($$props,!0);let className=prop($$props,"class",3,""),variant=prop($$props,"variant",19,()=>McpPromptVariant.MESSAGE),isLoading2=prop($$props,"\
isLoading",3,!1),hoveredArgKey=state$1(null),argumentEntries=user_derived(()=>Object.entries($$props.prompt.arguments??{})),hasArguments=user_derived(()=>$$props.prompt.arguments&&Object.keys($$props.prompt.arguments).length>0),hasContent=user_derived(()=>$$props.prompt.content&&$$props.prompt.content.trim().length>0),contentParts=user_derived(()=>{if(!$$props.prompt.content||!get$3(hasArguments))return[{text:$$props.prompt.content||"",argKey:null}];const parts=[];let remaining=$$props.prompt.content;
const valueToKey=new SvelteMap;for(const[key2,value]of get$3(argumentEntries))value&&value.trim()&&valueToKey.set(value,key2);const sortedValues=[...valueToKey.keys()].sort((a,b)=>b.length-a.length);for(;remaining.length>0;){let earliestMatch=null;for(const value of sortedValues){const index2=remaining.indexOf(value);index2!==-1&&(earliestMatch===null||index2<earliestMatch.index)&&(earliestMatch={index:index2,value,key:valueToKey.get(value)})}if(earliestMatch)earliestMatch.index>0&&parts.push({text:remaining.
slice(0,earliestMatch.index),argKey:null}),parts.push({text:earliestMatch.value,argKey:earliestMatch.key}),remaining=remaining.slice(earliestMatch.index+earliestMatch.value.length);else{parts.push({text:remaining,argKey:null});break}}return parts}),showArgBadges=user_derived(()=>get$3(hasArguments)&&!isLoading2()&&!$$props.loadError),isAttachment=user_derived(()=>variant()===McpPromptVariant.ATTACHMENT),textSizeClass=user_derived(()=>get$3(isAttachment)?"text-xs":"text-md"),paddingClass=user_derived(
()=>get$3(isAttachment)?"px-3 py-2":"px-3.75 py-2.5"),maxHeightStyle=user_derived(()=>get$3(isAttachment)?"max-height: 6rem;":"max-height: var(--max-message-height);");const serverFavicon=user_derived(()=>mcpStore.getServerFavicon($$props.prompt.serverName)),serverDisplayName=user_derived(()=>mcpStore.getServerDisplayName($$props.prompt.serverName));var div=root$16(),div_1=child(div),div_2=child(div_1),node2=child(div_2);component(node2,()=>Root$5,($$anchor2,Tooltip_Root)=>{Tooltip_Root($$anchor2,
{children:($$anchor3,$$slotProps)=>{var fragment=root_1$z(),node_1=first_child(fragment);component(node_1,()=>Tooltip_trigger,($$anchor4,Tooltip_Trigger)=>{Tooltip_Trigger($$anchor4,{children:($$anchor5,$$slotProps2)=>{var fragment_1=comment$2(),node_2=first_child(fragment_1);{var consequent=$$anchor6=>{var img=root_3$H();template_effect(()=>set_attribute(img,"src",get$3(serverFavicon))),event("error",img,e=>{e.currentTarget.style.display="none"}),replay_events(img),append($$anchor6,img)};if_block(
node_2,$$render=>{get$3(serverFavicon)&&$$render(consequent)})}append($$anchor5,fragment_1)},$$slots:{default:!0}})});var node_3=sibling(node_1,2);component(node_3,()=>Tooltip_content,($$anchor4,Tooltip_Content)=>{Tooltip_Content($$anchor4,{children:($$anchor5,$$slotProps2)=>{var span=root_4$t(),text2=child(span,!0);reset(span),template_effect(()=>set_text(text2,get$3(serverDisplayName))),append($$anchor5,span)},$$slots:{default:!0}})}),append($$anchor3,fragment)},$$slots:{default:!0}})});var node_4=sibling(
node2,2);TruncatedText(node_4,{get text(){return $$props.prompt.name}}),reset(div_2);var node_5=sibling(div_2,2);{var consequent_1=$$anchor2=>{var div_3=root_5$l();each(div_3,21,()=>get$3(argumentEntries),([key2,value])=>key2,($$anchor3,$$item)=>{var $$array=user_derived(()=>to_array(get$3($$item),2));let key2=()=>get$3($$array)[0],value=()=>get$3($$array)[1];var fragment_2=comment$2(),node_6=first_child(fragment_2);component(node_6,()=>Root$5,($$anchor4,Tooltip_Root_1)=>{Tooltip_Root_1($$anchor4,
{children:($$anchor5,$$slotProps)=>{var fragment_3=root_7$k(),node_7=first_child(fragment_3);component(node_7,()=>Tooltip_trigger,($$anchor6,Tooltip_Trigger_1)=>{Tooltip_Trigger_1($$anchor6,{children:($$anchor7,$$slotProps2)=>{var span_1=root_8$m(),text_1=child(span_1,!0);reset(span_1),template_effect(()=>{set_class(span_1,1,`rounded-sm bg-purple-200/60 px-1.5 py-0.5 text-[10px] leading-none text-purple-700 transition-opacity dark:bg-purple-800/40 dark:text-purple-300 ${get$3(hoveredArgKey)&&get$3(
hoveredArgKey)!==key2()?"opacity-30":""}`),set_text(text_1,key2())}),event("mouseenter",span_1,()=>set$1(hoveredArgKey,key2(),!0)),event("mouseleave",span_1,()=>set$1(hoveredArgKey,null)),append($$anchor7,span_1)},$$slots:{default:!0}})});var node_8=sibling(node_7,2);component(node_8,()=>Tooltip_content,($$anchor6,Tooltip_Content_1)=>{Tooltip_Content_1($$anchor6,{children:($$anchor7,$$slotProps2)=>{var span_2=root_9$f(),text_2=child(span_2,!0);reset(span_2),template_effect(()=>set_text(text_2,value())),
append($$anchor7,span_2)},$$slots:{default:!0}})}),append($$anchor5,fragment_3)},$$slots:{default:!0}})}),append($$anchor3,fragment_2)}),reset(div_3),append($$anchor2,div_3)};if_block(node_5,$$render=>{get$3(showArgBadges)&&$$render(consequent_1)})}reset(div_1);var node_9=sibling(div_1,2);{var consequent_2=$$anchor2=>{Card($$anchor2,{class:"relative overflow-hidden rounded-[1.125rem] border border-destructive/50 bg-destructive/10 backdrop-blur-md",children:($$anchor3,$$slotProps)=>{var div_4=root_11$9(),
span_3=child(div_4),text_3=child(span_3,!0);reset(span_3),reset(div_4),template_effect(()=>{set_class(div_4,1,`overflow-y-auto ${get$3(paddingClass)??""}`),set_style(div_4,`${get$3(maxHeightStyle)??""} overflow-wrap: anywhere; word-break: break-word;`),set_class(span_3,1,`${get$3(textSizeClass)??""} text-destructive`),set_text(text_3,$$props.loadError)}),append($$anchor3,div_4)},$$slots:{default:!0}})},consequent_3=$$anchor2=>{Card($$anchor2,{class:"relative overflow-hidden rounded-[1.125rem] bo\
rder border-purple-200 bg-purple-500/10 px-1 py-2 backdrop-blur-md dark:border-purple-800 dark:bg-purple-500/20",children:($$anchor3,$$slotProps)=>{var div_5=root_13$9();template_effect(()=>{set_class(div_5,1,`overflow-y-auto ${get$3(paddingClass)??""}`),set_style(div_5,`${get$3(maxHeightStyle)??""} overflow-wrap: anywhere; word-break: break-word;`)}),append($$anchor3,div_5)},$$slots:{default:!0}})},consequent_5=$$anchor2=>{Card($$anchor2,{class:"relative overflow-hidden rounded-[1.125rem] borde\
r border-purple-200 bg-purple-500/10 py-0 text-foreground backdrop-blur-md dark:border-purple-800 dark:bg-purple-500/20",children:($$anchor3,$$slotProps)=>{var div_6=root_15$6(),span_4=child(div_6);each(span_4,21,()=>get$3(contentParts),index$2,($$anchor4,part)=>{var fragment_7=comment$2(),node_10=first_child(fragment_7);{var consequent_4=$$anchor5=>{var span_5=root_17$4(),text_4=child(span_5,!0);reset(span_5),template_effect(()=>{set_class(span_5,1,`rounded-sm bg-purple-300/50 px-0.5 text-purpl\
e-900 transition-opacity dark:bg-purple-700/50 dark:text-purple-100 ${get$3(hoveredArgKey)&&get$3(hoveredArgKey)!==get$3(part).argKey?"opacity-30":""}`),set_text(text_4,get$3(part).text)}),event("mouseenter",span_5,()=>set$1(hoveredArgKey,get$3(part).argKey,!0)),event("mouseleave",span_5,()=>set$1(hoveredArgKey,null)),append($$anchor5,span_5)},alternate=$$anchor5=>{var span_6=root_18$3(),text_5=child(span_6,!0);reset(span_6),template_effect(()=>{set_class(span_6,1,`transition-opacity ${get$3(hoveredArgKey)?
"opacity-30":""}`),set_text(text_5,get$3(part).text)}),append($$anchor5,span_6)};if_block(node_10,$$render=>{get$3(part).argKey?$$render(consequent_4):$$render(alternate,-1)})}append($$anchor4,fragment_7)}),reset(span_4),reset(div_6),template_effect(()=>{set_class(div_6,1,`overflow-y-auto ${get$3(paddingClass)??""}`),set_style(div_6,`${get$3(maxHeightStyle)??""} overflow-wrap: anywhere; word-break: break-word;`),set_class(span_4,1,`${get$3(textSizeClass)??""} whitespace-pre-wrap`)}),append($$anchor3,
div_6)},$$slots:{default:!0}})};if_block(node_9,$$render=>{$$props.loadError?$$render(consequent_2):isLoading2()?$$render(consequent_3,1):get$3(hasContent)&&$$render(consequent_5,2)})}reset(div),template_effect(()=>set_class(div,1,`flex flex-col gap-2 ${className()??""}`)),append($$anchor,div),pop()}function useProcessingState(){let isMonitoring=state$1(!1),lastKnownState=state$1(null),lastKnownProcessingStats=state$1(null);const processingState=user_derived(()=>get$3(isMonitoring)?activeProcessingState():
get$3(lastKnownState));user_effect(()=>{get$3(processingState)&&get$3(isMonitoring)&&set$1(lastKnownState,get$3(processingState),!0)}),user_effect(()=>{if(get$3(processingState)?.promptProgress){const{processed,total,time_ms,cache:cache2}=get$3(processingState).promptProgress,actualProcessed=processed-cache2,actualTotal=total-cache2;if(actualProcessed>0&&time_ms>0){const tokensPerSecond=actualProcessed/(time_ms/1e3);set$1(lastKnownProcessingStats,{tokensProcessed:actualProcessed,totalTokens:actualTotal,
timeMs:time_ms,tokensPerSecond},!0)}}});function getETASecs(done,total,elapsedMs){const elapsedSecs=elapsedMs/1e3;return done===0||elapsedSecs<.5?void 0:elapsedSecs*(total/done-1)}function startMonitoring(){get$3(isMonitoring)||set$1(isMonitoring,!0)}function stopMonitoring(){if(!get$3(isMonitoring))return;set$1(isMonitoring,!1),config$1().keepStatsVisible||(set$1(lastKnownState,null),set$1(lastKnownProcessingStats,null))}function getProcessingMessage(){if(!get$3(processingState))return"Processi\
ng...";switch(get$3(processingState).status){case"initializing":return"Initializing...";case"preparing":return get$3(processingState).progressPercent!==void 0?`Processing (${get$3(processingState).progressPercent}%)`:"Preparing response...";case"generating":return"";default:return"Processing..."}}function getProcessingDetails(){const stateToUse=get$3(processingState)||get$3(lastKnownState);if(!stateToUse)return[];const details=[];if(stateToUse.promptProgress){const{processed,total,time_ms,cache:cache2}=stateToUse.
promptProgress,actualProcessed=processed-cache2,actualTotal=total-cache2;if(actualProcessed<actualTotal&&actualProcessed>0){const percent=Math.round(actualProcessed/actualTotal*100),eta=getETASecs(actualProcessed,actualTotal,time_ms);if(eta!==void 0){const etaSecs=Math.ceil(eta);details.push(`Processing ${percent}% (ETA: ${etaSecs}s)`)}else details.push(`Processing ${percent}%`)}}if(typeof stateToUse.contextTotal=="number"&&stateToUse.contextUsed>=0&&stateToUse.contextTotal>0){const contextPercent=Math.
round(stateToUse.contextUsed/stateToUse.contextTotal*100);details.push(`Context: ${stateToUse.contextUsed}/${stateToUse.contextTotal} (${contextPercent}%)`)}if(stateToUse.outputTokensUsed>0)if(stateToUse.outputTokensMax<=0)details.push(`Output: ${stateToUse.outputTokensUsed}/∞`);else{const outputPercent=Math.round(stateToUse.outputTokensUsed/stateToUse.outputTokensMax*100);details.push(`Output: ${stateToUse.outputTokensUsed}/${stateToUse.outputTokensMax} (${outputPercent}%)`)}return stateToUse.
tokensPerSecond&&stateToUse.tokensPerSecond>0&&details.push(`${stateToUse.tokensPerSecond.toFixed(1)} ${STATS_UNITS.TOKENS_PER_SECOND}`),stateToUse.speculative&&details.push("Speculative decoding enabled"),details}function getTechnicalDetails(){const stateToUse=get$3(processingState)||get$3(lastKnownState);if(!stateToUse)return[];const details=[];if(typeof stateToUse.contextTotal=="number"&&stateToUse.contextUsed>=0&&stateToUse.contextTotal>0){const contextPercent=Math.round(stateToUse.contextUsed/
stateToUse.contextTotal*100);details.push(`Context: ${stateToUse.contextUsed}/${stateToUse.contextTotal} (${contextPercent}%)`)}if(stateToUse.outputTokensUsed>0)if(stateToUse.outputTokensMax<=0)details.push(`Output: ${stateToUse.outputTokensUsed}/∞`);else{const outputPercent=Math.round(stateToUse.outputTokensUsed/stateToUse.outputTokensMax*100);details.push(`Output: ${stateToUse.outputTokensUsed}/${stateToUse.outputTokensMax} (${outputPercent}%)`)}return stateToUse.tokensPerSecond&&stateToUse.
tokensPerSecond>0&&details.push(`${stateToUse.tokensPerSecond.toFixed(1)} ${STATS_UNITS.TOKENS_PER_SECOND}`),stateToUse.speculative&&details.push("Speculative decoding enabled"),details}function shouldShowDetails(){return get$3(processingState)!==null&&get$3(processingState).status!=="idle"}function getPromptProgressText(){if(!get$3(processingState)?.promptProgress)return null;const{processed,total,cache:cache2}=get$3(processingState).promptProgress,actualProcessed=processed-cache2,actualTotal=total-
cache2,percent=Math.round(actualProcessed/actualTotal*100),eta=getETASecs(actualProcessed,actualTotal,get$3(processingState).promptProgress.time_ms);if(eta!==void 0){const etaSecs=Math.ceil(eta);return`Processing ${percent}% (ETA: ${etaSecs}s)`}return`Processing ${percent}%`}function getLiveProcessingStats(){if(get$3(processingState)?.promptProgress){const{processed,total,time_ms,cache:cache2}=get$3(processingState).promptProgress,actualProcessed=processed-cache2,actualTotal=total-cache2;if(actualProcessed>
0&&time_ms>0){const tokensPerSecond=actualProcessed/(time_ms/1e3);return{tokensProcessed:actualProcessed,totalTokens:actualTotal,timeMs:time_ms,tokensPerSecond}}}return get$3(lastKnownProcessingStats)}function getLiveGenerationStats(){if(!get$3(processingState))return null;const{tokensDecoded,tokensPerSecond}=get$3(processingState);if(tokensDecoded<=0)return null;const timeMs=tokensPerSecond&&tokensPerSecond>0?tokensDecoded/tokensPerSecond*1e3:0;return{tokensGenerated:tokensDecoded,timeMs,tokensPerSecond:tokensPerSecond||
0}}return{get processingState(){return get$3(processingState)},getProcessingDetails,getTechnicalDetails,getProcessingMessage,getPromptProgressText,getLiveProcessingStats,getLiveGenerationStats,shouldShowDetails,startMonitoring,stopMonitoring}}var root_1$y=from_html('<div class="mt-6 w-full max-w-[48rem]"><div class="processing-container svelte-3902tz"><span class="processing-text svelte-3902tz"> </span></div></div>'),root_4$s=from_html('<pre class="raw-output svelte-3902tz"> </pre>'),root_6$l=from_html(
'<div class="text-sm whitespace-pre-wrap"> </div>'),root_7$j=from_html('<div class="mt-4 w-full max-w-[48rem]"><div class="processing-container svelte-3902tz"><span class="processing-text svelte-3902tz"> </span></div></div>'),root_8$l=from_html('<div class="inline-flex flex-wrap items-start gap-2 text-xs text-muted-foreground"><!> <!></div>'),root$15=from_html('<div role="group" aria-label="Assistant message with actions"><!> <!> <!> <div class="info my-6 grid gap-4 tabular-nums"><!></div> <!></\
div>');function ChatMessageAssistant($$anchor,$$props){push$1($$props,!0);let className=prop($$props,"class",3,""),isLastAssistantMessage=prop($$props,"isLastAssistantMessage",3,!1),toolMessages=prop($$props,"toolMessages",19,()=>[]),siblingInfo=prop($$props,"siblingInfo",3,null);const editCtx=getMessageEditContext(),isAgentic=user_derived(()=>hasAgenticContent($$props.message,toolMessages())),hasReasoning=user_derived(()=>!!$$props.message.reasoningContent),processingState=useProcessingState();
let currentConfig=user_derived(config$1),isRouter=user_derived(isRouterMode),showRawOutput=state$1(!1),rawOutputContent=user_derived(()=>{const sections=deriveAgenticSections($$props.message,toolMessages(),[],!1),parts=[];for(const section of sections)switch(section.type){case AgenticSectionType.REASONING:case AgenticSectionType.REASONING_PENDING:parts.push(`${REASONING_TAGS.START}
${section.content}
${REASONING_TAGS.END}`);break;case AgenticSectionType.TEXT:parts.push(section.content);break;case AgenticSectionType.TOOL_CALL:case AgenticSectionType.TOOL_CALL_PENDING:case AgenticSectionType.TOOL_CALL_STREAMING:{const callObj={name:section.toolName};if(section.toolArgs)try{callObj.arguments=JSON.parse(section.toolArgs)}catch{callObj.arguments=section.toolArgs}parts.push(JSON.stringify(callObj,null,2)),section.toolResult&&parts.push(`[Tool Result]
${section.toolResult}`);break}}return parts.join(`


`)}),activeStatsView=state$1(proxy(ChatMessageStatsView.GENERATION)),statsContainerEl=state$1(void 0);function getScrollParent(el){let parent=el.parentElement;for(;parent;){const style2=getComputedStyle(parent);if(/(auto|scroll)/.test(style2.overflowY))return parent;parent=parent.parentElement}return null}async function handleStatsViewChange(view){const el=get$3(statsContainerEl);if(!el){set$1(activeStatsView,view,!0);return}const scrollParent=getScrollParent(el);if(!scrollParent){set$1(activeStatsView,
view,!0);return}const yBefore=el.getBoundingClientRect().top;set$1(activeStatsView,view,!0),await tick();const delta=el.getBoundingClientRect().top-yBefore;delta!==0&&(scrollParent.scrollTop+=delta),requestAnimationFrame(()=>{const drift=el.getBoundingClientRect().top-yBefore;Math.abs(drift)>1&&(scrollParent.scrollTop+=drift)})}let highlightAgenticTurns=user_derived(()=>get$3(isAgentic)&&(get$3(currentConfig).alwaysShowAgenticTurns||get$3(activeStatsView)===ChatMessageStatsView.SUMMARY)),displayedModel=user_derived(
()=>$$props.message.model??null),isCurrentlyLoading=user_derived(isLoading),isStreaming=user_derived(isChatStreaming),hasNoContent=user_derived(()=>!$$props.message?.content?.trim()),isActivelyProcessing=user_derived(()=>get$3(isCurrentlyLoading)||get$3(isStreaming)),showProcessingInfoTop=user_derived(()=>$$props.message?.role===MessageRole.ASSISTANT&&get$3(isActivelyProcessing)&&get$3(hasNoContent)&&!get$3(isAgentic)&&isLastAssistantMessage()),showProcessingInfoBottom=user_derived(()=>$$props.message?.
role===MessageRole.ASSISTANT&&get$3(isActivelyProcessing)&&(!get$3(hasNoContent)||get$3(isAgentic))&&isLastAssistantMessage());function handleCopyModel(){copyToClipboard(get$3(displayedModel)??"")}user_effect(()=>{(get$3(showProcessingInfoTop)||get$3(showProcessingInfoBottom))&&processingState.startMonitoring()});var div=root$15(),node2=child(div);{var consequent=$$anchor2=>{var div_1=root_1$y(),div_2=child(div_1),span=child(div_2),text2=child(span,!0);reset(span),reset(div_2),reset(div_1),template_effect(
$0=>set_text(text2,$0),[()=>processingState.getPromptProgressText()??processingState.getProcessingMessage()??"Processing..."]),transition(1,div_1,()=>fade),append($$anchor2,div_1)};if_block(node2,$$render=>{get$3(showProcessingInfoTop)&&$$render(consequent)})}var node_1=sibling(node2,2);{var consequent_1=$$anchor2=>{ChatMessageEditForm($$anchor2,{})},consequent_3=$$anchor2=>{var fragment_1=comment$2(),node_2=first_child(fragment_1);{var consequent_2=$$anchor3=>{var pre=root_4$s(),text_1=child(pre,
!0);reset(pre),template_effect(()=>set_text(text_1,get$3(rawOutputContent)||"")),append($$anchor3,pre)},alternate=$$anchor3=>{{let $0=user_derived(isChatStreaming);ChatMessageAgenticContent($$anchor3,{get message(){return $$props.message},get toolMessages(){return toolMessages()},get isStreaming(){return get$3($0)},get isLastAssistantMessage(){return isLastAssistantMessage()},get highlightTurns(){return get$3(highlightAgenticTurns)}})}};if_block(node_2,$$render=>{get$3(showRawOutput)?$$render(consequent_2):
$$render(alternate,-1)})}append($$anchor2,fragment_1)},alternate_1=$$anchor2=>{var div_3=root_6$l(),text_2=child(div_3,!0);reset(div_3),template_effect(()=>set_text(text_2,$$props.messageContent)),append($$anchor2,div_3)};if_block(node_1,$$render=>{editCtx.isEditing?$$render(consequent_1):$$props.message.role===MessageRole.ASSISTANT?$$render(consequent_3,1):$$render(alternate_1,-1)})}var node_3=sibling(node_1,2);{var consequent_4=$$anchor2=>{var div_4=root_7$j(),div_5=child(div_4),span_1=child(div_5),
text_3=child(span_1,!0);reset(span_1),reset(div_5),reset(div_4),template_effect($0=>set_text(text_3,$0),[()=>processingState.getPromptProgressText()??processingState.getProcessingMessage()??"Processing..."]),transition(1,div_4,()=>fade),append($$anchor2,div_4)};if_block(node_3,$$render=>{get$3(showProcessingInfoBottom)&&$$render(consequent_4)})}var div_6=sibling(node_3,2),node_4=child(div_6);{var consequent_9=$$anchor2=>{var div_7=root_8$l(),node_5=child(div_7);{var consequent_5=$$anchor3=>{{let $0=user_derived(
isLoading);ModelsSelectorDropdown($$anchor3,{get currentModel(){return get$3(displayedModel)},get disabled(){return get$3($0)},onModelChange:async(modelId,modelName)=>(modelsStore.getModelStatus(modelId)!==ServerModelStatus.LOADED&&await modelsStore.loadModel(modelId),$$props.onRegenerate(modelName),!0)})}},alternate_2=$$anchor3=>{{let $0=user_derived(()=>get$3(displayedModel)||void 0);ModelBadge($$anchor3,{get model(){return get$3($0)},onclick:handleCopyModel})}};if_block(node_5,$$render=>{get$3(
isRouter)?$$render(consequent_5):$$render(alternate_2,-1)})}var node_6=sibling(node_5,2);{var consequent_6=$$anchor3=>{const agentic=user_derived(()=>$$props.message.timings.agentic);{let $0=user_derived(()=>get$3(agentic)?get$3(agentic).llm.prompt_n:$$props.message.timings.prompt_n),$1=user_derived(()=>get$3(agentic)?get$3(agentic).llm.prompt_ms:$$props.message.timings.prompt_ms),$2=user_derived(()=>get$3(agentic)?get$3(agentic).llm.predicted_n:$$props.message.timings.predicted_n),$3=user_derived(
()=>get$3(agentic)?get$3(agentic).llm.predicted_ms:$$props.message.timings.predicted_ms);ChatMessageStatistics($$anchor3,{get promptTokens(){return get$3($0)},get promptMs(){return get$3($1)},get predictedTokens(){return get$3($2)},get predictedMs(){return get$3($3)},get agenticTimings(){return get$3(agentic)},onActiveViewChange:handleStatsViewChange})}},consequent_8=$$anchor3=>{const liveStats=user_derived(()=>processingState.getLiveProcessingStats()),genStats=user_derived(()=>processingState.getLiveGenerationStats()),
promptProgress=user_derived(()=>processingState.processingState?.promptProgress),isStillProcessingPrompt=user_derived(()=>get$3(promptProgress)&&get$3(promptProgress).processed<get$3(promptProgress).total);var fragment_6=comment$2(),node_7=first_child(fragment_6);{var consequent_7=$$anchor4=>{{let $0=user_derived(()=>!!get$3(isStillProcessingPrompt)),$1=user_derived(()=>get$3(liveStats)?.tokensProcessed),$2=user_derived(()=>get$3(liveStats)?.timeMs),$3=user_derived(()=>get$3(genStats)?.tokensGenerated),
$4=user_derived(()=>get$3(genStats)?.timeMs);ChatMessageStatistics($$anchor4,{isLive:!0,get isProcessingPrompt(){return get$3($0)},get promptTokens(){return get$3($1)},get promptMs(){return get$3($2)},get predictedTokens(){return get$3($3)},get predictedMs(){return get$3($4)}})}};if_block(node_7,$$render=>{(get$3(liveStats)||get$3(genStats))&&$$render(consequent_7)})}append($$anchor3,fragment_6)},d2=user_derived(()=>isLoading()&&get$3(currentConfig).showMessageStats);if_block(node_6,$$render=>{get$3(
currentConfig).showMessageStats&&$$props.message.timings&&$$props.message.timings.predicted_n&&$$props.message.timings.predicted_ms?$$render(consequent_6):get$3(d2)&&$$render(consequent_8,1)})}reset(div_7),bind_this(div_7,$$value=>set$1(statsContainerEl,$$value),()=>get$3(statsContainerEl)),append($$anchor2,div_7)};if_block(node_4,$$render=>{get$3(displayedModel)&&$$render(consequent_9)})}reset(div_6);var node_8=sibling(div_6,2);{var consequent_10=$$anchor2=>{{let $0=user_derived(()=>get$3(currentConfig).
enableContinueGeneration&&!get$3(hasReasoning)?$$props.onContinue:void 0);ChatMessageActionIcons($$anchor2,{get role(){return MessageRole.ASSISTANT},justify:"start",actionsPosition:"left",get siblingInfo(){return siblingInfo()},get showDeleteDialog(){return $$props.showDeleteDialog},get deletionInfo(){return $$props.deletionInfo},get onCopy(){return $$props.onCopy},get onEdit(){return $$props.onEdit},get onRegenerate(){return $$props.onRegenerate},get onContinue(){return get$3($0)},get onForkConversation(){
return $$props.onForkConversation},get onDelete(){return $$props.onDelete},get onConfirmDelete(){return $$props.onConfirmDelete},get onNavigateToSibling(){return $$props.onNavigateToSibling},get onShowDeleteDialogChange(){return $$props.onShowDeleteDialogChange},get showRawOutputSwitch(){return get$3(currentConfig).showRawOutputSwitch},get rawOutputEnabled(){return get$3(showRawOutput)},onRawOutputToggle:enabled=>set$1(showRawOutput,enabled,!0)})}};if_block(node_8,$$render=>{$$props.message.timestamp&&
!editCtx.isEditing&&$$render(consequent_10)})}reset(div),template_effect(()=>set_class(div,1,`text-md group w-full leading-7.5 ${className()??""}`,"svelte-3902tz")),append($$anchor,div),pop()}var root_1$x=from_html('<div class="flex items-center gap-2"><!> <label for="save-only-switch" class="cursor-pointer text-xs text-muted-foreground">Update without re-sending</label></div>'),root_2$O=from_html('<div class="flex items-center gap-2"><!> <label for="branch-after-edit" class="cursor-pointer text\
-xs text-muted-foreground">Branch conversation after edit</label></div>'),root_3$G=from_html("<div></div>"),root_4$r=from_html("<!> Cancel",1),root$14=from_html('<div class="relative w-full max-w-[80%]"><!></div> <div class="mt-2 flex w-full max-w-[80%] items-center justify-between"><!> <!></div> <!>',1);function ChatMessageEditForm($$anchor,$$props){push$1($$props,!0);const editCtx=getMessageEditContext();let saveWithoutRegenerate=state$1(!1),showDiscardDialog=state$1(!1),branchAfterEdit=state$1(
!1),isUserMessage=user_derived(()=>editCtx.messageRole===MessageRole.USER),isAssistantMessage=user_derived(()=>editCtx.messageRole===MessageRole.ASSISTANT),hasUnsavedChanges=user_derived(()=>!!(editCtx.editedContent!==editCtx.originalContent||editCtx.editedUploadedFiles.length>0||editCtx.editedExtras.length!==editCtx.originalExtras.length||editCtx.editedExtras.some((extra,i)=>extra!==editCtx.originalExtras[i]))),hasAttachments=user_derived(()=>editCtx.editedExtras&&editCtx.editedExtras.length>0||
editCtx.editedUploadedFiles&&editCtx.editedUploadedFiles.length>0),canSubmit=user_derived(()=>editCtx.editedContent.trim().length>0||get$3(hasAttachments));function handleGlobalKeydown(event2){event2.key===KeyboardKey.ESCAPE&&(event2.preventDefault(),attemptCancel())}function attemptCancel(){get$3(hasUnsavedChanges)?set$1(showDiscardDialog,!0):editCtx.cancel()}function handleSubmit(){get$3(canSubmit)&&(get$3(isUserMessage)&&get$3(saveWithoutRegenerate)&&editCtx.showSaveOnlyOption?editCtx.saveOnly():
(get$3(isAssistantMessage)&&editCtx.setShouldBranchAfterEdit&&editCtx.setShouldBranchAfterEdit(get$3(branchAfterEdit)),editCtx.save()),set$1(saveWithoutRegenerate,!1),set$1(branchAfterEdit,!1))}function handleAttachmentRemove(index2){const newExtras=[...editCtx.editedExtras];newExtras.splice(index2,1),editCtx.setExtras(newExtras)}function handleUploadedFileRemove(fileId){const newFiles=editCtx.editedUploadedFiles.filter(f=>f.id!==fileId);editCtx.setUploadedFiles(newFiles)}async function handleFilesAdd(files){
const processed=await processFilesToChatUploaded(files);editCtx.setUploadedFiles([...editCtx.editedUploadedFiles,...processed])}user_effect(()=>(chatStore.setEditModeActive(handleFilesAdd),()=>{chatStore.clearEditMode()}));var fragment=root$14();event("keydown",$window,handleGlobalKeydown);var div=first_child(fragment),node2=child(div);{let $0=user_derived(()=>editCtx.messageRole===MessageRole.USER),$1=user_derived(()=>editCtx.messageRole===MessageRole.USER);ChatForm(node2,{get value(){return editCtx.
editedContent},get attachments(){return editCtx.editedExtras},placeholder:"Edit your message...",showMcpPromptButton:!0,get showAddButton(){return get$3($0)},get showModelSelector(){return get$3($1)},get onValueChange(){return editCtx.setContent},onAttachmentRemove:handleAttachmentRemove,onUploadedFileRemove:handleUploadedFileRemove,onFilesAdd:handleFilesAdd,onSubmit:handleSubmit,get uploadedFiles(){return editCtx.editedUploadedFiles},set uploadedFiles($$value){editCtx.editedUploadedFiles=$$value}})}
reset(div);var div_1=sibling(div,2),node_1=child(div_1);{var consequent=$$anchor2=>{var div_2=root_1$x(),node_2=child(div_2);Switch(node_2,{id:"save-only-switch",class:"scale-75",get checked(){return get$3(saveWithoutRegenerate)},set checked($$value){set$1(saveWithoutRegenerate,$$value,!0)}}),next$1(2),reset(div_2),append($$anchor2,div_2)},consequent_1=$$anchor2=>{var div_3=root_2$O(),node_3=child(div_3);Switch(node_3,{id:"branch-after-edit",class:"scale-75",get checked(){return get$3(branchAfterEdit)},
set checked($$value){set$1(branchAfterEdit,$$value,!0)}}),next$1(2),reset(div_3),append($$anchor2,div_3)},alternate=$$anchor2=>{var div_4=root_3$G();append($$anchor2,div_4)};if_block(node_1,$$render=>{get$3(isUserMessage)&&editCtx.showSaveOnlyOption?$$render(consequent):get$3(isAssistantMessage)?$$render(consequent_1,1):$$render(alternate,-1)})}var node_4=sibling(node_1,2);Button(node_4,{class:"h-7 px-3 text-xs",onclick:attemptCancel,size:"sm",variant:"ghost",children:($$anchor2,$$slotProps)=>{var fragment_1=root_4$r(),
node_5=first_child(fragment_1);X(node_5,{class:"mr-1 h-3 w-3"}),next$1(),append($$anchor2,fragment_1)},$$slots:{default:!0}}),reset(div_1);var node_6=sibling(div_1,2);DialogConfirmation(node_6,{title:"Discard changes?",description:"You have unsaved changes. Are you sure you want to discard them?",confirmText:"Discard",cancelText:"Keep editing",variant:"destructive",get icon(){return Triangle_alert},get onConfirm(){return editCtx.cancel},onCancel:()=>set$1(showDiscardDialog,!1),get open(){return get$3(
showDiscardDialog)},set open($$value){set$1(showDiscardDialog,$$value,!0)}}),append($$anchor,fragment),pop()}var root_3$F=from_html('<div class="max-w-[80%]"><!></div>'),root_2$N=from_html("<!> <!>",1),root$13=from_html('<div aria-label="User message with actions" role="group"><!></div>');function ChatMessageUser($$anchor,$$props){push$1($$props,!0);let className=prop($$props,"class",3,""),siblingInfo=prop($$props,"siblingInfo",3,null);const editCtx=getMessageEditContext();var div=root$13(),node2=child(
div);{var consequent=$$anchor2=>{ChatMessageEditForm($$anchor2,{})},alternate=$$anchor2=>{var fragment_1=root_2$N(),node_1=first_child(fragment_1);ChatMessageUserBubble(node_1,{get content(){return $$props.message.content},get attachments(){return $$props.message.extra},renderMarkdown:!0});var node_2=sibling(node_1,2);{var consequent_1=$$anchor3=>{var div_1=root_3$F(),node_3=child(div_1);ChatMessageActionIcons(node_3,{actionsPosition:"right",get deletionInfo(){return $$props.deletionInfo},justify:"\
end",get onConfirmDelete(){return $$props.onConfirmDelete},get onCopy(){return $$props.onCopy},get onDelete(){return $$props.onDelete},get onEdit(){return $$props.onEdit},get onForkConversation(){return $$props.onForkConversation},get onNavigateToSibling(){return $$props.onNavigateToSibling},get onShowDeleteDialogChange(){return $$props.onShowDeleteDialogChange},get siblingInfo(){return siblingInfo()},get showDeleteDialog(){return $$props.showDeleteDialog},get role(){return MessageRole.USER}}),reset(
div_1),append($$anchor3,div_1)};if_block(node_2,$$render=>{$$props.message.timestamp&&$$render(consequent_1)})}append($$anchor2,fragment_1)};if_block(node2,$$render=>{editCtx.isEditing?$$render(consequent):$$render(alternate,-1)})}reset(div),template_effect(()=>set_class(div,1,`group flex flex-col items-end gap-3 md:gap-2 ${className()??""}`)),append($$anchor,div),pop()}var root_1$w=from_html('<div class="mb-2 max-w-[80%]"><!></div>'),root_4$q=from_html("<div><!></div>"),root_5$k=from_html('<spa\
n class="text-md whitespace-pre-wrap"> </span>'),root$12=from_html("<!> <!>",1);function ChatMessageUserBubble($$anchor,$$props){push$1($$props,!0);let attachments=prop($$props,"attachments",19,()=>[]),renderMarkdown=prop($$props,"renderMarkdown",3,!1),textColorClass=prop($$props,"textColorClass",3,"text-foreground"),cardBgClass=prop($$props,"cardBgClass",3,"dark:bg-primary/15"),maxHeightStyle=prop($$props,"maxHeightStyle",3,"max-height: var(--max-message-height);"),isMultiline=state$1(!1),messageElement=state$1(
void 0);const currentConfig=config$1();user_effect(()=>{if(!get$3(messageElement)||!$$props.content.trim())return;if($$props.content.includes(`
`)){set$1(isMultiline,!0);return}const resizeObserver=new ResizeObserver(entries=>{for(const entry of entries){const element2=entry.target;set$1(isMultiline,element2.offsetHeight>24*1.5)}});return resizeObserver.observe(get$3(messageElement)),()=>{resizeObserver.disconnect()}});var fragment=root$12(),node2=first_child(fragment);{var consequent=$$anchor2=>{var div=root_1$w(),node_1=child(div);ChatAttachmentsList(node_1,{get attachments(){return attachments()},readonly:!0,imageHeight:"h-40"}),reset(
div),append($$anchor2,div)};if_block(node2,$$render=>{attachments()&&attachments().length>0&&$$render(consequent)})}var node_2=sibling(node2,2);{var consequent_2=$$anchor2=>{{let $0=user_derived(()=>get$3(isMultiline)?"":void 0);Card($$anchor2,{get class(){return`max-w-[80%] overflow-y-auto rounded-[1.125rem] border-none bg-primary/5 px-3.75 py-1.5 ${textColorClass()??""} backdrop-blur-md data-[multiline]:py-2.5 ${cardBgClass()??""}`},get"data-multiline"(){return get$3($0)},get style(){return`${maxHeightStyle()??
""} overflow-wrap: anywhere; word-break: break-word;`},children:($$anchor3,$$slotProps)=>{var fragment_2=comment$2(),node_3=first_child(fragment_2);{var consequent_1=$$anchor4=>{var div_1=root_4$q(),node_4=child(div_1);MarkdownContent(node_4,{class:"markdown-user-content -my-4",get content(){return $$props.content}}),reset(div_1),bind_this(div_1,$$value=>set$1(messageElement,$$value),()=>get$3(messageElement)),append($$anchor4,div_1)},alternate=$$anchor4=>{var span=root_5$k(),text2=child(span,!0);
reset(span),bind_this(span,$$value=>set$1(messageElement,$$value),()=>get$3(messageElement)),template_effect(()=>set_text(text2,$$props.content)),append($$anchor4,span)};if_block(node_3,$$render=>{renderMarkdown()&&currentConfig.renderUserContentAsMarkdown?$$render(consequent_1):$$render(alternate,-1)})}append($$anchor3,fragment_2)},$$slots:{default:!0}})}},d2=user_derived(()=>$$props.content.trim());if_block(node_2,$$render=>{get$3(d2)&&$$render(consequent_2)})}append($$anchor,fragment),pop()}function useMessageEditContext(options){
let isEditing2=state$1(!1),editedContent=state$1(""),editedExtras=state$1(proxy([])),editedUploadedFiles=state$1(proxy([]));function handleEdit(){set$1(editedContent,options.getContent(),!0),set$1(editedExtras,[...options.getExtras()],!0),set$1(editedUploadedFiles,[],!0),set$1(isEditing2,!0)}async function handleSaveEdit(){const trimmed=get$3(editedContent).trim();if(!trimmed&&get$3(editedExtras).length===0&&get$3(editedUploadedFiles).length===0)return;let finalExtras=snapshot(get$3(editedExtras));
if(get$3(editedUploadedFiles).length>0){const plainFiles=snapshot(get$3(editedUploadedFiles)),newExtras=(await parseFilesToMessageExtras(plainFiles))?.extras||[];finalExtras=[...finalExtras,...newExtras]}options.onSave(trimmed,finalExtras.length>0?finalExtras:void 0),set$1(isEditing2,!1)}function handleCancelEdit(){set$1(isEditing2,!1)}return setMessageEditContext({get isEditing(){return get$3(isEditing2)},get editedContent(){return get$3(editedContent)},get editedExtras(){return get$3(editedExtras)},
get editedUploadedFiles(){return get$3(editedUploadedFiles)},get originalContent(){return options.getContent()},get originalExtras(){return options.getExtras()},get showSaveOnlyOption(){return options.showSaveOnlyOption??!1},get showBranchAfterEditOption(){return!1},get shouldBranchAfterEdit(){return!1},get messageRole(){return MessageRole.USER},setContent:c2=>{set$1(editedContent,c2,!0)},setExtras:e=>{set$1(editedExtras,e,!0)},setUploadedFiles:f=>{set$1(editedUploadedFiles,f,!0)},save:handleSaveEdit,
saveOnly:handleSaveEdit,cancel:handleCancelEdit,startEdit:handleEdit}),{get isEditing(){return get$3(isEditing2)},handleEdit,handleSaveEdit,handleCancelEdit}}var root_2$M=from_html('<!> <div class="max-w-[80%]"><div class="relative flex h-6 items-center justify-between"><div class="right-0 flex items-center gap-2 opacity-100 transition-opacity"><div class="pointer-events-auto inset-0 flex items-center gap-1 opacity-0 transition-all duration-150 group-hover:opacity-100"><!> <!> <!></div></div></d\
iv></div>',1),root$11=from_html('<div aria-label="Pending user message" role="group"><!></div>');function ChatMessageUserPending($$anchor,$$props){push$1($$props,!0);let className=prop($$props,"class",3,""),extras=prop($$props,"extras",19,()=>[]);const processingInfoCtx=getProcessingInfoContext();let showProcessingInfo=user_derived(()=>processingInfoCtx.showProcessingInfo);const editCtx=useMessageEditContext({getContent:()=>$$props.content,getExtras:()=>extras(),onSave:(content2,extras2)=>$$props.
onEdit(content2,extras2)});var div=root$11(),node2=child(div);{var consequent=$$anchor2=>{ChatMessageEditForm($$anchor2,{})},alternate=$$anchor2=>{var fragment_1=root_2$M(),node_1=first_child(fragment_1);ChatMessageUserBubble(node_1,{get content(){return $$props.content},get attachments(){return extras()},textColorClass:"text-muted-foreground",cardBgClass:"dark:bg-primary/8",maxHeightStyle:"overflow-wrap: anywhere; word-break: break-word;"});var div_1=sibling(node_1,2),div_2=child(div_1),div_3=child(
div_2),div_4=child(div_3),node_2=child(div_4);ActionIcon(node_2,{get icon(){return Square_pen},tooltip:"Edit",get onclick(){return editCtx.handleEdit}});var node_3=sibling(node_2,2);ActionIcon(node_3,{get icon(){return Trash_2},tooltip:"Delete",get onclick(){return $$props.onDelete}});var node_4=sibling(node_3,2);ActionIcon(node_4,{get icon(){return Arrow_up},tooltip:"Send immediately",get onclick(){return $$props.onSendImmediately}}),reset(div_4),reset(div_3),reset(div_2),reset(div_1),append($$anchor2,
fragment_1)};if_block(node2,$$render=>{editCtx.isEditing?$$render(consequent):$$render(alternate,-1)})}reset(div),action(div,$$node=>fadeInView?.($$node)),template_effect(()=>set_class(div,1,`group flex flex-col items-end gap-3 transition-opacity hover:opacity-80 md:gap-2 ${className()??""} sticky ${get$3(showProcessingInfo)?"bottom-44":"bottom-32"}`)),append($$anchor,div),pop()}var root_2$L=from_html("<!> Cancel",1),root_3$E=from_html("<!> Save",1),root_1$v=from_html('<div class="w-full max-w-[\
80%]"><textarea placeholder="Edit system message..."></textarea> <div class="mt-2 flex justify-end gap-2"><!> <!></div></div>'),root_7$i=from_html("<div><!></div>"),root_8$k=from_html("<span> </span>"),root_9$e=from_html('<div class="pointer-events-none absolute right-0 bottom-0 left-0 h-48 bg-gradient-to-t from-muted to-transparent"></div> <div class="pointer-events-none absolute right-0 bottom-4 left-0 flex justify-center opacity-0 transition-opacity group-hover/expand:opacity-100"><!></div>',
1),root_11$8=from_html('<div class="mb-2 flex justify-center"><!></div>'),root_6$k=from_html("<div><!> <!></div> <!>",1),root_5$j=from_html('<div class="relative max-w-[80%]"><button type="button"><!></button></div>'),root_13$8=from_html('<div class="max-w-[80%]"><!></div>'),root_4$p=from_html("<!> <!>",1),root$10=from_html('<div aria-label="System message with actions" role="group"><!></div>');function ChatMessageSystem($$anchor,$$props){push$1($$props,!0);let className=prop($$props,"class",3,""),
siblingInfo=prop($$props,"siblingInfo",3,null),textareaElement=prop($$props,"textareaElement",15);const editCtx=getMessageEditContext();function handleEditKeydown(event2){event2.key===KeyboardKey.ENTER&&!event2.shiftKey&&!isIMEComposing(event2)?(event2.preventDefault(),editCtx.save()):event2.key===KeyboardKey.ESCAPE&&(event2.preventDefault(),editCtx.cancel())}let isMultiline=state$1(!1),messageElement=state$1(void 0),isExpanded=state$1(!1),contentHeight=state$1(0);const MAX_HEIGHT=200,currentConfig=config$1();
let showExpandButton=user_derived(()=>get$3(contentHeight)>MAX_HEIGHT);user_effect(()=>{if(!get$3(messageElement)||!$$props.message.content.trim())return;$$props.message.content.includes(`
`)&&set$1(isMultiline,!0);const resizeObserver=new ResizeObserver(entries=>{for(const entry of entries){const element2=entry.target;set$1(isMultiline,element2.offsetHeight>24*1.5),set$1(contentHeight,element2.scrollHeight,!0)}});return resizeObserver.observe(get$3(messageElement)),()=>{resizeObserver.disconnect()}});function toggleExpand(){set$1(isExpanded,!get$3(isExpanded))}var div=root$10(),node2=child(div);{var consequent=$$anchor2=>{var div_1=root_1$v(),textarea=child(div_1);remove_textarea_child(
textarea),bind_this(textarea,$$value=>textareaElement($$value),()=>textareaElement());var div_2=sibling(textarea,2),node_1=child(div_2);Button(node_1,{class:"h-8 px-3",get onclick(){return editCtx.cancel},size:"sm",variant:"outline",children:($$anchor3,$$slotProps)=>{var fragment=root_2$L(),node_2=first_child(fragment);X(node_2,{class:"mr-1 h-3 w-3"}),next$1(),append($$anchor3,fragment)},$$slots:{default:!0}});var node_3=sibling(node_1,2);{let $0=user_derived(()=>!editCtx.editedContent.trim());Button(
node_3,{class:"h-8 px-3",get onclick(){return editCtx.save},get disabled(){return get$3($0)},size:"sm",children:($$anchor3,$$slotProps)=>{var fragment_1=root_3$E(),node_4=first_child(fragment_1);Check(node_4,{class:"mr-1 h-3 w-3"}),next$1(),append($$anchor3,fragment_1)},$$slots:{default:!0}})}reset(div_2),reset(div_1),template_effect(()=>{set_value(textarea,editCtx.editedContent),set_class(textarea,1,`min-h-[60px] w-full resize-none rounded-2xl px-3 py-2 text-sm ${INPUT_CLASSES??""}`)}),delegated(
"keydown",textarea,handleEditKeydown),delegated("input",textarea,e=>editCtx.setContent(e.currentTarget.value)),append($$anchor2,div_1)},alternate_1=$$anchor2=>{var fragment_2=root_4$p(),node_5=first_child(fragment_2);{var consequent_4=$$anchor3=>{var div_3=root_5$j(),button=child(div_3),node_6=child(button);{let $0=user_derived(()=>get$3(isMultiline)?"":void 0);Card(node_6,{class:"overflow-y-auto rounded-[1.125rem] !border-2 !border-dashed !border-border/50 bg-muted px-3.75 py-1.5 data-[multilin\
e]:py-2.5",get"data-multiline"(){return get$3($0)},style:"border: 2px dashed hsl(var(--border)); max-height: var(--max-message-height); overflow-wrap: anywhere; word-break: break-word;",children:($$anchor4,$$slotProps)=>{var fragment_3=root_6$k(),div_4=first_child(fragment_3),node_7=child(div_4);{var consequent_1=$$anchor5=>{var div_5=root_7$i(),node_8=child(div_5);MarkdownContent(node_8,{class:"markdown-system-content -my-4",get content(){return $$props.message.content}}),reset(div_5),bind_this(
div_5,$$value=>set$1(messageElement,$$value),()=>get$3(messageElement)),template_effect(()=>set_class(div_5,1,clsx(get$3(isExpanded)?"cursor-text":""))),append($$anchor5,div_5)},alternate=$$anchor5=>{var span=root_8$k(),text2=child(span,!0);reset(span),bind_this(span,$$value=>set$1(messageElement,$$value),()=>get$3(messageElement)),template_effect(()=>{set_class(span,1,`text-md whitespace-pre-wrap ${get$3(isExpanded)?"cursor-text":""}`),set_text(text2,$$props.message.content)}),append($$anchor5,
span)};if_block(node_7,$$render=>{currentConfig.renderUserContentAsMarkdown?$$render(consequent_1):$$render(alternate,-1)})}var node_9=sibling(node_7,2);{var consequent_2=$$anchor5=>{var fragment_4=root_9$e(),div_6=sibling(first_child(fragment_4),2),node_10=child(div_6);Button(node_10,{class:"rounded-full px-4 py-1.5 text-xs shadow-md",size:"sm",variant:"outline",children:($$anchor6,$$slotProps2)=>{next$1();var text_1=text$8("Show full system message");append($$anchor6,text_1)},$$slots:{default:!0}}),
reset(div_6),append($$anchor5,fragment_4)};if_block(node_9,$$render=>{!get$3(isExpanded)&&get$3(showExpandButton)&&$$render(consequent_2)})}reset(div_4);var node_11=sibling(div_4,2);{var consequent_3=$$anchor5=>{var div_7=root_11$8(),node_12=child(div_7);Button(node_12,{class:"rounded-full px-4 py-1.5 text-xs",onclick:e=>{e.stopPropagation(),toggleExpand()},size:"sm",variant:"outline",children:($$anchor6,$$slotProps2)=>{next$1();var text_2=text$8("Collapse System Message");append($$anchor6,text_2)},
$$slots:{default:!0}}),reset(div_7),append($$anchor5,div_7)};if_block(node_11,$$render=>{get$3(isExpanded)&&get$3(showExpandButton)&&$$render(consequent_3)})}template_effect(()=>{set_class(div_4,1,`relative transition-all duration-300 ${get$3(isExpanded)?"cursor-text select-text":"select-none"}`),set_style(div_4,!get$3(isExpanded)&&get$3(showExpandButton)?`max-height: ${MAX_HEIGHT}px;`:"max-height: none;")}),append($$anchor4,fragment_3)},$$slots:{default:!0}})}reset(button),reset(div_3),template_effect(
()=>set_class(button,1,`group/expand w-full text-left ${!get$3(isExpanded)&&get$3(showExpandButton)?"cursor-pointer":"cursor-auto"}`)),delegated("click",button,function(...$$args){(get$3(showExpandButton)&&!get$3(isExpanded)?toggleExpand:void 0)?.apply(this,$$args)}),append($$anchor3,div_3)},d2=user_derived(()=>$$props.message.content.trim());if_block(node_5,$$render=>{get$3(d2)&&$$render(consequent_4)})}var node_13=sibling(node_5,2);{var consequent_5=$$anchor3=>{var div_8=root_13$8(),node_14=child(
div_8);ChatMessageActionIcons(node_14,{actionsPosition:"right",get deletionInfo(){return $$props.deletionInfo},justify:"end",get onConfirmDelete(){return $$props.onConfirmDelete},get onCopy(){return $$props.onCopy},get onDelete(){return $$props.onDelete},get onEdit(){return $$props.onEdit},get onNavigateToSibling(){return $$props.onNavigateToSibling},get onShowDeleteDialogChange(){return $$props.onShowDeleteDialogChange},get siblingInfo(){return siblingInfo()},get showDeleteDialog(){return $$props.
showDeleteDialog},get role(){return MessageRole.USER}}),reset(div_8),append($$anchor3,div_8)};if_block(node_13,$$render=>{$$props.message.timestamp&&$$render(consequent_5)})}append($$anchor2,fragment_2)};if_block(node2,$$render=>{editCtx.isEditing?$$render(consequent):$$render(alternate_1,-1)})}reset(div),template_effect(()=>set_class(div,1,`group flex flex-col items-end gap-3 md:gap-2 ${className()??""}`)),append($$anchor,div),pop()}delegate(["keydown","input","click"]);class AutoScrollController{#_autoScrollEnabled=state$1(
!0);get _autoScrollEnabled(){return get$3(this.#_autoScrollEnabled)}set _autoScrollEnabled(value){set$1(this.#_autoScrollEnabled,value,!0)}#_userScrolledUp=state$1(!1);get _userScrolledUp(){return get$3(this.#_userScrolledUp)}set _userScrolledUp(value){set$1(this.#_userScrolledUp,value,!0)}#_lastScrollTop=state$1(0);get _lastScrollTop(){return get$3(this.#_lastScrollTop)}set _lastScrollTop(value){set$1(this.#_lastScrollTop,value,!0)}_scrollInterval;_scrollTimeout;_container;_disabled;_isColumnReverse;_mutationObserver=null;_rafPending=!1;_observerEnabled=!1;constructor(options={}){
this._disabled=options.disabled??!1,this._isColumnReverse=options.isColumnReverse??!1}get autoScrollEnabled(){return this._autoScrollEnabled}get userScrolledUp(){return this._userScrolledUp}setContainer(container2){this._doStopObserving(),this._container=container2,this._observerEnabled&&container2&&!this._disabled&&this._doStartObserving()}setDisabled(disabled){this._disabled=disabled,disabled?(this._autoScrollEnabled=!1,this.stopInterval(),this._doStopObserving()):this._observerEnabled&&this._container&&
!this._mutationObserver&&this._doStartObserving()}handleScroll(){if(this._disabled||!this._container)return;const{scrollTop,scrollHeight,clientHeight}=this._container;let distanceFromBottom,isScrollingUp;this._isColumnReverse?(distanceFromBottom=Math.abs(scrollTop),isScrollingUp=scrollTop<this._lastScrollTop):(distanceFromBottom=scrollHeight-clientHeight-scrollTop,isScrollingUp=scrollTop<this._lastScrollTop);const isAtBottom=distanceFromBottom<AUTO_SCROLL_AT_BOTTOM_THRESHOLD;isScrollingUp&&!isAtBottom?
(this._userScrolledUp=!0,this._autoScrollEnabled=!1):isAtBottom&&this._userScrolledUp&&(this._userScrolledUp=!1,this._autoScrollEnabled=!0),this._scrollTimeout&&clearTimeout(this._scrollTimeout),this._scrollTimeout=setTimeout(()=>{isAtBottom&&(this._userScrolledUp=!1,this._autoScrollEnabled=!0)},AUTO_SCROLL_INTERVAL),this._lastScrollTop=scrollTop}scrollToBottom(behavior="smooth"){this._disabled||!this._container||(this._isColumnReverse?this._container.scrollTo({top:0,behavior}):this._container.scrollTo(
{top:this._container.scrollHeight,behavior}))}enable(){this._disabled||(this._userScrolledUp=!1,this._autoScrollEnabled=!0)}startInterval(){this._disabled||this._scrollInterval||(this._scrollInterval=setInterval(()=>{this.scrollToBottom()},AUTO_SCROLL_INTERVAL))}stopInterval(){this._scrollInterval&&(clearInterval(this._scrollInterval),this._scrollInterval=void 0)}updateInterval(isStreaming){if(this._disabled){this.stopInterval();return}isStreaming&&this._autoScrollEnabled?this._scrollInterval||this.
startInterval():this.stopInterval()}destroy(){this.stopInterval(),this._doStopObserving(),this._scrollTimeout&&(clearTimeout(this._scrollTimeout),this._scrollTimeout=void 0)}startObserving(){this._observerEnabled=!0,this._container&&!this._disabled&&!this._mutationObserver&&this._doStartObserving()}stopObserving(){this._observerEnabled=!1,this._doStopObserving()}_doStartObserving(){if(!this._container||this._mutationObserver)return;const isReverse=this._isColumnReverse;this._mutationObserver=new MutationObserver(
()=>{!this._autoScrollEnabled||this._rafPending||(this._rafPending=!0,requestAnimationFrame(()=>{this._rafPending=!1,this._autoScrollEnabled&&this._container&&(isReverse?this._container.scrollTop=0:this._container.scrollTop=this._container.scrollHeight)}))}),this._mutationObserver.observe(this._container,{childList:!0,subtree:!0,characterData:!0})}_doStopObserving(){this._mutationObserver&&(this._mutationObserver.disconnect(),this._mutationObserver=null),this._rafPending=!1}}function createAutoScrollController(options={}){
return new AutoScrollController(options)}function useKeyboardShortcuts(callbacks){function handleKeydown(event2){const isCmdOrCtrl=event2.metaKey||event2.ctrlKey;isCmdOrCtrl&&event2.key===KeyboardKey.K_LOWER&&(event2.preventDefault(),callbacks.activateSearchMode?.(),callbacks.onSearchActivated?.()),isCmdOrCtrl&&event2.shiftKey&&(event2.key===KeyboardKey.O_LOWER||event2.key===KeyboardKey.O_UPPER)&&(event2.preventDefault(),goto(ROUTES.NEW_CHAT)),event2.shiftKey&&isCmdOrCtrl&&event2.key===KeyboardKey.
E_UPPER&&(event2.preventDefault(),callbacks.editActiveConversation?.()),isCmdOrCtrl&&event2.shiftKey&&(event2.key===KeyboardKey.D_LOWER||event2.key===KeyboardKey.D_UPPER)&&(event2.preventDefault(),callbacks.deleteActiveConversation?.()),isCmdOrCtrl&&event2.shiftKey&&event2.key===KeyboardKey.ARROW_UP&&(event2.preventDefault(),callbacks.navigateToPrevConversation?.()),isCmdOrCtrl&&event2.shiftKey&&event2.key===KeyboardKey.ARROW_DOWN&&(event2.preventDefault(),callbacks.navigateToNextConversation?.())}
return{handleKeydown}}var root_5$i=from_html('<div class="mb-8 px-4 text-center"><h1 class="mb-2 text-2xl font-semibold tracking-tight md:text-3xl">Hello there</h1> <p class="text-muted-foreground md:text-lg"> </p></div>'),root_9$d=from_html('<span>Server unavailable</span> <button class="flex items-center gap-1.5 rounded-lg bg-destructive/20 px-2 py-1 text-xs font-medium hover:bg-destructive/30 disabled:opacity-50"><!> </button>',1),root_8$j=from_html("<!> <!> <!>",1),root_7$h=from_html('<div c\
lass="pointer-events-auto mx-auto mb-4 max-w-[48rem] px-1"><!></div>'),root_3$D=from_html('<div aria-label="Chat interface with file drop zone" class="flex h-full flex-col-reverse overflow-y-auto px-4 md:px-6" role="main"><div class="flex grow flex-col pt-14"><!> <div><!> <!> <!> <div class="conversation-chat-form pointer-events-auto rounded-t-3xl"><!></div></div></div></div>'),root$$=from_html("<!> <!> <!> <!> <!> <!>",1);function ChatScreen($$anchor,$$props){push$1($$props,!0);let showCenteredEmpty=prop(
$$props,"showCenteredEmpty",3,!1),disableAutoScroll=user_derived(()=>!!config$1().disableAutoScroll),chatScrollContainer=state$1(void 0),dragCounter=state$1(0),isDragOver=state$1(!1),showFileErrorDialog=state$1(!1),uploadedFiles=state$1(proxy([]));const autoScroll=createAutoScrollController({isColumnReverse:!0});let fileErrorData=state$1(proxy({generallyUnsupported:[],modalityUnsupported:[],modalityReasons:{},supportedTypes:[]})),showDeleteDialog=state$1(!1),showEmptyFileDialog=state$1(!1),emptyFileNames=state$1(
proxy([])),initialMessage=state$1(""),isEmpty=user_derived(()=>showCenteredEmpty()&&!activeConversation()&&activeMessages().length===0&&!isLoading()),activeErrorDialog=user_derived(errorDialog),isServerLoading=user_derived(serverLoading),hasPropsError=user_derived(()=>!!serverError()),isCurrentConversationLoading=user_derived(()=>isLoading()||isChatStreaming()),showProcessingInfo=user_derived(()=>get$3(isCurrentConversationLoading)||config$1().keepStatsVisible&&!!page$1.params.id||activeProcessingState()!==
null),isRouter=user_derived(isRouterMode),conversationModel=user_derived(()=>chatStore.getConversationModel(activeMessages())),activeModelId=user_derived(()=>{const options=modelOptions();if(!get$3(isRouter))return options.length>0?options[0].model:null;const selectedId=selectedModelId();if(selectedId){const model=options.find(m=>m.id===selectedId);if(model)return model.model}if(get$3(conversationModel)){const model=options.find(m=>m.model===get$3(conversationModel));if(model)return model.model}
return null}),modelPropsVersion=state$1(0);setProcessingInfoContext({get showProcessingInfo(){return get$3(showProcessingInfo)}}),user_effect(()=>{get$3(activeModelId)&&(modelsStore.getModelProps(get$3(activeModelId))||modelsStore.fetchModelProps(get$3(activeModelId)).then(()=>{update$1(modelPropsVersion)}))});let hasAudioModality=user_derived(()=>get$3(activeModelId)?(get$3(modelPropsVersion),modelsStore.modelSupportsAudio(get$3(activeModelId))):!1),hasVisionModality=user_derived(()=>get$3(activeModelId)?
(get$3(modelPropsVersion),modelsStore.modelSupportsVision(get$3(activeModelId))):!1);async function handleDeleteConfirm(){const conversation=activeConversation();conversation&&await conversationsStore.deleteConversation(conversation.id),set$1(showDeleteDialog,!1)}function handleDragEnter(event2){event2.preventDefault(),update$1(dragCounter),event2.dataTransfer?.types.includes("Files")&&set$1(isDragOver,!0)}function handleDragLeave(event2){event2.preventDefault(),update$1(dragCounter,-1),get$3(dragCounter)===
0&&set$1(isDragOver,!1)}function handleErrorDialogOpenChange(open2){open2||chatStore.dismissErrorDialog()}function handleDragOver(event2){event2.preventDefault()}function handleDrop(event2){if(event2.preventDefault(),set$1(isDragOver,!1),set$1(dragCounter,0),event2.dataTransfer?.files){const files=Array.from(event2.dataTransfer.files);if(isEditing()){const handler=getAddFilesHandler();if(handler){handler(files);return}}processFiles(files)}}function handleFileRemove(fileId){set$1(uploadedFiles,get$3(
uploadedFiles).filter(f=>f.id!==fileId),!0)}function handleFileUpload(files){processFiles(files)}const{handleKeydown}=useKeyboardShortcuts({deleteActiveConversation:()=>{activeConversation()&&set$1(showDeleteDialog,!0)}});async function handleSystemPromptAdd(draft){(draft.message||draft.files.length>0)&&chatStore.savePendingDraft(draft.message,draft.files),await chatStore.addSystemPrompt()}function handleScroll(){autoScroll.handleScroll()}async function handleSendMessage(message,files){const plainFiles=files?
snapshot(files):void 0,result=plainFiles?await parseFilesToMessageExtras(plainFiles,get$3(activeModelId)??void 0):void 0;if(result?.emptyFiles&&result.emptyFiles.length>0){if(set$1(emptyFileNames,result.emptyFiles,!0),set$1(showEmptyFileDialog,!0),files){const emptyFileNamesSet=new Set(result.emptyFiles);set$1(uploadedFiles,get$3(uploadedFiles).filter(file=>!emptyFileNamesSet.has(file.name)),!0)}return!1}const extras=result?.extras;return autoScroll.enable(),await chatStore.sendMessage(message,extras),
autoScroll.scrollToBottom(),!0}async function processFiles(files){const generallySupported=[],generallyUnsupported=[];for(const file of files)isFileTypeSupported(file.name,file.type)?generallySupported.push(file):generallyUnsupported.push(file);const capabilities={hasVision:get$3(hasVisionModality),hasAudio:get$3(hasAudioModality)},{supportedFiles,unsupportedFiles,modalityReasons}=filterFilesByModalities(generallySupported,capabilities);if([...generallyUnsupported,...unsupportedFiles].length>0){
const supportedTypes=["text files","PDFs"];get$3(hasVisionModality)&&supportedTypes.push("images"),get$3(hasAudioModality)&&supportedTypes.push("audio files"),set$1(fileErrorData,{generallyUnsupported,modalityUnsupported:unsupportedFiles,modalityReasons,supportedTypes},!0),set$1(showFileErrorDialog,!0)}if(supportedFiles.length>0){const processed=await processFilesToChatUploaded(supportedFiles,get$3(activeModelId)??void 0);set$1(uploadedFiles,[...get$3(uploadedFiles),...processed],!0)}}afterNavigate(
()=>{get$3(disableAutoScroll)||autoScroll.enable()}),onMount$1(()=>{autoScroll.startObserving(),get$3(disableAutoScroll)||autoScroll.enable();const pendingDraft=chatStore.consumePendingDraft();pendingDraft&&(set$1(initialMessage,pendingDraft.message,!0),set$1(uploadedFiles,pendingDraft.files,!0))}),user_effect(()=>{autoScroll.setContainer(get$3(chatScrollContainer))}),user_effect(()=>{autoScroll.setDisabled(get$3(disableAutoScroll))});var fragment=root$$();event("keydown",$window,handleKeydown);
var node2=first_child(fragment);{var consequent=$$anchor2=>{ChatScreenDragOverlay($$anchor2)};if_block(node2,$$render=>{get$3(isDragOver)&&$$render(consequent)})}var node_1=sibling(node2,2);{var consequent_1=$$anchor2=>{ServerLoadingSplash($$anchor2,{})},alternate=$$anchor2=>{var div=root_3$D(),div_1=child(div),node_2=child(div_1);{var consequent_2=$$anchor3=>{{let $0=user_derived(activeMessages);ChatMessages($$anchor3,{get messages(){return get$3($0)},onUserAction:()=>{autoScroll.enable(),autoScroll.
scrollToBottom()}})}};if_block(node_2,$$render=>{get$3(isEmpty)||$$render(consequent_2)})}var div_2=sibling(node_2,2),node_3=child(div_2);{var consequent_3=$$anchor3=>{var div_3=root_5$i(),p2=sibling(child(div_3),2),text2=child(p2);reset(p2),reset(div_3),action(div_3,($$node,$$action_arg)=>fadeInView?.($$node,$$action_arg),()=>({duration:300})),template_effect(()=>set_text(text2,`${serverStore.props?.modalities?.audio?"Record audio, type a message ":"Type a message"} or upload files to get start\
ed`)),append($$anchor3,div_3)};if_block(node_3,$$render=>{get$3(isEmpty)&&$$render(consequent_3)})}var node_4=sibling(node_3,2);{var consequent_4=$$anchor3=>{ChatScreenProcessingInfo($$anchor3,{})};if_block(node_4,$$render=>{page$1.params.id&&$$render(consequent_4)})}var node_5=sibling(node_4,2);{var consequent_5=$$anchor3=>{var div_4=root_7$h(),node_6=child(div_4);component(node_6,()=>Alert,($$anchor4,Alert_Root)=>{Alert_Root($$anchor4,{variant:"destructive",children:($$anchor5,$$slotProps)=>{var fragment_5=root_8$j(),
node_7=first_child(fragment_5);Triangle_alert(node_7,{class:"h-4 w-4"});var node_8=sibling(node_7,2);component(node_8,()=>Alert_title,($$anchor6,Alert_Title)=>{Alert_Title($$anchor6,{class:"flex items-center justify-between",children:($$anchor7,$$slotProps2)=>{var fragment_6=root_9$d(),button=sibling(first_child(fragment_6),2),node_9=child(button);{let $0=user_derived(()=>get$3(isServerLoading)?"animate-spin":"");Refresh_cw(node_9,{get class(){return`h-3 w-3 ${get$3($0)??""}`}})}var text_1=sibling(
node_9);reset(button),template_effect(()=>{button.disabled=get$3(isServerLoading),set_text(text_1,` ${get$3(isServerLoading)?"Retrying...":"Retry"}`)}),delegated("click",button,()=>serverStore.fetch()),append($$anchor7,fragment_6)},$$slots:{default:!0}})});var node_10=sibling(node_8,2);component(node_10,()=>Alert_description,($$anchor6,Alert_Description)=>{Alert_Description($$anchor6,{children:($$anchor7,$$slotProps2)=>{next$1();var text_2=text$8();template_effect($0=>set_text(text_2,$0),[()=>serverError()]),
append($$anchor7,text_2)},$$slots:{default:!0}})}),append($$anchor5,fragment_5)},$$slots:{default:!0}})}),reset(div_4),action(div_4,($$node,$$action_arg)=>fadeInView?.($$node,$$action_arg),()=>({y:10,duration:250})),append($$anchor3,div_4)};if_block(node_5,$$render=>{get$3(hasPropsError)&&$$render(consequent_5)})}var div_5=sibling(node_5,2),node_11=child(div_5);{let $0=user_derived(()=>get$3(hasPropsError)||isEditing());ChatScreenForm(node_11,{get disabled(){return get$3($0)},get initialMessage(){
return get$3(initialMessage)},get isLoading(){return get$3(isCurrentConversationLoading)},onFileRemove:handleFileRemove,onFileUpload:handleFileUpload,onSend:handleSendMessage,onStop:()=>chatStore.stopGeneration(),onSystemPromptAdd:handleSystemPromptAdd,get uploadedFiles(){return get$3(uploadedFiles)},set uploadedFiles($$value){set$1(uploadedFiles,$$value,!0)}})}reset(div_5),reset(div_2),reset(div_1),reset(div),bind_this(div,$$value=>set$1(chatScrollContainer,$$value),()=>get$3(chatScrollContainer)),
template_effect(()=>set_class(div_2,1,`pointer-events-none ${get$3(isEmpty)?"absolute bottom-[calc(50dvh-7rem)]":"sticky bottom-4"} right-4 left-4 mt-auto pt-16 transition-all duration-200`)),event("dragenter",div,handleDragEnter),event("dragleave",div,handleDragLeave),event("dragover",div,handleDragOver),event("drop",div,handleDrop),event("scroll",div,handleScroll),append($$anchor2,div)};if_block(node_1,$$render=>{get$3(isServerLoading)?$$render(consequent_1):$$render(alternate,-1)})}var node_12=sibling(
node_1,2);DialogFileUploadError(node_12,{get fileErrorData(){return get$3(fileErrorData)},get open(){return get$3(showFileErrorDialog)},set open($$value){set$1(showFileErrorDialog,$$value,!0)}});var node_13=sibling(node_12,2);DialogConfirmation(node_13,{title:"Delete Conversation",description:"Are you sure you want to delete this conversation? This action cannot be undone and will permanently remove all messages in this conversation.",confirmText:"Delete",cancelText:"Cancel",variant:"destructive",
get icon(){return Trash_2},onConfirm:handleDeleteConfirm,onCancel:()=>set$1(showDeleteDialog,!1),get open(){return get$3(showDeleteDialog)},set open($$value){set$1(showDeleteDialog,$$value,!0)}});var node_14=sibling(node_13,2);DialogEmptyFileAlert(node_14,{get emptyFiles(){return get$3(emptyFileNames)},onOpenChange:open2=>{open2||set$1(emptyFileNames,[],!0)},get open(){return get$3(showEmptyFileDialog)},set open($$value){set$1(showEmptyFileDialog,$$value,!0)}});var node_15=sibling(node_14,2);{let $0=user_derived(
()=>get$3(activeErrorDialog)?.message??""),$1=user_derived(()=>get$3(activeErrorDialog)?.contextInfo),$2=user_derived(()=>!!get$3(activeErrorDialog)),$3=user_derived(()=>get$3(activeErrorDialog)?.type??ErrorDialogType.SERVER);DialogChatError(node_15,{get message(){return get$3($0)},get contextInfo(){return get$3($1)},onOpenChange:handleErrorDialogOpenChange,get open(){return get$3($2)},get type(){return get$3($3)}})}append($$anchor,fragment),pop()}delegate(["click"]);var root$_=from_html('<div c\
lass="pointer-events-none fixed inset-0 z-50 flex items-center justify-center bg-black/50 backdrop-blur-sm"><div class="flex flex-col items-center justify-center rounded-2xl border-2 border-dashed border-border bg-background p-12 shadow-lg"><!> <p class="text-lg font-medium text-foreground">Attach a file</p> <p class="text-sm text-muted-foreground">Drop your files here to upload</p></div></div>');function ChatScreenDragOverlay($$anchor){var div=root$_(),div_1=child(div),node2=child(div_1);Upload(
node2,{class:"mb-4 h-12 w-12 text-muted-foreground"}),next$1(4),reset(div_1),reset(div),append($$anchor,div)}class DraftMessagesStore{drafts=new Map;getDraftMessage(chatId){const key2=chatId??NEW_CHAT_DRAFT_KEY;return this.drafts.get(key2)??{message:"",files:[]}}saveDraftMessage(chatId,message,files){const key2=chatId??NEW_CHAT_DRAFT_KEY;message||files.length>0?this.drafts.set(key2,{message,files:[...files]}):this.drafts.delete(key2)}clearDraftMessage(chatId){const key2=chatId??NEW_CHAT_DRAFT_KEY;
this.drafts.delete(key2)}}const draftMessagesStore=new DraftMessagesStore;function useDraftMessages(options){onMount$1(()=>{const chatId=options.getChatId(),draft=draftMessagesStore.getDraftMessage(chatId);(draft.message||draft.files.length>0)&&!options.getInitialMessage()&&(options.setMessage(draft.message),options.setFiles(draft.files))}),beforeNavigate(()=>{const chatId=options.getChatId();draftMessagesStore.saveDraftMessage(chatId,options.getMessage(),options.getFiles())}),afterNavigate(navigation=>{
if(navigation?.from!=null){const chatId=options.getChatId(),draft=draftMessagesStore.getDraftMessage(chatId);options.setMessage(draft.message),options.setFiles(draft.files)}});function clearDraft(){const chatId=options.getChatId();draftMessagesStore.clearDraftMessage(chatId)}return{clearDraft}}var root$Z=from_html('<div class="relative mx-auto max-w-[48rem]"><!></div>');function ChatScreenForm($$anchor,$$props){push$1($$props,!0);let disabled=prop($$props,"disabled",3,!1),initialMessage=prop($$props,
"initialMessage",3,""),isLoading2=prop($$props,"isLoading",3,!1),uploadedFiles=prop($$props,"uploadedFiles",31,()=>proxy([])),chatFormRef=state$1(void 0),chatId=user_derived(()=>page$1.params.id),hasLoadingAttachments=user_derived(()=>uploadedFiles().some(f=>f.isLoading)),message=user_derived(initialMessage),previousIsLoading=user_derived(isLoading2),previousInitialMessage=user_derived(initialMessage);const{clearDraft}=useDraftMessages({getChatId:()=>get$3(chatId),getMessage:()=>get$3(message),getFiles:()=>uploadedFiles(),
setMessage:m=>set$1(message,m),setFiles:f=>uploadedFiles(f),getInitialMessage:()=>initialMessage()});function handleFilesAdd(files){$$props.onFileUpload?.(files)}async function handleSubmit(){if(!get$3(message).trim()&&uploadedFiles().length===0||disabled()||get$3(hasLoadingAttachments)||!get$3(chatFormRef)?.checkModelSelected())return;const messageToSend=get$3(message).trim(),filesToSend=[...uploadedFiles()];set$1(message,""),uploadedFiles([]),clearDraft(),get$3(chatFormRef)?.resetTextareaHeight(),
await $$props.onSend?.(messageToSend,filesToSend)||(set$1(message,messageToSend),uploadedFiles(filesToSend))}function handleSystemPromptClick(){$$props.onSystemPromptAdd?.({message:get$3(message),files:uploadedFiles()})}function handleUploadedFileRemove(fileId){$$props.onFileRemove?.(fileId)}onMount$1(()=>{setTimeout(()=>get$3(chatFormRef)?.focus(),10)}),afterNavigate(navigation=>{navigation?.from!=null&&setTimeout(()=>get$3(chatFormRef)?.focus(),10)}),user_effect(()=>{initialMessage()!==get$3(previousInitialMessage)&&
(set$1(message,initialMessage()),set$1(previousInitialMessage,initialMessage()))}),user_effect(()=>{get$3(previousIsLoading)&&!isLoading2()&&setTimeout(()=>get$3(chatFormRef)?.focus(),10),set$1(previousIsLoading,isLoading2())});var div=root$Z(),node2=child(div);bind_this(ChatForm(node2,{get class(){return $$props.class},get disabled(){return disabled()},get isLoading(){return isLoading2()},showMcpPromptButton:!0,onFilesAdd:handleFilesAdd,get onStop(){return $$props.onStop},onSubmit:handleSubmit,
onSystemPromptClick:handleSystemPromptClick,onUploadedFileRemove:handleUploadedFileRemove,get value(){return get$3(message)},set value($$value){set$1(message,$$value)},get uploadedFiles(){return uploadedFiles()},set uploadedFiles($$value){uploadedFiles($$value)}}),$$value=>set$1(chatFormRef,$$value,!0),()=>get$3(chatFormRef)),reset(div),append($$anchor,div),pop()}var root_1$u=from_html('<span class="chat-processing-info-detail pointer-events-auto backdrop-blur-sm svelte-1ktvj8d"> </span>'),root$Y=from_html(
'<div><div class="chat-processing-info-content svelte-1ktvj8d"></div></div>');function ChatScreenProcessingInfo($$anchor,$$props){push$1($$props,!0);const processingState=useProcessingState(),processingInfoCtx=getProcessingInfoContext();let showProcessingInfo=user_derived(()=>processingInfoCtx.showProcessingInfo),isCurrentConversationLoading=user_derived(isLoading),isStreaming=user_derived(isChatStreaming),processingDetails=user_derived(()=>processingState.getTechnicalDetails());user_effect(()=>{
const conversation=activeConversation();untrack$1(()=>chatStore.setActiveProcessingConversation(conversation?.id??null))}),user_effect(()=>{const keepStatsVisible=config$1().keepStatsVisible;if((keepStatsVisible||get$3(isCurrentConversationLoading)||get$3(isStreaming))&&processingState.startMonitoring(),!get$3(isCurrentConversationLoading)&&!get$3(isStreaming)&&!keepStatsVisible){const timeout=setTimeout(()=>{!config$1().keepStatsVisible&&!isChatStreaming()&&processingState.stopMonitoring()},PROCESSING_INFO_TIMEOUT);
return()=>clearTimeout(timeout)}}),user_effect(()=>{const conversation=activeConversation(),messages=activeMessages();if(config$1().keepStatsVisible&&conversation){if(messages.length===0){untrack$1(()=>chatStore.clearProcessingState(conversation.id));return}!get$3(isCurrentConversationLoading)&&!get$3(isStreaming)&&untrack$1(()=>chatStore.restoreProcessingStateFromMessages(messages,conversation.id))}});var div=root$Y(),div_1=child(div);each(div_1,20,()=>get$3(processingDetails),detail=>detail,($$anchor2,detail)=>{
var span=root_1$u(),text2=child(span,!0);reset(span),template_effect(()=>set_text(text2,detail)),append($$anchor2,span)}),reset(div_1),reset(div),template_effect(()=>set_class(div,1,clsx(["chat-processing-info-container pointer-events-none",get$3(showProcessingInfo)&&"visible"]),"svelte-1ktvj8d")),append($$anchor,div),pop()}const emptyOptions$7={};function toString$1(value,options){const settings=emptyOptions$7,includeImageAlt=typeof settings.includeImageAlt=="boolean"?settings.includeImageAlt:!0,
includeHtml=typeof settings.includeHtml=="boolean"?settings.includeHtml:!0;return one$2(value,includeImageAlt,includeHtml)}function one$2(value,includeImageAlt,includeHtml){if(node(value)){if("value"in value)return value.type==="html"&&!includeHtml?"":value.value;if(includeImageAlt&&"alt"in value&&value.alt)return value.alt;if("children"in value)return all$2(value.children,includeImageAlt,includeHtml)}return Array.isArray(value)?all$2(value,includeImageAlt,includeHtml):""}function all$2(values,includeImageAlt,includeHtml){
const result=[];let index2=-1;for(;++index2<values.length;)result[index2]=one$2(values[index2],includeImageAlt,includeHtml);return result.join("")}function node(value){return!!(value&&typeof value=="object")}const element$3=document.createElement("i");function decodeNamedCharacterReference(value){const characterReference2="&"+value+";";element$3.innerHTML=characterReference2;const character=element$3.textContent;return character.charCodeAt(character.length-1)===59&&value!=="semi"||character===characterReference2?
!1:character}function splice(list2,start2,remove2,items2){const end=list2.length;let chunkStart=0,parameters;if(start2<0?start2=-start2>end?0:end+start2:start2=start2>end?end:start2,remove2=remove2>0?remove2:0,items2.length<1e4)parameters=Array.from(items2),parameters.unshift(start2,remove2),list2.splice(...parameters);else for(remove2&&list2.splice(start2,remove2);chunkStart<items2.length;)parameters=items2.slice(chunkStart,chunkStart+1e4),parameters.unshift(start2,0),list2.splice(...parameters),
chunkStart+=1e4,start2+=1e4}function push(list2,items2){return list2.length>0?(splice(list2,list2.length,0,items2),list2):items2}const hasOwnProperty={}.hasOwnProperty;function combineExtensions(extensions){const all2={};let index2=-1;for(;++index2<extensions.length;)syntaxExtension(all2,extensions[index2]);return all2}function syntaxExtension(all2,extension2){let hook;for(hook in extension2){const left=(hasOwnProperty.call(all2,hook)?all2[hook]:void 0)||(all2[hook]={}),right=extension2[hook];let code2;
if(right)for(code2 in right){hasOwnProperty.call(left,code2)||(left[code2]=[]);const value=right[code2];constructs(left[code2],Array.isArray(value)?value:value?[value]:[])}}}function constructs(existing,list2){let index2=-1;const before=[];for(;++index2<list2.length;)(list2[index2].add==="after"?existing:before).push(list2[index2]);splice(existing,0,0,before)}function decodeNumericCharacterReference(value,base2){const code2=Number.parseInt(value,base2);return code2<9||code2===11||code2>13&&code2<
32||code2>126&&code2<160||code2>55295&&code2<57344||code2>64975&&code2<65008||(code2&65535)===65535||(code2&65535)===65534||code2>1114111?"�":String.fromCodePoint(code2)}function normalizeIdentifier(value){return value.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const asciiAlpha=regexCheck(/[A-Za-z]/),asciiAlphanumeric=regexCheck(/[\dA-Za-z]/),asciiAtext=regexCheck(/[#-'*+\--9=?A-Z^-~]/);function asciiControl(code2){return code2!==null&&(code2<32||code2===127)}const asciiDigit=regexCheck(
/\d/),asciiHexDigit=regexCheck(/[\dA-Fa-f]/),asciiPunctuation=regexCheck(/[!-/:-@[-`{-~]/);function markdownLineEnding(code2){return code2!==null&&code2<-2}function markdownLineEndingOrSpace(code2){return code2!==null&&(code2<0||code2===32)}function markdownSpace(code2){return code2===-2||code2===-1||code2===32}const unicodePunctuation=regexCheck(new RegExp("\\p{P}|\\p{S}","u")),unicodeWhitespace=regexCheck(/\s/);function regexCheck(regex){return check;function check(code2){return code2!==null&&
code2>-1&&regex.test(String.fromCharCode(code2))}}function normalizeUri(value){const result=[];let index2=-1,start2=0,skip=0;for(;++index2<value.length;){const code2=value.charCodeAt(index2);let replace2="";if(code2===37&&asciiAlphanumeric(value.charCodeAt(index2+1))&&asciiAlphanumeric(value.charCodeAt(index2+2)))skip=2;else if(code2<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(code2))||(replace2=String.fromCharCode(code2));else if(code2>55295&&code2<57344){const next2=value.charCodeAt(index2+
1);code2<56320&&next2>56319&&next2<57344?(replace2=String.fromCharCode(code2,next2),skip=1):replace2="�"}else replace2=String.fromCharCode(code2);replace2&&(result.push(value.slice(start2,index2),encodeURIComponent(replace2)),start2=index2+skip+1,replace2=""),skip&&(index2+=skip,skip=0)}return result.join("")+value.slice(start2)}function factorySpace(effects,ok,type2,max2){const limit2=max2?max2-1:Number.POSITIVE_INFINITY;let size2=0;return start2;function start2(code2){return markdownSpace(code2)?
(effects.enter(type2),prefix(code2)):ok(code2)}function prefix(code2){return markdownSpace(code2)&&size2++<limit2?(effects.consume(code2),prefix):(effects.exit(type2),ok(code2))}}const content$1={tokenize:initializeContent};function initializeContent(effects){const contentStart=effects.attempt(this.parser.constructs.contentInitial,afterContentStartConstruct,paragraphInitial);let previous2;return contentStart;function afterContentStartConstruct(code2){if(code2===null){effects.consume(code2);return}
return effects.enter("lineEnding"),effects.consume(code2),effects.exit("lineEnding"),factorySpace(effects,contentStart,"linePrefix")}function paragraphInitial(code2){return effects.enter("paragraph"),lineStart(code2)}function lineStart(code2){const token2=effects.enter("chunkText",{contentType:"text",previous:previous2});return previous2&&(previous2.next=token2),previous2=token2,data(code2)}function data(code2){if(code2===null){effects.exit("chunkText"),effects.exit("paragraph"),effects.consume(
code2);return}return markdownLineEnding(code2)?(effects.consume(code2),effects.exit("chunkText"),lineStart):(effects.consume(code2),data)}}const document$2={tokenize:initializeDocument},containerConstruct={tokenize:tokenizeContainer};function initializeDocument(effects){const self2=this,stack=[];let continued=0,childFlow,childToken,lineStartOffset;return start2;function start2(code2){if(continued<stack.length){const item=stack[continued];return self2.containerState=item[1],effects.attempt(item[0].
continuation,documentContinue,checkNewContainers)(code2)}return checkNewContainers(code2)}function documentContinue(code2){if(continued++,self2.containerState._closeFlow){self2.containerState._closeFlow=void 0,childFlow&&closeFlow();const indexBeforeExits=self2.events.length;let indexBeforeFlow=indexBeforeExits,point2;for(;indexBeforeFlow--;)if(self2.events[indexBeforeFlow][0]==="exit"&&self2.events[indexBeforeFlow][1].type==="chunkFlow"){point2=self2.events[indexBeforeFlow][1].end;break}exitContainers(
continued);let index2=indexBeforeExits;for(;index2<self2.events.length;)self2.events[index2][1].end={...point2},index2++;return splice(self2.events,indexBeforeFlow+1,0,self2.events.slice(indexBeforeExits)),self2.events.length=index2,checkNewContainers(code2)}return start2(code2)}function checkNewContainers(code2){if(continued===stack.length){if(!childFlow)return documentContinued(code2);if(childFlow.currentConstruct&&childFlow.currentConstruct.concrete)return flowStart(code2);self2.interrupt=!!(childFlow.
currentConstruct&&!childFlow._gfmTableDynamicInterruptHack)}return self2.containerState={},effects.check(containerConstruct,thereIsANewContainer,thereIsNoNewContainer)(code2)}function thereIsANewContainer(code2){return childFlow&&closeFlow(),exitContainers(continued),documentContinued(code2)}function thereIsNoNewContainer(code2){return self2.parser.lazy[self2.now().line]=continued!==stack.length,lineStartOffset=self2.now().offset,flowStart(code2)}function documentContinued(code2){return self2.containerState=
{},effects.attempt(containerConstruct,containerContinue,flowStart)(code2)}function containerContinue(code2){return continued++,stack.push([self2.currentConstruct,self2.containerState]),documentContinued(code2)}function flowStart(code2){if(code2===null){childFlow&&closeFlow(),exitContainers(0),effects.consume(code2);return}return childFlow=childFlow||self2.parser.flow(self2.now()),effects.enter("chunkFlow",{_tokenizer:childFlow,contentType:"flow",previous:childToken}),flowContinue(code2)}function flowContinue(code2){
if(code2===null){writeToChild(effects.exit("chunkFlow"),!0),exitContainers(0),effects.consume(code2);return}return markdownLineEnding(code2)?(effects.consume(code2),writeToChild(effects.exit("chunkFlow")),continued=0,self2.interrupt=void 0,start2):(effects.consume(code2),flowContinue)}function writeToChild(token2,endOfFile){const stream=self2.sliceStream(token2);if(endOfFile&&stream.push(null),token2.previous=childToken,childToken&&(childToken.next=token2),childToken=token2,childFlow.defineSkip(
token2.start),childFlow.write(stream),self2.parser.lazy[token2.start.line]){let index2=childFlow.events.length;for(;index2--;)if(childFlow.events[index2][1].start.offset<lineStartOffset&&(!childFlow.events[index2][1].end||childFlow.events[index2][1].end.offset>lineStartOffset))return;const indexBeforeExits=self2.events.length;let indexBeforeFlow=indexBeforeExits,seen2,point2;for(;indexBeforeFlow--;)if(self2.events[indexBeforeFlow][0]==="exit"&&self2.events[indexBeforeFlow][1].type==="chunkFlow"){
if(seen2){point2=self2.events[indexBeforeFlow][1].end;break}seen2=!0}for(exitContainers(continued),index2=indexBeforeExits;index2<self2.events.length;)self2.events[index2][1].end={...point2},index2++;splice(self2.events,indexBeforeFlow+1,0,self2.events.slice(indexBeforeExits)),self2.events.length=index2}}function exitContainers(size2){let index2=stack.length;for(;index2-- >size2;){const entry=stack[index2];self2.containerState=entry[1],entry[0].exit.call(self2,effects)}stack.length=size2}function closeFlow(){
childFlow.write([null]),childToken=void 0,childFlow=void 0,self2.containerState._closeFlow=void 0}}function tokenizeContainer(effects,ok,nok){return factorySpace(effects,effects.attempt(this.parser.constructs.document,ok,nok),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function classifyCharacter(code2){if(code2===null||markdownLineEndingOrSpace(code2)||unicodeWhitespace(code2))return 1;if(unicodePunctuation(code2))return 2}function resolveAll(constructs2,events,context){
const called=[];let index2=-1;for(;++index2<constructs2.length;){const resolve2=constructs2[index2].resolveAll;resolve2&&!called.includes(resolve2)&&(events=resolve2(events,context),called.push(resolve2))}return events}const attention={name:"attention",resolveAll:resolveAllAttention,tokenize:tokenizeAttention};function resolveAllAttention(events,context){let index2=-1,open2,group,text2,openingSequence,closingSequence,use,nextEvents,offset2;for(;++index2<events.length;)if(events[index2][0]==="ent\
er"&&events[index2][1].type==="attentionSequence"&&events[index2][1]._close){for(open2=index2;open2--;)if(events[open2][0]==="exit"&&events[open2][1].type==="attentionSequence"&&events[open2][1]._open&&context.sliceSerialize(events[open2][1]).charCodeAt(0)===context.sliceSerialize(events[index2][1]).charCodeAt(0)){if((events[open2][1]._close||events[index2][1]._open)&&(events[index2][1].end.offset-events[index2][1].start.offset)%3&&!((events[open2][1].end.offset-events[open2][1].start.offset+events[index2][1].
end.offset-events[index2][1].start.offset)%3))continue;use=events[open2][1].end.offset-events[open2][1].start.offset>1&&events[index2][1].end.offset-events[index2][1].start.offset>1?2:1;const start2={...events[open2][1].end},end={...events[index2][1].start};movePoint(start2,-use),movePoint(end,use),openingSequence={type:use>1?"strongSequence":"emphasisSequence",start:start2,end:{...events[open2][1].end}},closingSequence={type:use>1?"strongSequence":"emphasisSequence",start:{...events[index2][1].
start},end},text2={type:use>1?"strongText":"emphasisText",start:{...events[open2][1].end},end:{...events[index2][1].start}},group={type:use>1?"strong":"emphasis",start:{...openingSequence.start},end:{...closingSequence.end}},events[open2][1].end={...openingSequence.start},events[index2][1].start={...closingSequence.end},nextEvents=[],events[open2][1].end.offset-events[open2][1].start.offset&&(nextEvents=push(nextEvents,[["enter",events[open2][1],context],["exit",events[open2][1],context]])),nextEvents=
push(nextEvents,[["enter",group,context],["enter",openingSequence,context],["exit",openingSequence,context],["enter",text2,context]]),nextEvents=push(nextEvents,resolveAll(context.parser.constructs.insideSpan.null,events.slice(open2+1,index2),context)),nextEvents=push(nextEvents,[["exit",text2,context],["enter",closingSequence,context],["exit",closingSequence,context],["exit",group,context]]),events[index2][1].end.offset-events[index2][1].start.offset?(offset2=2,nextEvents=push(nextEvents,[["ent\
er",events[index2][1],context],["exit",events[index2][1],context]])):offset2=0,splice(events,open2-1,index2-open2+3,nextEvents),index2=open2+nextEvents.length-offset2-2;break}}for(index2=-1;++index2<events.length;)events[index2][1].type==="attentionSequence"&&(events[index2][1].type="data");return events}function tokenizeAttention(effects,ok){const attentionMarkers2=this.parser.constructs.attentionMarkers.null,previous2=this.previous,before=classifyCharacter(previous2);let marker;return start2;function start2(code2){
return marker=code2,effects.enter("attentionSequence"),inside(code2)}function inside(code2){if(code2===marker)return effects.consume(code2),inside;const token2=effects.exit("attentionSequence"),after=classifyCharacter(code2),open2=!after||after===2&&before||attentionMarkers2.includes(code2),close2=!before||before===2&&after||attentionMarkers2.includes(previous2);return token2._open=!!(marker===42?open2:open2&&(before||!close2)),token2._close=!!(marker===42?close2:close2&&(after||!open2)),ok(code2)}}
function movePoint(point2,offset2){point2.column+=offset2,point2.offset+=offset2,point2._bufferIndex+=offset2}const autolink={name:"autolink",tokenize:tokenizeAutolink};function tokenizeAutolink(effects,ok,nok){let size2=0;return start2;function start2(code2){return effects.enter("autolink"),effects.enter("autolinkMarker"),effects.consume(code2),effects.exit("autolinkMarker"),effects.enter("autolinkProtocol"),open2}function open2(code2){return asciiAlpha(code2)?(effects.consume(code2),schemeOrEmailAtext):
code2===64?nok(code2):emailAtext(code2)}function schemeOrEmailAtext(code2){return code2===43||code2===45||code2===46||asciiAlphanumeric(code2)?(size2=1,schemeInsideOrEmailAtext(code2)):emailAtext(code2)}function schemeInsideOrEmailAtext(code2){return code2===58?(effects.consume(code2),size2=0,urlInside):(code2===43||code2===45||code2===46||asciiAlphanumeric(code2))&&size2++<32?(effects.consume(code2),schemeInsideOrEmailAtext):(size2=0,emailAtext(code2))}function urlInside(code2){return code2===62?
(effects.exit("autolinkProtocol"),effects.enter("autolinkMarker"),effects.consume(code2),effects.exit("autolinkMarker"),effects.exit("autolink"),ok):code2===null||code2===32||code2===60||asciiControl(code2)?nok(code2):(effects.consume(code2),urlInside)}function emailAtext(code2){return code2===64?(effects.consume(code2),emailAtSignOrDot):asciiAtext(code2)?(effects.consume(code2),emailAtext):nok(code2)}function emailAtSignOrDot(code2){return asciiAlphanumeric(code2)?emailLabel(code2):nok(code2)}function emailLabel(code2){
return code2===46?(effects.consume(code2),size2=0,emailAtSignOrDot):code2===62?(effects.exit("autolinkProtocol").type="autolinkEmail",effects.enter("autolinkMarker"),effects.consume(code2),effects.exit("autolinkMarker"),effects.exit("autolink"),ok):emailValue(code2)}function emailValue(code2){if((code2===45||asciiAlphanumeric(code2))&&size2++<63){const next2=code2===45?emailValue:emailLabel;return effects.consume(code2),next2}return nok(code2)}}const blankLine={partial:!0,tokenize:tokenizeBlankLine};
function tokenizeBlankLine(effects,ok,nok){return start2;function start2(code2){return markdownSpace(code2)?factorySpace(effects,after,"linePrefix")(code2):after(code2)}function after(code2){return code2===null||markdownLineEnding(code2)?ok(code2):nok(code2)}}const blockQuote={continuation:{tokenize:tokenizeBlockQuoteContinuation},exit:exit$1,name:"blockQuote",tokenize:tokenizeBlockQuoteStart};function tokenizeBlockQuoteStart(effects,ok,nok){const self2=this;return start2;function start2(code2){
if(code2===62){const state2=self2.containerState;return state2.open||(effects.enter("blockQuote",{_container:!0}),state2.open=!0),effects.enter("blockQuotePrefix"),effects.enter("blockQuoteMarker"),effects.consume(code2),effects.exit("blockQuoteMarker"),after}return nok(code2)}function after(code2){return markdownSpace(code2)?(effects.enter("blockQuotePrefixWhitespace"),effects.consume(code2),effects.exit("blockQuotePrefixWhitespace"),effects.exit("blockQuotePrefix"),ok):(effects.exit("blockQuot\
ePrefix"),ok(code2))}}function tokenizeBlockQuoteContinuation(effects,ok,nok){const self2=this;return contStart;function contStart(code2){return markdownSpace(code2)?factorySpace(effects,contBefore,"linePrefix",self2.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(code2):contBefore(code2)}function contBefore(code2){return effects.attempt(blockQuote,ok,nok)(code2)}}function exit$1(effects){effects.exit("blockQuote")}const characterEscape={name:"characterEscape",tokenize:tokenizeCharacterEscape};
function tokenizeCharacterEscape(effects,ok,nok){return start2;function start2(code2){return effects.enter("characterEscape"),effects.enter("escapeMarker"),effects.consume(code2),effects.exit("escapeMarker"),inside}function inside(code2){return asciiPunctuation(code2)?(effects.enter("characterEscapeValue"),effects.consume(code2),effects.exit("characterEscapeValue"),effects.exit("characterEscape"),ok):nok(code2)}}const characterReference={name:"characterReference",tokenize:tokenizeCharacterReference};
function tokenizeCharacterReference(effects,ok,nok){const self2=this;let size2=0,max2,test;return start2;function start2(code2){return effects.enter("characterReference"),effects.enter("characterReferenceMarker"),effects.consume(code2),effects.exit("characterReferenceMarker"),open2}function open2(code2){return code2===35?(effects.enter("characterReferenceMarkerNumeric"),effects.consume(code2),effects.exit("characterReferenceMarkerNumeric"),numeric):(effects.enter("characterReferenceValue"),max2=
31,test=asciiAlphanumeric,value(code2))}function numeric(code2){return code2===88||code2===120?(effects.enter("characterReferenceMarkerHexadecimal"),effects.consume(code2),effects.exit("characterReferenceMarkerHexadecimal"),effects.enter("characterReferenceValue"),max2=6,test=asciiHexDigit,value):(effects.enter("characterReferenceValue"),max2=7,test=asciiDigit,value(code2))}function value(code2){if(code2===59&&size2){const token2=effects.exit("characterReferenceValue");return test===asciiAlphanumeric&&
!decodeNamedCharacterReference(self2.sliceSerialize(token2))?nok(code2):(effects.enter("characterReferenceMarker"),effects.consume(code2),effects.exit("characterReferenceMarker"),effects.exit("characterReference"),ok)}return test(code2)&&size2++<max2?(effects.consume(code2),value):nok(code2)}}const nonLazyContinuation$1={partial:!0,tokenize:tokenizeNonLazyContinuation$1},codeFenced={concrete:!0,name:"codeFenced",tokenize:tokenizeCodeFenced};function tokenizeCodeFenced(effects,ok,nok){const self2=this,
closeStart={partial:!0,tokenize:tokenizeCloseStart};let initialPrefix=0,sizeOpen=0,marker;return start2;function start2(code2){return beforeSequenceOpen(code2)}function beforeSequenceOpen(code2){const tail=self2.events[self2.events.length-1];return initialPrefix=tail&&tail[1].type==="linePrefix"?tail[2].sliceSerialize(tail[1],!0).length:0,marker=code2,effects.enter("codeFenced"),effects.enter("codeFencedFence"),effects.enter("codeFencedFenceSequence"),sequenceOpen(code2)}function sequenceOpen(code2){
return code2===marker?(sizeOpen++,effects.consume(code2),sequenceOpen):sizeOpen<3?nok(code2):(effects.exit("codeFencedFenceSequence"),markdownSpace(code2)?factorySpace(effects,infoBefore,"whitespace")(code2):infoBefore(code2))}function infoBefore(code2){return code2===null||markdownLineEnding(code2)?(effects.exit("codeFencedFence"),self2.interrupt?ok(code2):effects.check(nonLazyContinuation$1,atNonLazyBreak,after)(code2)):(effects.enter("codeFencedFenceInfo"),effects.enter("chunkString",{contentType:"\
string"}),info2(code2))}function info2(code2){return code2===null||markdownLineEnding(code2)?(effects.exit("chunkString"),effects.exit("codeFencedFenceInfo"),infoBefore(code2)):markdownSpace(code2)?(effects.exit("chunkString"),effects.exit("codeFencedFenceInfo"),factorySpace(effects,metaBefore,"whitespace")(code2)):code2===96&&code2===marker?nok(code2):(effects.consume(code2),info2)}function metaBefore(code2){return code2===null||markdownLineEnding(code2)?infoBefore(code2):(effects.enter("codeFe\
ncedFenceMeta"),effects.enter("chunkString",{contentType:"string"}),meta(code2))}function meta(code2){return code2===null||markdownLineEnding(code2)?(effects.exit("chunkString"),effects.exit("codeFencedFenceMeta"),infoBefore(code2)):code2===96&&code2===marker?nok(code2):(effects.consume(code2),meta)}function atNonLazyBreak(code2){return effects.attempt(closeStart,after,contentBefore)(code2)}function contentBefore(code2){return effects.enter("lineEnding"),effects.consume(code2),effects.exit("line\
Ending"),contentStart}function contentStart(code2){return initialPrefix>0&&markdownSpace(code2)?factorySpace(effects,beforeContentChunk,"linePrefix",initialPrefix+1)(code2):beforeContentChunk(code2)}function beforeContentChunk(code2){return code2===null||markdownLineEnding(code2)?effects.check(nonLazyContinuation$1,atNonLazyBreak,after)(code2):(effects.enter("codeFlowValue"),contentChunk(code2))}function contentChunk(code2){return code2===null||markdownLineEnding(code2)?(effects.exit("codeFlowVa\
lue"),beforeContentChunk(code2)):(effects.consume(code2),contentChunk)}function after(code2){return effects.exit("codeFenced"),ok(code2)}function tokenizeCloseStart(effects2,ok2,nok2){let size2=0;return startBefore;function startBefore(code2){return effects2.enter("lineEnding"),effects2.consume(code2),effects2.exit("lineEnding"),start3}function start3(code2){return effects2.enter("codeFencedFence"),markdownSpace(code2)?factorySpace(effects2,beforeSequenceClose,"linePrefix",self2.parser.constructs.
disable.null.includes("codeIndented")?void 0:4)(code2):beforeSequenceClose(code2)}function beforeSequenceClose(code2){return code2===marker?(effects2.enter("codeFencedFenceSequence"),sequenceClose(code2)):nok2(code2)}function sequenceClose(code2){return code2===marker?(size2++,effects2.consume(code2),sequenceClose):size2>=sizeOpen?(effects2.exit("codeFencedFenceSequence"),markdownSpace(code2)?factorySpace(effects2,sequenceCloseAfter,"whitespace")(code2):sequenceCloseAfter(code2)):nok2(code2)}function sequenceCloseAfter(code2){
return code2===null||markdownLineEnding(code2)?(effects2.exit("codeFencedFence"),ok2(code2)):nok2(code2)}}}function tokenizeNonLazyContinuation$1(effects,ok,nok){const self2=this;return start2;function start2(code2){return code2===null?nok(code2):(effects.enter("lineEnding"),effects.consume(code2),effects.exit("lineEnding"),lineStart)}function lineStart(code2){return self2.parser.lazy[self2.now().line]?nok(code2):ok(code2)}}const codeIndented={name:"codeIndented",tokenize:tokenizeCodeIndented},furtherStart={
partial:!0,tokenize:tokenizeFurtherStart};function tokenizeCodeIndented(effects,ok,nok){const self2=this;return start2;function start2(code2){return effects.enter("codeIndented"),factorySpace(effects,afterPrefix,"linePrefix",5)(code2)}function afterPrefix(code2){const tail=self2.events[self2.events.length-1];return tail&&tail[1].type==="linePrefix"&&tail[2].sliceSerialize(tail[1],!0).length>=4?atBreak(code2):nok(code2)}function atBreak(code2){return code2===null?after(code2):markdownLineEnding(code2)?
effects.attempt(furtherStart,atBreak,after)(code2):(effects.enter("codeFlowValue"),inside(code2))}function inside(code2){return code2===null||markdownLineEnding(code2)?(effects.exit("codeFlowValue"),atBreak(code2)):(effects.consume(code2),inside)}function after(code2){return effects.exit("codeIndented"),ok(code2)}}function tokenizeFurtherStart(effects,ok,nok){const self2=this;return furtherStart2;function furtherStart2(code2){return self2.parser.lazy[self2.now().line]?nok(code2):markdownLineEnding(
code2)?(effects.enter("lineEnding"),effects.consume(code2),effects.exit("lineEnding"),furtherStart2):factorySpace(effects,afterPrefix,"linePrefix",5)(code2)}function afterPrefix(code2){const tail=self2.events[self2.events.length-1];return tail&&tail[1].type==="linePrefix"&&tail[2].sliceSerialize(tail[1],!0).length>=4?ok(code2):markdownLineEnding(code2)?furtherStart2(code2):nok(code2)}}const codeText={name:"codeText",previous:previous$2,resolve:resolveCodeText,tokenize:tokenizeCodeText};function resolveCodeText(events){
let tailExitIndex=events.length-4,headEnterIndex=3,index2,enter;if((events[headEnterIndex][1].type==="lineEnding"||events[headEnterIndex][1].type==="space")&&(events[tailExitIndex][1].type==="lineEnding"||events[tailExitIndex][1].type==="space")){for(index2=headEnterIndex;++index2<tailExitIndex;)if(events[index2][1].type==="codeTextData"){events[headEnterIndex][1].type="codeTextPadding",events[tailExitIndex][1].type="codeTextPadding",headEnterIndex+=2,tailExitIndex-=2;break}}for(index2=headEnterIndex-
1,tailExitIndex++;++index2<=tailExitIndex;)enter===void 0?index2!==tailExitIndex&&events[index2][1].type!=="lineEnding"&&(enter=index2):(index2===tailExitIndex||events[index2][1].type==="lineEnding")&&(events[enter][1].type="codeTextData",index2!==enter+2&&(events[enter][1].end=events[index2-1][1].end,events.splice(enter+2,index2-enter-2),tailExitIndex-=index2-enter-2,index2=enter+2),enter=void 0);return events}function previous$2(code2){return code2!==96||this.events[this.events.length-1][1].type===
"characterEscape"}function tokenizeCodeText(effects,ok,nok){let sizeOpen=0,size2,token2;return start2;function start2(code2){return effects.enter("codeText"),effects.enter("codeTextSequence"),sequenceOpen(code2)}function sequenceOpen(code2){return code2===96?(effects.consume(code2),sizeOpen++,sequenceOpen):(effects.exit("codeTextSequence"),between2(code2))}function between2(code2){return code2===null?nok(code2):code2===32?(effects.enter("space"),effects.consume(code2),effects.exit("space"),between2):
code2===96?(token2=effects.enter("codeTextSequence"),size2=0,sequenceClose(code2)):markdownLineEnding(code2)?(effects.enter("lineEnding"),effects.consume(code2),effects.exit("lineEnding"),between2):(effects.enter("codeTextData"),data(code2))}function data(code2){return code2===null||code2===32||code2===96||markdownLineEnding(code2)?(effects.exit("codeTextData"),between2(code2)):(effects.consume(code2),data)}function sequenceClose(code2){return code2===96?(effects.consume(code2),size2++,sequenceClose):
size2===sizeOpen?(effects.exit("codeTextSequence"),effects.exit("codeText"),ok(code2)):(token2.type="codeTextData",data(code2))}}class SpliceBuffer{constructor(initial){this.left=initial?[...initial]:[],this.right=[]}get(index2){if(index2<0||index2>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+index2+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return index2<this.left.length?this.left[index2]:this.right[this.right.length-index2+this.
left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(start2,end){const stop=end??Number.POSITIVE_INFINITY;return stop<this.left.length?this.left.slice(start2,stop):start2>this.left.length?this.right.slice(this.right.length-stop+this.left.length,this.right.length-start2+this.left.length).reverse():this.left.slice(start2).concat(this.right.slice(this.right.length-stop+this.left.length).reverse())}splice(start2,deleteCount,items2){
const count=deleteCount||0;this.setCursor(Math.trunc(start2));const removed=this.right.splice(this.right.length-count,Number.POSITIVE_INFINITY);return items2&&chunkedPush(this.left,items2),removed.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(item){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(item)}pushMany(items2){this.setCursor(Number.POSITIVE_INFINITY),chunkedPush(this.left,items2)}unshift(item){this.setCursor(0),this.right.push(item)}unshiftMany(items2){
this.setCursor(0),chunkedPush(this.right,items2.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n<this.left.length){const removed=this.left.splice(n,Number.POSITIVE_INFINITY);chunkedPush(this.right,removed.reverse())}else{const removed=this.right.splice(this.left.length+this.right.length-n,Number.POSITIVE_INFINITY);chunkedPush(this.left,removed.reverse())}}}function chunkedPush(list2,right){let chunkStart=0;if(right.length<
1e4)list2.push(...right);else for(;chunkStart<right.length;)list2.push(...right.slice(chunkStart,chunkStart+1e4)),chunkStart+=1e4}function subtokenize(eventsArray){const jumps={};let index2=-1,event2,lineIndex,otherIndex,otherEvent,parameters,subevents,more;const events=new SpliceBuffer(eventsArray);for(;++index2<events.length;){for(;index2 in jumps;)index2=jumps[index2];if(event2=events.get(index2),index2&&event2[1].type==="chunkFlow"&&events.get(index2-1)[1].type==="listItemPrefix"&&(subevents=
event2[1]._tokenizer.events,otherIndex=0,otherIndex<subevents.length&&subevents[otherIndex][1].type==="lineEndingBlank"&&(otherIndex+=2),otherIndex<subevents.length&&subevents[otherIndex][1].type==="content"))for(;++otherIndex<subevents.length&&subevents[otherIndex][1].type!=="content";)subevents[otherIndex][1].type==="chunkText"&&(subevents[otherIndex][1]._isInFirstContentOfListItem=!0,otherIndex++);if(event2[0]==="enter")event2[1].contentType&&(Object.assign(jumps,subcontent(events,index2)),index2=
jumps[index2],more=!0);else if(event2[1]._container){for(otherIndex=index2,lineIndex=void 0;otherIndex--;)if(otherEvent=events.get(otherIndex),otherEvent[1].type==="lineEnding"||otherEvent[1].type==="lineEndingBlank")otherEvent[0]==="enter"&&(lineIndex&&(events.get(lineIndex)[1].type="lineEndingBlank"),otherEvent[1].type="lineEnding",lineIndex=otherIndex);else if(!(otherEvent[1].type==="linePrefix"||otherEvent[1].type==="listItemIndent"))break;lineIndex&&(event2[1].end={...events.get(lineIndex)[1].
start},parameters=events.slice(lineIndex,index2),parameters.unshift(event2),events.splice(lineIndex,index2-lineIndex+1,parameters))}}return splice(eventsArray,0,Number.POSITIVE_INFINITY,events.slice(0)),!more}function subcontent(events,eventIndex){const token2=events.get(eventIndex)[1],context=events.get(eventIndex)[2];let startPosition=eventIndex-1;const startPositions=[];let tokenizer=token2._tokenizer;tokenizer||(tokenizer=context.parser[token2.contentType](token2.start),token2._contentTypeTextTrailing&&
(tokenizer._contentTypeTextTrailing=!0));const childEvents=tokenizer.events,jumps=[],gaps={};let stream,previous2,index2=-1,current2=token2,adjust=0,start2=0;const breaks=[start2];for(;current2;){for(;events.get(++startPosition)[1]!==current2;);startPositions.push(startPosition),current2._tokenizer||(stream=context.sliceStream(current2),current2.next||stream.push(null),previous2&&tokenizer.defineSkip(current2.start),current2._isInFirstContentOfListItem&&(tokenizer._gfmTasklistFirstContentOfListItem=
!0),tokenizer.write(stream),current2._isInFirstContentOfListItem&&(tokenizer._gfmTasklistFirstContentOfListItem=void 0)),previous2=current2,current2=current2.next}for(current2=token2;++index2<childEvents.length;)childEvents[index2][0]==="exit"&&childEvents[index2-1][0]==="enter"&&childEvents[index2][1].type===childEvents[index2-1][1].type&&childEvents[index2][1].start.line!==childEvents[index2][1].end.line&&(start2=index2+1,breaks.push(start2),current2._tokenizer=void 0,current2.previous=void 0,
current2=current2.next);for(tokenizer.events=[],current2?(current2._tokenizer=void 0,current2.previous=void 0):breaks.pop(),index2=breaks.length;index2--;){const slice=childEvents.slice(breaks[index2],breaks[index2+1]),start3=startPositions.pop();jumps.push([start3,start3+slice.length-1]),events.splice(start3,2,slice)}for(jumps.reverse(),index2=-1;++index2<jumps.length;)gaps[adjust+jumps[index2][0]]=adjust+jumps[index2][1],adjust+=jumps[index2][1]-jumps[index2][0]-1;return gaps}const content={resolve:resolveContent,
tokenize:tokenizeContent},continuationConstruct={partial:!0,tokenize:tokenizeContinuation};function resolveContent(events){return subtokenize(events),events}function tokenizeContent(effects,ok){let previous2;return chunkStart;function chunkStart(code2){return effects.enter("content"),previous2=effects.enter("chunkContent",{contentType:"content"}),chunkInside(code2)}function chunkInside(code2){return code2===null?contentEnd(code2):markdownLineEnding(code2)?effects.check(continuationConstruct,contentContinue,
contentEnd)(code2):(effects.consume(code2),chunkInside)}function contentEnd(code2){return effects.exit("chunkContent"),effects.exit("content"),ok(code2)}function contentContinue(code2){return effects.consume(code2),effects.exit("chunkContent"),previous2.next=effects.enter("chunkContent",{contentType:"content",previous:previous2}),previous2=previous2.next,chunkInside}}function tokenizeContinuation(effects,ok,nok){const self2=this;return startLookahead;function startLookahead(code2){return effects.
exit("chunkContent"),effects.enter("lineEnding"),effects.consume(code2),effects.exit("lineEnding"),factorySpace(effects,prefixed,"linePrefix")}function prefixed(code2){if(code2===null||markdownLineEnding(code2))return nok(code2);const tail=self2.events[self2.events.length-1];return!self2.parser.constructs.disable.null.includes("codeIndented")&&tail&&tail[1].type==="linePrefix"&&tail[2].sliceSerialize(tail[1],!0).length>=4?ok(code2):effects.interrupt(self2.parser.constructs.flow,nok,ok)(code2)}}function factoryDestination(effects,ok,nok,type2,literalType,literalMarkerType,rawType,stringType,max2){
const limit2=max2||Number.POSITIVE_INFINITY;let balance=0;return start2;function start2(code2){return code2===60?(effects.enter(type2),effects.enter(literalType),effects.enter(literalMarkerType),effects.consume(code2),effects.exit(literalMarkerType),enclosedBefore):code2===null||code2===32||code2===41||asciiControl(code2)?nok(code2):(effects.enter(type2),effects.enter(rawType),effects.enter(stringType),effects.enter("chunkString",{contentType:"string"}),raw2(code2))}function enclosedBefore(code2){
return code2===62?(effects.enter(literalMarkerType),effects.consume(code2),effects.exit(literalMarkerType),effects.exit(literalType),effects.exit(type2),ok):(effects.enter(stringType),effects.enter("chunkString",{contentType:"string"}),enclosed(code2))}function enclosed(code2){return code2===62?(effects.exit("chunkString"),effects.exit(stringType),enclosedBefore(code2)):code2===null||code2===60||markdownLineEnding(code2)?nok(code2):(effects.consume(code2),code2===92?enclosedEscape:enclosed)}function enclosedEscape(code2){
return code2===60||code2===62||code2===92?(effects.consume(code2),enclosed):enclosed(code2)}function raw2(code2){return!balance&&(code2===null||code2===41||markdownLineEndingOrSpace(code2))?(effects.exit("chunkString"),effects.exit(stringType),effects.exit(rawType),effects.exit(type2),ok(code2)):balance<limit2&&code2===40?(effects.consume(code2),balance++,raw2):code2===41?(effects.consume(code2),balance--,raw2):code2===null||code2===32||code2===40||asciiControl(code2)?nok(code2):(effects.consume(
code2),code2===92?rawEscape:raw2)}function rawEscape(code2){return code2===40||code2===41||code2===92?(effects.consume(code2),raw2):raw2(code2)}}function factoryLabel(effects,ok,nok,type2,markerType,stringType){const self2=this;let size2=0,seen2;return start2;function start2(code2){return effects.enter(type2),effects.enter(markerType),effects.consume(code2),effects.exit(markerType),effects.enter(stringType),atBreak}function atBreak(code2){return size2>999||code2===null||code2===91||code2===93&&!seen2||
code2===94&&!size2&&"_hiddenFootnoteSupport"in self2.parser.constructs?nok(code2):code2===93?(effects.exit(stringType),effects.enter(markerType),effects.consume(code2),effects.exit(markerType),effects.exit(type2),ok):markdownLineEnding(code2)?(effects.enter("lineEnding"),effects.consume(code2),effects.exit("lineEnding"),atBreak):(effects.enter("chunkString",{contentType:"string"}),labelInside(code2))}function labelInside(code2){return code2===null||code2===91||code2===93||markdownLineEnding(code2)||
size2++>999?(effects.exit("chunkString"),atBreak(code2)):(effects.consume(code2),seen2||(seen2=!markdownSpace(code2)),code2===92?labelEscape:labelInside)}function labelEscape(code2){return code2===91||code2===92||code2===93?(effects.consume(code2),size2++,labelInside):labelInside(code2)}}function factoryTitle(effects,ok,nok,type2,markerType,stringType){let marker;return start2;function start2(code2){return code2===34||code2===39||code2===40?(effects.enter(type2),effects.enter(markerType),effects.
consume(code2),effects.exit(markerType),marker=code2===40?41:code2,begin):nok(code2)}function begin(code2){return code2===marker?(effects.enter(markerType),effects.consume(code2),effects.exit(markerType),effects.exit(type2),ok):(effects.enter(stringType),atBreak(code2))}function atBreak(code2){return code2===marker?(effects.exit(stringType),begin(marker)):code2===null?nok(code2):markdownLineEnding(code2)?(effects.enter("lineEnding"),effects.consume(code2),effects.exit("lineEnding"),factorySpace(
effects,atBreak,"linePrefix")):(effects.enter("chunkString",{contentType:"string"}),inside(code2))}function inside(code2){return code2===marker||code2===null||markdownLineEnding(code2)?(effects.exit("chunkString"),atBreak(code2)):(effects.consume(code2),code2===92?escape2:inside)}function escape2(code2){return code2===marker||code2===92?(effects.consume(code2),inside):inside(code2)}}function factoryWhitespace(effects,ok){let seen2;return start2;function start2(code2){return markdownLineEnding(code2)?
(effects.enter("lineEnding"),effects.consume(code2),effects.exit("lineEnding"),seen2=!0,start2):markdownSpace(code2)?factorySpace(effects,start2,seen2?"linePrefix":"lineSuffix")(code2):ok(code2)}}const definition$1={name:"definition",tokenize:tokenizeDefinition},titleBefore={partial:!0,tokenize:tokenizeTitleBefore};function tokenizeDefinition(effects,ok,nok){const self2=this;let identifier2;return start2;function start2(code2){return effects.enter("definition"),before(code2)}function before(code2){
return factoryLabel.call(self2,effects,labelAfter,nok,"definitionLabel","definitionLabelMarker","definitionLabelString")(code2)}function labelAfter(code2){return identifier2=normalizeIdentifier(self2.sliceSerialize(self2.events[self2.events.length-1][1]).slice(1,-1)),code2===58?(effects.enter("definitionMarker"),effects.consume(code2),effects.exit("definitionMarker"),markerAfter):nok(code2)}function markerAfter(code2){return markdownLineEndingOrSpace(code2)?factoryWhitespace(effects,destinationBefore)(
code2):destinationBefore(code2)}function destinationBefore(code2){return factoryDestination(effects,destinationAfter,nok,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(code2)}function destinationAfter(code2){return effects.attempt(titleBefore,after,after)(code2)}function after(code2){return markdownSpace(code2)?factorySpace(effects,afterWhitespace,"whitespace")(code2):afterWhitespace(code2)}function afterWhitespace(code2){
return code2===null||markdownLineEnding(code2)?(effects.exit("definition"),self2.parser.defined.push(identifier2),ok(code2)):nok(code2)}}function tokenizeTitleBefore(effects,ok,nok){return titleBefore2;function titleBefore2(code2){return markdownLineEndingOrSpace(code2)?factoryWhitespace(effects,beforeMarker)(code2):nok(code2)}function beforeMarker(code2){return factoryTitle(effects,titleAfter,nok,"definitionTitle","definitionTitleMarker","definitionTitleString")(code2)}function titleAfter(code2){
return markdownSpace(code2)?factorySpace(effects,titleAfterOptionalWhitespace,"whitespace")(code2):titleAfterOptionalWhitespace(code2)}function titleAfterOptionalWhitespace(code2){return code2===null||markdownLineEnding(code2)?ok(code2):nok(code2)}}const hardBreakEscape={name:"hardBreakEscape",tokenize:tokenizeHardBreakEscape};function tokenizeHardBreakEscape(effects,ok,nok){return start2;function start2(code2){return effects.enter("hardBreakEscape"),effects.consume(code2),after}function after(code2){
return markdownLineEnding(code2)?(effects.exit("hardBreakEscape"),ok(code2)):nok(code2)}}const headingAtx={name:"headingAtx",resolve:resolveHeadingAtx,tokenize:tokenizeHeadingAtx};function resolveHeadingAtx(events,context){let contentEnd=events.length-2,contentStart=3,content2,text2;return events[contentStart][1].type==="whitespace"&&(contentStart+=2),contentEnd-2>contentStart&&events[contentEnd][1].type==="whitespace"&&(contentEnd-=2),events[contentEnd][1].type==="atxHeadingSequence"&&(contentStart===
contentEnd-1||contentEnd-4>contentStart&&events[contentEnd-2][1].type==="whitespace")&&(contentEnd-=contentStart+1===contentEnd?2:4),contentEnd>contentStart&&(content2={type:"atxHeadingText",start:events[contentStart][1].start,end:events[contentEnd][1].end},text2={type:"chunkText",start:events[contentStart][1].start,end:events[contentEnd][1].end,contentType:"text"},splice(events,contentStart,contentEnd-contentStart+1,[["enter",content2,context],["enter",text2,context],["exit",text2,context],["ex\
it",content2,context]])),events}function tokenizeHeadingAtx(effects,ok,nok){let size2=0;return start2;function start2(code2){return effects.enter("atxHeading"),before(code2)}function before(code2){return effects.enter("atxHeadingSequence"),sequenceOpen(code2)}function sequenceOpen(code2){return code2===35&&size2++<6?(effects.consume(code2),sequenceOpen):code2===null||markdownLineEndingOrSpace(code2)?(effects.exit("atxHeadingSequence"),atBreak(code2)):nok(code2)}function atBreak(code2){return code2===
35?(effects.enter("atxHeadingSequence"),sequenceFurther(code2)):code2===null||markdownLineEnding(code2)?(effects.exit("atxHeading"),ok(code2)):markdownSpace(code2)?factorySpace(effects,atBreak,"whitespace")(code2):(effects.enter("atxHeadingText"),data(code2))}function sequenceFurther(code2){return code2===35?(effects.consume(code2),sequenceFurther):(effects.exit("atxHeadingSequence"),atBreak(code2))}function data(code2){return code2===null||code2===35||markdownLineEndingOrSpace(code2)?(effects.exit(
"atxHeadingText"),atBreak(code2)):(effects.consume(code2),data)}}const htmlBlockNames=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","\
table","tbody","td","tfoot","th","thead","title","tr","track","ul"],htmlRawNames=["pre","script","style","textarea"],htmlFlow={concrete:!0,name:"htmlFlow",resolveTo:resolveToHtmlFlow,tokenize:tokenizeHtmlFlow},blankLineBefore={partial:!0,tokenize:tokenizeBlankLineBefore},nonLazyContinuationStart={partial:!0,tokenize:tokenizeNonLazyContinuationStart};function resolveToHtmlFlow(events){let index2=events.length;for(;index2--&&!(events[index2][0]==="enter"&&events[index2][1].type==="htmlFlow"););return index2>
1&&events[index2-2][1].type==="linePrefix"&&(events[index2][1].start=events[index2-2][1].start,events[index2+1][1].start=events[index2-2][1].start,events.splice(index2-2,2)),events}function tokenizeHtmlFlow(effects,ok,nok){const self2=this;let marker,closingTag,buffer,index2,markerB;return start2;function start2(code2){return before(code2)}function before(code2){return effects.enter("htmlFlow"),effects.enter("htmlFlowData"),effects.consume(code2),open2}function open2(code2){return code2===33?(effects.
consume(code2),declarationOpen):code2===47?(effects.consume(code2),closingTag=!0,tagCloseStart):code2===63?(effects.consume(code2),marker=3,self2.interrupt?ok:continuationDeclarationInside):asciiAlpha(code2)?(effects.consume(code2),buffer=String.fromCharCode(code2),tagName):nok(code2)}function declarationOpen(code2){return code2===45?(effects.consume(code2),marker=2,commentOpenInside):code2===91?(effects.consume(code2),marker=5,index2=0,cdataOpenInside):asciiAlpha(code2)?(effects.consume(code2),
marker=4,self2.interrupt?ok:continuationDeclarationInside):nok(code2)}function commentOpenInside(code2){return code2===45?(effects.consume(code2),self2.interrupt?ok:continuationDeclarationInside):nok(code2)}function cdataOpenInside(code2){const value="CDATA[";return code2===value.charCodeAt(index2++)?(effects.consume(code2),index2===value.length?self2.interrupt?ok:continuation:cdataOpenInside):nok(code2)}function tagCloseStart(code2){return asciiAlpha(code2)?(effects.consume(code2),buffer=String.
fromCharCode(code2),tagName):nok(code2)}function tagName(code2){if(code2===null||code2===47||code2===62||markdownLineEndingOrSpace(code2)){const slash=code2===47,name=buffer.toLowerCase();return!slash&&!closingTag&&htmlRawNames.includes(name)?(marker=1,self2.interrupt?ok(code2):continuation(code2)):htmlBlockNames.includes(buffer.toLowerCase())?(marker=6,slash?(effects.consume(code2),basicSelfClosing):self2.interrupt?ok(code2):continuation(code2)):(marker=7,self2.interrupt&&!self2.parser.lazy[self2.
now().line]?nok(code2):closingTag?completeClosingTagAfter(code2):completeAttributeNameBefore(code2))}return code2===45||asciiAlphanumeric(code2)?(effects.consume(code2),buffer+=String.fromCharCode(code2),tagName):nok(code2)}function basicSelfClosing(code2){return code2===62?(effects.consume(code2),self2.interrupt?ok:continuation):nok(code2)}function completeClosingTagAfter(code2){return markdownSpace(code2)?(effects.consume(code2),completeClosingTagAfter):completeEnd(code2)}function completeAttributeNameBefore(code2){
return code2===47?(effects.consume(code2),completeEnd):code2===58||code2===95||asciiAlpha(code2)?(effects.consume(code2),completeAttributeName):markdownSpace(code2)?(effects.consume(code2),completeAttributeNameBefore):completeEnd(code2)}function completeAttributeName(code2){return code2===45||code2===46||code2===58||code2===95||asciiAlphanumeric(code2)?(effects.consume(code2),completeAttributeName):completeAttributeNameAfter(code2)}function completeAttributeNameAfter(code2){return code2===61?(effects.
consume(code2),completeAttributeValueBefore):markdownSpace(code2)?(effects.consume(code2),completeAttributeNameAfter):completeAttributeNameBefore(code2)}function completeAttributeValueBefore(code2){return code2===null||code2===60||code2===61||code2===62||code2===96?nok(code2):code2===34||code2===39?(effects.consume(code2),markerB=code2,completeAttributeValueQuoted):markdownSpace(code2)?(effects.consume(code2),completeAttributeValueBefore):completeAttributeValueUnquoted(code2)}function completeAttributeValueQuoted(code2){
return code2===markerB?(effects.consume(code2),markerB=null,completeAttributeValueQuotedAfter):code2===null||markdownLineEnding(code2)?nok(code2):(effects.consume(code2),completeAttributeValueQuoted)}function completeAttributeValueUnquoted(code2){return code2===null||code2===34||code2===39||code2===47||code2===60||code2===61||code2===62||code2===96||markdownLineEndingOrSpace(code2)?completeAttributeNameAfter(code2):(effects.consume(code2),completeAttributeValueUnquoted)}function completeAttributeValueQuotedAfter(code2){
return code2===47||code2===62||markdownSpace(code2)?completeAttributeNameBefore(code2):nok(code2)}function completeEnd(code2){return code2===62?(effects.consume(code2),completeAfter):nok(code2)}function completeAfter(code2){return code2===null||markdownLineEnding(code2)?continuation(code2):markdownSpace(code2)?(effects.consume(code2),completeAfter):nok(code2)}function continuation(code2){return code2===45&&marker===2?(effects.consume(code2),continuationCommentInside):code2===60&&marker===1?(effects.
consume(code2),continuationRawTagOpen):code2===62&&marker===4?(effects.consume(code2),continuationClose):code2===63&&marker===3?(effects.consume(code2),continuationDeclarationInside):code2===93&&marker===5?(effects.consume(code2),continuationCdataInside):markdownLineEnding(code2)&&(marker===6||marker===7)?(effects.exit("htmlFlowData"),effects.check(blankLineBefore,continuationAfter,continuationStart)(code2)):code2===null||markdownLineEnding(code2)?(effects.exit("htmlFlowData"),continuationStart(
code2)):(effects.consume(code2),continuation)}function continuationStart(code2){return effects.check(nonLazyContinuationStart,continuationStartNonLazy,continuationAfter)(code2)}function continuationStartNonLazy(code2){return effects.enter("lineEnding"),effects.consume(code2),effects.exit("lineEnding"),continuationBefore}function continuationBefore(code2){return code2===null||markdownLineEnding(code2)?continuationStart(code2):(effects.enter("htmlFlowData"),continuation(code2))}function continuationCommentInside(code2){
return code2===45?(effects.consume(code2),continuationDeclarationInside):continuation(code2)}function continuationRawTagOpen(code2){return code2===47?(effects.consume(code2),buffer="",continuationRawEndTag):continuation(code2)}function continuationRawEndTag(code2){if(code2===62){const name=buffer.toLowerCase();return htmlRawNames.includes(name)?(effects.consume(code2),continuationClose):continuation(code2)}return asciiAlpha(code2)&&buffer.length<8?(effects.consume(code2),buffer+=String.fromCharCode(
code2),continuationRawEndTag):continuation(code2)}function continuationCdataInside(code2){return code2===93?(effects.consume(code2),continuationDeclarationInside):continuation(code2)}function continuationDeclarationInside(code2){return code2===62?(effects.consume(code2),continuationClose):code2===45&&marker===2?(effects.consume(code2),continuationDeclarationInside):continuation(code2)}function continuationClose(code2){return code2===null||markdownLineEnding(code2)?(effects.exit("htmlFlowData"),continuationAfter(
code2)):(effects.consume(code2),continuationClose)}function continuationAfter(code2){return effects.exit("htmlFlow"),ok(code2)}}function tokenizeNonLazyContinuationStart(effects,ok,nok){const self2=this;return start2;function start2(code2){return markdownLineEnding(code2)?(effects.enter("lineEnding"),effects.consume(code2),effects.exit("lineEnding"),after):nok(code2)}function after(code2){return self2.parser.lazy[self2.now().line]?nok(code2):ok(code2)}}function tokenizeBlankLineBefore(effects,ok,nok){
return start2;function start2(code2){return effects.enter("lineEnding"),effects.consume(code2),effects.exit("lineEnding"),effects.attempt(blankLine,ok,nok)}}const htmlText={name:"htmlText",tokenize:tokenizeHtmlText};function tokenizeHtmlText(effects,ok,nok){const self2=this;let marker,index2,returnState;return start2;function start2(code2){return effects.enter("htmlText"),effects.enter("htmlTextData"),effects.consume(code2),open2}function open2(code2){return code2===33?(effects.consume(code2),declarationOpen):
code2===47?(effects.consume(code2),tagCloseStart):code2===63?(effects.consume(code2),instruction):asciiAlpha(code2)?(effects.consume(code2),tagOpen):nok(code2)}function declarationOpen(code2){return code2===45?(effects.consume(code2),commentOpenInside):code2===91?(effects.consume(code2),index2=0,cdataOpenInside):asciiAlpha(code2)?(effects.consume(code2),declaration):nok(code2)}function commentOpenInside(code2){return code2===45?(effects.consume(code2),commentEnd):nok(code2)}function comment2(code2){
return code2===null?nok(code2):code2===45?(effects.consume(code2),commentClose):markdownLineEnding(code2)?(returnState=comment2,lineEndingBefore(code2)):(effects.consume(code2),comment2)}function commentClose(code2){return code2===45?(effects.consume(code2),commentEnd):comment2(code2)}function commentEnd(code2){return code2===62?end(code2):code2===45?commentClose(code2):comment2(code2)}function cdataOpenInside(code2){const value="CDATA[";return code2===value.charCodeAt(index2++)?(effects.consume(
code2),index2===value.length?cdata:cdataOpenInside):nok(code2)}function cdata(code2){return code2===null?nok(code2):code2===93?(effects.consume(code2),cdataClose):markdownLineEnding(code2)?(returnState=cdata,lineEndingBefore(code2)):(effects.consume(code2),cdata)}function cdataClose(code2){return code2===93?(effects.consume(code2),cdataEnd):cdata(code2)}function cdataEnd(code2){return code2===62?end(code2):code2===93?(effects.consume(code2),cdataEnd):cdata(code2)}function declaration(code2){return code2===
null||code2===62?end(code2):markdownLineEnding(code2)?(returnState=declaration,lineEndingBefore(code2)):(effects.consume(code2),declaration)}function instruction(code2){return code2===null?nok(code2):code2===63?(effects.consume(code2),instructionClose):markdownLineEnding(code2)?(returnState=instruction,lineEndingBefore(code2)):(effects.consume(code2),instruction)}function instructionClose(code2){return code2===62?end(code2):instruction(code2)}function tagCloseStart(code2){return asciiAlpha(code2)?
(effects.consume(code2),tagClose):nok(code2)}function tagClose(code2){return code2===45||asciiAlphanumeric(code2)?(effects.consume(code2),tagClose):tagCloseBetween(code2)}function tagCloseBetween(code2){return markdownLineEnding(code2)?(returnState=tagCloseBetween,lineEndingBefore(code2)):markdownSpace(code2)?(effects.consume(code2),tagCloseBetween):end(code2)}function tagOpen(code2){return code2===45||asciiAlphanumeric(code2)?(effects.consume(code2),tagOpen):code2===47||code2===62||markdownLineEndingOrSpace(
code2)?tagOpenBetween(code2):nok(code2)}function tagOpenBetween(code2){return code2===47?(effects.consume(code2),end):code2===58||code2===95||asciiAlpha(code2)?(effects.consume(code2),tagOpenAttributeName):markdownLineEnding(code2)?(returnState=tagOpenBetween,lineEndingBefore(code2)):markdownSpace(code2)?(effects.consume(code2),tagOpenBetween):end(code2)}function tagOpenAttributeName(code2){return code2===45||code2===46||code2===58||code2===95||asciiAlphanumeric(code2)?(effects.consume(code2),tagOpenAttributeName):
tagOpenAttributeNameAfter(code2)}function tagOpenAttributeNameAfter(code2){return code2===61?(effects.consume(code2),tagOpenAttributeValueBefore):markdownLineEnding(code2)?(returnState=tagOpenAttributeNameAfter,lineEndingBefore(code2)):markdownSpace(code2)?(effects.consume(code2),tagOpenAttributeNameAfter):tagOpenBetween(code2)}function tagOpenAttributeValueBefore(code2){return code2===null||code2===60||code2===61||code2===62||code2===96?nok(code2):code2===34||code2===39?(effects.consume(code2),
marker=code2,tagOpenAttributeValueQuoted):markdownLineEnding(code2)?(returnState=tagOpenAttributeValueBefore,lineEndingBefore(code2)):markdownSpace(code2)?(effects.consume(code2),tagOpenAttributeValueBefore):(effects.consume(code2),tagOpenAttributeValueUnquoted)}function tagOpenAttributeValueQuoted(code2){return code2===marker?(effects.consume(code2),marker=void 0,tagOpenAttributeValueQuotedAfter):code2===null?nok(code2):markdownLineEnding(code2)?(returnState=tagOpenAttributeValueQuoted,lineEndingBefore(
code2)):(effects.consume(code2),tagOpenAttributeValueQuoted)}function tagOpenAttributeValueUnquoted(code2){return code2===null||code2===34||code2===39||code2===60||code2===61||code2===96?nok(code2):code2===47||code2===62||markdownLineEndingOrSpace(code2)?tagOpenBetween(code2):(effects.consume(code2),tagOpenAttributeValueUnquoted)}function tagOpenAttributeValueQuotedAfter(code2){return code2===47||code2===62||markdownLineEndingOrSpace(code2)?tagOpenBetween(code2):nok(code2)}function end(code2){return code2===
62?(effects.consume(code2),effects.exit("htmlTextData"),effects.exit("htmlText"),ok):nok(code2)}function lineEndingBefore(code2){return effects.exit("htmlTextData"),effects.enter("lineEnding"),effects.consume(code2),effects.exit("lineEnding"),lineEndingAfter}function lineEndingAfter(code2){return markdownSpace(code2)?factorySpace(effects,lineEndingAfterPrefix,"linePrefix",self2.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(code2):lineEndingAfterPrefix(code2)}function lineEndingAfterPrefix(code2){
return effects.enter("htmlTextData"),returnState(code2)}}const labelEnd={name:"labelEnd",resolveAll:resolveAllLabelEnd,resolveTo:resolveToLabelEnd,tokenize:tokenizeLabelEnd},resourceConstruct={tokenize:tokenizeResource},referenceFullConstruct={tokenize:tokenizeReferenceFull},referenceCollapsedConstruct={tokenize:tokenizeReferenceCollapsed};function resolveAllLabelEnd(events){let index2=-1;const newEvents=[];for(;++index2<events.length;){const token2=events[index2][1];if(newEvents.push(events[index2]),
token2.type==="labelImage"||token2.type==="labelLink"||token2.type==="labelEnd"){const offset2=token2.type==="labelImage"?4:2;token2.type="data",index2+=offset2}}return events.length!==newEvents.length&&splice(events,0,events.length,newEvents),events}function resolveToLabelEnd(events,context){let index2=events.length,offset2=0,token2,open2,close2,media;for(;index2--;)if(token2=events[index2][1],open2){if(token2.type==="link"||token2.type==="labelLink"&&token2._inactive)break;events[index2][0]===
"enter"&&token2.type==="labelLink"&&(token2._inactive=!0)}else if(close2){if(events[index2][0]==="enter"&&(token2.type==="labelImage"||token2.type==="labelLink")&&!token2._balanced&&(open2=index2,token2.type!=="labelLink")){offset2=2;break}}else token2.type==="labelEnd"&&(close2=index2);const group={type:events[open2][1].type==="labelLink"?"link":"image",start:{...events[open2][1].start},end:{...events[events.length-1][1].end}},label={type:"label",start:{...events[open2][1].start},end:{...events[close2][1].
end}},text2={type:"labelText",start:{...events[open2+offset2+2][1].end},end:{...events[close2-2][1].start}};return media=[["enter",group,context],["enter",label,context]],media=push(media,events.slice(open2+1,open2+offset2+3)),media=push(media,[["enter",text2,context]]),media=push(media,resolveAll(context.parser.constructs.insideSpan.null,events.slice(open2+offset2+4,close2-3),context)),media=push(media,[["exit",text2,context],events[close2-2],events[close2-1],["exit",label,context]]),media=push(
media,events.slice(close2+1)),media=push(media,[["exit",group,context]]),splice(events,open2,events.length,media),events}function tokenizeLabelEnd(effects,ok,nok){const self2=this;let index2=self2.events.length,labelStart,defined;for(;index2--;)if((self2.events[index2][1].type==="labelImage"||self2.events[index2][1].type==="labelLink")&&!self2.events[index2][1]._balanced){labelStart=self2.events[index2][1];break}return start2;function start2(code2){return labelStart?labelStart._inactive?labelEndNok(
code2):(defined=self2.parser.defined.includes(normalizeIdentifier(self2.sliceSerialize({start:labelStart.end,end:self2.now()}))),effects.enter("labelEnd"),effects.enter("labelMarker"),effects.consume(code2),effects.exit("labelMarker"),effects.exit("labelEnd"),after):nok(code2)}function after(code2){return code2===40?effects.attempt(resourceConstruct,labelEndOk,defined?labelEndOk:labelEndNok)(code2):code2===91?effects.attempt(referenceFullConstruct,labelEndOk,defined?referenceNotFull:labelEndNok)(
code2):defined?labelEndOk(code2):labelEndNok(code2)}function referenceNotFull(code2){return effects.attempt(referenceCollapsedConstruct,labelEndOk,labelEndNok)(code2)}function labelEndOk(code2){return ok(code2)}function labelEndNok(code2){return labelStart._balanced=!0,nok(code2)}}function tokenizeResource(effects,ok,nok){return resourceStart;function resourceStart(code2){return effects.enter("resource"),effects.enter("resourceMarker"),effects.consume(code2),effects.exit("resourceMarker"),resourceBefore}
function resourceBefore(code2){return markdownLineEndingOrSpace(code2)?factoryWhitespace(effects,resourceOpen)(code2):resourceOpen(code2)}function resourceOpen(code2){return code2===41?resourceEnd(code2):factoryDestination(effects,resourceDestinationAfter,resourceDestinationMissing,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(code2)}function resourceDestinationAfter(code2){return markdownLineEndingOrSpace(
code2)?factoryWhitespace(effects,resourceBetween)(code2):resourceEnd(code2)}function resourceDestinationMissing(code2){return nok(code2)}function resourceBetween(code2){return code2===34||code2===39||code2===40?factoryTitle(effects,resourceTitleAfter,nok,"resourceTitle","resourceTitleMarker","resourceTitleString")(code2):resourceEnd(code2)}function resourceTitleAfter(code2){return markdownLineEndingOrSpace(code2)?factoryWhitespace(effects,resourceEnd)(code2):resourceEnd(code2)}function resourceEnd(code2){
return code2===41?(effects.enter("resourceMarker"),effects.consume(code2),effects.exit("resourceMarker"),effects.exit("resource"),ok):nok(code2)}}function tokenizeReferenceFull(effects,ok,nok){const self2=this;return referenceFull;function referenceFull(code2){return factoryLabel.call(self2,effects,referenceFullAfter,referenceFullMissing,"reference","referenceMarker","referenceString")(code2)}function referenceFullAfter(code2){return self2.parser.defined.includes(normalizeIdentifier(self2.sliceSerialize(
self2.events[self2.events.length-1][1]).slice(1,-1)))?ok(code2):nok(code2)}function referenceFullMissing(code2){return nok(code2)}}function tokenizeReferenceCollapsed(effects,ok,nok){return referenceCollapsedStart;function referenceCollapsedStart(code2){return effects.enter("reference"),effects.enter("referenceMarker"),effects.consume(code2),effects.exit("referenceMarker"),referenceCollapsedOpen}function referenceCollapsedOpen(code2){return code2===93?(effects.enter("referenceMarker"),effects.consume(
code2),effects.exit("referenceMarker"),effects.exit("reference"),ok):nok(code2)}}const labelStartImage={name:"labelStartImage",resolveAll:labelEnd.resolveAll,tokenize:tokenizeLabelStartImage};function tokenizeLabelStartImage(effects,ok,nok){const self2=this;return start2;function start2(code2){return effects.enter("labelImage"),effects.enter("labelImageMarker"),effects.consume(code2),effects.exit("labelImageMarker"),open2}function open2(code2){return code2===91?(effects.enter("labelMarker"),effects.
consume(code2),effects.exit("labelMarker"),effects.exit("labelImage"),after):nok(code2)}function after(code2){return code2===94&&"_hiddenFootnoteSupport"in self2.parser.constructs?nok(code2):ok(code2)}}const labelStartLink={name:"labelStartLink",resolveAll:labelEnd.resolveAll,tokenize:tokenizeLabelStartLink};function tokenizeLabelStartLink(effects,ok,nok){const self2=this;return start2;function start2(code2){return effects.enter("labelLink"),effects.enter("labelMarker"),effects.consume(code2),effects.
exit("labelMarker"),effects.exit("labelLink"),after}function after(code2){return code2===94&&"_hiddenFootnoteSupport"in self2.parser.constructs?nok(code2):ok(code2)}}const lineEnding={name:"lineEnding",tokenize:tokenizeLineEnding};function tokenizeLineEnding(effects,ok){return start2;function start2(code2){return effects.enter("lineEnding"),effects.consume(code2),effects.exit("lineEnding"),factorySpace(effects,ok,"linePrefix")}}const thematicBreak$2={name:"thematicBreak",tokenize:tokenizeThematicBreak};
function tokenizeThematicBreak(effects,ok,nok){let size2=0,marker;return start2;function start2(code2){return effects.enter("thematicBreak"),before(code2)}function before(code2){return marker=code2,atBreak(code2)}function atBreak(code2){return code2===marker?(effects.enter("thematicBreakSequence"),sequence(code2)):size2>=3&&(code2===null||markdownLineEnding(code2))?(effects.exit("thematicBreak"),ok(code2)):nok(code2)}function sequence(code2){return code2===marker?(effects.consume(code2),size2++,
sequence):(effects.exit("thematicBreakSequence"),markdownSpace(code2)?factorySpace(effects,atBreak,"whitespace")(code2):atBreak(code2))}}const list$3={continuation:{tokenize:tokenizeListContinuation},exit:tokenizeListEnd,name:"list",tokenize:tokenizeListStart},listItemPrefixWhitespaceConstruct={partial:!0,tokenize:tokenizeListItemPrefixWhitespace},indentConstruct={partial:!0,tokenize:tokenizeIndent$1};function tokenizeListStart(effects,ok,nok){const self2=this,tail=self2.events[self2.events.length-
1];let initialSize=tail&&tail[1].type==="linePrefix"?tail[2].sliceSerialize(tail[1],!0).length:0,size2=0;return start2;function start2(code2){const kind=self2.containerState.type||(code2===42||code2===43||code2===45?"listUnordered":"listOrdered");if(kind==="listUnordered"?!self2.containerState.marker||code2===self2.containerState.marker:asciiDigit(code2)){if(self2.containerState.type||(self2.containerState.type=kind,effects.enter(kind,{_container:!0})),kind==="listUnordered")return effects.enter(
"listItemPrefix"),code2===42||code2===45?effects.check(thematicBreak$2,nok,atMarker)(code2):atMarker(code2);if(!self2.interrupt||code2===49)return effects.enter("listItemPrefix"),effects.enter("listItemValue"),inside(code2)}return nok(code2)}function inside(code2){return asciiDigit(code2)&&++size2<10?(effects.consume(code2),inside):(!self2.interrupt||size2<2)&&(self2.containerState.marker?code2===self2.containerState.marker:code2===41||code2===46)?(effects.exit("listItemValue"),atMarker(code2)):
nok(code2)}function atMarker(code2){return effects.enter("listItemMarker"),effects.consume(code2),effects.exit("listItemMarker"),self2.containerState.marker=self2.containerState.marker||code2,effects.check(blankLine,self2.interrupt?nok:onBlank,effects.attempt(listItemPrefixWhitespaceConstruct,endOfPrefix,otherPrefix))}function onBlank(code2){return self2.containerState.initialBlankLine=!0,initialSize++,endOfPrefix(code2)}function otherPrefix(code2){return markdownSpace(code2)?(effects.enter("lis\
tItemPrefixWhitespace"),effects.consume(code2),effects.exit("listItemPrefixWhitespace"),endOfPrefix):nok(code2)}function endOfPrefix(code2){return self2.containerState.size=initialSize+self2.sliceSerialize(effects.exit("listItemPrefix"),!0).length,ok(code2)}}function tokenizeListContinuation(effects,ok,nok){const self2=this;return self2.containerState._closeFlow=void 0,effects.check(blankLine,onBlank,notBlank);function onBlank(code2){return self2.containerState.furtherBlankLines=self2.containerState.
furtherBlankLines||self2.containerState.initialBlankLine,factorySpace(effects,ok,"listItemIndent",self2.containerState.size+1)(code2)}function notBlank(code2){return self2.containerState.furtherBlankLines||!markdownSpace(code2)?(self2.containerState.furtherBlankLines=void 0,self2.containerState.initialBlankLine=void 0,notInCurrentItem(code2)):(self2.containerState.furtherBlankLines=void 0,self2.containerState.initialBlankLine=void 0,effects.attempt(indentConstruct,ok,notInCurrentItem)(code2))}function notInCurrentItem(code2){
return self2.containerState._closeFlow=!0,self2.interrupt=void 0,factorySpace(effects,effects.attempt(list$3,ok,nok),"linePrefix",self2.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(code2)}}function tokenizeIndent$1(effects,ok,nok){const self2=this;return factorySpace(effects,afterPrefix,"listItemIndent",self2.containerState.size+1);function afterPrefix(code2){const tail=self2.events[self2.events.length-1];return tail&&tail[1].type==="listItemIndent"&&tail[2].sliceSerialize(tail[1],
!0).length===self2.containerState.size?ok(code2):nok(code2)}}function tokenizeListEnd(effects){effects.exit(this.containerState.type)}function tokenizeListItemPrefixWhitespace(effects,ok,nok){const self2=this;return factorySpace(effects,afterPrefix,"listItemPrefixWhitespace",self2.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function afterPrefix(code2){const tail=self2.events[self2.events.length-1];return!markdownSpace(code2)&&tail&&tail[1].type==="listItemPrefixWhitespace"?
ok(code2):nok(code2)}}const setextUnderline={name:"setextUnderline",resolveTo:resolveToSetextUnderline,tokenize:tokenizeSetextUnderline};function resolveToSetextUnderline(events,context){let index2=events.length,content2,text2,definition2;for(;index2--;)if(events[index2][0]==="enter"){if(events[index2][1].type==="content"){content2=index2;break}events[index2][1].type==="paragraph"&&(text2=index2)}else events[index2][1].type==="content"&&events.splice(index2,1),!definition2&&events[index2][1].type===
"definition"&&(definition2=index2);const heading2={type:"setextHeading",start:{...events[content2][1].start},end:{...events[events.length-1][1].end}};return events[text2][1].type="setextHeadingText",definition2?(events.splice(text2,0,["enter",heading2,context]),events.splice(definition2+1,0,["exit",events[content2][1],context]),events[content2][1].end={...events[definition2][1].end}):events[content2][1]=heading2,events.push(["exit",heading2,context]),events}function tokenizeSetextUnderline(effects,ok,nok){
const self2=this;let marker;return start2;function start2(code2){let index2=self2.events.length,paragraph2;for(;index2--;)if(self2.events[index2][1].type!=="lineEnding"&&self2.events[index2][1].type!=="linePrefix"&&self2.events[index2][1].type!=="content"){paragraph2=self2.events[index2][1].type==="paragraph";break}return!self2.parser.lazy[self2.now().line]&&(self2.interrupt||paragraph2)?(effects.enter("setextHeadingLine"),marker=code2,before(code2)):nok(code2)}function before(code2){return effects.
enter("setextHeadingLineSequence"),inside(code2)}function inside(code2){return code2===marker?(effects.consume(code2),inside):(effects.exit("setextHeadingLineSequence"),markdownSpace(code2)?factorySpace(effects,after,"lineSuffix")(code2):after(code2))}function after(code2){return code2===null||markdownLineEnding(code2)?(effects.exit("setextHeadingLine"),ok(code2)):nok(code2)}}const flow$1={tokenize:initializeFlow};function initializeFlow(effects){const self2=this,initial=effects.attempt(blankLine,
atBlankEnding,effects.attempt(this.parser.constructs.flowInitial,afterConstruct,factorySpace(effects,effects.attempt(this.parser.constructs.flow,afterConstruct,effects.attempt(content,afterConstruct)),"linePrefix")));return initial;function atBlankEnding(code2){if(code2===null){effects.consume(code2);return}return effects.enter("lineEndingBlank"),effects.consume(code2),effects.exit("lineEndingBlank"),self2.currentConstruct=void 0,initial}function afterConstruct(code2){if(code2===null){effects.consume(
code2);return}return effects.enter("lineEnding"),effects.consume(code2),effects.exit("lineEnding"),self2.currentConstruct=void 0,initial}}const resolver={resolveAll:createResolver()},string$1=initializeFactory("string"),text$7=initializeFactory("text");function initializeFactory(field){return{resolveAll:createResolver(field==="text"?resolveAllLineSuffixes:void 0),tokenize:initializeText};function initializeText(effects){const self2=this,constructs2=this.parser.constructs[field],text2=effects.attempt(
constructs2,start2,notText);return start2;function start2(code2){return atBreak(code2)?text2(code2):notText(code2)}function notText(code2){if(code2===null){effects.consume(code2);return}return effects.enter("data"),effects.consume(code2),data}function data(code2){return atBreak(code2)?(effects.exit("data"),text2(code2)):(effects.consume(code2),data)}function atBreak(code2){if(code2===null)return!0;const list2=constructs2[code2];let index2=-1;if(list2)for(;++index2<list2.length;){const item=list2[index2];
if(!item.previous||item.previous.call(self2,self2.previous))return!0}return!1}}}function createResolver(extraResolver){return resolveAllText;function resolveAllText(events,context){let index2=-1,enter;for(;++index2<=events.length;)enter===void 0?events[index2]&&events[index2][1].type==="data"&&(enter=index2,index2++):(!events[index2]||events[index2][1].type!=="data")&&(index2!==enter+2&&(events[enter][1].end=events[index2-1][1].end,events.splice(enter+2,index2-enter-2),index2=enter+2),enter=void 0);
return extraResolver?extraResolver(events,context):events}}function resolveAllLineSuffixes(events,context){let eventIndex=0;for(;++eventIndex<=events.length;)if((eventIndex===events.length||events[eventIndex][1].type==="lineEnding")&&events[eventIndex-1][1].type==="data"){const data=events[eventIndex-1][1],chunks=context.sliceStream(data);let index2=chunks.length,bufferIndex=-1,size2=0,tabs;for(;index2--;){const chunk=chunks[index2];if(typeof chunk=="string"){for(bufferIndex=chunk.length;chunk.charCodeAt(
bufferIndex-1)===32;)size2++,bufferIndex--;if(bufferIndex)break;bufferIndex=-1}else if(chunk===-2)tabs=!0,size2++;else if(chunk!==-1){index2++;break}}if(context._contentTypeTextTrailing&&eventIndex===events.length&&(size2=0),size2){const token2={type:eventIndex===events.length||tabs||size2<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:index2?bufferIndex:data.start._bufferIndex+bufferIndex,_index:data.start._index+index2,line:data.end.line,column:data.end.column-size2,offset:data.end.offset-
size2},end:{...data.end}};data.end={...token2.start},data.start.offset===data.end.offset?Object.assign(data,token2):(events.splice(eventIndex,0,["enter",token2,context],["exit",token2,context]),eventIndex+=2)}eventIndex++}return events}const document$1={42:list$3,43:list$3,45:list$3,48:list$3,49:list$3,50:list$3,51:list$3,52:list$3,53:list$3,54:list$3,55:list$3,56:list$3,57:list$3,62:blockQuote},contentInitial={91:definition$1},flowInitial={[-2]:codeIndented,[-1]:codeIndented,32:codeIndented},flow={
35:headingAtx,42:thematicBreak$2,45:[setextUnderline,thematicBreak$2],60:htmlFlow,61:setextUnderline,95:thematicBreak$2,96:codeFenced,126:codeFenced},string={38:characterReference,92:characterEscape},text$6={[-5]:lineEnding,[-4]:lineEnding,[-3]:lineEnding,33:labelStartImage,38:characterReference,42:attention,60:[autolink,htmlText],91:labelStartLink,92:[hardBreakEscape,characterEscape],93:labelEnd,95:attention,96:codeText},insideSpan={null:[attention,resolver]},attentionMarkers={null:[42,95]},disable={
null:[]},defaultConstructs=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers,contentInitial,disable,document:document$1,flow,flowInitial,insideSpan,string,text:text$6},Symbol.toStringTag,{value:"Module"}));function createTokenizer(parser,initialize2,from){let point2={_bufferIndex:-1,_index:0,line:from&&from.line||1,column:from&&from.column||1,offset:from&&from.offset||0};const columnStart={},resolveAllConstructs=[];let chunks=[],stack=[];const effects={attempt:constructFactory(
onsuccessfulconstruct),check:constructFactory(onsuccessfulcheck),consume,enter,exit:exit2,interrupt:constructFactory(onsuccessfulcheck,{interrupt:!0})},context={code:null,containerState:{},defineSkip,events:[],now:now2,parser,previous:null,sliceSerialize,sliceStream,write};let state2=initialize2.tokenize.call(context,effects);return initialize2.resolveAll&&resolveAllConstructs.push(initialize2),context;function write(slice){return chunks=push(chunks,slice),main2(),chunks[chunks.length-1]!==null?
[]:(addResult(initialize2,0),context.events=resolveAll(resolveAllConstructs,context.events,context),context.events)}function sliceSerialize(token2,expandTabs){return serializeChunks(sliceStream(token2),expandTabs)}function sliceStream(token2){return sliceChunks(chunks,token2)}function now2(){const{_bufferIndex,_index,line,column,offset:offset2}=point2;return{_bufferIndex,_index,line,column,offset:offset2}}function defineSkip(value){columnStart[value.line]=value.column,accountForPotentialSkip()}function main2(){
let chunkIndex;for(;point2._index<chunks.length;){const chunk=chunks[point2._index];if(typeof chunk=="string")for(chunkIndex=point2._index,point2._bufferIndex<0&&(point2._bufferIndex=0);point2._index===chunkIndex&&point2._bufferIndex<chunk.length;)go2(chunk.charCodeAt(point2._bufferIndex));else go2(chunk)}}function go2(code2){state2=state2(code2)}function consume(code2){markdownLineEnding(code2)?(point2.line++,point2.column=1,point2.offset+=code2===-3?2:1,accountForPotentialSkip()):code2!==-1&&(point2.
column++,point2.offset++),point2._bufferIndex<0?point2._index++:(point2._bufferIndex++,point2._bufferIndex===chunks[point2._index].length&&(point2._bufferIndex=-1,point2._index++)),context.previous=code2}function enter(type2,fields){const token2=fields||{};return token2.type=type2,token2.start=now2(),context.events.push(["enter",token2,context]),stack.push(token2),token2}function exit2(type2){const token2=stack.pop();return token2.end=now2(),context.events.push(["exit",token2,context]),token2}function onsuccessfulconstruct(construct,info2){
addResult(construct,info2.from)}function onsuccessfulcheck(_,info2){info2.restore()}function constructFactory(onreturn,fields){return hook;function hook(constructs2,returnState,bogusState){let listOfConstructs,constructIndex,currentConstruct,info2;return Array.isArray(constructs2)?handleListOfConstructs(constructs2):"tokenize"in constructs2?handleListOfConstructs([constructs2]):handleMapOfConstructs(constructs2);function handleMapOfConstructs(map2){return start2;function start2(code2){const left=code2!==
null&&map2[code2],all2=code2!==null&&map2.null,list2=[...Array.isArray(left)?left:left?[left]:[],...Array.isArray(all2)?all2:all2?[all2]:[]];return handleListOfConstructs(list2)(code2)}}function handleListOfConstructs(list2){return listOfConstructs=list2,constructIndex=0,list2.length===0?bogusState:handleConstruct(list2[constructIndex])}function handleConstruct(construct){return start2;function start2(code2){return info2=store(),currentConstruct=construct,construct.partial||(context.currentConstruct=
construct),construct.name&&context.parser.constructs.disable.null.includes(construct.name)?nok():construct.tokenize.call(fields?Object.assign(Object.create(context),fields):context,effects,ok,nok)(code2)}}function ok(code2){return onreturn(currentConstruct,info2),returnState}function nok(code2){return info2.restore(),++constructIndex<listOfConstructs.length?handleConstruct(listOfConstructs[constructIndex]):bogusState}}}function addResult(construct,from2){construct.resolveAll&&!resolveAllConstructs.
includes(construct)&&resolveAllConstructs.push(construct),construct.resolve&&splice(context.events,from2,context.events.length-from2,construct.resolve(context.events.slice(from2),context)),construct.resolveTo&&(context.events=construct.resolveTo(context.events,context))}function store(){const startPoint=now2(),startPrevious=context.previous,startCurrentConstruct=context.currentConstruct,startEventsIndex=context.events.length,startStack=Array.from(stack);return{from:startEventsIndex,restore};function restore(){
point2=startPoint,context.previous=startPrevious,context.currentConstruct=startCurrentConstruct,context.events.length=startEventsIndex,stack=startStack,accountForPotentialSkip()}}function accountForPotentialSkip(){point2.line in columnStart&&point2.column<2&&(point2.column=columnStart[point2.line],point2.offset+=columnStart[point2.line]-1)}}function sliceChunks(chunks,token2){const startIndex=token2.start._index,startBufferIndex=token2.start._bufferIndex,endIndex=token2.end._index,endBufferIndex=token2.
end._bufferIndex;let view;if(startIndex===endIndex)view=[chunks[startIndex].slice(startBufferIndex,endBufferIndex)];else{if(view=chunks.slice(startIndex,endIndex),startBufferIndex>-1){const head2=view[0];typeof head2=="string"?view[0]=head2.slice(startBufferIndex):view.shift()}endBufferIndex>0&&view.push(chunks[endIndex].slice(0,endBufferIndex))}return view}function serializeChunks(chunks,expandTabs){let index2=-1;const result=[];let atTab;for(;++index2<chunks.length;){const chunk=chunks[index2];
let value;if(typeof chunk=="string")value=chunk;else switch(chunk){case-5:{value="\r";break}case-4:{value=`
`;break}case-3:{value=`\r
`;break}case-2:{value=expandTabs?" ":"	";break}case-1:{if(!expandTabs&&atTab)continue;value=" ";break}default:value=String.fromCharCode(chunk)}atTab=chunk===-2,result.push(value)}return result.join("")}function parse$2(options){const parser={constructs:combineExtensions([defaultConstructs,...(options||{}).extensions||[]]),content:create2(content$1),defined:[],document:create2(document$2),flow:create2(flow$1),lazy:{},string:create2(string$1),text:create2(text$7)};return parser;function create2(initial){
return creator;function creator(from){return createTokenizer(parser,initial,from)}}}function postprocess(events){for(;!subtokenize(events););return events}const search$1=/[\0\t\n\r]/g;function preprocess(){let column=1,buffer="",start2=!0,atCarriageReturn;return preprocessor;function preprocessor(value,encoding,end){const chunks=[];let match,next2,startPosition,endPosition,code2;for(value=buffer+(typeof value=="string"?value.toString():new TextDecoder(encoding||void 0).decode(value)),startPosition=
0,buffer="",start2&&(value.charCodeAt(0)===65279&&startPosition++,start2=void 0);startPosition<value.length;){if(search$1.lastIndex=startPosition,match=search$1.exec(value),endPosition=match&&match.index!==void 0?match.index:value.length,code2=value.charCodeAt(endPosition),!match){buffer=value.slice(startPosition);break}if(code2===10&&startPosition===endPosition&&atCarriageReturn)chunks.push(-3),atCarriageReturn=void 0;else switch(atCarriageReturn&&(chunks.push(-5),atCarriageReturn=void 0),startPosition<
endPosition&&(chunks.push(value.slice(startPosition,endPosition)),column+=endPosition-startPosition),code2){case 0:{chunks.push(65533),column++;break}case 9:{for(next2=Math.ceil(column/4)*4,chunks.push(-2);column++<next2;)chunks.push(-1);break}case 10:{chunks.push(-4),column=1;break}default:atCarriageReturn=!0,column=1}startPosition=endPosition+1}return end&&(atCarriageReturn&&chunks.push(-5),buffer&&chunks.push(buffer),chunks.push(null)),chunks}}const characterEscapeOrReference=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;
function decodeString(value){return value.replace(characterEscapeOrReference,decode)}function decode($0,$1,$2){if($1)return $1;if($2.charCodeAt(0)===35){const head3=$2.charCodeAt(1),hex=head3===120||head3===88;return decodeNumericCharacterReference($2.slice(hex?2:1),hex?16:10)}return decodeNamedCharacterReference($2)||$0}function stringifyPosition$1(value){return!value||typeof value!="object"?"":"position"in value||"type"in value?position$2(value.position):"start"in value||"end"in value?position$2(
value):"line"in value||"column"in value?point$3(value):""}function point$3(point2){return index$1(point2&&point2.line)+":"+index$1(point2&&point2.column)}function position$2(pos){return point$3(pos&&pos.start)+"-"+point$3(pos&&pos.end)}function index$1(value){return value&&typeof value=="number"?value:1}const own$6={}.hasOwnProperty;function fromMarkdown(value,encoding,options){return typeof encoding!="string"&&(options=encoding,encoding=void 0),compiler(options)(postprocess(parse$2(options).document().
write(preprocess()(value,encoding,!0))))}function compiler(options){const config2={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:opener(link2),autolinkProtocol:onenterdata,autolinkEmail:onenterdata,atxHeading:opener(heading2),blockQuote:opener(blockQuote2),characterEscape:onenterdata,characterReference:onenterdata,codeFenced:opener(codeFlow),codeFencedFenceInfo:buffer,codeFencedFenceMeta:buffer,codeIndented:opener(codeFlow,buffer),codeText:opener(
codeText2,buffer),codeTextData:onenterdata,data:onenterdata,codeFlowValue:onenterdata,definition:opener(definition2),definitionDestinationString:buffer,definitionLabelString:buffer,definitionTitleString:buffer,emphasis:opener(emphasis2),hardBreakEscape:opener(hardBreak2),hardBreakTrailing:opener(hardBreak2),htmlFlow:opener(html2,buffer),htmlFlowData:onenterdata,htmlText:opener(html2,buffer),htmlTextData:onenterdata,image:opener(image2),label:buffer,link:opener(link2),listItem:opener(listItem2),listItemValue:onenterlistitemvalue,
listOrdered:opener(list2,onenterlistordered),listUnordered:opener(list2),paragraph:opener(paragraph2),reference:onenterreference,referenceString:buffer,resourceDestinationString:buffer,resourceTitleString:buffer,setextHeading:opener(heading2),strong:opener(strong2),thematicBreak:opener(thematicBreak2)},exit:{atxHeading:closer(),atxHeadingSequence:onexitatxheadingsequence,autolink:closer(),autolinkEmail:onexitautolinkemail,autolinkProtocol:onexitautolinkprotocol,blockQuote:closer(),characterEscapeValue:onexitdata,
characterReferenceMarkerHexadecimal:onexitcharacterreferencemarker,characterReferenceMarkerNumeric:onexitcharacterreferencemarker,characterReferenceValue:onexitcharacterreferencevalue,characterReference:onexitcharacterreference,codeFenced:closer(onexitcodefenced),codeFencedFence:onexitcodefencedfence,codeFencedFenceInfo:onexitcodefencedfenceinfo,codeFencedFenceMeta:onexitcodefencedfencemeta,codeFlowValue:onexitdata,codeIndented:closer(onexitcodeindented),codeText:closer(onexitcodetext),codeTextData:onexitdata,
data:onexitdata,definition:closer(),definitionDestinationString:onexitdefinitiondestinationstring,definitionLabelString:onexitdefinitionlabelstring,definitionTitleString:onexitdefinitiontitlestring,emphasis:closer(),hardBreakEscape:closer(onexithardbreak),hardBreakTrailing:closer(onexithardbreak),htmlFlow:closer(onexithtmlflow),htmlFlowData:onexitdata,htmlText:closer(onexithtmltext),htmlTextData:onexitdata,image:closer(onexitimage),label:onexitlabel,labelText:onexitlabeltext,lineEnding:onexitlineending,
link:closer(onexitlink),listItem:closer(),listOrdered:closer(),listUnordered:closer(),paragraph:closer(),referenceString:onexitreferencestring,resourceDestinationString:onexitresourcedestinationstring,resourceTitleString:onexitresourcetitlestring,resource:onexitresource,setextHeading:closer(onexitsetextheading),setextHeadingLineSequence:onexitsetextheadinglinesequence,setextHeadingText:onexitsetextheadingtext,strong:closer(),thematicBreak:closer()}};configure$1(config2,(options||{}).mdastExtensions||
[]);const data={};return compile2;function compile2(events){let tree={type:"root",children:[]};const context={stack:[tree],tokenStack:[],config:config2,enter,exit:exit2,buffer,resume,data},listStack=[];let index2=-1;for(;++index2<events.length;)if(events[index2][1].type==="listOrdered"||events[index2][1].type==="listUnordered")if(events[index2][0]==="enter")listStack.push(index2);else{const tail=listStack.pop();index2=prepareList(events,tail,index2)}for(index2=-1;++index2<events.length;){const handler=config2[events[index2][0]];
own$6.call(handler,events[index2][1].type)&&handler[events[index2][1].type].call(Object.assign({sliceSerialize:events[index2][2].sliceSerialize},context),events[index2][1])}if(context.tokenStack.length>0){const tail=context.tokenStack[context.tokenStack.length-1];(tail[1]||defaultOnError).call(context,void 0,tail[0])}for(tree.position={start:point$2(events.length>0?events[0][1].start:{line:1,column:1,offset:0}),end:point$2(events.length>0?events[events.length-2][1].end:{line:1,column:1,offset:0})},
index2=-1;++index2<config2.transforms.length;)tree=config2.transforms[index2](tree)||tree;return tree}function prepareList(events,start2,length){let index2=start2-1,containerBalance=-1,listSpread=!1,listItem3,lineIndex,firstBlankLineIndex,atMarker;for(;++index2<=length;){const event2=events[index2];switch(event2[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{event2[0]==="enter"?containerBalance++:containerBalance--,atMarker=void 0;break}case"lineEndingBlank":{event2[0]==="enter"&&
(listItem3&&!atMarker&&!containerBalance&&!firstBlankLineIndex&&(firstBlankLineIndex=index2),atMarker=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:atMarker=void 0}if(!containerBalance&&event2[0]==="enter"&&event2[1].type==="listItemPrefix"||containerBalance===-1&&event2[0]==="exit"&&(event2[1].type==="listUnordered"||event2[1].type==="listOrdered")){if(listItem3){let tailIndex=index2;for(lineIndex=void 0;tailIndex--;){
const tailEvent=events[tailIndex];if(tailEvent[1].type==="lineEnding"||tailEvent[1].type==="lineEndingBlank"){if(tailEvent[0]==="exit")continue;lineIndex&&(events[lineIndex][1].type="lineEndingBlank",listSpread=!0),tailEvent[1].type="lineEnding",lineIndex=tailIndex}else if(!(tailEvent[1].type==="linePrefix"||tailEvent[1].type==="blockQuotePrefix"||tailEvent[1].type==="blockQuotePrefixWhitespace"||tailEvent[1].type==="blockQuoteMarker"||tailEvent[1].type==="listItemIndent"))break}firstBlankLineIndex&&
(!lineIndex||firstBlankLineIndex<lineIndex)&&(listItem3._spread=!0),listItem3.end=Object.assign({},lineIndex?events[lineIndex][1].start:event2[1].end),events.splice(lineIndex||index2,0,["exit",listItem3,event2[2]]),index2++,length++}if(event2[1].type==="listItemPrefix"){const item={type:"listItem",_spread:!1,start:Object.assign({},event2[1].start),end:void 0};listItem3=item,events.splice(index2,0,["enter",item,event2[2]]),index2++,length++,firstBlankLineIndex=void 0,atMarker=!0}}}return events[start2][1].
_spread=listSpread,length}function opener(create2,and){return open2;function open2(token2){enter.call(this,create2(token2),token2),and&&and.call(this,token2)}}function buffer(){this.stack.push({type:"fragment",children:[]})}function enter(node2,token2,errorHandler){this.stack[this.stack.length-1].children.push(node2),this.stack.push(node2),this.tokenStack.push([token2,errorHandler||void 0]),node2.position={start:point$2(token2.start),end:void 0}}function closer(and){return close2;function close2(token2){
and&&and.call(this,token2),exit2.call(this,token2)}}function exit2(token2,onExitError){const node2=this.stack.pop(),open2=this.tokenStack.pop();if(open2)open2[0].type!==token2.type&&(onExitError?onExitError.call(this,token2,open2[0]):(open2[1]||defaultOnError).call(this,token2,open2[0]));else throw new Error("Cannot close `"+token2.type+"` ("+stringifyPosition$1({start:token2.start,end:token2.end})+"): it’s not open");node2.position.end=point$2(token2.end)}function resume(){return toString$1(this.
stack.pop())}function onenterlistordered(){this.data.expectingFirstListItemValue=!0}function onenterlistitemvalue(token2){if(this.data.expectingFirstListItemValue){const ancestor=this.stack[this.stack.length-2];ancestor.start=Number.parseInt(this.sliceSerialize(token2),10),this.data.expectingFirstListItemValue=void 0}}function onexitcodefencedfenceinfo(){const data2=this.resume(),node2=this.stack[this.stack.length-1];node2.lang=data2}function onexitcodefencedfencemeta(){const data2=this.resume(),
node2=this.stack[this.stack.length-1];node2.meta=data2}function onexitcodefencedfence(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function onexitcodefenced(){const data2=this.resume(),node2=this.stack[this.stack.length-1];node2.value=data2.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function onexitcodeindented(){const data2=this.resume(),node2=this.stack[this.stack.length-1];node2.value=data2.replace(/(\r?\n|\r)$/g,"")}function onexitdefinitionlabelstring(token2){
const label=this.resume(),node2=this.stack[this.stack.length-1];node2.label=label,node2.identifier=normalizeIdentifier(this.sliceSerialize(token2)).toLowerCase()}function onexitdefinitiontitlestring(){const data2=this.resume(),node2=this.stack[this.stack.length-1];node2.title=data2}function onexitdefinitiondestinationstring(){const data2=this.resume(),node2=this.stack[this.stack.length-1];node2.url=data2}function onexitatxheadingsequence(token2){const node2=this.stack[this.stack.length-1];if(!node2.
depth){const depth=this.sliceSerialize(token2).length;node2.depth=depth}}function onexitsetextheadingtext(){this.data.setextHeadingSlurpLineEnding=!0}function onexitsetextheadinglinesequence(token2){const node2=this.stack[this.stack.length-1];node2.depth=this.sliceSerialize(token2).codePointAt(0)===61?1:2}function onexitsetextheading(){this.data.setextHeadingSlurpLineEnding=void 0}function onenterdata(token2){const siblings2=this.stack[this.stack.length-1].children;let tail=siblings2[siblings2.length-
1];(!tail||tail.type!=="text")&&(tail=text2(),tail.position={start:point$2(token2.start),end:void 0},siblings2.push(tail)),this.stack.push(tail)}function onexitdata(token2){const tail=this.stack.pop();tail.value+=this.sliceSerialize(token2),tail.position.end=point$2(token2.end)}function onexitlineending(token2){const context=this.stack[this.stack.length-1];if(this.data.atHardBreak){const tail=context.children[context.children.length-1];tail.position.end=point$2(token2.end),this.data.atHardBreak=
void 0;return}!this.data.setextHeadingSlurpLineEnding&&config2.canContainEols.includes(context.type)&&(onenterdata.call(this,token2),onexitdata.call(this,token2))}function onexithardbreak(){this.data.atHardBreak=!0}function onexithtmlflow(){const data2=this.resume(),node2=this.stack[this.stack.length-1];node2.value=data2}function onexithtmltext(){const data2=this.resume(),node2=this.stack[this.stack.length-1];node2.value=data2}function onexitcodetext(){const data2=this.resume(),node2=this.stack[this.
stack.length-1];node2.value=data2}function onexitlink(){const node2=this.stack[this.stack.length-1];if(this.data.inReference){const referenceType=this.data.referenceType||"shortcut";node2.type+="Reference",node2.referenceType=referenceType,delete node2.url,delete node2.title}else delete node2.identifier,delete node2.label;this.data.referenceType=void 0}function onexitimage(){const node2=this.stack[this.stack.length-1];if(this.data.inReference){const referenceType=this.data.referenceType||"shortc\
ut";node2.type+="Reference",node2.referenceType=referenceType,delete node2.url,delete node2.title}else delete node2.identifier,delete node2.label;this.data.referenceType=void 0}function onexitlabeltext(token2){const string2=this.sliceSerialize(token2),ancestor=this.stack[this.stack.length-2];ancestor.label=decodeString(string2),ancestor.identifier=normalizeIdentifier(string2).toLowerCase()}function onexitlabel(){const fragment=this.stack[this.stack.length-1],value=this.resume(),node2=this.stack[this.
stack.length-1];if(this.data.inReference=!0,node2.type==="link"){const children=fragment.children;node2.children=children}else node2.alt=value}function onexitresourcedestinationstring(){const data2=this.resume(),node2=this.stack[this.stack.length-1];node2.url=data2}function onexitresourcetitlestring(){const data2=this.resume(),node2=this.stack[this.stack.length-1];node2.title=data2}function onexitresource(){this.data.inReference=void 0}function onenterreference(){this.data.referenceType="collaps\
ed"}function onexitreferencestring(token2){const label=this.resume(),node2=this.stack[this.stack.length-1];node2.label=label,node2.identifier=normalizeIdentifier(this.sliceSerialize(token2)).toLowerCase(),this.data.referenceType="full"}function onexitcharacterreferencemarker(token2){this.data.characterReferenceType=token2.type}function onexitcharacterreferencevalue(token2){const data2=this.sliceSerialize(token2),type2=this.data.characterReferenceType;let value;type2?(value=decodeNumericCharacterReference(
data2,type2==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):value=decodeNamedCharacterReference(data2);const tail=this.stack[this.stack.length-1];tail.value+=value}function onexitcharacterreference(token2){const tail=this.stack.pop();tail.position.end=point$2(token2.end)}function onexitautolinkprotocol(token2){onexitdata.call(this,token2);const node2=this.stack[this.stack.length-1];node2.url=this.sliceSerialize(token2)}function onexitautolinkemail(token2){onexitdata.
call(this,token2);const node2=this.stack[this.stack.length-1];node2.url="mailto:"+this.sliceSerialize(token2)}function blockQuote2(){return{type:"blockquote",children:[]}}function codeFlow(){return{type:"code",lang:null,meta:null,value:""}}function codeText2(){return{type:"inlineCode",value:""}}function definition2(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function emphasis2(){return{type:"emphasis",children:[]}}function heading2(){return{type:"heading",depth:0,children:[]}}
function hardBreak2(){return{type:"break"}}function html2(){return{type:"html",value:""}}function image2(){return{type:"image",title:null,url:"",alt:null}}function link2(){return{type:"link",title:null,url:"",children:[]}}function list2(token2){return{type:"list",ordered:token2.type==="listOrdered",start:null,spread:token2._spread,children:[]}}function listItem2(token2){return{type:"listItem",spread:token2._spread,checked:null,children:[]}}function paragraph2(){return{type:"paragraph",children:[]}}
function strong2(){return{type:"strong",children:[]}}function text2(){return{type:"text",value:""}}function thematicBreak2(){return{type:"thematicBreak"}}}function point$2(d2){return{line:d2.line,column:d2.column,offset:d2.offset}}function configure$1(combined,extensions){let index2=-1;for(;++index2<extensions.length;){const value=extensions[index2];Array.isArray(value)?configure$1(combined,value):extension(combined,value)}}function extension(combined,extension2){let key2;for(key2 in extension2)
if(own$6.call(extension2,key2))switch(key2){case"canContainEols":{const right=extension2[key2];right&&combined[key2].push(...right);break}case"transforms":{const right=extension2[key2];right&&combined[key2].push(...right);break}case"enter":case"exit":{const right=extension2[key2];right&&Object.assign(combined[key2],right);break}}}function defaultOnError(left,right){throw left?new Error("Cannot close `"+left.type+"` ("+stringifyPosition$1({start:left.start,end:left.end})+"): a different token (`"+
right.type+"`, "+stringifyPosition$1({start:right.start,end:right.end})+") is open"):new Error("Cannot close document, a token (`"+right.type+"`, "+stringifyPosition$1({start:right.start,end:right.end})+") is still open")}function remarkParse(options){const self2=this;self2.parser=parser;function parser(doc){return fromMarkdown(doc,{...self2.data("settings"),...options,extensions:self2.data("micromarkExtensions")||[],mdastExtensions:self2.data("fromMarkdownExtensions")||[]})}}const own$5={}.hasOwnProperty;
function zwitch(key2,options){const settings=options||{};function one2(value,...parameters){let fn=one2.invalid;const handlers2=one2.handlers;if(value&&own$5.call(value,key2)){const id2=String(value[key2]);fn=own$5.call(handlers2,id2)?handlers2[id2]:one2.unknown}if(fn)return fn.call(this,value,...parameters)}return one2.handlers=settings.handlers||{},one2.invalid=settings.invalid,one2.unknown=settings.unknown,one2}const own$4={}.hasOwnProperty;function configure(base2,extension2){let index2=-1,key2;
if(extension2.extensions)for(;++index2<extension2.extensions.length;)configure(base2,extension2.extensions[index2]);for(key2 in extension2)if(own$4.call(extension2,key2))switch(key2){case"extensions":break;case"unsafe":{list$2(base2[key2],extension2[key2]);break}case"join":{list$2(base2[key2],extension2[key2]);break}case"handlers":{map$2(base2[key2],extension2[key2]);break}default:base2.options[key2]=extension2[key2]}return base2}function list$2(left,right){right&&left.push(...right)}function map$2(left,right){
right&&Object.assign(left,right)}function blockquote$1(node2,_,state2,info2){const exit2=state2.enter("blockquote"),tracker=state2.createTracker(info2);tracker.move("> "),tracker.shift(2);const value=state2.indentLines(state2.containerFlow(node2,tracker.current()),map$1);return exit2(),value}function map$1(line,_,blank){return">"+(blank?"":" ")+line}function patternInScope(stack,pattern2){return listInScope(stack,pattern2.inConstruct,!0)&&!listInScope(stack,pattern2.notInConstruct,!1)}function listInScope(stack,list2,none){
if(typeof list2=="string"&&(list2=[list2]),!list2||list2.length===0)return none;let index2=-1;for(;++index2<list2.length;)if(stack.includes(list2[index2]))return!0;return!1}function hardBreak$1(_,_12,state2,info2){let index2=-1;for(;++index2<state2.unsafe.length;)if(state2.unsafe[index2].character===`
`&&patternInScope(state2.stack,state2.unsafe[index2]))return/[ \t]/.test(info2.before)?"":" ";return`\\
`}function longestStreak(value,substring){const source2=String(value);let index2=source2.indexOf(substring),expected=index2,count=0,max2=0;if(typeof substring!="string")throw new TypeError("Expected substring");for(;index2!==-1;)index2===expected?++count>max2&&(max2=count):count=1,expected=index2+substring.length,index2=source2.indexOf(substring,expected);return max2}function formatCodeAsIndented(node2,state2){return!!(state2.options.fences===!1&&node2.value&&!node2.lang&&/[^ \r\n]/.test(node2.value)&&
!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(node2.value))}function checkFence(state2){const marker=state2.options.fence||"`";if(marker!=="`"&&marker!=="~")throw new Error("Cannot serialize code with `"+marker+"` for `options.fence`, expected `` ` `` or `~`");return marker}function code$2(node2,_,state2,info2){const marker=checkFence(state2),raw2=node2.value||"",suffix=marker==="`"?"GraveAccent":"Tilde";if(formatCodeAsIndented(node2,state2)){const exit3=state2.enter("codeIndented"),value2=state2.
indentLines(raw2,map);return exit3(),value2}const tracker=state2.createTracker(info2),sequence=marker.repeat(Math.max(longestStreak(raw2,marker)+1,3)),exit2=state2.enter("codeFenced");let value=tracker.move(sequence);if(node2.lang){const subexit=state2.enter(`codeFencedLang${suffix}`);value+=tracker.move(state2.safe(node2.lang,{before:value,after:" ",encode:["`"],...tracker.current()})),subexit()}if(node2.lang&&node2.meta){const subexit=state2.enter(`codeFencedMeta${suffix}`);value+=tracker.move(
" "),value+=tracker.move(state2.safe(node2.meta,{before:value,after:`
`,encode:["`"],...tracker.current()})),subexit()}return value+=tracker.move(`
`),raw2&&(value+=tracker.move(raw2+`
`)),value+=tracker.move(sequence),exit2(),value}function map(line,_,blank){return(blank?"":"    ")+line}function checkQuote(state2){const marker=state2.options.quote||'"';if(marker!=='"'&&marker!=="'")throw new Error("Cannot serialize title with `"+marker+"` for `options.quote`, expected `\"`, or `'`");return marker}function definition(node2,_,state2,info2){const quote=checkQuote(state2),suffix=quote==='"'?"Quote":"Apostrophe",exit2=state2.enter("definition");let subexit=state2.enter("label");const tracker=state2.
createTracker(info2);let value=tracker.move("[");return value+=tracker.move(state2.safe(state2.associationId(node2),{before:value,after:"]",...tracker.current()})),value+=tracker.move("]: "),subexit(),!node2.url||/[\0- \u007F]/.test(node2.url)?(subexit=state2.enter("destinationLiteral"),value+=tracker.move("<"),value+=tracker.move(state2.safe(node2.url,{before:value,after:">",...tracker.current()})),value+=tracker.move(">")):(subexit=state2.enter("destinationRaw"),value+=tracker.move(state2.safe(
node2.url,{before:value,after:node2.title?" ":`
`,...tracker.current()}))),subexit(),node2.title&&(subexit=state2.enter(`title${suffix}`),value+=tracker.move(" "+quote),value+=tracker.move(state2.safe(node2.title,{before:value,after:quote,...tracker.current()})),value+=tracker.move(quote),subexit()),exit2(),value}function checkEmphasis(state2){const marker=state2.options.emphasis||"*";if(marker!=="*"&&marker!=="_")throw new Error("Cannot serialize emphasis with `"+marker+"` for `options.emphasis`, expected `*`, or `_`");return marker}function encodeCharacterReference(code2){
return"&#x"+code2.toString(16).toUpperCase()+";"}function encodeInfo(outside,inside,marker){const outsideKind=classifyCharacter(outside),insideKind=classifyCharacter(inside);return outsideKind===void 0?insideKind===void 0?marker==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:insideKind===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:outsideKind===1?insideKind===void 0?{inside:!1,outside:!1}:insideKind===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:insideKind===void 0?{inside:!1,outside:!1}:
insideKind===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}emphasis$1.peek=emphasisPeek;function emphasis$1(node2,_,state2,info2){const marker=checkEmphasis(state2),exit2=state2.enter("emphasis"),tracker=state2.createTracker(info2),before=tracker.move(marker);let between2=tracker.move(state2.containerPhrasing(node2,{after:marker,before,...tracker.current()}));const betweenHead=between2.charCodeAt(0),open2=encodeInfo(info2.before.charCodeAt(info2.before.length-1),betweenHead,marker);open2.inside&&
(between2=encodeCharacterReference(betweenHead)+between2.slice(1));const betweenTail=between2.charCodeAt(between2.length-1),close2=encodeInfo(info2.after.charCodeAt(0),betweenTail,marker);close2.inside&&(between2=between2.slice(0,-1)+encodeCharacterReference(betweenTail));const after=tracker.move(marker);return exit2(),state2.attentionEncodeSurroundingInfo={after:close2.outside,before:open2.outside},before+between2+after}function emphasisPeek(_,_12,state2){return state2.options.emphasis||"*"}const convert=(function(test){
if(test==null)return ok$1;if(typeof test=="function")return castFactory$1(test);if(typeof test=="object")return Array.isArray(test)?anyFactory$1(test):propsFactory(test);if(typeof test=="string")return typeFactory(test);throw new Error("Expected function, string, or object as test")});function anyFactory$1(tests){const checks2=[];let index2=-1;for(;++index2<tests.length;)checks2[index2]=convert(tests[index2]);return castFactory$1(any2);function any2(...parameters){let index3=-1;for(;++index3<checks2.
length;)if(checks2[index3].apply(this,parameters))return!0;return!1}}function propsFactory(check){const checkAsRecord=check;return castFactory$1(all2);function all2(node2){const nodeAsRecord=node2;let key2;for(key2 in check)if(nodeAsRecord[key2]!==checkAsRecord[key2])return!1;return!0}}function typeFactory(check){return castFactory$1(type2);function type2(node2){return node2&&node2.type===check}}function castFactory$1(testFunction){return check;function check(value,index2,parent){return!!(looksLikeANode(
value)&&testFunction.call(this,value,typeof index2=="number"?index2:void 0,parent||void 0))}}function ok$1(){return!0}function looksLikeANode(value){return value!==null&&typeof value=="object"&&"type"in value}const empty$1=[],CONTINUE=!0,EXIT=!1,SKIP="skip";function visitParents(tree,test,visitor,reverse){let check;typeof test=="function"&&typeof visitor!="function"?(reverse=visitor,visitor=test):check=test;const is2=convert(check),step=reverse?-1:1;factory(tree,void 0,[])();function factory(node2,index2,parents){const value=node2&&typeof node2=="object"?node2:{};if(typeof value.type=="string"){const name=typeof value.tagName=="string"?value.tagName:typeof value.name=="string"?value.name:void 0;Object.
defineProperty(visit2,"name",{value:"node ("+(node2.type+(name?"<"+name+">":""))+")"})}return visit2;function visit2(){let result=empty$1,subresult,offset2,grandparents;if((!test||is2(node2,index2,parents[parents.length-1]||void 0))&&(result=toResult(visitor(node2,parents)),result[0]===EXIT))return result;if("children"in node2&&node2.children){const nodeAsParent=node2;if(nodeAsParent.children&&result[0]!==SKIP)for(offset2=(reverse?nodeAsParent.children.length:-1)+step,grandparents=parents.concat(
nodeAsParent);offset2>-1&&offset2<nodeAsParent.children.length;){const child2=nodeAsParent.children[offset2];if(subresult=factory(child2,offset2,grandparents)(),subresult[0]===EXIT)return subresult;offset2=typeof subresult[1]=="number"?subresult[1]:offset2+step}}return result}}}function toResult(value){return Array.isArray(value)?value:typeof value=="number"?[CONTINUE,value]:value==null?empty$1:[value]}function visit(tree,testOrVisitor,visitorOrReverse,maybeReverse){let reverse,test,visitor;typeof testOrVisitor==
"function"&&typeof visitorOrReverse!="function"?(test=void 0,visitor=testOrVisitor,reverse=visitorOrReverse):(test=testOrVisitor,visitor=visitorOrReverse,reverse=maybeReverse),visitParents(tree,test,overload,reverse);function overload(node2,parents){const parent=parents[parents.length-1],index2=parent?parent.children.indexOf(node2):void 0;return visitor(node2,index2,parent)}}function formatHeadingAsSetext(node2,state2){let literalWithBreak=!1;return visit(node2,function(node3){if("value"in node3&&
/\r?\n|\r/.test(node3.value)||node3.type==="break")return literalWithBreak=!0,EXIT}),!!((!node2.depth||node2.depth<3)&&toString$1(node2)&&(state2.options.setext||literalWithBreak))}function heading$1(node2,_,state2,info2){const rank=Math.max(Math.min(6,node2.depth||1),1),tracker=state2.createTracker(info2);if(formatHeadingAsSetext(node2,state2)){const exit3=state2.enter("headingSetext"),subexit2=state2.enter("phrasing"),value2=state2.containerPhrasing(node2,{...tracker.current(),before:`
`,after:`
`});return subexit2(),exit3(),value2+`
`+(rank===1?"=":"-").repeat(value2.length-(Math.max(value2.lastIndexOf("\r"),value2.lastIndexOf(`
`))+1))}const sequence="#".repeat(rank),exit2=state2.enter("headingAtx"),subexit=state2.enter("phrasing");tracker.move(sequence+" ");let value=state2.containerPhrasing(node2,{before:"# ",after:`
`,...tracker.current()});return/^[\t ]/.test(value)&&(value=encodeCharacterReference(value.charCodeAt(0))+value.slice(1)),value=value?sequence+" "+value:sequence,state2.options.closeAtx&&(value+=" "+sequence),subexit(),exit2(),value}html$5.peek=htmlPeek;function html$5(node2){return node2.value||""}function htmlPeek(){return"<"}image$1.peek=imagePeek;function image$1(node2,_,state2,info2){const quote=checkQuote(state2),suffix=quote==='"'?"Quote":"Apostrophe",exit2=state2.enter("image");let subexit=state2.
enter("label");const tracker=state2.createTracker(info2);let value=tracker.move("![");return value+=tracker.move(state2.safe(node2.alt,{before:value,after:"]",...tracker.current()})),value+=tracker.move("]("),subexit(),!node2.url&&node2.title||/[\0- \u007F]/.test(node2.url)?(subexit=state2.enter("destinationLiteral"),value+=tracker.move("<"),value+=tracker.move(state2.safe(node2.url,{before:value,after:">",...tracker.current()})),value+=tracker.move(">")):(subexit=state2.enter("destinationRaw"),
value+=tracker.move(state2.safe(node2.url,{before:value,after:node2.title?" ":")",...tracker.current()}))),subexit(),node2.title&&(subexit=state2.enter(`title${suffix}`),value+=tracker.move(" "+quote),value+=tracker.move(state2.safe(node2.title,{before:value,after:quote,...tracker.current()})),value+=tracker.move(quote),subexit()),value+=tracker.move(")"),exit2(),value}function imagePeek(){return"!"}imageReference$1.peek=imageReferencePeek;function imageReference$1(node2,_,state2,info2){const type2=node2.
referenceType,exit2=state2.enter("imageReference");let subexit=state2.enter("label");const tracker=state2.createTracker(info2);let value=tracker.move("![");const alt=state2.safe(node2.alt,{before:value,after:"]",...tracker.current()});value+=tracker.move(alt+"]["),subexit();const stack=state2.stack;state2.stack=[],subexit=state2.enter("reference");const reference=state2.safe(state2.associationId(node2),{before:value,after:"]",...tracker.current()});return subexit(),state2.stack=stack,exit2(),type2===
"full"||!alt||alt!==reference?value+=tracker.move(reference+"]"):type2==="shortcut"?value=value.slice(0,-1):value+=tracker.move("]"),value}function imageReferencePeek(){return"!"}inlineCode$1.peek=inlineCodePeek;function inlineCode$1(node2,_,state2){let value=node2.value||"",sequence="`",index2=-1;for(;new RegExp("(^|[^`])"+sequence+"([^`]|$)").test(value);)sequence+="`";for(/[^ \r\n]/.test(value)&&(/^[ \r\n]/.test(value)&&/[ \r\n]$/.test(value)||/^`|`$/.test(value))&&(value=" "+value+" ");++index2<
state2.unsafe.length;){const pattern2=state2.unsafe[index2],expression=state2.compilePattern(pattern2);let match;if(pattern2.atBreak)for(;match=expression.exec(value);){let position2=match.index;value.charCodeAt(position2)===10&&value.charCodeAt(position2-1)===13&&position2--,value=value.slice(0,position2)+" "+value.slice(match.index+1)}}return sequence+value+sequence}function inlineCodePeek(){return"`"}function formatLinkAsAutolink(node2,state2){const raw2=toString$1(node2);return!!(!state2.options.
resourceLink&&node2.url&&!node2.title&&node2.children&&node2.children.length===1&&node2.children[0].type==="text"&&(raw2===node2.url||"mailto:"+raw2===node2.url)&&/^[a-z][a-z+.-]+:/i.test(node2.url)&&!/[\0- <>\u007F]/.test(node2.url))}link$1.peek=linkPeek;function link$1(node2,_,state2,info2){const quote=checkQuote(state2),suffix=quote==='"'?"Quote":"Apostrophe",tracker=state2.createTracker(info2);let exit2,subexit;if(formatLinkAsAutolink(node2,state2)){const stack=state2.stack;state2.stack=[],exit2=
state2.enter("autolink");let value2=tracker.move("<");return value2+=tracker.move(state2.containerPhrasing(node2,{before:value2,after:">",...tracker.current()})),value2+=tracker.move(">"),exit2(),state2.stack=stack,value2}exit2=state2.enter("link"),subexit=state2.enter("label");let value=tracker.move("[");return value+=tracker.move(state2.containerPhrasing(node2,{before:value,after:"](",...tracker.current()})),value+=tracker.move("]("),subexit(),!node2.url&&node2.title||/[\0- \u007F]/.test(node2.
url)?(subexit=state2.enter("destinationLiteral"),value+=tracker.move("<"),value+=tracker.move(state2.safe(node2.url,{before:value,after:">",...tracker.current()})),value+=tracker.move(">")):(subexit=state2.enter("destinationRaw"),value+=tracker.move(state2.safe(node2.url,{before:value,after:node2.title?" ":")",...tracker.current()}))),subexit(),node2.title&&(subexit=state2.enter(`title${suffix}`),value+=tracker.move(" "+quote),value+=tracker.move(state2.safe(node2.title,{before:value,after:quote,
...tracker.current()})),value+=tracker.move(quote),subexit()),value+=tracker.move(")"),exit2(),value}function linkPeek(node2,_,state2){return formatLinkAsAutolink(node2,state2)?"<":"["}linkReference$1.peek=linkReferencePeek;function linkReference$1(node2,_,state2,info2){const type2=node2.referenceType,exit2=state2.enter("linkReference");let subexit=state2.enter("label");const tracker=state2.createTracker(info2);let value=tracker.move("[");const text2=state2.containerPhrasing(node2,{before:value,
after:"]",...tracker.current()});value+=tracker.move(text2+"]["),subexit();const stack=state2.stack;state2.stack=[],subexit=state2.enter("reference");const reference=state2.safe(state2.associationId(node2),{before:value,after:"]",...tracker.current()});return subexit(),state2.stack=stack,exit2(),type2==="full"||!text2||text2!==reference?value+=tracker.move(reference+"]"):type2==="shortcut"?value=value.slice(0,-1):value+=tracker.move("]"),value}function linkReferencePeek(){return"["}function checkBullet(state2){
const marker=state2.options.bullet||"*";if(marker!=="*"&&marker!=="+"&&marker!=="-")throw new Error("Cannot serialize items with `"+marker+"` for `options.bullet`, expected `*`, `+`, or `-`");return marker}function checkBulletOther(state2){const bullet=checkBullet(state2),bulletOther=state2.options.bulletOther;if(!bulletOther)return bullet==="*"?"-":"*";if(bulletOther!=="*"&&bulletOther!=="+"&&bulletOther!=="-")throw new Error("Cannot serialize items with `"+bulletOther+"` for `options.bulletOth\
er`, expected `*`, `+`, or `-`");if(bulletOther===bullet)throw new Error("Expected `bullet` (`"+bullet+"`) and `bulletOther` (`"+bulletOther+"`) to be different");return bulletOther}function checkBulletOrdered(state2){const marker=state2.options.bulletOrdered||".";if(marker!=="."&&marker!==")")throw new Error("Cannot serialize items with `"+marker+"` for `options.bulletOrdered`, expected `.` or `)`");return marker}function checkRule(state2){const marker=state2.options.rule||"*";if(marker!=="*"&&
marker!=="-"&&marker!=="_")throw new Error("Cannot serialize rules with `"+marker+"` for `options.rule`, expected `*`, `-`, or `_`");return marker}function list$1(node2,parent,state2,info2){const exit2=state2.enter("list"),bulletCurrent=state2.bulletCurrent;let bullet=node2.ordered?checkBulletOrdered(state2):checkBullet(state2);const bulletOther=node2.ordered?bullet==="."?")":".":checkBulletOther(state2);let useDifferentMarker=parent&&state2.bulletLastUsed?bullet===state2.bulletLastUsed:!1;if(!node2.
ordered){const firstListItem=node2.children?node2.children[0]:void 0;if((bullet==="*"||bullet==="-")&&firstListItem&&(!firstListItem.children||!firstListItem.children[0])&&state2.stack[state2.stack.length-1]==="list"&&state2.stack[state2.stack.length-2]==="listItem"&&state2.stack[state2.stack.length-3]==="list"&&state2.stack[state2.stack.length-4]==="listItem"&&state2.indexStack[state2.indexStack.length-1]===0&&state2.indexStack[state2.indexStack.length-2]===0&&state2.indexStack[state2.indexStack.
length-3]===0&&(useDifferentMarker=!0),checkRule(state2)===bullet&&firstListItem){let index2=-1;for(;++index2<node2.children.length;){const item=node2.children[index2];if(item&&item.type==="listItem"&&item.children&&item.children[0]&&item.children[0].type==="thematicBreak"){useDifferentMarker=!0;break}}}}useDifferentMarker&&(bullet=bulletOther),state2.bulletCurrent=bullet;const value=state2.containerFlow(node2,info2);return state2.bulletLastUsed=bullet,state2.bulletCurrent=bulletCurrent,exit2(),
value}function checkListItemIndent(state2){const style2=state2.options.listItemIndent||"one";if(style2!=="tab"&&style2!=="one"&&style2!=="mixed")throw new Error("Cannot serialize items with `"+style2+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return style2}function listItem$1(node2,parent,state2,info2){const listItemIndent=checkListItemIndent(state2);let bullet=state2.bulletCurrent||checkBullet(state2);parent&&parent.type==="list"&&parent.ordered&&(bullet=(typeof parent.
start=="number"&&parent.start>-1?parent.start:1)+(state2.options.incrementListMarker===!1?0:parent.children.indexOf(node2))+bullet);let size2=bullet.length+1;(listItemIndent==="tab"||listItemIndent==="mixed"&&(parent&&parent.type==="list"&&parent.spread||node2.spread))&&(size2=Math.ceil(size2/4)*4);const tracker=state2.createTracker(info2);tracker.move(bullet+" ".repeat(size2-bullet.length)),tracker.shift(size2);const exit2=state2.enter("listItem"),value=state2.indentLines(state2.containerFlow(node2,
tracker.current()),map2);return exit2(),value;function map2(line,index2,blank){return index2?(blank?"":" ".repeat(size2))+line:(blank?bullet:bullet+" ".repeat(size2-bullet.length))+line}}function paragraph$1(node2,_,state2,info2){const exit2=state2.enter("paragraph"),subexit=state2.enter("phrasing"),value=state2.containerPhrasing(node2,info2);return subexit(),exit2(),value}const phrasing=convert(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","in\
lineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function root$X(node2,_,state2,info2){return(node2.children.some(function(d2){return phrasing(d2)})?state2.containerPhrasing:state2.containerFlow).call(state2,node2,info2)}function checkStrong(state2){const marker=state2.options.strong||"*";if(marker!=="*"&&marker!=="_")throw new Error("Cannot serialize strong with `"+marker+"` for `options.strong`, expected `*`, or `_`");return marker}strong$1.
peek=strongPeek;function strong$1(node2,_,state2,info2){const marker=checkStrong(state2),exit2=state2.enter("strong"),tracker=state2.createTracker(info2),before=tracker.move(marker+marker);let between2=tracker.move(state2.containerPhrasing(node2,{after:marker,before,...tracker.current()}));const betweenHead=between2.charCodeAt(0),open2=encodeInfo(info2.before.charCodeAt(info2.before.length-1),betweenHead,marker);open2.inside&&(between2=encodeCharacterReference(betweenHead)+between2.slice(1));const betweenTail=between2.
charCodeAt(between2.length-1),close2=encodeInfo(info2.after.charCodeAt(0),betweenTail,marker);close2.inside&&(between2=between2.slice(0,-1)+encodeCharacterReference(betweenTail));const after=tracker.move(marker+marker);return exit2(),state2.attentionEncodeSurroundingInfo={after:close2.outside,before:open2.outside},before+between2+after}function strongPeek(_,_12,state2){return state2.options.strong||"*"}function text$5(node2,_,state2,info2){return state2.safe(node2.value,info2)}function checkRuleRepetition(state2){
const repetition=state2.options.ruleRepetition||3;if(repetition<3)throw new Error("Cannot serialize rules with repetition `"+repetition+"` for `options.ruleRepetition`, expected `3` or more");return repetition}function thematicBreak$1(_,_12,state2){const value=(checkRule(state2)+(state2.options.ruleSpaces?" ":"")).repeat(checkRuleRepetition(state2));return state2.options.ruleSpaces?value.slice(0,-1):value}const handle$1={blockquote:blockquote$1,break:hardBreak$1,code:code$2,definition,emphasis:emphasis$1,
hardBreak:hardBreak$1,heading:heading$1,html:html$5,image:image$1,imageReference:imageReference$1,inlineCode:inlineCode$1,link:link$1,linkReference:linkReference$1,list:list$1,listItem:listItem$1,paragraph:paragraph$1,root:root$X,strong:strong$1,text:text$5,thematicBreak:thematicBreak$1},join$1=[joinDefaults];function joinDefaults(left,right,parent,state2){if(right.type==="code"&&formatCodeAsIndented(right,state2)&&(left.type==="list"||left.type===right.type&&formatCodeAsIndented(left,state2)))return!1;
if("spread"in parent&&typeof parent.spread=="boolean")return left.type==="paragraph"&&(left.type===right.type||right.type==="definition"||right.type==="heading"&&formatHeadingAsSetext(right,state2))?void 0:parent.spread?1:0}const fullPhrasingSpans=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"],unsafe=[{character:"	",after:"[\\r\\n]",inConstruct:"phrasing"},{character:"	",before:"[\\r\\n]",inConstruct:"phrasing"},{character:"	",inConstruct:["codeFenc\
edLangGraveAccent","codeFencedLangTilde"]},{character:"\r",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:`
`,inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde","codeFencedMetaGraveAccent","codeFencedMetaTilde","destinationLiteral","headingAtx"]},{character:" ",after:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",before:"[\\r\\n]",inConstruct:"phrasing"},{character:" ",inConstruct:["codeFencedLangGraveAccent","codeFencedLangTilde"]},{character:"!",after:"\\[",inConstruct:"phrasing",notInConstruct:fullPhrasingSpans},{character:'"',inConstruct:"titleQuote"},{atBreak:!0,character:"#"},{character:"\
#",inConstruct:"headingAtx",after:`(?:[\r
]|$)`},{character:"&",after:"[#A-Za-z]",inConstruct:"phrasing"},{character:"'",inConstruct:"titleApostrophe"},{character:"(",inConstruct:"destinationRaw"},{before:"\\]",character:"(",inConstruct:"phrasing",notInConstruct:fullPhrasingSpans},{atBreak:!0,before:"\\d+",character:")"},{character:")",inConstruct:"destinationRaw"},{atBreak:!0,character:"*",after:`(?:[ 	\r
*])`},{character:"*",inConstruct:"phrasing",notInConstruct:fullPhrasingSpans},{atBreak:!0,character:"+",after:`(?:[ 	\r
])`},{atBreak:!0,character:"-",after:`(?:[ 	\r
-])`},{atBreak:!0,before:"\\d+",character:".",after:`(?:[ 	\r
]|$)`},{atBreak:!0,character:"<",after:"[!/?A-Za-z]"},{character:"<",after:"[!/?A-Za-z]",inConstruct:"phrasing",notInConstruct:fullPhrasingSpans},{character:"<",inConstruct:"destinationLiteral"},{atBreak:!0,character:"="},{atBreak:!0,character:">"},{character:">",inConstruct:"destinationLiteral"},{atBreak:!0,character:"["},{character:"[",inConstruct:"phrasing",notInConstruct:fullPhrasingSpans},{character:"[",inConstruct:["label","reference"]},{character:"\\",after:"[\\r\\n]",inConstruct:"phrasin\
g"},{character:"]",inConstruct:["label","reference"]},{atBreak:!0,character:"_"},{character:"_",inConstruct:"phrasing",notInConstruct:fullPhrasingSpans},{atBreak:!0,character:"`"},{character:"`",inConstruct:["codeFencedLangGraveAccent","codeFencedMetaGraveAccent"]},{character:"`",inConstruct:"phrasing",notInConstruct:fullPhrasingSpans},{atBreak:!0,character:"~"}];function association(node2){return node2.label||!node2.identifier?node2.label||"":decodeString(node2.identifier)}function compilePattern(pattern2){
if(!pattern2._compiled){const before=(pattern2.atBreak?"[\\r\\n][\\t ]*":"")+(pattern2.before?"(?:"+pattern2.before+")":"");pattern2._compiled=new RegExp((before?"("+before+")":"")+(/[|\\{}()[\]^$+*?.-]/.test(pattern2.character)?"\\":"")+pattern2.character+(pattern2.after?"(?:"+pattern2.after+")":""),"g")}return pattern2._compiled}function containerPhrasing(parent,state2,info2){const indexStack=state2.indexStack,children=parent.children||[],results=[];let index2=-1,before=info2.before,encodeAfter;
indexStack.push(-1);let tracker=state2.createTracker(info2);for(;++index2<children.length;){const child2=children[index2];let after;if(indexStack[indexStack.length-1]=index2,index2+1<children.length){let handle2=state2.handle.handlers[children[index2+1].type];handle2&&handle2.peek&&(handle2=handle2.peek),after=handle2?handle2(children[index2+1],parent,state2,{before:"",after:"",...tracker.current()}).charAt(0):""}else after=info2.after;results.length>0&&(before==="\r"||before===`
`)&&child2.type==="html"&&(results[results.length-1]=results[results.length-1].replace(/(\r?\n|\r)$/," "),before=" ",tracker=state2.createTracker(info2),tracker.move(results.join("")));let value=state2.handle(child2,parent,state2,{...tracker.current(),after,before});encodeAfter&&encodeAfter===value.slice(0,1)&&(value=encodeCharacterReference(encodeAfter.charCodeAt(0))+value.slice(1));const encodingInfo=state2.attentionEncodeSurroundingInfo;state2.attentionEncodeSurroundingInfo=void 0,encodeAfter=
void 0,encodingInfo&&(results.length>0&&encodingInfo.before&&before===results[results.length-1].slice(-1)&&(results[results.length-1]=results[results.length-1].slice(0,-1)+encodeCharacterReference(before.charCodeAt(0))),encodingInfo.after&&(encodeAfter=after)),tracker.move(value),results.push(value),before=value.slice(-1)}return indexStack.pop(),results.join("")}function containerFlow(parent,state2,info2){const indexStack=state2.indexStack,children=parent.children||[],tracker=state2.createTracker(
info2),results=[];let index2=-1;for(indexStack.push(-1);++index2<children.length;){const child2=children[index2];indexStack[indexStack.length-1]=index2,results.push(tracker.move(state2.handle(child2,parent,state2,{before:`
`,after:`
`,...tracker.current()}))),child2.type!=="list"&&(state2.bulletLastUsed=void 0),index2<children.length-1&&results.push(tracker.move(between(child2,children[index2+1],parent,state2)))}return indexStack.pop(),results.join("")}function between(left,right,parent,state2){let index2=state2.join.length;for(;index2--;){const result=state2.join[index2](left,right,parent,state2);if(result===!0||result===1)break;if(typeof result=="number")return`
`.repeat(1+result);if(result===!1)return`

<!---->

`}return`

`}const eol=/\r?\n|\r/g;function indentLines(value,map2){const result=[];let start2=0,line=0,match;for(;match=eol.exec(value);)one2(value.slice(start2,match.index)),result.push(match[0]),start2=match.index+match[0].length,line++;return one2(value.slice(start2)),result.join("");function one2(value2){result.push(map2(value2,line,!value2))}}function safe(state2,input,config2){const value=(config2.before||"")+(input||"")+(config2.after||""),positions=[],result=[],infos={};let index2=-1;for(;++index2<
state2.unsafe.length;){const pattern2=state2.unsafe[index2];if(!patternInScope(state2.stack,pattern2))continue;const expression=state2.compilePattern(pattern2);let match;for(;match=expression.exec(value);){const before="before"in pattern2||!!pattern2.atBreak,after="after"in pattern2,position2=match.index+(before?match[1].length:0);positions.includes(position2)?(infos[position2].before&&!before&&(infos[position2].before=!1),infos[position2].after&&!after&&(infos[position2].after=!1)):(positions.push(
position2),infos[position2]={before,after})}}positions.sort(numerical);let start2=config2.before?config2.before.length:0;const end=value.length-(config2.after?config2.after.length:0);for(index2=-1;++index2<positions.length;){const position2=positions[index2];position2<start2||position2>=end||position2+1<end&&positions[index2+1]===position2+1&&infos[position2].after&&!infos[position2+1].before&&!infos[position2+1].after||positions[index2-1]===position2-1&&infos[position2].before&&!infos[position2-
1].before&&!infos[position2-1].after||(start2!==position2&&result.push(escapeBackslashes(value.slice(start2,position2),"\\")),start2=position2,/[!-/:-@[-`{-~]/.test(value.charAt(position2))&&(!config2.encode||!config2.encode.includes(value.charAt(position2)))?result.push("\\"):(result.push(encodeCharacterReference(value.charCodeAt(position2))),start2++))}return result.push(escapeBackslashes(value.slice(start2,end),config2.after)),result.join("")}function numerical(a,b){return a-b}function escapeBackslashes(value,after){
const expression=/\\(?=[!-/:-@[-`{-~])/g,positions=[],results=[],whole=value+after;let index2=-1,start2=0,match;for(;match=expression.exec(whole);)positions.push(match.index);for(;++index2<positions.length;)start2!==positions[index2]&&results.push(value.slice(start2,positions[index2])),results.push("\\"),start2=positions[index2];return results.push(value.slice(start2)),results.join("")}function track(config2){const options=config2||{},now2=options.now||{};let lineShift=options.lineShift||0,line=now2.
line||1,column=now2.column||1;return{move:move2,current:current2,shift:shift2};function current2(){return{now:{line,column},lineShift}}function shift2(value){lineShift+=value}function move2(input){const value=input||"",chunks=value.split(/\r?\n|\r/g),tail=chunks[chunks.length-1];return line+=chunks.length-1,column=chunks.length===1?column+tail.length:1+tail.length+lineShift,value}}function toMarkdown(tree,options){const settings=options||{},state2={associationId:association,containerPhrasing:containerPhrasingBound,
containerFlow:containerFlowBound,createTracker:track,compilePattern,enter,handlers:{...handle$1},handle:void 0,indentLines,indexStack:[],join:[...join$1],options:{},safe:safeBound,stack:[],unsafe:[...unsafe]};configure(state2,settings),state2.options.tightDefinitions&&state2.join.push(joinDefinition),state2.handle=zwitch("type",{invalid:invalid$1,unknown:unknown$1,handlers:state2.handlers});let result=state2.handle(tree,void 0,state2,{before:`
`,after:`
`,now:{line:1,column:1},lineShift:0});return result&&result.charCodeAt(result.length-1)!==10&&result.charCodeAt(result.length-1)!==13&&(result+=`
`),result;function enter(name){return state2.stack.push(name),exit2;function exit2(){state2.stack.pop()}}}function invalid$1(value){throw new Error("Cannot handle value `"+value+"`, expected node")}function unknown$1(value){const node2=value;throw new Error("Cannot handle unknown node `"+node2.type+"`")}function joinDefinition(left,right){if(left.type==="definition"&&left.type===right.type)return 0}function containerPhrasingBound(parent,info2){return containerPhrasing(parent,this,info2)}function containerFlowBound(parent,info2){
return containerFlow(parent,this,info2)}function safeBound(value,config2){return safe(this,value,config2)}function remarkStringify(options){const self2=this;self2.compiler=compiler2;function compiler2(tree){return toMarkdown(tree,{...self2.data("settings"),...options,extensions:self2.data("toMarkdownExtensions")||[]})}}function bail(error2){if(error2)throw error2}var extend$1,hasRequiredExtend;function requireExtend(){if(hasRequiredExtend)return extend$1;hasRequiredExtend=1;var hasOwn=Object.prototype.
hasOwnProperty,toStr=Object.prototype.toString,defineProperty=Object.defineProperty,gOPD=Object.getOwnPropertyDescriptor,isArray=function(arr){return typeof Array.isArray=="function"?Array.isArray(arr):toStr.call(arr)==="[object Array]"},isPlainObject2=function(obj){if(!obj||toStr.call(obj)!=="[object Object]")return!1;var hasOwnConstructor=hasOwn.call(obj,"constructor"),hasIsPrototypeOf=obj.constructor&&obj.constructor.prototype&&hasOwn.call(obj.constructor.prototype,"isPrototypeOf");if(obj.constructor&&
!hasOwnConstructor&&!hasIsPrototypeOf)return!1;var key2;for(key2 in obj);return typeof key2>"u"||hasOwn.call(obj,key2)},setProperty=function(target2,options){defineProperty&&options.name==="__proto__"?defineProperty(target2,options.name,{enumerable:!0,configurable:!0,value:options.newValue,writable:!0}):target2[options.name]=options.newValue},getProperty=function(obj,name){if(name==="__proto__")if(hasOwn.call(obj,name)){if(gOPD)return gOPD(obj,name).value}else return;return obj[name]};return extend$1=
function extend2(){var options,name,src,copy,copyIsArray,clone2,target2=arguments[0],i=1,length=arguments.length,deep=!1;for(typeof target2=="boolean"&&(deep=target2,target2=arguments[1]||{},i=2),(target2==null||typeof target2!="object"&&typeof target2!="function")&&(target2={});i<length;++i)if(options=arguments[i],options!=null)for(name in options)src=getProperty(target2,name),copy=getProperty(options,name),target2!==copy&&(deep&&copy&&(isPlainObject2(copy)||(copyIsArray=isArray(copy)))?(copyIsArray?
(copyIsArray=!1,clone2=src&&isArray(src)?src:[]):clone2=src&&isPlainObject2(src)?src:{},setProperty(target2,{name,newValue:extend2(deep,clone2,copy)})):typeof copy<"u"&&setProperty(target2,{name,newValue:copy}));return target2},extend$1}var extendExports=requireExtend();const extend=getDefaultExportFromCjs(extendExports);function isPlainObject(value){if(typeof value!="object"||value===null)return!1;const prototype=Object.getPrototypeOf(value);return(prototype===null||prototype===Object.prototype||Object.getPrototypeOf(prototype)===null)&&!(Symbol.toStringTag in value)&&!(Symbol.iterator in value)}function trough(){const fns=[],pipeline={run:run2,use};return pipeline;function run2(...values){let middlewareIndex=-1;const callback=values.pop();if(typeof callback!="function")throw new TypeError("Expected function as\
 last argument, not "+callback);next2(null,...values);function next2(error2,...output){const fn=fns[++middlewareIndex];let index2=-1;if(error2){callback(error2);return}for(;++index2<values.length;)(output[index2]===null||output[index2]===void 0)&&(output[index2]=values[index2]);values=output,fn?wrap$1(fn,next2)(...output):callback(null,...output)}}function use(middelware){if(typeof middelware!="function")throw new TypeError("Expected `middelware` to be a function, not "+middelware);return fns.push(
middelware),pipeline}}function wrap$1(middleware,callback){let called;return wrapped;function wrapped(...parameters){const fnExpectsCallback=middleware.length>parameters.length;let result;fnExpectsCallback&&parameters.push(done);try{result=middleware.apply(this,parameters)}catch(error2){const exception=error2;if(fnExpectsCallback&&called)throw exception;return done(exception)}fnExpectsCallback||(result&&result.then&&typeof result.then=="function"?result.then(then,done):result instanceof Error?done(
result):then(result))}function done(error2,...output){called||(called=!0,callback(error2,...output))}function then(value){done(null,value)}}function stringifyPosition(value){return!value||typeof value!="object"?"":"position"in value||"type"in value?position$1(value.position):"start"in value||"end"in value?position$1(value):"line"in value||"column"in value?point$1(value):""}function point$1(point2){return index(point2&&point2.line)+":"+index(point2&&point2.column)}function position$1(pos){return point$1(
pos&&pos.start)+"-"+point$1(pos&&pos.end)}function index(value){return value&&typeof value=="number"?value:1}class VFileMessage extends Error{constructor(causeOrReason,optionsOrParentOrPlace,origin2){super(),typeof optionsOrParentOrPlace=="string"&&(origin2=optionsOrParentOrPlace,optionsOrParentOrPlace=void 0);let reason="",options={},legacyCause=!1;if(optionsOrParentOrPlace&&("line"in optionsOrParentOrPlace&&"column"in optionsOrParentOrPlace?options={place:optionsOrParentOrPlace}:"start"in optionsOrParentOrPlace&&
"end"in optionsOrParentOrPlace?options={place:optionsOrParentOrPlace}:"type"in optionsOrParentOrPlace?options={ancestors:[optionsOrParentOrPlace],place:optionsOrParentOrPlace.position}:options={...optionsOrParentOrPlace}),typeof causeOrReason=="string"?reason=causeOrReason:!options.cause&&causeOrReason&&(legacyCause=!0,reason=causeOrReason.message,options.cause=causeOrReason),!options.ruleId&&!options.source&&typeof origin2=="string"){const index2=origin2.indexOf(":");index2===-1?options.ruleId=
origin2:(options.source=origin2.slice(0,index2),options.ruleId=origin2.slice(index2+1))}if(!options.place&&options.ancestors&&options.ancestors){const parent=options.ancestors[options.ancestors.length-1];parent&&(options.place=parent.position)}const start2=options.place&&"start"in options.place?options.place.start:options.place;this.ancestors=options.ancestors||void 0,this.cause=options.cause||void 0,this.column=start2?start2.column:void 0,this.fatal=void 0,this.file,this.message=reason,this.line=
start2?start2.line:void 0,this.name=stringifyPosition(options.place)||"1:1",this.place=options.place||void 0,this.reason=this.message,this.ruleId=options.ruleId||void 0,this.source=options.source||void 0,this.stack=legacyCause&&options.cause&&typeof options.cause.stack=="string"?options.cause.stack:"",this.actual,this.expected,this.note,this.url}}VFileMessage.prototype.file="";VFileMessage.prototype.name="";VFileMessage.prototype.reason="";VFileMessage.prototype.message="";VFileMessage.prototype.
stack="";VFileMessage.prototype.column=void 0;VFileMessage.prototype.line=void 0;VFileMessage.prototype.ancestors=void 0;VFileMessage.prototype.cause=void 0;VFileMessage.prototype.fatal=void 0;VFileMessage.prototype.place=void 0;VFileMessage.prototype.ruleId=void 0;VFileMessage.prototype.source=void 0;const minpath={basename,dirname,extname,join,sep:"/"};function basename(path2,extname2){if(extname2!==void 0&&typeof extname2!="string")throw new TypeError('"ext" argument must be a string');assertPath$1(
path2);let start2=0,end=-1,index2=path2.length,seenNonSlash;if(extname2===void 0||extname2.length===0||extname2.length>path2.length){for(;index2--;)if(path2.codePointAt(index2)===47){if(seenNonSlash){start2=index2+1;break}}else end<0&&(seenNonSlash=!0,end=index2+1);return end<0?"":path2.slice(start2,end)}if(extname2===path2)return"";let firstNonSlashEnd=-1,extnameIndex=extname2.length-1;for(;index2--;)if(path2.codePointAt(index2)===47){if(seenNonSlash){start2=index2+1;break}}else firstNonSlashEnd<
0&&(seenNonSlash=!0,firstNonSlashEnd=index2+1),extnameIndex>-1&&(path2.codePointAt(index2)===extname2.codePointAt(extnameIndex--)?extnameIndex<0&&(end=index2):(extnameIndex=-1,end=firstNonSlashEnd));return start2===end?end=firstNonSlashEnd:end<0&&(end=path2.length),path2.slice(start2,end)}function dirname(path2){if(assertPath$1(path2),path2.length===0)return".";let end=-1,index2=path2.length,unmatchedSlash;for(;--index2;)if(path2.codePointAt(index2)===47){if(unmatchedSlash){end=index2;break}}else
unmatchedSlash||(unmatchedSlash=!0);return end<0?path2.codePointAt(0)===47?"/":".":end===1&&path2.codePointAt(0)===47?"//":path2.slice(0,end)}function extname(path2){assertPath$1(path2);let index2=path2.length,end=-1,startPart=0,startDot=-1,preDotState=0,unmatchedSlash;for(;index2--;){const code2=path2.codePointAt(index2);if(code2===47){if(unmatchedSlash){startPart=index2+1;break}continue}end<0&&(unmatchedSlash=!0,end=index2+1),code2===46?startDot<0?startDot=index2:preDotState!==1&&(preDotState=
1):startDot>-1&&(preDotState=-1)}return startDot<0||end<0||preDotState===0||preDotState===1&&startDot===end-1&&startDot===startPart+1?"":path2.slice(startDot,end)}function join(...segments){let index2=-1,joined;for(;++index2<segments.length;)assertPath$1(segments[index2]),segments[index2]&&(joined=joined===void 0?segments[index2]:joined+"/"+segments[index2]);return joined===void 0?".":normalize$1(joined)}function normalize$1(path2){assertPath$1(path2);const absolute=path2.codePointAt(0)===47;let value=normalizeString(
path2,!absolute);return value.length===0&&!absolute&&(value="."),value.length>0&&path2.codePointAt(path2.length-1)===47&&(value+="/"),absolute?"/"+value:value}function normalizeString(path2,allowAboveRoot){let result="",lastSegmentLength=0,lastSlash=-1,dots=0,index2=-1,code2,lastSlashIndex;for(;++index2<=path2.length;){if(index2<path2.length)code2=path2.codePointAt(index2);else{if(code2===47)break;code2=47}if(code2===47){if(!(lastSlash===index2-1||dots===1))if(lastSlash!==index2-1&&dots===2){if(result.
length<2||lastSegmentLength!==2||result.codePointAt(result.length-1)!==46||result.codePointAt(result.length-2)!==46){if(result.length>2){if(lastSlashIndex=result.lastIndexOf("/"),lastSlashIndex!==result.length-1){lastSlashIndex<0?(result="",lastSegmentLength=0):(result=result.slice(0,lastSlashIndex),lastSegmentLength=result.length-1-result.lastIndexOf("/")),lastSlash=index2,dots=0;continue}}else if(result.length>0){result="",lastSegmentLength=0,lastSlash=index2,dots=0;continue}}allowAboveRoot&&(result=
result.length>0?result+"/..":"..",lastSegmentLength=2)}else result.length>0?result+="/"+path2.slice(lastSlash+1,index2):result=path2.slice(lastSlash+1,index2),lastSegmentLength=index2-lastSlash-1;lastSlash=index2,dots=0}else code2===46&&dots>-1?dots++:dots=-1}return result}function assertPath$1(path2){if(typeof path2!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(path2))}const minproc={cwd};function cwd(){return"/"}function isUrl(fileUrlOrPath){return!!(fileUrlOrPath!==
null&&typeof fileUrlOrPath=="object"&&"href"in fileUrlOrPath&&fileUrlOrPath.href&&"protocol"in fileUrlOrPath&&fileUrlOrPath.protocol&&fileUrlOrPath.auth===void 0)}function urlToPath(path2){if(typeof path2=="string")path2=new URL(path2);else if(!isUrl(path2)){const error2=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+path2+"`");throw error2.code="ERR_INVALID_ARG_TYPE",error2}if(path2.protocol!=="file:"){const error2=new TypeError("The URL must be of \
scheme file");throw error2.code="ERR_INVALID_URL_SCHEME",error2}return getPathFromURLPosix(path2)}function getPathFromURLPosix(url2){if(url2.hostname!==""){const error2=new TypeError('File URL host must be "localhost" or empty on darwin');throw error2.code="ERR_INVALID_FILE_URL_HOST",error2}const pathname=url2.pathname;let index2=-1;for(;++index2<pathname.length;)if(pathname.codePointAt(index2)===37&&pathname.codePointAt(index2+1)===50){const third=pathname.codePointAt(index2+2);if(third===70||third===
102){const error2=new TypeError("File URL path must not include encoded / characters");throw error2.code="ERR_INVALID_FILE_URL_PATH",error2}}return decodeURIComponent(pathname)}const order=["history","path","basename","stem","extname","dirname"];class VFile{constructor(value){let options;value?isUrl(value)?options={path:value}:typeof value=="string"||isUint8Array$1(value)?options={value}:options=value:options={},this.cwd="cwd"in options?"":minproc.cwd(),this.data={},this.history=[],this.messages=
[],this.value,this.map,this.result,this.stored;let index2=-1;for(;++index2<order.length;){const field2=order[index2];field2 in options&&options[field2]!==void 0&&options[field2]!==null&&(this[field2]=field2==="history"?[...options[field2]]:options[field2])}let field;for(field in options)order.includes(field)||(this[field]=options[field])}get basename(){return typeof this.path=="string"?minpath.basename(this.path):void 0}set basename(basename2){assertNonEmpty(basename2,"basename"),assertPart(basename2,
"basename"),this.path=minpath.join(this.dirname||"",basename2)}get dirname(){return typeof this.path=="string"?minpath.dirname(this.path):void 0}set dirname(dirname2){assertPath(this.basename,"dirname"),this.path=minpath.join(dirname2||"",this.basename)}get extname(){return typeof this.path=="string"?minpath.extname(this.path):void 0}set extname(extname2){if(assertPart(extname2,"extname"),assertPath(this.dirname,"extname"),extname2){if(extname2.codePointAt(0)!==46)throw new Error("`extname` must\
 start with `.`");if(extname2.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=minpath.join(this.dirname,this.stem+(extname2||""))}get path(){return this.history[this.history.length-1]}set path(path2){isUrl(path2)&&(path2=urlToPath(path2)),assertNonEmpty(path2,"path"),this.path!==path2&&this.history.push(path2)}get stem(){return typeof this.path=="string"?minpath.basename(this.path,this.extname):void 0}set stem(stem){assertNonEmpty(stem,"stem"),assertPart(stem,
"stem"),this.path=minpath.join(this.dirname||"",stem+(this.extname||""))}fail(causeOrReason,optionsOrParentOrPlace,origin2){const message=this.message(causeOrReason,optionsOrParentOrPlace,origin2);throw message.fatal=!0,message}info(causeOrReason,optionsOrParentOrPlace,origin2){const message=this.message(causeOrReason,optionsOrParentOrPlace,origin2);return message.fatal=void 0,message}message(causeOrReason,optionsOrParentOrPlace,origin2){const message=new VFileMessage(causeOrReason,optionsOrParentOrPlace,
origin2);return this.path&&(message.name=this.path+":"+message.name,message.file=this.path),message.fatal=!1,this.messages.push(message),message}toString(encoding){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(encoding||void 0).decode(this.value)}}function assertPart(part,name){if(part&&part.includes(minpath.sep))throw new Error("`"+name+"` cannot be a path: did not expect `"+minpath.sep+"`")}function assertNonEmpty(part,name){if(!part)throw new Error("`"+name+
"` cannot be empty")}function assertPath(path2,name){if(!path2)throw new Error("Setting `"+name+"` requires `path` to be set too")}function isUint8Array$1(value){return!!(value&&typeof value=="object"&&"byteLength"in value&&"byteOffset"in value)}const CallableInstance=(function(property){const proto=this.constructor.prototype,value=proto[property],apply=function(){return value.apply(apply,arguments)};return Object.setPrototypeOf(apply,proto),apply}),own$3={}.hasOwnProperty;class Processor extends CallableInstance{constructor(){
super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=trough()}copy(){const destination=new Processor;let index2=-1;for(;++index2<this.attachers.length;){const attacher=this.attachers[index2];destination.use(...attacher)}return destination.data(extend(!0,{},this.namespace)),destination}data(key2,value){return typeof key2=="string"?arguments.length===2?(assertUnfrozen(
"data",this.frozen),this.namespace[key2]=value,this):own$3.call(this.namespace,key2)&&this.namespace[key2]||void 0:key2?(assertUnfrozen("data",this.frozen),this.namespace=key2,this):this.namespace}freeze(){if(this.frozen)return this;const self2=this;for(;++this.freezeIndex<this.attachers.length;){const[attacher,...options]=this.attachers[this.freezeIndex];if(options[0]===!1)continue;options[0]===!0&&(options[0]=void 0);const transformer=attacher.call(self2,...options);typeof transformer=="functi\
on"&&this.transformers.use(transformer)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(file){this.freeze();const realFile=vfile(file),parser=this.parser||this.Parser;return assertParser("parse",parser),parser(String(realFile),realFile)}process(file,done){const self2=this;return this.freeze(),assertParser("process",this.parser||this.Parser),assertCompiler("process",this.compiler||this.Compiler),done?executor(void 0,done):new Promise(executor);function executor(resolve2,reject){
const realFile=vfile(file),parseTree3=self2.parse(realFile);self2.run(parseTree3,realFile,function(error2,tree,file2){if(error2||!tree||!file2)return realDone(error2);const compileTree=tree,compileResult=self2.stringify(compileTree,file2);looksLikeAValue(compileResult)?file2.value=compileResult:file2.result=compileResult,realDone(error2,file2)});function realDone(error2,file2){error2||!file2?reject(error2):resolve2?resolve2(file2):done(void 0,file2)}}}processSync(file){let complete=!1,result;return this.
freeze(),assertParser("processSync",this.parser||this.Parser),assertCompiler("processSync",this.compiler||this.Compiler),this.process(file,realDone),assertDone("processSync","process",complete),result;function realDone(error2,file2){complete=!0,bail(error2),result=file2}}run(tree,file,done){assertNode(tree),this.freeze();const transformers=this.transformers;return!done&&typeof file=="function"&&(done=file,file=void 0),done?executor(void 0,done):new Promise(executor);function executor(resolve2,reject){
const realFile=vfile(file);transformers.run(tree,realFile,realDone);function realDone(error2,outputTree,file2){const resultingTree=outputTree||tree;error2?reject(error2):resolve2?resolve2(resultingTree):done(void 0,resultingTree,file2)}}}runSync(tree,file){let complete=!1,result;return this.run(tree,file,realDone),assertDone("runSync","run",complete),result;function realDone(error2,tree2){bail(error2),result=tree2,complete=!0}}stringify(tree,file){this.freeze();const realFile=vfile(file),compiler2=this.
compiler||this.Compiler;return assertCompiler("stringify",compiler2),assertNode(tree),compiler2(tree,realFile)}use(value,...parameters){const attachers=this.attachers,namespace=this.namespace;if(assertUnfrozen("use",this.frozen),value!=null)if(typeof value=="function")addPlugin(value,parameters);else if(typeof value=="object")Array.isArray(value)?addList(value):addPreset(value);else throw new TypeError("Expected usable value, not `"+value+"`");return this;function add2(value2){if(typeof value2==
"function")addPlugin(value2,[]);else if(typeof value2=="object")if(Array.isArray(value2)){const[plugin,...parameters2]=value2;addPlugin(plugin,parameters2)}else addPreset(value2);else throw new TypeError("Expected usable value, not `"+value2+"`")}function addPreset(result){if(!("plugins"in result)&&!("settings"in result))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this h\
as neither");addList(result.plugins),result.settings&&(namespace.settings=extend(!0,namespace.settings,result.settings))}function addList(plugins){let index2=-1;if(plugins!=null)if(Array.isArray(plugins))for(;++index2<plugins.length;){const thing=plugins[index2];add2(thing)}else throw new TypeError("Expected a list of plugins, not `"+plugins+"`")}function addPlugin(plugin,parameters2){let index2=-1,entryIndex=-1;for(;++index2<attachers.length;)if(attachers[index2][0]===plugin){entryIndex=index2;
break}if(entryIndex===-1)attachers.push([plugin,...parameters2]);else if(parameters2.length>0){let[primary,...rest]=parameters2;const currentPrimary=attachers[entryIndex][1];isPlainObject(currentPrimary)&&isPlainObject(primary)&&(primary=extend(!0,currentPrimary,primary)),attachers[entryIndex]=[plugin,primary,...rest]}}}}const unified=new Processor().freeze();function assertParser(name,value){if(typeof value!="function")throw new TypeError("Cannot `"+name+"` without `parser`")}function assertCompiler(name,value){
if(typeof value!="function")throw new TypeError("Cannot `"+name+"` without `compiler`")}function assertUnfrozen(name,frozen){if(frozen)throw new Error("Cannot call `"+name+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function assertNode(node2){if(!isPlainObject(node2)||typeof node2.type!="string")throw new TypeError("Expected node, got `"+node2+"`")}function assertDone(name,asyncName,complete){if(!complete)throw new Error("`"+
name+"` finished async. Use `"+asyncName+"` instead")}function vfile(value){return looksLikeAVFile(value)?value:new VFile(value)}function looksLikeAVFile(value){return!!(value&&typeof value=="object"&&"message"in value&&"messages"in value)}function looksLikeAValue(value){return typeof value=="string"||isUint8Array(value)}function isUint8Array(value){return!!(value&&typeof value=="object"&&"byteLength"in value&&"byteOffset"in value)}const remark=unified().use(remarkParse).use(remarkStringify).freeze();
function escapeStringRegexp(string2){if(typeof string2!="string")throw new TypeError("Expected a string");return string2.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function findAndReplace(tree,list2,options){const ignored=convert((options||{}).ignore||[]),pairs=toPairs(list2);let pairIndex=-1;for(;++pairIndex<pairs.length;)visitParents(tree,"text",visitor);function visitor(node2,parents){let index2=-1,grandparent;for(;++index2<parents.length;){const parent=parents[index2],siblings2=grandparent?
grandparent.children:void 0;if(ignored(parent,siblings2?siblings2.indexOf(parent):void 0,grandparent))return;grandparent=parent}if(grandparent)return handler(node2,parents)}function handler(node2,parents){const parent=parents[parents.length-1],find2=pairs[pairIndex][0],replace2=pairs[pairIndex][1];let start2=0;const index2=parent.children.indexOf(node2);let change=!1,nodes2=[];find2.lastIndex=0;let match=find2.exec(node2.value);for(;match;){const position2=match.index,matchObject={index:match.index,
input:match.input,stack:[...parents,node2]};let value=replace2(...match,matchObject);if(typeof value=="string"&&(value=value.length>0?{type:"text",value}:void 0),value===!1?find2.lastIndex=position2+1:(start2!==position2&&nodes2.push({type:"text",value:node2.value.slice(start2,position2)}),Array.isArray(value)?nodes2.push(...value):value&&nodes2.push(value),start2=position2+match[0].length,change=!0),!find2.global)break;match=find2.exec(node2.value)}return change?(start2<node2.value.length&&nodes2.
push({type:"text",value:node2.value.slice(start2)}),parent.children.splice(index2,1,...nodes2)):nodes2=[node2],index2+nodes2.length}}function toPairs(tupleOrList){const result=[];if(!Array.isArray(tupleOrList))throw new TypeError("Expected find and replace tuple or list of tuples");const list2=!tupleOrList[0]||Array.isArray(tupleOrList[0])?tupleOrList:[tupleOrList];let index2=-1;for(;++index2<list2.length;){const tuple=list2[index2];result.push([toExpression(tuple[0]),toFunction(tuple[1])])}return result}
function toExpression(find2){return typeof find2=="string"?new RegExp(escapeStringRegexp(find2),"g"):find2}function toFunction(replace2){return typeof replace2=="function"?replace2:function(){return replace2}}function newlineToBreak(tree){findAndReplace(tree,[/\r?\n|\r/g,replace$1])}function replace$1(){return{type:"break"}}function remarkBreaks(){return function(tree){newlineToBreak(tree)}}function ccount(value,character){const source2=String(value);if(typeof character!="string")throw new TypeError(
"Expected character");let count=0,index2=source2.indexOf(character);for(;index2!==-1;)count++,index2=source2.indexOf(character,index2+character.length);return count}const inConstruct="phrasing",notInConstruct=["autolink","link","image","label"];function gfmAutolinkLiteralFromMarkdown(){return{transforms:[transformGfmAutolinkLiterals],enter:{literalAutolink:enterLiteralAutolink,literalAutolinkEmail:enterLiteralAutolinkValue,literalAutolinkHttp:enterLiteralAutolinkValue,literalAutolinkWww:enterLiteralAutolinkValue},
exit:{literalAutolink:exitLiteralAutolink,literalAutolinkEmail:exitLiteralAutolinkEmail,literalAutolinkHttp:exitLiteralAutolinkHttp,literalAutolinkWww:exitLiteralAutolinkWww}}}function gfmAutolinkLiteralToMarkdown(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct,notInConstruct},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct,notInConstruct},{character:":",before:"[ps]",after:"\\/",inConstruct,notInConstruct}]}}function enterLiteralAutolink(token2){this.
enter({type:"link",title:null,url:"",children:[]},token2)}function enterLiteralAutolinkValue(token2){this.config.enter.autolinkProtocol.call(this,token2)}function exitLiteralAutolinkHttp(token2){this.config.exit.autolinkProtocol.call(this,token2)}function exitLiteralAutolinkWww(token2){this.config.exit.data.call(this,token2);const node2=this.stack[this.stack.length-1];node2.type,node2.url="http://"+this.sliceSerialize(token2)}function exitLiteralAutolinkEmail(token2){this.config.exit.autolinkEmail.
call(this,token2)}function exitLiteralAutolink(token2){this.exit(token2)}function transformGfmAutolinkLiterals(tree){findAndReplace(tree,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,findUrl],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),findEmail]],{ignore:["link","linkReference"]})}function findUrl(_,protocol,domain2,path2,match){let prefix="";if(!previous$1(match)||(/^w/i.test(protocol)&&(domain2=protocol+domain2,protocol="",prefix="http://"),!isCorrectDomain(
domain2)))return!1;const parts=splitUrl(domain2+path2);if(!parts[0])return!1;const result={type:"link",title:null,url:prefix+protocol+parts[0],children:[{type:"text",value:protocol+parts[0]}]};return parts[1]?[result,{type:"text",value:parts[1]}]:result}function findEmail(_,atext,label,match){return!previous$1(match,!0)||/[-\d_]$/.test(label)?!1:{type:"link",title:null,url:"mailto:"+atext+"@"+label,children:[{type:"text",value:atext+"@"+label}]}}function isCorrectDomain(domain2){const parts=domain2.
split(".");return!(parts.length<2||parts[parts.length-1]&&(/_/.test(parts[parts.length-1])||!/[a-zA-Z\d]/.test(parts[parts.length-1]))||parts[parts.length-2]&&(/_/.test(parts[parts.length-2])||!/[a-zA-Z\d]/.test(parts[parts.length-2])))}function splitUrl(url2){const trailExec=/[!"&'),.:;<>?\]}]+$/.exec(url2);if(!trailExec)return[url2,void 0];url2=url2.slice(0,trailExec.index);let trail2=trailExec[0],closingParenIndex=trail2.indexOf(")");const openingParens=ccount(url2,"(");let closingParens=ccount(
url2,")");for(;closingParenIndex!==-1&&openingParens>closingParens;)url2+=trail2.slice(0,closingParenIndex+1),trail2=trail2.slice(closingParenIndex+1),closingParenIndex=trail2.indexOf(")"),closingParens++;return[url2,trail2]}function previous$1(match,email2){const code2=match.input.charCodeAt(match.index-1);return(match.index===0||unicodeWhitespace(code2)||unicodePunctuation(code2))&&(!email2||code2!==47)}footnoteReference$1.peek=footnoteReferencePeek;function enterFootnoteCallString(){this.buffer()}
function enterFootnoteCall(token2){this.enter({type:"footnoteReference",identifier:"",label:""},token2)}function enterFootnoteDefinitionLabelString(){this.buffer()}function enterFootnoteDefinition(token2){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},token2)}function exitFootnoteCallString(token2){const label=this.resume(),node2=this.stack[this.stack.length-1];node2.type,node2.identifier=normalizeIdentifier(this.sliceSerialize(token2)).toLowerCase(),node2.label=label}
function exitFootnoteCall(token2){this.exit(token2)}function exitFootnoteDefinitionLabelString(token2){const label=this.resume(),node2=this.stack[this.stack.length-1];node2.type,node2.identifier=normalizeIdentifier(this.sliceSerialize(token2)).toLowerCase(),node2.label=label}function exitFootnoteDefinition(token2){this.exit(token2)}function footnoteReferencePeek(){return"["}function footnoteReference$1(node2,_,state2,info2){const tracker=state2.createTracker(info2);let value=tracker.move("[^");const exit2=state2.
enter("footnoteReference"),subexit=state2.enter("reference");return value+=tracker.move(state2.safe(state2.associationId(node2),{after:"]",before:value})),subexit(),exit2(),value+=tracker.move("]"),value}function gfmFootnoteFromMarkdown(){return{enter:{gfmFootnoteCallString:enterFootnoteCallString,gfmFootnoteCall:enterFootnoteCall,gfmFootnoteDefinitionLabelString:enterFootnoteDefinitionLabelString,gfmFootnoteDefinition:enterFootnoteDefinition},exit:{gfmFootnoteCallString:exitFootnoteCallString,gfmFootnoteCall:exitFootnoteCall,
gfmFootnoteDefinitionLabelString:exitFootnoteDefinitionLabelString,gfmFootnoteDefinition:exitFootnoteDefinition}}}function gfmFootnoteToMarkdown(options){let firstLineBlank=!1;return options&&options.firstLineBlank&&(firstLineBlank=!0),{handlers:{footnoteDefinition,footnoteReference:footnoteReference$1},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function footnoteDefinition(node2,_,state2,info2){const tracker=state2.createTracker(info2);let value=tracker.move("[^");const exit2=state2.
enter("footnoteDefinition"),subexit=state2.enter("label");return value+=tracker.move(state2.safe(state2.associationId(node2),{before:value,after:"]"})),subexit(),value+=tracker.move("]:"),node2.children&&node2.children.length>0&&(tracker.shift(4),value+=tracker.move((firstLineBlank?`
`:" ")+state2.indentLines(state2.containerFlow(node2,tracker.current()),firstLineBlank?mapAll:mapExceptFirst))),exit2(),value}}function mapExceptFirst(line,index2,blank){return index2===0?line:mapAll(line,index2,blank)}function mapAll(line,index2,blank){return(blank?"":"    ")+line}const constructsWithoutStrikethrough=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];handleDelete.peek=peekDelete;function gfmStrikethroughFromMarkdown(){return{canContainEols:[
"delete"],enter:{strikethrough:enterStrikethrough},exit:{strikethrough:exitStrikethrough}}}function gfmStrikethroughToMarkdown(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:constructsWithoutStrikethrough}],handlers:{delete:handleDelete}}}function enterStrikethrough(token2){this.enter({type:"delete",children:[]},token2)}function exitStrikethrough(token2){this.exit(token2)}function handleDelete(node2,_,state2,info2){const tracker=state2.createTracker(info2),exit2=state2.enter(
"strikethrough");let value=tracker.move("~~");return value+=state2.containerPhrasing(node2,{...tracker.current(),before:value,after:"~"}),value+=tracker.move("~~"),exit2(),value}function peekDelete(){return"~"}function defaultStringLength(value){return value.length}function markdownTable(table2,options){const settings=options||{},align=(settings.align||[]).concat(),stringLength=settings.stringLength||defaultStringLength,alignments=[],cellMatrix=[],sizeMatrix=[],longestCellByColumn=[];let mostCellsPerRow=0,
rowIndex=-1;for(;++rowIndex<table2.length;){const row3=[],sizes2=[];let columnIndex2=-1;for(table2[rowIndex].length>mostCellsPerRow&&(mostCellsPerRow=table2[rowIndex].length);++columnIndex2<table2[rowIndex].length;){const cell2=serialize$1(table2[rowIndex][columnIndex2]);if(settings.alignDelimiters!==!1){const size2=stringLength(cell2);sizes2[columnIndex2]=size2,(longestCellByColumn[columnIndex2]===void 0||size2>longestCellByColumn[columnIndex2])&&(longestCellByColumn[columnIndex2]=size2)}row3.push(
cell2)}cellMatrix[rowIndex]=row3,sizeMatrix[rowIndex]=sizes2}let columnIndex=-1;if(typeof align=="object"&&"length"in align)for(;++columnIndex<mostCellsPerRow;)alignments[columnIndex]=toAlignment(align[columnIndex]);else{const code2=toAlignment(align);for(;++columnIndex<mostCellsPerRow;)alignments[columnIndex]=code2}columnIndex=-1;const row2=[],sizes=[];for(;++columnIndex<mostCellsPerRow;){const code2=alignments[columnIndex];let before="",after="";code2===99?(before=":",after=":"):code2===108?before=
":":code2===114&&(after=":");let size2=settings.alignDelimiters===!1?1:Math.max(1,longestCellByColumn[columnIndex]-before.length-after.length);const cell2=before+"-".repeat(size2)+after;settings.alignDelimiters!==!1&&(size2=before.length+size2+after.length,size2>longestCellByColumn[columnIndex]&&(longestCellByColumn[columnIndex]=size2),sizes[columnIndex]=size2),row2[columnIndex]=cell2}cellMatrix.splice(1,0,row2),sizeMatrix.splice(1,0,sizes),rowIndex=-1;const lines=[];for(;++rowIndex<cellMatrix.length;){
const row3=cellMatrix[rowIndex],sizes2=sizeMatrix[rowIndex];columnIndex=-1;const line=[];for(;++columnIndex<mostCellsPerRow;){const cell2=row3[columnIndex]||"";let before="",after="";if(settings.alignDelimiters!==!1){const size2=longestCellByColumn[columnIndex]-(sizes2[columnIndex]||0),code2=alignments[columnIndex];code2===114?before=" ".repeat(size2):code2===99?size2%2?(before=" ".repeat(size2/2+.5),after=" ".repeat(size2/2-.5)):(before=" ".repeat(size2/2),after=before):after=" ".repeat(size2)}
settings.delimiterStart!==!1&&!columnIndex&&line.push("|"),settings.padding!==!1&&!(settings.alignDelimiters===!1&&cell2==="")&&(settings.delimiterStart!==!1||columnIndex)&&line.push(" "),settings.alignDelimiters!==!1&&line.push(before),line.push(cell2),settings.alignDelimiters!==!1&&line.push(after),settings.padding!==!1&&line.push(" "),(settings.delimiterEnd!==!1||columnIndex!==mostCellsPerRow-1)&&line.push("|")}lines.push(settings.delimiterEnd===!1?line.join("").replace(/ +$/,""):line.join(""))}
return lines.join(`
`)}function serialize$1(value){return value==null?"":String(value)}function toAlignment(value){const code2=typeof value=="string"?value.codePointAt(0):0;return code2===67||code2===99?99:code2===76||code2===108?108:code2===82||code2===114?114:0}function gfmTableFromMarkdown(){return{enter:{table:enterTable,tableData:enterCell,tableHeader:enterCell,tableRow:enterRow},exit:{codeText:exitCodeText,table:exitTable,tableData:exit,tableHeader:exit,tableRow:exit}}}function enterTable(token2){const align=token2.
_align;this.enter({type:"table",align:align.map(function(d2){return d2==="none"?null:d2}),children:[]},token2),this.data.inTable=!0}function exitTable(token2){this.exit(token2),this.data.inTable=void 0}function enterRow(token2){this.enter({type:"tableRow",children:[]},token2)}function exit(token2){this.exit(token2)}function enterCell(token2){this.enter({type:"tableCell",children:[]},token2)}function exitCodeText(token2){let value=this.resume();this.data.inTable&&(value=value.replace(/\\([\\|])/g,
replace));const node2=this.stack[this.stack.length-1];node2.type,node2.value=value,this.exit(token2)}function replace($0,$1){return $1==="|"?$1:$0}function gfmTableToMarkdown(options){const settings=options||{},padding=settings.tableCellPadding,alignDelimiters=settings.tablePipeAlign,stringLength=settings.stringLength,around=padding?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[	 :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:inlineCodeWithTable,table:handleTable,tableCell:handleTableCell,tableRow:handleTableRow}};function handleTable(node2,_,state2,info2){return serializeData(handleTableAsData(node2,state2,info2),node2.align)}function handleTableRow(node2,_,state2,info2){const row2=handleTableRowAsData(node2,state2,
info2),value=serializeData([row2]);return value.slice(0,value.indexOf(`
`))}function handleTableCell(node2,_,state2,info2){const exit2=state2.enter("tableCell"),subexit=state2.enter("phrasing"),value=state2.containerPhrasing(node2,{...info2,before:around,after:around});return subexit(),exit2(),value}function serializeData(matrix,align){return markdownTable(matrix,{align,alignDelimiters,padding,stringLength})}function handleTableAsData(node2,state2,info2){const children=node2.children;let index2=-1;const result=[],subexit=state2.enter("table");for(;++index2<children.
length;)result[index2]=handleTableRowAsData(children[index2],state2,info2);return subexit(),result}function handleTableRowAsData(node2,state2,info2){const children=node2.children;let index2=-1;const result=[],subexit=state2.enter("tableRow");for(;++index2<children.length;)result[index2]=handleTableCell(children[index2],node2,state2,info2);return subexit(),result}function inlineCodeWithTable(node2,parent,state2){let value=handle$1.inlineCode(node2,parent,state2);return state2.stack.includes("tabl\
eCell")&&(value=value.replace(/\|/g,"\\$&")),value}}function gfmTaskListItemFromMarkdown(){return{exit:{taskListCheckValueChecked:exitCheck,taskListCheckValueUnchecked:exitCheck,paragraph:exitParagraphWithTaskListItem}}}function gfmTaskListItemToMarkdown(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:listItemWithTaskListItem}}}function exitCheck(token2){const node2=this.stack[this.stack.length-2];node2.type,node2.checked=token2.type==="taskListCheckValueChecked"}function exitParagraphWithTaskListItem(token2){
const parent=this.stack[this.stack.length-2];if(parent&&parent.type==="listItem"&&typeof parent.checked=="boolean"){const node2=this.stack[this.stack.length-1];node2.type;const head2=node2.children[0];if(head2&&head2.type==="text"){const siblings2=parent.children;let index2=-1,firstParaghraph;for(;++index2<siblings2.length;){const sibling2=siblings2[index2];if(sibling2.type==="paragraph"){firstParaghraph=sibling2;break}}firstParaghraph===node2&&(head2.value=head2.value.slice(1),head2.value.length===
0?node2.children.shift():node2.position&&head2.position&&typeof head2.position.start.offset=="number"&&(head2.position.start.column++,head2.position.start.offset++,node2.position.start=Object.assign({},head2.position.start)))}}this.exit(token2)}function listItemWithTaskListItem(node2,parent,state2,info2){const head2=node2.children[0],checkable=typeof node2.checked=="boolean"&&head2&&head2.type==="paragraph",checkbox="["+(node2.checked?"x":" ")+"] ",tracker=state2.createTracker(info2);checkable&&
tracker.move(checkbox);let value=handle$1.listItem(node2,parent,state2,{...info2,...tracker.current()});return checkable&&(value=value.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,check)),value;function check($0){return $0+checkbox}}function gfmFromMarkdown(){return[gfmAutolinkLiteralFromMarkdown(),gfmFootnoteFromMarkdown(),gfmStrikethroughFromMarkdown(),gfmTableFromMarkdown(),gfmTaskListItemFromMarkdown()]}function gfmToMarkdown(options){return{extensions:[gfmAutolinkLiteralToMarkdown(),gfmFootnoteToMarkdown(
options),gfmStrikethroughToMarkdown(),gfmTableToMarkdown(options),gfmTaskListItemToMarkdown()]}}const wwwPrefix={tokenize:tokenizeWwwPrefix,partial:!0},domain={tokenize:tokenizeDomain,partial:!0},path$1={tokenize:tokenizePath,partial:!0},trail={tokenize:tokenizeTrail,partial:!0},emailDomainDotTrail={tokenize:tokenizeEmailDomainDotTrail,partial:!0},wwwAutolink={name:"wwwAutolink",tokenize:tokenizeWwwAutolink,previous:previousWww},protocolAutolink={name:"protocolAutolink",tokenize:tokenizeProtocolAutolink,
previous:previousProtocol},emailAutolink={name:"emailAutolink",tokenize:tokenizeEmailAutolink,previous:previousEmail},text$4={};function gfmAutolinkLiteral(){return{text:text$4}}let code$1=48;for(;code$1<123;)text$4[code$1]=emailAutolink,code$1++,code$1===58?code$1=65:code$1===91&&(code$1=97);text$4[43]=emailAutolink;text$4[45]=emailAutolink;text$4[46]=emailAutolink;text$4[95]=emailAutolink;text$4[72]=[emailAutolink,protocolAutolink];text$4[104]=[emailAutolink,protocolAutolink];text$4[87]=[emailAutolink,
wwwAutolink];text$4[119]=[emailAutolink,wwwAutolink];function tokenizeEmailAutolink(effects,ok,nok){const self2=this;let dot,data;return start2;function start2(code2){return!gfmAtext(code2)||!previousEmail.call(self2,self2.previous)||previousUnbalanced(self2.events)?nok(code2):(effects.enter("literalAutolink"),effects.enter("literalAutolinkEmail"),atext(code2))}function atext(code2){return gfmAtext(code2)?(effects.consume(code2),atext):code2===64?(effects.consume(code2),emailDomain):nok(code2)}function emailDomain(code2){
return code2===46?effects.check(emailDomainDotTrail,emailDomainAfter,emailDomainDot)(code2):code2===45||code2===95||asciiAlphanumeric(code2)?(data=!0,effects.consume(code2),emailDomain):emailDomainAfter(code2)}function emailDomainDot(code2){return effects.consume(code2),dot=!0,emailDomain}function emailDomainAfter(code2){return data&&dot&&asciiAlpha(self2.previous)?(effects.exit("literalAutolinkEmail"),effects.exit("literalAutolink"),ok(code2)):nok(code2)}}function tokenizeWwwAutolink(effects,ok,nok){
const self2=this;return wwwStart;function wwwStart(code2){return code2!==87&&code2!==119||!previousWww.call(self2,self2.previous)||previousUnbalanced(self2.events)?nok(code2):(effects.enter("literalAutolink"),effects.enter("literalAutolinkWww"),effects.check(wwwPrefix,effects.attempt(domain,effects.attempt(path$1,wwwAfter),nok),nok)(code2))}function wwwAfter(code2){return effects.exit("literalAutolinkWww"),effects.exit("literalAutolink"),ok(code2)}}function tokenizeProtocolAutolink(effects,ok,nok){
const self2=this;let buffer="",seen2=!1;return protocolStart;function protocolStart(code2){return(code2===72||code2===104)&&previousProtocol.call(self2,self2.previous)&&!previousUnbalanced(self2.events)?(effects.enter("literalAutolink"),effects.enter("literalAutolinkHttp"),buffer+=String.fromCodePoint(code2),effects.consume(code2),protocolPrefixInside):nok(code2)}function protocolPrefixInside(code2){if(asciiAlpha(code2)&&buffer.length<5)return buffer+=String.fromCodePoint(code2),effects.consume(
code2),protocolPrefixInside;if(code2===58){const protocol=buffer.toLowerCase();if(protocol==="http"||protocol==="https")return effects.consume(code2),protocolSlashesInside}return nok(code2)}function protocolSlashesInside(code2){return code2===47?(effects.consume(code2),seen2?afterProtocol:(seen2=!0,protocolSlashesInside)):nok(code2)}function afterProtocol(code2){return code2===null||asciiControl(code2)||markdownLineEndingOrSpace(code2)||unicodeWhitespace(code2)||unicodePunctuation(code2)?nok(code2):
effects.attempt(domain,effects.attempt(path$1,protocolAfter),nok)(code2)}function protocolAfter(code2){return effects.exit("literalAutolinkHttp"),effects.exit("literalAutolink"),ok(code2)}}function tokenizeWwwPrefix(effects,ok,nok){let size2=0;return wwwPrefixInside;function wwwPrefixInside(code2){return(code2===87||code2===119)&&size2<3?(size2++,effects.consume(code2),wwwPrefixInside):code2===46&&size2===3?(effects.consume(code2),wwwPrefixAfter):nok(code2)}function wwwPrefixAfter(code2){return code2===
null?nok(code2):ok(code2)}}function tokenizeDomain(effects,ok,nok){let underscoreInLastSegment,underscoreInLastLastSegment,seen2;return domainInside;function domainInside(code2){return code2===46||code2===95?effects.check(trail,domainAfter,domainAtPunctuation)(code2):code2===null||markdownLineEndingOrSpace(code2)||unicodeWhitespace(code2)||code2!==45&&unicodePunctuation(code2)?domainAfter(code2):(seen2=!0,effects.consume(code2),domainInside)}function domainAtPunctuation(code2){return code2===95?
underscoreInLastSegment=!0:(underscoreInLastLastSegment=underscoreInLastSegment,underscoreInLastSegment=void 0),effects.consume(code2),domainInside}function domainAfter(code2){return underscoreInLastLastSegment||underscoreInLastSegment||!seen2?nok(code2):ok(code2)}}function tokenizePath(effects,ok){let sizeOpen=0,sizeClose=0;return pathInside;function pathInside(code2){return code2===40?(sizeOpen++,effects.consume(code2),pathInside):code2===41&&sizeClose<sizeOpen?pathAtPunctuation(code2):code2===
33||code2===34||code2===38||code2===39||code2===41||code2===42||code2===44||code2===46||code2===58||code2===59||code2===60||code2===63||code2===93||code2===95||code2===126?effects.check(trail,ok,pathAtPunctuation)(code2):code2===null||markdownLineEndingOrSpace(code2)||unicodeWhitespace(code2)?ok(code2):(effects.consume(code2),pathInside)}function pathAtPunctuation(code2){return code2===41&&sizeClose++,effects.consume(code2),pathInside}}function tokenizeTrail(effects,ok,nok){return trail2;function trail2(code2){
return code2===33||code2===34||code2===39||code2===41||code2===42||code2===44||code2===46||code2===58||code2===59||code2===63||code2===95||code2===126?(effects.consume(code2),trail2):code2===38?(effects.consume(code2),trailCharacterReferenceStart):code2===93?(effects.consume(code2),trailBracketAfter):code2===60||code2===null||markdownLineEndingOrSpace(code2)||unicodeWhitespace(code2)?ok(code2):nok(code2)}function trailBracketAfter(code2){return code2===null||code2===40||code2===91||markdownLineEndingOrSpace(
code2)||unicodeWhitespace(code2)?ok(code2):trail2(code2)}function trailCharacterReferenceStart(code2){return asciiAlpha(code2)?trailCharacterReferenceInside(code2):nok(code2)}function trailCharacterReferenceInside(code2){return code2===59?(effects.consume(code2),trail2):asciiAlpha(code2)?(effects.consume(code2),trailCharacterReferenceInside):nok(code2)}}function tokenizeEmailDomainDotTrail(effects,ok,nok){return start2;function start2(code2){return effects.consume(code2),after}function after(code2){
return asciiAlphanumeric(code2)?nok(code2):ok(code2)}}function previousWww(code2){return code2===null||code2===40||code2===42||code2===95||code2===91||code2===93||code2===126||markdownLineEndingOrSpace(code2)}function previousProtocol(code2){return!asciiAlpha(code2)}function previousEmail(code2){return!(code2===47||gfmAtext(code2))}function gfmAtext(code2){return code2===43||code2===45||code2===46||code2===95||asciiAlphanumeric(code2)}function previousUnbalanced(events){let index2=events.length,
result=!1;for(;index2--;){const token2=events[index2][1];if((token2.type==="labelLink"||token2.type==="labelImage")&&!token2._balanced){result=!0;break}if(token2._gfmAutolinkLiteralWalkedInto){result=!1;break}}return events.length>0&&!result&&(events[events.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),result}const indent={tokenize:tokenizeIndent,partial:!0};function gfmFootnote(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:tokenizeDefinitionStart,continuation:{tokenize:tokenizeDefinitionContinuation},
exit:gfmFootnoteDefinitionEnd}},text:{91:{name:"gfmFootnoteCall",tokenize:tokenizeGfmFootnoteCall},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:tokenizePotentialGfmFootnoteCall,resolveTo:resolveToPotentialGfmFootnoteCall}}}}function tokenizePotentialGfmFootnoteCall(effects,ok,nok){const self2=this;let index2=self2.events.length;const defined=self2.parser.gfmFootnotes||(self2.parser.gfmFootnotes=[]);let labelStart;for(;index2--;){const token2=self2.events[index2][1];if(token2.type==="\
labelImage"){labelStart=token2;break}if(token2.type==="gfmFootnoteCall"||token2.type==="labelLink"||token2.type==="label"||token2.type==="image"||token2.type==="link")break}return start2;function start2(code2){if(!labelStart||!labelStart._balanced)return nok(code2);const id2=normalizeIdentifier(self2.sliceSerialize({start:labelStart.end,end:self2.now()}));return id2.codePointAt(0)!==94||!defined.includes(id2.slice(1))?nok(code2):(effects.enter("gfmFootnoteCallLabelMarker"),effects.consume(code2),
effects.exit("gfmFootnoteCallLabelMarker"),ok(code2))}}function resolveToPotentialGfmFootnoteCall(events,context){let index2=events.length;for(;index2--;)if(events[index2][1].type==="labelImage"&&events[index2][0]==="enter"){events[index2][1];break}events[index2+1][1].type="data",events[index2+3][1].type="gfmFootnoteCallLabelMarker";const call={type:"gfmFootnoteCall",start:Object.assign({},events[index2+3][1].start),end:Object.assign({},events[events.length-1][1].end)},marker={type:"gfmFootnoteC\
allMarker",start:Object.assign({},events[index2+3][1].end),end:Object.assign({},events[index2+3][1].end)};marker.end.column++,marker.end.offset++,marker.end._bufferIndex++;const string2={type:"gfmFootnoteCallString",start:Object.assign({},marker.end),end:Object.assign({},events[events.length-1][1].start)},chunk={type:"chunkString",contentType:"string",start:Object.assign({},string2.start),end:Object.assign({},string2.end)},replacement=[events[index2+1],events[index2+2],["enter",call,context],events[index2+
3],events[index2+4],["enter",marker,context],["exit",marker,context],["enter",string2,context],["enter",chunk,context],["exit",chunk,context],["exit",string2,context],events[events.length-2],events[events.length-1],["exit",call,context]];return events.splice(index2,events.length-index2+1,...replacement),events}function tokenizeGfmFootnoteCall(effects,ok,nok){const self2=this,defined=self2.parser.gfmFootnotes||(self2.parser.gfmFootnotes=[]);let size2=0,data;return start2;function start2(code2){return effects.
enter("gfmFootnoteCall"),effects.enter("gfmFootnoteCallLabelMarker"),effects.consume(code2),effects.exit("gfmFootnoteCallLabelMarker"),callStart}function callStart(code2){return code2!==94?nok(code2):(effects.enter("gfmFootnoteCallMarker"),effects.consume(code2),effects.exit("gfmFootnoteCallMarker"),effects.enter("gfmFootnoteCallString"),effects.enter("chunkString").contentType="string",callData)}function callData(code2){if(size2>999||code2===93&&!data||code2===null||code2===91||markdownLineEndingOrSpace(
code2))return nok(code2);if(code2===93){effects.exit("chunkString");const token2=effects.exit("gfmFootnoteCallString");return defined.includes(normalizeIdentifier(self2.sliceSerialize(token2)))?(effects.enter("gfmFootnoteCallLabelMarker"),effects.consume(code2),effects.exit("gfmFootnoteCallLabelMarker"),effects.exit("gfmFootnoteCall"),ok):nok(code2)}return markdownLineEndingOrSpace(code2)||(data=!0),size2++,effects.consume(code2),code2===92?callEscape:callData}function callEscape(code2){return code2===
91||code2===92||code2===93?(effects.consume(code2),size2++,callData):callData(code2)}}function tokenizeDefinitionStart(effects,ok,nok){const self2=this,defined=self2.parser.gfmFootnotes||(self2.parser.gfmFootnotes=[]);let identifier2,size2=0,data;return start2;function start2(code2){return effects.enter("gfmFootnoteDefinition")._container=!0,effects.enter("gfmFootnoteDefinitionLabel"),effects.enter("gfmFootnoteDefinitionLabelMarker"),effects.consume(code2),effects.exit("gfmFootnoteDefinitionLabe\
lMarker"),labelAtMarker}function labelAtMarker(code2){return code2===94?(effects.enter("gfmFootnoteDefinitionMarker"),effects.consume(code2),effects.exit("gfmFootnoteDefinitionMarker"),effects.enter("gfmFootnoteDefinitionLabelString"),effects.enter("chunkString").contentType="string",labelInside):nok(code2)}function labelInside(code2){if(size2>999||code2===93&&!data||code2===null||code2===91||markdownLineEndingOrSpace(code2))return nok(code2);if(code2===93){effects.exit("chunkString");const token2=effects.
exit("gfmFootnoteDefinitionLabelString");return identifier2=normalizeIdentifier(self2.sliceSerialize(token2)),effects.enter("gfmFootnoteDefinitionLabelMarker"),effects.consume(code2),effects.exit("gfmFootnoteDefinitionLabelMarker"),effects.exit("gfmFootnoteDefinitionLabel"),labelAfter}return markdownLineEndingOrSpace(code2)||(data=!0),size2++,effects.consume(code2),code2===92?labelEscape:labelInside}function labelEscape(code2){return code2===91||code2===92||code2===93?(effects.consume(code2),size2++,
labelInside):labelInside(code2)}function labelAfter(code2){return code2===58?(effects.enter("definitionMarker"),effects.consume(code2),effects.exit("definitionMarker"),defined.includes(identifier2)||defined.push(identifier2),factorySpace(effects,whitespaceAfter,"gfmFootnoteDefinitionWhitespace")):nok(code2)}function whitespaceAfter(code2){return ok(code2)}}function tokenizeDefinitionContinuation(effects,ok,nok){return effects.check(blankLine,ok,effects.attempt(indent,ok,nok))}function gfmFootnoteDefinitionEnd(effects){
effects.exit("gfmFootnoteDefinition")}function tokenizeIndent(effects,ok,nok){const self2=this;return factorySpace(effects,afterPrefix,"gfmFootnoteDefinitionIndent",5);function afterPrefix(code2){const tail=self2.events[self2.events.length-1];return tail&&tail[1].type==="gfmFootnoteDefinitionIndent"&&tail[2].sliceSerialize(tail[1],!0).length===4?ok(code2):nok(code2)}}function gfmStrikethrough(options){let single=(options||{}).singleTilde;const tokenizer={name:"strikethrough",tokenize:tokenizeStrikethrough,
resolveAll:resolveAllStrikethrough};return single==null&&(single=!0),{text:{126:tokenizer},insideSpan:{null:[tokenizer]},attentionMarkers:{null:[126]}};function resolveAllStrikethrough(events,context){let index2=-1;for(;++index2<events.length;)if(events[index2][0]==="enter"&&events[index2][1].type==="strikethroughSequenceTemporary"&&events[index2][1]._close){let open2=index2;for(;open2--;)if(events[open2][0]==="exit"&&events[open2][1].type==="strikethroughSequenceTemporary"&&events[open2][1]._open&&
events[index2][1].end.offset-events[index2][1].start.offset===events[open2][1].end.offset-events[open2][1].start.offset){events[index2][1].type="strikethroughSequence",events[open2][1].type="strikethroughSequence";const strikethrough2={type:"strikethrough",start:Object.assign({},events[open2][1].start),end:Object.assign({},events[index2][1].end)},text2={type:"strikethroughText",start:Object.assign({},events[open2][1].end),end:Object.assign({},events[index2][1].start)},nextEvents=[["enter",strikethrough2,
context],["enter",events[open2][1],context],["exit",events[open2][1],context],["enter",text2,context]],insideSpan2=context.parser.constructs.insideSpan.null;insideSpan2&&splice(nextEvents,nextEvents.length,0,resolveAll(insideSpan2,events.slice(open2+1,index2),context)),splice(nextEvents,nextEvents.length,0,[["exit",text2,context],["enter",events[index2][1],context],["exit",events[index2][1],context],["exit",strikethrough2,context]]),splice(events,open2-1,index2-open2+3,nextEvents),index2=open2+nextEvents.
length-2;break}}for(index2=-1;++index2<events.length;)events[index2][1].type==="strikethroughSequenceTemporary"&&(events[index2][1].type="data");return events}function tokenizeStrikethrough(effects,ok,nok){const previous2=this.previous,events=this.events;let size2=0;return start2;function start2(code2){return previous2===126&&events[events.length-1][1].type!=="characterEscape"?nok(code2):(effects.enter("strikethroughSequenceTemporary"),more(code2))}function more(code2){const before=classifyCharacter(
previous2);if(code2===126)return size2>1?nok(code2):(effects.consume(code2),size2++,more);if(size2<2&&!single)return nok(code2);const token2=effects.exit("strikethroughSequenceTemporary"),after=classifyCharacter(code2);return token2._open=!after||after===2&&!!before,token2._close=!before||before===2&&!!after,ok(code2)}}}class EditMap{constructor(){this.map=[]}add(index2,remove2,add2){addImplementation(this,index2,remove2,add2)}consume(events){if(this.map.sort(function(a,b){return a[0]-b[0]}),this.
map.length===0)return;let index2=this.map.length;const vecs=[];for(;index2>0;)index2-=1,vecs.push(events.slice(this.map[index2][0]+this.map[index2][1]),this.map[index2][2]),events.length=this.map[index2][0];vecs.push(events.slice()),events.length=0;let slice=vecs.pop();for(;slice;){for(const element2 of slice)events.push(element2);slice=vecs.pop()}this.map.length=0}}function addImplementation(editMap,at,remove2,add2){let index2=0;if(!(remove2===0&&add2.length===0)){for(;index2<editMap.map.length;){
if(editMap.map[index2][0]===at){editMap.map[index2][1]+=remove2,editMap.map[index2][2].push(...add2);return}index2+=1}editMap.map.push([at,remove2,add2])}}function gfmTableAlign(events,index2){let inDelimiterRow=!1;const align=[];for(;index2<events.length;){const event2=events[index2];if(inDelimiterRow){if(event2[0]==="enter")event2[1].type==="tableContent"&&align.push(events[index2+1][1].type==="tableDelimiterMarker"?"left":"none");else if(event2[1].type==="tableContent"){if(events[index2-1][1].
type==="tableDelimiterMarker"){const alignIndex=align.length-1;align[alignIndex]=align[alignIndex]==="left"?"center":"right"}}else if(event2[1].type==="tableDelimiterRow")break}else event2[0]==="enter"&&event2[1].type==="tableDelimiterRow"&&(inDelimiterRow=!0);index2+=1}return align}function gfmTable(){return{flow:{null:{name:"table",tokenize:tokenizeTable,resolveAll:resolveTable}}}}function tokenizeTable(effects,ok,nok){const self2=this;let size2=0,sizeB=0,seen2;return start2;function start2(code2){
let index2=self2.events.length-1;for(;index2>-1;){const type2=self2.events[index2][1].type;if(type2==="lineEnding"||type2==="linePrefix")index2--;else break}const tail=index2>-1?self2.events[index2][1].type:null,next2=tail==="tableHead"||tail==="tableRow"?bodyRowStart:headRowBefore;return next2===bodyRowStart&&self2.parser.lazy[self2.now().line]?nok(code2):next2(code2)}function headRowBefore(code2){return effects.enter("tableHead"),effects.enter("tableRow"),headRowStart(code2)}function headRowStart(code2){
return code2===124||(seen2=!0,sizeB+=1),headRowBreak(code2)}function headRowBreak(code2){return code2===null?nok(code2):markdownLineEnding(code2)?sizeB>1?(sizeB=0,self2.interrupt=!0,effects.exit("tableRow"),effects.enter("lineEnding"),effects.consume(code2),effects.exit("lineEnding"),headDelimiterStart):nok(code2):markdownSpace(code2)?factorySpace(effects,headRowBreak,"whitespace")(code2):(sizeB+=1,seen2&&(seen2=!1,size2+=1),code2===124?(effects.enter("tableCellDivider"),effects.consume(code2),effects.
exit("tableCellDivider"),seen2=!0,headRowBreak):(effects.enter("data"),headRowData(code2)))}function headRowData(code2){return code2===null||code2===124||markdownLineEndingOrSpace(code2)?(effects.exit("data"),headRowBreak(code2)):(effects.consume(code2),code2===92?headRowEscape:headRowData)}function headRowEscape(code2){return code2===92||code2===124?(effects.consume(code2),headRowData):headRowData(code2)}function headDelimiterStart(code2){return self2.interrupt=!1,self2.parser.lazy[self2.now().
line]?nok(code2):(effects.enter("tableDelimiterRow"),seen2=!1,markdownSpace(code2)?factorySpace(effects,headDelimiterBefore,"linePrefix",self2.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(code2):headDelimiterBefore(code2))}function headDelimiterBefore(code2){return code2===45||code2===58?headDelimiterValueBefore(code2):code2===124?(seen2=!0,effects.enter("tableCellDivider"),effects.consume(code2),effects.exit("tableCellDivider"),headDelimiterCellBefore):headDelimiterNok(code2)}
function headDelimiterCellBefore(code2){return markdownSpace(code2)?factorySpace(effects,headDelimiterValueBefore,"whitespace")(code2):headDelimiterValueBefore(code2)}function headDelimiterValueBefore(code2){return code2===58?(sizeB+=1,seen2=!0,effects.enter("tableDelimiterMarker"),effects.consume(code2),effects.exit("tableDelimiterMarker"),headDelimiterLeftAlignmentAfter):code2===45?(sizeB+=1,headDelimiterLeftAlignmentAfter(code2)):code2===null||markdownLineEnding(code2)?headDelimiterCellAfter(
code2):headDelimiterNok(code2)}function headDelimiterLeftAlignmentAfter(code2){return code2===45?(effects.enter("tableDelimiterFiller"),headDelimiterFiller(code2)):headDelimiterNok(code2)}function headDelimiterFiller(code2){return code2===45?(effects.consume(code2),headDelimiterFiller):code2===58?(seen2=!0,effects.exit("tableDelimiterFiller"),effects.enter("tableDelimiterMarker"),effects.consume(code2),effects.exit("tableDelimiterMarker"),headDelimiterRightAlignmentAfter):(effects.exit("tableDel\
imiterFiller"),headDelimiterRightAlignmentAfter(code2))}function headDelimiterRightAlignmentAfter(code2){return markdownSpace(code2)?factorySpace(effects,headDelimiterCellAfter,"whitespace")(code2):headDelimiterCellAfter(code2)}function headDelimiterCellAfter(code2){return code2===124?headDelimiterBefore(code2):code2===null||markdownLineEnding(code2)?!seen2||size2!==sizeB?headDelimiterNok(code2):(effects.exit("tableDelimiterRow"),effects.exit("tableHead"),ok(code2)):headDelimiterNok(code2)}function headDelimiterNok(code2){
return nok(code2)}function bodyRowStart(code2){return effects.enter("tableRow"),bodyRowBreak(code2)}function bodyRowBreak(code2){return code2===124?(effects.enter("tableCellDivider"),effects.consume(code2),effects.exit("tableCellDivider"),bodyRowBreak):code2===null||markdownLineEnding(code2)?(effects.exit("tableRow"),ok(code2)):markdownSpace(code2)?factorySpace(effects,bodyRowBreak,"whitespace")(code2):(effects.enter("data"),bodyRowData(code2))}function bodyRowData(code2){return code2===null||code2===
124||markdownLineEndingOrSpace(code2)?(effects.exit("data"),bodyRowBreak(code2)):(effects.consume(code2),code2===92?bodyRowEscape:bodyRowData)}function bodyRowEscape(code2){return code2===92||code2===124?(effects.consume(code2),bodyRowData):bodyRowData(code2)}}function resolveTable(events,context){let index2=-1,inFirstCellAwaitingPipe=!0,rowKind=0,lastCell=[0,0,0,0],cell2=[0,0,0,0],afterHeadAwaitingFirstBodyRow=!1,lastTableEnd=0,currentTable,currentBody,currentCell;const map2=new EditMap;for(;++index2<
events.length;){const event2=events[index2],token2=event2[1];event2[0]==="enter"?token2.type==="tableHead"?(afterHeadAwaitingFirstBodyRow=!1,lastTableEnd!==0&&(flushTableEnd(map2,context,lastTableEnd,currentTable,currentBody),currentBody=void 0,lastTableEnd=0),currentTable={type:"table",start:Object.assign({},token2.start),end:Object.assign({},token2.end)},map2.add(index2,0,[["enter",currentTable,context]])):token2.type==="tableRow"||token2.type==="tableDelimiterRow"?(inFirstCellAwaitingPipe=!0,
currentCell=void 0,lastCell=[0,0,0,0],cell2=[0,index2+1,0,0],afterHeadAwaitingFirstBodyRow&&(afterHeadAwaitingFirstBodyRow=!1,currentBody={type:"tableBody",start:Object.assign({},token2.start),end:Object.assign({},token2.end)},map2.add(index2,0,[["enter",currentBody,context]])),rowKind=token2.type==="tableDelimiterRow"?2:currentBody?3:1):rowKind&&(token2.type==="data"||token2.type==="tableDelimiterMarker"||token2.type==="tableDelimiterFiller")?(inFirstCellAwaitingPipe=!1,cell2[2]===0&&(lastCell[1]!==
0&&(cell2[0]=cell2[1],currentCell=flushCell(map2,context,lastCell,rowKind,void 0,currentCell),lastCell=[0,0,0,0]),cell2[2]=index2)):token2.type==="tableCellDivider"&&(inFirstCellAwaitingPipe?inFirstCellAwaitingPipe=!1:(lastCell[1]!==0&&(cell2[0]=cell2[1],currentCell=flushCell(map2,context,lastCell,rowKind,void 0,currentCell)),lastCell=cell2,cell2=[lastCell[1],index2,0,0])):token2.type==="tableHead"?(afterHeadAwaitingFirstBodyRow=!0,lastTableEnd=index2):token2.type==="tableRow"||token2.type==="ta\
bleDelimiterRow"?(lastTableEnd=index2,lastCell[1]!==0?(cell2[0]=cell2[1],currentCell=flushCell(map2,context,lastCell,rowKind,index2,currentCell)):cell2[1]!==0&&(currentCell=flushCell(map2,context,cell2,rowKind,index2,currentCell)),rowKind=0):rowKind&&(token2.type==="data"||token2.type==="tableDelimiterMarker"||token2.type==="tableDelimiterFiller")&&(cell2[3]=index2)}for(lastTableEnd!==0&&flushTableEnd(map2,context,lastTableEnd,currentTable,currentBody),map2.consume(context.events),index2=-1;++index2<
context.events.length;){const event2=context.events[index2];event2[0]==="enter"&&event2[1].type==="table"&&(event2[1]._align=gfmTableAlign(context.events,index2))}return events}function flushCell(map2,context,range,rowKind,rowEnd,previousCell){const groupName=rowKind===1?"tableHeader":rowKind===2?"tableDelimiter":"tableData",valueName="tableContent";range[0]!==0&&(previousCell.end=Object.assign({},getPoint(context.events,range[0])),map2.add(range[0],0,[["exit",previousCell,context]]));const now2=getPoint(
context.events,range[1]);if(previousCell={type:groupName,start:Object.assign({},now2),end:Object.assign({},now2)},map2.add(range[1],0,[["enter",previousCell,context]]),range[2]!==0){const relatedStart=getPoint(context.events,range[2]),relatedEnd=getPoint(context.events,range[3]),valueToken={type:valueName,start:Object.assign({},relatedStart),end:Object.assign({},relatedEnd)};if(map2.add(range[2],0,[["enter",valueToken,context]]),rowKind!==2){const start2=context.events[range[2]],end=context.events[range[3]];
if(start2[1].end=Object.assign({},end[1].end),start2[1].type="chunkText",start2[1].contentType="text",range[3]>range[2]+1){const a=range[2]+1,b=range[3]-range[2]-1;map2.add(a,b,[])}}map2.add(range[3]+1,0,[["exit",valueToken,context]])}return rowEnd!==void 0&&(previousCell.end=Object.assign({},getPoint(context.events,rowEnd)),map2.add(rowEnd,0,[["exit",previousCell,context]]),previousCell=void 0),previousCell}function flushTableEnd(map2,context,index2,table2,tableBody){const exits=[],related=getPoint(
context.events,index2);tableBody&&(tableBody.end=Object.assign({},related),exits.push(["exit",tableBody,context])),table2.end=Object.assign({},related),exits.push(["exit",table2,context]),map2.add(index2+1,0,exits)}function getPoint(events,index2){const event2=events[index2],side=event2[0]==="enter"?"start":"end";return event2[1][side]}const tasklistCheck={name:"tasklistCheck",tokenize:tokenizeTasklistCheck};function gfmTaskListItem(){return{text:{91:tasklistCheck}}}function tokenizeTasklistCheck(effects,ok,nok){
const self2=this;return open2;function open2(code2){return self2.previous!==null||!self2._gfmTasklistFirstContentOfListItem?nok(code2):(effects.enter("taskListCheck"),effects.enter("taskListCheckMarker"),effects.consume(code2),effects.exit("taskListCheckMarker"),inside)}function inside(code2){return markdownLineEndingOrSpace(code2)?(effects.enter("taskListCheckValueUnchecked"),effects.consume(code2),effects.exit("taskListCheckValueUnchecked"),close2):code2===88||code2===120?(effects.enter("taskL\
istCheckValueChecked"),effects.consume(code2),effects.exit("taskListCheckValueChecked"),close2):nok(code2)}function close2(code2){return code2===93?(effects.enter("taskListCheckMarker"),effects.consume(code2),effects.exit("taskListCheckMarker"),effects.exit("taskListCheck"),after):nok(code2)}function after(code2){return markdownLineEnding(code2)?ok(code2):markdownSpace(code2)?effects.check({tokenize:spaceThenNonSpace},ok,nok)(code2):nok(code2)}}function spaceThenNonSpace(effects,ok,nok){return factorySpace(
effects,after,"whitespace");function after(code2){return code2===null?nok(code2):ok(code2)}}function gfm(options){return combineExtensions([gfmAutolinkLiteral(),gfmFootnote(),gfmStrikethrough(options),gfmTable(),gfmTaskListItem()])}const emptyOptions$6={};function remarkGfm(options){const self2=this,settings=options||emptyOptions$6,data=self2.data(),micromarkExtensions=data.micromarkExtensions||(data.micromarkExtensions=[]),fromMarkdownExtensions=data.fromMarkdownExtensions||(data.fromMarkdownExtensions=
[]),toMarkdownExtensions=data.toMarkdownExtensions||(data.toMarkdownExtensions=[]);micromarkExtensions.push(gfm(settings)),fromMarkdownExtensions.push(gfmFromMarkdown()),toMarkdownExtensions.push(gfmToMarkdown(settings))}function mathFromMarkdown(){return{enter:{mathFlow:enterMathFlow,mathFlowFenceMeta:enterMathFlowMeta,mathText:enterMathText},exit:{mathFlow:exitMathFlow,mathFlowFence:exitMathFlowFence,mathFlowFenceMeta:exitMathFlowMeta,mathFlowValue:exitMathData,mathText:exitMathText,mathTextData:exitMathData}};
function enterMathFlow(token2){const code2={type:"element",tagName:"code",properties:{className:["language-math","math-display"]},children:[]};this.enter({type:"math",meta:null,value:"",data:{hName:"pre",hChildren:[code2]}},token2)}function enterMathFlowMeta(){this.buffer()}function exitMathFlowMeta(){const data=this.resume(),node2=this.stack[this.stack.length-1];node2.type,node2.meta=data}function exitMathFlowFence(){this.data.mathFlowInside||(this.buffer(),this.data.mathFlowInside=!0)}function exitMathFlow(token2){
const data=this.resume().replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),node2=this.stack[this.stack.length-1];node2.type,this.exit(token2),node2.value=data;const code2=node2.data.hChildren[0];code2.type,code2.tagName,code2.children.push({type:"text",value:data}),this.data.mathFlowInside=void 0}function enterMathText(token2){this.enter({type:"inlineMath",value:"",data:{hName:"code",hProperties:{className:["language-math","math-inline"]},hChildren:[]}},token2),this.buffer()}function exitMathText(token2){const data=this.
resume(),node2=this.stack[this.stack.length-1];node2.type,this.exit(token2),node2.value=data,node2.data.hChildren.push({type:"text",value:data})}function exitMathData(token2){this.config.enter.data.call(this,token2),this.config.exit.data.call(this,token2)}}function mathToMarkdown(options){let single=(options||{}).singleDollarTextMath;return single==null&&(single=!0),inlineMath.peek=inlineMathPeek,{unsafe:[{character:"\r",inConstruct:"mathFlowMeta"},{character:`
`,inConstruct:"mathFlowMeta"},{character:"$",after:single?void 0:"\\$",inConstruct:"phrasing"},{character:"$",inConstruct:"mathFlowMeta"},{atBreak:!0,character:"$",after:"\\$"}],handlers:{math:math2,inlineMath}};function math2(node2,_,state2,info2){const raw2=node2.value||"",tracker=state2.createTracker(info2),sequence="$".repeat(Math.max(longestStreak(raw2,"$")+1,2)),exit2=state2.enter("mathFlow");let value=tracker.move(sequence);if(node2.meta){const subexit=state2.enter("mathFlowMeta");value+=
tracker.move(state2.safe(node2.meta,{after:`
`,before:value,encode:["$"],...tracker.current()})),subexit()}return value+=tracker.move(`
`),raw2&&(value+=tracker.move(raw2+`
`)),value+=tracker.move(sequence),exit2(),value}function inlineMath(node2,_,state2){let value=node2.value||"",size2=1;for(single||size2++;new RegExp("(^|[^$])"+"\\$".repeat(size2)+"([^$]|$)").test(value);)size2++;const sequence="$".repeat(size2);/[^ \r\n]/.test(value)&&(/^[ \r\n]/.test(value)&&/[ \r\n]$/.test(value)||/^\$|\$$/.test(value))&&(value=" "+value+" ");let index2=-1;for(;++index2<state2.unsafe.length;){const pattern2=state2.unsafe[index2];if(!pattern2.atBreak)continue;const expression=state2.
compilePattern(pattern2);let match;for(;match=expression.exec(value);){let position2=match.index;value.codePointAt(position2)===10&&value.codePointAt(position2-1)===13&&position2--,value=value.slice(0,position2)+" "+value.slice(match.index+1)}}return sequence+value+sequence}function inlineMathPeek(){return"$"}}const mathFlow={tokenize:tokenizeMathFenced,concrete:!0,name:"mathFlow"},nonLazyContinuation={tokenize:tokenizeNonLazyContinuation,partial:!0};function tokenizeMathFenced(effects,ok,nok){const self2=this,
tail=self2.events[self2.events.length-1],initialSize=tail&&tail[1].type==="linePrefix"?tail[2].sliceSerialize(tail[1],!0).length:0;let sizeOpen=0;return start2;function start2(code2){return effects.enter("mathFlow"),effects.enter("mathFlowFence"),effects.enter("mathFlowFenceSequence"),sequenceOpen(code2)}function sequenceOpen(code2){return code2===36?(effects.consume(code2),sizeOpen++,sequenceOpen):sizeOpen<2?nok(code2):(effects.exit("mathFlowFenceSequence"),factorySpace(effects,metaBefore,"whit\
espace")(code2))}function metaBefore(code2){return code2===null||markdownLineEnding(code2)?metaAfter(code2):(effects.enter("mathFlowFenceMeta"),effects.enter("chunkString",{contentType:"string"}),meta(code2))}function meta(code2){return code2===null||markdownLineEnding(code2)?(effects.exit("chunkString"),effects.exit("mathFlowFenceMeta"),metaAfter(code2)):code2===36?nok(code2):(effects.consume(code2),meta)}function metaAfter(code2){return effects.exit("mathFlowFence"),self2.interrupt?ok(code2):effects.
attempt(nonLazyContinuation,beforeNonLazyContinuation,after)(code2)}function beforeNonLazyContinuation(code2){return effects.attempt({tokenize:tokenizeClosingFence,partial:!0},after,contentStart)(code2)}function contentStart(code2){return(initialSize?factorySpace(effects,beforeContentChunk,"linePrefix",initialSize+1):beforeContentChunk)(code2)}function beforeContentChunk(code2){return code2===null?after(code2):markdownLineEnding(code2)?effects.attempt(nonLazyContinuation,beforeNonLazyContinuation,
after)(code2):(effects.enter("mathFlowValue"),contentChunk(code2))}function contentChunk(code2){return code2===null||markdownLineEnding(code2)?(effects.exit("mathFlowValue"),beforeContentChunk(code2)):(effects.consume(code2),contentChunk)}function after(code2){return effects.exit("mathFlow"),ok(code2)}function tokenizeClosingFence(effects2,ok2,nok2){let size2=0;return factorySpace(effects2,beforeSequenceClose,"linePrefix",self2.parser.constructs.disable.null.includes("codeIndented")?void 0:4);function beforeSequenceClose(code2){
return effects2.enter("mathFlowFence"),effects2.enter("mathFlowFenceSequence"),sequenceClose(code2)}function sequenceClose(code2){return code2===36?(size2++,effects2.consume(code2),sequenceClose):size2<sizeOpen?nok2(code2):(effects2.exit("mathFlowFenceSequence"),factorySpace(effects2,afterSequenceClose,"whitespace")(code2))}function afterSequenceClose(code2){return code2===null||markdownLineEnding(code2)?(effects2.exit("mathFlowFence"),ok2(code2)):nok2(code2)}}}function tokenizeNonLazyContinuation(effects,ok,nok){
const self2=this;return start2;function start2(code2){return code2===null?ok(code2):(effects.enter("lineEnding"),effects.consume(code2),effects.exit("lineEnding"),lineStart)}function lineStart(code2){return self2.parser.lazy[self2.now().line]?nok(code2):ok(code2)}}function mathText(options){let single=(options||{}).singleDollarTextMath;return single==null&&(single=!0),{tokenize:tokenizeMathText,resolve:resolveMathText,previous,name:"mathText"};function tokenizeMathText(effects,ok,nok){let sizeOpen=0,
size2,token2;return start2;function start2(code2){return effects.enter("mathText"),effects.enter("mathTextSequence"),sequenceOpen(code2)}function sequenceOpen(code2){return code2===36?(effects.consume(code2),sizeOpen++,sequenceOpen):sizeOpen<2&&!single?nok(code2):(effects.exit("mathTextSequence"),between2(code2))}function between2(code2){return code2===null?nok(code2):code2===36?(token2=effects.enter("mathTextSequence"),size2=0,sequenceClose(code2)):code2===32?(effects.enter("space"),effects.consume(
code2),effects.exit("space"),between2):markdownLineEnding(code2)?(effects.enter("lineEnding"),effects.consume(code2),effects.exit("lineEnding"),between2):(effects.enter("mathTextData"),data(code2))}function data(code2){return code2===null||code2===32||code2===36||markdownLineEnding(code2)?(effects.exit("mathTextData"),between2(code2)):(effects.consume(code2),data)}function sequenceClose(code2){return code2===36?(effects.consume(code2),size2++,sequenceClose):size2===sizeOpen?(effects.exit("mathTe\
xtSequence"),effects.exit("mathText"),ok(code2)):(token2.type="mathTextData",data(code2))}}}function resolveMathText(events){let tailExitIndex=events.length-4,headEnterIndex=3,index2,enter;if((events[headEnterIndex][1].type==="lineEnding"||events[headEnterIndex][1].type==="space")&&(events[tailExitIndex][1].type==="lineEnding"||events[tailExitIndex][1].type==="space")){for(index2=headEnterIndex;++index2<tailExitIndex;)if(events[index2][1].type==="mathTextData"){events[tailExitIndex][1].type="mat\
hTextPadding",events[headEnterIndex][1].type="mathTextPadding",headEnterIndex+=2,tailExitIndex-=2;break}}for(index2=headEnterIndex-1,tailExitIndex++;++index2<=tailExitIndex;)enter===void 0?index2!==tailExitIndex&&events[index2][1].type!=="lineEnding"&&(enter=index2):(index2===tailExitIndex||events[index2][1].type==="lineEnding")&&(events[enter][1].type="mathTextData",index2!==enter+2&&(events[enter][1].end=events[index2-1][1].end,events.splice(enter+2,index2-enter-2),tailExitIndex-=index2-enter-
2,index2=enter+2),enter=void 0);return events}function previous(code2){return code2!==36||this.events[this.events.length-1][1].type==="characterEscape"}function math$1(options){return{flow:{36:mathFlow},text:{36:mathText(options)}}}class SourceLocation{constructor(lexer,start2,end){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=lexer,this.start=start2,this.end=end}static range(first,second){return second?!first||!first.loc||!second.loc||first.loc.lexer!==second.loc.lexer?null:new SourceLocation(
first.loc.lexer,first.loc.start,second.loc.end):first&&first.loc}}class Token{constructor(text2,loc){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=text2,this.loc=loc}range(endToken,text2){return new Token(text2,SourceLocation.range(this,endToken))}}class ParseError2{constructor(message,token2){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var error2="KaTeX parse error: "+message,start2,end,loc=token2&&token2.loc;if(loc&&
loc.start<=loc.end){var input=loc.lexer.input;start2=loc.start,end=loc.end,start2===input.length?error2+=" at end of input: ":error2+=" at position "+(start2+1)+": ";var underlined=input.slice(start2,end).replace(/[^]/g,"$&̲"),left;start2>15?left="…"+input.slice(start2-15,start2):left=input.slice(0,start2);var right;end+15<input.length?right=input.slice(end,end+15)+"…":right=input.slice(end),error2+=left+underlined+right}var self2=new Error(error2);return self2.name="ParseError",self2.__proto__=
ParseError2.prototype,self2.position=start2,start2!=null&&end!=null&&(self2.length=end-start2),self2.rawMessage=message,self2}}ParseError2.prototype.__proto__=Error.prototype;var contains=function(list2,elem){return list2.indexOf(elem)!==-1},deflt=function(setting,defaultIfUndefined){return setting===void 0?defaultIfUndefined:setting},uppercase=/([A-Z])/g,hyphenate=function(str){return str.replace(uppercase,"-$1").toLowerCase()},ESCAPE_LOOKUP={"&":"&amp;",">":"&gt;","<":"&lt;",'"':"&quot;","'":"\
&#x27;"},ESCAPE_REGEX=/[&><"']/g;function escape$2(text2){return String(text2).replace(ESCAPE_REGEX,match=>ESCAPE_LOOKUP[match])}var getBaseElem=function getBaseElem2(group){return group.type==="ordgroup"||group.type==="color"?group.body.length===1?getBaseElem2(group.body[0]):group:group.type==="font"?getBaseElem2(group.body):group},isCharacterBox=function(group){var baseElem=getBaseElem(group);return baseElem.type==="mathord"||baseElem.type==="textord"||baseElem.type==="atom"},assert=function(value){
if(!value)throw new Error("Expected non-null, but got "+String(value));return value},protocolFromUrl=function(url2){var protocol=/^[\x00-\x20]*([^\\/#?]*?)(:|&#0*58|&#x0*3a|&colon)/i.exec(url2);return protocol?protocol[2]!==":"||!/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(protocol[1])?null:protocol[1].toLowerCase():"_relative"},utils={contains,deflt,escape:escape$2,hyphenate,getBaseElem,isCharacterBox,protocolFromUrl},SETTINGS_SCHEMA={displayMode:{type:"boolean",description:"Render math in display mode, \
which puts the math in display style (so \\int and \\sum are large, for example), and centers the math on the page on its own line.",cli:"-d, --display-mode"},output:{type:{enum:["htmlAndMathml","html","mathml"]},description:"Determines the markup language of the output.",cli:"-F, --format <type>"},leqno:{type:"boolean",description:"Render display math in leqno style (left-justified tags)."},fleqn:{type:"boolean",description:"Render display math flush left."},throwOnError:{type:"boolean",default:!0,
cli:"-t, --no-throw-on-error",cliDescription:"Render errors (in the color given by --error-color) instead of throwing a ParseError exception when encountering an error."},errorColor:{type:"string",default:"#cc0000",cli:"-c, --error-color <color>",cliDescription:"A color string given in the format 'rgb' or 'rrggbb' (no #). This option determines the color of errors rendered by the -t option.",cliProcessor:color=>"#"+color},macros:{type:"object",cli:"-m, --macro <def>",cliDescription:"Define custo\
m macro of the form '\\foo:expansion' (use multiple -m arguments for multiple macros).",cliDefault:[],cliProcessor:(def,defs)=>(defs.push(def),defs)},minRuleThickness:{type:"number",description:"Specifies a minimum thickness, in ems, for fraction lines, `\\sqrt` top lines, `{array}` vertical lines, `\\hline`, `\\hdashline`, `\\underline`, `\\overline`, and the borders of `\\fbox`, `\\boxed`, and `\\fcolorbox`.",processor:t=>Math.max(0,t),cli:"--min-rule-thickness <size>",cliProcessor:parseFloat},
colorIsTextColor:{type:"boolean",description:"Makes \\color behave like LaTeX's 2-argument \\textcolor, instead of LaTeX's one-argument \\color mode change.",cli:"-b, --color-is-text-color"},strict:{type:[{enum:["warn","ignore","error"]},"boolean","function"],description:"Turn on strict / LaTeX faithfulness mode, which throws an error if the input uses features that are not supported by LaTeX.",cli:"-S, --strict",cliDefault:!1},trust:{type:["boolean","function"],description:"Trust the input, ena\
bling all HTML features such as \\url.",cli:"-T, --trust"},maxSize:{type:"number",default:1/0,description:"If non-zero, all user-specified sizes, e.g. in \\rule{500em}{500em}, will be capped to maxSize ems. Otherwise, elements and spaces can be arbitrarily large",processor:s2=>Math.max(0,s2),cli:"-s, --max-size <n>",cliProcessor:parseInt},maxExpand:{type:"number",default:1e3,description:"Limit the number of macro expansions to the specified number, to prevent e.g. infinite macro loops. If set to\
 Infinity, the macro expander will try to fully expand as in LaTeX.",processor:n=>Math.max(0,n),cli:"-e, --max-expand <n>",cliProcessor:n=>n==="Infinity"?1/0:parseInt(n)},globalGroup:{type:"boolean",cli:!1}};function getDefaultValue(schema){if(schema.default)return schema.default;var type2=schema.type,defaultType=Array.isArray(type2)?type2[0]:type2;if(typeof defaultType!="string")return defaultType.enum[0];switch(defaultType){case"boolean":return!1;case"string":return"";case"number":return 0;case"\
object":return{}}}class Settings{constructor(options){this.displayMode=void 0,this.output=void 0,this.leqno=void 0,this.fleqn=void 0,this.throwOnError=void 0,this.errorColor=void 0,this.macros=void 0,this.minRuleThickness=void 0,this.colorIsTextColor=void 0,this.strict=void 0,this.trust=void 0,this.maxSize=void 0,this.maxExpand=void 0,this.globalGroup=void 0,options=options||{};for(var prop2 in SETTINGS_SCHEMA)if(SETTINGS_SCHEMA.hasOwnProperty(prop2)){var schema=SETTINGS_SCHEMA[prop2];this[prop2]=
options[prop2]!==void 0?schema.processor?schema.processor(options[prop2]):options[prop2]:getDefaultValue(schema)}}reportNonstrict(errorCode,errorMsg,token2){var strict=this.strict;if(typeof strict=="function"&&(strict=strict(errorCode,errorMsg,token2)),!(!strict||strict==="ignore")){if(strict===!0||strict==="error")throw new ParseError2("LaTeX-incompatible input and strict mode is set to 'error': "+(errorMsg+" ["+errorCode+"]"),token2);strict==="warn"?typeof console<"u"&&console.warn("LaTeX-inco\
mpatible input and strict mode is set to 'warn': "+(errorMsg+" ["+errorCode+"]")):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+strict+"': "+errorMsg+" ["+errorCode+"]"))}}useStrictBehavior(errorCode,errorMsg,token2){var strict=this.strict;if(typeof strict=="function")try{strict=strict(errorCode,errorMsg,token2)}catch{strict="error"}return!strict||strict==="ignore"?!1:strict===!0||strict==="error"?!0:strict==="warn"?(typeof console<"u"&&
console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+(errorMsg+" ["+errorCode+"]")),!1):(typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to "+("unrecognized '"+strict+"': "+errorMsg+" ["+errorCode+"]")),!1)}isTrusted(context){if(context.url&&!context.protocol){var protocol=utils.protocolFromUrl(context.url);if(protocol==null)return!1;context.protocol=protocol}var trust=typeof this.trust=="function"?this.trust(context):this.trust;return!!trust}}
class Style{constructor(id2,size2,cramped){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=id2,this.size=size2,this.cramped=cramped}sup(){return styles[sup[this.id]]}sub(){return styles[sub[this.id]]}fracNum(){return styles[fracNum[this.id]]}fracDen(){return styles[fracDen[this.id]]}cramp(){return styles[cramp[this.id]]}text(){return styles[text$1$1[this.id]]}isTight(){return this.size>=2}}var D=0,Dc=1,T=2,Tc=3,S=4,Sc=5,SS=6,SSc=7,styles=[new Style(D,0,!1),new Style(Dc,0,!0),new Style(
T,1,!1),new Style(Tc,1,!0),new Style(S,2,!1),new Style(Sc,2,!0),new Style(SS,3,!1),new Style(SSc,3,!0)],sup=[S,Sc,S,Sc,SS,SSc,SS,SSc],sub=[Sc,Sc,Sc,Sc,SSc,SSc,SSc,SSc],fracNum=[T,Tc,S,Sc,SS,SSc,SS,SSc],fracDen=[Tc,Tc,Sc,Sc,SSc,SSc,SSc,SSc],cramp=[Dc,Dc,Tc,Tc,Sc,Sc,SSc,SSc],text$1$1=[D,Dc,T,Tc,T,Tc,T,Tc],Style$1={DISPLAY:styles[D],TEXT:styles[T],SCRIPT:styles[S],SCRIPTSCRIPT:styles[SS]},scriptData=[{name:"latin",blocks:[[256,591],[768,879]]},{name:"cyrillic",blocks:[[1024,1279]]},{name:"armenian",
blocks:[[1328,1423]]},{name:"brahmic",blocks:[[2304,4255]]},{name:"georgian",blocks:[[4256,4351]]},{name:"cjk",blocks:[[12288,12543],[19968,40879],[65280,65376]]},{name:"hangul",blocks:[[44032,55215]]}];function scriptFromCodepoint(codepoint){for(var i=0;i<scriptData.length;i++)for(var script=scriptData[i],_i=0;_i<script.blocks.length;_i++){var block2=script.blocks[_i];if(codepoint>=block2[0]&&codepoint<=block2[1])return script.name}return null}var allBlocks=[];scriptData.forEach(s2=>s2.blocks.forEach(
b=>allBlocks.push(...b)));function supportedCodepoint(codepoint){for(var i=0;i<allBlocks.length;i+=2)if(codepoint>=allBlocks[i]&&codepoint<=allBlocks[i+1])return!0;return!1}var hLinePad=80,sqrtMain=function(extraVinculum,hLinePad2){return"M95,"+(622+extraVinculum+hLinePad2)+`
c-2.7,0,-7.17,-2.7,-13.5,-8c-5.8,-5.3,-9.5,-10,-9.5,-14
c0,-2,0.3,-3.3,1,-4c1.3,-2.7,23.83,-20.7,67.5,-54
c44.2,-33.3,65.8,-50.3,66.5,-51c1.3,-1.3,3,-2,5,-2c4.7,0,8.7,3.3,12,10
s173,378,173,378c0.7,0,35.3,-71,104,-213c68.7,-142,137.5,-285,206.5,-429
c69,-144,104.5,-217.7,106.5,-221
l`+extraVinculum/2.075+" -"+extraVinculum+`
c5.3,-9.3,12,-14,20,-14
H400000v`+(40+extraVinculum)+`H845.2724
s-225.272,467,-225.272,467s-235,486,-235,486c-2.7,4.7,-9,7,-19,7
c-6,0,-10,-1,-12,-3s-194,-422,-194,-422s-65,47,-65,47z
M`+(834+extraVinculum)+" "+hLinePad2+"h400000v"+(40+extraVinculum)+"h-400000z"},sqrtSize1=function(extraVinculum,hLinePad2){return"M263,"+(601+extraVinculum+hLinePad2)+`c0.7,0,18,39.7,52,119
c34,79.3,68.167,158.7,102.5,238c34.3,79.3,51.8,119.3,52.5,120
c340,-704.7,510.7,-1060.3,512,-1067
l`+extraVinculum/2.084+" -"+extraVinculum+`
c4.7,-7.3,11,-11,19,-11
H40000v`+(40+extraVinculum)+`H1012.3
s-271.3,567,-271.3,567c-38.7,80.7,-84,175,-136,283c-52,108,-89.167,185.3,-111.5,232
c-22.3,46.7,-33.8,70.3,-34.5,71c-4.7,4.7,-12.3,7,-23,7s-12,-1,-12,-1
s-109,-253,-109,-253c-72.7,-168,-109.3,-252,-110,-252c-10.7,8,-22,16.7,-34,26
c-22,17.3,-33.3,26,-34,26s-26,-26,-26,-26s76,-59,76,-59s76,-60,76,-60z
M`+(1001+extraVinculum)+" "+hLinePad2+"h400000v"+(40+extraVinculum)+"h-400000z"},sqrtSize2=function(extraVinculum,hLinePad2){return"M983 "+(10+extraVinculum+hLinePad2)+`
l`+extraVinculum/3.13+" -"+extraVinculum+`
c4,-6.7,10,-10,18,-10 H400000v`+(40+extraVinculum)+`
H1013.1s-83.4,268,-264.1,840c-180.7,572,-277,876.3,-289,913c-4.7,4.7,-12.7,7,-24,7
s-12,0,-12,0c-1.3,-3.3,-3.7,-11.7,-7,-25c-35.3,-125.3,-106.7,-373.3,-214,-744
c-10,12,-21,25,-33,39s-32,39,-32,39c-6,-5.3,-15,-14,-27,-26s25,-30,25,-30
c26.7,-32.7,52,-63,76,-91s52,-60,52,-60s208,722,208,722
c56,-175.3,126.3,-397.3,211,-666c84.7,-268.7,153.8,-488.2,207.5,-658.5
c53.7,-170.3,84.5,-266.8,92.5,-289.5z
M`+(1001+extraVinculum)+" "+hLinePad2+"h400000v"+(40+extraVinculum)+"h-400000z"},sqrtSize3=function(extraVinculum,hLinePad2){return"M424,"+(2398+extraVinculum+hLinePad2)+`
c-1.3,-0.7,-38.5,-172,-111.5,-514c-73,-342,-109.8,-513.3,-110.5,-514
c0,-2,-10.7,14.3,-32,49c-4.7,7.3,-9.8,15.7,-15.5,25c-5.7,9.3,-9.8,16,-12.5,20
s-5,7,-5,7c-4,-3.3,-8.3,-7.7,-13,-13s-13,-13,-13,-13s76,-122,76,-122s77,-121,77,-121
s209,968,209,968c0,-2,84.7,-361.7,254,-1079c169.3,-717.3,254.7,-1077.7,256,-1081
l`+extraVinculum/4.223+" -"+extraVinculum+`c4,-6.7,10,-10,18,-10 H400000
v`+(40+extraVinculum)+`H1014.6
s-87.3,378.7,-272.6,1166c-185.3,787.3,-279.3,1182.3,-282,1185
c-2,6,-10,9,-24,9
c-8,0,-12,-0.7,-12,-2z M`+(1001+extraVinculum)+" "+hLinePad2+`
h400000v`+(40+extraVinculum)+"h-400000z"},sqrtSize4=function(extraVinculum,hLinePad2){return"M473,"+(2713+extraVinculum+hLinePad2)+`
c339.3,-1799.3,509.3,-2700,510,-2702 l`+extraVinculum/5.298+" -"+extraVinculum+`
c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+extraVinculum)+`H1017.7
s-90.5,478,-276.2,1466c-185.7,988,-279.5,1483,-281.5,1485c-2,6,-10,9,-24,9
c-8,0,-12,-0.7,-12,-2c0,-1.3,-5.3,-32,-16,-92c-50.7,-293.3,-119.7,-693.3,-207,-1200
c0,-1.3,-5.3,8.7,-16,30c-10.7,21.3,-21.3,42.7,-32,64s-16,33,-16,33s-26,-26,-26,-26
s76,-153,76,-153s77,-151,77,-151c0.7,0.7,35.7,202,105,604c67.3,400.7,102,602.7,104,
606zM`+(1001+extraVinculum)+" "+hLinePad2+"h400000v"+(40+extraVinculum)+"H1017.7z"},phasePath=function(y){var x=y/2;return"M400000 "+y+" H0 L"+x+" 0 l65 45 L145 "+(y-80)+" H400000z"},sqrtTall=function(extraVinculum,hLinePad2,viewBoxHeight){var vertSegment=viewBoxHeight-54-hLinePad2-extraVinculum;return"M702 "+(extraVinculum+hLinePad2)+"H400000"+(40+extraVinculum)+`
H742v`+vertSegment+`l-4 4-4 4c-.667.7 -2 1.5-4 2.5s-4.167 1.833-6.5 2.5-5.5 1-9.5 1
h-12l-28-84c-16.667-52-96.667 -294.333-240-727l-212 -643 -85 170
c-4-3.333-8.333-7.667-13 -13l-13-13l77-155 77-156c66 199.333 139 419.667
219 661 l218 661zM702 `+hLinePad2+"H400000v"+(40+extraVinculum)+"H742z"},sqrtPath=function(size2,extraVinculum,viewBoxHeight){extraVinculum=1e3*extraVinculum;var path2="";switch(size2){case"sqrtMain":path2=sqrtMain(extraVinculum,hLinePad);break;case"sqrtSize1":path2=sqrtSize1(extraVinculum,hLinePad);break;case"sqrtSize2":path2=sqrtSize2(extraVinculum,hLinePad);break;case"sqrtSize3":path2=sqrtSize3(extraVinculum,hLinePad);break;case"sqrtSize4":path2=sqrtSize4(extraVinculum,hLinePad);break;case"sq\
rtTall":path2=sqrtTall(extraVinculum,hLinePad,viewBoxHeight)}return path2},innerPath=function(name,height){switch(name){case"⎜":return"M291 0 H417 V"+height+" H291z M291 0 H417 V"+height+" H291z";case"∣":return"M145 0 H188 V"+height+" H145z M145 0 H188 V"+height+" H145z";case"∥":return"M145 0 H188 V"+height+" H145z M145 0 H188 V"+height+" H145z"+("M367 0 H410 V"+height+" H367z M367 0 H410 V"+height+" H367z");case"⎟":return"M457 0 H583 V"+height+" H457z M457 0 H583 V"+height+" H457z";case"\
⎢":return"M319 0 H403 V"+height+" H319z M319 0 H403 V"+height+" H319z";case"⎥":return"M263 0 H347 V"+height+" H263z M263 0 H347 V"+height+" H263z";case"⎪":return"M384 0 H504 V"+height+" H384z M384 0 H504 V"+height+" H384z";case"⏐":return"M312 0 H355 V"+height+" H312z M312 0 H355 V"+height+" H312z";case"‖":return"M257 0 H300 V"+height+" H257z M257 0 H300 V"+height+" H257z"+("M478 0 H521 V"+height+" H478z M478 0 H521 V"+height+" H478z");default:return""}},path={doubleleftarrow:`M262 157
l10-10c34-36 62.7-77 86-123 3.3-8 5-13.3 5-16 0-5.3-6.7-8-20-8-7.3
 0-12.2.5-14.5 1.5-2.3 1-4.8 4.5-7.5 10.5-49.3 97.3-121.7 169.3-217 216-28
 14-57.3 25-88 33-6.7 2-11 3.8-13 5.5-2 1.7-3 4.2-3 7.5s1 5.8 3 7.5
c2 1.7 6.3 3.5 13 5.5 68 17.3 128.2 47.8 180.5 91.5 52.3 43.7 93.8 96.2 124.5
 157.5 9.3 8 15.3 12.3 18 13h6c12-.7 18-4 18-10 0-2-1.7-7-5-15-23.3-46-52-87
-86-123l-10-10h399738v-40H218c328 0 0 0 0 0l-10-8c-26.7-20-65.7-43-117-69 2.7
-2 6-3.7 10-5 36.7-16 72.3-37.3 107-64l10-8h399782v-40z
m8 0v40h399730v-40zm0 194v40h399730v-40z`,doublerightarrow:`M399738 392l
-10 10c-34 36-62.7 77-86 123-3.3 8-5 13.3-5 16 0 5.3 6.7 8 20 8 7.3 0 12.2-.5
 14.5-1.5 2.3-1 4.8-4.5 7.5-10.5 49.3-97.3 121.7-169.3 217-216 28-14 57.3-25 88
-33 6.7-2 11-3.8 13-5.5 2-1.7 3-4.2 3-7.5s-1-5.8-3-7.5c-2-1.7-6.3-3.5-13-5.5-68
-17.3-128.2-47.8-180.5-91.5-52.3-43.7-93.8-96.2-124.5-157.5-9.3-8-15.3-12.3-18
-13h-6c-12 .7-18 4-18 10 0 2 1.7 7 5 15 23.3 46 52 87 86 123l10 10H0v40h399782
c-328 0 0 0 0 0l10 8c26.7 20 65.7 43 117 69-2.7 2-6 3.7-10 5-36.7 16-72.3 37.3
-107 64l-10 8H0v40zM0 157v40h399730v-40zm0 194v40h399730v-40z`,leftarrow:`M400000 241H110l3-3c68.7-52.7 113.7-120
 135-202 4-14.7 6-23 6-25 0-7.3-7-11-21-11-8 0-13.2.8-15.5 2.5-2.3 1.7-4.2 5.8
-5.5 12.5-1.3 4.7-2.7 10.3-4 17-12 48.7-34.8 92-68.5 130S65.3 228.3 18 247
c-10 4-16 7.7-18 11 0 8.7 6 14.3 18 17 47.3 18.7 87.8 47 121.5 85S196 441.3 208
 490c.7 2 1.3 5 2 9s1.2 6.7 1.5 8c.3 1.3 1 3.3 2 6s2.2 4.5 3.5 5.5c1.3 1 3.3
 1.8 6 2.5s6 1 10 1c14 0 21-3.7 21-11 0-2-2-10.3-6-25-20-79.3-65-146.7-135-202
 l-3-3h399890zM100 241v40h399900v-40z`,leftbrace:`M6 548l-6-6v-35l6-11c56-104 135.3-181.3 238-232 57.3-28.7 117
-45 179-50h399577v120H403c-43.3 7-81 15-113 26-100.7 33-179.7 91-237 174-2.7
 5-6 9-10 13-.7 1-7.3 1-20 1H6z`,leftbraceunder:`M0 6l6-6h17c12.688 0 19.313.3 20 1 4 4 7.313 8.3 10 13
 35.313 51.3 80.813 93.8 136.5 127.5 55.688 33.7 117.188 55.8 184.5 66.5.688
 0 2 .3 4 1 18.688 2.7 76 4.3 172 5h399450v120H429l-6-1c-124.688-8-235-61.7
-331-161C60.687 138.7 32.312 99.3 7 54L0 41V6z`,leftgroup:`M400000 80
H435C64 80 168.3 229.4 21 260c-5.9 1.2-18 0-18 0-2 0-3-1-3-3v-38C76 61 257 0
 435 0h399565z`,leftgroupunder:`M400000 262
H435C64 262 168.3 112.6 21 82c-5.9-1.2-18 0-18 0-2 0-3 1-3 3v38c76 158 257 219
 435 219h399565z`,leftharpoon:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3
-3.3 10.2-9.5 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5
-18.3 3-21-1.3-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7
-196 228-6.7 4.7-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40z`,leftharpoonplus:`M0 267c.7 5.3 3 10 7 14h399993v-40H93c3.3-3.3 10.2-9.5
 20.5-18.5s17.8-15.8 22.5-20.5c50.7-52 88-110.3 112-175 4-11.3 5-18.3 3-21-1.3
-4-7.3-6-18-6-8 0-13 .7-15 2s-4.7 6.7-8 16c-42 98.7-107.3 174.7-196 228-6.7 4.7
-10.7 8-12 10-1.3 2-2 5.7-2 11zm100-26v40h399900v-40zM0 435v40h400000v-40z
m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 2 11s5.333
 5.333 12 10c90.667 54 156 130 196 228 3.333 10.667 6.333 16.333 9 17 2 .667 5
 1 9 1h5c10.667 0 16.667-2 18-6 2-2.667 1-9.667-3-21-32-87.333-82.667-157.667
-152-211l-3-3h399907v-40zM93 281 H400000 v-40L7 241z`,leftharpoondownplus:`M7 435c-4 4-6.3 8.7-7 14 0 5.3.7 9 2 11s5.3 5.3 12
 10c90.7 54 156 130 196 228 3.3 10.7 6.3 16.3 9 17 2 .7 5 1 9 1h5c10.7 0 16.7
-2 18-6 2-2.7 1-9.7-3-21-32-87.3-82.7-157.7-152-211l-3-3h399907v-40H7zm93 0
v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5
-83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3
-68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21
 71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:`M40 281 V428 H0 V94 H40 V241 H400000 v40z
M40 281 V428 H0 V94 H40 V241 H400000 v40z`,leftmapsto:`M40 281 V448H0V74H40V241H400000v40z
M40 281 V448H0V74H40V241H400000v40z`,leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23
-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8
c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3
 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:`M0 50 h400000 v40H0z m0 194h40000v40H0z
M0 50 h400000 v40H0z m0 194h40000v40H0z`,midbrace:`M200428 334
c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14
-53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7
 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11
 12 44.7 59.3 101.3 106.3 170 141s145.3 54.3 229 60h199572v120z`,midbraceunder:`M199572 214
c100.7 8.3 195.3 44 280 108 55.3 42 101.7 93 139 153l9 14c2.7-4 5.7-8.7 9-14
 53.3-86.7 123.7-153 211-199 66.7-36 137.3-56.3 212-62h199568v120H200432c-178.3
 11.7-311.7 78.3-403 201-6 8-9.7 12-11 12-.7.7-6.7 1-18 1s-17.3-.3-18-1c-1.3 0
-5-4-11-12-44.7-59.3-101.3-106.3-170-141s-145.3-54.3-229-60H0V214z`,oiintSize1:`M512.6 71.6c272.6 0 320.3 106.8 320.3 178.2 0 70.8-47.7 177.6
-320.3 177.6S193.1 320.6 193.1 249.8c0-71.4 46.9-178.2 319.5-178.2z
m368.1 178.2c0-86.4-60.9-215.4-368.1-215.4-306.4 0-367.3 129-367.3 215.4 0 85.8
60.9 214.8 367.3 214.8 307.2 0 368.1-129 368.1-214.8z`,oiintSize2:`M757.8 100.1c384.7 0 451.1 137.6 451.1 230 0 91.3-66.4 228.8
-451.1 228.8-386.3 0-452.7-137.5-452.7-228.8 0-92.4 66.4-230 452.7-230z
m502.4 230c0-111.2-82.4-277.2-502.4-277.2s-504 166-504 277.2
c0 110 84 276 504 276s502.4-166 502.4-276z`,oiiintSize1:`M681.4 71.6c408.9 0 480.5 106.8 480.5 178.2 0 70.8-71.6 177.6
-480.5 177.6S202.1 320.6 202.1 249.8c0-71.4 70.5-178.2 479.3-178.2z
m525.8 178.2c0-86.4-86.8-215.4-525.7-215.4-437.9 0-524.7 129-524.7 215.4 0
85.8 86.8 214.8 524.7 214.8 438.9 0 525.7-129 525.7-214.8z`,oiiintSize2:`M1021.2 53c603.6 0 707.8 165.8 707.8 277.2 0 110-104.2 275.8
-707.8 275.8-606 0-710.2-165.8-710.2-275.8C311 218.8 415.2 53 1021.2 53z
m770.4 277.1c0-131.2-126.4-327.6-770.5-327.6S248.4 198.9 248.4 330.1
c0 130 128.8 326.4 772.7 326.4s770.5-196.4 770.5-326.4z`,rightarrow:`M0 241v40h399891c-47.3 35.3-84 78-110 128
-16.7 32-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20
 11 8 0 13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7
 39-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85
-40.5-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
 151.7 139 205zm0 0v40h399900v-40z`,rightbrace:`M400000 542l
-6 6h-17c-12.7 0-19.3-.3-20-1-4-4-7.3-8.3-10-13-35.3-51.3-80.8-93.8-136.5-127.5
s-117.2-55.8-184.5-66.5c-.7 0-2-.3-4-1-18.7-2.7-76-4.3-172-5H0V214h399571l6 1
c124.7 8 235 61.7 331 161 31.3 33.3 59.7 72.7 85 118l7 13v35z`,rightbraceunder:`M399994 0l6 6v35l-6 11c-56 104-135.3 181.3-238 232-57.3
 28.7-117 45-179 50H-300V214h399897c43.3-7 81-15 113-26 100.7-33 179.7-91 237
-174 2.7-5 6-9 10-13 .7-1 7.3-1 20-1h17z`,rightgroup:`M0 80h399565c371 0 266.7 149.4 414 180 5.9 1.2 18 0 18 0 2 0
 3-1 3-3v-38c-76-158-257-219-435-219H0z`,rightgroupunder:`M0 262h399565c371 0 266.7-149.4 414-180 5.9-1.2 18 0 18
 0 2 0 3 1 3 3v38c-76 158-257 219-435 219H0z`,rightharpoon:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3
-3.7-15.3-11-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2
-10.7 0-16.7 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58
 69.2 92 94.5zm0 0v40h399900v-40z`,rightharpoonplus:`M0 241v40h399993c4.7-4.7 7-9.3 7-14 0-9.3-3.7-15.3-11
-18-92.7-56.7-159-133.7-199-231-3.3-9.3-6-14.7-8-16-2-1.3-7-2-15-2-10.7 0-16.7
 2-18 6-2 2.7-1 9.7 3 21 15.3 42 36.7 81.8 64 119.5 27.3 37.7 58 69.2 92 94.5z
m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown:`M399747 511c0 7.3 6.7 11 20 11 8 0 13-.8 15-2.5s4.7-6.8
 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3 8.5-5.8 9.5
-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3-64.7 57-92 95
-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 241v40h399900v-40z`,rightharpoondownplus:`M399747 705c0 7.3 6.7 11 20 11 8 0 13-.8
 15-2.5s4.7-6.8 8-15.5c40-94 99.3-166.3 178-217 13.3-8 20.3-12.3 21-13 5.3-3.3
 8.5-5.8 9.5-7.5 1-1.7 1.5-5.2 1.5-10.5s-2.3-10.3-7-15H0v40h399908c-34 25.3
-64.7 57-92 95-27.3 38-48.7 77.7-64 119-3.3 8.7-5 14-5 16zM0 435v40h399900v-40z
m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3
 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0
-13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21
 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:`M399960 241 V94 h40 V428 h-40 V281 H0 v-40z
M399960 241 V94 h40 V428 h-40 V281 H0 v-40z`,rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23
 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32
-52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142
-167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40
 115.7 95.7 143 167h22c15.3 0 23-.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69
-70-101l-7-8h125l9 7c50.7 39.3 85 86 103 140h46c0-4.7-6.3-18.7-19-42-18-35.3
-40-67.3-66-96l-9-9h399716v-40H284l9-9c26-28.7 48-60.7 66-96 12.7-23.333 19
-37.333 19-42h-46c-18 54-52.3 100.7-103 140l-9 7H95l7-8c28.7-32 52-65.7 70-101
 10.7-23.333 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 71.3 68 127 0 167z`,twoheadrightarrow:`M400000 167
c-68-40-115.7-95.7-143-167h-22c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3
 41.3 69 70 101l7 8h-125l-9-7c-50.7-39.3-85-86-103-140h-46c0 4.7 6.3 18.7 19 42
 18 35.3 40 67.3 66 96l9 9H0v40h399716l-9 9c-26 28.7-48 60.7-66 96-12.7 23.333
-19 37.333-19 42h46c18-54 52.3-100.7 103-140l9-7h125l-7 8c-28.7 32-52 65.7-70
 101-10.7 23.333-16 35.7-16 37 0 .7 7.7 1 23 1h22c27.3-71.3 75-127 143-167z`,tilde1:`M200 55.538c-77 0-168 73.953-177 73.953-3 0-7
-2.175-9-5.437L2 97c-1-2-2-4-2-6 0-4 2-7 5-9l20-12C116 12 171 0 207 0c86 0
 114 68 191 68 78 0 168-68 177-68 4 0 7 2 9 5l12 19c1 2.175 2 4.35 2 6.525 0
 4.35-2 7.613-5 9.788l-19 13.05c-92 63.077-116.937 75.308-183 76.128
-68.267.847-113-73.952-191-73.952z`,tilde2:`M344 55.266c-142 0-300.638 81.316-311.5 86.418
-8.01 3.762-22.5 10.91-23.5 5.562L1 120c-1-2-1-3-1-4 0-5 3-9 8-10l18.4-9C160.9
 31.9 283 0 358 0c148 0 188 122 331 122s314-97 326-97c4 0 8 2 10 7l7 21.114
c1 2.14 1 3.21 1 4.28 0 5.347-3 9.626-7 10.696l-22.3 12.622C852.6 158.372 751
 181.476 676 181.476c-149 0-189-126.21-332-126.21z`,tilde3:`M786 59C457 59 32 175.242 13 175.242c-6 0-10-3.457
-11-10.37L.15 138c-1-7 3-12 10-13l19.2-6.4C378.4 40.7 634.3 0 804.3 0c337 0
 411.8 157 746.8 157 328 0 754-112 773-112 5 0 10 3 11 9l1 14.075c1 8.066-.697
 16.595-6.697 17.492l-21.052 7.31c-367.9 98.146-609.15 122.696-778.15 122.696
 -338 0-409-156.573-744-156.573z`,tilde4:`M786 58C457 58 32 177.487 13 177.487c-6 0-10-3.345
-11-10.035L.15 143c-1-7 3-12 10-13l22-6.7C381.2 35 637.15 0 807.15 0c337 0 409
 177 744 177 328 0 754-127 773-127 5 0 10 3 11 9l1 14.794c1 7.805-3 13.38-9
 14.495l-20.7 5.574c-366.85 99.79-607.3 139.372-776.3 139.372-338 0-409
 -175.236-744-175.236z`,vec:`M377 20c0-5.333 1.833-10 5.5-14S391 0 397 0c4.667 0 8.667 1.667 12 5
3.333 2.667 6.667 9 10 19 6.667 24.667 20.333 43.667 41 57 7.333 4.667 11
10.667 11 18 0 6-1 10-3 12s-6.667 5-14 9c-28.667 14.667-53.667 35.667-75 63
-1.333 1.333-3.167 3.5-5.5 6.5s-4 4.833-5 5.5c-1 .667-2.5 1.333-4.5 2s-4.333 1
-7 1c-4.667 0-9.167-1.833-13.5-5.5S337 184 337 178c0-12.667 15.667-32.333 47-59
H213l-171-1c-8.667-6-13-12.333-13-19 0-4.667 4.333-11.333 13-20h359
c-16-25.333-24-45-24-59z`,widehat1:`M529 0h5l519 115c5 1 9 5 9 10 0 1-1 2-1 3l-4 22
c-1 5-5 9-11 9h-2L532 67 19 159h-2c-5 0-9-4-11-9l-5-22c-1-6 2-12 8-13z`,widehat2:`M1181 0h2l1171 176c6 0 10 5 10 11l-2 23c-1 6-5 10
-11 10h-1L1182 67 15 220h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat3:`M1181 0h2l1171 236c6 0 10 5 10 11l-2 23c-1 6-5 10
-11 10h-1L1182 67 15 280h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widehat4:`M1181 0h2l1171 296c6 0 10 5 10 11l-2 23c-1 6-5 10
-11 10h-1L1182 67 15 340h-1c-6 0-10-4-11-10l-2-23c-1-6 4-11 10-11z`,widecheck1:`M529,159h5l519,-115c5,-1,9,-5,9,-10c0,-1,-1,-2,-1,-3l-4,-22c-1,
-5,-5,-9,-11,-9h-2l-512,92l-513,-92h-2c-5,0,-9,4,-11,9l-5,22c-1,6,2,12,8,13z`,widecheck2:`M1181,220h2l1171,-176c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
-11,-10h-1l-1168,153l-1167,-153h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck3:`M1181,280h2l1171,-236c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
-11,-10h-1l-1168,213l-1167,-213h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,widecheck4:`M1181,340h2l1171,-296c6,0,10,-5,10,-11l-2,-23c-1,-6,-5,-10,
-11,-10h-1l-1168,273l-1167,-273h-1c-6,0,-10,4,-11,10l-2,23c-1,6,4,11,10,11z`,baraboveleftarrow:`M400000 620h-399890l3 -3c68.7 -52.7 113.7 -120 135 -202
c4 -14.7 6 -23 6 -25c0 -7.3 -7 -11 -21 -11c-8 0 -13.2 0.8 -15.5 2.5
c-2.3 1.7 -4.2 5.8 -5.5 12.5c-1.3 4.7 -2.7 10.3 -4 17c-12 48.7 -34.8 92 -68.5 130
s-74.2 66.3 -121.5 85c-10 4 -16 7.7 -18 11c0 8.7 6 14.3 18 17c47.3 18.7 87.8 47
121.5 85s56.5 81.3 68.5 130c0.7 2 1.3 5 2 9s1.2 6.7 1.5 8c0.3 1.3 1 3.3 2 6
s2.2 4.5 3.5 5.5c1.3 1 3.3 1.8 6 2.5s6 1 10 1c14 0 21 -3.7 21 -11
c0 -2 -2 -10.3 -6 -25c-20 -79.3 -65 -146.7 -135 -202l-3 -3h399890z
M100 620v40h399900v-40z M0 241v40h399900v-40zM0 241v40h399900v-40z`,rightarrowabovebar:`M0 241v40h399891c-47.3 35.3-84 78-110 128-16.7 32
-27.7 63.7-33 95 0 1.3-.2 2.7-.5 4-.3 1.3-.5 2.3-.5 3 0 7.3 6.7 11 20 11 8 0
13.2-.8 15.5-2.5 2.3-1.7 4.2-5.5 5.5-11.5 2-13.3 5.7-27 11-41 14.7-44.7 39
-84.5 73-119.5s73.7-60.2 119-75.5c6-2 9-5.7 9-11s-3-9-9-11c-45.3-15.3-85-40.5
-119-75.5s-58.3-74.8-73-119.5c-4.7-14-8.3-27.3-11-40-1.3-6.7-3.2-10.8-5.5
-12.5-2.3-1.7-7.5-2.5-15.5-2.5-14 0-21 3.7-21 11 0 2 2 10.3 6 25 20.7 83.3 67
151.7 139 205zm96 379h399894v40H0zm0 0h399904v40H0z`,baraboveshortleftharpoon:`M507,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17
c2,0.7,5,1,9,1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21
c-32,-87.3,-82.7,-157.7,-152,-211c0,0,-3,-3,-3,-3l399351,0l0,-40
c-398570,0,-399437,0,-399437,0z M593 435 v40 H399500 v-40z
M0 281 v-40 H399908 v40z M0 281 v-40 H399908 v40z`,rightharpoonaboveshortbar:`M0,241 l0,40c399126,0,399993,0,399993,0
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
M0 241 v40 H399908 v-40z M0 475 v-40 H399500 v40z M0 475 v-40 H399500 v40z`,shortbaraboveleftharpoon:`M7,435c-4,4,-6.3,8.7,-7,14c0,5.3,0.7,9,2,11
c1.3,2,5.3,5.3,12,10c90.7,54,156,130,196,228c3.3,10.7,6.3,16.3,9,17c2,0.7,5,1,9,
1c0,0,5,0,5,0c10.7,0,16.7,-2,18,-6c2,-2.7,1,-9.7,-3,-21c-32,-87.3,-82.7,-157.7,
-152,-211c0,0,-3,-3,-3,-3l399907,0l0,-40c-399126,0,-399993,0,-399993,0z
M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z`,shortrightharpoonabovebar:`M53,241l0,40c398570,0,399437,0,399437,0
c4.7,-4.7,7,-9.3,7,-14c0,-9.3,-3.7,-15.3,-11,-18c-92.7,-56.7,-159,-133.7,-199,
-231c-3.3,-9.3,-6,-14.7,-8,-16c-2,-1.3,-7,-2,-15,-2c-10.7,0,-16.7,2,-18,6
c-2,2.7,-1,9.7,3,21c15.3,42,36.7,81.8,64,119.5c27.3,37.7,58,69.2,92,94.5z
M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},tallDelim=function(label,midHeight){switch(label){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+midHeight+` v1759 h347 v-84
H403z M403 1759 V0 H319 V1759 v`+midHeight+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+midHeight+` v1759 H0 v84 H347z
M347 1759 V0 H263 V1759 v`+midHeight+" v1759 h84z";case"vert":return"M145 15 v585 v"+midHeight+` v585 c2.667,10,9.667,15,21,15
c10,0,16.667,-5,20,-15 v-585 v`+-midHeight+` v-585 c-2.667,-10,-9.667,-15,-21,-15
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+midHeight+" v585 h43z";case"doublevert":return"M145 15 v585 v"+midHeight+` v585 c2.667,10,9.667,15,21,15
c10,0,16.667,-5,20,-15 v-585 v`+-midHeight+` v-585 c-2.667,-10,-9.667,-15,-21,-15
c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+midHeight+` v585 h43z
M367 15 v585 v`+midHeight+` v585 c2.667,10,9.667,15,21,15
c10,0,16.667,-5,20,-15 v-585 v`+-midHeight+` v-585 c-2.667,-10,-9.667,-15,-21,-15
c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+midHeight+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+midHeight+` v1715 h263 v84 H319z
MM319 602 V0 H403 V602 v`+midHeight+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+midHeight+` v1799 H0 v-84 H319z
MM319 602 V0 H403 V602 v`+midHeight+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+midHeight+` v602 h84z
M403 1759 V0 H319 V1759 v`+midHeight+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+midHeight+` v602 h84z
M347 1759 V0 h-84 V1759 v`+midHeight+" v602 h84z";case"lparen":return`M863,9c0,-2,-2,-5,-6,-9c0,0,-17,0,-17,0c-12.7,0,-19.3,0.3,-20,1
c-5.3,5.3,-10.3,11,-15,17c-242.7,294.7,-395.3,682,-458,1162c-21.3,163.3,-33.3,349,
-36,557 l0,`+(midHeight+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210,
949.7,470,1265c4.7,6,9.7,11.7,15,17c0.7,0.7,7,1,19,1c0,0,18,0,18,0c4,-4,6,-7,6,-9
c0,-2.7,-3.3,-8.7,-10,-18c-135.3,-192.7,-235.5,-414.3,-300.5,-665c-65,-250.7,-102.5,
-544.7,-112.5,-882c-2,-104,-3,-167,-3,-189
l0,-`+(midHeight+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3,
-210,155.3,-396.3,270,-559c6.7,-9.3,10,-15.3,10,-18z`;case"rparen":return`M76,0c-16.7,0,-25,3,-25,9c0,2,2,6.3,6,13c21.3,28.7,42.3,60.3,
63,95c96.7,156.7,172.8,332.5,228.5,527.5c55.7,195,92.8,416.5,111.5,664.5
c11.3,139.3,17,290.7,17,454c0,28,1.7,43,3.3,45l0,`+(midHeight+9)+`
c-3,4,-3.3,16.7,-3.3,38c0,162,-5.7,313.7,-17,455c-18.7,248,-55.8,469.3,-111.5,664
c-55.7,194.7,-131.8,370.3,-228.5,527c-20.7,34.7,-41.7,66.3,-63,95c-2,3.3,-4,7,-6,11
c0,7.3,5.7,11,17,11c0,0,11,0,11,0c9.3,0,14.3,-0.3,15,-1c5.3,-5.3,10.3,-11,15,-17
c242.7,-294.7,395.3,-681.7,458,-1161c21.3,-164.7,33.3,-350.7,36,-558
l0,-`+(midHeight+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7,
-470,-1265c-4.7,-6,-9.7,-11.7,-15,-17c-0.7,-0.7,-6.7,-1,-18,-1z`;default:throw new Error("Unknown stretchy delimiter.")}};class DocumentFragment{constructor(children){this.children=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,this.children=children,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(className){return utils.contains(this.classes,className)}toNode(){for(var frag=document.createDocumentFragment(),
i=0;i<this.children.length;i++)frag.appendChild(this.children[i].toNode());return frag}toMarkup(){for(var markup="",i=0;i<this.children.length;i++)markup+=this.children[i].toMarkup();return markup}toText(){var toText2=child2=>child2.toText();return this.children.map(toText2).join("")}}var fontMetricsData={"AMS-Regular":{32:[0,0,0,0,.25],65:[0,.68889,0,0,.72222],66:[0,.68889,0,0,.66667],67:[0,.68889,0,0,.72222],68:[0,.68889,0,0,.72222],69:[0,.68889,0,0,.66667],70:[0,.68889,0,0,.61111],71:[0,.68889,
0,0,.77778],72:[0,.68889,0,0,.77778],73:[0,.68889,0,0,.38889],74:[.16667,.68889,0,0,.5],75:[0,.68889,0,0,.77778],76:[0,.68889,0,0,.66667],77:[0,.68889,0,0,.94445],78:[0,.68889,0,0,.72222],79:[.16667,.68889,0,0,.77778],80:[0,.68889,0,0,.61111],81:[.16667,.68889,0,0,.77778],82:[0,.68889,0,0,.72222],83:[0,.68889,0,0,.55556],84:[0,.68889,0,0,.66667],85:[0,.68889,0,0,.72222],86:[0,.68889,0,0,.72222],87:[0,.68889,0,0,1],88:[0,.68889,0,0,.72222],89:[0,.68889,0,0,.72222],90:[0,.68889,0,0,.66667],107:[0,
.68889,0,0,.55556],160:[0,0,0,0,.25],165:[0,.675,.025,0,.75],174:[.15559,.69224,0,0,.94666],240:[0,.68889,0,0,.55556],295:[0,.68889,0,0,.54028],710:[0,.825,0,0,2.33334],732:[0,.9,0,0,2.33334],770:[0,.825,0,0,2.33334],771:[0,.9,0,0,2.33334],989:[.08167,.58167,0,0,.77778],1008:[0,.43056,.04028,0,.66667],8245:[0,.54986,0,0,.275],8463:[0,.68889,0,0,.54028],8487:[0,.68889,0,0,.72222],8498:[0,.68889,0,0,.55556],8502:[0,.68889,0,0,.66667],8503:[0,.68889,0,0,.44445],8504:[0,.68889,0,0,.66667],8513:[0,.68889,
0,0,.63889],8592:[-.03598,.46402,0,0,.5],8594:[-.03598,.46402,0,0,.5],8602:[-.13313,.36687,0,0,1],8603:[-.13313,.36687,0,0,1],8606:[.01354,.52239,0,0,1],8608:[.01354,.52239,0,0,1],8610:[.01354,.52239,0,0,1.11111],8611:[.01354,.52239,0,0,1.11111],8619:[0,.54986,0,0,1],8620:[0,.54986,0,0,1],8621:[-.13313,.37788,0,0,1.38889],8622:[-.13313,.36687,0,0,1],8624:[0,.69224,0,0,.5],8625:[0,.69224,0,0,.5],8630:[0,.43056,0,0,1],8631:[0,.43056,0,0,1],8634:[.08198,.58198,0,0,.77778],8635:[.08198,.58198,0,0,.77778],
8638:[.19444,.69224,0,0,.41667],8639:[.19444,.69224,0,0,.41667],8642:[.19444,.69224,0,0,.41667],8643:[.19444,.69224,0,0,.41667],8644:[.1808,.675,0,0,1],8646:[.1808,.675,0,0,1],8647:[.1808,.675,0,0,1],8648:[.19444,.69224,0,0,.83334],8649:[.1808,.675,0,0,1],8650:[.19444,.69224,0,0,.83334],8651:[.01354,.52239,0,0,1],8652:[.01354,.52239,0,0,1],8653:[-.13313,.36687,0,0,1],8654:[-.13313,.36687,0,0,1],8655:[-.13313,.36687,0,0,1],8666:[.13667,.63667,0,0,1],8667:[.13667,.63667,0,0,1],8669:[-.13313,.37788,
0,0,1],8672:[-.064,.437,0,0,1.334],8674:[-.064,.437,0,0,1.334],8705:[0,.825,0,0,.5],8708:[0,.68889,0,0,.55556],8709:[.08167,.58167,0,0,.77778],8717:[0,.43056,0,0,.42917],8722:[-.03598,.46402,0,0,.5],8724:[.08198,.69224,0,0,.77778],8726:[.08167,.58167,0,0,.77778],8733:[0,.69224,0,0,.77778],8736:[0,.69224,0,0,.72222],8737:[0,.69224,0,0,.72222],8738:[.03517,.52239,0,0,.72222],8739:[.08167,.58167,0,0,.22222],8740:[.25142,.74111,0,0,.27778],8741:[.08167,.58167,0,0,.38889],8742:[.25142,.74111,0,0,.5],
8756:[0,.69224,0,0,.66667],8757:[0,.69224,0,0,.66667],8764:[-.13313,.36687,0,0,.77778],8765:[-.13313,.37788,0,0,.77778],8769:[-.13313,.36687,0,0,.77778],8770:[-.03625,.46375,0,0,.77778],8774:[.30274,.79383,0,0,.77778],8776:[-.01688,.48312,0,0,.77778],8778:[.08167,.58167,0,0,.77778],8782:[.06062,.54986,0,0,.77778],8783:[.06062,.54986,0,0,.77778],8785:[.08198,.58198,0,0,.77778],8786:[.08198,.58198,0,0,.77778],8787:[.08198,.58198,0,0,.77778],8790:[0,.69224,0,0,.77778],8791:[.22958,.72958,0,0,.77778],
8796:[.08198,.91667,0,0,.77778],8806:[.25583,.75583,0,0,.77778],8807:[.25583,.75583,0,0,.77778],8808:[.25142,.75726,0,0,.77778],8809:[.25142,.75726,0,0,.77778],8812:[.25583,.75583,0,0,.5],8814:[.20576,.70576,0,0,.77778],8815:[.20576,.70576,0,0,.77778],8816:[.30274,.79383,0,0,.77778],8817:[.30274,.79383,0,0,.77778],8818:[.22958,.72958,0,0,.77778],8819:[.22958,.72958,0,0,.77778],8822:[.1808,.675,0,0,.77778],8823:[.1808,.675,0,0,.77778],8828:[.13667,.63667,0,0,.77778],8829:[.13667,.63667,0,0,.77778],
8830:[.22958,.72958,0,0,.77778],8831:[.22958,.72958,0,0,.77778],8832:[.20576,.70576,0,0,.77778],8833:[.20576,.70576,0,0,.77778],8840:[.30274,.79383,0,0,.77778],8841:[.30274,.79383,0,0,.77778],8842:[.13597,.63597,0,0,.77778],8843:[.13597,.63597,0,0,.77778],8847:[.03517,.54986,0,0,.77778],8848:[.03517,.54986,0,0,.77778],8858:[.08198,.58198,0,0,.77778],8859:[.08198,.58198,0,0,.77778],8861:[.08198,.58198,0,0,.77778],8862:[0,.675,0,0,.77778],8863:[0,.675,0,0,.77778],8864:[0,.675,0,0,.77778],8865:[0,.675,
0,0,.77778],8872:[0,.69224,0,0,.61111],8873:[0,.69224,0,0,.72222],8874:[0,.69224,0,0,.88889],8876:[0,.68889,0,0,.61111],8877:[0,.68889,0,0,.61111],8878:[0,.68889,0,0,.72222],8879:[0,.68889,0,0,.72222],8882:[.03517,.54986,0,0,.77778],8883:[.03517,.54986,0,0,.77778],8884:[.13667,.63667,0,0,.77778],8885:[.13667,.63667,0,0,.77778],8888:[0,.54986,0,0,1.11111],8890:[.19444,.43056,0,0,.55556],8891:[.19444,.69224,0,0,.61111],8892:[.19444,.69224,0,0,.61111],8901:[0,.54986,0,0,.27778],8903:[.08167,.58167,
0,0,.77778],8905:[.08167,.58167,0,0,.77778],8906:[.08167,.58167,0,0,.77778],8907:[0,.69224,0,0,.77778],8908:[0,.69224,0,0,.77778],8909:[-.03598,.46402,0,0,.77778],8910:[0,.54986,0,0,.76042],8911:[0,.54986,0,0,.76042],8912:[.03517,.54986,0,0,.77778],8913:[.03517,.54986,0,0,.77778],8914:[0,.54986,0,0,.66667],8915:[0,.54986,0,0,.66667],8916:[0,.69224,0,0,.66667],8918:[.0391,.5391,0,0,.77778],8919:[.0391,.5391,0,0,.77778],8920:[.03517,.54986,0,0,1.33334],8921:[.03517,.54986,0,0,1.33334],8922:[.38569,
.88569,0,0,.77778],8923:[.38569,.88569,0,0,.77778],8926:[.13667,.63667,0,0,.77778],8927:[.13667,.63667,0,0,.77778],8928:[.30274,.79383,0,0,.77778],8929:[.30274,.79383,0,0,.77778],8934:[.23222,.74111,0,0,.77778],8935:[.23222,.74111,0,0,.77778],8936:[.23222,.74111,0,0,.77778],8937:[.23222,.74111,0,0,.77778],8938:[.20576,.70576,0,0,.77778],8939:[.20576,.70576,0,0,.77778],8940:[.30274,.79383,0,0,.77778],8941:[.30274,.79383,0,0,.77778],8994:[.19444,.69224,0,0,.77778],8995:[.19444,.69224,0,0,.77778],9416:[
.15559,.69224,0,0,.90222],9484:[0,.69224,0,0,.5],9488:[0,.69224,0,0,.5],9492:[0,.37788,0,0,.5],9496:[0,.37788,0,0,.5],9585:[.19444,.68889,0,0,.88889],9586:[.19444,.74111,0,0,.88889],9632:[0,.675,0,0,.77778],9633:[0,.675,0,0,.77778],9650:[0,.54986,0,0,.72222],9651:[0,.54986,0,0,.72222],9654:[.03517,.54986,0,0,.77778],9660:[0,.54986,0,0,.72222],9661:[0,.54986,0,0,.72222],9664:[.03517,.54986,0,0,.77778],9674:[.11111,.69224,0,0,.66667],9733:[.19444,.69224,0,0,.94445],10003:[0,.69224,0,0,.83334],10016:[
0,.69224,0,0,.83334],10731:[.11111,.69224,0,0,.66667],10846:[.19444,.75583,0,0,.61111],10877:[.13667,.63667,0,0,.77778],10878:[.13667,.63667,0,0,.77778],10885:[.25583,.75583,0,0,.77778],10886:[.25583,.75583,0,0,.77778],10887:[.13597,.63597,0,0,.77778],10888:[.13597,.63597,0,0,.77778],10889:[.26167,.75726,0,0,.77778],10890:[.26167,.75726,0,0,.77778],10891:[.48256,.98256,0,0,.77778],10892:[.48256,.98256,0,0,.77778],10901:[.13667,.63667,0,0,.77778],10902:[.13667,.63667,0,0,.77778],10933:[.25142,.75726,
0,0,.77778],10934:[.25142,.75726,0,0,.77778],10935:[.26167,.75726,0,0,.77778],10936:[.26167,.75726,0,0,.77778],10937:[.26167,.75726,0,0,.77778],10938:[.26167,.75726,0,0,.77778],10949:[.25583,.75583,0,0,.77778],10950:[.25583,.75583,0,0,.77778],10955:[.28481,.79383,0,0,.77778],10956:[.28481,.79383,0,0,.77778],57350:[.08167,.58167,0,0,.22222],57351:[.08167,.58167,0,0,.38889],57352:[.08167,.58167,0,0,.77778],57353:[0,.43056,.04028,0,.66667],57356:[.25142,.75726,0,0,.77778],57357:[.25142,.75726,0,0,.77778],
57358:[.41951,.91951,0,0,.77778],57359:[.30274,.79383,0,0,.77778],57360:[.30274,.79383,0,0,.77778],57361:[.41951,.91951,0,0,.77778],57366:[.25142,.75726,0,0,.77778],57367:[.25142,.75726,0,0,.77778],57368:[.25142,.75726,0,0,.77778],57369:[.25142,.75726,0,0,.77778],57370:[.13597,.63597,0,0,.77778],57371:[.13597,.63597,0,0,.77778]},"Caligraphic-Regular":{32:[0,0,0,0,.25],65:[0,.68333,0,.19445,.79847],66:[0,.68333,.03041,.13889,.65681],67:[0,.68333,.05834,.13889,.52653],68:[0,.68333,.02778,.08334,.77139],
69:[0,.68333,.08944,.11111,.52778],70:[0,.68333,.09931,.11111,.71875],71:[.09722,.68333,.0593,.11111,.59487],72:[0,.68333,.00965,.11111,.84452],73:[0,.68333,.07382,0,.54452],74:[.09722,.68333,.18472,.16667,.67778],75:[0,.68333,.01445,.05556,.76195],76:[0,.68333,0,.13889,.68972],77:[0,.68333,0,.13889,1.2009],78:[0,.68333,.14736,.08334,.82049],79:[0,.68333,.02778,.11111,.79611],80:[0,.68333,.08222,.08334,.69556],81:[.09722,.68333,0,.11111,.81667],82:[0,.68333,0,.08334,.8475],83:[0,.68333,.075,.13889,
.60556],84:[0,.68333,.25417,0,.54464],85:[0,.68333,.09931,.08334,.62583],86:[0,.68333,.08222,0,.61278],87:[0,.68333,.08222,.08334,.98778],88:[0,.68333,.14643,.13889,.7133],89:[.09722,.68333,.08222,.08334,.66834],90:[0,.68333,.07944,.13889,.72473],160:[0,0,0,0,.25]},"Fraktur-Regular":{32:[0,0,0,0,.25],33:[0,.69141,0,0,.29574],34:[0,.69141,0,0,.21471],38:[0,.69141,0,0,.73786],39:[0,.69141,0,0,.21201],40:[.24982,.74947,0,0,.38865],41:[.24982,.74947,0,0,.38865],42:[0,.62119,0,0,.27764],43:[.08319,.58283,
0,0,.75623],44:[0,.10803,0,0,.27764],45:[.08319,.58283,0,0,.75623],46:[0,.10803,0,0,.27764],47:[.24982,.74947,0,0,.50181],48:[0,.47534,0,0,.50181],49:[0,.47534,0,0,.50181],50:[0,.47534,0,0,.50181],51:[.18906,.47534,0,0,.50181],52:[.18906,.47534,0,0,.50181],53:[.18906,.47534,0,0,.50181],54:[0,.69141,0,0,.50181],55:[.18906,.47534,0,0,.50181],56:[0,.69141,0,0,.50181],57:[.18906,.47534,0,0,.50181],58:[0,.47534,0,0,.21606],59:[.12604,.47534,0,0,.21606],61:[-.13099,.36866,0,0,.75623],63:[0,.69141,0,0,
.36245],65:[0,.69141,0,0,.7176],66:[0,.69141,0,0,.88397],67:[0,.69141,0,0,.61254],68:[0,.69141,0,0,.83158],69:[0,.69141,0,0,.66278],70:[.12604,.69141,0,0,.61119],71:[0,.69141,0,0,.78539],72:[.06302,.69141,0,0,.7203],73:[0,.69141,0,0,.55448],74:[.12604,.69141,0,0,.55231],75:[0,.69141,0,0,.66845],76:[0,.69141,0,0,.66602],77:[0,.69141,0,0,1.04953],78:[0,.69141,0,0,.83212],79:[0,.69141,0,0,.82699],80:[.18906,.69141,0,0,.82753],81:[.03781,.69141,0,0,.82699],82:[0,.69141,0,0,.82807],83:[0,.69141,0,0,.82861],
84:[0,.69141,0,0,.66899],85:[0,.69141,0,0,.64576],86:[0,.69141,0,0,.83131],87:[0,.69141,0,0,1.04602],88:[0,.69141,0,0,.71922],89:[.18906,.69141,0,0,.83293],90:[.12604,.69141,0,0,.60201],91:[.24982,.74947,0,0,.27764],93:[.24982,.74947,0,0,.27764],94:[0,.69141,0,0,.49965],97:[0,.47534,0,0,.50046],98:[0,.69141,0,0,.51315],99:[0,.47534,0,0,.38946],100:[0,.62119,0,0,.49857],101:[0,.47534,0,0,.40053],102:[.18906,.69141,0,0,.32626],103:[.18906,.47534,0,0,.5037],104:[.18906,.69141,0,0,.52126],105:[0,.69141,
0,0,.27899],106:[0,.69141,0,0,.28088],107:[0,.69141,0,0,.38946],108:[0,.69141,0,0,.27953],109:[0,.47534,0,0,.76676],110:[0,.47534,0,0,.52666],111:[0,.47534,0,0,.48885],112:[.18906,.52396,0,0,.50046],113:[.18906,.47534,0,0,.48912],114:[0,.47534,0,0,.38919],115:[0,.47534,0,0,.44266],116:[0,.62119,0,0,.33301],117:[0,.47534,0,0,.5172],118:[0,.52396,0,0,.5118],119:[0,.52396,0,0,.77351],120:[.18906,.47534,0,0,.38865],121:[.18906,.47534,0,0,.49884],122:[.18906,.47534,0,0,.39054],160:[0,0,0,0,.25],8216:[
0,.69141,0,0,.21471],8217:[0,.69141,0,0,.21471],58112:[0,.62119,0,0,.49749],58113:[0,.62119,0,0,.4983],58114:[.18906,.69141,0,0,.33328],58115:[.18906,.69141,0,0,.32923],58116:[.18906,.47534,0,0,.50343],58117:[0,.69141,0,0,.33301],58118:[0,.62119,0,0,.33409],58119:[0,.47534,0,0,.50073]},"Main-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.35],34:[0,.69444,0,0,.60278],35:[.19444,.69444,0,0,.95833],36:[.05556,.75,0,0,.575],37:[.05556,.75,0,0,.95833],38:[0,.69444,0,0,.89444],39:[0,.69444,0,0,.31944],40:[
.25,.75,0,0,.44722],41:[.25,.75,0,0,.44722],42:[0,.75,0,0,.575],43:[.13333,.63333,0,0,.89444],44:[.19444,.15556,0,0,.31944],45:[0,.44444,0,0,.38333],46:[0,.15556,0,0,.31944],47:[.25,.75,0,0,.575],48:[0,.64444,0,0,.575],49:[0,.64444,0,0,.575],50:[0,.64444,0,0,.575],51:[0,.64444,0,0,.575],52:[0,.64444,0,0,.575],53:[0,.64444,0,0,.575],54:[0,.64444,0,0,.575],55:[0,.64444,0,0,.575],56:[0,.64444,0,0,.575],57:[0,.64444,0,0,.575],58:[0,.44444,0,0,.31944],59:[.19444,.44444,0,0,.31944],60:[.08556,.58556,0,
0,.89444],61:[-.10889,.39111,0,0,.89444],62:[.08556,.58556,0,0,.89444],63:[0,.69444,0,0,.54305],64:[0,.69444,0,0,.89444],65:[0,.68611,0,0,.86944],66:[0,.68611,0,0,.81805],67:[0,.68611,0,0,.83055],68:[0,.68611,0,0,.88194],69:[0,.68611,0,0,.75555],70:[0,.68611,0,0,.72361],71:[0,.68611,0,0,.90416],72:[0,.68611,0,0,.9],73:[0,.68611,0,0,.43611],74:[0,.68611,0,0,.59444],75:[0,.68611,0,0,.90138],76:[0,.68611,0,0,.69166],77:[0,.68611,0,0,1.09166],78:[0,.68611,0,0,.9],79:[0,.68611,0,0,.86388],80:[0,.68611,
0,0,.78611],81:[.19444,.68611,0,0,.86388],82:[0,.68611,0,0,.8625],83:[0,.68611,0,0,.63889],84:[0,.68611,0,0,.8],85:[0,.68611,0,0,.88472],86:[0,.68611,.01597,0,.86944],87:[0,.68611,.01597,0,1.18888],88:[0,.68611,0,0,.86944],89:[0,.68611,.02875,0,.86944],90:[0,.68611,0,0,.70277],91:[.25,.75,0,0,.31944],92:[.25,.75,0,0,.575],93:[.25,.75,0,0,.31944],94:[0,.69444,0,0,.575],95:[.31,.13444,.03194,0,.575],97:[0,.44444,0,0,.55902],98:[0,.69444,0,0,.63889],99:[0,.44444,0,0,.51111],100:[0,.69444,0,0,.63889],
101:[0,.44444,0,0,.52708],102:[0,.69444,.10903,0,.35139],103:[.19444,.44444,.01597,0,.575],104:[0,.69444,0,0,.63889],105:[0,.69444,0,0,.31944],106:[.19444,.69444,0,0,.35139],107:[0,.69444,0,0,.60694],108:[0,.69444,0,0,.31944],109:[0,.44444,0,0,.95833],110:[0,.44444,0,0,.63889],111:[0,.44444,0,0,.575],112:[.19444,.44444,0,0,.63889],113:[.19444,.44444,0,0,.60694],114:[0,.44444,0,0,.47361],115:[0,.44444,0,0,.45361],116:[0,.63492,0,0,.44722],117:[0,.44444,0,0,.63889],118:[0,.44444,.01597,0,.60694],119:[
0,.44444,.01597,0,.83055],120:[0,.44444,0,0,.60694],121:[.19444,.44444,.01597,0,.60694],122:[0,.44444,0,0,.51111],123:[.25,.75,0,0,.575],124:[.25,.75,0,0,.31944],125:[.25,.75,0,0,.575],126:[.35,.34444,0,0,.575],160:[0,0,0,0,.25],163:[0,.69444,0,0,.86853],168:[0,.69444,0,0,.575],172:[0,.44444,0,0,.76666],176:[0,.69444,0,0,.86944],177:[.13333,.63333,0,0,.89444],184:[.17014,0,0,0,.51111],198:[0,.68611,0,0,1.04166],215:[.13333,.63333,0,0,.89444],216:[.04861,.73472,0,0,.89444],223:[0,.69444,0,0,.59722],
230:[0,.44444,0,0,.83055],247:[.13333,.63333,0,0,.89444],248:[.09722,.54167,0,0,.575],305:[0,.44444,0,0,.31944],338:[0,.68611,0,0,1.16944],339:[0,.44444,0,0,.89444],567:[.19444,.44444,0,0,.35139],710:[0,.69444,0,0,.575],711:[0,.63194,0,0,.575],713:[0,.59611,0,0,.575],714:[0,.69444,0,0,.575],715:[0,.69444,0,0,.575],728:[0,.69444,0,0,.575],729:[0,.69444,0,0,.31944],730:[0,.69444,0,0,.86944],732:[0,.69444,0,0,.575],733:[0,.69444,0,0,.575],915:[0,.68611,0,0,.69166],916:[0,.68611,0,0,.95833],920:[0,.68611,
0,0,.89444],923:[0,.68611,0,0,.80555],926:[0,.68611,0,0,.76666],928:[0,.68611,0,0,.9],931:[0,.68611,0,0,.83055],933:[0,.68611,0,0,.89444],934:[0,.68611,0,0,.83055],936:[0,.68611,0,0,.89444],937:[0,.68611,0,0,.83055],8211:[0,.44444,.03194,0,.575],8212:[0,.44444,.03194,0,1.14999],8216:[0,.69444,0,0,.31944],8217:[0,.69444,0,0,.31944],8220:[0,.69444,0,0,.60278],8221:[0,.69444,0,0,.60278],8224:[.19444,.69444,0,0,.51111],8225:[.19444,.69444,0,0,.51111],8242:[0,.55556,0,0,.34444],8407:[0,.72444,.15486,
0,.575],8463:[0,.69444,0,0,.66759],8465:[0,.69444,0,0,.83055],8467:[0,.69444,0,0,.47361],8472:[.19444,.44444,0,0,.74027],8476:[0,.69444,0,0,.83055],8501:[0,.69444,0,0,.70277],8592:[-.10889,.39111,0,0,1.14999],8593:[.19444,.69444,0,0,.575],8594:[-.10889,.39111,0,0,1.14999],8595:[.19444,.69444,0,0,.575],8596:[-.10889,.39111,0,0,1.14999],8597:[.25,.75,0,0,.575],8598:[.19444,.69444,0,0,1.14999],8599:[.19444,.69444,0,0,1.14999],8600:[.19444,.69444,0,0,1.14999],8601:[.19444,.69444,0,0,1.14999],8636:[-.10889,
.39111,0,0,1.14999],8637:[-.10889,.39111,0,0,1.14999],8640:[-.10889,.39111,0,0,1.14999],8641:[-.10889,.39111,0,0,1.14999],8656:[-.10889,.39111,0,0,1.14999],8657:[.19444,.69444,0,0,.70277],8658:[-.10889,.39111,0,0,1.14999],8659:[.19444,.69444,0,0,.70277],8660:[-.10889,.39111,0,0,1.14999],8661:[.25,.75,0,0,.70277],8704:[0,.69444,0,0,.63889],8706:[0,.69444,.06389,0,.62847],8707:[0,.69444,0,0,.63889],8709:[.05556,.75,0,0,.575],8711:[0,.68611,0,0,.95833],8712:[.08556,.58556,0,0,.76666],8715:[.08556,.58556,
0,0,.76666],8722:[.13333,.63333,0,0,.89444],8723:[.13333,.63333,0,0,.89444],8725:[.25,.75,0,0,.575],8726:[.25,.75,0,0,.575],8727:[-.02778,.47222,0,0,.575],8728:[-.02639,.47361,0,0,.575],8729:[-.02639,.47361,0,0,.575],8730:[.18,.82,0,0,.95833],8733:[0,.44444,0,0,.89444],8734:[0,.44444,0,0,1.14999],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,.31944],8741:[.25,.75,0,0,.575],8743:[0,.55556,0,0,.76666],8744:[0,.55556,0,0,.76666],8745:[0,.55556,0,0,.76666],8746:[0,.55556,0,0,.76666],8747:[.19444,.69444,
.12778,0,.56875],8764:[-.10889,.39111,0,0,.89444],8768:[.19444,.69444,0,0,.31944],8771:[.00222,.50222,0,0,.89444],8773:[.027,.638,0,0,.894],8776:[.02444,.52444,0,0,.89444],8781:[.00222,.50222,0,0,.89444],8801:[.00222,.50222,0,0,.89444],8804:[.19667,.69667,0,0,.89444],8805:[.19667,.69667,0,0,.89444],8810:[.08556,.58556,0,0,1.14999],8811:[.08556,.58556,0,0,1.14999],8826:[.08556,.58556,0,0,.89444],8827:[.08556,.58556,0,0,.89444],8834:[.08556,.58556,0,0,.89444],8835:[.08556,.58556,0,0,.89444],8838:[
.19667,.69667,0,0,.89444],8839:[.19667,.69667,0,0,.89444],8846:[0,.55556,0,0,.76666],8849:[.19667,.69667,0,0,.89444],8850:[.19667,.69667,0,0,.89444],8851:[0,.55556,0,0,.76666],8852:[0,.55556,0,0,.76666],8853:[.13333,.63333,0,0,.89444],8854:[.13333,.63333,0,0,.89444],8855:[.13333,.63333,0,0,.89444],8856:[.13333,.63333,0,0,.89444],8857:[.13333,.63333,0,0,.89444],8866:[0,.69444,0,0,.70277],8867:[0,.69444,0,0,.70277],8868:[0,.69444,0,0,.89444],8869:[0,.69444,0,0,.89444],8900:[-.02639,.47361,0,0,.575],
8901:[-.02639,.47361,0,0,.31944],8902:[-.02778,.47222,0,0,.575],8968:[.25,.75,0,0,.51111],8969:[.25,.75,0,0,.51111],8970:[.25,.75,0,0,.51111],8971:[.25,.75,0,0,.51111],8994:[-.13889,.36111,0,0,1.14999],8995:[-.13889,.36111,0,0,1.14999],9651:[.19444,.69444,0,0,1.02222],9657:[-.02778,.47222,0,0,.575],9661:[.19444,.69444,0,0,1.02222],9667:[-.02778,.47222,0,0,.575],9711:[.19444,.69444,0,0,1.14999],9824:[.12963,.69444,0,0,.89444],9825:[.12963,.69444,0,0,.89444],9826:[.12963,.69444,0,0,.89444],9827:[.12963,
.69444,0,0,.89444],9837:[0,.75,0,0,.44722],9838:[.19444,.69444,0,0,.44722],9839:[.19444,.69444,0,0,.44722],10216:[.25,.75,0,0,.44722],10217:[.25,.75,0,0,.44722],10815:[0,.68611,0,0,.9],10927:[.19667,.69667,0,0,.89444],10928:[.19667,.69667,0,0,.89444],57376:[.19444,.69444,0,0,0]},"Main-BoldItalic":{32:[0,0,0,0,.25],33:[0,.69444,.11417,0,.38611],34:[0,.69444,.07939,0,.62055],35:[.19444,.69444,.06833,0,.94444],37:[.05556,.75,.12861,0,.94444],38:[0,.69444,.08528,0,.88555],39:[0,.69444,.12945,0,.35555],
40:[.25,.75,.15806,0,.47333],41:[.25,.75,.03306,0,.47333],42:[0,.75,.14333,0,.59111],43:[.10333,.60333,.03306,0,.88555],44:[.19444,.14722,0,0,.35555],45:[0,.44444,.02611,0,.41444],46:[0,.14722,0,0,.35555],47:[.25,.75,.15806,0,.59111],48:[0,.64444,.13167,0,.59111],49:[0,.64444,.13167,0,.59111],50:[0,.64444,.13167,0,.59111],51:[0,.64444,.13167,0,.59111],52:[.19444,.64444,.13167,0,.59111],53:[0,.64444,.13167,0,.59111],54:[0,.64444,.13167,0,.59111],55:[.19444,.64444,.13167,0,.59111],56:[0,.64444,.13167,
0,.59111],57:[0,.64444,.13167,0,.59111],58:[0,.44444,.06695,0,.35555],59:[.19444,.44444,.06695,0,.35555],61:[-.10889,.39111,.06833,0,.88555],63:[0,.69444,.11472,0,.59111],64:[0,.69444,.09208,0,.88555],65:[0,.68611,0,0,.86555],66:[0,.68611,.0992,0,.81666],67:[0,.68611,.14208,0,.82666],68:[0,.68611,.09062,0,.87555],69:[0,.68611,.11431,0,.75666],70:[0,.68611,.12903,0,.72722],71:[0,.68611,.07347,0,.89527],72:[0,.68611,.17208,0,.8961],73:[0,.68611,.15681,0,.47166],74:[0,.68611,.145,0,.61055],75:[0,.68611,
.14208,0,.89499],76:[0,.68611,0,0,.69777],77:[0,.68611,.17208,0,1.07277],78:[0,.68611,.17208,0,.8961],79:[0,.68611,.09062,0,.85499],80:[0,.68611,.0992,0,.78721],81:[.19444,.68611,.09062,0,.85499],82:[0,.68611,.02559,0,.85944],83:[0,.68611,.11264,0,.64999],84:[0,.68611,.12903,0,.7961],85:[0,.68611,.17208,0,.88083],86:[0,.68611,.18625,0,.86555],87:[0,.68611,.18625,0,1.15999],88:[0,.68611,.15681,0,.86555],89:[0,.68611,.19803,0,.86555],90:[0,.68611,.14208,0,.70888],91:[.25,.75,.1875,0,.35611],93:[.25,
.75,.09972,0,.35611],94:[0,.69444,.06709,0,.59111],95:[.31,.13444,.09811,0,.59111],97:[0,.44444,.09426,0,.59111],98:[0,.69444,.07861,0,.53222],99:[0,.44444,.05222,0,.53222],100:[0,.69444,.10861,0,.59111],101:[0,.44444,.085,0,.53222],102:[.19444,.69444,.21778,0,.4],103:[.19444,.44444,.105,0,.53222],104:[0,.69444,.09426,0,.59111],105:[0,.69326,.11387,0,.35555],106:[.19444,.69326,.1672,0,.35555],107:[0,.69444,.11111,0,.53222],108:[0,.69444,.10861,0,.29666],109:[0,.44444,.09426,0,.94444],110:[0,.44444,
.09426,0,.64999],111:[0,.44444,.07861,0,.59111],112:[.19444,.44444,.07861,0,.59111],113:[.19444,.44444,.105,0,.53222],114:[0,.44444,.11111,0,.50167],115:[0,.44444,.08167,0,.48694],116:[0,.63492,.09639,0,.385],117:[0,.44444,.09426,0,.62055],118:[0,.44444,.11111,0,.53222],119:[0,.44444,.11111,0,.76777],120:[0,.44444,.12583,0,.56055],121:[.19444,.44444,.105,0,.56166],122:[0,.44444,.13889,0,.49055],126:[.35,.34444,.11472,0,.59111],160:[0,0,0,0,.25],168:[0,.69444,.11473,0,.59111],176:[0,.69444,0,0,.94888],
184:[.17014,0,0,0,.53222],198:[0,.68611,.11431,0,1.02277],216:[.04861,.73472,.09062,0,.88555],223:[.19444,.69444,.09736,0,.665],230:[0,.44444,.085,0,.82666],248:[.09722,.54167,.09458,0,.59111],305:[0,.44444,.09426,0,.35555],338:[0,.68611,.11431,0,1.14054],339:[0,.44444,.085,0,.82666],567:[.19444,.44444,.04611,0,.385],710:[0,.69444,.06709,0,.59111],711:[0,.63194,.08271,0,.59111],713:[0,.59444,.10444,0,.59111],714:[0,.69444,.08528,0,.59111],715:[0,.69444,0,0,.59111],728:[0,.69444,.10333,0,.59111],
729:[0,.69444,.12945,0,.35555],730:[0,.69444,0,0,.94888],732:[0,.69444,.11472,0,.59111],733:[0,.69444,.11472,0,.59111],915:[0,.68611,.12903,0,.69777],916:[0,.68611,0,0,.94444],920:[0,.68611,.09062,0,.88555],923:[0,.68611,0,0,.80666],926:[0,.68611,.15092,0,.76777],928:[0,.68611,.17208,0,.8961],931:[0,.68611,.11431,0,.82666],933:[0,.68611,.10778,0,.88555],934:[0,.68611,.05632,0,.82666],936:[0,.68611,.10778,0,.88555],937:[0,.68611,.0992,0,.82666],8211:[0,.44444,.09811,0,.59111],8212:[0,.44444,.09811,
0,1.18221],8216:[0,.69444,.12945,0,.35555],8217:[0,.69444,.12945,0,.35555],8220:[0,.69444,.16772,0,.62055],8221:[0,.69444,.07939,0,.62055]},"Main-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.12417,0,.30667],34:[0,.69444,.06961,0,.51444],35:[.19444,.69444,.06616,0,.81777],37:[.05556,.75,.13639,0,.81777],38:[0,.69444,.09694,0,.76666],39:[0,.69444,.12417,0,.30667],40:[.25,.75,.16194,0,.40889],41:[.25,.75,.03694,0,.40889],42:[0,.75,.14917,0,.51111],43:[.05667,.56167,.03694,0,.76666],44:[.19444,.10556,0,0,
.30667],45:[0,.43056,.02826,0,.35778],46:[0,.10556,0,0,.30667],47:[.25,.75,.16194,0,.51111],48:[0,.64444,.13556,0,.51111],49:[0,.64444,.13556,0,.51111],50:[0,.64444,.13556,0,.51111],51:[0,.64444,.13556,0,.51111],52:[.19444,.64444,.13556,0,.51111],53:[0,.64444,.13556,0,.51111],54:[0,.64444,.13556,0,.51111],55:[.19444,.64444,.13556,0,.51111],56:[0,.64444,.13556,0,.51111],57:[0,.64444,.13556,0,.51111],58:[0,.43056,.0582,0,.30667],59:[.19444,.43056,.0582,0,.30667],61:[-.13313,.36687,.06616,0,.76666],
63:[0,.69444,.1225,0,.51111],64:[0,.69444,.09597,0,.76666],65:[0,.68333,0,0,.74333],66:[0,.68333,.10257,0,.70389],67:[0,.68333,.14528,0,.71555],68:[0,.68333,.09403,0,.755],69:[0,.68333,.12028,0,.67833],70:[0,.68333,.13305,0,.65277],71:[0,.68333,.08722,0,.77361],72:[0,.68333,.16389,0,.74333],73:[0,.68333,.15806,0,.38555],74:[0,.68333,.14028,0,.525],75:[0,.68333,.14528,0,.76888],76:[0,.68333,0,0,.62722],77:[0,.68333,.16389,0,.89666],78:[0,.68333,.16389,0,.74333],79:[0,.68333,.09403,0,.76666],80:[0,
.68333,.10257,0,.67833],81:[.19444,.68333,.09403,0,.76666],82:[0,.68333,.03868,0,.72944],83:[0,.68333,.11972,0,.56222],84:[0,.68333,.13305,0,.71555],85:[0,.68333,.16389,0,.74333],86:[0,.68333,.18361,0,.74333],87:[0,.68333,.18361,0,.99888],88:[0,.68333,.15806,0,.74333],89:[0,.68333,.19383,0,.74333],90:[0,.68333,.14528,0,.61333],91:[.25,.75,.1875,0,.30667],93:[.25,.75,.10528,0,.30667],94:[0,.69444,.06646,0,.51111],95:[.31,.12056,.09208,0,.51111],97:[0,.43056,.07671,0,.51111],98:[0,.69444,.06312,0,
.46],99:[0,.43056,.05653,0,.46],100:[0,.69444,.10333,0,.51111],101:[0,.43056,.07514,0,.46],102:[.19444,.69444,.21194,0,.30667],103:[.19444,.43056,.08847,0,.46],104:[0,.69444,.07671,0,.51111],105:[0,.65536,.1019,0,.30667],106:[.19444,.65536,.14467,0,.30667],107:[0,.69444,.10764,0,.46],108:[0,.69444,.10333,0,.25555],109:[0,.43056,.07671,0,.81777],110:[0,.43056,.07671,0,.56222],111:[0,.43056,.06312,0,.51111],112:[.19444,.43056,.06312,0,.51111],113:[.19444,.43056,.08847,0,.46],114:[0,.43056,.10764,0,
.42166],115:[0,.43056,.08208,0,.40889],116:[0,.61508,.09486,0,.33222],117:[0,.43056,.07671,0,.53666],118:[0,.43056,.10764,0,.46],119:[0,.43056,.10764,0,.66444],120:[0,.43056,.12042,0,.46389],121:[.19444,.43056,.08847,0,.48555],122:[0,.43056,.12292,0,.40889],126:[.35,.31786,.11585,0,.51111],160:[0,0,0,0,.25],168:[0,.66786,.10474,0,.51111],176:[0,.69444,0,0,.83129],184:[.17014,0,0,0,.46],198:[0,.68333,.12028,0,.88277],216:[.04861,.73194,.09403,0,.76666],223:[.19444,.69444,.10514,0,.53666],230:[0,.43056,
.07514,0,.71555],248:[.09722,.52778,.09194,0,.51111],338:[0,.68333,.12028,0,.98499],339:[0,.43056,.07514,0,.71555],710:[0,.69444,.06646,0,.51111],711:[0,.62847,.08295,0,.51111],713:[0,.56167,.10333,0,.51111],714:[0,.69444,.09694,0,.51111],715:[0,.69444,0,0,.51111],728:[0,.69444,.10806,0,.51111],729:[0,.66786,.11752,0,.30667],730:[0,.69444,0,0,.83129],732:[0,.66786,.11585,0,.51111],733:[0,.69444,.1225,0,.51111],915:[0,.68333,.13305,0,.62722],916:[0,.68333,0,0,.81777],920:[0,.68333,.09403,0,.76666],
923:[0,.68333,0,0,.69222],926:[0,.68333,.15294,0,.66444],928:[0,.68333,.16389,0,.74333],931:[0,.68333,.12028,0,.71555],933:[0,.68333,.11111,0,.76666],934:[0,.68333,.05986,0,.71555],936:[0,.68333,.11111,0,.76666],937:[0,.68333,.10257,0,.71555],8211:[0,.43056,.09208,0,.51111],8212:[0,.43056,.09208,0,1.02222],8216:[0,.69444,.12417,0,.30667],8217:[0,.69444,.12417,0,.30667],8220:[0,.69444,.1685,0,.51444],8221:[0,.69444,.06961,0,.51444],8463:[0,.68889,0,0,.54028]},"Main-Regular":{32:[0,0,0,0,.25],33:[
0,.69444,0,0,.27778],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.77778],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.19444,.10556,0,0,.27778],45:[0,.43056,0,0,.33333],46:[0,.10556,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.64444,0,0,.5],49:[0,.64444,0,0,.5],50:[0,.64444,0,0,.5],51:[0,.64444,0,0,.5],52:[0,.64444,0,0,.5],53:[0,.64444,0,0,.5],54:[0,
.64444,0,0,.5],55:[0,.64444,0,0,.5],56:[0,.64444,0,0,.5],57:[0,.64444,0,0,.5],58:[0,.43056,0,0,.27778],59:[.19444,.43056,0,0,.27778],60:[.0391,.5391,0,0,.77778],61:[-.13313,.36687,0,0,.77778],62:[.0391,.5391,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.77778],65:[0,.68333,0,0,.75],66:[0,.68333,0,0,.70834],67:[0,.68333,0,0,.72222],68:[0,.68333,0,0,.76389],69:[0,.68333,0,0,.68056],70:[0,.68333,0,0,.65278],71:[0,.68333,0,0,.78472],72:[0,.68333,0,0,.75],73:[0,.68333,0,0,.36111],74:[0,.68333,
0,0,.51389],75:[0,.68333,0,0,.77778],76:[0,.68333,0,0,.625],77:[0,.68333,0,0,.91667],78:[0,.68333,0,0,.75],79:[0,.68333,0,0,.77778],80:[0,.68333,0,0,.68056],81:[.19444,.68333,0,0,.77778],82:[0,.68333,0,0,.73611],83:[0,.68333,0,0,.55556],84:[0,.68333,0,0,.72222],85:[0,.68333,0,0,.75],86:[0,.68333,.01389,0,.75],87:[0,.68333,.01389,0,1.02778],88:[0,.68333,0,0,.75],89:[0,.68333,.025,0,.75],90:[0,.68333,0,0,.61111],91:[.25,.75,0,0,.27778],92:[.25,.75,0,0,.5],93:[.25,.75,0,0,.27778],94:[0,.69444,0,0,.5],
95:[.31,.12056,.02778,0,.5],97:[0,.43056,0,0,.5],98:[0,.69444,0,0,.55556],99:[0,.43056,0,0,.44445],100:[0,.69444,0,0,.55556],101:[0,.43056,0,0,.44445],102:[0,.69444,.07778,0,.30556],103:[.19444,.43056,.01389,0,.5],104:[0,.69444,0,0,.55556],105:[0,.66786,0,0,.27778],106:[.19444,.66786,0,0,.30556],107:[0,.69444,0,0,.52778],108:[0,.69444,0,0,.27778],109:[0,.43056,0,0,.83334],110:[0,.43056,0,0,.55556],111:[0,.43056,0,0,.5],112:[.19444,.43056,0,0,.55556],113:[.19444,.43056,0,0,.52778],114:[0,.43056,0,
0,.39167],115:[0,.43056,0,0,.39445],116:[0,.61508,0,0,.38889],117:[0,.43056,0,0,.55556],118:[0,.43056,.01389,0,.52778],119:[0,.43056,.01389,0,.72222],120:[0,.43056,0,0,.52778],121:[.19444,.43056,.01389,0,.52778],122:[0,.43056,0,0,.44445],123:[.25,.75,0,0,.5],124:[.25,.75,0,0,.27778],125:[.25,.75,0,0,.5],126:[.35,.31786,0,0,.5],160:[0,0,0,0,.25],163:[0,.69444,0,0,.76909],167:[.19444,.69444,0,0,.44445],168:[0,.66786,0,0,.5],172:[0,.43056,0,0,.66667],176:[0,.69444,0,0,.75],177:[.08333,.58333,0,0,.77778],
182:[.19444,.69444,0,0,.61111],184:[.17014,0,0,0,.44445],198:[0,.68333,0,0,.90278],215:[.08333,.58333,0,0,.77778],216:[.04861,.73194,0,0,.77778],223:[0,.69444,0,0,.5],230:[0,.43056,0,0,.72222],247:[.08333,.58333,0,0,.77778],248:[.09722,.52778,0,0,.5],305:[0,.43056,0,0,.27778],338:[0,.68333,0,0,1.01389],339:[0,.43056,0,0,.77778],567:[.19444,.43056,0,0,.30556],710:[0,.69444,0,0,.5],711:[0,.62847,0,0,.5],713:[0,.56778,0,0,.5],714:[0,.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,
.66786,0,0,.27778],730:[0,.69444,0,0,.75],732:[0,.66786,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.68333,0,0,.625],916:[0,.68333,0,0,.83334],920:[0,.68333,0,0,.77778],923:[0,.68333,0,0,.69445],926:[0,.68333,0,0,.66667],928:[0,.68333,0,0,.75],931:[0,.68333,0,0,.72222],933:[0,.68333,0,0,.77778],934:[0,.68333,0,0,.72222],936:[0,.68333,0,0,.77778],937:[0,.68333,0,0,.72222],8211:[0,.43056,.02778,0,.5],8212:[0,.43056,.02778,0,1],8216:[0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[
0,.69444,0,0,.5],8224:[.19444,.69444,0,0,.44445],8225:[.19444,.69444,0,0,.44445],8230:[0,.123,0,0,1.172],8242:[0,.55556,0,0,.275],8407:[0,.71444,.15382,0,.5],8463:[0,.68889,0,0,.54028],8465:[0,.69444,0,0,.72222],8467:[0,.69444,0,.11111,.41667],8472:[.19444,.43056,0,.11111,.63646],8476:[0,.69444,0,0,.72222],8501:[0,.69444,0,0,.61111],8592:[-.13313,.36687,0,0,1],8593:[.19444,.69444,0,0,.5],8594:[-.13313,.36687,0,0,1],8595:[.19444,.69444,0,0,.5],8596:[-.13313,.36687,0,0,1],8597:[.25,.75,0,0,.5],8598:[
.19444,.69444,0,0,1],8599:[.19444,.69444,0,0,1],8600:[.19444,.69444,0,0,1],8601:[.19444,.69444,0,0,1],8614:[.011,.511,0,0,1],8617:[.011,.511,0,0,1.126],8618:[.011,.511,0,0,1.126],8636:[-.13313,.36687,0,0,1],8637:[-.13313,.36687,0,0,1],8640:[-.13313,.36687,0,0,1],8641:[-.13313,.36687,0,0,1],8652:[.011,.671,0,0,1],8656:[-.13313,.36687,0,0,1],8657:[.19444,.69444,0,0,.61111],8658:[-.13313,.36687,0,0,1],8659:[.19444,.69444,0,0,.61111],8660:[-.13313,.36687,0,0,1],8661:[.25,.75,0,0,.61111],8704:[0,.69444,
0,0,.55556],8706:[0,.69444,.05556,.08334,.5309],8707:[0,.69444,0,0,.55556],8709:[.05556,.75,0,0,.5],8711:[0,.68333,0,0,.83334],8712:[.0391,.5391,0,0,.66667],8715:[.0391,.5391,0,0,.66667],8722:[.08333,.58333,0,0,.77778],8723:[.08333,.58333,0,0,.77778],8725:[.25,.75,0,0,.5],8726:[.25,.75,0,0,.5],8727:[-.03472,.46528,0,0,.5],8728:[-.05555,.44445,0,0,.5],8729:[-.05555,.44445,0,0,.5],8730:[.2,.8,0,0,.83334],8733:[0,.43056,0,0,.77778],8734:[0,.43056,0,0,1],8736:[0,.69224,0,0,.72222],8739:[.25,.75,0,0,
.27778],8741:[.25,.75,0,0,.5],8743:[0,.55556,0,0,.66667],8744:[0,.55556,0,0,.66667],8745:[0,.55556,0,0,.66667],8746:[0,.55556,0,0,.66667],8747:[.19444,.69444,.11111,0,.41667],8764:[-.13313,.36687,0,0,.77778],8768:[.19444,.69444,0,0,.27778],8771:[-.03625,.46375,0,0,.77778],8773:[-.022,.589,0,0,.778],8776:[-.01688,.48312,0,0,.77778],8781:[-.03625,.46375,0,0,.77778],8784:[-.133,.673,0,0,.778],8801:[-.03625,.46375,0,0,.77778],8804:[.13597,.63597,0,0,.77778],8805:[.13597,.63597,0,0,.77778],8810:[.0391,
.5391,0,0,1],8811:[.0391,.5391,0,0,1],8826:[.0391,.5391,0,0,.77778],8827:[.0391,.5391,0,0,.77778],8834:[.0391,.5391,0,0,.77778],8835:[.0391,.5391,0,0,.77778],8838:[.13597,.63597,0,0,.77778],8839:[.13597,.63597,0,0,.77778],8846:[0,.55556,0,0,.66667],8849:[.13597,.63597,0,0,.77778],8850:[.13597,.63597,0,0,.77778],8851:[0,.55556,0,0,.66667],8852:[0,.55556,0,0,.66667],8853:[.08333,.58333,0,0,.77778],8854:[.08333,.58333,0,0,.77778],8855:[.08333,.58333,0,0,.77778],8856:[.08333,.58333,0,0,.77778],8857:[
.08333,.58333,0,0,.77778],8866:[0,.69444,0,0,.61111],8867:[0,.69444,0,0,.61111],8868:[0,.69444,0,0,.77778],8869:[0,.69444,0,0,.77778],8872:[.249,.75,0,0,.867],8900:[-.05555,.44445,0,0,.5],8901:[-.05555,.44445,0,0,.27778],8902:[-.03472,.46528,0,0,.5],8904:[.005,.505,0,0,.9],8942:[.03,.903,0,0,.278],8943:[-.19,.313,0,0,1.172],8945:[-.1,.823,0,0,1.282],8968:[.25,.75,0,0,.44445],8969:[.25,.75,0,0,.44445],8970:[.25,.75,0,0,.44445],8971:[.25,.75,0,0,.44445],8994:[-.14236,.35764,0,0,1],8995:[-.14236,.35764,
0,0,1],9136:[.244,.744,0,0,.412],9137:[.244,.745,0,0,.412],9651:[.19444,.69444,0,0,.88889],9657:[-.03472,.46528,0,0,.5],9661:[.19444,.69444,0,0,.88889],9667:[-.03472,.46528,0,0,.5],9711:[.19444,.69444,0,0,1],9824:[.12963,.69444,0,0,.77778],9825:[.12963,.69444,0,0,.77778],9826:[.12963,.69444,0,0,.77778],9827:[.12963,.69444,0,0,.77778],9837:[0,.75,0,0,.38889],9838:[.19444,.69444,0,0,.38889],9839:[.19444,.69444,0,0,.38889],10216:[.25,.75,0,0,.38889],10217:[.25,.75,0,0,.38889],10222:[.244,.744,0,0,.412],
10223:[.244,.745,0,0,.412],10229:[.011,.511,0,0,1.609],10230:[.011,.511,0,0,1.638],10231:[.011,.511,0,0,1.859],10232:[.024,.525,0,0,1.609],10233:[.024,.525,0,0,1.638],10234:[.024,.525,0,0,1.858],10236:[.011,.511,0,0,1.638],10815:[0,.68333,0,0,.75],10927:[.13597,.63597,0,0,.77778],10928:[.13597,.63597,0,0,.77778],57376:[.19444,.69444,0,0,0]},"Math-BoldItalic":{32:[0,0,0,0,.25],48:[0,.44444,0,0,.575],49:[0,.44444,0,0,.575],50:[0,.44444,0,0,.575],51:[.19444,.44444,0,0,.575],52:[.19444,.44444,0,0,.575],
53:[.19444,.44444,0,0,.575],54:[0,.64444,0,0,.575],55:[.19444,.44444,0,0,.575],56:[0,.64444,0,0,.575],57:[.19444,.44444,0,0,.575],65:[0,.68611,0,0,.86944],66:[0,.68611,.04835,0,.8664],67:[0,.68611,.06979,0,.81694],68:[0,.68611,.03194,0,.93812],69:[0,.68611,.05451,0,.81007],70:[0,.68611,.15972,0,.68889],71:[0,.68611,0,0,.88673],72:[0,.68611,.08229,0,.98229],73:[0,.68611,.07778,0,.51111],74:[0,.68611,.10069,0,.63125],75:[0,.68611,.06979,0,.97118],76:[0,.68611,0,0,.75555],77:[0,.68611,.11424,0,1.14201],
78:[0,.68611,.11424,0,.95034],79:[0,.68611,.03194,0,.83666],80:[0,.68611,.15972,0,.72309],81:[.19444,.68611,0,0,.86861],82:[0,.68611,.00421,0,.87235],83:[0,.68611,.05382,0,.69271],84:[0,.68611,.15972,0,.63663],85:[0,.68611,.11424,0,.80027],86:[0,.68611,.25555,0,.67778],87:[0,.68611,.15972,0,1.09305],88:[0,.68611,.07778,0,.94722],89:[0,.68611,.25555,0,.67458],90:[0,.68611,.06979,0,.77257],97:[0,.44444,0,0,.63287],98:[0,.69444,0,0,.52083],99:[0,.44444,0,0,.51342],100:[0,.69444,0,0,.60972],101:[0,.44444,
0,0,.55361],102:[.19444,.69444,.11042,0,.56806],103:[.19444,.44444,.03704,0,.5449],104:[0,.69444,0,0,.66759],105:[0,.69326,0,0,.4048],106:[.19444,.69326,.0622,0,.47083],107:[0,.69444,.01852,0,.6037],108:[0,.69444,.0088,0,.34815],109:[0,.44444,0,0,1.0324],110:[0,.44444,0,0,.71296],111:[0,.44444,0,0,.58472],112:[.19444,.44444,0,0,.60092],113:[.19444,.44444,.03704,0,.54213],114:[0,.44444,.03194,0,.5287],115:[0,.44444,0,0,.53125],116:[0,.63492,0,0,.41528],117:[0,.44444,0,0,.68102],118:[0,.44444,.03704,
0,.56666],119:[0,.44444,.02778,0,.83148],120:[0,.44444,0,0,.65903],121:[.19444,.44444,.03704,0,.59028],122:[0,.44444,.04213,0,.55509],160:[0,0,0,0,.25],915:[0,.68611,.15972,0,.65694],916:[0,.68611,0,0,.95833],920:[0,.68611,.03194,0,.86722],923:[0,.68611,0,0,.80555],926:[0,.68611,.07458,0,.84125],928:[0,.68611,.08229,0,.98229],931:[0,.68611,.05451,0,.88507],933:[0,.68611,.15972,0,.67083],934:[0,.68611,0,0,.76666],936:[0,.68611,.11653,0,.71402],937:[0,.68611,.04835,0,.8789],945:[0,.44444,0,0,.76064],
946:[.19444,.69444,.03403,0,.65972],947:[.19444,.44444,.06389,0,.59003],948:[0,.69444,.03819,0,.52222],949:[0,.44444,0,0,.52882],950:[.19444,.69444,.06215,0,.50833],951:[.19444,.44444,.03704,0,.6],952:[0,.69444,.03194,0,.5618],953:[0,.44444,0,0,.41204],954:[0,.44444,0,0,.66759],955:[0,.69444,0,0,.67083],956:[.19444,.44444,0,0,.70787],957:[0,.44444,.06898,0,.57685],958:[.19444,.69444,.03021,0,.50833],959:[0,.44444,0,0,.58472],960:[0,.44444,.03704,0,.68241],961:[.19444,.44444,0,0,.6118],962:[.09722,
.44444,.07917,0,.42361],963:[0,.44444,.03704,0,.68588],964:[0,.44444,.13472,0,.52083],965:[0,.44444,.03704,0,.63055],966:[.19444,.44444,0,0,.74722],967:[.19444,.44444,0,0,.71805],968:[.19444,.69444,.03704,0,.75833],969:[0,.44444,.03704,0,.71782],977:[0,.69444,0,0,.69155],981:[.19444,.69444,0,0,.7125],982:[0,.44444,.03194,0,.975],1009:[.19444,.44444,0,0,.6118],1013:[0,.44444,0,0,.48333],57649:[0,.44444,0,0,.39352],57911:[.19444,.44444,0,0,.43889]},"Math-Italic":{32:[0,0,0,0,.25],48:[0,.43056,0,0,
.5],49:[0,.43056,0,0,.5],50:[0,.43056,0,0,.5],51:[.19444,.43056,0,0,.5],52:[.19444,.43056,0,0,.5],53:[.19444,.43056,0,0,.5],54:[0,.64444,0,0,.5],55:[.19444,.43056,0,0,.5],56:[0,.64444,0,0,.5],57:[.19444,.43056,0,0,.5],65:[0,.68333,0,.13889,.75],66:[0,.68333,.05017,.08334,.75851],67:[0,.68333,.07153,.08334,.71472],68:[0,.68333,.02778,.05556,.82792],69:[0,.68333,.05764,.08334,.7382],70:[0,.68333,.13889,.08334,.64306],71:[0,.68333,0,.08334,.78625],72:[0,.68333,.08125,.05556,.83125],73:[0,.68333,.07847,
.11111,.43958],74:[0,.68333,.09618,.16667,.55451],75:[0,.68333,.07153,.05556,.84931],76:[0,.68333,0,.02778,.68056],77:[0,.68333,.10903,.08334,.97014],78:[0,.68333,.10903,.08334,.80347],79:[0,.68333,.02778,.08334,.76278],80:[0,.68333,.13889,.08334,.64201],81:[.19444,.68333,0,.08334,.79056],82:[0,.68333,.00773,.08334,.75929],83:[0,.68333,.05764,.08334,.6132],84:[0,.68333,.13889,.08334,.58438],85:[0,.68333,.10903,.02778,.68278],86:[0,.68333,.22222,0,.58333],87:[0,.68333,.13889,0,.94445],88:[0,.68333,
.07847,.08334,.82847],89:[0,.68333,.22222,0,.58056],90:[0,.68333,.07153,.08334,.68264],97:[0,.43056,0,0,.52859],98:[0,.69444,0,0,.42917],99:[0,.43056,0,.05556,.43276],100:[0,.69444,0,.16667,.52049],101:[0,.43056,0,.05556,.46563],102:[.19444,.69444,.10764,.16667,.48959],103:[.19444,.43056,.03588,.02778,.47697],104:[0,.69444,0,0,.57616],105:[0,.65952,0,0,.34451],106:[.19444,.65952,.05724,0,.41181],107:[0,.69444,.03148,0,.5206],108:[0,.69444,.01968,.08334,.29838],109:[0,.43056,0,0,.87801],110:[0,.43056,
0,0,.60023],111:[0,.43056,0,.05556,.48472],112:[.19444,.43056,0,.08334,.50313],113:[.19444,.43056,.03588,.08334,.44641],114:[0,.43056,.02778,.05556,.45116],115:[0,.43056,0,.05556,.46875],116:[0,.61508,0,.08334,.36111],117:[0,.43056,0,.02778,.57246],118:[0,.43056,.03588,.02778,.48472],119:[0,.43056,.02691,.08334,.71592],120:[0,.43056,0,.02778,.57153],121:[.19444,.43056,.03588,.05556,.49028],122:[0,.43056,.04398,.05556,.46505],160:[0,0,0,0,.25],915:[0,.68333,.13889,.08334,.61528],916:[0,.68333,0,.16667,
.83334],920:[0,.68333,.02778,.08334,.76278],923:[0,.68333,0,.16667,.69445],926:[0,.68333,.07569,.08334,.74236],928:[0,.68333,.08125,.05556,.83125],931:[0,.68333,.05764,.08334,.77986],933:[0,.68333,.13889,.05556,.58333],934:[0,.68333,0,.08334,.66667],936:[0,.68333,.11,.05556,.61222],937:[0,.68333,.05017,.08334,.7724],945:[0,.43056,.0037,.02778,.6397],946:[.19444,.69444,.05278,.08334,.56563],947:[.19444,.43056,.05556,0,.51773],948:[0,.69444,.03785,.05556,.44444],949:[0,.43056,0,.08334,.46632],950:[
.19444,.69444,.07378,.08334,.4375],951:[.19444,.43056,.03588,.05556,.49653],952:[0,.69444,.02778,.08334,.46944],953:[0,.43056,0,.05556,.35394],954:[0,.43056,0,0,.57616],955:[0,.69444,0,0,.58334],956:[.19444,.43056,0,.02778,.60255],957:[0,.43056,.06366,.02778,.49398],958:[.19444,.69444,.04601,.11111,.4375],959:[0,.43056,0,.05556,.48472],960:[0,.43056,.03588,0,.57003],961:[.19444,.43056,0,.08334,.51702],962:[.09722,.43056,.07986,.08334,.36285],963:[0,.43056,.03588,0,.57141],964:[0,.43056,.1132,.02778,
.43715],965:[0,.43056,.03588,.02778,.54028],966:[.19444,.43056,0,.08334,.65417],967:[.19444,.43056,0,.05556,.62569],968:[.19444,.69444,.03588,.11111,.65139],969:[0,.43056,.03588,0,.62245],977:[0,.69444,0,.08334,.59144],981:[.19444,.69444,0,.08334,.59583],982:[0,.43056,.02778,0,.82813],1009:[.19444,.43056,0,.08334,.51702],1013:[0,.43056,0,.05556,.4059],57649:[0,.43056,0,.02778,.32246],57911:[.19444,.43056,0,.08334,.38403]},"SansSerif-Bold":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.36667],34:[0,.69444,0,
0,.55834],35:[.19444,.69444,0,0,.91667],36:[.05556,.75,0,0,.55],37:[.05556,.75,0,0,1.02912],38:[0,.69444,0,0,.83056],39:[0,.69444,0,0,.30556],40:[.25,.75,0,0,.42778],41:[.25,.75,0,0,.42778],42:[0,.75,0,0,.55],43:[.11667,.61667,0,0,.85556],44:[.10556,.13056,0,0,.30556],45:[0,.45833,0,0,.36667],46:[0,.13056,0,0,.30556],47:[.25,.75,0,0,.55],48:[0,.69444,0,0,.55],49:[0,.69444,0,0,.55],50:[0,.69444,0,0,.55],51:[0,.69444,0,0,.55],52:[0,.69444,0,0,.55],53:[0,.69444,0,0,.55],54:[0,.69444,0,0,.55],55:[0,
.69444,0,0,.55],56:[0,.69444,0,0,.55],57:[0,.69444,0,0,.55],58:[0,.45833,0,0,.30556],59:[.10556,.45833,0,0,.30556],61:[-.09375,.40625,0,0,.85556],63:[0,.69444,0,0,.51945],64:[0,.69444,0,0,.73334],65:[0,.69444,0,0,.73334],66:[0,.69444,0,0,.73334],67:[0,.69444,0,0,.70278],68:[0,.69444,0,0,.79445],69:[0,.69444,0,0,.64167],70:[0,.69444,0,0,.61111],71:[0,.69444,0,0,.73334],72:[0,.69444,0,0,.79445],73:[0,.69444,0,0,.33056],74:[0,.69444,0,0,.51945],75:[0,.69444,0,0,.76389],76:[0,.69444,0,0,.58056],77:[
0,.69444,0,0,.97778],78:[0,.69444,0,0,.79445],79:[0,.69444,0,0,.79445],80:[0,.69444,0,0,.70278],81:[.10556,.69444,0,0,.79445],82:[0,.69444,0,0,.70278],83:[0,.69444,0,0,.61111],84:[0,.69444,0,0,.73334],85:[0,.69444,0,0,.76389],86:[0,.69444,.01528,0,.73334],87:[0,.69444,.01528,0,1.03889],88:[0,.69444,0,0,.73334],89:[0,.69444,.0275,0,.73334],90:[0,.69444,0,0,.67223],91:[.25,.75,0,0,.34306],93:[.25,.75,0,0,.34306],94:[0,.69444,0,0,.55],95:[.35,.10833,.03056,0,.55],97:[0,.45833,0,0,.525],98:[0,.69444,
0,0,.56111],99:[0,.45833,0,0,.48889],100:[0,.69444,0,0,.56111],101:[0,.45833,0,0,.51111],102:[0,.69444,.07639,0,.33611],103:[.19444,.45833,.01528,0,.55],104:[0,.69444,0,0,.56111],105:[0,.69444,0,0,.25556],106:[.19444,.69444,0,0,.28611],107:[0,.69444,0,0,.53056],108:[0,.69444,0,0,.25556],109:[0,.45833,0,0,.86667],110:[0,.45833,0,0,.56111],111:[0,.45833,0,0,.55],112:[.19444,.45833,0,0,.56111],113:[.19444,.45833,0,0,.56111],114:[0,.45833,.01528,0,.37222],115:[0,.45833,0,0,.42167],116:[0,.58929,0,0,
.40417],117:[0,.45833,0,0,.56111],118:[0,.45833,.01528,0,.5],119:[0,.45833,.01528,0,.74445],120:[0,.45833,0,0,.5],121:[.19444,.45833,.01528,0,.5],122:[0,.45833,0,0,.47639],126:[.35,.34444,0,0,.55],160:[0,0,0,0,.25],168:[0,.69444,0,0,.55],176:[0,.69444,0,0,.73334],180:[0,.69444,0,0,.55],184:[.17014,0,0,0,.48889],305:[0,.45833,0,0,.25556],567:[.19444,.45833,0,0,.28611],710:[0,.69444,0,0,.55],711:[0,.63542,0,0,.55],713:[0,.63778,0,0,.55],728:[0,.69444,0,0,.55],729:[0,.69444,0,0,.30556],730:[0,.69444,
0,0,.73334],732:[0,.69444,0,0,.55],733:[0,.69444,0,0,.55],915:[0,.69444,0,0,.58056],916:[0,.69444,0,0,.91667],920:[0,.69444,0,0,.85556],923:[0,.69444,0,0,.67223],926:[0,.69444,0,0,.73334],928:[0,.69444,0,0,.79445],931:[0,.69444,0,0,.79445],933:[0,.69444,0,0,.85556],934:[0,.69444,0,0,.79445],936:[0,.69444,0,0,.85556],937:[0,.69444,0,0,.79445],8211:[0,.45833,.03056,0,.55],8212:[0,.45833,.03056,0,1.10001],8216:[0,.69444,0,0,.30556],8217:[0,.69444,0,0,.30556],8220:[0,.69444,0,0,.55834],8221:[0,.69444,
0,0,.55834]},"SansSerif-Italic":{32:[0,0,0,0,.25],33:[0,.69444,.05733,0,.31945],34:[0,.69444,.00316,0,.5],35:[.19444,.69444,.05087,0,.83334],36:[.05556,.75,.11156,0,.5],37:[.05556,.75,.03126,0,.83334],38:[0,.69444,.03058,0,.75834],39:[0,.69444,.07816,0,.27778],40:[.25,.75,.13164,0,.38889],41:[.25,.75,.02536,0,.38889],42:[0,.75,.11775,0,.5],43:[.08333,.58333,.02536,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,.01946,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,.13164,0,.5],48:[0,.65556,.11156,
0,.5],49:[0,.65556,.11156,0,.5],50:[0,.65556,.11156,0,.5],51:[0,.65556,.11156,0,.5],52:[0,.65556,.11156,0,.5],53:[0,.65556,.11156,0,.5],54:[0,.65556,.11156,0,.5],55:[0,.65556,.11156,0,.5],56:[0,.65556,.11156,0,.5],57:[0,.65556,.11156,0,.5],58:[0,.44444,.02502,0,.27778],59:[.125,.44444,.02502,0,.27778],61:[-.13,.37,.05087,0,.77778],63:[0,.69444,.11809,0,.47222],64:[0,.69444,.07555,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,.08293,0,.66667],67:[0,.69444,.11983,0,.63889],68:[0,.69444,.07555,0,
.72223],69:[0,.69444,.11983,0,.59722],70:[0,.69444,.13372,0,.56945],71:[0,.69444,.11983,0,.66667],72:[0,.69444,.08094,0,.70834],73:[0,.69444,.13372,0,.27778],74:[0,.69444,.08094,0,.47222],75:[0,.69444,.11983,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,.08094,0,.875],78:[0,.69444,.08094,0,.70834],79:[0,.69444,.07555,0,.73611],80:[0,.69444,.08293,0,.63889],81:[.125,.69444,.07555,0,.73611],82:[0,.69444,.08293,0,.64584],83:[0,.69444,.09205,0,.55556],84:[0,.69444,.13372,0,.68056],85:[0,.69444,.08094,
0,.6875],86:[0,.69444,.1615,0,.66667],87:[0,.69444,.1615,0,.94445],88:[0,.69444,.13372,0,.66667],89:[0,.69444,.17261,0,.66667],90:[0,.69444,.11983,0,.61111],91:[.25,.75,.15942,0,.28889],93:[.25,.75,.08719,0,.28889],94:[0,.69444,.0799,0,.5],95:[.35,.09444,.08616,0,.5],97:[0,.44444,.00981,0,.48056],98:[0,.69444,.03057,0,.51667],99:[0,.44444,.08336,0,.44445],100:[0,.69444,.09483,0,.51667],101:[0,.44444,.06778,0,.44445],102:[0,.69444,.21705,0,.30556],103:[.19444,.44444,.10836,0,.5],104:[0,.69444,.01778,
0,.51667],105:[0,.67937,.09718,0,.23889],106:[.19444,.67937,.09162,0,.26667],107:[0,.69444,.08336,0,.48889],108:[0,.69444,.09483,0,.23889],109:[0,.44444,.01778,0,.79445],110:[0,.44444,.01778,0,.51667],111:[0,.44444,.06613,0,.5],112:[.19444,.44444,.0389,0,.51667],113:[.19444,.44444,.04169,0,.51667],114:[0,.44444,.10836,0,.34167],115:[0,.44444,.0778,0,.38333],116:[0,.57143,.07225,0,.36111],117:[0,.44444,.04169,0,.51667],118:[0,.44444,.10836,0,.46111],119:[0,.44444,.10836,0,.68334],120:[0,.44444,.09169,
0,.46111],121:[.19444,.44444,.10836,0,.46111],122:[0,.44444,.08752,0,.43472],126:[.35,.32659,.08826,0,.5],160:[0,0,0,0,.25],168:[0,.67937,.06385,0,.5],176:[0,.69444,0,0,.73752],184:[.17014,0,0,0,.44445],305:[0,.44444,.04169,0,.23889],567:[.19444,.44444,.04169,0,.26667],710:[0,.69444,.0799,0,.5],711:[0,.63194,.08432,0,.5],713:[0,.60889,.08776,0,.5],714:[0,.69444,.09205,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,.09483,0,.5],729:[0,.67937,.07774,0,.27778],730:[0,.69444,0,0,.73752],732:[0,.67659,.08826,
0,.5],733:[0,.69444,.09205,0,.5],915:[0,.69444,.13372,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,.07555,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,.12816,0,.66667],928:[0,.69444,.08094,0,.70834],931:[0,.69444,.11983,0,.72222],933:[0,.69444,.09031,0,.77778],934:[0,.69444,.04603,0,.72222],936:[0,.69444,.09031,0,.77778],937:[0,.69444,.08293,0,.72222],8211:[0,.44444,.08616,0,.5],8212:[0,.44444,.08616,0,1],8216:[0,.69444,.07816,0,.27778],8217:[0,.69444,.07816,0,.27778],8220:[0,.69444,.14205,
0,.5],8221:[0,.69444,.00316,0,.5]},"SansSerif-Regular":{32:[0,0,0,0,.25],33:[0,.69444,0,0,.31945],34:[0,.69444,0,0,.5],35:[.19444,.69444,0,0,.83334],36:[.05556,.75,0,0,.5],37:[.05556,.75,0,0,.83334],38:[0,.69444,0,0,.75834],39:[0,.69444,0,0,.27778],40:[.25,.75,0,0,.38889],41:[.25,.75,0,0,.38889],42:[0,.75,0,0,.5],43:[.08333,.58333,0,0,.77778],44:[.125,.08333,0,0,.27778],45:[0,.44444,0,0,.33333],46:[0,.08333,0,0,.27778],47:[.25,.75,0,0,.5],48:[0,.65556,0,0,.5],49:[0,.65556,0,0,.5],50:[0,.65556,0,
0,.5],51:[0,.65556,0,0,.5],52:[0,.65556,0,0,.5],53:[0,.65556,0,0,.5],54:[0,.65556,0,0,.5],55:[0,.65556,0,0,.5],56:[0,.65556,0,0,.5],57:[0,.65556,0,0,.5],58:[0,.44444,0,0,.27778],59:[.125,.44444,0,0,.27778],61:[-.13,.37,0,0,.77778],63:[0,.69444,0,0,.47222],64:[0,.69444,0,0,.66667],65:[0,.69444,0,0,.66667],66:[0,.69444,0,0,.66667],67:[0,.69444,0,0,.63889],68:[0,.69444,0,0,.72223],69:[0,.69444,0,0,.59722],70:[0,.69444,0,0,.56945],71:[0,.69444,0,0,.66667],72:[0,.69444,0,0,.70834],73:[0,.69444,0,0,.27778],
74:[0,.69444,0,0,.47222],75:[0,.69444,0,0,.69445],76:[0,.69444,0,0,.54167],77:[0,.69444,0,0,.875],78:[0,.69444,0,0,.70834],79:[0,.69444,0,0,.73611],80:[0,.69444,0,0,.63889],81:[.125,.69444,0,0,.73611],82:[0,.69444,0,0,.64584],83:[0,.69444,0,0,.55556],84:[0,.69444,0,0,.68056],85:[0,.69444,0,0,.6875],86:[0,.69444,.01389,0,.66667],87:[0,.69444,.01389,0,.94445],88:[0,.69444,0,0,.66667],89:[0,.69444,.025,0,.66667],90:[0,.69444,0,0,.61111],91:[.25,.75,0,0,.28889],93:[.25,.75,0,0,.28889],94:[0,.69444,0,
0,.5],95:[.35,.09444,.02778,0,.5],97:[0,.44444,0,0,.48056],98:[0,.69444,0,0,.51667],99:[0,.44444,0,0,.44445],100:[0,.69444,0,0,.51667],101:[0,.44444,0,0,.44445],102:[0,.69444,.06944,0,.30556],103:[.19444,.44444,.01389,0,.5],104:[0,.69444,0,0,.51667],105:[0,.67937,0,0,.23889],106:[.19444,.67937,0,0,.26667],107:[0,.69444,0,0,.48889],108:[0,.69444,0,0,.23889],109:[0,.44444,0,0,.79445],110:[0,.44444,0,0,.51667],111:[0,.44444,0,0,.5],112:[.19444,.44444,0,0,.51667],113:[.19444,.44444,0,0,.51667],114:[
0,.44444,.01389,0,.34167],115:[0,.44444,0,0,.38333],116:[0,.57143,0,0,.36111],117:[0,.44444,0,0,.51667],118:[0,.44444,.01389,0,.46111],119:[0,.44444,.01389,0,.68334],120:[0,.44444,0,0,.46111],121:[.19444,.44444,.01389,0,.46111],122:[0,.44444,0,0,.43472],126:[.35,.32659,0,0,.5],160:[0,0,0,0,.25],168:[0,.67937,0,0,.5],176:[0,.69444,0,0,.66667],184:[.17014,0,0,0,.44445],305:[0,.44444,0,0,.23889],567:[.19444,.44444,0,0,.26667],710:[0,.69444,0,0,.5],711:[0,.63194,0,0,.5],713:[0,.60889,0,0,.5],714:[0,
.69444,0,0,.5],715:[0,.69444,0,0,.5],728:[0,.69444,0,0,.5],729:[0,.67937,0,0,.27778],730:[0,.69444,0,0,.66667],732:[0,.67659,0,0,.5],733:[0,.69444,0,0,.5],915:[0,.69444,0,0,.54167],916:[0,.69444,0,0,.83334],920:[0,.69444,0,0,.77778],923:[0,.69444,0,0,.61111],926:[0,.69444,0,0,.66667],928:[0,.69444,0,0,.70834],931:[0,.69444,0,0,.72222],933:[0,.69444,0,0,.77778],934:[0,.69444,0,0,.72222],936:[0,.69444,0,0,.77778],937:[0,.69444,0,0,.72222],8211:[0,.44444,.02778,0,.5],8212:[0,.44444,.02778,0,1],8216:[
0,.69444,0,0,.27778],8217:[0,.69444,0,0,.27778],8220:[0,.69444,0,0,.5],8221:[0,.69444,0,0,.5]},"Script-Regular":{32:[0,0,0,0,.25],65:[0,.7,.22925,0,.80253],66:[0,.7,.04087,0,.90757],67:[0,.7,.1689,0,.66619],68:[0,.7,.09371,0,.77443],69:[0,.7,.18583,0,.56162],70:[0,.7,.13634,0,.89544],71:[0,.7,.17322,0,.60961],72:[0,.7,.29694,0,.96919],73:[0,.7,.19189,0,.80907],74:[.27778,.7,.19189,0,1.05159],75:[0,.7,.31259,0,.91364],76:[0,.7,.19189,0,.87373],77:[0,.7,.15981,0,1.08031],78:[0,.7,.3525,0,.9015],79:[
0,.7,.08078,0,.73787],80:[0,.7,.08078,0,1.01262],81:[0,.7,.03305,0,.88282],82:[0,.7,.06259,0,.85],83:[0,.7,.19189,0,.86767],84:[0,.7,.29087,0,.74697],85:[0,.7,.25815,0,.79996],86:[0,.7,.27523,0,.62204],87:[0,.7,.27523,0,.80532],88:[0,.7,.26006,0,.94445],89:[0,.7,.2939,0,.70961],90:[0,.7,.24037,0,.8212],160:[0,0,0,0,.25]},"Size1-Regular":{32:[0,0,0,0,.25],40:[.35001,.85,0,0,.45834],41:[.35001,.85,0,0,.45834],47:[.35001,.85,0,0,.57778],91:[.35001,.85,0,0,.41667],92:[.35001,.85,0,0,.57778],93:[.35001,
.85,0,0,.41667],123:[.35001,.85,0,0,.58334],125:[.35001,.85,0,0,.58334],160:[0,0,0,0,.25],710:[0,.72222,0,0,.55556],732:[0,.72222,0,0,.55556],770:[0,.72222,0,0,.55556],771:[0,.72222,0,0,.55556],8214:[-99e-5,.601,0,0,.77778],8593:[1e-5,.6,0,0,.66667],8595:[1e-5,.6,0,0,.66667],8657:[1e-5,.6,0,0,.77778],8659:[1e-5,.6,0,0,.77778],8719:[.25001,.75,0,0,.94445],8720:[.25001,.75,0,0,.94445],8721:[.25001,.75,0,0,1.05556],8730:[.35001,.85,0,0,1],8739:[-.00599,.606,0,0,.33333],8741:[-.00599,.606,0,0,.55556],
8747:[.30612,.805,.19445,0,.47222],8748:[.306,.805,.19445,0,.47222],8749:[.306,.805,.19445,0,.47222],8750:[.30612,.805,.19445,0,.47222],8896:[.25001,.75,0,0,.83334],8897:[.25001,.75,0,0,.83334],8898:[.25001,.75,0,0,.83334],8899:[.25001,.75,0,0,.83334],8968:[.35001,.85,0,0,.47222],8969:[.35001,.85,0,0,.47222],8970:[.35001,.85,0,0,.47222],8971:[.35001,.85,0,0,.47222],9168:[-99e-5,.601,0,0,.66667],10216:[.35001,.85,0,0,.47222],10217:[.35001,.85,0,0,.47222],10752:[.25001,.75,0,0,1.11111],10753:[.25001,
.75,0,0,1.11111],10754:[.25001,.75,0,0,1.11111],10756:[.25001,.75,0,0,.83334],10758:[.25001,.75,0,0,.83334]},"Size2-Regular":{32:[0,0,0,0,.25],40:[.65002,1.15,0,0,.59722],41:[.65002,1.15,0,0,.59722],47:[.65002,1.15,0,0,.81111],91:[.65002,1.15,0,0,.47222],92:[.65002,1.15,0,0,.81111],93:[.65002,1.15,0,0,.47222],123:[.65002,1.15,0,0,.66667],125:[.65002,1.15,0,0,.66667],160:[0,0,0,0,.25],710:[0,.75,0,0,1],732:[0,.75,0,0,1],770:[0,.75,0,0,1],771:[0,.75,0,0,1],8719:[.55001,1.05,0,0,1.27778],8720:[.55001,
1.05,0,0,1.27778],8721:[.55001,1.05,0,0,1.44445],8730:[.65002,1.15,0,0,1],8747:[.86225,1.36,.44445,0,.55556],8748:[.862,1.36,.44445,0,.55556],8749:[.862,1.36,.44445,0,.55556],8750:[.86225,1.36,.44445,0,.55556],8896:[.55001,1.05,0,0,1.11111],8897:[.55001,1.05,0,0,1.11111],8898:[.55001,1.05,0,0,1.11111],8899:[.55001,1.05,0,0,1.11111],8968:[.65002,1.15,0,0,.52778],8969:[.65002,1.15,0,0,.52778],8970:[.65002,1.15,0,0,.52778],8971:[.65002,1.15,0,0,.52778],10216:[.65002,1.15,0,0,.61111],10217:[.65002,1.15,
0,0,.61111],10752:[.55001,1.05,0,0,1.51112],10753:[.55001,1.05,0,0,1.51112],10754:[.55001,1.05,0,0,1.51112],10756:[.55001,1.05,0,0,1.11111],10758:[.55001,1.05,0,0,1.11111]},"Size3-Regular":{32:[0,0,0,0,.25],40:[.95003,1.45,0,0,.73611],41:[.95003,1.45,0,0,.73611],47:[.95003,1.45,0,0,1.04445],91:[.95003,1.45,0,0,.52778],92:[.95003,1.45,0,0,1.04445],93:[.95003,1.45,0,0,.52778],123:[.95003,1.45,0,0,.75],125:[.95003,1.45,0,0,.75],160:[0,0,0,0,.25],710:[0,.75,0,0,1.44445],732:[0,.75,0,0,1.44445],770:[
0,.75,0,0,1.44445],771:[0,.75,0,0,1.44445],8730:[.95003,1.45,0,0,1],8968:[.95003,1.45,0,0,.58334],8969:[.95003,1.45,0,0,.58334],8970:[.95003,1.45,0,0,.58334],8971:[.95003,1.45,0,0,.58334],10216:[.95003,1.45,0,0,.75],10217:[.95003,1.45,0,0,.75]},"Size4-Regular":{32:[0,0,0,0,.25],40:[1.25003,1.75,0,0,.79167],41:[1.25003,1.75,0,0,.79167],47:[1.25003,1.75,0,0,1.27778],91:[1.25003,1.75,0,0,.58334],92:[1.25003,1.75,0,0,1.27778],93:[1.25003,1.75,0,0,.58334],123:[1.25003,1.75,0,0,.80556],125:[1.25003,1.75,
0,0,.80556],160:[0,0,0,0,.25],710:[0,.825,0,0,1.8889],732:[0,.825,0,0,1.8889],770:[0,.825,0,0,1.8889],771:[0,.825,0,0,1.8889],8730:[1.25003,1.75,0,0,1],8968:[1.25003,1.75,0,0,.63889],8969:[1.25003,1.75,0,0,.63889],8970:[1.25003,1.75,0,0,.63889],8971:[1.25003,1.75,0,0,.63889],9115:[.64502,1.155,0,0,.875],9116:[1e-5,.6,0,0,.875],9117:[.64502,1.155,0,0,.875],9118:[.64502,1.155,0,0,.875],9119:[1e-5,.6,0,0,.875],9120:[.64502,1.155,0,0,.875],9121:[.64502,1.155,0,0,.66667],9122:[-99e-5,.601,0,0,.66667],
9123:[.64502,1.155,0,0,.66667],9124:[.64502,1.155,0,0,.66667],9125:[-99e-5,.601,0,0,.66667],9126:[.64502,1.155,0,0,.66667],9127:[1e-5,.9,0,0,.88889],9128:[.65002,1.15,0,0,.88889],9129:[.90001,0,0,0,.88889],9130:[0,.3,0,0,.88889],9131:[1e-5,.9,0,0,.88889],9132:[.65002,1.15,0,0,.88889],9133:[.90001,0,0,0,.88889],9143:[.88502,.915,0,0,1.05556],10216:[1.25003,1.75,0,0,.80556],10217:[1.25003,1.75,0,0,.80556],57344:[-.00499,.605,0,0,1.05556],57345:[-.00499,.605,0,0,1.05556],57680:[0,.12,0,0,.45],57681:[
0,.12,0,0,.45],57682:[0,.12,0,0,.45],57683:[0,.12,0,0,.45]},"Typewriter-Regular":{32:[0,0,0,0,.525],33:[0,.61111,0,0,.525],34:[0,.61111,0,0,.525],35:[0,.61111,0,0,.525],36:[.08333,.69444,0,0,.525],37:[.08333,.69444,0,0,.525],38:[0,.61111,0,0,.525],39:[0,.61111,0,0,.525],40:[.08333,.69444,0,0,.525],41:[.08333,.69444,0,0,.525],42:[0,.52083,0,0,.525],43:[-.08056,.53055,0,0,.525],44:[.13889,.125,0,0,.525],45:[-.08056,.53055,0,0,.525],46:[0,.125,0,0,.525],47:[.08333,.69444,0,0,.525],48:[0,.61111,0,0,
.525],49:[0,.61111,0,0,.525],50:[0,.61111,0,0,.525],51:[0,.61111,0,0,.525],52:[0,.61111,0,0,.525],53:[0,.61111,0,0,.525],54:[0,.61111,0,0,.525],55:[0,.61111,0,0,.525],56:[0,.61111,0,0,.525],57:[0,.61111,0,0,.525],58:[0,.43056,0,0,.525],59:[.13889,.43056,0,0,.525],60:[-.05556,.55556,0,0,.525],61:[-.19549,.41562,0,0,.525],62:[-.05556,.55556,0,0,.525],63:[0,.61111,0,0,.525],64:[0,.61111,0,0,.525],65:[0,.61111,0,0,.525],66:[0,.61111,0,0,.525],67:[0,.61111,0,0,.525],68:[0,.61111,0,0,.525],69:[0,.61111,
0,0,.525],70:[0,.61111,0,0,.525],71:[0,.61111,0,0,.525],72:[0,.61111,0,0,.525],73:[0,.61111,0,0,.525],74:[0,.61111,0,0,.525],75:[0,.61111,0,0,.525],76:[0,.61111,0,0,.525],77:[0,.61111,0,0,.525],78:[0,.61111,0,0,.525],79:[0,.61111,0,0,.525],80:[0,.61111,0,0,.525],81:[.13889,.61111,0,0,.525],82:[0,.61111,0,0,.525],83:[0,.61111,0,0,.525],84:[0,.61111,0,0,.525],85:[0,.61111,0,0,.525],86:[0,.61111,0,0,.525],87:[0,.61111,0,0,.525],88:[0,.61111,0,0,.525],89:[0,.61111,0,0,.525],90:[0,.61111,0,0,.525],91:[
.08333,.69444,0,0,.525],92:[.08333,.69444,0,0,.525],93:[.08333,.69444,0,0,.525],94:[0,.61111,0,0,.525],95:[.09514,0,0,0,.525],96:[0,.61111,0,0,.525],97:[0,.43056,0,0,.525],98:[0,.61111,0,0,.525],99:[0,.43056,0,0,.525],100:[0,.61111,0,0,.525],101:[0,.43056,0,0,.525],102:[0,.61111,0,0,.525],103:[.22222,.43056,0,0,.525],104:[0,.61111,0,0,.525],105:[0,.61111,0,0,.525],106:[.22222,.61111,0,0,.525],107:[0,.61111,0,0,.525],108:[0,.61111,0,0,.525],109:[0,.43056,0,0,.525],110:[0,.43056,0,0,.525],111:[0,.43056,
0,0,.525],112:[.22222,.43056,0,0,.525],113:[.22222,.43056,0,0,.525],114:[0,.43056,0,0,.525],115:[0,.43056,0,0,.525],116:[0,.55358,0,0,.525],117:[0,.43056,0,0,.525],118:[0,.43056,0,0,.525],119:[0,.43056,0,0,.525],120:[0,.43056,0,0,.525],121:[.22222,.43056,0,0,.525],122:[0,.43056,0,0,.525],123:[.08333,.69444,0,0,.525],124:[.08333,.69444,0,0,.525],125:[.08333,.69444,0,0,.525],126:[0,.61111,0,0,.525],127:[0,.61111,0,0,.525],160:[0,0,0,0,.525],176:[0,.61111,0,0,.525],184:[.19445,0,0,0,.525],305:[0,.43056,
0,0,.525],567:[.22222,.43056,0,0,.525],711:[0,.56597,0,0,.525],713:[0,.56555,0,0,.525],714:[0,.61111,0,0,.525],715:[0,.61111,0,0,.525],728:[0,.61111,0,0,.525],730:[0,.61111,0,0,.525],770:[0,.61111,0,0,.525],771:[0,.61111,0,0,.525],776:[0,.61111,0,0,.525],915:[0,.61111,0,0,.525],916:[0,.61111,0,0,.525],920:[0,.61111,0,0,.525],923:[0,.61111,0,0,.525],926:[0,.61111,0,0,.525],928:[0,.61111,0,0,.525],931:[0,.61111,0,0,.525],933:[0,.61111,0,0,.525],934:[0,.61111,0,0,.525],936:[0,.61111,0,0,.525],937:[
0,.61111,0,0,.525],8216:[0,.61111,0,0,.525],8217:[0,.61111,0,0,.525],8242:[0,.61111,0,0,.525],9251:[.11111,.21944,0,0,.525]}},sigmasAndXis={slant:[.25,.25,.25],space:[0,0,0],stretch:[0,0,0],shrink:[0,0,0],xHeight:[.431,.431,.431],quad:[1,1.171,1.472],extraSpace:[0,0,0],num1:[.677,.732,.925],num2:[.394,.384,.387],num3:[.444,.471,.504],denom1:[.686,.752,1.025],denom2:[.345,.344,.532],sup1:[.413,.503,.504],sup2:[.363,.431,.404],sup3:[.289,.286,.294],sub1:[.15,.143,.2],sub2:[.247,.286,.4],supDrop:[.386,
.353,.494],subDrop:[.05,.071,.1],delim1:[2.39,1.7,1.98],delim2:[1.01,1.157,1.42],axisHeight:[.25,.25,.25],defaultRuleThickness:[.04,.049,.049],bigOpSpacing1:[.111,.111,.111],bigOpSpacing2:[.166,.166,.166],bigOpSpacing3:[.2,.2,.2],bigOpSpacing4:[.6,.611,.611],bigOpSpacing5:[.1,.143,.143],sqrtRuleThickness:[.04,.04,.04],ptPerEm:[10,10,10],doubleRuleSep:[.2,.2,.2],arrayRuleWidth:[.04,.04,.04],fboxsep:[.3,.3,.3],fboxrule:[.04,.04,.04]},extraCharacterMap={Å:"A",Ð:"D",Þ:"o",å:"a",ð:"d",þ:"o",А:"\
A",Б:"B",В:"B",Г:"F",Д:"A",Е:"E",Ж:"K",З:"3",И:"N",Й:"N",К:"K",Л:"N",М:"M",Н:"H",О:"O",П:"N",Р:"P",С:"C",Т:"T",У:"y",Ф:"O",Х:"X",Ц:"U",Ч:"h",Ш:"W",Щ:"W",Ъ:"B",Ы:"X",Ь:"B",Э:"3",Ю:"X",Я:"R",а:"a",б:"b",в:"a",г:"r",д:"y",е:"e",ж:"m",з:"e",и:"n",й:"n",к:"n",л:"n",м:"m",н:"n",о:"o",п:"n",р:"p",с:"c",т:"o",у:"y",ф:"b",х:"x",ц:"n",ч:"n",ш:"w",щ:"w",ъ:"a",ы:"m",ь:"a",э:"e",ю:"m",я:"r"};function setFontMetrics(fontName,metrics){fontMetricsData[fontName]=
metrics}function getCharacterMetrics(character,font,mode){if(!fontMetricsData[font])throw new Error("Font metrics not found for font: "+font+".");var ch=character.charCodeAt(0),metrics=fontMetricsData[font][ch];if(!metrics&&character[0]in extraCharacterMap&&(ch=extraCharacterMap[character[0]].charCodeAt(0),metrics=fontMetricsData[font][ch]),!metrics&&mode==="text"&&supportedCodepoint(ch)&&(metrics=fontMetricsData[font][77]),metrics)return{depth:metrics[0],height:metrics[1],italic:metrics[2],skew:metrics[3],
width:metrics[4]}}var fontMetricsBySizeIndex={};function getGlobalMetrics(size2){var sizeIndex;if(size2>=5?sizeIndex=0:size2>=3?sizeIndex=1:sizeIndex=2,!fontMetricsBySizeIndex[sizeIndex]){var metrics=fontMetricsBySizeIndex[sizeIndex]={cssEmPerMu:sigmasAndXis.quad[sizeIndex]/18};for(var key2 in sigmasAndXis)sigmasAndXis.hasOwnProperty(key2)&&(metrics[key2]=sigmasAndXis[key2][sizeIndex])}return fontMetricsBySizeIndex[sizeIndex]}var sizeStyleMap=[[1,1,1],[2,1,1],[3,1,1],[4,2,1],[5,2,1],[6,3,1],[7,4,
2],[8,6,3],[9,7,6],[10,8,7],[11,10,9]],sizeMultipliers=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],sizeAtStyle=function(size2,style2){return style2.size<2?size2:sizeStyleMap[size2-1][style2.size-1]};class Options{constructor(data){this.style=void 0,this.color=void 0,this.size=void 0,this.textSize=void 0,this.phantom=void 0,this.font=void 0,this.fontFamily=void 0,this.fontWeight=void 0,this.fontShape=void 0,this.sizeMultiplier=void 0,this.maxSize=void 0,this.minRuleThickness=void 0,this._fontMetrics=
void 0,this.style=data.style,this.color=data.color,this.size=data.size||Options.BASESIZE,this.textSize=data.textSize||this.size,this.phantom=!!data.phantom,this.font=data.font||"",this.fontFamily=data.fontFamily||"",this.fontWeight=data.fontWeight||"",this.fontShape=data.fontShape||"",this.sizeMultiplier=sizeMultipliers[this.size-1],this.maxSize=data.maxSize,this.minRuleThickness=data.minRuleThickness,this._fontMetrics=void 0}extend(extension2){var data={style:this.style,size:this.size,textSize:this.
textSize,color:this.color,phantom:this.phantom,font:this.font,fontFamily:this.fontFamily,fontWeight:this.fontWeight,fontShape:this.fontShape,maxSize:this.maxSize,minRuleThickness:this.minRuleThickness};for(var key2 in extension2)extension2.hasOwnProperty(key2)&&(data[key2]=extension2[key2]);return new Options(data)}havingStyle(style2){return this.style===style2?this:this.extend({style:style2,size:sizeAtStyle(this.textSize,style2)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(size2){
return this.size===size2&&this.textSize===size2?this:this.extend({style:this.style.text(),size:size2,textSize:size2,sizeMultiplier:sizeMultipliers[size2-1]})}havingBaseStyle(style2){style2=style2||this.style.text();var wantSize=sizeAtStyle(Options.BASESIZE,style2);return this.size===wantSize&&this.textSize===Options.BASESIZE&&this.style===style2?this:this.extend({style:style2,size:wantSize})}havingBaseSizing(){var size2;switch(this.style.id){case 4:case 5:size2=3;break;case 6:case 7:size2=1;break;default:
size2=6}return this.extend({style:this.style.text(),size:size2})}withColor(color){return this.extend({color})}withPhantom(){return this.extend({phantom:!0})}withFont(font){return this.extend({font})}withTextFontFamily(fontFamily){return this.extend({fontFamily,font:""})}withTextFontWeight(fontWeight){return this.extend({fontWeight,font:""})}withTextFontShape(fontShape){return this.extend({fontShape,font:""})}sizingClasses(oldOptions){return oldOptions.size!==this.size?["sizing","reset-size"+oldOptions.
size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==Options.BASESIZE?["sizing","reset-size"+this.size,"size"+Options.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=getGlobalMetrics(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}Options.BASESIZE=6;var ptPerUnit={pt:1,mm:7227/2540,cm:7227/254,in:72.27,bp:803/800,pc:12,dd:1238/1157,cc:14856/1157,nd:685/642,nc:1370/107,sp:1/65536,px:803/800},relativeUnit={ex:!0,em:!0,mu:!0},
validUnit=function(unit){return typeof unit!="string"&&(unit=unit.unit),unit in ptPerUnit||unit in relativeUnit||unit==="ex"},calculateSize=function(sizeValue,options){var scale2;if(sizeValue.unit in ptPerUnit)scale2=ptPerUnit[sizeValue.unit]/options.fontMetrics().ptPerEm/options.sizeMultiplier;else if(sizeValue.unit==="mu")scale2=options.fontMetrics().cssEmPerMu;else{var unitOptions;if(options.style.isTight()?unitOptions=options.havingStyle(options.style.text()):unitOptions=options,sizeValue.unit===
"ex")scale2=unitOptions.fontMetrics().xHeight;else if(sizeValue.unit==="em")scale2=unitOptions.fontMetrics().quad;else throw new ParseError2("Invalid unit: '"+sizeValue.unit+"'");unitOptions!==options&&(scale2*=unitOptions.sizeMultiplier/options.sizeMultiplier)}return Math.min(sizeValue.number*scale2,options.maxSize)},makeEm=function(n){return+n.toFixed(4)+"em"},createClass=function(classes){return classes.filter(cls=>cls).join(" ")},initNode=function(classes,options,style2){if(this.classes=classes||
[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=style2||{},options){options.style.isTight()&&this.classes.push("mtight");var color=options.getColor();color&&(this.style.color=color)}},toNode=function(tagName){var node2=document.createElement(tagName);node2.className=createClass(this.classes);for(var style2 in this.style)this.style.hasOwnProperty(style2)&&(node2.style[style2]=this.style[style2]);for(var attr in this.attributes)this.attributes.hasOwnProperty(attr)&&node2.
setAttribute(attr,this.attributes[attr]);for(var i=0;i<this.children.length;i++)node2.appendChild(this.children[i].toNode());return node2},invalidAttributeNameRegex=/[\s"'>/=\x00-\x1f]/,toMarkup=function(tagName){var markup="<"+tagName;this.classes.length&&(markup+=' class="'+utils.escape(createClass(this.classes))+'"');var styles2="";for(var style2 in this.style)this.style.hasOwnProperty(style2)&&(styles2+=utils.hyphenate(style2)+":"+this.style[style2]+";");styles2&&(markup+=' style="'+utils.escape(
styles2)+'"');for(var attr in this.attributes)if(this.attributes.hasOwnProperty(attr)){if(invalidAttributeNameRegex.test(attr))throw new ParseError2("Invalid attribute name '"+attr+"'");markup+=" "+attr+'="'+utils.escape(this.attributes[attr])+'"'}markup+=">";for(var i=0;i<this.children.length;i++)markup+=this.children[i].toMarkup();return markup+="</"+tagName+">",markup};class Span{constructor(classes,children,options,style2){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.
height=void 0,this.depth=void 0,this.width=void 0,this.maxFontSize=void 0,this.style=void 0,initNode.call(this,classes,options,style2),this.children=children||[]}setAttribute(attribute,value){this.attributes[attribute]=value}hasClass(className){return utils.contains(this.classes,className)}toNode(){return toNode.call(this,"span")}toMarkup(){return toMarkup.call(this,"span")}}class Anchor{constructor(href,classes,children,options){this.children=void 0,this.attributes=void 0,this.classes=void 0,this.
height=void 0,this.depth=void 0,this.maxFontSize=void 0,this.style=void 0,initNode.call(this,classes,options),this.children=children||[],this.setAttribute("href",href)}setAttribute(attribute,value){this.attributes[attribute]=value}hasClass(className){return utils.contains(this.classes,className)}toNode(){return toNode.call(this,"a")}toMarkup(){return toMarkup.call(this,"a")}}class Img{constructor(src,alt,style2){this.src=void 0,this.alt=void 0,this.classes=void 0,this.height=void 0,this.depth=void 0,
this.maxFontSize=void 0,this.style=void 0,this.alt=alt,this.src=src,this.classes=["mord"],this.style=style2}hasClass(className){return utils.contains(this.classes,className)}toNode(){var node2=document.createElement("img");node2.src=this.src,node2.alt=this.alt,node2.className="mord";for(var style2 in this.style)this.style.hasOwnProperty(style2)&&(node2.style[style2]=this.style[style2]);return node2}toMarkup(){var markup='<img src="'+utils.escape(this.src)+'"'+(' alt="'+utils.escape(this.alt)+'"'),
styles2="";for(var style2 in this.style)this.style.hasOwnProperty(style2)&&(styles2+=utils.hyphenate(style2)+":"+this.style[style2]+";");return styles2&&(markup+=' style="'+utils.escape(styles2)+'"'),markup+="'/>",markup}}var iCombinations={î:"ı̂",ï:"ı̈",í:"ı́",ì:"ı̀"};class SymbolNode{constructor(text2,height,depth,italic,skew,width,classes,style2){this.text=void 0,this.height=void 0,this.depth=void 0,this.italic=void 0,this.skew=void 0,this.width=void 0,this.maxFontSize=void 0,this.
classes=void 0,this.style=void 0,this.text=text2,this.height=height||0,this.depth=depth||0,this.italic=italic||0,this.skew=skew||0,this.width=width||0,this.classes=classes||[],this.style=style2||{},this.maxFontSize=0;var script=scriptFromCodepoint(this.text.charCodeAt(0));script&&this.classes.push(script+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=iCombinations[this.text])}hasClass(className){return utils.contains(this.classes,className)}toNode(){var node2=document.createTextNode(this.
text),span=null;this.italic>0&&(span=document.createElement("span"),span.style.marginRight=makeEm(this.italic)),this.classes.length>0&&(span=span||document.createElement("span"),span.className=createClass(this.classes));for(var style2 in this.style)this.style.hasOwnProperty(style2)&&(span=span||document.createElement("span"),span.style[style2]=this.style[style2]);return span?(span.appendChild(node2),span):node2}toMarkup(){var needsSpan=!1,markup="<span";this.classes.length&&(needsSpan=!0,markup+=
' class="',markup+=utils.escape(createClass(this.classes)),markup+='"');var styles2="";this.italic>0&&(styles2+="margin-right:"+this.italic+"em;");for(var style2 in this.style)this.style.hasOwnProperty(style2)&&(styles2+=utils.hyphenate(style2)+":"+this.style[style2]+";");styles2&&(needsSpan=!0,markup+=' style="'+utils.escape(styles2)+'"');var escaped=utils.escape(this.text);return needsSpan?(markup+=">",markup+=escaped,markup+="</span>",markup):escaped}}class SvgNode{constructor(children,attributes){
this.children=void 0,this.attributes=void 0,this.children=children||[],this.attributes=attributes||{}}toNode(){var svgNS="http://www.w3.org/2000/svg",node2=document.createElementNS(svgNS,"svg");for(var attr in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,attr)&&node2.setAttribute(attr,this.attributes[attr]);for(var i=0;i<this.children.length;i++)node2.appendChild(this.children[i].toNode());return node2}toMarkup(){var markup='<svg xmlns="http://www.w3.org/2000/svg"';for(var attr in this.
attributes)Object.prototype.hasOwnProperty.call(this.attributes,attr)&&(markup+=" "+attr+'="'+utils.escape(this.attributes[attr])+'"');markup+=">";for(var i=0;i<this.children.length;i++)markup+=this.children[i].toMarkup();return markup+="</svg>",markup}}class PathNode{constructor(pathName,alternate){this.pathName=void 0,this.alternate=void 0,this.pathName=pathName,this.alternate=alternate}toNode(){var svgNS="http://www.w3.org/2000/svg",node2=document.createElementNS(svgNS,"path");return this.alternate?
node2.setAttribute("d",this.alternate):node2.setAttribute("d",path[this.pathName]),node2}toMarkup(){return this.alternate?'<path d="'+utils.escape(this.alternate)+'"/>':'<path d="'+utils.escape(path[this.pathName])+'"/>'}}class LineNode{constructor(attributes){this.attributes=void 0,this.attributes=attributes||{}}toNode(){var svgNS="http://www.w3.org/2000/svg",node2=document.createElementNS(svgNS,"line");for(var attr in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,attr)&&
node2.setAttribute(attr,this.attributes[attr]);return node2}toMarkup(){var markup="<line";for(var attr in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,attr)&&(markup+=" "+attr+'="'+utils.escape(this.attributes[attr])+'"');return markup+="/>",markup}}function assertSymbolDomNode(group){if(group instanceof SymbolNode)return group;throw new Error("Expected symbolNode but got "+String(group)+".")}function assertSpan(group){if(group instanceof Span)return group;throw new Error(
"Expected span<HtmlDomNode> but got "+String(group)+".")}var ATOMS={bin:1,close:1,inner:1,open:1,punct:1,rel:1},NON_ATOMS={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},symbols={math:{},text:{}};function defineSymbol(mode,font,group,replace2,name,acceptUnicodeChar){symbols[mode][name]={font,group,replace:replace2},acceptUnicodeChar&&replace2&&(symbols[mode][replace2]=symbols[mode][name])}var math="math",text$3="text",main="main",ams="ams",accent="accent-token",bin="bin",close="clo\
se",inner="inner",mathord="mathord",op="op-token",open="open",punct="punct",rel="rel",spacing="spacing",textord="textord";defineSymbol(math,main,rel,"≡","\\equiv",!0);defineSymbol(math,main,rel,"≺","\\prec",!0);defineSymbol(math,main,rel,"≻","\\succ",!0);defineSymbol(math,main,rel,"∼","\\sim",!0);defineSymbol(math,main,rel,"⊥","\\perp");defineSymbol(math,main,rel,"⪯","\\preceq",!0);defineSymbol(math,main,rel,"⪰","\\succeq",!0);defineSymbol(math,main,rel,"≃","\\simeq",!0);defineSymbol(
math,main,rel,"∣","\\mid",!0);defineSymbol(math,main,rel,"≪","\\ll",!0);defineSymbol(math,main,rel,"≫","\\gg",!0);defineSymbol(math,main,rel,"≍","\\asymp",!0);defineSymbol(math,main,rel,"∥","\\parallel");defineSymbol(math,main,rel,"⋈","\\bowtie",!0);defineSymbol(math,main,rel,"⌣","\\smile",!0);defineSymbol(math,main,rel,"⊑","\\sqsubseteq",!0);defineSymbol(math,main,rel,"⊒","\\sqsupseteq",!0);defineSymbol(math,main,rel,"≐","\\doteq",!0);defineSymbol(math,main,rel,"⌢","\\frown",
!0);defineSymbol(math,main,rel,"∋","\\ni",!0);defineSymbol(math,main,rel,"∝","\\propto",!0);defineSymbol(math,main,rel,"⊢","\\vdash",!0);defineSymbol(math,main,rel,"⊣","\\dashv",!0);defineSymbol(math,main,rel,"∋","\\owns");defineSymbol(math,main,punct,".","\\ldotp");defineSymbol(math,main,punct,"⋅","\\cdotp");defineSymbol(math,main,textord,"#","\\#");defineSymbol(text$3,main,textord,"#","\\#");defineSymbol(math,main,textord,"&","\\&");defineSymbol(text$3,main,textord,"&","\\&");defineSymbol(
math,main,textord,"ℵ","\\aleph",!0);defineSymbol(math,main,textord,"∀","\\forall",!0);defineSymbol(math,main,textord,"ℏ","\\hbar",!0);defineSymbol(math,main,textord,"∃","\\exists",!0);defineSymbol(math,main,textord,"∇","\\nabla",!0);defineSymbol(math,main,textord,"♭","\\flat",!0);defineSymbol(math,main,textord,"ℓ","\\ell",!0);defineSymbol(math,main,textord,"♮","\\natural",!0);defineSymbol(math,main,textord,"♣","\\clubsuit",!0);defineSymbol(math,main,textord,"℘","\\wp",!0);defineSymbol(
math,main,textord,"♯","\\sharp",!0);defineSymbol(math,main,textord,"♢","\\diamondsuit",!0);defineSymbol(math,main,textord,"ℜ","\\Re",!0);defineSymbol(math,main,textord,"♡","\\heartsuit",!0);defineSymbol(math,main,textord,"ℑ","\\Im",!0);defineSymbol(math,main,textord,"♠","\\spadesuit",!0);defineSymbol(math,main,textord,"§","\\S",!0);defineSymbol(text$3,main,textord,"§","\\S");defineSymbol(math,main,textord,"¶","\\P",!0);defineSymbol(text$3,main,textord,"¶","\\P");defineSymbol(math,
main,textord,"†","\\dag");defineSymbol(text$3,main,textord,"†","\\dag");defineSymbol(text$3,main,textord,"†","\\textdagger");defineSymbol(math,main,textord,"‡","\\ddag");defineSymbol(text$3,main,textord,"‡","\\ddag");defineSymbol(text$3,main,textord,"‡","\\textdaggerdbl");defineSymbol(math,main,close,"⎱","\\rmoustache",!0);defineSymbol(math,main,open,"⎰","\\lmoustache",!0);defineSymbol(math,main,close,"⟯","\\rgroup",!0);defineSymbol(math,main,open,"⟮","\\lgroup",!0);defineSymbol(
math,main,bin,"∓","\\mp",!0);defineSymbol(math,main,bin,"⊖","\\ominus",!0);defineSymbol(math,main,bin,"⊎","\\uplus",!0);defineSymbol(math,main,bin,"⊓","\\sqcap",!0);defineSymbol(math,main,bin,"∗","\\ast");defineSymbol(math,main,bin,"⊔","\\sqcup",!0);defineSymbol(math,main,bin,"◯","\\bigcirc",!0);defineSymbol(math,main,bin,"∙","\\bullet",!0);defineSymbol(math,main,bin,"‡","\\ddagger");defineSymbol(math,main,bin,"≀","\\wr",!0);defineSymbol(math,main,bin,"⨿","\\amalg");defineSymbol(
math,main,bin,"&","\\And");defineSymbol(math,main,rel,"⟵","\\longleftarrow",!0);defineSymbol(math,main,rel,"⇐","\\Leftarrow",!0);defineSymbol(math,main,rel,"⟸","\\Longleftarrow",!0);defineSymbol(math,main,rel,"⟶","\\longrightarrow",!0);defineSymbol(math,main,rel,"⇒","\\Rightarrow",!0);defineSymbol(math,main,rel,"⟹","\\Longrightarrow",!0);defineSymbol(math,main,rel,"↔","\\leftrightarrow",!0);defineSymbol(math,main,rel,"⟷","\\longleftrightarrow",!0);defineSymbol(math,main,rel,"⇔",
"\\Leftrightarrow",!0);defineSymbol(math,main,rel,"⟺","\\Longleftrightarrow",!0);defineSymbol(math,main,rel,"↦","\\mapsto",!0);defineSymbol(math,main,rel,"⟼","\\longmapsto",!0);defineSymbol(math,main,rel,"↗","\\nearrow",!0);defineSymbol(math,main,rel,"↩","\\hookleftarrow",!0);defineSymbol(math,main,rel,"↪","\\hookrightarrow",!0);defineSymbol(math,main,rel,"↘","\\searrow",!0);defineSymbol(math,main,rel,"↼","\\leftharpoonup",!0);defineSymbol(math,main,rel,"⇀","\\rightharpoonup",!0);
defineSymbol(math,main,rel,"↙","\\swarrow",!0);defineSymbol(math,main,rel,"↽","\\leftharpoondown",!0);defineSymbol(math,main,rel,"⇁","\\rightharpoondown",!0);defineSymbol(math,main,rel,"↖","\\nwarrow",!0);defineSymbol(math,main,rel,"⇌","\\rightleftharpoons",!0);defineSymbol(math,ams,rel,"≮","\\nless",!0);defineSymbol(math,ams,rel,"","\\@nleqslant");defineSymbol(math,ams,rel,"","\\@nleqq");defineSymbol(math,ams,rel,"⪇","\\lneq",!0);defineSymbol(math,ams,rel,"≨","\\lneqq",!0);
defineSymbol(math,ams,rel,"","\\@lvertneqq");defineSymbol(math,ams,rel,"⋦","\\lnsim",!0);defineSymbol(math,ams,rel,"⪉","\\lnapprox",!0);defineSymbol(math,ams,rel,"⊀","\\nprec",!0);defineSymbol(math,ams,rel,"⋠","\\npreceq",!0);defineSymbol(math,ams,rel,"⋨","\\precnsim",!0);defineSymbol(math,ams,rel,"⪹","\\precnapprox",!0);defineSymbol(math,ams,rel,"≁","\\nsim",!0);defineSymbol(math,ams,rel,"","\\@nshortmid");defineSymbol(math,ams,rel,"∤","\\nmid",!0);defineSymbol(math,ams,rel,
"⊬","\\nvdash",!0);defineSymbol(math,ams,rel,"⊭","\\nvDash",!0);defineSymbol(math,ams,rel,"⋪","\\ntriangleleft");defineSymbol(math,ams,rel,"⋬","\\ntrianglelefteq",!0);defineSymbol(math,ams,rel,"⊊","\\subsetneq",!0);defineSymbol(math,ams,rel,"","\\@varsubsetneq");defineSymbol(math,ams,rel,"⫋","\\subsetneqq",!0);defineSymbol(math,ams,rel,"","\\@varsubsetneqq");defineSymbol(math,ams,rel,"≯","\\ngtr",!0);defineSymbol(math,ams,rel,"","\\@ngeqslant");defineSymbol(math,ams,rel,"",
"\\@ngeqq");defineSymbol(math,ams,rel,"⪈","\\gneq",!0);defineSymbol(math,ams,rel,"≩","\\gneqq",!0);defineSymbol(math,ams,rel,"","\\@gvertneqq");defineSymbol(math,ams,rel,"⋧","\\gnsim",!0);defineSymbol(math,ams,rel,"⪊","\\gnapprox",!0);defineSymbol(math,ams,rel,"⊁","\\nsucc",!0);defineSymbol(math,ams,rel,"⋡","\\nsucceq",!0);defineSymbol(math,ams,rel,"⋩","\\succnsim",!0);defineSymbol(math,ams,rel,"⪺","\\succnapprox",!0);defineSymbol(math,ams,rel,"≆","\\ncong",!0);defineSymbol(
math,ams,rel,"","\\@nshortparallel");defineSymbol(math,ams,rel,"∦","\\nparallel",!0);defineSymbol(math,ams,rel,"⊯","\\nVDash",!0);defineSymbol(math,ams,rel,"⋫","\\ntriangleright");defineSymbol(math,ams,rel,"⋭","\\ntrianglerighteq",!0);defineSymbol(math,ams,rel,"","\\@nsupseteqq");defineSymbol(math,ams,rel,"⊋","\\supsetneq",!0);defineSymbol(math,ams,rel,"","\\@varsupsetneq");defineSymbol(math,ams,rel,"⫌","\\supsetneqq",!0);defineSymbol(math,ams,rel,"","\\@varsupsetneqq");defineSymbol(
math,ams,rel,"⊮","\\nVdash",!0);defineSymbol(math,ams,rel,"⪵","\\precneqq",!0);defineSymbol(math,ams,rel,"⪶","\\succneqq",!0);defineSymbol(math,ams,rel,"","\\@nsubseteqq");defineSymbol(math,ams,bin,"⊴","\\unlhd");defineSymbol(math,ams,bin,"⊵","\\unrhd");defineSymbol(math,ams,rel,"↚","\\nleftarrow",!0);defineSymbol(math,ams,rel,"↛","\\nrightarrow",!0);defineSymbol(math,ams,rel,"⇍","\\nLeftarrow",!0);defineSymbol(math,ams,rel,"⇏","\\nRightarrow",!0);defineSymbol(math,ams,rel,"\
↮","\\nleftrightarrow",!0);defineSymbol(math,ams,rel,"⇎","\\nLeftrightarrow",!0);defineSymbol(math,ams,rel,"△","\\vartriangle");defineSymbol(math,ams,textord,"ℏ","\\hslash");defineSymbol(math,ams,textord,"▽","\\triangledown");defineSymbol(math,ams,textord,"◊","\\lozenge");defineSymbol(math,ams,textord,"Ⓢ","\\circledS");defineSymbol(math,ams,textord,"®","\\circledR");defineSymbol(text$3,ams,textord,"®","\\circledR");defineSymbol(math,ams,textord,"∡","\\measuredangle",!0);defineSymbol(
math,ams,textord,"∄","\\nexists");defineSymbol(math,ams,textord,"℧","\\mho");defineSymbol(math,ams,textord,"Ⅎ","\\Finv",!0);defineSymbol(math,ams,textord,"⅁","\\Game",!0);defineSymbol(math,ams,textord,"‵","\\backprime");defineSymbol(math,ams,textord,"▲","\\blacktriangle");defineSymbol(math,ams,textord,"▼","\\blacktriangledown");defineSymbol(math,ams,textord,"■","\\blacksquare");defineSymbol(math,ams,textord,"⧫","\\blacklozenge");defineSymbol(math,ams,textord,"★","\\bigstar");
defineSymbol(math,ams,textord,"∢","\\sphericalangle",!0);defineSymbol(math,ams,textord,"∁","\\complement",!0);defineSymbol(math,ams,textord,"ð","\\eth",!0);defineSymbol(text$3,main,textord,"ð","ð");defineSymbol(math,ams,textord,"╱","\\diagup");defineSymbol(math,ams,textord,"╲","\\diagdown");defineSymbol(math,ams,textord,"□","\\square");defineSymbol(math,ams,textord,"□","\\Box");defineSymbol(math,ams,textord,"◊","\\Diamond");defineSymbol(math,ams,textord,"¥","\\yen",!0);defineSymbol(
text$3,ams,textord,"¥","\\yen",!0);defineSymbol(math,ams,textord,"✓","\\checkmark",!0);defineSymbol(text$3,ams,textord,"✓","\\checkmark");defineSymbol(math,ams,textord,"ℶ","\\beth",!0);defineSymbol(math,ams,textord,"ℸ","\\daleth",!0);defineSymbol(math,ams,textord,"ℷ","\\gimel",!0);defineSymbol(math,ams,textord,"ϝ","\\digamma",!0);defineSymbol(math,ams,textord,"ϰ","\\varkappa");defineSymbol(math,ams,open,"┌","\\@ulcorner",!0);defineSymbol(math,ams,close,"┐","\\@urcorner",!0);defineSymbol(
math,ams,open,"└","\\@llcorner",!0);defineSymbol(math,ams,close,"┘","\\@lrcorner",!0);defineSymbol(math,ams,rel,"≦","\\leqq",!0);defineSymbol(math,ams,rel,"⩽","\\leqslant",!0);defineSymbol(math,ams,rel,"⪕","\\eqslantless",!0);defineSymbol(math,ams,rel,"≲","\\lesssim",!0);defineSymbol(math,ams,rel,"⪅","\\lessapprox",!0);defineSymbol(math,ams,rel,"≊","\\approxeq",!0);defineSymbol(math,ams,bin,"⋖","\\lessdot");defineSymbol(math,ams,rel,"⋘","\\lll",!0);defineSymbol(math,ams,rel,"\
≶","\\lessgtr",!0);defineSymbol(math,ams,rel,"⋚","\\lesseqgtr",!0);defineSymbol(math,ams,rel,"⪋","\\lesseqqgtr",!0);defineSymbol(math,ams,rel,"≑","\\doteqdot");defineSymbol(math,ams,rel,"≓","\\risingdotseq",!0);defineSymbol(math,ams,rel,"≒","\\fallingdotseq",!0);defineSymbol(math,ams,rel,"∽","\\backsim",!0);defineSymbol(math,ams,rel,"⋍","\\backsimeq",!0);defineSymbol(math,ams,rel,"⫅","\\subseteqq",!0);defineSymbol(math,ams,rel,"⋐","\\Subset",!0);defineSymbol(math,ams,rel,"⊏",
"\\sqsubset",!0);defineSymbol(math,ams,rel,"≼","\\preccurlyeq",!0);defineSymbol(math,ams,rel,"⋞","\\curlyeqprec",!0);defineSymbol(math,ams,rel,"≾","\\precsim",!0);defineSymbol(math,ams,rel,"⪷","\\precapprox",!0);defineSymbol(math,ams,rel,"⊲","\\vartriangleleft");defineSymbol(math,ams,rel,"⊴","\\trianglelefteq");defineSymbol(math,ams,rel,"⊨","\\vDash",!0);defineSymbol(math,ams,rel,"⊪","\\Vvdash",!0);defineSymbol(math,ams,rel,"⌣","\\smallsmile");defineSymbol(math,ams,rel,"⌢","\\\
smallfrown");defineSymbol(math,ams,rel,"≏","\\bumpeq",!0);defineSymbol(math,ams,rel,"≎","\\Bumpeq",!0);defineSymbol(math,ams,rel,"≧","\\geqq",!0);defineSymbol(math,ams,rel,"⩾","\\geqslant",!0);defineSymbol(math,ams,rel,"⪖","\\eqslantgtr",!0);defineSymbol(math,ams,rel,"≳","\\gtrsim",!0);defineSymbol(math,ams,rel,"⪆","\\gtrapprox",!0);defineSymbol(math,ams,bin,"⋗","\\gtrdot");defineSymbol(math,ams,rel,"⋙","\\ggg",!0);defineSymbol(math,ams,rel,"≷","\\gtrless",!0);defineSymbol(math,
ams,rel,"⋛","\\gtreqless",!0);defineSymbol(math,ams,rel,"⪌","\\gtreqqless",!0);defineSymbol(math,ams,rel,"≖","\\eqcirc",!0);defineSymbol(math,ams,rel,"≗","\\circeq",!0);defineSymbol(math,ams,rel,"≜","\\triangleq",!0);defineSymbol(math,ams,rel,"∼","\\thicksim");defineSymbol(math,ams,rel,"≈","\\thickapprox");defineSymbol(math,ams,rel,"⫆","\\supseteqq",!0);defineSymbol(math,ams,rel,"⋑","\\Supset",!0);defineSymbol(math,ams,rel,"⊐","\\sqsupset",!0);defineSymbol(math,ams,rel,"≽",
"\\succcurlyeq",!0);defineSymbol(math,ams,rel,"⋟","\\curlyeqsucc",!0);defineSymbol(math,ams,rel,"≿","\\succsim",!0);defineSymbol(math,ams,rel,"⪸","\\succapprox",!0);defineSymbol(math,ams,rel,"⊳","\\vartriangleright");defineSymbol(math,ams,rel,"⊵","\\trianglerighteq");defineSymbol(math,ams,rel,"⊩","\\Vdash",!0);defineSymbol(math,ams,rel,"∣","\\shortmid");defineSymbol(math,ams,rel,"∥","\\shortparallel");defineSymbol(math,ams,rel,"≬","\\between",!0);defineSymbol(math,ams,rel,"⋔",
"\\pitchfork",!0);defineSymbol(math,ams,rel,"∝","\\varpropto");defineSymbol(math,ams,rel,"◀","\\blacktriangleleft");defineSymbol(math,ams,rel,"∴","\\therefore",!0);defineSymbol(math,ams,rel,"∍","\\backepsilon");defineSymbol(math,ams,rel,"▶","\\blacktriangleright");defineSymbol(math,ams,rel,"∵","\\because",!0);defineSymbol(math,ams,rel,"⋘","\\llless");defineSymbol(math,ams,rel,"⋙","\\gggtr");defineSymbol(math,ams,bin,"⊲","\\lhd");defineSymbol(math,ams,bin,"⊳","\\rhd");defineSymbol(
math,ams,rel,"≂","\\eqsim",!0);defineSymbol(math,main,rel,"⋈","\\Join");defineSymbol(math,ams,rel,"≑","\\Doteq",!0);defineSymbol(math,ams,bin,"∔","\\dotplus",!0);defineSymbol(math,ams,bin,"∖","\\smallsetminus");defineSymbol(math,ams,bin,"⋒","\\Cap",!0);defineSymbol(math,ams,bin,"⋓","\\Cup",!0);defineSymbol(math,ams,bin,"⩞","\\doublebarwedge",!0);defineSymbol(math,ams,bin,"⊟","\\boxminus",!0);defineSymbol(math,ams,bin,"⊞","\\boxplus",!0);defineSymbol(math,ams,bin,"⋇","\\divid\
eontimes",!0);defineSymbol(math,ams,bin,"⋉","\\ltimes",!0);defineSymbol(math,ams,bin,"⋊","\\rtimes",!0);defineSymbol(math,ams,bin,"⋋","\\leftthreetimes",!0);defineSymbol(math,ams,bin,"⋌","\\rightthreetimes",!0);defineSymbol(math,ams,bin,"⋏","\\curlywedge",!0);defineSymbol(math,ams,bin,"⋎","\\curlyvee",!0);defineSymbol(math,ams,bin,"⊝","\\circleddash",!0);defineSymbol(math,ams,bin,"⊛","\\circledast",!0);defineSymbol(math,ams,bin,"⋅","\\centerdot");defineSymbol(math,ams,bin,"⊺",
"\\intercal",!0);defineSymbol(math,ams,bin,"⋒","\\doublecap");defineSymbol(math,ams,bin,"⋓","\\doublecup");defineSymbol(math,ams,bin,"⊠","\\boxtimes",!0);defineSymbol(math,ams,rel,"⇢","\\dashrightarrow",!0);defineSymbol(math,ams,rel,"⇠","\\dashleftarrow",!0);defineSymbol(math,ams,rel,"⇇","\\leftleftarrows",!0);defineSymbol(math,ams,rel,"⇆","\\leftrightarrows",!0);defineSymbol(math,ams,rel,"⇚","\\Lleftarrow",!0);defineSymbol(math,ams,rel,"↞","\\twoheadleftarrow",!0);defineSymbol(
math,ams,rel,"↢","\\leftarrowtail",!0);defineSymbol(math,ams,rel,"↫","\\looparrowleft",!0);defineSymbol(math,ams,rel,"⇋","\\leftrightharpoons",!0);defineSymbol(math,ams,rel,"↶","\\curvearrowleft",!0);defineSymbol(math,ams,rel,"↺","\\circlearrowleft",!0);defineSymbol(math,ams,rel,"↰","\\Lsh",!0);defineSymbol(math,ams,rel,"⇈","\\upuparrows",!0);defineSymbol(math,ams,rel,"↿","\\upharpoonleft",!0);defineSymbol(math,ams,rel,"⇃","\\downharpoonleft",!0);defineSymbol(math,main,rel,"⊶",
"\\origof",!0);defineSymbol(math,main,rel,"⊷","\\imageof",!0);defineSymbol(math,ams,rel,"⊸","\\multimap",!0);defineSymbol(math,ams,rel,"↭","\\leftrightsquigarrow",!0);defineSymbol(math,ams,rel,"⇉","\\rightrightarrows",!0);defineSymbol(math,ams,rel,"⇄","\\rightleftarrows",!0);defineSymbol(math,ams,rel,"↠","\\twoheadrightarrow",!0);defineSymbol(math,ams,rel,"↣","\\rightarrowtail",!0);defineSymbol(math,ams,rel,"↬","\\looparrowright",!0);defineSymbol(math,ams,rel,"↷","\\curvearrowri\
ght",!0);defineSymbol(math,ams,rel,"↻","\\circlearrowright",!0);defineSymbol(math,ams,rel,"↱","\\Rsh",!0);defineSymbol(math,ams,rel,"⇊","\\downdownarrows",!0);defineSymbol(math,ams,rel,"↾","\\upharpoonright",!0);defineSymbol(math,ams,rel,"⇂","\\downharpoonright",!0);defineSymbol(math,ams,rel,"⇝","\\rightsquigarrow",!0);defineSymbol(math,ams,rel,"⇝","\\leadsto");defineSymbol(math,ams,rel,"⇛","\\Rrightarrow",!0);defineSymbol(math,ams,rel,"↾","\\restriction");defineSymbol(math,main,
textord,"‘","`");defineSymbol(math,main,textord,"$","\\$");defineSymbol(text$3,main,textord,"$","\\$");defineSymbol(text$3,main,textord,"$","\\textdollar");defineSymbol(math,main,textord,"%","\\%");defineSymbol(text$3,main,textord,"%","\\%");defineSymbol(math,main,textord,"_","\\_");defineSymbol(text$3,main,textord,"_","\\_");defineSymbol(text$3,main,textord,"_","\\textunderscore");defineSymbol(math,main,textord,"∠","\\angle",!0);defineSymbol(math,main,textord,"∞","\\infty",!0);defineSymbol(
math,main,textord,"′","\\prime");defineSymbol(math,main,textord,"△","\\triangle");defineSymbol(math,main,textord,"Γ","\\Gamma",!0);defineSymbol(math,main,textord,"Δ","\\Delta",!0);defineSymbol(math,main,textord,"Θ","\\Theta",!0);defineSymbol(math,main,textord,"Λ","\\Lambda",!0);defineSymbol(math,main,textord,"Ξ","\\Xi",!0);defineSymbol(math,main,textord,"Π","\\Pi",!0);defineSymbol(math,main,textord,"Σ","\\Sigma",!0);defineSymbol(math,main,textord,"Υ","\\Upsilon",!0);defineSymbol(math,
main,textord,"Φ","\\Phi",!0);defineSymbol(math,main,textord,"Ψ","\\Psi",!0);defineSymbol(math,main,textord,"Ω","\\Omega",!0);defineSymbol(math,main,textord,"A","Α");defineSymbol(math,main,textord,"B","Β");defineSymbol(math,main,textord,"E","Ε");defineSymbol(math,main,textord,"Z","Ζ");defineSymbol(math,main,textord,"H","Η");defineSymbol(math,main,textord,"I","Ι");defineSymbol(math,main,textord,"K","Κ");defineSymbol(math,main,textord,"M","Μ");defineSymbol(math,main,textord,"N","Ν");defineSymbol(
math,main,textord,"O","Ο");defineSymbol(math,main,textord,"P","Ρ");defineSymbol(math,main,textord,"T","Τ");defineSymbol(math,main,textord,"X","Χ");defineSymbol(math,main,textord,"¬","\\neg",!0);defineSymbol(math,main,textord,"¬","\\lnot");defineSymbol(math,main,textord,"⊤","\\top");defineSymbol(math,main,textord,"⊥","\\bot");defineSymbol(math,main,textord,"∅","\\emptyset");defineSymbol(math,ams,textord,"∅","\\varnothing");defineSymbol(math,main,mathord,"α","\\alpha",!0);defineSymbol(
math,main,mathord,"β","\\beta",!0);defineSymbol(math,main,mathord,"γ","\\gamma",!0);defineSymbol(math,main,mathord,"δ","\\delta",!0);defineSymbol(math,main,mathord,"ϵ","\\epsilon",!0);defineSymbol(math,main,mathord,"ζ","\\zeta",!0);defineSymbol(math,main,mathord,"η","\\eta",!0);defineSymbol(math,main,mathord,"θ","\\theta",!0);defineSymbol(math,main,mathord,"ι","\\iota",!0);defineSymbol(math,main,mathord,"κ","\\kappa",!0);defineSymbol(math,main,mathord,"λ","\\lambda",!0);defineSymbol(math,
main,mathord,"μ","\\mu",!0);defineSymbol(math,main,mathord,"ν","\\nu",!0);defineSymbol(math,main,mathord,"ξ","\\xi",!0);defineSymbol(math,main,mathord,"ο","\\omicron",!0);defineSymbol(math,main,mathord,"π","\\pi",!0);defineSymbol(math,main,mathord,"ρ","\\rho",!0);defineSymbol(math,main,mathord,"σ","\\sigma",!0);defineSymbol(math,main,mathord,"τ","\\tau",!0);defineSymbol(math,main,mathord,"υ","\\upsilon",!0);defineSymbol(math,main,mathord,"ϕ","\\phi",!0);defineSymbol(math,main,mathord,"\
χ","\\chi",!0);defineSymbol(math,main,mathord,"ψ","\\psi",!0);defineSymbol(math,main,mathord,"ω","\\omega",!0);defineSymbol(math,main,mathord,"ε","\\varepsilon",!0);defineSymbol(math,main,mathord,"ϑ","\\vartheta",!0);defineSymbol(math,main,mathord,"ϖ","\\varpi",!0);defineSymbol(math,main,mathord,"ϱ","\\varrho",!0);defineSymbol(math,main,mathord,"ς","\\varsigma",!0);defineSymbol(math,main,mathord,"φ","\\varphi",!0);defineSymbol(math,main,bin,"∗","*",!0);defineSymbol(math,main,bin,"+","\
+");defineSymbol(math,main,bin,"−","-",!0);defineSymbol(math,main,bin,"⋅","\\cdot",!0);defineSymbol(math,main,bin,"∘","\\circ",!0);defineSymbol(math,main,bin,"÷","\\div",!0);defineSymbol(math,main,bin,"±","\\pm",!0);defineSymbol(math,main,bin,"×","\\times",!0);defineSymbol(math,main,bin,"∩","\\cap",!0);defineSymbol(math,main,bin,"∪","\\cup",!0);defineSymbol(math,main,bin,"∖","\\setminus",!0);defineSymbol(math,main,bin,"∧","\\land");defineSymbol(math,main,bin,"∨","\\lor");defineSymbol(
math,main,bin,"∧","\\wedge",!0);defineSymbol(math,main,bin,"∨","\\vee",!0);defineSymbol(math,main,textord,"√","\\surd");defineSymbol(math,main,open,"⟨","\\langle",!0);defineSymbol(math,main,open,"∣","\\lvert");defineSymbol(math,main,open,"∥","\\lVert");defineSymbol(math,main,close,"?","?");defineSymbol(math,main,close,"!","!");defineSymbol(math,main,close,"⟩","\\rangle",!0);defineSymbol(math,main,close,"∣","\\rvert");defineSymbol(math,main,close,"∥","\\rVert");defineSymbol(math,
main,rel,"=","=");defineSymbol(math,main,rel,":",":");defineSymbol(math,main,rel,"≈","\\approx",!0);defineSymbol(math,main,rel,"≅","\\cong",!0);defineSymbol(math,main,rel,"≥","\\ge");defineSymbol(math,main,rel,"≥","\\geq",!0);defineSymbol(math,main,rel,"←","\\gets");defineSymbol(math,main,rel,">","\\gt",!0);defineSymbol(math,main,rel,"∈","\\in",!0);defineSymbol(math,main,rel,"","\\@not");defineSymbol(math,main,rel,"⊂","\\subset",!0);defineSymbol(math,main,rel,"⊃","\\supset",!0);
defineSymbol(math,main,rel,"⊆","\\subseteq",!0);defineSymbol(math,main,rel,"⊇","\\supseteq",!0);defineSymbol(math,ams,rel,"⊈","\\nsubseteq",!0);defineSymbol(math,ams,rel,"⊉","\\nsupseteq",!0);defineSymbol(math,main,rel,"⊨","\\models");defineSymbol(math,main,rel,"←","\\leftarrow",!0);defineSymbol(math,main,rel,"≤","\\le");defineSymbol(math,main,rel,"≤","\\leq",!0);defineSymbol(math,main,rel,"<","\\lt",!0);defineSymbol(math,main,rel,"→","\\rightarrow",!0);defineSymbol(math,main,rel,
"→","\\to");defineSymbol(math,ams,rel,"≱","\\ngeq",!0);defineSymbol(math,ams,rel,"≰","\\nleq",!0);defineSymbol(math,main,spacing," ","\\ ");defineSymbol(math,main,spacing," ","\\space");defineSymbol(math,main,spacing," ","\\nobreakspace");defineSymbol(text$3,main,spacing," ","\\ ");defineSymbol(text$3,main,spacing," "," ");defineSymbol(text$3,main,spacing," ","\\space");defineSymbol(text$3,main,spacing," ","\\nobreakspace");defineSymbol(math,main,spacing,null,"\\nobreak");defineSymbol(
math,main,spacing,null,"\\allowbreak");defineSymbol(math,main,punct,",",",");defineSymbol(math,main,punct,";",";");defineSymbol(math,ams,bin,"⊼","\\barwedge",!0);defineSymbol(math,ams,bin,"⊻","\\veebar",!0);defineSymbol(math,main,bin,"⊙","\\odot",!0);defineSymbol(math,main,bin,"⊕","\\oplus",!0);defineSymbol(math,main,bin,"⊗","\\otimes",!0);defineSymbol(math,main,textord,"∂","\\partial",!0);defineSymbol(math,main,bin,"⊘","\\oslash",!0);defineSymbol(math,ams,bin,"⊚","\\circledcirc",
!0);defineSymbol(math,ams,bin,"⊡","\\boxdot",!0);defineSymbol(math,main,bin,"△","\\bigtriangleup");defineSymbol(math,main,bin,"▽","\\bigtriangledown");defineSymbol(math,main,bin,"†","\\dagger");defineSymbol(math,main,bin,"⋄","\\diamond");defineSymbol(math,main,bin,"⋆","\\star");defineSymbol(math,main,bin,"◃","\\triangleleft");defineSymbol(math,main,bin,"▹","\\triangleright");defineSymbol(math,main,open,"{","\\{");defineSymbol(text$3,main,textord,"{","\\{");defineSymbol(text$3,main,
textord,"{","\\textbraceleft");defineSymbol(math,main,close,"}","\\}");defineSymbol(text$3,main,textord,"}","\\}");defineSymbol(text$3,main,textord,"}","\\textbraceright");defineSymbol(math,main,open,"{","\\lbrace");defineSymbol(math,main,close,"}","\\rbrace");defineSymbol(math,main,open,"[","\\lbrack",!0);defineSymbol(text$3,main,textord,"[","\\lbrack",!0);defineSymbol(math,main,close,"]","\\rbrack",!0);defineSymbol(text$3,main,textord,"]","\\rbrack",!0);defineSymbol(math,main,open,"(","\\lparen",
!0);defineSymbol(math,main,close,")","\\rparen",!0);defineSymbol(text$3,main,textord,"<","\\textless",!0);defineSymbol(text$3,main,textord,">","\\textgreater",!0);defineSymbol(math,main,open,"⌊","\\lfloor",!0);defineSymbol(math,main,close,"⌋","\\rfloor",!0);defineSymbol(math,main,open,"⌈","\\lceil",!0);defineSymbol(math,main,close,"⌉","\\rceil",!0);defineSymbol(math,main,textord,"\\","\\backslash");defineSymbol(math,main,textord,"∣","|");defineSymbol(math,main,textord,"∣","\\vert");defineSymbol(
text$3,main,textord,"|","\\textbar",!0);defineSymbol(math,main,textord,"∥","\\|");defineSymbol(math,main,textord,"∥","\\Vert");defineSymbol(text$3,main,textord,"∥","\\textbardbl");defineSymbol(text$3,main,textord,"~","\\textasciitilde");defineSymbol(text$3,main,textord,"\\","\\textbackslash");defineSymbol(text$3,main,textord,"^","\\textasciicircum");defineSymbol(math,main,rel,"↑","\\uparrow",!0);defineSymbol(math,main,rel,"⇑","\\Uparrow",!0);defineSymbol(math,main,rel,"↓","\\downarrow",
!0);defineSymbol(math,main,rel,"⇓","\\Downarrow",!0);defineSymbol(math,main,rel,"↕","\\updownarrow",!0);defineSymbol(math,main,rel,"⇕","\\Updownarrow",!0);defineSymbol(math,main,op,"∐","\\coprod");defineSymbol(math,main,op,"⋁","\\bigvee");defineSymbol(math,main,op,"⋀","\\bigwedge");defineSymbol(math,main,op,"⨄","\\biguplus");defineSymbol(math,main,op,"⋂","\\bigcap");defineSymbol(math,main,op,"⋃","\\bigcup");defineSymbol(math,main,op,"∫","\\int");defineSymbol(math,main,op,"∫",
"\\intop");defineSymbol(math,main,op,"∬","\\iint");defineSymbol(math,main,op,"∭","\\iiint");defineSymbol(math,main,op,"∏","\\prod");defineSymbol(math,main,op,"∑","\\sum");defineSymbol(math,main,op,"⨂","\\bigotimes");defineSymbol(math,main,op,"⨁","\\bigoplus");defineSymbol(math,main,op,"⨀","\\bigodot");defineSymbol(math,main,op,"∮","\\oint");defineSymbol(math,main,op,"∯","\\oiint");defineSymbol(math,main,op,"∰","\\oiiint");defineSymbol(math,main,op,"⨆","\\bigsqcup");defineSymbol(
math,main,op,"∫","\\smallint");defineSymbol(text$3,main,inner,"…","\\textellipsis");defineSymbol(math,main,inner,"…","\\mathellipsis");defineSymbol(text$3,main,inner,"…","\\ldots",!0);defineSymbol(math,main,inner,"…","\\ldots",!0);defineSymbol(math,main,inner,"⋯","\\@cdots",!0);defineSymbol(math,main,inner,"⋱","\\ddots",!0);defineSymbol(math,main,textord,"⋮","\\varvdots");defineSymbol(text$3,main,textord,"⋮","\\varvdots");defineSymbol(math,main,accent,"ˊ","\\acute");defineSymbol(
math,main,accent,"ˋ","\\grave");defineSymbol(math,main,accent,"¨","\\ddot");defineSymbol(math,main,accent,"~","\\tilde");defineSymbol(math,main,accent,"ˉ","\\bar");defineSymbol(math,main,accent,"˘","\\breve");defineSymbol(math,main,accent,"ˇ","\\check");defineSymbol(math,main,accent,"^","\\hat");defineSymbol(math,main,accent,"⃗","\\vec");defineSymbol(math,main,accent,"˙","\\dot");defineSymbol(math,main,accent,"˚","\\mathring");defineSymbol(math,main,mathord,"","\\@imath");defineSymbol(
math,main,mathord,"","\\@jmath");defineSymbol(math,main,textord,"ı","ı");defineSymbol(math,main,textord,"ȷ","ȷ");defineSymbol(text$3,main,textord,"ı","\\i",!0);defineSymbol(text$3,main,textord,"ȷ","\\j",!0);defineSymbol(text$3,main,textord,"ß","\\ss",!0);defineSymbol(text$3,main,textord,"æ","\\ae",!0);defineSymbol(text$3,main,textord,"œ","\\oe",!0);defineSymbol(text$3,main,textord,"ø","\\o",!0);defineSymbol(text$3,main,textord,"Æ","\\AE",!0);defineSymbol(text$3,main,textord,"Œ","\\\
OE",!0);defineSymbol(text$3,main,textord,"Ø","\\O",!0);defineSymbol(text$3,main,accent,"ˊ","\\'");defineSymbol(text$3,main,accent,"ˋ","\\`");defineSymbol(text$3,main,accent,"ˆ","\\^");defineSymbol(text$3,main,accent,"˜","\\~");defineSymbol(text$3,main,accent,"ˉ","\\=");defineSymbol(text$3,main,accent,"˘","\\u");defineSymbol(text$3,main,accent,"˙","\\.");defineSymbol(text$3,main,accent,"¸","\\c");defineSymbol(text$3,main,accent,"˚","\\r");defineSymbol(text$3,main,accent,"ˇ","\\v");defineSymbol(
text$3,main,accent,"¨",'\\"');defineSymbol(text$3,main,accent,"˝","\\H");defineSymbol(text$3,main,accent,"◯","\\textcircled");var ligatures={"--":!0,"---":!0,"``":!0,"''":!0};defineSymbol(text$3,main,textord,"–","--",!0);defineSymbol(text$3,main,textord,"–","\\textendash");defineSymbol(text$3,main,textord,"—","---",!0);defineSymbol(text$3,main,textord,"—","\\textemdash");defineSymbol(text$3,main,textord,"‘","`",!0);defineSymbol(text$3,main,textord,"‘","\\textquoteleft");defineSymbol(
text$3,main,textord,"’","'",!0);defineSymbol(text$3,main,textord,"’","\\textquoteright");defineSymbol(text$3,main,textord,"“","``",!0);defineSymbol(text$3,main,textord,"“","\\textquotedblleft");defineSymbol(text$3,main,textord,"”","''",!0);defineSymbol(text$3,main,textord,"”","\\textquotedblright");defineSymbol(math,main,textord,"°","\\degree",!0);defineSymbol(text$3,main,textord,"°","\\degree");defineSymbol(text$3,main,textord,"°","\\textdegree",!0);defineSymbol(math,main,textord,
"£","\\pounds");defineSymbol(math,main,textord,"£","\\mathsterling",!0);defineSymbol(text$3,main,textord,"£","\\pounds");defineSymbol(text$3,main,textord,"£","\\textsterling",!0);defineSymbol(math,ams,textord,"✠","\\maltese");defineSymbol(text$3,ams,textord,"✠","\\maltese");var mathTextSymbols='0123456789/@."';for(var i=0;i<mathTextSymbols.length;i++){var ch=mathTextSymbols.charAt(i);defineSymbol(math,main,textord,ch,ch)}var textSymbols='0123456789!@*()-=+";:?/.,';for(var _i=0;_i<textSymbols.
length;_i++){var _ch=textSymbols.charAt(_i);defineSymbol(text$3,main,textord,_ch,_ch)}var letters="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";for(var _i2=0;_i2<letters.length;_i2++){var _ch2=letters.charAt(_i2);defineSymbol(math,main,mathord,_ch2,_ch2),defineSymbol(text$3,main,textord,_ch2,_ch2)}defineSymbol(math,ams,textord,"C","ℂ");defineSymbol(text$3,ams,textord,"C","ℂ");defineSymbol(math,ams,textord,"H","ℍ");defineSymbol(text$3,ams,textord,"H","ℍ");defineSymbol(math,ams,textord,
"N","ℕ");defineSymbol(text$3,ams,textord,"N","ℕ");defineSymbol(math,ams,textord,"P","ℙ");defineSymbol(text$3,ams,textord,"P","ℙ");defineSymbol(math,ams,textord,"Q","ℚ");defineSymbol(text$3,ams,textord,"Q","ℚ");defineSymbol(math,ams,textord,"R","ℝ");defineSymbol(text$3,ams,textord,"R","ℝ");defineSymbol(math,ams,textord,"Z","ℤ");defineSymbol(text$3,ams,textord,"Z","ℤ");defineSymbol(math,main,mathord,"h","ℎ");defineSymbol(text$3,main,mathord,"h","ℎ");var wideChar="";for(var _i3=0;_i3<
letters.length;_i3++){var _ch3=letters.charAt(_i3);wideChar=String.fromCharCode(55349,56320+_i3),defineSymbol(math,main,mathord,_ch3,wideChar),defineSymbol(text$3,main,textord,_ch3,wideChar),wideChar=String.fromCharCode(55349,56372+_i3),defineSymbol(math,main,mathord,_ch3,wideChar),defineSymbol(text$3,main,textord,_ch3,wideChar),wideChar=String.fromCharCode(55349,56424+_i3),defineSymbol(math,main,mathord,_ch3,wideChar),defineSymbol(text$3,main,textord,_ch3,wideChar),wideChar=String.fromCharCode(
55349,56580+_i3),defineSymbol(math,main,mathord,_ch3,wideChar),defineSymbol(text$3,main,textord,_ch3,wideChar),wideChar=String.fromCharCode(55349,56684+_i3),defineSymbol(math,main,mathord,_ch3,wideChar),defineSymbol(text$3,main,textord,_ch3,wideChar),wideChar=String.fromCharCode(55349,56736+_i3),defineSymbol(math,main,mathord,_ch3,wideChar),defineSymbol(text$3,main,textord,_ch3,wideChar),wideChar=String.fromCharCode(55349,56788+_i3),defineSymbol(math,main,mathord,_ch3,wideChar),defineSymbol(text$3,
main,textord,_ch3,wideChar),wideChar=String.fromCharCode(55349,56840+_i3),defineSymbol(math,main,mathord,_ch3,wideChar),defineSymbol(text$3,main,textord,_ch3,wideChar),wideChar=String.fromCharCode(55349,56944+_i3),defineSymbol(math,main,mathord,_ch3,wideChar),defineSymbol(text$3,main,textord,_ch3,wideChar),_i3<26&&(wideChar=String.fromCharCode(55349,56632+_i3),defineSymbol(math,main,mathord,_ch3,wideChar),defineSymbol(text$3,main,textord,_ch3,wideChar),wideChar=String.fromCharCode(55349,56476+_i3),
defineSymbol(math,main,mathord,_ch3,wideChar),defineSymbol(text$3,main,textord,_ch3,wideChar))}wideChar="𝕜";defineSymbol(math,main,mathord,"k",wideChar);defineSymbol(text$3,main,textord,"k",wideChar);for(var _i4=0;_i4<10;_i4++){var _ch4=_i4.toString();wideChar=String.fromCharCode(55349,57294+_i4),defineSymbol(math,main,mathord,_ch4,wideChar),defineSymbol(text$3,main,textord,_ch4,wideChar),wideChar=String.fromCharCode(55349,57314+_i4),defineSymbol(math,main,mathord,_ch4,wideChar),defineSymbol(
text$3,main,textord,_ch4,wideChar),wideChar=String.fromCharCode(55349,57324+_i4),defineSymbol(math,main,mathord,_ch4,wideChar),defineSymbol(text$3,main,textord,_ch4,wideChar),wideChar=String.fromCharCode(55349,57334+_i4),defineSymbol(math,main,mathord,_ch4,wideChar),defineSymbol(text$3,main,textord,_ch4,wideChar)}var extraLatin="ÐÞþ";for(var _i5=0;_i5<extraLatin.length;_i5++){var _ch5=extraLatin.charAt(_i5);defineSymbol(math,main,mathord,_ch5,_ch5),defineSymbol(text$3,main,textord,_ch5,_ch5)}
var wideLatinLetterData=[["mathbf","textbf","Main-Bold"],["mathbf","textbf","Main-Bold"],["mathnormal","textit","Math-Italic"],["mathnormal","textit","Math-Italic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["boldsymbol","boldsymbol","Main-BoldItalic"],["mathscr","textscr","Script-Regular"],["","",""],["","",""],["","",""],["mathfrak","textfrak","Fraktur-Regular"],["mathfrak","textfrak","Fraktur-Regular"],["mathbb","textbb","AMS-Regular"],["mathbb","textbb","AMS-Regular"],["mathboldfrak","te\
xtboldfrak","Fraktur-Regular"],["mathboldfrak","textboldfrak","Fraktur-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathitsf","textitsf","SansSerif-Italic"],["mathitsf","textitsf","SansSerif-Italic"],["","",""],["","",""],["mathtt","texttt","Typewriter-Regular"],["mathtt","texttt","Typewriter-Regular"]],wideNumeralData=[["mathbf","textbf","Main-Bold"],["","",""],
["mathsf","textsf","SansSerif-Regular"],["mathboldsf","textboldsf","SansSerif-Bold"],["mathtt","texttt","Typewriter-Regular"]],wideCharacterFont=function(wideChar2,mode){var H=wideChar2.charCodeAt(0),L=wideChar2.charCodeAt(1),codePoint=(H-55296)*1024+(L-56320)+65536,j=mode==="math"?0:1;if(119808<=codePoint&&codePoint<120484){var i=Math.floor((codePoint-119808)/26);return[wideLatinLetterData[i][2],wideLatinLetterData[i][j]]}else if(120782<=codePoint&&codePoint<=120831){var _i=Math.floor((codePoint-
120782)/10);return[wideNumeralData[_i][2],wideNumeralData[_i][j]]}else{if(codePoint===120485||codePoint===120486)return[wideLatinLetterData[0][2],wideLatinLetterData[0][j]];if(120486<codePoint&&codePoint<120782)return["",""];throw new ParseError2("Unsupported character: "+wideChar2)}},lookupSymbol=function(value,fontName,mode){return symbols[mode][value]&&symbols[mode][value].replace&&(value=symbols[mode][value].replace),{value,metrics:getCharacterMetrics(value,fontName,mode)}},makeSymbol=function(value,fontName,mode,options,classes){
var lookup=lookupSymbol(value,fontName,mode),metrics=lookup.metrics;value=lookup.value;var symbolNode;if(metrics){var italic=metrics.italic;(mode==="text"||options&&options.font==="mathit")&&(italic=0),symbolNode=new SymbolNode(value,metrics.height,metrics.depth,italic,metrics.skew,metrics.width,classes)}else typeof console<"u"&&console.warn("No character metrics "+("for '"+value+"' in style '"+fontName+"' and mode '"+mode+"'")),symbolNode=new SymbolNode(value,0,0,0,0,0,classes);if(options){symbolNode.
maxFontSize=options.sizeMultiplier,options.style.isTight()&&symbolNode.classes.push("mtight");var color=options.getColor();color&&(symbolNode.style.color=color)}return symbolNode},mathsym=function(value,mode,options,classes){return classes===void 0&&(classes=[]),options.font==="boldsymbol"&&lookupSymbol(value,"Main-Bold",mode).metrics?makeSymbol(value,"Main-Bold",mode,options,classes.concat(["mathbf"])):value==="\\"||symbols[mode][value].font==="main"?makeSymbol(value,"Main-Regular",mode,options,
classes):makeSymbol(value,"AMS-Regular",mode,options,classes.concat(["amsrm"]))},boldsymbol=function(value,mode,options,classes,type2){return type2!=="textord"&&lookupSymbol(value,"Math-BoldItalic",mode).metrics?{fontName:"Math-BoldItalic",fontClass:"boldsymbol"}:{fontName:"Main-Bold",fontClass:"mathbf"}},makeOrd=function(group,options,type2){var mode=group.mode,text2=group.text,classes=["mord"],isFont=mode==="math"||mode==="text"&&options.font,fontOrFamily=isFont?options.font:options.fontFamily,
wideFontName="",wideFontClass="";if(text2.charCodeAt(0)===55349&&([wideFontName,wideFontClass]=wideCharacterFont(text2,mode)),wideFontName.length>0)return makeSymbol(text2,wideFontName,mode,options,classes.concat(wideFontClass));if(fontOrFamily){var fontName,fontClasses;if(fontOrFamily==="boldsymbol"){var fontData=boldsymbol(text2,mode,options,classes,type2);fontName=fontData.fontName,fontClasses=[fontData.fontClass]}else isFont?(fontName=fontMap[fontOrFamily].fontName,fontClasses=[fontOrFamily]):
(fontName=retrieveTextFontName(fontOrFamily,options.fontWeight,options.fontShape),fontClasses=[fontOrFamily,options.fontWeight,options.fontShape]);if(lookupSymbol(text2,fontName,mode).metrics)return makeSymbol(text2,fontName,mode,options,classes.concat(fontClasses));if(ligatures.hasOwnProperty(text2)&&fontName.slice(0,10)==="Typewriter"){for(var parts=[],i=0;i<text2.length;i++)parts.push(makeSymbol(text2[i],fontName,mode,options,classes.concat(fontClasses)));return makeFragment(parts)}}if(type2===
"mathord")return makeSymbol(text2,"Math-Italic",mode,options,classes.concat(["mathnormal"]));if(type2==="textord"){var font=symbols[mode][text2]&&symbols[mode][text2].font;if(font==="ams"){var _fontName=retrieveTextFontName("amsrm",options.fontWeight,options.fontShape);return makeSymbol(text2,_fontName,mode,options,classes.concat("amsrm",options.fontWeight,options.fontShape))}else if(font==="main"||!font){var _fontName2=retrieveTextFontName("textrm",options.fontWeight,options.fontShape);return makeSymbol(
text2,_fontName2,mode,options,classes.concat(options.fontWeight,options.fontShape))}else{var _fontName3=retrieveTextFontName(font,options.fontWeight,options.fontShape);return makeSymbol(text2,_fontName3,mode,options,classes.concat(_fontName3,options.fontWeight,options.fontShape))}}else throw new Error("unexpected type: "+type2+" in makeOrd")},canCombine=(prev2,next2)=>{if(createClass(prev2.classes)!==createClass(next2.classes)||prev2.skew!==next2.skew||prev2.maxFontSize!==next2.maxFontSize)return!1;
if(prev2.classes.length===1){var cls=prev2.classes[0];if(cls==="mbin"||cls==="mord")return!1}for(var style2 in prev2.style)if(prev2.style.hasOwnProperty(style2)&&prev2.style[style2]!==next2.style[style2])return!1;for(var _style in next2.style)if(next2.style.hasOwnProperty(_style)&&prev2.style[_style]!==next2.style[_style])return!1;return!0},tryCombineChars=chars=>{for(var i=0;i<chars.length-1;i++){var prev2=chars[i],next2=chars[i+1];prev2 instanceof SymbolNode&&next2 instanceof SymbolNode&&canCombine(
prev2,next2)&&(prev2.text+=next2.text,prev2.height=Math.max(prev2.height,next2.height),prev2.depth=Math.max(prev2.depth,next2.depth),prev2.italic=next2.italic,chars.splice(i+1,1),i--)}return chars},sizeElementFromChildren=function(elem){for(var height=0,depth=0,maxFontSize=0,i=0;i<elem.children.length;i++){var child2=elem.children[i];child2.height>height&&(height=child2.height),child2.depth>depth&&(depth=child2.depth),child2.maxFontSize>maxFontSize&&(maxFontSize=child2.maxFontSize)}elem.height=height,
elem.depth=depth,elem.maxFontSize=maxFontSize},makeSpan$2=function(classes,children,options,style2){var span=new Span(classes,children,options,style2);return sizeElementFromChildren(span),span},makeSvgSpan=(classes,children,options,style2)=>new Span(classes,children,options,style2),makeLineSpan=function(className,options,thickness){var line=makeSpan$2([className],[],options);return line.height=Math.max(thickness||options.fontMetrics().defaultRuleThickness,options.minRuleThickness),line.style.borderBottomWidth=
makeEm(line.height),line.maxFontSize=1,line},makeAnchor=function(href,classes,children,options){var anchor=new Anchor(href,classes,children,options);return sizeElementFromChildren(anchor),anchor},makeFragment=function(children){var fragment=new DocumentFragment(children);return sizeElementFromChildren(fragment),fragment},wrapFragment=function(group,options){return group instanceof DocumentFragment?makeSpan$2([],[group],options):group},getVListChildrenAndDepth=function(params){if(params.positionType===
"individualShift"){for(var oldChildren=params.children,children=[oldChildren[0]],_depth=-oldChildren[0].shift-oldChildren[0].elem.depth,currPos=_depth,i=1;i<oldChildren.length;i++){var diff2=-oldChildren[i].shift-currPos-oldChildren[i].elem.depth,size2=diff2-(oldChildren[i-1].elem.height+oldChildren[i-1].elem.depth);currPos=currPos+diff2,children.push({type:"kern",size:size2}),children.push(oldChildren[i])}return{children,depth:_depth}}var depth;if(params.positionType==="top"){for(var bottom=params.
positionData,_i=0;_i<params.children.length;_i++){var child2=params.children[_i];bottom-=child2.type==="kern"?child2.size:child2.elem.height+child2.elem.depth}depth=bottom}else if(params.positionType==="bottom")depth=-params.positionData;else{var firstChild=params.children[0];if(firstChild.type!=="elem")throw new Error('First child must have type "elem".');if(params.positionType==="shift")depth=-firstChild.elem.depth-params.positionData;else if(params.positionType==="firstBaseline")depth=-firstChild.
elem.depth;else throw new Error("Invalid positionType "+params.positionType+".")}return{children:params.children,depth}},makeVList=function(params,options){for(var{children,depth}=getVListChildrenAndDepth(params),pstrutSize=0,i=0;i<children.length;i++){var child2=children[i];if(child2.type==="elem"){var elem=child2.elem;pstrutSize=Math.max(pstrutSize,elem.maxFontSize,elem.height)}}pstrutSize+=2;var pstrut=makeSpan$2(["pstrut"],[]);pstrut.style.height=makeEm(pstrutSize);for(var realChildren=[],minPos=depth,
maxPos=depth,currPos=depth,_i2=0;_i2<children.length;_i2++){var _child=children[_i2];if(_child.type==="kern")currPos+=_child.size;else{var _elem=_child.elem,classes=_child.wrapperClasses||[],style2=_child.wrapperStyle||{},childWrap=makeSpan$2(classes,[pstrut,_elem],void 0,style2);childWrap.style.top=makeEm(-pstrutSize-currPos-_elem.depth),_child.marginLeft&&(childWrap.style.marginLeft=_child.marginLeft),_child.marginRight&&(childWrap.style.marginRight=_child.marginRight),realChildren.push(childWrap),
currPos+=_elem.height+_elem.depth}minPos=Math.min(minPos,currPos),maxPos=Math.max(maxPos,currPos)}var vlist=makeSpan$2(["vlist"],realChildren);vlist.style.height=makeEm(maxPos);var rows;if(minPos<0){var emptySpan=makeSpan$2([],[]),depthStrut=makeSpan$2(["vlist"],[emptySpan]);depthStrut.style.height=makeEm(-minPos);var topStrut=makeSpan$2(["vlist-s"],[new SymbolNode("​")]);rows=[makeSpan$2(["vlist-r"],[vlist,topStrut]),makeSpan$2(["vlist-r"],[depthStrut])]}else rows=[makeSpan$2(["vlist-r"],[vlist])];
var vtable=makeSpan$2(["vlist-t"],rows);return rows.length===2&&vtable.classes.push("vlist-t2"),vtable.height=maxPos,vtable.depth=-minPos,vtable},makeGlue=(measurement,options)=>{var rule=makeSpan$2(["mspace"],[],options),size2=calculateSize(measurement,options);return rule.style.marginRight=makeEm(size2),rule},retrieveTextFontName=function(fontFamily,fontWeight,fontShape){var baseFontName="";switch(fontFamily){case"amsrm":baseFontName="AMS";break;case"textrm":baseFontName="Main";break;case"text\
sf":baseFontName="SansSerif";break;case"texttt":baseFontName="Typewriter";break;default:baseFontName=fontFamily}var fontStylesName;return fontWeight==="textbf"&&fontShape==="textit"?fontStylesName="BoldItalic":fontWeight==="textbf"?fontStylesName="Bold":fontWeight==="textit"?fontStylesName="Italic":fontStylesName="Regular",baseFontName+"-"+fontStylesName},fontMap={mathbf:{variant:"bold",fontName:"Main-Bold"},mathrm:{variant:"normal",fontName:"Main-Regular"},textit:{variant:"italic",fontName:"Mai\
n-Italic"},mathit:{variant:"italic",fontName:"Main-Italic"},mathnormal:{variant:"italic",fontName:"Math-Italic"},mathsfit:{variant:"sans-serif-italic",fontName:"SansSerif-Italic"},mathbb:{variant:"double-struck",fontName:"AMS-Regular"},mathcal:{variant:"script",fontName:"Caligraphic-Regular"},mathfrak:{variant:"fraktur",fontName:"Fraktur-Regular"},mathscr:{variant:"script",fontName:"Script-Regular"},mathsf:{variant:"sans-serif",fontName:"SansSerif-Regular"},mathtt:{variant:"monospace",fontName:"\
Typewriter-Regular"}},svgData={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},staticSvg=function(value,options){var[pathName,width,height]=svgData[value],path2=new PathNode(pathName),svgNode=new SvgNode([path2],{width:makeEm(width),height:makeEm(height),style:"width:"+makeEm(width),viewBox:"0 0 "+1e3*width+" "+1e3*height,preserveAspectRatio:"xMinYMin"}),span=makeSvgSpan([
"overlay"],[svgNode],options);return span.height=height,span.style.height=makeEm(height),span.style.width=makeEm(width),span},buildCommon={fontMap,makeSymbol,mathsym,makeSpan:makeSpan$2,makeSvgSpan,makeLineSpan,makeAnchor,makeFragment,wrapFragment,makeVList,makeOrd,makeGlue,staticSvg,svgData,tryCombineChars},thinspace={number:3,unit:"mu"},mediumspace={number:4,unit:"mu"},thickspace={number:5,unit:"mu"},spacings={mord:{mop:thinspace,mbin:mediumspace,mrel:thickspace,minner:thinspace},mop:{mord:thinspace,
mop:thinspace,mrel:thickspace,minner:thinspace},mbin:{mord:mediumspace,mop:mediumspace,mopen:mediumspace,minner:mediumspace},mrel:{mord:thickspace,mop:thickspace,mopen:thickspace,minner:thickspace},mopen:{},mclose:{mop:thinspace,mbin:mediumspace,mrel:thickspace,minner:thinspace},mpunct:{mord:thinspace,mop:thinspace,mrel:thickspace,mopen:thinspace,mclose:thinspace,mpunct:thinspace,minner:thinspace},minner:{mord:thinspace,mop:thinspace,mbin:mediumspace,mrel:thickspace,mopen:thinspace,mpunct:thinspace,
minner:thinspace}},tightSpacings={mord:{mop:thinspace},mop:{mord:thinspace,mop:thinspace},mbin:{},mrel:{},mopen:{},mclose:{mop:thinspace},mpunct:{},minner:{mop:thinspace}},_functions={},_htmlGroupBuilders={},_mathmlGroupBuilders={};function defineFunction(_ref){for(var{type:type2,names:names2,props,handler,htmlBuilder:htmlBuilder3,mathmlBuilder:mathmlBuilder3}=_ref,data={type:type2,numArgs:props.numArgs,argTypes:props.argTypes,allowedInArgument:!!props.allowedInArgument,allowedInText:!!props.allowedInText,
allowedInMath:props.allowedInMath===void 0?!0:props.allowedInMath,numOptionalArgs:props.numOptionalArgs||0,infix:!!props.infix,primitive:!!props.primitive,handler},i=0;i<names2.length;++i)_functions[names2[i]]=data;type2&&(htmlBuilder3&&(_htmlGroupBuilders[type2]=htmlBuilder3),mathmlBuilder3&&(_mathmlGroupBuilders[type2]=mathmlBuilder3))}function defineFunctionBuilders(_ref2){var{type:type2,htmlBuilder:htmlBuilder3,mathmlBuilder:mathmlBuilder3}=_ref2;defineFunction({type:type2,names:[],props:{numArgs:0},
handler(){throw new Error("Should never be called.")},htmlBuilder:htmlBuilder3,mathmlBuilder:mathmlBuilder3})}var normalizeArgument=function(arg){return arg.type==="ordgroup"&&arg.body.length===1?arg.body[0]:arg},ordargument=function(arg){return arg.type==="ordgroup"?arg.body:[arg]},makeSpan$1=buildCommon.makeSpan,binLeftCanceller=["leftmost","mbin","mopen","mrel","mop","mpunct"],binRightCanceller=["rightmost","mrel","mclose","mpunct"],styleMap$1={display:Style$1.DISPLAY,text:Style$1.TEXT,script:Style$1.
SCRIPT,scriptscript:Style$1.SCRIPTSCRIPT},DomEnum={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},buildExpression$1=function(expression,options,isRealGroup,surrounding){surrounding===void 0&&(surrounding=[null,null]);for(var groups=[],i=0;i<expression.length;i++){var output=buildGroup$1(expression[i],options);if(output instanceof DocumentFragment){var children=output.children;groups.push(...children)}else groups.push(output)}if(buildCommon.
tryCombineChars(groups),!isRealGroup)return groups;var glueOptions=options;if(expression.length===1){var node2=expression[0];node2.type==="sizing"?glueOptions=options.havingSize(node2.size):node2.type==="styling"&&(glueOptions=options.havingStyle(styleMap$1[node2.style]))}var dummyPrev=makeSpan$1([surrounding[0]||"leftmost"],[],options),dummyNext=makeSpan$1([surrounding[1]||"rightmost"],[],options),isRoot=isRealGroup==="root";return traverseNonSpaceNodes(groups,(node3,prev2)=>{var prevType=prev2.
classes[0],type2=node3.classes[0];prevType==="mbin"&&utils.contains(binRightCanceller,type2)?prev2.classes[0]="mord":type2==="mbin"&&utils.contains(binLeftCanceller,prevType)&&(node3.classes[0]="mord")},{node:dummyPrev},dummyNext,isRoot),traverseNonSpaceNodes(groups,(node3,prev2)=>{var prevType=getTypeOfDomTree(prev2),type2=getTypeOfDomTree(node3),space2=prevType&&type2?node3.hasClass("mtight")?tightSpacings[prevType][type2]:spacings[prevType][type2]:null;if(space2)return buildCommon.makeGlue(space2,
glueOptions)},{node:dummyPrev},dummyNext,isRoot),groups},traverseNonSpaceNodes=function traverseNonSpaceNodes2(nodes2,callback,prev2,next2,isRoot){next2&&nodes2.push(next2);for(var i=0;i<nodes2.length;i++){var node2=nodes2[i],partialGroup=checkPartialGroup(node2);if(partialGroup){traverseNonSpaceNodes2(partialGroup.children,callback,prev2,null,isRoot);continue}var nonspace=!node2.hasClass("mspace");if(nonspace){var result=callback(node2,prev2.node);result&&(prev2.insertAfter?prev2.insertAfter(result):
(nodes2.unshift(result),i++))}nonspace?prev2.node=node2:isRoot&&node2.hasClass("newline")&&(prev2.node=makeSpan$1(["leftmost"])),prev2.insertAfter=(index2=>n=>{nodes2.splice(index2+1,0,n),i++})(i)}next2&&nodes2.pop()},checkPartialGroup=function(node2){return node2 instanceof DocumentFragment||node2 instanceof Anchor||node2 instanceof Span&&node2.hasClass("enclosing")?node2:null},getOutermostNode=function getOutermostNode2(node2,side){var partialGroup=checkPartialGroup(node2);if(partialGroup){var children=partialGroup.
children;if(children.length){if(side==="right")return getOutermostNode2(children[children.length-1],"right");if(side==="left")return getOutermostNode2(children[0],"left")}}return node2},getTypeOfDomTree=function(node2,side){return node2?(side&&(node2=getOutermostNode(node2,side)),DomEnum[node2.classes[0]]||null):null},makeNullDelimiter=function(options,classes){var moreClasses=["nulldelimiter"].concat(options.baseSizingClasses());return makeSpan$1(classes.concat(moreClasses))},buildGroup$1=function(group,options,baseOptions){
if(!group)return makeSpan$1();if(_htmlGroupBuilders[group.type]){var groupNode=_htmlGroupBuilders[group.type](group,options);if(baseOptions&&options.size!==baseOptions.size){groupNode=makeSpan$1(options.sizingClasses(baseOptions),[groupNode],options);var multiplier=options.sizeMultiplier/baseOptions.sizeMultiplier;groupNode.height*=multiplier,groupNode.depth*=multiplier}return groupNode}else throw new ParseError2("Got group of unknown type: '"+group.type+"'")};function buildHTMLUnbreakable(children,options){
var body2=makeSpan$1(["base"],children,options),strut=makeSpan$1(["strut"]);return strut.style.height=makeEm(body2.height+body2.depth),body2.depth&&(strut.style.verticalAlign=makeEm(-body2.depth)),body2.children.unshift(strut),body2}function buildHTML(tree,options){var tag=null;tree.length===1&&tree[0].type==="tag"&&(tag=tree[0].tag,tree=tree[0].body);var expression=buildExpression$1(tree,options,"root"),eqnNum;expression.length===2&&expression[1].hasClass("tag")&&(eqnNum=expression.pop());for(var children=[],
parts=[],i=0;i<expression.length;i++)if(parts.push(expression[i]),expression[i].hasClass("mbin")||expression[i].hasClass("mrel")||expression[i].hasClass("allowbreak")){for(var nobreak=!1;i<expression.length-1&&expression[i+1].hasClass("mspace")&&!expression[i+1].hasClass("newline");)i++,parts.push(expression[i]),expression[i].hasClass("nobreak")&&(nobreak=!0);nobreak||(children.push(buildHTMLUnbreakable(parts,options)),parts=[])}else expression[i].hasClass("newline")&&(parts.pop(),parts.length>0&&
(children.push(buildHTMLUnbreakable(parts,options)),parts=[]),children.push(expression[i]));parts.length>0&&children.push(buildHTMLUnbreakable(parts,options));var tagChild;tag?(tagChild=buildHTMLUnbreakable(buildExpression$1(tag,options,!0)),tagChild.classes=["tag"],children.push(tagChild)):eqnNum&&children.push(eqnNum);var htmlNode=makeSpan$1(["katex-html"],children);if(htmlNode.setAttribute("aria-hidden","true"),tagChild){var strut=tagChild.children[0];strut.style.height=makeEm(htmlNode.height+
htmlNode.depth),htmlNode.depth&&(strut.style.verticalAlign=makeEm(-htmlNode.depth))}return htmlNode}function newDocumentFragment(children){return new DocumentFragment(children)}class MathNode{constructor(type2,children,classes){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=type2,this.attributes={},this.children=children||[],this.classes=classes||[]}setAttribute(name,value){this.attributes[name]=value}getAttribute(name){return this.attributes[name]}toNode(){
var node2=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(var attr in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,attr)&&node2.setAttribute(attr,this.attributes[attr]);this.classes.length>0&&(node2.className=createClass(this.classes));for(var i=0;i<this.children.length;i++)if(this.children[i]instanceof TextNode&&this.children[i+1]instanceof TextNode){for(var text2=this.children[i].toText()+this.children[++i].toText();this.children[i+1]instanceof
TextNode;)text2+=this.children[++i].toText();node2.appendChild(new TextNode(text2).toNode())}else node2.appendChild(this.children[i].toNode());return node2}toMarkup(){var markup="<"+this.type;for(var attr in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,attr)&&(markup+=" "+attr+'="',markup+=utils.escape(this.attributes[attr]),markup+='"');this.classes.length>0&&(markup+=' class ="'+utils.escape(createClass(this.classes))+'"'),markup+=">";for(var i=0;i<this.children.length;i++)
markup+=this.children[i].toMarkup();return markup+="</"+this.type+">",markup}toText(){return this.children.map(child2=>child2.toText()).join("")}}class TextNode{constructor(text2){this.text=void 0,this.text=text2}toNode(){return document.createTextNode(this.text)}toMarkup(){return utils.escape(this.toText())}toText(){return this.text}}class SpaceNode{constructor(width){this.width=void 0,this.character=void 0,this.width=width,width>=.05555&&width<=.05556?this.character=" ":width>=.1666&&width<=
.1667?this.character=" ":width>=.2222&&width<=.2223?this.character=" ":width>=.2777&&width<=.2778?this.character="  ":width>=-.05556&&width<=-.05555?this.character=" ⁣":width>=-.1667&&width<=-.1666?this.character=" ⁣":width>=-.2223&&width<=-.2222?this.character=" ⁣":width>=-.2778&&width<=-.2777?this.character=" ⁣":this.character=null}toNode(){if(this.character)return document.createTextNode(this.character);var node2=document.createElementNS("http://www.w3.org/1998/Math/Ma\
thML","mspace");return node2.setAttribute("width",makeEm(this.width)),node2}toMarkup(){return this.character?"<mtext>"+this.character+"</mtext>":'<mspace width="'+makeEm(this.width)+'"/>'}toText(){return this.character?this.character:" "}}var mathMLTree={MathNode,TextNode,SpaceNode,newDocumentFragment},makeText=function(text2,mode,options){return symbols[mode][text2]&&symbols[mode][text2].replace&&text2.charCodeAt(0)!==55349&&!(ligatures.hasOwnProperty(text2)&&options&&(options.fontFamily&&options.
fontFamily.slice(4,6)==="tt"||options.font&&options.font.slice(4,6)==="tt"))&&(text2=symbols[mode][text2].replace),new mathMLTree.TextNode(text2)},makeRow=function(body2){return body2.length===1?body2[0]:new mathMLTree.MathNode("mrow",body2)},getVariant=function(group,options){if(options.fontFamily==="texttt")return"monospace";if(options.fontFamily==="textsf")return options.fontShape==="textit"&&options.fontWeight==="textbf"?"sans-serif-bold-italic":options.fontShape==="textit"?"sans-serif-itali\
c":options.fontWeight==="textbf"?"bold-sans-serif":"sans-serif";if(options.fontShape==="textit"&&options.fontWeight==="textbf")return"bold-italic";if(options.fontShape==="textit")return"italic";if(options.fontWeight==="textbf")return"bold";var font=options.font;if(!font||font==="mathnormal")return null;var mode=group.mode;if(font==="mathit")return"italic";if(font==="boldsymbol")return group.type==="textord"?"bold":"bold-italic";if(font==="mathbf")return"bold";if(font==="mathbb")return"double-str\
uck";if(font==="mathsfit")return"sans-serif-italic";if(font==="mathfrak")return"fraktur";if(font==="mathscr"||font==="mathcal")return"script";if(font==="mathsf")return"sans-serif";if(font==="mathtt")return"monospace";var text2=group.text;if(utils.contains(["\\imath","\\jmath"],text2))return null;symbols[mode][text2]&&symbols[mode][text2].replace&&(text2=symbols[mode][text2].replace);var fontName=buildCommon.fontMap[font].fontName;return getCharacterMetrics(text2,fontName,mode)?buildCommon.fontMap[font].
variant:null};function isNumberPunctuation(group){if(!group)return!1;if(group.type==="mi"&&group.children.length===1){var child2=group.children[0];return child2 instanceof TextNode&&child2.text==="."}else if(group.type==="mo"&&group.children.length===1&&group.getAttribute("separator")==="true"&&group.getAttribute("lspace")==="0em"&&group.getAttribute("rspace")==="0em"){var _child=group.children[0];return _child instanceof TextNode&&_child.text===","}else return!1}var buildExpression2=function(expression,options,isOrdgroup){
if(expression.length===1){var group=buildGroup2(expression[0],options);return isOrdgroup&&group instanceof MathNode&&group.type==="mo"&&(group.setAttribute("lspace","0em"),group.setAttribute("rspace","0em")),[group]}for(var groups=[],lastGroup,i=0;i<expression.length;i++){var _group=buildGroup2(expression[i],options);if(_group instanceof MathNode&&lastGroup instanceof MathNode){if(_group.type==="mtext"&&lastGroup.type==="mtext"&&_group.getAttribute("mathvariant")===lastGroup.getAttribute("mathva\
riant")){lastGroup.children.push(..._group.children);continue}else if(_group.type==="mn"&&lastGroup.type==="mn"){lastGroup.children.push(..._group.children);continue}else if(isNumberPunctuation(_group)&&lastGroup.type==="mn"){lastGroup.children.push(..._group.children);continue}else if(_group.type==="mn"&&isNumberPunctuation(lastGroup))_group.children=[...lastGroup.children,..._group.children],groups.pop();else if((_group.type==="msup"||_group.type==="msub")&&_group.children.length>=1&&(lastGroup.
type==="mn"||isNumberPunctuation(lastGroup))){var base2=_group.children[0];base2 instanceof MathNode&&base2.type==="mn"&&(base2.children=[...lastGroup.children,...base2.children],groups.pop())}else if(lastGroup.type==="mi"&&lastGroup.children.length===1){var lastChild=lastGroup.children[0];if(lastChild instanceof TextNode&&lastChild.text==="̸"&&(_group.type==="mo"||_group.type==="mi"||_group.type==="mn")){var child2=_group.children[0];child2 instanceof TextNode&&child2.text.length>0&&(child2.text=
child2.text.slice(0,1)+"̸"+child2.text.slice(1),groups.pop())}}}groups.push(_group),lastGroup=_group}return groups},buildExpressionRow=function(expression,options,isOrdgroup){return makeRow(buildExpression2(expression,options,isOrdgroup))},buildGroup2=function(group,options){if(!group)return new mathMLTree.MathNode("mrow");if(_mathmlGroupBuilders[group.type]){var result=_mathmlGroupBuilders[group.type](group,options);return result}else throw new ParseError2("Got group of unknown type: '"+group.
type+"'")};function buildMathML(tree,texExpression,options,isDisplayMode,forMathmlOnly){var expression=buildExpression2(tree,options),wrapper;expression.length===1&&expression[0]instanceof MathNode&&utils.contains(["mrow","mtable"],expression[0].type)?wrapper=expression[0]:wrapper=new mathMLTree.MathNode("mrow",expression);var annotation=new mathMLTree.MathNode("annotation",[new mathMLTree.TextNode(texExpression)]);annotation.setAttribute("encoding","application/x-tex");var semantics=new mathMLTree.
MathNode("semantics",[wrapper,annotation]),math2=new mathMLTree.MathNode("math",[semantics]);math2.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),isDisplayMode&&math2.setAttribute("display","block");var wrapperClass=forMathmlOnly?"katex":"katex-mathml";return buildCommon.makeSpan([wrapperClass],[math2])}var optionsFromSettings=function(settings){return new Options({style:settings.displayMode?Style$1.DISPLAY:Style$1.TEXT,maxSize:settings.maxSize,minRuleThickness:settings.minRuleThickness})},
displayWrap=function(node2,settings){if(settings.displayMode){var classes=["katex-display"];settings.leqno&&classes.push("leqno"),settings.fleqn&&classes.push("fleqn"),node2=buildCommon.makeSpan(classes,[node2])}return node2},buildTree=function(tree,expression,settings){var options=optionsFromSettings(settings),katexNode;if(settings.output==="mathml")return buildMathML(tree,expression,options,settings.displayMode,!0);if(settings.output==="html"){var htmlNode=buildHTML(tree,options);katexNode=buildCommon.
makeSpan(["katex"],[htmlNode])}else{var mathMLNode=buildMathML(tree,expression,options,settings.displayMode,!1),_htmlNode=buildHTML(tree,options);katexNode=buildCommon.makeSpan(["katex"],[mathMLNode,_htmlNode])}return displayWrap(katexNode,settings)},buildHTMLTree=function(tree,expression,settings){var options=optionsFromSettings(settings),htmlNode=buildHTML(tree,options),katexNode=buildCommon.makeSpan(["katex"],[htmlNode]);return displayWrap(katexNode,settings)},stretchyCodePoint={widehat:"^",widecheck:"\
ˇ",widetilde:"~",utilde:"~",overleftarrow:"←",underleftarrow:"←",xleftarrow:"←",overrightarrow:"→",underrightarrow:"→",xrightarrow:"→",underbrace:"⏟",overbrace:"⏞",overgroup:"⏠",undergroup:"⏡",overleftrightarrow:"↔",underleftrightarrow:"↔",xleftrightarrow:"↔",Overrightarrow:"⇒",xRightarrow:"⇒",overleftharpoon:"↼",xleftharpoonup:"↼",overrightharpoon:"⇀",xrightharpoonup:"⇀",xLeftarrow:"⇐",xLeftrightarrow:"⇔",xhookleftarrow:"↩",xhookrightarrow:"↪",xmapsto:"\
↦",xrightharpoondown:"⇁",xleftharpoondown:"↽",xrightleftharpoons:"⇌",xleftrightharpoons:"⇋",xtwoheadleftarrow:"↞",xtwoheadrightarrow:"↠",xlongequal:"=",xtofrom:"⇄",xrightleftarrows:"⇄",xrightequilibrium:"⇌",xleftequilibrium:"⇋","\\cdrightarrow":"→","\\cdleftarrow":"←","\\cdlongequal":"="},mathMLnode=function(label){var node2=new mathMLTree.MathNode("mo",[new mathMLTree.TextNode(stretchyCodePoint[label.replace(/^\\/,"")])]);return node2.setAttribute("stretchy","true"),node2},
katexImagesData={overrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],overleftarrow:[["leftarrow"],.888,522,"xMinYMin"],underrightarrow:[["rightarrow"],.888,522,"xMaxYMin"],underleftarrow:[["leftarrow"],.888,522,"xMinYMin"],xrightarrow:[["rightarrow"],1.469,522,"xMaxYMin"],"\\cdrightarrow":[["rightarrow"],3,522,"xMaxYMin"],xleftarrow:[["leftarrow"],1.469,522,"xMinYMin"],"\\cdleftarrow":[["leftarrow"],3,522,"xMinYMin"],Overrightarrow:[["doublerightarrow"],.888,560,"xMaxYMin"],xRightarrow:[["double\
rightarrow"],1.526,560,"xMaxYMin"],xLeftarrow:[["doubleleftarrow"],1.526,560,"xMinYMin"],overleftharpoon:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoonup:[["leftharpoon"],.888,522,"xMinYMin"],xleftharpoondown:[["leftharpoondown"],.888,522,"xMinYMin"],overrightharpoon:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoonup:[["rightharpoon"],.888,522,"xMaxYMin"],xrightharpoondown:[["rightharpoondown"],.888,522,"xMaxYMin"],xlongequal:[["longequal"],.888,334,"xMinYMin"],"\\cdlongequal":[["longequ\
al"],3,334,"xMinYMin"],xtwoheadleftarrow:[["twoheadleftarrow"],.888,334,"xMinYMin"],xtwoheadrightarrow:[["twoheadrightarrow"],.888,334,"xMaxYMin"],overleftrightarrow:[["leftarrow","rightarrow"],.888,522],overbrace:[["leftbrace","midbrace","rightbrace"],1.6,548],underbrace:[["leftbraceunder","midbraceunder","rightbraceunder"],1.6,548],underleftrightarrow:[["leftarrow","rightarrow"],.888,522],xleftrightarrow:[["leftarrow","rightarrow"],1.75,522],xLeftrightarrow:[["doubleleftarrow","doublerightarro\
w"],1.75,560],xrightleftharpoons:[["leftharpoondownplus","rightharpoonplus"],1.75,716],xleftrightharpoons:[["leftharpoonplus","rightharpoondownplus"],1.75,716],xhookleftarrow:[["leftarrow","righthook"],1.08,522],xhookrightarrow:[["lefthook","rightarrow"],1.08,522],overlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],underlinesegment:[["leftlinesegment","rightlinesegment"],.888,522],overgroup:[["leftgroup","rightgroup"],.888,342],undergroup:[["leftgroupunder","rightgroupunder"],.888,
342],xmapsto:[["leftmapsto","rightarrow"],1.5,522],xtofrom:[["leftToFrom","rightToFrom"],1.75,528],xrightleftarrows:[["baraboveleftarrow","rightarrowabovebar"],1.75,901],xrightequilibrium:[["baraboveshortleftharpoon","rightharpoonaboveshortbar"],1.75,716],xleftequilibrium:[["shortbaraboveleftharpoon","shortrightharpoonabovebar"],1.75,716]},groupLength=function(arg){return arg.type==="ordgroup"?arg.body.length:1},svgSpan=function(group,options){function buildSvgSpan_(){var viewBoxWidth=4e5,label=group.
label.slice(1);if(utils.contains(["widehat","widecheck","widetilde","utilde"],label)){var grp=group,numChars=groupLength(grp.base),viewBoxHeight,pathName,_height;if(numChars>5)label==="widehat"||label==="widecheck"?(viewBoxHeight=420,viewBoxWidth=2364,_height=.42,pathName=label+"4"):(viewBoxHeight=312,viewBoxWidth=2340,_height=.34,pathName="tilde4");else{var imgIndex=[1,1,2,2,3,3][numChars];label==="widehat"||label==="widecheck"?(viewBoxWidth=[0,1062,2364,2364,2364][imgIndex],viewBoxHeight=[0,239,
300,360,420][imgIndex],_height=[0,.24,.3,.3,.36,.42][imgIndex],pathName=label+imgIndex):(viewBoxWidth=[0,600,1033,2339,2340][imgIndex],viewBoxHeight=[0,260,286,306,312][imgIndex],_height=[0,.26,.286,.3,.306,.34][imgIndex],pathName="tilde"+imgIndex)}var path2=new PathNode(pathName),svgNode=new SvgNode([path2],{width:"100%",height:makeEm(_height),viewBox:"0 0 "+viewBoxWidth+" "+viewBoxHeight,preserveAspectRatio:"none"});return{span:buildCommon.makeSvgSpan([],[svgNode],options),minWidth:0,height:_height}}else{
var spans=[],data=katexImagesData[label],[paths,_minWidth,_viewBoxHeight]=data,_height2=_viewBoxHeight/1e3,numSvgChildren=paths.length,widthClasses,aligns;if(numSvgChildren===1){var align1=data[3];widthClasses=["hide-tail"],aligns=[align1]}else if(numSvgChildren===2)widthClasses=["halfarrow-left","halfarrow-right"],aligns=["xMinYMin","xMaxYMin"];else if(numSvgChildren===3)widthClasses=["brace-left","brace-center","brace-right"],aligns=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Corr\
ect katexImagesData or update code here to support
                    `+numSvgChildren+" children.");for(var i=0;i<numSvgChildren;i++){var _path=new PathNode(paths[i]),_svgNode=new SvgNode([_path],{width:"400em",height:makeEm(_height2),viewBox:"0 0 "+viewBoxWidth+" "+_viewBoxHeight,preserveAspectRatio:aligns[i]+" slice"}),_span=buildCommon.makeSvgSpan([widthClasses[i]],[_svgNode],options);if(numSvgChildren===1)return{span:_span,minWidth:_minWidth,height:_height2};_span.style.height=makeEm(_height2),spans.push(_span)}return{span:buildCommon.makeSpan(
["stretchy"],spans,options),minWidth:_minWidth,height:_height2}}}var{span,minWidth,height}=buildSvgSpan_();return span.height=height,span.style.height=makeEm(height),minWidth>0&&(span.style.minWidth=makeEm(minWidth)),span},encloseSpan=function(inner2,label,topPad,bottomPad,options){var img,totalHeight=inner2.height+inner2.depth+topPad+bottomPad;if(/fbox|color|angl/.test(label)){if(img=buildCommon.makeSpan(["stretchy",label],[],options),label==="fbox"){var color=options.color&&options.getColor();
color&&(img.style.borderColor=color)}}else{var lines=[];/^[bx]cancel$/.test(label)&&lines.push(new LineNode({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(label)&&lines.push(new LineNode({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var svgNode=new SvgNode(lines,{width:"100%",height:makeEm(totalHeight)});img=buildCommon.makeSvgSpan([],[svgNode],options)}return img.height=totalHeight,img.style.height=makeEm(totalHeight),img},stretchy={encloseSpan,
mathMLnode,svgSpan};function assertNodeType(node2,type2){if(!node2||node2.type!==type2)throw new Error("Expected node of type "+type2+", but got "+(node2?"node of type "+node2.type:String(node2)));return node2}function assertSymbolNodeType(node2){var typedNode=checkSymbolNodeType(node2);if(!typedNode)throw new Error("Expected node of symbol group type, but got "+(node2?"node of type "+node2.type:String(node2)));return typedNode}function checkSymbolNodeType(node2){return node2&&(node2.type==="ato\
m"||NON_ATOMS.hasOwnProperty(node2.type))?node2:null}var htmlBuilder$a=(grp,options)=>{var base2,group,supSubGroup;grp&&grp.type==="supsub"?(group=assertNodeType(grp.base,"accent"),base2=group.base,grp.base=base2,supSubGroup=assertSpan(buildGroup$1(grp,options)),grp.base=group):(group=assertNodeType(grp,"accent"),base2=group.base);var body2=buildGroup$1(base2,options.havingCrampedStyle()),mustShift=group.isShifty&&utils.isCharacterBox(base2),skew=0;if(mustShift){var baseChar=utils.getBaseElem(base2),
baseGroup=buildGroup$1(baseChar,options.havingCrampedStyle());skew=assertSymbolDomNode(baseGroup).skew}var accentBelow=group.label==="\\c",clearance=accentBelow?body2.height+body2.depth:Math.min(body2.height,options.fontMetrics().xHeight),accentBody;if(group.isStretchy)accentBody=stretchy.svgSpan(group,options),accentBody=buildCommon.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:body2},{type:"elem",elem:accentBody,wrapperClasses:["svg-align"],wrapperStyle:skew>0?{width:"cal\
c(100% - "+makeEm(2*skew)+")",marginLeft:makeEm(2*skew)}:void 0}]},options);else{var accent2,width;group.label==="\\vec"?(accent2=buildCommon.staticSvg("vec",options),width=buildCommon.svgData.vec[1]):(accent2=buildCommon.makeOrd({mode:group.mode,text:group.label},options,"textord"),accent2=assertSymbolDomNode(accent2),accent2.italic=0,width=accent2.width,accentBelow&&(clearance+=accent2.depth)),accentBody=buildCommon.makeSpan(["accent-body"],[accent2]);var accentFull=group.label==="\\textcircled";
accentFull&&(accentBody.classes.push("accent-full"),clearance=body2.height);var left=skew;accentFull||(left-=width/2),accentBody.style.left=makeEm(left),group.label==="\\textcircled"&&(accentBody.style.top=".2em"),accentBody=buildCommon.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:body2},{type:"kern",size:-clearance},{type:"elem",elem:accentBody}]},options)}var accentWrap=buildCommon.makeSpan(["mord","accent"],[accentBody],options);return supSubGroup?(supSubGroup.children[0]=
accentWrap,supSubGroup.height=Math.max(accentWrap.height,supSubGroup.height),supSubGroup.classes[0]="mord",supSubGroup):accentWrap},mathmlBuilder$9=(group,options)=>{var accentNode=group.isStretchy?stretchy.mathMLnode(group.label):new mathMLTree.MathNode("mo",[makeText(group.label,group.mode)]),node2=new mathMLTree.MathNode("mover",[buildGroup2(group.base,options),accentNode]);return node2.setAttribute("accent","true"),node2},NON_STRETCHY_ACCENT_REGEX=new RegExp(["\\acute","\\grave","\\ddot","\\t\
ilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(accent2=>"\\"+accent2).join("|"));defineFunction({type:"accent",names:["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring","\\widecheck","\\widehat","\\widetilde","\\overrightarrow","\\overleftarrow","\\Overrightarrow","\\overleftrightarrow","\\overgroup","\\overlinesegment","\\overleftharpoon","\\overrightharpoon"],props:{numArgs:1},handler:(context,args)=>{var base2=normalizeArgument(
args[0]),isStretchy=!NON_STRETCHY_ACCENT_REGEX.test(context.funcName),isShifty=!isStretchy||context.funcName==="\\widehat"||context.funcName==="\\widetilde"||context.funcName==="\\widecheck";return{type:"accent",mode:context.parser.mode,label:context.funcName,isStretchy,isShifty,base:base2}},htmlBuilder:htmlBuilder$a,mathmlBuilder:mathmlBuilder$9});defineFunction({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,
allowedInMath:!0,argTypes:["primitive"]},handler:(context,args)=>{var base2=args[0],mode=context.parser.mode;return mode==="math"&&(context.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+context.funcName+" works only in text mode"),mode="text"),{type:"accent",mode,label:context.funcName,isStretchy:!1,isShifty:!0,base:base2}},htmlBuilder:htmlBuilder$a,mathmlBuilder:mathmlBuilder$9});defineFunction({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleft\
rightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:(_ref,args)=>{var{parser,funcName}=_ref,base2=args[0];return{type:"accentUnder",mode:parser.mode,label:funcName,base:base2}},htmlBuilder:(group,options)=>{var innerGroup=buildGroup$1(group.base,options),accentBody=stretchy.svgSpan(group,options),kern=group.label==="\\utilde"?.12:0,vlist=buildCommon.makeVList({positionType:"top",positionData:innerGroup.height,children:[{type:"elem",elem:accentBody,wrapperClasses:[
"svg-align"]},{type:"kern",size:kern},{type:"elem",elem:innerGroup}]},options);return buildCommon.makeSpan(["mord","accentunder"],[vlist],options)},mathmlBuilder:(group,options)=>{var accentNode=stretchy.mathMLnode(group.label),node2=new mathMLTree.MathNode("munder",[buildGroup2(group.base,options),accentNode]);return node2.setAttribute("accentunder","true"),node2}});var paddedNode=group=>{var node2=new mathMLTree.MathNode("mpadded",group?[group]:[]);return node2.setAttribute("width","+0.6em"),node2.
setAttribute("lspace","0.3em"),node2};defineFunction({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrig\
htarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(_ref,args,optArgs){var{parser,funcName}=_ref;return{type:"xArrow",mode:parser.mode,label:funcName,body:args[0],below:optArgs[0]}},htmlBuilder(group,options){var style2=options.style,newOptions=options.havingStyle(style2.sup()),upperGroup=buildCommon.wrapFragment(buildGroup$1(group.body,newOptions,options),options),arrowPrefix=group.label.slice(0,2)==="\\x"?"x":"cd";upperGroup.classes.push(arrowPrefix+"-arro\
w-pad");var lowerGroup;group.below&&(newOptions=options.havingStyle(style2.sub()),lowerGroup=buildCommon.wrapFragment(buildGroup$1(group.below,newOptions,options),options),lowerGroup.classes.push(arrowPrefix+"-arrow-pad"));var arrowBody=stretchy.svgSpan(group,options),arrowShift=-options.fontMetrics().axisHeight+.5*arrowBody.height,upperShift=-options.fontMetrics().axisHeight-.5*arrowBody.height-.111;(upperGroup.depth>.25||group.label==="\\xleftequilibrium")&&(upperShift-=upperGroup.depth);var vlist;
if(lowerGroup){var lowerShift=-options.fontMetrics().axisHeight+lowerGroup.height+.5*arrowBody.height+.111;vlist=buildCommon.makeVList({positionType:"individualShift",children:[{type:"elem",elem:upperGroup,shift:upperShift},{type:"elem",elem:arrowBody,shift:arrowShift},{type:"elem",elem:lowerGroup,shift:lowerShift}]},options)}else vlist=buildCommon.makeVList({positionType:"individualShift",children:[{type:"elem",elem:upperGroup,shift:upperShift},{type:"elem",elem:arrowBody,shift:arrowShift}]},options);
return vlist.children[0].children[0].children[1].classes.push("svg-align"),buildCommon.makeSpan(["mrel","x-arrow"],[vlist],options)},mathmlBuilder(group,options){var arrowNode=stretchy.mathMLnode(group.label);arrowNode.setAttribute("minsize",group.label.charAt(0)==="x"?"1.75em":"3.0em");var node2;if(group.body){var upperNode=paddedNode(buildGroup2(group.body,options));if(group.below){var lowerNode=paddedNode(buildGroup2(group.below,options));node2=new mathMLTree.MathNode("munderover",[arrowNode,
lowerNode,upperNode])}else node2=new mathMLTree.MathNode("mover",[arrowNode,upperNode])}else if(group.below){var _lowerNode=paddedNode(buildGroup2(group.below,options));node2=new mathMLTree.MathNode("munder",[arrowNode,_lowerNode])}else node2=paddedNode(),node2=new mathMLTree.MathNode("mover",[arrowNode,node2]);return node2}});var makeSpan2=buildCommon.makeSpan;function htmlBuilder$9(group,options){var elements=buildExpression$1(group.body,options,!0);return makeSpan2([group.mclass],elements,options)}
function mathmlBuilder$8(group,options){var node2,inner2=buildExpression2(group.body,options);return group.mclass==="minner"?node2=new mathMLTree.MathNode("mpadded",inner2):group.mclass==="mord"?group.isCharacterBox?(node2=inner2[0],node2.type="mi"):node2=new mathMLTree.MathNode("mi",inner2):(group.isCharacterBox?(node2=inner2[0],node2.type="mo"):node2=new mathMLTree.MathNode("mo",inner2),group.mclass==="mbin"?(node2.attributes.lspace="0.22em",node2.attributes.rspace="0.22em"):group.mclass==="mp\
unct"?(node2.attributes.lspace="0em",node2.attributes.rspace="0.17em"):group.mclass==="mopen"||group.mclass==="mclose"?(node2.attributes.lspace="0em",node2.attributes.rspace="0em"):group.mclass==="minner"&&(node2.attributes.lspace="0.0556em",node2.attributes.width="+0.1111em")),node2}defineFunction({type:"mclass",names:["\\mathord","\\mathbin","\\mathrel","\\mathopen","\\mathclose","\\mathpunct","\\mathinner"],props:{numArgs:1,primitive:!0},handler(_ref,args){var{parser,funcName}=_ref,body2=args[0];
return{type:"mclass",mode:parser.mode,mclass:"m"+funcName.slice(5),body:ordargument(body2),isCharacterBox:utils.isCharacterBox(body2)}},htmlBuilder:htmlBuilder$9,mathmlBuilder:mathmlBuilder$8});var binrelClass=arg=>{var atom=arg.type==="ordgroup"&&arg.body.length?arg.body[0]:arg;return atom.type==="atom"&&(atom.family==="bin"||atom.family==="rel")?"m"+atom.family:"mord"};defineFunction({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(_ref2,args){var{parser}=_ref2;return{type:"mclass",
mode:parser.mode,mclass:binrelClass(args[0]),body:ordargument(args[1]),isCharacterBox:utils.isCharacterBox(args[1])}}});defineFunction({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(_ref3,args){var{parser,funcName}=_ref3,baseArg=args[1],shiftedArg=args[0],mclass;funcName!=="\\stackrel"?mclass=binrelClass(baseArg):mclass="mrel";var baseOp={type:"op",mode:baseArg.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:funcName!=="\\\
stackrel",body:ordargument(baseArg)},supsub={type:"supsub",mode:shiftedArg.mode,base:baseOp,sup:funcName==="\\underset"?null:shiftedArg,sub:funcName==="\\underset"?shiftedArg:null};return{type:"mclass",mode:parser.mode,mclass,body:[supsub],isCharacterBox:utils.isCharacterBox(supsub)}},htmlBuilder:htmlBuilder$9,mathmlBuilder:mathmlBuilder$8});defineFunction({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(_ref,args){var{parser}=_ref;return{type:"pmb",mode:parser.mode,mclass:binrelClass(
args[0]),body:ordargument(args[0])}},htmlBuilder(group,options){var elements=buildExpression$1(group.body,options,!0),node2=buildCommon.makeSpan([group.mclass],elements,options);return node2.style.textShadow="0.02em 0.01em 0.04px",node2},mathmlBuilder(group,style2){var inner2=buildExpression2(group.body,style2),node2=new mathMLTree.MathNode("mstyle",inner2);return node2.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),node2}});var cdArrowFunctionName={">":"\\\\cdrightarrow","<":"\\\\cdlef\
tarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},newCell=()=>({type:"styling",body:[],mode:"math",style:"display"}),isStartOfArrow=node2=>node2.type==="textord"&&node2.text==="@",isLabelEnd=(node2,endChar)=>(node2.type==="mathord"||node2.type==="atom")&&node2.text===endChar;function cdArrow(arrowChar,labels,parser){var funcName=cdArrowFunctionName[arrowChar];switch(funcName){case"\\\\cdrightarrow":case"\\\\cdleftarrow":return parser.callFunction(funcName,[
labels[0]],[labels[1]]);case"\\uparrow":case"\\downarrow":{var leftLabel=parser.callFunction("\\\\cdleft",[labels[0]],[]),bareArrow={type:"atom",text:funcName,mode:"math",family:"rel"},sizedArrow=parser.callFunction("\\Big",[bareArrow],[]),rightLabel=parser.callFunction("\\\\cdright",[labels[1]],[]),arrowGroup={type:"ordgroup",mode:"math",body:[leftLabel,sizedArrow,rightLabel]};return parser.callFunction("\\\\cdparent",[arrowGroup],[])}case"\\\\cdlongequal":return parser.callFunction("\\\\cdlongeq\
ual",[],[]);case"\\Vert":{var arrow2={type:"textord",text:"\\Vert",mode:"math"};return parser.callFunction("\\Big",[arrow2],[])}default:return{type:"textord",text:" ",mode:"math"}}}function parseCD(parser){var parsedRows=[];for(parser.gullet.beginGroup(),parser.gullet.macros.set("\\cr","\\\\\\relax"),parser.gullet.beginGroup();;){parsedRows.push(parser.parseExpression(!1,"\\\\")),parser.gullet.endGroup(),parser.gullet.beginGroup();var next2=parser.fetch().text;if(next2==="&"||next2==="\\\\")parser.
consume();else if(next2==="\\end"){parsedRows[parsedRows.length-1].length===0&&parsedRows.pop();break}else throw new ParseError2("Expected \\\\ or \\cr or \\end",parser.nextToken)}for(var row2=[],body2=[row2],i=0;i<parsedRows.length;i++){for(var rowNodes=parsedRows[i],cell2=newCell(),j=0;j<rowNodes.length;j++)if(!isStartOfArrow(rowNodes[j]))cell2.body.push(rowNodes[j]);else{row2.push(cell2),j+=1;var arrowChar=assertSymbolNodeType(rowNodes[j]).text,labels=new Array(2);if(labels[0]={type:"ordgroup",
mode:"math",body:[]},labels[1]={type:"ordgroup",mode:"math",body:[]},!("=|.".indexOf(arrowChar)>-1))if("<>AV".indexOf(arrowChar)>-1)for(var labelNum=0;labelNum<2;labelNum++){for(var inLabel=!0,k=j+1;k<rowNodes.length;k++){if(isLabelEnd(rowNodes[k],arrowChar)){inLabel=!1,j=k;break}if(isStartOfArrow(rowNodes[k]))throw new ParseError2("Missing a "+arrowChar+" character to complete a CD arrow.",rowNodes[k]);labels[labelNum].body.push(rowNodes[k])}if(inLabel)throw new ParseError2("Missing a "+arrowChar+
" character to complete a CD arrow.",rowNodes[j])}else throw new ParseError2('Expected one of "<>AV=|." after @',rowNodes[j]);var arrow2=cdArrow(arrowChar,labels,parser),wrappedArrow={type:"styling",body:[arrow2],mode:"math",style:"display"};row2.push(wrappedArrow),cell2=newCell()}i%2===0?row2.push(cell2):row2.shift(),row2=[],body2.push(row2)}parser.gullet.endGroup(),parser.gullet.endGroup();var cols=new Array(body2[0].length).fill({type:"align",align:"c",pregap:.25,postgap:.25});return{type:"ar\
ray",mode:"math",body:body2,arraystretch:1,addJot:!0,rowGaps:[null],cols,colSeparationType:"CD",hLinesBeforeRow:new Array(body2.length+1).fill([])}}defineFunction({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(_ref,args){var{parser,funcName}=_ref;return{type:"cdlabel",mode:parser.mode,side:funcName.slice(4),label:args[0]}},htmlBuilder(group,options){var newOptions=options.havingStyle(options.style.sup()),label=buildCommon.wrapFragment(buildGroup$1(group.label,newOptions,
options),options);return label.classes.push("cd-label-"+group.side),label.style.bottom=makeEm(.8-label.depth),label.height=0,label.depth=0,label},mathmlBuilder(group,options){var label=new mathMLTree.MathNode("mrow",[buildGroup2(group.label,options)]);return label=new mathMLTree.MathNode("mpadded",[label]),label.setAttribute("width","0"),group.side==="left"&&label.setAttribute("lspace","-1width"),label.setAttribute("voffset","0.7em"),label=new mathMLTree.MathNode("mstyle",[label]),label.setAttribute(
"displaystyle","false"),label.setAttribute("scriptlevel","1"),label}});defineFunction({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(_ref2,args){var{parser}=_ref2;return{type:"cdlabelparent",mode:parser.mode,fragment:args[0]}},htmlBuilder(group,options){var parent=buildCommon.wrapFragment(buildGroup$1(group.fragment,options),options);return parent.classes.push("cd-vert-arrow"),parent},mathmlBuilder(group,options){return new mathMLTree.MathNode("mrow",[buildGroup2(group.fragment,
options)])}});defineFunction({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(_ref,args){for(var{parser}=_ref,arg=assertNodeType(args[0],"ordgroup"),group=arg.body,number2="",i=0;i<group.length;i++){var node2=assertNodeType(group[i],"textord");number2+=node2.text}var code2=parseInt(number2),text2;if(isNaN(code2))throw new ParseError2("\\@char has non-numeric argument "+number2);if(code2<0||code2>=1114111)throw new ParseError2("\\@char with invalid code point "+number2);
return code2<=65535?text2=String.fromCharCode(code2):(code2-=65536,text2=String.fromCharCode((code2>>10)+55296,(code2&1023)+56320)),{type:"textord",mode:parser.mode,text:text2}}});var htmlBuilder$8=(group,options)=>{var elements=buildExpression$1(group.body,options.withColor(group.color),!1);return buildCommon.makeFragment(elements)},mathmlBuilder$7=(group,options)=>{var inner2=buildExpression2(group.body,options.withColor(group.color)),node2=new mathMLTree.MathNode("mstyle",inner2);return node2.
setAttribute("mathcolor",group.color),node2};defineFunction({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(_ref,args){var{parser}=_ref,color=assertNodeType(args[0],"color-token").color,body2=args[1];return{type:"color",mode:parser.mode,color,body:ordargument(body2)}},htmlBuilder:htmlBuilder$8,mathmlBuilder:mathmlBuilder$7});defineFunction({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(_ref2,args){
var{parser,breakOnTokenText}=_ref2,color=assertNodeType(args[0],"color-token").color;parser.gullet.macros.set("\\current@color",color);var body2=parser.parseExpression(!0,breakOnTokenText);return{type:"color",mode:parser.mode,color,body:body2}},htmlBuilder:htmlBuilder$8,mathmlBuilder:mathmlBuilder$7});defineFunction({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(_ref,args,optArgs){var{parser}=_ref,size2=parser.gullet.future().text==="["?parser.parseSizeGroup(
!0):null,newLine=!parser.settings.displayMode||!parser.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:parser.mode,newLine,size:size2&&assertNodeType(size2,"size").value}},htmlBuilder(group,options){var span=buildCommon.makeSpan(["mspace"],[],options);return group.newLine&&(span.classes.push("newline"),group.size&&(span.style.marginTop=makeEm(calculateSize(group.size,options)))),span},mathmlBuilder(group,options){
var node2=new mathMLTree.MathNode("mspace");return group.newLine&&(node2.setAttribute("linebreak","newline"),group.size&&node2.setAttribute("height",makeEm(calculateSize(group.size,options)))),node2}});var globalMap={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},checkControlSequence=tok=>{var name=tok.text;if(/^(?:[\\{}$&#^_]|EOF)$/.
test(name))throw new ParseError2("Expected a control sequence",tok);return name},getRHS=parser=>{var tok=parser.gullet.popToken();return tok.text==="="&&(tok=parser.gullet.popToken(),tok.text===" "&&(tok=parser.gullet.popToken())),tok},letCommand=(parser,name,tok,global2)=>{var macro=parser.gullet.macros.get(tok.text);macro==null&&(tok.noexpand=!0,macro={tokens:[tok],numArgs:0,unexpandable:!parser.gullet.isExpandable(tok.text)}),parser.gullet.macros.set(name,macro,global2)};defineFunction({type:"\
internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(_ref){var{parser,funcName}=_ref;parser.consumeSpaces();var token2=parser.fetch();if(globalMap[token2.text])return(funcName==="\\global"||funcName==="\\\\globallong")&&(token2.text=globalMap[token2.text]),assertNodeType(parser.parseFunction(),"internal");throw new ParseError2("Invalid token after macro prefix",token2)}});defineFunction({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{
numArgs:0,allowedInText:!0,primitive:!0},handler(_ref2){var{parser,funcName}=_ref2,tok=parser.gullet.popToken(),name=tok.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(name))throw new ParseError2("Expected a control sequence",tok);for(var numArgs=0,insert,delimiters2=[[]];parser.gullet.future().text!=="{";)if(tok=parser.gullet.popToken(),tok.text==="#"){if(parser.gullet.future().text==="{"){insert=parser.gullet.future(),delimiters2[numArgs].push("{");break}if(tok=parser.gullet.popToken(),!/^[1-9]$/.test(tok.
text))throw new ParseError2('Invalid argument number "'+tok.text+'"');if(parseInt(tok.text)!==numArgs+1)throw new ParseError2('Argument number "'+tok.text+'" out of order');numArgs++,delimiters2.push([])}else{if(tok.text==="EOF")throw new ParseError2("Expected a macro definition");delimiters2[numArgs].push(tok.text)}var{tokens}=parser.gullet.consumeArg();return insert&&tokens.unshift(insert),(funcName==="\\edef"||funcName==="\\xdef")&&(tokens=parser.gullet.expandTokens(tokens),tokens.reverse()),
parser.gullet.macros.set(name,{tokens,numArgs,delimiters:delimiters2},funcName===globalMap[funcName]),{type:"internal",mode:parser.mode}}});defineFunction({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(_ref3){var{parser,funcName}=_ref3,name=checkControlSequence(parser.gullet.popToken());parser.gullet.consumeSpaces();var tok=getRHS(parser);return letCommand(parser,name,tok,funcName==="\\\\globallet"),{type:"internal",mode:parser.mode}}});defineFunction(
{type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(_ref4){var{parser,funcName}=_ref4,name=checkControlSequence(parser.gullet.popToken()),middle=parser.gullet.popToken(),tok=parser.gullet.popToken();return letCommand(parser,name,tok,funcName==="\\\\globalfuture"),parser.gullet.pushToken(tok),parser.gullet.pushToken(middle),{type:"internal",mode:parser.mode}}});var getMetrics=function(symbol,font,mode){var replace2=symbols.math[symbol]&&
symbols.math[symbol].replace,metrics=getCharacterMetrics(replace2||symbol,font,mode);if(!metrics)throw new Error("Unsupported symbol "+symbol+" and font size "+font+".");return metrics},styleWrap=function(delim,toStyle,options,classes){var newOptions=options.havingBaseStyle(toStyle),span=buildCommon.makeSpan(classes.concat(newOptions.sizingClasses(options)),[delim],options),delimSizeMultiplier=newOptions.sizeMultiplier/options.sizeMultiplier;return span.height*=delimSizeMultiplier,span.depth*=delimSizeMultiplier,
span.maxFontSize=newOptions.sizeMultiplier,span},centerSpan=function(span,options,style2){var newOptions=options.havingBaseStyle(style2),shift2=(1-options.sizeMultiplier/newOptions.sizeMultiplier)*options.fontMetrics().axisHeight;span.classes.push("delimcenter"),span.style.top=makeEm(shift2),span.height-=shift2,span.depth+=shift2},makeSmallDelim=function(delim,style2,center,options,mode,classes){var text2=buildCommon.makeSymbol(delim,"Main-Regular",mode,options),span=styleWrap(text2,style2,options,
classes);return center&&centerSpan(span,options,style2),span},mathrmSize=function(value,size2,mode,options){return buildCommon.makeSymbol(value,"Size"+size2+"-Regular",mode,options)},makeLargeDelim=function(delim,size2,center,options,mode,classes){var inner2=mathrmSize(delim,size2,mode,options),span=styleWrap(buildCommon.makeSpan(["delimsizing","size"+size2],[inner2],options),Style$1.TEXT,options,classes);return center&&centerSpan(span,options,Style$1.TEXT),span},makeGlyphSpan=function(symbol,font,mode){
var sizeClass;font==="Size1-Regular"?sizeClass="delim-size1":sizeClass="delim-size4";var corner=buildCommon.makeSpan(["delimsizinginner",sizeClass],[buildCommon.makeSpan([],[buildCommon.makeSymbol(symbol,font,mode)])]);return{type:"elem",elem:corner}},makeInner=function(ch,height,options){var width=fontMetricsData["Size4-Regular"][ch.charCodeAt(0)]?fontMetricsData["Size4-Regular"][ch.charCodeAt(0)][4]:fontMetricsData["Size1-Regular"][ch.charCodeAt(0)][4],path2=new PathNode("inner",innerPath(ch,Math.
round(1e3*height))),svgNode=new SvgNode([path2],{width:makeEm(width),height:makeEm(height),style:"width:"+makeEm(width),viewBox:"0 0 "+1e3*width+" "+Math.round(1e3*height),preserveAspectRatio:"xMinYMin"}),span=buildCommon.makeSvgSpan([],[svgNode],options);return span.height=height,span.style.height=makeEm(height),span.style.width=makeEm(width),{type:"elem",elem:span}},lapInEms=.008,lap={type:"kern",size:-1*lapInEms},verts=["|","\\lvert","\\rvert","\\vert"],doubleVerts=["\\|","\\lVert","\\rVert",
"\\Vert"],makeStackedDelim=function(delim,heightTotal,center,options,mode,classes){var top,middle,repeat,bottom,svgLabel="",viewBoxWidth=0;top=repeat=bottom=delim,middle=null;var font="Size1-Regular";delim==="\\uparrow"?repeat=bottom="⏐":delim==="\\Uparrow"?repeat=bottom="‖":delim==="\\downarrow"?top=repeat="⏐":delim==="\\Downarrow"?top=repeat="‖":delim==="\\updownarrow"?(top="\\uparrow",repeat="⏐",bottom="\\downarrow"):delim==="\\Updownarrow"?(top="\\Uparrow",repeat="‖",bottom="\\Dow\
narrow"):utils.contains(verts,delim)?(repeat="∣",svgLabel="vert",viewBoxWidth=333):utils.contains(doubleVerts,delim)?(repeat="∥",svgLabel="doublevert",viewBoxWidth=556):delim==="["||delim==="\\lbrack"?(top="⎡",repeat="⎢",bottom="⎣",font="Size4-Regular",svgLabel="lbrack",viewBoxWidth=667):delim==="]"||delim==="\\rbrack"?(top="⎤",repeat="⎥",bottom="⎦",font="Size4-Regular",svgLabel="rbrack",viewBoxWidth=667):delim==="\\lfloor"||delim==="⌊"?(repeat=top="⎢",bottom="⎣",font="Size\
4-Regular",svgLabel="lfloor",viewBoxWidth=667):delim==="\\lceil"||delim==="⌈"?(top="⎡",repeat=bottom="⎢",font="Size4-Regular",svgLabel="lceil",viewBoxWidth=667):delim==="\\rfloor"||delim==="⌋"?(repeat=top="⎥",bottom="⎦",font="Size4-Regular",svgLabel="rfloor",viewBoxWidth=667):delim==="\\rceil"||delim==="⌉"?(top="⎤",repeat=bottom="⎥",font="Size4-Regular",svgLabel="rceil",viewBoxWidth=667):delim==="("||delim==="\\lparen"?(top="⎛",repeat="⎜",bottom="⎝",font="Size4-Regular",svgLabel=
"lparen",viewBoxWidth=875):delim===")"||delim==="\\rparen"?(top="⎞",repeat="⎟",bottom="⎠",font="Size4-Regular",svgLabel="rparen",viewBoxWidth=875):delim==="\\{"||delim==="\\lbrace"?(top="⎧",middle="⎨",bottom="⎩",repeat="⎪",font="Size4-Regular"):delim==="\\}"||delim==="\\rbrace"?(top="⎫",middle="⎬",bottom="⎭",repeat="⎪",font="Size4-Regular"):delim==="\\lgroup"||delim==="⟮"?(top="⎧",bottom="⎩",repeat="⎪",font="Size4-Regular"):delim==="\\rgroup"||delim==="⟯"?(top="⎫",
bottom="⎭",repeat="⎪",font="Size4-Regular"):delim==="\\lmoustache"||delim==="⎰"?(top="⎧",bottom="⎭",repeat="⎪",font="Size4-Regular"):(delim==="\\rmoustache"||delim==="⎱")&&(top="⎫",bottom="⎩",repeat="⎪",font="Size4-Regular");var topMetrics=getMetrics(top,font,mode),topHeightTotal=topMetrics.height+topMetrics.depth,repeatMetrics=getMetrics(repeat,font,mode),repeatHeightTotal=repeatMetrics.height+repeatMetrics.depth,bottomMetrics=getMetrics(bottom,font,mode),bottomHeightTotal=bottomMetrics.
height+bottomMetrics.depth,middleHeightTotal=0,middleFactor=1;if(middle!==null){var middleMetrics=getMetrics(middle,font,mode);middleHeightTotal=middleMetrics.height+middleMetrics.depth,middleFactor=2}var minHeight=topHeightTotal+bottomHeightTotal+middleHeightTotal,repeatCount=Math.max(0,Math.ceil((heightTotal-minHeight)/(middleFactor*repeatHeightTotal))),realHeightTotal=minHeight+repeatCount*middleFactor*repeatHeightTotal,axisHeight=options.fontMetrics().axisHeight;center&&(axisHeight*=options.
sizeMultiplier);var depth=realHeightTotal/2-axisHeight,stack=[];if(svgLabel.length>0){var midHeight=realHeightTotal-topHeightTotal-bottomHeightTotal,viewBoxHeight=Math.round(realHeightTotal*1e3),pathStr=tallDelim(svgLabel,Math.round(midHeight*1e3)),path2=new PathNode(svgLabel,pathStr),width=(viewBoxWidth/1e3).toFixed(3)+"em",height=(viewBoxHeight/1e3).toFixed(3)+"em",svg2=new SvgNode([path2],{width,height,viewBox:"0 0 "+viewBoxWidth+" "+viewBoxHeight}),wrapper=buildCommon.makeSvgSpan([],[svg2],options);
wrapper.height=viewBoxHeight/1e3,wrapper.style.width=width,wrapper.style.height=height,stack.push({type:"elem",elem:wrapper})}else{if(stack.push(makeGlyphSpan(bottom,font,mode)),stack.push(lap),middle===null){var innerHeight=realHeightTotal-topHeightTotal-bottomHeightTotal+2*lapInEms;stack.push(makeInner(repeat,innerHeight,options))}else{var _innerHeight=(realHeightTotal-topHeightTotal-bottomHeightTotal-middleHeightTotal)/2+2*lapInEms;stack.push(makeInner(repeat,_innerHeight,options)),stack.push(
lap),stack.push(makeGlyphSpan(middle,font,mode)),stack.push(lap),stack.push(makeInner(repeat,_innerHeight,options))}stack.push(lap),stack.push(makeGlyphSpan(top,font,mode))}var newOptions=options.havingBaseStyle(Style$1.TEXT),inner2=buildCommon.makeVList({positionType:"bottom",positionData:depth,children:stack},newOptions);return styleWrap(buildCommon.makeSpan(["delimsizing","mult"],[inner2],newOptions),Style$1.TEXT,options,classes)},vbPad=80,emPad=.08,sqrtSvg=function(sqrtName,height,viewBoxHeight,extraVinculum,options){
var path2=sqrtPath(sqrtName,extraVinculum,viewBoxHeight),pathNode=new PathNode(sqrtName,path2),svg2=new SvgNode([pathNode],{width:"400em",height:makeEm(height),viewBox:"0 0 400000 "+viewBoxHeight,preserveAspectRatio:"xMinYMin slice"});return buildCommon.makeSvgSpan(["hide-tail"],[svg2],options)},makeSqrtImage=function(height,options){var newOptions=options.havingBaseSizing(),delim=traverseSequence("\\surd",height*newOptions.sizeMultiplier,stackLargeDelimiterSequence,newOptions),sizeMultiplier=newOptions.
sizeMultiplier,extraVinculum=Math.max(0,options.minRuleThickness-options.fontMetrics().sqrtRuleThickness),span,spanHeight=0,texHeight=0,viewBoxHeight=0,advanceWidth;return delim.type==="small"?(viewBoxHeight=1e3+1e3*extraVinculum+vbPad,height<1?sizeMultiplier=1:height<1.4&&(sizeMultiplier=.7),spanHeight=(1+extraVinculum+emPad)/sizeMultiplier,texHeight=(1+extraVinculum)/sizeMultiplier,span=sqrtSvg("sqrtMain",spanHeight,viewBoxHeight,extraVinculum,options),span.style.minWidth="0.853em",advanceWidth=
.833/sizeMultiplier):delim.type==="large"?(viewBoxHeight=(1e3+vbPad)*sizeToMaxHeight[delim.size],texHeight=(sizeToMaxHeight[delim.size]+extraVinculum)/sizeMultiplier,spanHeight=(sizeToMaxHeight[delim.size]+extraVinculum+emPad)/sizeMultiplier,span=sqrtSvg("sqrtSize"+delim.size,spanHeight,viewBoxHeight,extraVinculum,options),span.style.minWidth="1.02em",advanceWidth=1/sizeMultiplier):(spanHeight=height+extraVinculum+emPad,texHeight=height+extraVinculum,viewBoxHeight=Math.floor(1e3*height+extraVinculum)+
vbPad,span=sqrtSvg("sqrtTall",spanHeight,viewBoxHeight,extraVinculum,options),span.style.minWidth="0.742em",advanceWidth=1.056),span.height=texHeight,span.style.height=makeEm(spanHeight),{span,advanceWidth,ruleWidth:(options.fontMetrics().sqrtRuleThickness+extraVinculum)*sizeMultiplier}},stackLargeDelimiters=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"],stackAlwaysDelimiters=[
"\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"],stackNeverDelimiters=["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],sizeToMaxHeight=[0,1.2,1.8,2.4,3],makeSizedDelim=function(delim,size2,options,mode,classes){if(delim==="<"||delim==="\\lt"||delim==="⟨"?delim="\\langle":(delim===">"||delim==="\\gt"||delim===
"⟩")&&(delim="\\rangle"),utils.contains(stackLargeDelimiters,delim)||utils.contains(stackNeverDelimiters,delim))return makeLargeDelim(delim,size2,!1,options,mode,classes);if(utils.contains(stackAlwaysDelimiters,delim))return makeStackedDelim(delim,sizeToMaxHeight[size2],!1,options,mode,classes);throw new ParseError2("Illegal delimiter: '"+delim+"'")},stackNeverDelimiterSequence=[{type:"small",style:Style$1.SCRIPTSCRIPT},{type:"small",style:Style$1.SCRIPT},{type:"small",style:Style$1.TEXT},{type:"\
large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],stackAlwaysDelimiterSequence=[{type:"small",style:Style$1.SCRIPTSCRIPT},{type:"small",style:Style$1.SCRIPT},{type:"small",style:Style$1.TEXT},{type:"stack"}],stackLargeDelimiterSequence=[{type:"small",style:Style$1.SCRIPTSCRIPT},{type:"small",style:Style$1.SCRIPT},{type:"small",style:Style$1.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],delimTypeToFont=function(type2){
if(type2.type==="small")return"Main-Regular";if(type2.type==="large")return"Size"+type2.size+"-Regular";if(type2.type==="stack")return"Size4-Regular";throw new Error("Add support for delim type '"+type2.type+"' here.")},traverseSequence=function(delim,height,sequence,options){for(var start2=Math.min(2,3-options.style.size),i=start2;i<sequence.length&&sequence[i].type!=="stack";i++){var metrics=getMetrics(delim,delimTypeToFont(sequence[i]),"math"),heightDepth=metrics.height+metrics.depth;if(sequence[i].
type==="small"){var newOptions=options.havingBaseStyle(sequence[i].style);heightDepth*=newOptions.sizeMultiplier}if(heightDepth>height)return sequence[i]}return sequence[sequence.length-1]},makeCustomSizedDelim=function(delim,height,center,options,mode,classes){delim==="<"||delim==="\\lt"||delim==="⟨"?delim="\\langle":(delim===">"||delim==="\\gt"||delim==="⟩")&&(delim="\\rangle");var sequence;utils.contains(stackNeverDelimiters,delim)?sequence=stackNeverDelimiterSequence:utils.contains(stackLargeDelimiters,
delim)?sequence=stackLargeDelimiterSequence:sequence=stackAlwaysDelimiterSequence;var delimType=traverseSequence(delim,height,sequence,options);return delimType.type==="small"?makeSmallDelim(delim,delimType.style,center,options,mode,classes):delimType.type==="large"?makeLargeDelim(delim,delimType.size,center,options,mode,classes):makeStackedDelim(delim,height,center,options,mode,classes)},makeLeftRightDelim=function(delim,height,depth,options,mode,classes){var axisHeight=options.fontMetrics().axisHeight*
options.sizeMultiplier,delimiterFactor=901,delimiterExtend=5/options.fontMetrics().ptPerEm,maxDistFromAxis=Math.max(height-axisHeight,depth+axisHeight),totalHeight=Math.max(maxDistFromAxis/500*delimiterFactor,2*maxDistFromAxis-delimiterExtend);return makeCustomSizedDelim(delim,totalHeight,!0,options,mode,classes)},delimiter={sqrtImage:makeSqrtImage,sizedDelim:makeSizedDelim,sizeToMaxHeight,customSizedDelim:makeCustomSizedDelim,leftRightDelim:makeLeftRightDelim},delimiterSizes={"\\bigl":{mclass:"\
mopen",size:1},"\\Bigl":{mclass:"mopen",size:2},"\\biggl":{mclass:"mopen",size:3},"\\Biggl":{mclass:"mopen",size:4},"\\bigr":{mclass:"mclose",size:1},"\\Bigr":{mclass:"mclose",size:2},"\\biggr":{mclass:"mclose",size:3},"\\Biggr":{mclass:"mclose",size:4},"\\bigm":{mclass:"mrel",size:1},"\\Bigm":{mclass:"mrel",size:2},"\\biggm":{mclass:"mrel",size:3},"\\Biggm":{mclass:"mrel",size:4},"\\big":{mclass:"mord",size:1},"\\Big":{mclass:"mord",size:2},"\\bigg":{mclass:"mord",size:3},"\\Bigg":{mclass:"mord",
size:4}},delimiters=["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","<",">","\\langle","⟨","\\rangle","⟩","\\lt","\\gt","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱","/","\\backslash","|","\\vert","\\|","\\Vert","\\uparrow","\\Uparrow","\\downarrow","\\Downarrow","\\updownarrow","\\Updownarrow","."];function checkDelimiter(delim,context){
var symDelim=checkSymbolNodeType(delim);if(symDelim&&utils.contains(delimiters,symDelim.text))return symDelim;throw symDelim?new ParseError2("Invalid delimiter '"+symDelim.text+"' after '"+context.funcName+"'",delim):new ParseError2("Invalid delimiter type '"+delim.type+"'",delim)}defineFunction({type:"delimsizing",names:["\\bigl","\\Bigl","\\biggl","\\Biggl","\\bigr","\\Bigr","\\biggr","\\Biggr","\\bigm","\\Bigm","\\biggm","\\Biggm","\\big","\\Big","\\bigg","\\Bigg"],props:{numArgs:1,argTypes:[
"primitive"]},handler:(context,args)=>{var delim=checkDelimiter(args[0],context);return{type:"delimsizing",mode:context.parser.mode,size:delimiterSizes[context.funcName].size,mclass:delimiterSizes[context.funcName].mclass,delim:delim.text}},htmlBuilder:(group,options)=>group.delim==="."?buildCommon.makeSpan([group.mclass]):delimiter.sizedDelim(group.delim,group.size,options,group.mode,[group.mclass]),mathmlBuilder:group=>{var children=[];group.delim!=="."&&children.push(makeText(group.delim,group.
mode));var node2=new mathMLTree.MathNode("mo",children);group.mclass==="mopen"||group.mclass==="mclose"?node2.setAttribute("fence","true"):node2.setAttribute("fence","false"),node2.setAttribute("stretchy","true");var size2=makeEm(delimiter.sizeToMaxHeight[group.size]);return node2.setAttribute("minsize",size2),node2.setAttribute("maxsize",size2),node2}});function assertParsed(group){if(!group.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}defineFunction({type:"leftrigh\
t-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:(context,args)=>{var color=context.parser.gullet.macros.get("\\current@color");if(color&&typeof color!="string")throw new ParseError2("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:context.parser.mode,delim:checkDelimiter(args[0],context).text,color}}});defineFunction({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(context,args)=>{var delim=checkDelimiter(args[0],context),
parser=context.parser;++parser.leftrightDepth;var body2=parser.parseExpression(!1);--parser.leftrightDepth,parser.expect("\\right",!1);var right=assertNodeType(parser.parseFunction(),"leftright-right");return{type:"leftright",mode:parser.mode,body:body2,left:delim.text,right:right.delim,rightColor:right.color}},htmlBuilder:(group,options)=>{assertParsed(group);for(var inner2=buildExpression$1(group.body,options,!0,["mopen","mclose"]),innerHeight=0,innerDepth=0,hadMiddle=!1,i=0;i<inner2.length;i++)
inner2[i].isMiddle?hadMiddle=!0:(innerHeight=Math.max(inner2[i].height,innerHeight),innerDepth=Math.max(inner2[i].depth,innerDepth));innerHeight*=options.sizeMultiplier,innerDepth*=options.sizeMultiplier;var leftDelim;if(group.left==="."?leftDelim=makeNullDelimiter(options,["mopen"]):leftDelim=delimiter.leftRightDelim(group.left,innerHeight,innerDepth,options,group.mode,["mopen"]),inner2.unshift(leftDelim),hadMiddle)for(var _i=1;_i<inner2.length;_i++){var middleDelim=inner2[_i],isMiddle=middleDelim.
isMiddle;isMiddle&&(inner2[_i]=delimiter.leftRightDelim(isMiddle.delim,innerHeight,innerDepth,isMiddle.options,group.mode,[]))}var rightDelim;if(group.right===".")rightDelim=makeNullDelimiter(options,["mclose"]);else{var colorOptions=group.rightColor?options.withColor(group.rightColor):options;rightDelim=delimiter.leftRightDelim(group.right,innerHeight,innerDepth,colorOptions,group.mode,["mclose"])}return inner2.push(rightDelim),buildCommon.makeSpan(["minner"],inner2,options)},mathmlBuilder:(group,options)=>{
assertParsed(group);var inner2=buildExpression2(group.body,options);if(group.left!=="."){var leftNode=new mathMLTree.MathNode("mo",[makeText(group.left,group.mode)]);leftNode.setAttribute("fence","true"),inner2.unshift(leftNode)}if(group.right!=="."){var rightNode=new mathMLTree.MathNode("mo",[makeText(group.right,group.mode)]);rightNode.setAttribute("fence","true"),group.rightColor&&rightNode.setAttribute("mathcolor",group.rightColor),inner2.push(rightNode)}return makeRow(inner2)}});defineFunction(
{type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(context,args)=>{var delim=checkDelimiter(args[0],context);if(!context.parser.leftrightDepth)throw new ParseError2("\\middle without preceding \\left",delim);return{type:"middle",mode:context.parser.mode,delim:delim.text}},htmlBuilder:(group,options)=>{var middleDelim;if(group.delim===".")middleDelim=makeNullDelimiter(options,[]);else{middleDelim=delimiter.sizedDelim(group.delim,1,options,group.mode,[]);var isMiddle={delim:group.
delim,options};middleDelim.isMiddle=isMiddle}return middleDelim},mathmlBuilder:(group,options)=>{var textNode=group.delim==="\\vert"||group.delim==="|"?makeText("|","text"):makeText(group.delim,group.mode),middleNode=new mathMLTree.MathNode("mo",[textNode]);return middleNode.setAttribute("fence","true"),middleNode.setAttribute("lspace","0.05em"),middleNode.setAttribute("rspace","0.05em"),middleNode}});var htmlBuilder$7=(group,options)=>{var inner2=buildCommon.wrapFragment(buildGroup$1(group.body,
options),options),label=group.label.slice(1),scale2=options.sizeMultiplier,img,imgShift=0,isSingleChar=utils.isCharacterBox(group.body);if(label==="sout")img=buildCommon.makeSpan(["stretchy","sout"]),img.height=options.fontMetrics().defaultRuleThickness/scale2,imgShift=-.5*options.fontMetrics().xHeight;else if(label==="phase"){var lineWeight=calculateSize({number:.6,unit:"pt"},options),clearance=calculateSize({number:.35,unit:"ex"},options),newOptions=options.havingBaseSizing();scale2=scale2/newOptions.
sizeMultiplier;var angleHeight=inner2.height+inner2.depth+lineWeight+clearance;inner2.style.paddingLeft=makeEm(angleHeight/2+lineWeight);var viewBoxHeight=Math.floor(1e3*angleHeight*scale2),path2=phasePath(viewBoxHeight),svgNode=new SvgNode([new PathNode("phase",path2)],{width:"400em",height:makeEm(viewBoxHeight/1e3),viewBox:"0 0 400000 "+viewBoxHeight,preserveAspectRatio:"xMinYMin slice"});img=buildCommon.makeSvgSpan(["hide-tail"],[svgNode],options),img.style.height=makeEm(angleHeight),imgShift=
inner2.depth+lineWeight+clearance}else{/cancel/.test(label)?isSingleChar||inner2.classes.push("cancel-pad"):label==="angl"?inner2.classes.push("anglpad"):inner2.classes.push("boxpad");var topPad=0,bottomPad=0,ruleThickness=0;/box/.test(label)?(ruleThickness=Math.max(options.fontMetrics().fboxrule,options.minRuleThickness),topPad=options.fontMetrics().fboxsep+(label==="colorbox"?0:ruleThickness),bottomPad=topPad):label==="angl"?(ruleThickness=Math.max(options.fontMetrics().defaultRuleThickness,options.
minRuleThickness),topPad=4*ruleThickness,bottomPad=Math.max(0,.25-inner2.depth)):(topPad=isSingleChar?.2:0,bottomPad=topPad),img=stretchy.encloseSpan(inner2,label,topPad,bottomPad,options),/fbox|boxed|fcolorbox/.test(label)?(img.style.borderStyle="solid",img.style.borderWidth=makeEm(ruleThickness)):label==="angl"&&ruleThickness!==.049&&(img.style.borderTopWidth=makeEm(ruleThickness),img.style.borderRightWidth=makeEm(ruleThickness)),imgShift=inner2.depth+bottomPad,group.backgroundColor&&(img.style.
backgroundColor=group.backgroundColor,group.borderColor&&(img.style.borderColor=group.borderColor))}var vlist;if(group.backgroundColor)vlist=buildCommon.makeVList({positionType:"individualShift",children:[{type:"elem",elem:img,shift:imgShift},{type:"elem",elem:inner2,shift:0}]},options);else{var classes=/cancel|phase/.test(label)?["svg-align"]:[];vlist=buildCommon.makeVList({positionType:"individualShift",children:[{type:"elem",elem:inner2,shift:0},{type:"elem",elem:img,shift:imgShift,wrapperClasses:classes}]},
options)}return/cancel/.test(label)&&(vlist.height=inner2.height,vlist.depth=inner2.depth),/cancel/.test(label)&&!isSingleChar?buildCommon.makeSpan(["mord","cancel-lap"],[vlist],options):buildCommon.makeSpan(["mord"],[vlist],options)},mathmlBuilder$6=(group,options)=>{var fboxsep=0,node2=new mathMLTree.MathNode(group.label.indexOf("colorbox")>-1?"mpadded":"menclose",[buildGroup2(group.body,options)]);switch(group.label){case"\\cancel":node2.setAttribute("notation","updiagonalstrike");break;case"\
\\bcancel":node2.setAttribute("notation","downdiagonalstrike");break;case"\\phase":node2.setAttribute("notation","phasorangle");break;case"\\sout":node2.setAttribute("notation","horizontalstrike");break;case"\\fbox":node2.setAttribute("notation","box");break;case"\\angl":node2.setAttribute("notation","actuarial");break;case"\\fcolorbox":case"\\colorbox":if(fboxsep=options.fontMetrics().fboxsep*options.fontMetrics().ptPerEm,node2.setAttribute("width","+"+2*fboxsep+"pt"),node2.setAttribute("height",
"+"+2*fboxsep+"pt"),node2.setAttribute("lspace",fboxsep+"pt"),node2.setAttribute("voffset",fboxsep+"pt"),group.label==="\\fcolorbox"){var thk=Math.max(options.fontMetrics().fboxrule,options.minRuleThickness);node2.setAttribute("style","border: "+thk+"em solid "+String(group.borderColor))}break;case"\\xcancel":node2.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return group.backgroundColor&&node2.setAttribute("mathbackground",group.backgroundColor),node2};defineFunction({type:"\
enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","text"]},handler(_ref,args,optArgs){var{parser,funcName}=_ref,color=assertNodeType(args[0],"color-token").color,body2=args[1];return{type:"enclose",mode:parser.mode,label:funcName,backgroundColor:color,body:body2}},htmlBuilder:htmlBuilder$7,mathmlBuilder:mathmlBuilder$6});defineFunction({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","text"]},handler(_ref2,args,optArgs){
var{parser,funcName}=_ref2,borderColor=assertNodeType(args[0],"color-token").color,backgroundColor=assertNodeType(args[1],"color-token").color,body2=args[2];return{type:"enclose",mode:parser.mode,label:funcName,backgroundColor,borderColor,body:body2}},htmlBuilder:htmlBuilder$7,mathmlBuilder:mathmlBuilder$6});defineFunction({type:"enclose",names:["\\fbox"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!0},handler(_ref3,args){var{parser}=_ref3;return{type:"enclose",mode:parser.mode,label:"\\fbox",
body:args[0]}}});defineFunction({type:"enclose",names:["\\cancel","\\bcancel","\\xcancel","\\sout","\\phase"],props:{numArgs:1},handler(_ref4,args){var{parser,funcName}=_ref4,body2=args[0];return{type:"enclose",mode:parser.mode,label:funcName,body:body2}},htmlBuilder:htmlBuilder$7,mathmlBuilder:mathmlBuilder$6});defineFunction({type:"enclose",names:["\\angl"],props:{numArgs:1,argTypes:["hbox"],allowedInText:!1},handler(_ref5,args){var{parser}=_ref5;return{type:"enclose",mode:parser.mode,label:"\\\
angl",body:args[0]}}});var _environments={};function defineEnvironment(_ref){for(var{type:type2,names:names2,props,handler,htmlBuilder:htmlBuilder3,mathmlBuilder:mathmlBuilder3}=_ref,data={type:type2,numArgs:props.numArgs||0,allowedInText:!1,numOptionalArgs:0,handler},i=0;i<names2.length;++i)_environments[names2[i]]=data;htmlBuilder3&&(_htmlGroupBuilders[type2]=htmlBuilder3),mathmlBuilder3&&(_mathmlGroupBuilders[type2]=mathmlBuilder3)}var _macros={};function defineMacro(name,body2){_macros[name]=
body2}function getHLines(parser){var hlineInfo=[];parser.consumeSpaces();var nxt=parser.fetch().text;for(nxt==="\\relax"&&(parser.consume(),parser.consumeSpaces(),nxt=parser.fetch().text);nxt==="\\hline"||nxt==="\\hdashline";)parser.consume(),hlineInfo.push(nxt==="\\hdashline"),parser.consumeSpaces(),nxt=parser.fetch().text;return hlineInfo}var validateAmsEnvironmentContext=context=>{var settings=context.parser.settings;if(!settings.displayMode)throw new ParseError2("{"+context.envName+"} can be\
 used only in display mode.")};function getAutoTag(name){if(name.indexOf("ed")===-1)return name.indexOf("*")===-1}function parseArray(parser,_ref,style2){var{hskipBeforeAndAfter,addJot,cols,arraystretch,colSeparationType,autoTag,singleRow,emptySingleRow,maxNumCols,leqno}=_ref;if(parser.gullet.beginGroup(),singleRow||parser.gullet.macros.set("\\cr","\\\\\\relax"),!arraystretch){var stretch=parser.gullet.expandMacroAsText("\\arraystretch");if(stretch==null)arraystretch=1;else if(arraystretch=parseFloat(
stretch),!arraystretch||arraystretch<0)throw new ParseError2("Invalid \\arraystretch: "+stretch)}parser.gullet.beginGroup();var row2=[],body2=[row2],rowGaps=[],hLinesBeforeRow=[],tags=autoTag!=null?[]:void 0;function beginRow(){autoTag&&parser.gullet.macros.set("\\@eqnsw","1",!0)}function endRow(){tags&&(parser.gullet.macros.get("\\df@tag")?(tags.push(parser.subparse([new Token("\\df@tag")])),parser.gullet.macros.set("\\df@tag",void 0,!0)):tags.push(!!autoTag&&parser.gullet.macros.get("\\@eqnsw")===
"1"))}for(beginRow(),hLinesBeforeRow.push(getHLines(parser));;){var cell2=parser.parseExpression(!1,singleRow?"\\end":"\\\\");parser.gullet.endGroup(),parser.gullet.beginGroup(),cell2={type:"ordgroup",mode:parser.mode,body:cell2},style2&&(cell2={type:"styling",mode:parser.mode,style:style2,body:[cell2]}),row2.push(cell2);var next2=parser.fetch().text;if(next2==="&"){if(maxNumCols&&row2.length===maxNumCols){if(singleRow||colSeparationType)throw new ParseError2("Too many tab characters: &",parser.
nextToken);parser.settings.reportNonstrict("textEnv","Too few columns specified in the {array} column argument.")}parser.consume()}else if(next2==="\\end"){endRow(),row2.length===1&&cell2.type==="styling"&&cell2.body[0].body.length===0&&(body2.length>1||!emptySingleRow)&&body2.pop(),hLinesBeforeRow.length<body2.length+1&&hLinesBeforeRow.push([]);break}else if(next2==="\\\\"){parser.consume();var size2=void 0;parser.gullet.future().text!==" "&&(size2=parser.parseSizeGroup(!0)),rowGaps.push(size2?
size2.value:null),endRow(),hLinesBeforeRow.push(getHLines(parser)),row2=[],body2.push(row2),beginRow()}else throw new ParseError2("Expected & or \\\\ or \\cr or \\end",parser.nextToken)}return parser.gullet.endGroup(),parser.gullet.endGroup(),{type:"array",mode:parser.mode,addJot,arraystretch,body:body2,cols,rowGaps,hskipBeforeAndAfter,hLinesBeforeRow,colSeparationType,tags,leqno}}function dCellStyle(envName){return envName.slice(0,1)==="d"?"display":"text"}var htmlBuilder$6=function(group,options){
var r2,c2,nr=group.body.length,hLinesBeforeRow=group.hLinesBeforeRow,nc=0,body2=new Array(nr),hlines=[],ruleThickness=Math.max(options.fontMetrics().arrayRuleWidth,options.minRuleThickness),pt=1/options.fontMetrics().ptPerEm,arraycolsep=5*pt;if(group.colSeparationType&&group.colSeparationType==="small"){var localMultiplier=options.havingStyle(Style$1.SCRIPT).sizeMultiplier;arraycolsep=.2778*(localMultiplier/options.sizeMultiplier)}var baselineskip=group.colSeparationType==="CD"?calculateSize({number:3,
unit:"ex"},options):12*pt,jot=3*pt,arrayskip=group.arraystretch*baselineskip,arstrutHeight=.7*arrayskip,arstrutDepth=.3*arrayskip,totalHeight=0;function setHLinePos(hlinesInGap){for(var i=0;i<hlinesInGap.length;++i)i>0&&(totalHeight+=.25),hlines.push({pos:totalHeight,isDashed:hlinesInGap[i]})}for(setHLinePos(hLinesBeforeRow[0]),r2=0;r2<group.body.length;++r2){var inrow=group.body[r2],height=arstrutHeight,depth=arstrutDepth;nc<inrow.length&&(nc=inrow.length);var outrow=new Array(inrow.length);for(c2=
0;c2<inrow.length;++c2){var elt=buildGroup$1(inrow[c2],options);depth<elt.depth&&(depth=elt.depth),height<elt.height&&(height=elt.height),outrow[c2]=elt}var rowGap=group.rowGaps[r2],gap=0;rowGap&&(gap=calculateSize(rowGap,options),gap>0&&(gap+=arstrutDepth,depth<gap&&(depth=gap),gap=0)),group.addJot&&(depth+=jot),outrow.height=height,outrow.depth=depth,totalHeight+=height,outrow.pos=totalHeight,totalHeight+=depth+gap,body2[r2]=outrow,setHLinePos(hLinesBeforeRow[r2+1])}var offset2=totalHeight/2+options.
fontMetrics().axisHeight,colDescriptions=group.cols||[],cols=[],colSep,colDescrNum,tagSpans=[];if(group.tags&&group.tags.some(tag2=>tag2))for(r2=0;r2<nr;++r2){var rw=body2[r2],shift2=rw.pos-offset2,tag=group.tags[r2],tagSpan=void 0;tag===!0?tagSpan=buildCommon.makeSpan(["eqn-num"],[],options):tag===!1?tagSpan=buildCommon.makeSpan([],[],options):tagSpan=buildCommon.makeSpan([],buildExpression$1(tag,options,!0),options),tagSpan.depth=rw.depth,tagSpan.height=rw.height,tagSpans.push({type:"elem",elem:tagSpan,
shift:shift2})}for(c2=0,colDescrNum=0;c2<nc||colDescrNum<colDescriptions.length;++c2,++colDescrNum){for(var colDescr=colDescriptions[colDescrNum]||{},firstSeparator=!0;colDescr.type==="separator";){if(firstSeparator||(colSep=buildCommon.makeSpan(["arraycolsep"],[]),colSep.style.width=makeEm(options.fontMetrics().doubleRuleSep),cols.push(colSep)),colDescr.separator==="|"||colDescr.separator===":"){var lineType=colDescr.separator==="|"?"solid":"dashed",separator=buildCommon.makeSpan(["vertical-sep\
arator"],[],options);separator.style.height=makeEm(totalHeight),separator.style.borderRightWidth=makeEm(ruleThickness),separator.style.borderRightStyle=lineType,separator.style.margin="0 "+makeEm(-ruleThickness/2);var _shift=totalHeight-offset2;_shift&&(separator.style.verticalAlign=makeEm(-_shift)),cols.push(separator)}else throw new ParseError2("Invalid separator type: "+colDescr.separator);colDescrNum++,colDescr=colDescriptions[colDescrNum]||{},firstSeparator=!1}if(!(c2>=nc)){var sepwidth=void 0;
(c2>0||group.hskipBeforeAndAfter)&&(sepwidth=utils.deflt(colDescr.pregap,arraycolsep),sepwidth!==0&&(colSep=buildCommon.makeSpan(["arraycolsep"],[]),colSep.style.width=makeEm(sepwidth),cols.push(colSep)));var col=[];for(r2=0;r2<nr;++r2){var row2=body2[r2],elem=row2[c2];if(elem){var _shift2=row2.pos-offset2;elem.depth=row2.depth,elem.height=row2.height,col.push({type:"elem",elem,shift:_shift2})}}col=buildCommon.makeVList({positionType:"individualShift",children:col},options),col=buildCommon.makeSpan(
["col-align-"+(colDescr.align||"c")],[col]),cols.push(col),(c2<nc-1||group.hskipBeforeAndAfter)&&(sepwidth=utils.deflt(colDescr.postgap,arraycolsep),sepwidth!==0&&(colSep=buildCommon.makeSpan(["arraycolsep"],[]),colSep.style.width=makeEm(sepwidth),cols.push(colSep)))}}if(body2=buildCommon.makeSpan(["mtable"],cols),hlines.length>0){for(var line=buildCommon.makeLineSpan("hline",options,ruleThickness),dashes=buildCommon.makeLineSpan("hdashline",options,ruleThickness),vListElems=[{type:"elem",elem:body2,
shift:0}];hlines.length>0;){var hline=hlines.pop(),lineShift=hline.pos-offset2;hline.isDashed?vListElems.push({type:"elem",elem:dashes,shift:lineShift}):vListElems.push({type:"elem",elem:line,shift:lineShift})}body2=buildCommon.makeVList({positionType:"individualShift",children:vListElems},options)}if(tagSpans.length===0)return buildCommon.makeSpan(["mord"],[body2],options);var eqnNumCol=buildCommon.makeVList({positionType:"individualShift",children:tagSpans},options);return eqnNumCol=buildCommon.
makeSpan(["tag"],[eqnNumCol],options),buildCommon.makeFragment([body2,eqnNumCol])},alignMap={c:"center ",l:"left ",r:"right "},mathmlBuilder$5=function(group,options){for(var tbl=[],glue=new mathMLTree.MathNode("mtd",[],["mtr-glue"]),tag=new mathMLTree.MathNode("mtd",[],["mml-eqn-num"]),i=0;i<group.body.length;i++){for(var rw=group.body[i],row2=[],j=0;j<rw.length;j++)row2.push(new mathMLTree.MathNode("mtd",[buildGroup2(rw[j],options)]));group.tags&&group.tags[i]&&(row2.unshift(glue),row2.push(glue),
group.leqno?row2.unshift(tag):row2.push(tag)),tbl.push(new mathMLTree.MathNode("mtr",row2))}var table2=new mathMLTree.MathNode("mtable",tbl),gap=group.arraystretch===.5?.1:.16+group.arraystretch-1+(group.addJot?.09:0);table2.setAttribute("rowspacing",makeEm(gap));var menclose="",align="";if(group.cols&&group.cols.length>0){var cols=group.cols,columnLines="",prevTypeWasAlign=!1,iStart=0,iEnd=cols.length;cols[0].type==="separator"&&(menclose+="top ",iStart=1),cols[cols.length-1].type==="separator"&&
(menclose+="bottom ",iEnd-=1);for(var _i=iStart;_i<iEnd;_i++)cols[_i].type==="align"?(align+=alignMap[cols[_i].align],prevTypeWasAlign&&(columnLines+="none "),prevTypeWasAlign=!0):cols[_i].type==="separator"&&prevTypeWasAlign&&(columnLines+=cols[_i].separator==="|"?"solid ":"dashed ",prevTypeWasAlign=!1);table2.setAttribute("columnalign",align.trim()),/[sd]/.test(columnLines)&&table2.setAttribute("columnlines",columnLines.trim())}if(group.colSeparationType==="align"){for(var _cols=group.cols||[],
spacing2="",_i2=1;_i2<_cols.length;_i2++)spacing2+=_i2%2?"0em ":"1em ";table2.setAttribute("columnspacing",spacing2.trim())}else group.colSeparationType==="alignat"||group.colSeparationType==="gather"?table2.setAttribute("columnspacing","0em"):group.colSeparationType==="small"?table2.setAttribute("columnspacing","0.2778em"):group.colSeparationType==="CD"?table2.setAttribute("columnspacing","0.5em"):table2.setAttribute("columnspacing","1em");var rowLines="",hlines=group.hLinesBeforeRow;menclose+=
hlines[0].length>0?"left ":"",menclose+=hlines[hlines.length-1].length>0?"right ":"";for(var _i3=1;_i3<hlines.length-1;_i3++)rowLines+=hlines[_i3].length===0?"none ":hlines[_i3][0]?"dashed ":"solid ";return/[sd]/.test(rowLines)&&table2.setAttribute("rowlines",rowLines.trim()),menclose!==""&&(table2=new mathMLTree.MathNode("menclose",[table2]),table2.setAttribute("notation",menclose.trim())),group.arraystretch&&group.arraystretch<1&&(table2=new mathMLTree.MathNode("mstyle",[table2]),table2.setAttribute(
"scriptlevel","1")),table2},alignedHandler=function(context,args){context.envName.indexOf("ed")===-1&&validateAmsEnvironmentContext(context);var cols=[],separationType=context.envName.indexOf("at")>-1?"alignat":"align",isSplit=context.envName==="split",res=parseArray(context.parser,{cols,addJot:!0,autoTag:isSplit?void 0:getAutoTag(context.envName),emptySingleRow:!0,colSeparationType:separationType,maxNumCols:isSplit?2:void 0,leqno:context.parser.settings.leqno},"display"),numMaths,numCols=0,emptyGroup={
type:"ordgroup",mode:context.mode,body:[]};if(args[0]&&args[0].type==="ordgroup"){for(var arg0="",i=0;i<args[0].body.length;i++){var textord2=assertNodeType(args[0].body[i],"textord");arg0+=textord2.text}numMaths=Number(arg0),numCols=numMaths*2}var isAligned=!numCols;res.body.forEach(function(row2){for(var _i4=1;_i4<row2.length;_i4+=2){var styling=assertNodeType(row2[_i4],"styling"),ordgroup=assertNodeType(styling.body[0],"ordgroup");ordgroup.body.unshift(emptyGroup)}if(isAligned)numCols<row2.length&&
(numCols=row2.length);else{var curMaths=row2.length/2;if(numMaths<curMaths)throw new ParseError2("Too many math in a row: "+("expected "+numMaths+", but got "+curMaths),row2[0])}});for(var _i5=0;_i5<numCols;++_i5){var align="r",pregap=0;_i5%2===1?align="l":_i5>0&&isAligned&&(pregap=1),cols[_i5]={type:"align",align,pregap,postgap:0}}return res.colSeparationType=isAligned?"align":"alignat",res};defineEnvironment({type:"array",names:["array","darray"],props:{numArgs:1},handler(context,args){var symNode=checkSymbolNodeType(
args[0]),colalign=symNode?[args[0]]:assertNodeType(args[0],"ordgroup").body,cols=colalign.map(function(nde){var node2=assertSymbolNodeType(nde),ca=node2.text;if("lcr".indexOf(ca)!==-1)return{type:"align",align:ca};if(ca==="|")return{type:"separator",separator:"|"};if(ca===":")return{type:"separator",separator:":"};throw new ParseError2("Unknown column alignment: "+ca,nde)}),res={cols,hskipBeforeAndAfter:!0,maxNumCols:cols.length};return parseArray(context.parser,res,dCellStyle(context.envName))},
htmlBuilder:htmlBuilder$6,mathmlBuilder:mathmlBuilder$5});defineEnvironment({type:"array",names:["matrix","pmatrix","bmatrix","Bmatrix","vmatrix","Vmatrix","matrix*","pmatrix*","bmatrix*","Bmatrix*","vmatrix*","Vmatrix*"],props:{numArgs:0},handler(context){var delimiters2={matrix:null,pmatrix:["(",")"],bmatrix:["[","]"],Bmatrix:["\\{","\\}"],vmatrix:["|","|"],Vmatrix:["\\Vert","\\Vert"]}[context.envName.replace("*","")],colAlign="c",payload={hskipBeforeAndAfter:!1,cols:[{type:"align",align:colAlign}]};
if(context.envName.charAt(context.envName.length-1)==="*"){var parser=context.parser;if(parser.consumeSpaces(),parser.fetch().text==="["){if(parser.consume(),parser.consumeSpaces(),colAlign=parser.fetch().text,"lcr".indexOf(colAlign)===-1)throw new ParseError2("Expected l or c or r",parser.nextToken);parser.consume(),parser.consumeSpaces(),parser.expect("]"),parser.consume(),payload.cols=[{type:"align",align:colAlign}]}}var res=parseArray(context.parser,payload,dCellStyle(context.envName)),numCols=Math.
max(0,...res.body.map(row2=>row2.length));return res.cols=new Array(numCols).fill({type:"align",align:colAlign}),delimiters2?{type:"leftright",mode:context.mode,body:[res],left:delimiters2[0],right:delimiters2[1],rightColor:void 0}:res},htmlBuilder:htmlBuilder$6,mathmlBuilder:mathmlBuilder$5});defineEnvironment({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(context){var payload={arraystretch:.5},res=parseArray(context.parser,payload,"script");return res.colSeparationType="small",res},
htmlBuilder:htmlBuilder$6,mathmlBuilder:mathmlBuilder$5});defineEnvironment({type:"array",names:["subarray"],props:{numArgs:1},handler(context,args){var symNode=checkSymbolNodeType(args[0]),colalign=symNode?[args[0]]:assertNodeType(args[0],"ordgroup").body,cols=colalign.map(function(nde){var node2=assertSymbolNodeType(nde),ca=node2.text;if("lc".indexOf(ca)!==-1)return{type:"align",align:ca};throw new ParseError2("Unknown column alignment: "+ca,nde)});if(cols.length>1)throw new ParseError2("{suba\
rray} can contain only one column");var res={cols,hskipBeforeAndAfter:!1,arraystretch:.5};if(res=parseArray(context.parser,res,"script"),res.body.length>0&&res.body[0].length>1)throw new ParseError2("{subarray} can contain only one column");return res},htmlBuilder:htmlBuilder$6,mathmlBuilder:mathmlBuilder$5});defineEnvironment({type:"array",names:["cases","dcases","rcases","drcases"],props:{numArgs:0},handler(context){var payload={arraystretch:1.2,cols:[{type:"align",align:"l",pregap:0,postgap:1},
{type:"align",align:"l",pregap:0,postgap:0}]},res=parseArray(context.parser,payload,dCellStyle(context.envName));return{type:"leftright",mode:context.mode,body:[res],left:context.envName.indexOf("r")>-1?".":"\\{",right:context.envName.indexOf("r")>-1?"\\}":".",rightColor:void 0}},htmlBuilder:htmlBuilder$6,mathmlBuilder:mathmlBuilder$5});defineEnvironment({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:alignedHandler,htmlBuilder:htmlBuilder$6,mathmlBuilder:mathmlBuilder$5});
defineEnvironment({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(context){utils.contains(["gather","gather*"],context.envName)&&validateAmsEnvironmentContext(context);var res={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:getAutoTag(context.envName),emptySingleRow:!0,leqno:context.parser.settings.leqno};return parseArray(context.parser,res,"display")},htmlBuilder:htmlBuilder$6,mathmlBuilder:mathmlBuilder$5});defineEnvironment({type:"a\
rray",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:alignedHandler,htmlBuilder:htmlBuilder$6,mathmlBuilder:mathmlBuilder$5});defineEnvironment({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(context){validateAmsEnvironmentContext(context);var res={autoTag:getAutoTag(context.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:context.parser.settings.leqno};return parseArray(context.parser,res,"display")},htmlBuilder:htmlBuilder$6,mathmlBuilder:mathmlBuilder$5});
defineEnvironment({type:"array",names:["CD"],props:{numArgs:0},handler(context){return validateAmsEnvironmentContext(context),parseCD(context.parser)},htmlBuilder:htmlBuilder$6,mathmlBuilder:mathmlBuilder$5});defineMacro("\\nonumber","\\gdef\\@eqnsw{0}");defineMacro("\\notag","\\nonumber");defineFunction({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(context,args){throw new ParseError2(context.funcName+" valid only within array environmen\
t")}});var environments=_environments;defineFunction({type:"environment",names:["\\begin","\\end"],props:{numArgs:1,argTypes:["text"]},handler(_ref,args){var{parser,funcName}=_ref,nameGroup=args[0];if(nameGroup.type!=="ordgroup")throw new ParseError2("Invalid environment name",nameGroup);for(var envName="",i=0;i<nameGroup.body.length;++i)envName+=assertNodeType(nameGroup.body[i],"textord").text;if(funcName==="\\begin"){if(!environments.hasOwnProperty(envName))throw new ParseError2("No such envir\
onment: "+envName,nameGroup);var env2=environments[envName],{args:_args,optArgs}=parser.parseArguments("\\begin{"+envName+"}",env2),context={mode:parser.mode,envName,parser},result=env2.handler(context,_args,optArgs);parser.expect("\\end",!1);var endNameToken=parser.nextToken,end=assertNodeType(parser.parseFunction(),"environment");if(end.name!==envName)throw new ParseError2("Mismatch: \\begin{"+envName+"} matched by \\end{"+end.name+"}",endNameToken);return result}return{type:"environment",mode:parser.
mode,name:envName,nameGroup}}});var htmlBuilder$5=(group,options)=>{var font=group.font,newOptions=options.withFont(font);return buildGroup$1(group.body,newOptions)},mathmlBuilder$4=(group,options)=>{var font=group.font,newOptions=options.withFont(font);return buildGroup2(group.body,newOptions)},fontAliases={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"};defineFunction({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathsfit","\\mathbb",
"\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:(_ref,args)=>{var{parser,funcName}=_ref,body2=normalizeArgument(args[0]),func=funcName;return func in fontAliases&&(func=fontAliases[func]),{type:"font",mode:parser.mode,font:func.slice(1),body:body2}},htmlBuilder:htmlBuilder$5,mathmlBuilder:mathmlBuilder$4});defineFunction({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:(_ref2,args)=>{var{parser}=_ref2,
body2=args[0],isCharacterBox3=utils.isCharacterBox(body2);return{type:"mclass",mode:parser.mode,mclass:binrelClass(body2),body:[{type:"font",mode:parser.mode,font:"boldsymbol",body:body2}],isCharacterBox:isCharacterBox3}}});defineFunction({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:(_ref3,args)=>{var{parser,funcName,breakOnTokenText}=_ref3,{mode}=parser,body2=parser.parseExpression(!0,breakOnTokenText),style2="math"+funcName.slice(1);
return{type:"font",mode,font:style2,body:{type:"ordgroup",mode:parser.mode,body:body2}}},htmlBuilder:htmlBuilder$5,mathmlBuilder:mathmlBuilder$4});var adjustStyle=(size2,originalStyle)=>{var style2=originalStyle;return size2==="display"?style2=style2.id>=Style$1.SCRIPT.id?style2.text():Style$1.DISPLAY:size2==="text"&&style2.size===Style$1.DISPLAY.size?style2=Style$1.TEXT:size2==="script"?style2=Style$1.SCRIPT:size2==="scriptscript"&&(style2=Style$1.SCRIPTSCRIPT),style2},htmlBuilder$4=(group,options)=>{
var style2=adjustStyle(group.size,options.style),nstyle=style2.fracNum(),dstyle=style2.fracDen(),newOptions;newOptions=options.havingStyle(nstyle);var numerm=buildGroup$1(group.numer,newOptions,options);if(group.continued){var hStrut=8.5/options.fontMetrics().ptPerEm,dStrut=3.5/options.fontMetrics().ptPerEm;numerm.height=numerm.height<hStrut?hStrut:numerm.height,numerm.depth=numerm.depth<dStrut?dStrut:numerm.depth}newOptions=options.havingStyle(dstyle);var denomm=buildGroup$1(group.denom,newOptions,
options),rule,ruleWidth,ruleSpacing;group.hasBarLine?(group.barSize?(ruleWidth=calculateSize(group.barSize,options),rule=buildCommon.makeLineSpan("frac-line",options,ruleWidth)):rule=buildCommon.makeLineSpan("frac-line",options),ruleWidth=rule.height,ruleSpacing=rule.height):(rule=null,ruleWidth=0,ruleSpacing=options.fontMetrics().defaultRuleThickness);var numShift,clearance,denomShift;style2.size===Style$1.DISPLAY.size||group.size==="display"?(numShift=options.fontMetrics().num1,ruleWidth>0?clearance=
3*ruleSpacing:clearance=7*ruleSpacing,denomShift=options.fontMetrics().denom1):(ruleWidth>0?(numShift=options.fontMetrics().num2,clearance=ruleSpacing):(numShift=options.fontMetrics().num3,clearance=3*ruleSpacing),denomShift=options.fontMetrics().denom2);var frac2;if(rule){var axisHeight=options.fontMetrics().axisHeight;numShift-numerm.depth-(axisHeight+.5*ruleWidth)<clearance&&(numShift+=clearance-(numShift-numerm.depth-(axisHeight+.5*ruleWidth))),axisHeight-.5*ruleWidth-(denomm.height-denomShift)<
clearance&&(denomShift+=clearance-(axisHeight-.5*ruleWidth-(denomm.height-denomShift)));var midShift=-(axisHeight-.5*ruleWidth);frac2=buildCommon.makeVList({positionType:"individualShift",children:[{type:"elem",elem:denomm,shift:denomShift},{type:"elem",elem:rule,shift:midShift},{type:"elem",elem:numerm,shift:-numShift}]},options)}else{var candidateClearance=numShift-numerm.depth-(denomm.height-denomShift);candidateClearance<clearance&&(numShift+=.5*(clearance-candidateClearance),denomShift+=.5*
(clearance-candidateClearance)),frac2=buildCommon.makeVList({positionType:"individualShift",children:[{type:"elem",elem:denomm,shift:denomShift},{type:"elem",elem:numerm,shift:-numShift}]},options)}newOptions=options.havingStyle(style2),frac2.height*=newOptions.sizeMultiplier/options.sizeMultiplier,frac2.depth*=newOptions.sizeMultiplier/options.sizeMultiplier;var delimSize;style2.size===Style$1.DISPLAY.size?delimSize=options.fontMetrics().delim1:style2.size===Style$1.SCRIPTSCRIPT.size?delimSize=
options.havingStyle(Style$1.SCRIPT).fontMetrics().delim2:delimSize=options.fontMetrics().delim2;var leftDelim,rightDelim;return group.leftDelim==null?leftDelim=makeNullDelimiter(options,["mopen"]):leftDelim=delimiter.customSizedDelim(group.leftDelim,delimSize,!0,options.havingStyle(style2),group.mode,["mopen"]),group.continued?rightDelim=buildCommon.makeSpan([]):group.rightDelim==null?rightDelim=makeNullDelimiter(options,["mclose"]):rightDelim=delimiter.customSizedDelim(group.rightDelim,delimSize,
!0,options.havingStyle(style2),group.mode,["mclose"]),buildCommon.makeSpan(["mord"].concat(newOptions.sizingClasses(options)),[leftDelim,buildCommon.makeSpan(["mfrac"],[frac2]),rightDelim],options)},mathmlBuilder$3=(group,options)=>{var node2=new mathMLTree.MathNode("mfrac",[buildGroup2(group.numer,options),buildGroup2(group.denom,options)]);if(!group.hasBarLine)node2.setAttribute("linethickness","0px");else if(group.barSize){var ruleWidth=calculateSize(group.barSize,options);node2.setAttribute(
"linethickness",makeEm(ruleWidth))}var style2=adjustStyle(group.size,options.style);if(style2.size!==options.style.size){node2=new mathMLTree.MathNode("mstyle",[node2]);var isDisplay=style2.size===Style$1.DISPLAY.size?"true":"false";node2.setAttribute("displaystyle",isDisplay),node2.setAttribute("scriptlevel","0")}if(group.leftDelim!=null||group.rightDelim!=null){var withDelims=[];if(group.leftDelim!=null){var leftOp=new mathMLTree.MathNode("mo",[new mathMLTree.TextNode(group.leftDelim.replace("\
\\",""))]);leftOp.setAttribute("fence","true"),withDelims.push(leftOp)}if(withDelims.push(node2),group.rightDelim!=null){var rightOp=new mathMLTree.MathNode("mo",[new mathMLTree.TextNode(group.rightDelim.replace("\\",""))]);rightOp.setAttribute("fence","true"),withDelims.push(rightOp)}return makeRow(withDelims)}return node2};defineFunction({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},
handler:(_ref,args)=>{var{parser,funcName}=_ref,numer=args[0],denom=args[1],hasBarLine,leftDelim=null,rightDelim=null,size2="auto";switch(funcName){case"\\dfrac":case"\\frac":case"\\tfrac":hasBarLine=!0;break;case"\\\\atopfrac":hasBarLine=!1;break;case"\\dbinom":case"\\binom":case"\\tbinom":hasBarLine=!1,leftDelim="(",rightDelim=")";break;case"\\\\bracefrac":hasBarLine=!1,leftDelim="\\{",rightDelim="\\}";break;case"\\\\brackfrac":hasBarLine=!1,leftDelim="[",rightDelim="]";break;default:throw new Error(
"Unrecognized genfrac command")}switch(funcName){case"\\dfrac":case"\\dbinom":size2="display";break;case"\\tfrac":case"\\tbinom":size2="text";break}return{type:"genfrac",mode:parser.mode,continued:!1,numer,denom,hasBarLine,leftDelim,rightDelim,size:size2,barSize:null}},htmlBuilder:htmlBuilder$4,mathmlBuilder:mathmlBuilder$3});defineFunction({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:(_ref2,args)=>{var{parser,funcName}=_ref2,numer=args[0],denom=args[1];return{type:"genfrac",mode:parser.
mode,continued:!0,numer,denom,hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}}});defineFunction({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(_ref3){var{parser,funcName,token:token2}=_ref3,replaceWith;switch(funcName){case"\\over":replaceWith="\\frac";break;case"\\choose":replaceWith="\\binom";break;case"\\atop":replaceWith="\\\\atopfrac";break;case"\\brace":replaceWith="\\\\bracefrac";break;case"\\brack":replaceWith=
"\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:parser.mode,replaceWith,token:token2}}});var stylArray=["display","text","script","scriptscript"],delimFromValue=function(delimString){var delim=null;return delimString.length>0&&(delim=delimString,delim=delim==="."?null:delim),delim};defineFunction({type:"genfrac",names:["\\genfrac"],props:{numArgs:6,allowedInArgument:!0,argTypes:["math","math","size","text","math","math"]},handler(_ref4,args){
var{parser}=_ref4,numer=args[4],denom=args[5],leftNode=normalizeArgument(args[0]),leftDelim=leftNode.type==="atom"&&leftNode.family==="open"?delimFromValue(leftNode.text):null,rightNode=normalizeArgument(args[1]),rightDelim=rightNode.type==="atom"&&rightNode.family==="close"?delimFromValue(rightNode.text):null,barNode=assertNodeType(args[2],"size"),hasBarLine,barSize=null;barNode.isBlank?hasBarLine=!0:(barSize=barNode.value,hasBarLine=barSize.number>0);var size2="auto",styl=args[3];if(styl.type===
"ordgroup"){if(styl.body.length>0){var textOrd=assertNodeType(styl.body[0],"textord");size2=stylArray[Number(textOrd.text)]}}else styl=assertNodeType(styl,"textord"),size2=stylArray[Number(styl.text)];return{type:"genfrac",mode:parser.mode,numer,denom,continued:!1,hasBarLine,barSize,leftDelim,rightDelim,size:size2}},htmlBuilder:htmlBuilder$4,mathmlBuilder:mathmlBuilder$3});defineFunction({type:"infix",names:["\\above"],props:{numArgs:1,argTypes:["size"],infix:!0},handler(_ref5,args){var{parser,funcName,
token:token2}=_ref5;return{type:"infix",mode:parser.mode,replaceWith:"\\\\abovefrac",size:assertNodeType(args[0],"size").value,token:token2}}});defineFunction({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(_ref6,args)=>{var{parser,funcName}=_ref6,numer=args[0],barSize=assert(assertNodeType(args[1],"infix").size),denom=args[2],hasBarLine=barSize.number>0;return{type:"genfrac",mode:parser.mode,numer,denom,continued:!1,hasBarLine,barSize,leftDelim:null,
rightDelim:null,size:"auto"}},htmlBuilder:htmlBuilder$4,mathmlBuilder:mathmlBuilder$3});var htmlBuilder$3=(grp,options)=>{var style2=options.style,supSubGroup,group;grp.type==="supsub"?(supSubGroup=grp.sup?buildGroup$1(grp.sup,options.havingStyle(style2.sup()),options):buildGroup$1(grp.sub,options.havingStyle(style2.sub()),options),group=assertNodeType(grp.base,"horizBrace")):group=assertNodeType(grp,"horizBrace");var body2=buildGroup$1(group.base,options.havingBaseStyle(Style$1.DISPLAY)),braceBody=stretchy.
svgSpan(group,options),vlist;if(group.isOver?(vlist=buildCommon.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:body2},{type:"kern",size:.1},{type:"elem",elem:braceBody}]},options),vlist.children[0].children[0].children[1].classes.push("svg-align")):(vlist=buildCommon.makeVList({positionType:"bottom",positionData:body2.depth+.1+braceBody.height,children:[{type:"elem",elem:braceBody},{type:"kern",size:.1},{type:"elem",elem:body2}]},options),vlist.children[0].children[0].children[0].
classes.push("svg-align")),supSubGroup){var vSpan=buildCommon.makeSpan(["mord",group.isOver?"mover":"munder"],[vlist],options);group.isOver?vlist=buildCommon.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:vSpan},{type:"kern",size:.2},{type:"elem",elem:supSubGroup}]},options):vlist=buildCommon.makeVList({positionType:"bottom",positionData:vSpan.depth+.2+supSubGroup.height+supSubGroup.depth,children:[{type:"elem",elem:supSubGroup},{type:"kern",size:.2},{type:"elem",elem:vSpan}]},
options)}return buildCommon.makeSpan(["mord",group.isOver?"mover":"munder"],[vlist],options)},mathmlBuilder$2=(group,options)=>{var accentNode=stretchy.mathMLnode(group.label);return new mathMLTree.MathNode(group.isOver?"mover":"munder",[buildGroup2(group.base,options),accentNode])};defineFunction({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(_ref,args){var{parser,funcName}=_ref;return{type:"horizBrace",mode:parser.mode,label:funcName,isOver:/^\\over/.test(funcName),
base:args[0]}},htmlBuilder:htmlBuilder$3,mathmlBuilder:mathmlBuilder$2});defineFunction({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(_ref,args)=>{var{parser}=_ref,body2=args[1],href=assertNodeType(args[0],"url").url;return parser.settings.isTrusted({command:"\\href",url:href})?{type:"href",mode:parser.mode,href,body:ordargument(body2)}:parser.formatUnsupportedCmd("\\href")},htmlBuilder:(group,options)=>{var elements=buildExpression$1(group.
body,options,!1);return buildCommon.makeAnchor(group.href,[],elements,options)},mathmlBuilder:(group,options)=>{var math2=buildExpressionRow(group.body,options);return math2 instanceof MathNode||(math2=new MathNode("mrow",[math2])),math2.setAttribute("href",group.href),math2}});defineFunction({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(_ref2,args)=>{var{parser}=_ref2,href=assertNodeType(args[0],"url").url;if(!parser.settings.isTrusted({command:"\\url",
url:href}))return parser.formatUnsupportedCmd("\\url");for(var chars=[],i=0;i<href.length;i++){var c2=href[i];c2==="~"&&(c2="\\textasciitilde"),chars.push({type:"textord",mode:"text",text:c2})}var body2={type:"text",mode:parser.mode,font:"\\texttt",body:chars};return{type:"href",mode:parser.mode,href,body:ordargument(body2)}}});defineFunction({type:"hbox",names:["\\hbox"],props:{numArgs:1,argTypes:["text"],allowedInText:!0,primitive:!0},handler(_ref,args){var{parser}=_ref;return{type:"hbox",mode:parser.
mode,body:ordargument(args[0])}},htmlBuilder(group,options){var elements=buildExpression$1(group.body,options,!1);return buildCommon.makeFragment(elements)},mathmlBuilder(group,options){return new mathMLTree.MathNode("mrow",buildExpression2(group.body,options))}});defineFunction({type:"html",names:["\\htmlClass","\\htmlId","\\htmlStyle","\\htmlData"],props:{numArgs:2,argTypes:["raw","original"],allowedInText:!0},handler:(_ref,args)=>{var{parser,funcName,token:token2}=_ref,value=assertNodeType(args[0],
"raw").string,body2=args[1];parser.settings.strict&&parser.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var trustContext,attributes={};switch(funcName){case"\\htmlClass":attributes.class=value,trustContext={command:"\\htmlClass",class:value};break;case"\\htmlId":attributes.id=value,trustContext={command:"\\htmlId",id:value};break;case"\\htmlStyle":attributes.style=value,trustContext={command:"\\htmlStyle",style:value};break;case"\\htmlData":{for(var data=value.
split(","),i=0;i<data.length;i++){var keyVal=data[i].split("=");if(keyVal.length!==2)throw new ParseError2("Error parsing key-value for \\htmlData");attributes["data-"+keyVal[0].trim()]=keyVal[1].trim()}trustContext={command:"\\htmlData",attributes};break}default:throw new Error("Unrecognized html command")}return parser.settings.isTrusted(trustContext)?{type:"html",mode:parser.mode,attributes,body:ordargument(body2)}:parser.formatUnsupportedCmd(funcName)},htmlBuilder:(group,options)=>{var elements=buildExpression$1(
group.body,options,!1),classes=["enclosing"];group.attributes.class&&classes.push(...group.attributes.class.trim().split(/\s+/));var span=buildCommon.makeSpan(classes,elements,options);for(var attr in group.attributes)attr!=="class"&&group.attributes.hasOwnProperty(attr)&&span.setAttribute(attr,group.attributes[attr]);return span},mathmlBuilder:(group,options)=>buildExpressionRow(group.body,options)});defineFunction({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:(_ref,args)=>{
var{parser}=_ref;return{type:"htmlmathml",mode:parser.mode,html:ordargument(args[0]),mathml:ordargument(args[1])}},htmlBuilder:(group,options)=>{var elements=buildExpression$1(group.html,options,!1);return buildCommon.makeFragment(elements)},mathmlBuilder:(group,options)=>buildExpressionRow(group.mathml,options)});var sizeData=function(str){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(str))return{number:+str,unit:"bp"};var match=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(str);if(!match)throw new ParseError2(
"Invalid size: '"+str+"' in \\includegraphics");var data={number:+(match[1]+match[2]),unit:match[3]};if(!validUnit(data))throw new ParseError2("Invalid unit: '"+data.unit+"' in \\includegraphics.");return data};defineFunction({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:(_ref,args,optArgs)=>{var{parser}=_ref,width={number:0,unit:"em"},height={number:.9,unit:"em"},totalheight={number:0,unit:"em"},alt="";if(optArgs[0])
for(var attributeStr=assertNodeType(optArgs[0],"raw").string,attributes=attributeStr.split(","),i=0;i<attributes.length;i++){var keyVal=attributes[i].split("=");if(keyVal.length===2){var str=keyVal[1].trim();switch(keyVal[0].trim()){case"alt":alt=str;break;case"width":width=sizeData(str);break;case"height":height=sizeData(str);break;case"totalheight":totalheight=sizeData(str);break;default:throw new ParseError2("Invalid key: '"+keyVal[0]+"' in \\includegraphics.")}}}var src=assertNodeType(args[0],
"url").url;return alt===""&&(alt=src,alt=alt.replace(/^.*[\\/]/,""),alt=alt.substring(0,alt.lastIndexOf("."))),parser.settings.isTrusted({command:"\\includegraphics",url:src})?{type:"includegraphics",mode:parser.mode,alt,width,height,totalheight,src}:parser.formatUnsupportedCmd("\\includegraphics")},htmlBuilder:(group,options)=>{var height=calculateSize(group.height,options),depth=0;group.totalheight.number>0&&(depth=calculateSize(group.totalheight,options)-height);var width=0;group.width.number>
0&&(width=calculateSize(group.width,options));var style2={height:makeEm(height+depth)};width>0&&(style2.width=makeEm(width)),depth>0&&(style2.verticalAlign=makeEm(-depth));var node2=new Img(group.src,group.alt,style2);return node2.height=height,node2.depth=depth,node2},mathmlBuilder:(group,options)=>{var node2=new mathMLTree.MathNode("mglyph",[]);node2.setAttribute("alt",group.alt);var height=calculateSize(group.height,options),depth=0;if(group.totalheight.number>0&&(depth=calculateSize(group.totalheight,
options)-height,node2.setAttribute("valign",makeEm(-depth))),node2.setAttribute("height",makeEm(height+depth)),group.width.number>0){var width=calculateSize(group.width,options);node2.setAttribute("width",makeEm(width))}return node2.setAttribute("src",group.src),node2}});defineFunction({type:"kern",names:["\\kern","\\mkern","\\hskip","\\mskip"],props:{numArgs:1,argTypes:["size"],primitive:!0,allowedInText:!0},handler(_ref,args){var{parser,funcName}=_ref,size2=assertNodeType(args[0],"size");if(parser.
settings.strict){var mathFunction=funcName[1]==="m",muUnit=size2.value.unit==="mu";mathFunction?(muUnit||parser.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+funcName+" supports only mu units, "+("not "+size2.value.unit+" units")),parser.mode!=="math"&&parser.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+funcName+" works only in math mode")):muUnit&&parser.settings.reportNonstrict("mathVsTextUnits","LaTeX's "+funcName+" doesn't support mu units")}return{type:"kern",mode:parser.mode,
dimension:size2.value}},htmlBuilder(group,options){return buildCommon.makeGlue(group.dimension,options)},mathmlBuilder(group,options){var dimension=calculateSize(group.dimension,options);return new mathMLTree.SpaceNode(dimension)}});defineFunction({type:"lap",names:["\\mathllap","\\mathrlap","\\mathclap"],props:{numArgs:1,allowedInText:!0},handler:(_ref,args)=>{var{parser,funcName}=_ref,body2=args[0];return{type:"lap",mode:parser.mode,alignment:funcName.slice(5),body:body2}},htmlBuilder:(group,options)=>{
var inner2;group.alignment==="clap"?(inner2=buildCommon.makeSpan([],[buildGroup$1(group.body,options)]),inner2=buildCommon.makeSpan(["inner"],[inner2],options)):inner2=buildCommon.makeSpan(["inner"],[buildGroup$1(group.body,options)]);var fix2=buildCommon.makeSpan(["fix"],[]),node2=buildCommon.makeSpan([group.alignment],[inner2,fix2],options),strut=buildCommon.makeSpan(["strut"]);return strut.style.height=makeEm(node2.height+node2.depth),node2.depth&&(strut.style.verticalAlign=makeEm(-node2.depth)),
node2.children.unshift(strut),node2=buildCommon.makeSpan(["thinbox"],[node2],options),buildCommon.makeSpan(["mord","vbox"],[node2],options)},mathmlBuilder:(group,options)=>{var node2=new mathMLTree.MathNode("mpadded",[buildGroup2(group.body,options)]);if(group.alignment!=="rlap"){var offset2=group.alignment==="llap"?"-1":"-0.5";node2.setAttribute("lspace",offset2+"width")}return node2.setAttribute("width","0px"),node2}});defineFunction({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,
allowedInMath:!1},handler(_ref,args){var{funcName,parser}=_ref,outerMode=parser.mode;parser.switchMode("math");var close2=funcName==="\\("?"\\)":"$",body2=parser.parseExpression(!1,close2);return parser.expect(close2),parser.switchMode(outerMode),{type:"styling",mode:parser.mode,style:"text",body:body2}}});defineFunction({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(context,args){throw new ParseError2("Mismatched "+context.funcName)}});var chooseMathStyle=(group,options)=>{
switch(options.style.size){case Style$1.DISPLAY.size:return group.display;case Style$1.TEXT.size:return group.text;case Style$1.SCRIPT.size:return group.script;case Style$1.SCRIPTSCRIPT.size:return group.scriptscript;default:return group.text}};defineFunction({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(_ref,args)=>{var{parser}=_ref;return{type:"mathchoice",mode:parser.mode,display:ordargument(args[0]),text:ordargument(args[1]),script:ordargument(args[2]),scriptscript:ordargument(
args[3])}},htmlBuilder:(group,options)=>{var body2=chooseMathStyle(group,options),elements=buildExpression$1(body2,options,!1);return buildCommon.makeFragment(elements)},mathmlBuilder:(group,options)=>{var body2=chooseMathStyle(group,options);return buildExpressionRow(body2,options)}});var assembleSupSub=(base2,supGroup,subGroup,options,style2,slant,baseShift)=>{base2=buildCommon.makeSpan([],[base2]);var subIsSingleCharacter=subGroup&&utils.isCharacterBox(subGroup),sub2,sup2;if(supGroup){var elem=buildGroup$1(
supGroup,options.havingStyle(style2.sup()),options);sup2={elem,kern:Math.max(options.fontMetrics().bigOpSpacing1,options.fontMetrics().bigOpSpacing3-elem.depth)}}if(subGroup){var _elem=buildGroup$1(subGroup,options.havingStyle(style2.sub()),options);sub2={elem:_elem,kern:Math.max(options.fontMetrics().bigOpSpacing2,options.fontMetrics().bigOpSpacing4-_elem.height)}}var finalGroup;if(sup2&&sub2){var bottom=options.fontMetrics().bigOpSpacing5+sub2.elem.height+sub2.elem.depth+sub2.kern+base2.depth+
baseShift;finalGroup=buildCommon.makeVList({positionType:"bottom",positionData:bottom,children:[{type:"kern",size:options.fontMetrics().bigOpSpacing5},{type:"elem",elem:sub2.elem,marginLeft:makeEm(-slant)},{type:"kern",size:sub2.kern},{type:"elem",elem:base2},{type:"kern",size:sup2.kern},{type:"elem",elem:sup2.elem,marginLeft:makeEm(slant)},{type:"kern",size:options.fontMetrics().bigOpSpacing5}]},options)}else if(sub2){var top=base2.height-baseShift;finalGroup=buildCommon.makeVList({positionType:"\
top",positionData:top,children:[{type:"kern",size:options.fontMetrics().bigOpSpacing5},{type:"elem",elem:sub2.elem,marginLeft:makeEm(-slant)},{type:"kern",size:sub2.kern},{type:"elem",elem:base2}]},options)}else if(sup2){var _bottom=base2.depth+baseShift;finalGroup=buildCommon.makeVList({positionType:"bottom",positionData:_bottom,children:[{type:"elem",elem:base2},{type:"kern",size:sup2.kern},{type:"elem",elem:sup2.elem,marginLeft:makeEm(slant)},{type:"kern",size:options.fontMetrics().bigOpSpacing5}]},
options)}else return base2;var parts=[finalGroup];if(sub2&&slant!==0&&!subIsSingleCharacter){var spacer=buildCommon.makeSpan(["mspace"],[],options);spacer.style.marginRight=makeEm(slant),parts.unshift(spacer)}return buildCommon.makeSpan(["mop","op-limits"],parts,options)},noSuccessor=["\\smallint"],htmlBuilder$2=(grp,options)=>{var supGroup,subGroup,hasLimits=!1,group;grp.type==="supsub"?(supGroup=grp.sup,subGroup=grp.sub,group=assertNodeType(grp.base,"op"),hasLimits=!0):group=assertNodeType(grp,
"op");var style2=options.style,large=!1;style2.size===Style$1.DISPLAY.size&&group.symbol&&!utils.contains(noSuccessor,group.name)&&(large=!0);var base2;if(group.symbol){var fontName=large?"Size2-Regular":"Size1-Regular",stash="";if((group.name==="\\oiint"||group.name==="\\oiiint")&&(stash=group.name.slice(1),group.name=stash==="oiint"?"\\iint":"\\iiint"),base2=buildCommon.makeSymbol(group.name,fontName,"math",options,["mop","op-symbol",large?"large-op":"small-op"]),stash.length>0){var italic=base2.
italic,oval=buildCommon.staticSvg(stash+"Size"+(large?"2":"1"),options);base2=buildCommon.makeVList({positionType:"individualShift",children:[{type:"elem",elem:base2,shift:0},{type:"elem",elem:oval,shift:large?.08:0}]},options),group.name="\\"+stash,base2.classes.unshift("mop"),base2.italic=italic}}else if(group.body){var inner2=buildExpression$1(group.body,options,!0);inner2.length===1&&inner2[0]instanceof SymbolNode?(base2=inner2[0],base2.classes[0]="mop"):base2=buildCommon.makeSpan(["mop"],inner2,
options)}else{for(var output=[],i=1;i<group.name.length;i++)output.push(buildCommon.mathsym(group.name[i],group.mode,options));base2=buildCommon.makeSpan(["mop"],output,options)}var baseShift=0,slant=0;return(base2 instanceof SymbolNode||group.name==="\\oiint"||group.name==="\\oiiint")&&!group.suppressBaseShift&&(baseShift=(base2.height-base2.depth)/2-options.fontMetrics().axisHeight,slant=base2.italic),hasLimits?assembleSupSub(base2,supGroup,subGroup,options,style2,slant,baseShift):(baseShift&&
(base2.style.position="relative",base2.style.top=makeEm(baseShift)),base2)},mathmlBuilder$1=(group,options)=>{var node2;if(group.symbol)node2=new MathNode("mo",[makeText(group.name,group.mode)]),utils.contains(noSuccessor,group.name)&&node2.setAttribute("largeop","false");else if(group.body)node2=new MathNode("mo",buildExpression2(group.body,options));else{node2=new MathNode("mi",[new TextNode(group.name.slice(1))]);var operator2=new MathNode("mo",[makeText("⁡","text")]);group.parentIsSupSub?node2=
new MathNode("mrow",[node2,operator2]):node2=newDocumentFragment([node2,operator2])}return node2},singleCharBigOps={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};defineFunction({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\b\
igsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:(_ref,args)=>{var{parser,funcName}=_ref,fName=funcName;return fName.length===1&&(fName=singleCharBigOps[fName]),{type:"op",mode:parser.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:fName}},htmlBuilder:htmlBuilder$2,mathmlBuilder:mathmlBuilder$1});defineFunction({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:(_ref2,args)=>{var{parser}=_ref2,body2=args[0];
return{type:"op",mode:parser.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:ordargument(body2)}},htmlBuilder:htmlBuilder$2,mathmlBuilder:mathmlBuilder$1});var singleCharIntegrals={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};defineFunction({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg",
"\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(_ref3){var{parser,funcName}=_ref3;return{type:"op",mode:parser.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:funcName}},htmlBuilder:htmlBuilder$2,mathmlBuilder:mathmlBuilder$1});defineFunction({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(_ref4){var{parser,funcName}=_ref4;return{type:"op",mode:parser.mode,limits:!0,parentIsSupSub:!1,
symbol:!1,name:funcName}},htmlBuilder:htmlBuilder$2,mathmlBuilder:mathmlBuilder$1});defineFunction({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0},handler(_ref5){var{parser,funcName}=_ref5,fName=funcName;return fName.length===1&&(fName=singleCharIntegrals[fName]),{type:"op",mode:parser.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:fName}},htmlBuilder:htmlBuilder$2,mathmlBuilder:mathmlBuilder$1});var htmlBuilder$1=(grp,options)=>{
var supGroup,subGroup,hasLimits=!1,group;grp.type==="supsub"?(supGroup=grp.sup,subGroup=grp.sub,group=assertNodeType(grp.base,"operatorname"),hasLimits=!0):group=assertNodeType(grp,"operatorname");var base2;if(group.body.length>0){for(var body2=group.body.map(child3=>{var childText=child3.text;return typeof childText=="string"?{type:"textord",mode:child3.mode,text:childText}:child3}),expression=buildExpression$1(body2,options.withFont("mathrm"),!0),i=0;i<expression.length;i++){var child2=expression[i];
child2 instanceof SymbolNode&&(child2.text=child2.text.replace(/\u2212/,"-").replace(/\u2217/,"*"))}base2=buildCommon.makeSpan(["mop"],expression,options)}else base2=buildCommon.makeSpan(["mop"],[],options);return hasLimits?assembleSupSub(base2,supGroup,subGroup,options,options.style,0,0):base2},mathmlBuilder2=(group,options)=>{for(var expression=buildExpression2(group.body,options.withFont("mathrm")),isAllString=!0,i=0;i<expression.length;i++){var node2=expression[i];if(!(node2 instanceof mathMLTree.
SpaceNode))if(node2 instanceof mathMLTree.MathNode)switch(node2.type){case"mi":case"mn":case"ms":case"mspace":case"mtext":break;case"mo":{var child2=node2.children[0];node2.children.length===1&&child2 instanceof mathMLTree.TextNode?child2.text=child2.text.replace(/\u2212/,"-").replace(/\u2217/,"*"):isAllString=!1;break}default:isAllString=!1}else isAllString=!1}if(isAllString){var word=expression.map(node3=>node3.toText()).join("");expression=[new mathMLTree.TextNode(word)]}var identifier2=new mathMLTree.
MathNode("mi",expression);identifier2.setAttribute("mathvariant","normal");var operator2=new mathMLTree.MathNode("mo",[makeText("⁡","text")]);return group.parentIsSupSub?new mathMLTree.MathNode("mrow",[identifier2,operator2]):mathMLTree.newDocumentFragment([identifier2,operator2])};defineFunction({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:(_ref,args)=>{var{parser,funcName}=_ref,body2=args[0];return{type:"operatorname",mode:parser.mode,body:ordargument(
body2),alwaysHandleSupSub:funcName==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:htmlBuilder$1,mathmlBuilder:mathmlBuilder2});defineMacro("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");defineFunctionBuilders({type:"ordgroup",htmlBuilder(group,options){return group.semisimple?buildCommon.makeFragment(buildExpression$1(group.body,options,!1)):buildCommon.makeSpan(["mord"],buildExpression$1(group.body,options,!0),options)},mathmlBuilder(group,options){
return buildExpressionRow(group.body,options,!0)}});defineFunction({type:"overline",names:["\\overline"],props:{numArgs:1},handler(_ref,args){var{parser}=_ref,body2=args[0];return{type:"overline",mode:parser.mode,body:body2}},htmlBuilder(group,options){var innerGroup=buildGroup$1(group.body,options.havingCrampedStyle()),line=buildCommon.makeLineSpan("overline-line",options),defaultRuleThickness=options.fontMetrics().defaultRuleThickness,vlist=buildCommon.makeVList({positionType:"firstBaseline",children:[
{type:"elem",elem:innerGroup},{type:"kern",size:3*defaultRuleThickness},{type:"elem",elem:line},{type:"kern",size:defaultRuleThickness}]},options);return buildCommon.makeSpan(["mord","overline"],[vlist],options)},mathmlBuilder(group,options){var operator2=new mathMLTree.MathNode("mo",[new mathMLTree.TextNode("‾")]);operator2.setAttribute("stretchy","true");var node2=new mathMLTree.MathNode("mover",[buildGroup2(group.body,options),operator2]);return node2.setAttribute("accent","true"),node2}});
defineFunction({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:(_ref,args)=>{var{parser}=_ref,body2=args[0];return{type:"phantom",mode:parser.mode,body:ordargument(body2)}},htmlBuilder:(group,options)=>{var elements=buildExpression$1(group.body,options.withPhantom(),!1);return buildCommon.makeFragment(elements)},mathmlBuilder:(group,options)=>{var inner2=buildExpression2(group.body,options);return new mathMLTree.MathNode("mphantom",inner2)}});defineFunction({type:"\
hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:(_ref2,args)=>{var{parser}=_ref2,body2=args[0];return{type:"hphantom",mode:parser.mode,body:body2}},htmlBuilder:(group,options)=>{var node2=buildCommon.makeSpan([],[buildGroup$1(group.body,options.withPhantom())]);if(node2.height=0,node2.depth=0,node2.children)for(var i=0;i<node2.children.length;i++)node2.children[i].height=0,node2.children[i].depth=0;return node2=buildCommon.makeVList({positionType:"firstBaseline",children:[
{type:"elem",elem:node2}]},options),buildCommon.makeSpan(["mord"],[node2],options)},mathmlBuilder:(group,options)=>{var inner2=buildExpression2(ordargument(group.body),options),phantom=new mathMLTree.MathNode("mphantom",inner2),node2=new mathMLTree.MathNode("mpadded",[phantom]);return node2.setAttribute("height","0px"),node2.setAttribute("depth","0px"),node2}});defineFunction({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:(_ref3,args)=>{var{parser}=_ref3,body2=args[0];
return{type:"vphantom",mode:parser.mode,body:body2}},htmlBuilder:(group,options)=>{var inner2=buildCommon.makeSpan(["inner"],[buildGroup$1(group.body,options.withPhantom())]),fix2=buildCommon.makeSpan(["fix"],[]);return buildCommon.makeSpan(["mord","rlap"],[inner2,fix2],options)},mathmlBuilder:(group,options)=>{var inner2=buildExpression2(ordargument(group.body),options),phantom=new mathMLTree.MathNode("mphantom",inner2),node2=new mathMLTree.MathNode("mpadded",[phantom]);return node2.setAttribute(
"width","0px"),node2}});defineFunction({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(_ref,args){var{parser}=_ref,amount=assertNodeType(args[0],"size").value,body2=args[1];return{type:"raisebox",mode:parser.mode,dy:amount,body:body2}},htmlBuilder(group,options){var body2=buildGroup$1(group.body,options),dy=calculateSize(group.dy,options);return buildCommon.makeVList({positionType:"shift",positionData:-dy,children:[{type:"elem",elem:body2}]},
options)},mathmlBuilder(group,options){var node2=new mathMLTree.MathNode("mpadded",[buildGroup2(group.body,options)]),dy=group.dy.number+group.dy.unit;return node2.setAttribute("voffset",dy),node2}});defineFunction({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(_ref){var{parser}=_ref;return{type:"internal",mode:parser.mode}}});defineFunction({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:[
"size","size","size"]},handler(_ref,args,optArgs){var{parser}=_ref,shift2=optArgs[0],width=assertNodeType(args[0],"size"),height=assertNodeType(args[1],"size");return{type:"rule",mode:parser.mode,shift:shift2&&assertNodeType(shift2,"size").value,width:width.value,height:height.value}},htmlBuilder(group,options){var rule=buildCommon.makeSpan(["mord","rule"],[],options),width=calculateSize(group.width,options),height=calculateSize(group.height,options),shift2=group.shift?calculateSize(group.shift,
options):0;return rule.style.borderRightWidth=makeEm(width),rule.style.borderTopWidth=makeEm(height),rule.style.bottom=makeEm(shift2),rule.width=width,rule.height=height+shift2,rule.depth=-shift2,rule.maxFontSize=height*1.125*options.sizeMultiplier,rule},mathmlBuilder(group,options){var width=calculateSize(group.width,options),height=calculateSize(group.height,options),shift2=group.shift?calculateSize(group.shift,options):0,color=options.color&&options.getColor()||"black",rule=new mathMLTree.MathNode(
"mspace");rule.setAttribute("mathbackground",color),rule.setAttribute("width",makeEm(width)),rule.setAttribute("height",makeEm(height));var wrapper=new mathMLTree.MathNode("mpadded",[rule]);return shift2>=0?wrapper.setAttribute("height",makeEm(shift2)):(wrapper.setAttribute("height",makeEm(shift2)),wrapper.setAttribute("depth",makeEm(-shift2))),wrapper.setAttribute("voffset",makeEm(shift2)),wrapper}});function sizingGroup(value,options,baseOptions){for(var inner2=buildExpression$1(value,options,
!1),multiplier=options.sizeMultiplier/baseOptions.sizeMultiplier,i=0;i<inner2.length;i++){var pos=inner2[i].classes.indexOf("sizing");pos<0?Array.prototype.push.apply(inner2[i].classes,options.sizingClasses(baseOptions)):inner2[i].classes[pos+1]==="reset-size"+options.size&&(inner2[i].classes[pos+1]="reset-size"+baseOptions.size),inner2[i].height*=multiplier,inner2[i].depth*=multiplier}return buildCommon.makeFragment(inner2)}var sizeFuncs=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\
\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],htmlBuilder2=(group,options)=>{var newOptions=options.havingSize(group.size);return sizingGroup(group.body,newOptions,options)};defineFunction({type:"sizing",names:sizeFuncs,props:{numArgs:0,allowedInText:!0},handler:(_ref,args)=>{var{breakOnTokenText,funcName,parser}=_ref,body2=parser.parseExpression(!1,breakOnTokenText);return{type:"sizing",mode:parser.mode,size:sizeFuncs.indexOf(funcName)+1,body:body2}},htmlBuilder:htmlBuilder2,
mathmlBuilder:(group,options)=>{var newOptions=options.havingSize(group.size),inner2=buildExpression2(group.body,newOptions),node2=new mathMLTree.MathNode("mstyle",inner2);return node2.setAttribute("mathsize",makeEm(newOptions.sizeMultiplier)),node2}});defineFunction({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:(_ref,args,optArgs)=>{var{parser}=_ref,smashHeight=!1,smashDepth=!1,tbArg=optArgs[0]&&assertNodeType(optArgs[0],"ordgroup");if(tbArg)for(var letter="",
i=0;i<tbArg.body.length;++i){var node2=tbArg.body[i];if(letter=node2.text,letter==="t")smashHeight=!0;else if(letter==="b")smashDepth=!0;else{smashHeight=!1,smashDepth=!1;break}}else smashHeight=!0,smashDepth=!0;var body2=args[0];return{type:"smash",mode:parser.mode,body:body2,smashHeight,smashDepth}},htmlBuilder:(group,options)=>{var node2=buildCommon.makeSpan([],[buildGroup$1(group.body,options)]);if(!group.smashHeight&&!group.smashDepth)return node2;if(group.smashHeight&&(node2.height=0,node2.
children))for(var i=0;i<node2.children.length;i++)node2.children[i].height=0;if(group.smashDepth&&(node2.depth=0,node2.children))for(var _i=0;_i<node2.children.length;_i++)node2.children[_i].depth=0;var smashedNode=buildCommon.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:node2}]},options);return buildCommon.makeSpan(["mord"],[smashedNode],options)},mathmlBuilder:(group,options)=>{var node2=new mathMLTree.MathNode("mpadded",[buildGroup2(group.body,options)]);return group.smashHeight&&
node2.setAttribute("height","0px"),group.smashDepth&&node2.setAttribute("depth","0px"),node2}});defineFunction({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(_ref,args,optArgs){var{parser}=_ref,index2=optArgs[0],body2=args[0];return{type:"sqrt",mode:parser.mode,body:body2,index:index2}},htmlBuilder(group,options){var inner2=buildGroup$1(group.body,options.havingCrampedStyle());inner2.height===0&&(inner2.height=options.fontMetrics().xHeight),inner2=buildCommon.wrapFragment(
inner2,options);var metrics=options.fontMetrics(),theta=metrics.defaultRuleThickness,phi=theta;options.style.id<Style$1.TEXT.id&&(phi=options.fontMetrics().xHeight);var lineClearance=theta+phi/4,minDelimiterHeight=inner2.height+inner2.depth+lineClearance+theta,{span:img,ruleWidth,advanceWidth}=delimiter.sqrtImage(minDelimiterHeight,options),delimDepth=img.height-ruleWidth;delimDepth>inner2.height+inner2.depth+lineClearance&&(lineClearance=(lineClearance+delimDepth-inner2.height-inner2.depth)/2);
var imgShift=img.height-inner2.height-lineClearance-ruleWidth;inner2.style.paddingLeft=makeEm(advanceWidth);var body2=buildCommon.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:inner2,wrapperClasses:["svg-align"]},{type:"kern",size:-(inner2.height+imgShift)},{type:"elem",elem:img},{type:"kern",size:ruleWidth}]},options);if(group.index){var newOptions=options.havingStyle(Style$1.SCRIPTSCRIPT),rootm=buildGroup$1(group.index,newOptions,options),toShift=.6*(body2.height-body2.depth),
rootVList=buildCommon.makeVList({positionType:"shift",positionData:-toShift,children:[{type:"elem",elem:rootm}]},options),rootVListWrap=buildCommon.makeSpan(["root"],[rootVList]);return buildCommon.makeSpan(["mord","sqrt"],[rootVListWrap,body2],options)}else return buildCommon.makeSpan(["mord","sqrt"],[body2],options)},mathmlBuilder(group,options){var{body:body2,index:index2}=group;return index2?new mathMLTree.MathNode("mroot",[buildGroup2(body2,options),buildGroup2(index2,options)]):new mathMLTree.
MathNode("msqrt",[buildGroup2(body2,options)])}});var styleMap={display:Style$1.DISPLAY,text:Style$1.TEXT,script:Style$1.SCRIPT,scriptscript:Style$1.SCRIPTSCRIPT};defineFunction({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(_ref,args){var{breakOnTokenText,funcName,parser}=_ref,body2=parser.parseExpression(!0,breakOnTokenText),style2=funcName.slice(1,funcName.length-5);return{type:"styling",mode:parser.
mode,style:style2,body:body2}},htmlBuilder(group,options){var newStyle=styleMap[group.style],newOptions=options.havingStyle(newStyle).withFont("");return sizingGroup(group.body,newOptions,options)},mathmlBuilder(group,options){var newStyle=styleMap[group.style],newOptions=options.havingStyle(newStyle),inner2=buildExpression2(group.body,newOptions),node2=new mathMLTree.MathNode("mstyle",inner2),styleAttributes={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]},
attr=styleAttributes[group.style];return node2.setAttribute("scriptlevel",attr[0]),node2.setAttribute("displaystyle",attr[1]),node2}});var htmlBuilderDelegate=function(group,options){var base2=group.base;if(base2)if(base2.type==="op"){var delegate2=base2.limits&&(options.style.size===Style$1.DISPLAY.size||base2.alwaysHandleSupSub);return delegate2?htmlBuilder$2:null}else if(base2.type==="operatorname"){var _delegate=base2.alwaysHandleSupSub&&(options.style.size===Style$1.DISPLAY.size||base2.limits);
return _delegate?htmlBuilder$1:null}else{if(base2.type==="accent")return utils.isCharacterBox(base2.base)?htmlBuilder$a:null;if(base2.type==="horizBrace"){var isSup=!group.sub;return isSup===base2.isOver?htmlBuilder$3:null}else return null}else return null};defineFunctionBuilders({type:"supsub",htmlBuilder(group,options){var builderDelegate=htmlBuilderDelegate(group,options);if(builderDelegate)return builderDelegate(group,options);var{base:valueBase,sup:valueSup,sub:valueSub}=group,base2=buildGroup$1(
valueBase,options),supm,subm,metrics=options.fontMetrics(),supShift=0,subShift=0,isCharacterBox3=valueBase&&utils.isCharacterBox(valueBase);if(valueSup){var newOptions=options.havingStyle(options.style.sup());supm=buildGroup$1(valueSup,newOptions,options),isCharacterBox3||(supShift=base2.height-newOptions.fontMetrics().supDrop*newOptions.sizeMultiplier/options.sizeMultiplier)}if(valueSub){var _newOptions=options.havingStyle(options.style.sub());subm=buildGroup$1(valueSub,_newOptions,options),isCharacterBox3||
(subShift=base2.depth+_newOptions.fontMetrics().subDrop*_newOptions.sizeMultiplier/options.sizeMultiplier)}var minSupShift;options.style===Style$1.DISPLAY?minSupShift=metrics.sup1:options.style.cramped?minSupShift=metrics.sup3:minSupShift=metrics.sup2;var multiplier=options.sizeMultiplier,marginRight=makeEm(.5/metrics.ptPerEm/multiplier),marginLeft=null;if(subm){var isOiint=group.base&&group.base.type==="op"&&group.base.name&&(group.base.name==="\\oiint"||group.base.name==="\\oiiint");(base2 instanceof
SymbolNode||isOiint)&&(marginLeft=makeEm(-base2.italic))}var supsub;if(supm&&subm){supShift=Math.max(supShift,minSupShift,supm.depth+.25*metrics.xHeight),subShift=Math.max(subShift,metrics.sub2);var ruleWidth=metrics.defaultRuleThickness,maxWidth=4*ruleWidth;if(supShift-supm.depth-(subm.height-subShift)<maxWidth){subShift=maxWidth-(supShift-supm.depth)+subm.height;var psi=.8*metrics.xHeight-(supShift-supm.depth);psi>0&&(supShift+=psi,subShift-=psi)}var vlistElem=[{type:"elem",elem:subm,shift:subShift,
marginRight,marginLeft},{type:"elem",elem:supm,shift:-supShift,marginRight}];supsub=buildCommon.makeVList({positionType:"individualShift",children:vlistElem},options)}else if(subm){subShift=Math.max(subShift,metrics.sub1,subm.height-.8*metrics.xHeight);var _vlistElem=[{type:"elem",elem:subm,marginLeft,marginRight}];supsub=buildCommon.makeVList({positionType:"shift",positionData:subShift,children:_vlistElem},options)}else if(supm)supShift=Math.max(supShift,minSupShift,supm.depth+.25*metrics.xHeight),
supsub=buildCommon.makeVList({positionType:"shift",positionData:-supShift,children:[{type:"elem",elem:supm,marginRight}]},options);else throw new Error("supsub must have either sup or sub.");var mclass=getTypeOfDomTree(base2,"right")||"mord";return buildCommon.makeSpan([mclass],[base2,buildCommon.makeSpan(["msupsub"],[supsub])],options)},mathmlBuilder(group,options){var isBrace=!1,isOver,isSup;group.base&&group.base.type==="horizBrace"&&(isSup=!!group.sup,isSup===group.base.isOver&&(isBrace=!0,isOver=
group.base.isOver)),group.base&&(group.base.type==="op"||group.base.type==="operatorname")&&(group.base.parentIsSupSub=!0);var children=[buildGroup2(group.base,options)];group.sub&&children.push(buildGroup2(group.sub,options)),group.sup&&children.push(buildGroup2(group.sup,options));var nodeType;if(isBrace)nodeType=isOver?"mover":"munder";else if(group.sub)if(group.sup){var _base2=group.base;_base2&&_base2.type==="op"&&_base2.limits&&options.style===Style$1.DISPLAY||_base2&&_base2.type==="operat\
orname"&&_base2.alwaysHandleSupSub&&(options.style===Style$1.DISPLAY||_base2.limits)?nodeType="munderover":nodeType="msubsup"}else{var _base=group.base;_base&&_base.type==="op"&&_base.limits&&(options.style===Style$1.DISPLAY||_base.alwaysHandleSupSub)||_base&&_base.type==="operatorname"&&_base.alwaysHandleSupSub&&(_base.limits||options.style===Style$1.DISPLAY)?nodeType="munder":nodeType="msub"}else{var base2=group.base;base2&&base2.type==="op"&&base2.limits&&(options.style===Style$1.DISPLAY||base2.
alwaysHandleSupSub)||base2&&base2.type==="operatorname"&&base2.alwaysHandleSupSub&&(base2.limits||options.style===Style$1.DISPLAY)?nodeType="mover":nodeType="msup"}return new mathMLTree.MathNode(nodeType,children)}});defineFunctionBuilders({type:"atom",htmlBuilder(group,options){return buildCommon.mathsym(group.text,group.mode,options,["m"+group.family])},mathmlBuilder(group,options){var node2=new mathMLTree.MathNode("mo",[makeText(group.text,group.mode)]);if(group.family==="bin"){var variant=getVariant(
group,options);variant==="bold-italic"&&node2.setAttribute("mathvariant",variant)}else group.family==="punct"?node2.setAttribute("separator","true"):(group.family==="open"||group.family==="close")&&node2.setAttribute("stretchy","false");return node2}});var defaultVariant={mi:"italic",mn:"normal",mtext:"normal"};defineFunctionBuilders({type:"mathord",htmlBuilder(group,options){return buildCommon.makeOrd(group,options,"mathord")},mathmlBuilder(group,options){var node2=new mathMLTree.MathNode("mi",
[makeText(group.text,group.mode,options)]),variant=getVariant(group,options)||"italic";return variant!==defaultVariant[node2.type]&&node2.setAttribute("mathvariant",variant),node2}});defineFunctionBuilders({type:"textord",htmlBuilder(group,options){return buildCommon.makeOrd(group,options,"textord")},mathmlBuilder(group,options){var text2=makeText(group.text,group.mode,options),variant=getVariant(group,options)||"normal",node2;return group.mode==="text"?node2=new mathMLTree.MathNode("mtext",[text2]):
/[0-9]/.test(group.text)?node2=new mathMLTree.MathNode("mn",[text2]):group.text==="\\prime"?node2=new mathMLTree.MathNode("mo",[text2]):node2=new mathMLTree.MathNode("mi",[text2]),variant!==defaultVariant[node2.type]&&node2.setAttribute("mathvariant",variant),node2}});var cssSpace={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},regularSpace={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};defineFunctionBuilders({type:"spacing",htmlBuilder(group,options){
if(regularSpace.hasOwnProperty(group.text)){var className=regularSpace[group.text].className||"";if(group.mode==="text"){var ord=buildCommon.makeOrd(group,options,"textord");return ord.classes.push(className),ord}else return buildCommon.makeSpan(["mspace",className],[buildCommon.mathsym(group.text,group.mode,options)],options)}else{if(cssSpace.hasOwnProperty(group.text))return buildCommon.makeSpan(["mspace",cssSpace[group.text]],[],options);throw new ParseError2('Unknown type of space "'+group.text+
'"')}},mathmlBuilder(group,options){var node2;if(regularSpace.hasOwnProperty(group.text))node2=new mathMLTree.MathNode("mtext",[new mathMLTree.TextNode(" ")]);else{if(cssSpace.hasOwnProperty(group.text))return new mathMLTree.MathNode("mspace");throw new ParseError2('Unknown type of space "'+group.text+'"')}return node2}});var pad=()=>{var padNode=new mathMLTree.MathNode("mtd",[]);return padNode.setAttribute("width","50%"),padNode};defineFunctionBuilders({type:"tag",mathmlBuilder(group,options){
var table2=new mathMLTree.MathNode("mtable",[new mathMLTree.MathNode("mtr",[pad(),new mathMLTree.MathNode("mtd",[buildExpressionRow(group.body,options)]),pad(),new mathMLTree.MathNode("mtd",[buildExpressionRow(group.tag,options)])])]);return table2.setAttribute("width","100%"),table2}});var textFontFamilies={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},textFontWeights={"\\textbf":"textbf","\\textmd":"textmd"},textFontShapes={"\\textit":"tex\
tit","\\textup":"textup"},optionsWithFont=(group,options)=>{var font=group.font;if(font){if(textFontFamilies[font])return options.withTextFontFamily(textFontFamilies[font]);if(textFontWeights[font])return options.withTextFontWeight(textFontWeights[font]);if(font==="\\emph")return options.fontShape==="textit"?options.withTextFontShape("textup"):options.withTextFontShape("textit")}else return options;return options.withTextFontShape(textFontShapes[font])};defineFunction({type:"text",names:["\\text",
"\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(_ref,args){var{parser,funcName}=_ref,body2=args[0];return{type:"text",mode:parser.mode,body:ordargument(body2),font:funcName}},htmlBuilder(group,options){var newOptions=optionsWithFont(group,options),inner2=buildExpression$1(group.body,newOptions,!0);return buildCommon.makeSpan(["mord","text"],inner2,newOptions)},mathmlBuilder(group,options){
var newOptions=optionsWithFont(group,options);return buildExpressionRow(group.body,newOptions)}});defineFunction({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(_ref,args){var{parser}=_ref;return{type:"underline",mode:parser.mode,body:args[0]}},htmlBuilder(group,options){var innerGroup=buildGroup$1(group.body,options),line=buildCommon.makeLineSpan("underline-line",options),defaultRuleThickness=options.fontMetrics().defaultRuleThickness,vlist=buildCommon.makeVList(
{positionType:"top",positionData:innerGroup.height,children:[{type:"kern",size:defaultRuleThickness},{type:"elem",elem:line},{type:"kern",size:3*defaultRuleThickness},{type:"elem",elem:innerGroup}]},options);return buildCommon.makeSpan(["mord","underline"],[vlist],options)},mathmlBuilder(group,options){var operator2=new mathMLTree.MathNode("mo",[new mathMLTree.TextNode("‾")]);operator2.setAttribute("stretchy","true");var node2=new mathMLTree.MathNode("munder",[buildGroup2(group.body,options),operator2]);
return node2.setAttribute("accentunder","true"),node2}});defineFunction({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(_ref,args){var{parser}=_ref;return{type:"vcenter",mode:parser.mode,body:args[0]}},htmlBuilder(group,options){var body2=buildGroup$1(group.body,options),axisHeight=options.fontMetrics().axisHeight,dy=.5*(body2.height-axisHeight-(body2.depth+axisHeight));return buildCommon.makeVList({positionType:"shift",positionData:dy,children:[
{type:"elem",elem:body2}]},options)},mathmlBuilder(group,options){return new mathMLTree.MathNode("mpadded",[buildGroup2(group.body,options)],["vcenter"])}});defineFunction({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(context,args,optArgs){throw new ParseError2("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(group,options){for(var text2=makeVerb(group),body2=[],newOptions=options.havingStyle(options.style.text()),i=0;i<text2.length;i++){var c2=text2[i];
c2==="~"&&(c2="\\textasciitilde"),body2.push(buildCommon.makeSymbol(c2,"Typewriter-Regular",group.mode,newOptions,["mord","texttt"]))}return buildCommon.makeSpan(["mord","text"].concat(newOptions.sizingClasses(options)),buildCommon.tryCombineChars(body2),newOptions)},mathmlBuilder(group,options){var text2=new mathMLTree.TextNode(makeVerb(group)),node2=new mathMLTree.MathNode("mtext",[text2]);return node2.setAttribute("mathvariant","monospace"),node2}});var makeVerb=group=>group.body.replace(/ /g,
group.star?"␣":" "),functions=_functions,spaceRegexString=`[ \r
	]`,controlWordRegexString="\\\\[a-zA-Z@]+",controlSymbolRegexString="\\\\[^\uD800-\uDFFF]",controlWordWhitespaceRegexString="("+controlWordRegexString+")"+spaceRegexString+"*",controlSpaceRegexString=`\\\\(
|[ \r	]+
?)[ \r	]*`,combiningDiacriticalMarkString="[̀-ͯ]",combiningDiacriticalMarksEndRegex=new RegExp(combiningDiacriticalMarkString+"+$"),tokenRegexString="("+spaceRegexString+"+)|"+(controlSpaceRegexString+"|")+"([!-\\[\\]-‧‪-퟿豈-]"+(combiningDiacriticalMarkString+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(combiningDiacriticalMarkString+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+controlWordWhitespaceRegexString)+("|"+controlSymbolRegexString+")");class Lexer{constructor(input,settings){
this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=input,this.settings=settings,this.tokenRegex=new RegExp(tokenRegexString,"g"),this.catcodes={"%":14,"~":13}}setCatcode(char,code2){this.catcodes[char]=code2}lex(){var input=this.input,pos=this.tokenRegex.lastIndex;if(pos===input.length)return new Token("EOF",new SourceLocation(this,pos,pos));var match=this.tokenRegex.exec(input);if(match===null||match.index!==pos)throw new ParseError2("Unexpected charac\
ter: '"+input[pos]+"'",new Token(input[pos],new SourceLocation(this,pos,pos+1)));var text2=match[6]||match[3]||(match[2]?"\\ ":" ");if(this.catcodes[text2]===14){var nlIndex=input.indexOf(`
`,this.tokenRegex.lastIndex);return nlIndex===-1?(this.tokenRegex.lastIndex=input.length,this.settings.reportNonstrict("commentAtEnd","% comment has no terminating newline; LaTeX would fail because of commenting the end of math mode (e.g. $)")):this.tokenRegex.lastIndex=nlIndex+1,this.lex()}return new Token(text2,new SourceLocation(this,pos,this.tokenRegex.lastIndex))}}class Namespace{constructor(builtins,globalMacros){builtins===void 0&&(builtins={}),globalMacros===void 0&&(globalMacros={}),this.
current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=globalMacros,this.builtins=builtins,this.undefStack=[]}beginGroup(){this.undefStack.push({})}endGroup(){if(this.undefStack.length===0)throw new ParseError2("Unbalanced namespace destruction: attempt to pop global namespace; please report this as a bug");var undefs=this.undefStack.pop();for(var undef in undefs)undefs.hasOwnProperty(undef)&&(undefs[undef]==null?delete this.current[undef]:this.current[undef]=undefs[undef])}endGroups(){
for(;this.undefStack.length>0;)this.endGroup()}has(name){return this.current.hasOwnProperty(name)||this.builtins.hasOwnProperty(name)}get(name){return this.current.hasOwnProperty(name)?this.current[name]:this.builtins[name]}set(name,value,global2){if(global2===void 0&&(global2=!1),global2){for(var i=0;i<this.undefStack.length;i++)delete this.undefStack[i][name];this.undefStack.length>0&&(this.undefStack[this.undefStack.length-1][name]=value)}else{var top=this.undefStack[this.undefStack.length-1];
top&&!top.hasOwnProperty(name)&&(top[name]=this.current[name])}value==null?delete this.current[name]:this.current[name]=value}}var macros=_macros;defineMacro("\\noexpand",function(context){var t=context.popToken();return context.isExpandable(t.text)&&(t.noexpand=!0,t.treatAsRelax=!0),{tokens:[t],numArgs:0}});defineMacro("\\expandafter",function(context){var t=context.popToken();return context.expandOnce(!0),{tokens:[t],numArgs:0}});defineMacro("\\@firstoftwo",function(context){var args=context.consumeArgs(
2);return{tokens:args[0],numArgs:0}});defineMacro("\\@secondoftwo",function(context){var args=context.consumeArgs(2);return{tokens:args[1],numArgs:0}});defineMacro("\\@ifnextchar",function(context){var args=context.consumeArgs(3);context.consumeSpaces();var nextToken=context.future();return args[0].length===1&&args[0][0].text===nextToken.text?{tokens:args[1],numArgs:0}:{tokens:args[2],numArgs:0}});defineMacro("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");defineMacro("\\TextOrMath",function(context){
var args=context.consumeArgs(2);return context.mode==="text"?{tokens:args[0],numArgs:0}:{tokens:args[1],numArgs:0}});var digitToNumber={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};defineMacro("\\char",function(context){var token2=context.popToken(),base2,number2="";if(token2.text==="'")base2=8,token2=context.popToken();else if(token2.text==='"')base2=16,token2=context.popToken();else if(token2.text==="`")if(token2=context.popToken(),token2.
text[0]==="\\")number2=token2.text.charCodeAt(1);else{if(token2.text==="EOF")throw new ParseError2("\\char` missing argument");number2=token2.text.charCodeAt(0)}else base2=10;if(base2){if(number2=digitToNumber[token2.text],number2==null||number2>=base2)throw new ParseError2("Invalid base-"+base2+" digit "+token2.text);for(var digit;(digit=digitToNumber[context.future().text])!=null&&digit<base2;)number2*=base2,number2+=digit,context.popToken()}return"\\@char{"+number2+"}"});var newcommand=(context,existsOK,nonexistsOK,skipIfExists)=>{
var arg=context.consumeArg().tokens;if(arg.length!==1)throw new ParseError2("\\newcommand's first argument must be a macro name");var name=arg[0].text,exists=context.isDefined(name);if(exists&&!existsOK)throw new ParseError2("\\newcommand{"+name+"} attempting to redefine "+(name+"; use \\renewcommand"));if(!exists&&!nonexistsOK)throw new ParseError2("\\renewcommand{"+name+"} when command "+name+" does not yet exist; use \\newcommand");var numArgs=0;if(arg=context.consumeArg().tokens,arg.length===
1&&arg[0].text==="["){for(var argText="",token2=context.expandNextToken();token2.text!=="]"&&token2.text!=="EOF";)argText+=token2.text,token2=context.expandNextToken();if(!argText.match(/^\s*[0-9]+\s*$/))throw new ParseError2("Invalid number of arguments: "+argText);numArgs=parseInt(argText),arg=context.consumeArg().tokens}return exists&&skipIfExists||context.macros.set(name,{tokens:arg,numArgs}),""};defineMacro("\\newcommand",context=>newcommand(context,!1,!0,!1));defineMacro("\\renewcommand",context=>newcommand(
context,!0,!1,!1));defineMacro("\\providecommand",context=>newcommand(context,!0,!0,!0));defineMacro("\\message",context=>{var arg=context.consumeArgs(1)[0];return console.log(arg.reverse().map(token2=>token2.text).join("")),""});defineMacro("\\errmessage",context=>{var arg=context.consumeArgs(1)[0];return console.error(arg.reverse().map(token2=>token2.text).join("")),""});defineMacro("\\show",context=>{var tok=context.popToken(),name=tok.text;return console.log(tok,context.macros.get(name),functions[name],
symbols.math[name],symbols.text[name]),""});defineMacro("\\bgroup","{");defineMacro("\\egroup","}");defineMacro("~","\\nobreakspace");defineMacro("\\lq","`");defineMacro("\\rq","'");defineMacro("\\aa","\\r a");defineMacro("\\AA","\\r A");defineMacro("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}");defineMacro("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");defineMacro("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}");defineMacro(
"ℬ","\\mathscr{B}");defineMacro("ℰ","\\mathscr{E}");defineMacro("ℱ","\\mathscr{F}");defineMacro("ℋ","\\mathscr{H}");defineMacro("ℐ","\\mathscr{I}");defineMacro("ℒ","\\mathscr{L}");defineMacro("ℳ","\\mathscr{M}");defineMacro("ℛ","\\mathscr{R}");defineMacro("ℭ","\\mathfrak{C}");defineMacro("ℌ","\\mathfrak{H}");defineMacro("ℨ","\\mathfrak{Z}");defineMacro("\\Bbbk","\\Bbb{k}");defineMacro("·","\\cdotp");defineMacro("\\llap","\\mathllap{\\textrm{#1}}");defineMacro("\\rlap","\\ma\
thrlap{\\textrm{#1}}");defineMacro("\\clap","\\mathclap{\\textrm{#1}}");defineMacro("\\mathstrut","\\vphantom{(}");defineMacro("\\underbar","\\underline{\\text{#1}}");defineMacro("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}');defineMacro("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}");defineMacro("\\ne","\\neq");defineMacro("≠","\\neq");defineMacro("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}");defineMacro("∉",
"\\notin");defineMacro("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}");defineMacro("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}");defineMacro("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}");defineMacro("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}");defineMacro("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}");defineMacro(
"≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}");defineMacro("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}");defineMacro("⟂","\\perp");defineMacro("‼","\\mathclose{!\\mkern-0.8mu!}");defineMacro("∌","\\notni");defineMacro("⌜","\\ulcorner");defineMacro("⌝","\\urcorner");defineMacro("⌞","\\llcorner");defineMacro("⌟","\\lrcorner");defineMacro("©","\\copyright");defineMacro("®","\\textregistered");defineMacro("️","\\textregistered");
defineMacro("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');defineMacro("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');defineMacro("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');defineMacro("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');defineMacro("\\vdots","{\\varvdots\\rule{0pt}{15pt}}");defineMacro("⋮","\\vdots");defineMacro("\\varGamma","\\mathit{\\Gamma}");defineMacro("\\varDelta","\\mathit{\\Delta}");defineMacro(
"\\varTheta","\\mathit{\\Theta}");defineMacro("\\varLambda","\\mathit{\\Lambda}");defineMacro("\\varXi","\\mathit{\\Xi}");defineMacro("\\varPi","\\mathit{\\Pi}");defineMacro("\\varSigma","\\mathit{\\Sigma}");defineMacro("\\varUpsilon","\\mathit{\\Upsilon}");defineMacro("\\varPhi","\\mathit{\\Phi}");defineMacro("\\varPsi","\\mathit{\\Psi}");defineMacro("\\varOmega","\\mathit{\\Omega}");defineMacro("\\substack","\\begin{subarray}{c}#1\\end{subarray}");defineMacro("\\colon","\\nobreak\\mskip2mu\\mathp\
unct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");defineMacro("\\boxed","\\fbox{$\\displaystyle{#1}$}");defineMacro("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");defineMacro("\\implies","\\DOTSB\\;\\Longrightarrow\\;");defineMacro("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");defineMacro("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}");defineMacro("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var dotsByToken={",":"\\dotsc","\\not":"\\do\
tsb","+":"\\dotsb","=":"\\dotsb","<":"\\dotsb",">":"\\dotsb","-":"\\dotsb","*":"\\dotsb",":":"\\dotsb","\\DOTSB":"\\dotsb","\\coprod":"\\dotsb","\\bigvee":"\\dotsb","\\bigwedge":"\\dotsb","\\biguplus":"\\dotsb","\\bigcap":"\\dotsb","\\bigcup":"\\dotsb","\\prod":"\\dotsb","\\sum":"\\dotsb","\\bigotimes":"\\dotsb","\\bigoplus":"\\dotsb","\\bigodot":"\\dotsb","\\bigsqcup":"\\dotsb","\\And":"\\dotsb","\\longrightarrow":"\\dotsb","\\Longrightarrow":"\\dotsb","\\longleftarrow":"\\dotsb","\\Longleftarro\
w":"\\dotsb","\\longleftrightarrow":"\\dotsb","\\Longleftrightarrow":"\\dotsb","\\mapsto":"\\dotsb","\\longmapsto":"\\dotsb","\\hookrightarrow":"\\dotsb","\\doteq":"\\dotsb","\\mathbin":"\\dotsb","\\mathrel":"\\dotsb","\\relbar":"\\dotsb","\\Relbar":"\\dotsb","\\xrightarrow":"\\dotsb","\\xleftarrow":"\\dotsb","\\DOTSI":"\\dotsi","\\int":"\\dotsi","\\oint":"\\dotsi","\\iint":"\\dotsi","\\iiint":"\\dotsi","\\iiiint":"\\dotsi","\\idotsint":"\\dotsi","\\DOTSX":"\\dotsx"};defineMacro("\\dots",function(context){
var thedots="\\dotso",next2=context.expandAfterFuture().text;return next2 in dotsByToken?thedots=dotsByToken[next2]:(next2.slice(0,4)==="\\not"||next2 in symbols.math&&utils.contains(["bin","rel"],symbols.math[next2].group))&&(thedots="\\dotsb"),thedots});var spaceAfterDots={")":!0,"]":!0,"\\rbrack":!0,"\\}":!0,"\\rbrace":!0,"\\rangle":!0,"\\rceil":!0,"\\rfloor":!0,"\\rgroup":!0,"\\rmoustache":!0,"\\right":!0,"\\bigr":!0,"\\biggr":!0,"\\Bigr":!0,"\\Biggr":!0,$:!0,";":!0,".":!0,",":!0};defineMacro(
"\\dotso",function(context){var next2=context.future().text;return next2 in spaceAfterDots?"\\ldots\\,":"\\ldots"});defineMacro("\\dotsc",function(context){var next2=context.future().text;return next2 in spaceAfterDots&&next2!==","?"\\ldots\\,":"\\ldots"});defineMacro("\\cdots",function(context){var next2=context.future().text;return next2 in spaceAfterDots?"\\@cdots\\,":"\\@cdots"});defineMacro("\\dotsb","\\cdots");defineMacro("\\dotsm","\\cdots");defineMacro("\\dotsi","\\!\\cdots");defineMacro(
"\\dotsx","\\ldots\\,");defineMacro("\\DOTSI","\\relax");defineMacro("\\DOTSB","\\relax");defineMacro("\\DOTSX","\\relax");defineMacro("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");defineMacro("\\,","\\tmspace+{3mu}{.1667em}");defineMacro("\\thinspace","\\,");defineMacro("\\>","\\mskip{4mu}");defineMacro("\\:","\\tmspace+{4mu}{.2222em}");defineMacro("\\medspace","\\:");defineMacro("\\;","\\tmspace+{5mu}{.2777em}");defineMacro("\\thickspace","\\;");defineMacro("\\!","\\tmspace-{3mu}{\
.1667em}");defineMacro("\\negthinspace","\\!");defineMacro("\\negmedspace","\\tmspace-{4mu}{.2222em}");defineMacro("\\negthickspace","\\tmspace-{5mu}{.277em}");defineMacro("\\enspace","\\kern.5em ");defineMacro("\\enskip","\\hskip.5em\\relax");defineMacro("\\quad","\\hskip1em\\relax");defineMacro("\\qquad","\\hskip2em\\relax");defineMacro("\\tag","\\@ifstar\\tag@literal\\tag@paren");defineMacro("\\tag@paren","\\tag@literal{({#1})}");defineMacro("\\tag@literal",context=>{if(context.macros.get("\\d\
f@tag"))throw new ParseError2("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});defineMacro("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");defineMacro("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");defineMacro("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");defineMacro("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm \
mod}\\,\\,#1");defineMacro("\\newline","\\\\\\relax");defineMacro("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var latexRaiseA=makeEm(fontMetricsData["Main-Regular"][84][1]-.7*fontMetricsData["Main-Regular"][65][1]);defineMacro("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+latexRaiseA+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");defineMacro("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+latexRaiseA+"}{\\script\
style A}")+"\\kern-.15em\\TeX}{KaTeX}}");defineMacro("\\hspace","\\@ifstar\\@hspacer\\@hspace");defineMacro("\\@hspace","\\hskip #1\\relax");defineMacro("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");defineMacro("\\ordinarycolon",":");defineMacro("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");defineMacro("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');defineMacro("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mke\
rn-1.2mu}=}}{\\mathop{\\char"2254}}');defineMacro("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');defineMacro("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');defineMacro("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');defineMacro("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\\
vcentcolon}}{\\mathop{\\char"2255}}');defineMacro("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');defineMacro("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');defineMacro("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');defineMacro("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2\
mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');defineMacro("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');defineMacro("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');defineMacro("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');defineMacro("∷","\\dblcolon");defineMacro("∹","\\eqcolon");
defineMacro("≔","\\coloneqq");defineMacro("≕","\\eqqcolon");defineMacro("⩴","\\Coloneqq");defineMacro("\\ratio","\\vcentcolon");defineMacro("\\coloncolon","\\dblcolon");defineMacro("\\colonequals","\\coloneqq");defineMacro("\\coloncolonequals","\\Coloneqq");defineMacro("\\equalscolon","\\eqqcolon");defineMacro("\\equalscoloncolon","\\Eqqcolon");defineMacro("\\colonminus","\\coloneq");defineMacro("\\coloncolonminus","\\Coloneq");defineMacro("\\minuscolon","\\eqcolon");defineMacro("\\minuscol\
oncolon","\\Eqcolon");defineMacro("\\coloncolonapprox","\\Colonapprox");defineMacro("\\coloncolonsim","\\Colonsim");defineMacro("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");defineMacro("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");defineMacro("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");defineMacro("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");defineMacro("\\notni","\\html@mathml{\\not\\n\
i}{\\mathrel{\\char`∌}}");defineMacro("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");defineMacro("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");defineMacro("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");defineMacro("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");defineMacro("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");defineMacro("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");defineMacro("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");defineMacro("\\v\
arprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");defineMacro("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}");defineMacro("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}");defineMacro("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}");defineMacro("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}");defineMacro("\\nleqq","\\html@mathml{\\@nleqq}{≰}");defineMacro("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}");defineMacro("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}");defineMacro("\\nshortpa\
rallel","\\html@mathml{\\@nshortparallel}{∦}");defineMacro("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}");defineMacro("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}");defineMacro("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}");defineMacro("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}");defineMacro("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}");defineMacro("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}");defineMacro("\\imath","\\html@mathml{\\@imath}{ı}");
defineMacro("\\jmath","\\html@mathml{\\@jmath}{ȷ}");defineMacro("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}");defineMacro("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}");defineMacro("⟦","\\llbracket");defineMacro("⟧","\\rrbracket");defineMacro("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}");defineMacro("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}");
defineMacro("⦃","\\lBrace");defineMacro("⦄","\\rBrace");defineMacro("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}");defineMacro("⦵","\\minuso");defineMacro("\\darr","\\downarrow");defineMacro("\\dArr","\\Downarrow");defineMacro("\\Darr","\\Downarrow");defineMacro("\\lang","\\langle");defineMacro("\\rang","\\rangle");defineMacro("\\uarr","\\uparrow");defineMacro("\\uArr","\\Uparrow");
defineMacro("\\Uarr","\\Uparrow");defineMacro("\\N","\\mathbb{N}");defineMacro("\\R","\\mathbb{R}");defineMacro("\\Z","\\mathbb{Z}");defineMacro("\\alef","\\aleph");defineMacro("\\alefsym","\\aleph");defineMacro("\\Alpha","\\mathrm{A}");defineMacro("\\Beta","\\mathrm{B}");defineMacro("\\bull","\\bullet");defineMacro("\\Chi","\\mathrm{X}");defineMacro("\\clubs","\\clubsuit");defineMacro("\\cnums","\\mathbb{C}");defineMacro("\\Complex","\\mathbb{C}");defineMacro("\\Dagger","\\ddagger");defineMacro(
"\\diamonds","\\diamondsuit");defineMacro("\\empty","\\emptyset");defineMacro("\\Epsilon","\\mathrm{E}");defineMacro("\\Eta","\\mathrm{H}");defineMacro("\\exist","\\exists");defineMacro("\\harr","\\leftrightarrow");defineMacro("\\hArr","\\Leftrightarrow");defineMacro("\\Harr","\\Leftrightarrow");defineMacro("\\hearts","\\heartsuit");defineMacro("\\image","\\Im");defineMacro("\\infin","\\infty");defineMacro("\\Iota","\\mathrm{I}");defineMacro("\\isin","\\in");defineMacro("\\Kappa","\\mathrm{K}");
defineMacro("\\larr","\\leftarrow");defineMacro("\\lArr","\\Leftarrow");defineMacro("\\Larr","\\Leftarrow");defineMacro("\\lrarr","\\leftrightarrow");defineMacro("\\lrArr","\\Leftrightarrow");defineMacro("\\Lrarr","\\Leftrightarrow");defineMacro("\\Mu","\\mathrm{M}");defineMacro("\\natnums","\\mathbb{N}");defineMacro("\\Nu","\\mathrm{N}");defineMacro("\\Omicron","\\mathrm{O}");defineMacro("\\plusmn","\\pm");defineMacro("\\rarr","\\rightarrow");defineMacro("\\rArr","\\Rightarrow");defineMacro("\\R\
arr","\\Rightarrow");defineMacro("\\real","\\Re");defineMacro("\\reals","\\mathbb{R}");defineMacro("\\Reals","\\mathbb{R}");defineMacro("\\Rho","\\mathrm{P}");defineMacro("\\sdot","\\cdot");defineMacro("\\sect","\\S");defineMacro("\\spades","\\spadesuit");defineMacro("\\sub","\\subset");defineMacro("\\sube","\\subseteq");defineMacro("\\supe","\\supseteq");defineMacro("\\Tau","\\mathrm{T}");defineMacro("\\thetasym","\\vartheta");defineMacro("\\weierp","\\wp");defineMacro("\\Zeta","\\mathrm{Z}");defineMacro(
"\\argmin","\\DOTSB\\operatorname*{arg\\,min}");defineMacro("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");defineMacro("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");defineMacro("\\bra","\\mathinner{\\langle{#1}|}");defineMacro("\\ket","\\mathinner{|{#1}\\rangle}");defineMacro("\\braket","\\mathinner{\\langle{#1}\\rangle}");defineMacro("\\Bra","\\left\\langle#1\\right|");defineMacro("\\Ket","\\left|#1\\right\\rangle");var braketHelper=one2=>context=>{var left=context.consumeArg().tokens,
middle=context.consumeArg().tokens,middleDouble=context.consumeArg().tokens,right=context.consumeArg().tokens,oldMiddle=context.macros.get("|"),oldMiddleDouble=context.macros.get("\\|");context.macros.beginGroup();var midMacro=double=>context2=>{one2&&(context2.macros.set("|",oldMiddle),middleDouble.length&&context2.macros.set("\\|",oldMiddleDouble));var doubled=double;if(!double&&middleDouble.length){var nextToken=context2.future();nextToken.text==="|"&&(context2.popToken(),doubled=!0)}return{tokens:doubled?
middleDouble:middle,numArgs:0}};context.macros.set("|",midMacro(!1)),middleDouble.length&&context.macros.set("\\|",midMacro(!0));var arg=context.consumeArg().tokens,expanded=context.expandTokens([...right,...arg,...left]);return context.macros.endGroup(),{tokens:expanded.reverse(),numArgs:0}};defineMacro("\\bra@ket",braketHelper(!1));defineMacro("\\bra@set",braketHelper(!0));defineMacro("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");defineMacro(
"\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");defineMacro("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");defineMacro("\\angln","{\\angl n}");defineMacro("\\blue","\\textcolor{##6495ed}{#1}");defineMacro("\\orange","\\textcolor{##ffa500}{#1}");defineMacro("\\pink","\\textcolor{##ff00af}{#1}");defineMacro("\\red","\\textcolor{##df0030}{#1}");defineMacro("\\green","\\textcolor{##28ae7b}{#1}");defineMacro("\\gray","\\textcolor{gray}{#1}");defineMacro("\\\
purple","\\textcolor{##9d38bd}{#1}");defineMacro("\\blueA","\\textcolor{##ccfaff}{#1}");defineMacro("\\blueB","\\textcolor{##80f6ff}{#1}");defineMacro("\\blueC","\\textcolor{##63d9ea}{#1}");defineMacro("\\blueD","\\textcolor{##11accd}{#1}");defineMacro("\\blueE","\\textcolor{##0c7f99}{#1}");defineMacro("\\tealA","\\textcolor{##94fff5}{#1}");defineMacro("\\tealB","\\textcolor{##26edd5}{#1}");defineMacro("\\tealC","\\textcolor{##01d1c1}{#1}");defineMacro("\\tealD","\\textcolor{##01a995}{#1}");defineMacro(
"\\tealE","\\textcolor{##208170}{#1}");defineMacro("\\greenA","\\textcolor{##b6ffb0}{#1}");defineMacro("\\greenB","\\textcolor{##8af281}{#1}");defineMacro("\\greenC","\\textcolor{##74cf70}{#1}");defineMacro("\\greenD","\\textcolor{##1fab54}{#1}");defineMacro("\\greenE","\\textcolor{##0d923f}{#1}");defineMacro("\\goldA","\\textcolor{##ffd0a9}{#1}");defineMacro("\\goldB","\\textcolor{##ffbb71}{#1}");defineMacro("\\goldC","\\textcolor{##ff9c39}{#1}");defineMacro("\\goldD","\\textcolor{##e07d10}{#1}");
defineMacro("\\goldE","\\textcolor{##a75a05}{#1}");defineMacro("\\redA","\\textcolor{##fca9a9}{#1}");defineMacro("\\redB","\\textcolor{##ff8482}{#1}");defineMacro("\\redC","\\textcolor{##f9685d}{#1}");defineMacro("\\redD","\\textcolor{##e84d39}{#1}");defineMacro("\\redE","\\textcolor{##bc2612}{#1}");defineMacro("\\maroonA","\\textcolor{##ffbde0}{#1}");defineMacro("\\maroonB","\\textcolor{##ff92c6}{#1}");defineMacro("\\maroonC","\\textcolor{##ed5fa6}{#1}");defineMacro("\\maroonD","\\textcolor{##ca\
337c}{#1}");defineMacro("\\maroonE","\\textcolor{##9e034e}{#1}");defineMacro("\\purpleA","\\textcolor{##ddd7ff}{#1}");defineMacro("\\purpleB","\\textcolor{##c6b9fc}{#1}");defineMacro("\\purpleC","\\textcolor{##aa87ff}{#1}");defineMacro("\\purpleD","\\textcolor{##7854ab}{#1}");defineMacro("\\purpleE","\\textcolor{##543b78}{#1}");defineMacro("\\mintA","\\textcolor{##f5f9e8}{#1}");defineMacro("\\mintB","\\textcolor{##edf2df}{#1}");defineMacro("\\mintC","\\textcolor{##e0e5cc}{#1}");defineMacro("\\gra\
yA","\\textcolor{##f6f7f7}{#1}");defineMacro("\\grayB","\\textcolor{##f0f1f2}{#1}");defineMacro("\\grayC","\\textcolor{##e3e5e6}{#1}");defineMacro("\\grayD","\\textcolor{##d6d8da}{#1}");defineMacro("\\grayE","\\textcolor{##babec2}{#1}");defineMacro("\\grayF","\\textcolor{##888d93}{#1}");defineMacro("\\grayG","\\textcolor{##626569}{#1}");defineMacro("\\grayH","\\textcolor{##3b3e40}{#1}");defineMacro("\\grayI","\\textcolor{##21242c}{#1}");defineMacro("\\kaBlue","\\textcolor{##314453}{#1}");defineMacro(
"\\kaGreen","\\textcolor{##71B307}{#1}");var implicitCommands={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class MacroExpander{constructor(input,settings,mode){this.settings=void 0,this.expansionCount=void 0,this.lexer=void 0,this.macros=void 0,this.stack=void 0,this.mode=void 0,this.settings=settings,this.expansionCount=0,this.feed(input),this.macros=new Namespace(macros,settings.macros),this.mode=mode,this.stack=[]}feed(input){this.lexer=new Lexer(input,this.settings)}switchMode(newMode){this.mode=
newMode}beginGroup(){this.macros.beginGroup()}endGroup(){this.macros.endGroup()}endGroups(){this.macros.endGroups()}future(){return this.stack.length===0&&this.pushToken(this.lexer.lex()),this.stack[this.stack.length-1]}popToken(){return this.future(),this.stack.pop()}pushToken(token2){this.stack.push(token2)}pushTokens(tokens){this.stack.push(...tokens)}scanArgument(isOptional){var start2,end,tokens;if(isOptional){if(this.consumeSpaces(),this.future().text!=="[")return null;start2=this.popToken(),
{tokens,end}=this.consumeArg(["]"])}else({tokens,start:start2,end}=this.consumeArg());return this.pushToken(new Token("EOF",end.loc)),this.pushTokens(tokens),start2.range(end,"")}consumeSpaces(){for(;;){var token2=this.future();if(token2.text===" ")this.stack.pop();else break}}consumeArg(delims){var tokens=[],isDelimited=delims&&delims.length>0;isDelimited||this.consumeSpaces();var start2=this.future(),tok,depth=0,match=0;do{if(tok=this.popToken(),tokens.push(tok),tok.text==="{")++depth;else if(tok.
text==="}"){if(--depth,depth===-1)throw new ParseError2("Extra }",tok)}else if(tok.text==="EOF")throw new ParseError2("Unexpected end of input in a macro argument, expected '"+(delims&&isDelimited?delims[match]:"}")+"'",tok);if(delims&&isDelimited)if((depth===0||depth===1&&delims[match]==="{")&&tok.text===delims[match]){if(++match,match===delims.length){tokens.splice(-match,match);break}}else match=0}while(depth!==0||isDelimited);return start2.text==="{"&&tokens[tokens.length-1].text==="}"&&(tokens.
pop(),tokens.shift()),tokens.reverse(),{tokens,start:start2,end:tok}}consumeArgs(numArgs,delimiters2){if(delimiters2){if(delimiters2.length!==numArgs+1)throw new ParseError2("The length of delimiters doesn't match the number of args!");for(var delims=delimiters2[0],i=0;i<delims.length;i++){var tok=this.popToken();if(delims[i]!==tok.text)throw new ParseError2("Use of the macro doesn't match its definition",tok)}}for(var args=[],_i=0;_i<numArgs;_i++)args.push(this.consumeArg(delimiters2&&delimiters2[_i+
1]).tokens);return args}countExpansion(amount){if(this.expansionCount+=amount,this.expansionCount>this.settings.maxExpand)throw new ParseError2("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(expandableOnly){var topToken=this.popToken(),name=topToken.text,expansion=topToken.noexpand?null:this._getExpansion(name);if(expansion==null||expandableOnly&&expansion.unexpandable){if(expandableOnly&&expansion==null&&name[0]==="\\"&&!this.isDefined(name))throw new ParseError2(
"Undefined control sequence: "+name);return this.pushToken(topToken),!1}this.countExpansion(1);var tokens=expansion.tokens,args=this.consumeArgs(expansion.numArgs,expansion.delimiters);if(expansion.numArgs){tokens=tokens.slice();for(var i=tokens.length-1;i>=0;--i){var tok=tokens[i];if(tok.text==="#"){if(i===0)throw new ParseError2("Incomplete placeholder at end of macro body",tok);if(tok=tokens[--i],tok.text==="#")tokens.splice(i+1,1);else if(/^[1-9]$/.test(tok.text))tokens.splice(i,2,...args[+tok.
text-1]);else throw new ParseError2("Not a valid argument number",tok)}}}return this.pushTokens(tokens),tokens.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;)if(this.expandOnce()===!1){var token2=this.stack.pop();return token2.treatAsRelax&&(token2.text="\\relax"),token2}throw new Error}expandMacro(name){return this.macros.has(name)?this.expandTokens([new Token(name)]):void 0}expandTokens(tokens){var output=[],oldStackLength=this.stack.length;for(this.
pushTokens(tokens);this.stack.length>oldStackLength;)if(this.expandOnce(!0)===!1){var token2=this.stack.pop();token2.treatAsRelax&&(token2.noexpand=!1,token2.treatAsRelax=!1),output.push(token2)}return this.countExpansion(output.length),output}expandMacroAsText(name){var tokens=this.expandMacro(name);return tokens&&tokens.map(token2=>token2.text).join("")}_getExpansion(name){var definition2=this.macros.get(name);if(definition2==null)return definition2;if(name.length===1){var catcode=this.lexer.catcodes[name];
if(catcode!=null&&catcode!==13)return}var expansion=typeof definition2=="function"?definition2(this):definition2;if(typeof expansion=="string"){var numArgs=0;if(expansion.indexOf("#")!==-1)for(var stripped=expansion.replace(/##/g,"");stripped.indexOf("#"+(numArgs+1))!==-1;)++numArgs;for(var bodyLexer=new Lexer(expansion,this.settings),tokens=[],tok=bodyLexer.lex();tok.text!=="EOF";)tokens.push(tok),tok=bodyLexer.lex();tokens.reverse();var expanded={tokens,numArgs};return expanded}return expansion}isDefined(name){
return this.macros.has(name)||functions.hasOwnProperty(name)||symbols.math.hasOwnProperty(name)||symbols.text.hasOwnProperty(name)||implicitCommands.hasOwnProperty(name)}isExpandable(name){var macro=this.macros.get(name);return macro!=null?typeof macro=="string"||typeof macro=="function"||!macro.unexpandable:functions.hasOwnProperty(name)&&!functions[name].primitive}}var unicodeSubRegEx=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,
uSubsAndSups=Object.freeze({"₊":"+","₋":"-","₌":"=","₍":"(","₎":")","₀":"0","₁":"1","₂":"2","₃":"3","₄":"4","₅":"5","₆":"6","₇":"7","₈":"8","₉":"9","ₐ":"a","ₑ":"e","ₕ":"h","ᵢ":"i","ⱼ":"j","ₖ":"k","ₗ":"l","ₘ":"m","ₙ":"n","ₒ":"o","ₚ":"p","ᵣ":"r","ₛ":"s","ₜ":"t","ᵤ":"u","ᵥ":"v","ₓ":"x","ᵦ":"β","ᵧ":"γ","ᵨ":"ρ","ᵩ":"ϕ","ᵪ":"χ","⁺":"+","⁻":"-","⁼":"=","⁽":"(","⁾":")","⁰":"0","¹":"1","²":"2","³":"3","⁴":"4",
"⁵":"5","⁶":"6","⁷":"7","⁸":"8","⁹":"9","ᴬ":"A","ᴮ":"B","ᴰ":"D","ᴱ":"E","ᴳ":"G","ᴴ":"H","ᴵ":"I","ᴶ":"J","ᴷ":"K","ᴸ":"L","ᴹ":"M","ᴺ":"N","ᴼ":"O","ᴾ":"P","ᴿ":"R","ᵀ":"T","ᵁ":"U","ⱽ":"V","ᵂ":"W","ᵃ":"a","ᵇ":"b","ᶜ":"c","ᵈ":"d","ᵉ":"e","ᶠ":"f","ᵍ":"g",ʰ:"h","ⁱ":"i",ʲ:"j","ᵏ":"k",ˡ:"l","ᵐ":"m",ⁿ:"n","ᵒ":"o","ᵖ":"p",ʳ:"r",ˢ:"s","ᵗ":"t","ᵘ":"u","ᵛ":"v",ʷ:"w",ˣ:"x",ʸ:"y","ᶻ":"z","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"\
ϕ","ᵡ":"χ","ᶿ":"θ"}),unicodeAccents={"́":{text:"\\'",math:"\\acute"},"̀":{text:"\\`",math:"\\grave"},"̈":{text:'\\"',math:"\\ddot"},"̃":{text:"\\~",math:"\\tilde"},"̄":{text:"\\=",math:"\\bar"},"̆":{text:"\\u",math:"\\breve"},"̌":{text:"\\v",math:"\\check"},"̂":{text:"\\^",math:"\\hat"},"̇":{text:"\\.",math:"\\dot"},"̊":{text:"\\r",math:"\\mathring"},"̋":{text:"\\H"},"̧":{text:"\\c"}},unicodeSymbols={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",
ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"\
í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",
ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"\
Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"\
Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",
Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"\
ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};class Parser{constructor(input,settings){this.mode=void 0,this.gullet=void 0,this.settings=void 0,this.leftrightDepth=void 0,this.nextToken=void 0,this.mode="math",this.gullet=new MacroExpander(
input,settings,this.mode),this.settings=settings,this.leftrightDepth=0}expect(text2,consume){if(consume===void 0&&(consume=!0),this.fetch().text!==text2)throw new ParseError2("Expected '"+text2+"', got '"+this.fetch().text+"'",this.fetch());consume&&this.consume()}consume(){this.nextToken=null}fetch(){return this.nextToken==null&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(newMode){this.mode=newMode,this.gullet.switchMode(newMode)}parse(){this.settings.globalGroup||this.
gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var parse2=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),parse2}finally{this.gullet.endGroups()}}subparse(tokens){var oldToken=this.nextToken;this.consume(),this.gullet.pushToken(new Token("}")),this.gullet.pushTokens(tokens);var parse2=this.parseExpression(!1);return this.expect("}"),this.nextToken=oldToken,parse2}parseExpression(breakOnInfix,breakOnTokenText){
for(var body2=[];;){this.mode==="math"&&this.consumeSpaces();var lex=this.fetch();if(Parser.endOfExpression.indexOf(lex.text)!==-1||breakOnTokenText&&lex.text===breakOnTokenText||breakOnInfix&&functions[lex.text]&&functions[lex.text].infix)break;var atom=this.parseAtom(breakOnTokenText);if(atom){if(atom.type==="internal")continue}else break;body2.push(atom)}return this.mode==="text"&&this.formLigatures(body2),this.handleInfixNodes(body2)}handleInfixNodes(body2){for(var overIndex=-1,funcName,i=0;i<
body2.length;i++)if(body2[i].type==="infix"){if(overIndex!==-1)throw new ParseError2("only one infix operator per group",body2[i].token);overIndex=i,funcName=body2[i].replaceWith}if(overIndex!==-1&&funcName){var numerNode,denomNode,numerBody=body2.slice(0,overIndex),denomBody=body2.slice(overIndex+1);numerBody.length===1&&numerBody[0].type==="ordgroup"?numerNode=numerBody[0]:numerNode={type:"ordgroup",mode:this.mode,body:numerBody},denomBody.length===1&&denomBody[0].type==="ordgroup"?denomNode=denomBody[0]:
denomNode={type:"ordgroup",mode:this.mode,body:denomBody};var node2;return funcName==="\\\\abovefrac"?node2=this.callFunction(funcName,[numerNode,body2[overIndex],denomNode],[]):node2=this.callFunction(funcName,[numerNode,denomNode],[]),[node2]}else return body2}handleSupSubscript(name){var symbolToken=this.fetch(),symbol=symbolToken.text;this.consume(),this.consumeSpaces();var group;do{var _group;group=this.parseGroup(name)}while(((_group=group)==null?void 0:_group.type)==="internal");if(!group)
throw new ParseError2("Expected group after '"+symbol+"'",symbolToken);return group}formatUnsupportedCmd(text2){for(var textordArray=[],i=0;i<text2.length;i++)textordArray.push({type:"textord",mode:"text",text:text2[i]});var textNode={type:"text",mode:this.mode,body:textordArray},colorNode={type:"color",mode:this.mode,color:this.settings.errorColor,body:[textNode]};return colorNode}parseAtom(breakOnTokenText){var base2=this.parseGroup("atom",breakOnTokenText);if(base2?.type==="internal"||this.mode===
"text")return base2;for(var superscript,subscript;;){this.consumeSpaces();var lex=this.fetch();if(lex.text==="\\limits"||lex.text==="\\nolimits"){if(base2&&base2.type==="op"){var limits=lex.text==="\\limits";base2.limits=limits,base2.alwaysHandleSupSub=!0}else if(base2&&base2.type==="operatorname")base2.alwaysHandleSupSub&&(base2.limits=lex.text==="\\limits");else throw new ParseError2("Limit controls must follow a math operator",lex);this.consume()}else if(lex.text==="^"){if(superscript)throw new ParseError2(
"Double superscript",lex);superscript=this.handleSupSubscript("superscript")}else if(lex.text==="_"){if(subscript)throw new ParseError2("Double subscript",lex);subscript=this.handleSupSubscript("subscript")}else if(lex.text==="'"){if(superscript)throw new ParseError2("Double superscript",lex);var prime={type:"textord",mode:this.mode,text:"\\prime"},primes=[prime];for(this.consume();this.fetch().text==="'";)primes.push(prime),this.consume();this.fetch().text==="^"&&primes.push(this.handleSupSubscript(
"superscript")),superscript={type:"ordgroup",mode:this.mode,body:primes}}else if(uSubsAndSups[lex.text]){var isSub=unicodeSubRegEx.test(lex.text),subsupTokens=[];for(subsupTokens.push(new Token(uSubsAndSups[lex.text])),this.consume();;){var token2=this.fetch().text;if(!uSubsAndSups[token2]||unicodeSubRegEx.test(token2)!==isSub)break;subsupTokens.unshift(new Token(uSubsAndSups[token2])),this.consume()}var body2=this.subparse(subsupTokens);isSub?subscript={type:"ordgroup",mode:"math",body:body2}:superscript=
{type:"ordgroup",mode:"math",body:body2}}else break}return superscript||subscript?{type:"supsub",mode:this.mode,base:base2,sup:superscript,sub:subscript}:base2}parseFunction(breakOnTokenText,name){var token2=this.fetch(),func=token2.text,funcData=functions[func];if(!funcData)return null;if(this.consume(),name&&name!=="atom"&&!funcData.allowedInArgument)throw new ParseError2("Got function '"+func+"' with no arguments"+(name?" as "+name:""),token2);if(this.mode==="text"&&!funcData.allowedInText)throw new ParseError2(
"Can't use function '"+func+"' in text mode",token2);if(this.mode==="math"&&funcData.allowedInMath===!1)throw new ParseError2("Can't use function '"+func+"' in math mode",token2);var{args,optArgs}=this.parseArguments(func,funcData);return this.callFunction(func,args,optArgs,token2,breakOnTokenText)}callFunction(name,args,optArgs,token2,breakOnTokenText){var context={funcName:name,parser:this,token:token2,breakOnTokenText},func=functions[name];if(func&&func.handler)return func.handler(context,args,
optArgs);throw new ParseError2("No function handler for "+name)}parseArguments(func,funcData){var totalArgs=funcData.numArgs+funcData.numOptionalArgs;if(totalArgs===0)return{args:[],optArgs:[]};for(var args=[],optArgs=[],i=0;i<totalArgs;i++){var argType=funcData.argTypes&&funcData.argTypes[i],isOptional=i<funcData.numOptionalArgs;(funcData.primitive&&argType==null||funcData.type==="sqrt"&&i===1&&optArgs[0]==null)&&(argType="primitive");var arg=this.parseGroupOfType("argument to '"+func+"'",argType,
isOptional);if(isOptional)optArgs.push(arg);else if(arg!=null)args.push(arg);else throw new ParseError2("Null argument, please report this as a bug")}return{args,optArgs}}parseGroupOfType(name,type2,optional2){switch(type2){case"color":return this.parseColorGroup(optional2);case"size":return this.parseSizeGroup(optional2);case"url":return this.parseUrlGroup(optional2);case"math":case"text":return this.parseArgumentGroup(optional2,type2);case"hbox":{var group=this.parseArgumentGroup(optional2,"te\
xt");return group!=null?{type:"styling",mode:group.mode,body:[group],style:"text"}:null}case"raw":{var token2=this.parseStringGroup("raw",optional2);return token2!=null?{type:"raw",mode:"text",string:token2.text}:null}case"primitive":{if(optional2)throw new ParseError2("A primitive argument cannot be optional");var _group2=this.parseGroup(name);if(_group2==null)throw new ParseError2("Expected group as "+name,this.fetch());return _group2}case"original":case null:case void 0:return this.parseArgumentGroup(
optional2);default:throw new ParseError2("Unknown group type as "+name,this.fetch())}}consumeSpaces(){for(;this.fetch().text===" ";)this.consume()}parseStringGroup(modeName,optional2){var argToken=this.gullet.scanArgument(optional2);if(argToken==null)return null;for(var str="",nextToken;(nextToken=this.fetch()).text!=="EOF";)str+=nextToken.text,this.consume();return this.consume(),argToken.text=str,argToken}parseRegexGroup(regex,modeName){for(var firstToken=this.fetch(),lastToken=firstToken,str="",
nextToken;(nextToken=this.fetch()).text!=="EOF"&&regex.test(str+nextToken.text);)lastToken=nextToken,str+=lastToken.text,this.consume();if(str==="")throw new ParseError2("Invalid "+modeName+": '"+firstToken.text+"'",firstToken);return firstToken.range(lastToken,str)}parseColorGroup(optional2){var res=this.parseStringGroup("color",optional2);if(res==null)return null;var match=/^(#[a-f0-9]{3}|#?[a-f0-9]{6}|[a-z]+)$/i.exec(res.text);if(!match)throw new ParseError2("Invalid color: '"+res.text+"'",res);
var color=match[0];return/^[0-9a-f]{6}$/i.test(color)&&(color="#"+color),{type:"color-token",mode:this.mode,color}}parseSizeGroup(optional2){var res,isBlank=!1;if(this.gullet.consumeSpaces(),!optional2&&this.gullet.future().text!=="{"?res=this.parseRegexGroup(/^[-+]? *(?:$|\d+|\d+\.\d*|\.\d*) *[a-z]{0,2} *$/,"size"):res=this.parseStringGroup("size",optional2),!res)return null;!optional2&&res.text.length===0&&(res.text="0pt",isBlank=!0);var match=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(
res.text);if(!match)throw new ParseError2("Invalid size: '"+res.text+"'",res);var data={number:+(match[1]+match[2]),unit:match[3]};if(!validUnit(data))throw new ParseError2("Invalid unit: '"+data.unit+"'",res);return{type:"size",mode:this.mode,value:data,isBlank}}parseUrlGroup(optional2){this.gullet.lexer.setCatcode("%",13),this.gullet.lexer.setCatcode("~",12);var res=this.parseStringGroup("url",optional2);if(this.gullet.lexer.setCatcode("%",14),this.gullet.lexer.setCatcode("~",13),res==null)return null;
var url2=res.text.replace(/\\([#$%&~_^{}])/g,"$1");return{type:"url",mode:this.mode,url:url2}}parseArgumentGroup(optional2,mode){var argToken=this.gullet.scanArgument(optional2);if(argToken==null)return null;var outerMode=this.mode;mode&&this.switchMode(mode),this.gullet.beginGroup();var expression=this.parseExpression(!1,"EOF");this.expect("EOF"),this.gullet.endGroup();var result={type:"ordgroup",mode:this.mode,loc:argToken.loc,body:expression};return mode&&this.switchMode(outerMode),result}parseGroup(name,breakOnTokenText){
var firstToken=this.fetch(),text2=firstToken.text,result;if(text2==="{"||text2==="\\begingroup"){this.consume();var groupEnd=text2==="{"?"}":"\\endgroup";this.gullet.beginGroup();var expression=this.parseExpression(!1,groupEnd),lastToken=this.fetch();this.expect(groupEnd),this.gullet.endGroup(),result={type:"ordgroup",mode:this.mode,loc:SourceLocation.range(firstToken,lastToken),body:expression,semisimple:text2==="\\begingroup"||void 0}}else if(result=this.parseFunction(breakOnTokenText,name)||this.
parseSymbol(),result==null&&text2[0]==="\\"&&!implicitCommands.hasOwnProperty(text2)){if(this.settings.throwOnError)throw new ParseError2("Undefined control sequence: "+text2,firstToken);result=this.formatUnsupportedCmd(text2),this.consume()}return result}formLigatures(group){for(var n=group.length-1,i=0;i<n;++i){var a=group[i],v=a.text;v==="-"&&group[i+1].text==="-"&&(i+1<n&&group[i+2].text==="-"?(group.splice(i,3,{type:"textord",mode:"text",loc:SourceLocation.range(a,group[i+2]),text:"---"}),n-=
2):(group.splice(i,2,{type:"textord",mode:"text",loc:SourceLocation.range(a,group[i+1]),text:"--"}),n-=1)),(v==="'"||v==="`")&&group[i+1].text===v&&(group.splice(i,2,{type:"textord",mode:"text",loc:SourceLocation.range(a,group[i+1]),text:v+v}),n-=1)}}parseSymbol(){var nucleus=this.fetch(),text2=nucleus.text;if(/^\\verb[^a-zA-Z]/.test(text2)){this.consume();var arg=text2.slice(5),star=arg.charAt(0)==="*";if(star&&(arg=arg.slice(1)),arg.length<2||arg.charAt(0)!==arg.slice(-1))throw new ParseError2(
`\\verb assertion failed --
                    please report what input caused this bug`);return arg=arg.slice(1,-1),{type:"verb",mode:"text",body:arg,star}}unicodeSymbols.hasOwnProperty(text2[0])&&!symbols[this.mode][text2[0]]&&(this.settings.strict&&this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Accented Unicode text character "'+text2[0]+'" used in math mode',nucleus),text2=unicodeSymbols[text2[0]]+text2.slice(1));var match=combiningDiacriticalMarksEndRegex.exec(text2);match&&(text2=text2.substring(
0,match.index),text2==="i"?text2="ı":text2==="j"&&(text2="ȷ"));var symbol;if(symbols[this.mode][text2]){this.settings.strict&&this.mode==="math"&&extraLatin.indexOf(text2)>=0&&this.settings.reportNonstrict("unicodeTextInMathMode",'Latin-1/Unicode text character "'+text2[0]+'" used in math mode',nucleus);var group=symbols[this.mode][text2].group,loc=SourceLocation.range(nucleus),s2;if(ATOMS.hasOwnProperty(group)){var family=group;s2={type:"atom",mode:this.mode,family,loc,text:text2}}else s2={type:group,
mode:this.mode,loc,text:text2};symbol=s2}else if(text2.charCodeAt(0)>=128)this.settings.strict&&(supportedCodepoint(text2.charCodeAt(0))?this.mode==="math"&&this.settings.reportNonstrict("unicodeTextInMathMode",'Unicode text character "'+text2[0]+'" used in math mode',nucleus):this.settings.reportNonstrict("unknownSymbol",'Unrecognized Unicode character "'+text2[0]+'"'+(" ("+text2.charCodeAt(0)+")"),nucleus)),symbol={type:"textord",mode:"text",loc:SourceLocation.range(nucleus),text:text2};else return null;
if(this.consume(),match)for(var i=0;i<match[0].length;i++){var accent2=match[0][i];if(!unicodeAccents[accent2])throw new ParseError2("Unknown accent ' "+accent2+"'",nucleus);var command=unicodeAccents[accent2][this.mode]||unicodeAccents[accent2].text;if(!command)throw new ParseError2("Accent "+accent2+" unsupported in "+this.mode+" mode",nucleus);symbol={type:"accent",mode:this.mode,loc:SourceLocation.range(nucleus),label:command,isStretchy:!1,isShifty:!0,base:symbol}}return symbol}}Parser.endOfExpression=
["}","\\endgroup","\\end","\\right","&"];var parseTree=function(toParse,settings){if(!(typeof toParse=="string"||toParse instanceof String))throw new TypeError("KaTeX can only parse string typed expression");var parser=new Parser(toParse,settings);delete parser.gullet.macros.current["\\df@tag"];var tree=parser.parse();if(delete parser.gullet.macros.current["\\current@color"],delete parser.gullet.macros.current["\\color"],parser.gullet.macros.get("\\df@tag")){if(!settings.displayMode)throw new ParseError2(
"\\tag works only in display equations");tree=[{type:"tag",mode:"text",body:tree,tag:parser.subparse([new Token("\\df@tag")])}]}return tree},render=function(expression,baseNode,options){baseNode.textContent="";var node2=renderToDomTree(expression,options).toNode();baseNode.appendChild(node2)};typeof document<"u"&&document.compatMode!=="CSS1Compat"&&(typeof console<"u"&&console.warn("Warning: KaTeX doesn't work in quirks mode. Make sure your website has a suitable doctype."),render=function(){throw new ParseError2(
"KaTeX doesn't work in quirks mode.")});var renderToString=function(expression,options){var markup=renderToDomTree(expression,options).toMarkup();return markup},generateParseTree=function(expression,options){var settings=new Settings(options);return parseTree(expression,settings)},renderError=function(error2,expression,options){if(options.throwOnError||!(error2 instanceof ParseError2))throw error2;var node2=buildCommon.makeSpan(["katex-error"],[new SymbolNode(expression)]);return node2.setAttribute(
"title",error2.toString()),node2.setAttribute("style","color:"+options.errorColor),node2},renderToDomTree=function(expression,options){var settings=new Settings(options);try{var tree=parseTree(expression,settings);return buildTree(tree,expression,settings)}catch(error2){return renderError(error2,expression,settings)}},renderToHTMLTree=function(expression,options){var settings=new Settings(options);try{var tree=parseTree(expression,settings);return buildHTMLTree(tree,expression,settings)}catch(error2){
return renderError(error2,expression,settings)}},version="0.16.22",__domTree={Span,Anchor,SymbolNode,SvgNode,PathNode,LineNode},katex={version,render,renderToString,ParseError:ParseError2,SETTINGS_SCHEMA,__parse:generateParseTree,__renderToDomTree:renderToDomTree,__renderToHTMLTree:renderToHTMLTree,__setFontMetrics:setFontMetrics,__defineSymbol:defineSymbol,__defineFunction:defineFunction,__defineMacro:defineMacro,__domTree};const emptyOptions$5={};function remarkMath(options){const self2=this,settings=options||
emptyOptions$5,data=self2.data(),micromarkExtensions=data.micromarkExtensions||(data.micromarkExtensions=[]),fromMarkdownExtensions=data.fromMarkdownExtensions||(data.fromMarkdownExtensions=[]),toMarkdownExtensions=data.toMarkdownExtensions||(data.toMarkdownExtensions=[]);micromarkExtensions.push(math$1(settings)),fromMarkdownExtensions.push(mathFromMarkdown()),toMarkdownExtensions.push(mathToMarkdown(settings))}const findAfter=(function(parent,index2,test){const is2=convert(test);if(!parent||!parent.
type||!parent.children)throw new Error("Expected parent node");if(typeof index2=="number"){if(index2<0||index2===Number.POSITIVE_INFINITY)throw new Error("Expected positive finite number as index")}else if(index2=parent.children.indexOf(index2),index2<0)throw new Error("Expected child node or index");for(;++index2<parent.children.length;)if(is2(parent.children[index2],index2,parent))return parent.children[index2]}),convertElement=(function(test){if(test==null)return element$2;if(typeof test=="st\
ring")return tagNameFactory(test);if(typeof test=="object")return anyFactory(test);if(typeof test=="function")return castFactory(test);throw new Error("Expected function, string, or array as `test`")});function anyFactory(tests){const checks2=[];let index2=-1;for(;++index2<tests.length;)checks2[index2]=convertElement(tests[index2]);return castFactory(any2);function any2(...parameters){let index3=-1;for(;++index3<checks2.length;)if(checks2[index3].apply(this,parameters))return!0;return!1}}function tagNameFactory(check){
return castFactory(tagName);function tagName(element2){return element2.tagName===check}}function castFactory(testFunction){return check;function check(value,index2,parent){return!!(looksLikeAnElement(value)&&testFunction.call(this,value,typeof index2=="number"?index2:void 0,parent||void 0))}}function element$2(element2){return!!(element2&&typeof element2=="object"&&"type"in element2&&element2.type==="element"&&"tagName"in element2&&typeof element2.tagName=="string")}function looksLikeAnElement(value){
return value!==null&&typeof value=="object"&&"type"in value&&"tagName"in value}const searchLineFeeds=/\n/g,searchTabOrSpaces=/[\t ]+/g,br=convertElement("br"),cell=convertElement(isCell),p$1=convertElement("p"),row=convertElement("tr"),notRendered=convertElement(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",hidden,closedDialog]),blockOrCaption=convertElement(["address","article","aside","blockquote","body","caption","center","dd","dialog","dir","dl",
"dt","div","figure","figcaption","footer","form,","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","legend","li","listing","main","menu","nav","ol","p","plaintext","pre","section","ul","xmp"]);function toText(tree,options){const options_=options||{},children="children"in tree?tree.children:[],block2=blockOrCaption(tree),whitespace2=inferWhitespace(tree,{whitespace:options_.whitespace||"normal"}),results=[];(tree.type==="text"||tree.type==="comment")&&results.push(...collectText(tree,{
breakBefore:!0,breakAfter:!0}));let index2=-1;for(;++index2<children.length;)results.push(...renderedTextCollection(children[index2],tree,{whitespace:whitespace2,breakBefore:index2?void 0:block2,breakAfter:index2<children.length-1?br(children[index2+1]):block2}));const result=[];let count;for(index2=-1;++index2<results.length;){const value=results[index2];typeof value=="number"?count!==void 0&&value>count&&(count=value):value&&(count!==void 0&&count>-1&&result.push(`
`.repeat(count)||" "),count=-1,result.push(value))}return result.join("")}function renderedTextCollection(node2,parent,info2){return node2.type==="element"?collectElement(node2,parent,info2):node2.type==="text"?info2.whitespace==="normal"?collectText(node2,info2):collectPreText(node2):[]}function collectElement(node2,parent,info2){const whitespace2=inferWhitespace(node2,info2),children=node2.children||[];let index2=-1,items2=[];if(notRendered(node2))return items2;let prefix,suffix;for(br(node2)||
row(node2)&&findAfter(parent,node2,row)?suffix=`
`:p$1(node2)?(prefix=2,suffix=2):blockOrCaption(node2)&&(prefix=1,suffix=1);++index2<children.length;)items2=items2.concat(renderedTextCollection(children[index2],node2,{whitespace:whitespace2,breakBefore:index2?void 0:prefix,breakAfter:index2<children.length-1?br(children[index2+1]):suffix}));return cell(node2)&&findAfter(parent,node2,cell)&&items2.push("	"),prefix&&items2.unshift(prefix),suffix&&items2.push(suffix),items2}function collectText(node2,info2){const value=String(node2.value),lines=[],
result=[];let start2=0;for(;start2<=value.length;){searchLineFeeds.lastIndex=start2;const match=searchLineFeeds.exec(value),end=match&&"index"in match?match.index:value.length;lines.push(trimAndCollapseSpacesAndTabs(value.slice(start2,end).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),start2===0?info2.breakBefore:!0,end===value.length?info2.breakAfter:!0)),start2=end+1}let index2=-1,join2;for(;++index2<lines.length;)lines[index2].charCodeAt(lines[index2].length-1)===8203||index2<
lines.length-1&&lines[index2+1].charCodeAt(0)===8203?(result.push(lines[index2]),join2=void 0):lines[index2]?(typeof join2=="number"&&result.push(join2),result.push(lines[index2]),join2=0):(index2===0||index2===lines.length-1)&&result.push(0);return result}function collectPreText(node2){return[String(node2.value)]}function trimAndCollapseSpacesAndTabs(value,breakBefore,breakAfter){const result=[];let start2=0,end;for(;start2<value.length;){searchTabOrSpaces.lastIndex=start2;const match=searchTabOrSpaces.
exec(value);end=match?match.index:value.length,!start2&&!end&&match&&!breakBefore&&result.push(""),start2!==end&&result.push(value.slice(start2,end)),start2=match?end+match[0].length:end}return start2!==end&&!breakAfter&&result.push(""),result.join(" ")}function inferWhitespace(node2,info2){if(node2.type==="element"){const properties2=node2.properties||{};switch(node2.tagName){case"listing":case"plaintext":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return properties2.wrap?"pre-wra\
p":"pre";case"td":case"th":return properties2.noWrap?"nowrap":info2.whitespace;case"textarea":return"pre-wrap"}}return info2.whitespace}function hidden(node2){return!!(node2.properties||{}).hidden}function isCell(node2){return node2.tagName==="td"||node2.tagName==="th"}function closedDialog(node2){return node2.tagName==="dialog"&&!(node2.properties||{}).open}function _1c(hljs){const UNDERSCORE_IDENT_RE="[A-Za-zА-Яа-яёЁ_][A-Za-zА-Яа-яёЁ_0-9]+",KEYWORD="далее "+"возврат вызватьиск\
лючение выполнить для если и из или иначе иначеесли исключение каждого конецесли конецпопытки конеццикла не новый перейти перем по пока попытка прервать продолжить тогда цикл экспорт ",METAKEYWORD="загрузитьизфайла "+"вебклиент вместо внешнеесоединение клиент конецобласти мобильноеприложениеклиент мобильноеприложениесервер на\
клиенте наклиентенасервере наклиентенасерверебезконтекста насервере насерверебезконтекста область перед после сервер толстыйклиентобычноеприложение толстыйклиентуправляемоеприложение тонкийклиент ",BUILTIN="разделительстраниц разделительстрок символтабуляции "+"ansit\
ooem oemtoansi ввестивидсубконто ввестиперечисление ввестипериод ввестиплансчетов выбранныйплансчетов датагод датамесяц датачисло заголовоксистемы значениевстроку значениеизстроки каталогиб каталогпользователя кодсимв конгода конецпериодаби конецрассчитанногопериодаби конецстандартногоинтервала конквартала конмесяца коннедели лог лог10 максимальноеколичествосубконто названиеинтерфейса названиенабораправ назначитьвид назначитьсчет найтиссылки началопериодаби началостандартногоинтервала начгода на\
чквартала начмесяца начнедели номерднягода номерднянедели номернеделигода обработкаожидания основнойжурналрасчетов основнойплансчетов основнойязык очиститьокносообщений периодстр получитьвремята получитьдатута получитьдокументта получитьзначенияотбора получитьпозициюта получитьпустоезначение получитьта префиксавтонумерации пропись пустоезначение разм разобратьпозициюдокумента рассчитатьрегистрына рассчитатьрегистрыпо симв создатьобъект статусвозврата стрколичествострок сформироватьпозициюдокумен\
та счетпокоду текущеевремя типзначения типзначениястр установитьтана установитьтапо фиксшаблон шаблон "+"acos asin atan base64значение base64строка cos exp log log10 pow sin sqrt tan xmlзначение xmlстрока xmlтип xmlтипзнч активноеокно безопасныйрежим безопасныйрежимразделенияданных булево ввестидату ввестизначение ввестистроку ввестичисло возможностьчтенияxml вопрос восстановитьзначение врег выгрузитьжур\
налрегистрации выполнитьобработкуоповещения выполнитьпроверкуправдоступа вычислить год данныеформывзначение дата день деньгода деньнедели добавитьмесяц заблокироватьданныедляредактирования заблокироватьработупользователя завершитьработусистемы загрузитьвнешнююкомпоненту закрытьсправку записатьjson записатьxml записатьдатуjson записьжурналарегистрации заполнитьзначениясвойств запроситьразрешениепользователя запуститьприложение запуститьсистему зафиксироватьтранзакцию значениевданныеформы значение\
встрокувнутр значениевфайл значениезаполнено значениеизстрокивнутр значениеизфайла изxmlтипа импортмоделиxdto имякомпьютера имяпользователя инициализироватьпредопределенныеданные информацияобошибке каталогбиблиотекимобильногоустройства каталогвременныхфайлов каталогдокументов каталогпрограммы кодироватьстроку кодлокализацииинформационнойбазы кодсимвола командасистемы конецгода конецдня конецквартала конецмесяца конецминуты конецнедели конецчаса конфигурациябазыданныхизмененадинамически конфигура\
цияизменена копироватьданныеформы копироватьфайл краткоепредставлениеошибки лев макс местноевремя месяц мин минута монопольныйрежим найти найтинедопустимыесимволыxml найтиокнопонавигационнойссылке найтипомеченныенаудаление найтипоссылкам найтифайлы началогода началодня началоквартала началомесяца началоминуты началонедели началочаса начатьзапросразрешенияпользователя начатьзапускприложения начатькопированиефайла начатьперемещениефайла начатьподключениевнешнейкомпоненты начатьподключениерасширени\
яработыскриптографией начатьподключениерасширенияработысфайлами начатьпоискфайлов начатьполучениекаталогавременныхфайлов начатьполучениекаталогадокументов начатьполучениерабочегокаталогаданныхпользователя начатьполучениефайлов начатьпомещениефайла начатьпомещениефайлов начатьсозданиедвоичныхданныхизфайла начатьсозданиекаталога начатьтранзакцию начатьудалениефайлов начатьустановкувнешнейкомпоненты начатьустановкурасширенияработыскриптографией начатьустановкурасширенияработысфайлами неделягода нео\
бходимостьзавершениясоединения номерсеансаинформационнойбазы номерсоединенияинформационнойбазы нрег нстр обновитьинтерфейс обновитьнумерациюобъектов обновитьповторноиспользуемыезначения обработкапрерыванияпользователя объединитьфайлы окр описаниеошибки оповестить оповеститьобизменении отключитьобработчикзапросанастроекклиенталицензирования отключитьобработчикожидания отключитьобработчикоповещения открытьзначение открытьиндекссправки открытьсодержаниесправки открытьсправку открытьформу открытьфор\
мумодально отменитьтранзакцию очиститьжурналрегистрации очиститьнастройкипользователя очиститьсообщения параметрыдоступа перейтипонавигационнойссылке переместитьфайл подключитьвнешнююкомпоненту подключитьобработчикзапросанастроекклиенталицензирования подключитьобработчикожидания подключитьобработчикоповещения подключитьрасширениеработыскриптографией подключитьрасширениеработысфайлами подробноепредставлениеошибки показатьвводдаты показатьвводзначения показатьвводстроки показатьвводчисла показатьв\
опрос показатьзначение показатьинформациюобошибке показатьнакарте показатьоповещениепользователя показатьпредупреждение полноеимяпользователя получитьcomобъект получитьxmlтип получитьадреспоместоположению получитьблокировкусеансов получитьвремязавершенияспящегосеанса получитьвремязасыпанияпассивногосеанса получитьвремяожиданияблокировкиданных получитьданныевыбора получитьдополнительныйпараметрклиенталицензирования получитьдопустимыекодылокализации получитьдопустимыечасовыепояса получитьзаголовок\
клиентскогоприложения получитьзаголовоксистемы получитьзначенияотборажурналарегистрации получитьидентификаторконфигурации получитьизвременногохранилища получитьимявременногофайла получитьимяклиенталицензирования получитьинформациюэкрановклиента получитьиспользованиежурналарегистрации получитьиспользованиесобытияжурналарегистрации получитькраткийзаголовокприложения получитьмакетоформления получитьмаскувсефайлы получитьмаскувсефайлыклиента получитьмаскувсефайлысервера получитьместоположениепоадрес\
у получитьминимальнуюдлинупаролейпользователей получитьнавигационнуюссылку получитьнавигационнуюссылкуинформационнойбазы получитьобновлениеконфигурациибазыданных получитьобновлениепредопределенныхданныхинформационнойбазы получитьобщиймакет получитьобщуюформу получитьокна получитьоперативнуюотметкувремени получитьотключениебезопасногорежима получитьпараметрыфункциональныхопцийинтерфейса получитьполноеимяпредопределенногозначения получитьпредставлениянавигационныхссылок получитьпроверкусложностипа\
ролейпользователей получитьразделительпути получитьразделительпутиклиента получитьразделительпутисервера получитьсеансыинформационнойбазы получитьскоростьклиентскогосоединения получитьсоединенияинформационнойбазы получитьсообщенияпользователю получитьсоответствиеобъектаиформы получитьсоставстандартногоинтерфейсаodata получитьструктурухранениябазыданных получитьтекущийсеансинформационнойбазы получитьфайл получитьфайлы получитьформу получитьфункциональнуюопцию получитьфункциональнуюопциюинтерфейса\
 получитьчасовойпоясинформационнойбазы пользователиос поместитьвовременноехранилище поместитьфайл поместитьфайлы прав праводоступа предопределенноезначение представлениекодалокализации представлениепериода представлениеправа представлениеприложения представлениесобытияжурналарегистрации представлениечасовогопояса предупреждение прекратитьработусистемы привилегированныйрежим продолжитьвызов прочитатьjson прочитатьxml прочитатьдатуjson пустаястрока рабочийкаталогданныхпользователя разблокироватьда\
нныедляредактирования разделитьфайл разорватьсоединениесвнешнимисточникомданных раскодироватьстроку рольдоступна секунда сигнал символ скопироватьжурналрегистрации смещениелетнеговремени смещениестандартноговремени соединитьбуферыдвоичныхданных создатькаталог создатьфабрикуxdto сокрл сокрлп сокрп сообщить состояние сохранитьзначение сохранитьнастройкипользователя сред стрдлина стрзаканчиваетсяна стрзаменить стрнайти стрначинаетсяс строка строкасоединенияинформационнойбазы стрполучитьстроку стрра\
зделить стрсоединить стрсравнить стрчисловхождений стрчислострок стршаблон текущаядата текущаядатасеанса текущаяуниверсальнаядата текущаяуниверсальнаядатавмиллисекундах текущийвариантинтерфейсаклиентскогоприложения текущийвариантосновногошрифтаклиентскогоприложения текущийкодлокализации текущийрежимзапуска текущийязык текущийязыксистемы тип типзнч транзакцияактивна трег удалитьданныеинформационнойбазы удалитьизвременногохранилища удалитьобъекты удалитьфайлы универсальноевремя установитьбезопасны\
йрежим установитьбезопасныйрежимразделенияданных установитьблокировкусеансов установитьвнешнююкомпоненту установитьвремязавершенияспящегосеанса установитьвремязасыпанияпассивногосеанса установитьвремяожиданияблокировкиданных установитьзаголовокклиентскогоприложения установитьзаголовоксистемы установитьиспользованиежурналарегистрации установитьиспользованиесобытияжурналарегистрации установитькраткийзаголовокприложения установитьминимальнуюдлинупаролейпользователей установитьмонопольныйрежим устан\
овитьнастройкиклиенталицензирования установитьобновлениепредопределенныхданныхинформационнойбазы установитьотключениебезопасногорежима установитьпараметрыфункциональныхопцийинтерфейса установитьпривилегированныйрежим установитьпроверкусложностипаролейпользователей установитьрасширениеработыскриптографией установитьрасширениеработысфайлами установитьсоединениесвнешнимисточникомданных установитьсоответствиеобъектаиформы установитьсоставстандартногоинтерфейсаodata установитьчасовойпоясинформационно\
йбазы установитьчасовойпояссеанса формат цел час часовойпояс часовойпояссеанса число числопрописью этоадресвременногохранилища "+"wsссылки библиотекакартинок библиотекамакетовоформлениякомпоновкиданных библиотекастилей бизнеспроцессы внешниеисточникиданных внешниеобработки внешниеотчеты встроенныепокупки главныйинтерфейс главныйстиль документы доставляемыеуведомления журналыдокуме\
нтов задачи информацияобинтернетсоединении использованиерабочейдаты историяработыпользователя константы критерииотбора метаданные обработки отображениерекламы отправкадоставляемыхуведомлений отчеты панельзадачос параметрзапуска параметрысеанса перечисления планывидоврасчета планывидовхарактеристик планыобмена планысчетов полнотекстовыйпоиск пользователиинформационнойбазы последовательности проверкавстроенныхпокупок рабочаядата расширенияконфигурации регистрыбухгалтерии регистрынакопления регистр\
ырасчета регистрысведений регламентныезадания сериализаторxdto справочники средствагеопозиционирования средствакриптографии средствамультимедиа средстваотображениярекламы средствапочты средствателефонии фабрикаxdto файловыепотоки фоновыезадания хранилищанастроек хранилищевариантовотчетов хранилищенастроекданныхформ хранилищеобщихнастроек хранилищепользовательскихнастроекдинамическихсписков хранилищепользовательскихнастроекотчетов хранилищесистемныхнастроек ",
CLASS2="webцвета windowsцвета windowsшрифты библиотекакартинок рамкистиля символы цветастиля шрифтыстиля "+"автоматическоесохранениеданныхформывнастройках автонумерациявформе автораздвижениесерий анимациядиаграммы вариантвыравниванияэлементовизаголовков вариантуправлениявысотойтаблицы вертикальнаяпрокруткаформы вертикальноеположение вертикальноеположениеэлемента видгруппыформы виддекорацииформы виддополненияэлементаформы вид\
измененияданных видкнопкиформы видпереключателя видподписейкдиаграмме видполяформы видфлажка влияниеразмеранапузырекдиаграммы горизонтальноеположение горизонтальноеположениеэлемента группировкаколонок группировкаподчиненныхэлементовформы группыиэлементы действиеперетаскивания дополнительныйрежимотображения допустимыедействияперетаскивания интервалмеждуэлементамиформы использованиевывода использованиеполосыпрокрутки используемоезначениеточкибиржевойдиаграммы историявыборапривводе источникзначений\
оситочекдиаграммы источникзначенияразмерапузырькадиаграммы категориягруппыкоманд максимумсерий начальноеотображениедерева начальноеотображениесписка обновлениетекстаредактирования ориентациядендрограммы ориентациядиаграммы ориентацияметокдиаграммы ориентацияметоксводнойдиаграммы ориентацияэлементаформы отображениевдиаграмме отображениевлегендедиаграммы отображениегруппыкнопок отображениезаголовкашкалыдиаграммы отображениезначенийсводнойдиаграммы отображениезначенияизмерительнойдиаграммы отображе\
ниеинтерваладиаграммыганта отображениекнопки отображениекнопкивыбора отображениеобсужденийформы отображениеобычнойгруппы отображениеотрицательныхзначенийпузырьковойдиаграммы отображениепанелипоиска отображениеподсказки отображениепредупрежденияприредактировании отображениеразметкиполосырегулирования отображениестраницформы отображениетаблицы отображениетекстазначениядиаграммыганта отображениеуправленияобычнойгруппы отображениефигурыкнопки палитрацветовдиаграммы поведениеобычнойгруппы поддержкама\
сштабадендрограммы поддержкамасштабадиаграммыганта поддержкамасштабасводнойдиаграммы поисквтаблицепривводе положениезаголовкаэлементаформы положениекартинкикнопкиформы положениекартинкиэлементаграфическойсхемы положениекоманднойпанелиформы положениекоманднойпанелиэлементаформы положениеопорнойточкиотрисовки положениеподписейкдиаграмме положениеподписейшкалызначенийизмерительнойдиаграммы положениесостоянияпросмотра положениестрокипоиска положениетекстасоединительнойлинии положениеуправленияпоиско\
м положениешкалывремени порядокотображенияточекгоризонтальнойгистограммы порядоксерийвлегендедиаграммы размеркартинки расположениезаголовкашкалыдиаграммы растягиваниеповертикалидиаграммыганта режимавтоотображениясостояния режимвводастроктаблицы режимвыборанезаполненного режимвыделениядаты режимвыделениястрокитаблицы режимвыделениятаблицы режимизмененияразмера режимизменениясвязанногозначения режимиспользованиядиалогапечати режимиспользованияпараметракоманды режиммасштабированияпросмотра режимосн\
овногоокнаклиентскогоприложения режимоткрытияокнаформы режимотображениявыделения режимотображениягеографическойсхемы режимотображениязначенийсерии режимотрисовкисеткиграфическойсхемы режимполупрозрачностидиаграммы режимпробеловдиаграммы режимразмещениянастранице режимредактированияколонки режимсглаживаниядиаграммы режимсглаживанияиндикатора режимсписказадач сквозноевыравнивание сохранениеданныхформывнастройках способзаполнениятекстазаголовкашкалыдиаграммы способопределенияограничивающегозначения\
диаграммы стандартнаягруппакоманд стандартноеоформление статусоповещенияпользователя стильстрелки типаппроксимациилиниитрендадиаграммы типдиаграммы типединицышкалывремени типимпортасерийслоягеографическойсхемы типлиниигеографическойсхемы типлиниидиаграммы типмаркерагеографическойсхемы типмаркерадиаграммы типобластиоформления типорганизацииисточникаданныхгеографическойсхемы типотображениясериислоягеографическойсхемы типотображенияточечногообъектагеографическойсхемы типотображенияшкалыэлементалеге\
ндыгеографическойсхемы типпоискаобъектовгеографическойсхемы типпроекциигеографическойсхемы типразмещенияизмерений типразмещенияреквизитовизмерений типрамкиэлементауправления типсводнойдиаграммы типсвязидиаграммыганта типсоединениязначенийпосериямдиаграммы типсоединенияточекдиаграммы типсоединительнойлинии типстороныэлементаграфическойсхемы типформыотчета типшкалырадарнойдиаграммы факторлиниитрендадиаграммы фигуракнопки фигурыграфическойсхемы фиксациявтаблице форматдняшкалывремени форматкартинки \
ширинаподчиненныхэлементовформы "+"виддвижениябухгалтерии виддвижениянакопления видпериодарегистрарасчета видсчета видточкимаршрутабизнеспроцесса использованиеагрегатарегистранакопления использованиегруппиэлементов использованиережимапроведения использованиесреза периодичностьагрегатарегистранакопления режимавтовремя режимзаписидокумента режимпроведениядокумента "+
"авторегистрацияизменений допустимыйномерсообщения отправкаэлементаданных получениеэлементаданных "+"использованиерасшифровкитабличногодокумента ориентациястраницы положениеитоговколоноксводнойтаблицы положениеитоговстроксводнойтаблицы положениетекстаотносительнокартинки расположениезаголовкагруппировкитабличногодокумента способчтениязначенийтабличногодокумента типдвустороннейпечати типзаполненияобластит\
абличногодокумента типкурсоровтабличногодокумента типлиниирисункатабличногодокумента типлинииячейкитабличногодокумента типнаправленияпереходатабличногодокумента типотображениявыделениятабличногодокумента типотображениялинийсводнойтаблицы типразмещениятекстатабличногодокумента типрисункатабличногодокумента типсмещениятабличногодокумента типузоратабличногодокумента типфайлатабличногодокумента точностьпечати чередованиерасположениястраниц "+
"отображениевремениэлементовпланировщика "+"типфайлаформатированногодокумента "+"обходрезультатазапроса типзаписизапроса "+"видзаполнениярасшифровкипостроителяотчета типдобавленияпредставлений типизмеренияпостроителяотчета типразмещенияитогов "+"доступкфайлу режимдиалогавыбо\
рафайла режимоткрытияфайла "+"типизмеренияпостроителязапроса "+"видданныханализа методкластеризации типединицыинтервалавременианализаданных типзаполнениятаблицырезультатаанализаданных типиспользованиячисловыхзначенийанализаданных типисточникаданныхпоискаассоциаций типколонкианализаданныхдереворешений типколонкианализаданныхкластеризация типколонкианализаданныхобщаястатистика типколонкианализаданныхпоискассоциаций типколонкианализаданныхпоиск\
последовательностей типколонкимоделипрогноза типмерырасстоянияанализаданных типотсеченияправилассоциации типполяанализаданных типстандартизациианализаданных типупорядочиванияправилассоциациианализаданных типупорядочиванияшаблоновпоследовательностейанализаданных типупрощениядереварешений "+
"wsнаправлениепараметра вариантxpathxs вариантзаписидатыjson вариантпростоготипаxs видгруппымоделиxs видфасетаxdto действиепостроителяdom завершенностьпростоготипаxs завершенностьсоставноготипаxs завершенностьсхемыxs запрещенныеподстановкиxs исключениягруппподстановкиxs категорияиспользованияатрибутаxs категорияограниченияидентичностиxs категорияограниченияпространствименxs методнаследованияxs модельсодержимогоxs назначениетипаxml недопустимыеподстановкиxs обработкапробельныхсимволовxs обработка\
содержимогоxs ограничениезначенияxs параметрыотбораузловdom переносстрокjson позициявдокументеdom пробельныесимволыxml типатрибутаxml типзначенияjson типканоническогоxml типкомпонентыxs типпроверкиxml типрезультатаdomxpath типузлаdom типузлаxml формаxml формапредставленияxs форматдатыjson экранированиесимволовjson "+
"видсравнениякомпоновкиданных действиеобработкирасшифровкикомпоновкиданных направлениесортировкикомпоновкиданных расположениевложенныхэлементоврезультатакомпоновкиданных расположениеитоговкомпоновкиданных расположениегруппировкикомпоновкиданных расположениеполейгруппировкикомпоновкиданных расположениеполякомпоновкиданных расположениереквизитовкомпоновкиданных расположениересурсовкомпоновкиданных типбухгалтерскогоостаткакомпоновкиданных типвыводатекстакомпоновкиданных типгруппировкикомпоновкиданн\
ых типгруппыэлементовотборакомпоновкиданных типдополненияпериодакомпоновкиданных типзаголовкаполейкомпоновкиданных типмакетагруппировкикомпоновкиданных типмакетаобластикомпоновкиданных типостаткакомпоновкиданных типпериодакомпоновкиданных типразмещениятекстакомпоновкиданных типсвязинаборовданныхкомпоновкиданных типэлементарезультатакомпоновкиданных расположениелегендыдиаграммыкомпоновкиданных типпримененияотборакомпоновкиданных режимотображенияэлементанастройкикомпоновкиданных режимотображенияна\
строеккомпоновкиданных состояниеэлементанастройкикомпоновкиданных способвосстановлениянастроеккомпоновкиданных режимкомпоновкирезультата использованиепараметракомпоновкиданных автопозицияресурсовкомпоновкиданных вариантиспользованиягруппировкикомпоновкиданных расположениересурсоввдиаграммекомпоновкиданных фиксациякомпоновкиданных использованиеусловногооформлениякомпоновкиданных "+
"важностьинтернетпочтовогосообщения обработкатекстаинтернетпочтовогосообщения способкодированияинтернетпочтовоговложения способкодированиянеasciiсимволовинтернетпочтовогосообщения типтекстапочтовогосообщения протоколинтернетпочты статусразборапочтовогосообщения "+
"режимтранзакциизаписижурналарегистрации статустранзакциизаписижурналарегистрации уровеньжурналарегистрации "+"расположениехранилищасертификатовкриптографии режимвключениясертификатовкриптографии режимпроверкисертификатакриптографии типхранилищасертификатовкриптографии "+
"кодировкаименфайловвzipфайле методсжатияzip методшифрованияzip режимвосстановленияпутейфайловzip режимобработкиподкаталоговzip режимсохраненияпутейzip уровеньсжатияzip "+"звуковоеоповещение направлениепереходакстроке позициявпотоке порядокбайтов режимблокировкиданных режимуправленияблокировкойданных сервисвстроенныхпокупок состояниефоновогозадания типподпис\
чикадоставляемыхуведомлений уровеньиспользованиязащищенногосоединенияftp "+"направлениепорядкасхемызапроса типдополненияпериодамисхемызапроса типконтрольнойточкисхемызапроса типобъединениясхемызапроса типпараметрадоступнойтаблицысхемызапроса типсоединениясхемызапроса "+
"httpметод автоиспользованиеобщегореквизита автопрефиксномеразадачи вариантвстроенногоязыка видиерархии видрегистранакопления видтаблицывнешнегоисточникаданных записьдвиженийприпроведении заполнениепоследовательностей индексирование использованиебазыпланавидоврасчета использованиебыстроговыбора использованиеобщегореквизита использованиеподчинения использованиеполнотекстовогопоиска использованиеразделяемыхданныхобщегореквизита использованиереквизита назначениеиспользованияприложения назначениерас\
ширенияконфигурации направлениепередачи обновлениепредопределенныхданных оперативноепроведение основноепредставлениевидарасчета основноепредставлениевидахарактеристики основноепредставлениезадачи основноепредставлениепланаобмена основноепредставлениесправочника основноепредставлениесчета перемещениеграницыприпроведении периодичностьномерабизнеспроцесса периодичностьномерадокумента периодичностьрегистрарасчета периодичностьрегистрасведений повторноеиспользованиевозвращаемыхзначений полнотекстовый\
поискпривводепостроке принадлежностьобъекта проведение разделениеаутентификацииобщегореквизита разделениеданныхобщегореквизита разделениерасширенийконфигурацииобщегореквизита режимавтонумерацииобъектов режимзаписирегистра режимиспользованиямодальности режимиспользованиясинхронныхвызововрасширенийплатформыивнешнихкомпонент режимповторногоиспользованиясеансов режимполученияданныхвыборапривводепостроке режимсовместимости режимсовместимостиинтерфейса режимуправленияблокировкойданныхпоумолчанию серии\
кодовпланавидовхарактеристик сериикодовпланасчетов сериикодовсправочника созданиепривводе способвыбора способпоискастрокипривводепостроке способредактирования типданныхтаблицывнешнегоисточникаданных типкодапланавидоврасчета типкодасправочника типмакета типномерабизнеспроцесса типномерадокумента типномеразадачи типформы удалениедвижений "+
"важностьпроблемыприменениярасширенияконфигурации вариантинтерфейсаклиентскогоприложения вариантмасштабаформклиентскогоприложения вариантосновногошрифтаклиентскогоприложения вариантстандартногопериода вариантстандартнойдатыначала видграницы видкартинки видотображенияполнотекстовогопоиска видрамки видсравнения видцвета видчисловогозначения видшрифта допустимаядлина допустимыйзнак использованиеbyteordermark использованиеметаданныхполнотекстовогопоиска источникрасширенийконфигурации клавиша кодвозв\
ратадиалога кодировкаxbase кодировкатекста направлениепоиска направлениесортировки обновлениепредопределенныхданных обновлениеприизмененииданных отображениепанелиразделов проверказаполнения режимдиалогавопрос режимзапускаклиентскогоприложения режимокругления режимоткрытияформприложения режимполнотекстовогопоиска скоростьклиентскогосоединения состояниевнешнегоисточникаданных состояниеобновленияконфигурациибазыданных способвыборасертификатаwindows способкодированиястроки статуссообщения типвнешней\
компоненты типплатформы типповеденияклавишиenter типэлементаинформацииовыполненииобновленияконфигурациибазыданных уровеньизоляциитранзакций хешфункция частидаты",TYPE="comобъект ftpсоединение httpзапрос httpсервисответ httpсоединение wsопределения wsпрокси xbase анализданных аннотацияxs блокировкаданных буфердвоичныхданных включениеxs выражениекомпо\
новкиданных генераторслучайныхчисел географическаясхема географическиекоординаты графическаясхема группамоделиxs данныерасшифровкикомпоновкиданных двоичныеданные дендрограмма диаграмма диаграммаганта диалогвыборафайла диалогвыборацвета диалогвыборашрифта диалограсписаниярегламентногозадания диалогредактированиястандартногопериода диапазон документdom документhtml документацияxs доставляемоеуведомление записьdom записьfastinfoset записьhtml записьjson записьxml записьzipфайла записьданных записьт\
екста записьузловdom запрос защищенноесоединениеopenssl значенияполейрасшифровкикомпоновкиданных извлечениетекста импортxs интернетпочта интернетпочтовоесообщение интернетпочтовыйпрофиль интернетпрокси интернетсоединение информациядляприложенияxs использованиеатрибутаxs использованиесобытияжурналарегистрации источникдоступныхнастроеккомпоновкиданных итераторузловdom картинка квалификаторыдаты квалификаторыдвоичныхданных квалификаторыстроки квалификаторычисла компоновщикмакетакомпоновкиданных ком\
поновщикнастроеккомпоновкиданных конструктормакетаоформлениякомпоновкиданных конструкторнастроеккомпоновкиданных конструкторформатнойстроки линия макеткомпоновкиданных макетобластикомпоновкиданных макетоформлениякомпоновкиданных маскаxs менеджеркриптографии наборсхемxml настройкикомпоновкиданных настройкисериализацииjson обработкакартинок обработкарасшифровкикомпоновкиданных обходдереваdom объявлениеатрибутаxs объявлениенотацииxs объявлениеэлементаxs описаниеиспользованиясобытиядоступжурналареги\
страции описаниеиспользованиясобытияотказвдоступежурналарегистрации описаниеобработкирасшифровкикомпоновкиданных описаниепередаваемогофайла описаниетипов определениегруппыатрибутовxs определениегруппымоделиxs определениеограниченияидентичностиxs определениепростоготипаxs определениесоставноготипаxs определениетипадокументаdom определенияxpathxs отборкомпоновкиданных пакетотображаемыхдокументов параметрвыбора параметркомпоновкиданных параметрызаписиjson параметрызаписиxml параметрычтенияxml перео\
пределениеxs планировщик полеанализаданных полекомпоновкиданных построительdom построительзапроса построительотчета построительотчетаанализаданных построительсхемxml поток потоквпамяти почта почтовоесообщение преобразованиеxsl преобразованиекканоническомуxml процессорвыводарезультатакомпоновкиданныхвколлекциюзначений процессорвыводарезультатакомпоновкиданныхвтабличныйдокумент процессоркомпоновкиданных разыменовательпространствименdom рамка расписаниерегламентногозадания расширенноеимяxml результ\
атчтенияданных своднаядиаграмма связьпараметравыбора связьпотипу связьпотипукомпоновкиданных сериализаторxdto сертификатклиентаwindows сертификатклиентафайл сертификаткриптографии сертификатыудостоверяющихцентровwindows сертификатыудостоверяющихцентровфайл сжатиеданных системнаяинформация сообщениепользователю сочетаниеклавиш сравнениезначений стандартнаядатаначала стандартныйпериод схемаxml схемакомпоновкиданных табличныйдокумент текстовыйдокумент тестируемоеприложение типданныхxml уникальныйид\
ентификатор фабрикаxdto файл файловыйпоток фасетдлиныxs фасетколичестваразрядовдробнойчастиxs фасетмаксимальноговключающегозначенияxs фасетмаксимальногоисключающегозначенияxs фасетмаксимальнойдлиныxs фасетминимальноговключающегозначенияxs фасетминимальногоисключающегозначенияxs фасетминимальнойдлиныxs фасетобразцаxs фасетобщегоколичестваразрядовxs фасетперечисленияxs фасетпробельныхсимволовxs фильтрузловdom форматированнаястрока форматированныйдокумент фрагментxs хешированиеданных хранилищезначе\
ния цвет чтениеfastinfoset чтениеhtml чтениеjson чтениеxml чтениеzipфайла чтениеданных чтениетекста чтениеузловdom шрифт элементрезультатакомпоновкиданных "+"comsafearray деревозначений массив соответствие списокзначений структура таблицазначений фиксированнаяструктура фиксированноесоответствие фиксированныймассив ",
LITERAL="null истина ложь неопределено",NUMBERS=hljs.inherit(hljs.NUMBER_MODE),STRINGS={className:"string",begin:'"|\\|',end:'"|$',contains:[{begin:'""'}]},DATE2={begin:"'",end:"'",excludeBegin:!0,excludeEnd:!0,contains:[{className:"number",begin:"\\d{4}([\\.\\\\/:-]?\\d{2}){0,5}"}]},PUNCTUATION={match:/[;()+\-:=,]/,className:"punctuation",relevance:0},COMMENTS=hljs.inherit(hljs.C_LINE_COMMENT_MODE),META={className:"meta",begin:"#|&",end:"$",keywords:{$pattern:UNDERSCORE_IDENT_RE,
keyword:KEYWORD+METAKEYWORD},contains:[COMMENTS]},SYMBOL={className:"symbol",begin:"~",end:";|:",excludeEnd:!0},FUNCTION={className:"function",variants:[{begin:"процедура|функция",end:"\\)",keywords:"процедура функция"},{begin:"конецпроцедуры|конецфункции",keywords:"конецпроцедуры конецфункции"}],contains:[{begin:"\\(",end:"\\)",endsParent:!0,contains:[{className:"params",begin:UNDERSCORE_IDENT_RE,end:",",excludeEnd:!0,
endsWithParent:!0,keywords:{$pattern:UNDERSCORE_IDENT_RE,keyword:"знач",literal:LITERAL},contains:[NUMBERS,STRINGS,DATE2]},COMMENTS]},hljs.inherit(hljs.TITLE_MODE,{begin:UNDERSCORE_IDENT_RE})]};return{name:"1C:Enterprise",case_insensitive:!0,keywords:{$pattern:UNDERSCORE_IDENT_RE,keyword:KEYWORD,built_in:BUILTIN,class:CLASS2,type:TYPE,literal:LITERAL},contains:[META,FUNCTION,COMMENTS,SYMBOL,NUMBERS,STRINGS,DATE2,PUNCTUATION]}}function abnf(hljs){const regex=hljs.regex,IDENT=/^[a-zA-Z][a-zA-Z0-9-]*/,
KEYWORDS2=["ALPHA","BIT","CHAR","CR","CRLF","CTL","DIGIT","DQUOTE","HEXDIG","HTAB","LF","LWSP","OCTET","SP","VCHAR","WSP"],COMMENT=hljs.COMMENT(/;/,/$/),TERMINAL_BINARY={scope:"symbol",match:/%b[0-1]+(-[0-1]+|(\.[0-1]+)+)?/},TERMINAL_DECIMAL={scope:"symbol",match:/%d[0-9]+(-[0-9]+|(\.[0-9]+)+)?/},TERMINAL_HEXADECIMAL={scope:"symbol",match:/%x[0-9A-F]+(-[0-9A-F]+|(\.[0-9A-F]+)+)?/},CASE_SENSITIVITY={scope:"symbol",match:/%[si](?=".*")/},RULE_DECLARATION={scope:"attribute",match:regex.concat(IDENT,
/(?=\s*=)/)};return{name:"Augmented Backus-Naur Form",illegal:/[!@#$^&',?+~`|:]/,keywords:KEYWORDS2,contains:[{scope:"operator",match:/=\/?/},RULE_DECLARATION,COMMENT,TERMINAL_BINARY,TERMINAL_DECIMAL,TERMINAL_HEXADECIMAL,CASE_SENSITIVITY,hljs.QUOTE_STRING_MODE,hljs.NUMBER_MODE]}}function accesslog(hljs){const regex=hljs.regex,HTTP_VERBS=["GET","POST","HEAD","PUT","DELETE","CONNECT","OPTIONS","PATCH","TRACE"];return{name:"Apache Access Log",contains:[{className:"number",begin:/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}(:\d{1,5})?\b/,
relevance:5},{className:"number",begin:/\b\d+\b/,relevance:0},{className:"string",begin:regex.concat(/"/,regex.either(...HTTP_VERBS)),end:/"/,keywords:HTTP_VERBS,illegal:/\n/,relevance:5,contains:[{begin:/HTTP\/[12]\.\d'/,relevance:5}]},{className:"string",begin:/\[\d[^\]\n]{8,}\]/,illegal:/\n/,relevance:1},{className:"string",begin:/\[/,end:/\]/,illegal:/\n/,relevance:0},{className:"string",begin:/"Mozilla\/\d\.\d \(/,end:/"/,illegal:/\n/,relevance:3},{className:"string",begin:/"/,end:/"/,illegal:/\n/,
relevance:0}]}}function actionscript(hljs){const regex=hljs.regex,IDENT_RE2=/[a-zA-Z_$][a-zA-Z0-9_$]*/,PKG_NAME_RE=regex.concat(IDENT_RE2,regex.concat("(\\.",IDENT_RE2,")*")),IDENT_FUNC_RETURN_TYPE_RE=/([*]|[a-zA-Z_$][a-zA-Z0-9_$]*)/,AS3_REST_ARG_MODE={className:"rest_arg",begin:/[.]{3}/,end:IDENT_RE2,relevance:10};return{name:"ActionScript",aliases:["as"],keywords:{keyword:["as","break","case","catch","class","const","continue","default","delete","do","dynamic","each","else","extends","final","\
finally","for","function","get","if","implements","import","in","include","instanceof","interface","internal","is","namespace","native","new","override","package","private","protected","public","return","set","static","super","switch","this","throw","try","typeof","use","var","void","while","with"],literal:["true","false","null","undefined"]},contains:[hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.C_NUMBER_MODE,{match:[/\bpackage/,/\s+/,PKG_NAME_RE],
className:{1:"keyword",3:"title.class"}},{match:[/\b(?:class|interface|extends|implements)/,/\s+/,IDENT_RE2],className:{1:"keyword",3:"title.class"}},{className:"meta",beginKeywords:"import include",end:/;/,keywords:{keyword:"import include"}},{beginKeywords:"function",end:/[{;]/,excludeEnd:!0,illegal:/\S/,contains:[hljs.inherit(hljs.TITLE_MODE,{className:"title.function"}),{className:"params",begin:/\(/,end:/\)/,contains:[hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,hljs.C_LINE_COMMENT_MODE,hljs.
C_BLOCK_COMMENT_MODE,AS3_REST_ARG_MODE]},{begin:regex.concat(/:\s*/,IDENT_FUNC_RETURN_TYPE_RE)}]},hljs.METHOD_GUARD],illegal:/#/}}function ada(hljs){const INTEGER_RE="\\d(_|\\d)*",EXPONENT_RE="[eE][-+]?"+INTEGER_RE,DECIMAL_LITERAL_RE=INTEGER_RE+"(\\."+INTEGER_RE+")?("+EXPONENT_RE+")?",BASED_INTEGER_RE="\\w+",NUMBER_RE="\\b("+(INTEGER_RE+"#"+BASED_INTEGER_RE+"(\\."+BASED_INTEGER_RE+")?#("+EXPONENT_RE+")?")+"|"+DECIMAL_LITERAL_RE+")",ID_REGEX="[A-Za-z](_?[A-Za-z0-9.])*",BAD_CHARS=`[]\\{\\}%#'"`,COMMENTS=hljs.
COMMENT("--","$"),VAR_DECLS={begin:"\\s+:\\s+",end:"\\s*(:=|;|\\)|=>|$)",illegal:BAD_CHARS,contains:[{beginKeywords:"loop for declare others",endsParent:!0},{className:"keyword",beginKeywords:"not null constant access function procedure in out aliased exception"},{className:"type",begin:ID_REGEX,endsParent:!0,relevance:0}]};return{name:"Ada",case_insensitive:!0,keywords:{keyword:["abort","else","new","return","abs","elsif","not","reverse","abstract","end","accept","entry","select","access","exce\
ption","of","separate","aliased","exit","or","some","all","others","subtype","and","for","out","synchronized","array","function","overriding","at","tagged","generic","package","task","begin","goto","pragma","terminate","body","private","then","if","procedure","type","case","in","protected","constant","interface","is","raise","use","declare","range","delay","limited","record","when","delta","loop","rem","while","digits","renames","with","do","mod","requeue","xor"],literal:["True","False"]},contains:[
COMMENTS,{className:"string",begin:/"/,end:/"/,contains:[{begin:/""/,relevance:0}]},{className:"string",begin:/'.'/},{className:"number",begin:NUMBER_RE,relevance:0},{className:"symbol",begin:"'"+ID_REGEX},{className:"title",begin:"(\\bwith\\s+)?(\\bprivate\\s+)?\\bpackage\\s+(\\bbody\\s+)?",end:"(is|$)",keywords:"package body",excludeBegin:!0,excludeEnd:!0,illegal:BAD_CHARS},{begin:"(\\b(with|overriding)\\s+)?\\b(function|procedure)\\s+",end:"(\\bis|\\bwith|\\brenames|\\)\\s*;)",keywords:"overr\
iding function procedure with is renames return",returnBegin:!0,contains:[COMMENTS,{className:"title",begin:"(\\bwith\\s+)?\\b(function|procedure)\\s+",end:"(\\(|\\s+|$)",excludeBegin:!0,excludeEnd:!0,illegal:BAD_CHARS},VAR_DECLS,{className:"type",begin:"\\breturn\\s+",end:"(\\s+|;|$)",keywords:"return",excludeBegin:!0,excludeEnd:!0,endsParent:!0,illegal:BAD_CHARS}]},{className:"type",begin:"\\b(sub)?type\\s+",end:"\\s+",keywords:"type",excludeBegin:!0,illegal:BAD_CHARS},VAR_DECLS]}}function angelscript(hljs){
const builtInTypeMode={className:"built_in",begin:"\\b(void|bool|int8|int16|int32|int64|int|uint8|uint16|uint32|uint64|uint|string|ref|array|double|float|auto|dictionary)"},objectHandleMode={className:"symbol",begin:"[a-zA-Z0-9_]+@"},genericMode={className:"keyword",begin:"<",end:">",contains:[builtInTypeMode,objectHandleMode]};return builtInTypeMode.contains=[genericMode],objectHandleMode.contains=[genericMode],{name:"AngelScript",aliases:["asc"],keywords:["for","in|0","break","continue","while",
"do|0","return","if","else","case","switch","namespace","is","cast","or","and","xor","not","get|0","in","inout|10","out","override","set|0","private","public","const","default|0","final","shared","external","mixin|10","enum","typedef","funcdef","this","super","import","from","interface","abstract|0","try","catch","protected","explicit","property"],illegal:"(^using\\s+[A-Za-z0-9_\\.]+;$|\\bfunction\\s*[^\\(])",contains:[{className:"string",begin:"'",end:"'",illegal:"\\n",contains:[hljs.BACKSLASH_ESCAPE],
relevance:0},{className:"string",begin:'"""',end:'"""'},{className:"string",begin:'"',end:'"',illegal:"\\n",contains:[hljs.BACKSLASH_ESCAPE],relevance:0},hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,{className:"string",begin:"^\\s*\\[",end:"\\]"},{beginKeywords:"interface namespace",end:/\{/,illegal:"[;.\\-]",contains:[{className:"symbol",begin:"[a-zA-Z0-9_]+"}]},{beginKeywords:"class",end:/\{/,illegal:"[;.\\-]",contains:[{className:"symbol",begin:"[a-zA-Z0-9_]+",contains:[{begin:"[:,]\\s*",
contains:[{className:"symbol",begin:"[a-zA-Z0-9_]+"}]}]}]},builtInTypeMode,objectHandleMode,{className:"literal",begin:"\\b(null|true|false)"},{className:"number",relevance:0,begin:"(-?)(\\b0[xXbBoOdD][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?f?|\\.\\d+f?)([eE][-+]?\\d+f?)?)"}]}}function apache(hljs){const NUMBER_REF={className:"number",begin:/[$%]\d+/},NUMBER={className:"number",begin:/\b\d+/},IP_ADDRESS={className:"number",begin:/\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}(:\d{1,5})?/},PORT_NUMBER={className:"num\
ber",begin:/:\d{1,5}/};return{name:"Apache config",aliases:["apacheconf"],case_insensitive:!0,contains:[hljs.HASH_COMMENT_MODE,{className:"section",begin:/<\/?/,end:/>/,contains:[IP_ADDRESS,PORT_NUMBER,hljs.inherit(hljs.QUOTE_STRING_MODE,{relevance:0})]},{className:"attribute",begin:/\w+/,relevance:0,keywords:{_:["order","deny","allow","setenv","rewriterule","rewriteengine","rewritecond","documentroot","sethandler","errordocument","loadmodule","options","header","listen","serverroot","servername"]},
starts:{end:/$/,relevance:0,keywords:{literal:"on off all deny allow"},contains:[{scope:"punctuation",match:/\\\n/},{className:"meta",begin:/\s\[/,end:/\]$/},{className:"variable",begin:/[\$%]\{/,end:/\}/,contains:["self",NUMBER_REF]},IP_ADDRESS,NUMBER,hljs.QUOTE_STRING_MODE]}}],illegal:/\S/}}function applescript(hljs){const regex=hljs.regex,STRING=hljs.inherit(hljs.QUOTE_STRING_MODE,{illegal:null}),PARAMS={className:"params",begin:/\(/,end:/\)/,contains:["self",hljs.C_NUMBER_MODE,STRING]},COMMENT_MODE_1=hljs.
COMMENT(/--/,/$/),COMMENT_MODE_2=hljs.COMMENT(/\(\*/,/\*\)/,{contains:["self",COMMENT_MODE_1]}),COMMENTS=[COMMENT_MODE_1,COMMENT_MODE_2,hljs.HASH_COMMENT_MODE],KEYWORD_PATTERNS=[/apart from/,/aside from/,/instead of/,/out of/,/greater than/,/isn't|(doesn't|does not) (equal|come before|come after|contain)/,/(greater|less) than( or equal)?/,/(starts?|ends|begins?) with/,/contained by/,/comes (before|after)/,/a (ref|reference)/,/POSIX (file|path)/,/(date|time) string/,/quoted form/],BUILT_IN_PATTERNS=[
/clipboard info/,/the clipboard/,/info for/,/list (disks|folder)/,/mount volume/,/path to/,/(close|open for) access/,/(get|set) eof/,/current date/,/do shell script/,/get volume settings/,/random number/,/set volume/,/system attribute/,/system info/,/time to GMT/,/(load|run|store) script/,/scripting components/,/ASCII (character|number)/,/localized string/,/choose (application|color|file|file name|folder|from list|remote application|URL)/,/display (alert|dialog)/];return{name:"AppleScript",aliases:[
"osascript"],keywords:{keyword:"about above after against and around as at back before beginning behind below beneath beside between but by considering contain contains continue copy div does eighth else end equal equals error every exit fifth first for fourth from front get given global if ignoring in into is it its last local me middle mod my ninth not of on onto or over prop property put ref reference repeat returning script second set seventh since sixth some tell tenth that the|0 then third\
 through thru timeout times to transaction try until where while whose with without",literal:"AppleScript false linefeed return pi quote result space tab true",built_in:"alias application boolean class constant date file integer list number real record string text activate beep count delay launch log offset read round run say summarize write character characters contents day frontmost id item length month name|0 paragraph paragraphs rest reverse running time version weekday word words year"},contains:[
STRING,hljs.C_NUMBER_MODE,{className:"built_in",begin:regex.concat(/\b/,regex.either(...BUILT_IN_PATTERNS),/\b/)},{className:"built_in",begin:/^\s*return\b/},{className:"literal",begin:/\b(text item delimiters|current application|missing value)\b/},{className:"keyword",begin:regex.concat(/\b/,regex.either(...KEYWORD_PATTERNS),/\b/)},{beginKeywords:"on",illegal:/[${=;\n]/,contains:[hljs.UNDERSCORE_TITLE_MODE,PARAMS]},...COMMENTS],illegal:/\/\/|->|=>|\[\[/}}function arcade(hljs){const regex=hljs.regex,
IDENT_RE2="[A-Za-z_][0-9A-Za-z_]*",KEYWORDS2={keyword:["break","case","catch","continue","debugger","do","else","export","for","function","if","import","in","new","of","return","switch","try","var","void","while"],literal:["BackSlash","DoubleQuote","ForwardSlash","Infinity","NaN","NewLine","PI","SingleQuote","Tab","TextFormatting","false","null","true","undefined"],built_in:["Abs","Acos","All","Angle","Any","Area","AreaGeodetic","Array","Asin","Atan","Atan2","Attachments","Average","Back","Beari\
ng","Boolean","Buffer","BufferGeodetic","Ceil","Centroid","ChangeTimeZone","Clip","Concatenate","Console","Constrain","Contains","ConvertDirection","ConvexHull","Cos","Count","Crosses","Cut","Date|0","DateAdd","DateDiff","DateOnly","Day","Decode","DefaultValue","Densify","DensifyGeodetic","Dictionary","Difference","Disjoint","Distance","DistanceGeodetic","DistanceToCoordinate","Distinct","Domain","DomainCode","DomainName","EnvelopeIntersects","Equals","Erase","Exp","Expects","Extent","Feature","\
FeatureInFilter","FeatureSet","FeatureSetByAssociation","FeatureSetById","FeatureSetByName","FeatureSetByPortalItem","FeatureSetByRelationshipClass","FeatureSetByRelationshipName","Filter","FilterBySubtypeCode","Find","First|0","Floor","FromCharCode","FromCodePoint","FromJSON","Front","GdbVersion","Generalize","Geometry","GetEnvironment","GetFeatureSet","GetFeatureSetInfo","GetUser","GroupBy","Guid","HasKey","HasValue","Hash","Hour","IIf","ISOMonth","ISOWeek","ISOWeekday","ISOYear","Includes","I\
ndexOf","Insert","Intersection","Intersects","IsEmpty","IsNan","IsSelfIntersecting","IsSimple","KnowledgeGraphByPortalItem","Left|0","Length","Length3D","LengthGeodetic","Log","Lower","Map","Max","Mean","MeasureToCoordinate","Mid","Millisecond","Min","Minute","Month","MultiPartToSinglePart","Multipoint","NearestCoordinate","NearestVertex","NextSequenceValue","None","Now","Number","Offset","OrderBy","Overlaps","Point","PointToCoordinate","Polygon","Polyline","Pop","Portal","Pow","Proper","Push","\
QueryGraph","Random","Reduce","Relate","Replace","Resize","Reverse","Right|0","RingIsClockwise","Rotate","Round","Schema","Second","SetGeometry","Simplify","Sin","Slice","Sort","Splice","Split","Sqrt","StandardizeFilename","StandardizeGuid","Stdev","SubtypeCode","SubtypeName","Subtypes","Sum","SymmetricDifference","Tan","Text","Time","TimeZone","TimeZoneOffset","Timestamp","ToCharCode","ToCodePoint","ToHex","ToLocal","ToUTC","Today","Top|0","Touches","TrackAccelerationAt","TrackAccelerationWindo\
w","TrackCurrentAcceleration","TrackCurrentDistance","TrackCurrentSpeed","TrackCurrentTime","TrackDistanceAt","TrackDistanceWindow","TrackDuration","TrackFieldWindow","TrackGeometryWindow","TrackIndex","TrackSpeedAt","TrackSpeedWindow","TrackStartTime","TrackWindow","Trim","TypeOf","Union","Upper","UrlEncode","Variance","Week","Weekday","When|0","Within","Year|0"]},PROFILE_VARS=["aggregatedFeatures","analytic","config","datapoint","datastore","editcontext","feature","featureSet","feedfeature","f\
encefeature","fencenotificationtype","graph","join","layer","locationupdate","map","measure","measure","originalFeature","record","reference","rowindex","sourcedatastore","sourcefeature","sourcelayer","target","targetdatastore","targetfeature","targetlayer","userInput","value","variables","view"],SYMBOL={className:"symbol",begin:"\\$"+regex.either(...PROFILE_VARS)},NUMBER={className:"number",variants:[{begin:"\\b(0[bB][01]+)"},{begin:"\\b(0[oO][0-7]+)"},{begin:hljs.C_NUMBER_RE}],relevance:0},SUBST={
className:"subst",begin:"\\$\\{",end:"\\}",keywords:KEYWORDS2,contains:[]},TEMPLATE_STRING={className:"string",begin:"`",end:"`",contains:[hljs.BACKSLASH_ESCAPE,SUBST]};SUBST.contains=[hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,TEMPLATE_STRING,NUMBER,hljs.REGEXP_MODE];const PARAMS_CONTAINS=SUBST.contains.concat([hljs.C_BLOCK_COMMENT_MODE,hljs.C_LINE_COMMENT_MODE]);return{name:"ArcGIS Arcade",case_insensitive:!0,keywords:KEYWORDS2,contains:[hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,TEMPLATE_STRING,
hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,SYMBOL,NUMBER,{begin:/[{,]\s*/,relevance:0,contains:[{begin:IDENT_RE2+"\\s*:",returnBegin:!0,relevance:0,contains:[{className:"attr",begin:IDENT_RE2,relevance:0}]}]},{begin:"("+hljs.RE_STARTERS_RE+"|\\b(return)\\b)\\s*",keywords:"return",contains:[hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.REGEXP_MODE,{className:"function",begin:"(\\(.*?\\)|"+IDENT_RE2+")\\s*=>",returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:IDENT_RE2},
{begin:/\(\s*\)/},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:KEYWORDS2,contains:PARAMS_CONTAINS}]}]}],relevance:0},{beginKeywords:"function",end:/\{/,excludeEnd:!0,contains:[hljs.inherit(hljs.TITLE_MODE,{className:"title.function",begin:IDENT_RE2}),{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,contains:PARAMS_CONTAINS}],illegal:/\[|%/},{begin:/\$[(.]/}],illegal:/#(?!!)/}}function armasm(hljs){const COMMENT={variants:[hljs.COMMENT("^[ \\t]*(?=#)","$",{relevance:0,
excludeBegin:!0}),hljs.COMMENT("[;@]","$",{relevance:0}),hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE]};return{name:"ARM Assembly",case_insensitive:!0,aliases:["arm"],keywords:{$pattern:"\\.?"+hljs.IDENT_RE,meta:".2byte .4byte .align .ascii .asciz .balign .byte .code .data .else .end .endif .endm .endr .equ .err .exitm .extern .global .hword .if .ifdef .ifndef .include .irp .long .macro .rept .req .section .set .skip .space .text .word .arm .thumb .code16 .code32 .force_thumb .thumb_func .\
ltorg ALIAS ALIGN ARM AREA ASSERT ATTR CN CODE CODE16 CODE32 COMMON CP DATA DCB DCD DCDU DCDO DCFD DCFDU DCI DCQ DCQU DCW DCWU DN ELIF ELSE END ENDFUNC ENDIF ENDP ENTRY EQU EXPORT EXPORTAS EXTERN FIELD FILL FUNCTION GBLA GBLL GBLS GET GLOBAL IF IMPORT INCBIN INCLUDE INFO KEEP LCLA LCLL LCLS LTORG MACRO MAP MEND MEXIT NOFP OPT PRESERVE8 PROC QN READONLY RELOC REQUIRE REQUIRE8 RLIST FN ROUT SETA SETL SETS SN SPACE SUBT THUMB THUMBX TTL WHILE WEND ",built_in:"r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r\
12 r13 r14 r15 w0 w1 w2 w3 w4 w5 w6 w7 w8 w9 w10 w11 w12 w13 w14 w15 w16 w17 w18 w19 w20 w21 w22 w23 w24 w25 w26 w27 w28 w29 w30 x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16 x17 x18 x19 x20 x21 x22 x23 x24 x25 x26 x27 x28 x29 x30 pc lr sp ip sl sb fp a1 a2 a3 a4 v1 v2 v3 v4 v5 v6 v7 v8 f0 f1 f2 f3 f4 f5 f6 f7 p0 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 c0 c1 c2 c3 c4 c5 c6 c7 c8 c9 c10 c11 c12 c13 c14 c15 q0 q1 q2 q3 q4 q5 q6 q7 q8 q9 q10 q11 q12 q13 q14 q15 cpsr_c cpsr_x \
cpsr_s cpsr_f cpsr_cx cpsr_cxs cpsr_xs cpsr_xsf cpsr_sf cpsr_cxsf spsr_c spsr_x spsr_s spsr_f spsr_cx spsr_cxs spsr_xs spsr_xsf spsr_sf spsr_cxsf s0 s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 s11 s12 s13 s14 s15 s16 s17 s18 s19 s20 s21 s22 s23 s24 s25 s26 s27 s28 s29 s30 s31 d0 d1 d2 d3 d4 d5 d6 d7 d8 d9 d10 d11 d12 d13 d14 d15 d16 d17 d18 d19 d20 d21 d22 d23 d24 d25 d26 d27 d28 d29 d30 d31 {PC} {VAR} {TRUE} {FALSE} {OPT} {CONFIG} {ENDIAN} {CODESIZE} {CPU} {FPU} {ARCHITECTURE} {PCSTOREOFFSET} {ARMASM_VERSIO\
N} {INTER} {ROPI} {RWPI} {SWST} {NOSWST} . @"},contains:[{className:"keyword",begin:"\\b(adc|(qd?|sh?|u[qh]?)?add(8|16)?|usada?8|(q|sh?|u[qh]?)?(as|sa)x|and|adrl?|sbc|rs[bc]|asr|b[lx]?|blx|bxj|cbn?z|tb[bh]|bic|bfc|bfi|[su]bfx|bkpt|cdp2?|clz|clrex|cmp|cmn|cpsi[ed]|cps|setend|dbg|dmb|dsb|eor|isb|it[te]{0,3}|lsl|lsr|ror|rrx|ldm(([id][ab])|f[ds])?|ldr((s|ex)?[bhd])?|movt?|mvn|mra|mar|mul|[us]mull|smul[bwt][bt]|smu[as]d|smmul|smmla|mla|umlaal|smlal?([wbt][bt]|d)|mls|smlsl?[ds]|smc|svc|sev|mia([bt]{2}|\
ph)?|mrr?c2?|mcrr2?|mrs|msr|orr|orn|pkh(tb|bt)|rbit|rev(16|sh)?|sel|[su]sat(16)?|nop|pop|push|rfe([id][ab])?|stm([id][ab])?|str(ex)?[bhd]?|(qd?)?sub|(sh?|q|u[qh]?)?sub(8|16)|[su]xt(a?h|a?b(16)?)|srs([id][ab])?|swpb?|swi|smi|tst|teq|wfe|wfi|yield)(eq|ne|cs|cc|mi|pl|vs|vc|hi|ls|ge|lt|gt|le|al|hs|lo)?[sptrx]?(?=\\s)"},COMMENT,hljs.QUOTE_STRING_MODE,{className:"string",begin:"'",end:"[^\\\\]'",relevance:0},{className:"title",begin:"\\|",end:"\\|",illegal:"\\n",relevance:0},{className:"number",variants:[
{begin:"[#$=]?0x[0-9a-f]+"},{begin:"[#$=]?0b[01]+"},{begin:"[#$=]\\d+"},{begin:"\\b\\d+"}],relevance:0},{className:"symbol",variants:[{begin:"^[ \\t]*[a-z_\\.\\$][a-z0-9_\\.\\$]+:"},{begin:"^[a-z_\\.\\$][a-z0-9_\\.\\$]+"},{begin:"[=#]\\w+"}],relevance:0}]}}function asciidoc(hljs){const regex=hljs.regex,HORIZONTAL_RULE={begin:"^'{3,}[ \\t]*$",relevance:10},ESCAPED_FORMATTING=[{begin:/\\[*_`]/},{begin:/\\\\\*{2}[^\n]*?\*{2}/},{begin:/\\\\_{2}[^\n]*_{2}/},{begin:/\\\\`{2}[^\n]*`{2}/},{begin:/[:;}][*_`](?![*_`])/}],
STRONG=[{className:"strong",begin:/\*{2}([^\n]+?)\*{2}/},{className:"strong",begin:regex.concat(/\*\*/,/((\*(?!\*)|\\[^\n]|[^*\n\\])+\n)+/,/(\*(?!\*)|\\[^\n]|[^*\n\\])*/,/\*\*/),relevance:0},{className:"strong",begin:/\B\*(\S|\S[^\n]*?\S)\*(?!\w)/},{className:"strong",begin:/\*[^\s]([^\n]+\n)+([^\n]+)\*/}],EMPHASIS=[{className:"emphasis",begin:/_{2}([^\n]+?)_{2}/},{className:"emphasis",begin:regex.concat(/__/,/((_(?!_)|\\[^\n]|[^_\n\\])+\n)+/,/(_(?!_)|\\[^\n]|[^_\n\\])*/,/__/),relevance:0},{className:"\
emphasis",begin:/\b_(\S|\S[^\n]*?\S)_(?!\w)/},{className:"emphasis",begin:/_[^\s]([^\n]+\n)+([^\n]+)_/},{className:"emphasis",begin:"\\B'(?!['\\s])",end:"(\\n{2}|')",contains:[{begin:"\\\\'\\w",relevance:0}],relevance:0}],ADMONITION={className:"symbol",begin:"^(NOTE|TIP|IMPORTANT|WARNING|CAUTION):\\s+",relevance:10},BULLET_LIST={className:"bullet",begin:"^(\\*+|-+|\\.+|[^\\n]+?::)\\s+"};return{name:"AsciiDoc",aliases:["adoc"],contains:[hljs.COMMENT("^/{4,}\\n","\\n/{4,}$",{relevance:10}),hljs.COMMENT(
"^//","$",{relevance:0}),{className:"title",begin:"^\\.\\w.*$"},{begin:"^[=\\*]{4,}\\n",end:"\\n^[=\\*]{4,}$",relevance:10},{className:"section",relevance:10,variants:[{begin:"^(={1,6})[ 	].+?([ 	]\\1)?$"},{begin:"^[^\\[\\]\\n]+?\\n[=\\-~\\^\\+]{2,}$"}]},{className:"meta",begin:"^:.+?:",end:"\\s",excludeEnd:!0,relevance:10},{className:"meta",begin:"^\\[.+?\\]$",relevance:0},{className:"quote",begin:"^_{4,}\\n",end:"\\n_{4,}$",relevance:10},{className:"code",begin:"^[\\-\\.]{4,}\\n",end:"\\n[\\-\\.]\
{4,}$",relevance:10},{begin:"^\\+{4,}\\n",end:"\\n\\+{4,}$",contains:[{begin:"<",end:">",subLanguage:"xml",relevance:0}],relevance:10},BULLET_LIST,ADMONITION,...ESCAPED_FORMATTING,...STRONG,...EMPHASIS,{className:"string",variants:[{begin:"``.+?''"},{begin:"`.+?'"}]},{className:"code",begin:/`{2}/,end:/(\n{2}|`{2})/},{className:"code",begin:"(`.+?`|\\+.+?\\+)",relevance:0},{className:"code",begin:"^[ \\t]",end:"$",relevance:0},HORIZONTAL_RULE,{begin:"(link:)?(http|https|ftp|file|irc|image:?):\\S+\
?\\[[^[]*?\\]",returnBegin:!0,contains:[{begin:"(link|image:?):",relevance:0},{className:"link",begin:"\\w",end:"[^\\[]+",relevance:0},{className:"string",begin:"\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0,relevance:0}],relevance:10}]}}function aspectj(hljs){const regex=hljs.regex,KEYWORDS2=["false","synchronized","int","abstract","float","private","char","boolean","static","null","if","const","for","true","while","long","throw","strictfp","finally","protected","import","native","final","return",
"void","enum","else","extends","implements","break","transient","new","catch","instanceof","byte","super","volatile","case","assert","short","package","default","double","public","try","this","switch","continue","throws","privileged","aspectOf","adviceexecution","proceed","cflowbelow","cflow","initialization","preinitialization","staticinitialization","withincode","target","within","execution","getWithinTypeName","handler","thisJoinPoint","thisJoinPointStaticPart","thisEnclosingJoinPointStaticPa\
rt","declare","parents","warning","error","soft","precedence","thisAspectInstance"],SHORTKEYS=["get","set","args","call"];return{name:"AspectJ",keywords:KEYWORDS2,illegal:/<\/|#/,contains:[hljs.COMMENT(/\/\*\*/,/\*\//,{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:/@[A-Za-z]+/}]}),hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,{className:"class",beginKeywords:"aspect",end:/[{;=]/,excludeEnd:!0,illegal:/[:;"\[\]]/,contains:[
{beginKeywords:"extends implements pertypewithin perthis pertarget percflowbelow percflow issingleton"},hljs.UNDERSCORE_TITLE_MODE,{begin:/\([^\)]*/,end:/[)]+/,keywords:KEYWORDS2.concat(SHORTKEYS),excludeEnd:!1}]},{className:"class",beginKeywords:"class interface",end:/[{;=]/,excludeEnd:!0,relevance:0,keywords:"class interface",illegal:/[:"\[\]]/,contains:[{beginKeywords:"extends implements"},hljs.UNDERSCORE_TITLE_MODE]},{beginKeywords:"pointcut after before around throwing returning",end:/[)]/,
excludeEnd:!1,illegal:/["\[\]]/,contains:[{begin:regex.concat(hljs.UNDERSCORE_IDENT_RE,/\s*\(/),returnBegin:!0,contains:[hljs.UNDERSCORE_TITLE_MODE]}]},{begin:/[:]/,returnBegin:!0,end:/[{;]/,relevance:0,excludeEnd:!1,keywords:KEYWORDS2,illegal:/["\[\]]/,contains:[{begin:regex.concat(hljs.UNDERSCORE_IDENT_RE,/\s*\(/),keywords:KEYWORDS2.concat(SHORTKEYS),relevance:0},hljs.QUOTE_STRING_MODE]},{beginKeywords:"new throw",relevance:0},{className:"function",begin:/\w+ +\w+(\.\w+)?\s*\([^\)]*\)\s*((throws)[\w\s,]+)?[\{;]/,
returnBegin:!0,end:/[{;=]/,keywords:KEYWORDS2,excludeEnd:!0,contains:[{begin:regex.concat(hljs.UNDERSCORE_IDENT_RE,/\s*\(/),returnBegin:!0,relevance:0,contains:[hljs.UNDERSCORE_TITLE_MODE]},{className:"params",begin:/\(/,end:/\)/,relevance:0,keywords:KEYWORDS2,contains:[hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,hljs.C_NUMBER_MODE,hljs.C_BLOCK_COMMENT_MODE]},hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE]},hljs.C_NUMBER_MODE,{className:"meta",begin:/@[A-Za-z]+/}]}}function autohotkey(hljs){
const BACKTICK_ESCAPE={begin:"`[\\s\\S]"};return{name:"AutoHotkey",case_insensitive:!0,aliases:["ahk"],keywords:{keyword:"Break Continue Critical Exit ExitApp Gosub Goto New OnExit Pause return SetBatchLines SetTimer Suspend Thread Throw Until ahk_id ahk_class ahk_pid ahk_exe ahk_group",literal:"true false NOT AND OR",built_in:"ComSpec Clipboard ClipboardAll ErrorLevel"},contains:[BACKTICK_ESCAPE,hljs.inherit(hljs.QUOTE_STRING_MODE,{contains:[BACKTICK_ESCAPE]}),hljs.COMMENT(";","$",{relevance:0}),
hljs.C_BLOCK_COMMENT_MODE,{className:"number",begin:hljs.NUMBER_RE,relevance:0},{className:"variable",begin:"%[a-zA-Z0-9#_$@]+%"},{className:"built_in",begin:"^\\s*\\w+\\s*(,|%)"},{className:"title",variants:[{begin:'^[^\\n";]+::(?!=)'},{begin:'^[^\\n";]+:(?!=)',relevance:0}]},{className:"meta",begin:"^\\s*#\\w+",end:"$",relevance:0},{className:"built_in",begin:"A_[a-zA-Z0-9]+"},{begin:",\\s*,"}]}}function autoit(hljs){const KEYWORDS2="ByRef Case Const ContinueCase ContinueLoop Dim Do Else ElseI\
f EndFunc EndIf EndSelect EndSwitch EndWith Enum Exit ExitLoop For Func Global If In Local Next ReDim Return Select Static Step Switch Then To Until Volatile WEnd While With",DIRECTIVES=["EndRegion","forcedef","forceref","ignorefunc","include","include-once","NoTrayIcon","OnAutoItStartRegister","pragma","Region","RequireAdmin","Tidy_Off","Tidy_On","Tidy_Parameters"],LITERAL="True False And Null Not Or Default",BUILT_IN="Abs ACos AdlibRegister AdlibUnRegister Asc AscW ASin Assign ATan AutoItSetOp\
tion AutoItWinGetTitle AutoItWinSetTitle Beep Binary BinaryLen BinaryMid BinaryToString BitAND BitNOT BitOR BitRotate BitShift BitXOR BlockInput Break Call CDTray Ceiling Chr ChrW ClipGet ClipPut ConsoleRead ConsoleWrite ConsoleWriteError ControlClick ControlCommand ControlDisable ControlEnable ControlFocus ControlGetFocus ControlGetHandle ControlGetPos ControlGetText ControlHide ControlListView ControlMove ControlSend ControlSetText ControlShow ControlTreeView Cos Dec DirCopy DirCreate DirGetSi\
ze DirMove DirRemove DllCall DllCallAddress DllCallbackFree DllCallbackGetPtr DllCallbackRegister DllClose DllOpen DllStructCreate DllStructGetData DllStructGetPtr DllStructGetSize DllStructSetData DriveGetDrive DriveGetFileSystem DriveGetLabel DriveGetSerial DriveGetType DriveMapAdd DriveMapDel DriveMapGet DriveSetLabel DriveSpaceFree DriveSpaceTotal DriveStatus EnvGet EnvSet EnvUpdate Eval Execute Exp FileChangeDir FileClose FileCopy FileCreateNTFSLink FileCreateShortcut FileDelete FileExists \
FileFindFirstFile FileFindNextFile FileFlush FileGetAttrib FileGetEncoding FileGetLongName FileGetPos FileGetShortcut FileGetShortName FileGetSize FileGetTime FileGetVersion FileInstall FileMove FileOpen FileOpenDialog FileRead FileReadLine FileReadToArray FileRecycle FileRecycleEmpty FileSaveDialog FileSelectFolder FileSetAttrib FileSetEnd FileSetPos FileSetTime FileWrite FileWriteLine Floor FtpSetProxy FuncName GUICreate GUICtrlCreateAvi GUICtrlCreateButton GUICtrlCreateCheckbox GUICtrlCreateC\
ombo GUICtrlCreateContextMenu GUICtrlCreateDate GUICtrlCreateDummy GUICtrlCreateEdit GUICtrlCreateGraphic GUICtrlCreateGroup GUICtrlCreateIcon GUICtrlCreateInput GUICtrlCreateLabel GUICtrlCreateList GUICtrlCreateListView GUICtrlCreateListViewItem GUICtrlCreateMenu GUICtrlCreateMenuItem GUICtrlCreateMonthCal GUICtrlCreateObj GUICtrlCreatePic GUICtrlCreateProgress GUICtrlCreateRadio GUICtrlCreateSlider GUICtrlCreateTab GUICtrlCreateTabItem GUICtrlCreateTreeView GUICtrlCreateTreeViewItem GUICtrlCre\
ateUpdown GUICtrlDelete GUICtrlGetHandle GUICtrlGetState GUICtrlRead GUICtrlRecvMsg GUICtrlRegisterListViewSort GUICtrlSendMsg GUICtrlSendToDummy GUICtrlSetBkColor GUICtrlSetColor GUICtrlSetCursor GUICtrlSetData GUICtrlSetDefBkColor GUICtrlSetDefColor GUICtrlSetFont GUICtrlSetGraphic GUICtrlSetImage GUICtrlSetLimit GUICtrlSetOnEvent GUICtrlSetPos GUICtrlSetResizing GUICtrlSetState GUICtrlSetStyle GUICtrlSetTip GUIDelete GUIGetCursorInfo GUIGetMsg GUIGetStyle GUIRegisterMsg GUISetAccelerators GUI\
SetBkColor GUISetCoord GUISetCursor GUISetFont GUISetHelp GUISetIcon GUISetOnEvent GUISetState GUISetStyle GUIStartGroup GUISwitch Hex HotKeySet HttpSetProxy HttpSetUserAgent HWnd InetClose InetGet InetGetInfo InetGetSize InetRead IniDelete IniRead IniReadSection IniReadSectionNames IniRenameSection IniWrite IniWriteSection InputBox Int IsAdmin IsArray IsBinary IsBool IsDeclared IsDllStruct IsFloat IsFunc IsHWnd IsInt IsKeyword IsNumber IsObj IsPtr IsString Log MemGetStats Mod MouseClick MouseCl\
ickDrag MouseDown MouseGetCursor MouseGetPos MouseMove MouseUp MouseWheel MsgBox Number ObjCreate ObjCreateInterface ObjEvent ObjGet ObjName OnAutoItExitRegister OnAutoItExitUnRegister Ping PixelChecksum PixelGetColor PixelSearch ProcessClose ProcessExists ProcessGetStats ProcessList ProcessSetPriority ProcessWait ProcessWaitClose ProgressOff ProgressOn ProgressSet Ptr Random RegDelete RegEnumKey RegEnumVal RegRead RegWrite Round Run RunAs RunAsWait RunWait Send SendKeepActive SetError SetExtend\
ed ShellExecute ShellExecuteWait Shutdown Sin Sleep SoundPlay SoundSetWaveVolume SplashImageOn SplashOff SplashTextOn Sqrt SRandom StatusbarGetText StderrRead StdinWrite StdioClose StdoutRead String StringAddCR StringCompare StringFormat StringFromASCIIArray StringInStr StringIsAlNum StringIsAlpha StringIsASCII StringIsDigit StringIsFloat StringIsInt StringIsLower StringIsSpace StringIsUpper StringIsXDigit StringLeft StringLen StringLower StringMid StringRegExp StringRegExpReplace StringReplace \
StringReverse StringRight StringSplit StringStripCR StringStripWS StringToASCIIArray StringToBinary StringTrimLeft StringTrimRight StringUpper Tan TCPAccept TCPCloseSocket TCPConnect TCPListen TCPNameToIP TCPRecv TCPSend TCPShutdown, UDPShutdown TCPStartup, UDPStartup TimerDiff TimerInit ToolTip TrayCreateItem TrayCreateMenu TrayGetMsg TrayItemDelete TrayItemGetHandle TrayItemGetState TrayItemGetText TrayItemSetOnEvent TrayItemSetState TrayItemSetText TraySetClick TraySetIcon TraySetOnEvent Tray\
SetPauseIcon TraySetState TraySetToolTip TrayTip UBound UDPBind UDPCloseSocket UDPOpen UDPRecv UDPSend VarGetType WinActivate WinActive WinClose WinExists WinFlash WinGetCaretPos WinGetClassList WinGetClientSize WinGetHandle WinGetPos WinGetProcess WinGetState WinGetText WinGetTitle WinKill WinList WinMenuSelectItem WinMinimizeAll WinMinimizeAllUndo WinMove WinSetOnTop WinSetState WinSetTitle WinSetTrans WinWait WinWaitActive WinWaitClose WinWaitNotActive",COMMENT={variants:[hljs.COMMENT(";","$",
{relevance:0}),hljs.COMMENT("#cs","#ce"),hljs.COMMENT("#comments-start","#comments-end")]},VARIABLE={begin:"\\$[A-z0-9_]+"},STRING={className:"string",variants:[{begin:/"/,end:/"/,contains:[{begin:/""/,relevance:0}]},{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]}]},NUMBER={variants:[hljs.BINARY_NUMBER_MODE,hljs.C_NUMBER_MODE]},PREPROCESSOR={className:"meta",begin:"#",end:"$",keywords:{keyword:DIRECTIVES},contains:[{begin:/\\\n/,relevance:0},{beginKeywords:"include",keywords:{keyword:"in\
clude"},end:"$",contains:[STRING,{className:"string",variants:[{begin:"<",end:">"},{begin:/"/,end:/"/,contains:[{begin:/""/,relevance:0}]},{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]}]}]},STRING,COMMENT]},CONSTANT={className:"symbol",begin:"@[A-z0-9_]+"},FUNCTION={beginKeywords:"Func",end:"$",illegal:"\\$|\\[|%",contains:[hljs.inherit(hljs.UNDERSCORE_TITLE_MODE,{className:"title.function"}),{className:"params",begin:"\\(",end:"\\)",contains:[VARIABLE,STRING,NUMBER]}]};return{name:"Aut\
oIt",case_insensitive:!0,illegal:/\/\*/,keywords:{keyword:KEYWORDS2,built_in:BUILT_IN,literal:LITERAL},contains:[COMMENT,VARIABLE,STRING,NUMBER,PREPROCESSOR,CONSTANT,FUNCTION]}}function avrasm(hljs){return{name:"AVR Assembly",case_insensitive:!0,keywords:{$pattern:"\\.?"+hljs.IDENT_RE,keyword:"adc add adiw and andi asr bclr bld brbc brbs brcc brcs break breq brge brhc brhs brid brie brlo brlt brmi brne brpl brsh brtc brts brvc brvs bset bst call cbi cbr clc clh cli cln clr cls clt clv clz com cp\
 cpc cpi cpse dec eicall eijmp elpm eor fmul fmuls fmulsu icall ijmp in inc jmp ld ldd ldi lds lpm lsl lsr mov movw mul muls mulsu neg nop or ori out pop push rcall ret reti rjmp rol ror sbc sbr sbrc sbrs sec seh sbi sbci sbic sbis sbiw sei sen ser ses set sev sez sleep spm st std sts sub subi swap tst wdr",built_in:"r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 r16 r17 r18 r19 r20 r21 r22 r23 r24 r25 r26 r27 r28 r29 r30 r31 x|0 xh xl y|0 yh yl z|0 zh zl ucsr1c udr1 ucsr1a ucsr1b ubrr1l \
ubrr1h ucsr0c ubrr0h tccr3c tccr3a tccr3b tcnt3h tcnt3l ocr3ah ocr3al ocr3bh ocr3bl ocr3ch ocr3cl icr3h icr3l etimsk etifr tccr1c ocr1ch ocr1cl twcr twdr twar twsr twbr osccal xmcra xmcrb eicra spmcsr spmcr portg ddrg ping portf ddrf sreg sph spl xdiv rampz eicrb eimsk gimsk gicr eifr gifr timsk tifr mcucr mcucsr tccr0 tcnt0 ocr0 assr tccr1a tccr1b tcnt1h tcnt1l ocr1ah ocr1al ocr1bh ocr1bl icr1h icr1l tccr2 tcnt2 ocr2 ocdr wdtcr sfior eearh eearl eedr eecr porta ddra pina portb ddrb pinb portc d\
drc pinc portd ddrd pind spdr spsr spcr udr0 ucsr0a ucsr0b ubrr0l acsr admux adcsr adch adcl porte ddre pine pinf",meta:".byte .cseg .db .def .device .dseg .dw .endmacro .equ .eseg .exit .include .list .listmac .macro .nolist .org .set"},contains:[hljs.C_BLOCK_COMMENT_MODE,hljs.COMMENT(";","$",{relevance:0}),hljs.C_NUMBER_MODE,hljs.BINARY_NUMBER_MODE,{className:"number",begin:"\\b(\\$[a-zA-Z0-9]+|0o[0-7]+)"},hljs.QUOTE_STRING_MODE,{className:"string",begin:"'",end:"[^\\\\]'",illegal:"[^\\\\][^']"},
{className:"symbol",begin:"^[A-Za-z0-9_.$]+:"},{className:"meta",begin:"#",end:"$"},{className:"subst",begin:"@[0-9]+"}]}}function awk(hljs){const VARIABLE={className:"variable",variants:[{begin:/\$[\w\d#@][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},KEYWORDS2="BEGIN END if else while do for in break continue delete next nextfile function func exit|10",STRING={className:"string",contains:[hljs.BACKSLASH_ESCAPE],variants:[{begin:/(u|b)?r?'''/,end:/'''/,relevance:10},{begin:/(u|b)?r?"""/,end:/"""/,relevance:10},
{begin:/(u|r|ur)'/,end:/'/,relevance:10},{begin:/(u|r|ur)"/,end:/"/,relevance:10},{begin:/(b|br)'/,end:/'/},{begin:/(b|br)"/,end:/"/},hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE]};return{name:"Awk",keywords:{keyword:KEYWORDS2},contains:[VARIABLE,STRING,hljs.REGEXP_MODE,hljs.HASH_COMMENT_MODE,hljs.NUMBER_MODE]}}function axapta(hljs){const IDENT_RE2=hljs.UNDERSCORE_IDENT_RE,KEYWORDS2={keyword:["abstract","as","asc","avg","break","breakpoint","by","byref","case","catch","changecompany","class","cl\
ient","client","common","const","continue","count","crosscompany","delegate","delete_from","desc","display","div","do","edit","else","eventhandler","exists","extends","final","finally","firstfast","firstonly","firstonly1","firstonly10","firstonly100","firstonly1000","flush","for","forceliterals","forcenestedloop","forceplaceholders","forceselectorder","forupdate","from","generateonly","group","hint","if","implements","in","index","insert_recordset","interface","internal","is","join","like","maxo\
f","minof","mod","namespace","new","next","nofetch","notexists","optimisticlock","order","outer","pessimisticlock","print","private","protected","public","readonly","repeatableread","retry","return","reverse","select","server","setting","static","sum","super","switch","this","throw","try","ttsabort","ttsbegin","ttscommit","unchecked","update_recordset","using","validtimestate","void","where","while"],built_in:["anytype","boolean","byte","char","container","date","double","enum","guid","int","int\
64","long","real","short","str","utcdatetime","var"],literal:["default","false","null","true"]},CLASS_DEFINITION={variants:[{match:[/(class|interface)\s+/,IDENT_RE2,/\s+(extends|implements)\s+/,IDENT_RE2]},{match:[/class\s+/,IDENT_RE2]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:KEYWORDS2};return{name:"X++",aliases:["x++"],keywords:KEYWORDS2,contains:[hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,hljs.C_NUMBER_MODE,{className:"me\
ta",begin:"#",end:"$"},CLASS_DEFINITION]}}function basic(hljs){return{name:"BASIC",case_insensitive:!0,illegal:"^.",keywords:{$pattern:"[a-zA-Z][a-zA-Z0-9_$%!#]*",keyword:["ABS","ASC","AND","ATN","AUTO|0","BEEP","BLOAD|10","BSAVE|10","CALL","CALLS","CDBL","CHAIN","CHDIR","CHR$|10","CINT","CIRCLE","CLEAR","CLOSE","CLS","COLOR","COM","COMMON","CONT","COS","CSNG","CSRLIN","CVD","CVI","CVS","DATA","DATE$","DEFDBL","DEFINT","DEFSNG","DEFSTR","DEF|0","SEG","USR","DELETE","DIM","DRAW","EDIT","END","ENV\
IRON","ENVIRON$","EOF","EQV","ERASE","ERDEV","ERDEV$","ERL","ERR","ERROR","EXP","FIELD","FILES","FIX","FOR|0","FRE","GET","GOSUB|10","GOTO","HEX$","IF","THEN","ELSE|0","INKEY$","INP","INPUT","INPUT#","INPUT$","INSTR","IMP","INT","IOCTL","IOCTL$","KEY","ON","OFF","LIST","KILL","LEFT$","LEN","LET","LINE","LLIST","LOAD","LOC","LOCATE","LOF","LOG","LPRINT","USING","LSET","MERGE","MID$","MKDIR","MKD$","MKI$","MKS$","MOD","NAME","NEW","NEXT","NOISE","NOT","OCT$","ON","OR","PEN","PLAY","STRIG","OPEN","\
OPTION","BASE","OUT","PAINT","PALETTE","PCOPY","PEEK","PMAP","POINT","POKE","POS","PRINT","PRINT]","PSET","PRESET","PUT","RANDOMIZE","READ","REM","RENUM","RESET|0","RESTORE","RESUME","RETURN|0","RIGHT$","RMDIR","RND","RSET","RUN","SAVE","SCREEN","SGN","SHELL","SIN","SOUND","SPACE$","SPC","SQR","STEP","STICK","STOP","STR$","STRING$","SWAP","SYSTEM","TAB","TAN","TIME$","TIMER","TROFF","TRON","TO","USR","VAL","VARPTR","VARPTR$","VIEW","WAIT","WHILE","WEND","WIDTH","WINDOW","WRITE","XOR"]},contains:[
{scope:"string",begin:/"/,end:/"|$/,contains:[hljs.BACKSLASH_ESCAPE]},hljs.COMMENT("REM","$",{relevance:10}),hljs.COMMENT("'","$",{relevance:0}),{className:"symbol",begin:"^[0-9]+ ",relevance:10},{className:"number",begin:"\\b\\d+(\\.\\d+)?([edED]\\d+)?[#!]?",relevance:0},{className:"number",begin:"(&[hH][0-9a-fA-F]{1,4})"},{className:"number",begin:"(&[oO][0-7]{1,6})"}]}}function bnf(hljs){return{name:"Backus–Naur Form",contains:[{className:"attribute",begin:/</,end:/>/},{begin:/::=/,end:/$/,
contains:[{begin:/</,end:/>/},hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE]}]}}function brainfuck(hljs){const LITERAL={className:"literal",begin:/[+-]+/,relevance:0};return{name:"Brainfuck",aliases:["bf"],contains:[hljs.COMMENT(/[^\[\]\.,\+\-<> \r\n]/,/[\[\]\.,\+\-<> \r\n]/,{contains:[{match:/[ ]+[^\[\]\.,\+\-<> \r\n]/,relevance:0}],returnEnd:!0,relevance:0}),{className:"title",begin:"[\\[\\]]",relevance:0},{className:"string",begin:"[\\.,]",relevance:0},
{begin:/(?=\+\+|--)/,contains:[LITERAL]},LITERAL]}}function cal(hljs){const regex=hljs.regex,KEYWORDS2=["div","mod","in","and","or","not","xor","asserterror","begin","case","do","downto","else","end","exit","for","local","if","of","repeat","then","to","until","while","with","var"],LITERALS2="false true",COMMENT_MODES=[hljs.C_LINE_COMMENT_MODE,hljs.COMMENT(/\{/,/\}/,{relevance:0}),hljs.COMMENT(/\(\*/,/\*\)/,{relevance:10})],STRING={className:"string",begin:/'/,end:/'/,contains:[{begin:/''/}]},CHAR_STRING={
className:"string",begin:/(#\d+)+/},DATE2={className:"number",begin:"\\b\\d+(\\.\\d+)?(DT|D|T)",relevance:0},DBL_QUOTED_VARIABLE={className:"string",begin:'"',end:'"'},PROCEDURE={match:[/procedure/,/\s+/,/[a-zA-Z_][\w@]*/,/\s*/],scope:{1:"keyword",3:"title.function"},contains:[{className:"params",begin:/\(/,end:/\)/,keywords:KEYWORDS2,contains:[STRING,CHAR_STRING,hljs.NUMBER_MODE]},...COMMENT_MODES]},OBJECT_TYPES=["Table","Form","Report","Dataport","Codeunit","XMLport","MenuSuite","Page","Query"],
OBJECT2={match:[/OBJECT/,/\s+/,regex.either(...OBJECT_TYPES),/\s+/,/\d+/,/\s+(?=[^\s])/,/.*/,/$/],relevance:3,scope:{1:"keyword",3:"type",5:"number",7:"title"}};return{name:"C/AL",case_insensitive:!0,keywords:{keyword:KEYWORDS2,literal:LITERALS2},illegal:/\/\*/,contains:[{match:/[\w]+(?=\=)/,scope:"attribute",relevance:0},STRING,CHAR_STRING,DATE2,DBL_QUOTED_VARIABLE,hljs.NUMBER_MODE,OBJECT2,PROCEDURE]}}function capnproto(hljs){const KEYWORDS2=["struct","enum","interface","union","group","import",
"using","const","annotation","extends","in","of","on","as","with","from","fixed"],TYPES2=["Void","Bool","Int8","Int16","Int32","Int64","UInt8","UInt16","UInt32","UInt64","Float32","Float64","Text","Data","AnyPointer","AnyStruct","Capability","List"],LITERALS2=["true","false"],CLASS_DEFINITION={variants:[{match:[/(struct|enum|interface)/,/\s+/,hljs.IDENT_RE]},{match:[/extends/,/\s*\(/,hljs.IDENT_RE,/\s*\)/]}],scope:{1:"keyword",3:"title.class"}};return{name:"Cap’n Proto",aliases:["capnp"],keywords:{
keyword:KEYWORDS2,type:TYPES2,literal:LITERALS2},contains:[hljs.QUOTE_STRING_MODE,hljs.NUMBER_MODE,hljs.HASH_COMMENT_MODE,{className:"meta",begin:/@0x[\w\d]{16};/,illegal:/\n/},{className:"symbol",begin:/@\d+\b/},CLASS_DEFINITION]}}function ceylon(hljs){const KEYWORDS2=["assembly","module","package","import","alias","class","interface","object","given","value","assign","void","function","new","of","extends","satisfies","abstracts","in","out","return","break","continue","throw","assert","dynamic",
"if","else","switch","case","for","while","try","catch","finally","then","let","this","outer","super","is","exists","nonempty"],DECLARATION_MODIFIERS=["shared","abstract","formal","default","actual","variable","late","native","deprecated","final","sealed","annotation","suppressWarnings","small"],DOCUMENTATION=["doc","by","license","see","throws","tagged"],SUBST={className:"subst",excludeBegin:!0,excludeEnd:!0,begin:/``/,end:/``/,keywords:KEYWORDS2,relevance:10},EXPRESSIONS=[{className:"string",begin:'\
"""',end:'"""',relevance:10},{className:"string",begin:'"',end:'"',contains:[SUBST]},{className:"string",begin:"'",end:"'"},{className:"number",begin:"#[0-9a-fA-F_]+|\\$[01_]+|[0-9_]+(?:\\.[0-9_](?:[eE][+-]?\\d+)?)?[kMGTPmunpf]?",relevance:0}];return SUBST.contains=EXPRESSIONS,{name:"Ceylon",keywords:{keyword:KEYWORDS2.concat(DECLARATION_MODIFIERS),meta:DOCUMENTATION},illegal:"\\$[^01]|#[^0-9a-fA-F]",contains:[hljs.C_LINE_COMMENT_MODE,hljs.COMMENT("/\\*","\\*/",{contains:["self"]}),{className:"m\
eta",begin:'@[a-z]\\w*(?::"[^"]*")?'}].concat(EXPRESSIONS)}}function clean(hljs){return{name:"Clean",aliases:["icl","dcl"],keywords:{keyword:["if","let","in","with","where","case","of","class","instance","otherwise","implementation","definition","system","module","from","import","qualified","as","special","code","inline","foreign","export","ccall","stdcall","generic","derive","infix","infixl","infixr"],built_in:"Int Real Char Bool",literal:"True False"},contains:[hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,
hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,hljs.C_NUMBER_MODE,{begin:"->|<-[|:]?|#!?|>>=|\\{\\||\\|\\}|:==|=:|<>"}]}}function clojure(hljs){const SYMBOLSTART="a-zA-Z_\\-!.?+*=<>&'",SYMBOL_RE="[#]?["+SYMBOLSTART+"]["+SYMBOLSTART+"0-9/;:$#]*",globals="def defonce defprotocol defstruct defmulti defmethod defn- defn defmacro deftype defrecord",keywords2={$pattern:SYMBOL_RE,built_in:globals+" cond apply if-not if-let if not not= =|0 <|0 >|0 <=|0 >=|0 ==|0 +|0 /|0 *|0 -|0 rem quot neg? pos? delay? s\
ymbol? keyword? true? false? integer? empty? coll? list? set? ifn? fn? associative? sequential? sorted? counted? reversible? number? decimal? class? distinct? isa? float? rational? reduced? ratio? odd? even? char? seq? vector? string? map? nil? contains? zero? instance? not-every? not-any? libspec? -> ->> .. . inc compare do dotimes mapcat take remove take-while drop letfn drop-last take-last drop-while while intern condp case reduced cycle split-at split-with repeat replicate iterate range merg\
e zipmap declare line-seq sort comparator sort-by dorun doall nthnext nthrest partition eval doseq await await-for let agent atom send send-off release-pending-sends add-watch mapv filterv remove-watch agent-error restart-agent set-error-handler error-handler set-error-mode! error-mode shutdown-agents quote var fn loop recur throw try monitor-enter monitor-exit macroexpand macroexpand-1 for dosync and or when when-not when-let comp juxt partial sequence memoize constantly complement identity ass\
ert peek pop doto proxy first rest cons cast coll last butlast sigs reify second ffirst fnext nfirst nnext meta with-meta ns in-ns create-ns import refer keys select-keys vals key val rseq name namespace promise into transient persistent! conj! assoc! dissoc! pop! disj! use class type num float double short byte boolean bigint biginteger bigdec print-method print-dup throw-if printf format load compile get-in update-in pr pr-on newline flush read slurp read-line subvec with-open memfn time re-fi\
nd re-groups rand-int rand mod locking assert-valid-fdecl alias resolve ref deref refset swap! reset! set-validator! compare-and-set! alter-meta! reset-meta! commute get-validator alter ref-set ref-history-count ref-min-history ref-max-history ensure sync io! new next conj set! to-array future future-call into-array aset gen-class reduce map filter find empty hash-map hash-set sorted-map sorted-map-by sorted-set sorted-set-by vec vector seq flatten reverse assoc dissoc list disj get union differ\
ence intersection extend extend-type extend-protocol int nth delay count concat chunk chunk-buffer chunk-append chunk-first chunk-rest max min dec unchecked-inc-int unchecked-inc unchecked-dec-inc unchecked-dec unchecked-negate unchecked-add-int unchecked-add unchecked-subtract-int unchecked-subtract chunk-next chunk-cons chunked-seq? prn vary-meta lazy-seq spread list* str find-keyword keyword symbol gensym force rationalize"},SYMBOL={begin:SYMBOL_RE,relevance:0},NUMBER={scope:"number",relevance:0,
variants:[{match:/[-+]?0[xX][0-9a-fA-F]+N?/},{match:/[-+]?0[0-7]+N?/},{match:/[-+]?[1-9][0-9]?[rR][0-9a-zA-Z]+N?/},{match:/[-+]?[0-9]+\/[0-9]+N?/},{match:/[-+]?[0-9]+((\.[0-9]*([eE][+-]?[0-9]+)?M?)|([eE][+-]?[0-9]+M?|M))/},{match:/[-+]?([1-9][0-9]*|0)N?/}]},CHARACTER={scope:"character",variants:[{match:/\\o[0-3]?[0-7]{1,2}/},{match:/\\u[0-9a-fA-F]{4}/},{match:/\\(newline|space|tab|formfeed|backspace|return)/},{match:/\\\S/,relevance:0}]},REGEX={scope:"regex",begin:/#"/,end:/"/,contains:[hljs.BACKSLASH_ESCAPE]},
STRING=hljs.inherit(hljs.QUOTE_STRING_MODE,{illegal:null}),COMMA={scope:"punctuation",match:/,/,relevance:0},COMMENT=hljs.COMMENT(";","$",{relevance:0}),LITERAL={className:"literal",begin:/\b(true|false|nil)\b/},COLLECTION={begin:"\\[|(#::?"+SYMBOL_RE+")?\\{",end:"[\\]\\}]",relevance:0},KEY={className:"symbol",begin:"[:]{1,2}"+SYMBOL_RE},LIST={begin:"\\(",end:"\\)"},BODY={endsWithParent:!0,relevance:0},NAME={keywords:keywords2,className:"name",begin:SYMBOL_RE,relevance:0,starts:BODY},DEFAULT_CONTAINS=[
COMMA,LIST,CHARACTER,REGEX,STRING,COMMENT,KEY,COLLECTION,NUMBER,LITERAL,SYMBOL],GLOBAL={beginKeywords:globals,keywords:{$pattern:SYMBOL_RE,keyword:globals},end:'(\\[|#|\\d|"|:|\\{|\\)|\\(|$)',contains:[{className:"title",begin:SYMBOL_RE,relevance:0,excludeEnd:!0,endsParent:!0}].concat(DEFAULT_CONTAINS)};return LIST.contains=[GLOBAL,NAME,BODY],BODY.contains=DEFAULT_CONTAINS,COLLECTION.contains=DEFAULT_CONTAINS,{name:"Clojure",aliases:["clj","edn"],illegal:/\S/,contains:[COMMA,LIST,CHARACTER,REGEX,
STRING,COMMENT,KEY,COLLECTION,NUMBER,LITERAL]}}function clojureRepl(hljs){return{name:"Clojure REPL",contains:[{className:"meta.prompt",begin:/^([\w.-]+|\s*#_)?=>/,starts:{end:/$/,subLanguage:"clojure"}}]}}function cmake(hljs){return{name:"CMake",aliases:["cmake.in"],case_insensitive:!0,keywords:{keyword:"break cmake_host_system_information cmake_minimum_required cmake_parse_arguments cmake_policy configure_file continue elseif else endforeach endfunction endif endmacro endwhile execute_process \
file find_file find_library find_package find_path find_program foreach function get_cmake_property get_directory_property get_filename_component get_property if include include_guard list macro mark_as_advanced math message option return separate_arguments set_directory_properties set_property set site_name string unset variable_watch while add_compile_definitions add_compile_options add_custom_command add_custom_target add_definitions add_dependencies add_executable add_library add_link_option\
s add_subdirectory add_test aux_source_directory build_command create_test_sourcelist define_property enable_language enable_testing export fltk_wrap_ui get_source_file_property get_target_property get_test_property include_directories include_external_msproject include_regular_expression install link_directories link_libraries load_cache project qt_wrap_cpp qt_wrap_ui remove_definitions set_source_files_properties set_target_properties set_tests_properties source_group target_compile_definition\
s target_compile_features target_compile_options target_include_directories target_link_directories target_link_libraries target_link_options target_sources try_compile try_run ctest_build ctest_configure ctest_coverage ctest_empty_binary_directory ctest_memcheck ctest_read_custom_files ctest_run_script ctest_sleep ctest_start ctest_submit ctest_test ctest_update ctest_upload build_name exec_program export_library_dependencies install_files install_programs install_targets load_command make_dire\
ctory output_required_files remove subdir_depends subdirs use_mangled_mesa utility_source variable_requires write_file qt5_use_modules qt5_use_package qt5_wrap_cpp on off true false and or not command policy target test exists is_newer_than is_directory is_symlink is_absolute matches less greater equal less_equal greater_equal strless strgreater strequal strless_equal strgreater_equal version_less version_greater version_equal version_less_equal version_greater_equal in_list defined"},contains:[
{className:"variable",begin:/\$\{/,end:/\}/},hljs.COMMENT(/#\[\[/,/]]/),hljs.HASH_COMMENT_MODE,hljs.QUOTE_STRING_MODE,hljs.NUMBER_MODE]}}const KEYWORDS$3=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],LITERALS$3=["true","false","null","\
undefined","NaN","Infinity"],TYPES$3=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],ERROR_TYPES$3=[
"Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],BUILT_IN_GLOBALS$3=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],BUILT_INS$3=[].concat(BUILT_IN_GLOBALS$3,TYPES$3,ERROR_TYPES$3);function coffeescript(hljs){const COFFEE_BUILT_INS=["npm","print"],COFFEE_LITERALS=["yes","no","o\
n","off"],COFFEE_KEYWORDS=["then","unless","until","loop","by","when","and","or","is","isnt","not"],NOT_VALID_KEYWORDS=["var","const","let","function","static"],excluding=list2=>kw=>!list2.includes(kw),KEYWORDS$12={keyword:KEYWORDS$3.concat(COFFEE_KEYWORDS).filter(excluding(NOT_VALID_KEYWORDS)),literal:LITERALS$3.concat(COFFEE_LITERALS),built_in:BUILT_INS$3.concat(COFFEE_BUILT_INS)},JS_IDENT_RE="[A-Za-z$_][0-9A-Za-z$_]*",SUBST={className:"subst",begin:/#\{/,end:/\}/,keywords:KEYWORDS$12},EXPRESSIONS=[
hljs.BINARY_NUMBER_MODE,hljs.inherit(hljs.C_NUMBER_MODE,{starts:{end:"(\\s*/)?",relevance:0}}),{className:"string",variants:[{begin:/'''/,end:/'''/,contains:[hljs.BACKSLASH_ESCAPE]},{begin:/'/,end:/'/,contains:[hljs.BACKSLASH_ESCAPE]},{begin:/"""/,end:/"""/,contains:[hljs.BACKSLASH_ESCAPE,SUBST]},{begin:/"/,end:/"/,contains:[hljs.BACKSLASH_ESCAPE,SUBST]}]},{className:"regexp",variants:[{begin:"///",end:"///",contains:[SUBST,hljs.HASH_COMMENT_MODE]},{begin:"//[gim]{0,3}(?=\\W)",relevance:0},{begin:/\/(?![ *]).*?(?![\\]).\/[gim]{0,3}(?=\W)/}]},
{begin:"@"+JS_IDENT_RE},{subLanguage:"javascript",excludeBegin:!0,excludeEnd:!0,variants:[{begin:"```",end:"```"},{begin:"`",end:"`"}]}];SUBST.contains=EXPRESSIONS;const TITLE=hljs.inherit(hljs.TITLE_MODE,{begin:JS_IDENT_RE}),POSSIBLE_PARAMS_RE="(\\(.*\\)\\s*)?\\B[-=]>",PARAMS={className:"params",begin:"\\([^\\(]",returnBegin:!0,contains:[{begin:/\(/,end:/\)/,keywords:KEYWORDS$12,contains:["self"].concat(EXPRESSIONS)}]},CLASS_DEFINITION={variants:[{match:[/class\s+/,JS_IDENT_RE,/\s+extends\s+/,JS_IDENT_RE]},
{match:[/class\s+/,JS_IDENT_RE]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:KEYWORDS$12};return{name:"CoffeeScript",aliases:["coffee","cson","iced"],keywords:KEYWORDS$12,illegal:/\/\*/,contains:[...EXPRESSIONS,hljs.COMMENT("###","###"),hljs.HASH_COMMENT_MODE,{className:"function",begin:"^\\s*"+JS_IDENT_RE+"\\s*=\\s*"+POSSIBLE_PARAMS_RE,end:"[-=]>",returnBegin:!0,contains:[TITLE,PARAMS]},{begin:/[:\(,=]\s*/,relevance:0,contains:[{className:"function",begin:POSSIBLE_PARAMS_RE,end:"\
[-=]>",returnBegin:!0,contains:[PARAMS]}]},CLASS_DEFINITION,{begin:JS_IDENT_RE+":",end:":",returnBegin:!0,returnEnd:!0,relevance:0}]}}function coq(hljs){return{name:"Coq",keywords:{keyword:["_|0","as","at","cofix","else","end","exists","exists2","fix","for","forall","fun","if","IF","in","let","match","mod","Prop","return","Set","then","Type","using","where","with","Abort","About","Add","Admit","Admitted","All","Arguments","Assumptions","Axiom","Back","BackTo","Backtrack","Bind","Blacklist","Cano\
nical","Cd","Check","Class","Classes","Close","Coercion","Coercions","CoFixpoint","CoInductive","Collection","Combined","Compute","Conjecture","Conjectures","Constant","constr","Constraint","Constructors","Context","Corollary","CreateHintDb","Cut","Declare","Defined","Definition","Delimit","Dependencies","Dependent","Derive","Drop","eauto","End","Equality","Eval","Example","Existential","Existentials","Existing","Export","exporting","Extern","Extract","Extraction","Fact","Field","Fields","File",
"Fixpoint","Focus","for","From","Function","Functional","Generalizable","Global","Goal","Grab","Grammar","Graph","Guarded","Heap","Hint","HintDb","Hints","Hypotheses","Hypothesis","ident","Identity","If","Immediate","Implicit","Import","Include","Inductive","Infix","Info","Initial","Inline","Inspect","Instance","Instances","Intro","Intros","Inversion","Inversion_clear","Language","Left","Lemma","Let","Libraries","Library","Load","LoadPath","Local","Locate","Ltac","ML","Mode","Module","Modules","\
Monomorphic","Morphism","Next","NoInline","Notation","Obligation","Obligations","Opaque","Open","Optimize","Options","Parameter","Parameters","Parametric","Path","Paths","pattern","Polymorphic","Preterm","Print","Printing","Program","Projections","Proof","Proposition","Pwd","Qed","Quit","Rec","Record","Recursive","Redirect","Relation","Remark","Remove","Require","Reserved","Reset","Resolve","Restart","Rewrite","Right","Ring","Rings","Save","Scheme","Scope","Scopes","Script","Search","SearchAbout",
"SearchHead","SearchPattern","SearchRewrite","Section","Separate","Set","Setoid","Show","Solve","Sorted","Step","Strategies","Strategy","Structure","SubClass","Table","Tables","Tactic","Term","Test","Theorem","Time","Timeout","Transparent","Type","Typeclasses","Types","Undelimit","Undo","Unfocus","Unfocused","Unfold","Universe","Universes","Unset","Unshelve","using","Variable","Variables","Variant","Verbose","Visibility","where","with"],built_in:["abstract","absurd","admit","after","apply","as",
"assert","assumption","at","auto","autorewrite","autounfold","before","bottom","btauto","by","case","case_eq","cbn","cbv","change","classical_left","classical_right","clear","clearbody","cofix","compare","compute","congruence","constr_eq","constructor","contradict","contradiction","cut","cutrewrite","cycle","decide","decompose","dependent","destruct","destruction","dintuition","discriminate","discrR","do","double","dtauto","eapply","eassumption","eauto","ecase","econstructor","edestruct","ediscr\
iminate","eelim","eexact","eexists","einduction","einjection","eleft","elim","elimtype","enough","equality","erewrite","eright","esimplify_eq","esplit","evar","exact","exactly_once","exfalso","exists","f_equal","fail","field","field_simplify","field_simplify_eq","first","firstorder","fix","fold","fourier","functional","generalize","generalizing","gfail","give_up","has_evar","hnf","idtac","in","induction","injection","instantiate","intro","intro_pattern","intros","intuition","inversion","inversio\
n_clear","is_evar","is_var","lapply","lazy","left","lia","lra","move","native_compute","nia","nsatz","omega","once","pattern","pose","progress","proof","psatz","quote","record","red","refine","reflexivity","remember","rename","repeat","replace","revert","revgoals","rewrite","rewrite_strat","right","ring","ring_simplify","rtauto","set","setoid_reflexivity","setoid_replace","setoid_rewrite","setoid_symmetry","setoid_transitivity","shelve","shelve_unifiable","simpl","simple","simplify_eq","solve","\
specialize","split","split_Rabs","split_Rmult","stepl","stepr","subst","sum","swap","symmetry","tactic","tauto","time","timeout","top","transitivity","trivial","try","tryif","unfold","unify","until","using","vm_compute","with"]},contains:[hljs.QUOTE_STRING_MODE,hljs.COMMENT("\\(\\*","\\*\\)"),hljs.C_NUMBER_MODE,{className:"type",excludeBegin:!0,begin:"\\|\\s*",end:"\\w+"},{begin:/[-=]>/}]}}function cos(hljs){return{name:"Caché Object Script",case_insensitive:!0,aliases:["cls"],keywords:"propert\
y parameter class classmethod clientmethod extends as break catch close continue do d|0 else elseif for goto halt hang h|0 if job j|0 kill k|0 lock l|0 merge new open quit q|0 read r|0 return set s|0 tcommit throw trollback try tstart use view while write w|0 xecute x|0 zkill znspace zn ztrap zwrite zw zzdump zzwrite print zbreak zinsert zload zprint zremove zsave zzprint mv mvcall mvcrt mvdim mvprint zquit zsync ascii",contains:[{className:"number",begin:"\\b(\\d+(\\.\\d*)?|\\.\\d+)",relevance:0},
{className:"string",variants:[{begin:'"',end:'"',contains:[{begin:'""',relevance:0}]}]},hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,{className:"comment",begin:/;/,end:"$",relevance:0},{className:"built_in",begin:/(?:\$\$?|\.\.)\^?[a-zA-Z]+/},{className:"built_in",begin:/\$\$\$[a-zA-Z]+/},{className:"built_in",begin:/%[a-z]+(?:\.[a-z]+)*/},{className:"symbol",begin:/\^%?[a-zA-Z][\w]*/},{className:"keyword",begin:/##class|##super|#define|#dim/},{begin:/&sql\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,
subLanguage:"sql"},{begin:/&(js|jscript|javascript)</,end:/>/,excludeBegin:!0,excludeEnd:!0,subLanguage:"javascript"},{begin:/&html<\s*</,end:/>\s*>/,subLanguage:"xml"}]}}function crmsh(hljs){const RESOURCES="primitive rsc_template",COMMANDS="group clone ms master location colocation order fencing_topology rsc_ticket acl_target acl_group user role tag xml";return{name:"crmsh",aliases:["crm","pcmk"],case_insensitive:!0,keywords:{keyword:"params meta operations op rule attributes utilization"+" "+
"read write deny defined not_defined in_range date spec in ref reference attribute type xpath version and or lt gt tag lte gte eq ne \\"+" "+"number string",literal:"Master Started Slave Stopped start promote demote stop monitor true false"},contains:[hljs.HASH_COMMENT_MODE,{beginKeywords:"node",starts:{end:"\\s*([\\w_-]+:)?",starts:{className:"title",end:"\\s*[\\$\\w_][\\w_-]*"}}},{beginKeywords:RESOURCES,starts:{className:"title",end:"\\s*[\\$\\w_][\\w_-]*",starts:{end:"\\s*@?[\\w_][\\w_\\.:-]*"}}},
{begin:"\\b("+COMMANDS.split(" ").join("|")+")\\s+",keywords:COMMANDS,starts:{className:"title",end:"[\\$\\w_][\\w_-]*"}},{beginKeywords:"property rsc_defaults op_defaults",starts:{className:"title",end:"\\s*([\\w_-]+:)?"}},hljs.QUOTE_STRING_MODE,{className:"meta",begin:"(ocf|systemd|service|lsb):[\\w_:-]+",relevance:0},{className:"number",begin:"\\b\\d+(\\.\\d+)?(ms|s|h|m)?",relevance:0},{className:"literal",begin:"[-]?(infinity|inf)",relevance:0},{className:"attr",begin:/([A-Za-z$_#][\w_-]+)=/,
relevance:0},{className:"tag",begin:"</?",end:"/?>",relevance:0}]}}function crystal(hljs){const INT_SUFFIX="(_?[ui](8|16|32|64|128))?",FLOAT_SUFFIX="(_?f(32|64))?",CRYSTAL_IDENT_RE="[a-zA-Z_]\\w*[!?=]?",CRYSTAL_METHOD_RE="[a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|[=!]~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~|]|//|//=|&[-+*]=?|&\\*\\*|\\[\\][=?]?",CRYSTAL_PATH_RE="[A-Za-z_]\\w*(::\\w+)*(\\?|!)?",CRYSTAL_KEYWORDS={$pattern:CRYSTAL_IDENT_RE,keyword:"abstract alias annotation as as? asm begin break case class def d\
o else elsif end ensure enum extend for fun if include instance_sizeof is_a? lib macro module next nil? of out pointerof private protected rescue responds_to? return require select self sizeof struct super then type typeof union uninitialized unless until verbatim when while with yield __DIR__ __END_LINE__ __FILE__ __LINE__",literal:"false nil true"},SUBST={className:"subst",begin:/#\{/,end:/\}/,keywords:CRYSTAL_KEYWORDS},VARIABLE={className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![\
A-Za-z])(?![@$?'])"},EXPANSION={className:"template-variable",variants:[{begin:"\\{\\{",end:"\\}\\}"},{begin:"\\{%",end:"%\\}"}],keywords:CRYSTAL_KEYWORDS};function recursiveParen(begin,end){const contains3=[{begin,end}];return contains3[0].contains=contains3,contains3}const STRING={className:"string",contains:[hljs.BACKSLASH_ESCAPE,SUBST],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:"%[Qwi]?\\(",end:"\\)",contains:recursiveParen("\\(","\\)")},{begin:"%[Qwi]?\\[",
end:"\\]",contains:recursiveParen("\\[","\\]")},{begin:"%[Qwi]?\\{",end:/\}/,contains:recursiveParen(/\{/,/\}/)},{begin:"%[Qwi]?<",end:">",contains:recursiveParen("<",">")},{begin:"%[Qwi]?\\|",end:"\\|"},{begin:/<<-\w+$/,end:/^\s*\w+$/}],relevance:0},Q_STRING={className:"string",variants:[{begin:"%q\\(",end:"\\)",contains:recursiveParen("\\(","\\)")},{begin:"%q\\[",end:"\\]",contains:recursiveParen("\\[","\\]")},{begin:"%q\\{",end:/\}/,contains:recursiveParen(/\{/,/\}/)},{begin:"%q<",end:">",contains:recursiveParen(
"<",">")},{begin:"%q\\|",end:"\\|"},{begin:/<<-'\w+'$/,end:/^\s*\w+$/}],relevance:0},REGEXP2={begin:"(?!%\\})("+hljs.RE_STARTERS_RE+"|\\n|\\b(case|if|select|unless|until|when|while)\\b)\\s*",keywords:"case if select unless until when while",contains:[{className:"regexp",contains:[hljs.BACKSLASH_ESCAPE,SUBST],variants:[{begin:"//[a-z]*",relevance:0},{begin:"/(?!\\/)",end:"/[a-z]*"}]}],relevance:0},REGEXP22={className:"regexp",contains:[hljs.BACKSLASH_ESCAPE,SUBST],variants:[{begin:"%r\\(",end:"\\)",
contains:recursiveParen("\\(","\\)")},{begin:"%r\\[",end:"\\]",contains:recursiveParen("\\[","\\]")},{begin:"%r\\{",end:/\}/,contains:recursiveParen(/\{/,/\}/)},{begin:"%r<",end:">",contains:recursiveParen("<",">")},{begin:"%r\\|",end:"\\|"}],relevance:0},ATTRIBUTE={className:"meta",begin:"@\\[",end:"\\]",contains:[hljs.inherit(hljs.QUOTE_STRING_MODE,{className:"string"})]},CRYSTAL_DEFAULT_CONTAINS=[EXPANSION,STRING,Q_STRING,REGEXP22,REGEXP2,ATTRIBUTE,VARIABLE,hljs.HASH_COMMENT_MODE,{className:"\
class",beginKeywords:"class module struct",end:"$|;",illegal:/=/,contains:[hljs.HASH_COMMENT_MODE,hljs.inherit(hljs.TITLE_MODE,{begin:CRYSTAL_PATH_RE}),{begin:"<"}]},{className:"class",beginKeywords:"lib enum union",end:"$|;",illegal:/=/,contains:[hljs.HASH_COMMENT_MODE,hljs.inherit(hljs.TITLE_MODE,{begin:CRYSTAL_PATH_RE})]},{beginKeywords:"annotation",end:"$|;",illegal:/=/,contains:[hljs.HASH_COMMENT_MODE,hljs.inherit(hljs.TITLE_MODE,{begin:CRYSTAL_PATH_RE})],relevance:2},{className:"function",
beginKeywords:"def",end:/\B\b/,contains:[hljs.inherit(hljs.TITLE_MODE,{begin:CRYSTAL_METHOD_RE,endsParent:!0})]},{className:"function",beginKeywords:"fun macro",end:/\B\b/,contains:[hljs.inherit(hljs.TITLE_MODE,{begin:CRYSTAL_METHOD_RE,endsParent:!0})],relevance:2},{className:"symbol",begin:hljs.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":",contains:[STRING,{begin:CRYSTAL_METHOD_RE}],relevance:0},{className:"number",variants:[{begin:"\\b0b([01_]+)"+INT_SUFFIX},{begin:"\
\\b0o([0-7_]+)"+INT_SUFFIX},{begin:"\\b0x([A-Fa-f0-9_]+)"+INT_SUFFIX},{begin:"\\b([1-9][0-9_]*[0-9]|[0-9])(\\.[0-9][0-9_]*)?([eE]_?[-+]?[0-9_]*)?"+FLOAT_SUFFIX+"(?!_)"},{begin:"\\b([1-9][0-9_]*|0)"+INT_SUFFIX}],relevance:0}];return SUBST.contains=CRYSTAL_DEFAULT_CONTAINS,EXPANSION.contains=CRYSTAL_DEFAULT_CONTAINS.slice(1),{name:"Crystal",aliases:["cr"],keywords:CRYSTAL_KEYWORDS,contains:CRYSTAL_DEFAULT_CONTAINS}}function csp(hljs){return{name:"CSP",case_insensitive:!1,keywords:{$pattern:"[a-zA-\
Z][a-zA-Z0-9_-]*",keyword:["base-uri","child-src","connect-src","default-src","font-src","form-action","frame-ancestors","frame-src","img-src","manifest-src","media-src","object-src","plugin-types","report-uri","sandbox","script-src","style-src","trusted-types","unsafe-hashes","worker-src"]},contains:[{className:"string",begin:"'",end:"'"},{className:"attribute",begin:"^Content",end:":",excludeEnd:!0}]}}function d(hljs){const D_KEYWORDS={$pattern:hljs.UNDERSCORE_IDENT_RE,keyword:"abstract alias \
align asm assert auto body break byte case cast catch class const continue debug default delete deprecated do else enum export extern final finally for foreach foreach_reverse|10 goto if immutable import in inout int interface invariant is lazy macro mixin module new nothrow out override package pragma private protected public pure ref return scope shared static struct super switch synchronized template this throw try typedef typeid typeof union unittest version void volatile while with __FILE__\
 __LINE__ __gshared|10 __thread __traits __DATE__ __EOF__ __TIME__ __TIMESTAMP__ __VENDOR__ __VERSION__",built_in:"bool cdouble cent cfloat char creal dchar delegate double dstring float function idouble ifloat ireal long real short string ubyte ucent uint ulong ushort wchar wstring",literal:"false null true"},decimal_integer_re="(0|[1-9][\\d_]*)",decimal_integer_nosus_re="(0|[1-9][\\d_]*|\\d[\\d_]*|[\\d_]+?\\d)",binary_integer_re="0[bB][01_]+",hexadecimal_digits_re="([\\da-fA-F][\\da-fA-F_]*|_[\\d\
a-fA-F][\\da-fA-F_]*)",hexadecimal_integer_re="0[xX]"+hexadecimal_digits_re,decimal_exponent_re="([eE][+-]?"+decimal_integer_nosus_re+")",decimal_float_re="("+decimal_integer_nosus_re+"(\\.\\d*|"+decimal_exponent_re+")|\\d+\\."+decimal_integer_nosus_re+"|\\."+decimal_integer_re+decimal_exponent_re+"?)",hexadecimal_float_re="(0[xX]("+hexadecimal_digits_re+"\\."+hexadecimal_digits_re+"|\\.?"+hexadecimal_digits_re+")[pP][+-]?"+decimal_integer_nosus_re+")",integer_re="("+decimal_integer_re+"|"+binary_integer_re+
"|"+hexadecimal_integer_re+")",float_re="("+hexadecimal_float_re+"|"+decimal_float_re+")",escape_sequence_re=`\\\\(['"\\?\\\\abfnrtv]|u[\\dA-Fa-f]{4}|[0-7]{1,3}|x[\\dA-Fa-f]{2}|U[\\dA-Fa-f]{8})|&[a-zA-Z\\d]{2,};`,D_INTEGER_MODE={className:"number",begin:"\\b"+integer_re+"(L|u|U|Lu|LU|uL|UL)?",relevance:0},D_FLOAT_MODE={className:"number",begin:"\\b("+float_re+"([fF]|L|i|[fF]i|Li)?|"+integer_re+"(i|[fF]i|Li))",relevance:0},D_CHARACTER_MODE={className:"string",begin:"'("+escape_sequence_re+"|.)",end:"\
'",illegal:"."},D_STRING_MODE={className:"string",begin:'"',contains:[{begin:escape_sequence_re,relevance:0}],end:'"[cwd]?'},D_WYSIWYG_DELIMITED_STRING_MODE={className:"string",begin:'[rq]"',end:'"[cwd]?',relevance:5},D_ALTERNATE_WYSIWYG_STRING_MODE={className:"string",begin:"`",end:"`[cwd]?"},D_HEX_STRING_MODE={className:"string",begin:'x"[\\da-fA-F\\s\\n\\r]*"[cwd]?',relevance:10},D_TOKEN_STRING_MODE={className:"string",begin:'q"\\{',end:'\\}"'},D_HASHBANG_MODE={className:"meta",begin:"^#!",end:"\
$",relevance:5},D_SPECIAL_TOKEN_SEQUENCE_MODE={className:"meta",begin:"#(line)",end:"$",relevance:5},D_ATTRIBUTE_MODE={className:"keyword",begin:"@[a-zA-Z_][a-zA-Z_\\d]*"},D_NESTING_COMMENT_MODE=hljs.COMMENT("\\/\\+","\\+\\/",{contains:["self"],relevance:10});return{name:"D",keywords:D_KEYWORDS,contains:[hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,D_NESTING_COMMENT_MODE,D_HEX_STRING_MODE,D_STRING_MODE,D_WYSIWYG_DELIMITED_STRING_MODE,D_ALTERNATE_WYSIWYG_STRING_MODE,D_TOKEN_STRING_MODE,D_FLOAT_MODE,
D_INTEGER_MODE,D_CHARACTER_MODE,D_HASHBANG_MODE,D_SPECIAL_TOKEN_SEQUENCE_MODE,D_ATTRIBUTE_MODE]}}function dart(hljs){const SUBST={className:"subst",variants:[{begin:"\\$[A-Za-z0-9_]+"}]},BRACED_SUBST={className:"subst",variants:[{begin:/\$\{/,end:/\}/}],keywords:"true false null this is new super"},NUMBER={className:"number",relevance:0,variants:[{match:/\b[0-9][0-9_]*(\.[0-9][0-9_]*)?([eE][+-]?[0-9][0-9_]*)?\b/},{match:/\b0[xX][0-9A-Fa-f][0-9A-Fa-f_]*\b/}]},STRING={className:"string",variants:[
{begin:"r'''",end:"'''"},{begin:'r"""',end:'"""'},{begin:"r'",end:"'",illegal:"\\n"},{begin:'r"',end:'"',illegal:"\\n"},{begin:"'''",end:"'''",contains:[hljs.BACKSLASH_ESCAPE,SUBST,BRACED_SUBST]},{begin:'"""',end:'"""',contains:[hljs.BACKSLASH_ESCAPE,SUBST,BRACED_SUBST]},{begin:"'",end:"'",illegal:"\\n",contains:[hljs.BACKSLASH_ESCAPE,SUBST,BRACED_SUBST]},{begin:'"',end:'"',illegal:"\\n",contains:[hljs.BACKSLASH_ESCAPE,SUBST,BRACED_SUBST]}]};BRACED_SUBST.contains=[NUMBER,STRING];const BUILT_IN_TYPES=[
"Comparable","DateTime","Duration","Function","Iterable","Iterator","List","Map","Match","Object","Pattern","RegExp","Set","Stopwatch","String","StringBuffer","StringSink","Symbol","Type","Uri","bool","double","int","num","Element","ElementList"],NULLABLE_BUILT_IN_TYPES=BUILT_IN_TYPES.map(e=>`${e}?`);return{name:"Dart",keywords:{keyword:["abstract","as","assert","async","await","base","break","case","catch","class","const","continue","covariant","default","deferred","do","dynamic","else","enum",
"export","extends","extension","external","factory","false","final","finally","for","Function","get","hide","if","implements","import","in","interface","is","late","library","mixin","new","null","on","operator","part","required","rethrow","return","sealed","set","show","static","super","switch","sync","this","throw","true","try","typedef","var","void","when","while","with","yield"],built_in:BUILT_IN_TYPES.concat(NULLABLE_BUILT_IN_TYPES).concat(["Never","Null","dynamic","print","document","queryS\
elector","querySelectorAll","window"]),$pattern:/[A-Za-z][A-Za-z0-9_]*\??/},contains:[STRING,hljs.COMMENT(/\/\*\*(?!\/)/,/\*\//,{subLanguage:"markdown",relevance:0}),hljs.COMMENT(/\/{3,} ?/,/$/,{contains:[{subLanguage:"markdown",begin:".",end:"$",relevance:0}]}),hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,{className:"class",beginKeywords:"class interface",end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},hljs.UNDERSCORE_TITLE_MODE]},NUMBER,{className:"meta",begin:"@[A-\
Za-z]+"},{begin:"=>"}]}}function delphi(hljs){const KEYWORDS2=["exports","register","file","shl","array","record","property","for","mod","while","set","ally","label","uses","raise","not","stored","class","safecall","var","interface","or","private","static","exit","index","inherited","to","else","stdcall","override","shr","asm","far","resourcestring","finalization","packed","virtual","out","and","protected","library","do","xorwrite","goto","near","function","end","div","overload","object","unit",
"begin","string","on","inline","repeat","until","destructor","write","message","program","with","read","initialization","except","default","nil","if","case","cdecl","in","downto","threadvar","of","try","pascal","const","external","constructor","type","public","then","implementation","finally","published","procedure","absolute","reintroduce","operator","as","is","abstract","alias","assembler","bitpacked","break","continue","cppdecl","cvar","enumerator","experimental","platform","deprecated","unim\
plemented","dynamic","export","far16","forward","generic","helper","implements","interrupt","iochecks","local","name","nodefault","noreturn","nostackframe","oldfpccall","otherwise","saveregisters","softfloat","specialize","strict","unaligned","varargs"],COMMENT_MODES=[hljs.C_LINE_COMMENT_MODE,hljs.COMMENT(/\{/,/\}/,{relevance:0}),hljs.COMMENT(/\(\*/,/\*\)/,{relevance:10})],DIRECTIVE={className:"meta",variants:[{begin:/\{\$/,end:/\}/},{begin:/\(\*\$/,end:/\*\)/}]},STRING={className:"string",begin:/'/,
end:/'/,contains:[{begin:/''/}]},NUMBER={className:"number",relevance:0,variants:[{match:/\b\d[\d_]*(\.\d[\d_]*)?/},{match:/\$[\dA-Fa-f_]+/},{match:/\$/,relevance:0},{match:/&[0-7][0-7_]*/},{match:/%[01_]+/},{match:/%/,relevance:0}]},CHAR_STRING={className:"string",variants:[{match:/#\d[\d_]*/},{match:/#\$[\dA-Fa-f][\dA-Fa-f_]*/},{match:/#&[0-7][0-7_]*/},{match:/#%[01][01_]*/}]},CLASS2={begin:hljs.IDENT_RE+"\\s*=\\s*class\\s*\\(",returnBegin:!0,contains:[hljs.TITLE_MODE]},FUNCTION={className:"fu\
nction",beginKeywords:"function constructor destructor procedure",end:/[:;]/,keywords:"function constructor|10 destructor|10 procedure|10",contains:[hljs.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,keywords:KEYWORDS2,contains:[STRING,CHAR_STRING,DIRECTIVE].concat(COMMENT_MODES)},DIRECTIVE].concat(COMMENT_MODES)};return{name:"Delphi",aliases:["dpr","dfm","pas","pascal"],case_insensitive:!0,keywords:KEYWORDS2,illegal:/"|\$[G-Zg-z]|\/\*|<\/|\|/,contains:[STRING,CHAR_STRING,NUMBER,CLASS2,FUNCTION,
DIRECTIVE].concat(COMMENT_MODES)}}function django(hljs){const FILTER={begin:/\|[A-Za-z]+:?/,keywords:{name:"truncatewords removetags linebreaksbr yesno get_digit timesince random striptags filesizeformat escape linebreaks length_is ljust rjust cut urlize fix_ampersands title floatformat capfirst pprint divisibleby add make_list unordered_list urlencode timeuntil urlizetrunc wordcount stringformat linenumbers slice date dictsort dictsortreversed default_if_none pluralize lower join center default\
 truncatewords_html upper length phone2numeric wordwrap time addslashes slugify first escapejs force_escape iriencode last safe safeseq truncatechars localize unlocalize localtime utc timezone"},contains:[hljs.QUOTE_STRING_MODE,hljs.APOS_STRING_MODE]};return{name:"Django",aliases:["jinja"],case_insensitive:!0,subLanguage:"xml",contains:[hljs.COMMENT(/\{%\s*comment\s*%\}/,/\{%\s*endcomment\s*%\}/),hljs.COMMENT(/\{#/,/#\}/),{className:"template-tag",begin:/\{%/,end:/%\}/,contains:[{className:"name",
begin:/\w+/,keywords:{name:"comment endcomment load templatetag ifchanged endifchanged if endif firstof for endfor ifnotequal endifnotequal widthratio extends include spaceless endspaceless regroup ifequal endifequal ssi now with cycle url filter endfilter debug block endblock else autoescape endautoescape csrf_token empty elif endwith static trans blocktrans endblocktrans get_static_prefix get_media_prefix plural get_current_language language get_available_languages get_current_language_bidi ge\
t_language_info get_language_info_list localize endlocalize localtime endlocaltime timezone endtimezone get_current_timezone verbatim"},starts:{endsWithParent:!0,keywords:"in by as",contains:[FILTER],relevance:0}}]},{className:"template-variable",begin:/\{\{/,end:/\}\}/,contains:[FILTER]}]}}function dns(hljs){return{name:"DNS Zone",aliases:["bind","zone"],keywords:["IN","A","AAAA","AFSDB","APL","CAA","CDNSKEY","CDS","CERT","CNAME","DHCID","DLV","DNAME","DNSKEY","DS","HIP","IPSECKEY","KEY","KX","\
LOC","MX","NAPTR","NS","NSEC","NSEC3","NSEC3PARAM","PTR","RRSIG","RP","SIG","SOA","SRV","SSHFP","TA","TKEY","TLSA","TSIG","TXT"],contains:[hljs.COMMENT(";","$",{relevance:0}),{className:"meta",begin:/^\$(TTL|GENERATE|INCLUDE|ORIGIN)\b/},{className:"number",begin:"((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\
\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2\
[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))\\b"},{className:"number",begin:"((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]).){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\b"},hljs.inherit(hljs.NUMBER_MODE,
{begin:/\b\d+[dhwm]?/})]}}function dockerfile(hljs){return{name:"Dockerfile",aliases:["docker"],case_insensitive:!0,keywords:["from","maintainer","expose","env","arg","user","onbuild","stopsignal"],contains:[hljs.HASH_COMMENT_MODE,hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,hljs.NUMBER_MODE,{beginKeywords:"run cmd entrypoint volume add copy workdir label healthcheck shell",starts:{end:/[^\\]$/,subLanguage:"bash"}}],illegal:"</"}}function dos(hljs){const COMMENT=hljs.COMMENT(/^\s*@?rem\b/,/$/,{relevance:10});
return{name:"Batch file (DOS)",aliases:["bat","cmd"],case_insensitive:!0,illegal:/\/\*/,keywords:{keyword:["if","else","goto","for","in","do","call","exit","not","exist","errorlevel","defined","equ","neq","lss","leq","gtr","geq"],built_in:["prn","nul","lpt3","lpt2","lpt1","con","com4","com3","com2","com1","aux","shift","cd","dir","echo","setlocal","endlocal","set","pause","copy","append","assoc","at","attrib","break","cacls","cd","chcp","chdir","chkdsk","chkntfs","cls","cmd","color","comp","comp\
act","convert","date","dir","diskcomp","diskcopy","doskey","erase","fs","find","findstr","format","ftype","graftabl","help","keyb","label","md","mkdir","mode","more","move","path","pause","print","popd","pushd","promt","rd","recover","rem","rename","replace","restore","rmdir","shift","sort","start","subst","time","title","tree","type","ver","verify","vol","ping","net","ipconfig","taskkill","xcopy","ren","del"]},contains:[{className:"variable",begin:/%%[^ ]|%[^ ]+?%|![^ ]+?!/},{className:"functio\
n",begin:{begin:"^\\s*[A-Za-z._?][A-Za-z0-9_$#@~.?]*(:|\\s+label)"}.begin,end:"goto:eof",contains:[hljs.inherit(hljs.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),COMMENT]},{className:"number",begin:"\\b\\d+",relevance:0},COMMENT]}}function dsconfig(hljs){return{keywords:"dsconfig",contains:[{className:"keyword",begin:"^dsconfig",end:/\s/,excludeEnd:!0,relevance:10},{className:"built_in",begin:/(list|create|get|set|delete)-(\w+)/,end:/\s/,excludeEnd:!0,illegal:"!@#$%^&*\
()",relevance:10},{className:"built_in",begin:/--(\w+)/,end:/\s/,excludeEnd:!0},{className:"string",begin:/"/,end:/"/},{className:"string",begin:/'/,end:/'/},{className:"string",begin:/[\w\-?]+:\w+/,end:/\W/,relevance:0},{className:"string",begin:/\w+(\-\w+)*/,end:/(?=\W)/,relevance:0},hljs.HASH_COMMENT_MODE]}}function dts(hljs){const STRINGS={className:"string",variants:[hljs.inherit(hljs.QUOTE_STRING_MODE,{begin:'((u8?|U)|L)?"'}),{begin:'(u8?|U)?R"',end:'"',contains:[hljs.BACKSLASH_ESCAPE]},{begin:"\
'\\\\?.",end:"'",illegal:"."}]},NUMBERS={className:"number",variants:[{begin:"\\b(\\d+(\\.\\d*)?|\\.\\d+)(u|U|l|L|ul|UL|f|F)"},{begin:hljs.C_NUMBER_RE}],relevance:0},PREPROCESSOR={className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef ifdef ifndef"},contains:[{begin:/\\\n/,relevance:0},{beginKeywords:"include",end:"$",keywords:{keyword:"include"},contains:[hljs.inherit(STRINGS,{className:"string"}),{className:"string",begin:"<",end:">",illegal:"\\n"}]},STRINGS,hljs.
C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE]},REFERENCE={className:"variable",begin:/&[a-z\d_]*\b/},KEYWORD={className:"keyword",begin:"/[a-z][a-z\\d-]*/"},LABEL={className:"symbol",begin:"^\\s*[a-zA-Z_][a-zA-Z\\d_]*:"},CELL_PROPERTY={className:"params",relevance:0,begin:"<",end:">",contains:[NUMBERS,REFERENCE]},NODE={className:"title.class",begin:/[a-zA-Z_][a-zA-Z\d_@-]*(?=\s\{)/,relevance:.2},ROOT_NODE={className:"title.class",begin:/^\/(?=\s*\{)/,relevance:10},ATTR_NO_VALUE={match:/[a-z][a-z-,]+(?=;)/,
relevance:0,scope:"attr"},ATTR={relevance:0,match:[/[a-z][a-z-,]+/,/\s*/,/=/],scope:{1:"attr",3:"operator"}},PUNC={scope:"punctuation",relevance:0,match:/\};|[;{}]/};return{name:"Device Tree",contains:[ROOT_NODE,REFERENCE,KEYWORD,LABEL,NODE,ATTR,ATTR_NO_VALUE,CELL_PROPERTY,hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,NUMBERS,STRINGS,PREPROCESSOR,PUNC,{begin:hljs.IDENT_RE+"::",keywords:""}]}}function dust(hljs){return{name:"Dust",aliases:["dst"],case_insensitive:!0,subLanguage:"xml",contains:[
{className:"template-tag",begin:/\{[#\/]/,end:/\}/,illegal:/;/,contains:[{className:"name",begin:/[a-zA-Z\.-]+/,starts:{endsWithParent:!0,relevance:0,contains:[hljs.QUOTE_STRING_MODE]}}]},{className:"template-variable",begin:/\{/,end:/\}/,illegal:/;/,keywords:"if eq ne lt lte gt gte select default math sep"}]}}function ebnf(hljs){const commentMode=hljs.COMMENT(/\(\*/,/\*\)/),nonTerminalMode={className:"attribute",begin:/^[ ]*[a-zA-Z]+([\s_-]+[a-zA-Z]+)*/},ruleBodyMode={begin:/=/,end:/[.;]/,contains:[
commentMode,{className:"meta",begin:/\?.*\?/},{className:"string",variants:[hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,{begin:"`",end:"`"}]}]};return{name:"Extended Backus-Naur Form",illegal:/\S/,contains:[commentMode,nonTerminalMode,ruleBodyMode]}}function elixir(hljs){const regex=hljs.regex,ELIXIR_IDENT_RE="[a-zA-Z_][a-zA-Z0-9_.]*(!|\\?)?",ELIXIR_METHOD_RE="[a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?",KWS={$pattern:ELIXIR_IDENT_RE,keyword:["after","alias",
"and","case","catch","cond","defstruct","defguard","do","else","end","fn","for","if","import","in","not","or","quote","raise","receive","require","reraise","rescue","try","unless","unquote","unquote_splicing","use","when","with|0"],literal:["false","nil","true"]},SUBST={className:"subst",begin:/#\{/,end:/\}/,keywords:KWS},NUMBER={className:"number",begin:"(\\b0o[0-7_]+)|(\\b0b[01_]+)|(\\b0x[0-9a-fA-F_]+)|(-?\\b[0-9][0-9_]*(\\.[0-9_]+([eE][-+]?[0-9]+)?)?)",relevance:0},BACKSLASH_ESCAPE={match:/\\[\s\S]/,
scope:"char.escape",relevance:0},SIGIL_DELIMITERS=`[/|([{<"']`,SIGIL_DELIMITER_MODES=[{begin:/"/,end:/"/},{begin:/'/,end:/'/},{begin:/\//,end:/\//},{begin:/\|/,end:/\|/},{begin:/\(/,end:/\)/},{begin:/\[/,end:/\]/},{begin:/\{/,end:/\}/},{begin:/</,end:/>/}],escapeSigilEnd=end=>({scope:"char.escape",begin:regex.concat(/\\/,end),relevance:0}),LOWERCASE_SIGIL={className:"string",begin:"~[a-z](?="+SIGIL_DELIMITERS+")",contains:SIGIL_DELIMITER_MODES.map(x=>hljs.inherit(x,{contains:[escapeSigilEnd(x.end),
BACKSLASH_ESCAPE,SUBST]}))},UPCASE_SIGIL={className:"string",begin:"~[A-Z](?="+SIGIL_DELIMITERS+")",contains:SIGIL_DELIMITER_MODES.map(x=>hljs.inherit(x,{contains:[escapeSigilEnd(x.end)]}))},REGEX_SIGIL={className:"regex",variants:[{begin:"~r(?="+SIGIL_DELIMITERS+")",contains:SIGIL_DELIMITER_MODES.map(x=>hljs.inherit(x,{end:regex.concat(x.end,/[uismxfU]{0,7}/),contains:[escapeSigilEnd(x.end),BACKSLASH_ESCAPE,SUBST]}))},{begin:"~R(?="+SIGIL_DELIMITERS+")",contains:SIGIL_DELIMITER_MODES.map(x=>hljs.
inherit(x,{end:regex.concat(x.end,/[uismxfU]{0,7}/),contains:[escapeSigilEnd(x.end)]}))}]},STRING={className:"string",contains:[hljs.BACKSLASH_ESCAPE,SUBST],variants:[{begin:/"""/,end:/"""/},{begin:/'''/,end:/'''/},{begin:/~S"""/,end:/"""/,contains:[]},{begin:/~S"/,end:/"/,contains:[]},{begin:/~S'''/,end:/'''/,contains:[]},{begin:/~S'/,end:/'/,contains:[]},{begin:/'/,end:/'/},{begin:/"/,end:/"/}]},FUNCTION={className:"function",beginKeywords:"def defp defmacro defmacrop",end:/\B\b/,contains:[hljs.
inherit(hljs.TITLE_MODE,{begin:ELIXIR_IDENT_RE,endsParent:!0})]},CLASS2=hljs.inherit(FUNCTION,{className:"class",beginKeywords:"defimpl defmodule defprotocol defrecord",end:/\bdo\b|$|;/}),ELIXIR_DEFAULT_CONTAINS=[STRING,REGEX_SIGIL,UPCASE_SIGIL,LOWERCASE_SIGIL,hljs.HASH_COMMENT_MODE,CLASS2,FUNCTION,{begin:"::"},{className:"symbol",begin:":(?![\\s:])",contains:[STRING,{begin:ELIXIR_METHOD_RE}],relevance:0},{className:"symbol",begin:ELIXIR_IDENT_RE+":(?!:)",relevance:0},{className:"title.class",begin:/(\b[A-Z][a-zA-Z0-9_]+)/,
relevance:0},NUMBER,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))"}];return SUBST.contains=ELIXIR_DEFAULT_CONTAINS,{name:"Elixir",aliases:["ex","exs"],keywords:KWS,contains:ELIXIR_DEFAULT_CONTAINS}}function elm(hljs){const COMMENT={variants:[hljs.COMMENT("--","$"),hljs.COMMENT(/\{-/,/-\}/,{contains:["self"]})]},CONSTRUCTOR={className:"type",begin:"\\b[A-Z][\\w']*",relevance:0},LIST={begin:"\\(",end:"\\)",illegal:'"',contains:[{className:"type",begin:"\\b[A-Z][\\w]*(\\((\\.\\.|,|\\w+)\\))?"},
COMMENT]},RECORD={begin:/\{/,end:/\}/,contains:LIST.contains},CHARACTER={className:"string",begin:"'\\\\?.",end:"'",illegal:"."};return{name:"Elm",keywords:["let","in","if","then","else","case","of","where","module","import","exposing","type","alias","as","infix","infixl","infixr","port","effect","command","subscription"],contains:[{beginKeywords:"port effect module",end:"exposing",keywords:"port effect module where command subscription exposing",contains:[LIST,COMMENT],illegal:"\\W\\.|;"},{begin:"\
import",end:"$",keywords:"import as exposing",contains:[LIST,COMMENT],illegal:"\\W\\.|;"},{begin:"type",end:"$",keywords:"type alias",contains:[CONSTRUCTOR,LIST,RECORD,COMMENT]},{beginKeywords:"infix infixl infixr",end:"$",contains:[hljs.C_NUMBER_MODE,COMMENT]},{begin:"port",end:"$",keywords:"port",contains:[COMMENT]},CHARACTER,hljs.QUOTE_STRING_MODE,hljs.C_NUMBER_MODE,CONSTRUCTOR,hljs.inherit(hljs.TITLE_MODE,{begin:"^[_a-z][\\w']*"}),COMMENT,{begin:"->|<-"}],illegal:/;/}}function erb(hljs){return{
name:"ERB",subLanguage:"xml",contains:[hljs.COMMENT("<%#","%>"),{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0}]}}function erlang(hljs){const BASIC_ATOM_RE="[a-z'][a-zA-Z0-9_']*",FUNCTION_NAME_RE="("+BASIC_ATOM_RE+":"+BASIC_ATOM_RE+"|"+BASIC_ATOM_RE+")",ERLANG_RESERVED={keyword:"after and andalso|10 band begin bnot bor bsl bzr bxor case catch cond div end fun if let not of orelse|10 query receive rem try when xor maybe else",literal:"false true"},COMMENT=hljs.COMMENT(
"%","$"),NUMBER={className:"number",begin:"\\b(\\d+(_\\d+)*#[a-fA-F0-9]+(_[a-fA-F0-9]+)*|\\d+(_\\d+)*(\\.\\d+(_\\d+)*)?([eE][-+]?\\d+)?)",relevance:0},NAMED_FUN={begin:"fun\\s+"+BASIC_ATOM_RE+"/\\d+"},FUNCTION_CALL={begin:FUNCTION_NAME_RE+"\\(",end:"\\)",returnBegin:!0,relevance:0,contains:[{begin:FUNCTION_NAME_RE,relevance:0},{begin:"\\(",end:"\\)",endsWithParent:!0,returnEnd:!0,relevance:0}]},TUPLE={begin:/\{/,end:/\}/,relevance:0},VAR1={begin:"\\b_([A-Z][A-Za-z0-9_]*)?",relevance:0},VAR2={begin:"\
[A-Z][a-zA-Z0-9_]*",relevance:0},RECORD_ACCESS={begin:"#"+hljs.UNDERSCORE_IDENT_RE,relevance:0,returnBegin:!0,contains:[{begin:"#"+hljs.UNDERSCORE_IDENT_RE,relevance:0},{begin:/\{/,end:/\}/,relevance:0}]},CHAR_LITERAL={scope:"string",match:/\$(\\([^0-9]|[0-9]{1,3}|)|.)/},TRIPLE_QUOTE={scope:"string",match:/"""("*)(?!")[\s\S]*?"""\1/},SIGIL={scope:"string",contains:[hljs.BACKSLASH_ESCAPE],variants:[{match:/~\w?"""("*)(?!")[\s\S]*?"""\1/},{begin:/~\w?\(/,end:/\)/},{begin:/~\w?\[/,end:/\]/},{begin:/~\w?{/,
end:/}/},{begin:/~\w?</,end:/>/},{begin:/~\w?\//,end:/\//},{begin:/~\w?\|/,end:/\|/},{begin:/~\w?'/,end:/'/},{begin:/~\w?"/,end:/"/},{begin:/~\w?`/,end:/`/},{begin:/~\w?#/,end:/#/}]},BLOCK_STATEMENTS={beginKeywords:"fun receive if try case maybe",end:"end",keywords:ERLANG_RESERVED};BLOCK_STATEMENTS.contains=[COMMENT,NAMED_FUN,hljs.inherit(hljs.APOS_STRING_MODE,{className:""}),BLOCK_STATEMENTS,FUNCTION_CALL,SIGIL,TRIPLE_QUOTE,hljs.QUOTE_STRING_MODE,NUMBER,TUPLE,VAR1,VAR2,RECORD_ACCESS,CHAR_LITERAL];
const BASIC_MODES=[COMMENT,NAMED_FUN,BLOCK_STATEMENTS,FUNCTION_CALL,SIGIL,TRIPLE_QUOTE,hljs.QUOTE_STRING_MODE,NUMBER,TUPLE,VAR1,VAR2,RECORD_ACCESS,CHAR_LITERAL];FUNCTION_CALL.contains[1].contains=BASIC_MODES,TUPLE.contains=BASIC_MODES,RECORD_ACCESS.contains[1].contains=BASIC_MODES;const DIRECTIVES=["-module","-record","-undef","-export","-ifdef","-ifndef","-author","-copyright","-doc","-moduledoc","-vsn","-import","-include","-include_lib","-compile","-define","-else","-endif","-file","-behaviou\
r","-behavior","-spec","-on_load","-nifs"],PARAMS={className:"params",begin:"\\(",end:"\\)",contains:BASIC_MODES};return{name:"Erlang",aliases:["erl"],keywords:ERLANG_RESERVED,illegal:"(</|\\*=|\\+=|-=|/\\*|\\*/|\\(\\*|\\*\\))",contains:[{className:"function",begin:"^"+BASIC_ATOM_RE+"\\s*\\(",end:"->",returnBegin:!0,illegal:"\\(|#|//|/\\*|\\\\|:|;",contains:[PARAMS,hljs.inherit(hljs.TITLE_MODE,{begin:BASIC_ATOM_RE})],starts:{end:";|\\.",keywords:ERLANG_RESERVED,contains:BASIC_MODES}},COMMENT,{begin:"\
^-",end:"\\.",relevance:0,excludeEnd:!0,returnBegin:!0,keywords:{$pattern:"-"+hljs.IDENT_RE,keyword:DIRECTIVES.map(x=>`${x}|1.5`).join(" ")},contains:[PARAMS,SIGIL,TRIPLE_QUOTE,hljs.QUOTE_STRING_MODE]},NUMBER,SIGIL,TRIPLE_QUOTE,hljs.QUOTE_STRING_MODE,RECORD_ACCESS,VAR1,VAR2,TUPLE,CHAR_LITERAL,{begin:/\.$/}]}}function erlangRepl(hljs){const regex=hljs.regex;return{name:"Erlang REPL",keywords:{built_in:"spawn spawn_link self",keyword:"after and andalso|10 band begin bnot bor bsl bsr bxor case catc\
h cond div end fun if let not of or orelse|10 query receive rem try when xor"},contains:[{className:"meta.prompt",begin:"^[0-9]+> ",relevance:10},hljs.COMMENT("%","$"),{className:"number",begin:"\\b(\\d+(_\\d+)*#[a-fA-F0-9]+(_[a-fA-F0-9]+)*|\\d+(_\\d+)*(\\.\\d+(_\\d+)*)?([eE][-+]?\\d+)?)",relevance:0},hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,{begin:regex.concat(/\?(::)?/,/([A-Z]\w*)/,/((::)[A-Z]\w*)*/)},{begin:"->"},{begin:"ok"},{begin:"!"},{begin:"(\\b[a-z'][a-zA-Z0-9_']*:[a-z'][a-zA-Z0-9_']\
*)|(\\b[a-z'][a-zA-Z0-9_']*)",relevance:0},{begin:"[A-Z][a-zA-Z0-9_']*",relevance:0}]}}function excel(hljs){return{name:"Excel formulae",aliases:["xlsx","xls"],case_insensitive:!0,keywords:{$pattern:/[a-zA-Z][\w\.]*/,built_in:["ABS","ACCRINT","ACCRINTM","ACOS","ACOSH","ACOT","ACOTH","AGGREGATE","ADDRESS","AMORDEGRC","AMORLINC","AND","ARABIC","AREAS","ARRAYTOTEXT","ASC","ASIN","ASINH","ATAN","ATAN2","ATANH","AVEDEV","AVERAGE","AVERAGEA","AVERAGEIF","AVERAGEIFS","BAHTTEXT","BASE","BESSELI","BESSEL\
J","BESSELK","BESSELY","BETADIST","BETA.DIST","BETAINV","BETA.INV","BIN2DEC","BIN2HEX","BIN2OCT","BINOMDIST","BINOM.DIST","BINOM.DIST.RANGE","BINOM.INV","BITAND","BITLSHIFT","BITOR","BITRSHIFT","BITXOR","BYCOL","BYROW","CALL","CEILING","CEILING.MATH","CEILING.PRECISE","CELL","CHAR","CHIDIST","CHIINV","CHITEST","CHISQ.DIST","CHISQ.DIST.RT","CHISQ.INV","CHISQ.INV.RT","CHISQ.TEST","CHOOSE","CHOOSECOLS","CHOOSEROWS","CLEAN","CODE","COLUMN","COLUMNS","COMBIN","COMBINA","COMPLEX","CONCAT","CONCATENATE",
"CONFIDENCE","CONFIDENCE.NORM","CONFIDENCE.T","CONVERT","CORREL","COS","COSH","COT","COTH","COUNT","COUNTA","COUNTBLANK","COUNTIF","COUNTIFS","COUPDAYBS","COUPDAYS","COUPDAYSNC","COUPNCD","COUPNUM","COUPPCD","COVAR","COVARIANCE.P","COVARIANCE.S","CRITBINOM","CSC","CSCH","CUBEKPIMEMBER","CUBEMEMBER","CUBEMEMBERPROPERTY","CUBERANKEDMEMBER","CUBESET","CUBESETCOUNT","CUBEVALUE","CUMIPMT","CUMPRINC","DATE","DATEDIF","DATEVALUE","DAVERAGE","DAY","DAYS","DAYS360","DB","DBCS","DCOUNT","DCOUNTA","DDB","D\
EC2BIN","DEC2HEX","DEC2OCT","DECIMAL","DEGREES","DELTA","DEVSQ","DGET","DISC","DMAX","DMIN","DOLLAR","DOLLARDE","DOLLARFR","DPRODUCT","DROP","DSTDEV","DSTDEVP","DSUM","DURATION","DVAR","DVARP","EDATE","EFFECT","ENCODEURL","EOMONTH","ERF","ERF.PRECISE","ERFC","ERFC.PRECISE","ERROR.TYPE","EUROCONVERT","EVEN","EXACT","EXP","EXPAND","EXPON.DIST","EXPONDIST","FACT","FACTDOUBLE","FALSE","F.DIST","FDIST","F.DIST.RT","FILTER","FILTERXML","FIND","FINDB","F.INV","F.INV.RT","FINV","FISHER","FISHERINV","FIX\
ED","FLOOR","FLOOR.MATH","FLOOR.PRECISE","FORECAST","FORECAST.ETS","FORECAST.ETS.CONFINT","FORECAST.ETS.SEASONALITY","FORECAST.ETS.STAT","FORECAST.LINEAR","FORMULATEXT","FREQUENCY","F.TEST","FTEST","FV","FVSCHEDULE","GAMMA","GAMMA.DIST","GAMMADIST","GAMMA.INV","GAMMAINV","GAMMALN","GAMMALN.PRECISE","GAUSS","GCD","GEOMEAN","GESTEP","GETPIVOTDATA","GROWTH","HARMEAN","HEX2BIN","HEX2DEC","HEX2OCT","HLOOKUP","HOUR","HSTACK","HYPERLINK","HYPGEOM.DIST","HYPGEOMDIST","IF","IFERROR","IFNA","IFS","IMABS",
"IMAGE","IMAGINARY","IMARGUMENT","IMCONJUGATE","IMCOS","IMCOSH","IMCOT","IMCSC","IMCSCH","IMDIV","IMEXP","IMLN","IMLOG10","IMLOG2","IMPOWER","IMPRODUCT","IMREAL","IMSEC","IMSECH","IMSIN","IMSINH","IMSQRT","IMSUB","IMSUM","IMTAN","INDEX","INDIRECT","INFO","INT","INTERCEPT","INTRATE","IPMT","IRR","ISBLANK","ISERR","ISERROR","ISEVEN","ISFORMULA","ISLOGICAL","ISNA","ISNONTEXT","ISNUMBER","ISODD","ISOMITTED","ISREF","ISTEXT","ISO.CEILING","ISOWEEKNUM","ISPMT","JIS","KURT","LAMBDA","LARGE","LCM","LEFT",
"LEFTB","LEN","LENB","LET","LINEST","LN","LOG","LOG10","LOGEST","LOGINV","LOGNORM.DIST","LOGNORMDIST","LOGNORM.INV","LOOKUP","LOWER","MAKEARRAY","MAP","MATCH","MAX","MAXA","MAXIFS","MDETERM","MDURATION","MEDIAN","MID","MIDB","MIN","MINIFS","MINA","MINUTE","MINVERSE","MIRR","MMULT","MOD","MODE","MODE.MULT","MODE.SNGL","MONTH","MROUND","MULTINOMIAL","MUNIT","N","NA","NEGBINOM.DIST","NEGBINOMDIST","NETWORKDAYS","NETWORKDAYS.INTL","NOMINAL","NORM.DIST","NORMDIST","NORMINV","NORM.INV","NORM.S.DIST","\
NORMSDIST","NORM.S.INV","NORMSINV","NOT","NOW","NPER","NPV","NUMBERVALUE","OCT2BIN","OCT2DEC","OCT2HEX","ODD","ODDFPRICE","ODDFYIELD","ODDLPRICE","ODDLYIELD","OFFSET","OR","PDURATION","PEARSON","PERCENTILE.EXC","PERCENTILE.INC","PERCENTILE","PERCENTRANK.EXC","PERCENTRANK.INC","PERCENTRANK","PERMUT","PERMUTATIONA","PHI","PHONETIC","PI","PMT","POISSON.DIST","POISSON","POWER","PPMT","PRICE","PRICEDISC","PRICEMAT","PROB","PRODUCT","PROPER","PV","QUARTILE","QUARTILE.EXC","QUARTILE.INC","QUOTIENT","RA\
DIANS","RAND","RANDARRAY","RANDBETWEEN","RANK.AVG","RANK.EQ","RANK","RATE","RECEIVED","REDUCE","REGISTER.ID","REPLACE","REPLACEB","REPT","RIGHT","RIGHTB","ROMAN","ROUND","ROUNDDOWN","ROUNDUP","ROW","ROWS","RRI","RSQ","RTD","SCAN","SEARCH","SEARCHB","SEC","SECH","SECOND","SEQUENCE","SERIESSUM","SHEET","SHEETS","SIGN","SIN","SINH","SKEW","SKEW.P","SLN","SLOPE","SMALL","SORT","SORTBY","SQRT","SQRTPI","SQL.REQUEST","STANDARDIZE","STOCKHISTORY","STDEV","STDEV.P","STDEV.S","STDEVA","STDEVP","STDEVPA",
"STEYX","SUBSTITUTE","SUBTOTAL","SUM","SUMIF","SUMIFS","SUMPRODUCT","SUMSQ","SUMX2MY2","SUMX2PY2","SUMXMY2","SWITCH","SYD","T","TAN","TANH","TAKE","TBILLEQ","TBILLPRICE","TBILLYIELD","T.DIST","T.DIST.2T","T.DIST.RT","TDIST","TEXT","TEXTAFTER","TEXTBEFORE","TEXTJOIN","TEXTSPLIT","TIME","TIMEVALUE","T.INV","T.INV.2T","TINV","TOCOL","TOROW","TODAY","TRANSPOSE","TREND","TRIM","TRIMMEAN","TRUE","TRUNC","T.TEST","TTEST","TYPE","UNICHAR","UNICODE","UNIQUE","UPPER","VALUE","VALUETOTEXT","VAR","VAR.P","V\
AR.S","VARA","VARP","VARPA","VDB","VLOOKUP","VSTACK","WEBSERVICE","WEEKDAY","WEEKNUM","WEIBULL","WEIBULL.DIST","WORKDAY","WORKDAY.INTL","WRAPCOLS","WRAPROWS","XIRR","XLOOKUP","XMATCH","XNPV","XOR","YEAR","YEARFRAC","YIELD","YIELDDISC","YIELDMAT","Z.TEST","ZTEST"]},contains:[{begin:/^=/,end:/[^=]/,returnEnd:!0,illegal:/=/,relevance:10},{className:"symbol",begin:/\b[A-Z]{1,2}\d+\b/,end:/[^\d]/,excludeEnd:!0,relevance:0},{className:"symbol",begin:/[A-Z]{0,2}\d*:[A-Z]{0,2}\d*/,relevance:0},hljs.BACKSLASH_ESCAPE,
hljs.QUOTE_STRING_MODE,{className:"number",begin:hljs.NUMBER_RE+"(%)?",relevance:0},hljs.COMMENT(/\bN\(/,/\)/,{excludeBegin:!0,excludeEnd:!0,illegal:/\n/})]}}function fix(hljs){return{name:"FIX",contains:[{begin:/[^\u2401\u0001]+/,end:/[\u2401\u0001]/,excludeEnd:!0,returnBegin:!0,returnEnd:!1,contains:[{begin:/([^\u2401\u0001=]+)/,end:/=([^\u2401\u0001=]+)/,returnEnd:!0,returnBegin:!1,className:"attr"},{begin:/=/,end:/([\u2401\u0001])/,excludeEnd:!0,excludeBegin:!0,className:"string"}]}],case_insensitive:!0}}
function flix(hljs){const CHAR={className:"string",begin:/'(.|\\[xXuU][a-zA-Z0-9]+)'/},STRING={className:"string",variants:[{begin:'"',end:'"'}]},METHOD={className:"function",beginKeywords:"def",end:/[:={\[(\n;]/,excludeEnd:!0,contains:[{className:"title",relevance:0,begin:/[^0-9\n\t "'(),.`{}\[\]:;][^\n\t "'(),.`{}\[\]:;]+|[^0-9\n\t "'(),.`{}\[\]:;=]/}]};return{name:"Flix",keywords:{keyword:["case","class","def","else","enum","if","impl","import","in","lat","rel","index","let","match","namespac\
e","switch","type","yield","with"],literal:["true","false"]},contains:[hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,CHAR,STRING,METHOD,hljs.C_NUMBER_MODE]}}function fortran(hljs){const regex=hljs.regex,PARAMS={className:"params",begin:"\\(",end:"\\)"},COMMENT={variants:[hljs.COMMENT("!","$",{relevance:0}),hljs.COMMENT("^C[ ]","$",{relevance:0}),hljs.COMMENT("^C$","$",{relevance:0})]},OPTIONAL_NUMBER_SUFFIX=/(_[a-z_\d]+)?/,OPTIONAL_NUMBER_EXP=/([de][+-]?\d+)?/,NUMBER={className:"number",variants:[
{begin:regex.concat(/\b\d+/,/\.(\d*)/,OPTIONAL_NUMBER_EXP,OPTIONAL_NUMBER_SUFFIX)},{begin:regex.concat(/\b\d+/,OPTIONAL_NUMBER_EXP,OPTIONAL_NUMBER_SUFFIX)},{begin:regex.concat(/\.\d+/,OPTIONAL_NUMBER_EXP,OPTIONAL_NUMBER_SUFFIX)}],relevance:0},FUNCTION_DEF={className:"function",beginKeywords:"subroutine function program",illegal:"[${=\\n]",contains:[hljs.UNDERSCORE_TITLE_MODE,PARAMS]},STRING={className:"string",relevance:0,variants:[hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE]};return{name:"Fort\
ran",case_insensitive:!0,aliases:["f90","f95"],keywords:{$pattern:/\b[a-z][a-z0-9_]+\b|\.[a-z][a-z0-9_]+\./,keyword:["kind","do","concurrent","local","shared","while","private","call","intrinsic","where","elsewhere","type","endtype","endmodule","endselect","endinterface","end","enddo","endif","if","forall","endforall","only","contains","default","return","stop","then","block","endblock","endassociate","public","subroutine|10","function","program",".and.",".or.",".not.",".le.",".eq.",".ge.",".gt.",
".lt.","goto","save","else","use","module","select","case","access","blank","direct","exist","file","fmt","form","formatted","iostat","name","named","nextrec","number","opened","rec","recl","sequential","status","unformatted","unit","continue","format","pause","cycle","exit","c_null_char","c_alert","c_backspace","c_form_feed","flush","wait","decimal","round","iomsg","synchronous","nopass","non_overridable","pass","protected","volatile","abstract","extends","import","non_intrinsic","value","defer\
red","generic","final","enumerator","class","associate","bind","enum","c_int","c_short","c_long","c_long_long","c_signed_char","c_size_t","c_int8_t","c_int16_t","c_int32_t","c_int64_t","c_int_least8_t","c_int_least16_t","c_int_least32_t","c_int_least64_t","c_int_fast8_t","c_int_fast16_t","c_int_fast32_t","c_int_fast64_t","c_intmax_t","C_intptr_t","c_float","c_double","c_long_double","c_float_complex","c_double_complex","c_long_double_complex","c_bool","c_char","c_null_ptr","c_null_funptr","c_new\
_line","c_carriage_return","c_horizontal_tab","c_vertical_tab","iso_c_binding","c_loc","c_funloc","c_associated","c_f_pointer","c_ptr","c_funptr","iso_fortran_env","character_storage_size","error_unit","file_storage_size","input_unit","iostat_end","iostat_eor","numeric_storage_size","output_unit","c_f_procpointer","ieee_arithmetic","ieee_support_underflow_control","ieee_get_underflow_mode","ieee_set_underflow_mode","newunit","contiguous","recursive","pad","position","action","delim","readwrite",
"eor","advance","nml","interface","procedure","namelist","include","sequence","elemental","pure","impure","integer","real","character","complex","logical","codimension","dimension","allocatable|10","parameter","external","implicit|10","none","double","precision","assign","intent","optional","pointer","target","in","out","common","equivalence","data"],literal:[".False.",".True."],built_in:["alog","alog10","amax0","amax1","amin0","amin1","amod","cabs","ccos","cexp","clog","csin","csqrt","dabs","da\
cos","dasin","datan","datan2","dcos","dcosh","ddim","dexp","dint","dlog","dlog10","dmax1","dmin1","dmod","dnint","dsign","dsin","dsinh","dsqrt","dtan","dtanh","float","iabs","idim","idint","idnint","ifix","isign","max0","max1","min0","min1","sngl","algama","cdabs","cdcos","cdexp","cdlog","cdsin","cdsqrt","cqabs","cqcos","cqexp","cqlog","cqsin","cqsqrt","dcmplx","dconjg","derf","derfc","dfloat","dgamma","dimag","dlgama","iqint","qabs","qacos","qasin","qatan","qatan2","qcmplx","qconjg","qcos","qco\
sh","qdim","qerf","qerfc","qexp","qgamma","qimag","qlgama","qlog","qlog10","qmax1","qmin1","qmod","qnint","qsign","qsin","qsinh","qsqrt","qtan","qtanh","abs","acos","aimag","aint","anint","asin","atan","atan2","char","cmplx","conjg","cos","cosh","exp","ichar","index","int","log","log10","max","min","nint","sign","sin","sinh","sqrt","tan","tanh","print","write","dim","lge","lgt","lle","llt","mod","nullify","allocate","deallocate","adjustl","adjustr","all","allocated","any","associated","bit_size",
"btest","ceiling","count","cshift","date_and_time","digits","dot_product","eoshift","epsilon","exponent","floor","fraction","huge","iand","ibclr","ibits","ibset","ieor","ior","ishft","ishftc","lbound","len_trim","matmul","maxexponent","maxloc","maxval","merge","minexponent","minloc","minval","modulo","mvbits","nearest","pack","present","product","radix","random_number","random_seed","range","repeat","reshape","rrspacing","scale","scan","selected_int_kind","selected_real_kind","set_exponent","sha\
pe","size","spacing","spread","sum","system_clock","tiny","transpose","trim","ubound","unpack","verify","achar","iachar","transfer","dble","entry","dprod","cpu_time","command_argument_count","get_command","get_command_argument","get_environment_variable","is_iostat_end","ieee_arithmetic","ieee_support_underflow_control","ieee_get_underflow_mode","ieee_set_underflow_mode","is_iostat_eor","move_alloc","new_line","selected_char_kind","same_type_as","extends_type_of","acosh","asinh","atanh","bessel_\
j0","bessel_j1","bessel_jn","bessel_y0","bessel_y1","bessel_yn","erf","erfc","erfc_scaled","gamma","log_gamma","hypot","norm2","atomic_define","atomic_ref","execute_command_line","leadz","trailz","storage_size","merge_bits","bge","bgt","ble","blt","dshiftl","dshiftr","findloc","iall","iany","iparity","image_index","lcobound","ucobound","maskl","maskr","num_images","parity","popcnt","poppar","shifta","shiftl","shiftr","this_image","sync","change","team","co_broadcast","co_max","co_min","co_sum","\
co_reduce"]},illegal:/\/\*/,contains:[STRING,FUNCTION_DEF,{begin:/^C\s*=(?!=)/,relevance:0},COMMENT,NUMBER]}}function escape$1(value){return new RegExp(value.replace(/[-/\\^$*+?.()|[\]{}]/g,"\\$&"),"m")}function source$1(re2){return re2?typeof re2=="string"?re2:re2.source:null}function lookahead$1(re2){return concat$1("(?=",re2,")")}function concat$1(...args){return args.map(x=>source$1(x)).join("")}function stripOptionsFromArgs$1(args){const opts=args[args.length-1];return typeof opts=="object"&&
opts.constructor===Object?(args.splice(args.length-1,1),opts):{}}function either$1(...args){return"("+(stripOptionsFromArgs$1(args).capture?"":"?:")+args.map(x=>source$1(x)).join("|")+")"}function fsharp(hljs){const KEYWORDS2=["abstract","and","as","assert","base","begin","class","default","delegate","do","done","downcast","downto","elif","else","end","exception","extern","finally","fixed","for","fun","function","global","if","in","inherit","inline","interface","internal","lazy","let","match","m\
ember","module","mutable","namespace","new","of","open","or","override","private","public","rec","return","static","struct","then","to","try","type","upcast","use","val","void","when","while","with","yield"],BANG_KEYWORD_MODE={scope:"keyword",match:/\b(yield|return|let|do|match|use)!/},PREPROCESSOR_KEYWORDS=["if","else","endif","line","nowarn","light","r","i","I","load","time","help","quit"],LITERALS2=["true","false","null","Some","None","Ok","Error","infinity","infinityf","nan","nanf"],SPECIAL_IDENTIFIERS=[
"__LINE__","__SOURCE_DIRECTORY__","__SOURCE_FILE__"],KNOWN_TYPES=["bool","byte","sbyte","int8","int16","int32","uint8","uint16","uint32","int","uint","int64","uint64","nativeint","unativeint","decimal","float","double","float32","single","char","string","unit","bigint","option","voption","list","array","seq","byref","exn","inref","nativeptr","obj","outref","voidptr","Result"],ALL_KEYWORDS={keyword:KEYWORDS2,literal:LITERALS2,built_in:["not","ref","raise","reraise","dict","readOnlyDict","set","ge\
t","enum","sizeof","typeof","typedefof","nameof","nullArg","invalidArg","invalidOp","id","fst","snd","ignore","lock","using","box","unbox","tryUnbox","printf","printfn","sprintf","eprintf","eprintfn","fprintf","fprintfn","failwith","failwithf"],"variable.constant":SPECIAL_IDENTIFIERS},COMMENT={variants:[hljs.COMMENT(/\(\*(?!\))/,/\*\)/,{contains:["self"]}),hljs.C_LINE_COMMENT_MODE]},IDENTIFIER_RE=/[a-zA-Z_](\w|')*/,QUOTED_IDENTIFIER={scope:"variable",begin:/``/,end:/``/},BEGIN_GENERIC_TYPE_SYMBOL_RE=/\B('|\^)/,
GENERIC_TYPE_SYMBOL={scope:"symbol",variants:[{match:concat$1(BEGIN_GENERIC_TYPE_SYMBOL_RE,/``.*?``/)},{match:concat$1(BEGIN_GENERIC_TYPE_SYMBOL_RE,hljs.UNDERSCORE_IDENT_RE)}],relevance:0},makeOperatorMode=function({includeEqual}){let allOperatorChars;includeEqual?allOperatorChars="!%&*+-/<=>@^|~?":allOperatorChars="!%&*+-/<>@^|~?";const OPERATOR_CHARS=Array.from(allOperatorChars),OPERATOR_CHAR_RE=concat$1("[",...OPERATOR_CHARS.map(escape$1),"]"),OPERATOR_CHAR_OR_DOT_RE=either$1(OPERATOR_CHAR_RE,
/\./),OPERATOR_FIRST_CHAR_OF_MULTIPLE_RE=concat$1(OPERATOR_CHAR_OR_DOT_RE,lookahead$1(OPERATOR_CHAR_OR_DOT_RE)),SYMBOLIC_OPERATOR_RE=either$1(concat$1(OPERATOR_FIRST_CHAR_OF_MULTIPLE_RE,OPERATOR_CHAR_OR_DOT_RE,"*"),concat$1(OPERATOR_CHAR_RE,"+"));return{scope:"operator",match:either$1(SYMBOLIC_OPERATOR_RE,/:\?>/,/:\?/,/:>/,/:=/,/::?/,/\$/),relevance:0}},OPERATOR=makeOperatorMode({includeEqual:!0}),OPERATOR_WITHOUT_EQUAL=makeOperatorMode({includeEqual:!1}),makeTypeAnnotationMode=function(prefix,prefixScope){
return{begin:concat$1(prefix,lookahead$1(concat$1(/\s*/,either$1(/\w/,/'/,/\^/,/#/,/``/,/\(/,/{\|/)))),beginScope:prefixScope,end:lookahead$1(either$1(/\n/,/=/)),relevance:0,keywords:hljs.inherit(ALL_KEYWORDS,{type:KNOWN_TYPES}),contains:[COMMENT,GENERIC_TYPE_SYMBOL,hljs.inherit(QUOTED_IDENTIFIER,{scope:null}),OPERATOR_WITHOUT_EQUAL]}},TYPE_ANNOTATION=makeTypeAnnotationMode(/:/,"operator"),DISCRIMINATED_UNION_TYPE_ANNOTATION=makeTypeAnnotationMode(/\bof\b/,"keyword"),TYPE_DECLARATION={begin:[/(^|\s+)/,
/type/,/\s+/,IDENTIFIER_RE],beginScope:{2:"keyword",4:"title.class"},end:lookahead$1(/\(|=|$/),keywords:ALL_KEYWORDS,contains:[COMMENT,hljs.inherit(QUOTED_IDENTIFIER,{scope:null}),GENERIC_TYPE_SYMBOL,{scope:"operator",match:/<|>/},TYPE_ANNOTATION]},COMPUTATION_EXPRESSION={scope:"computation-expression",match:/\b[_a-z]\w*(?=\s*\{)/},PREPROCESSOR={begin:[/^\s*/,concat$1(/#/,either$1(...PREPROCESSOR_KEYWORDS)),/\b/],beginScope:{2:"meta"},end:lookahead$1(/\s|$/)},NUMBER={variants:[hljs.BINARY_NUMBER_MODE,
hljs.C_NUMBER_MODE]},QUOTED_STRING={scope:"string",begin:/"/,end:/"/,contains:[hljs.BACKSLASH_ESCAPE]},VERBATIM_STRING={scope:"string",begin:/@"/,end:/"/,contains:[{match:/""/},hljs.BACKSLASH_ESCAPE]},TRIPLE_QUOTED_STRING={scope:"string",begin:/"""/,end:/"""/,relevance:2},SUBST={scope:"subst",begin:/\{/,end:/\}/,keywords:ALL_KEYWORDS},INTERPOLATED_STRING={scope:"string",begin:/\$"/,end:/"/,contains:[{match:/\{\{/},{match:/\}\}/},hljs.BACKSLASH_ESCAPE,SUBST]},INTERPOLATED_VERBATIM_STRING={scope:"\
string",begin:/(\$@|@\$)"/,end:/"/,contains:[{match:/\{\{/},{match:/\}\}/},{match:/""/},hljs.BACKSLASH_ESCAPE,SUBST]},INTERPOLATED_TRIPLE_QUOTED_STRING={scope:"string",begin:/\$"""/,end:/"""/,contains:[{match:/\{\{/},{match:/\}\}/},SUBST],relevance:2},CHAR_LITERAL={scope:"string",match:concat$1(/'/,either$1(/[^\\']/,/\\(?:.|\d{3}|x[a-fA-F\d]{2}|u[a-fA-F\d]{4}|U[a-fA-F\d]{8})/),/'/)};return SUBST.contains=[INTERPOLATED_VERBATIM_STRING,INTERPOLATED_STRING,VERBATIM_STRING,QUOTED_STRING,CHAR_LITERAL,
BANG_KEYWORD_MODE,COMMENT,QUOTED_IDENTIFIER,TYPE_ANNOTATION,COMPUTATION_EXPRESSION,PREPROCESSOR,NUMBER,GENERIC_TYPE_SYMBOL,OPERATOR],{name:"F#",aliases:["fs","f#"],keywords:ALL_KEYWORDS,illegal:/\/\*/,classNameAliases:{"computation-expression":"keyword"},contains:[BANG_KEYWORD_MODE,{variants:[INTERPOLATED_TRIPLE_QUOTED_STRING,INTERPOLATED_VERBATIM_STRING,INTERPOLATED_STRING,TRIPLE_QUOTED_STRING,VERBATIM_STRING,QUOTED_STRING,CHAR_LITERAL]},COMMENT,QUOTED_IDENTIFIER,TYPE_DECLARATION,{scope:"meta",
begin:/\[</,end:/>\]/,relevance:2,contains:[QUOTED_IDENTIFIER,TRIPLE_QUOTED_STRING,VERBATIM_STRING,QUOTED_STRING,CHAR_LITERAL,NUMBER]},DISCRIMINATED_UNION_TYPE_ANNOTATION,TYPE_ANNOTATION,COMPUTATION_EXPRESSION,PREPROCESSOR,NUMBER,GENERIC_TYPE_SYMBOL,OPERATOR]}}function gams(hljs){const regex=hljs.regex,KEYWORDS2={keyword:"abort acronym acronyms alias all and assign binary card diag display else eq file files for free ge gt if integer le loop lt maximizing minimizing model models ne negative no n\
ot option options or ord positive prod put putpage puttl repeat sameas semicont semiint smax smin solve sos1 sos2 sum system table then until using while xor yes",literal:"eps inf na",built_in:"abs arccos arcsin arctan arctan2 Beta betaReg binomial ceil centropy cos cosh cvPower div div0 eDist entropy errorf execSeed exp fact floor frac gamma gammaReg log logBeta logGamma log10 log2 mapVal max min mod ncpCM ncpF ncpVUpow ncpVUsin normal pi poly power randBinomial randLinear randTriangle round rP\
ower sigmoid sign signPower sin sinh slexp sllog10 slrec sqexp sqlog10 sqr sqrec sqrt tan tanh trunc uniform uniformInt vcPower bool_and bool_eqv bool_imp bool_not bool_or bool_xor ifThen rel_eq rel_ge rel_gt rel_le rel_lt rel_ne gday gdow ghour gleap gmillisec gminute gmonth gsecond gyear jdate jnow jstart jtime errorLevel execError gamsRelease gamsVersion handleCollect handleDelete handleStatus handleSubmit heapFree heapLimit heapSize jobHandle jobKill jobStatus jobTerminate licenseLevel licen\
seStatus maxExecError sleep timeClose timeComp timeElapsed timeExec timeStart"},PARAMS={className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0},SYMBOLS={className:"symbol",variants:[{begin:/=[lgenxc]=/},{begin:/\$/}]},QSTR={className:"comment",variants:[{begin:"'",end:"'"},{begin:'"',end:'"'}],illegal:"\\n",contains:[hljs.BACKSLASH_ESCAPE]},ASSIGNMENT={begin:"/",end:"/",keywords:KEYWORDS2,contains:[QSTR,hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.QUOTE_STRING_MODE,hljs.
APOS_STRING_MODE,hljs.C_NUMBER_MODE]},COMMENT_WORD=/[a-z0-9&#*=?@\\><:,()$[\]_.{}!+%^-]+/,DESCTEXT={begin:/[a-z][a-z0-9_]*(\([a-z0-9_, ]*\))?[ \t]+/,excludeBegin:!0,end:"$",endsWithParent:!0,contains:[QSTR,ASSIGNMENT,{className:"comment",begin:regex.concat(COMMENT_WORD,regex.anyNumberOfTimes(regex.concat(/[ ]+/,COMMENT_WORD))),relevance:0}]};return{name:"GAMS",aliases:["gms"],case_insensitive:!0,keywords:KEYWORDS2,contains:[hljs.COMMENT(/^\$ontext/,/^\$offtext/),{className:"meta",begin:"^\\$[a-z0\
-9]+",end:"$",returnBegin:!0,contains:[{className:"keyword",begin:"^\\$[a-z0-9]+"}]},hljs.COMMENT("^\\*","$"),hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.QUOTE_STRING_MODE,hljs.APOS_STRING_MODE,{beginKeywords:"set sets parameter parameters variable variables scalar scalars equation equations",end:";",contains:[hljs.COMMENT("^\\*","$"),hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.QUOTE_STRING_MODE,hljs.APOS_STRING_MODE,ASSIGNMENT,DESCTEXT]},{beginKeywords:"table",end:";",returnBegin:!0,
contains:[{beginKeywords:"table",end:"$",contains:[DESCTEXT]},hljs.COMMENT("^\\*","$"),hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.QUOTE_STRING_MODE,hljs.APOS_STRING_MODE,hljs.C_NUMBER_MODE]},{className:"function",begin:/^[a-z][a-z0-9_,\-+' ()$]+\.{2}/,returnBegin:!0,contains:[{className:"title",begin:/^[a-z0-9_]+/},PARAMS,SYMBOLS]},hljs.C_NUMBER_MODE,SYMBOLS]}}function gauss(hljs){const KEYWORDS2={keyword:"bool break call callexe checkinterrupt clear clearg closeall cls comlog compi\
le continue create debug declare delete disable dlibrary dllcall do dos ed edit else elseif enable end endfor endif endp endo errorlog errorlogat expr external fn for format goto gosub graph if keyword let lib library line load loadarray loadexe loadf loadk loadm loadp loads loadx local locate loopnextindex lprint lpwidth lshow matrix msym ndpclex new open output outwidth plot plotsym pop prcsn print printdos proc push retp return rndcon rndmod rndmult rndseed run save saveall screen scroll seta\
rray show sparse stop string struct system trace trap threadfor threadendfor threadbegin threadjoin threadstat threadend until use while winprint ne ge le gt lt and xor or not eq eqv",built_in:"abs acf aconcat aeye amax amean AmericanBinomCall AmericanBinomCall_Greeks AmericanBinomCall_ImpVol AmericanBinomPut AmericanBinomPut_Greeks AmericanBinomPut_ImpVol AmericanBSCall AmericanBSCall_Greeks AmericanBSCall_ImpVol AmericanBSPut AmericanBSPut_Greeks AmericanBSPut_ImpVol amin amult annotationGetDe\
faults annotationSetBkd annotationSetFont annotationSetLineColor annotationSetLineStyle annotationSetLineThickness annualTradingDays arccos arcsin areshape arrayalloc arrayindex arrayinit arraytomat asciiload asclabel astd astds asum atan atan2 atranspose axmargin balance band bandchol bandcholsol bandltsol bandrv bandsolpd bar base10 begwind besselj bessely beta box boxcox cdfBeta cdfBetaInv cdfBinomial cdfBinomialInv cdfBvn cdfBvn2 cdfBvn2e cdfCauchy cdfCauchyInv cdfChic cdfChii cdfChinc cdfCh\
incInv cdfExp cdfExpInv cdfFc cdfFnc cdfFncInv cdfGam cdfGenPareto cdfHyperGeo cdfLaplace cdfLaplaceInv cdfLogistic cdfLogisticInv cdfmControlCreate cdfMvn cdfMvn2e cdfMvnce cdfMvne cdfMvt2e cdfMvtce cdfMvte cdfN cdfN2 cdfNc cdfNegBinomial cdfNegBinomialInv cdfNi cdfPoisson cdfPoissonInv cdfRayleigh cdfRayleighInv cdfTc cdfTci cdfTnc cdfTvn cdfWeibull cdfWeibullInv cdir ceil ChangeDir chdir chiBarSquare chol choldn cholsol cholup chrs close code cols colsf combinate combinated complex con cond c\
onj cons ConScore contour conv convertsatostr convertstrtosa corrm corrms corrvc corrx corrxs cos cosh counts countwts crossprd crout croutp csrcol csrlin csvReadM csvReadSA cumprodc cumsumc curve cvtos datacreate datacreatecomplex datalist dataload dataloop dataopen datasave date datestr datestring datestrymd dayinyr dayofweek dbAddDatabase dbClose dbCommit dbCreateQuery dbExecQuery dbGetConnectOptions dbGetDatabaseName dbGetDriverName dbGetDrivers dbGetHostName dbGetLastErrorNum dbGetLastError\
Text dbGetNumericalPrecPolicy dbGetPassword dbGetPort dbGetTableHeaders dbGetTables dbGetUserName dbHasFeature dbIsDriverAvailable dbIsOpen dbIsOpenError dbOpen dbQueryBindValue dbQueryClear dbQueryCols dbQueryExecPrepared dbQueryFetchAllM dbQueryFetchAllSA dbQueryFetchOneM dbQueryFetchOneSA dbQueryFinish dbQueryGetBoundValue dbQueryGetBoundValues dbQueryGetField dbQueryGetLastErrorNum dbQueryGetLastErrorText dbQueryGetLastInsertID dbQueryGetLastQuery dbQueryGetPosition dbQueryIsActive dbQueryIs\
ForwardOnly dbQueryIsNull dbQueryIsSelect dbQueryIsValid dbQueryPrepare dbQueryRows dbQuerySeek dbQuerySeekFirst dbQuerySeekLast dbQuerySeekNext dbQuerySeekPrevious dbQuerySetForwardOnly dbRemoveDatabase dbRollback dbSetConnectOptions dbSetDatabaseName dbSetHostName dbSetNumericalPrecPolicy dbSetPort dbSetUserName dbTransaction DeleteFile delif delrows denseToSp denseToSpRE denToZero design det detl dfft dffti diag diagrv digamma doswin DOSWinCloseall DOSWinOpen dotfeq dotfeqmt dotfge dotfgemt d\
otfgt dotfgtmt dotfle dotflemt dotflt dotfltmt dotfne dotfnemt draw drop dsCreate dstat dstatmt dstatmtControlCreate dtdate dtday dttime dttodtv dttostr dttoutc dtvnormal dtvtodt dtvtoutc dummy dummybr dummydn eig eigh eighv eigv elapsedTradingDays endwind envget eof eqSolve eqSolvemt eqSolvemtControlCreate eqSolvemtOutCreate eqSolveset erf erfc erfccplx erfcplx error etdays ethsec etstr EuropeanBinomCall EuropeanBinomCall_Greeks EuropeanBinomCall_ImpVol EuropeanBinomPut EuropeanBinomPut_Greeks \
EuropeanBinomPut_ImpVol EuropeanBSCall EuropeanBSCall_Greeks EuropeanBSCall_ImpVol EuropeanBSPut EuropeanBSPut_Greeks EuropeanBSPut_ImpVol exctsmpl exec execbg exp extern eye fcheckerr fclearerr feq feqmt fflush fft ffti fftm fftmi fftn fge fgemt fgets fgetsa fgetsat fgetst fgt fgtmt fileinfo filesa fle flemt floor flt fltmt fmod fne fnemt fonts fopen formatcv formatnv fputs fputst fseek fstrerror ftell ftocv ftos ftostrC gamma gammacplx gammaii gausset gdaAppend gdaCreate gdaDStat gdaDStatMat g\
daGetIndex gdaGetName gdaGetNames gdaGetOrders gdaGetType gdaGetTypes gdaGetVarInfo gdaIsCplx gdaLoad gdaPack gdaRead gdaReadByIndex gdaReadSome gdaReadSparse gdaReadStruct gdaReportVarInfo gdaSave gdaUpdate gdaUpdateAndPack gdaVars gdaWrite gdaWrite32 gdaWriteSome getarray getdims getf getGAUSShome getmatrix getmatrix4D getname getnamef getNextTradingDay getNextWeekDay getnr getorders getpath getPreviousTradingDay getPreviousWeekDay getRow getscalar3D getscalar4D getTrRow getwind glm gradcplx g\
radMT gradMTm gradMTT gradMTTm gradp graphprt graphset hasimag header headermt hess hessMT hessMTg hessMTgw hessMTm hessMTmw hessMTT hessMTTg hessMTTgw hessMTTm hessMTw hessp hist histf histp hsec imag indcv indexcat indices indices2 indicesf indicesfn indnv indsav integrate1d integrateControlCreate intgrat2 intgrat3 inthp1 inthp2 inthp3 inthp4 inthpControlCreate intquad1 intquad2 intquad3 intrleav intrleavsa intrsect intsimp inv invpd invswp iscplx iscplxf isden isinfnanmiss ismiss key keyav ke\
yw lag lag1 lagn lapEighb lapEighi lapEighvb lapEighvi lapgEig lapgEigh lapgEighv lapgEigv lapgSchur lapgSvdcst lapgSvds lapgSvdst lapSvdcusv lapSvds lapSvdusv ldlp ldlsol linSolve listwise ln lncdfbvn lncdfbvn2 lncdfmvn lncdfn lncdfn2 lncdfnc lnfact lngammacplx lnpdfmvn lnpdfmvt lnpdfn lnpdft loadd loadstruct loadwind loess loessmt loessmtControlCreate log loglog logx logy lower lowmat lowmat1 ltrisol lu lusol machEpsilon make makevars makewind margin matalloc matinit mattoarray maxbytes maxc m\
axindc maxv maxvec mbesselei mbesselei0 mbesselei1 mbesseli mbesseli0 mbesseli1 meanc median mergeby mergevar minc minindc minv miss missex missrv moment momentd movingave movingaveExpwgt movingaveWgt nextindex nextn nextnevn nextwind ntos null null1 numCombinations ols olsmt olsmtControlCreate olsqr olsqr2 olsqrmt ones optn optnevn orth outtyp pacf packedToSp packr parse pause pdfCauchy pdfChi pdfExp pdfGenPareto pdfHyperGeo pdfLaplace pdfLogistic pdfn pdfPoisson pdfRayleigh pdfWeibull pi pinv \
pinvmt plotAddArrow plotAddBar plotAddBox plotAddHist plotAddHistF plotAddHistP plotAddPolar plotAddScatter plotAddShape plotAddTextbox plotAddTS plotAddXY plotArea plotBar plotBox plotClearLayout plotContour plotCustomLayout plotGetDefaults plotHist plotHistF plotHistP plotLayout plotLogLog plotLogX plotLogY plotOpenWindow plotPolar plotSave plotScatter plotSetAxesPen plotSetBar plotSetBarFill plotSetBarStacked plotSetBkdColor plotSetFill plotSetGrid plotSetLegend plotSetLineColor plotSetLineSt\
yle plotSetLineSymbol plotSetLineThickness plotSetNewWindow plotSetTitle plotSetWhichYAxis plotSetXAxisShow plotSetXLabel plotSetXRange plotSetXTicInterval plotSetXTicLabel plotSetYAxisShow plotSetYLabel plotSetYRange plotSetZAxisShow plotSetZLabel plotSurface plotTS plotXY polar polychar polyeval polygamma polyint polymake polymat polymroot polymult polyroot pqgwin previousindex princomp printfm printfmt prodc psi putarray putf putvals pvCreate pvGetIndex pvGetParNames pvGetParVector pvLength p\
vList pvPack pvPacki pvPackm pvPackmi pvPacks pvPacksi pvPacksm pvPacksmi pvPutParVector pvTest pvUnpack QNewton QNewtonmt QNewtonmtControlCreate QNewtonmtOutCreate QNewtonSet QProg QProgmt QProgmtInCreate qqr qqre qqrep qr qre qrep qrsol qrtsol qtyr qtyre qtyrep quantile quantiled qyr qyre qyrep qz rank rankindx readr real reclassify reclassifyCuts recode recserar recsercp recserrc rerun rescale reshape rets rev rfft rffti rfftip rfftn rfftnp rfftp rndBernoulli rndBeta rndBinomial rndCauchy rnd\
ChiSquare rndCon rndCreateState rndExp rndGamma rndGeo rndGumbel rndHyperGeo rndi rndKMbeta rndKMgam rndKMi rndKMn rndKMnb rndKMp rndKMu rndKMvm rndLaplace rndLCbeta rndLCgam rndLCi rndLCn rndLCnb rndLCp rndLCu rndLCvm rndLogNorm rndMTu rndMVn rndMVt rndn rndnb rndNegBinomial rndp rndPoisson rndRayleigh rndStateSkip rndu rndvm rndWeibull rndWishart rotater round rows rowsf rref sampleData satostrC saved saveStruct savewind scale scale3d scalerr scalinfnanmiss scalmiss schtoc schur searchsourcepa\
th seekr select selif seqa seqm setdif setdifsa setvars setvwrmode setwind shell shiftr sin singleindex sinh sleep solpd sortc sortcc sortd sorthc sorthcc sortind sortindc sortmc sortr sortrc spBiconjGradSol spChol spConjGradSol spCreate spDenseSubmat spDiagRvMat spEigv spEye spLDL spline spLU spNumNZE spOnes spreadSheetReadM spreadSheetReadSA spreadSheetWrite spScale spSubmat spToDense spTrTDense spTScalar spZeros sqpSolve sqpSolveMT sqpSolveMTControlCreate sqpSolveMTlagrangeCreate sqpSolveMTou\
tCreate sqpSolveSet sqrt statements stdc stdsc stocv stof strcombine strindx strlen strput strrindx strsect strsplit strsplitPad strtodt strtof strtofcplx strtriml strtrimr strtrunc strtruncl strtruncpad strtruncr submat subscat substute subvec sumc sumr surface svd svd1 svd2 svdcusv svds svdusv sysstate tab tan tanh tempname time timedt timestr timeutc title tkf2eps tkf2ps tocart todaydt toeplitz token topolar trapchk trigamma trimr trunc type typecv typef union unionsa uniqindx uniqindxsa uniq\
ue uniquesa upmat upmat1 upper utctodt utctodtv utrisol vals varCovMS varCovXS varget vargetl varmall varmares varput varputl vartypef vcm vcms vcx vcxs vec vech vecr vector vget view viewxyz vlist vnamecv volume vput vread vtypecv wait waitc walkindex where window writer xlabel xlsGetSheetCount xlsGetSheetSize xlsGetSheetTypes xlsMakeRange xlsReadM xlsReadSA xlsWrite xlsWriteM xlsWriteSA xpnd xtics xy xyz ylabel ytics zeros zeta zlabel ztics cdfEmpirical dot h5create h5open h5read h5readAttribu\
te h5write h5writeAttribute ldl plotAddErrorBar plotAddSurface plotCDFEmpirical plotSetColormap plotSetContourLabels plotSetLegendFont plotSetTextInterpreter plotSetXTicCount plotSetYTicCount plotSetZLevels powerm strjoin sylvester strtrim",literal:"DB_AFTER_LAST_ROW DB_ALL_TABLES DB_BATCH_OPERATIONS DB_BEFORE_FIRST_ROW DB_BLOB DB_EVENT_NOTIFICATIONS DB_FINISH_QUERY DB_HIGH_PRECISION DB_LAST_INSERT_ID DB_LOW_PRECISION_DOUBLE DB_LOW_PRECISION_INT32 DB_LOW_PRECISION_INT64 DB_LOW_PRECISION_NUMBERS \
DB_MULTIPLE_RESULT_SETS DB_NAMED_PLACEHOLDERS DB_POSITIONAL_PLACEHOLDERS DB_PREPARED_QUERIES DB_QUERY_SIZE DB_SIMPLE_LOCKING DB_SYSTEM_TABLES DB_TABLES DB_TRANSACTIONS DB_UNICODE DB_VIEWS __STDIN __STDOUT __STDERR __FILE_DIR"},AT_COMMENT_MODE=hljs.COMMENT("@","@"),PREPROCESSOR={className:"meta",begin:"#",end:"$",keywords:{keyword:"define definecs|10 undef ifdef ifndef iflight ifdllcall ifmac ifos2win ifunix else endif lineson linesoff srcfile srcline"},contains:[{begin:/\\\n/,relevance:0},{beginKeywords:"\
include",end:"$",keywords:{keyword:"include"},contains:[{className:"string",begin:'"',end:'"',illegal:"\\n"}]},hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,AT_COMMENT_MODE]},STRUCT_TYPE={begin:/\bstruct\s+/,end:/\s/,keywords:"struct",contains:[{className:"type",begin:hljs.UNDERSCORE_IDENT_RE,relevance:0}]},PARSE_PARAMS=[{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,endsWithParent:!0,relevance:0,contains:[{className:"literal",begin:/\.\.\./},hljs.C_NUMBER_MODE,hljs.C_BLOCK_COMMENT_MODE,
AT_COMMENT_MODE,STRUCT_TYPE]}],FUNCTION_DEF={className:"title",begin:hljs.UNDERSCORE_IDENT_RE,relevance:0},DEFINITION=function(beginKeywords,end,inherits){const mode=hljs.inherit({className:"function",beginKeywords,end,excludeEnd:!0,contains:[].concat(PARSE_PARAMS)},{});return mode.contains.push(FUNCTION_DEF),mode.contains.push(hljs.C_NUMBER_MODE),mode.contains.push(hljs.C_BLOCK_COMMENT_MODE),mode.contains.push(AT_COMMENT_MODE),mode},BUILT_IN_REF={className:"built_in",begin:"\\b("+KEYWORDS2.built_in.
split(" ").join("|")+")\\b"},STRING_REF={className:"string",begin:'"',end:'"',contains:[hljs.BACKSLASH_ESCAPE],relevance:0},FUNCTION_REF={begin:hljs.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,keywords:KEYWORDS2,relevance:0,contains:[{beginKeywords:KEYWORDS2.keyword},BUILT_IN_REF,{className:"built_in",begin:hljs.UNDERSCORE_IDENT_RE,relevance:0}]},FUNCTION_REF_PARAMS={begin:/\(/,end:/\)/,relevance:0,keywords:{built_in:KEYWORDS2.built_in,literal:KEYWORDS2.literal},contains:[hljs.C_NUMBER_MODE,hljs.
C_BLOCK_COMMENT_MODE,AT_COMMENT_MODE,BUILT_IN_REF,FUNCTION_REF,STRING_REF,"self"]};return FUNCTION_REF.contains.push(FUNCTION_REF_PARAMS),{name:"GAUSS",aliases:["gss"],case_insensitive:!0,keywords:KEYWORDS2,illegal:/(\{[%#]|[%#]\}| <- )/,contains:[hljs.C_NUMBER_MODE,hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,AT_COMMENT_MODE,STRING_REF,PREPROCESSOR,{className:"keyword",begin:/\bexternal (matrix|string|array|sparse matrix|struct|proc|keyword|fn)/},DEFINITION("proc keyword",";"),DEFINITION(
"fn","="),{beginKeywords:"for threadfor",end:/;/,relevance:0,contains:[hljs.C_BLOCK_COMMENT_MODE,AT_COMMENT_MODE,FUNCTION_REF_PARAMS]},{variants:[{begin:hljs.UNDERSCORE_IDENT_RE+"\\."+hljs.UNDERSCORE_IDENT_RE},{begin:hljs.UNDERSCORE_IDENT_RE+"\\s*="}],relevance:0},FUNCTION_REF,STRUCT_TYPE]}}function gcode(hljs){const regex=hljs.regex,GCODE_KEYWORDS={$pattern:/[A-Z]+|%/,keyword:["THEN","ELSE","ENDIF","IF","GOTO","DO","WHILE","WH","END","CALL","SUB","ENDSUB","EQ","NE","LT","GT","LE","GE","AND","OR",
"XOR","%"],built_in:["ATAN","ABS","ACOS","ASIN","COS","EXP","FIX","FUP","ROUND","LN","SIN","SQRT","TAN","EXISTS"]},LETTER_BOUNDARY_RE=/\b/;function LETTER_BOUNDARY_CALLBACK(matchdata,response){if(matchdata.index===0)return;const charBeforeMatch=matchdata.input[matchdata.index-1];charBeforeMatch>="0"&&charBeforeMatch<="9"||charBeforeMatch!=="_"&&response.ignoreMatch()}const NUMBER_RE=/[+-]?((\.\d+)|(\d+)(\.\d*)?)/,GENERAL_MISC_FUNCTION_RE=/[GM]\s*\d+(\.\d+)?/,TOOLS_RE=/T\s*\d+/,SUBROUTINE_RE=/O\s*\d+/,
SUBROUTINE_NAMED_RE=/O<.+>/,AXES_RE=/[ABCUVWXYZ]\s*/,PARAMETERS_RE=/[FHIJKPQRS]\s*/,GCODE_CODE=[hljs.COMMENT(/\(/,/\)/),hljs.COMMENT(/;/,/$/),hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,hljs.C_NUMBER_MODE,{scope:"title.function",variants:[{match:regex.concat(LETTER_BOUNDARY_RE,GENERAL_MISC_FUNCTION_RE)},{begin:GENERAL_MISC_FUNCTION_RE,"on:begin":LETTER_BOUNDARY_CALLBACK},{match:regex.concat(LETTER_BOUNDARY_RE,TOOLS_RE)},{begin:TOOLS_RE,"on:begin":LETTER_BOUNDARY_CALLBACK}]},{scope:"symbol",variants:[
{match:regex.concat(LETTER_BOUNDARY_RE,SUBROUTINE_RE)},{begin:SUBROUTINE_RE,"on:begin":LETTER_BOUNDARY_CALLBACK},{match:regex.concat(LETTER_BOUNDARY_RE,SUBROUTINE_NAMED_RE)},{begin:SUBROUTINE_NAMED_RE,"on:begin":LETTER_BOUNDARY_CALLBACK},{match:/\*\s*\d+\s*$/}]},{scope:"operator",match:/^N\s*\d+/},{scope:"variable",match:/-?#\s*\d+/},{scope:"property",variants:[{match:regex.concat(LETTER_BOUNDARY_RE,AXES_RE,NUMBER_RE)},{begin:regex.concat(AXES_RE,NUMBER_RE),"on:begin":LETTER_BOUNDARY_CALLBACK}]},
{scope:"params",variants:[{match:regex.concat(LETTER_BOUNDARY_RE,PARAMETERS_RE,NUMBER_RE)},{begin:regex.concat(PARAMETERS_RE,NUMBER_RE),"on:begin":LETTER_BOUNDARY_CALLBACK}]}];return{name:"G-code (ISO 6983)",aliases:["nc"],case_insensitive:!0,disableAutodetect:!0,keywords:GCODE_KEYWORDS,contains:GCODE_CODE}}function gherkin(hljs){return{name:"Gherkin",aliases:["feature"],keywords:"Feature Background Ability Business Need Scenario Scenarios Scenario Outline Scenario Template Examples Given And Th\
en But When",contains:[{className:"symbol",begin:"\\*",relevance:0},{className:"meta",begin:"@[^@\\s]+"},{begin:"\\|",end:"\\|\\w*$",contains:[{className:"string",begin:"[^|]+"}]},{className:"variable",begin:"<",end:">"},hljs.HASH_COMMENT_MODE,{className:"string",begin:'"""',end:'"""'},hljs.QUOTE_STRING_MODE]}}function glsl(hljs){return{name:"GLSL",keywords:{keyword:"break continue discard do else for if return while switch case default attribute binding buffer ccw centroid centroid varying cohe\
rent column_major const cw depth_any depth_greater depth_less depth_unchanged early_fragment_tests equal_spacing flat fractional_even_spacing fractional_odd_spacing highp in index inout invariant invocations isolines layout line_strip lines lines_adjacency local_size_x local_size_y local_size_z location lowp max_vertices mediump noperspective offset origin_upper_left out packed patch pixel_center_integer point_mode points precise precision quads r11f_g11f_b10f r16 r16_snorm r16f r16i r16ui r32f \
r32i r32ui r8 r8_snorm r8i r8ui readonly restrict rg16 rg16_snorm rg16f rg16i rg16ui rg32f rg32i rg32ui rg8 rg8_snorm rg8i rg8ui rgb10_a2 rgb10_a2ui rgba16 rgba16_snorm rgba16f rgba16i rgba16ui rgba32f rgba32i rgba32ui rgba8 rgba8_snorm rgba8i rgba8ui row_major sample shared smooth std140 std430 stream triangle_strip triangles triangles_adjacency uniform varying vertices volatile writeonly",type:"atomic_uint bool bvec2 bvec3 bvec4 dmat2 dmat2x2 dmat2x3 dmat2x4 dmat3 dmat3x2 dmat3x3 dmat3x4 dmat4\
 dmat4x2 dmat4x3 dmat4x4 double dvec2 dvec3 dvec4 float iimage1D iimage1DArray iimage2D iimage2DArray iimage2DMS iimage2DMSArray iimage2DRect iimage3D iimageBuffer iimageCube iimageCubeArray image1D image1DArray image2D image2DArray image2DMS image2DMSArray image2DRect image3D imageBuffer imageCube imageCubeArray int isampler1D isampler1DArray isampler2D isampler2DArray isampler2DMS isampler2DMSArray isampler2DRect isampler3D isamplerBuffer isamplerCube isamplerCubeArray ivec2 ivec3 ivec4 mat2 m\
at2x2 mat2x3 mat2x4 mat3 mat3x2 mat3x3 mat3x4 mat4 mat4x2 mat4x3 mat4x4 sampler1D sampler1DArray sampler1DArrayShadow sampler1DShadow sampler2D sampler2DArray sampler2DArrayShadow sampler2DMS sampler2DMSArray sampler2DRect sampler2DRectShadow sampler2DShadow sampler3D samplerBuffer samplerCube samplerCubeArray samplerCubeArrayShadow samplerCubeShadow image1D uimage1DArray uimage2D uimage2DArray uimage2DMS uimage2DMSArray uimage2DRect uimage3D uimageBuffer uimageCube uimageCubeArray uint usampler\
1D usampler1DArray usampler2D usampler2DArray usampler2DMS usampler2DMSArray usampler2DRect usampler3D samplerBuffer usamplerCube usamplerCubeArray uvec2 uvec3 uvec4 vec2 vec3 vec4 void",built_in:"gl_MaxAtomicCounterBindings gl_MaxAtomicCounterBufferSize gl_MaxClipDistances gl_MaxClipPlanes gl_MaxCombinedAtomicCounterBuffers gl_MaxCombinedAtomicCounters gl_MaxCombinedImageUniforms gl_MaxCombinedImageUnitsAndFragmentOutputs gl_MaxCombinedTextureImageUnits gl_MaxComputeAtomicCounterBuffers gl_MaxC\
omputeAtomicCounters gl_MaxComputeImageUniforms gl_MaxComputeTextureImageUnits gl_MaxComputeUniformComponents gl_MaxComputeWorkGroupCount gl_MaxComputeWorkGroupSize gl_MaxDrawBuffers gl_MaxFragmentAtomicCounterBuffers gl_MaxFragmentAtomicCounters gl_MaxFragmentImageUniforms gl_MaxFragmentInputComponents gl_MaxFragmentInputVectors gl_MaxFragmentUniformComponents gl_MaxFragmentUniformVectors gl_MaxGeometryAtomicCounterBuffers gl_MaxGeometryAtomicCounters gl_MaxGeometryImageUniforms gl_MaxGeometryI\
nputComponents gl_MaxGeometryOutputComponents gl_MaxGeometryOutputVertices gl_MaxGeometryTextureImageUnits gl_MaxGeometryTotalOutputComponents gl_MaxGeometryUniformComponents gl_MaxGeometryVaryingComponents gl_MaxImageSamples gl_MaxImageUnits gl_MaxLights gl_MaxPatchVertices gl_MaxProgramTexelOffset gl_MaxTessControlAtomicCounterBuffers gl_MaxTessControlAtomicCounters gl_MaxTessControlImageUniforms gl_MaxTessControlInputComponents gl_MaxTessControlOutputComponents gl_MaxTessControlTextureImageUn\
its gl_MaxTessControlTotalOutputComponents gl_MaxTessControlUniformComponents gl_MaxTessEvaluationAtomicCounterBuffers gl_MaxTessEvaluationAtomicCounters gl_MaxTessEvaluationImageUniforms gl_MaxTessEvaluationInputComponents gl_MaxTessEvaluationOutputComponents gl_MaxTessEvaluationTextureImageUnits gl_MaxTessEvaluationUniformComponents gl_MaxTessGenLevel gl_MaxTessPatchComponents gl_MaxTextureCoords gl_MaxTextureImageUnits gl_MaxTextureUnits gl_MaxVaryingComponents gl_MaxVaryingFloats gl_MaxVaryi\
ngVectors gl_MaxVertexAtomicCounterBuffers gl_MaxVertexAtomicCounters gl_MaxVertexAttribs gl_MaxVertexImageUniforms gl_MaxVertexOutputComponents gl_MaxVertexOutputVectors gl_MaxVertexTextureImageUnits gl_MaxVertexUniformComponents gl_MaxVertexUniformVectors gl_MaxViewports gl_MinProgramTexelOffset gl_BackColor gl_BackLightModelProduct gl_BackLightProduct gl_BackMaterial gl_BackSecondaryColor gl_ClipDistance gl_ClipPlane gl_ClipVertex gl_Color gl_DepthRange gl_EyePlaneQ gl_EyePlaneR gl_EyePlaneS \
gl_EyePlaneT gl_Fog gl_FogCoord gl_FogFragCoord gl_FragColor gl_FragCoord gl_FragData gl_FragDepth gl_FrontColor gl_FrontFacing gl_FrontLightModelProduct gl_FrontLightProduct gl_FrontMaterial gl_FrontSecondaryColor gl_GlobalInvocationID gl_InstanceID gl_InvocationID gl_Layer gl_LightModel gl_LightSource gl_LocalInvocationID gl_LocalInvocationIndex gl_ModelViewMatrix gl_ModelViewMatrixInverse gl_ModelViewMatrixInverseTranspose gl_ModelViewMatrixTranspose gl_ModelViewProjectionMatrix gl_ModelViewP\
rojectionMatrixInverse gl_ModelViewProjectionMatrixInverseTranspose gl_ModelViewProjectionMatrixTranspose gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 gl_Normal gl_NormalMatrix gl_NormalScale gl_NumSamples gl_NumWorkGroups gl_ObjectPlaneQ gl_ObjectPlaneR gl_ObjectPlaneS gl_ObjectPlaneT gl_PatchVerticesIn gl_Point gl_PointCoord gl_PointSize gl_Position gl_PrimitiveID gl_PrimitiveIDIn gl_ProjectionMa\
trix gl_ProjectionMatrixInverse gl_ProjectionMatrixInverseTranspose gl_ProjectionMatrixTranspose gl_SampleID gl_SampleMask gl_SampleMaskIn gl_SamplePosition gl_SecondaryColor gl_TessCoord gl_TessLevelInner gl_TessLevelOuter gl_TexCoord gl_TextureEnvColor gl_TextureMatrix gl_TextureMatrixInverse gl_TextureMatrixInverseTranspose gl_TextureMatrixTranspose gl_Vertex gl_VertexID gl_ViewportIndex gl_WorkGroupID gl_WorkGroupSize gl_in gl_out EmitStreamVertex EmitVertex EndPrimitive EndStreamPrimitive a\
bs acos acosh all any asin asinh atan atanh atomicAdd atomicAnd atomicCompSwap atomicCounter atomicCounterDecrement atomicCounterIncrement atomicExchange atomicMax atomicMin atomicOr atomicXor barrier bitCount bitfieldExtract bitfieldInsert bitfieldReverse ceil clamp cos cosh cross dFdx dFdy degrees determinant distance dot equal exp exp2 faceforward findLSB findMSB floatBitsToInt floatBitsToUint floor fma fract frexp ftransform fwidth greaterThan greaterThanEqual groupMemoryBarrier imageAtomicA\
dd imageAtomicAnd imageAtomicCompSwap imageAtomicExchange imageAtomicMax imageAtomicMin imageAtomicOr imageAtomicXor imageLoad imageSize imageStore imulExtended intBitsToFloat interpolateAtCentroid interpolateAtOffset interpolateAtSample inverse inversesqrt isinf isnan ldexp length lessThan lessThanEqual log log2 matrixCompMult max memoryBarrier memoryBarrierAtomicCounter memoryBarrierBuffer memoryBarrierImage memoryBarrierShared min mix mod modf noise1 noise2 noise3 noise4 normalize not notEqua\
l outerProduct packDouble2x32 packHalf2x16 packSnorm2x16 packSnorm4x8 packUnorm2x16 packUnorm4x8 pow radians reflect refract round roundEven shadow1D shadow1DLod shadow1DProj shadow1DProjLod shadow2D shadow2DLod shadow2DProj shadow2DProjLod sign sin sinh smoothstep sqrt step tan tanh texelFetch texelFetchOffset texture texture1D texture1DLod texture1DProj texture1DProjLod texture2D texture2DLod texture2DProj texture2DProjLod texture3D texture3DLod texture3DProj texture3DProjLod textureCube textu\
reCubeLod textureGather textureGatherOffset textureGatherOffsets textureGrad textureGradOffset textureLod textureLodOffset textureOffset textureProj textureProjGrad textureProjGradOffset textureProjLod textureProjLodOffset textureProjOffset textureQueryLevels textureQueryLod textureSize transpose trunc uaddCarry uintBitsToFloat umulExtended unpackDouble2x32 unpackHalf2x16 unpackSnorm2x16 unpackSnorm4x8 unpackUnorm2x16 unpackUnorm4x8 usubBorrow",literal:"true false"},illegal:'"',contains:[hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE,hljs.C_NUMBER_MODE,{className:"meta",begin:"#",end:"$"}]}}function gml(hljs){return{name:"GML",case_insensitive:!1,keywords:{keyword:["#endregion","#macro","#region","and","begin","break","case","constructor","continue","default","delete","div","do","else","end","enum","exit","for","function","globalvar","if","mod","new","not","or","repeat","return","static","switch","then","until","var","while","with","xor"],built_in:["abs","alarm_get","alarm_set","angle_difference","a\
nimcurve_channel_evaluate","animcurve_channel_new","animcurve_create","animcurve_destroy","animcurve_exists","animcurve_get","animcurve_get_channel","animcurve_get_channel_index","animcurve_point_new","ansi_char","application_get_position","application_surface_draw_enable","application_surface_enable","application_surface_is_enabled","arccos","arcsin","arctan","arctan2","array_all","array_any","array_concat","array_contains","array_contains_ext","array_copy","array_copy_while","array_create","ar\
ray_create_ext","array_delete","array_equals","array_filter","array_filter_ext","array_find_index","array_first","array_foreach","array_get","array_get_index","array_insert","array_intersection","array_last","array_length","array_map","array_map_ext","array_pop","array_push","array_reduce","array_resize","array_reverse","array_reverse_ext","array_set","array_shuffle","array_shuffle_ext","array_sort","array_union","array_unique","array_unique_ext","asset_add_tags","asset_clear_tags","asset_get_id\
s","asset_get_index","asset_get_tags","asset_get_type","asset_has_any_tag","asset_has_tags","asset_remove_tags","audio_bus_clear_emitters","audio_bus_create","audio_bus_get_emitters","audio_channel_num","audio_create_buffer_sound","audio_create_play_queue","audio_create_stream","audio_create_sync_group","audio_debug","audio_destroy_stream","audio_destroy_sync_group","audio_effect_create","audio_emitter_bus","audio_emitter_create","audio_emitter_exists","audio_emitter_falloff","audio_emitter_free",
"audio_emitter_gain","audio_emitter_get_bus","audio_emitter_get_gain","audio_emitter_get_listener_mask","audio_emitter_get_pitch","audio_emitter_get_vx","audio_emitter_get_vy","audio_emitter_get_vz","audio_emitter_get_x","audio_emitter_get_y","audio_emitter_get_z","audio_emitter_pitch","audio_emitter_position","audio_emitter_set_listener_mask","audio_emitter_velocity","audio_exists","audio_falloff_set_model","audio_free_buffer_sound","audio_free_play_queue","audio_get_listener_count","audio_get_\
listener_info","audio_get_listener_mask","audio_get_master_gain","audio_get_name","audio_get_recorder_count","audio_get_recorder_info","audio_get_type","audio_group_get_assets","audio_group_get_gain","audio_group_is_loaded","audio_group_load","audio_group_load_progress","audio_group_name","audio_group_set_gain","audio_group_stop_all","audio_group_unload","audio_is_paused","audio_is_playing","audio_listener_get_data","audio_listener_orientation","audio_listener_position","audio_listener_set_orien\
tation","audio_listener_set_position","audio_listener_set_velocity","audio_listener_velocity","audio_master_gain","audio_pause_all","audio_pause_sound","audio_pause_sync_group","audio_play_in_sync_group","audio_play_sound","audio_play_sound_at","audio_play_sound_ext","audio_play_sound_on","audio_queue_sound","audio_resume_all","audio_resume_sound","audio_resume_sync_group","audio_set_listener_mask","audio_set_master_gain","audio_sound_gain","audio_sound_get_audio_group","audio_sound_get_gain","a\
udio_sound_get_listener_mask","audio_sound_get_loop","audio_sound_get_loop_end","audio_sound_get_loop_start","audio_sound_get_pitch","audio_sound_get_track_position","audio_sound_is_playable","audio_sound_length","audio_sound_loop","audio_sound_loop_end","audio_sound_loop_start","audio_sound_pitch","audio_sound_set_listener_mask","audio_sound_set_track_position","audio_start_recording","audio_start_sync_group","audio_stop_all","audio_stop_recording","audio_stop_sound","audio_stop_sync_group","au\
dio_sync_group_debug","audio_sync_group_get_track_pos","audio_sync_group_is_paused","audio_sync_group_is_playing","audio_system_is_available","audio_system_is_initialised","base64_decode","base64_encode","bool","browser_input_capture","buffer_async_group_begin","buffer_async_group_end","buffer_async_group_option","buffer_base64_decode","buffer_base64_decode_ext","buffer_base64_encode","buffer_compress","buffer_copy","buffer_copy_from_vertex_buffer","buffer_copy_stride","buffer_crc32","buffer_cre\
ate","buffer_create_from_vertex_buffer","buffer_create_from_vertex_buffer_ext","buffer_decompress","buffer_delete","buffer_exists","buffer_fill","buffer_get_address","buffer_get_alignment","buffer_get_size","buffer_get_surface","buffer_get_type","buffer_load","buffer_load_async","buffer_load_ext","buffer_load_partial","buffer_md5","buffer_peek","buffer_poke","buffer_read","buffer_resize","buffer_save","buffer_save_async","buffer_save_ext","buffer_seek","buffer_set_surface","buffer_set_used_size",
"buffer_sha1","buffer_sizeof","buffer_tell","buffer_write","call_cancel","call_later","camera_apply","camera_copy_transforms","camera_create","camera_create_view","camera_destroy","camera_get_active","camera_get_begin_script","camera_get_default","camera_get_end_script","camera_get_proj_mat","camera_get_update_script","camera_get_view_angle","camera_get_view_border_x","camera_get_view_border_y","camera_get_view_height","camera_get_view_mat","camera_get_view_speed_x","camera_get_view_speed_y","ca\
mera_get_view_target","camera_get_view_width","camera_get_view_x","camera_get_view_y","camera_set_begin_script","camera_set_default","camera_set_end_script","camera_set_proj_mat","camera_set_update_script","camera_set_view_angle","camera_set_view_border","camera_set_view_mat","camera_set_view_pos","camera_set_view_size","camera_set_view_speed","camera_set_view_target","ceil","choose","chr","clamp","clickable_add","clickable_add_ext","clickable_change","clickable_change_ext","clickable_delete","c\
lickable_exists","clickable_set_style","clipboard_get_text","clipboard_has_text","clipboard_set_text","cloud_file_save","cloud_string_save","cloud_synchronise","code_is_compiled","collision_circle","collision_circle_list","collision_ellipse","collision_ellipse_list","collision_line","collision_line_list","collision_point","collision_point_list","collision_rectangle","collision_rectangle_list","color_get_blue","color_get_green","color_get_hue","color_get_red","color_get_saturation","color_get_val\
ue","colour_get_blue","colour_get_green","colour_get_hue","colour_get_red","colour_get_saturation","colour_get_value","cos","darccos","darcsin","darctan","darctan2","date_compare_date","date_compare_datetime","date_compare_time","date_create_datetime","date_current_datetime","date_date_of","date_date_string","date_datetime_string","date_day_span","date_days_in_month","date_days_in_year","date_get_day","date_get_day_of_year","date_get_hour","date_get_hour_of_year","date_get_minute","date_get_minu\
te_of_year","date_get_month","date_get_second","date_get_second_of_year","date_get_timezone","date_get_week","date_get_weekday","date_get_year","date_hour_span","date_inc_day","date_inc_hour","date_inc_minute","date_inc_month","date_inc_second","date_inc_week","date_inc_year","date_is_today","date_leap_year","date_minute_span","date_month_span","date_second_span","date_set_timezone","date_time_of","date_time_string","date_valid_datetime","date_week_span","date_year_span","db_to_lin","dbg_add_fon\
t_glyphs","dbg_button","dbg_checkbox","dbg_color","dbg_colour","dbg_drop_down","dbg_same_line","dbg_section","dbg_section_delete","dbg_section_exists","dbg_slider","dbg_slider_int","dbg_sprite","dbg_text","dbg_text_input","dbg_view","dbg_view_delete","dbg_view_exists","dbg_watch","dcos","debug_event","debug_get_callstack","degtorad","device_get_tilt_x","device_get_tilt_y","device_get_tilt_z","device_is_keypad_open","device_mouse_check_button","device_mouse_check_button_pressed","device_mouse_che\
ck_button_released","device_mouse_dbclick_enable","device_mouse_raw_x","device_mouse_raw_y","device_mouse_x","device_mouse_x_to_gui","device_mouse_y","device_mouse_y_to_gui","directory_create","directory_destroy","directory_exists","display_get_dpi_x","display_get_dpi_y","display_get_frequency","display_get_gui_height","display_get_gui_width","display_get_height","display_get_orientation","display_get_sleep_margin","display_get_timing_method","display_get_width","display_mouse_get_x","display_mo\
use_get_y","display_mouse_set","display_reset","display_set_gui_maximise","display_set_gui_maximize","display_set_gui_size","display_set_sleep_margin","display_set_timing_method","display_set_ui_visibility","distance_to_object","distance_to_point","dot_product","dot_product_3d","dot_product_3d_normalised","dot_product_3d_normalized","dot_product_normalised","dot_product_normalized","draw_arrow","draw_button","draw_circle","draw_circle_color","draw_circle_colour","draw_clear","draw_clear_alpha","\
draw_ellipse","draw_ellipse_color","draw_ellipse_colour","draw_enable_drawevent","draw_enable_skeleton_blendmodes","draw_enable_swf_aa","draw_flush","draw_get_alpha","draw_get_color","draw_get_colour","draw_get_enable_skeleton_blendmodes","draw_get_font","draw_get_halign","draw_get_lighting","draw_get_swf_aa_level","draw_get_valign","draw_getpixel","draw_getpixel_ext","draw_healthbar","draw_highscore","draw_light_define_ambient","draw_light_define_direction","draw_light_define_point","draw_light\
_enable","draw_light_get","draw_light_get_ambient","draw_line","draw_line_color","draw_line_colour","draw_line_width","draw_line_width_color","draw_line_width_colour","draw_path","draw_point","draw_point_color","draw_point_colour","draw_primitive_begin","draw_primitive_begin_texture","draw_primitive_end","draw_rectangle","draw_rectangle_color","draw_rectangle_colour","draw_roundrect","draw_roundrect_color","draw_roundrect_color_ext","draw_roundrect_colour","draw_roundrect_colour_ext","draw_round\
rect_ext","draw_self","draw_set_alpha","draw_set_circle_precision","draw_set_color","draw_set_colour","draw_set_font","draw_set_halign","draw_set_lighting","draw_set_swf_aa_level","draw_set_valign","draw_skeleton","draw_skeleton_collision","draw_skeleton_instance","draw_skeleton_time","draw_sprite","draw_sprite_ext","draw_sprite_general","draw_sprite_part","draw_sprite_part_ext","draw_sprite_pos","draw_sprite_stretched","draw_sprite_stretched_ext","draw_sprite_tiled","draw_sprite_tiled_ext","dra\
w_surface","draw_surface_ext","draw_surface_general","draw_surface_part","draw_surface_part_ext","draw_surface_stretched","draw_surface_stretched_ext","draw_surface_tiled","draw_surface_tiled_ext","draw_text","draw_text_color","draw_text_colour","draw_text_ext","draw_text_ext_color","draw_text_ext_colour","draw_text_ext_transformed","draw_text_ext_transformed_color","draw_text_ext_transformed_colour","draw_text_transformed","draw_text_transformed_color","draw_text_transformed_colour","draw_textu\
re_flush","draw_tile","draw_tilemap","draw_triangle","draw_triangle_color","draw_triangle_colour","draw_vertex","draw_vertex_color","draw_vertex_colour","draw_vertex_texture","draw_vertex_texture_color","draw_vertex_texture_colour","ds_exists","ds_grid_add","ds_grid_add_disk","ds_grid_add_grid_region","ds_grid_add_region","ds_grid_clear","ds_grid_copy","ds_grid_create","ds_grid_destroy","ds_grid_get","ds_grid_get_disk_max","ds_grid_get_disk_mean","ds_grid_get_disk_min","ds_grid_get_disk_sum","ds\
_grid_get_max","ds_grid_get_mean","ds_grid_get_min","ds_grid_get_sum","ds_grid_height","ds_grid_multiply","ds_grid_multiply_disk","ds_grid_multiply_grid_region","ds_grid_multiply_region","ds_grid_read","ds_grid_resize","ds_grid_set","ds_grid_set_disk","ds_grid_set_grid_region","ds_grid_set_region","ds_grid_shuffle","ds_grid_sort","ds_grid_to_mp_grid","ds_grid_value_disk_exists","ds_grid_value_disk_x","ds_grid_value_disk_y","ds_grid_value_exists","ds_grid_value_x","ds_grid_value_y","ds_grid_width",
"ds_grid_write","ds_list_add","ds_list_clear","ds_list_copy","ds_list_create","ds_list_delete","ds_list_destroy","ds_list_empty","ds_list_find_index","ds_list_find_value","ds_list_insert","ds_list_is_list","ds_list_is_map","ds_list_mark_as_list","ds_list_mark_as_map","ds_list_read","ds_list_replace","ds_list_set","ds_list_shuffle","ds_list_size","ds_list_sort","ds_list_write","ds_map_add","ds_map_add_list","ds_map_add_map","ds_map_clear","ds_map_copy","ds_map_create","ds_map_delete","ds_map_dest\
roy","ds_map_empty","ds_map_exists","ds_map_find_first","ds_map_find_last","ds_map_find_next","ds_map_find_previous","ds_map_find_value","ds_map_is_list","ds_map_is_map","ds_map_keys_to_array","ds_map_read","ds_map_replace","ds_map_replace_list","ds_map_replace_map","ds_map_secure_load","ds_map_secure_load_buffer","ds_map_secure_save","ds_map_secure_save_buffer","ds_map_set","ds_map_size","ds_map_values_to_array","ds_map_write","ds_priority_add","ds_priority_change_priority","ds_priority_clear",
"ds_priority_copy","ds_priority_create","ds_priority_delete_max","ds_priority_delete_min","ds_priority_delete_value","ds_priority_destroy","ds_priority_empty","ds_priority_find_max","ds_priority_find_min","ds_priority_find_priority","ds_priority_read","ds_priority_size","ds_priority_write","ds_queue_clear","ds_queue_copy","ds_queue_create","ds_queue_dequeue","ds_queue_destroy","ds_queue_empty","ds_queue_enqueue","ds_queue_head","ds_queue_read","ds_queue_size","ds_queue_tail","ds_queue_write","ds\
_set_precision","ds_stack_clear","ds_stack_copy","ds_stack_create","ds_stack_destroy","ds_stack_empty","ds_stack_pop","ds_stack_push","ds_stack_read","ds_stack_size","ds_stack_top","ds_stack_write","dsin","dtan","effect_clear","effect_create_above","effect_create_below","effect_create_depth","effect_create_layer","environment_get_variable","event_inherited","event_perform","event_perform_async","event_perform_object","event_user","exception_unhandled_handler","exp","extension_exists","extension_\
get_option_count","extension_get_option_names","extension_get_option_value","extension_get_options","extension_get_version","external_call","external_define","external_free","file_attributes","file_bin_close","file_bin_open","file_bin_position","file_bin_read_byte","file_bin_rewrite","file_bin_seek","file_bin_size","file_bin_write_byte","file_copy","file_delete","file_exists","file_find_close","file_find_first","file_find_next","file_rename","file_text_close","file_text_eof","file_text_eoln","fi\
le_text_open_append","file_text_open_from_string","file_text_open_read","file_text_open_write","file_text_read_real","file_text_read_string","file_text_readln","file_text_write_real","file_text_write_string","file_text_writeln","filename_change_ext","filename_dir","filename_drive","filename_ext","filename_name","filename_path","floor","font_add","font_add_enable_aa","font_add_get_enable_aa","font_add_sprite","font_add_sprite_ext","font_cache_glyph","font_delete","font_enable_effects","font_enabl\
e_sdf","font_exists","font_get_bold","font_get_first","font_get_fontname","font_get_info","font_get_italic","font_get_last","font_get_name","font_get_sdf_enabled","font_get_sdf_spread","font_get_size","font_get_texture","font_get_uvs","font_replace_sprite","font_replace_sprite_ext","font_sdf_spread","font_set_cache_size","frac","fx_create","fx_get_name","fx_get_parameter","fx_get_parameter_names","fx_get_parameters","fx_get_single_layer","fx_set_parameter","fx_set_parameters","fx_set_single_laye\
r","game_change","game_end","game_get_speed","game_load","game_load_buffer","game_restart","game_save","game_save_buffer","game_set_speed","gamepad_axis_count","gamepad_axis_value","gamepad_button_check","gamepad_button_check_pressed","gamepad_button_check_released","gamepad_button_count","gamepad_button_value","gamepad_get_axis_deadzone","gamepad_get_button_threshold","gamepad_get_description","gamepad_get_device_count","gamepad_get_guid","gamepad_get_mapping","gamepad_get_option","gamepad_hat_\
count","gamepad_hat_value","gamepad_is_connected","gamepad_is_supported","gamepad_remove_mapping","gamepad_set_axis_deadzone","gamepad_set_button_threshold","gamepad_set_color","gamepad_set_colour","gamepad_set_option","gamepad_set_vibration","gamepad_test_mapping","gc_collect","gc_enable","gc_get_stats","gc_get_target_frame_time","gc_is_enabled","gc_target_frame_time","gesture_double_tap_distance","gesture_double_tap_time","gesture_drag_distance","gesture_drag_time","gesture_flick_speed","gestu\
re_get_double_tap_distance","gesture_get_double_tap_time","gesture_get_drag_distance","gesture_get_drag_time","gesture_get_flick_speed","gesture_get_pinch_angle_away","gesture_get_pinch_angle_towards","gesture_get_pinch_distance","gesture_get_rotate_angle","gesture_get_rotate_time","gesture_get_tap_count","gesture_pinch_angle_away","gesture_pinch_angle_towards","gesture_pinch_distance","gesture_rotate_angle","gesture_rotate_time","gesture_tap_count","get_integer","get_integer_async","get_login_a\
sync","get_open_filename","get_open_filename_ext","get_save_filename","get_save_filename_ext","get_string","get_string_async","get_timer","gif_add_surface","gif_open","gif_save","gif_save_buffer","gml_pragma","gml_release_mode","gpu_get_alphatestenable","gpu_get_alphatestref","gpu_get_blendenable","gpu_get_blendmode","gpu_get_blendmode_dest","gpu_get_blendmode_destalpha","gpu_get_blendmode_ext","gpu_get_blendmode_ext_sepalpha","gpu_get_blendmode_src","gpu_get_blendmode_srcalpha","gpu_get_colorwr\
iteenable","gpu_get_colourwriteenable","gpu_get_cullmode","gpu_get_depth","gpu_get_fog","gpu_get_state","gpu_get_tex_filter","gpu_get_tex_filter_ext","gpu_get_tex_max_aniso","gpu_get_tex_max_aniso_ext","gpu_get_tex_max_mip","gpu_get_tex_max_mip_ext","gpu_get_tex_min_mip","gpu_get_tex_min_mip_ext","gpu_get_tex_mip_bias","gpu_get_tex_mip_bias_ext","gpu_get_tex_mip_enable","gpu_get_tex_mip_enable_ext","gpu_get_tex_mip_filter","gpu_get_tex_mip_filter_ext","gpu_get_tex_repeat","gpu_get_tex_repeat_ext",
"gpu_get_texfilter","gpu_get_texfilter_ext","gpu_get_texrepeat","gpu_get_texrepeat_ext","gpu_get_zfunc","gpu_get_ztestenable","gpu_get_zwriteenable","gpu_pop_state","gpu_push_state","gpu_set_alphatestenable","gpu_set_alphatestref","gpu_set_blendenable","gpu_set_blendmode","gpu_set_blendmode_ext","gpu_set_blendmode_ext_sepalpha","gpu_set_colorwriteenable","gpu_set_colourwriteenable","gpu_set_cullmode","gpu_set_depth","gpu_set_fog","gpu_set_state","gpu_set_tex_filter","gpu_set_tex_filter_ext","gpu\
_set_tex_max_aniso","gpu_set_tex_max_aniso_ext","gpu_set_tex_max_mip","gpu_set_tex_max_mip_ext","gpu_set_tex_min_mip","gpu_set_tex_min_mip_ext","gpu_set_tex_mip_bias","gpu_set_tex_mip_bias_ext","gpu_set_tex_mip_enable","gpu_set_tex_mip_enable_ext","gpu_set_tex_mip_filter","gpu_set_tex_mip_filter_ext","gpu_set_tex_repeat","gpu_set_tex_repeat_ext","gpu_set_texfilter","gpu_set_texfilter_ext","gpu_set_texrepeat","gpu_set_texrepeat_ext","gpu_set_zfunc","gpu_set_ztestenable","gpu_set_zwriteenable","ha\
ndle_parse","highscore_add","highscore_clear","highscore_name","highscore_value","http_get","http_get_file","http_get_request_crossorigin","http_post_string","http_request","http_set_request_crossorigin","iap_acquire","iap_activate","iap_consume","iap_enumerate_products","iap_product_details","iap_purchase_details","iap_restore_all","iap_status","ini_close","ini_key_delete","ini_key_exists","ini_open","ini_open_from_string","ini_read_real","ini_read_string","ini_section_delete","ini_section_exis\
ts","ini_write_real","ini_write_string","instance_activate_all","instance_activate_layer","instance_activate_object","instance_activate_region","instance_change","instance_copy","instance_create_depth","instance_create_layer","instance_deactivate_all","instance_deactivate_layer","instance_deactivate_object","instance_deactivate_region","instance_destroy","instance_exists","instance_find","instance_furthest","instance_id_get","instance_nearest","instance_number","instance_place","instance_place_l\
ist","instance_position","instance_position_list","instanceof","int64","io_clear","irandom","irandom_range","is_array","is_bool","is_callable","is_debug_overlay_open","is_handle","is_infinity","is_instanceof","is_int32","is_int64","is_keyboard_used_debug_overlay","is_method","is_mouse_over_debug_overlay","is_nan","is_numeric","is_ptr","is_real","is_string","is_struct","is_undefined","json_decode","json_encode","json_parse","json_stringify","keyboard_check","keyboard_check_direct","keyboard_check\
_pressed","keyboard_check_released","keyboard_clear","keyboard_get_map","keyboard_get_numlock","keyboard_key_press","keyboard_key_release","keyboard_set_map","keyboard_set_numlock","keyboard_unset_map","keyboard_virtual_height","keyboard_virtual_hide","keyboard_virtual_show","keyboard_virtual_status","layer_add_instance","layer_background_alpha","layer_background_blend","layer_background_change","layer_background_create","layer_background_destroy","layer_background_exists","layer_background_get_\
alpha","layer_background_get_blend","layer_background_get_htiled","layer_background_get_id","layer_background_get_index","layer_background_get_speed","layer_background_get_sprite","layer_background_get_stretch","layer_background_get_visible","layer_background_get_vtiled","layer_background_get_xscale","layer_background_get_yscale","layer_background_htiled","layer_background_index","layer_background_speed","layer_background_sprite","layer_background_stretch","layer_background_visible","layer_backg\
round_vtiled","layer_background_xscale","layer_background_yscale","layer_clear_fx","layer_create","layer_depth","layer_destroy","layer_destroy_instances","layer_element_move","layer_enable_fx","layer_exists","layer_force_draw_depth","layer_fx_is_enabled","layer_get_all","layer_get_all_elements","layer_get_depth","layer_get_element_layer","layer_get_element_type","layer_get_forced_depth","layer_get_fx","layer_get_hspeed","layer_get_id","layer_get_id_at_depth","layer_get_name","layer_get_script_be\
gin","layer_get_script_end","layer_get_shader","layer_get_target_room","layer_get_visible","layer_get_vspeed","layer_get_x","layer_get_y","layer_has_instance","layer_hspeed","layer_instance_get_instance","layer_is_draw_depth_forced","layer_reset_target_room","layer_script_begin","layer_script_end","layer_sequence_angle","layer_sequence_create","layer_sequence_destroy","layer_sequence_exists","layer_sequence_get_angle","layer_sequence_get_headdir","layer_sequence_get_headpos","layer_sequence_get_\
instance","layer_sequence_get_length","layer_sequence_get_sequence","layer_sequence_get_speedscale","layer_sequence_get_x","layer_sequence_get_xscale","layer_sequence_get_y","layer_sequence_get_yscale","layer_sequence_headdir","layer_sequence_headpos","layer_sequence_is_finished","layer_sequence_is_paused","layer_sequence_pause","layer_sequence_play","layer_sequence_speedscale","layer_sequence_x","layer_sequence_xscale","layer_sequence_y","layer_sequence_yscale","layer_set_fx","layer_set_target_\
room","layer_set_visible","layer_shader","layer_sprite_alpha","layer_sprite_angle","layer_sprite_blend","layer_sprite_change","layer_sprite_create","layer_sprite_destroy","layer_sprite_exists","layer_sprite_get_alpha","layer_sprite_get_angle","layer_sprite_get_blend","layer_sprite_get_id","layer_sprite_get_index","layer_sprite_get_speed","layer_sprite_get_sprite","layer_sprite_get_x","layer_sprite_get_xscale","layer_sprite_get_y","layer_sprite_get_yscale","layer_sprite_index","layer_sprite_speed",
"layer_sprite_x","layer_sprite_xscale","layer_sprite_y","layer_sprite_yscale","layer_tile_alpha","layer_tile_blend","layer_tile_change","layer_tile_create","layer_tile_destroy","layer_tile_exists","layer_tile_get_alpha","layer_tile_get_blend","layer_tile_get_region","layer_tile_get_sprite","layer_tile_get_visible","layer_tile_get_x","layer_tile_get_xscale","layer_tile_get_y","layer_tile_get_yscale","layer_tile_region","layer_tile_visible","layer_tile_x","layer_tile_xscale","layer_tile_y","layer_\
tile_yscale","layer_tilemap_create","layer_tilemap_destroy","layer_tilemap_exists","layer_tilemap_get_id","layer_vspeed","layer_x","layer_y","lengthdir_x","lengthdir_y","lerp","lin_to_db","ln","load_csv","log10","log2","logn","make_color_hsv","make_color_rgb","make_colour_hsv","make_colour_rgb","math_get_epsilon","math_set_epsilon","matrix_build","matrix_build_identity","matrix_build_lookat","matrix_build_projection_ortho","matrix_build_projection_perspective","matrix_build_projection_perspectiv\
e_fov","matrix_get","matrix_multiply","matrix_set","matrix_stack_clear","matrix_stack_is_empty","matrix_stack_pop","matrix_stack_push","matrix_stack_set","matrix_stack_top","matrix_transform_vertex","max","md5_file","md5_string_unicode","md5_string_utf8","mean","median","merge_color","merge_colour","method","method_call","method_get_index","method_get_self","min","motion_add","motion_set","mouse_check_button","mouse_check_button_pressed","mouse_check_button_released","mouse_clear","mouse_wheel_d\
own","mouse_wheel_up","move_and_collide","move_bounce_all","move_bounce_solid","move_contact_all","move_contact_solid","move_outside_all","move_outside_solid","move_random","move_snap","move_towards_point","move_wrap","mp_grid_add_cell","mp_grid_add_instances","mp_grid_add_rectangle","mp_grid_clear_all","mp_grid_clear_cell","mp_grid_clear_rectangle","mp_grid_create","mp_grid_destroy","mp_grid_draw","mp_grid_get_cell","mp_grid_path","mp_grid_to_ds_grid","mp_linear_path","mp_linear_path_object","m\
p_linear_step","mp_linear_step_object","mp_potential_path","mp_potential_path_object","mp_potential_settings","mp_potential_step","mp_potential_step_object","nameof","network_connect","network_connect_async","network_connect_raw","network_connect_raw_async","network_create_server","network_create_server_raw","network_create_socket","network_create_socket_ext","network_destroy","network_resolve","network_send_broadcast","network_send_packet","network_send_raw","network_send_udp","network_send_udp\
_raw","network_set_config","network_set_timeout","object_exists","object_get_mask","object_get_name","object_get_parent","object_get_persistent","object_get_physics","object_get_solid","object_get_sprite","object_get_visible","object_is_ancestor","object_set_mask","object_set_persistent","object_set_solid","object_set_sprite","object_set_visible","ord","os_check_permission","os_get_config","os_get_info","os_get_language","os_get_region","os_is_network_connected","os_is_paused","os_lock_orientati\
on","os_powersave_enable","os_request_permission","os_set_orientation_lock","parameter_count","parameter_string","part_emitter_burst","part_emitter_clear","part_emitter_create","part_emitter_delay","part_emitter_destroy","part_emitter_destroy_all","part_emitter_enable","part_emitter_exists","part_emitter_interval","part_emitter_region","part_emitter_relative","part_emitter_stream","part_particles_burst","part_particles_clear","part_particles_count","part_particles_create","part_particles_create_\
color","part_particles_create_colour","part_system_angle","part_system_automatic_draw","part_system_automatic_update","part_system_clear","part_system_color","part_system_colour","part_system_create","part_system_create_layer","part_system_depth","part_system_destroy","part_system_draw_order","part_system_drawit","part_system_exists","part_system_get_info","part_system_get_layer","part_system_global_space","part_system_layer","part_system_position","part_system_update","part_type_alpha1","part_t\
ype_alpha2","part_type_alpha3","part_type_blend","part_type_clear","part_type_color1","part_type_color2","part_type_color3","part_type_color_hsv","part_type_color_mix","part_type_color_rgb","part_type_colour1","part_type_colour2","part_type_colour3","part_type_colour_hsv","part_type_colour_mix","part_type_colour_rgb","part_type_create","part_type_death","part_type_destroy","part_type_direction","part_type_exists","part_type_gravity","part_type_life","part_type_orientation","part_type_scale","par\
t_type_shape","part_type_size","part_type_size_x","part_type_size_y","part_type_speed","part_type_sprite","part_type_step","part_type_subimage","particle_exists","particle_get_info","path_add","path_add_point","path_append","path_assign","path_change_point","path_clear_points","path_delete","path_delete_point","path_duplicate","path_end","path_exists","path_flip","path_get_closed","path_get_kind","path_get_length","path_get_name","path_get_number","path_get_point_speed","path_get_point_x","path_\
get_point_y","path_get_precision","path_get_speed","path_get_x","path_get_y","path_insert_point","path_mirror","path_rescale","path_reverse","path_rotate","path_set_closed","path_set_kind","path_set_precision","path_shift","path_start","physics_apply_angular_impulse","physics_apply_force","physics_apply_impulse","physics_apply_local_force","physics_apply_local_impulse","physics_apply_torque","physics_draw_debug","physics_fixture_add_point","physics_fixture_bind","physics_fixture_bind_ext","physi\
cs_fixture_create","physics_fixture_delete","physics_fixture_set_angular_damping","physics_fixture_set_awake","physics_fixture_set_box_shape","physics_fixture_set_chain_shape","physics_fixture_set_circle_shape","physics_fixture_set_collision_group","physics_fixture_set_density","physics_fixture_set_edge_shape","physics_fixture_set_friction","physics_fixture_set_kinematic","physics_fixture_set_linear_damping","physics_fixture_set_polygon_shape","physics_fixture_set_restitution","physics_fixture_s\
et_sensor","physics_get_density","physics_get_friction","physics_get_restitution","physics_joint_delete","physics_joint_distance_create","physics_joint_enable_motor","physics_joint_friction_create","physics_joint_gear_create","physics_joint_get_value","physics_joint_prismatic_create","physics_joint_pulley_create","physics_joint_revolute_create","physics_joint_rope_create","physics_joint_set_value","physics_joint_weld_create","physics_joint_wheel_create","physics_mass_properties","physics_particl\
e_count","physics_particle_create","physics_particle_delete","physics_particle_delete_region_box","physics_particle_delete_region_circle","physics_particle_delete_region_poly","physics_particle_draw","physics_particle_draw_ext","physics_particle_get_damping","physics_particle_get_data","physics_particle_get_data_particle","physics_particle_get_density","physics_particle_get_gravity_scale","physics_particle_get_group_flags","physics_particle_get_max_count","physics_particle_get_radius","physics_p\
article_group_add_point","physics_particle_group_begin","physics_particle_group_box","physics_particle_group_circle","physics_particle_group_count","physics_particle_group_delete","physics_particle_group_end","physics_particle_group_get_ang_vel","physics_particle_group_get_angle","physics_particle_group_get_centre_x","physics_particle_group_get_centre_y","physics_particle_group_get_data","physics_particle_group_get_inertia","physics_particle_group_get_mass","physics_particle_group_get_vel_x","ph\
ysics_particle_group_get_vel_y","physics_particle_group_get_x","physics_particle_group_get_y","physics_particle_group_join","physics_particle_group_polygon","physics_particle_set_category_flags","physics_particle_set_damping","physics_particle_set_density","physics_particle_set_flags","physics_particle_set_gravity_scale","physics_particle_set_group_flags","physics_particle_set_max_count","physics_particle_set_radius","physics_pause_enable","physics_remove_fixture","physics_set_density","physics_\
set_friction","physics_set_restitution","physics_test_overlap","physics_world_create","physics_world_draw_debug","physics_world_gravity","physics_world_update_iterations","physics_world_update_speed","place_empty","place_free","place_meeting","place_snapped","point_direction","point_distance","point_distance_3d","point_in_circle","point_in_rectangle","point_in_triangle","position_change","position_destroy","position_empty","position_meeting","power","ptr","radtodeg","random","random_get_seed","r\
andom_range","random_set_seed","randomise","randomize","real","rectangle_in_circle","rectangle_in_rectangle","rectangle_in_triangle","ref_create","rollback_chat","rollback_create_game","rollback_define_extra_network_latency","rollback_define_input","rollback_define_input_frame_delay","rollback_define_mock_input","rollback_define_player","rollback_display_events","rollback_get_info","rollback_get_input","rollback_get_player_prefs","rollback_join_game","rollback_leave_game","rollback_set_player_pr\
efs","rollback_start_game","rollback_sync_on_frame","rollback_use_late_join","rollback_use_manual_start","rollback_use_player_prefs","rollback_use_random_input","room_add","room_assign","room_duplicate","room_exists","room_get_camera","room_get_info","room_get_name","room_get_viewport","room_goto","room_goto_next","room_goto_previous","room_instance_add","room_instance_clear","room_next","room_previous","room_restart","room_set_camera","room_set_height","room_set_persistent","room_set_view_enabl\
ed","room_set_viewport","room_set_width","round","scheduler_resolution_get","scheduler_resolution_set","screen_save","screen_save_part","script_execute","script_execute_ext","script_exists","script_get_name","sequence_create","sequence_destroy","sequence_exists","sequence_get","sequence_get_objects","sequence_instance_override_object","sequence_keyframe_new","sequence_keyframedata_new","sequence_track_new","sha1_file","sha1_string_unicode","sha1_string_utf8","shader_current","shader_enable_corne\
r_id","shader_get_name","shader_get_sampler_index","shader_get_uniform","shader_is_compiled","shader_reset","shader_set","shader_set_uniform_f","shader_set_uniform_f_array","shader_set_uniform_f_buffer","shader_set_uniform_i","shader_set_uniform_i_array","shader_set_uniform_matrix","shader_set_uniform_matrix_array","shaders_are_supported","shop_leave_rating","show_debug_message","show_debug_message_ext","show_debug_overlay","show_error","show_message","show_message_async","show_question","show_q\
uestion_async","sign","sin","skeleton_animation_clear","skeleton_animation_get","skeleton_animation_get_duration","skeleton_animation_get_event_frames","skeleton_animation_get_ext","skeleton_animation_get_frame","skeleton_animation_get_frames","skeleton_animation_get_position","skeleton_animation_is_finished","skeleton_animation_is_looping","skeleton_animation_list","skeleton_animation_mix","skeleton_animation_set","skeleton_animation_set_ext","skeleton_animation_set_frame","skeleton_animation_s\
et_position","skeleton_attachment_create","skeleton_attachment_create_color","skeleton_attachment_create_colour","skeleton_attachment_destroy","skeleton_attachment_exists","skeleton_attachment_get","skeleton_attachment_replace","skeleton_attachment_replace_color","skeleton_attachment_replace_colour","skeleton_attachment_set","skeleton_bone_data_get","skeleton_bone_data_set","skeleton_bone_list","skeleton_bone_state_get","skeleton_bone_state_set","skeleton_collision_draw_set","skeleton_find_slot",
"skeleton_get_bounds","skeleton_get_minmax","skeleton_get_num_bounds","skeleton_skin_create","skeleton_skin_get","skeleton_skin_list","skeleton_skin_set","skeleton_slot_alpha_get","skeleton_slot_color_get","skeleton_slot_color_set","skeleton_slot_colour_get","skeleton_slot_colour_set","skeleton_slot_data","skeleton_slot_data_instance","skeleton_slot_list","sprite_add","sprite_add_ext","sprite_add_from_surface","sprite_assign","sprite_collision_mask","sprite_create_from_surface","sprite_delete","\
sprite_duplicate","sprite_exists","sprite_flush","sprite_flush_multi","sprite_get_bbox_bottom","sprite_get_bbox_left","sprite_get_bbox_mode","sprite_get_bbox_right","sprite_get_bbox_top","sprite_get_height","sprite_get_info","sprite_get_name","sprite_get_nineslice","sprite_get_number","sprite_get_speed","sprite_get_speed_type","sprite_get_texture","sprite_get_tpe","sprite_get_uvs","sprite_get_width","sprite_get_xoffset","sprite_get_yoffset","sprite_merge","sprite_nineslice_create","sprite_prefet\
ch","sprite_prefetch_multi","sprite_replace","sprite_save","sprite_save_strip","sprite_set_alpha_from_sprite","sprite_set_bbox","sprite_set_bbox_mode","sprite_set_cache_size","sprite_set_cache_size_ext","sprite_set_nineslice","sprite_set_offset","sprite_set_speed","sqr","sqrt","static_get","static_set","string","string_byte_at","string_byte_length","string_char_at","string_concat","string_concat_ext","string_copy","string_count","string_delete","string_digits","string_ends_with","string_ext","st\
ring_foreach","string_format","string_hash_to_newline","string_height","string_height_ext","string_insert","string_join","string_join_ext","string_last_pos","string_last_pos_ext","string_length","string_letters","string_lettersdigits","string_lower","string_ord_at","string_pos","string_pos_ext","string_repeat","string_replace","string_replace_all","string_set_byte_at","string_split","string_split_ext","string_starts_with","string_trim","string_trim_end","string_trim_start","string_upper","string\
_width","string_width_ext","struct_exists","struct_foreach","struct_get","struct_get_from_hash","struct_get_names","struct_names_count","struct_remove","struct_set","struct_set_from_hash","surface_copy","surface_copy_part","surface_create","surface_create_ext","surface_depth_disable","surface_exists","surface_format_is_supported","surface_free","surface_get_depth_disable","surface_get_format","surface_get_height","surface_get_target","surface_get_target_ext","surface_get_texture","surface_get_wi\
dth","surface_getpixel","surface_getpixel_ext","surface_reset_target","surface_resize","surface_save","surface_save_part","surface_set_target","surface_set_target_ext","tag_get_asset_ids","tag_get_assets","tan","texture_debug_messages","texture_flush","texture_get_height","texture_get_texel_height","texture_get_texel_width","texture_get_uvs","texture_get_width","texture_global_scale","texture_is_ready","texture_prefetch","texture_set_stage","texturegroup_get_fonts","texturegroup_get_names","text\
uregroup_get_sprites","texturegroup_get_status","texturegroup_get_textures","texturegroup_get_tilesets","texturegroup_load","texturegroup_set_mode","texturegroup_unload","tile_get_empty","tile_get_flip","tile_get_index","tile_get_mirror","tile_get_rotate","tile_set_empty","tile_set_flip","tile_set_index","tile_set_mirror","tile_set_rotate","tilemap_clear","tilemap_get","tilemap_get_at_pixel","tilemap_get_cell_x_at_pixel","tilemap_get_cell_y_at_pixel","tilemap_get_frame","tilemap_get_global_mask",
"tilemap_get_height","tilemap_get_mask","tilemap_get_tile_height","tilemap_get_tile_width","tilemap_get_tileset","tilemap_get_width","tilemap_get_x","tilemap_get_y","tilemap_set","tilemap_set_at_pixel","tilemap_set_global_mask","tilemap_set_height","tilemap_set_mask","tilemap_set_width","tilemap_tileset","tilemap_x","tilemap_y","tileset_get_info","tileset_get_name","tileset_get_texture","tileset_get_uvs","time_bpm_to_seconds","time_seconds_to_bpm","time_source_create","time_source_destroy","time\
_source_exists","time_source_get_children","time_source_get_parent","time_source_get_period","time_source_get_reps_completed","time_source_get_reps_remaining","time_source_get_state","time_source_get_time_remaining","time_source_get_units","time_source_pause","time_source_reconfigure","time_source_reset","time_source_resume","time_source_start","time_source_stop","timeline_add","timeline_clear","timeline_delete","timeline_exists","timeline_get_name","timeline_max_moment","timeline_moment_add_scr\
ipt","timeline_moment_clear","timeline_size","typeof","url_get_domain","url_open","url_open_ext","url_open_full","uwp_device_touchscreen_available","uwp_livetile_badge_clear","uwp_livetile_badge_notification","uwp_livetile_notification_begin","uwp_livetile_notification_end","uwp_livetile_notification_expiry","uwp_livetile_notification_image_add","uwp_livetile_notification_secondary_begin","uwp_livetile_notification_tag","uwp_livetile_notification_template_add","uwp_livetile_notification_text_add",
"uwp_livetile_queue_enable","uwp_livetile_tile_clear","uwp_secondarytile_badge_clear","uwp_secondarytile_badge_notification","uwp_secondarytile_delete","uwp_secondarytile_pin","uwp_secondarytile_tile_clear","variable_clone","variable_get_hash","variable_global_exists","variable_global_get","variable_global_set","variable_instance_exists","variable_instance_get","variable_instance_get_names","variable_instance_names_count","variable_instance_set","variable_struct_exists","variable_struct_get","va\
riable_struct_get_names","variable_struct_names_count","variable_struct_remove","variable_struct_set","vertex_argb","vertex_begin","vertex_color","vertex_colour","vertex_create_buffer","vertex_create_buffer_ext","vertex_create_buffer_from_buffer","vertex_create_buffer_from_buffer_ext","vertex_delete_buffer","vertex_end","vertex_float1","vertex_float2","vertex_float3","vertex_float4","vertex_format_add_color","vertex_format_add_colour","vertex_format_add_custom","vertex_format_add_normal","vertex\
_format_add_position","vertex_format_add_position_3d","vertex_format_add_texcoord","vertex_format_begin","vertex_format_delete","vertex_format_end","vertex_format_get_info","vertex_freeze","vertex_get_buffer_size","vertex_get_number","vertex_normal","vertex_position","vertex_position_3d","vertex_submit","vertex_submit_ext","vertex_texcoord","vertex_ubyte4","vertex_update_buffer_from_buffer","vertex_update_buffer_from_vertex","video_close","video_draw","video_enable_loop","video_get_duration","vi\
deo_get_format","video_get_position","video_get_status","video_get_volume","video_is_looping","video_open","video_pause","video_resume","video_seek_to","video_set_volume","view_get_camera","view_get_hport","view_get_surface_id","view_get_visible","view_get_wport","view_get_xport","view_get_yport","view_set_camera","view_set_hport","view_set_surface_id","view_set_visible","view_set_wport","view_set_xport","view_set_yport","virtual_key_add","virtual_key_delete","virtual_key_hide","virtual_key_show",
"wallpaper_set_config","wallpaper_set_subscriptions","weak_ref_alive","weak_ref_any_alive","weak_ref_create","window_center","window_device","window_enable_borderless_fullscreen","window_get_borderless_fullscreen","window_get_caption","window_get_color","window_get_colour","window_get_cursor","window_get_fullscreen","window_get_height","window_get_showborder","window_get_visible_rects","window_get_width","window_get_x","window_get_y","window_handle","window_has_focus","window_mouse_get_delta_x",
"window_mouse_get_delta_y","window_mouse_get_locked","window_mouse_get_x","window_mouse_get_y","window_mouse_set","window_mouse_set_locked","window_set_caption","window_set_color","window_set_colour","window_set_cursor","window_set_fullscreen","window_set_max_height","window_set_max_width","window_set_min_height","window_set_min_width","window_set_position","window_set_rectangle","window_set_showborder","window_set_size","window_view_mouse_get_x","window_view_mouse_get_y","window_views_mouse_get\
_x","window_views_mouse_get_y","winphone_tile_background_color","winphone_tile_background_colour","zip_add_file","zip_create","zip_save","zip_unzip","zip_unzip_async"],symbol:["AudioEffect","AudioEffectType","AudioLFOType","GM_build_date","GM_build_type","GM_is_sandboxed","GM_project_filename","GM_runtime_version","GM_version","NaN","_GMFILE_","_GMFUNCTION_","_GMLINE_","alignmentH","alignmentV","all","animcurvetype_bezier","animcurvetype_catmullrom","animcurvetype_linear","asset_animationcurve",
"asset_font","asset_object","asset_path","asset_room","asset_script","asset_sequence","asset_shader","asset_sound","asset_sprite","asset_tiles","asset_timeline","asset_unknown","audio_3D","audio_bus_main","audio_falloff_exponent_distance","audio_falloff_exponent_distance_clamped","audio_falloff_exponent_distance_scaled","audio_falloff_inverse_distance","audio_falloff_inverse_distance_clamped","audio_falloff_inverse_distance_scaled","audio_falloff_linear_distance","audio_falloff_linear_distance_c\
lamped","audio_falloff_none","audio_mono","audio_stereo","bboxkind_diamond","bboxkind_ellipse","bboxkind_precise","bboxkind_rectangular","bboxmode_automatic","bboxmode_fullimage","bboxmode_manual","bm_add","bm_dest_alpha","bm_dest_color","bm_dest_colour","bm_inv_dest_alpha","bm_inv_dest_color","bm_inv_dest_colour","bm_inv_src_alpha","bm_inv_src_color","bm_inv_src_colour","bm_max","bm_normal","bm_one","bm_src_alpha","bm_src_alpha_sat","bm_src_color","bm_src_colour","bm_subtract","bm_zero","browse\
r_chrome","browser_edge","browser_firefox","browser_ie","browser_ie_mobile","browser_not_a_browser","browser_opera","browser_safari","browser_safari_mobile","browser_tizen","browser_unknown","browser_windows_store","buffer_bool","buffer_f16","buffer_f32","buffer_f64","buffer_fast","buffer_fixed","buffer_grow","buffer_s16","buffer_s32","buffer_s8","buffer_seek_end","buffer_seek_relative","buffer_seek_start","buffer_string","buffer_text","buffer_u16","buffer_u32","buffer_u64","buffer_u8","buffer_v\
buffer","buffer_wrap","c_aqua","c_black","c_blue","c_dkgray","c_dkgrey","c_fuchsia","c_gray","c_green","c_grey","c_lime","c_ltgray","c_ltgrey","c_maroon","c_navy","c_olive","c_orange","c_purple","c_red","c_silver","c_teal","c_white","c_yellow","cache_directory","characterSpacing","cmpfunc_always","cmpfunc_equal","cmpfunc_greater","cmpfunc_greaterequal","cmpfunc_less","cmpfunc_lessequal","cmpfunc_never","cmpfunc_notequal","coreColor","coreColour","cr_appstart","cr_arrow","cr_beam","cr_cross","cr_\
default","cr_drag","cr_handpoint","cr_hourglass","cr_none","cr_size_all","cr_size_nesw","cr_size_ns","cr_size_nwse","cr_size_we","cr_uparrow","cull_clockwise","cull_counterclockwise","cull_noculling","device_emulator","device_ios_ipad","device_ios_ipad_retina","device_ios_iphone","device_ios_iphone5","device_ios_iphone6","device_ios_iphone6plus","device_ios_iphone_retina","device_ios_unknown","device_tablet","display_landscape","display_landscape_flipped","display_portrait","display_portrait_fli\
pped","dll_cdecl","dll_stdcall","dropShadowEnabled","dropShadowEnabled","ds_type_grid","ds_type_list","ds_type_map","ds_type_priority","ds_type_queue","ds_type_stack","ef_cloud","ef_ellipse","ef_explosion","ef_firework","ef_flare","ef_rain","ef_ring","ef_smoke","ef_smokeup","ef_snow","ef_spark","ef_star","effectsEnabled","effectsEnabled","ev_alarm","ev_animation_end","ev_animation_event","ev_animation_update","ev_async_audio_playback","ev_async_audio_playback_ended","ev_async_audio_recording","e\
v_async_dialog","ev_async_push_notification","ev_async_save_load","ev_async_save_load","ev_async_social","ev_async_system_event","ev_async_web","ev_async_web_cloud","ev_async_web_iap","ev_async_web_image_load","ev_async_web_networking","ev_async_web_steam","ev_audio_playback","ev_audio_playback_ended","ev_audio_recording","ev_boundary","ev_boundary_view0","ev_boundary_view1","ev_boundary_view2","ev_boundary_view3","ev_boundary_view4","ev_boundary_view5","ev_boundary_view6","ev_boundary_view7","e\
v_broadcast_message","ev_cleanup","ev_collision","ev_create","ev_destroy","ev_dialog_async","ev_draw","ev_draw_begin","ev_draw_end","ev_draw_normal","ev_draw_post","ev_draw_pre","ev_end_of_path","ev_game_end","ev_game_start","ev_gesture","ev_gesture_double_tap","ev_gesture_drag_end","ev_gesture_drag_start","ev_gesture_dragging","ev_gesture_flick","ev_gesture_pinch_end","ev_gesture_pinch_in","ev_gesture_pinch_out","ev_gesture_pinch_start","ev_gesture_rotate_end","ev_gesture_rotate_start","ev_gest\
ure_rotating","ev_gesture_tap","ev_global_gesture_double_tap","ev_global_gesture_drag_end","ev_global_gesture_drag_start","ev_global_gesture_dragging","ev_global_gesture_flick","ev_global_gesture_pinch_end","ev_global_gesture_pinch_in","ev_global_gesture_pinch_out","ev_global_gesture_pinch_start","ev_global_gesture_rotate_end","ev_global_gesture_rotate_start","ev_global_gesture_rotating","ev_global_gesture_tap","ev_global_left_button","ev_global_left_press","ev_global_left_release","ev_global_mi\
ddle_button","ev_global_middle_press","ev_global_middle_release","ev_global_right_button","ev_global_right_press","ev_global_right_release","ev_gui","ev_gui_begin","ev_gui_end","ev_joystick1_button1","ev_joystick1_button2","ev_joystick1_button3","ev_joystick1_button4","ev_joystick1_button5","ev_joystick1_button6","ev_joystick1_button7","ev_joystick1_button8","ev_joystick1_down","ev_joystick1_left","ev_joystick1_right","ev_joystick1_up","ev_joystick2_button1","ev_joystick2_button2","ev_joystick2_\
button3","ev_joystick2_button4","ev_joystick2_button5","ev_joystick2_button6","ev_joystick2_button7","ev_joystick2_button8","ev_joystick2_down","ev_joystick2_left","ev_joystick2_right","ev_joystick2_up","ev_keyboard","ev_keypress","ev_keyrelease","ev_left_button","ev_left_press","ev_left_release","ev_middle_button","ev_middle_press","ev_middle_release","ev_mouse","ev_mouse_enter","ev_mouse_leave","ev_mouse_wheel_down","ev_mouse_wheel_up","ev_no_button","ev_no_more_health","ev_no_more_lives","ev_\
other","ev_outside","ev_outside_view0","ev_outside_view1","ev_outside_view2","ev_outside_view3","ev_outside_view4","ev_outside_view5","ev_outside_view6","ev_outside_view7","ev_pre_create","ev_push_notification","ev_right_button","ev_right_press","ev_right_release","ev_room_end","ev_room_start","ev_social","ev_step","ev_step_begin","ev_step_end","ev_step_normal","ev_system_event","ev_trigger","ev_user0","ev_user1","ev_user10","ev_user11","ev_user12","ev_user13","ev_user14","ev_user15","ev_user2",
"ev_user3","ev_user4","ev_user5","ev_user6","ev_user7","ev_user8","ev_user9","ev_web_async","ev_web_cloud","ev_web_iap","ev_web_image_load","ev_web_networking","ev_web_sound_load","ev_web_steam","fa_archive","fa_bottom","fa_center","fa_directory","fa_hidden","fa_left","fa_middle","fa_none","fa_readonly","fa_right","fa_sysfile","fa_top","fa_volumeid","false","frameSizeX","frameSizeY","gamespeed_fps","gamespeed_microseconds","global","glowColor","glowColour","glowEnabled","glowEnabled","glowEnd","\
glowStart","gp_axis_acceleration_x","gp_axis_acceleration_y","gp_axis_acceleration_z","gp_axis_angular_velocity_x","gp_axis_angular_velocity_y","gp_axis_angular_velocity_z","gp_axis_orientation_w","gp_axis_orientation_x","gp_axis_orientation_y","gp_axis_orientation_z","gp_axislh","gp_axislv","gp_axisrh","gp_axisrv","gp_face1","gp_face2","gp_face3","gp_face4","gp_padd","gp_padl","gp_padr","gp_padu","gp_select","gp_shoulderl","gp_shoulderlb","gp_shoulderr","gp_shoulderrb","gp_start","gp_stickl","g\
p_stickr","iap_available","iap_canceled","iap_ev_consume","iap_ev_product","iap_ev_purchase","iap_ev_restore","iap_ev_storeload","iap_failed","iap_purchased","iap_refunded","iap_status_available","iap_status_loading","iap_status_processing","iap_status_restoring","iap_status_unavailable","iap_status_uninitialised","iap_storeload_failed","iap_storeload_ok","iap_unavailable","infinity","kbv_autocapitalize_characters","kbv_autocapitalize_none","kbv_autocapitalize_sentences","kbv_autocapitalize_word\
s","kbv_returnkey_continue","kbv_returnkey_default","kbv_returnkey_done","kbv_returnkey_emergency","kbv_returnkey_go","kbv_returnkey_google","kbv_returnkey_join","kbv_returnkey_next","kbv_returnkey_route","kbv_returnkey_search","kbv_returnkey_send","kbv_returnkey_yahoo","kbv_type_ascii","kbv_type_default","kbv_type_email","kbv_type_numbers","kbv_type_phone","kbv_type_phone_name","kbv_type_url","layerelementtype_background","layerelementtype_instance","layerelementtype_oldtilemap","layerelementty\
pe_particlesystem","layerelementtype_sequence","layerelementtype_sprite","layerelementtype_tile","layerelementtype_tilemap","layerelementtype_undefined","leaderboard_type_number","leaderboard_type_time_mins_secs","lighttype_dir","lighttype_point","lineSpacing","m_axisx","m_axisx_gui","m_axisy","m_axisy_gui","m_scroll_down","m_scroll_up","matrix_projection","matrix_view","matrix_world","mb_any","mb_left","mb_middle","mb_none","mb_right","mb_side1","mb_side2","mip_markedonly","mip_off","mip_on","n\
etwork_config_avoid_time_wait","network_config_connect_timeout","network_config_disable_multicast","network_config_disable_reliable_udp","network_config_enable_multicast","network_config_enable_reliable_udp","network_config_use_non_blocking_socket","network_config_websocket_protocol","network_connect_active","network_connect_blocking","network_connect_nonblocking","network_connect_none","network_connect_passive","network_send_binary","network_send_text","network_socket_bluetooth","network_socket\
_tcp","network_socket_udp","network_socket_ws","network_socket_wss","network_type_connect","network_type_data","network_type_disconnect","network_type_down","network_type_non_blocking_connect","network_type_up","network_type_up_failed","nineslice_blank","nineslice_bottom","nineslice_center","nineslice_centre","nineslice_hide","nineslice_left","nineslice_mirror","nineslice_repeat","nineslice_right","nineslice_stretch","nineslice_top","noone","of_challenge_lose","of_challenge_tie","of_challenge_wi\
n","os_android","os_gdk","os_gxgames","os_ios","os_linux","os_macosx","os_operagx","os_permission_denied","os_permission_denied_dont_request","os_permission_granted","os_ps3","os_ps4","os_ps5","os_psvita","os_switch","os_tvos","os_unknown","os_uwp","os_win8native","os_windows","os_winphone","os_xboxone","os_xboxseriesxs","other","outlineColor","outlineColour","outlineDist","outlineEnabled","outlineEnabled","paragraphSpacing","path_action_continue","path_action_restart","path_action_reverse","pat\
h_action_stop","phy_debug_render_aabb","phy_debug_render_collision_pairs","phy_debug_render_coms","phy_debug_render_core_shapes","phy_debug_render_joints","phy_debug_render_obb","phy_debug_render_shapes","phy_joint_anchor_1_x","phy_joint_anchor_1_y","phy_joint_anchor_2_x","phy_joint_anchor_2_y","phy_joint_angle","phy_joint_angle_limits","phy_joint_damping_ratio","phy_joint_frequency","phy_joint_length_1","phy_joint_length_2","phy_joint_lower_angle_limit","phy_joint_max_force","phy_joint_max_leng\
th","phy_joint_max_motor_force","phy_joint_max_motor_torque","phy_joint_max_torque","phy_joint_motor_force","phy_joint_motor_speed","phy_joint_motor_torque","phy_joint_reaction_force_x","phy_joint_reaction_force_y","phy_joint_reaction_torque","phy_joint_speed","phy_joint_translation","phy_joint_upper_angle_limit","phy_particle_data_flag_category","phy_particle_data_flag_color","phy_particle_data_flag_colour","phy_particle_data_flag_position","phy_particle_data_flag_typeflags","phy_particle_data_\
flag_velocity","phy_particle_flag_colormixing","phy_particle_flag_colourmixing","phy_particle_flag_elastic","phy_particle_flag_powder","phy_particle_flag_spring","phy_particle_flag_tensile","phy_particle_flag_viscous","phy_particle_flag_wall","phy_particle_flag_water","phy_particle_flag_zombie","phy_particle_group_flag_rigid","phy_particle_group_flag_solid","pi","pointer_invalid","pointer_null","pr_linelist","pr_linestrip","pr_pointlist","pr_trianglefan","pr_trianglelist","pr_trianglestrip","ps_\
distr_gaussian","ps_distr_invgaussian","ps_distr_linear","ps_mode_burst","ps_mode_stream","ps_shape_diamond","ps_shape_ellipse","ps_shape_line","ps_shape_rectangle","pt_shape_circle","pt_shape_cloud","pt_shape_disk","pt_shape_explosion","pt_shape_flare","pt_shape_line","pt_shape_pixel","pt_shape_ring","pt_shape_smoke","pt_shape_snow","pt_shape_spark","pt_shape_sphere","pt_shape_square","pt_shape_star","rollback_chat_message","rollback_connect_error","rollback_connect_info","rollback_connected_to\
_peer","rollback_connection_rejected","rollback_disconnected_from_peer","rollback_end_game","rollback_game_full","rollback_game_info","rollback_game_interrupted","rollback_game_resumed","rollback_high_latency","rollback_player_prefs","rollback_protocol_rejected","rollback_synchronized_with_peer","rollback_synchronizing_with_peer","self","seqaudiokey_loop","seqaudiokey_oneshot","seqdir_left","seqdir_right","seqinterpolation_assign","seqinterpolation_lerp","seqplay_loop","seqplay_oneshot","seqplay\
_pingpong","seqtextkey_bottom","seqtextkey_center","seqtextkey_justify","seqtextkey_left","seqtextkey_middle","seqtextkey_right","seqtextkey_top","seqtracktype_audio","seqtracktype_bool","seqtracktype_clipmask","seqtracktype_clipmask_mask","seqtracktype_clipmask_subject","seqtracktype_color","seqtracktype_colour","seqtracktype_empty","seqtracktype_graphic","seqtracktype_group","seqtracktype_instance","seqtracktype_message","seqtracktype_moment","seqtracktype_particlesystem","seqtracktype_real","\
seqtracktype_sequence","seqtracktype_spriteframes","seqtracktype_string","seqtracktype_text","shadowColor","shadowColour","shadowOffsetX","shadowOffsetY","shadowSoftness","sprite_add_ext_error_cancelled","sprite_add_ext_error_decompressfailed","sprite_add_ext_error_loadfailed","sprite_add_ext_error_setupfailed","sprite_add_ext_error_spritenotfound","sprite_add_ext_error_unknown","spritespeed_framespergameframe","spritespeed_framespersecond","surface_r16float","surface_r32float","surface_r8unorm",
"surface_rg8unorm","surface_rgba16float","surface_rgba32float","surface_rgba4unorm","surface_rgba8unorm","texturegroup_status_fetched","texturegroup_status_loaded","texturegroup_status_loading","texturegroup_status_unloaded","tf_anisotropic","tf_linear","tf_point","thickness","tile_flip","tile_index_mask","tile_mirror","tile_rotate","time_source_expire_after","time_source_expire_nearest","time_source_game","time_source_global","time_source_state_active","time_source_state_initial","time_source_s\
tate_paused","time_source_state_stopped","time_source_units_frames","time_source_units_seconds","timezone_local","timezone_utc","tm_countvsyncs","tm_sleep","tm_systemtiming","true","ty_real","ty_string","undefined","vertex_type_color","vertex_type_colour","vertex_type_float1","vertex_type_float2","vertex_type_float3","vertex_type_float4","vertex_type_ubyte4","vertex_usage_binormal","vertex_usage_blendindices","vertex_usage_blendweight","vertex_usage_color","vertex_usage_colour","vertex_usage_dep\
th","vertex_usage_fog","vertex_usage_normal","vertex_usage_position","vertex_usage_psize","vertex_usage_sample","vertex_usage_tangent","vertex_usage_texcoord","video_format_rgba","video_format_yuv","video_status_closed","video_status_paused","video_status_playing","video_status_preparing","vk_add","vk_alt","vk_anykey","vk_backspace","vk_control","vk_decimal","vk_delete","vk_divide","vk_down","vk_end","vk_enter","vk_escape","vk_f1","vk_f10","vk_f11","vk_f12","vk_f2","vk_f3","vk_f4","vk_f5","vk_f6",
"vk_f7","vk_f8","vk_f9","vk_home","vk_insert","vk_lalt","vk_lcontrol","vk_left","vk_lshift","vk_multiply","vk_nokey","vk_numpad0","vk_numpad1","vk_numpad2","vk_numpad3","vk_numpad4","vk_numpad5","vk_numpad6","vk_numpad7","vk_numpad8","vk_numpad9","vk_pagedown","vk_pageup","vk_pause","vk_printscreen","vk_ralt","vk_rcontrol","vk_return","vk_right","vk_rshift","vk_shift","vk_space","vk_subtract","vk_tab","vk_up","wallpaper_config","wallpaper_subscription_data","wrap"],"variable.language":["alarm","\
application_surface","argument","argument0","argument1","argument2","argument3","argument4","argument5","argument6","argument7","argument8","argument9","argument10","argument11","argument12","argument13","argument14","argument15","argument_count","async_load","background_color","background_colour","background_showcolor","background_showcolour","bbox_bottom","bbox_left","bbox_right","bbox_top","browser_height","browser_width","colour?ColourTrack","current_day","current_hour","current_minute","cur\
rent_month","current_second","current_time","current_weekday","current_year","cursor_sprite","debug_mode","delta_time","depth","direction","display_aa","drawn_by_sequence","event_action","event_data","event_number","event_object","event_type","font_texture_page_size","fps","fps_real","friction","game_display_name","game_id","game_project_name","game_save_id","gravity","gravity_direction","health","hspeed","iap_data","id","image_alpha","image_angle","image_blend","image_index","image_number","ima\
ge_speed","image_xscale","image_yscale","in_collision_tree","in_sequence","instance_count","instance_id","keyboard_key","keyboard_lastchar","keyboard_lastkey","keyboard_string","layer","lives","longMessage","managed","mask_index","message","mouse_button","mouse_lastbutton","mouse_x","mouse_y","object_index","os_browser","os_device","os_type","os_version","path_endaction","path_index","path_orientation","path_position","path_positionprevious","path_scale","path_speed","persistent","phy_active","p\
hy_angular_damping","phy_angular_velocity","phy_bullet","phy_col_normal_x","phy_col_normal_y","phy_collision_points","phy_collision_x","phy_collision_y","phy_com_x","phy_com_y","phy_dynamic","phy_fixed_rotation","phy_inertia","phy_kinematic","phy_linear_damping","phy_linear_velocity_x","phy_linear_velocity_y","phy_mass","phy_position_x","phy_position_xprevious","phy_position_y","phy_position_yprevious","phy_rotation","phy_sleeping","phy_speed","phy_speed_x","phy_speed_y","player_avatar_sprite","\
player_avatar_url","player_id","player_local","player_type","player_user_id","program_directory","rollback_api_server","rollback_confirmed_frame","rollback_current_frame","rollback_event_id","rollback_event_param","rollback_game_running","room","room_first","room_height","room_last","room_persistent","room_speed","room_width","score","script","sequence_instance","solid","speed","sprite_height","sprite_index","sprite_width","sprite_xoffset","sprite_yoffset","stacktrace","temp_directory","timeline\
_index","timeline_loop","timeline_position","timeline_running","timeline_speed","view_camera","view_current","view_enabled","view_hport","view_surface_id","view_visible","view_wport","view_xport","view_yport","visible","vspeed","webgl_enabled","working_directory","x","xprevious","xstart","y","yprevious","ystart"]},contains:[hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,hljs.C_NUMBER_MODE]}}function golo(hljs){return{name:"Golo",keywords:{keyword:[
"println","readln","print","import","module","function","local","return","let","var","while","for","foreach","times","in","case","when","match","with","break","continue","augment","augmentation","each","find","filter","reduce","if","then","else","otherwise","try","catch","finally","raise","throw","orIfNull","DynamicObject|10","DynamicVariable","struct","Observable","map","set","vector","list","array"],literal:["true","false","null"]},contains:[hljs.HASH_COMMENT_MODE,hljs.QUOTE_STRING_MODE,hljs.C_NUMBER_MODE,
{className:"meta",begin:"@[A-Za-z]+"}]}}function gradle(hljs){return{name:"Gradle",case_insensitive:!0,keywords:["task","project","allprojects","subprojects","artifacts","buildscript","configurations","dependencies","repositories","sourceSets","description","delete","from","into","include","exclude","source","classpath","destinationDir","includes","options","sourceCompatibility","targetCompatibility","group","flatDir","doLast","doFirst","flatten","todir","fromdir","ant","def","abstract","break",
"case","catch","continue","default","do","else","extends","final","finally","for","if","implements","instanceof","native","new","private","protected","public","return","static","switch","synchronized","throw","throws","transient","try","volatile","while","strictfp","package","import","false","null","super","this","true","antlrtask","checkstyle","codenarc","copy","boolean","byte","char","class","double","float","int","interface","long","short","void","compile","runTime","file","fileTree","abs","a\
ny","append","asList","asWritable","call","collect","compareTo","count","div","dump","each","eachByte","eachFile","eachLine","every","find","findAll","flatten","getAt","getErr","getIn","getOut","getText","grep","immutable","inject","inspect","intersect","invokeMethods","isCase","join","leftShift","minus","multiply","newInputStream","newOutputStream","newPrintWriter","newReader","newWriter","next","plus","pop","power","previous","print","println","push","putAt","read","readBytes","readLines","rev\
erse","reverseEach","round","size","sort","splitEachLine","step","subMap","times","toInteger","toList","tokenize","upto","waitForOrKill","withPrintWriter","withReader","withStream","withWriter","withWriterAppend","write","writeLine"],contains:[hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,hljs.NUMBER_MODE,hljs.REGEXP_MODE]}}function variants(variants2,obj={}){return obj.variants=variants2,obj}function groovy(hljs){const regex=hljs.regex,IDENT_RE2="\
[A-Za-z0-9_$]+",COMMENT=variants([hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]})]),REGEXP2={className:"regexp",begin:/~?\/[^\/\n]+\//,contains:[hljs.BACKSLASH_ESCAPE]},NUMBER=variants([hljs.BINARY_NUMBER_MODE,hljs.C_NUMBER_MODE]),STRING=variants([{begin:/"""/,end:/"""/},{begin:/'''/,end:/'''/},{begin:"\\$/",end:"/\\$",relevance:10},hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE],
{className:"string"}),CLASS_DEFINITION={match:[/(class|interface|trait|enum|record|extends|implements)/,/\s+/,hljs.UNDERSCORE_IDENT_RE],scope:{1:"keyword",3:"title.class"}};return{name:"Groovy",keywords:{"variable.language":"this super",literal:"true false null",type:["byte","short","char","int","long","boolean","float","double","void"],keyword:["def","as","in","assert","trait","abstract","static","volatile","transient","public","private","protected","synchronized","final","class","interface","e\
num","if","else","for","while","switch","case","break","default","continue","throw","throws","try","catch","finally","implements","extends","new","import","package","return","instanceof","var"]},contains:[hljs.SHEBANG({binary:"groovy",relevance:10}),COMMENT,STRING,REGEXP2,NUMBER,CLASS_DEFINITION,{className:"meta",begin:"@[A-Za-z]+",relevance:0},{className:"attr",begin:IDENT_RE2+"[ 	]*:",relevance:0},{begin:/\?/,end:/:/,relevance:0,contains:[COMMENT,STRING,REGEXP2,NUMBER,"self"]},{className:"symb\
ol",begin:"^[ 	]*"+regex.lookahead(IDENT_RE2+":"),excludeBegin:!0,end:IDENT_RE2+":",relevance:0}],illegal:/#|<\//}}function haml(hljs){return{name:"HAML",case_insensitive:!0,contains:[{className:"meta",begin:"^!!!( (5|1\\.1|Strict|Frameset|Basic|Mobile|RDFa|XML\\b.*))?$",relevance:10},hljs.COMMENT("^\\s*(!=#|=#|-#|/).*$",null,{relevance:0}),{begin:"^\\s*(-|=|!=)(?!#)",end:/$/,subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0},{className:"tag",begin:"^\\s*%",contains:[{className:"selector-tag",begin:"\
\\w+"},{className:"selector-id",begin:"#[\\w-]+"},{className:"selector-class",begin:"\\.[\\w-]+"},{begin:/\{\s*/,end:/\s*\}/,contains:[{begin:":\\w+\\s*=>",end:",\\s+",returnBegin:!0,endsWithParent:!0,contains:[{className:"attr",begin:":\\w+"},hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,{begin:"\\w+",relevance:0}]}]},{begin:"\\(\\s*",end:"\\s*\\)",excludeEnd:!0,contains:[{begin:"\\w+\\s*=",end:"\\s+",returnBegin:!0,endsWithParent:!0,contains:[{className:"attr",begin:"\\w+",relevance:0},hljs.APOS_STRING_MODE,
hljs.QUOTE_STRING_MODE,{begin:"\\w+",relevance:0}]}]}]},{begin:"^\\s*[=~]\\s*"},{begin:/#\{/,end:/\}/,subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0}]}}function handlebars(hljs){const regex=hljs.regex,BUILT_INS2={$pattern:/[\w.\/]+/,built_in:["action","bindattr","collection","component","concat","debugger","each","each-in","get","hash","if","in","input","link-to","loc","log","lookup","mut","outlet","partial","query-params","render","template","textarea","unbound","unless","view","with","yield"]},
LITERALS2={$pattern:/[\w.\/]+/,literal:["true","false","undefined","null"]},DOUBLE_QUOTED_ID_REGEX=/""|"[^"]+"/,SINGLE_QUOTED_ID_REGEX=/''|'[^']+'/,BRACKET_QUOTED_ID_REGEX=/\[\]|\[[^\]]+\]/,PLAIN_ID_REGEX=/[^\s!"#%&'()*+,.\/;<=>@\[\\\]^`{|}~]+/,PATH_DELIMITER_REGEX=/(\.|\/)/,ANY_ID=regex.either(DOUBLE_QUOTED_ID_REGEX,SINGLE_QUOTED_ID_REGEX,BRACKET_QUOTED_ID_REGEX,PLAIN_ID_REGEX),IDENTIFIER_REGEX=regex.concat(regex.optional(/\.|\.\/|\//),ANY_ID,regex.anyNumberOfTimes(regex.concat(PATH_DELIMITER_REGEX,
ANY_ID))),HASH_PARAM_REGEX=regex.concat("(",BRACKET_QUOTED_ID_REGEX,"|",PLAIN_ID_REGEX,")(?==)"),HELPER_NAME_OR_PATH_EXPRESSION={begin:IDENTIFIER_REGEX},HELPER_PARAMETER=hljs.inherit(HELPER_NAME_OR_PATH_EXPRESSION,{keywords:LITERALS2}),SUB_EXPRESSION={begin:/\(/,end:/\)/},HASH={className:"attr",begin:HASH_PARAM_REGEX,relevance:0,starts:{begin:/=/,end:/=/,starts:{contains:[hljs.NUMBER_MODE,hljs.QUOTE_STRING_MODE,hljs.APOS_STRING_MODE,HELPER_PARAMETER,SUB_EXPRESSION]}}},BLOCK_PARAMS={begin:/as\s+\|/,
keywords:{keyword:"as"},end:/\|/,contains:[{begin:/\w+/}]},HELPER_PARAMETERS={contains:[hljs.NUMBER_MODE,hljs.QUOTE_STRING_MODE,hljs.APOS_STRING_MODE,BLOCK_PARAMS,HASH,HELPER_PARAMETER,SUB_EXPRESSION],returnEnd:!0},SUB_EXPRESSION_CONTENTS=hljs.inherit(HELPER_NAME_OR_PATH_EXPRESSION,{className:"name",keywords:BUILT_INS2,starts:hljs.inherit(HELPER_PARAMETERS,{end:/\)/})});SUB_EXPRESSION.contains=[SUB_EXPRESSION_CONTENTS];const OPENING_BLOCK_MUSTACHE_CONTENTS=hljs.inherit(HELPER_NAME_OR_PATH_EXPRESSION,
{keywords:BUILT_INS2,className:"name",starts:hljs.inherit(HELPER_PARAMETERS,{end:/\}\}/})}),CLOSING_BLOCK_MUSTACHE_CONTENTS=hljs.inherit(HELPER_NAME_OR_PATH_EXPRESSION,{keywords:BUILT_INS2,className:"name"}),BASIC_MUSTACHE_CONTENTS=hljs.inherit(HELPER_NAME_OR_PATH_EXPRESSION,{className:"name",keywords:BUILT_INS2,starts:hljs.inherit(HELPER_PARAMETERS,{end:/\}\}/})});return{name:"Handlebars",aliases:["hbs","html.hbs","html.handlebars","htmlbars"],case_insensitive:!0,subLanguage:"xml",contains:[{begin:/\\\{\{/,
skip:!0},{begin:/\\\\(?=\{\{)/,skip:!0},hljs.COMMENT(/\{\{!--/,/--\}\}/),hljs.COMMENT(/\{\{!/,/\}\}/),{className:"template-tag",begin:/\{\{\{\{(?!\/)/,end:/\}\}\}\}/,contains:[OPENING_BLOCK_MUSTACHE_CONTENTS],starts:{end:/\{\{\{\{\//,returnEnd:!0,subLanguage:"xml"}},{className:"template-tag",begin:/\{\{\{\{\//,end:/\}\}\}\}/,contains:[CLOSING_BLOCK_MUSTACHE_CONTENTS]},{className:"template-tag",begin:/\{\{#/,end:/\}\}/,contains:[OPENING_BLOCK_MUSTACHE_CONTENTS]},{className:"template-tag",begin:/\{\{(?=else\}\})/,
end:/\}\}/,keywords:"else"},{className:"template-tag",begin:/\{\{(?=else if)/,end:/\}\}/,keywords:"else if"},{className:"template-tag",begin:/\{\{\//,end:/\}\}/,contains:[CLOSING_BLOCK_MUSTACHE_CONTENTS]},{className:"template-variable",begin:/\{\{\{/,end:/\}\}\}/,contains:[BASIC_MUSTACHE_CONTENTS]},{className:"template-variable",begin:/\{\{/,end:/\}\}/,contains:[BASIC_MUSTACHE_CONTENTS]}]}}function haskell(hljs){const decimalDigits2="([0-9]_*)+",hexDigits2="([0-9a-fA-F]_*)+",binaryDigits="([01]_\
*)+",octalDigits="([0-7]_*)+",symbol="([!#$%&*+.\\/<=>?@\\\\^~-]|(?!([(),;\\[\\]`|{}]|[_:\"']))(\\p{S}|\\p{P}))",COMMENT={variants:[hljs.COMMENT("--+","$"),hljs.COMMENT(/\{-/,/-\}/,{contains:["self"]})]},PRAGMA={className:"meta",begin:/\{-#/,end:/#-\}/},PREPROCESSOR={className:"meta",begin:"^#",end:"$"},CONSTRUCTOR={className:"type",begin:"\\b[A-Z][\\w']*",relevance:0},LIST={begin:"\\(",end:"\\)",illegal:'"',contains:[PRAGMA,PREPROCESSOR,{className:"type",begin:"\\b[A-Z][\\w]*(\\((\\.\\.|,|\\w+)\\))?"},
hljs.inherit(hljs.TITLE_MODE,{begin:"[_a-z][\\w']*"}),COMMENT]},RECORD={begin:/\{/,end:/\}/,contains:LIST.contains},NUMBER={className:"number",relevance:0,variants:[{match:`\\b(${decimalDigits2})(\\.(${decimalDigits2}))?([eE][+-]?(${decimalDigits2}))?\\b`},{match:`\\b0[xX]_*(${hexDigits2})(\\.(${hexDigits2}))?([pP][+-]?(${decimalDigits2}))?\\b`},{match:`\\b0[oO](${octalDigits})\\b`},{match:`\\b0[bB](${binaryDigits})\\b`}]};return{name:"Haskell",aliases:["hs"],keywords:"let in if then else case o\
f where do module import hiding qualified type data newtype deriving class instance as default infix infixl infixr foreign export ccall stdcall cplusplus jvm dotnet safe unsafe family forall mdo proc rec",unicodeRegex:!0,contains:[{beginKeywords:"module",end:"where",keywords:"module where",contains:[LIST,COMMENT],illegal:"\\W\\.|;"},{begin:"\\bimport\\b",end:"$",keywords:"import qualified as hiding",contains:[LIST,COMMENT],illegal:"\\W\\.|;"},{className:"class",begin:"^(\\s*)?(class|instance)\\b",
end:"where",keywords:"class family instance where",contains:[CONSTRUCTOR,LIST,COMMENT]},{className:"class",begin:"\\b(data|(new)?type)\\b",end:"$",keywords:"data family type newtype deriving",contains:[PRAGMA,CONSTRUCTOR,LIST,RECORD,COMMENT]},{beginKeywords:"default",end:"$",contains:[CONSTRUCTOR,LIST,COMMENT]},{beginKeywords:"infix infixl infixr",end:"$",contains:[hljs.C_NUMBER_MODE,COMMENT]},{begin:"\\bforeign\\b",end:"$",keywords:"foreign import export ccall stdcall cplusplus jvm dotnet safe \
unsafe",contains:[CONSTRUCTOR,hljs.QUOTE_STRING_MODE,COMMENT]},{className:"meta",begin:"#!\\/usr\\/bin\\/env runhaskell",end:"$"},PRAGMA,PREPROCESSOR,{scope:"string",begin:/'(?=\\?.')/,end:/'/,contains:[{scope:"char.escape",match:/\\./}]},hljs.QUOTE_STRING_MODE,NUMBER,CONSTRUCTOR,hljs.inherit(hljs.TITLE_MODE,{begin:"^[_a-z][\\w']*"}),{begin:`(?!-)${symbol}--+|--+(?!-)${symbol}`},COMMENT,{begin:"->|<-"}]}}function haxe(hljs){const IDENT_RE2="[a-zA-Z_$][a-zA-Z0-9_$]*",HAXE_NUMBER_RE=/(-?)(\b0[xX][a-fA-F0-9_]+|(\b\d+(\.[\d_]*)?|\.[\d_]+)(([eE][-+]?\d+)|i32|u32|i64|f64)?)/;
return{name:"Haxe",aliases:["hx"],keywords:{keyword:"abstract break case cast catch continue default do dynamic else enum extern final for function here if import in inline is macro never new override package private get set public return static super switch this throw trace try typedef untyped using var while "+"Int Float String Bool Dynamic Void Array ",built_in:"trace this",literal:"true false null _"},contains:[{className:"string",begin:"'",end:"'",contains:[hljs.BACKSLASH_ESCAPE,{className:"\
subst",begin:/\$\{/,end:/\}/},{className:"subst",begin:/\$/,end:/\W\}/}]},hljs.QUOTE_STRING_MODE,hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,{className:"number",begin:HAXE_NUMBER_RE,relevance:0},{className:"variable",begin:"\\$"+IDENT_RE2},{className:"meta",begin:/@:?/,end:/\(|$/,excludeEnd:!0},{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elseif end error"}},{className:"type",begin:/:[ \t]*/,end:/[^A-Za-z0-9_ \t\->]/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"\
type",begin:/:[ \t]*/,end:/\W/,excludeBegin:!0,excludeEnd:!0},{className:"type",beginKeywords:"new",end:/\W/,excludeBegin:!0,excludeEnd:!0},{className:"title.class",beginKeywords:"enum",end:/\{/,contains:[hljs.TITLE_MODE]},{className:"title.class",begin:"\\babstract\\b(?=\\s*"+hljs.IDENT_RE+"\\s*\\()",end:/[\{$]/,contains:[{className:"type",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0},{className:"type",begin:/from +/,end:/\W/,excludeBegin:!0,excludeEnd:!0},{className:"type",begin:/to +/,end:/\W/,
excludeBegin:!0,excludeEnd:!0},hljs.TITLE_MODE],keywords:{keyword:"abstract from to"}},{className:"title.class",begin:/\b(class|interface) +/,end:/[\{$]/,excludeEnd:!0,keywords:"class interface",contains:[{className:"keyword",begin:/\b(extends|implements) +/,keywords:"extends implements",contains:[{className:"type",begin:hljs.IDENT_RE,relevance:0}]},hljs.TITLE_MODE]},{className:"title.function",beginKeywords:"function",end:/\(/,excludeEnd:!0,illegal:/\S/,contains:[hljs.TITLE_MODE]}],illegal:/<\//}}
function hsp(hljs){return{name:"HSP",case_insensitive:!0,keywords:{$pattern:/[\w._]+/,keyword:"goto gosub return break repeat loop continue wait await dim sdim foreach dimtype dup dupptr end stop newmod delmod mref run exgoto on mcall assert logmes newlab resume yield onexit onerror onkey onclick oncmd exist delete mkdir chdir dirlist bload bsave bcopy memfile if else poke wpoke lpoke getstr chdpm memexpand memcpy memset notesel noteadd notedel noteload notesave randomize noteunsel noteget split\
 strrep setease button chgdisp exec dialog mmload mmplay mmstop mci pset pget syscolor mes print title pos circle cls font sysfont objsize picload color palcolor palette redraw width gsel gcopy gzoom gmode bmpsave hsvcolor getkey listbox chkbox combox input mesbox buffer screen bgscr mouse objsel groll line clrobj boxf objprm objmode stick grect grotate gsquare gradf objimage objskip objenable celload celdiv celput newcom querycom delcom cnvstow comres axobj winobj sendmsg comevent comevarg sarr\
ayconv callfunc cnvwtos comevdisp libptr system hspstat hspver stat cnt err strsize looplev sublev iparam wparam lparam refstr refdval int rnd strlen length length2 length3 length4 vartype gettime peek wpeek lpeek varptr varuse noteinfo instr abs limit getease str strmid strf getpath strtrim sin cos tan atan sqrt double absf expf logf limitf powf geteasef mousex mousey mousew hwnd hinstance hdc ginfo objinfo dirinfo sysinfo thismod __hspver__ __hsp30__ __date__ __time__ __line__ __file__ _debug \
__hspdef__ and or xor not screen_normal screen_palette screen_hide screen_fixedsize screen_tool screen_frame gmode_gdi gmode_mem gmode_rgb0 gmode_alpha gmode_rgb0alpha gmode_add gmode_sub gmode_pixela ginfo_mx ginfo_my ginfo_act ginfo_sel ginfo_wx1 ginfo_wy1 ginfo_wx2 ginfo_wy2 ginfo_vx ginfo_vy ginfo_sizex ginfo_sizey ginfo_winx ginfo_winy ginfo_mesx ginfo_mesy ginfo_r ginfo_g ginfo_b ginfo_paluse ginfo_dispx ginfo_dispy ginfo_cx ginfo_cy ginfo_intid ginfo_newid ginfo_sx ginfo_sy objinfo_mode o\
bjinfo_bmscr objinfo_hwnd notemax notesize dir_cur dir_exe dir_win dir_sys dir_cmdline dir_desktop dir_mydoc dir_tv font_normal font_bold font_italic font_underline font_strikeout font_antialias objmode_normal objmode_guifont objmode_usefont gsquare_grad msgothic msmincho do until while wend for next _break _continue switch case default swbreak swend ddim ldim alloc m_pi rad2deg deg2rad ease_linear ease_quad_in ease_quad_out ease_quad_inout ease_cubic_in ease_cubic_out ease_cubic_inout ease_quar\
tic_in ease_quartic_out ease_quartic_inout ease_bounce_in ease_bounce_out ease_bounce_inout ease_shake_in ease_shake_out ease_shake_inout ease_loop"},contains:[hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.QUOTE_STRING_MODE,hljs.APOS_STRING_MODE,{className:"string",begin:/\{"/,end:/"\}/,contains:[hljs.BACKSLASH_ESCAPE]},hljs.COMMENT(";","$",{relevance:0}),{className:"meta",begin:"#",end:"$",keywords:{keyword:"addion cfunc cmd cmpopt comfunc const defcfunc deffunc define else endif enum\
 epack func global if ifdef ifndef include modcfunc modfunc modinit modterm module pack packopt regcmd runtime undef usecom uselib"},contains:[hljs.inherit(hljs.QUOTE_STRING_MODE,{className:"string"}),hljs.NUMBER_MODE,hljs.C_NUMBER_MODE,hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE]},{className:"symbol",begin:"^\\*(\\w+|@)"},hljs.NUMBER_MODE,hljs.C_NUMBER_MODE]}}function http(hljs){const regex=hljs.regex,VERSION="HTTP/([32]|1\\.[01])",HEADER_NAME=/[A-Za-z][A-Za-z0-9-]*/,HEADER={className:"a\
ttribute",begin:regex.concat("^",HEADER_NAME,"(?=\\:\\s)"),starts:{contains:[{className:"punctuation",begin:/: /,relevance:0,starts:{end:"$",relevance:0}}]}},HEADERS_AND_BODY=[HEADER,{begin:"\\n\\n",starts:{subLanguage:[],endsWithParent:!0}}];return{name:"HTTP",aliases:["https"],illegal:/\S/,contains:[{begin:"^(?="+VERSION+" \\d{3})",end:/$/,contains:[{className:"meta",begin:VERSION},{className:"number",begin:"\\b\\d{3}\\b"}],starts:{end:/\b\B/,illegal:/\S/,contains:HEADERS_AND_BODY}},{begin:"(?\
=^[A-Z]+ (.*?) "+VERSION+"$)",end:/$/,contains:[{className:"string",begin:" ",end:" ",excludeBegin:!0,excludeEnd:!0},{className:"meta",begin:VERSION},{className:"keyword",begin:"[A-Z]+"}],starts:{end:/\b\B/,illegal:/\S/,contains:HEADERS_AND_BODY}},hljs.inherit(HEADER,{relevance:0})]}}function hy(hljs){const SYMBOLSTART="a-zA-Z_\\-!.?+*=<>&#'",SYMBOL_RE="["+SYMBOLSTART+"]["+SYMBOLSTART+"0-9/;:]*",keywords2={$pattern:SYMBOL_RE,built_in:"!= % %= & &= * ** **= *= *map + += , --build-class-- --import\
-- -= . / // //= /= < << <<= <= = > >= >> >>= @ @= ^ ^= abs accumulate all and any ap-compose ap-dotimes ap-each ap-each-while ap-filter ap-first ap-if ap-last ap-map ap-map-when ap-pipe ap-reduce ap-reject apply as-> ascii assert assoc bin break butlast callable calling-module-name car case cdr chain chr coll? combinations compile compress cond cons cons? continue count curry cut cycle dec def default-method defclass defmacro defmacro-alias defmacro/g! defmain defmethod defmulti defn defn-alias\
 defnc defnr defreader defseq del delattr delete-route dict-comp dir disassemble dispatch-reader-macro distinct divmod do doto drop drop-last drop-while empty? end-sequence eval eval-and-compile eval-when-compile even? every? except exec filter first flatten float? fn fnc fnr for for* format fraction genexpr gensym get getattr global globals group-by hasattr hash hex id identity if if* if-not if-python2 import in inc input instance? integer integer-char? integer? interleave interpose is is-coll \
is-cons is-empty is-even is-every is-float is-instance is-integer is-integer-char is-iterable is-iterator is-keyword is-neg is-none is-not is-numeric is-odd is-pos is-string is-symbol is-zero isinstance islice issubclass iter iterable? iterate iterator? keyword keyword? lambda last len let lif lif-not list* list-comp locals loop macro-error macroexpand macroexpand-1 macroexpand-all map max merge-with method-decorator min multi-decorator multicombinations name neg? next none? nonlocal not not-in \
not? nth numeric? oct odd? open or ord partition permutations pos? post-route postwalk pow prewalk print product profile/calls profile/cpu put-route quasiquote quote raise range read read-str recursive-replace reduce remove repeat repeatedly repr require rest round route route-with-methods rwm second seq set-comp setattr setv some sorted string string? sum switch symbol? take take-nth take-while tee try unless unquote unquote-splicing vars walk when while with with* with-decorator with-gensyms x\
i xor yield yield-from zero? zip zip-longest | |= ~"},SIMPLE_NUMBER_RE="[-+]?\\d+(\\.\\d+)?",SYMBOL={begin:SYMBOL_RE,relevance:0},NUMBER={className:"number",begin:SIMPLE_NUMBER_RE,relevance:0},STRING=hljs.inherit(hljs.QUOTE_STRING_MODE,{illegal:null}),COMMENT=hljs.COMMENT(";","$",{relevance:0}),LITERAL={className:"literal",begin:/\b([Tt]rue|[Ff]alse|nil|None)\b/},COLLECTION={begin:"[\\[\\{]",end:"[\\]\\}]",relevance:0},HINT={className:"comment",begin:"\\^"+SYMBOL_RE},HINT_COL=hljs.COMMENT("\\^\\{",
"\\}"),KEY={className:"symbol",begin:"[:]{1,2}"+SYMBOL_RE},LIST={begin:"\\(",end:"\\)"},BODY={endsWithParent:!0,relevance:0},NAME={className:"name",relevance:0,keywords:keywords2,begin:SYMBOL_RE,starts:BODY},DEFAULT_CONTAINS=[LIST,STRING,HINT,HINT_COL,COMMENT,KEY,COLLECTION,NUMBER,LITERAL,SYMBOL];return LIST.contains=[hljs.COMMENT("comment",""),NAME,BODY],BODY.contains=DEFAULT_CONTAINS,COLLECTION.contains=DEFAULT_CONTAINS,{name:"Hy",aliases:["hylang"],illegal:/\S/,contains:[hljs.SHEBANG(),LIST,STRING,
HINT,HINT_COL,COMMENT,KEY,COLLECTION,NUMBER,LITERAL]}}function inform7(hljs){return{name:"Inform 7",aliases:["i7"],case_insensitive:!0,keywords:{keyword:"thing room person man woman animal container supporter backdrop door scenery open closed locked inside gender is are say understand kind of rule"},contains:[{className:"string",begin:'"',end:'"',relevance:0,contains:[{className:"subst",begin:"\\[",end:"\\]"}]},{className:"section",begin:/^(Volume|Book|Part|Chapter|Section|Table)\b/,end:"$"},{begin:/^(Check|Carry out|Report|Instead of|To|Rule|When|Before|After)\b/,
end:":",contains:[{begin:"\\(This",end:"\\)"}]},{className:"comment",begin:"\\[",end:"\\]",contains:["self"]}]}}function irpf90(hljs){const regex=hljs.regex,PARAMS={className:"params",begin:"\\(",end:"\\)"},OPTIONAL_NUMBER_SUFFIX=/(_[a-z_\d]+)?/,OPTIONAL_NUMBER_EXP=/([de][+-]?\d+)?/,NUMBER={className:"number",variants:[{begin:regex.concat(/\b\d+/,/\.(\d*)/,OPTIONAL_NUMBER_EXP,OPTIONAL_NUMBER_SUFFIX)},{begin:regex.concat(/\b\d+/,OPTIONAL_NUMBER_EXP,OPTIONAL_NUMBER_SUFFIX)},{begin:regex.concat(/\.\d+/,
OPTIONAL_NUMBER_EXP,OPTIONAL_NUMBER_SUFFIX)}],relevance:0};return{name:"IRPF90",case_insensitive:!0,keywords:{literal:".False. .True.",keyword:"kind do while private call intrinsic where elsewhere type endtype endmodule endselect endinterface end enddo endif if forall endforall only contains default return stop then public subroutine|10 function program .and. .or. .not. .le. .eq. .ge. .gt. .lt. goto save else use module select case access blank direct exist file fmt form formatted iostat name na\
med nextrec number opened rec recl sequential status unformatted unit continue format pause cycle exit c_null_char c_alert c_backspace c_form_feed flush wait decimal round iomsg synchronous nopass non_overridable pass protected volatile abstract extends import non_intrinsic value deferred generic final enumerator class associate bind enum c_int c_short c_long c_long_long c_signed_char c_size_t c_int8_t c_int16_t c_int32_t c_int64_t c_int_least8_t c_int_least16_t c_int_least32_t c_int_least64_t c\
_int_fast8_t c_int_fast16_t c_int_fast32_t c_int_fast64_t c_intmax_t C_intptr_t c_float c_double c_long_double c_float_complex c_double_complex c_long_double_complex c_bool c_char c_null_ptr c_null_funptr c_new_line c_carriage_return c_horizontal_tab c_vertical_tab iso_c_binding c_loc c_funloc c_associated  c_f_pointer c_ptr c_funptr iso_fortran_env character_storage_size error_unit file_storage_size input_unit iostat_end iostat_eor numeric_storage_size output_unit c_f_procpointer ieee_arithmeti\
c ieee_support_underflow_control ieee_get_underflow_mode ieee_set_underflow_mode newunit contiguous recursive pad position action delim readwrite eor advance nml interface procedure namelist include sequence elemental pure integer real character complex logical dimension allocatable|10 parameter external implicit|10 none double precision assign intent optional pointer target in out common equivalence data begin_provider &begin_provider end_provider begin_shell end_shell begin_template end_templa\
te subst assert touch soft_touch provide no_dep free irp_if irp_else irp_endif irp_write irp_read",built_in:"alog alog10 amax0 amax1 amin0 amin1 amod cabs ccos cexp clog csin csqrt dabs dacos dasin datan datan2 dcos dcosh ddim dexp dint dlog dlog10 dmax1 dmin1 dmod dnint dsign dsin dsinh dsqrt dtan dtanh float iabs idim idint idnint ifix isign max0 max1 min0 min1 sngl algama cdabs cdcos cdexp cdlog cdsin cdsqrt cqabs cqcos cqexp cqlog cqsin cqsqrt dcmplx dconjg derf derfc dfloat dgamma dimag dlg\
ama iqint qabs qacos qasin qatan qatan2 qcmplx qconjg qcos qcosh qdim qerf qerfc qexp qgamma qimag qlgama qlog qlog10 qmax1 qmin1 qmod qnint qsign qsin qsinh qsqrt qtan qtanh abs acos aimag aint anint asin atan atan2 char cmplx conjg cos cosh exp ichar index int log log10 max min nint sign sin sinh sqrt tan tanh print write dim lge lgt lle llt mod nullify allocate deallocate adjustl adjustr all allocated any associated bit_size btest ceiling count cshift date_and_time digits dot_product eoshift \
epsilon exponent floor fraction huge iand ibclr ibits ibset ieor ior ishft ishftc lbound len_trim matmul maxexponent maxloc maxval merge minexponent minloc minval modulo mvbits nearest pack present product radix random_number random_seed range repeat reshape rrspacing scale scan selected_int_kind selected_real_kind set_exponent shape size spacing spread sum system_clock tiny transpose trim ubound unpack verify achar iachar transfer dble entry dprod cpu_time command_argument_count get_command get\
_command_argument get_environment_variable is_iostat_end ieee_arithmetic ieee_support_underflow_control ieee_get_underflow_mode ieee_set_underflow_mode is_iostat_eor move_alloc new_line selected_char_kind same_type_as extends_type_of acosh asinh atanh bessel_j0 bessel_j1 bessel_jn bessel_y0 bessel_y1 bessel_yn erf erfc erfc_scaled gamma log_gamma hypot norm2 atomic_define atomic_ref execute_command_line leadz trailz storage_size merge_bits bge bgt ble blt dshiftl dshiftr findloc iall iany iparit\
y image_index lcobound ucobound maskl maskr num_images parity popcnt poppar shifta shiftl shiftr this_image IRP_ALIGN irp_here"},illegal:/\/\*/,contains:[hljs.inherit(hljs.APOS_STRING_MODE,{className:"string",relevance:0}),hljs.inherit(hljs.QUOTE_STRING_MODE,{className:"string",relevance:0}),{className:"function",beginKeywords:"subroutine function program",illegal:"[${=\\n]",contains:[hljs.UNDERSCORE_TITLE_MODE,PARAMS]},hljs.COMMENT("!","$",{relevance:0}),hljs.COMMENT("begin_doc","end_doc",{relevance:10}),
NUMBER]}}function isbl(hljs){const UNDERSCORE_IDENT_RE="[A-Za-zА-Яа-яёЁ_!][A-Za-zА-Яа-яёЁ_0-9]*",FUNCTION_NAME_IDENT_RE="[A-Za-zА-Яа-яёЁ_][A-Za-zА-Яа-яёЁ_0-9]*",KEYWORD="and и else иначе endexcept endfinally endforeach конецвсе endif конецесли endwhile конецпока except exitfor finally foreach все if если in в not не or или try while пока ",CONSTANTS="SYSRES_CONST_ACCES_RIGHT_TYPE_EDIT SYSRES_CONST_ACCES_RIGHT_TYPE_FULL SYSR\
ES_CONST_ACCES_RIGHT_TYPE_VIEW SYSRES_CONST_ACCESS_MODE_REQUISITE_CODE SYSRES_CONST_ACCESS_NO_ACCESS_VIEW SYSRES_CONST_ACCESS_NO_ACCESS_VIEW_CODE SYSRES_CONST_ACCESS_RIGHTS_ADD_REQUISITE_CODE SYSRES_CONST_ACCESS_RIGHTS_ADD_REQUISITE_YES_CODE SYSRES_CONST_ACCESS_RIGHTS_CHANGE_REQUISITE_CODE SYSRES_CONST_ACCESS_RIGHTS_CHANGE_REQUISITE_YES_CODE SYSRES_CONST_ACCESS_RIGHTS_DELETE_REQUISITE_CODE SYSRES_CONST_ACCESS_RIGHTS_DELETE_REQUISITE_YES_CODE SYSRES_CONST_ACCESS_RIGHTS_EXECUTE_REQUISITE_CODE SYSR\
ES_CONST_ACCESS_RIGHTS_EXECUTE_REQUISITE_YES_CODE SYSRES_CONST_ACCESS_RIGHTS_NO_ACCESS_REQUISITE_CODE SYSRES_CONST_ACCESS_RIGHTS_NO_ACCESS_REQUISITE_YES_CODE SYSRES_CONST_ACCESS_RIGHTS_RATIFY_REQUISITE_CODE SYSRES_CONST_ACCESS_RIGHTS_RATIFY_REQUISITE_YES_CODE SYSRES_CONST_ACCESS_RIGHTS_REQUISITE_CODE SYSRES_CONST_ACCESS_RIGHTS_VIEW SYSRES_CONST_ACCESS_RIGHTS_VIEW_CODE SYSRES_CONST_ACCESS_RIGHTS_VIEW_REQUISITE_CODE SYSRES_CONST_ACCESS_RIGHTS_VIEW_REQUISITE_YES_CODE SYSRES_CONST_ACCESS_TYPE_CHANGE\
 SYSRES_CONST_ACCESS_TYPE_CHANGE_CODE SYSRES_CONST_ACCESS_TYPE_EXISTS SYSRES_CONST_ACCESS_TYPE_EXISTS_CODE SYSRES_CONST_ACCESS_TYPE_FULL SYSRES_CONST_ACCESS_TYPE_FULL_CODE SYSRES_CONST_ACCESS_TYPE_VIEW SYSRES_CONST_ACCESS_TYPE_VIEW_CODE SYSRES_CONST_ACTION_TYPE_ABORT SYSRES_CONST_ACTION_TYPE_ACCEPT SYSRES_CONST_ACTION_TYPE_ACCESS_RIGHTS SYSRES_CONST_ACTION_TYPE_ADD_ATTACHMENT SYSRES_CONST_ACTION_TYPE_CHANGE_CARD SYSRES_CONST_ACTION_TYPE_CHANGE_KIND SYSRES_CONST_ACTION_TYPE_CHANGE_STORAGE SYSRES_\
CONST_ACTION_TYPE_CONTINUE SYSRES_CONST_ACTION_TYPE_COPY SYSRES_CONST_ACTION_TYPE_CREATE SYSRES_CONST_ACTION_TYPE_CREATE_VERSION SYSRES_CONST_ACTION_TYPE_DELETE SYSRES_CONST_ACTION_TYPE_DELETE_ATTACHMENT SYSRES_CONST_ACTION_TYPE_DELETE_VERSION SYSRES_CONST_ACTION_TYPE_DISABLE_DELEGATE_ACCESS_RIGHTS SYSRES_CONST_ACTION_TYPE_ENABLE_DELEGATE_ACCESS_RIGHTS SYSRES_CONST_ACTION_TYPE_ENCRYPTION_BY_CERTIFICATE SYSRES_CONST_ACTION_TYPE_ENCRYPTION_BY_CERTIFICATE_AND_PASSWORD SYSRES_CONST_ACTION_TYPE_ENCRY\
PTION_BY_PASSWORD SYSRES_CONST_ACTION_TYPE_EXPORT_WITH_LOCK SYSRES_CONST_ACTION_TYPE_EXPORT_WITHOUT_LOCK SYSRES_CONST_ACTION_TYPE_IMPORT_WITH_UNLOCK SYSRES_CONST_ACTION_TYPE_IMPORT_WITHOUT_UNLOCK SYSRES_CONST_ACTION_TYPE_LIFE_CYCLE_STAGE SYSRES_CONST_ACTION_TYPE_LOCK SYSRES_CONST_ACTION_TYPE_LOCK_FOR_SERVER SYSRES_CONST_ACTION_TYPE_LOCK_MODIFY SYSRES_CONST_ACTION_TYPE_MARK_AS_READED SYSRES_CONST_ACTION_TYPE_MARK_AS_UNREADED SYSRES_CONST_ACTION_TYPE_MODIFY SYSRES_CONST_ACTION_TYPE_MODIFY_CARD SYS\
RES_CONST_ACTION_TYPE_MOVE_TO_ARCHIVE SYSRES_CONST_ACTION_TYPE_OFF_ENCRYPTION SYSRES_CONST_ACTION_TYPE_PASSWORD_CHANGE SYSRES_CONST_ACTION_TYPE_PERFORM SYSRES_CONST_ACTION_TYPE_RECOVER_FROM_LOCAL_COPY SYSRES_CONST_ACTION_TYPE_RESTART SYSRES_CONST_ACTION_TYPE_RESTORE_FROM_ARCHIVE SYSRES_CONST_ACTION_TYPE_REVISION SYSRES_CONST_ACTION_TYPE_SEND_BY_MAIL SYSRES_CONST_ACTION_TYPE_SIGN SYSRES_CONST_ACTION_TYPE_START SYSRES_CONST_ACTION_TYPE_UNLOCK SYSRES_CONST_ACTION_TYPE_UNLOCK_FROM_SERVER SYSRES_CONS\
T_ACTION_TYPE_VERSION_STATE SYSRES_CONST_ACTION_TYPE_VERSION_VISIBILITY SYSRES_CONST_ACTION_TYPE_VIEW SYSRES_CONST_ACTION_TYPE_VIEW_SHADOW_COPY SYSRES_CONST_ACTION_TYPE_WORKFLOW_DESCRIPTION_MODIFY SYSRES_CONST_ACTION_TYPE_WRITE_HISTORY SYSRES_CONST_ACTIVE_VERSION_STATE_PICK_VALUE SYSRES_CONST_ADD_REFERENCE_MODE_NAME SYSRES_CONST_ADDITION_REQUISITE_CODE SYSRES_CONST_ADDITIONAL_PARAMS_REQUISITE_CODE SYSRES_CONST_ADITIONAL_JOB_END_DATE_REQUISITE_NAME SYSRES_CONST_ADITIONAL_JOB_READ_REQUISITE_NAME S\
YSRES_CONST_ADITIONAL_JOB_START_DATE_REQUISITE_NAME SYSRES_CONST_ADITIONAL_JOB_STATE_REQUISITE_NAME SYSRES_CONST_ADMINISTRATION_HISTORY_ADDING_USER_TO_GROUP_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_ADDING_USER_TO_GROUP_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_CREATION_COMP_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_CREATION_COMP_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_CREATION_GROUP_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_CREATION_GROUP_ACTION_CODE SYSRES_CONST_ADMINISTRATION\
_HISTORY_CREATION_USER_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_CREATION_USER_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_DATABASE_USER_CREATION SYSRES_CONST_ADMINISTRATION_HISTORY_DATABASE_USER_CREATION_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_DATABASE_USER_DELETION SYSRES_CONST_ADMINISTRATION_HISTORY_DATABASE_USER_DELETION_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_DELETION_COMP_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_DELETION_COMP_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_DEL\
ETION_GROUP_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_DELETION_GROUP_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_DELETION_USER_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_DELETION_USER_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_DELETION_USER_FROM_GROUP_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_DELETION_USER_FROM_GROUP_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_GRANTING_FILTERER_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_GRANTING_FILTERER_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HIS\
TORY_GRANTING_FILTERER_RESTRICTION_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_GRANTING_FILTERER_RESTRICTION_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_GRANTING_PRIVILEGE_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_GRANTING_PRIVILEGE_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_GRANTING_RIGHTS_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_GRANTING_RIGHTS_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_IS_MAIN_SERVER_CHANGED_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_IS_MAIN_SERVER_CHANGED_ACT\
ION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_IS_PUBLIC_CHANGED_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_IS_PUBLIC_CHANGED_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_REMOVING_FILTERER_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_REMOVING_FILTERER_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_REMOVING_FILTERER_RESTRICTION_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_REMOVING_FILTERER_RESTRICTION_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_REMOVING_PRIVILEGE_ACTION SYSRES_CONST_ADMINISTRAT\
ION_HISTORY_REMOVING_PRIVILEGE_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_REMOVING_RIGHTS_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_REMOVING_RIGHTS_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_SERVER_LOGIN_CREATION SYSRES_CONST_ADMINISTRATION_HISTORY_SERVER_LOGIN_CREATION_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_SERVER_LOGIN_DELETION SYSRES_CONST_ADMINISTRATION_HISTORY_SERVER_LOGIN_DELETION_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_CATEGORY_ACTION SYSRES_CONST_ADMINISTRATION\
_HISTORY_UPDATING_CATEGORY_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_COMP_TITLE_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_COMP_TITLE_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_FULL_NAME_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_FULL_NAME_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_GROUP_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_GROUP_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_PARENT_GROUP_ACTION SYSRES_CONST_AD\
MINISTRATION_HISTORY_UPDATING_PARENT_GROUP_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_USER_AUTH_TYPE_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_USER_AUTH_TYPE_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_USER_LOGIN_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_USER_LOGIN_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_USER_STATUS_ACTION SYSRES_CONST_ADMINISTRATION_HISTORY_UPDATING_USER_STATUS_ACTION_CODE SYSRES_CONST_ADMINISTRATION_HISTORY_USER_P\
ASSWORD_CHANGE SYSRES_CONST_ADMINISTRATION_HISTORY_USER_PASSWORD_CHANGE_ACTION SYSRES_CONST_ALL_ACCEPT_CONDITION_RUS SYSRES_CONST_ALL_USERS_GROUP SYSRES_CONST_ALL_USERS_GROUP_NAME SYSRES_CONST_ALL_USERS_SERVER_GROUP_NAME SYSRES_CONST_ALLOWED_ACCESS_TYPE_CODE SYSRES_CONST_ALLOWED_ACCESS_TYPE_NAME SYSRES_CONST_APP_VIEWER_TYPE_REQUISITE_CODE SYSRES_CONST_APPROVING_SIGNATURE_NAME SYSRES_CONST_APPROVING_SIGNATURE_REQUISITE_CODE SYSRES_CONST_ASSISTANT_SUBSTITUE_TYPE SYSRES_CONST_ASSISTANT_SUBSTITUE_TY\
PE_CODE SYSRES_CONST_ATTACH_TYPE_COMPONENT_TOKEN SYSRES_CONST_ATTACH_TYPE_DOC SYSRES_CONST_ATTACH_TYPE_EDOC SYSRES_CONST_ATTACH_TYPE_FOLDER SYSRES_CONST_ATTACH_TYPE_JOB SYSRES_CONST_ATTACH_TYPE_REFERENCE SYSRES_CONST_ATTACH_TYPE_TASK SYSRES_CONST_AUTH_ENCODED_PASSWORD SYSRES_CONST_AUTH_ENCODED_PASSWORD_CODE SYSRES_CONST_AUTH_NOVELL SYSRES_CONST_AUTH_PASSWORD SYSRES_CONST_AUTH_PASSWORD_CODE SYSRES_CONST_AUTH_WINDOWS SYSRES_CONST_AUTHENTICATING_SIGNATURE_NAME SYSRES_CONST_AUTHENTICATING_SIGNATURE_\
REQUISITE_CODE SYSRES_CONST_AUTO_ENUM_METHOD_FLAG SYSRES_CONST_AUTO_NUMERATION_CODE SYSRES_CONST_AUTO_STRONG_ENUM_METHOD_FLAG SYSRES_CONST_AUTOTEXT_NAME_REQUISITE_CODE SYSRES_CONST_AUTOTEXT_TEXT_REQUISITE_CODE SYSRES_CONST_AUTOTEXT_USAGE_ALL SYSRES_CONST_AUTOTEXT_USAGE_ALL_CODE SYSRES_CONST_AUTOTEXT_USAGE_SIGN SYSRES_CONST_AUTOTEXT_USAGE_SIGN_CODE SYSRES_CONST_AUTOTEXT_USAGE_WORK SYSRES_CONST_AUTOTEXT_USAGE_WORK_CODE SYSRES_CONST_AUTOTEXT_USE_ANYWHERE_CODE SYSRES_CONST_AUTOTEXT_USE_ON_SIGNING_CO\
DE SYSRES_CONST_AUTOTEXT_USE_ON_WORK_CODE SYSRES_CONST_BEGIN_DATE_REQUISITE_CODE SYSRES_CONST_BLACK_LIFE_CYCLE_STAGE_FONT_COLOR SYSRES_CONST_BLUE_LIFE_CYCLE_STAGE_FONT_COLOR SYSRES_CONST_BTN_PART SYSRES_CONST_CALCULATED_ROLE_TYPE_CODE SYSRES_CONST_CALL_TYPE_VARIABLE_BUTTON_VALUE SYSRES_CONST_CALL_TYPE_VARIABLE_PROGRAM_VALUE SYSRES_CONST_CANCEL_MESSAGE_FUNCTION_RESULT SYSRES_CONST_CARD_PART SYSRES_CONST_CARD_REFERENCE_MODE_NAME SYSRES_CONST_CERTIFICATE_TYPE_REQUISITE_ENCRYPT_VALUE SYSRES_CONST_CE\
RTIFICATE_TYPE_REQUISITE_SIGN_AND_ENCRYPT_VALUE SYSRES_CONST_CERTIFICATE_TYPE_REQUISITE_SIGN_VALUE SYSRES_CONST_CHECK_PARAM_VALUE_DATE_PARAM_TYPE SYSRES_CONST_CHECK_PARAM_VALUE_FLOAT_PARAM_TYPE SYSRES_CONST_CHECK_PARAM_VALUE_INTEGER_PARAM_TYPE SYSRES_CONST_CHECK_PARAM_VALUE_PICK_PARAM_TYPE SYSRES_CONST_CHECK_PARAM_VALUE_REEFRENCE_PARAM_TYPE SYSRES_CONST_CLOSED_RECORD_FLAG_VALUE_FEMININE SYSRES_CONST_CLOSED_RECORD_FLAG_VALUE_MASCULINE SYSRES_CONST_CODE_COMPONENT_TYPE_ADMIN SYSRES_CONST_CODE_COMPO\
NENT_TYPE_DEVELOPER SYSRES_CONST_CODE_COMPONENT_TYPE_DOCS SYSRES_CONST_CODE_COMPONENT_TYPE_EDOC_CARDS SYSRES_CONST_CODE_COMPONENT_TYPE_EXTERNAL_EXECUTABLE SYSRES_CONST_CODE_COMPONENT_TYPE_OTHER SYSRES_CONST_CODE_COMPONENT_TYPE_REFERENCE SYSRES_CONST_CODE_COMPONENT_TYPE_REPORT SYSRES_CONST_CODE_COMPONENT_TYPE_SCRIPT SYSRES_CONST_CODE_COMPONENT_TYPE_URL SYSRES_CONST_CODE_REQUISITE_ACCESS SYSRES_CONST_CODE_REQUISITE_CODE SYSRES_CONST_CODE_REQUISITE_COMPONENT SYSRES_CONST_CODE_REQUISITE_DESCRIPTION \
SYSRES_CONST_CODE_REQUISITE_EXCLUDE_COMPONENT SYSRES_CONST_CODE_REQUISITE_RECORD SYSRES_CONST_COMMENT_REQ_CODE SYSRES_CONST_COMMON_SETTINGS_REQUISITE_CODE SYSRES_CONST_COMP_CODE_GRD SYSRES_CONST_COMPONENT_GROUP_TYPE_REQUISITE_CODE SYSRES_CONST_COMPONENT_TYPE_ADMIN_COMPONENTS SYSRES_CONST_COMPONENT_TYPE_DEVELOPER_COMPONENTS SYSRES_CONST_COMPONENT_TYPE_DOCS SYSRES_CONST_COMPONENT_TYPE_EDOC_CARDS SYSRES_CONST_COMPONENT_TYPE_EDOCS SYSRES_CONST_COMPONENT_TYPE_EXTERNAL_EXECUTABLE SYSRES_CONST_COMPONEN\
T_TYPE_OTHER SYSRES_CONST_COMPONENT_TYPE_REFERENCE_TYPES SYSRES_CONST_COMPONENT_TYPE_REFERENCES SYSRES_CONST_COMPONENT_TYPE_REPORTS SYSRES_CONST_COMPONENT_TYPE_SCRIPTS SYSRES_CONST_COMPONENT_TYPE_URL SYSRES_CONST_COMPONENTS_REMOTE_SERVERS_VIEW_CODE SYSRES_CONST_CONDITION_BLOCK_DESCRIPTION SYSRES_CONST_CONST_FIRM_STATUS_COMMON SYSRES_CONST_CONST_FIRM_STATUS_INDIVIDUAL SYSRES_CONST_CONST_NEGATIVE_VALUE SYSRES_CONST_CONST_POSITIVE_VALUE SYSRES_CONST_CONST_SERVER_STATUS_DONT_REPLICATE SYSRES_CONST_C\
ONST_SERVER_STATUS_REPLICATE SYSRES_CONST_CONTENTS_REQUISITE_CODE SYSRES_CONST_DATA_TYPE_BOOLEAN SYSRES_CONST_DATA_TYPE_DATE SYSRES_CONST_DATA_TYPE_FLOAT SYSRES_CONST_DATA_TYPE_INTEGER SYSRES_CONST_DATA_TYPE_PICK SYSRES_CONST_DATA_TYPE_REFERENCE SYSRES_CONST_DATA_TYPE_STRING SYSRES_CONST_DATA_TYPE_TEXT SYSRES_CONST_DATA_TYPE_VARIANT SYSRES_CONST_DATE_CLOSE_REQ_CODE SYSRES_CONST_DATE_FORMAT_DATE_ONLY_CHAR SYSRES_CONST_DATE_OPEN_REQ_CODE SYSRES_CONST_DATE_REQUISITE SYSRES_CONST_DATE_REQUISITE_CODE\
 SYSRES_CONST_DATE_REQUISITE_NAME SYSRES_CONST_DATE_REQUISITE_TYPE SYSRES_CONST_DATE_TYPE_CHAR SYSRES_CONST_DATETIME_FORMAT_VALUE SYSRES_CONST_DEA_ACCESS_RIGHTS_ACTION_CODE SYSRES_CONST_DESCRIPTION_LOCALIZE_ID_REQUISITE_CODE SYSRES_CONST_DESCRIPTION_REQUISITE_CODE SYSRES_CONST_DET1_PART SYSRES_CONST_DET2_PART SYSRES_CONST_DET3_PART SYSRES_CONST_DET4_PART SYSRES_CONST_DET5_PART SYSRES_CONST_DET6_PART SYSRES_CONST_DETAIL_DATASET_KEY_REQUISITE_CODE SYSRES_CONST_DETAIL_PICK_REQUISITE_CODE SYSRES_CON\
ST_DETAIL_REQ_CODE SYSRES_CONST_DO_NOT_USE_ACCESS_TYPE_CODE SYSRES_CONST_DO_NOT_USE_ACCESS_TYPE_NAME SYSRES_CONST_DO_NOT_USE_ON_VIEW_ACCESS_TYPE_CODE SYSRES_CONST_DO_NOT_USE_ON_VIEW_ACCESS_TYPE_NAME SYSRES_CONST_DOCUMENT_STORAGES_CODE SYSRES_CONST_DOCUMENT_TEMPLATES_TYPE_NAME SYSRES_CONST_DOUBLE_REQUISITE_CODE SYSRES_CONST_EDITOR_CLOSE_FILE_OBSERV_TYPE_CODE SYSRES_CONST_EDITOR_CLOSE_PROCESS_OBSERV_TYPE_CODE SYSRES_CONST_EDITOR_TYPE_REQUISITE_CODE SYSRES_CONST_EDITORS_APPLICATION_NAME_REQUISITE_C\
ODE SYSRES_CONST_EDITORS_CREATE_SEVERAL_PROCESSES_REQUISITE_CODE SYSRES_CONST_EDITORS_EXTENSION_REQUISITE_CODE SYSRES_CONST_EDITORS_OBSERVER_BY_PROCESS_TYPE SYSRES_CONST_EDITORS_REFERENCE_CODE SYSRES_CONST_EDITORS_REPLACE_SPEC_CHARS_REQUISITE_CODE SYSRES_CONST_EDITORS_USE_PLUGINS_REQUISITE_CODE SYSRES_CONST_EDITORS_VIEW_DOCUMENT_OPENED_TO_EDIT_CODE SYSRES_CONST_EDOC_CARD_TYPE_REQUISITE_CODE SYSRES_CONST_EDOC_CARD_TYPES_LINK_REQUISITE_CODE SYSRES_CONST_EDOC_CERTIFICATE_AND_PASSWORD_ENCODE_CODE SY\
SRES_CONST_EDOC_CERTIFICATE_ENCODE_CODE SYSRES_CONST_EDOC_DATE_REQUISITE_CODE SYSRES_CONST_EDOC_KIND_REFERENCE_CODE SYSRES_CONST_EDOC_KINDS_BY_TEMPLATE_ACTION_CODE SYSRES_CONST_EDOC_MANAGE_ACCESS_CODE SYSRES_CONST_EDOC_NONE_ENCODE_CODE SYSRES_CONST_EDOC_NUMBER_REQUISITE_CODE SYSRES_CONST_EDOC_PASSWORD_ENCODE_CODE SYSRES_CONST_EDOC_READONLY_ACCESS_CODE SYSRES_CONST_EDOC_SHELL_LIFE_TYPE_VIEW_VALUE SYSRES_CONST_EDOC_SIZE_RESTRICTION_PRIORITY_REQUISITE_CODE SYSRES_CONST_EDOC_STORAGE_CHECK_ACCESS_RIG\
HTS_REQUISITE_CODE SYSRES_CONST_EDOC_STORAGE_COMPUTER_NAME_REQUISITE_CODE SYSRES_CONST_EDOC_STORAGE_DATABASE_NAME_REQUISITE_CODE SYSRES_CONST_EDOC_STORAGE_EDIT_IN_STORAGE_REQUISITE_CODE SYSRES_CONST_EDOC_STORAGE_LOCAL_PATH_REQUISITE_CODE SYSRES_CONST_EDOC_STORAGE_SHARED_SOURCE_NAME_REQUISITE_CODE SYSRES_CONST_EDOC_TEMPLATE_REQUISITE_CODE SYSRES_CONST_EDOC_TYPES_REFERENCE_CODE SYSRES_CONST_EDOC_VERSION_ACTIVE_STAGE_CODE SYSRES_CONST_EDOC_VERSION_DESIGN_STAGE_CODE SYSRES_CONST_EDOC_VERSION_OBSOLET\
E_STAGE_CODE SYSRES_CONST_EDOC_WRITE_ACCES_CODE SYSRES_CONST_EDOCUMENT_CARD_REQUISITES_REFERENCE_CODE_SELECTED_REQUISITE SYSRES_CONST_ENCODE_CERTIFICATE_TYPE_CODE SYSRES_CONST_END_DATE_REQUISITE_CODE SYSRES_CONST_ENUMERATION_TYPE_REQUISITE_CODE SYSRES_CONST_EXECUTE_ACCESS_RIGHTS_TYPE_CODE SYSRES_CONST_EXECUTIVE_FILE_STORAGE_TYPE SYSRES_CONST_EXIST_CONST SYSRES_CONST_EXIST_VALUE SYSRES_CONST_EXPORT_LOCK_TYPE_ASK SYSRES_CONST_EXPORT_LOCK_TYPE_WITH_LOCK SYSRES_CONST_EXPORT_LOCK_TYPE_WITHOUT_LOCK SY\
SRES_CONST_EXPORT_VERSION_TYPE_ASK SYSRES_CONST_EXPORT_VERSION_TYPE_LAST SYSRES_CONST_EXPORT_VERSION_TYPE_LAST_ACTIVE SYSRES_CONST_EXTENSION_REQUISITE_CODE SYSRES_CONST_FILTER_NAME_REQUISITE_CODE SYSRES_CONST_FILTER_REQUISITE_CODE SYSRES_CONST_FILTER_TYPE_COMMON_CODE SYSRES_CONST_FILTER_TYPE_COMMON_NAME SYSRES_CONST_FILTER_TYPE_USER_CODE SYSRES_CONST_FILTER_TYPE_USER_NAME SYSRES_CONST_FILTER_VALUE_REQUISITE_NAME SYSRES_CONST_FLOAT_NUMBER_FORMAT_CHAR SYSRES_CONST_FLOAT_REQUISITE_TYPE SYSRES_CONST\
_FOLDER_AUTHOR_VALUE SYSRES_CONST_FOLDER_KIND_ANY_OBJECTS SYSRES_CONST_FOLDER_KIND_COMPONENTS SYSRES_CONST_FOLDER_KIND_EDOCS SYSRES_CONST_FOLDER_KIND_JOBS SYSRES_CONST_FOLDER_KIND_TASKS SYSRES_CONST_FOLDER_TYPE_COMMON SYSRES_CONST_FOLDER_TYPE_COMPONENT SYSRES_CONST_FOLDER_TYPE_FAVORITES SYSRES_CONST_FOLDER_TYPE_INBOX SYSRES_CONST_FOLDER_TYPE_OUTBOX SYSRES_CONST_FOLDER_TYPE_QUICK_LAUNCH SYSRES_CONST_FOLDER_TYPE_SEARCH SYSRES_CONST_FOLDER_TYPE_SHORTCUTS SYSRES_CONST_FOLDER_TYPE_USER SYSRES_CONST_F\
ROM_DICTIONARY_ENUM_METHOD_FLAG SYSRES_CONST_FULL_SUBSTITUTE_TYPE SYSRES_CONST_FULL_SUBSTITUTE_TYPE_CODE SYSRES_CONST_FUNCTION_CANCEL_RESULT SYSRES_CONST_FUNCTION_CATEGORY_SYSTEM SYSRES_CONST_FUNCTION_CATEGORY_USER SYSRES_CONST_FUNCTION_FAILURE_RESULT SYSRES_CONST_FUNCTION_SAVE_RESULT SYSRES_CONST_GENERATED_REQUISITE SYSRES_CONST_GREEN_LIFE_CYCLE_STAGE_FONT_COLOR SYSRES_CONST_GROUP_ACCOUNT_TYPE_VALUE_CODE SYSRES_CONST_GROUP_CATEGORY_NORMAL_CODE SYSRES_CONST_GROUP_CATEGORY_NORMAL_NAME SYSRES_CONS\
T_GROUP_CATEGORY_SERVICE_CODE SYSRES_CONST_GROUP_CATEGORY_SERVICE_NAME SYSRES_CONST_GROUP_COMMON_CATEGORY_FIELD_VALUE SYSRES_CONST_GROUP_FULL_NAME_REQUISITE_CODE SYSRES_CONST_GROUP_NAME_REQUISITE_CODE SYSRES_CONST_GROUP_RIGHTS_T_REQUISITE_CODE SYSRES_CONST_GROUP_SERVER_CODES_REQUISITE_CODE SYSRES_CONST_GROUP_SERVER_NAME_REQUISITE_CODE SYSRES_CONST_GROUP_SERVICE_CATEGORY_FIELD_VALUE SYSRES_CONST_GROUP_USER_REQUISITE_CODE SYSRES_CONST_GROUPS_REFERENCE_CODE SYSRES_CONST_GROUPS_REQUISITE_CODE SYSRES\
_CONST_HIDDEN_MODE_NAME SYSRES_CONST_HIGH_LVL_REQUISITE_CODE SYSRES_CONST_HISTORY_ACTION_CREATE_CODE SYSRES_CONST_HISTORY_ACTION_DELETE_CODE SYSRES_CONST_HISTORY_ACTION_EDIT_CODE SYSRES_CONST_HOUR_CHAR SYSRES_CONST_ID_REQUISITE_CODE SYSRES_CONST_IDSPS_REQUISITE_CODE SYSRES_CONST_IMAGE_MODE_COLOR SYSRES_CONST_IMAGE_MODE_GREYSCALE SYSRES_CONST_IMAGE_MODE_MONOCHROME SYSRES_CONST_IMPORTANCE_HIGH SYSRES_CONST_IMPORTANCE_LOW SYSRES_CONST_IMPORTANCE_NORMAL SYSRES_CONST_IN_DESIGN_VERSION_STATE_PICK_VALU\
E SYSRES_CONST_INCOMING_WORK_RULE_TYPE_CODE SYSRES_CONST_INT_REQUISITE SYSRES_CONST_INT_REQUISITE_TYPE SYSRES_CONST_INTEGER_NUMBER_FORMAT_CHAR SYSRES_CONST_INTEGER_TYPE_CHAR SYSRES_CONST_IS_GENERATED_REQUISITE_NEGATIVE_VALUE SYSRES_CONST_IS_PUBLIC_ROLE_REQUISITE_CODE SYSRES_CONST_IS_REMOTE_USER_NEGATIVE_VALUE SYSRES_CONST_IS_REMOTE_USER_POSITIVE_VALUE SYSRES_CONST_IS_STORED_REQUISITE_NEGATIVE_VALUE SYSRES_CONST_IS_STORED_REQUISITE_STORED_VALUE SYSRES_CONST_ITALIC_LIFE_CYCLE_STAGE_DRAW_STYLE SYSR\
ES_CONST_JOB_BLOCK_DESCRIPTION SYSRES_CONST_JOB_KIND_CONTROL_JOB SYSRES_CONST_JOB_KIND_JOB SYSRES_CONST_JOB_KIND_NOTICE SYSRES_CONST_JOB_STATE_ABORTED SYSRES_CONST_JOB_STATE_COMPLETE SYSRES_CONST_JOB_STATE_WORKING SYSRES_CONST_KIND_REQUISITE_CODE SYSRES_CONST_KIND_REQUISITE_NAME SYSRES_CONST_KINDS_CREATE_SHADOW_COPIES_REQUISITE_CODE SYSRES_CONST_KINDS_DEFAULT_EDOC_LIFE_STAGE_REQUISITE_CODE SYSRES_CONST_KINDS_EDOC_ALL_TEPLATES_ALLOWED_REQUISITE_CODE SYSRES_CONST_KINDS_EDOC_ALLOW_LIFE_CYCLE_STAGE_\
CHANGING_REQUISITE_CODE SYSRES_CONST_KINDS_EDOC_ALLOW_MULTIPLE_ACTIVE_VERSIONS_REQUISITE_CODE SYSRES_CONST_KINDS_EDOC_SHARE_ACCES_RIGHTS_BY_DEFAULT_CODE SYSRES_CONST_KINDS_EDOC_TEMPLATE_REQUISITE_CODE SYSRES_CONST_KINDS_EDOC_TYPE_REQUISITE_CODE SYSRES_CONST_KINDS_SIGNERS_REQUISITES_CODE SYSRES_CONST_KOD_INPUT_TYPE SYSRES_CONST_LAST_UPDATE_DATE_REQUISITE_CODE SYSRES_CONST_LIFE_CYCLE_START_STAGE_REQUISITE_CODE SYSRES_CONST_LILAC_LIFE_CYCLE_STAGE_FONT_COLOR SYSRES_CONST_LINK_OBJECT_KIND_COMPONENT S\
YSRES_CONST_LINK_OBJECT_KIND_DOCUMENT SYSRES_CONST_LINK_OBJECT_KIND_EDOC SYSRES_CONST_LINK_OBJECT_KIND_FOLDER SYSRES_CONST_LINK_OBJECT_KIND_JOB SYSRES_CONST_LINK_OBJECT_KIND_REFERENCE SYSRES_CONST_LINK_OBJECT_KIND_TASK SYSRES_CONST_LINK_REF_TYPE_REQUISITE_CODE SYSRES_CONST_LIST_REFERENCE_MODE_NAME SYSRES_CONST_LOCALIZATION_DICTIONARY_MAIN_VIEW_CODE SYSRES_CONST_MAIN_VIEW_CODE SYSRES_CONST_MANUAL_ENUM_METHOD_FLAG SYSRES_CONST_MASTER_COMP_TYPE_REQUISITE_CODE SYSRES_CONST_MASTER_TABLE_REC_ID_REQUIS\
ITE_CODE SYSRES_CONST_MAXIMIZED_MODE_NAME SYSRES_CONST_ME_VALUE SYSRES_CONST_MESSAGE_ATTENTION_CAPTION SYSRES_CONST_MESSAGE_CONFIRMATION_CAPTION SYSRES_CONST_MESSAGE_ERROR_CAPTION SYSRES_CONST_MESSAGE_INFORMATION_CAPTION SYSRES_CONST_MINIMIZED_MODE_NAME SYSRES_CONST_MINUTE_CHAR SYSRES_CONST_MODULE_REQUISITE_CODE SYSRES_CONST_MONITORING_BLOCK_DESCRIPTION SYSRES_CONST_MONTH_FORMAT_VALUE SYSRES_CONST_NAME_LOCALIZE_ID_REQUISITE_CODE SYSRES_CONST_NAME_REQUISITE_CODE SYSRES_CONST_NAME_SINGULAR_REQUISI\
TE_CODE SYSRES_CONST_NAMEAN_INPUT_TYPE SYSRES_CONST_NEGATIVE_PICK_VALUE SYSRES_CONST_NEGATIVE_VALUE SYSRES_CONST_NO SYSRES_CONST_NO_PICK_VALUE SYSRES_CONST_NO_SIGNATURE_REQUISITE_CODE SYSRES_CONST_NO_VALUE SYSRES_CONST_NONE_ACCESS_RIGHTS_TYPE_CODE SYSRES_CONST_NONOPERATING_RECORD_FLAG_VALUE SYSRES_CONST_NONOPERATING_RECORD_FLAG_VALUE_MASCULINE SYSRES_CONST_NORMAL_ACCESS_RIGHTS_TYPE_CODE SYSRES_CONST_NORMAL_LIFE_CYCLE_STAGE_DRAW_STYLE SYSRES_CONST_NORMAL_MODE_NAME SYSRES_CONST_NOT_ALLOWED_ACCESS_\
TYPE_CODE SYSRES_CONST_NOT_ALLOWED_ACCESS_TYPE_NAME SYSRES_CONST_NOTE_REQUISITE_CODE SYSRES_CONST_NOTICE_BLOCK_DESCRIPTION SYSRES_CONST_NUM_REQUISITE SYSRES_CONST_NUM_STR_REQUISITE_CODE SYSRES_CONST_NUMERATION_AUTO_NOT_STRONG SYSRES_CONST_NUMERATION_AUTO_STRONG SYSRES_CONST_NUMERATION_FROM_DICTONARY SYSRES_CONST_NUMERATION_MANUAL SYSRES_CONST_NUMERIC_TYPE_CHAR SYSRES_CONST_NUMREQ_REQUISITE_CODE SYSRES_CONST_OBSOLETE_VERSION_STATE_PICK_VALUE SYSRES_CONST_OPERATING_RECORD_FLAG_VALUE SYSRES_CONST_O\
PERATING_RECORD_FLAG_VALUE_CODE SYSRES_CONST_OPERATING_RECORD_FLAG_VALUE_FEMININE SYSRES_CONST_OPERATING_RECORD_FLAG_VALUE_MASCULINE SYSRES_CONST_OPTIONAL_FORM_COMP_REQCODE_PREFIX SYSRES_CONST_ORANGE_LIFE_CYCLE_STAGE_FONT_COLOR SYSRES_CONST_ORIGINALREF_REQUISITE_CODE SYSRES_CONST_OURFIRM_REF_CODE SYSRES_CONST_OURFIRM_REQUISITE_CODE SYSRES_CONST_OURFIRM_VAR SYSRES_CONST_OUTGOING_WORK_RULE_TYPE_CODE SYSRES_CONST_PICK_NEGATIVE_RESULT SYSRES_CONST_PICK_POSITIVE_RESULT SYSRES_CONST_PICK_REQUISITE SYS\
RES_CONST_PICK_REQUISITE_TYPE SYSRES_CONST_PICK_TYPE_CHAR SYSRES_CONST_PLAN_STATUS_REQUISITE_CODE SYSRES_CONST_PLATFORM_VERSION_COMMENT SYSRES_CONST_PLUGINS_SETTINGS_DESCRIPTION_REQUISITE_CODE SYSRES_CONST_POSITIVE_PICK_VALUE SYSRES_CONST_POWER_TO_CREATE_ACTION_CODE SYSRES_CONST_POWER_TO_SIGN_ACTION_CODE SYSRES_CONST_PRIORITY_REQUISITE_CODE SYSRES_CONST_QUALIFIED_TASK_TYPE SYSRES_CONST_QUALIFIED_TASK_TYPE_CODE SYSRES_CONST_RECSTAT_REQUISITE_CODE SYSRES_CONST_RED_LIFE_CYCLE_STAGE_FONT_COLOR SYSRE\
S_CONST_REF_ID_T_REF_TYPE_REQUISITE_CODE SYSRES_CONST_REF_REQUISITE SYSRES_CONST_REF_REQUISITE_TYPE SYSRES_CONST_REF_REQUISITES_REFERENCE_CODE_SELECTED_REQUISITE SYSRES_CONST_REFERENCE_RECORD_HISTORY_CREATE_ACTION_CODE SYSRES_CONST_REFERENCE_RECORD_HISTORY_DELETE_ACTION_CODE SYSRES_CONST_REFERENCE_RECORD_HISTORY_MODIFY_ACTION_CODE SYSRES_CONST_REFERENCE_TYPE_CHAR SYSRES_CONST_REFERENCE_TYPE_REQUISITE_NAME SYSRES_CONST_REFERENCES_ADD_PARAMS_REQUISITE_CODE SYSRES_CONST_REFERENCES_DISPLAY_REQUISITE\
_REQUISITE_CODE SYSRES_CONST_REMOTE_SERVER_STATUS_WORKING SYSRES_CONST_REMOTE_SERVER_TYPE_MAIN SYSRES_CONST_REMOTE_SERVER_TYPE_SECONDARY SYSRES_CONST_REMOTE_USER_FLAG_VALUE_CODE SYSRES_CONST_REPORT_APP_EDITOR_INTERNAL SYSRES_CONST_REPORT_BASE_REPORT_ID_REQUISITE_CODE SYSRES_CONST_REPORT_BASE_REPORT_REQUISITE_CODE SYSRES_CONST_REPORT_SCRIPT_REQUISITE_CODE SYSRES_CONST_REPORT_TEMPLATE_REQUISITE_CODE SYSRES_CONST_REPORT_VIEWER_CODE_REQUISITE_CODE SYSRES_CONST_REQ_ALLOW_COMPONENT_DEFAULT_VALUE SYSRE\
S_CONST_REQ_ALLOW_RECORD_DEFAULT_VALUE SYSRES_CONST_REQ_ALLOW_SERVER_COMPONENT_DEFAULT_VALUE SYSRES_CONST_REQ_MODE_AVAILABLE_CODE SYSRES_CONST_REQ_MODE_EDIT_CODE SYSRES_CONST_REQ_MODE_HIDDEN_CODE SYSRES_CONST_REQ_MODE_NOT_AVAILABLE_CODE SYSRES_CONST_REQ_MODE_VIEW_CODE SYSRES_CONST_REQ_NUMBER_REQUISITE_CODE SYSRES_CONST_REQ_SECTION_VALUE SYSRES_CONST_REQ_TYPE_VALUE SYSRES_CONST_REQUISITE_FORMAT_BY_UNIT SYSRES_CONST_REQUISITE_FORMAT_DATE_FULL SYSRES_CONST_REQUISITE_FORMAT_DATE_TIME SYSRES_CONST_RE\
QUISITE_FORMAT_LEFT SYSRES_CONST_REQUISITE_FORMAT_RIGHT SYSRES_CONST_REQUISITE_FORMAT_WITHOUT_UNIT SYSRES_CONST_REQUISITE_NUMBER_REQUISITE_CODE SYSRES_CONST_REQUISITE_SECTION_ACTIONS SYSRES_CONST_REQUISITE_SECTION_BUTTON SYSRES_CONST_REQUISITE_SECTION_BUTTONS SYSRES_CONST_REQUISITE_SECTION_CARD SYSRES_CONST_REQUISITE_SECTION_TABLE SYSRES_CONST_REQUISITE_SECTION_TABLE10 SYSRES_CONST_REQUISITE_SECTION_TABLE11 SYSRES_CONST_REQUISITE_SECTION_TABLE12 SYSRES_CONST_REQUISITE_SECTION_TABLE13 SYSRES_CONS\
T_REQUISITE_SECTION_TABLE14 SYSRES_CONST_REQUISITE_SECTION_TABLE15 SYSRES_CONST_REQUISITE_SECTION_TABLE16 SYSRES_CONST_REQUISITE_SECTION_TABLE17 SYSRES_CONST_REQUISITE_SECTION_TABLE18 SYSRES_CONST_REQUISITE_SECTION_TABLE19 SYSRES_CONST_REQUISITE_SECTION_TABLE2 SYSRES_CONST_REQUISITE_SECTION_TABLE20 SYSRES_CONST_REQUISITE_SECTION_TABLE21 SYSRES_CONST_REQUISITE_SECTION_TABLE22 SYSRES_CONST_REQUISITE_SECTION_TABLE23 SYSRES_CONST_REQUISITE_SECTION_TABLE24 SYSRES_CONST_REQUISITE_SECTION_TABLE3 SYSRES\
_CONST_REQUISITE_SECTION_TABLE4 SYSRES_CONST_REQUISITE_SECTION_TABLE5 SYSRES_CONST_REQUISITE_SECTION_TABLE6 SYSRES_CONST_REQUISITE_SECTION_TABLE7 SYSRES_CONST_REQUISITE_SECTION_TABLE8 SYSRES_CONST_REQUISITE_SECTION_TABLE9 SYSRES_CONST_REQUISITES_PSEUDOREFERENCE_REQUISITE_NUMBER_REQUISITE_CODE SYSRES_CONST_RIGHT_ALIGNMENT_CODE SYSRES_CONST_ROLES_REFERENCE_CODE SYSRES_CONST_ROUTE_STEP_AFTER_RUS SYSRES_CONST_ROUTE_STEP_AND_CONDITION_RUS SYSRES_CONST_ROUTE_STEP_OR_CONDITION_RUS SYSRES_CONST_ROUTE_TY\
PE_COMPLEX SYSRES_CONST_ROUTE_TYPE_PARALLEL SYSRES_CONST_ROUTE_TYPE_SERIAL SYSRES_CONST_SBDATASETDESC_NEGATIVE_VALUE SYSRES_CONST_SBDATASETDESC_POSITIVE_VALUE SYSRES_CONST_SBVIEWSDESC_POSITIVE_VALUE SYSRES_CONST_SCRIPT_BLOCK_DESCRIPTION SYSRES_CONST_SEARCH_BY_TEXT_REQUISITE_CODE SYSRES_CONST_SEARCHES_COMPONENT_CONTENT SYSRES_CONST_SEARCHES_CRITERIA_ACTION_NAME SYSRES_CONST_SEARCHES_EDOC_CONTENT SYSRES_CONST_SEARCHES_FOLDER_CONTENT SYSRES_CONST_SEARCHES_JOB_CONTENT SYSRES_CONST_SEARCHES_REFERENCE\
_CODE SYSRES_CONST_SEARCHES_TASK_CONTENT SYSRES_CONST_SECOND_CHAR SYSRES_CONST_SECTION_REQUISITE_ACTIONS_VALUE SYSRES_CONST_SECTION_REQUISITE_CARD_VALUE SYSRES_CONST_SECTION_REQUISITE_CODE SYSRES_CONST_SECTION_REQUISITE_DETAIL_1_VALUE SYSRES_CONST_SECTION_REQUISITE_DETAIL_2_VALUE SYSRES_CONST_SECTION_REQUISITE_DETAIL_3_VALUE SYSRES_CONST_SECTION_REQUISITE_DETAIL_4_VALUE SYSRES_CONST_SECTION_REQUISITE_DETAIL_5_VALUE SYSRES_CONST_SECTION_REQUISITE_DETAIL_6_VALUE SYSRES_CONST_SELECT_REFERENCE_MODE_\
NAME SYSRES_CONST_SELECT_TYPE_SELECTABLE SYSRES_CONST_SELECT_TYPE_SELECTABLE_ONLY_CHILD SYSRES_CONST_SELECT_TYPE_SELECTABLE_WITH_CHILD SYSRES_CONST_SELECT_TYPE_UNSLECTABLE SYSRES_CONST_SERVER_TYPE_MAIN SYSRES_CONST_SERVICE_USER_CATEGORY_FIELD_VALUE SYSRES_CONST_SETTINGS_USER_REQUISITE_CODE SYSRES_CONST_SIGNATURE_AND_ENCODE_CERTIFICATE_TYPE_CODE SYSRES_CONST_SIGNATURE_CERTIFICATE_TYPE_CODE SYSRES_CONST_SINGULAR_TITLE_REQUISITE_CODE SYSRES_CONST_SQL_SERVER_AUTHENTIFICATION_FLAG_VALUE_CODE SYSRES_C\
ONST_SQL_SERVER_ENCODE_AUTHENTIFICATION_FLAG_VALUE_CODE SYSRES_CONST_STANDART_ROUTE_REFERENCE_CODE SYSRES_CONST_STANDART_ROUTE_REFERENCE_COMMENT_REQUISITE_CODE SYSRES_CONST_STANDART_ROUTES_GROUPS_REFERENCE_CODE SYSRES_CONST_STATE_REQ_NAME SYSRES_CONST_STATE_REQUISITE_ACTIVE_VALUE SYSRES_CONST_STATE_REQUISITE_CLOSED_VALUE SYSRES_CONST_STATE_REQUISITE_CODE SYSRES_CONST_STATIC_ROLE_TYPE_CODE SYSRES_CONST_STATUS_PLAN_DEFAULT_VALUE SYSRES_CONST_STATUS_VALUE_AUTOCLEANING SYSRES_CONST_STATUS_VALUE_BLUE\
_SQUARE SYSRES_CONST_STATUS_VALUE_COMPLETE SYSRES_CONST_STATUS_VALUE_GREEN_SQUARE SYSRES_CONST_STATUS_VALUE_ORANGE_SQUARE SYSRES_CONST_STATUS_VALUE_PURPLE_SQUARE SYSRES_CONST_STATUS_VALUE_RED_SQUARE SYSRES_CONST_STATUS_VALUE_SUSPEND SYSRES_CONST_STATUS_VALUE_YELLOW_SQUARE SYSRES_CONST_STDROUTE_SHOW_TO_USERS_REQUISITE_CODE SYSRES_CONST_STORAGE_TYPE_FILE SYSRES_CONST_STORAGE_TYPE_SQL_SERVER SYSRES_CONST_STR_REQUISITE SYSRES_CONST_STRIKEOUT_LIFE_CYCLE_STAGE_DRAW_STYLE SYSRES_CONST_STRING_FORMAT_LEF\
T_ALIGN_CHAR SYSRES_CONST_STRING_FORMAT_RIGHT_ALIGN_CHAR SYSRES_CONST_STRING_REQUISITE_CODE SYSRES_CONST_STRING_REQUISITE_TYPE SYSRES_CONST_STRING_TYPE_CHAR SYSRES_CONST_SUBSTITUTES_PSEUDOREFERENCE_CODE SYSRES_CONST_SUBTASK_BLOCK_DESCRIPTION SYSRES_CONST_SYSTEM_SETTING_CURRENT_USER_PARAM_VALUE SYSRES_CONST_SYSTEM_SETTING_EMPTY_VALUE_PARAM_VALUE SYSRES_CONST_SYSTEM_VERSION_COMMENT SYSRES_CONST_TASK_ACCESS_TYPE_ALL SYSRES_CONST_TASK_ACCESS_TYPE_ALL_MEMBERS SYSRES_CONST_TASK_ACCESS_TYPE_MANUAL SYSR\
ES_CONST_TASK_ENCODE_TYPE_CERTIFICATION SYSRES_CONST_TASK_ENCODE_TYPE_CERTIFICATION_AND_PASSWORD SYSRES_CONST_TASK_ENCODE_TYPE_NONE SYSRES_CONST_TASK_ENCODE_TYPE_PASSWORD SYSRES_CONST_TASK_ROUTE_ALL_CONDITION SYSRES_CONST_TASK_ROUTE_AND_CONDITION SYSRES_CONST_TASK_ROUTE_OR_CONDITION SYSRES_CONST_TASK_STATE_ABORTED SYSRES_CONST_TASK_STATE_COMPLETE SYSRES_CONST_TASK_STATE_CONTINUED SYSRES_CONST_TASK_STATE_CONTROL SYSRES_CONST_TASK_STATE_INIT SYSRES_CONST_TASK_STATE_WORKING SYSRES_CONST_TASK_TITLE \
SYSRES_CONST_TASK_TYPES_GROUPS_REFERENCE_CODE SYSRES_CONST_TASK_TYPES_REFERENCE_CODE SYSRES_CONST_TEMPLATES_REFERENCE_CODE SYSRES_CONST_TEST_DATE_REQUISITE_NAME SYSRES_CONST_TEST_DEV_DATABASE_NAME SYSRES_CONST_TEST_DEV_SYSTEM_CODE SYSRES_CONST_TEST_EDMS_DATABASE_NAME SYSRES_CONST_TEST_EDMS_MAIN_CODE SYSRES_CONST_TEST_EDMS_MAIN_DB_NAME SYSRES_CONST_TEST_EDMS_SECOND_CODE SYSRES_CONST_TEST_EDMS_SECOND_DB_NAME SYSRES_CONST_TEST_EDMS_SYSTEM_CODE SYSRES_CONST_TEST_NUMERIC_REQUISITE_NAME SYSRES_CONST_T\
EXT_REQUISITE SYSRES_CONST_TEXT_REQUISITE_CODE SYSRES_CONST_TEXT_REQUISITE_TYPE SYSRES_CONST_TEXT_TYPE_CHAR SYSRES_CONST_TYPE_CODE_REQUISITE_CODE SYSRES_CONST_TYPE_REQUISITE_CODE SYSRES_CONST_UNDEFINED_LIFE_CYCLE_STAGE_FONT_COLOR SYSRES_CONST_UNITS_SECTION_ID_REQUISITE_CODE SYSRES_CONST_UNITS_SECTION_REQUISITE_CODE SYSRES_CONST_UNOPERATING_RECORD_FLAG_VALUE_CODE SYSRES_CONST_UNSTORED_DATA_REQUISITE_CODE SYSRES_CONST_UNSTORED_DATA_REQUISITE_NAME SYSRES_CONST_USE_ACCESS_TYPE_CODE SYSRES_CONST_USE_\
ACCESS_TYPE_NAME SYSRES_CONST_USER_ACCOUNT_TYPE_VALUE_CODE SYSRES_CONST_USER_ADDITIONAL_INFORMATION_REQUISITE_CODE SYSRES_CONST_USER_AND_GROUP_ID_FROM_PSEUDOREFERENCE_REQUISITE_CODE SYSRES_CONST_USER_CATEGORY_NORMAL SYSRES_CONST_USER_CERTIFICATE_REQUISITE_CODE SYSRES_CONST_USER_CERTIFICATE_STATE_REQUISITE_CODE SYSRES_CONST_USER_CERTIFICATE_SUBJECT_NAME_REQUISITE_CODE SYSRES_CONST_USER_CERTIFICATE_THUMBPRINT_REQUISITE_CODE SYSRES_CONST_USER_COMMON_CATEGORY SYSRES_CONST_USER_COMMON_CATEGORY_CODE S\
YSRES_CONST_USER_FULL_NAME_REQUISITE_CODE SYSRES_CONST_USER_GROUP_TYPE_REQUISITE_CODE SYSRES_CONST_USER_LOGIN_REQUISITE_CODE SYSRES_CONST_USER_REMOTE_CONTROLLER_REQUISITE_CODE SYSRES_CONST_USER_REMOTE_SYSTEM_REQUISITE_CODE SYSRES_CONST_USER_RIGHTS_T_REQUISITE_CODE SYSRES_CONST_USER_SERVER_NAME_REQUISITE_CODE SYSRES_CONST_USER_SERVICE_CATEGORY SYSRES_CONST_USER_SERVICE_CATEGORY_CODE SYSRES_CONST_USER_STATUS_ADMINISTRATOR_CODE SYSRES_CONST_USER_STATUS_ADMINISTRATOR_NAME SYSRES_CONST_USER_STATUS_DE\
VELOPER_CODE SYSRES_CONST_USER_STATUS_DEVELOPER_NAME SYSRES_CONST_USER_STATUS_DISABLED_CODE SYSRES_CONST_USER_STATUS_DISABLED_NAME SYSRES_CONST_USER_STATUS_SYSTEM_DEVELOPER_CODE SYSRES_CONST_USER_STATUS_USER_CODE SYSRES_CONST_USER_STATUS_USER_NAME SYSRES_CONST_USER_STATUS_USER_NAME_DEPRECATED SYSRES_CONST_USER_TYPE_FIELD_VALUE_USER SYSRES_CONST_USER_TYPE_REQUISITE_CODE SYSRES_CONST_USERS_CONTROLLER_REQUISITE_CODE SYSRES_CONST_USERS_IS_MAIN_SERVER_REQUISITE_CODE SYSRES_CONST_USERS_REFERENCE_CODE \
SYSRES_CONST_USERS_REGISTRATION_CERTIFICATES_ACTION_NAME SYSRES_CONST_USERS_REQUISITE_CODE SYSRES_CONST_USERS_SYSTEM_REQUISITE_CODE SYSRES_CONST_USERS_USER_ACCESS_RIGHTS_TYPR_REQUISITE_CODE SYSRES_CONST_USERS_USER_AUTHENTICATION_REQUISITE_CODE SYSRES_CONST_USERS_USER_COMPONENT_REQUISITE_CODE SYSRES_CONST_USERS_USER_GROUP_REQUISITE_CODE SYSRES_CONST_USERS_VIEW_CERTIFICATES_ACTION_NAME SYSRES_CONST_VIEW_DEFAULT_CODE SYSRES_CONST_VIEW_DEFAULT_NAME SYSRES_CONST_VIEWER_REQUISITE_CODE SYSRES_CONST_WAI\
TING_BLOCK_DESCRIPTION SYSRES_CONST_WIZARD_FORM_LABEL_TEST_STRING  SYSRES_CONST_WIZARD_QUERY_PARAM_HEIGHT_ETALON_STRING SYSRES_CONST_WIZARD_REFERENCE_COMMENT_REQUISITE_CODE SYSRES_CONST_WORK_RULES_DESCRIPTION_REQUISITE_CODE SYSRES_CONST_WORK_TIME_CALENDAR_REFERENCE_CODE SYSRES_CONST_WORK_WORKFLOW_HARD_ROUTE_TYPE_VALUE SYSRES_CONST_WORK_WORKFLOW_HARD_ROUTE_TYPE_VALUE_CODE SYSRES_CONST_WORK_WORKFLOW_HARD_ROUTE_TYPE_VALUE_CODE_RUS SYSRES_CONST_WORK_WORKFLOW_SOFT_ROUTE_TYPE_VALUE_CODE_RUS SYSRES_CON\
ST_WORKFLOW_ROUTE_TYPR_HARD SYSRES_CONST_WORKFLOW_ROUTE_TYPR_SOFT SYSRES_CONST_XML_ENCODING SYSRES_CONST_XREC_STAT_REQUISITE_CODE SYSRES_CONST_XRECID_FIELD_NAME SYSRES_CONST_YES SYSRES_CONST_YES_NO_2_REQUISITE_CODE SYSRES_CONST_YES_NO_REQUISITE_CODE SYSRES_CONST_YES_NO_T_REF_TYPE_REQUISITE_CODE SYSRES_CONST_YES_PICK_VALUE SYSRES_CONST_YES_VALUE "+"CR FALSE nil NO_VALUE NULL TAB TRUE YES_VALUE "+"ADMINISTRATORS_GROUP_NAME CUSTOMIZERS_GROUP_NAME DEVELOPERS_GROUP_NAME SERVICE_USERS_GROUP_NAME "+"DE\
CISION_BLOCK_FIRST_OPERAND_PROPERTY DECISION_BLOCK_NAME_PROPERTY DECISION_BLOCK_OPERATION_PROPERTY DECISION_BLOCK_RESULT_TYPE_PROPERTY DECISION_BLOCK_SECOND_OPERAND_PROPERTY "+"ANY_FILE_EXTENTION COMPRESSED_DOCUMENT_EXTENSION EXTENDED_DOCUMENT_EXTENSION SHORT_COMPRESSED_DOCUMENT_EXTENSION SHORT_EXTENDED_DOCUMENT_EXTENSION "+"JOB_BLOCK_ABORT_DEADLINE_PROPERTY JOB_BLOCK_AFTER_FINISH_EVENT JOB_BLOCK_AFTER_QUERY_PARAMETERS_EVENT JOB_BLOCK_ATTACHMENT_PROPERTY JOB_BLOCK_ATTACHMENTS_RIGHTS_GROUP_PROPER\
TY JOB_BLOCK_ATTACHMENTS_RIGHTS_TYPE_PROPERTY JOB_BLOCK_BEFORE_QUERY_PARAMETERS_EVENT JOB_BLOCK_BEFORE_START_EVENT JOB_BLOCK_CREATED_JOBS_PROPERTY JOB_BLOCK_DEADLINE_PROPERTY JOB_BLOCK_EXECUTION_RESULTS_PROPERTY JOB_BLOCK_IS_PARALLEL_PROPERTY JOB_BLOCK_IS_RELATIVE_ABORT_DEADLINE_PROPERTY JOB_BLOCK_IS_RELATIVE_DEADLINE_PROPERTY JOB_BLOCK_JOB_TEXT_PROPERTY JOB_BLOCK_NAME_PROPERTY JOB_BLOCK_NEED_SIGN_ON_PERFORM_PROPERTY JOB_BLOCK_PERFORMER_PROPERTY JOB_BLOCK_RELATIVE_ABORT_DEADLINE_TYPE_PROPERTY JO\
B_BLOCK_RELATIVE_DEADLINE_TYPE_PROPERTY JOB_BLOCK_SUBJECT_PROPERTY "+"ENGLISH_LANGUAGE_CODE RUSSIAN_LANGUAGE_CODE "+"smHidden smMaximized smMinimized smNormal wmNo wmYes "+"COMPONENT_TOKEN_LINK_KIND DOCUMENT_LINK_KIND EDOCUMENT_LINK_KIND FOLDER_LINK_KIND JOB_LINK_KIND REFERENCE_LINK_KIND TASK_LINK_KIND "+"COMPONENT_TOKEN_LOCK_TYPE EDOCUMENT_VERSION_LOCK_TYPE "+"MONITOR_BLOCK_AFTER_FINISH_EVENT MONITOR_BLOCK_BEFORE_START_EVENT MONITOR_BLOCK_DEADLINE_PROPERTY MONITOR_BLOCK_INTERVAL_PROPERTY MONITO\
R_BLOCK_INTERVAL_TYPE_PROPERTY MONITOR_BLOCK_IS_RELATIVE_DEADLINE_PROPERTY MONITOR_BLOCK_NAME_PROPERTY MONITOR_BLOCK_RELATIVE_DEADLINE_TYPE_PROPERTY MONITOR_BLOCK_SEARCH_SCRIPT_PROPERTY "+"NOTICE_BLOCK_AFTER_FINISH_EVENT NOTICE_BLOCK_ATTACHMENT_PROPERTY NOTICE_BLOCK_ATTACHMENTS_RIGHTS_GROUP_PROPERTY NOTICE_BLOCK_ATTACHMENTS_RIGHTS_TYPE_PROPERTY NOTICE_BLOCK_BEFORE_START_EVENT NOTICE_BLOCK_CREATED_NOTICES_PROPERTY NOTICE_BLOCK_DEADLINE_PROPERTY NOTICE_BLOCK_IS_RELATIVE_DEADLINE_PROPERTY NOTICE_BL\
OCK_NAME_PROPERTY NOTICE_BLOCK_NOTICE_TEXT_PROPERTY NOTICE_BLOCK_PERFORMER_PROPERTY NOTICE_BLOCK_RELATIVE_DEADLINE_TYPE_PROPERTY NOTICE_BLOCK_SUBJECT_PROPERTY "+"dseAfterCancel dseAfterClose dseAfterDelete dseAfterDeleteOutOfTransaction dseAfterInsert dseAfterOpen dseAfterScroll dseAfterUpdate dseAfterUpdateOutOfTransaction dseBeforeCancel dseBeforeClose dseBeforeDelete dseBeforeDetailUpdate dseBeforeInsert dseBeforeOpen dseBeforeUpdate dseOnAnyRequisiteChange dseOnCloseRecord dseOnDeleteError d\
seOnOpenRecord dseOnPrepareUpdate dseOnUpdateError dseOnUpdateRatifiedRecord dseOnValidDelete dseOnValidUpdate reOnChange reOnChangeValues SELECTION_BEGIN_ROUTE_EVENT SELECTION_END_ROUTE_EVENT "+"CURRENT_PERIOD_IS_REQUIRED PREVIOUS_CARD_TYPE_NAME SHOW_RECORD_PROPERTIES_FORM "+"ACCESS_RIGHTS_SETTING_DIALOG_CODE ADMINISTRATOR_USER_CODE ANALYTIC_REPORT_TYPE asrtHideLocal asrtHideRemote CALCULATED_ROLE_TYPE_CODE COMPONENTS_REFERENCE_DEVELOPER_VIEW_CODE DCTS_TEST_PROTOCOLS_FOLDER_PATH E_EDOC_VERSION_\
ALREADY_APPROVINGLY_SIGNED E_EDOC_VERSION_ALREADY_APPROVINGLY_SIGNED_BY_USER E_EDOC_VERSION_ALREDY_SIGNED E_EDOC_VERSION_ALREDY_SIGNED_BY_USER EDOC_TYPES_CODE_REQUISITE_FIELD_NAME EDOCUMENTS_ALIAS_NAME FILES_FOLDER_PATH FILTER_OPERANDS_DELIMITER FILTER_OPERATIONS_DELIMITER FORMCARD_NAME FORMLIST_NAME GET_EXTENDED_DOCUMENT_EXTENSION_CREATION_MODE GET_EXTENDED_DOCUMENT_EXTENSION_IMPORT_MODE INTEGRATED_REPORT_TYPE IS_BUILDER_APPLICATION_ROLE IS_BUILDER_APPLICATION_ROLE2 IS_BUILDER_USERS ISBSYSDEV L\
OG_FOLDER_PATH mbCancel mbNo mbNoToAll mbOK mbYes mbYesToAll MEMORY_DATASET_DESRIPTIONS_FILENAME mrNo mrNoToAll mrYes mrYesToAll MULTIPLE_SELECT_DIALOG_CODE NONOPERATING_RECORD_FLAG_FEMININE NONOPERATING_RECORD_FLAG_MASCULINE OPERATING_RECORD_FLAG_FEMININE OPERATING_RECORD_FLAG_MASCULINE PROFILING_SETTINGS_COMMON_SETTINGS_CODE_VALUE PROGRAM_INITIATED_LOOKUP_ACTION ratDelete ratEdit ratInsert REPORT_TYPE REQUIRED_PICK_VALUES_VARIABLE rmCard rmList SBRTE_PROGID_DEV SBRTE_PROGID_RELEASE STATIC_ROLE\
_TYPE_CODE SUPPRESS_EMPTY_TEMPLATE_CREATION SYSTEM_USER_CODE UPDATE_DIALOG_DATASET USED_IN_OBJECT_HINT_PARAM USER_INITIATED_LOOKUP_ACTION USER_NAME_FORMAT USER_SELECTION_RESTRICTIONS WORKFLOW_TEST_PROTOCOLS_FOLDER_PATH ELS_SUBTYPE_CONTROL_NAME ELS_FOLDER_KIND_CONTROL_NAME REPEAT_PROCESS_CURRENT_OBJECT_EXCEPTION_NAME "+"PRIVILEGE_COMPONENT_FULL_ACCESS PRIVILEGE_DEVELOPMENT_EXPORT PRIVILEGE_DEVELOPMENT_IMPORT PRIVILEGE_DOCUMENT_DELETE PRIVILEGE_ESD PRIVILEGE_FOLDER_DELETE PRIVILEGE_MANAGE_ACCESS_R\
IGHTS PRIVILEGE_MANAGE_REPLICATION PRIVILEGE_MANAGE_SESSION_SERVER PRIVILEGE_OBJECT_FULL_ACCESS PRIVILEGE_OBJECT_VIEW PRIVILEGE_RESERVE_LICENSE PRIVILEGE_SYSTEM_CUSTOMIZE PRIVILEGE_SYSTEM_DEVELOP PRIVILEGE_SYSTEM_INSTALL PRIVILEGE_TASK_DELETE PRIVILEGE_USER_PLUGIN_SETTINGS_CUSTOMIZE PRIVILEGES_PSEUDOREFERENCE_CODE "+"ACCESS_TYPES_PSEUDOREFERENCE_CODE ALL_AVAILABLE_COMPONENTS_PSEUDOREFERENCE_CODE ALL_AVAILABLE_PRIVILEGES_PSEUDOREFERENCE_CODE ALL_REPLICATE_COMPONENTS_PSEUDOREFERENCE_CODE AVAILABLE\
_DEVELOPERS_COMPONENTS_PSEUDOREFERENCE_CODE COMPONENTS_PSEUDOREFERENCE_CODE FILTRATER_SETTINGS_CONFLICTS_PSEUDOREFERENCE_CODE GROUPS_PSEUDOREFERENCE_CODE RECEIVE_PROTOCOL_PSEUDOREFERENCE_CODE REFERENCE_REQUISITE_PSEUDOREFERENCE_CODE REFERENCE_REQUISITES_PSEUDOREFERENCE_CODE REFTYPES_PSEUDOREFERENCE_CODE REPLICATION_SEANCES_DIARY_PSEUDOREFERENCE_CODE SEND_PROTOCOL_PSEUDOREFERENCE_CODE SUBSTITUTES_PSEUDOREFERENCE_CODE SYSTEM_SETTINGS_PSEUDOREFERENCE_CODE UNITS_PSEUDOREFERENCE_CODE USERS_PSEUDOREFE\
RENCE_CODE VIEWERS_PSEUDOREFERENCE_CODE "+"CERTIFICATE_TYPE_ENCRYPT CERTIFICATE_TYPE_SIGN CERTIFICATE_TYPE_SIGN_AND_ENCRYPT "+"STORAGE_TYPE_FILE STORAGE_TYPE_NAS_CIFS STORAGE_TYPE_SAPERION STORAGE_TYPE_SQL_SERVER "+"COMPTYPE2_REQUISITE_DOCUMENTS_VALUE COMPTYPE2_REQUISITE_TASKS_VALUE COMPTYPE2_REQUISITE_FOLDERS_VALUE COMPTYPE2_REQUISITE_REFERENCES_VALUE "+"SYSREQ_CODE SYSREQ_COMPTYPE2 SYSREQ_CONST_AVAILABLE_FOR_WEB SYSREQ_CONST_COMMON_CODE SYSREQ_CONST_COMMON_VALUE SYSREQ_CONST_FIRM_CODE SYSREQ_C\
ONST_FIRM_STATUS SYSREQ_CONST_FIRM_VALUE SYSREQ_CONST_SERVER_STATUS SYSREQ_CONTENTS SYSREQ_DATE_OPEN SYSREQ_DATE_CLOSE SYSREQ_DESCRIPTION SYSREQ_DESCRIPTION_LOCALIZE_ID SYSREQ_DOUBLE SYSREQ_EDOC_ACCESS_TYPE SYSREQ_EDOC_AUTHOR SYSREQ_EDOC_CREATED SYSREQ_EDOC_DELEGATE_RIGHTS_REQUISITE_CODE SYSREQ_EDOC_EDITOR SYSREQ_EDOC_ENCODE_TYPE SYSREQ_EDOC_ENCRYPTION_PLUGIN_NAME SYSREQ_EDOC_ENCRYPTION_PLUGIN_VERSION SYSREQ_EDOC_EXPORT_DATE SYSREQ_EDOC_EXPORTER SYSREQ_EDOC_KIND SYSREQ_EDOC_LIFE_STAGE_NAME SYSRE\
Q_EDOC_LOCKED_FOR_SERVER_CODE SYSREQ_EDOC_MODIFIED SYSREQ_EDOC_NAME SYSREQ_EDOC_NOTE SYSREQ_EDOC_QUALIFIED_ID SYSREQ_EDOC_SESSION_KEY SYSREQ_EDOC_SESSION_KEY_ENCRYPTION_PLUGIN_NAME SYSREQ_EDOC_SESSION_KEY_ENCRYPTION_PLUGIN_VERSION SYSREQ_EDOC_SIGNATURE_TYPE SYSREQ_EDOC_SIGNED SYSREQ_EDOC_STORAGE SYSREQ_EDOC_STORAGES_ARCHIVE_STORAGE SYSREQ_EDOC_STORAGES_CHECK_RIGHTS SYSREQ_EDOC_STORAGES_COMPUTER_NAME SYSREQ_EDOC_STORAGES_EDIT_IN_STORAGE SYSREQ_EDOC_STORAGES_EXECUTIVE_STORAGE SYSREQ_EDOC_STORAGES_\
FUNCTION SYSREQ_EDOC_STORAGES_INITIALIZED SYSREQ_EDOC_STORAGES_LOCAL_PATH SYSREQ_EDOC_STORAGES_SAPERION_DATABASE_NAME SYSREQ_EDOC_STORAGES_SEARCH_BY_TEXT SYSREQ_EDOC_STORAGES_SERVER_NAME SYSREQ_EDOC_STORAGES_SHARED_SOURCE_NAME SYSREQ_EDOC_STORAGES_TYPE SYSREQ_EDOC_TEXT_MODIFIED SYSREQ_EDOC_TYPE_ACT_CODE SYSREQ_EDOC_TYPE_ACT_DESCRIPTION SYSREQ_EDOC_TYPE_ACT_DESCRIPTION_LOCALIZE_ID SYSREQ_EDOC_TYPE_ACT_ON_EXECUTE SYSREQ_EDOC_TYPE_ACT_ON_EXECUTE_EXISTS SYSREQ_EDOC_TYPE_ACT_SECTION SYSREQ_EDOC_TYPE_\
ADD_PARAMS SYSREQ_EDOC_TYPE_COMMENT SYSREQ_EDOC_TYPE_EVENT_TEXT SYSREQ_EDOC_TYPE_NAME_IN_SINGULAR SYSREQ_EDOC_TYPE_NAME_IN_SINGULAR_LOCALIZE_ID SYSREQ_EDOC_TYPE_NAME_LOCALIZE_ID SYSREQ_EDOC_TYPE_NUMERATION_METHOD SYSREQ_EDOC_TYPE_PSEUDO_REQUISITE_CODE SYSREQ_EDOC_TYPE_REQ_CODE SYSREQ_EDOC_TYPE_REQ_DESCRIPTION SYSREQ_EDOC_TYPE_REQ_DESCRIPTION_LOCALIZE_ID SYSREQ_EDOC_TYPE_REQ_IS_LEADING SYSREQ_EDOC_TYPE_REQ_IS_REQUIRED SYSREQ_EDOC_TYPE_REQ_NUMBER SYSREQ_EDOC_TYPE_REQ_ON_CHANGE SYSREQ_EDOC_TYPE_REQ\
_ON_CHANGE_EXISTS SYSREQ_EDOC_TYPE_REQ_ON_SELECT SYSREQ_EDOC_TYPE_REQ_ON_SELECT_KIND SYSREQ_EDOC_TYPE_REQ_SECTION SYSREQ_EDOC_TYPE_VIEW_CARD SYSREQ_EDOC_TYPE_VIEW_CODE SYSREQ_EDOC_TYPE_VIEW_COMMENT SYSREQ_EDOC_TYPE_VIEW_IS_MAIN SYSREQ_EDOC_TYPE_VIEW_NAME SYSREQ_EDOC_TYPE_VIEW_NAME_LOCALIZE_ID SYSREQ_EDOC_VERSION_AUTHOR SYSREQ_EDOC_VERSION_CRC SYSREQ_EDOC_VERSION_DATA SYSREQ_EDOC_VERSION_EDITOR SYSREQ_EDOC_VERSION_EXPORT_DATE SYSREQ_EDOC_VERSION_EXPORTER SYSREQ_EDOC_VERSION_HIDDEN SYSREQ_EDOC_VER\
SION_LIFE_STAGE SYSREQ_EDOC_VERSION_MODIFIED SYSREQ_EDOC_VERSION_NOTE SYSREQ_EDOC_VERSION_SIGNATURE_TYPE SYSREQ_EDOC_VERSION_SIGNED SYSREQ_EDOC_VERSION_SIZE SYSREQ_EDOC_VERSION_SOURCE SYSREQ_EDOC_VERSION_TEXT_MODIFIED SYSREQ_EDOCKIND_DEFAULT_VERSION_STATE_CODE SYSREQ_FOLDER_KIND SYSREQ_FUNC_CATEGORY SYSREQ_FUNC_COMMENT SYSREQ_FUNC_GROUP SYSREQ_FUNC_GROUP_COMMENT SYSREQ_FUNC_GROUP_NUMBER SYSREQ_FUNC_HELP SYSREQ_FUNC_PARAM_DEF_VALUE SYSREQ_FUNC_PARAM_IDENT SYSREQ_FUNC_PARAM_NUMBER SYSREQ_FUNC_PARA\
M_TYPE SYSREQ_FUNC_TEXT SYSREQ_GROUP_CATEGORY SYSREQ_ID SYSREQ_LAST_UPDATE SYSREQ_LEADER_REFERENCE SYSREQ_LINE_NUMBER SYSREQ_MAIN_RECORD_ID SYSREQ_NAME SYSREQ_NAME_LOCALIZE_ID SYSREQ_NOTE SYSREQ_ORIGINAL_RECORD SYSREQ_OUR_FIRM SYSREQ_PROFILING_SETTINGS_BATCH_LOGING SYSREQ_PROFILING_SETTINGS_BATCH_SIZE SYSREQ_PROFILING_SETTINGS_PROFILING_ENABLED SYSREQ_PROFILING_SETTINGS_SQL_PROFILING_ENABLED SYSREQ_PROFILING_SETTINGS_START_LOGGED SYSREQ_RECORD_STATUS SYSREQ_REF_REQ_FIELD_NAME SYSREQ_REF_REQ_FORM\
AT SYSREQ_REF_REQ_GENERATED SYSREQ_REF_REQ_LENGTH SYSREQ_REF_REQ_PRECISION SYSREQ_REF_REQ_REFERENCE SYSREQ_REF_REQ_SECTION SYSREQ_REF_REQ_STORED SYSREQ_REF_REQ_TOKENS SYSREQ_REF_REQ_TYPE SYSREQ_REF_REQ_VIEW SYSREQ_REF_TYPE_ACT_CODE SYSREQ_REF_TYPE_ACT_DESCRIPTION SYSREQ_REF_TYPE_ACT_DESCRIPTION_LOCALIZE_ID SYSREQ_REF_TYPE_ACT_ON_EXECUTE SYSREQ_REF_TYPE_ACT_ON_EXECUTE_EXISTS SYSREQ_REF_TYPE_ACT_SECTION SYSREQ_REF_TYPE_ADD_PARAMS SYSREQ_REF_TYPE_COMMENT SYSREQ_REF_TYPE_COMMON_SETTINGS SYSREQ_REF_T\
YPE_DISPLAY_REQUISITE_NAME SYSREQ_REF_TYPE_EVENT_TEXT SYSREQ_REF_TYPE_MAIN_LEADING_REF SYSREQ_REF_TYPE_NAME_IN_SINGULAR SYSREQ_REF_TYPE_NAME_IN_SINGULAR_LOCALIZE_ID SYSREQ_REF_TYPE_NAME_LOCALIZE_ID SYSREQ_REF_TYPE_NUMERATION_METHOD SYSREQ_REF_TYPE_REQ_CODE SYSREQ_REF_TYPE_REQ_DESCRIPTION SYSREQ_REF_TYPE_REQ_DESCRIPTION_LOCALIZE_ID SYSREQ_REF_TYPE_REQ_IS_CONTROL SYSREQ_REF_TYPE_REQ_IS_FILTER SYSREQ_REF_TYPE_REQ_IS_LEADING SYSREQ_REF_TYPE_REQ_IS_REQUIRED SYSREQ_REF_TYPE_REQ_NUMBER SYSREQ_REF_TYPE_\
REQ_ON_CHANGE SYSREQ_REF_TYPE_REQ_ON_CHANGE_EXISTS SYSREQ_REF_TYPE_REQ_ON_SELECT SYSREQ_REF_TYPE_REQ_ON_SELECT_KIND SYSREQ_REF_TYPE_REQ_SECTION SYSREQ_REF_TYPE_VIEW_CARD SYSREQ_REF_TYPE_VIEW_CODE SYSREQ_REF_TYPE_VIEW_COMMENT SYSREQ_REF_TYPE_VIEW_IS_MAIN SYSREQ_REF_TYPE_VIEW_NAME SYSREQ_REF_TYPE_VIEW_NAME_LOCALIZE_ID SYSREQ_REFERENCE_TYPE_ID SYSREQ_STATE SYSREQ_STATЕ SYSREQ_SYSTEM_SETTINGS_VALUE SYSREQ_TYPE SYSREQ_UNIT SYSREQ_UNIT_ID SYSREQ_USER_GROUPS_GROUP_FULL_NAME SYSREQ_USER_GROUPS_GROUP_NAM\
E SYSREQ_USER_GROUPS_GROUP_SERVER_NAME SYSREQ_USERS_ACCESS_RIGHTS SYSREQ_USERS_AUTHENTICATION SYSREQ_USERS_CATEGORY SYSREQ_USERS_COMPONENT SYSREQ_USERS_COMPONENT_USER_IS_PUBLIC SYSREQ_USERS_DOMAIN SYSREQ_USERS_FULL_USER_NAME SYSREQ_USERS_GROUP SYSREQ_USERS_IS_MAIN_SERVER SYSREQ_USERS_LOGIN SYSREQ_USERS_REFERENCE_USER_IS_PUBLIC SYSREQ_USERS_STATUS SYSREQ_USERS_USER_CERTIFICATE SYSREQ_USERS_USER_CERTIFICATE_INFO SYSREQ_USERS_USER_CERTIFICATE_PLUGIN_NAME SYSREQ_USERS_USER_CERTIFICATE_PLUGIN_VERSION\
 SYSREQ_USERS_USER_CERTIFICATE_STATE SYSREQ_USERS_USER_CERTIFICATE_SUBJECT_NAME SYSREQ_USERS_USER_CERTIFICATE_THUMBPRINT SYSREQ_USERS_USER_DEFAULT_CERTIFICATE SYSREQ_USERS_USER_DESCRIPTION SYSREQ_USERS_USER_GLOBAL_NAME SYSREQ_USERS_USER_LOGIN SYSREQ_USERS_USER_MAIN_SERVER SYSREQ_USERS_USER_TYPE SYSREQ_WORK_RULES_FOLDER_ID "+"RESULT_VAR_NAME RESULT_VAR_NAME_ENG "+"AUTO_NUMERATION_RULE_ID CANT_CHANGE_ID_REQUISITE_RULE_ID CANT_CHANGE_OURFIRM_REQUISITE_RULE_ID CHECK_CHANGING_REFERENCE_RECORD_USE_RUL\
E_ID CHECK_CODE_REQUISITE_RULE_ID CHECK_DELETING_REFERENCE_RECORD_USE_RULE_ID CHECK_FILTRATER_CHANGES_RULE_ID CHECK_RECORD_INTERVAL_RULE_ID CHECK_REFERENCE_INTERVAL_RULE_ID CHECK_REQUIRED_DATA_FULLNESS_RULE_ID CHECK_REQUIRED_REQUISITES_FULLNESS_RULE_ID MAKE_RECORD_UNRATIFIED_RULE_ID RESTORE_AUTO_NUMERATION_RULE_ID SET_FIRM_CONTEXT_FROM_RECORD_RULE_ID SET_FIRST_RECORD_IN_LIST_FORM_RULE_ID SET_IDSPS_VALUE_RULE_ID SET_NEXT_CODE_VALUE_RULE_ID SET_OURFIRM_BOUNDS_RULE_ID SET_OURFIRM_REQUISITE_RULE_ID "+
"SCRIPT_BLOCK_AFTER_FINISH_EVENT SCRIPT_BLOCK_BEFORE_START_EVENT SCRIPT_BLOCK_EXECUTION_RESULTS_PROPERTY SCRIPT_BLOCK_NAME_PROPERTY SCRIPT_BLOCK_SCRIPT_PROPERTY "+"SUBTASK_BLOCK_ABORT_DEADLINE_PROPERTY SUBTASK_BLOCK_AFTER_FINISH_EVENT SUBTASK_BLOCK_ASSIGN_PARAMS_EVENT SUBTASK_BLOCK_ATTACHMENTS_PROPERTY SUBTASK_BLOCK_ATTACHMENTS_RIGHTS_GROUP_PROPERTY SUBTASK_BLOCK_ATTACHMENTS_RIGHTS_TYPE_PROPERTY SUBTASK_BLOCK_BEFORE_START_EVENT SUBTASK_BLOCK_CREATED_TASK_PROPERTY SUBTASK_BLOCK_CREATION_EVENT SUB\
TASK_BLOCK_DEADLINE_PROPERTY SUBTASK_BLOCK_IMPORTANCE_PROPERTY SUBTASK_BLOCK_INITIATOR_PROPERTY SUBTASK_BLOCK_IS_RELATIVE_ABORT_DEADLINE_PROPERTY SUBTASK_BLOCK_IS_RELATIVE_DEADLINE_PROPERTY SUBTASK_BLOCK_JOBS_TYPE_PROPERTY SUBTASK_BLOCK_NAME_PROPERTY SUBTASK_BLOCK_PARALLEL_ROUTE_PROPERTY SUBTASK_BLOCK_PERFORMERS_PROPERTY SUBTASK_BLOCK_RELATIVE_ABORT_DEADLINE_TYPE_PROPERTY SUBTASK_BLOCK_RELATIVE_DEADLINE_TYPE_PROPERTY SUBTASK_BLOCK_REQUIRE_SIGN_PROPERTY SUBTASK_BLOCK_STANDARD_ROUTE_PROPERTY SUBTA\
SK_BLOCK_START_EVENT SUBTASK_BLOCK_STEP_CONTROL_PROPERTY SUBTASK_BLOCK_SUBJECT_PROPERTY SUBTASK_BLOCK_TASK_CONTROL_PROPERTY SUBTASK_BLOCK_TEXT_PROPERTY SUBTASK_BLOCK_UNLOCK_ATTACHMENTS_ON_STOP_PROPERTY SUBTASK_BLOCK_USE_STANDARD_ROUTE_PROPERTY SUBTASK_BLOCK_WAIT_FOR_TASK_COMPLETE_PROPERTY "+"SYSCOMP_CONTROL_JOBS SYSCOMP_FOLDERS SYSCOMP_JOBS SYSCOMP_NOTICES SYSCOMP_TASKS "+"SYSDLG_CREATE_EDOCUMENT SYSDLG_CREATE_EDOCUMENT_VERSION SYSDLG_CURRENT_PERIOD SYSDLG_EDIT_FUNCTION_HELP SYSDLG_EDOCUMENT_KIN\
DS_FOR_TEMPLATE SYSDLG_EXPORT_MULTIPLE_EDOCUMENTS SYSDLG_EXPORT_SINGLE_EDOCUMENT SYSDLG_IMPORT_EDOCUMENT SYSDLG_MULTIPLE_SELECT SYSDLG_SETUP_ACCESS_RIGHTS SYSDLG_SETUP_DEFAULT_RIGHTS SYSDLG_SETUP_FILTER_CONDITION SYSDLG_SETUP_SIGN_RIGHTS SYSDLG_SETUP_TASK_OBSERVERS SYSDLG_SETUP_TASK_ROUTE SYSDLG_SETUP_USERS_LIST SYSDLG_SIGN_EDOCUMENT SYSDLG_SIGN_MULTIPLE_EDOCUMENTS "+"SYSREF_ACCESS_RIGHTS_TYPES SYSREF_ADMINISTRATION_HISTORY SYSREF_ALL_AVAILABLE_COMPONENTS SYSREF_ALL_AVAILABLE_PRIVILEGES SYSREF_A\
LL_REPLICATING_COMPONENTS SYSREF_AVAILABLE_DEVELOPERS_COMPONENTS SYSREF_CALENDAR_EVENTS SYSREF_COMPONENT_TOKEN_HISTORY SYSREF_COMPONENT_TOKENS SYSREF_COMPONENTS SYSREF_CONSTANTS SYSREF_DATA_RECEIVE_PROTOCOL SYSREF_DATA_SEND_PROTOCOL SYSREF_DIALOGS SYSREF_DIALOGS_REQUISITES SYSREF_EDITORS SYSREF_EDOC_CARDS SYSREF_EDOC_TYPES SYSREF_EDOCUMENT_CARD_REQUISITES SYSREF_EDOCUMENT_CARD_TYPES SYSREF_EDOCUMENT_CARD_TYPES_REFERENCE SYSREF_EDOCUMENT_CARDS SYSREF_EDOCUMENT_HISTORY SYSREF_EDOCUMENT_KINDS SYSRE\
F_EDOCUMENT_REQUISITES SYSREF_EDOCUMENT_SIGNATURES SYSREF_EDOCUMENT_TEMPLATES SYSREF_EDOCUMENT_TEXT_STORAGES SYSREF_EDOCUMENT_VIEWS SYSREF_FILTERER_SETUP_CONFLICTS SYSREF_FILTRATER_SETTING_CONFLICTS SYSREF_FOLDER_HISTORY SYSREF_FOLDERS SYSREF_FUNCTION_GROUPS SYSREF_FUNCTION_PARAMS SYSREF_FUNCTIONS SYSREF_JOB_HISTORY SYSREF_LINKS SYSREF_LOCALIZATION_DICTIONARY SYSREF_LOCALIZATION_LANGUAGES SYSREF_MODULES SYSREF_PRIVILEGES SYSREF_RECORD_HISTORY SYSREF_REFERENCE_REQUISITES SYSREF_REFERENCE_TYPE_VIE\
WS SYSREF_REFERENCE_TYPES SYSREF_REFERENCES SYSREF_REFERENCES_REQUISITES SYSREF_REMOTE_SERVERS SYSREF_REPLICATION_SESSIONS_LOG SYSREF_REPLICATION_SESSIONS_PROTOCOL SYSREF_REPORTS SYSREF_ROLES SYSREF_ROUTE_BLOCK_GROUPS SYSREF_ROUTE_BLOCKS SYSREF_SCRIPTS SYSREF_SEARCHES SYSREF_SERVER_EVENTS SYSREF_SERVER_EVENTS_HISTORY SYSREF_STANDARD_ROUTE_GROUPS SYSREF_STANDARD_ROUTES SYSREF_STATUSES SYSREF_SYSTEM_SETTINGS SYSREF_TASK_HISTORY SYSREF_TASK_KIND_GROUPS SYSREF_TASK_KINDS SYSREF_TASK_RIGHTS SYSREF_TA\
SK_SIGNATURES SYSREF_TASKS SYSREF_UNITS SYSREF_USER_GROUPS SYSREF_USER_GROUPS_REFERENCE SYSREF_USER_SUBSTITUTION SYSREF_USERS SYSREF_USERS_REFERENCE SYSREF_VIEWERS SYSREF_WORKING_TIME_CALENDARS "+"ACCESS_RIGHTS_TABLE_NAME EDMS_ACCESS_TABLE_NAME EDOC_TYPES_TABLE_NAME "+"TEST_DEV_DB_NAME TEST_DEV_SYSTEM_CODE TEST_EDMS_DB_NAME TEST_EDMS_MAIN_CODE TEST_EDMS_MAIN_DB_NAME TEST_EDMS_SECOND_CODE TEST_EDMS_SECOND_DB_NAME TEST_EDMS_SYSTEM_CODE TEST_ISB5_MAIN_CODE TEST_ISB5_SECOND_CODE TEST_SQL_SERVER_2005\
_NAME TEST_SQL_SERVER_NAME "+"ATTENTION_CAPTION cbsCommandLinks cbsDefault CONFIRMATION_CAPTION ERROR_CAPTION INFORMATION_CAPTION mrCancel mrOk "+"EDOC_VERSION_ACTIVE_STAGE_CODE EDOC_VERSION_DESIGN_STAGE_CODE EDOC_VERSION_OBSOLETE_STAGE_CODE "+"cpDataEnciphermentEnabled cpDigitalSignatureEnabled cpID cpIssuer cpPluginVersion cpSerial cpSubjectName cpSubjSimpleName cpValidFromDate cpValidToDate "+"ISBL_SYNTAX NO_SYNTAX XML_SYNTAX "+"WAIT_BLOCK_AFTER_FINISH_EVENT WAIT_BLOCK_BEFORE_START_EVENT WAIT\
_BLOCK_DEADLINE_PROPERTY WAIT_BLOCK_IS_RELATIVE_DEADLINE_PROPERTY WAIT_BLOCK_NAME_PROPERTY WAIT_BLOCK_RELATIVE_DEADLINE_TYPE_PROPERTY "+"SYSRES_COMMON SYSRES_CONST SYSRES_MBFUNC SYSRES_SBDATA SYSRES_SBGUI SYSRES_SBINTF SYSRES_SBREFDSC SYSRES_SQLERRORS SYSRES_SYSCOMP ",ENUMS="atUser atGroup atRole "+"aemEnabledAlways aemDisabledAlways aemEnabledOnBrowse aemEnabledOnEdit aemDisabledOnBrowseEmpty "+"apBegin apEnd "+"alLeft alRight "+"asmNever asmNoButCustomize asmAsLastTime asmYesButCustomize asmAl\
ways "+"cirCommon cirRevoked "+"ctSignature ctEncode ctSignatureEncode "+"clbUnchecked clbChecked clbGrayed "+"ceISB ceAlways ceNever "+"ctDocument ctReference ctScript ctUnknown ctReport ctDialog ctFunction ctFolder ctEDocument ctTask ctJob ctNotice ctControlJob "+"cfInternal cfDisplay "+"ciUnspecified ciWrite ciRead "+"ckFolder ckEDocument ckTask ckJob ckComponentToken ckAny ckReference ckScript ckReport ckDialog "+"ctISBLEditor ctBevel ctButton ctCheckListBox ctComboBox ctComboEdit ctGrid ctD\
BCheckBox ctDBComboBox ctDBEdit ctDBEllipsis ctDBMemo ctDBNavigator ctDBRadioGroup ctDBStatusLabel ctEdit ctGroupBox ctInplaceHint ctMemo ctPanel ctListBox ctRadioButton ctRichEdit ctTabSheet ctWebBrowser ctImage ctHyperLink ctLabel ctDBMultiEllipsis ctRibbon ctRichView ctInnerPanel ctPanelGroup ctBitButton "+"cctDate cctInteger cctNumeric cctPick cctReference cctString cctText "+"cltInternal cltPrimary cltGUI "+"dseBeforeOpen dseAfterOpen dseBeforeClose dseAfterClose dseOnValidDelete dseBeforeD\
elete dseAfterDelete dseAfterDeleteOutOfTransaction dseOnDeleteError dseBeforeInsert dseAfterInsert dseOnValidUpdate dseBeforeUpdate dseOnUpdateRatifiedRecord dseAfterUpdate dseAfterUpdateOutOfTransaction dseOnUpdateError dseAfterScroll dseOnOpenRecord dseOnCloseRecord dseBeforeCancel dseAfterCancel dseOnUpdateDeadlockError dseBeforeDetailUpdate dseOnPrepareUpdate dseOnAnyRequisiteChange "+"dssEdit dssInsert dssBrowse dssInActive "+"dftDate dftShortDate dftDateTime dftTimeStamp "+"dotDays dotHou\
rs dotMinutes dotSeconds "+"dtkndLocal dtkndUTC "+"arNone arView arEdit arFull "+"ddaView ddaEdit "+"emLock emEdit emSign emExportWithLock emImportWithUnlock emChangeVersionNote emOpenForModify emChangeLifeStage emDelete emCreateVersion emImport emUnlockExportedWithLock emStart emAbort emReInit emMarkAsReaded emMarkAsUnreaded emPerform emAccept emResume emChangeRights emEditRoute emEditObserver emRecoveryFromLocalCopy emChangeWorkAccessType emChangeEncodeTypeToCertificate emChangeEncodeTypeToPas\
sword emChangeEncodeTypeToNone emChangeEncodeTypeToCertificatePassword emChangeStandardRoute emGetText emOpenForView emMoveToStorage emCreateObject emChangeVersionHidden emDeleteVersion emChangeLifeCycleStage emApprovingSign emExport emContinue emLockFromEdit emUnLockForEdit emLockForServer emUnlockFromServer emDelegateAccessRights emReEncode "+"ecotFile ecotProcess "+"eaGet eaCopy eaCreate eaCreateStandardRoute "+"edltAll edltNothing edltQuery "+"essmText essmCard "+"esvtLast esvtLastActive esv\
tSpecified "+"edsfExecutive edsfArchive "+"edstSQLServer edstFile "+"edvstNone edvstEDocumentVersionCopy edvstFile edvstTemplate edvstScannedFile "+"vsDefault vsDesign vsActive vsObsolete "+"etNone etCertificate etPassword etCertificatePassword "+"ecException ecWarning ecInformation "+"estAll estApprovingOnly "+"evtLast evtLastActive evtQuery "+"fdtString fdtNumeric fdtInteger fdtDate fdtText fdtUnknown fdtWideString fdtLargeInteger "+"ftInbox ftOutbox ftFavorites ftCommonFolder ftUserFolder ftC\
omponents ftQuickLaunch ftShortcuts ftSearch "+"grhAuto grhX1 grhX2 grhX3 "+"hltText hltRTF hltHTML "+"iffBMP iffJPEG iffMultiPageTIFF iffSinglePageTIFF iffTIFF iffPNG "+"im8bGrayscale im24bRGB im1bMonochrome "+"itBMP itJPEG itWMF itPNG "+"ikhInformation ikhWarning ikhError ikhNoIcon "+"icUnknown icScript icFunction icIntegratedReport icAnalyticReport icDataSetEventHandler icActionHandler icFormEventHandler icLookUpEventHandler icRequisiteChangeEventHandler icBeforeSearchEventHandler icRoleCalcu\
lation icSelectRouteEventHandler icBlockPropertyCalculation icBlockQueryParamsEventHandler icChangeSearchResultEventHandler icBlockEventHandler icSubTaskInitEventHandler icEDocDataSetEventHandler icEDocLookUpEventHandler icEDocActionHandler icEDocFormEventHandler icEDocRequisiteChangeEventHandler icStructuredConversionRule icStructuredConversionEventBefore icStructuredConversionEventAfter icWizardEventHandler icWizardFinishEventHandler icWizardStepEventHandler icWizardStepFinishEventHandler icWi\
zardActionEnableEventHandler icWizardActionExecuteEventHandler icCreateJobsHandler icCreateNoticesHandler icBeforeLookUpEventHandler icAfterLookUpEventHandler icTaskAbortEventHandler icWorkflowBlockActionHandler icDialogDataSetEventHandler icDialogActionHandler icDialogLookUpEventHandler icDialogRequisiteChangeEventHandler icDialogFormEventHandler icDialogValidCloseEventHandler icBlockFormEventHandler icTaskFormEventHandler icReferenceMethod icEDocMethod icDialogMethod icProcessMessageHandler "+
"isShow isHide isByUserSettings "+"jkJob jkNotice jkControlJob "+"jtInner jtLeft jtRight jtFull jtCross "+"lbpAbove lbpBelow lbpLeft lbpRight "+"eltPerConnection eltPerUser "+"sfcUndefined sfcBlack sfcGreen sfcRed sfcBlue sfcOrange sfcLilac "+"sfsItalic sfsStrikeout sfsNormal "+"ldctStandardRoute ldctWizard ldctScript ldctFunction ldctRouteBlock ldctIntegratedReport ldctAnalyticReport ldctReferenceType ldctEDocumentType ldctDialog ldctServerEvents "+"mrcrtNone mrcrtUser mrcrtMaximal mrcrtCustom "+
"vtEqual vtGreaterOrEqual vtLessOrEqual vtRange "+"rdYesterday rdToday rdTomorrow rdThisWeek rdThisMonth rdThisYear rdNextMonth rdNextWeek rdLastWeek rdLastMonth "+"rdWindow rdFile rdPrinter "+"rdtString rdtNumeric rdtInteger rdtDate rdtReference rdtAccount rdtText rdtPick rdtUnknown rdtLargeInteger rdtDocument "+"reOnChange reOnChangeValues "+"ttGlobal ttLocal ttUser ttSystem "+"ssmBrowse ssmSelect ssmMultiSelect ssmBrowseModal "+"smSelect smLike smCard "+"stNone stAuthenticating stApproving "+
"sctString sctStream "+"sstAnsiSort sstNaturalSort "+"svtEqual svtContain "+"soatString soatNumeric soatInteger soatDatetime soatReferenceRecord soatText soatPick soatBoolean soatEDocument soatAccount soatIntegerCollection soatNumericCollection soatStringCollection soatPickCollection soatDatetimeCollection soatBooleanCollection soatReferenceRecordCollection soatEDocumentCollection soatAccountCollection soatContents soatUnknown "+"tarAbortByUser tarAbortByWorkflowException "+"tvtAllWords tvtExact\
Phrase tvtAnyWord "+"usNone usCompleted usRedSquare usBlueSquare usYellowSquare usGreenSquare usOrangeSquare usPurpleSquare usFollowUp "+"utUnknown utUser utDeveloper utAdministrator utSystemDeveloper utDisconnected "+"btAnd btDetailAnd btOr btNotOr btOnly "+"vmView vmSelect vmNavigation "+"vsmSingle vsmMultiple vsmMultipleCheck vsmNoSelection "+"wfatPrevious wfatNext wfatCancel wfatFinish "+"wfepUndefined wfepText3 wfepText6 wfepText9 wfepSpinEdit wfepDropDown wfepRadioGroup wfepFlag wfepText12\
 wfepText15 wfepText18 wfepText21 wfepText24 wfepText27 wfepText30 wfepRadioGroupColumn1 wfepRadioGroupColumn2 wfepRadioGroupColumn3 "+"wfetQueryParameter wfetText wfetDelimiter wfetLabel "+"wptString wptInteger wptNumeric wptBoolean wptDateTime wptPick wptText wptUser wptUserList wptEDocumentInfo wptEDocumentInfoList wptReferenceRecordInfo wptReferenceRecordInfoList wptFolderInfo wptTaskInfo wptContents wptFileName wptDate "+"wsrComplete wsrGoNext wsrGoPrevious wsrCustom wsrCancel wsrGoFinal "+
"wstForm wstEDocument wstTaskCard wstReferenceRecordCard wstFinal "+"waAll waPerformers waManual "+"wsbStart wsbFinish wsbNotice wsbStep wsbDecision wsbWait wsbMonitor wsbScript wsbConnector wsbSubTask wsbLifeCycleStage wsbPause "+"wdtInteger wdtFloat wdtString wdtPick wdtDateTime wdtBoolean wdtTask wdtJob wdtFolder wdtEDocument wdtReferenceRecord wdtUser wdtGroup wdtRole wdtIntegerCollection wdtFloatCollection wdtStringCollection wdtPickCollection wdtDateTimeCollection wdtBooleanCollection wdtT\
askCollection wdtJobCollection wdtFolderCollection wdtEDocumentCollection wdtReferenceRecordCollection wdtUserCollection wdtGroupCollection wdtRoleCollection wdtContents wdtUserList wdtSearchDescription wdtDeadLine wdtPickSet wdtAccountCollection "+"wiLow wiNormal wiHigh "+"wrtSoft wrtHard "+"wsInit wsRunning wsDone wsControlled wsAborted wsContinued "+"wtmFull wtmFromCurrent wtmOnlyCurrent ",system_functions="AddSubString AdjustLineBreaks AmountInWords Analysis ArrayDimCount ArrayHighBound Arra\
yLowBound ArrayOf ArrayReDim Assert Assigned BeginOfMonth BeginOfPeriod BuildProfilingOperationAnalysis CallProcedure CanReadFile CArrayElement CDataSetRequisite ChangeDate ChangeReferenceDataset Char CharPos CheckParam CheckParamValue CompareStrings ConstantExists ControlState ConvertDateStr Copy CopyFile CreateArray CreateCachedReference CreateConnection CreateDialog CreateDualListDialog CreateEditor CreateException CreateFile CreateFolderDialog CreateInputDialog CreateLinkFile CreateList Crea\
teLock CreateMemoryDataSet CreateObject CreateOpenDialog CreateProgress CreateQuery CreateReference CreateReport CreateSaveDialog CreateScript CreateSQLPivotFunction CreateStringList CreateTreeListSelectDialog CSelectSQL CSQL CSubString CurrentUserID CurrentUserName CurrentVersion DataSetLocateEx DateDiff DateTimeDiff DateToStr DayOfWeek DeleteFile DirectoryExists DisableCheckAccessRights DisableCheckFullShowingRestriction DisableMassTaskSendingRestrictions DropTable DupeString EditText EnableCh\
eckAccessRights EnableCheckFullShowingRestriction EnableMassTaskSendingRestrictions EndOfMonth EndOfPeriod ExceptionExists ExceptionsOff ExceptionsOn Execute ExecuteProcess Exit ExpandEnvironmentVariables ExtractFileDrive ExtractFileExt ExtractFileName ExtractFilePath ExtractParams FileExists FileSize FindFile FindSubString FirmContext ForceDirectories Format FormatDate FormatNumeric FormatSQLDate FormatString FreeException GetComponent GetComponentLaunchParam GetConstant GetLastException GetRef\
erenceRecord GetRefTypeByRefID GetTableID GetTempFolder IfThen In IndexOf InputDialog InputDialogEx InteractiveMode IsFileLocked IsGraphicFile IsNumeric Length LoadString LoadStringFmt LocalTimeToUTC LowerCase Max MessageBox MessageBoxEx MimeDecodeBinary MimeDecodeString MimeEncodeBinary MimeEncodeString Min MoneyInWords MoveFile NewID Now OpenFile Ord Precision Raise ReadCertificateFromFile ReadFile ReferenceCodeByID ReferenceNumber ReferenceRequisiteMode ReferenceRequisiteValue RegionDateSetti\
ngs RegionNumberSettings RegionTimeSettings RegRead RegWrite RenameFile Replace Round SelectServerCode SelectSQL ServerDateTime SetConstant SetManagedFolderFieldsState ShowConstantsInputDialog ShowMessage Sleep Split SQL SQL2XLSTAB SQLProfilingSendReport StrToDate SubString SubStringCount SystemSetting Time TimeDiff Today Transliterate Trim UpperCase UserStatus UTCToLocalTime ValidateXML VarIsClear VarIsEmpty VarIsNull WorkTimeDiff WriteFile WriteFileEx WriteObjectHistory Анализ БазаДанных БлокЕ\
сть БлокЕстьРасш БлокИнфо БлокСнять БлокСнятьРасш БлокУстановить Ввод ВводМеню ВедС ВедСпр ВерхняяГраницаМассива ВнешПрогр Восст ВременнаяПапка Время ВыборSQL ВыбратьЗапись ВыделитьСтр Вызвать Выполнить ВыпПрогр ГрафическийФайл ГруппаДополнительно ДатаВремяСерв ДеньНедели ДиалогДаНет ДлинаСтр ДобПодстр ЕПусто ЕслиТо ЕЧисло ЗамПодстр ЗаписьСправочника ЗначПоляСпр ИДТипСпр ИзвлечьДиск ИзвлечьИмяФайла ИзвлечьПуть ИзвлечьРасширение ИзмДат ИзменитьРазмерМассива ИзмеренийМассива ИмяОрг ИмяПоляСпр Инде\
кс ИндикаторЗакрыть ИндикаторОткрыть ИндикаторШаг ИнтерактивныйРежим ИтогТблСпр КодВидВедСпр КодВидСпрПоИД КодПоAnalit КодСимвола КодСпр КолПодстр КолПроп КонМес Конст КонстЕсть КонстЗнач КонТран КопироватьФайл КопияСтр КПериод КСтрТблСпр Макс МаксСтрТблСпр Массив Меню МенюРасш Мин НаборДанныхНайтиРасш НаимВидСпр НаимПоAnalit НаимСпр НастроитьПереводыСтрок НачМес НачТран НижняяГраницаМассива НомерСпр НПериод Окно Окр Окружение ОтлИнфДобавить ОтлИнфУдалить Отчет ОтчетАнал ОтчетИнт ПапкаСуществует\
 Пауза ПВыборSQL ПереименоватьФайл Переменные ПереместитьФайл Подстр ПоискПодстр ПоискСтр ПолучитьИДТаблицы ПользовательДополнительно ПользовательИД ПользовательИмя ПользовательСтатус Прервать ПроверитьПараметр ПроверитьПараметрЗнач ПроверитьУсловие РазбСтр РазнВремя РазнДат РазнДатаВремя РазнРабВремя РегУстВрем РегУстДат РегУстЧсл РедТекст РеестрЗапись РеестрСписокИменПарам РеестрЧтение РеквСпр РеквСпрПр Сегодня Сейчас Сервер СерверПроцессИД СертификатФайлСчитать СжПроб Символ СистемаДиректумКо\
д СистемаИнформация СистемаКод Содержит СоединениеЗакрыть СоединениеОткрыть СоздатьДиалог СоздатьДиалогВыбораИзДвухСписков СоздатьДиалогВыбораПапки СоздатьДиалогОткрытияФайла СоздатьДиалогСохраненияФайла СоздатьЗапрос СоздатьИндикатор СоздатьИсключение СоздатьКэшированныйСправочник СоздатьМассив СоздатьНаборДанных СоздатьОбъект СоздатьОтчет СоздатьПапку СоздатьРедактор СоздатьСоединение СоздатьСписок СоздатьСписокСтрок СоздатьСправочник СоздатьСценарий СоздСпр СостСпр Сохр СохрСпр СписокСистем С\
пр Справочник СпрБлокЕсть СпрБлокСнять СпрБлокСнятьРасш СпрБлокУстановить СпрИзмНабДан СпрКод СпрНомер СпрОбновить СпрОткрыть СпрОтменить СпрПарам СпрПолеЗнач СпрПолеИмя СпрРекв СпрРеквВведЗн СпрРеквНовые СпрРеквПр СпрРеквПредЗн СпрРеквРежим СпрРеквТипТекст СпрСоздать СпрСост СпрСохранить СпрТблИтог СпрТблСтр СпрТблСтрКол СпрТблСтрМакс СпрТблСтрМин СпрТблСтрПред СпрТблСтрСлед СпрТблСтрСозд СпрТблСтрУд СпрТекПредст СпрУдалить СравнитьСтр СтрВерхРегистр СтрНижнРегистр СтрТблСпр СумПроп Сценарий Сц\
енарийПарам ТекВерсия ТекОрг Точн Тран Транслитерация УдалитьТаблицу УдалитьФайл УдСпр УдСтрТблСпр Уст УстановкиКонстант ФайлАтрибутСчитать ФайлАтрибутУстановить ФайлВремя ФайлВремяУстановить ФайлВыбрать ФайлЗанят ФайлЗаписать ФайлИскать ФайлКопировать ФайлМожноЧитать ФайлОткрыть ФайлПереименовать ФайлПерекодировать ФайлПереместить ФайлПросмотреть ФайлРазмер ФайлСоздать ФайлСсылкаСоздать ФайлСуществует ФайлСчитать ФайлУдалить ФмтSQLДат ФмтДат ФмтСтр ФмтЧсл Формат ЦМассивЭлемент ЦНаборДанныхРекви\
зит ЦПодстр ",predefined_variables="AltState Application CallType ComponentTokens CreatedJobs CreatedNotices ControlState DialogResult Dialogs EDocuments EDocumentVersionSource Folders GlobalIDs Job Jobs InputValue LookUpReference LookUpRequisiteNames LookUpSearch Object ParentComponent Processes References Requisite ReportName Reports Result Scripts Searches SelectedAttachments SelectedItems SelectMode Sender ServerEvents ServiceFactory ShiftState SubTask SystemDialogs Tasks Wizard Wi\
zards Work ВызовСпособ ИмяОтчета РеквЗнач ",interfaces="IApplication IAccessRights IAccountRepository IAccountSelectionRestrictions IAction IActionList IAdministrationHistoryDescription IAnchors IApplication IArchiveInfo IAttachment IAttachmentList ICheckListBox ICheckPointedList IColumn IComponent IComponentDescription IComponentToken IComponentTokenFactory IComponentTokenInfo ICompRecordInfo IConnection IContents IControl IControlJob IControlJobInfo IControlList ICr\
ypto ICrypto2 ICustomJob ICustomJobInfo ICustomListBox ICustomObjectWizardStep ICustomWork ICustomWorkInfo IDataSet IDataSetAccessInfo IDataSigner IDateCriterion IDateRequisite IDateRequisiteDescription IDateValue IDeaAccessRights IDeaObjectInfo IDevelopmentComponentLock IDialog IDialogFactory IDialogPickRequisiteItems IDialogsFactory IDICSFactory IDocRequisite IDocumentInfo IDualListDialog IECertificate IECertificateInfo IECertificates IEditControl IEditorForm IEdmsExplorer IEdmsObject IEdmsObj\
ectDescription IEdmsObjectFactory IEdmsObjectInfo IEDocument IEDocumentAccessRights IEDocumentDescription IEDocumentEditor IEDocumentFactory IEDocumentInfo IEDocumentStorage IEDocumentVersion IEDocumentVersionListDialog IEDocumentVersionSource IEDocumentWizardStep IEDocVerSignature IEDocVersionState IEnabledMode IEncodeProvider IEncrypter IEvent IEventList IException IExternalEvents IExternalHandler IFactory IField IFileDialog IFolder IFolderDescription IFolderDialog IFolderFactory IFolderInfo I\
ForEach IForm IFormTitle IFormWizardStep IGlobalIDFactory IGlobalIDInfo IGrid IHasher IHistoryDescription IHyperLinkControl IImageButton IImageControl IInnerPanel IInplaceHint IIntegerCriterion IIntegerList IIntegerRequisite IIntegerValue IISBLEditorForm IJob IJobDescription IJobFactory IJobForm IJobInfo ILabelControl ILargeIntegerCriterion ILargeIntegerRequisite ILargeIntegerValue ILicenseInfo ILifeCycleStage IList IListBox ILocalIDInfo ILocalization ILock IMemoryDataSet IMessagingFactory IMeta\
dataRepository INotice INoticeInfo INumericCriterion INumericRequisite INumericValue IObject IObjectDescription IObjectImporter IObjectInfo IObserver IPanelGroup IPickCriterion IPickProperty IPickRequisite IPickRequisiteDescription IPickRequisiteItem IPickRequisiteItems IPickValue IPrivilege IPrivilegeList IProcess IProcessFactory IProcessMessage IProgress IProperty IPropertyChangeEvent IQuery IReference IReferenceCriterion IReferenceEnabledMode IReferenceFactory IReferenceHistoryDescription IRe\
ferenceInfo IReferenceRecordCardWizardStep IReferenceRequisiteDescription IReferencesFactory IReferenceValue IRefRequisite IReport IReportFactory IRequisite IRequisiteDescription IRequisiteDescriptionList IRequisiteFactory IRichEdit IRouteStep IRule IRuleList ISchemeBlock IScript IScriptFactory ISearchCriteria ISearchCriterion ISearchDescription ISearchFactory ISearchFolderInfo ISearchForObjectDescription ISearchResultRestrictions ISecuredContext ISelectDialog IServerEvent IServerEventFactory IS\
erviceDialog IServiceFactory ISignature ISignProvider ISignProvider2 ISignProvider3 ISimpleCriterion IStringCriterion IStringList IStringRequisite IStringRequisiteDescription IStringValue ISystemDialogsFactory ISystemInfo ITabSheet ITask ITaskAbortReasonInfo ITaskCardWizardStep ITaskDescription ITaskFactory ITaskInfo ITaskRoute ITextCriterion ITextRequisite ITextValue ITreeListSelectDialog IUser IUserList IValue IView IWebBrowserControl IWizard IWizardAction IWizardFactory IWizardFormElement IWi\
zardParam IWizardPickParam IWizardReferenceParam IWizardStep IWorkAccessRights IWorkDescription IWorkflowAskableParam IWorkflowAskableParams IWorkflowBlock IWorkflowBlockResult IWorkflowEnabledMode IWorkflowParam IWorkflowPickParam IWorkflowReferenceParam IWorkState IWorkTreeCustomNode IWorkTreeJobNode IWorkTreeTaskNode IXMLEditorForm SBCrypto ",BUILTIN=CONSTANTS+ENUMS,CLASS2=predefined_variables,LITERAL="null true false nil ",NUMBERS={className:"number",begin:hljs.NUMBER_RE,relevance:0},STRINGS={
className:"string",variants:[{begin:'"',end:'"'},{begin:"'",end:"'"}]},DOCTAGS={className:"doctag",begin:"\\b(?:TODO|DONE|BEGIN|END|STUB|CHG|FIXME|NOTE|BUG|XXX)\\b",relevance:0},ISBL_LINE_COMMENT_MODE={className:"comment",begin:"//",end:"$",relevance:0,contains:[hljs.PHRASAL_WORDS_MODE,DOCTAGS]},ISBL_BLOCK_COMMENT_MODE={className:"comment",begin:"/\\*",end:"\\*/",relevance:0,contains:[hljs.PHRASAL_WORDS_MODE,DOCTAGS]},COMMENTS={variants:[ISBL_LINE_COMMENT_MODE,ISBL_BLOCK_COMMENT_MODE]},KEYWORDS2={
$pattern:UNDERSCORE_IDENT_RE,keyword:KEYWORD,built_in:BUILTIN,class:CLASS2,literal:LITERAL},METHODS={begin:"\\.\\s*"+hljs.UNDERSCORE_IDENT_RE,keywords:KEYWORDS2,relevance:0},TYPES2={className:"type",begin:":[ \\t]*("+interfaces.trim().replace(/\s/g,"|")+")",end:"[ \\t]*=",excludeEnd:!0},VARIABLES={className:"variable",keywords:KEYWORDS2,begin:UNDERSCORE_IDENT_RE,relevance:0,contains:[TYPES2,METHODS]},FUNCTION_TITLE=FUNCTION_NAME_IDENT_RE+"\\(";return{name:"ISBL",case_insensitive:!0,keywords:KEYWORDS2,
illegal:"\\$|\\?|%|,|;$|~|#|@|</",contains:[{className:"function",begin:FUNCTION_TITLE,end:"\\)$",returnBegin:!0,keywords:KEYWORDS2,illegal:"[\\[\\]\\|\\$\\?%,~#@]",contains:[{className:"title",keywords:{$pattern:UNDERSCORE_IDENT_RE,built_in:system_functions},begin:FUNCTION_TITLE,end:"\\(",returnBegin:!0,excludeEnd:!0},METHODS,VARIABLES,STRINGS,NUMBERS,COMMENTS]},TYPES2,METHODS,VARIABLES,STRINGS,NUMBERS,COMMENTS]}}function jbossCli(hljs){const PARAMSBLOCK={className:"params",begin:/\(/,end:/\)/,
contains:[{begin:/[\w-]+ *=/,returnBegin:!0,relevance:0,contains:[{className:"attr",begin:/[\w-]+/}]}],relevance:0},OPERATION={className:"function",begin:/:[\w\-.]+/,relevance:0},PATH={className:"string",begin:/\B([\/.])[\w\-.\/=]+/},COMMAND_PARAMS={className:"params",begin:/--[\w\-=\/]+/};return{name:"JBoss CLI",aliases:["wildfly-cli"],keywords:{$pattern:"[a-z-]+",keyword:"alias batch cd clear command connect connection-factory connection-info data-source deploy deployment-info deployment-overl\
ay echo echo-dmr help history if jdbc-driver-info jms-queue|20 jms-topic|20 ls patch pwd quit read-attribute read-operation reload rollout-plan run-batch set shutdown try unalias undeploy unset version xa-data-source",literal:"true false"},contains:[hljs.HASH_COMMENT_MODE,hljs.QUOTE_STRING_MODE,COMMAND_PARAMS,OPERATION,PATH,PARAMSBLOCK]}}function julia(hljs){const VARIABLE_NAME_RE="[A-Za-z_\\u00A1-\\uFFFF][A-Za-z_0-9\\u00A1-\\uFFFF]*",KEYWORDS2={$pattern:VARIABLE_NAME_RE,keyword:["baremodule","b\
egin","break","catch","ccall","const","continue","do","else","elseif","end","export","false","finally","for","function","global","if","import","in","isa","let","local","macro","module","quote","return","true","try","using","where","while"],literal:["ARGS","C_NULL","DEPOT_PATH","ENDIAN_BOM","ENV","Inf","Inf16","Inf32","Inf64","InsertionSort","LOAD_PATH","MergeSort","NaN","NaN16","NaN32","NaN64","PROGRAM_FILE","QuickSort","RoundDown","RoundFromZero","RoundNearest","RoundNearestTiesAway","RoundNear\
estTiesUp","RoundToZero","RoundUp","VERSION|0","devnull","false","im","missing","nothing","pi","stderr","stdin","stdout","true","undef","π","ℯ"],built_in:["AbstractArray","AbstractChannel","AbstractChar","AbstractDict","AbstractDisplay","AbstractFloat","AbstractIrrational","AbstractMatrix","AbstractRange","AbstractSet","AbstractString","AbstractUnitRange","AbstractVecOrMat","AbstractVector","Any","ArgumentError","Array","AssertionError","BigFloat","BigInt","BitArray","BitMatrix","BitSet","Bit\
Vector","Bool","BoundsError","CapturedException","CartesianIndex","CartesianIndices","Cchar","Cdouble","Cfloat","Channel","Char","Cint","Cintmax_t","Clong","Clonglong","Cmd","Colon","Complex","ComplexF16","ComplexF32","ComplexF64","CompositeException","Condition","Cptrdiff_t","Cshort","Csize_t","Cssize_t","Cstring","Cuchar","Cuint","Cuintmax_t","Culong","Culonglong","Cushort","Cvoid","Cwchar_t","Cwstring","DataType","DenseArray","DenseMatrix","DenseVecOrMat","DenseVector","Dict","DimensionMismat\
ch","Dims","DivideError","DomainError","EOFError","Enum","ErrorException","Exception","ExponentialBackOff","Expr","Float16","Float32","Float64","Function","GlobalRef","HTML","IO","IOBuffer","IOContext","IOStream","IdDict","IndexCartesian","IndexLinear","IndexStyle","InexactError","InitError","Int","Int128","Int16","Int32","Int64","Int8","Integer","InterruptException","InvalidStateException","Irrational","KeyError","LinRange","LineNumberNode","LinearIndices","LoadError","MIME","Matrix","Method","\
MethodError","Missing","MissingException","Module","NTuple","NamedTuple","Nothing","Number","OrdinalRange","OutOfMemoryError","OverflowError","Pair","PartialQuickSort","PermutedDimsArray","Pipe","ProcessFailedException","Ptr","QuoteNode","Rational","RawFD","ReadOnlyMemoryError","Real","ReentrantLock","Ref","Regex","RegexMatch","RoundingMode","SegmentationFault","Set","Signed","Some","StackOverflowError","StepRange","StepRangeLen","StridedArray","StridedMatrix","StridedVecOrMat","StridedVector","\
String","StringIndexError","SubArray","SubString","SubstitutionString","Symbol","SystemError","Task","TaskFailedException","Text","TextDisplay","Timer","Tuple","Type","TypeError","TypeVar","UInt","UInt128","UInt16","UInt32","UInt64","UInt8","UndefInitializer","UndefKeywordError","UndefRefError","UndefVarError","Union","UnionAll","UnitRange","Unsigned","Val","Vararg","VecElement","VecOrMat","Vector","VersionNumber","WeakKeyDict","WeakRef"]},DEFAULT={keywords:KEYWORDS2,illegal:/<\//},NUMBER={className:"\
number",begin:/(\b0x[\d_]*(\.[\d_]*)?|0x\.\d[\d_]*)p[-+]?\d+|\b0[box][a-fA-F0-9][a-fA-F0-9_]*|(\b\d[\d_]*(\.[\d_]*)?|\.\d[\d_]*)([eEfF][-+]?\d+)?/,relevance:0},CHAR={className:"string",begin:/'(.|\\[xXuU][a-zA-Z0-9]+)'/},INTERPOLATION={className:"subst",begin:/\$\(/,end:/\)/,keywords:KEYWORDS2},INTERPOLATED_VARIABLE={className:"variable",begin:"\\$"+VARIABLE_NAME_RE},STRING={className:"string",contains:[hljs.BACKSLASH_ESCAPE,INTERPOLATION,INTERPOLATED_VARIABLE],variants:[{begin:/\w*"""/,end:/"""\w*/,
relevance:10},{begin:/\w*"/,end:/"\w*/}]},COMMAND={className:"string",contains:[hljs.BACKSLASH_ESCAPE,INTERPOLATION,INTERPOLATED_VARIABLE],begin:"`",end:"`"},MACROCALL={className:"meta",begin:"@"+VARIABLE_NAME_RE},COMMENT={className:"comment",variants:[{begin:"#=",end:"=#",relevance:10},{begin:"#",end:"$"}]};return DEFAULT.name="Julia",DEFAULT.contains=[NUMBER,CHAR,STRING,COMMAND,MACROCALL,COMMENT,hljs.HASH_COMMENT_MODE,{className:"keyword",begin:"\\b(((abstract|primitive)\\s+)type|(mutable\\s+)?st\
ruct)\\b"},{begin:/<:/}],INTERPOLATION.contains=DEFAULT.contains,DEFAULT}function juliaRepl(hljs){return{name:"Julia REPL",contains:[{className:"meta.prompt",begin:/^julia>/,relevance:10,starts:{end:/^(?![ ]{6})/,subLanguage:"julia"}}],aliases:["jldoctest"]}}function lasso(hljs){const LASSO_IDENT_RE="[a-zA-Z_][\\w.]*",LASSO_ANGLE_RE="<\\?(lasso(script)?|=)",LASSO_CLOSE_RE="\\]|\\?>",LASSO_KEYWORDS={$pattern:LASSO_IDENT_RE+"|&[lg]t;",literal:"true false none minimal full all void and or not bw nb\
w ew new cn ncn lt lte gt gte eq neq rx nrx ft",built_in:"array date decimal duration integer map pair string tag xml null boolean bytes keyword list locale queue set stack staticarray local var variable global data self inherited currentcapture givenblock",keyword:"cache database_names database_schemanames database_tablenames define_tag define_type email_batch encode_set html_comment handle handle_error header if inline iterate ljax_target link link_currentaction link_currentgroup link_currentr\
ecord link_detail link_firstgroup link_firstrecord link_lastgroup link_lastrecord link_nextgroup link_nextrecord link_prevgroup link_prevrecord log loop namespace_using output_none portal private protect records referer referrer repeating resultset rows search_args search_arguments select sort_args sort_arguments thread_atomic value_list while abort case else fail_if fail_ifnot fail if_empty if_false if_null if_true loop_abort loop_continue loop_count params params_up return return_value run_chi\
ldren soap_definetag soap_lastrequest soap_lastresponse tag_name ascending average by define descending do equals frozen group handle_failure import in into join let match max min on order parent protected provide public require returnhome skip split_thread sum take thread to trait type where with yield yieldhome"},HTML_COMMENT=hljs.COMMENT("<!--","-->",{relevance:0}),LASSO_NOPROCESS={className:"meta",begin:"\\[noprocess\\]",starts:{end:"\\[/noprocess\\]",returnEnd:!0,contains:[HTML_COMMENT]}},LASSO_START={
className:"meta",begin:"\\[/noprocess|"+LASSO_ANGLE_RE},LASSO_DATAMEMBER={className:"symbol",begin:"'"+LASSO_IDENT_RE+"'"},LASSO_CODE=[hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.inherit(hljs.C_NUMBER_MODE,{begin:hljs.C_NUMBER_RE+"|(-?infinity|NaN)\\b"}),hljs.inherit(hljs.APOS_STRING_MODE,{illegal:null}),hljs.inherit(hljs.QUOTE_STRING_MODE,{illegal:null}),{className:"string",begin:"`",end:"`"},{variants:[{begin:"[#$]"+LASSO_IDENT_RE},{begin:"#",end:"\\d+",illegal:"\\W"}]},{className:"\
type",begin:"::\\s*",end:LASSO_IDENT_RE,illegal:"\\W"},{className:"params",variants:[{begin:"-(?!infinity)"+LASSO_IDENT_RE,relevance:0},{begin:"(\\.\\.\\.)"}]},{begin:/(->|\.)\s*/,relevance:0,contains:[LASSO_DATAMEMBER]},{className:"class",beginKeywords:"define",returnEnd:!0,end:"\\(|=>",contains:[hljs.inherit(hljs.TITLE_MODE,{begin:LASSO_IDENT_RE+"(=(?!>))?|[-+*/%](?!>)"})]}];return{name:"Lasso",aliases:["ls","lassoscript"],case_insensitive:!0,keywords:LASSO_KEYWORDS,contains:[{className:"meta",
begin:LASSO_CLOSE_RE,relevance:0,starts:{end:"\\[|"+LASSO_ANGLE_RE,returnEnd:!0,relevance:0,contains:[HTML_COMMENT]}},LASSO_NOPROCESS,LASSO_START,{className:"meta",begin:"\\[no_square_brackets",starts:{end:"\\[/no_square_brackets\\]",keywords:LASSO_KEYWORDS,contains:[{className:"meta",begin:LASSO_CLOSE_RE,relevance:0,starts:{end:"\\[noprocess\\]|"+LASSO_ANGLE_RE,returnEnd:!0,contains:[HTML_COMMENT]}},LASSO_NOPROCESS,LASSO_START].concat(LASSO_CODE)}},{className:"meta",begin:"\\[",relevance:0},{className:"\
meta",begin:"^#!",end:"lasso9$",relevance:10}].concat(LASSO_CODE)}}function latex(hljs){const KNOWN_CONTROL_WORDS=hljs.regex.either(...["(?:NeedsTeXFormat|RequirePackage|GetIdInfo)","Provides(?:Expl)?(?:Package|Class|File)","(?:DeclareOption|ProcessOptions)","(?:documentclass|usepackage|input|include)","makeat(?:letter|other)","ExplSyntax(?:On|Off)","(?:new|renew|provide)?command","(?:re)newenvironment","(?:New|Renew|Provide|Declare)(?:Expandable)?DocumentCommand","(?:New|Renew|Provide|Declare)D\
ocumentEnvironment","(?:(?:e|g|x)?def|let)","(?:begin|end)","(?:part|chapter|(?:sub){0,2}section|(?:sub)?paragraph)","caption","(?:label|(?:eq|page|name)?ref|(?:paren|foot|super)?cite)","(?:alpha|beta|[Gg]amma|[Dd]elta|(?:var)?epsilon|zeta|eta|[Tt]heta|vartheta)","(?:iota|(?:var)?kappa|[Ll]ambda|mu|nu|[Xx]i|[Pp]i|varpi|(?:var)rho)","(?:[Ss]igma|varsigma|tau|[Uu]psilon|[Pp]hi|varphi|chi|[Pp]si|[Oo]mega)","(?:frac|sum|prod|lim|infty|times|sqrt|leq|geq|left|right|middle|[bB]igg?)","(?:[lr]angle|q?q\
uad|[lcvdi]?dots|d?dot|hat|tilde|bar)"].map(word=>word+"(?![a-zA-Z@:_])")),L3_REGEX=new RegExp(["(?:__)?[a-zA-Z]{2,}_[a-zA-Z](?:_?[a-zA-Z])+:[a-zA-Z]*","[lgc]__?[a-zA-Z](?:_?[a-zA-Z])*_[a-zA-Z]{2,}","[qs]__?[a-zA-Z](?:_?[a-zA-Z])+","use(?:_i)?:[a-zA-Z]*","(?:else|fi|or):","(?:if|cs|exp):w","(?:hbox|vbox):n","::[a-zA-Z]_unbraced","::[a-zA-Z:]"].map(pattern2=>pattern2+"(?![a-zA-Z:_])").join("|")),L2_VARIANTS=[{begin:/[a-zA-Z@]+/},{begin:/[^a-zA-Z@]?/}],DOUBLE_CARET_VARIANTS=[{begin:/\^{6}[0-9a-f]{6}/},
{begin:/\^{5}[0-9a-f]{5}/},{begin:/\^{4}[0-9a-f]{4}/},{begin:/\^{3}[0-9a-f]{3}/},{begin:/\^{2}[0-9a-f]{2}/},{begin:/\^{2}[\u0000-\u007f]/}],CONTROL_SEQUENCE={className:"keyword",begin:/\\/,relevance:0,contains:[{endsParent:!0,begin:KNOWN_CONTROL_WORDS},{endsParent:!0,begin:L3_REGEX},{endsParent:!0,variants:DOUBLE_CARET_VARIANTS},{endsParent:!0,relevance:0,variants:L2_VARIANTS}]},MACRO_PARAM={className:"params",relevance:0,begin:/#+\d?/},DOUBLE_CARET_CHAR={variants:DOUBLE_CARET_VARIANTS},SPECIAL_CATCODE={
className:"built_in",relevance:0,begin:/[$&^_]/},MAGIC_COMMENT={className:"meta",begin:/% ?!(T[eE]X|tex|BIB|bib)/,end:"$",relevance:10},COMMENT=hljs.COMMENT("%","$",{relevance:0}),EVERYTHING_BUT_VERBATIM=[CONTROL_SEQUENCE,MACRO_PARAM,DOUBLE_CARET_CHAR,SPECIAL_CATCODE,MAGIC_COMMENT,COMMENT],BRACE_GROUP_NO_VERBATIM={begin:/\{/,end:/\}/,relevance:0,contains:["self",...EVERYTHING_BUT_VERBATIM]},ARGUMENT_BRACES=hljs.inherit(BRACE_GROUP_NO_VERBATIM,{relevance:0,endsParent:!0,contains:[BRACE_GROUP_NO_VERBATIM,
...EVERYTHING_BUT_VERBATIM]}),ARGUMENT_BRACKETS={begin:/\[/,end:/\]/,endsParent:!0,relevance:0,contains:[BRACE_GROUP_NO_VERBATIM,...EVERYTHING_BUT_VERBATIM]},SPACE_GOBBLER={begin:/\s+/,relevance:0},ARGUMENT_M=[ARGUMENT_BRACES],ARGUMENT_O=[ARGUMENT_BRACKETS],ARGUMENT_AND_THEN=function(arg,starts_mode){return{contains:[SPACE_GOBBLER],starts:{relevance:0,contains:arg,starts:starts_mode}}},CSNAME=function(csname,starts_mode){return{begin:"\\\\"+csname+"(?![a-zA-Z@:_])",keywords:{$pattern:/\\[a-zA-Z]+/,
keyword:"\\"+csname},relevance:0,contains:[SPACE_GOBBLER],starts:starts_mode}},BEGIN_ENV=function(envname,starts_mode){return hljs.inherit({begin:"\\\\begin(?=[ 	]*(\\r?\\n[ 	]*)?\\{"+envname+"\\})",keywords:{$pattern:/\\[a-zA-Z]+/,keyword:"\\begin"},relevance:0},ARGUMENT_AND_THEN(ARGUMENT_M,starts_mode))},VERBATIM_DELIMITED_EQUAL=(innerName="string")=>hljs.END_SAME_AS_BEGIN({className:innerName,begin:/(.|\r?\n)/,end:/(.|\r?\n)/,excludeBegin:!0,excludeEnd:!0,endsParent:!0}),VERBATIM_DELIMITED_ENV=function(envname){
return{className:"string",end:"(?=\\\\end\\{"+envname+"\\})"}},VERBATIM_DELIMITED_BRACES=(innerName="string")=>({relevance:0,begin:/\{/,starts:{endsParent:!0,contains:[{className:innerName,end:/(?=\})/,endsParent:!0,contains:[{begin:/\{/,end:/\}/,relevance:0,contains:["self"]}]}]}}),VERBATIM=[...["verb","lstinline"].map(csname=>CSNAME(csname,{contains:[VERBATIM_DELIMITED_EQUAL()]})),CSNAME("mint",ARGUMENT_AND_THEN(ARGUMENT_M,{contains:[VERBATIM_DELIMITED_EQUAL()]})),CSNAME("mintinline",ARGUMENT_AND_THEN(
ARGUMENT_M,{contains:[VERBATIM_DELIMITED_BRACES(),VERBATIM_DELIMITED_EQUAL()]})),CSNAME("url",{contains:[VERBATIM_DELIMITED_BRACES("link"),VERBATIM_DELIMITED_BRACES("link")]}),CSNAME("hyperref",{contains:[VERBATIM_DELIMITED_BRACES("link")]}),CSNAME("href",ARGUMENT_AND_THEN(ARGUMENT_O,{contains:[VERBATIM_DELIMITED_BRACES("link")]})),...[].concat(...["","\\*"].map(suffix=>[BEGIN_ENV("verbatim"+suffix,VERBATIM_DELIMITED_ENV("verbatim"+suffix)),BEGIN_ENV("filecontents"+suffix,ARGUMENT_AND_THEN(ARGUMENT_M,
VERBATIM_DELIMITED_ENV("filecontents"+suffix))),...["","B","L"].map(prefix=>BEGIN_ENV(prefix+"Verbatim"+suffix,ARGUMENT_AND_THEN(ARGUMENT_O,VERBATIM_DELIMITED_ENV(prefix+"Verbatim"+suffix))))])),BEGIN_ENV("minted",ARGUMENT_AND_THEN(ARGUMENT_O,ARGUMENT_AND_THEN(ARGUMENT_M,VERBATIM_DELIMITED_ENV("minted"))))];return{name:"LaTeX",aliases:["tex"],contains:[...VERBATIM,...EVERYTHING_BUT_VERBATIM]}}function ldif(hljs){return{name:"LDIF",contains:[{className:"attribute",match:"^dn(?=:)",relevance:10},{
className:"attribute",match:"^\\w+(?=:)"},{className:"literal",match:"^-"},hljs.HASH_COMMENT_MODE]}}function leaf(hljs){const IDENT=/([A-Za-z_][A-Za-z_0-9]*)?/,PARAMS={scope:"params",begin:/\(/,end:/\)(?=\:?)/,endsParent:!0,relevance:7,contains:[{scope:"string",begin:'"',end:'"'},{scope:"keyword",match:["true","false","in"].join("|")},{scope:"variable",match:/[A-Za-z_][A-Za-z_0-9]*/},{scope:"operator",match:/\+|\-|\*|\/|\%|\=\=|\=|\!|\>|\<|\&\&|\|\|/}]},INSIDE_DISPATCH={match:[IDENT,/(?=\()/],scope:{
1:"keyword"},contains:[PARAMS]};return PARAMS.contains.unshift(INSIDE_DISPATCH),{name:"Leaf",contains:[{match:[/#+/,IDENT,/(?=\()/],scope:{1:"punctuation",2:"keyword"},starts:{contains:[{match:/\:/,scope:"punctuation"}]},contains:[PARAMS]},{match:[/#+/,IDENT,/:?/],scope:{1:"punctuation",2:"keyword",3:"punctuation"}}]}}function lisp(hljs){const LISP_IDENT_RE="[a-zA-Z_\\-+\\*\\/<=>&#][a-zA-Z0-9_\\-+*\\/<=>&#!]*",MEC_RE="\\|[^]*?\\|",LISP_SIMPLE_NUMBER_RE="(-|\\+)?\\d+(\\.\\d+|\\/\\d+)?((d|e|f|l|s|D|E|F|\
L|S)(\\+|-)?\\d+)?",LITERAL={className:"literal",begin:"\\b(t{1}|nil)\\b"},NUMBER={className:"number",variants:[{begin:LISP_SIMPLE_NUMBER_RE,relevance:0},{begin:"#(b|B)[0-1]+(/[0-1]+)?"},{begin:"#(o|O)[0-7]+(/[0-7]+)?"},{begin:"#(x|X)[0-9a-fA-F]+(/[0-9a-fA-F]+)?"},{begin:"#(c|C)\\("+LISP_SIMPLE_NUMBER_RE+" +"+LISP_SIMPLE_NUMBER_RE,end:"\\)"}]},STRING=hljs.inherit(hljs.QUOTE_STRING_MODE,{illegal:null}),COMMENT=hljs.COMMENT(";","$",{relevance:0}),VARIABLE={begin:"\\*",end:"\\*"},KEYWORD={className:"\
symbol",begin:"[:&]"+LISP_IDENT_RE},IDENT={begin:LISP_IDENT_RE,relevance:0},MEC={begin:MEC_RE},QUOTED={contains:[NUMBER,STRING,VARIABLE,KEYWORD,{begin:"\\(",end:"\\)",contains:["self",LITERAL,STRING,NUMBER,IDENT]},IDENT],variants:[{begin:"['`]\\(",end:"\\)"},{begin:"\\(quote ",end:"\\)",keywords:{name:"quote"}},{begin:"'"+MEC_RE}]},QUOTED_ATOM={variants:[{begin:"'"+LISP_IDENT_RE},{begin:"#'"+LISP_IDENT_RE+"(::"+LISP_IDENT_RE+")*"}]},LIST={begin:"\\(\\s*",end:"\\)"},BODY={endsWithParent:!0,relevance:0};
return LIST.contains=[{className:"name",variants:[{begin:LISP_IDENT_RE,relevance:0},{begin:MEC_RE}]},BODY],BODY.contains=[QUOTED,QUOTED_ATOM,LIST,LITERAL,NUMBER,STRING,COMMENT,VARIABLE,KEYWORD,MEC,IDENT],{name:"Lisp",illegal:/\S/,contains:[NUMBER,hljs.SHEBANG(),LITERAL,STRING,COMMENT,QUOTED,QUOTED_ATOM,LIST,IDENT]}}function livecodeserver(hljs){const VARIABLE={className:"variable",variants:[{begin:"\\b([gtps][A-Z]{1}[a-zA-Z0-9]*)(\\[.+\\])?(?:\\s*?)"},{begin:"\\$_[A-Z]+"}],relevance:0},COMMENT_MODES=[
hljs.C_BLOCK_COMMENT_MODE,hljs.HASH_COMMENT_MODE,hljs.COMMENT("--","$"),hljs.COMMENT("[^:]//","$")],TITLE1=hljs.inherit(hljs.TITLE_MODE,{variants:[{begin:"\\b_*rig[A-Z][A-Za-z0-9_\\-]*"},{begin:"\\b_[a-z0-9\\-]+"}]}),TITLE2=hljs.inherit(hljs.TITLE_MODE,{begin:"\\b([A-Za-z0-9_\\-]+)\\b"});return{name:"LiveCode",case_insensitive:!1,keywords:{keyword:"$_COOKIE $_FILES $_GET $_GET_BINARY $_GET_RAW $_POST $_POST_BINARY $_POST_RAW $_SESSION $_SERVER codepoint codepoints segment segments codeunit codeu\
nits sentence sentences trueWord trueWords paragraph after byte bytes english the until http forever descending using line real8 with seventh for stdout finally element word words fourth before black ninth sixth characters chars stderr uInt1 uInt1s uInt2 uInt2s stdin string lines relative rel any fifth items from middle mid at else of catch then third it file milliseconds seconds second secs sec int1 int1s int4 int4s internet int2 int2s normal text item last long detailed effective uInt4 uInt4s \
repeat end repeat URL in try into switch to words https token binfile each tenth as ticks tick system real4 by dateItems without char character ascending eighth whole dateTime numeric short first ftp integer abbreviated abbr abbrev private case while if div mod wrap and or bitAnd bitNot bitOr bitXor among not in a an within contains ends with begins the keys of keys",literal:"SIX TEN FORMFEED NINE ZERO NONE SPACE FOUR FALSE COLON CRLF PI COMMA ENDOFFILE EOF EIGHT FIVE QUOTE EMPTY ONE TRUE RETURN\
 CR LINEFEED RIGHT BACKSLASH NULL SEVEN TAB THREE TWO six ten formfeed nine zero none space four false colon crlf pi comma endoffile eof eight five quote empty one true return cr linefeed right backslash null seven tab three two RIVERSION RISTATE FILE_READ_MODE FILE_WRITE_MODE FILE_WRITE_MODE DIR_WRITE_MODE FILE_READ_UMASK FILE_WRITE_UMASK DIR_READ_UMASK DIR_WRITE_UMASK",built_in:"put abs acos aliasReference annuity arrayDecode arrayEncode asin atan atan2 average avg avgDev base64Decode base64En\
code baseConvert binaryDecode binaryEncode byteOffset byteToNum cachedURL cachedURLs charToNum cipherNames codepointOffset codepointProperty codepointToNum codeunitOffset commandNames compound compress constantNames cos date dateFormat decompress difference directories diskSpace DNSServers exp exp1 exp2 exp10 extents files flushEvents folders format functionNames geometricMean global globals hasMemory harmonicMean hostAddress hostAddressToName hostName hostNameToAddress isNumber ISOToMac itemOff\
set keys len length libURLErrorData libUrlFormData libURLftpCommand libURLLastHTTPHeaders libURLLastRHHeaders libUrlMultipartFormAddPart libUrlMultipartFormData libURLVersion lineOffset ln ln1 localNames log log2 log10 longFilePath lower macToISO matchChunk matchText matrixMultiply max md5Digest median merge messageAuthenticationCode messageDigest millisec millisecs millisecond milliseconds min monthNames nativeCharToNum normalizeText num number numToByte numToChar numToCodepoint numToNativeChar\
 offset open openfiles openProcesses openProcessIDs openSockets paragraphOffset paramCount param params peerAddress pendingMessages platform popStdDev populationStandardDeviation populationVariance popVariance processID random randomBytes replaceText result revCreateXMLTree revCreateXMLTreeFromFile revCurrentRecord revCurrentRecordIsFirst revCurrentRecordIsLast revDatabaseColumnCount revDatabaseColumnIsNull revDatabaseColumnLengths revDatabaseColumnNames revDatabaseColumnNamed revDatabaseColumnN\
umbered revDatabaseColumnTypes revDatabaseConnectResult revDatabaseCursors revDatabaseID revDatabaseTableNames revDatabaseType revDataFromQuery revdb_closeCursor revdb_columnbynumber revdb_columncount revdb_columnisnull revdb_columnlengths revdb_columnnames revdb_columntypes revdb_commit revdb_connect revdb_connections revdb_connectionerr revdb_currentrecord revdb_cursorconnection revdb_cursorerr revdb_cursors revdb_dbtype revdb_disconnect revdb_execute revdb_iseof revdb_isbof revdb_movefirst re\
vdb_movelast revdb_movenext revdb_moveprev revdb_query revdb_querylist revdb_recordcount revdb_rollback revdb_tablenames revGetDatabaseDriverPath revNumberOfRecords revOpenDatabase revOpenDatabases revQueryDatabase revQueryDatabaseBlob revQueryResult revQueryIsAtStart revQueryIsAtEnd revUnixFromMacPath revXMLAttribute revXMLAttributes revXMLAttributeValues revXMLChildContents revXMLChildNames revXMLCreateTreeFromFileWithNamespaces revXMLCreateTreeWithNamespaces revXMLDataFromXPathQuery revXMLEva\
luateXPath revXMLFirstChild revXMLMatchingNode revXMLNextSibling revXMLNodeContents revXMLNumberOfChildren revXMLParent revXMLPreviousSibling revXMLRootNode revXMLRPC_CreateRequest revXMLRPC_Documents revXMLRPC_Error revXMLRPC_GetHost revXMLRPC_GetMethod revXMLRPC_GetParam revXMLText revXMLRPC_Execute revXMLRPC_GetParamCount revXMLRPC_GetParamNode revXMLRPC_GetParamType revXMLRPC_GetPath revXMLRPC_GetPort revXMLRPC_GetProtocol revXMLRPC_GetRequest revXMLRPC_GetResponse revXMLRPC_GetSocket revXML\
Tree revXMLTrees revXMLValidateDTD revZipDescribeItem revZipEnumerateItems revZipOpenArchives round sampVariance sec secs seconds sentenceOffset sha1Digest shell shortFilePath sin specialFolderPath sqrt standardDeviation statRound stdDev sum sysError systemVersion tan tempName textDecode textEncode tick ticks time to tokenOffset toLower toUpper transpose truewordOffset trunc uniDecode uniEncode upper URLDecode URLEncode URLStatus uuid value variableNames variance version waitDepth weekdayNames w\
ordOffset xsltApplyStylesheet xsltApplyStylesheetFromFile xsltLoadStylesheet xsltLoadStylesheetFromFile add breakpoint cancel clear local variable file word line folder directory URL close socket process combine constant convert create new alias folder directory decrypt delete variable word line folder directory URL dispatch divide do encrypt filter get include intersect kill libURLDownloadToFile libURLFollowHttpRedirects libURLftpUpload libURLftpUploadFile libURLresetAll libUrlSetAuthCallback l\
ibURLSetDriver libURLSetCustomHTTPHeaders libUrlSetExpect100 libURLSetFTPListCommand libURLSetFTPMode libURLSetFTPStopTime libURLSetStatusCallback load extension loadedExtensions multiply socket prepare process post seek rel relative read from process rename replace require resetAll resolve revAddXMLNode revAppendXML revCloseCursor revCloseDatabase revCommitDatabase revCopyFile revCopyFolder revCopyXMLNode revDeleteFolder revDeleteXMLNode revDeleteAllXMLTrees revDeleteXMLTree revExecuteSQL revGo\
URL revInsertXMLNode revMoveFolder revMoveToFirstRecord revMoveToLastRecord revMoveToNextRecord revMoveToPreviousRecord revMoveToRecord revMoveXMLNode revPutIntoXMLNode revRollBackDatabase revSetDatabaseDriverPath revSetXMLAttribute revXMLRPC_AddParam revXMLRPC_DeleteAllDocuments revXMLAddDTD revXMLRPC_Free revXMLRPC_FreeAll revXMLRPC_DeleteDocument revXMLRPC_DeleteParam revXMLRPC_SetHost revXMLRPC_SetMethod revXMLRPC_SetPort revXMLRPC_SetProtocol revXMLRPC_SetSocket revZipAddItemWithData revZip\
AddItemWithFile revZipAddUncompressedItemWithData revZipAddUncompressedItemWithFile revZipCancel revZipCloseArchive revZipDeleteItem revZipExtractItemToFile revZipExtractItemToVariable revZipSetProgressCallback revZipRenameItem revZipReplaceItemWithData revZipReplaceItemWithFile revZipOpenArchive send set sort split start stop subtract symmetric union unload vectorDotProduct wait write"},contains:[VARIABLE,{className:"keyword",begin:"\\bend\\sif\\b"},{className:"function",beginKeywords:"function",
end:"$",contains:[VARIABLE,TITLE2,hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,hljs.BINARY_NUMBER_MODE,hljs.C_NUMBER_MODE,TITLE1]},{className:"function",begin:"\\bend\\s+",end:"$",keywords:"end",contains:[TITLE2,TITLE1],relevance:0},{beginKeywords:"command on",end:"$",contains:[VARIABLE,TITLE2,hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,hljs.BINARY_NUMBER_MODE,hljs.C_NUMBER_MODE,TITLE1]},{className:"meta",variants:[{begin:"<\\?(rev|lc|livecode)",relevance:10},{begin:"<\\?"},{begin:"\\?>"}]},hljs.
APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,hljs.BINARY_NUMBER_MODE,hljs.C_NUMBER_MODE,TITLE1].concat(COMMENT_MODES),illegal:";$|^\\[|^=|&|\\{"}}const KEYWORDS$2=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],LITERALS$2=["true","false","nul\
l","undefined","NaN","Infinity"],TYPES$2=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],ERROR_TYPES$2=[
"Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],BUILT_IN_GLOBALS$2=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],BUILT_INS$2=[].concat(BUILT_IN_GLOBALS$2,TYPES$2,ERROR_TYPES$2);function livescript(hljs){const LIVESCRIPT_BUILT_INS=["npm","print"],LIVESCRIPT_LITERALS=["yes","\
no","on","off","it","that","void"],LIVESCRIPT_KEYWORDS=["then","unless","until","loop","of","by","when","and","or","is","isnt","not","it","that","otherwise","from","to","til","fallthrough","case","enum","native","list","map","__hasProp","__extends","__slice","__bind","__indexOf"],KEYWORDS$12={keyword:KEYWORDS$2.concat(LIVESCRIPT_KEYWORDS),literal:LITERALS$2.concat(LIVESCRIPT_LITERALS),built_in:BUILT_INS$2.concat(LIVESCRIPT_BUILT_INS)},JS_IDENT_RE="[A-Za-z$_](?:-[0-9A-Za-z$_]|[0-9A-Za-z$_])*",TITLE=hljs.
inherit(hljs.TITLE_MODE,{begin:JS_IDENT_RE}),SUBST={className:"subst",begin:/#\{/,end:/\}/,keywords:KEYWORDS$12},SUBST_SIMPLE={className:"subst",begin:/#[A-Za-z$_]/,end:/(?:-[0-9A-Za-z$_]|[0-9A-Za-z$_])*/,keywords:KEYWORDS$12},EXPRESSIONS=[hljs.BINARY_NUMBER_MODE,{className:"number",begin:"(\\b0[xX][a-fA-F0-9_]+)|(\\b\\d(\\d|_\\d)*(\\.(\\d(\\d|_\\d)*)?)?(_*[eE]([-+]\\d(_\\d|\\d)*)?)?[_a-z]*)",relevance:0,starts:{end:"(\\s*/)?",relevance:0}},{className:"string",variants:[{begin:/'''/,end:/'''/,contains:[
hljs.BACKSLASH_ESCAPE]},{begin:/'/,end:/'/,contains:[hljs.BACKSLASH_ESCAPE]},{begin:/"""/,end:/"""/,contains:[hljs.BACKSLASH_ESCAPE,SUBST,SUBST_SIMPLE]},{begin:/"/,end:/"/,contains:[hljs.BACKSLASH_ESCAPE,SUBST,SUBST_SIMPLE]},{begin:/\\/,end:/(\s|$)/,excludeEnd:!0}]},{className:"regexp",variants:[{begin:"//",end:"//[gim]*",contains:[SUBST,hljs.HASH_COMMENT_MODE]},{begin:/\/(?![ *])(\\.|[^\\\n])*?\/[gim]*(?=\W)/}]},{begin:"@"+JS_IDENT_RE},{begin:"``",end:"``",excludeBegin:!0,excludeEnd:!0,subLanguage:"\
javascript"}];SUBST.contains=EXPRESSIONS;const PARAMS={className:"params",begin:"\\(",returnBegin:!0,contains:[{begin:/\(/,end:/\)/,keywords:KEYWORDS$12,contains:["self"].concat(EXPRESSIONS)}]},SYMBOLS={begin:"(#=>|=>|\\|>>|-?->|!->)"},CLASS_DEFINITION={variants:[{match:[/class\s+/,JS_IDENT_RE,/\s+extends\s+/,JS_IDENT_RE]},{match:[/class\s+/,JS_IDENT_RE]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:KEYWORDS$12};return{name:"LiveScript",aliases:["ls"],keywords:KEYWORDS$12,illegal:/\/\*/,
contains:EXPRESSIONS.concat([hljs.COMMENT("\\/\\*","\\*\\/"),hljs.HASH_COMMENT_MODE,SYMBOLS,{className:"function",contains:[TITLE,PARAMS],returnBegin:!0,variants:[{begin:"("+JS_IDENT_RE+"\\s*(?:=|:=)\\s*)?(\\(.*\\)\\s*)?\\B->\\*?",end:"->\\*?"},{begin:"("+JS_IDENT_RE+"\\s*(?:=|:=)\\s*)?!?(\\(.*\\)\\s*)?\\B[-~]{1,2}>\\*?",end:"[-~]{1,2}>\\*?"},{begin:"("+JS_IDENT_RE+"\\s*(?:=|:=)\\s*)?(\\(.*\\)\\s*)?\\B!?[-~]{1,2}>\\*?",end:"!?[-~]{1,2}>\\*?"}]},CLASS_DEFINITION,{begin:JS_IDENT_RE+":",end:":",returnBegin:!0,
returnEnd:!0,relevance:0}])}}function llvm(hljs){const regex=hljs.regex,IDENT_RE2=/([-a-zA-Z$._][\w$.-]*)/,TYPE={className:"type",begin:/\bi\d+(?=\s|\b)/},OPERATOR={className:"operator",relevance:0,begin:/=/},PUNCTUATION={className:"punctuation",relevance:0,begin:/,/},NUMBER={className:"number",variants:[{begin:/[su]?0[xX][KMLHR]?[a-fA-F0-9]+/},{begin:/[-+]?\d+(?:[.]\d+)?(?:[eE][-+]?\d+(?:[.]\d+)?)?/}],relevance:0},LABEL={className:"symbol",variants:[{begin:/^\s*[a-z]+:/}],relevance:0},VARIABLE={
className:"variable",variants:[{begin:regex.concat(/%/,IDENT_RE2)},{begin:/%\d+/},{begin:/#\d+/}]},FUNCTION={className:"title",variants:[{begin:regex.concat(/@/,IDENT_RE2)},{begin:/@\d+/},{begin:regex.concat(/!/,IDENT_RE2)},{begin:regex.concat(/!\d+/,IDENT_RE2)},{begin:/!\d+/}]};return{name:"LLVM IR",keywords:{keyword:"begin end true false declare define global constant private linker_private internal available_externally linkonce linkonce_odr weak weak_odr appending dllimport dllexport common d\
efault hidden protected extern_weak external thread_local zeroinitializer undef null to tail target triple datalayout volatile nuw nsw nnan ninf nsz arcp fast exact inbounds align addrspace section alias module asm sideeffect gc dbg linker_private_weak attributes blockaddress initialexec localdynamic localexec prefix unnamed_addr ccc fastcc coldcc x86_stdcallcc x86_fastcallcc arm_apcscc arm_aapcscc arm_aapcs_vfpcc ptx_device ptx_kernel intel_ocl_bicc msp430_intrcc spir_func spir_kernel x86_64_sy\
svcc x86_64_win64cc x86_thiscallcc cc c signext zeroext inreg sret nounwind noreturn noalias nocapture byval nest readnone readonly inlinehint noinline alwaysinline optsize ssp sspreq noredzone noimplicitfloat naked builtin cold nobuiltin noduplicate nonlazybind optnone returns_twice sanitize_address sanitize_memory sanitize_thread sspstrong uwtable returned type opaque eq ne slt sgt sle sge ult ugt ule uge oeq one olt ogt ole oge ord uno ueq une x acq_rel acquire alignstack atomic catch cleanup\
 filter inteldialect max min monotonic nand personality release seq_cst singlethread umax umin unordered xchg add fadd sub fsub mul fmul udiv sdiv fdiv urem srem frem shl lshr ashr and or xor icmp fcmp phi call trunc zext sext fptrunc fpext uitofp sitofp fptoui fptosi inttoptr ptrtoint bitcast addrspacecast select va_arg ret br switch invoke unwind unreachable indirectbr landingpad resume malloc alloca free load store getelementptr extractelement insertelement shufflevector getresult extractvalu\
e insertvalue atomicrmw cmpxchg fence argmemonly",type:"void half bfloat float double fp128 x86_fp80 ppc_fp128 x86_amx x86_mmx ptr label token metadata opaque"},contains:[TYPE,hljs.COMMENT(/;\s*$/,null,{relevance:0}),hljs.COMMENT(/;/,/$/),{className:"string",begin:/"/,end:/"/,contains:[{className:"char.escape",match:/\\\d\d/}]},FUNCTION,PUNCTUATION,OPERATOR,VARIABLE,LABEL,NUMBER]}}function lsl(hljs){const LSL_STRINGS={className:"string",begin:'"',end:'"',contains:[{className:"subst",begin:/\\[tn"\\]/}]},
LSL_NUMBERS={className:"number",relevance:0,begin:hljs.C_NUMBER_RE},LSL_CONSTANTS={className:"literal",variants:[{begin:"\\b(PI|TWO_PI|PI_BY_TWO|DEG_TO_RAD|RAD_TO_DEG|SQRT2)\\b"},{begin:"\\b(XP_ERROR_(EXPERIENCES_DISABLED|EXPERIENCE_(DISABLED|SUSPENDED)|INVALID_(EXPERIENCE|PARAMETERS)|KEY_NOT_FOUND|MATURITY_EXCEEDED|NONE|NOT_(FOUND|PERMITTED(_LAND)?)|NO_EXPERIENCE|QUOTA_EXCEEDED|RETRY_UPDATE|STORAGE_EXCEPTION|STORE_DISABLED|THROTTLED|UNKNOWN_ERROR)|JSON_APPEND|STATUS_(PHYSICS|ROTATE_[XYZ]|PHANTOM\
|SANDBOX|BLOCK_GRAB(_OBJECT)?|(DIE|RETURN)_AT_EDGE|CAST_SHADOWS|OK|MALFORMED_PARAMS|TYPE_MISMATCH|BOUNDS_ERROR|NOT_(FOUND|SUPPORTED)|INTERNAL_ERROR|WHITELIST_FAILED)|AGENT(_(BY_(LEGACY_|USER)NAME|FLYING|ATTACHMENTS|SCRIPTED|MOUSELOOK|SITTING|ON_OBJECT|AWAY|WALKING|IN_AIR|TYPING|CROUCHING|BUSY|ALWAYS_RUN|AUTOPILOT|LIST_(PARCEL(_OWNER)?|REGION)))?|CAMERA_(PITCH|DISTANCE|BEHINDNESS_(ANGLE|LAG)|(FOCUS|POSITION)(_(THRESHOLD|LOCKED|LAG))?|FOCUS_OFFSET|ACTIVE)|ANIM_ON|LOOP|REVERSE|PING_PONG|SMOOTH|ROTA\
TE|SCALE|ALL_SIDES|LINK_(ROOT|SET|ALL_(OTHERS|CHILDREN)|THIS)|ACTIVE|PASS(IVE|_(ALWAYS|IF_NOT_HANDLED|NEVER))|SCRIPTED|CONTROL_(FWD|BACK|(ROT_)?(LEFT|RIGHT)|UP|DOWN|(ML_)?LBUTTON)|PERMISSION_(RETURN_OBJECTS|DEBIT|OVERRIDE_ANIMATIONS|SILENT_ESTATE_MANAGEMENT|TAKE_CONTROLS|TRIGGER_ANIMATION|ATTACH|CHANGE_LINKS|(CONTROL|TRACK)_CAMERA|TELEPORT)|INVENTORY_(TEXTURE|SOUND|OBJECT|SCRIPT|LANDMARK|CLOTHING|NOTECARD|BODYPART|ANIMATION|GESTURE|ALL|NONE)|CHANGED_(INVENTORY|COLOR|SHAPE|SCALE|TEXTURE|LINK|ALLO\
WED_DROP|OWNER|REGION(_START)?|TELEPORT|MEDIA)|OBJECT_(CLICK_ACTION|HOVER_HEIGHT|LAST_OWNER_ID|(PHYSICS|SERVER|STREAMING)_COST|UNKNOWN_DETAIL|CHARACTER_TIME|PHANTOM|PHYSICS|TEMP_(ATTACHED|ON_REZ)|NAME|DESC|POS|PRIM_(COUNT|EQUIVALENCE)|RETURN_(PARCEL(_OWNER)?|REGION)|REZZER_KEY|ROO?T|VELOCITY|OMEGA|OWNER|GROUP(_TAG)?|CREATOR|ATTACHED_(POINT|SLOTS_AVAILABLE)|RENDER_WEIGHT|(BODY_SHAPE|PATHFINDING)_TYPE|(RUNNING|TOTAL)_SCRIPT_COUNT|TOTAL_INVENTORY_COUNT|SCRIPT_(MEMORY|TIME))|TYPE_(INTEGER|FLOAT|STRI\
NG|KEY|VECTOR|ROTATION|INVALID)|(DEBUG|PUBLIC)_CHANNEL|ATTACH_(AVATAR_CENTER|CHEST|HEAD|BACK|PELVIS|MOUTH|CHIN|NECK|NOSE|BELLY|[LR](SHOULDER|HAND|FOOT|EAR|EYE|[UL](ARM|LEG)|HIP)|(LEFT|RIGHT)_PEC|HUD_(CENTER_[12]|TOP_(RIGHT|CENTER|LEFT)|BOTTOM(_(RIGHT|LEFT))?)|[LR]HAND_RING1|TAIL_(BASE|TIP)|[LR]WING|FACE_(JAW|[LR]EAR|[LR]EYE|TOUNGE)|GROIN|HIND_[LR]FOOT)|LAND_(LEVEL|RAISE|LOWER|SMOOTH|NOISE|REVERT)|DATA_(ONLINE|NAME|BORN|SIM_(POS|STATUS|RATING)|PAYINFO)|PAYMENT_INFO_(ON_FILE|USED)|REMOTE_DATA_(CHA\
NNEL|REQUEST|REPLY)|PSYS_(PART_(BF_(ZERO|ONE(_MINUS_(DEST_COLOR|SOURCE_(ALPHA|COLOR)))?|DEST_COLOR|SOURCE_(ALPHA|COLOR))|BLEND_FUNC_(DEST|SOURCE)|FLAGS|(START|END)_(COLOR|ALPHA|SCALE|GLOW)|MAX_AGE|(RIBBON|WIND|INTERP_(COLOR|SCALE)|BOUNCE|FOLLOW_(SRC|VELOCITY)|TARGET_(POS|LINEAR)|EMISSIVE)_MASK)|SRC_(MAX_AGE|PATTERN|ANGLE_(BEGIN|END)|BURST_(RATE|PART_COUNT|RADIUS|SPEED_(MIN|MAX))|ACCEL|TEXTURE|TARGET_KEY|OMEGA|PATTERN_(DROP|EXPLODE|ANGLE(_CONE(_EMPTY)?)?)))|VEHICLE_(REFERENCE_FRAME|TYPE_(NONE|SLE\
D|CAR|BOAT|AIRPLANE|BALLOON)|(LINEAR|ANGULAR)_(FRICTION_TIMESCALE|MOTOR_DIRECTION)|LINEAR_MOTOR_OFFSET|HOVER_(HEIGHT|EFFICIENCY|TIMESCALE)|BUOYANCY|(LINEAR|ANGULAR)_(DEFLECTION_(EFFICIENCY|TIMESCALE)|MOTOR_(DECAY_)?TIMESCALE)|VERTICAL_ATTRACTION_(EFFICIENCY|TIMESCALE)|BANKING_(EFFICIENCY|MIX|TIMESCALE)|FLAG_(NO_DEFLECTION_UP|LIMIT_(ROLL_ONLY|MOTOR_UP)|HOVER_((WATER|TERRAIN|UP)_ONLY|GLOBAL_HEIGHT)|MOUSELOOK_(STEER|BANK)|CAMERA_DECOUPLED))|PRIM_(ALLOW_UNSIT|ALPHA_MODE(_(BLEND|EMISSIVE|MASK|NONE))?\
|NORMAL|SPECULAR|TYPE(_(BOX|CYLINDER|PRISM|SPHERE|TORUS|TUBE|RING|SCULPT))?|HOLE_(DEFAULT|CIRCLE|SQUARE|TRIANGLE)|MATERIAL(_(STONE|METAL|GLASS|WOOD|FLESH|PLASTIC|RUBBER))?|SHINY_(NONE|LOW|MEDIUM|HIGH)|BUMP_(NONE|BRIGHT|DARK|WOOD|BARK|BRICKS|CHECKER|CONCRETE|TILE|STONE|DISKS|GRAVEL|BLOBS|SIDING|LARGETILE|STUCCO|SUCTION|WEAVE)|TEXGEN_(DEFAULT|PLANAR)|SCRIPTED_SIT_ONLY|SCULPT_(TYPE_(SPHERE|TORUS|PLANE|CYLINDER|MASK)|FLAG_(MIRROR|INVERT))|PHYSICS(_(SHAPE_(CONVEX|NONE|PRIM|TYPE)))?|(POS|ROT)_LOCAL|SL\
ICE|TEXT|FLEXIBLE|POINT_LIGHT|TEMP_ON_REZ|PHANTOM|POSITION|SIT_TARGET|SIZE|ROTATION|TEXTURE|NAME|OMEGA|DESC|LINK_TARGET|COLOR|BUMP_SHINY|FULLBRIGHT|TEXGEN|GLOW|MEDIA_(ALT_IMAGE_ENABLE|CONTROLS|(CURRENT|HOME)_URL|AUTO_(LOOP|PLAY|SCALE|ZOOM)|FIRST_CLICK_INTERACT|(WIDTH|HEIGHT)_PIXELS|WHITELIST(_ENABLE)?|PERMS_(INTERACT|CONTROL)|PARAM_MAX|CONTROLS_(STANDARD|MINI)|PERM_(NONE|OWNER|GROUP|ANYONE)|MAX_(URL_LENGTH|WHITELIST_(SIZE|COUNT)|(WIDTH|HEIGHT)_PIXELS)))|MASK_(BASE|OWNER|GROUP|EVERYONE|NEXT)|PERM\
_(TRANSFER|MODIFY|COPY|MOVE|ALL)|PARCEL_(MEDIA_COMMAND_(STOP|PAUSE|PLAY|LOOP|TEXTURE|URL|TIME|AGENT|UNLOAD|AUTO_ALIGN|TYPE|SIZE|DESC|LOOP_SET)|FLAG_(ALLOW_(FLY|(GROUP_)?SCRIPTS|LANDMARK|TERRAFORM|DAMAGE|CREATE_(GROUP_)?OBJECTS)|USE_(ACCESS_(GROUP|LIST)|BAN_LIST|LAND_PASS_LIST)|LOCAL_SOUND_ONLY|RESTRICT_PUSHOBJECT|ALLOW_(GROUP|ALL)_OBJECT_ENTRY)|COUNT_(TOTAL|OWNER|GROUP|OTHER|SELECTED|TEMP)|DETAILS_(NAME|DESC|OWNER|GROUP|AREA|ID|SEE_AVATARS))|LIST_STAT_(MAX|MIN|MEAN|MEDIAN|STD_DEV|SUM(_SQUARES)?|\
NUM_COUNT|GEOMETRIC_MEAN|RANGE)|PAY_(HIDE|DEFAULT)|REGION_FLAG_(ALLOW_DAMAGE|FIXED_SUN|BLOCK_TERRAFORM|SANDBOX|DISABLE_(COLLISIONS|PHYSICS)|BLOCK_FLY|ALLOW_DIRECT_TELEPORT|RESTRICT_PUSHOBJECT)|HTTP_(METHOD|MIMETYPE|BODY_(MAXLENGTH|TRUNCATED)|CUSTOM_HEADER|PRAGMA_NO_CACHE|VERBOSE_THROTTLE|VERIFY_CERT)|SIT_(INVALID_(AGENT|LINK_OBJECT)|NO(T_EXPERIENCE|_(ACCESS|EXPERIENCE_PERMISSION|SIT_TARGET)))|STRING_(TRIM(_(HEAD|TAIL))?)|CLICK_ACTION_(NONE|TOUCH|SIT|BUY|PAY|OPEN(_MEDIA)?|PLAY|ZOOM)|TOUCH_INVALID\
_FACE|PROFILE_(NONE|SCRIPT_MEMORY)|RC_(DATA_FLAGS|DETECT_PHANTOM|GET_(LINK_NUM|NORMAL|ROOT_KEY)|MAX_HITS|REJECT_(TYPES|AGENTS|(NON)?PHYSICAL|LAND))|RCERR_(CAST_TIME_EXCEEDED|SIM_PERF_LOW|UNKNOWN)|ESTATE_ACCESS_(ALLOWED_(AGENT|GROUP)_(ADD|REMOVE)|BANNED_AGENT_(ADD|REMOVE))|DENSITY|FRICTION|RESTITUTION|GRAVITY_MULTIPLIER|KFM_(COMMAND|CMD_(PLAY|STOP|PAUSE)|MODE|FORWARD|LOOP|PING_PONG|REVERSE|DATA|ROTATION|TRANSLATION)|ERR_(GENERIC|PARCEL_PERMISSIONS|MALFORMED_PARAMS|RUNTIME_PERMISSIONS|THROTTLED)|C\
HARACTER_(CMD_((SMOOTH_)?STOP|JUMP)|DESIRED_(TURN_)?SPEED|RADIUS|STAY_WITHIN_PARCEL|LENGTH|ORIENTATION|ACCOUNT_FOR_SKIPPED_FRAMES|AVOIDANCE_MODE|TYPE(_([ABCD]|NONE))?|MAX_(DECEL|TURN_RADIUS|(ACCEL|SPEED)))|PURSUIT_(OFFSET|FUZZ_FACTOR|GOAL_TOLERANCE|INTERCEPT)|REQUIRE_LINE_OF_SIGHT|FORCE_DIRECT_PATH|VERTICAL|HORIZONTAL|AVOID_(CHARACTERS|DYNAMIC_OBSTACLES|NONE)|PU_(EVADE_(HIDDEN|SPOTTED)|FAILURE_(DYNAMIC_PATHFINDING_DISABLED|INVALID_(GOAL|START)|NO_(NAVMESH|VALID_DESTINATION)|OTHER|TARGET_GONE|(PA\
RCEL_)?UNREACHABLE)|(GOAL|SLOWDOWN_DISTANCE)_REACHED)|TRAVERSAL_TYPE(_(FAST|NONE|SLOW))?|CONTENT_TYPE_(ATOM|FORM|HTML|JSON|LLSD|RSS|TEXT|XHTML|XML)|GCNP_(RADIUS|STATIC)|(PATROL|WANDER)_PAUSE_AT_WAYPOINTS|OPT_(AVATAR|CHARACTER|EXCLUSION_VOLUME|LEGACY_LINKSET|MATERIAL_VOLUME|OTHER|STATIC_OBSTACLE|WALKABLE)|SIM_STAT_PCT_CHARS_STEPPED)\\b"},{begin:"\\b(FALSE|TRUE)\\b"},{begin:"\\b(ZERO_ROTATION)\\b"},{begin:"\\b(EOF|JSON_(ARRAY|DELETE|FALSE|INVALID|NULL|NUMBER|OBJECT|STRING|TRUE)|NULL_KEY|TEXTURE_(BL\
ANK|DEFAULT|MEDIA|PLYWOOD|TRANSPARENT)|URL_REQUEST_(GRANTED|DENIED))\\b"},{begin:"\\b(ZERO_VECTOR|TOUCH_INVALID_(TEXCOORD|VECTOR))\\b"}]},LSL_FUNCTIONS={className:"built_in",begin:"\\b(ll(AgentInExperience|(Create|DataSize|Delete|KeyCount|Keys|Read|Update)KeyValue|GetExperience(Details|ErrorMessage)|ReturnObjectsBy(ID|Owner)|Json(2List|[GS]etValue|ValueType)|Sin|Cos|Tan|Atan2|Sqrt|Pow|Abs|Fabs|Frand|Floor|Ceil|Round|Vec(Mag|Norm|Dist)|Rot(Between|2(Euler|Fwd|Left|Up))|(Euler|Axes)2Rot|Whisper|(Re\
gion|Owner)?Say|Shout|Listen(Control|Remove)?|Sensor(Repeat|Remove)?|Detected(Name|Key|Owner|Type|Pos|Vel|Grab|Rot|Group|LinkNumber)|Die|Ground|Wind|([GS]et)(AnimationOverride|MemoryLimit|PrimMediaParams|ParcelMusicURL|Object(Desc|Name)|PhysicsMaterial|Status|Scale|Color|Alpha|Texture|Pos|Rot|Force|Torque)|ResetAnimationOverride|(Scale|Offset|Rotate)Texture|(Rot)?Target(Remove)?|(Stop)?MoveToTarget|Apply(Rotational)?Impulse|Set(KeyframedMotion|ContentType|RegionPos|(Angular)?Velocity|Buoyancy|Ho\
verHeight|ForceAndTorque|TimerEvent|ScriptState|Damage|TextureAnim|Sound(Queueing|Radius)|Vehicle(Type|(Float|Vector|Rotation)Param)|(Touch|Sit)?Text|Camera(Eye|At)Offset|PrimitiveParams|ClickAction|Link(Alpha|Color|PrimitiveParams(Fast)?|Texture(Anim)?|Camera|Media)|RemoteScriptAccessPin|PayPrice|LocalRot)|ScaleByFactor|Get((Max|Min)ScaleFactor|ClosestNavPoint|StaticPath|SimStats|Env|PrimitiveParams|Link(PrimitiveParams|Number(OfSides)?|Key|Name|Media)|HTTPHeader|FreeURLs|Object(Details|PermMas\
k|PrimCount)|Parcel(MaxPrims|Details|Prim(Count|Owners))|Attached(List)?|(SPMax|Free|Used)Memory|Region(Name|TimeDilation|FPS|Corner|AgentCount)|Root(Position|Rotation)|UnixTime|(Parcel|Region)Flags|(Wall|GMT)clock|SimulatorHostname|BoundingBox|GeometricCenter|Creator|NumberOf(Prims|NotecardLines|Sides)|Animation(List)?|(Camera|Local)(Pos|Rot)|Vel|Accel|Omega|Time(stamp|OfDay)|(Object|CenterOf)?Mass|MassMKS|Energy|Owner|(Owner)?Key|SunDirection|Texture(Offset|Scale|Rot)|Inventory(Number|Name|Key\
|Type|Creator|PermMask)|Permissions(Key)?|StartParameter|List(Length|EntryType)|Date|Agent(Size|Info|Language|List)|LandOwnerAt|NotecardLine|Script(Name|State))|(Get|Reset|GetAndReset)Time|PlaySound(Slave)?|LoopSound(Master|Slave)?|(Trigger|Stop|Preload)Sound|((Get|Delete)Sub|Insert)String|To(Upper|Lower)|Give(InventoryList|Money)|RezObject|(Stop)?LookAt|Sleep|CollisionFilter|(Take|Release)Controls|DetachFromAvatar|AttachToAvatar(Temp)?|InstantMessage|(GetNext)?Email|StopHover|MinEventDelay|RotL\
ookAt|String(Length|Trim)|(Start|Stop)Animation|TargetOmega|Request(Experience)?Permissions|(Create|Break)Link|BreakAllLinks|(Give|Remove)Inventory|Water|PassTouches|Request(Agent|Inventory)Data|TeleportAgent(Home|GlobalCoords)?|ModifyLand|CollisionSound|ResetScript|MessageLinked|PushObject|PassCollisions|AxisAngle2Rot|Rot2(Axis|Angle)|A(cos|sin)|AngleBetween|AllowInventoryDrop|SubStringIndex|List2(CSV|Integer|Json|Float|String|Key|Vector|Rot|List(Strided)?)|DeleteSubList|List(Statistics|Sort|Ra\
ndomize|(Insert|Find|Replace)List)|EdgeOfWorld|AdjustSoundVolume|Key2Name|TriggerSoundLimited|EjectFromLand|(CSV|ParseString)2List|OverMyLand|SameGroup|UnSit|Ground(Slope|Normal|Contour)|GroundRepel|(Set|Remove)VehicleFlags|SitOnLink|(AvatarOn)?(Link)?SitTarget|Script(Danger|Profiler)|Dialog|VolumeDetect|ResetOtherScript|RemoteLoadScriptPin|(Open|Close)RemoteDataChannel|SendRemoteData|RemoteDataReply|(Integer|String)ToBase64|XorBase64|Log(10)?|Base64To(String|Integer)|ParseStringKeepNulls|RezAtR\
oot|RequestSimulatorData|ForceMouselook|(Load|Release|(E|Une)scape)URL|ParcelMedia(CommandList|Query)|ModPow|MapDestination|(RemoveFrom|AddTo|Reset)Land(Pass|Ban)List|(Set|Clear)CameraParams|HTTP(Request|Response)|TextBox|DetectedTouch(UV|Face|Pos|(N|Bin)ormal|ST)|(MD5|SHA1|DumpList2)String|Request(Secure)?URL|Clear(Prim|Link)Media|(Link)?ParticleSystem|(Get|Request)(Username|DisplayName)|RegionSayTo|CastRay|GenerateKey|TransferLindenDollars|ManageEstateAccess|(Create|Delete)Character|ExecCharac\
terCmd|Evade|FleeFrom|NavigateTo|PatrolPoints|Pursue|UpdateCharacter|WanderWithin))\\b"};return{name:"LSL (Linden Scripting Language)",illegal:":",contains:[LSL_STRINGS,{className:"comment",variants:[hljs.COMMENT("//","$"),hljs.COMMENT("/\\*","\\*/")],relevance:0},LSL_NUMBERS,{className:"section",variants:[{begin:"\\b(state|default)\\b"},{begin:"\\b(state_(entry|exit)|touch(_(start|end))?|(land_)?collision(_(start|end))?|timer|listen|(no_)?sensor|control|(not_)?at_(rot_)?target|money|email|experi\
ence_permissions(_denied)?|run_time_permissions|changed|attach|dataserver|moving_(start|end)|link_message|(on|object)_rez|remote_data|http_re(sponse|quest)|path_update|transaction_result)\\b"}]},LSL_FUNCTIONS,LSL_CONSTANTS,{className:"type",begin:"\\b(integer|float|string|key|vector|quaternion|rotation|list)\\b"}]}}const SYSTEM_SYMBOLS=["AASTriangle","AbelianGroup","Abort","AbortKernels","AbortProtect","AbortScheduledTask","Above","Abs","AbsArg","AbsArgPlot","Absolute","AbsoluteCorrelation","Abs\
oluteCorrelationFunction","AbsoluteCurrentValue","AbsoluteDashing","AbsoluteFileName","AbsoluteOptions","AbsolutePointSize","AbsoluteThickness","AbsoluteTime","AbsoluteTiming","AcceptanceThreshold","AccountingForm","Accumulate","Accuracy","AccuracyGoal","AcousticAbsorbingValue","AcousticImpedanceValue","AcousticNormalVelocityValue","AcousticPDEComponent","AcousticPressureCondition","AcousticRadiationValue","AcousticSoundHardValue","AcousticSoundSoftCondition","ActionDelay","ActionMenu","ActionMe\
nuBox","ActionMenuBoxOptions","Activate","Active","ActiveClassification","ActiveClassificationObject","ActiveItem","ActivePrediction","ActivePredictionObject","ActiveStyle","AcyclicGraphQ","AddOnHelpPath","AddSides","AddTo","AddToSearchIndex","AddUsers","AdjacencyGraph","AdjacencyList","AdjacencyMatrix","AdjacentMeshCells","Adjugate","AdjustmentBox","AdjustmentBoxOptions","AdjustTimeSeriesForecast","AdministrativeDivisionData","AffineHalfSpace","AffineSpace","AffineStateSpaceModel","AffineTransf\
orm","After","AggregatedEntityClass","AggregationLayer","AircraftData","AirportData","AirPressureData","AirSoundAttenuation","AirTemperatureData","AiryAi","AiryAiPrime","AiryAiZero","AiryBi","AiryBiPrime","AiryBiZero","AlgebraicIntegerQ","AlgebraicNumber","AlgebraicNumberDenominator","AlgebraicNumberNorm","AlgebraicNumberPolynomial","AlgebraicNumberTrace","AlgebraicRules","AlgebraicRulesData","Algebraics","AlgebraicUnitQ","Alignment","AlignmentMarker","AlignmentPoint","All","AllowAdultContent","\
AllowChatServices","AllowedCloudExtraParameters","AllowedCloudParameterExtensions","AllowedDimensions","AllowedFrequencyRange","AllowedHeads","AllowGroupClose","AllowIncomplete","AllowInlineCells","AllowKernelInitialization","AllowLooseGrammar","AllowReverseGroupClose","AllowScriptLevelChange","AllowVersionUpdate","AllTrue","Alphabet","AlphabeticOrder","AlphabeticSort","AlphaChannel","AlternateImage","AlternatingFactorial","AlternatingGroup","AlternativeHypothesis","Alternatives","AltitudeMethod",
"AmbientLight","AmbiguityFunction","AmbiguityList","Analytic","AnatomyData","AnatomyForm","AnatomyPlot3D","AnatomySkinStyle","AnatomyStyling","AnchoredSearch","And","AndersonDarlingTest","AngerJ","AngleBisector","AngleBracket","AnglePath","AnglePath3D","AngleVector","AngularGauge","Animate","AnimatedImage","AnimationCycleOffset","AnimationCycleRepetitions","AnimationDirection","AnimationDisplayTime","AnimationRate","AnimationRepetitions","AnimationRunning","AnimationRunTime","AnimationTimeIndex",
"AnimationVideo","Animator","AnimatorBox","AnimatorBoxOptions","AnimatorElements","Annotate","Annotation","AnnotationDelete","AnnotationKeys","AnnotationRules","AnnotationValue","Annuity","AnnuityDue","Annulus","AnomalyDetection","AnomalyDetector","AnomalyDetectorFunction","Anonymous","Antialiasing","Antihermitian","AntihermitianMatrixQ","Antisymmetric","AntisymmetricMatrixQ","Antonyms","AnyOrder","AnySubset","AnyTrue","Apart","ApartSquareFree","APIFunction","Appearance","AppearanceElements","Ap\
pearanceRules","AppellF1","Append","AppendCheck","AppendLayer","AppendTo","Application","Apply","ApplyReaction","ApplySides","ApplyTo","ArcCos","ArcCosh","ArcCot","ArcCoth","ArcCsc","ArcCsch","ArcCurvature","ARCHProcess","ArcLength","ArcSec","ArcSech","ArcSin","ArcSinDistribution","ArcSinh","ArcTan","ArcTanh","Area","Arg","ArgMax","ArgMin","ArgumentCountQ","ArgumentsOptions","ARIMAProcess","ArithmeticGeometricMean","ARMAProcess","Around","AroundReplace","ARProcess","Array","ArrayComponents","Arr\
ayDepth","ArrayFilter","ArrayFlatten","ArrayMesh","ArrayPad","ArrayPlot","ArrayPlot3D","ArrayQ","ArrayReduce","ArrayResample","ArrayReshape","ArrayRules","Arrays","Arrow","Arrow3DBox","ArrowBox","Arrowheads","ASATriangle","Ask","AskAppend","AskConfirm","AskDisplay","AskedQ","AskedValue","AskFunction","AskState","AskTemplateDisplay","AspectRatio","AspectRatioFixed","Assert","AssessmentFunction","AssessmentResultObject","AssociateTo","Association","AssociationFormat","AssociationMap","AssociationQ",
"AssociationThread","AssumeDeterministic","Assuming","Assumptions","AstroAngularSeparation","AstroBackground","AstroCenter","AstroDistance","AstroGraphics","AstroGridLines","AstroGridLinesStyle","AstronomicalData","AstroPosition","AstroProjection","AstroRange","AstroRangePadding","AstroReferenceFrame","AstroStyling","AstroZoomLevel","Asymptotic","AsymptoticDSolveValue","AsymptoticEqual","AsymptoticEquivalent","AsymptoticExpectation","AsymptoticGreater","AsymptoticGreaterEqual","AsymptoticIntegra\
te","AsymptoticLess","AsymptoticLessEqual","AsymptoticOutputTracker","AsymptoticProbability","AsymptoticProduct","AsymptoticRSolveValue","AsymptoticSolve","AsymptoticSum","Asynchronous","AsynchronousTaskObject","AsynchronousTasks","Atom","AtomCoordinates","AtomCount","AtomDiagramCoordinates","AtomLabels","AtomLabelStyle","AtomList","AtomQ","AttachCell","AttachedCell","AttentionLayer","Attributes","Audio","AudioAmplify","AudioAnnotate","AudioAnnotationLookup","AudioBlockMap","AudioCapture","Audio\
ChannelAssignment","AudioChannelCombine","AudioChannelMix","AudioChannels","AudioChannelSeparate","AudioData","AudioDelay","AudioDelete","AudioDevice","AudioDistance","AudioEncoding","AudioFade","AudioFrequencyShift","AudioGenerator","AudioIdentify","AudioInputDevice","AudioInsert","AudioInstanceQ","AudioIntervals","AudioJoin","AudioLabel","AudioLength","AudioLocalMeasurements","AudioLooping","AudioLoudness","AudioMeasurements","AudioNormalize","AudioOutputDevice","AudioOverlay","AudioPad","Audi\
oPan","AudioPartition","AudioPause","AudioPitchShift","AudioPlay","AudioPlot","AudioQ","AudioRecord","AudioReplace","AudioResample","AudioReverb","AudioReverse","AudioSampleRate","AudioSpectralMap","AudioSpectralTransformation","AudioSplit","AudioStop","AudioStream","AudioStreams","AudioTimeStretch","AudioTrackApply","AudioTrackSelection","AudioTrim","AudioType","AugmentedPolyhedron","AugmentedSymmetricPolynomial","Authenticate","Authentication","AuthenticationDialog","AutoAction","Autocomplete",
"AutocompletionFunction","AutoCopy","AutocorrelationTest","AutoDelete","AutoEvaluateEvents","AutoGeneratedPackage","AutoIndent","AutoIndentSpacings","AutoItalicWords","AutoloadPath","AutoMatch","Automatic","AutomaticImageSize","AutoMultiplicationSymbol","AutoNumberFormatting","AutoOpenNotebooks","AutoOpenPalettes","AutoOperatorRenderings","AutoQuoteCharacters","AutoRefreshed","AutoRemove","AutorunSequencing","AutoScaling","AutoScroll","AutoSpacing","AutoStyleOptions","AutoStyleWords","AutoSubmit\
ting","Axes","AxesEdge","AxesLabel","AxesOrigin","AxesStyle","AxiomaticTheory","Axis","Axis3DBox","Axis3DBoxOptions","AxisBox","AxisBoxOptions","AxisLabel","AxisObject","AxisStyle","BabyMonsterGroupB","Back","BackFaceColor","BackFaceGlowColor","BackFaceOpacity","BackFaceSpecularColor","BackFaceSpecularExponent","BackFaceSurfaceAppearance","BackFaceTexture","Background","BackgroundAppearance","BackgroundTasksSettings","Backslash","Backsubstitution","Backward","Ball","Band","BandpassFilter","Bands\
topFilter","BarabasiAlbertGraphDistribution","BarChart","BarChart3D","BarcodeImage","BarcodeRecognize","BaringhausHenzeTest","BarLegend","BarlowProschanImportance","BarnesG","BarOrigin","BarSpacing","BartlettHannWindow","BartlettWindow","BaseDecode","BaseEncode","BaseForm","Baseline","BaselinePosition","BaseStyle","BasicRecurrentLayer","BatchNormalizationLayer","BatchSize","BatesDistribution","BattleLemarieWavelet","BayesianMaximization","BayesianMaximizationObject","BayesianMinimization","Bayes\
ianMinimizationObject","Because","BeckmannDistribution","Beep","Before","Begin","BeginDialogPacket","BeginPackage","BellB","BellY","Below","BenfordDistribution","BeniniDistribution","BenktanderGibratDistribution","BenktanderWeibullDistribution","BernoulliB","BernoulliDistribution","BernoulliGraphDistribution","BernoulliProcess","BernsteinBasis","BesagL","BesselFilterModel","BesselI","BesselJ","BesselJZero","BesselK","BesselY","BesselYZero","Beta","BetaBinomialDistribution","BetaDistribution","Be\
taNegativeBinomialDistribution","BetaPrimeDistribution","BetaRegularized","Between","BetweennessCentrality","Beveled","BeveledPolyhedron","BezierCurve","BezierCurve3DBox","BezierCurve3DBoxOptions","BezierCurveBox","BezierCurveBoxOptions","BezierFunction","BilateralFilter","BilateralLaplaceTransform","BilateralZTransform","Binarize","BinaryDeserialize","BinaryDistance","BinaryFormat","BinaryImageQ","BinaryRead","BinaryReadList","BinarySerialize","BinaryWrite","BinCounts","BinLists","BinnedVariogr\
amList","Binomial","BinomialDistribution","BinomialPointProcess","BinomialProcess","BinormalDistribution","BiorthogonalSplineWavelet","BioSequence","BioSequenceBackTranslateList","BioSequenceComplement","BioSequenceInstances","BioSequenceModify","BioSequencePlot","BioSequenceQ","BioSequenceReverseComplement","BioSequenceTranscribe","BioSequenceTranslate","BipartiteGraphQ","BiquadraticFilterModel","BirnbaumImportance","BirnbaumSaundersDistribution","BitAnd","BitClear","BitGet","BitLength","BitNot",
"BitOr","BitRate","BitSet","BitShiftLeft","BitShiftRight","BitXor","BiweightLocation","BiweightMidvariance","Black","BlackmanHarrisWindow","BlackmanNuttallWindow","BlackmanWindow","Blank","BlankForm","BlankNullSequence","BlankSequence","Blend","Block","BlockchainAddressData","BlockchainBase","BlockchainBlockData","BlockchainContractValue","BlockchainData","BlockchainGet","BlockchainKeyEncode","BlockchainPut","BlockchainTokenData","BlockchainTransaction","BlockchainTransactionData","BlockchainTra\
nsactionSign","BlockchainTransactionSubmit","BlockDiagonalMatrix","BlockLowerTriangularMatrix","BlockMap","BlockRandom","BlockUpperTriangularMatrix","BlomqvistBeta","BlomqvistBetaTest","Blue","Blur","Blurring","BodePlot","BohmanWindow","Bold","Bond","BondCount","BondLabels","BondLabelStyle","BondList","BondQ","Bookmarks","Boole","BooleanConsecutiveFunction","BooleanConvert","BooleanCountingFunction","BooleanFunction","BooleanGraph","BooleanMaxterms","BooleanMinimize","BooleanMinterms","BooleanQ",
"BooleanRegion","Booleans","BooleanStrings","BooleanTable","BooleanVariables","BorderDimensions","BorelTannerDistribution","Bottom","BottomHatTransform","BoundaryDiscretizeGraphics","BoundaryDiscretizeRegion","BoundaryMesh","BoundaryMeshRegion","BoundaryMeshRegionQ","BoundaryStyle","BoundedRegionQ","BoundingRegion","Bounds","Box","BoxBaselineShift","BoxData","BoxDimensions","Boxed","Boxes","BoxForm","BoxFormFormatTypes","BoxFrame","BoxID","BoxMargins","BoxMatrix","BoxObject","BoxRatios","BoxRota\
tion","BoxRotationPoint","BoxStyle","BoxWhiskerChart","Bra","BracketingBar","BraKet","BrayCurtisDistance","BreadthFirstScan","Break","BridgeData","BrightnessEqualize","BroadcastStationData","Brown","BrownForsytheTest","BrownianBridgeProcess","BrowserCategory","BSplineBasis","BSplineCurve","BSplineCurve3DBox","BSplineCurve3DBoxOptions","BSplineCurveBox","BSplineCurveBoxOptions","BSplineFunction","BSplineSurface","BSplineSurface3DBox","BSplineSurface3DBoxOptions","BubbleChart","BubbleChart3D","Bub\
bleScale","BubbleSizes","BuckyballGraph","BuildCompiledComponent","BuildingData","BulletGauge","BusinessDayQ","ButterflyGraph","ButterworthFilterModel","Button","ButtonBar","ButtonBox","ButtonBoxOptions","ButtonCell","ButtonContents","ButtonData","ButtonEvaluator","ButtonExpandable","ButtonFrame","ButtonFunction","ButtonMargins","ButtonMinHeight","ButtonNote","ButtonNotebook","ButtonSource","ButtonStyle","ButtonStyleMenuListing","Byte","ByteArray","ByteArrayFormat","ByteArrayFormatQ","ByteArrayQ",
"ByteArrayToString","ByteCount","ByteOrdering","C","CachedValue","CacheGraphics","CachePersistence","CalendarConvert","CalendarData","CalendarType","Callout","CalloutMarker","CalloutStyle","CallPacket","CanberraDistance","Cancel","CancelButton","CandlestickChart","CanonicalGraph","CanonicalizePolygon","CanonicalizePolyhedron","CanonicalizeRegion","CanonicalName","CanonicalWarpingCorrespondence","CanonicalWarpingDistance","CantorMesh","CantorStaircase","Canvas","Cap","CapForm","CapitalDifferentia\
lD","Capitalize","CapsuleShape","CaptureRunning","CaputoD","CardinalBSplineBasis","CarlemanLinearize","CarlsonRC","CarlsonRD","CarlsonRE","CarlsonRF","CarlsonRG","CarlsonRJ","CarlsonRK","CarlsonRM","CarmichaelLambda","CaseOrdering","Cases","CaseSensitive","Cashflow","Casoratian","Cast","Catalan","CatalanNumber","Catch","CategoricalDistribution","Catenate","CatenateLayer","CauchyDistribution","CauchyMatrix","CauchyPointProcess","CauchyWindow","CayleyGraph","CDF","CDFDeploy","CDFInformation","CDFW\
avelet","Ceiling","CelestialSystem","Cell","CellAutoOverwrite","CellBaseline","CellBoundingBox","CellBracketOptions","CellChangeTimes","CellContents","CellContext","CellDingbat","CellDingbatMargin","CellDynamicExpression","CellEditDuplicate","CellElementsBoundingBox","CellElementSpacings","CellEpilog","CellEvaluationDuplicate","CellEvaluationFunction","CellEvaluationLanguage","CellEventActions","CellFrame","CellFrameColor","CellFrameLabelMargins","CellFrameLabels","CellFrameMargins","CellFrameSt\
yle","CellGroup","CellGroupData","CellGrouping","CellGroupingRules","CellHorizontalScrolling","CellID","CellInsertionPointCell","CellLabel","CellLabelAutoDelete","CellLabelMargins","CellLabelPositioning","CellLabelStyle","CellLabelTemplate","CellMargins","CellObject","CellOpen","CellPrint","CellProlog","Cells","CellSize","CellStyle","CellTags","CellTrayPosition","CellTrayWidgets","CellularAutomaton","CensoredDistribution","Censoring","Center","CenterArray","CenterDot","CenteredInterval","Central\
Feature","CentralMoment","CentralMomentGeneratingFunction","Cepstrogram","CepstrogramArray","CepstrumArray","CForm","ChampernowneNumber","ChangeOptions","ChannelBase","ChannelBrokerAction","ChannelDatabin","ChannelHistoryLength","ChannelListen","ChannelListener","ChannelListeners","ChannelListenerWait","ChannelObject","ChannelPreSendFunction","ChannelReceiverFunction","ChannelSend","ChannelSubscribers","ChanVeseBinarize","Character","CharacterCounts","CharacterEncoding","CharacterEncodingsPath",
"CharacteristicFunction","CharacteristicPolynomial","CharacterName","CharacterNormalize","CharacterRange","Characters","ChartBaseStyle","ChartElementData","ChartElementDataFunction","ChartElementFunction","ChartElements","ChartLabels","ChartLayout","ChartLegends","ChartStyle","Chebyshev1FilterModel","Chebyshev2FilterModel","ChebyshevDistance","ChebyshevT","ChebyshevU","Check","CheckAbort","CheckAll","CheckArguments","Checkbox","CheckboxBar","CheckboxBox","CheckboxBoxOptions","ChemicalConvert","C\
hemicalData","ChemicalFormula","ChemicalInstance","ChemicalReaction","ChessboardDistance","ChiDistribution","ChineseRemainder","ChiSquareDistribution","ChoiceButtons","ChoiceDialog","CholeskyDecomposition","Chop","ChromaticityPlot","ChromaticityPlot3D","ChromaticPolynomial","Circle","CircleBox","CircleDot","CircleMinus","CirclePlus","CirclePoints","CircleThrough","CircleTimes","CirculantGraph","CircularArcThrough","CircularOrthogonalMatrixDistribution","CircularQuaternionMatrixDistribution","Cir\
cularRealMatrixDistribution","CircularSymplecticMatrixDistribution","CircularUnitaryMatrixDistribution","Circumsphere","CityData","ClassifierFunction","ClassifierInformation","ClassifierMeasurements","ClassifierMeasurementsObject","Classify","ClassPriors","Clear","ClearAll","ClearAttributes","ClearCookies","ClearPermissions","ClearSystemCache","ClebschGordan","ClickPane","ClickToCopy","ClickToCopyEnabled","Clip","ClipboardNotebook","ClipFill","ClippingStyle","ClipPlanes","ClipPlanesStyle","ClipR\
ange","Clock","ClockGauge","ClockwiseContourIntegral","Close","Closed","CloseKernels","ClosenessCentrality","Closing","ClosingAutoSave","ClosingEvent","CloudAccountData","CloudBase","CloudConnect","CloudConnections","CloudDeploy","CloudDirectory","CloudDisconnect","CloudEvaluate","CloudExport","CloudExpression","CloudExpressions","CloudFunction","CloudGet","CloudImport","CloudLoggingData","CloudObject","CloudObjectInformation","CloudObjectInformationData","CloudObjectNameFormat","CloudObjects","\
CloudObjectURLType","CloudPublish","CloudPut","CloudRenderingMethod","CloudSave","CloudShare","CloudSubmit","CloudSymbol","CloudUnshare","CloudUserID","ClusterClassify","ClusterDissimilarityFunction","ClusteringComponents","ClusteringMeasurements","ClusteringTree","CMYKColor","Coarse","CodeAssistOptions","Coefficient","CoefficientArrays","CoefficientDomain","CoefficientList","CoefficientRules","CoifletWavelet","Collect","CollinearPoints","Colon","ColonForm","ColorBalance","ColorCombine","ColorCo\
nvert","ColorCoverage","ColorData","ColorDataFunction","ColorDetect","ColorDistance","ColorFunction","ColorFunctionBinning","ColorFunctionScaling","Colorize","ColorNegate","ColorOutput","ColorProfileData","ColorQ","ColorQuantize","ColorReplace","ColorRules","ColorSelectorSettings","ColorSeparate","ColorSetter","ColorSetterBox","ColorSetterBoxOptions","ColorSlider","ColorsNear","ColorSpace","ColorToneMapping","Column","ColumnAlignments","ColumnBackgrounds","ColumnForm","ColumnLines","ColumnsEqual",
"ColumnSpacings","ColumnWidths","CombinatorB","CombinatorC","CombinatorI","CombinatorK","CombinatorS","CombinatorW","CombinatorY","CombinedEntityClass","CombinerFunction","CometData","CommonDefaultFormatTypes","Commonest","CommonestFilter","CommonName","CommonUnits","CommunityBoundaryStyle","CommunityGraphPlot","CommunityLabels","CommunityRegionStyle","CompanyData","CompatibleUnitQ","CompilationOptions","CompilationTarget","Compile","Compiled","CompiledCodeFunction","CompiledComponent","Compiled\
ExpressionDeclaration","CompiledFunction","CompiledLayer","CompilerCallback","CompilerEnvironment","CompilerEnvironmentAppend","CompilerEnvironmentAppendTo","CompilerEnvironmentObject","CompilerOptions","Complement","ComplementedEntityClass","CompleteGraph","CompleteGraphQ","CompleteIntegral","CompleteKaryTree","CompletionsListPacket","Complex","ComplexArrayPlot","ComplexContourPlot","Complexes","ComplexExpand","ComplexInfinity","ComplexityFunction","ComplexListPlot","ComplexPlot","ComplexPlot3D",
"ComplexRegionPlot","ComplexStreamPlot","ComplexVectorPlot","ComponentMeasurements","ComponentwiseContextMenu","Compose","ComposeList","ComposeSeries","CompositeQ","Composition","CompoundElement","CompoundExpression","CompoundPoissonDistribution","CompoundPoissonProcess","CompoundRenewalProcess","Compress","CompressedData","CompressionLevel","ComputeUncertainty","ConcaveHullMesh","Condition","ConditionalExpression","Conditioned","Cone","ConeBox","ConfidenceLevel","ConfidenceRange","ConfidenceTra\
nsform","ConfigurationPath","Confirm","ConfirmAssert","ConfirmBy","ConfirmMatch","ConfirmQuiet","ConformationMethod","ConformAudio","ConformImages","Congruent","ConicGradientFilling","ConicHullRegion","ConicHullRegion3DBox","ConicHullRegion3DBoxOptions","ConicHullRegionBox","ConicHullRegionBoxOptions","ConicOptimization","Conjugate","ConjugateTranspose","Conjunction","Connect","ConnectedComponents","ConnectedGraphComponents","ConnectedGraphQ","ConnectedMeshComponents","ConnectedMoleculeComponent\
s","ConnectedMoleculeQ","ConnectionSettings","ConnectLibraryCallbackFunction","ConnectSystemModelComponents","ConnectSystemModelController","ConnesWindow","ConoverTest","ConservativeConvectionPDETerm","ConsoleMessage","Constant","ConstantArray","ConstantArrayLayer","ConstantImage","ConstantPlusLayer","ConstantRegionQ","Constants","ConstantTimesLayer","ConstellationData","ConstrainedMax","ConstrainedMin","Construct","Containing","ContainsAll","ContainsAny","ContainsExactly","ContainsNone","Contai\
nsOnly","ContentDetectorFunction","ContentFieldOptions","ContentLocationFunction","ContentObject","ContentPadding","ContentsBoundingBox","ContentSelectable","ContentSize","Context","ContextMenu","Contexts","ContextToFileName","Continuation","Continue","ContinuedFraction","ContinuedFractionK","ContinuousAction","ContinuousMarkovProcess","ContinuousTask","ContinuousTimeModelQ","ContinuousWaveletData","ContinuousWaveletTransform","ContourDetect","ContourGraphics","ContourIntegral","ContourLabels","\
ContourLines","ContourPlot","ContourPlot3D","Contours","ContourShading","ContourSmoothing","ContourStyle","ContraharmonicMean","ContrastiveLossLayer","Control","ControlActive","ControlAlignment","ControlGroupContentsBox","ControllabilityGramian","ControllabilityMatrix","ControllableDecomposition","ControllableModelQ","ControllerDuration","ControllerInformation","ControllerInformationData","ControllerLinking","ControllerManipulate","ControllerMethod","ControllerPath","ControllerState","ControlPla\
cement","ControlsRendering","ControlType","ConvectionPDETerm","Convergents","ConversionOptions","ConversionRules","ConvertToPostScript","ConvertToPostScriptPacket","ConvexHullMesh","ConvexHullRegion","ConvexOptimization","ConvexPolygonQ","ConvexPolyhedronQ","ConvexRegionQ","ConvolutionLayer","Convolve","ConwayGroupCo1","ConwayGroupCo2","ConwayGroupCo3","CookieFunction","Cookies","CoordinateBoundingBox","CoordinateBoundingBoxArray","CoordinateBounds","CoordinateBoundsArray","CoordinateChartData",
"CoordinatesToolOptions","CoordinateTransform","CoordinateTransformData","CoplanarPoints","CoprimeQ","Coproduct","CopulaDistribution","Copyable","CopyDatabin","CopyDirectory","CopyFile","CopyFunction","CopyTag","CopyToClipboard","CoreNilpotentDecomposition","CornerFilter","CornerNeighbors","Correlation","CorrelationDistance","CorrelationFunction","CorrelationTest","Cos","Cosh","CoshIntegral","CosineDistance","CosineWindow","CosIntegral","Cot","Coth","CoulombF","CoulombG","CoulombH1","CoulombH2",
"Count","CountDistinct","CountDistinctBy","CounterAssignments","CounterBox","CounterBoxOptions","CounterClockwiseContourIntegral","CounterEvaluator","CounterFunction","CounterIncrements","CounterStyle","CounterStyleMenuListing","CountRoots","CountryData","Counts","CountsBy","Covariance","CovarianceEstimatorFunction","CovarianceFunction","CoxianDistribution","CoxIngersollRossProcess","CoxModel","CoxModelFit","CramerVonMisesTest","CreateArchive","CreateCellID","CreateChannel","CreateCloudExpressio\
n","CreateCompilerEnvironment","CreateDatabin","CreateDataStructure","CreateDataSystemModel","CreateDialog","CreateDirectory","CreateDocument","CreateFile","CreateIntermediateDirectories","CreateLicenseEntitlement","CreateManagedLibraryExpression","CreateNotebook","CreatePacletArchive","CreatePalette","CreatePermissionsGroup","CreateScheduledTask","CreateSearchIndex","CreateSystemModel","CreateTemporary","CreateTypeInstance","CreateUUID","CreateWindow","CriterionFunction","CriticalityFailureImpo\
rtance","CriticalitySuccessImportance","CriticalSection","Cross","CrossEntropyLossLayer","CrossingCount","CrossingDetect","CrossingPolygon","CrossMatrix","Csc","Csch","CSGRegion","CSGRegionQ","CSGRegionTree","CTCLossLayer","Cube","CubeRoot","Cubics","Cuboid","CuboidBox","CuboidBoxOptions","Cumulant","CumulantGeneratingFunction","CumulativeFeatureImpactPlot","Cup","CupCap","Curl","CurlyDoubleQuote","CurlyQuote","CurrencyConvert","CurrentDate","CurrentImage","CurrentNotebookImage","CurrentScreenIm\
age","CurrentValue","Curry","CurryApplied","CurvatureFlowFilter","CurveClosed","Cyan","CycleGraph","CycleIndexPolynomial","Cycles","CyclicGroup","Cyclotomic","Cylinder","CylinderBox","CylinderBoxOptions","CylindricalDecomposition","CylindricalDecompositionFunction","D","DagumDistribution","DamData","DamerauLevenshteinDistance","DampingFactor","Darker","Dashed","Dashing","DatabaseConnect","DatabaseDisconnect","DatabaseReference","Databin","DatabinAdd","DatabinRemove","Databins","DatabinSubmit","D\
atabinUpload","DataCompression","DataDistribution","DataRange","DataReversed","Dataset","DatasetDisplayPanel","DatasetTheme","DataStructure","DataStructureQ","Date","DateBounds","Dated","DateDelimiters","DateDifference","DatedUnit","DateFormat","DateFunction","DateGranularity","DateHistogram","DateInterval","DateList","DateListLogPlot","DateListPlot","DateListStepPlot","DateObject","DateObjectQ","DateOverlapsQ","DatePattern","DatePlus","DateRange","DateReduction","DateScale","DateSelect","DateSt\
ring","DateTicksFormat","DateValue","DateWithinQ","DaubechiesWavelet","DavisDistribution","DawsonF","DayCount","DayCountConvention","DayHemisphere","DaylightQ","DayMatchQ","DayName","DayNightTerminator","DayPlus","DayRange","DayRound","DeBruijnGraph","DeBruijnSequence","Debug","DebugTag","Decapitalize","Decimal","DecimalForm","DeclareCompiledComponent","DeclareKnownSymbols","DeclarePackage","Decompose","DeconvolutionLayer","Decrement","Decrypt","DecryptFile","DedekindEta","DeepSpaceProbeData","D\
efault","Default2DTool","Default3DTool","DefaultAttachedCellStyle","DefaultAxesStyle","DefaultBaseStyle","DefaultBoxStyle","DefaultButton","DefaultColor","DefaultControlPlacement","DefaultDockedCellStyle","DefaultDuplicateCellStyle","DefaultDuration","DefaultElement","DefaultFaceGridsStyle","DefaultFieldHintStyle","DefaultFont","DefaultFontProperties","DefaultFormatType","DefaultFrameStyle","DefaultFrameTicksStyle","DefaultGridLinesStyle","DefaultInlineFormatType","DefaultInputFormatType","Defau\
ltLabelStyle","DefaultMenuStyle","DefaultNaturalLanguage","DefaultNewCellStyle","DefaultNewInlineCellStyle","DefaultNotebook","DefaultOptions","DefaultOutputFormatType","DefaultPrintPrecision","DefaultStyle","DefaultStyleDefinitions","DefaultTextFormatType","DefaultTextInlineFormatType","DefaultTicksStyle","DefaultTooltipStyle","DefaultValue","DefaultValues","Defer","DefineExternal","DefineInputStreamMethod","DefineOutputStreamMethod","DefineResourceFunction","Definition","Degree","DegreeCentral\
ity","DegreeGraphDistribution","DegreeLexicographic","DegreeReverseLexicographic","DEigensystem","DEigenvalues","Deinitialization","Del","DelaunayMesh","Delayed","Deletable","Delete","DeleteAdjacentDuplicates","DeleteAnomalies","DeleteBorderComponents","DeleteCases","DeleteChannel","DeleteCloudExpression","DeleteContents","DeleteDirectory","DeleteDuplicates","DeleteDuplicatesBy","DeleteElements","DeleteFile","DeleteMissing","DeleteObject","DeletePermissionsKey","DeleteSearchIndex","DeleteSmallCo\
mponents","DeleteStopwords","DeleteWithContents","DeletionWarning","DelimitedArray","DelimitedSequence","Delimiter","DelimiterAutoMatching","DelimiterFlashTime","DelimiterMatching","Delimiters","DeliveryFunction","Dendrogram","Denominator","DensityGraphics","DensityHistogram","DensityPlot","DensityPlot3D","DependentVariables","Deploy","Deployed","Depth","DepthFirstScan","Derivative","DerivativeFilter","DerivativePDETerm","DerivedKey","DescriptorStateSpace","DesignMatrix","DestroyAfterEvaluation",
"Det","DeviceClose","DeviceConfigure","DeviceExecute","DeviceExecuteAsynchronous","DeviceObject","DeviceOpen","DeviceOpenQ","DeviceRead","DeviceReadBuffer","DeviceReadLatest","DeviceReadList","DeviceReadTimeSeries","Devices","DeviceStreams","DeviceWrite","DeviceWriteBuffer","DGaussianWavelet","DiacriticalPositioning","Diagonal","DiagonalizableMatrixQ","DiagonalMatrix","DiagonalMatrixQ","Dialog","DialogIndent","DialogInput","DialogLevel","DialogNotebook","DialogProlog","DialogReturn","DialogSymbo\
ls","Diamond","DiamondMatrix","DiceDissimilarity","DictionaryLookup","DictionaryWordQ","DifferenceDelta","DifferenceOrder","DifferenceQuotient","DifferenceRoot","DifferenceRootReduce","Differences","DifferentialD","DifferentialRoot","DifferentialRootReduce","DifferentiatorFilter","DiffusionPDETerm","DiggleGatesPointProcess","DiggleGrattonPointProcess","DigitalSignature","DigitBlock","DigitBlockMinimum","DigitCharacter","DigitCount","DigitQ","DihedralAngle","DihedralGroup","Dilation","Dimensional\
Combinations","DimensionalMeshComponents","DimensionReduce","DimensionReducerFunction","DimensionReduction","Dimensions","DiracComb","DiracDelta","DirectedEdge","DirectedEdges","DirectedGraph","DirectedGraphQ","DirectedInfinity","Direction","DirectionalLight","Directive","Directory","DirectoryName","DirectoryQ","DirectoryStack","DirichletBeta","DirichletCharacter","DirichletCondition","DirichletConvolve","DirichletDistribution","DirichletEta","DirichletL","DirichletLambda","DirichletTransform","\
DirichletWindow","DisableConsolePrintPacket","DisableFormatting","DiscreteAsymptotic","DiscreteChirpZTransform","DiscreteConvolve","DiscreteDelta","DiscreteHadamardTransform","DiscreteIndicator","DiscreteInputOutputModel","DiscreteLimit","DiscreteLQEstimatorGains","DiscreteLQRegulatorGains","DiscreteLyapunovSolve","DiscreteMarkovProcess","DiscreteMaxLimit","DiscreteMinLimit","DiscretePlot","DiscretePlot3D","DiscreteRatio","DiscreteRiccatiSolve","DiscreteShift","DiscreteTimeModelQ","DiscreteUnifo\
rmDistribution","DiscreteVariables","DiscreteWaveletData","DiscreteWaveletPacketTransform","DiscreteWaveletTransform","DiscretizeGraphics","DiscretizeRegion","Discriminant","DisjointQ","Disjunction","Disk","DiskBox","DiskBoxOptions","DiskMatrix","DiskSegment","Dispatch","DispatchQ","DispersionEstimatorFunction","Display","DisplayAllSteps","DisplayEndPacket","DisplayForm","DisplayFunction","DisplayPacket","DisplayRules","DisplayString","DisplayTemporary","DisplayWith","DisplayWithRef","DisplayWit\
hVariable","DistanceFunction","DistanceMatrix","DistanceTransform","Distribute","Distributed","DistributedContexts","DistributeDefinitions","DistributionChart","DistributionDomain","DistributionFitTest","DistributionParameterAssumptions","DistributionParameterQ","Dithering","Div","Divergence","Divide","DivideBy","Dividers","DivideSides","Divisible","Divisors","DivisorSigma","DivisorSum","DMSList","DMSString","Do","DockedCell","DockedCells","DocumentGenerator","DocumentGeneratorInformation","Docu\
mentGeneratorInformationData","DocumentGenerators","DocumentNotebook","DocumentWeightingRules","Dodecahedron","DomainRegistrationInformation","DominantColors","DominatorTreeGraph","DominatorVertexList","DOSTextFormat","Dot","DotDashed","DotEqual","DotLayer","DotPlusLayer","Dotted","DoubleBracketingBar","DoubleContourIntegral","DoubleDownArrow","DoubleLeftArrow","DoubleLeftRightArrow","DoubleLeftTee","DoubleLongLeftArrow","DoubleLongLeftRightArrow","DoubleLongRightArrow","DoubleRightArrow","Doubl\
eRightTee","DoubleUpArrow","DoubleUpDownArrow","DoubleVerticalBar","DoublyInfinite","Down","DownArrow","DownArrowBar","DownArrowUpArrow","DownLeftRightVector","DownLeftTeeVector","DownLeftVector","DownLeftVectorBar","DownRightTeeVector","DownRightVector","DownRightVectorBar","Downsample","DownTee","DownTeeArrow","DownValues","DownValuesFunction","DragAndDrop","DrawBackFaces","DrawEdges","DrawFrontFaces","DrawHighlighted","DrazinInverse","Drop","DropoutLayer","DropShadowing","DSolve","DSolveChang\
eVariables","DSolveValue","Dt","DualLinearProgramming","DualPlanarGraph","DualPolyhedron","DualSystemsModel","DumpGet","DumpSave","DuplicateFreeQ","Duration","Dynamic","DynamicBox","DynamicBoxOptions","DynamicEvaluationTimeout","DynamicGeoGraphics","DynamicImage","DynamicLocation","DynamicModule","DynamicModuleBox","DynamicModuleBoxOptions","DynamicModuleParent","DynamicModuleValues","DynamicName","DynamicNamespace","DynamicReference","DynamicSetting","DynamicUpdating","DynamicWrapper","DynamicW\
rapperBox","DynamicWrapperBoxOptions","E","EarthImpactData","EarthquakeData","EccentricityCentrality","Echo","EchoEvaluation","EchoFunction","EchoLabel","EchoTiming","EclipseType","EdgeAdd","EdgeBetweennessCentrality","EdgeCapacity","EdgeCapForm","EdgeChromaticNumber","EdgeColor","EdgeConnectivity","EdgeContract","EdgeCost","EdgeCount","EdgeCoverQ","EdgeCycleMatrix","EdgeDashing","EdgeDelete","EdgeDetect","EdgeForm","EdgeIndex","EdgeJoinForm","EdgeLabeling","EdgeLabels","EdgeLabelStyle","EdgeLis\
t","EdgeOpacity","EdgeQ","EdgeRenderingFunction","EdgeRules","EdgeShapeFunction","EdgeStyle","EdgeTaggedGraph","EdgeTaggedGraphQ","EdgeTags","EdgeThickness","EdgeTransitiveGraphQ","EdgeValueRange","EdgeValueSizes","EdgeWeight","EdgeWeightedGraphQ","Editable","EditButtonSettings","EditCellTagsSettings","EditDistance","EffectiveInterest","Eigensystem","Eigenvalues","EigenvectorCentrality","Eigenvectors","Element","ElementData","ElementwiseLayer","ElidedForms","Eliminate","EliminationOrder","Ellips\
oid","EllipticE","EllipticExp","EllipticExpPrime","EllipticF","EllipticFilterModel","EllipticK","EllipticLog","EllipticNomeQ","EllipticPi","EllipticReducedHalfPeriods","EllipticTheta","EllipticThetaPrime","EmbedCode","EmbeddedHTML","EmbeddedService","EmbeddedSQLEntityClass","EmbeddedSQLExpression","EmbeddingLayer","EmbeddingObject","EmitSound","EmphasizeSyntaxErrors","EmpiricalDistribution","Empty","EmptyGraphQ","EmptyRegion","EmptySpaceF","EnableConsolePrintPacket","Enabled","Enclose","Encode",
"Encrypt","EncryptedObject","EncryptFile","End","EndAdd","EndDialogPacket","EndOfBuffer","EndOfFile","EndOfLine","EndOfString","EndPackage","EngineEnvironment","EngineeringForm","Enter","EnterExpressionPacket","EnterTextPacket","Entity","EntityClass","EntityClassList","EntityCopies","EntityFunction","EntityGroup","EntityInstance","EntityList","EntityPrefetch","EntityProperties","EntityProperty","EntityPropertyClass","EntityRegister","EntityStore","EntityStores","EntityTypeName","EntityUnregister",
"EntityValue","Entropy","EntropyFilter","Environment","Epilog","EpilogFunction","Equal","EqualColumns","EqualRows","EqualTilde","EqualTo","EquatedTo","Equilibrium","EquirippleFilterKernel","Equivalent","Erf","Erfc","Erfi","ErlangB","ErlangC","ErlangDistribution","Erosion","ErrorBox","ErrorBoxOptions","ErrorNorm","ErrorPacket","ErrorsDialogSettings","EscapeRadius","EstimatedBackground","EstimatedDistribution","EstimatedPointNormals","EstimatedPointProcess","EstimatedProcess","EstimatedVariogramMo\
del","EstimatorGains","EstimatorRegulator","EuclideanDistance","EulerAngles","EulerCharacteristic","EulerE","EulerGamma","EulerianGraphQ","EulerMatrix","EulerPhi","Evaluatable","Evaluate","Evaluated","EvaluatePacket","EvaluateScheduledTask","EvaluationBox","EvaluationCell","EvaluationCompletionAction","EvaluationData","EvaluationElements","EvaluationEnvironment","EvaluationMode","EvaluationMonitor","EvaluationNotebook","EvaluationObject","EvaluationOrder","EvaluationPrivileges","EvaluationRateLi\
mit","Evaluator","EvaluatorNames","EvenQ","EventData","EventEvaluator","EventHandler","EventHandlerTag","EventLabels","EventSeries","ExactBlackmanWindow","ExactNumberQ","ExactRootIsolation","ExampleData","Except","ExcludedContexts","ExcludedForms","ExcludedLines","ExcludedPhysicalQuantities","ExcludePods","Exclusions","ExclusionsStyle","Exists","Exit","ExitDialog","ExoplanetData","Exp","Expand","ExpandAll","ExpandDenominator","ExpandFileName","ExpandNumerator","Expectation","ExpectationE","Expec\
tedValue","ExpGammaDistribution","ExpIntegralE","ExpIntegralEi","ExpirationDate","Exponent","ExponentFunction","ExponentialDistribution","ExponentialFamily","ExponentialGeneratingFunction","ExponentialMovingAverage","ExponentialPowerDistribution","ExponentPosition","ExponentStep","Export","ExportAutoReplacements","ExportByteArray","ExportForm","ExportPacket","ExportString","Expression","ExpressionCell","ExpressionGraph","ExpressionPacket","ExpressionTree","ExpressionUUID","ExpToTrig","ExtendedEn\
tityClass","ExtendedGCD","Extension","ExtentElementFunction","ExtentMarkers","ExtentSize","ExternalBundle","ExternalCall","ExternalDataCharacterEncoding","ExternalEvaluate","ExternalFunction","ExternalFunctionName","ExternalIdentifier","ExternalObject","ExternalOptions","ExternalSessionObject","ExternalSessions","ExternalStorageBase","ExternalStorageDownload","ExternalStorageGet","ExternalStorageObject","ExternalStoragePut","ExternalStorageUpload","ExternalTypeSignature","ExternalValue","Extract",
"ExtractArchive","ExtractLayer","ExtractPacletArchive","ExtremeValueDistribution","FaceAlign","FaceForm","FaceGrids","FaceGridsStyle","FaceRecognize","FacialFeatures","Factor","FactorComplete","Factorial","Factorial2","FactorialMoment","FactorialMomentGeneratingFunction","FactorialPower","FactorInteger","FactorList","FactorSquareFree","FactorSquareFreeList","FactorTerms","FactorTermsList","Fail","Failure","FailureAction","FailureDistribution","FailureQ","False","FareySequence","FARIMAProcess","F\
eatureDistance","FeatureExtract","FeatureExtraction","FeatureExtractor","FeatureExtractorFunction","FeatureImpactPlot","FeatureNames","FeatureNearest","FeatureSpacePlot","FeatureSpacePlot3D","FeatureTypes","FeatureValueDependencyPlot","FeatureValueImpactPlot","FEDisableConsolePrintPacket","FeedbackLinearize","FeedbackSector","FeedbackSectorStyle","FeedbackType","FEEnableConsolePrintPacket","FetalGrowthData","Fibonacci","Fibonorial","FieldCompletionFunction","FieldHint","FieldHintStyle","FieldMas\
ked","FieldSize","File","FileBaseName","FileByteCount","FileConvert","FileDate","FileExistsQ","FileExtension","FileFormat","FileFormatProperties","FileFormatQ","FileHandler","FileHash","FileInformation","FileName","FileNameDepth","FileNameDialogSettings","FileNameDrop","FileNameForms","FileNameJoin","FileNames","FileNameSetter","FileNameSplit","FileNameTake","FileNameToFormatList","FilePrint","FileSize","FileSystemMap","FileSystemScan","FileSystemTree","FileTemplate","FileTemplateApply","FileTyp\
e","FilledCurve","FilledCurveBox","FilledCurveBoxOptions","FilledTorus","FillForm","Filling","FillingStyle","FillingTransform","FilteredEntityClass","FilterRules","FinancialBond","FinancialData","FinancialDerivative","FinancialIndicator","Find","FindAnomalies","FindArgMax","FindArgMin","FindChannels","FindClique","FindClusters","FindCookies","FindCurvePath","FindCycle","FindDevices","FindDistribution","FindDistributionParameters","FindDivisions","FindEdgeColoring","FindEdgeCover","FindEdgeCut","\
FindEdgeIndependentPaths","FindEquationalProof","FindEulerianCycle","FindExternalEvaluators","FindFaces","FindFile","FindFit","FindFormula","FindFundamentalCycles","FindGeneratingFunction","FindGeoLocation","FindGeometricConjectures","FindGeometricTransform","FindGraphCommunities","FindGraphIsomorphism","FindGraphPartition","FindHamiltonianCycle","FindHamiltonianPath","FindHiddenMarkovStates","FindImageText","FindIndependentEdgeSet","FindIndependentVertexSet","FindInstance","FindIntegerNullVecto\
r","FindIsomers","FindIsomorphicSubgraph","FindKClan","FindKClique","FindKClub","FindKPlex","FindLibrary","FindLinearRecurrence","FindList","FindMatchingColor","FindMaximum","FindMaximumCut","FindMaximumFlow","FindMaxValue","FindMeshDefects","FindMinimum","FindMinimumCostFlow","FindMinimumCut","FindMinValue","FindMoleculeSubstructure","FindPath","FindPeaks","FindPermutation","FindPlanarColoring","FindPointProcessParameters","FindPostmanTour","FindProcessParameters","FindRegionTransform","FindRep\
eat","FindRoot","FindSequenceFunction","FindSettings","FindShortestPath","FindShortestTour","FindSpanningTree","FindSubgraphIsomorphism","FindSystemModelEquilibrium","FindTextualAnswer","FindThreshold","FindTransientRepeat","FindVertexColoring","FindVertexCover","FindVertexCut","FindVertexIndependentPaths","Fine","FinishDynamic","FiniteAbelianGroupCount","FiniteGroupCount","FiniteGroupData","First","FirstCase","FirstPassageTimeDistribution","FirstPosition","FischerGroupFi22","FischerGroupFi23","\
FischerGroupFi24Prime","FisherHypergeometricDistribution","FisherRatioTest","FisherZDistribution","Fit","FitAll","FitRegularization","FittedModel","FixedOrder","FixedPoint","FixedPointList","FlashSelection","Flat","FlatShading","Flatten","FlattenAt","FlattenLayer","FlatTopWindow","FlightData","FlipView","Floor","FlowPolynomial","Fold","FoldList","FoldPair","FoldPairList","FoldWhile","FoldWhileList","FollowRedirects","Font","FontColor","FontFamily","FontForm","FontName","FontOpacity","FontPostScr\
iptName","FontProperties","FontReencoding","FontSize","FontSlant","FontSubstitutions","FontTracking","FontVariations","FontWeight","For","ForAll","ForAllType","ForceVersionInstall","Format","FormatRules","FormatType","FormatTypeAutoConvert","FormatValues","FormBox","FormBoxOptions","FormControl","FormFunction","FormLayoutFunction","FormObject","FormPage","FormProtectionMethod","FormTheme","FormulaData","FormulaLookup","FortranForm","Forward","ForwardBackward","ForwardCloudCredentials","Fourier",
"FourierCoefficient","FourierCosCoefficient","FourierCosSeries","FourierCosTransform","FourierDCT","FourierDCTFilter","FourierDCTMatrix","FourierDST","FourierDSTMatrix","FourierMatrix","FourierParameters","FourierSequenceTransform","FourierSeries","FourierSinCoefficient","FourierSinSeries","FourierSinTransform","FourierTransform","FourierTrigSeries","FoxH","FoxHReduce","FractionalBrownianMotionProcess","FractionalD","FractionalGaussianNoiseProcess","FractionalPart","FractionBox","FractionBoxOpti\
ons","FractionLine","Frame","FrameBox","FrameBoxOptions","Framed","FrameInset","FrameLabel","Frameless","FrameListVideo","FrameMargins","FrameRate","FrameStyle","FrameTicks","FrameTicksStyle","FRatioDistribution","FrechetDistribution","FreeQ","FrenetSerretSystem","FrequencySamplingFilterKernel","FresnelC","FresnelF","FresnelG","FresnelS","Friday","FrobeniusNumber","FrobeniusSolve","FromAbsoluteTime","FromCharacterCode","FromCoefficientRules","FromContinuedFraction","FromDate","FromDateString","F\
romDigits","FromDMS","FromEntity","FromJulianDate","FromLetterNumber","FromPolarCoordinates","FromRawPointer","FromRomanNumeral","FromSphericalCoordinates","FromUnixTime","Front","FrontEndDynamicExpression","FrontEndEventActions","FrontEndExecute","FrontEndObject","FrontEndResource","FrontEndResourceString","FrontEndStackSize","FrontEndToken","FrontEndTokenExecute","FrontEndValueCache","FrontEndVersion","FrontFaceColor","FrontFaceGlowColor","FrontFaceOpacity","FrontFaceSpecularColor","FrontFaceS\
pecularExponent","FrontFaceSurfaceAppearance","FrontFaceTexture","Full","FullAxes","FullDefinition","FullForm","FullGraphics","FullInformationOutputRegulator","FullOptions","FullRegion","FullSimplify","Function","FunctionAnalytic","FunctionBijective","FunctionCompile","FunctionCompileExport","FunctionCompileExportByteArray","FunctionCompileExportLibrary","FunctionCompileExportString","FunctionContinuous","FunctionConvexity","FunctionDeclaration","FunctionDiscontinuities","FunctionDomain","Functi\
onExpand","FunctionInjective","FunctionInterpolation","FunctionLayer","FunctionMeromorphic","FunctionMonotonicity","FunctionPeriod","FunctionPoles","FunctionRange","FunctionSign","FunctionSingularities","FunctionSpace","FunctionSurjective","FussellVeselyImportance","GaborFilter","GaborMatrix","GaborWavelet","GainMargins","GainPhaseMargins","GalaxyData","GalleryView","Gamma","GammaDistribution","GammaRegularized","GapPenalty","GARCHProcess","GatedRecurrentLayer","Gather","GatherBy","GaugeFaceElem\
entFunction","GaugeFaceStyle","GaugeFrameElementFunction","GaugeFrameSize","GaugeFrameStyle","GaugeLabels","GaugeMarkers","GaugeStyle","GaussianFilter","GaussianIntegers","GaussianMatrix","GaussianOrthogonalMatrixDistribution","GaussianSymplecticMatrixDistribution","GaussianUnitaryMatrixDistribution","GaussianWindow","GCD","GegenbauerC","General","GeneralizedLinearModelFit","GenerateAsymmetricKeyPair","GenerateConditions","GeneratedAssetFormat","GeneratedAssetLocation","GeneratedCell","Generated\
CellStyles","GeneratedDocumentBinding","GenerateDerivedKey","GenerateDigitalSignature","GenerateDocument","GeneratedParameters","GeneratedQuantityMagnitudes","GenerateFileSignature","GenerateHTTPResponse","GenerateSecuredAuthenticationKey","GenerateSymmetricKey","GeneratingFunction","GeneratorDescription","GeneratorHistoryLength","GeneratorOutputType","Generic","GenericCylindricalDecomposition","GenomeData","GenomeLookup","GeoAntipode","GeoArea","GeoArraySize","GeoBackground","GeoBoundary","GeoB\
oundingBox","GeoBounds","GeoBoundsRegion","GeoBoundsRegionBoundary","GeoBubbleChart","GeoCenter","GeoCircle","GeoContourPlot","GeoDensityPlot","GeodesicClosing","GeodesicDilation","GeodesicErosion","GeodesicOpening","GeodesicPolyhedron","GeoDestination","GeodesyData","GeoDirection","GeoDisk","GeoDisplacement","GeoDistance","GeoDistanceList","GeoElevationData","GeoEntities","GeoGraphics","GeoGraphPlot","GeoGraphValuePlot","GeogravityModelData","GeoGridDirectionDifference","GeoGridLines","GeoGridL\
inesStyle","GeoGridPosition","GeoGridRange","GeoGridRangePadding","GeoGridUnitArea","GeoGridUnitDistance","GeoGridVector","GeoGroup","GeoHemisphere","GeoHemisphereBoundary","GeoHistogram","GeoIdentify","GeoImage","GeoLabels","GeoLength","GeoListPlot","GeoLocation","GeologicalPeriodData","GeomagneticModelData","GeoMarker","GeometricAssertion","GeometricBrownianMotionProcess","GeometricDistribution","GeometricMean","GeometricMeanFilter","GeometricOptimization","GeometricScene","GeometricStep","Geo\
metricStylingRules","GeometricTest","GeometricTransformation","GeometricTransformation3DBox","GeometricTransformation3DBoxOptions","GeometricTransformationBox","GeometricTransformationBoxOptions","GeoModel","GeoNearest","GeoOrientationData","GeoPath","GeoPolygon","GeoPosition","GeoPositionENU","GeoPositionXYZ","GeoProjection","GeoProjectionData","GeoRange","GeoRangePadding","GeoRegionValuePlot","GeoResolution","GeoScaleBar","GeoServer","GeoSmoothHistogram","GeoStreamPlot","GeoStyling","GeoStylin\
gImageFunction","GeoVariant","GeoVector","GeoVectorENU","GeoVectorPlot","GeoVectorXYZ","GeoVisibleRegion","GeoVisibleRegionBoundary","GeoWithinQ","GeoZoomLevel","GestureHandler","GestureHandlerTag","Get","GetContext","GetEnvironment","GetFileName","GetLinebreakInformationPacket","GibbsPointProcess","Glaisher","GlobalClusteringCoefficient","GlobalPreferences","GlobalSession","Glow","GoldenAngle","GoldenRatio","GompertzMakehamDistribution","GoochShading","GoodmanKruskalGamma","GoodmanKruskalGammaT\
est","Goto","GouraudShading","Grad","Gradient","GradientFilter","GradientFittedMesh","GradientOrientationFilter","GrammarApply","GrammarRules","GrammarToken","Graph","Graph3D","GraphAssortativity","GraphAutomorphismGroup","GraphCenter","GraphComplement","GraphData","GraphDensity","GraphDiameter","GraphDifference","GraphDisjointUnion","GraphDistance","GraphDistanceMatrix","GraphEmbedding","GraphHighlight","GraphHighlightStyle","GraphHub","Graphics","Graphics3D","Graphics3DBox","Graphics3DBoxOptio\
ns","GraphicsArray","GraphicsBaseline","GraphicsBox","GraphicsBoxOptions","GraphicsColor","GraphicsColumn","GraphicsComplex","GraphicsComplex3DBox","GraphicsComplex3DBoxOptions","GraphicsComplexBox","GraphicsComplexBoxOptions","GraphicsContents","GraphicsData","GraphicsGrid","GraphicsGridBox","GraphicsGroup","GraphicsGroup3DBox","GraphicsGroup3DBoxOptions","GraphicsGroupBox","GraphicsGroupBoxOptions","GraphicsGrouping","GraphicsHighlightColor","GraphicsRow","GraphicsSpacing","GraphicsStyle","Gra\
phIntersection","GraphJoin","GraphLayerLabels","GraphLayers","GraphLayerStyle","GraphLayout","GraphLinkEfficiency","GraphPeriphery","GraphPlot","GraphPlot3D","GraphPower","GraphProduct","GraphPropertyDistribution","GraphQ","GraphRadius","GraphReciprocity","GraphRoot","GraphStyle","GraphSum","GraphTree","GraphUnion","Gray","GrayLevel","Greater","GreaterEqual","GreaterEqualLess","GreaterEqualThan","GreaterFullEqual","GreaterGreater","GreaterLess","GreaterSlantEqual","GreaterThan","GreaterTilde","G\
reekStyle","Green","GreenFunction","Grid","GridBaseline","GridBox","GridBoxAlignment","GridBoxBackground","GridBoxDividers","GridBoxFrame","GridBoxItemSize","GridBoxItemStyle","GridBoxOptions","GridBoxSpacings","GridCreationSettings","GridDefaultElement","GridElementStyleOptions","GridFrame","GridFrameMargins","GridGraph","GridLines","GridLinesStyle","GridVideo","GroebnerBasis","GroupActionBase","GroupBy","GroupCentralizer","GroupElementFromWord","GroupElementPosition","GroupElementQ","GroupElem\
ents","GroupElementToWord","GroupGenerators","Groupings","GroupMultiplicationTable","GroupOpenerColor","GroupOpenerInsideFrame","GroupOrbits","GroupOrder","GroupPageBreakWithin","GroupSetwiseStabilizer","GroupStabilizer","GroupStabilizerChain","GroupTogetherGrouping","GroupTogetherNestedGrouping","GrowCutComponents","Gudermannian","GuidedFilter","GumbelDistribution","HaarWavelet","HadamardMatrix","HalfLine","HalfNormalDistribution","HalfPlane","HalfSpace","HalftoneShading","HamiltonianGraphQ","H\
ammingDistance","HammingWindow","HandlerFunctions","HandlerFunctionsKeys","HankelH1","HankelH2","HankelMatrix","HankelTransform","HannPoissonWindow","HannWindow","HaradaNortonGroupHN","HararyGraph","HardcorePointProcess","HarmonicMean","HarmonicMeanFilter","HarmonicNumber","Hash","HatchFilling","HatchShading","Haversine","HazardFunction","Head","HeadCompose","HeaderAlignment","HeaderBackground","HeaderDisplayFunction","HeaderLines","Headers","HeaderSize","HeaderStyle","Heads","HeatFluxValue","He\
atInsulationValue","HeatOutflowValue","HeatRadiationValue","HeatSymmetryValue","HeatTemperatureCondition","HeatTransferPDEComponent","HeatTransferValue","HeavisideLambda","HeavisidePi","HeavisideTheta","HeldGroupHe","HeldPart","HelmholtzPDEComponent","HelpBrowserLookup","HelpBrowserNotebook","HelpBrowserSettings","HelpViewerSettings","Here","HermiteDecomposition","HermiteH","Hermitian","HermitianMatrixQ","HessenbergDecomposition","Hessian","HeunB","HeunBPrime","HeunC","HeunCPrime","HeunD","HeunD\
Prime","HeunG","HeunGPrime","HeunT","HeunTPrime","HexadecimalCharacter","Hexahedron","HexahedronBox","HexahedronBoxOptions","HiddenItems","HiddenMarkovProcess","HiddenSurface","Highlighted","HighlightGraph","HighlightImage","HighlightMesh","HighlightString","HighpassFilter","HigmanSimsGroupHS","HilbertCurve","HilbertFilter","HilbertMatrix","Histogram","Histogram3D","HistogramDistribution","HistogramList","HistogramPointDensity","HistogramTransform","HistogramTransformInterpolation","HistoricalPe\
riodData","HitMissTransform","HITSCentrality","HjorthDistribution","HodgeDual","HoeffdingD","HoeffdingDTest","Hold","HoldAll","HoldAllComplete","HoldComplete","HoldFirst","HoldForm","HoldPattern","HoldRest","HolidayCalendar","HomeDirectory","HomePage","Horizontal","HorizontalForm","HorizontalGauge","HorizontalScrollPosition","HornerForm","HostLookup","HotellingTSquareDistribution","HoytDistribution","HTMLSave","HTTPErrorResponse","HTTPRedirect","HTTPRequest","HTTPRequestData","HTTPResponse","Hue",
"HumanGrowthData","HumpDownHump","HumpEqual","HurwitzLerchPhi","HurwitzZeta","HyperbolicDistribution","HypercubeGraph","HyperexponentialDistribution","Hyperfactorial","Hypergeometric0F1","Hypergeometric0F1Regularized","Hypergeometric1F1","Hypergeometric1F1Regularized","Hypergeometric2F1","Hypergeometric2F1Regularized","HypergeometricDistribution","HypergeometricPFQ","HypergeometricPFQRegularized","HypergeometricU","Hyperlink","HyperlinkAction","HyperlinkCreationSettings","Hyperplane","Hyphenatio\
n","HyphenationOptions","HypoexponentialDistribution","HypothesisTestData","I","IconData","Iconize","IconizedObject","IconRules","Icosahedron","Identity","IdentityMatrix","If","IfCompiled","IgnoreCase","IgnoreDiacritics","IgnoreIsotopes","IgnorePunctuation","IgnoreSpellCheck","IgnoreStereochemistry","IgnoringInactive","Im","Image","Image3D","Image3DProjection","Image3DSlices","ImageAccumulate","ImageAdd","ImageAdjust","ImageAlign","ImageApply","ImageApplyIndexed","ImageAspectRatio","ImageAssembl\
e","ImageAugmentationLayer","ImageBoundingBoxes","ImageCache","ImageCacheValid","ImageCapture","ImageCaptureFunction","ImageCases","ImageChannels","ImageClip","ImageCollage","ImageColorSpace","ImageCompose","ImageContainsQ","ImageContents","ImageConvolve","ImageCooccurrence","ImageCorners","ImageCorrelate","ImageCorrespondingPoints","ImageCrop","ImageData","ImageDeconvolve","ImageDemosaic","ImageDifference","ImageDimensions","ImageDisplacements","ImageDistance","ImageEditMode","ImageEffect","Ima\
geExposureCombine","ImageFeatureTrack","ImageFileApply","ImageFileFilter","ImageFileScan","ImageFilter","ImageFocusCombine","ImageForestingComponents","ImageFormattingWidth","ImageForwardTransformation","ImageGraphics","ImageHistogram","ImageIdentify","ImageInstanceQ","ImageKeypoints","ImageLabels","ImageLegends","ImageLevels","ImageLines","ImageMargins","ImageMarker","ImageMarkers","ImageMeasurements","ImageMesh","ImageMultiply","ImageOffset","ImagePad","ImagePadding","ImagePartition","ImagePer\
iodogram","ImagePerspectiveTransformation","ImagePosition","ImagePreviewFunction","ImagePyramid","ImagePyramidApply","ImageQ","ImageRangeCache","ImageRecolor","ImageReflect","ImageRegion","ImageResize","ImageResolution","ImageRestyle","ImageRotate","ImageRotated","ImageSaliencyFilter","ImageScaled","ImageScan","ImageSize","ImageSizeAction","ImageSizeCache","ImageSizeMultipliers","ImageSizeRaw","ImageStitch","ImageSubtract","ImageTake","ImageTransformation","ImageTrim","ImageType","ImageValue","I\
mageValuePositions","ImageVectorscopePlot","ImageWaveformPlot","ImagingDevice","ImplicitD","ImplicitRegion","Implies","Import","ImportAutoReplacements","ImportByteArray","ImportedObject","ImportOptions","ImportString","ImprovementImportance","In","Inactivate","Inactive","InactiveStyle","IncidenceGraph","IncidenceList","IncidenceMatrix","IncludeAromaticBonds","IncludeConstantBasis","IncludedContexts","IncludeDefinitions","IncludeDirectories","IncludeFileExtension","IncludeGeneratorTasks","Include\
Hydrogens","IncludeInflections","IncludeMetaInformation","IncludePods","IncludeQuantities","IncludeRelatedTables","IncludeSingularSolutions","IncludeSingularTerm","IncludeWindowTimes","Increment","IndefiniteMatrixQ","Indent","IndentingNewlineSpacings","IndentMaxFraction","IndependenceTest","IndependentEdgeSetQ","IndependentPhysicalQuantity","IndependentUnit","IndependentUnitDimension","IndependentVertexSetQ","Indeterminate","IndeterminateThreshold","IndexCreationOptions","Indexed","IndexEdgeTagg\
edGraph","IndexGraph","IndexTag","Inequality","InertEvaluate","InertExpression","InexactNumberQ","InexactNumbers","InfiniteFuture","InfiniteLine","InfiniteLineThrough","InfinitePast","InfinitePlane","Infinity","Infix","InflationAdjust","InflationMethod","Information","InformationData","InformationDataGrid","Inherited","InheritScope","InhomogeneousPoissonPointProcess","InhomogeneousPoissonProcess","InitialEvaluationHistory","Initialization","InitializationCell","InitializationCellEvaluation","Ini\
tializationCellWarning","InitializationObject","InitializationObjects","InitializationValue","Initialize","InitialSeeding","InlineCounterAssignments","InlineCounterIncrements","InlineRules","Inner","InnerPolygon","InnerPolyhedron","Inpaint","Input","InputAliases","InputAssumptions","InputAutoReplacements","InputField","InputFieldBox","InputFieldBoxOptions","InputForm","InputGrouping","InputNamePacket","InputNotebook","InputPacket","InputPorts","InputSettings","InputStream","InputString","InputSt\
ringPacket","InputToBoxFormPacket","Insert","InsertionFunction","InsertionPointObject","InsertLinebreaks","InsertResults","Inset","Inset3DBox","Inset3DBoxOptions","InsetBox","InsetBoxOptions","Insphere","Install","InstallService","InstanceNormalizationLayer","InString","Integer","IntegerDigits","IntegerExponent","IntegerLength","IntegerName","IntegerPart","IntegerPartitions","IntegerQ","IntegerReverse","Integers","IntegerString","Integral","Integrate","IntegrateChangeVariables","Interactive","In\
teractiveTradingChart","InterfaceSwitched","Interlaced","Interleaving","InternallyBalancedDecomposition","InterpolatingFunction","InterpolatingPolynomial","Interpolation","InterpolationOrder","InterpolationPoints","InterpolationPrecision","Interpretation","InterpretationBox","InterpretationBoxOptions","InterpretationFunction","Interpreter","InterpretTemplate","InterquartileRange","Interrupt","InterruptSettings","IntersectedEntityClass","IntersectingQ","Intersection","Interval","IntervalIntersect\
ion","IntervalMarkers","IntervalMarkersStyle","IntervalMemberQ","IntervalSlider","IntervalUnion","Into","Inverse","InverseBetaRegularized","InverseBilateralLaplaceTransform","InverseBilateralZTransform","InverseCDF","InverseChiSquareDistribution","InverseContinuousWaveletTransform","InverseDistanceTransform","InverseEllipticNomeQ","InverseErf","InverseErfc","InverseFourier","InverseFourierCosTransform","InverseFourierSequenceTransform","InverseFourierSinTransform","InverseFourierTransform","Inve\
rseFunction","InverseFunctions","InverseGammaDistribution","InverseGammaRegularized","InverseGaussianDistribution","InverseGudermannian","InverseHankelTransform","InverseHaversine","InverseImagePyramid","InverseJacobiCD","InverseJacobiCN","InverseJacobiCS","InverseJacobiDC","InverseJacobiDN","InverseJacobiDS","InverseJacobiNC","InverseJacobiND","InverseJacobiNS","InverseJacobiSC","InverseJacobiSD","InverseJacobiSN","InverseLaplaceTransform","InverseMellinTransform","InversePermutation","InverseR\
adon","InverseRadonTransform","InverseSeries","InverseShortTimeFourier","InverseSpectrogram","InverseSurvivalFunction","InverseTransformedRegion","InverseWaveletTransform","InverseWeierstrassP","InverseWishartMatrixDistribution","InverseZTransform","Invisible","InvisibleApplication","InvisibleTimes","IPAddress","IrreduciblePolynomialQ","IslandData","IsolatingInterval","IsomorphicGraphQ","IsomorphicSubgraphQ","IsotopeData","Italic","Item","ItemAspectRatio","ItemBox","ItemBoxOptions","ItemDisplayF\
unction","ItemSize","ItemStyle","ItoProcess","JaccardDissimilarity","JacobiAmplitude","Jacobian","JacobiCD","JacobiCN","JacobiCS","JacobiDC","JacobiDN","JacobiDS","JacobiEpsilon","JacobiNC","JacobiND","JacobiNS","JacobiP","JacobiSC","JacobiSD","JacobiSN","JacobiSymbol","JacobiZeta","JacobiZN","JankoGroupJ1","JankoGroupJ2","JankoGroupJ3","JankoGroupJ4","JarqueBeraALMTest","JohnsonDistribution","Join","JoinAcross","Joined","JoinedCurve","JoinedCurveBox","JoinedCurveBoxOptions","JoinForm","JordanDe\
composition","JordanModelDecomposition","JulianDate","JuliaSetBoettcher","JuliaSetIterationCount","JuliaSetPlot","JuliaSetPoints","K","KagiChart","KaiserBesselWindow","KaiserWindow","KalmanEstimator","KalmanFilter","KarhunenLoeveDecomposition","KaryTree","KatzCentrality","KCoreComponents","KDistribution","KEdgeConnectedComponents","KEdgeConnectedGraphQ","KeepExistingVersion","KelvinBei","KelvinBer","KelvinKei","KelvinKer","KendallTau","KendallTauTest","KernelConfiguration","KernelExecute","Kerne\
lFunction","KernelMixtureDistribution","KernelObject","Kernels","Ket","Key","KeyCollisionFunction","KeyComplement","KeyDrop","KeyDropFrom","KeyExistsQ","KeyFreeQ","KeyIntersection","KeyMap","KeyMemberQ","KeypointStrength","Keys","KeySelect","KeySort","KeySortBy","KeyTake","KeyUnion","KeyValueMap","KeyValuePattern","Khinchin","KillProcess","KirchhoffGraph","KirchhoffMatrix","KleinInvariantJ","KnapsackSolve","KnightTourGraph","KnotData","KnownUnitQ","KochCurve","KolmogorovSmirnovTest","KroneckerDe\
lta","KroneckerModelDecomposition","KroneckerProduct","KroneckerSymbol","KuiperTest","KumaraswamyDistribution","Kurtosis","KuwaharaFilter","KVertexConnectedComponents","KVertexConnectedGraphQ","LABColor","Label","Labeled","LabeledSlider","LabelingFunction","LabelingSize","LabelStyle","LabelVisibility","LaguerreL","LakeData","LambdaComponents","LambertW","LameC","LameCPrime","LameEigenvalueA","LameEigenvalueB","LameS","LameSPrime","LaminaData","LanczosWindow","LandauDistribution","Language","Lang\
uageCategory","LanguageData","LanguageIdentify","LanguageOptions","LaplaceDistribution","LaplaceTransform","Laplacian","LaplacianFilter","LaplacianGaussianFilter","LaplacianPDETerm","Large","Larger","Last","Latitude","LatitudeLongitude","LatticeData","LatticeReduce","Launch","LaunchKernels","LayeredGraphPlot","LayeredGraphPlot3D","LayerSizeFunction","LayoutInformation","LCHColor","LCM","LeaderSize","LeafCount","LeapVariant","LeapYearQ","LearnDistribution","LearnedDistribution","LearningRate","Le\
arningRateMultipliers","LeastSquares","LeastSquaresFilterKernel","Left","LeftArrow","LeftArrowBar","LeftArrowRightArrow","LeftDownTeeVector","LeftDownVector","LeftDownVectorBar","LeftRightArrow","LeftRightVector","LeftTee","LeftTeeArrow","LeftTeeVector","LeftTriangle","LeftTriangleBar","LeftTriangleEqual","LeftUpDownVector","LeftUpTeeVector","LeftUpVector","LeftUpVectorBar","LeftVector","LeftVectorBar","LegendAppearance","Legended","LegendFunction","LegendLabel","LegendLayout","LegendMargins","L\
egendMarkers","LegendMarkerSize","LegendreP","LegendreQ","LegendreType","Length","LengthWhile","LerchPhi","Less","LessEqual","LessEqualGreater","LessEqualThan","LessFullEqual","LessGreater","LessLess","LessSlantEqual","LessThan","LessTilde","LetterCharacter","LetterCounts","LetterNumber","LetterQ","Level","LeveneTest","LeviCivitaTensor","LevyDistribution","Lexicographic","LexicographicOrder","LexicographicSort","LibraryDataType","LibraryFunction","LibraryFunctionDeclaration","LibraryFunctionErro\
r","LibraryFunctionInformation","LibraryFunctionLoad","LibraryFunctionUnload","LibraryLoad","LibraryUnload","LicenseEntitlementObject","LicenseEntitlements","LicenseID","LicensingSettings","LiftingFilterData","LiftingWaveletTransform","LightBlue","LightBrown","LightCyan","Lighter","LightGray","LightGreen","Lighting","LightingAngle","LightMagenta","LightOrange","LightPink","LightPurple","LightRed","LightSources","LightYellow","Likelihood","Limit","LimitsPositioning","LimitsPositioningTokens","Lin\
dleyDistribution","Line","Line3DBox","Line3DBoxOptions","LinearFilter","LinearFractionalOptimization","LinearFractionalTransform","LinearGradientFilling","LinearGradientImage","LinearizingTransformationData","LinearLayer","LinearModelFit","LinearOffsetFunction","LinearOptimization","LinearProgramming","LinearRecurrence","LinearSolve","LinearSolveFunction","LineBox","LineBoxOptions","LineBreak","LinebreakAdjustments","LineBreakChart","LinebreakSemicolonWeighting","LineBreakWithin","LineColor","Li\
neGraph","LineIndent","LineIndentMaxFraction","LineIntegralConvolutionPlot","LineIntegralConvolutionScale","LineLegend","LineOpacity","LineSpacing","LineWrapParts","LinkActivate","LinkClose","LinkConnect","LinkConnectedQ","LinkCreate","LinkError","LinkFlush","LinkFunction","LinkHost","LinkInterrupt","LinkLaunch","LinkMode","LinkObject","LinkOpen","LinkOptions","LinkPatterns","LinkProtocol","LinkRankCentrality","LinkRead","LinkReadHeld","LinkReadyQ","Links","LinkService","LinkWrite","LinkWriteHel\
d","LiouvilleLambda","List","Listable","ListAnimate","ListContourPlot","ListContourPlot3D","ListConvolve","ListCorrelate","ListCurvePathPlot","ListDeconvolve","ListDensityPlot","ListDensityPlot3D","Listen","ListFormat","ListFourierSequenceTransform","ListInterpolation","ListLineIntegralConvolutionPlot","ListLinePlot","ListLinePlot3D","ListLogLinearPlot","ListLogLogPlot","ListLogPlot","ListPicker","ListPickerBox","ListPickerBoxBackground","ListPickerBoxOptions","ListPlay","ListPlot","ListPlot3D",
"ListPointPlot3D","ListPolarPlot","ListQ","ListSliceContourPlot3D","ListSliceDensityPlot3D","ListSliceVectorPlot3D","ListStepPlot","ListStreamDensityPlot","ListStreamPlot","ListStreamPlot3D","ListSurfacePlot3D","ListVectorDensityPlot","ListVectorDisplacementPlot","ListVectorDisplacementPlot3D","ListVectorPlot","ListVectorPlot3D","ListZTransform","Literal","LiteralSearch","LiteralType","LoadCompiledComponent","LocalAdaptiveBinarize","LocalCache","LocalClusteringCoefficient","LocalEvaluate","Local\
izeDefinitions","LocalizeVariables","LocalObject","LocalObjects","LocalResponseNormalizationLayer","LocalSubmit","LocalSymbol","LocalTime","LocalTimeZone","LocationEquivalenceTest","LocationTest","Locator","LocatorAutoCreate","LocatorBox","LocatorBoxOptions","LocatorCentering","LocatorPane","LocatorPaneBox","LocatorPaneBoxOptions","LocatorRegion","Locked","Log","Log10","Log2","LogBarnesG","LogGamma","LogGammaDistribution","LogicalExpand","LogIntegral","LogisticDistribution","LogisticSigmoid","Lo\
gitModelFit","LogLikelihood","LogLinearPlot","LogLogisticDistribution","LogLogPlot","LogMultinormalDistribution","LogNormalDistribution","LogPlot","LogRankTest","LogSeriesDistribution","LongEqual","Longest","LongestCommonSequence","LongestCommonSequencePositions","LongestCommonSubsequence","LongestCommonSubsequencePositions","LongestMatch","LongestOrderedSequence","LongForm","Longitude","LongLeftArrow","LongLeftRightArrow","LongRightArrow","LongShortTermMemoryLayer","Lookup","Loopback","LoopFree\
GraphQ","Looping","LossFunction","LowerCaseQ","LowerLeftArrow","LowerRightArrow","LowerTriangularize","LowerTriangularMatrix","LowerTriangularMatrixQ","LowpassFilter","LQEstimatorGains","LQGRegulator","LQOutputRegulatorGains","LQRegulatorGains","LUBackSubstitution","LucasL","LuccioSamiComponents","LUDecomposition","LunarEclipse","LUVColor","LyapunovSolve","LyonsGroupLy","MachineID","MachineName","MachineNumberQ","MachinePrecision","MacintoshSystemPageSetup","Magenta","Magnification","Magnify","M\
ailAddressValidation","MailExecute","MailFolder","MailItem","MailReceiverFunction","MailResponseFunction","MailSearch","MailServerConnect","MailServerConnection","MailSettings","MainSolve","MaintainDynamicCaches","Majority","MakeBoxes","MakeExpression","MakeRules","ManagedLibraryExpressionID","ManagedLibraryExpressionQ","MandelbrotSetBoettcher","MandelbrotSetDistance","MandelbrotSetIterationCount","MandelbrotSetMemberQ","MandelbrotSetPlot","MangoldtLambda","ManhattanDistance","Manipulate","Manip\
ulator","MannedSpaceMissionData","MannWhitneyTest","MantissaExponent","Manual","Map","MapAll","MapApply","MapAt","MapIndexed","MAProcess","MapThread","MarchenkoPasturDistribution","MarcumQ","MardiaCombinedTest","MardiaKurtosisTest","MardiaSkewnessTest","MarginalDistribution","MarkovProcessProperties","Masking","MassConcentrationCondition","MassFluxValue","MassImpermeableBoundaryValue","MassOutflowValue","MassSymmetryValue","MassTransferValue","MassTransportPDEComponent","MatchingDissimilarity","\
MatchLocalNameQ","MatchLocalNames","MatchQ","Material","MaterialShading","MaternPointProcess","MathematicalFunctionData","MathematicaNotation","MathieuC","MathieuCharacteristicA","MathieuCharacteristicB","MathieuCharacteristicExponent","MathieuCPrime","MathieuGroupM11","MathieuGroupM12","MathieuGroupM22","MathieuGroupM23","MathieuGroupM24","MathieuS","MathieuSPrime","MathMLForm","MathMLText","Matrices","MatrixExp","MatrixForm","MatrixFunction","MatrixLog","MatrixNormalDistribution","MatrixPlot",
"MatrixPower","MatrixPropertyDistribution","MatrixQ","MatrixRank","MatrixTDistribution","Max","MaxBend","MaxCellMeasure","MaxColorDistance","MaxDate","MaxDetect","MaxDisplayedChildren","MaxDuration","MaxExtraBandwidths","MaxExtraConditions","MaxFeatureDisplacement","MaxFeatures","MaxFilter","MaximalBy","Maximize","MaxItems","MaxIterations","MaxLimit","MaxMemoryUsed","MaxMixtureKernels","MaxOverlapFraction","MaxPlotPoints","MaxPoints","MaxRecursion","MaxStableDistribution","MaxStepFraction","MaxS\
teps","MaxStepSize","MaxTrainingRounds","MaxValue","MaxwellDistribution","MaxWordGap","McLaughlinGroupMcL","Mean","MeanAbsoluteLossLayer","MeanAround","MeanClusteringCoefficient","MeanDegreeConnectivity","MeanDeviation","MeanFilter","MeanGraphDistance","MeanNeighborDegree","MeanPointDensity","MeanShift","MeanShiftFilter","MeanSquaredLossLayer","Median","MedianDeviation","MedianFilter","MedicalTestData","Medium","MeijerG","MeijerGReduce","MeixnerDistribution","MellinConvolve","MellinTransform","M\
emberQ","MemoryAvailable","MemoryConstrained","MemoryConstraint","MemoryInUse","MengerMesh","Menu","MenuAppearance","MenuCommandKey","MenuEvaluator","MenuItem","MenuList","MenuPacket","MenuSortingValue","MenuStyle","MenuView","Merge","MergeDifferences","MergingFunction","MersennePrimeExponent","MersennePrimeExponentQ","Mesh","MeshCellCentroid","MeshCellCount","MeshCellHighlight","MeshCellIndex","MeshCellLabel","MeshCellMarker","MeshCellMeasure","MeshCellQuality","MeshCells","MeshCellShapeFunctio\
n","MeshCellStyle","MeshConnectivityGraph","MeshCoordinates","MeshFunctions","MeshPrimitives","MeshQualityGoal","MeshRange","MeshRefinementFunction","MeshRegion","MeshRegionQ","MeshShading","MeshStyle","Message","MessageDialog","MessageList","MessageName","MessageObject","MessageOptions","MessagePacket","Messages","MessagesNotebook","MetaCharacters","MetaInformation","MeteorShowerData","Method","MethodOptions","MexicanHatWavelet","MeyerWavelet","Midpoint","MIMETypeToFormatList","Min","MinColorDi\
stance","MinDate","MinDetect","MineralData","MinFilter","MinimalBy","MinimalPolynomial","MinimalStateSpaceModel","Minimize","MinimumTimeIncrement","MinIntervalSize","MinkowskiQuestionMark","MinLimit","MinMax","MinorPlanetData","Minors","MinPointSeparation","MinRecursion","MinSize","MinStableDistribution","Minus","MinusPlus","MinValue","Missing","MissingBehavior","MissingDataMethod","MissingDataRules","MissingQ","MissingString","MissingStyle","MissingValuePattern","MissingValueSynthesis","MittagL\
efflerE","MixedFractionParts","MixedGraphQ","MixedMagnitude","MixedRadix","MixedRadixQuantity","MixedUnit","MixtureDistribution","Mod","Modal","Mode","ModelPredictiveController","Modular","ModularInverse","ModularLambda","Module","Modulus","MoebiusMu","Molecule","MoleculeAlign","MoleculeContainsQ","MoleculeDraw","MoleculeEquivalentQ","MoleculeFreeQ","MoleculeGraph","MoleculeMatchQ","MoleculeMaximumCommonSubstructure","MoleculeModify","MoleculeName","MoleculePattern","MoleculePlot","MoleculePlot3\
D","MoleculeProperty","MoleculeQ","MoleculeRecognize","MoleculeSubstructureCount","MoleculeValue","Moment","MomentConvert","MomentEvaluate","MomentGeneratingFunction","MomentOfInertia","Monday","Monitor","MonomialList","MonomialOrder","MonsterGroupM","MoonPhase","MoonPosition","MorletWavelet","MorphologicalBinarize","MorphologicalBranchPoints","MorphologicalComponents","MorphologicalEulerNumber","MorphologicalGraph","MorphologicalPerimeter","MorphologicalTransform","MortalityData","Most","Mounta\
inData","MouseAnnotation","MouseAppearance","MouseAppearanceTag","MouseButtons","Mouseover","MousePointerNote","MousePosition","MovieData","MovingAverage","MovingMap","MovingMedian","MoyalDistribution","MultiaxisArrangement","Multicolumn","MultiedgeStyle","MultigraphQ","MultilaunchWarning","MultiLetterItalics","MultiLetterStyle","MultilineFunction","Multinomial","MultinomialDistribution","MultinormalDistribution","MultiplicativeOrder","Multiplicity","MultiplySides","MultiscriptBoxOptions","Multi\
selection","MultivariateHypergeometricDistribution","MultivariatePoissonDistribution","MultivariateTDistribution","N","NakagamiDistribution","NameQ","Names","NamespaceBox","NamespaceBoxOptions","Nand","NArgMax","NArgMin","NBernoulliB","NBodySimulation","NBodySimulationData","NCache","NCaputoD","NDEigensystem","NDEigenvalues","NDSolve","NDSolveValue","Nearest","NearestFunction","NearestMeshCells","NearestNeighborG","NearestNeighborGraph","NearestTo","NebulaData","NeedlemanWunschSimilarity","Needs",
"Negative","NegativeBinomialDistribution","NegativeDefiniteMatrixQ","NegativeIntegers","NegativelyOrientedPoints","NegativeMultinomialDistribution","NegativeRationals","NegativeReals","NegativeSemidefiniteMatrixQ","NeighborhoodData","NeighborhoodGraph","Nest","NestedGreaterGreater","NestedLessLess","NestedScriptRules","NestGraph","NestList","NestTree","NestWhile","NestWhileList","NetAppend","NetArray","NetArrayLayer","NetBidirectionalOperator","NetChain","NetDecoder","NetDelete","NetDrop","NetEn\
coder","NetEvaluationMode","NetExternalObject","NetExtract","NetFlatten","NetFoldOperator","NetGANOperator","NetGraph","NetInformation","NetInitialize","NetInsert","NetInsertSharedArrays","NetJoin","NetMapOperator","NetMapThreadOperator","NetMeasurements","NetModel","NetNestOperator","NetPairEmbeddingOperator","NetPort","NetPortGradient","NetPrepend","NetRename","NetReplace","NetReplacePart","NetSharedArray","NetStateObject","NetTake","NetTrain","NetTrainResultsObject","NetUnfold","NetworkPacket\
Capture","NetworkPacketRecording","NetworkPacketRecordingDuring","NetworkPacketTrace","NeumannValue","NevilleThetaC","NevilleThetaD","NevilleThetaN","NevilleThetaS","NewPrimitiveStyle","NExpectation","Next","NextCell","NextDate","NextPrime","NextScheduledTaskTime","NeymanScottPointProcess","NFractionalD","NHoldAll","NHoldFirst","NHoldRest","NicholsGridLines","NicholsPlot","NightHemisphere","NIntegrate","NMaximize","NMaxValue","NMinimize","NMinValue","NominalScale","NominalVariables","NonAssociat\
ive","NoncentralBetaDistribution","NoncentralChiSquareDistribution","NoncentralFRatioDistribution","NoncentralStudentTDistribution","NonCommutativeMultiply","NonConstants","NondimensionalizationTransform","None","NoneTrue","NonlinearModelFit","NonlinearStateSpaceModel","NonlocalMeansFilter","NonNegative","NonNegativeIntegers","NonNegativeRationals","NonNegativeReals","NonPositive","NonPositiveIntegers","NonPositiveRationals","NonPositiveReals","Nor","NorlundB","Norm","Normal","NormalDistribution",
"NormalGrouping","NormalizationLayer","Normalize","Normalized","NormalizedSquaredEuclideanDistance","NormalMatrixQ","NormalsFunction","NormFunction","Not","NotCongruent","NotCupCap","NotDoubleVerticalBar","Notebook","NotebookApply","NotebookAutoSave","NotebookBrowseDirectory","NotebookClose","NotebookConvertSettings","NotebookCreate","NotebookDefault","NotebookDelete","NotebookDirectory","NotebookDynamicExpression","NotebookEvaluate","NotebookEventActions","NotebookFileName","NotebookFind","Note\
bookGet","NotebookImport","NotebookInformation","NotebookInterfaceObject","NotebookLocate","NotebookObject","NotebookOpen","NotebookPath","NotebookPrint","NotebookPut","NotebookRead","Notebooks","NotebookSave","NotebookSelection","NotebooksMenu","NotebookTemplate","NotebookWrite","NotElement","NotEqualTilde","NotExists","NotGreater","NotGreaterEqual","NotGreaterFullEqual","NotGreaterGreater","NotGreaterLess","NotGreaterSlantEqual","NotGreaterTilde","Nothing","NotHumpDownHump","NotHumpEqual","Not\
ificationFunction","NotLeftTriangle","NotLeftTriangleBar","NotLeftTriangleEqual","NotLess","NotLessEqual","NotLessFullEqual","NotLessGreater","NotLessLess","NotLessSlantEqual","NotLessTilde","NotNestedGreaterGreater","NotNestedLessLess","NotPrecedes","NotPrecedesEqual","NotPrecedesSlantEqual","NotPrecedesTilde","NotReverseElement","NotRightTriangle","NotRightTriangleBar","NotRightTriangleEqual","NotSquareSubset","NotSquareSubsetEqual","NotSquareSuperset","NotSquareSupersetEqual","NotSubset","Not\
SubsetEqual","NotSucceeds","NotSucceedsEqual","NotSucceedsSlantEqual","NotSucceedsTilde","NotSuperset","NotSupersetEqual","NotTilde","NotTildeEqual","NotTildeFullEqual","NotTildeTilde","NotVerticalBar","Now","NoWhitespace","NProbability","NProduct","NProductFactors","NRoots","NSolve","NSolveValues","NSum","NSumTerms","NuclearExplosionData","NuclearReactorData","Null","NullRecords","NullSpace","NullWords","Number","NumberCompose","NumberDecompose","NumberDigit","NumberExpand","NumberFieldClassNum\
ber","NumberFieldDiscriminant","NumberFieldFundamentalUnits","NumberFieldIntegralBasis","NumberFieldNormRepresentatives","NumberFieldRegulator","NumberFieldRootsOfUnity","NumberFieldSignature","NumberForm","NumberFormat","NumberLinePlot","NumberMarks","NumberMultiplier","NumberPadding","NumberPoint","NumberQ","NumberSeparator","NumberSigns","NumberString","Numerator","NumeratorDenominator","NumericalOrder","NumericalSort","NumericArray","NumericArrayQ","NumericArrayType","NumericFunction","Numer\
icQ","NuttallWindow","NValues","NyquistGridLines","NyquistPlot","O","ObjectExistsQ","ObservabilityGramian","ObservabilityMatrix","ObservableDecomposition","ObservableModelQ","OceanData","Octahedron","OddQ","Off","Offset","OLEData","On","ONanGroupON","Once","OneIdentity","Opacity","OpacityFunction","OpacityFunctionScaling","Open","OpenAppend","Opener","OpenerBox","OpenerBoxOptions","OpenerView","OpenFunctionInspectorPacket","Opening","OpenRead","OpenSpecialOptions","OpenTemporary","OpenWrite","Op\
erate","OperatingSystem","OperatorApplied","OptimumFlowData","Optional","OptionalElement","OptionInspectorSettings","OptionQ","Options","OptionsPacket","OptionsPattern","OptionValue","OptionValueBox","OptionValueBoxOptions","Or","Orange","Order","OrderDistribution","OrderedQ","Ordering","OrderingBy","OrderingLayer","Orderless","OrderlessPatternSequence","OrdinalScale","OrnsteinUhlenbeckProcess","Orthogonalize","OrthogonalMatrixQ","Out","Outer","OuterPolygon","OuterPolyhedron","OutputAutoOverwrit\
e","OutputControllabilityMatrix","OutputControllableModelQ","OutputForm","OutputFormData","OutputGrouping","OutputMathEditExpression","OutputNamePacket","OutputPorts","OutputResponse","OutputSizeLimit","OutputStream","Over","OverBar","OverDot","Overflow","OverHat","Overlaps","Overlay","OverlayBox","OverlayBoxOptions","OverlayVideo","Overscript","OverscriptBox","OverscriptBoxOptions","OverTilde","OverVector","OverwriteTarget","OwenT","OwnValues","Package","PackingMethod","PackPaclet","PacletDataR\
ebuild","PacletDirectoryAdd","PacletDirectoryLoad","PacletDirectoryRemove","PacletDirectoryUnload","PacletDisable","PacletEnable","PacletFind","PacletFindRemote","PacletInformation","PacletInstall","PacletInstallSubmit","PacletNewerQ","PacletObject","PacletObjectQ","PacletSite","PacletSiteObject","PacletSiteRegister","PacletSites","PacletSiteUnregister","PacletSiteUpdate","PacletSymbol","PacletUninstall","PacletUpdate","PaddedForm","Padding","PaddingLayer","PaddingSize","PadeApproximant","PadLef\
t","PadRight","PageBreakAbove","PageBreakBelow","PageBreakWithin","PageFooterLines","PageFooters","PageHeaderLines","PageHeaders","PageHeight","PageRankCentrality","PageTheme","PageWidth","Pagination","PairCorrelationG","PairedBarChart","PairedHistogram","PairedSmoothHistogram","PairedTTest","PairedZTest","PaletteNotebook","PalettePath","PalettesMenuSettings","PalindromeQ","Pane","PaneBox","PaneBoxOptions","Panel","PanelBox","PanelBoxOptions","Paneled","PaneSelector","PaneSelectorBox","PaneSelec\
torBoxOptions","PaperWidth","ParabolicCylinderD","ParagraphIndent","ParagraphSpacing","ParallelArray","ParallelAxisPlot","ParallelCombine","ParallelDo","Parallelepiped","ParallelEvaluate","Parallelization","Parallelize","ParallelKernels","ParallelMap","ParallelNeeds","Parallelogram","ParallelProduct","ParallelSubmit","ParallelSum","ParallelTable","ParallelTry","Parameter","ParameterEstimator","ParameterMixtureDistribution","ParameterVariables","ParametricConvexOptimization","ParametricFunction",
"ParametricNDSolve","ParametricNDSolveValue","ParametricPlot","ParametricPlot3D","ParametricRampLayer","ParametricRegion","ParentBox","ParentCell","ParentConnect","ParentDirectory","ParentEdgeLabel","ParentEdgeLabelFunction","ParentEdgeLabelStyle","ParentEdgeShapeFunction","ParentEdgeStyle","ParentEdgeStyleFunction","ParentForm","Parenthesize","ParentList","ParentNotebook","ParetoDistribution","ParetoPickandsDistribution","ParkData","Part","PartBehavior","PartialCorrelationFunction","PartialD","\
ParticleAcceleratorData","ParticleData","Partition","PartitionGranularity","PartitionsP","PartitionsQ","PartLayer","PartOfSpeech","PartProtection","ParzenWindow","PascalDistribution","PassEventsDown","PassEventsUp","Paste","PasteAutoQuoteCharacters","PasteBoxFormInlineCells","PasteButton","Path","PathGraph","PathGraphQ","Pattern","PatternFilling","PatternReaction","PatternSequence","PatternTest","PauliMatrix","PaulWavelet","Pause","PausedTime","PDF","PeakDetect","PeanoCurve","PearsonChiSquareTes\
t","PearsonCorrelationTest","PearsonDistribution","PenttinenPointProcess","PercentForm","PerfectNumber","PerfectNumberQ","PerformanceGoal","Perimeter","PeriodicBoundaryCondition","PeriodicInterpolation","Periodogram","PeriodogramArray","Permanent","Permissions","PermissionsGroup","PermissionsGroupMemberQ","PermissionsGroups","PermissionsKey","PermissionsKeys","PermutationCycles","PermutationCyclesQ","PermutationGroup","PermutationLength","PermutationList","PermutationListQ","PermutationMatrix","\
PermutationMax","PermutationMin","PermutationOrder","PermutationPower","PermutationProduct","PermutationReplace","Permutations","PermutationSupport","Permute","PeronaMalikFilter","Perpendicular","PerpendicularBisector","PersistenceLocation","PersistenceTime","PersistentObject","PersistentObjects","PersistentSymbol","PersistentValue","PersonData","PERTDistribution","PetersenGraph","PhaseMargins","PhaseRange","PhongShading","PhysicalSystemData","Pi","Pick","PickedElements","PickMode","PIDData","PI\
DDerivativeFilter","PIDFeedforward","PIDTune","Piecewise","PiecewiseExpand","PieChart","PieChart3D","PillaiTrace","PillaiTraceTest","PingTime","Pink","PitchRecognize","Pivoting","PixelConstrained","PixelValue","PixelValuePositions","Placed","Placeholder","PlaceholderLayer","PlaceholderReplace","Plain","PlanarAngle","PlanarFaceList","PlanarGraph","PlanarGraphQ","PlanckRadiationLaw","PlaneCurveData","PlanetaryMoonData","PlanetData","PlantData","Play","PlaybackSettings","PlayRange","Plot","Plot3D",
"Plot3Matrix","PlotDivision","PlotJoined","PlotLabel","PlotLabels","PlotLayout","PlotLegends","PlotMarkers","PlotPoints","PlotRange","PlotRangeClipping","PlotRangeClipPlanesStyle","PlotRangePadding","PlotRegion","PlotStyle","PlotTheme","Pluralize","Plus","PlusMinus","Pochhammer","PodStates","PodWidth","Point","Point3DBox","Point3DBoxOptions","PointBox","PointBoxOptions","PointCountDistribution","PointDensity","PointDensityFunction","PointFigureChart","PointLegend","PointLight","PointProcessEstim\
ator","PointProcessFitTest","PointProcessParameterAssumptions","PointProcessParameterQ","PointSize","PointStatisticFunction","PointValuePlot","PoissonConsulDistribution","PoissonDistribution","PoissonPDEComponent","PoissonPointProcess","PoissonProcess","PoissonWindow","PolarAxes","PolarAxesOrigin","PolarGridLines","PolarPlot","PolarTicks","PoleZeroMarkers","PolyaAeppliDistribution","PolyGamma","Polygon","Polygon3DBox","Polygon3DBoxOptions","PolygonalNumber","PolygonAngle","PolygonBox","PolygonBo\
xOptions","PolygonCoordinates","PolygonDecomposition","PolygonHoleScale","PolygonIntersections","PolygonScale","Polyhedron","PolyhedronAngle","PolyhedronBox","PolyhedronBoxOptions","PolyhedronCoordinates","PolyhedronData","PolyhedronDecomposition","PolyhedronGenus","PolyLog","PolynomialExpressionQ","PolynomialExtendedGCD","PolynomialForm","PolynomialGCD","PolynomialLCM","PolynomialMod","PolynomialQ","PolynomialQuotient","PolynomialQuotientRemainder","PolynomialReduce","PolynomialRemainder","Poly\
nomials","PolynomialSumOfSquaresList","PoolingLayer","PopupMenu","PopupMenuBox","PopupMenuBoxOptions","PopupView","PopupWindow","Position","PositionIndex","PositionLargest","PositionSmallest","Positive","PositiveDefiniteMatrixQ","PositiveIntegers","PositivelyOrientedPoints","PositiveRationals","PositiveReals","PositiveSemidefiniteMatrixQ","PossibleZeroQ","Postfix","PostScript","Power","PowerDistribution","PowerExpand","PowerMod","PowerModList","PowerRange","PowerSpectralDensity","PowersRepresent\
ations","PowerSymmetricPolynomial","Precedence","PrecedenceForm","Precedes","PrecedesEqual","PrecedesSlantEqual","PrecedesTilde","Precision","PrecisionGoal","PreDecrement","Predict","PredictionRoot","PredictorFunction","PredictorInformation","PredictorMeasurements","PredictorMeasurementsObject","PreemptProtect","PreferencesPath","PreferencesSettings","Prefix","PreIncrement","Prepend","PrependLayer","PrependTo","PreprocessingRules","PreserveColor","PreserveImageOptions","Previous","PreviousCell",
"PreviousDate","PriceGraphDistribution","PrimaryPlaceholder","Prime","PrimeNu","PrimeOmega","PrimePi","PrimePowerQ","PrimeQ","Primes","PrimeZetaP","PrimitivePolynomialQ","PrimitiveRoot","PrimitiveRootList","PrincipalComponents","PrincipalValue","Print","PrintableASCIIQ","PrintAction","PrintForm","PrintingCopies","PrintingOptions","PrintingPageRange","PrintingStartingPageNumber","PrintingStyleEnvironment","Printout3D","Printout3DPreviewer","PrintPrecision","PrintTemporary","Prism","PrismBox","Pri\
smBoxOptions","PrivateCellOptions","PrivateEvaluationOptions","PrivateFontOptions","PrivateFrontEndOptions","PrivateKey","PrivateNotebookOptions","PrivatePaths","Probability","ProbabilityDistribution","ProbabilityPlot","ProbabilityPr","ProbabilityScalePlot","ProbitModelFit","ProcessConnection","ProcessDirectory","ProcessEnvironment","Processes","ProcessEstimator","ProcessInformation","ProcessObject","ProcessParameterAssumptions","ProcessParameterQ","ProcessStateDomain","ProcessStatus","ProcessTi\
meDomain","Product","ProductDistribution","ProductLog","ProgressIndicator","ProgressIndicatorBox","ProgressIndicatorBoxOptions","ProgressReporting","Projection","Prolog","PromptForm","ProofObject","PropagateAborts","Properties","Property","PropertyList","PropertyValue","Proportion","Proportional","Protect","Protected","ProteinData","Pruning","PseudoInverse","PsychrometricPropertyData","PublicKey","PublisherID","PulsarData","PunctuationCharacter","Purple","Put","PutAppend","Pyramid","PyramidBox",
"PyramidBoxOptions","QBinomial","QFactorial","QGamma","QHypergeometricPFQ","QnDispersion","QPochhammer","QPolyGamma","QRDecomposition","QuadraticIrrationalQ","QuadraticOptimization","Quantile","QuantilePlot","Quantity","QuantityArray","QuantityDistribution","QuantityForm","QuantityMagnitude","QuantityQ","QuantityUnit","QuantityVariable","QuantityVariableCanonicalUnit","QuantityVariableDimensions","QuantityVariableIdentifier","QuantityVariablePhysicalQuantity","Quartics","QuartileDeviation","Quar\
tiles","QuartileSkewness","Query","QuestionGenerator","QuestionInterface","QuestionObject","QuestionSelector","QueueingNetworkProcess","QueueingProcess","QueueProperties","Quiet","QuietEcho","Quit","Quotient","QuotientRemainder","RadialAxisPlot","RadialGradientFilling","RadialGradientImage","RadialityCentrality","RadicalBox","RadicalBoxOptions","RadioButton","RadioButtonBar","RadioButtonBox","RadioButtonBoxOptions","Radon","RadonTransform","RamanujanTau","RamanujanTauL","RamanujanTauTheta","Rama\
nujanTauZ","Ramp","Random","RandomArrayLayer","RandomChoice","RandomColor","RandomComplex","RandomDate","RandomEntity","RandomFunction","RandomGeneratorState","RandomGeoPosition","RandomGraph","RandomImage","RandomInstance","RandomInteger","RandomPermutation","RandomPoint","RandomPointConfiguration","RandomPolygon","RandomPolyhedron","RandomPrime","RandomReal","RandomSample","RandomSeed","RandomSeeding","RandomTime","RandomTree","RandomVariate","RandomWalkProcess","RandomWord","Range","RangeFilt\
er","RangeSpecification","RankedMax","RankedMin","RarerProbability","Raster","Raster3D","Raster3DBox","Raster3DBoxOptions","RasterArray","RasterBox","RasterBoxOptions","Rasterize","RasterSize","Rational","RationalExpressionQ","RationalFunctions","Rationalize","Rationals","Ratios","RawArray","RawBoxes","RawData","RawMedium","RayleighDistribution","Re","ReactionBalance","ReactionBalancedQ","ReactionPDETerm","Read","ReadByteArray","ReadLine","ReadList","ReadProtected","ReadString","Real","RealAbs",
"RealBlockDiagonalForm","RealDigits","RealExponent","Reals","RealSign","Reap","RebuildPacletData","RecalibrationFunction","RecognitionPrior","RecognitionThreshold","ReconstructionMesh","Record","RecordLists","RecordSeparators","Rectangle","RectangleBox","RectangleBoxOptions","RectangleChart","RectangleChart3D","RectangularRepeatingElement","RecurrenceFilter","RecurrenceTable","RecurringDigitsForm","Red","Reduce","RefBox","ReferenceLineStyle","ReferenceMarkers","ReferenceMarkerStyle","Refine","Re\
flectionMatrix","ReflectionTransform","Refresh","RefreshRate","Region","RegionBinarize","RegionBoundary","RegionBoundaryStyle","RegionBounds","RegionCentroid","RegionCongruent","RegionConvert","RegionDifference","RegionDilation","RegionDimension","RegionDisjoint","RegionDistance","RegionDistanceFunction","RegionEmbeddingDimension","RegionEqual","RegionErosion","RegionFillingStyle","RegionFit","RegionFunction","RegionImage","RegionIntersection","RegionMeasure","RegionMember","RegionMemberFunction",
"RegionMoment","RegionNearest","RegionNearestFunction","RegionPlot","RegionPlot3D","RegionProduct","RegionQ","RegionResize","RegionSimilar","RegionSize","RegionSymmetricDifference","RegionUnion","RegionWithin","RegisterExternalEvaluator","RegularExpression","Regularization","RegularlySampledQ","RegularPolygon","ReIm","ReImLabels","ReImPlot","ReImStyle","Reinstall","RelationalDatabase","RelationGraph","Release","ReleaseHold","ReliabilityDistribution","ReliefImage","ReliefPlot","RemoteAuthorizatio\
nCaching","RemoteBatchJobAbort","RemoteBatchJobObject","RemoteBatchJobs","RemoteBatchMapSubmit","RemoteBatchSubmissionEnvironment","RemoteBatchSubmit","RemoteConnect","RemoteConnectionObject","RemoteEvaluate","RemoteFile","RemoteInputFiles","RemoteKernelObject","RemoteProviderSettings","RemoteRun","RemoteRunProcess","RemovalConditions","Remove","RemoveAlphaChannel","RemoveAsynchronousTask","RemoveAudioStream","RemoveBackground","RemoveChannelListener","RemoveChannelSubscribers","Removed","Remove\
Diacritics","RemoveInputStreamMethod","RemoveOutputStreamMethod","RemoveProperty","RemoveScheduledTask","RemoveUsers","RemoveVideoStream","RenameDirectory","RenameFile","RenderAll","RenderingOptions","RenewalProcess","RenkoChart","RepairMesh","Repeated","RepeatedNull","RepeatedString","RepeatedTiming","RepeatingElement","Replace","ReplaceAll","ReplaceAt","ReplaceHeldPart","ReplaceImageValue","ReplaceList","ReplacePart","ReplacePixelValue","ReplaceRepeated","ReplicateLayer","RequiredPhysicalQuant\
ities","Resampling","ResamplingAlgorithmData","ResamplingMethod","Rescale","RescalingTransform","ResetDirectory","ResetScheduledTask","ReshapeLayer","Residue","ResidueSum","ResizeLayer","Resolve","ResolveContextAliases","ResourceAcquire","ResourceData","ResourceFunction","ResourceObject","ResourceRegister","ResourceRemove","ResourceSearch","ResourceSubmissionObject","ResourceSubmit","ResourceSystemBase","ResourceSystemPath","ResourceUpdate","ResourceVersion","ResponseForm","Rest","RestartInterva\
l","Restricted","Resultant","ResumePacket","Return","ReturnCreatesNewCell","ReturnEntersInput","ReturnExpressionPacket","ReturnInputFormPacket","ReturnPacket","ReturnReceiptFunction","ReturnTextPacket","Reverse","ReverseApplied","ReverseBiorthogonalSplineWavelet","ReverseElement","ReverseEquilibrium","ReverseGraph","ReverseSort","ReverseSortBy","ReverseUpEquilibrium","RevolutionAxis","RevolutionPlot3D","RGBColor","RiccatiSolve","RiceDistribution","RidgeFilter","RiemannR","RiemannSiegelTheta","Ri\
emannSiegelZ","RiemannXi","Riffle","Right","RightArrow","RightArrowBar","RightArrowLeftArrow","RightComposition","RightCosetRepresentative","RightDownTeeVector","RightDownVector","RightDownVectorBar","RightTee","RightTeeArrow","RightTeeVector","RightTriangle","RightTriangleBar","RightTriangleEqual","RightUpDownVector","RightUpTeeVector","RightUpVector","RightUpVectorBar","RightVector","RightVectorBar","RipleyK","RipleyRassonRegion","RiskAchievementImportance","RiskReductionImportance","RobustCon\
vexOptimization","RogersTanimotoDissimilarity","RollPitchYawAngles","RollPitchYawMatrix","RomanNumeral","Root","RootApproximant","RootIntervals","RootLocusPlot","RootMeanSquare","RootOfUnityQ","RootReduce","Roots","RootSum","RootTree","Rotate","RotateLabel","RotateLeft","RotateRight","RotationAction","RotationBox","RotationBoxOptions","RotationMatrix","RotationTransform","Round","RoundImplies","RoundingRadius","Row","RowAlignments","RowBackgrounds","RowBox","RowHeights","RowLines","RowMinHeight",
"RowReduce","RowsEqual","RowSpacings","RSolve","RSolveValue","RudinShapiro","RudvalisGroupRu","Rule","RuleCondition","RuleDelayed","RuleForm","RulePlot","RulerUnits","RulesTree","Run","RunProcess","RunScheduledTask","RunThrough","RuntimeAttributes","RuntimeOptions","RussellRaoDissimilarity","SameAs","SameQ","SameTest","SameTestProperties","SampledEntityClass","SampleDepth","SampledSoundFunction","SampledSoundList","SampleRate","SamplingPeriod","SARIMAProcess","SARMAProcess","SASTriangle","Satell\
iteData","SatisfiabilityCount","SatisfiabilityInstances","SatisfiableQ","Saturday","Save","Saveable","SaveAutoDelete","SaveConnection","SaveDefinitions","SavitzkyGolayMatrix","SawtoothWave","Scale","Scaled","ScaleDivisions","ScaledMousePosition","ScaleOrigin","ScalePadding","ScaleRanges","ScaleRangeStyle","ScalingFunctions","ScalingMatrix","ScalingTransform","Scan","ScheduledTask","ScheduledTaskActiveQ","ScheduledTaskInformation","ScheduledTaskInformationData","ScheduledTaskObject","ScheduledTas\
ks","SchurDecomposition","ScientificForm","ScientificNotationThreshold","ScorerGi","ScorerGiPrime","ScorerHi","ScorerHiPrime","ScreenRectangle","ScreenStyleEnvironment","ScriptBaselineShifts","ScriptForm","ScriptLevel","ScriptMinSize","ScriptRules","ScriptSizeMultipliers","Scrollbars","ScrollingOptions","ScrollPosition","SearchAdjustment","SearchIndexObject","SearchIndices","SearchQueryString","SearchResultObject","Sec","Sech","SechDistribution","SecondOrderConeOptimization","SectionGrouping","S\
ectorChart","SectorChart3D","SectorOrigin","SectorSpacing","SecuredAuthenticationKey","SecuredAuthenticationKeys","SecurityCertificate","SeedRandom","Select","Selectable","SelectComponents","SelectedCells","SelectedNotebook","SelectFirst","Selection","SelectionAnimate","SelectionCell","SelectionCellCreateCell","SelectionCellDefaultStyle","SelectionCellParentStyle","SelectionCreateCell","SelectionDebuggerTag","SelectionEvaluate","SelectionEvaluateCreateCell","SelectionMove","SelectionPlaceholder",
"SelectWithContents","SelfLoops","SelfLoopStyle","SemanticImport","SemanticImportString","SemanticInterpretation","SemialgebraicComponentInstances","SemidefiniteOptimization","SendMail","SendMessage","Sequence","SequenceAlignment","SequenceAttentionLayer","SequenceCases","SequenceCount","SequenceFold","SequenceFoldList","SequenceForm","SequenceHold","SequenceIndicesLayer","SequenceLastLayer","SequenceMostLayer","SequencePosition","SequencePredict","SequencePredictorFunction","SequenceReplace","S\
equenceRestLayer","SequenceReverseLayer","SequenceSplit","Series","SeriesCoefficient","SeriesData","SeriesTermGoal","ServiceConnect","ServiceDisconnect","ServiceExecute","ServiceObject","ServiceRequest","ServiceResponse","ServiceSubmit","SessionSubmit","SessionTime","Set","SetAccuracy","SetAlphaChannel","SetAttributes","Setbacks","SetCloudDirectory","SetCookies","SetDelayed","SetDirectory","SetEnvironment","SetFileDate","SetFileFormatProperties","SetOptions","SetOptionsPacket","SetPermissions","\
SetPrecision","SetProperty","SetSecuredAuthenticationKey","SetSelectedNotebook","SetSharedFunction","SetSharedVariable","SetStreamPosition","SetSystemModel","SetSystemOptions","Setter","SetterBar","SetterBox","SetterBoxOptions","Setting","SetUsers","Shading","Shallow","ShannonWavelet","ShapiroWilkTest","Share","SharingList","Sharpen","ShearingMatrix","ShearingTransform","ShellRegion","ShenCastanMatrix","ShiftedGompertzDistribution","ShiftRegisterSequence","Short","ShortDownArrow","Shortest","Sho\
rtestMatch","ShortestPathFunction","ShortLeftArrow","ShortRightArrow","ShortTimeFourier","ShortTimeFourierData","ShortUpArrow","Show","ShowAutoConvert","ShowAutoSpellCheck","ShowAutoStyles","ShowCellBracket","ShowCellLabel","ShowCellTags","ShowClosedCellArea","ShowCodeAssist","ShowContents","ShowControls","ShowCursorTracker","ShowGroupOpenCloseIcon","ShowGroupOpener","ShowInvisibleCharacters","ShowPageBreaks","ShowPredictiveInterface","ShowSelection","ShowShortBoxForm","ShowSpecialCharacters","S\
howStringCharacters","ShowSyntaxStyles","ShrinkingDelay","ShrinkWrapBoundingBox","SiderealTime","SiegelTheta","SiegelTukeyTest","SierpinskiCurve","SierpinskiMesh","Sign","Signature","SignedRankTest","SignedRegionDistance","SignificanceLevel","SignPadding","SignTest","SimilarityRules","SimpleGraph","SimpleGraphQ","SimplePolygonQ","SimplePolyhedronQ","Simplex","Simplify","Sin","Sinc","SinghMaddalaDistribution","SingleEvaluation","SingleLetterItalics","SingleLetterStyle","SingularValueDecomposition",
"SingularValueList","SingularValuePlot","SingularValues","Sinh","SinhIntegral","SinIntegral","SixJSymbol","Skeleton","SkeletonTransform","SkellamDistribution","Skewness","SkewNormalDistribution","SkinStyle","Skip","SliceContourPlot3D","SliceDensityPlot3D","SliceDistribution","SliceVectorPlot3D","Slider","Slider2D","Slider2DBox","Slider2DBoxOptions","SliderBox","SliderBoxOptions","SlideShowVideo","SlideView","Slot","SlotSequence","Small","SmallCircle","Smaller","SmithDecomposition","SmithDelayCom\
pensator","SmithWatermanSimilarity","SmoothDensityHistogram","SmoothHistogram","SmoothHistogram3D","SmoothKernelDistribution","SmoothPointDensity","SnDispersion","Snippet","SnippetsVideo","SnubPolyhedron","SocialMediaData","Socket","SocketConnect","SocketListen","SocketListener","SocketObject","SocketOpen","SocketReadMessage","SocketReadyQ","Sockets","SocketWaitAll","SocketWaitNext","SoftmaxLayer","SokalSneathDissimilarity","SolarEclipse","SolarSystemFeatureData","SolarTime","SolidAngle","SolidB\
oundaryLoadValue","SolidData","SolidDisplacementCondition","SolidFixedCondition","SolidMechanicsPDEComponent","SolidMechanicsStrain","SolidMechanicsStress","SolidRegionQ","Solve","SolveAlways","SolveDelayed","SolveValues","Sort","SortBy","SortedBy","SortedEntityClass","Sound","SoundAndGraphics","SoundNote","SoundVolume","SourceLink","SourcePDETerm","Sow","Space","SpaceCurveData","SpaceForm","Spacer","Spacings","Span","SpanAdjustments","SpanCharacterRounding","SpanFromAbove","SpanFromBoth","SpanF\
romLeft","SpanLineThickness","SpanMaxSize","SpanMinSize","SpanningCharacters","SpanSymmetric","SparseArray","SparseArrayQ","SpatialBinnedPointData","SpatialBoundaryCorrection","SpatialEstimate","SpatialEstimatorFunction","SpatialGraphDistribution","SpatialJ","SpatialMedian","SpatialNoiseLevel","SpatialObservationRegionQ","SpatialPointData","SpatialPointSelect","SpatialRandomnessTest","SpatialTransformationLayer","SpatialTrendFunction","Speak","SpeakerMatchQ","SpearmanRankTest","SpearmanRho","Spe\
ciesData","SpecificityGoal","SpectralLineData","Spectrogram","SpectrogramArray","Specularity","SpeechCases","SpeechInterpreter","SpeechRecognize","SpeechSynthesize","SpellingCorrection","SpellingCorrectionList","SpellingDictionaries","SpellingDictionariesPath","SpellingOptions","Sphere","SphereBox","SphereBoxOptions","SpherePoints","SphericalBesselJ","SphericalBesselY","SphericalHankelH1","SphericalHankelH2","SphericalHarmonicY","SphericalPlot3D","SphericalRegion","SphericalShell","SpheroidalEig\
envalue","SpheroidalJoiningFactor","SpheroidalPS","SpheroidalPSPrime","SpheroidalQS","SpheroidalQSPrime","SpheroidalRadialFactor","SpheroidalS1","SpheroidalS1Prime","SpheroidalS2","SpheroidalS2Prime","Splice","SplicedDistribution","SplineClosed","SplineDegree","SplineKnots","SplineWeights","Split","SplitBy","SpokenString","SpotLight","Sqrt","SqrtBox","SqrtBoxOptions","Square","SquaredEuclideanDistance","SquareFreeQ","SquareIntersection","SquareMatrixQ","SquareRepeatingElement","SquaresR","Square\
Subset","SquareSubsetEqual","SquareSuperset","SquareSupersetEqual","SquareUnion","SquareWave","SSSTriangle","StabilityMargins","StabilityMarginsStyle","StableDistribution","Stack","StackBegin","StackComplete","StackedDateListPlot","StackedListPlot","StackInhibit","StadiumShape","StandardAtmosphereData","StandardDeviation","StandardDeviationFilter","StandardForm","Standardize","Standardized","StandardOceanData","StandbyDistribution","Star","StarClusterData","StarData","StarGraph","StartAsynchrono\
usTask","StartExternalSession","StartingStepSize","StartOfLine","StartOfString","StartProcess","StartScheduledTask","StartupSound","StartWebSession","StateDimensions","StateFeedbackGains","StateOutputEstimator","StateResponse","StateSpaceModel","StateSpaceRealization","StateSpaceTransform","StateTransformationLinearize","StationaryDistribution","StationaryWaveletPacketTransform","StationaryWaveletTransform","StatusArea","StatusCentrality","StepMonitor","StereochemistryElements","StieltjesGamma",
"StippleShading","StirlingS1","StirlingS2","StopAsynchronousTask","StoppingPowerData","StopScheduledTask","StrataVariables","StratonovichProcess","StraussHardcorePointProcess","StraussPointProcess","StreamColorFunction","StreamColorFunctionScaling","StreamDensityPlot","StreamMarkers","StreamPlot","StreamPlot3D","StreamPoints","StreamPosition","Streams","StreamScale","StreamStyle","StrictInequalities","String","StringBreak","StringByteCount","StringCases","StringContainsQ","StringCount","StringDe\
lete","StringDrop","StringEndsQ","StringExpression","StringExtract","StringForm","StringFormat","StringFormatQ","StringFreeQ","StringInsert","StringJoin","StringLength","StringMatchQ","StringPadLeft","StringPadRight","StringPart","StringPartition","StringPosition","StringQ","StringRepeat","StringReplace","StringReplaceList","StringReplacePart","StringReverse","StringRiffle","StringRotateLeft","StringRotateRight","StringSkeleton","StringSplit","StringStartsQ","StringTake","StringTakeDrop","String\
Template","StringToByteArray","StringToStream","StringTrim","StripBoxes","StripOnInput","StripStyleOnPaste","StripWrapperBoxes","StrokeForm","Struckthrough","StructuralImportance","StructuredArray","StructuredArrayHeadQ","StructuredSelection","StruveH","StruveL","Stub","StudentTDistribution","Style","StyleBox","StyleBoxAutoDelete","StyleData","StyleDefinitions","StyleForm","StyleHints","StyleKeyMapping","StyleMenuListing","StyleNameDialogSettings","StyleNames","StylePrint","StyleSheetPath","Subd\
ivide","Subfactorial","Subgraph","SubMinus","SubPlus","SubresultantPolynomialRemainders","SubresultantPolynomials","Subresultants","Subscript","SubscriptBox","SubscriptBoxOptions","Subscripted","Subsequences","Subset","SubsetCases","SubsetCount","SubsetEqual","SubsetMap","SubsetPosition","SubsetQ","SubsetReplace","Subsets","SubStar","SubstitutionSystem","Subsuperscript","SubsuperscriptBox","SubsuperscriptBoxOptions","SubtitleEncoding","SubtitleTrackSelection","Subtract","SubtractFrom","SubtractS\
ides","SubValues","Succeeds","SucceedsEqual","SucceedsSlantEqual","SucceedsTilde","Success","SuchThat","Sum","SumConvergence","SummationLayer","Sunday","SunPosition","Sunrise","Sunset","SuperDagger","SuperMinus","SupernovaData","SuperPlus","Superscript","SuperscriptBox","SuperscriptBoxOptions","Superset","SupersetEqual","SuperStar","Surd","SurdForm","SurfaceAppearance","SurfaceArea","SurfaceColor","SurfaceData","SurfaceGraphics","SurvivalDistribution","SurvivalFunction","SurvivalModel","Survival\
ModelFit","SuspendPacket","SuzukiDistribution","SuzukiGroupSuz","SwatchLegend","Switch","Symbol","SymbolName","SymletWavelet","Symmetric","SymmetricDifference","SymmetricGroup","SymmetricKey","SymmetricMatrixQ","SymmetricPolynomial","SymmetricReduction","Symmetrize","SymmetrizedArray","SymmetrizedArrayRules","SymmetrizedDependentComponents","SymmetrizedIndependentComponents","SymmetrizedReplacePart","SynchronousInitialization","SynchronousUpdating","Synonyms","Syntax","SyntaxForm","SyntaxInforma\
tion","SyntaxLength","SyntaxPacket","SyntaxQ","SynthesizeMissingValues","SystemCredential","SystemCredentialData","SystemCredentialKey","SystemCredentialKeys","SystemCredentialStoreObject","SystemDialogInput","SystemException","SystemGet","SystemHelpPath","SystemInformation","SystemInformationData","SystemInstall","SystemModel","SystemModeler","SystemModelExamples","SystemModelLinearize","SystemModelMeasurements","SystemModelParametricSimulate","SystemModelPlot","SystemModelProgressReporting","S\
ystemModelReliability","SystemModels","SystemModelSimulate","SystemModelSimulateSensitivity","SystemModelSimulationData","SystemOpen","SystemOptions","SystemProcessData","SystemProcesses","SystemsConnectionsModel","SystemsModelControllerData","SystemsModelDelay","SystemsModelDelayApproximate","SystemsModelDelete","SystemsModelDimensions","SystemsModelExtract","SystemsModelFeedbackConnect","SystemsModelLabels","SystemsModelLinearity","SystemsModelMerge","SystemsModelOrder","SystemsModelParallelCo\
nnect","SystemsModelSeriesConnect","SystemsModelStateFeedbackConnect","SystemsModelVectorRelativeOrders","SystemStub","SystemTest","Tab","TabFilling","Table","TableAlignments","TableDepth","TableDirections","TableForm","TableHeadings","TableSpacing","TableView","TableViewBox","TableViewBoxAlignment","TableViewBoxBackground","TableViewBoxHeaders","TableViewBoxItemSize","TableViewBoxItemStyle","TableViewBoxOptions","TabSpacings","TabView","TabViewBox","TabViewBoxOptions","TagBox","TagBoxNote","Tag\
BoxOptions","TaggingRules","TagSet","TagSetDelayed","TagStyle","TagUnset","Take","TakeDrop","TakeLargest","TakeLargestBy","TakeList","TakeSmallest","TakeSmallestBy","TakeWhile","Tally","Tan","Tanh","TargetDevice","TargetFunctions","TargetSystem","TargetUnits","TaskAbort","TaskExecute","TaskObject","TaskRemove","TaskResume","Tasks","TaskSuspend","TaskWait","TautologyQ","TelegraphProcess","TemplateApply","TemplateArgBox","TemplateBox","TemplateBoxOptions","TemplateEvaluate","TemplateExpression","T\
emplateIf","TemplateObject","TemplateSequence","TemplateSlot","TemplateSlotSequence","TemplateUnevaluated","TemplateVerbatim","TemplateWith","TemporalData","TemporalRegularity","Temporary","TemporaryVariable","TensorContract","TensorDimensions","TensorExpand","TensorProduct","TensorQ","TensorRank","TensorReduce","TensorSymmetry","TensorTranspose","TensorWedge","TerminatedEvaluation","TernaryListPlot","TernaryPlotCorners","TestID","TestReport","TestReportObject","TestResultObject","Tetrahedron","\
TetrahedronBox","TetrahedronBoxOptions","TeXForm","TeXSave","Text","Text3DBox","Text3DBoxOptions","TextAlignment","TextBand","TextBoundingBox","TextBox","TextCases","TextCell","TextClipboardType","TextContents","TextData","TextElement","TextForm","TextGrid","TextJustification","TextLine","TextPacket","TextParagraph","TextPosition","TextRecognize","TextSearch","TextSearchReport","TextSentences","TextString","TextStructure","TextStyle","TextTranslation","Texture","TextureCoordinateFunction","Textu\
reCoordinateScaling","TextWords","Therefore","ThermodynamicData","ThermometerGauge","Thick","Thickness","Thin","Thinning","ThisLink","ThomasPointProcess","ThompsonGroupTh","Thread","Threaded","ThreadingLayer","ThreeJSymbol","Threshold","Through","Throw","ThueMorse","Thumbnail","Thursday","TickDirection","TickLabelOrientation","TickLabelPositioning","TickLabels","TickLengths","TickPositions","Ticks","TicksStyle","TideData","Tilde","TildeEqual","TildeFullEqual","TildeTilde","TimeConstrained","Time\
Constraint","TimeDirection","TimeFormat","TimeGoal","TimelinePlot","TimeObject","TimeObjectQ","TimeRemaining","Times","TimesBy","TimeSeries","TimeSeriesAggregate","TimeSeriesForecast","TimeSeriesInsert","TimeSeriesInvertibility","TimeSeriesMap","TimeSeriesMapThread","TimeSeriesModel","TimeSeriesModelFit","TimeSeriesResample","TimeSeriesRescale","TimeSeriesShift","TimeSeriesThread","TimeSeriesWindow","TimeSystem","TimeSystemConvert","TimeUsed","TimeValue","TimeWarpingCorrespondence","TimeWarpingD\
istance","TimeZone","TimeZoneConvert","TimeZoneOffset","Timing","Tiny","TitleGrouping","TitsGroupT","ToBoxes","ToCharacterCode","ToColor","ToContinuousTimeModel","ToDate","Today","ToDiscreteTimeModel","ToEntity","ToeplitzMatrix","ToExpression","ToFileName","Together","Toggle","ToggleFalse","Toggler","TogglerBar","TogglerBox","TogglerBoxOptions","ToHeldExpression","ToInvertibleTimeSeries","TokenWords","Tolerance","ToLowerCase","Tomorrow","ToNumberField","TooBig","Tooltip","TooltipBox","TooltipBox\
Options","TooltipDelay","TooltipStyle","ToonShading","Top","TopHatTransform","ToPolarCoordinates","TopologicalSort","ToRadicals","ToRawPointer","ToRules","Torus","TorusGraph","ToSphericalCoordinates","ToString","Total","TotalHeight","TotalLayer","TotalVariationFilter","TotalWidth","TouchPosition","TouchscreenAutoZoom","TouchscreenControlPlacement","ToUpperCase","TourVideo","Tr","Trace","TraceAbove","TraceAction","TraceBackward","TraceDepth","TraceDialog","TraceForward","TraceInternal","TraceLeve\
l","TraceOff","TraceOn","TraceOriginal","TracePrint","TraceScan","TrackCellChangeTimes","TrackedSymbols","TrackingFunction","TracyWidomDistribution","TradingChart","TraditionalForm","TraditionalFunctionNotation","TraditionalNotation","TraditionalOrder","TrainImageContentDetector","TrainingProgressCheckpointing","TrainingProgressFunction","TrainingProgressMeasurements","TrainingProgressReporting","TrainingStoppingCriterion","TrainingUpdateSchedule","TrainTextContentDetector","TransferFunctionCanc\
el","TransferFunctionExpand","TransferFunctionFactor","TransferFunctionModel","TransferFunctionPoles","TransferFunctionTransform","TransferFunctionZeros","TransformationClass","TransformationFunction","TransformationFunctions","TransformationMatrix","TransformedDistribution","TransformedField","TransformedProcess","TransformedRegion","TransitionDirection","TransitionDuration","TransitionEffect","TransitiveClosureGraph","TransitiveReductionGraph","Translate","TranslationOptions","TranslationTrans\
form","Transliterate","Transparent","TransparentColor","Transpose","TransposeLayer","TrapEnterKey","TrapSelection","TravelDirections","TravelDirectionsData","TravelDistance","TravelDistanceList","TravelMethod","TravelTime","Tree","TreeCases","TreeChildren","TreeCount","TreeData","TreeDelete","TreeDepth","TreeElementCoordinates","TreeElementLabel","TreeElementLabelFunction","TreeElementLabelStyle","TreeElementShape","TreeElementShapeFunction","TreeElementSize","TreeElementSizeFunction","TreeEleme\
ntStyle","TreeElementStyleFunction","TreeExpression","TreeExtract","TreeFold","TreeForm","TreeGraph","TreeGraphQ","TreeInsert","TreeLayout","TreeLeafCount","TreeLeafQ","TreeLeaves","TreeLevel","TreeMap","TreeMapAt","TreeOutline","TreePlot","TreePosition","TreeQ","TreeReplacePart","TreeRules","TreeScan","TreeSelect","TreeSize","TreeTraversalOrder","TrendStyle","Triangle","TriangleCenter","TriangleConstruct","TriangleMeasurement","TriangleWave","TriangularDistribution","TriangulateMesh","Trig","Tr\
igExpand","TrigFactor","TrigFactorList","Trigger","TrigReduce","TrigToExp","TrimmedMean","TrimmedVariance","TropicalStormData","True","TrueQ","TruncatedDistribution","TruncatedPolyhedron","TsallisQExponentialDistribution","TsallisQGaussianDistribution","TTest","Tube","TubeBezierCurveBox","TubeBezierCurveBoxOptions","TubeBox","TubeBoxOptions","TubeBSplineCurveBox","TubeBSplineCurveBoxOptions","Tuesday","TukeyLambdaDistribution","TukeyWindow","TunnelData","Tuples","TuranGraph","TuringMachine","Tut\
tePolynomial","TwoWayRule","Typed","TypeDeclaration","TypeEvaluate","TypeHint","TypeOf","TypeSpecifier","UnateQ","Uncompress","UnconstrainedParameters","Undefined","UnderBar","Underflow","Underlined","Underoverscript","UnderoverscriptBox","UnderoverscriptBoxOptions","Underscript","UnderscriptBox","UnderscriptBoxOptions","UnderseaFeatureData","UndirectedEdge","UndirectedGraph","UndirectedGraphQ","UndoOptions","UndoTrackedVariables","Unequal","UnequalTo","Unevaluated","UniformDistribution","Unifor\
mGraphDistribution","UniformPolyhedron","UniformSumDistribution","Uninstall","Union","UnionedEntityClass","UnionPlus","Unique","UniqueElements","UnitaryMatrixQ","UnitBox","UnitConvert","UnitDimensions","Unitize","UnitRootTest","UnitSimplify","UnitStep","UnitSystem","UnitTriangle","UnitVector","UnitVectorLayer","UnityDimensions","UniverseModelData","UniversityData","UnixTime","UnlabeledTree","UnmanageObject","Unprotect","UnregisterExternalEvaluator","UnsameQ","UnsavedVariables","Unset","UnsetShar\
ed","Until","UntrackedVariables","Up","UpArrow","UpArrowBar","UpArrowDownArrow","Update","UpdateDynamicObjects","UpdateDynamicObjectsSynchronous","UpdateInterval","UpdatePacletSites","UpdateSearchIndex","UpDownArrow","UpEquilibrium","UpperCaseQ","UpperLeftArrow","UpperRightArrow","UpperTriangularize","UpperTriangularMatrix","UpperTriangularMatrixQ","Upsample","UpSet","UpSetDelayed","UpTee","UpTeeArrow","UpTo","UpValues","URL","URLBuild","URLDecode","URLDispatcher","URLDownload","URLDownloadSubmi\
t","URLEncode","URLExecute","URLExpand","URLFetch","URLFetchAsynchronous","URLParse","URLQueryDecode","URLQueryEncode","URLRead","URLResponseTime","URLSave","URLSaveAsynchronous","URLShorten","URLSubmit","UseEmbeddedLibrary","UseGraphicsRange","UserDefinedWavelet","Using","UsingFrontEnd","UtilityFunction","V2Get","ValenceErrorHandling","ValenceFilling","ValidationLength","ValidationSet","ValueBox","ValueBoxOptions","ValueDimensions","ValueForm","ValuePreprocessingFunction","ValueQ","Values","Val\
uesData","VandermondeMatrix","Variables","Variance","VarianceEquivalenceTest","VarianceEstimatorFunction","VarianceGammaDistribution","VarianceGammaPointProcess","VarianceTest","VariogramFunction","VariogramModel","VectorAngle","VectorAround","VectorAspectRatio","VectorColorFunction","VectorColorFunctionScaling","VectorDensityPlot","VectorDisplacementPlot","VectorDisplacementPlot3D","VectorGlyphData","VectorGreater","VectorGreaterEqual","VectorLess","VectorLessEqual","VectorMarkers","VectorPlot",
"VectorPlot3D","VectorPoints","VectorQ","VectorRange","Vectors","VectorScale","VectorScaling","VectorSizes","VectorStyle","Vee","Verbatim","Verbose","VerificationTest","VerifyConvergence","VerifyDerivedKey","VerifyDigitalSignature","VerifyFileSignature","VerifyInterpretation","VerifySecurityCertificates","VerifySolutions","VerifyTestAssumptions","VersionedPreferences","VertexAdd","VertexCapacity","VertexChromaticNumber","VertexColors","VertexComponent","VertexConnectivity","VertexContract","Vert\
exCoordinateRules","VertexCoordinates","VertexCorrelationSimilarity","VertexCosineSimilarity","VertexCount","VertexCoverQ","VertexDataCoordinates","VertexDegree","VertexDelete","VertexDiceSimilarity","VertexEccentricity","VertexInComponent","VertexInComponentGraph","VertexInDegree","VertexIndex","VertexJaccardSimilarity","VertexLabeling","VertexLabels","VertexLabelStyle","VertexList","VertexNormals","VertexOutComponent","VertexOutComponentGraph","VertexOutDegree","VertexQ","VertexRenderingFuncti\
on","VertexReplace","VertexShape","VertexShapeFunction","VertexSize","VertexStyle","VertexTextureCoordinates","VertexTransitiveGraphQ","VertexWeight","VertexWeightedGraphQ","Vertical","VerticalBar","VerticalForm","VerticalGauge","VerticalSeparator","VerticalSlider","VerticalTilde","Video","VideoCapture","VideoCombine","VideoDelete","VideoEncoding","VideoExtractFrames","VideoFrameList","VideoFrameMap","VideoGenerator","VideoInsert","VideoIntervals","VideoJoin","VideoMap","VideoMapList","VideoMapT\
imeSeries","VideoPadding","VideoPause","VideoPlay","VideoQ","VideoRecord","VideoReplace","VideoScreenCapture","VideoSplit","VideoStop","VideoStream","VideoStreams","VideoTimeStretch","VideoTrackSelection","VideoTranscode","VideoTransparency","VideoTrim","ViewAngle","ViewCenter","ViewMatrix","ViewPoint","ViewPointSelectorSettings","ViewPort","ViewProjection","ViewRange","ViewVector","ViewVertical","VirtualGroupData","Visible","VisibleCell","VoiceStyleData","VoigtDistribution","VolcanoData","Volum\
e","VonMisesDistribution","VoronoiMesh","WaitAll","WaitAsynchronousTask","WaitNext","WaitUntil","WakebyDistribution","WalleniusHypergeometricDistribution","WaringYuleDistribution","WarpingCorrespondence","WarpingDistance","WatershedComponents","WatsonUSquareTest","WattsStrogatzGraphDistribution","WaveletBestBasis","WaveletFilterCoefficients","WaveletImagePlot","WaveletListPlot","WaveletMapIndexed","WaveletMatrixPlot","WaveletPhi","WaveletPsi","WaveletScale","WaveletScalogram","WaveletThreshold",
"WavePDEComponent","WeaklyConnectedComponents","WeaklyConnectedGraphComponents","WeaklyConnectedGraphQ","WeakStationarity","WeatherData","WeatherForecastData","WebAudioSearch","WebColumn","WebElementObject","WeberE","WebExecute","WebImage","WebImageSearch","WebItem","WebPageMetaInformation","WebRow","WebSearch","WebSessionObject","WebSessions","WebWindowObject","Wedge","Wednesday","WeibullDistribution","WeierstrassE1","WeierstrassE2","WeierstrassE3","WeierstrassEta1","WeierstrassEta2","Weierstra\
ssEta3","WeierstrassHalfPeriods","WeierstrassHalfPeriodW1","WeierstrassHalfPeriodW2","WeierstrassHalfPeriodW3","WeierstrassInvariantG2","WeierstrassInvariantG3","WeierstrassInvariants","WeierstrassP","WeierstrassPPrime","WeierstrassSigma","WeierstrassZeta","WeightedAdjacencyGraph","WeightedAdjacencyMatrix","WeightedData","WeightedGraphQ","Weights","WelchWindow","WheelGraph","WhenEvent","Which","While","White","WhiteNoiseProcess","WhitePoint","Whitespace","WhitespaceCharacter","WhittakerM","Whitt\
akerW","WholeCellGroupOpener","WienerFilter","WienerProcess","WignerD","WignerSemicircleDistribution","WikidataData","WikidataSearch","WikipediaData","WikipediaSearch","WilksW","WilksWTest","WindDirectionData","WindingCount","WindingPolygon","WindowClickSelect","WindowElements","WindowFloating","WindowFrame","WindowFrameElements","WindowMargins","WindowMovable","WindowOpacity","WindowPersistentStyles","WindowSelected","WindowSize","WindowStatusArea","WindowTitle","WindowToolbars","WindowWidth","\
WindSpeedData","WindVectorData","WinsorizedMean","WinsorizedVariance","WishartMatrixDistribution","With","WithCleanup","WithLock","WolframAlpha","WolframAlphaDate","WolframAlphaQuantity","WolframAlphaResult","WolframCloudSettings","WolframLanguageData","Word","WordBoundary","WordCharacter","WordCloud","WordCount","WordCounts","WordData","WordDefinition","WordFrequency","WordFrequencyData","WordList","WordOrientation","WordSearch","WordSelectionFunction","WordSeparators","WordSpacings","WordStem",
"WordTranslation","WorkingPrecision","WrapAround","Write","WriteLine","WriteString","Wronskian","XMLElement","XMLObject","XMLTemplate","Xnor","Xor","XYZColor","Yellow","Yesterday","YuleDissimilarity","ZernikeR","ZeroSymmetric","ZeroTest","ZeroWidthTimes","Zeta","ZetaZero","ZIPCodeData","ZipfDistribution","ZoomCenter","ZoomFactor","ZTest","ZTransform","$Aborted","$ActivationGroupID","$ActivationKey","$ActivationUserRegistered","$AddOnsDirectory","$AllowDataUpdates","$AllowExternalChannelFunctions",
"$AllowInternet","$AssertFunction","$Assumptions","$AsynchronousTask","$AudioDecoders","$AudioEncoders","$AudioInputDevices","$AudioOutputDevices","$BaseDirectory","$BasePacletsDirectory","$BatchInput","$BatchOutput","$BlockchainBase","$BoxForms","$ByteOrdering","$CacheBaseDirectory","$Canceled","$ChannelBase","$CharacterEncoding","$CharacterEncodings","$CloudAccountName","$CloudBase","$CloudConnected","$CloudConnection","$CloudCreditsAvailable","$CloudEvaluation","$CloudExpressionBase","$CloudO\
bjectNameFormat","$CloudObjectURLType","$CloudRootDirectory","$CloudSymbolBase","$CloudUserID","$CloudUserUUID","$CloudVersion","$CloudVersionNumber","$CloudWolframEngineVersionNumber","$CommandLine","$CompilationTarget","$CompilerEnvironment","$ConditionHold","$ConfiguredKernels","$Context","$ContextAliases","$ContextPath","$ControlActiveSetting","$Cookies","$CookieStore","$CreationDate","$CryptographicEllipticCurveNames","$CurrentLink","$CurrentTask","$CurrentWebSession","$DataStructures","$Da\
teStringFormat","$DefaultAudioInputDevice","$DefaultAudioOutputDevice","$DefaultFont","$DefaultFrontEnd","$DefaultImagingDevice","$DefaultKernels","$DefaultLocalBase","$DefaultLocalKernel","$DefaultMailbox","$DefaultNetworkInterface","$DefaultPath","$DefaultProxyRules","$DefaultRemoteBatchSubmissionEnvironment","$DefaultRemoteKernel","$DefaultSystemCredentialStore","$Display","$DisplayFunction","$DistributedContexts","$DynamicEvaluation","$Echo","$EmbedCodeEnvironments","$EmbeddableServices","$E\
ntityStores","$Epilog","$EvaluationCloudBase","$EvaluationCloudObject","$EvaluationEnvironment","$ExportFormats","$ExternalIdentifierTypes","$ExternalStorageBase","$Failed","$FinancialDataSource","$FontFamilies","$FormatType","$FrontEnd","$FrontEndSession","$GeneratedAssetLocation","$GeoEntityTypes","$GeoLocation","$GeoLocationCity","$GeoLocationCountry","$GeoLocationPrecision","$GeoLocationSource","$HistoryLength","$HomeDirectory","$HTMLExportRules","$HTTPCookies","$HTTPRequest","$IgnoreEOF","$\
ImageFormattingWidth","$ImageResolution","$ImagingDevice","$ImagingDevices","$ImportFormats","$IncomingMailSettings","$InitialDirectory","$Initialization","$InitializationContexts","$Input","$InputFileName","$InputStreamMethods","$Inspector","$InstallationDate","$InstallationDirectory","$InterfaceEnvironment","$InterpreterTypes","$IterationLimit","$KernelCount","$KernelID","$Language","$LaunchDirectory","$LibraryPath","$LicenseExpirationDate","$LicenseID","$LicenseProcesses","$LicenseServer","$L\
icenseSubprocesses","$LicenseType","$Line","$Linked","$LinkSupported","$LoadedFiles","$LocalBase","$LocalSymbolBase","$MachineAddresses","$MachineDomain","$MachineDomains","$MachineEpsilon","$MachineID","$MachineName","$MachinePrecision","$MachineType","$MaxDisplayedChildren","$MaxExtraPrecision","$MaxLicenseProcesses","$MaxLicenseSubprocesses","$MaxMachineNumber","$MaxNumber","$MaxPiecewiseCases","$MaxPrecision","$MaxRootDegree","$MessageGroups","$MessageList","$MessagePrePrint","$Messages","$M\
inMachineNumber","$MinNumber","$MinorReleaseNumber","$MinPrecision","$MobilePhone","$ModuleNumber","$NetworkConnected","$NetworkInterfaces","$NetworkLicense","$NewMessage","$NewSymbol","$NotebookInlineStorageLimit","$Notebooks","$NoValue","$NumberMarks","$Off","$OperatingSystem","$Output","$OutputForms","$OutputSizeLimit","$OutputStreamMethods","$Packages","$ParentLink","$ParentProcessID","$PasswordFile","$PatchLevelID","$Path","$PathnameSeparator","$PerformanceGoal","$Permissions","$Permissions\
GroupBase","$PersistenceBase","$PersistencePath","$PipeSupported","$PlotTheme","$Post","$Pre","$PreferencesDirectory","$PreInitialization","$PrePrint","$PreRead","$PrintForms","$PrintLiteral","$Printout3DPreviewer","$ProcessID","$ProcessorCount","$ProcessorType","$ProductInformation","$ProgramName","$ProgressReporting","$PublisherID","$RandomGeneratorState","$RandomState","$RecursionLimit","$RegisteredDeviceClasses","$RegisteredUserName","$ReleaseNumber","$RequesterAddress","$RequesterCloudUserI\
D","$RequesterCloudUserUUID","$RequesterWolframID","$RequesterWolframUUID","$ResourceSystemBase","$ResourceSystemPath","$RootDirectory","$ScheduledTask","$ScriptCommandLine","$ScriptInputString","$SecuredAuthenticationKeyTokens","$ServiceCreditsAvailable","$Services","$SessionID","$SetParentLink","$SharedFunctions","$SharedVariables","$SoundDisplay","$SoundDisplayFunction","$SourceLink","$SSHAuthentication","$SubtitleDecoders","$SubtitleEncoders","$SummaryBoxDataSizeLimit","$SuppressInputFormHea\
ds","$SynchronousEvaluation","$SyntaxHandler","$System","$SystemCharacterEncoding","$SystemCredentialStore","$SystemID","$SystemMemory","$SystemShell","$SystemTimeZone","$SystemWordLength","$TargetSystems","$TemplatePath","$TemporaryDirectory","$TemporaryPrefix","$TestFileName","$TextStyle","$TimedOut","$TimeUnit","$TimeZone","$TimeZoneEntity","$TopDirectory","$TraceOff","$TraceOn","$TracePattern","$TracePostAction","$TracePreAction","$UnitSystem","$Urgent","$UserAddOnsDirectory","$UserAgentLang\
uages","$UserAgentMachine","$UserAgentName","$UserAgentOperatingSystem","$UserAgentString","$UserAgentVersion","$UserBaseDirectory","$UserBasePacletsDirectory","$UserDocumentsDirectory","$Username","$UserName","$UserURLBase","$Version","$VersionNumber","$VideoDecoders","$VideoEncoders","$VoiceStyles","$WolframDocumentsDirectory","$WolframID","$WolframUUID"];function mathematica(hljs){const regex=hljs.regex,BASE_RE=/([2-9]|[1-2]\d|[3][0-5])\^\^/,BASE_DIGITS_RE=/(\w*\.\w+|\w+\.\w*|\w+)/,NUMBER_RE=/(\d*\.\d+|\d+\.\d*|\d+)/,
BASE_NUMBER_RE=regex.either(regex.concat(BASE_RE,BASE_DIGITS_RE),NUMBER_RE),ACCURACY_RE=/``[+-]?(\d*\.\d+|\d+\.\d*|\d+)/,PRECISION_RE=/`([+-]?(\d*\.\d+|\d+\.\d*|\d+))?/,APPROXIMATE_NUMBER_RE=regex.either(ACCURACY_RE,PRECISION_RE),SCIENTIFIC_NOTATION_RE=/\*\^[+-]?\d+/,NUMBERS={className:"number",relevance:0,begin:regex.concat(BASE_NUMBER_RE,regex.optional(APPROXIMATE_NUMBER_RE),regex.optional(SCIENTIFIC_NOTATION_RE))},SYMBOL_RE=/[a-zA-Z$][a-zA-Z0-9$]*/,SYSTEM_SYMBOLS_SET=new Set(SYSTEM_SYMBOLS),SYMBOLS={
variants:[{className:"builtin-symbol",begin:SYMBOL_RE,"on:begin":(match,response)=>{SYSTEM_SYMBOLS_SET.has(match[0])||response.ignoreMatch()}},{className:"symbol",relevance:0,begin:SYMBOL_RE}]},NAMED_CHARACTER={className:"named-character",begin:/\\\[[$a-zA-Z][$a-zA-Z0-9]+\]/},OPERATORS={className:"operator",relevance:0,begin:/[+\-*/,;.:@~=><&|_`'^?!%]+/},PATTERNS={className:"pattern",relevance:0,begin:/([a-zA-Z$][a-zA-Z0-9$]*)?_+([a-zA-Z$][a-zA-Z0-9$]*)?/},SLOTS={className:"slot",relevance:0,begin:/#[a-zA-Z$][a-zA-Z0-9$]*|#+[0-9]?/},
BRACES={className:"brace",relevance:0,begin:/[[\](){}]/},MESSAGES={className:"message-name",relevance:0,begin:regex.concat("::",SYMBOL_RE)};return{name:"Mathematica",aliases:["mma","wl"],classNameAliases:{brace:"punctuation",pattern:"type",slot:"type",symbol:"variable","named-character":"variable","builtin-symbol":"built_in","message-name":"string"},contains:[hljs.COMMENT(/\(\*/,/\*\)/,{contains:["self"]}),PATTERNS,SLOTS,MESSAGES,SYMBOLS,NAMED_CHARACTER,hljs.QUOTE_STRING_MODE,NUMBERS,OPERATORS,BRACES]}}
function matlab(hljs){const TRANSPOSE_RE="('|\\.')+",TRANSPOSE={relevance:0,contains:[{begin:TRANSPOSE_RE}]};return{name:"Matlab",keywords:{keyword:"arguments break case catch classdef continue else elseif end enumeration events for function global if methods otherwise parfor persistent properties return spmd switch try while",built_in:"sin sind sinh asin asind asinh cos cosd cosh acos acosd acosh tan tand tanh atan atand atan2 atanh sec secd sech asec asecd asech csc cscd csch acsc acscd acsch \
cot cotd coth acot acotd acoth hypot exp expm1 log log1p log10 log2 pow2 realpow reallog realsqrt sqrt nthroot nextpow2 abs angle complex conj imag real unwrap isreal cplxpair fix floor ceil round mod rem sign airy besselj bessely besselh besseli besselk beta betainc betaln ellipj ellipke erf erfc erfcx erfinv expint gamma gammainc gammaln psi legendre cross dot factor isprime primes gcd lcm rat rats perms nchoosek factorial cart2sph cart2pol pol2cart sph2cart hsv2rgb rgb2hsv zeros ones eye repm\
at rand randn linspace logspace freqspace meshgrid accumarray size length ndims numel disp isempty isequal isequalwithequalnans cat reshape diag blkdiag tril triu fliplr flipud flipdim rot90 find sub2ind ind2sub bsxfun ndgrid permute ipermute shiftdim circshift squeeze isscalar isvector ans eps realmax realmin pi i|0 inf nan isnan isinf isfinite j|0 why compan gallery hadamard hankel hilb invhilb magic pascal rosser toeplitz vander wilkinson max min nanmax nanmin mean nanmean type table readtabl\
e writetable sortrows sort figure plot plot3 scatter scatter3 cellfun legend intersect ismember procrustes hold num2cell "},illegal:'(//|"|#|/\\*|\\s+/\\w+)',contains:[{className:"function",beginKeywords:"function",end:"$",contains:[hljs.UNDERSCORE_TITLE_MODE,{className:"params",variants:[{begin:"\\(",end:"\\)"},{begin:"\\[",end:"\\]"}]}]},{className:"built_in",begin:/true|false/,relevance:0,starts:TRANSPOSE},{begin:"[a-zA-Z][a-zA-Z_0-9]*"+TRANSPOSE_RE,relevance:0},{className:"number",begin:hljs.
C_NUMBER_RE,relevance:0,starts:TRANSPOSE},{className:"string",begin:"'",end:"'",contains:[{begin:"''"}]},{begin:/\]|\}|\)/,relevance:0,starts:TRANSPOSE},{className:"string",begin:'"',end:'"',contains:[{begin:'""'}],starts:TRANSPOSE},hljs.COMMENT("^\\s*%\\{\\s*$","^\\s*%\\}\\s*$"),hljs.COMMENT("%","$")]}}function maxima(hljs){return{name:"Maxima",keywords:{$pattern:"[A-Za-z_%][0-9A-Za-z_%]*",keyword:"if then else elseif for thru do while unless step in and or not",literal:"true false unknown inf \
minf ind und %e %i %pi %phi %gamma",built_in:" abasep abs absint absolute_real_time acos acosh acot acoth acsc acsch activate addcol add_edge add_edges addmatrices addrow add_vertex add_vertices adjacency_matrix adjoin adjoint af agd airy airy_ai airy_bi airy_dai airy_dbi algsys alg_type alias allroots alphacharp alphanumericp amortization %and annuity_fv annuity_pv antid antidiff AntiDifference append appendfile apply apply1 apply2 applyb1 apropos args arit_amortization arithmetic arithsum arra\
y arrayapply arrayinfo arraymake arraysetapply ascii asec asech asin asinh askinteger asksign assoc assoc_legendre_p assoc_legendre_q assume assume_external_byte_order asympa at atan atan2 atanh atensimp atom atvalue augcoefmatrix augmented_lagrangian_method av average_degree backtrace bars barsplot barsplot_description base64 base64_decode bashindices batch batchload bc2 bdvac belln benefit_cost bern bernpoly bernstein_approx bernstein_expand bernstein_poly bessel bessel_i bessel_j bessel_k bes\
sel_simplify bessel_y beta beta_incomplete beta_incomplete_generalized beta_incomplete_regularized bezout bfallroots bffac bf_find_root bf_fmin_cobyla bfhzeta bfloat bfloatp bfpsi bfpsi0 bfzeta biconnected_components bimetric binomial bipartition block blockmatrixp bode_gain bode_phase bothcoef box boxplot boxplot_description break bug_report build_info|10 buildq build_sample burn cabs canform canten cardinality carg cartan cartesian_product catch cauchy_matrix cbffac cdf_bernoulli cdf_beta cdf_\
binomial cdf_cauchy cdf_chi2 cdf_continuous_uniform cdf_discrete_uniform cdf_exp cdf_f cdf_gamma cdf_general_finite_discrete cdf_geometric cdf_gumbel cdf_hypergeometric cdf_laplace cdf_logistic cdf_lognormal cdf_negative_binomial cdf_noncentral_chi2 cdf_noncentral_student_t cdf_normal cdf_pareto cdf_poisson cdf_rank_sum cdf_rayleigh cdf_signed_rank cdf_student_t cdf_weibull cdisplay ceiling central_moment cequal cequalignore cf cfdisrep cfexpand cgeodesic cgreaterp cgreaterpignore changename cha\
ngevar chaosgame charat charfun charfun2 charlist charp charpoly chdir chebyshev_t chebyshev_u checkdiv check_overlaps chinese cholesky christof chromatic_index chromatic_number cint circulant_graph clear_edge_weight clear_rules clear_vertex_label clebsch_gordan clebsch_graph clessp clesspignore close closefile cmetric coeff coefmatrix cograd col collapse collectterms columnop columnspace columnswap columnvector combination combine comp2pui compare compfile compile compile_file complement_graph \
complete_bipartite_graph complete_graph complex_number_p components compose_functions concan concat conjugate conmetderiv connected_components connect_vertices cons constant constantp constituent constvalue cont2part content continuous_freq contortion contour_plot contract contract_edge contragrad contrib_ode convert coord copy copy_file copy_graph copylist copymatrix cor cos cosh cot coth cov cov1 covdiff covect covers crc24sum create_graph create_list csc csch csetup cspline ctaylor ct_coordsy\
s ctransform ctranspose cube_graph cuboctahedron_graph cunlisp cv cycle_digraph cycle_graph cylindrical days360 dblint deactivate declare declare_constvalue declare_dimensions declare_fundamental_dimensions declare_fundamental_units declare_qty declare_translated declare_unit_conversion declare_units declare_weights decsym defcon define define_alt_display define_variable defint defmatch defrule defstruct deftaylor degree_sequence del delete deleten delta demo demoivre denom depends derivdegree d\
erivlist describe desolve determinant dfloat dgauss_a dgauss_b dgeev dgemm dgeqrf dgesv dgesvd diag diagmatrix diag_matrix diagmatrixp diameter diff digitcharp dimacs_export dimacs_import dimension dimensionless dimensions dimensions_as_list direct directory discrete_freq disjoin disjointp disolate disp dispcon dispform dispfun dispJordan display disprule dispterms distrib divide divisors divsum dkummer_m dkummer_u dlange dodecahedron_graph dotproduct dotsimp dpart draw draw2d draw3d drawdf draw\
_file draw_graph dscalar echelon edge_coloring edge_connectivity edges eigens_by_jacobi eigenvalues eigenvectors eighth einstein eivals eivects elapsed_real_time elapsed_run_time ele2comp ele2polynome ele2pui elem elementp elevation_grid elim elim_allbut eliminate eliminate_using ellipse elliptic_e elliptic_ec elliptic_eu elliptic_f elliptic_kc elliptic_pi ematrix empty_graph emptyp endcons entermatrix entertensor entier equal equalp equiv_classes erf erfc erf_generalized erfi errcatch error err\
ormsg errors euler ev eval_string evenp every evolution evolution2d evundiff example exp expand expandwrt expandwrt_factored expint expintegral_chi expintegral_ci expintegral_e expintegral_e1 expintegral_ei expintegral_e_simplify expintegral_li expintegral_shi expintegral_si explicit explose exponentialize express expt exsec extdiff extract_linear_equations extremal_subset ezgcd %f f90 facsum factcomb factor factorfacsum factorial factorout factorsum facts fast_central_elements fast_linsolve fas\
ttimes featurep fernfale fft fib fibtophi fifth filename_merge file_search file_type fillarray findde find_root find_root_abs find_root_error find_root_rel first fix flatten flength float floatnump floor flower_snark flush flush1deriv flushd flushnd flush_output fmin_cobyla forget fortran fourcos fourexpand fourier fourier_elim fourint fourintcos fourintsin foursimp foursin fourth fposition frame_bracket freeof freshline fresnel_c fresnel_s from_adjacency_matrix frucht_graph full_listify fullmap\
 fullmapl fullratsimp fullratsubst fullsetify funcsolve fundamental_dimensions fundamental_units fundef funmake funp fv g0 g1 gamma gamma_greek gamma_incomplete gamma_incomplete_generalized gamma_incomplete_regularized gauss gauss_a gauss_b gaussprob gcd gcdex gcdivide gcfac gcfactor gd generalized_lambert_w genfact gen_laguerre genmatrix gensym geo_amortization geo_annuity_fv geo_annuity_pv geomap geometric geometric_mean geosum get getcurrentdirectory get_edge_weight getenv get_lu_factors get_\
output_stream_string get_pixel get_plot_option get_tex_environment get_tex_environment_default get_vertex_label gfactor gfactorsum ggf girth global_variances gn gnuplot_close gnuplot_replot gnuplot_reset gnuplot_restart gnuplot_start go Gosper GosperSum gr2d gr3d gradef gramschmidt graph6_decode graph6_encode graph6_export graph6_import graph_center graph_charpoly graph_eigenvalues graph_flow graph_order graph_periphery graph_product graph_size graph_union great_rhombicosidodecahedron_graph grea\
t_rhombicuboctahedron_graph grid_graph grind grobner_basis grotzch_graph hamilton_cycle hamilton_path hankel hankel_1 hankel_2 harmonic harmonic_mean hav heawood_graph hermite hessian hgfred hilbertmap hilbert_matrix hipow histogram histogram_description hodge horner hypergeometric i0 i1 %ibes ic1 ic2 ic_convert ichr1 ichr2 icosahedron_graph icosidodecahedron_graph icurvature ident identfor identity idiff idim idummy ieqn %if ifactors iframes ifs igcdex igeodesic_coords ilt image imagpart imetri\
c implicit implicit_derivative implicit_plot indexed_tensor indices induced_subgraph inferencep inference_result infix info_display init_atensor init_ctensor in_neighbors innerproduct inpart inprod inrt integerp integer_partitions integrate intersect intersection intervalp intopois intosum invariant1 invariant2 inverse_fft inverse_jacobi_cd inverse_jacobi_cn inverse_jacobi_cs inverse_jacobi_dc inverse_jacobi_dn inverse_jacobi_ds inverse_jacobi_nc inverse_jacobi_nd inverse_jacobi_ns inverse_jacob\
i_sc inverse_jacobi_sd inverse_jacobi_sn invert invert_by_adjoint invert_by_lu inv_mod irr is is_biconnected is_bipartite is_connected is_digraph is_edge_in_graph is_graph is_graph_or_digraph ishow is_isomorphic isolate isomorphism is_planar isqrt isreal_p is_sconnected is_tree is_vertex_in_graph items_inference %j j0 j1 jacobi jacobian jacobi_cd jacobi_cn jacobi_cs jacobi_dc jacobi_dn jacobi_ds jacobi_nc jacobi_nd jacobi_ns jacobi_p jacobi_sc jacobi_sd jacobi_sn JF jn join jordan julia julia_se\
t julia_sin %k kdels kdelta kill killcontext kostka kron_delta kronecker_product kummer_m kummer_u kurtosis kurtosis_bernoulli kurtosis_beta kurtosis_binomial kurtosis_chi2 kurtosis_continuous_uniform kurtosis_discrete_uniform kurtosis_exp kurtosis_f kurtosis_gamma kurtosis_general_finite_discrete kurtosis_geometric kurtosis_gumbel kurtosis_hypergeometric kurtosis_laplace kurtosis_logistic kurtosis_lognormal kurtosis_negative_binomial kurtosis_noncentral_chi2 kurtosis_noncentral_student_t kurtos\
is_normal kurtosis_pareto kurtosis_poisson kurtosis_rayleigh kurtosis_student_t kurtosis_weibull label labels lagrange laguerre lambda lambert_w laplace laplacian_matrix last lbfgs lc2kdt lcharp lc_l lcm lc_u ldefint ldisp ldisplay legendre_p legendre_q leinstein length let letrules letsimp levi_civita lfreeof lgtreillis lhs li liediff limit Lindstedt linear linearinterpol linear_program linear_regression line_graph linsolve listarray list_correlations listify list_matrix_entries list_nc_monomia\
ls listoftens listofvars listp lmax lmin load loadfile local locate_matrix_entry log logcontract log_gamma lopow lorentz_gauge lowercasep lpart lratsubst lreduce lriemann lsquares_estimates lsquares_estimates_approximate lsquares_estimates_exact lsquares_mse lsquares_residual_mse lsquares_residuals lsum ltreillis lu_backsub lucas lu_factor %m macroexpand macroexpand1 make_array makebox makefact makegamma make_graph make_level_picture makelist makeOrders make_poly_continent make_poly_country make\
_polygon make_random_state make_rgb_picture makeset make_string_input_stream make_string_output_stream make_transform mandelbrot mandelbrot_set map mapatom maplist matchdeclare matchfix mat_cond mat_fullunblocker mat_function mathml_display mat_norm matrix matrixmap matrixp matrix_size mattrace mat_trace mat_unblocker max max_clique max_degree max_flow maximize_lp max_independent_set max_matching maybe md5sum mean mean_bernoulli mean_beta mean_binomial mean_chi2 mean_continuous_uniform mean_devi\
ation mean_discrete_uniform mean_exp mean_f mean_gamma mean_general_finite_discrete mean_geometric mean_gumbel mean_hypergeometric mean_laplace mean_logistic mean_lognormal mean_negative_binomial mean_noncentral_chi2 mean_noncentral_student_t mean_normal mean_pareto mean_poisson mean_rayleigh mean_student_t mean_weibull median median_deviation member mesh metricexpandall mgf1_sha1 min min_degree min_edge_cut minfactorial minimalPoly minimize_lp minimum_spanning_tree minor minpack_lsquares minpac\
k_solve min_vertex_cover min_vertex_cut mkdir mnewton mod mode_declare mode_identity ModeMatrix moebius mon2schur mono monomial_dimensions multibernstein_poly multi_display_for_texinfo multi_elem multinomial multinomial_coeff multi_orbit multiplot_mode multi_pui multsym multthru mycielski_graph nary natural_unit nc_degree ncexpt ncharpoly negative_picture neighbors new newcontext newdet new_graph newline newton new_variable next_prime nicedummies niceindices ninth nofix nonarray noncentral_momen\
t nonmetricity nonnegintegerp nonscalarp nonzeroandfreeof notequal nounify nptetrad npv nroots nterms ntermst nthroot nullity nullspace num numbered_boundaries numberp number_to_octets num_distinct_partitions numerval numfactor num_partitions nusum nzeta nzetai nzetar octets_to_number octets_to_oid odd_girth oddp ode2 ode_check odelin oid_to_octets op opena opena_binary openr openr_binary openw openw_binary operatorp opsubst optimize %or orbit orbits ordergreat ordergreatp orderless orderlessp o\
rthogonal_complement orthopoly_recur orthopoly_weight outermap out_neighbors outofpois pade parabolic_cylinder_d parametric parametric_surface parg parGosper parse_string parse_timedate part part2cont partfrac partition partition_set partpol path_digraph path_graph pathname_directory pathname_name pathname_type pdf_bernoulli pdf_beta pdf_binomial pdf_cauchy pdf_chi2 pdf_continuous_uniform pdf_discrete_uniform pdf_exp pdf_f pdf_gamma pdf_general_finite_discrete pdf_geometric pdf_gumbel pdf_hyperg\
eometric pdf_laplace pdf_logistic pdf_lognormal pdf_negative_binomial pdf_noncentral_chi2 pdf_noncentral_student_t pdf_normal pdf_pareto pdf_poisson pdf_rank_sum pdf_rayleigh pdf_signed_rank pdf_student_t pdf_weibull pearson_skewness permanent permut permutation permutations petersen_graph petrov pickapart picture_equalp picturep piechart piechart_description planar_embedding playback plog plot2d plot3d plotdf ploteq plsquares pochhammer points poisdiff poisexpt poisint poismap poisplus poissimp\
 poissubst poistimes poistrim polar polarform polartorect polar_to_xy poly_add poly_buchberger poly_buchberger_criterion poly_colon_ideal poly_content polydecomp poly_depends_p poly_elimination_ideal poly_exact_divide poly_expand poly_expt poly_gcd polygon poly_grobner poly_grobner_equal poly_grobner_member poly_grobner_subsetp poly_ideal_intersection poly_ideal_polysaturation poly_ideal_polysaturation1 poly_ideal_saturation poly_ideal_saturation1 poly_lcm poly_minimization polymod poly_multiply\
 polynome2ele polynomialp poly_normal_form poly_normalize poly_normalize_list poly_polysaturation_extension poly_primitive_part poly_pseudo_divide poly_reduced_grobner poly_reduction poly_saturation_extension poly_s_polynomial poly_subtract polytocompanion pop postfix potential power_mod powerseries powerset prefix prev_prime primep primes principal_components print printf printfile print_graph printpois printprops prodrac product properties propvars psi psubst ptriangularize pui pui2comp pui2el\
e pui2polynome pui_direct puireduc push put pv qput qrange qty quad_control quad_qag quad_qagi quad_qagp quad_qags quad_qawc quad_qawf quad_qawo quad_qaws quadrilateral quantile quantile_bernoulli quantile_beta quantile_binomial quantile_cauchy quantile_chi2 quantile_continuous_uniform quantile_discrete_uniform quantile_exp quantile_f quantile_gamma quantile_general_finite_discrete quantile_geometric quantile_gumbel quantile_hypergeometric quantile_laplace quantile_logistic quantile_lognormal qu\
antile_negative_binomial quantile_noncentral_chi2 quantile_noncentral_student_t quantile_normal quantile_pareto quantile_poisson quantile_rayleigh quantile_student_t quantile_weibull quartile_skewness quit qunit quotient racah_v racah_w radcan radius random random_bernoulli random_beta random_binomial random_bipartite_graph random_cauchy random_chi2 random_continuous_uniform random_digraph random_discrete_uniform random_exp random_f random_gamma random_general_finite_discrete random_geometric ra\
ndom_graph random_graph1 random_gumbel random_hypergeometric random_laplace random_logistic random_lognormal random_negative_binomial random_network random_noncentral_chi2 random_noncentral_student_t random_normal random_pareto random_permutation random_poisson random_rayleigh random_regular_graph random_student_t random_tournament random_tree random_weibull range rank rat ratcoef ratdenom ratdiff ratdisrep ratexpand ratinterpol rational rationalize ratnumer ratnump ratp ratsimp ratsubst ratvars\
 ratweight read read_array read_binary_array read_binary_list read_binary_matrix readbyte readchar read_hashed_array readline read_list read_matrix read_nested_list readonly read_xpm real_imagpart_to_conjugate realpart realroots rearray rectangle rectform rectform_log_if_constant recttopolar rediff reduce_consts reduce_order region region_boundaries region_boundaries_plus rem remainder remarray rembox remcomps remcon remcoord remfun remfunction remlet remove remove_constvalue remove_dimensions r\
emove_edge remove_fundamental_dimensions remove_fundamental_units remove_plot_option remove_vertex rempart remrule remsym remvalue rename rename_file reset reset_displays residue resolvante resolvante_alternee1 resolvante_bipartite resolvante_diedrale resolvante_klein resolvante_klein3 resolvante_produit_sym resolvante_unitaire resolvante_vierer rest resultant return reveal reverse revert revert2 rgb2level rhs ricci riemann rinvariant risch rk rmdir rncombine romberg room rootscontract round row\
 rowop rowswap rreduce run_testsuite %s save saving scalarp scaled_bessel_i scaled_bessel_i0 scaled_bessel_i1 scalefactors scanmap scatterplot scatterplot_description scene schur2comp sconcat scopy scsimp scurvature sdowncase sec sech second sequal sequalignore set_alt_display setdifference set_draw_defaults set_edge_weight setelmx setequalp setify setp set_partitions set_plot_option set_prompt set_random_state set_tex_environment set_tex_environment_default setunits setup_autoload set_up_dot_si\
mplifications set_vertex_label seventh sexplode sf sha1sum sha256sum shortest_path shortest_weighted_path show showcomps showratvars sierpinskiale sierpinskimap sign signum similaritytransform simp_inequality simplify_sum simplode simpmetderiv simtran sin sinh sinsert sinvertcase sixth skewness skewness_bernoulli skewness_beta skewness_binomial skewness_chi2 skewness_continuous_uniform skewness_discrete_uniform skewness_exp skewness_f skewness_gamma skewness_general_finite_discrete skewness_geom\
etric skewness_gumbel skewness_hypergeometric skewness_laplace skewness_logistic skewness_lognormal skewness_negative_binomial skewness_noncentral_chi2 skewness_noncentral_student_t skewness_normal skewness_pareto skewness_poisson skewness_rayleigh skewness_student_t skewness_weibull slength smake small_rhombicosidodecahedron_graph small_rhombicuboctahedron_graph smax smin smismatch snowmap snub_cube_graph snub_dodecahedron_graph solve solve_rec solve_rec_rat some somrac sort sparse6_decode spar\
se6_encode sparse6_export sparse6_import specint spherical spherical_bessel_j spherical_bessel_y spherical_hankel1 spherical_hankel2 spherical_harmonic spherical_to_xyz splice split sposition sprint sqfr sqrt sqrtdenest sremove sremovefirst sreverse ssearch ssort sstatus ssubst ssubstfirst staircase standardize standardize_inverse_trig starplot starplot_description status std std1 std_bernoulli std_beta std_binomial std_chi2 std_continuous_uniform std_discrete_uniform std_exp std_f std_gamma std\
_general_finite_discrete std_geometric std_gumbel std_hypergeometric std_laplace std_logistic std_lognormal std_negative_binomial std_noncentral_chi2 std_noncentral_student_t std_normal std_pareto std_poisson std_rayleigh std_student_t std_weibull stemplot stirling stirling1 stirling2 strim striml strimr string stringout stringp strong_components struve_h struve_l sublis sublist sublist_indices submatrix subsample subset subsetp subst substinpart subst_parallel substpart substring subvar subvarp\
 sum sumcontract summand_to_rec supcase supcontext symbolp symmdifference symmetricp system take_channel take_inference tan tanh taylor taylorinfo taylorp taylor_simplifier taytorat tcl_output tcontract tellrat tellsimp tellsimpafter tentex tenth test_mean test_means_difference test_normality test_proportion test_proportions_difference test_rank_sum test_sign test_signed_rank test_variance test_variance_ratio tex tex1 tex_display texput %th third throw time timedate timer timer_info tldefint tli\
mit todd_coxeter toeplitz tokens to_lisp topological_sort to_poly to_poly_solve totaldisrep totalfourier totient tpartpol trace tracematrix trace_options transform_sample translate translate_file transpose treefale tree_reduce treillis treinat triangle triangularize trigexpand trigrat trigreduce trigsimp trunc truncate truncated_cube_graph truncated_dodecahedron_graph truncated_icosahedron_graph truncated_tetrahedron_graph tr_warnings_get tube tutte_graph ueivects uforget ultraspherical underlyi\
ng_graph undiff union unique uniteigenvectors unitp units unit_step unitvector unorder unsum untellrat untimer untrace uppercasep uricci uriemann uvect vandermonde_matrix var var1 var_bernoulli var_beta var_binomial var_chi2 var_continuous_uniform var_discrete_uniform var_exp var_f var_gamma var_general_finite_discrete var_geometric var_gumbel var_hypergeometric var_laplace var_logistic var_lognormal var_negative_binomial var_noncentral_chi2 var_noncentral_student_t var_normal var_pareto var_poi\
sson var_rayleigh var_student_t var_weibull vector vectorpotential vectorsimp verbify vers vertex_coloring vertex_connectivity vertex_degree vertex_distance vertex_eccentricity vertex_in_degree vertex_out_degree vertices vertices_to_cycle vertices_to_path %w weyl wheel_graph wiener_index wigner_3j wigner_6j wigner_9j with_stdout write_binary_data writebyte write_data writefile wronskian xreduce xthru %y Zeilberger zeroequiv zerofor zeromatrix zeromatrixp zeta zgeev zheev zlange zn_add_table zn_c\
armichael_lambda zn_characteristic_factors zn_determinant zn_factor_generators zn_invert_by_lu zn_log zn_mult_table absboxchar activecontexts adapt_depth additive adim aform algebraic algepsilon algexact aliases allbut all_dotsimp_denoms allocation allsym alphabetic animation antisymmetric arrays askexp assume_pos assume_pos_pred assumescalar asymbol atomgrad atrig1 axes axis_3d axis_bottom axis_left axis_right axis_top azimuth background background_color backsubst berlefact bernstein_explicit b\
esselexpand beta_args_sum_to_integer beta_expand bftorat bftrunc bindtest border boundaries_array box boxchar breakup %c capping cauchysum cbrange cbtics center cflength cframe_flag cnonmet_flag color color_bar color_bar_tics colorbox columns commutative complex cone context contexts contour contour_levels cosnpiflag ctaypov ctaypt ctayswitch ctayvar ct_coords ctorsion_flag ctrgsimp cube current_let_rule_package cylinder data_file_name debugmode decreasing default_let_rule_package delay dependen\
cies derivabbrev derivsubst detout diagmetric diff dim dimensions dispflag display2d|10 display_format_internal distribute_over doallmxops domain domxexpt domxmxops domxnctimes dontfactor doscmxops doscmxplus dot0nscsimp dot0simp dot1simp dotassoc dotconstrules dotdistrib dotexptsimp dotident dotscrules draw_graph_program draw_realpart edge_color edge_coloring edge_partition edge_type edge_width %edispflag elevation %emode endphi endtheta engineering_format_floats enhanced3d %enumer epsilon_lp e\
rfflag erf_representation errormsg error_size error_syms error_type %e_to_numlog eval even evenfun evflag evfun ev_point expandwrt_denom expintexpand expintrep expon expop exptdispflag exptisolate exptsubst facexpand facsum_combine factlim factorflag factorial_expand factors_only fb feature features file_name file_output_append file_search_demo file_search_lisp file_search_maxima|10 file_search_tests file_search_usage file_type_lisp file_type_maxima|10 fill_color fill_density filled_func fixed_v\
ertices flipflag float2bf font font_size fortindent fortspaces fpprec fpprintprec functions gamma_expand gammalim gdet genindex gensumnum GGFCFMAX GGFINFINITY globalsolve gnuplot_command gnuplot_curve_styles gnuplot_curve_titles gnuplot_default_term_command gnuplot_dumb_term_command gnuplot_file_args gnuplot_file_name gnuplot_out_file gnuplot_pdf_term_command gnuplot_pm3d gnuplot_png_term_command gnuplot_postamble gnuplot_preamble gnuplot_ps_term_command gnuplot_svg_term_command gnuplot_term gnu\
plot_view_args Gosper_in_Zeilberger gradefs grid grid2d grind halfangles head_angle head_both head_length head_type height hypergeometric_representation %iargs ibase icc1 icc2 icounter idummyx ieqnprint ifb ifc1 ifc2 ifg ifgi ifr iframe_bracket_form ifri igeowedge_flag ikt1 ikt2 imaginary inchar increasing infeval infinity inflag infolists inm inmc1 inmc2 intanalysis integer integervalued integrate_use_rootsof integration_constant integration_constant_counter interpolate_color intfaclim ip_grid \
ip_grid_in irrational isolate_wrt_times iterations itr julia_parameter %k1 %k2 keepfloat key key_pos kinvariant kt label label_alignment label_orientation labels lassociative lbfgs_ncorrections lbfgs_nfeval_max leftjust legend letrat let_rule_packages lfg lg lhospitallim limsubst linear linear_solver linechar linel|10 linenum line_type linewidth line_width linsolve_params linsolvewarn lispdisp listarith listconstvars listdummyvars lmxchar load_pathname loadprint logabs logarc logcb logconcoeffp \
logexpand lognegint logsimp logx logx_secondary logy logy_secondary logz lriem m1pbranch macroexpansion macros mainvar manual_demo maperror mapprint matrix_element_add matrix_element_mult matrix_element_transpose maxapplydepth maxapplyheight maxima_tempdir|10 maxima_userdir|10 maxnegex MAX_ORD maxposex maxpsifracdenom maxpsifracnum maxpsinegint maxpsiposint maxtayorder mesh_lines_color method mod_big_prime mode_check_errorp mode_checkp mode_check_warnp mod_test mod_threshold modular_linear_solve\
r modulus multiplicative multiplicities myoptions nary negdistrib negsumdispflag newline newtonepsilon newtonmaxiter nextlayerfactor niceindicespref nm nmc noeval nolabels nonegative_lp noninteger nonscalar noun noundisp nouns np npi nticks ntrig numer numer_pbranch obase odd oddfun opacity opproperties opsubst optimprefix optionset orientation origin orthopoly_returns_intervals outative outchar packagefile palette partswitch pdf_file pfeformat phiresolution %piargs piece pivot_count_sx pivot_ma\
x_sx plot_format plot_options plot_realpart png_file pochhammer_max_index points pointsize point_size points_joined point_type poislim poisson poly_coefficient_ring poly_elimination_order polyfactor poly_grobner_algorithm poly_grobner_debug poly_monomial_order poly_primary_elimination_order poly_return_term_list poly_secondary_elimination_order poly_top_reduction_only posfun position powerdisp pred prederror primep_number_of_tests product_use_gamma program programmode promote_float_to_bigfloat p\
rompt proportional_axes props psexpand ps_file radexpand radius radsubstflag rassociative ratalgdenom ratchristof ratdenomdivide rateinstein ratepsilon ratfac rational ratmx ratprint ratriemann ratsimpexpons ratvarswitch ratweights ratweyl ratwtlvl real realonly redraw refcheck resolution restart resultant ric riem rmxchar %rnum_list rombergabs rombergit rombergmin rombergtol rootsconmode rootsepsilon run_viewer same_xy same_xyz savedef savefactors scalar scalarmatrixp scale scale_lp setcheck se\
tcheckbreak setval show_edge_color show_edges show_edge_type show_edge_width show_id show_label showtime show_vertex_color show_vertex_size show_vertex_type show_vertices show_weight simp simplified_output simplify_products simpproduct simpsum sinnpiflag solvedecomposes solveexplicit solvefactors solvenullwarn solveradcan solvetrigwarn space sparse sphere spring_embedding_depth sqrtdispflag stardisp startphi starttheta stats_numer stringdisp structures style sublis_apply_lambda subnumsimp sumexp\
and sumsplitfact surface surface_hide svg_file symmetric tab taylordepth taylor_logexpand taylor_order_coefficients taylor_truncate_polynomials tensorkill terminal testsuite_files thetaresolution timer_devalue title tlimswitch tr track transcompile transform transform_xy translate_fast_arrays transparent transrun tr_array_as_ref tr_bound_function_applyp tr_file_tty_messagesp tr_float_can_branch_complex tr_function_call_default trigexpandplus trigexpandtimes triginverses trigsign trivial_solution\
s tr_numer tr_optimize_max_loop tr_semicompile tr_state_vars tr_warn_bad_function_calls tr_warn_fexpr tr_warn_meval tr_warn_mode tr_warn_undeclared tr_warn_undefined_variable tstep ttyoff tube_extremes ufg ug %unitexpand unit_vectors uric uriem use_fast_arrays user_preamble usersetunits values vect_cross verbose vertex_color vertex_coloring vertex_partition vertex_size vertex_type view warnings weyl width windowname windowtitle wired_surface wireframe xaxis xaxis_color xaxis_secondary xaxis_type\
 xaxis_width xlabel xlabel_secondary xlength xrange xrange_secondary xtics xtics_axis xtics_rotate xtics_rotate_secondary xtics_secondary xtics_secondary_axis xu_grid x_voxel xy_file xyplane xy_scale yaxis yaxis_color yaxis_secondary yaxis_type yaxis_width ylabel ylabel_secondary ylength yrange yrange_secondary ytics ytics_axis ytics_rotate ytics_rotate_secondary ytics_secondary ytics_secondary_axis yv_grid y_voxel yx_ratio zaxis zaxis_color zaxis_type zaxis_width zeroa zerob zerobern zeta%pi zl\
abel zlabel_rotate zlength zmin zn_primroot_limit zn_primroot_pretest",symbol:"_ __ %|0 %%|0"},contains:[{className:"comment",begin:"/\\*",end:"\\*/",contains:["self"]},hljs.QUOTE_STRING_MODE,{className:"number",relevance:0,variants:[{begin:"\\b(\\d+|\\d+\\.|\\.\\d+|\\d+\\.\\d+)[Ee][-+]?\\d+\\b"},{begin:"\\b(\\d+|\\d+\\.|\\.\\d+|\\d+\\.\\d+)[Bb][-+]?\\d+\\b",relevance:10},{begin:"\\b(\\.\\d+|\\d+\\.\\d+)\\b"},{begin:"\\b(\\d+|0[0-9A-Za-z]+)\\.?\\b"}]}],illegal:/@/}}function mel(hljs){return{name:"\
MEL",keywords:"int float string vector matrix if else switch case default while do for in break continue global proc return about abs addAttr addAttributeEditorNodeHelp addDynamic addNewShelfTab addPP addPanelCategory addPrefixToName advanceToNextDrivenKey affectedNet affects aimConstraint air alias aliasAttr align alignCtx alignCurve alignSurface allViewFit ambientLight angle angleBetween animCone animCurveEditor animDisplay animView annotate appendStringArray applicationName applyAttrPreset ap\
plyTake arcLenDimContext arcLengthDimension arclen arrayMapper art3dPaintCtx artAttrCtx artAttrPaintVertexCtx artAttrSkinPaintCtx artAttrTool artBuildPaintMenu artFluidAttrCtx artPuttyCtx artSelectCtx artSetPaintCtx artUserPaintCtx assignCommand assignInputDevice assignViewportFactories attachCurve attachDeviceAttr attachSurface attrColorSliderGrp attrCompatibility attrControlGrp attrEnumOptionMenu attrEnumOptionMenuGrp attrFieldGrp attrFieldSliderGrp attrNavigationControlGrp attrPresetEditWin a\
ttributeExists attributeInfo attributeMenu attributeQuery autoKeyframe autoPlace bakeClip bakeFluidShading bakePartialHistory bakeResults bakeSimulation basename basenameEx batchRender bessel bevel bevelPlus binMembership bindSkin blend2 blendShape blendShapeEditor blendShapePanel blendTwoAttr blindDataType boneLattice boundary boxDollyCtx boxZoomCtx bufferCurve buildBookmarkMenu buildKeyframeMenu button buttonManip CBG cacheFile cacheFileCombine cacheFileMerge cacheFileTrack camera cameraView c\
anCreateManip canvas capitalizeString catch catchQuiet ceil changeSubdivComponentDisplayLevel changeSubdivRegion channelBox character characterMap characterOutlineEditor characterize chdir checkBox checkBoxGrp checkDefaultRenderGlobals choice circle circularFillet clamp clear clearCache clip clipEditor clipEditorCurrentTimeCtx clipSchedule clipSchedulerOutliner clipTrimBefore closeCurve closeSurface cluster cmdFileOutput cmdScrollFieldExecuter cmdScrollFieldReporter cmdShell coarsenSubdivSelecti\
onList collision color colorAtPoint colorEditor colorIndex colorIndexSliderGrp colorSliderButtonGrp colorSliderGrp columnLayout commandEcho commandLine commandPort compactHairSystem componentEditor compositingInterop computePolysetVolume condition cone confirmDialog connectAttr connectControl connectDynamic connectJoint connectionInfo constrain constrainValue constructionHistory container containsMultibyte contextInfo control convertFromOldLayers convertIffToPsd convertLightmap convertSolidTx co\
nvertTessellation convertUnit copyArray copyFlexor copyKey copySkinWeights cos cpButton cpCache cpClothSet cpCollision cpConstraint cpConvClothToMesh cpForces cpGetSolverAttr cpPanel cpProperty cpRigidCollisionFilter cpSeam cpSetEdit cpSetSolverAttr cpSolver cpSolverTypes cpTool cpUpdateClothUVs createDisplayLayer createDrawCtx createEditor createLayeredPsdFile createMotionField createNewShelf createNode createRenderLayer createSubdivRegion cross crossProduct ctxAbort ctxCompletion ctxEditMode c\
txTraverse currentCtx currentTime currentTimeCtx currentUnit curve curveAddPtCtx curveCVCtx curveEPCtx curveEditorCtx curveIntersect curveMoveEPCtx curveOnSurface curveSketchCtx cutKey cycleCheck cylinder dagPose date defaultLightListCheckBox defaultNavigation defineDataServer defineVirtualDevice deformer deg_to_rad delete deleteAttr deleteShadingGroupsAndMaterials deleteShelfTab deleteUI deleteUnusedBrushes delrandstr detachCurve detachDeviceAttr detachSurface deviceEditor devicePanel dgInfo dg\
dirty dgeval dgtimer dimWhen directKeyCtx directionalLight dirmap dirname disable disconnectAttr disconnectJoint diskCache displacementToPoly displayAffected displayColor displayCull displayLevelOfDetail displayPref displayRGBColor displaySmoothness displayStats displayString displaySurface distanceDimContext distanceDimension doBlur dolly dollyCtx dopeSheetEditor dot dotProduct doubleProfileBirailSurface drag dragAttrContext draggerContext dropoffLocator duplicate duplicateCurve duplicateSurfac\
e dynCache dynControl dynExport dynExpression dynGlobals dynPaintEditor dynParticleCtx dynPref dynRelEdPanel dynRelEditor dynamicLoad editAttrLimits editDisplayLayerGlobals editDisplayLayerMembers editRenderLayerAdjustment editRenderLayerGlobals editRenderLayerMembers editor editorTemplate effector emit emitter enableDevice encodeString endString endsWith env equivalent equivalentTol erf error eval evalDeferred evalEcho event exactWorldBoundingBox exclusiveLightCheckBox exec executeForEachObject\
 exists exp expression expressionEditorListen extendCurve extendSurface extrude fcheck fclose feof fflush fgetline fgetword file fileBrowserDialog fileDialog fileExtension fileInfo filetest filletCurve filter filterCurve filterExpand filterStudioImport findAllIntersections findAnimCurves findKeyframe findMenuItem findRelatedSkinCluster finder firstParentOf fitBspline flexor floatEq floatField floatFieldGrp floatScrollBar floatSlider floatSlider2 floatSliderButtonGrp floatSliderGrp floor flow flu\
idCacheInfo fluidEmitter fluidVoxelInfo flushUndo fmod fontDialog fopen formLayout format fprint frameLayout fread freeFormFillet frewind fromNativePath fwrite gamma gauss geometryConstraint getApplicationVersionAsFloat getAttr getClassification getDefaultBrush getFileList getFluidAttr getInputDeviceRange getMayaPanelTypes getModifiers getPanel getParticleAttr getPluginResource getenv getpid glRender glRenderEditor globalStitch gmatch goal gotoBindPose grabColor gradientControl gradientControlNo\
Attr graphDollyCtx graphSelectContext graphTrackCtx gravity grid gridLayout group groupObjectsByName HfAddAttractorToAS HfAssignAS HfBuildEqualMap HfBuildFurFiles HfBuildFurImages HfCancelAFR HfConnectASToHF HfCreateAttractor HfDeleteAS HfEditAS HfPerformCreateAS HfRemoveAttractorFromAS HfSelectAttached HfSelectAttractors HfUnAssignAS hardenPointCurve hardware hardwareRenderPanel headsUpDisplay headsUpMessage help helpLine hermite hide hilite hitTest hotBox hotkey hotkeyCheck hsv_to_rgb hudButto\
n hudSlider hudSliderButton hwReflectionMap hwRender hwRenderLoad hyperGraph hyperPanel hyperShade hypot iconTextButton iconTextCheckBox iconTextRadioButton iconTextRadioCollection iconTextScrollList iconTextStaticLabel ikHandle ikHandleCtx ikHandleDisplayScale ikSolver ikSplineHandleCtx ikSystem ikSystemInfo ikfkDisplayMethod illustratorCurves image imfPlugins inheritTransform insertJoint insertJointCtx insertKeyCtx insertKnotCurve insertKnotSurface instance instanceable instancer intField intF\
ieldGrp intScrollBar intSlider intSliderGrp interToUI internalVar intersect iprEngine isAnimCurve isConnected isDirty isParentOf isSameObject isTrue isValidObjectName isValidString isValidUiName isolateSelect itemFilter itemFilterAttr itemFilterRender itemFilterType joint jointCluster jointCtx jointDisplayScale jointLattice keyTangent keyframe keyframeOutliner keyframeRegionCurrentTimeCtx keyframeRegionDirectKeyCtx keyframeRegionDollyCtx keyframeRegionInsertKeyCtx keyframeRegionMoveKeyCtx keyfra\
meRegionScaleKeyCtx keyframeRegionSelectKeyCtx keyframeRegionSetKeyCtx keyframeRegionTrackCtx keyframeStats lassoContext lattice latticeDeformKeyCtx launch launchImageEditor layerButton layeredShaderPort layeredTexturePort layout layoutDialog lightList lightListEditor lightListPanel lightlink lineIntersection linearPrecision linstep listAnimatable listAttr listCameras listConnections listDeviceAttachments listHistory listInputDeviceAxes listInputDeviceButtons listInputDevices listMenuAnnotation \
listNodeTypes listPanelCategories listRelatives listSets listTransforms listUnselected listerEditor loadFluid loadNewShelf loadPlugin loadPluginLanguageResources loadPrefObjects localizedPanelLabel lockNode loft log longNameOf lookThru ls lsThroughFilter lsType lsUI Mayatomr mag makeIdentity makeLive makePaintable makeRoll makeSingleSurface makeTubeOn makebot manipMoveContext manipMoveLimitsCtx manipOptions manipRotateContext manipRotateLimitsCtx manipScaleContext manipScaleLimitsCtx marker matc\
h max memory menu menuBarLayout menuEditor menuItem menuItemToShelf menuSet menuSetPref messageLine min minimizeApp mirrorJoint modelCurrentTimeCtx modelEditor modelPanel mouse movIn movOut move moveIKtoFK moveKeyCtx moveVertexAlongDirection multiProfileBirailSurface mute nParticle nameCommand nameField namespace namespaceInfo newPanelItems newton nodeCast nodeIconButton nodeOutliner nodePreset nodeType noise nonLinear normalConstraint normalize nurbsBoolean nurbsCopyUVSet nurbsCube nurbsEditUV \
nurbsPlane nurbsSelect nurbsSquare nurbsToPoly nurbsToPolygonsPref nurbsToSubdiv nurbsToSubdivPref nurbsUVSet nurbsViewDirectionVector objExists objectCenter objectLayer objectType objectTypeUI obsoleteProc oceanNurbsPreviewPlane offsetCurve offsetCurveOnSurface offsetSurface openGLExtension openMayaPref optionMenu optionMenuGrp optionVar orbit orbitCtx orientConstraint outlinerEditor outlinerPanel overrideModifier paintEffectsDisplay pairBlend palettePort paneLayout panel panelConfiguration pan\
elHistory paramDimContext paramDimension paramLocator parent parentConstraint particle particleExists particleInstancer particleRenderInfo partition pasteKey pathAnimation pause pclose percent performanceOptions pfxstrokes pickWalk picture pixelMove planarSrf plane play playbackOptions playblast plugAttr plugNode pluginInfo pluginResourceUtil pointConstraint pointCurveConstraint pointLight pointMatrixMult pointOnCurve pointOnSurface pointPosition poleVectorConstraint polyAppend polyAppendFacetCt\
x polyAppendVertex polyAutoProjection polyAverageNormal polyAverageVertex polyBevel polyBlendColor polyBlindData polyBoolOp polyBridgeEdge polyCacheMonitor polyCheck polyChipOff polyClipboard polyCloseBorder polyCollapseEdge polyCollapseFacet polyColorBlindData polyColorDel polyColorPerVertex polyColorSet polyCompare polyCone polyCopyUV polyCrease polyCreaseCtx polyCreateFacet polyCreateFacetCtx polyCube polyCut polyCutCtx polyCylinder polyCylindricalProjection polyDelEdge polyDelFacet polyDelVe\
rtex polyDuplicateAndConnect polyDuplicateEdge polyEditUV polyEditUVShell polyEvaluate polyExtrudeEdge polyExtrudeFacet polyExtrudeVertex polyFlipEdge polyFlipUV polyForceUV polyGeoSampler polyHelix polyInfo polyInstallAction polyLayoutUV polyListComponentConversion polyMapCut polyMapDel polyMapSew polyMapSewMove polyMergeEdge polyMergeEdgeCtx polyMergeFacet polyMergeFacetCtx polyMergeUV polyMergeVertex polyMirrorFace polyMoveEdge polyMoveFacet polyMoveFacetUV polyMoveUV polyMoveVertex polyNorma\
l polyNormalPerVertex polyNormalizeUV polyOptUvs polyOptions polyOutput polyPipe polyPlanarProjection polyPlane polyPlatonicSolid polyPoke polyPrimitive polyPrism polyProjection polyPyramid polyQuad polyQueryBlindData polyReduce polySelect polySelectConstraint polySelectConstraintMonitor polySelectCtx polySelectEditCtx polySeparate polySetToFaceNormal polySewEdge polyShortestPathCtx polySmooth polySoftEdge polySphere polySphericalProjection polySplit polySplitCtx polySplitEdge polySplitRing poly\
SplitVertex polyStraightenUVBorder polySubdivideEdge polySubdivideFacet polyToSubdiv polyTorus polyTransfer polyTriangulate polyUVSet polyUnite polyWedgeFace popen popupMenu pose pow preloadRefEd print progressBar progressWindow projFileViewer projectCurve projectTangent projectionContext projectionManip promptDialog propModCtx propMove psdChannelOutliner psdEditTextureFile psdExport psdTextureFile putenv pwd python querySubdiv quit rad_to_deg radial radioButton radioButtonGrp radioCollection ra\
dioMenuItemCollection rampColorPort rand randomizeFollicles randstate rangeControl readTake rebuildCurve rebuildSurface recordAttr recordDevice redo reference referenceEdit referenceQuery refineSubdivSelectionList refresh refreshAE registerPluginResource rehash reloadImage removeJoint removeMultiInstance removePanelCategory rename renameAttr renameSelectionList renameUI render renderGlobalsNode renderInfo renderLayerButton renderLayerParent renderLayerPostProcess renderLayerUnparent renderManip \
renderPartition renderQualityNode renderSettings renderThumbnailUpdate renderWindowEditor renderWindowSelectContext renderer reorder reorderDeformers requires reroot resampleFluid resetAE resetPfxToPolyCamera resetTool resolutionNode retarget reverseCurve reverseSurface revolve rgb_to_hsv rigidBody rigidSolver roll rollCtx rootOf rot rotate rotationInterpolation roundConstantRadius rowColumnLayout rowLayout runTimeCommand runup sampleImage saveAllShelves saveAttrPreset saveFluid saveImage saveIn\
itialState saveMenu savePrefObjects savePrefs saveShelf saveToolSettings scale scaleBrushBrightness scaleComponents scaleConstraint scaleKey scaleKeyCtx sceneEditor sceneUIReplacement scmh scriptCtx scriptEditorInfo scriptJob scriptNode scriptTable scriptToShelf scriptedPanel scriptedPanelType scrollField scrollLayout sculpt searchPathArray seed selLoadSettings select selectContext selectCurveCV selectKey selectKeyCtx selectKeyframeRegionCtx selectMode selectPref selectPriority selectType select\
edNodes selectionConnection separator setAttr setAttrEnumResource setAttrMapping setAttrNiceNameResource setConstraintRestPosition setDefaultShadingGroup setDrivenKeyframe setDynamic setEditCtx setEditor setFluidAttr setFocus setInfinity setInputDeviceMapping setKeyCtx setKeyPath setKeyframe setKeyframeBlendshapeTargetWts setMenuMode setNodeNiceNameResource setNodeTypeFlag setParent setParticleAttr setPfxToPolyCamera setPluginResource setProject setStampDensity setStartupMessage setState setTool\
To setUITemplate setXformManip sets shadingConnection shadingGeometryRelCtx shadingLightRelCtx shadingNetworkCompare shadingNode shapeCompare shelfButton shelfLayout shelfTabLayout shellField shortNameOf showHelp showHidden showManipCtx showSelectionInTitle showShadingGroupAttrEditor showWindow sign simplify sin singleProfileBirailSurface size sizeBytes skinCluster skinPercent smoothCurve smoothTangentSurface smoothstep snap2to2 snapKey snapMode snapTogetherCtx snapshot soft softMod softModCtx s\
ort sound soundControl source spaceLocator sphere sphrand spotLight spotLightPreviewPort spreadSheetEditor spring sqrt squareSurface srtContext stackTrace startString startsWith stitchAndExplodeShell stitchSurface stitchSurfacePoints strcmp stringArrayCatenate stringArrayContains stringArrayCount stringArrayInsertAtIndex stringArrayIntersector stringArrayRemove stringArrayRemoveAtIndex stringArrayRemoveDuplicates stringArrayRemoveExact stringArrayToString stringToStringArray strip stripPrefixFro\
mName stroke subdAutoProjection subdCleanTopology subdCollapse subdDuplicateAndConnect subdEditUV subdListComponentConversion subdMapCut subdMapSewMove subdMatchTopology subdMirror subdToBlind subdToPoly subdTransferUVsToCache subdiv subdivCrease subdivDisplaySmoothness substitute substituteAllString substituteGeometry substring surface surfaceSampler surfaceShaderList swatchDisplayPort switchTable symbolButton symbolCheckBox sysFile system tabLayout tan tangentConstraint texLatticeDeformContext\
 texManipContext texMoveContext texMoveUVShellContext texRotateContext texScaleContext texSelectContext texSelectShortestPathCtx texSmudgeUVContext texWinToolCtx text textCurves textField textFieldButtonGrp textFieldGrp textManip textScrollList textToShelf textureDisplacePlane textureHairColor texturePlacementContext textureWindow threadCount threePointArcCtx timeControl timePort timerX toNativePath toggle toggleAxis toggleWindowVisibility tokenize tokenizeList tolerance tolower toolButton toolC\
ollection toolDropped toolHasOptions toolPropertyWindow torus toupper trace track trackCtx transferAttributes transformCompare transformLimits translator trim trunc truncateFluidCache truncateHairCache tumble tumbleCtx turbulence twoPointArcCtx uiRes uiTemplate unassignInputDevice undo undoInfo ungroup uniform unit unloadPlugin untangleUV untitledFileName untrim upAxis updateAE userCtx uvLink uvSnapshot validateShelfName vectorize view2dToolCtx viewCamera viewClipPlane viewFit viewHeadOn viewLoo\
kAt viewManip viewPlace viewSet visor volumeAxis vortex waitCursor warning webBrowser webBrowserPrefs whatIs window windowPref wire wireContext workspace wrinkle wrinkleContext writeTake xbmLangPathList xform",illegal:"</",contains:[hljs.C_NUMBER_MODE,hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,{className:"string",begin:"`",end:"`",contains:[hljs.BACKSLASH_ESCAPE]},{begin:/[$%@](\^\w\b|#\w+|[^\s\w{]|\{\w+\}|\w+)/},hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE]}}function mercury(hljs){const KEYWORDS2={
keyword:"module use_module import_module include_module end_module initialise mutable initialize finalize finalise interface implementation pred mode func type inst solver any_pred any_func is semidet det nondet multi erroneous failure cc_nondet cc_multi typeclass instance where pragma promise external trace atomic or_else require_complete_switch require_det require_semidet require_multi require_nondet require_cc_multi require_cc_nondet require_erroneous require_failure",meta:"inline no_inline t\
ype_spec source_file fact_table obsolete memo loop_check minimal_model terminates does_not_terminate check_termination promise_equivalent_clauses foreign_proc foreign_decl foreign_code foreign_type foreign_import_module foreign_export_enum foreign_export foreign_enum may_call_mercury will_not_call_mercury thread_safe not_thread_safe maybe_thread_safe promise_pure promise_semipure tabled_for_io local untrailed trailed attach_to_io_state can_pass_as_mercury_type stable will_not_throw_exception may\
_modify_trail will_not_modify_trail may_duplicate may_not_duplicate affects_liveness does_not_affect_liveness doesnt_affect_liveness no_sharing unknown_sharing sharing",built_in:"some all not if then else true fail false try catch catch_any semidet_true semidet_false semidet_fail impure_true impure semipure"},COMMENT=hljs.COMMENT("%","$"),NUMCODE={className:"number",begin:"0'.\\|0[box][0-9a-fA-F]*"},ATOM=hljs.inherit(hljs.APOS_STRING_MODE,{relevance:0}),STRING=hljs.inherit(hljs.QUOTE_STRING_MODE,
{relevance:0}),STRING_FMT={className:"subst",begin:"\\\\[abfnrtv]\\|\\\\x[0-9a-fA-F]*\\\\\\|%[-+# *.0-9]*[dioxXucsfeEgGp]",relevance:0};return STRING.contains=STRING.contains.slice(),STRING.contains.push(STRING_FMT),{name:"Mercury",aliases:["m","moo"],keywords:KEYWORDS2,contains:[{className:"built_in",variants:[{begin:"<=>"},{begin:"<=",relevance:0},{begin:"=>",relevance:0},{begin:"/\\\\"},{begin:"\\\\/"}]},{className:"built_in",variants:[{begin:":-\\|-->"},{begin:"=",relevance:0}]},COMMENT,hljs.
C_BLOCK_COMMENT_MODE,NUMCODE,hljs.NUMBER_MODE,ATOM,STRING,{begin:/:-/},{begin:/\.$/}]}}function mipsasm(hljs){return{name:"MIPS Assembly",case_insensitive:!0,aliases:["mips"],keywords:{$pattern:"\\.?"+hljs.IDENT_RE,meta:".2byte .4byte .align .ascii .asciz .balign .byte .code .data .else .end .endif .endm .endr .equ .err .exitm .extern .global .hword .if .ifdef .ifndef .include .irp .long .macro .rept .req .section .set .skip .space .text .word .ltorg ",built_in:"$0 $1 $2 $3 $4 $5 $6 $7 $8 $9 $10\
 $11 $12 $13 $14 $15 $16 $17 $18 $19 $20 $21 $22 $23 $24 $25 $26 $27 $28 $29 $30 $31 zero at v0 v1 a0 a1 a2 a3 a4 a5 a6 a7 t0 t1 t2 t3 t4 t5 t6 t7 t8 t9 s0 s1 s2 s3 s4 s5 s6 s7 s8 k0 k1 gp sp fp ra $f0 $f1 $f2 $f2 $f4 $f5 $f6 $f7 $f8 $f9 $f10 $f11 $f12 $f13 $f14 $f15 $f16 $f17 $f18 $f19 $f20 $f21 $f22 $f23 $f24 $f25 $f26 $f27 $f28 $f29 $f30 $f31 Context Random EntryLo0 EntryLo1 Context PageMask Wired EntryHi HWREna BadVAddr Count Compare SR IntCtl SRSCtl SRSMap Cause EPC PRId EBase Config Config\
1 Config2 Config3 LLAddr Debug DEPC DESAVE CacheErr ECC ErrorEPC TagLo DataLo TagHi DataHi WatchLo WatchHi PerfCtl PerfCnt "},contains:[{className:"keyword",begin:"\\b(addi?u?|andi?|b(al)?|beql?|bgez(al)?l?|bgtzl?|blezl?|bltz(al)?l?|bnel?|cl[oz]|divu?|ext|ins|j(al)?|jalr(\\.hb)?|jr(\\.hb)?|lbu?|lhu?|ll|lui|lw[lr]?|maddu?|mfhi|mflo|movn|movz|move|msubu?|mthi|mtlo|mul|multu?|nop|nor|ori?|rotrv?|sb|sc|se[bh]|sh|sllv?|slti?u?|srav?|srlv?|subu?|sw[lr]?|xori?|wsbh|abs\\.[sd]|add\\.[sd]|alnv.ps|bc1[ft]l?|c\\\
.(s?f|un|u?eq|[ou]lt|[ou]le|ngle?|seq|l[et]|ng[et])\\.[sd]|(ceil|floor|round|trunc)\\.[lw]\\.[sd]|cfc1|cvt\\.d\\.[lsw]|cvt\\.l\\.[dsw]|cvt\\.ps\\.s|cvt\\.s\\.[dlw]|cvt\\.s\\.p[lu]|cvt\\.w\\.[dls]|div\\.[ds]|ldx?c1|luxc1|lwx?c1|madd\\.[sd]|mfc1|mov[fntz]?\\.[ds]|msub\\.[sd]|mth?c1|mul\\.[ds]|neg\\.[ds]|nmadd\\.[ds]|nmsub\\.[ds]|p[lu][lu]\\.ps|recip\\.fmt|r?sqrt\\.[ds]|sdx?c1|sub\\.[ds]|suxc1|swx?c1|break|cache|d?eret|[de]i|ehb|mfc0|mtc0|pause|prefx?|rdhwr|rdpgpr|sdbbp|ssnop|synci?|syscall|teqi?|tgei?u?|tlb(p|r|w[ir])|tlti?\
u?|tnei?|wait|wrpgpr)",end:"\\s"},hljs.COMMENT("[;#](?!\\s*$)","$"),hljs.C_BLOCK_COMMENT_MODE,hljs.QUOTE_STRING_MODE,{className:"string",begin:"'",end:"[^\\\\]'",relevance:0},{className:"title",begin:"\\|",end:"\\|",illegal:"\\n",relevance:0},{className:"number",variants:[{begin:"0x[0-9a-f]+"},{begin:"\\b-?\\d+"}],relevance:0},{className:"symbol",variants:[{begin:"^\\s*[a-z_\\.\\$][a-z0-9_\\.\\$]+:"},{begin:"^\\s*[0-9]+:"},{begin:"[0-9]+[bf]"}],relevance:0}],illegal:/\//}}function mizar(hljs){return{
name:"Mizar",keywords:"environ vocabularies notations constructors definitions registrations theorems schemes requirements begin end definition registration cluster existence pred func defpred deffunc theorem proof let take assume then thus hence ex for st holds consider reconsider such that and in provided of as from be being by means equals implies iff redefine define now not or attr is mode suppose per cases set thesis contradiction scheme reserve struct correctness compatibility coherence sy\
mmetry assymetry reflexivity irreflexivity connectedness uniqueness commutativity idempotence involutiveness projectivity",contains:[hljs.COMMENT("::","$")]}}function mojolicious(hljs){return{name:"Mojolicious",subLanguage:"xml",contains:[{className:"meta",begin:"^__(END|DATA)__$"},{begin:"^\\s*%{1,2}={0,2}",end:"$",subLanguage:"perl"},{begin:"<%{1,2}={0,2}",end:"={0,1}%>",subLanguage:"perl",excludeBegin:!0,excludeEnd:!0}]}}function monkey(hljs){const NUMBER={className:"number",relevance:0,variants:[
{begin:"[$][a-fA-F0-9]+"},hljs.NUMBER_MODE]},FUNC_DEFINITION={variants:[{match:[/(function|method)/,/\s+/,hljs.UNDERSCORE_IDENT_RE]}],scope:{1:"keyword",3:"title.function"}},CLASS_DEFINITION={variants:[{match:[/(class|interface|extends|implements)/,/\s+/,hljs.UNDERSCORE_IDENT_RE]}],scope:{1:"keyword",3:"title.class"}};return{name:"Monkey",case_insensitive:!0,keywords:{keyword:["public","private","property","continue","exit","extern","new","try","catch","eachin","not","abstract","final","select",
"case","default","const","local","global","field","end","if","then","else","elseif","endif","while","wend","repeat","until","forever","for","to","step","next","return","module","inline","throw","import","and","or","shl","shr","mod"],built_in:["DebugLog","DebugStop","Error","Print","ACos","ACosr","ASin","ASinr","ATan","ATan2","ATan2r","ATanr","Abs","Abs","Ceil","Clamp","Clamp","Cos","Cosr","Exp","Floor","Log","Max","Max","Min","Min","Pow","Sgn","Sgn","Sin","Sinr","Sqrt","Tan","Tanr","Seed","PI","\
HALFPI","TWOPI"],literal:["true","false","null"]},illegal:/\/\*/,contains:[hljs.COMMENT("#rem","#end"),hljs.COMMENT("'","$",{relevance:0}),FUNC_DEFINITION,CLASS_DEFINITION,{className:"variable.language",begin:/\b(self|super)\b/},{className:"meta",begin:/\s*#/,end:"$",keywords:{keyword:"if else elseif endif end then"}},{match:[/^\s*/,/strict\b/],scope:{2:"meta"}},{beginKeywords:"alias",end:"=",contains:[hljs.UNDERSCORE_TITLE_MODE]},hljs.QUOTE_STRING_MODE,NUMBER]}}function moonscript(hljs){const KEYWORDS2={
keyword:"if then not for in while do return else elseif break continue switch and or unless when class extends super local import export from using",literal:"true false nil",built_in:"_G _VERSION assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall coroutine debug io math os package string table"},JS_IDENT_RE="[A-Za-z$_][0-9A-Za-z$_]*",SUBST={
className:"subst",begin:/#\{/,end:/\}/,keywords:KEYWORDS2},EXPRESSIONS=[hljs.inherit(hljs.C_NUMBER_MODE,{starts:{end:"(\\s*/)?",relevance:0}}),{className:"string",variants:[{begin:/'/,end:/'/,contains:[hljs.BACKSLASH_ESCAPE]},{begin:/"/,end:/"/,contains:[hljs.BACKSLASH_ESCAPE,SUBST]}]},{className:"built_in",begin:"@__"+hljs.IDENT_RE},{begin:"@"+hljs.IDENT_RE},{begin:hljs.IDENT_RE+"\\\\"+hljs.IDENT_RE}];SUBST.contains=EXPRESSIONS;const TITLE=hljs.inherit(hljs.TITLE_MODE,{begin:JS_IDENT_RE}),POSSIBLE_PARAMS_RE="\
(\\(.*\\)\\s*)?\\B[-=]>",PARAMS={className:"params",begin:"\\([^\\(]",returnBegin:!0,contains:[{begin:/\(/,end:/\)/,keywords:KEYWORDS2,contains:["self"].concat(EXPRESSIONS)}]};return{name:"MoonScript",aliases:["moon"],keywords:KEYWORDS2,illegal:/\/\*/,contains:EXPRESSIONS.concat([hljs.COMMENT("--","$"),{className:"function",begin:"^\\s*"+JS_IDENT_RE+"\\s*=\\s*"+POSSIBLE_PARAMS_RE,end:"[-=]>",returnBegin:!0,contains:[TITLE,PARAMS]},{begin:/[\(,:=]\s*/,relevance:0,contains:[{className:"function",begin:POSSIBLE_PARAMS_RE,
end:"[-=]>",returnBegin:!0,contains:[PARAMS]}]},{className:"class",beginKeywords:"class",end:"$",illegal:/[:="\[\]]/,contains:[{beginKeywords:"extends",endsWithParent:!0,illegal:/[:="\[\]]/,contains:[TITLE]},TITLE]},{className:"name",begin:JS_IDENT_RE+":",end:":",returnBegin:!0,returnEnd:!0,relevance:0}])}}function n1ql(hljs){return{name:"N1QL",case_insensitive:!0,contains:[{beginKeywords:"build create index delete drop explain infer|10 insert merge prepare select update upsert|10",end:/;/,keywords:{
keyword:["all","alter","analyze","and","any","array","as","asc","begin","between","binary","boolean","break","bucket","build","by","call","case","cast","cluster","collate","collection","commit","connect","continue","correlate","cover","create","database","dataset","datastore","declare","decrement","delete","derived","desc","describe","distinct","do","drop","each","element","else","end","every","except","exclude","execute","exists","explain","fetch","first","flatten","for","force","from","functio\
n","grant","group","gsi","having","if","ignore","ilike","in","include","increment","index","infer","inline","inner","insert","intersect","into","is","join","key","keys","keyspace","known","last","left","let","letting","like","limit","lsm","map","mapping","matched","materialized","merge","minus","namespace","nest","not","number","object","offset","on","option","or","order","outer","over","parse","partition","password","path","pool","prepare","primary","private","privilege","procedure","public","r\
aw","realm","reduce","rename","return","returning","revoke","right","role","rollback","satisfies","schema","select","self","semi","set","show","some","start","statistics","string","system","then","to","transaction","trigger","truncate","under","union","unique","unknown","unnest","unset","update","upsert","use","user","using","validate","value","valued","values","via","view","when","where","while","with","within","work","xor"],literal:["true","false","null","missing|5"],built_in:["array_agg","arr\
ay_append","array_concat","array_contains","array_count","array_distinct","array_ifnull","array_length","array_max","array_min","array_position","array_prepend","array_put","array_range","array_remove","array_repeat","array_replace","array_reverse","array_sort","array_sum","avg","count","max","min","sum","greatest","least","ifmissing","ifmissingornull","ifnull","missingif","nullif","ifinf","ifnan","ifnanorinf","naninf","neginfif","posinfif","clock_millis","clock_str","date_add_millis","date_add_\
str","date_diff_millis","date_diff_str","date_part_millis","date_part_str","date_trunc_millis","date_trunc_str","duration_to_str","millis","str_to_millis","millis_to_str","millis_to_utc","millis_to_zone_name","now_millis","now_str","str_to_duration","str_to_utc","str_to_zone_name","decode_json","encode_json","encoded_size","poly_length","base64","base64_encode","base64_decode","meta","uuid","abs","acos","asin","atan","atan2","ceil","cos","degrees","e","exp","ln","log","floor","pi","power","radia\
ns","random","round","sign","sin","sqrt","tan","trunc","object_length","object_names","object_pairs","object_inner_pairs","object_values","object_inner_values","object_add","object_put","object_remove","object_unwrap","regexp_contains","regexp_like","regexp_position","regexp_replace","contains","initcap","length","lower","ltrim","position","repeat","replace","rtrim","split","substr","title","trim","upper","isarray","isatom","isboolean","isnumber","isobject","isstring","type","toarray","toatom","\
toboolean","tonumber","toobject","tostring"]},contains:[{className:"string",begin:"'",end:"'",contains:[hljs.BACKSLASH_ESCAPE]},{className:"string",begin:'"',end:'"',contains:[hljs.BACKSLASH_ESCAPE]},{className:"symbol",begin:"`",end:"`",contains:[hljs.BACKSLASH_ESCAPE]},hljs.C_NUMBER_MODE,hljs.C_BLOCK_COMMENT_MODE]},hljs.C_BLOCK_COMMENT_MODE]}}function nestedtext(hljs){const NESTED={match:[/^\s*(?=\S)/,/[^:]+/,/:\s*/,/$/],className:{2:"attribute",3:"punctuation"}},DICTIONARY_ITEM={match:[/^\s*(?=\S)/,
/[^:]*[^: ]/,/[ ]*:/,/[ ]/,/.*$/],className:{2:"attribute",3:"punctuation",5:"string"}},STRING={match:[/^\s*/,/>/,/[ ]/,/.*$/],className:{2:"punctuation",4:"string"}},LIST_ITEM={variants:[{match:[/^\s*/,/-/,/[ ]/,/.*$/]},{match:[/^\s*/,/-$/]}],className:{2:"bullet",4:"string"}};return{name:"Nested Text",aliases:["nt"],contains:[hljs.inherit(hljs.HASH_COMMENT_MODE,{begin:/^\s*(?=#)/,excludeBegin:!0}),LIST_ITEM,STRING,NESTED,DICTIONARY_ITEM]}}function nginx(hljs){const regex=hljs.regex,VAR={className:"\
variable",variants:[{begin:/\$\d+/},{begin:/\$\{\w+\}/},{begin:regex.concat(/[$@]/,hljs.UNDERSCORE_IDENT_RE)}]},DEFAULT={endsWithParent:!0,keywords:{$pattern:/[a-z_]{2,}|\/dev\/poll/,literal:["on","off","yes","no","true","false","none","blocked","debug","info","notice","warn","error","crit","select","break","last","permanent","redirect","kqueue","rtsig","epoll","poll","/dev/poll"]},relevance:0,illegal:"=>",contains:[hljs.HASH_COMMENT_MODE,{className:"string",contains:[hljs.BACKSLASH_ESCAPE,VAR],
variants:[{begin:/"/,end:/"/},{begin:/'/,end:/'/}]},{begin:"([a-z]+):/",end:"\\s",endsWithParent:!0,excludeEnd:!0,contains:[VAR]},{className:"regexp",contains:[hljs.BACKSLASH_ESCAPE,VAR],variants:[{begin:"\\s\\^",end:"\\s|\\{|;",returnEnd:!0},{begin:"~\\*?\\s+",end:"\\s|\\{|;",returnEnd:!0},{begin:"\\*(\\.[a-z\\-]+)+"},{begin:"([a-z\\-]+\\.)+\\*"}]},{className:"number",begin:"\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b"},{className:"number",begin:"\\b\\d+[kKmMgGdshdwy]?\\b",relevance:0},
VAR]};return{name:"Nginx config",aliases:["nginxconf"],contains:[hljs.HASH_COMMENT_MODE,{beginKeywords:"upstream location",end:/;|\{/,contains:DEFAULT.contains,keywords:{section:"upstream location"}},{className:"section",begin:regex.concat(hljs.UNDERSCORE_IDENT_RE+regex.lookahead(/\s+\{/)),relevance:0},{begin:regex.lookahead(hljs.UNDERSCORE_IDENT_RE+"\\s"),end:";|\\{",contains:[{className:"attribute",begin:hljs.UNDERSCORE_IDENT_RE,starts:DEFAULT}],relevance:0}],illegal:"[^\\s\\}\\{]"}}function nim(hljs){
return{name:"Nim",keywords:{keyword:["addr","and","as","asm","bind","block","break","case","cast","concept","const","continue","converter","defer","discard","distinct","div","do","elif","else","end","enum","except","export","finally","for","from","func","generic","guarded","if","import","in","include","interface","is","isnot","iterator","let","macro","method","mixin","mod","nil","not","notin","object","of","or","out","proc","ptr","raise","ref","return","shared","shl","shr","static","template","t\
ry","tuple","type","using","var","when","while","with","without","xor","yield"],literal:["true","false"],type:["int","int8","int16","int32","int64","uint","uint8","uint16","uint32","uint64","float","float32","float64","bool","char","string","cstring","pointer","expr","stmt","void","auto","any","range","array","openarray","varargs","seq","set","clong","culong","cchar","cschar","cshort","cint","csize","clonglong","cfloat","cdouble","clongdouble","cuchar","cushort","cuint","culonglong","cstringarra\
y","semistatic"],built_in:["stdin","stdout","stderr","result"]},contains:[{className:"meta",begin:/\{\./,end:/\.\}/,relevance:10},{className:"string",begin:/[a-zA-Z]\w*"/,end:/"/,contains:[{begin:/""/}]},{className:"string",begin:/([a-zA-Z]\w*)?"""/,end:/"""/},hljs.QUOTE_STRING_MODE,{className:"type",begin:/\b[A-Z]\w+\b/,relevance:0},{className:"number",relevance:0,variants:[{begin:/\b(0[xX][0-9a-fA-F][_0-9a-fA-F]*)('?[iIuU](8|16|32|64))?/},{begin:/\b(0o[0-7][_0-7]*)('?[iIuUfF](8|16|32|64))?/},{
begin:/\b(0(b|B)[01][_01]*)('?[iIuUfF](8|16|32|64))?/},{begin:/\b(\d[_\d]*)('?[iIuUfF](8|16|32|64))?/}]},hljs.HASH_COMMENT_MODE]}}function nix(hljs){const regex=hljs.regex,KEYWORDS2={keyword:["assert","else","if","in","inherit","let","or","rec","then","with"],literal:["true","false","null"],built_in:["abort","baseNameOf","builtins","derivation","derivationStrict","dirOf","fetchGit","fetchMercurial","fetchTarball","fetchTree","fromTOML","import","isNull","map","placeholder","removeAttrs","scopedI\
mport","throw","toString"]},BUILTINS={scope:"built_in",match:regex.either(...["abort","add","addDrvOutputDependencies","addErrorContext","all","any","appendContext","attrNames","attrValues","baseNameOf","bitAnd","bitOr","bitXor","break","builtins","catAttrs","ceil","compareVersions","concatLists","concatMap","concatStringsSep","convertHash","currentSystem","currentTime","deepSeq","derivation","derivationStrict","dirOf","div","elem","elemAt","false","fetchGit","fetchMercurial","fetchTarball","fet\
chTree","fetchurl","filter","filterSource","findFile","flakeRefToString","floor","foldl'","fromJSON","fromTOML","functionArgs","genList","genericClosure","getAttr","getContext","getEnv","getFlake","groupBy","hasAttr","hasContext","hashFile","hashString","head","import","intersectAttrs","isAttrs","isBool","isFloat","isFunction","isInt","isList","isNull","isPath","isString","langVersion","length","lessThan","listToAttrs","map","mapAttrs","match","mul","nixPath","nixVersion","null","parseDrvName","\
parseFlakeRef","partition","path","pathExists","placeholder","readDir","readFile","readFileType","removeAttrs","replaceStrings","scopedImport","seq","sort","split","splitVersion","storeDir","storePath","stringLength","sub","substring","tail","throw","toFile","toJSON","toPath","toString","toXML","trace","traceVerbose","true","tryEval","typeOf","unsafeDiscardOutputDependency","unsafeDiscardStringContext","unsafeGetAttrPos","warn","zipAttrsWith"].map(b=>`builtins\\.${b}`)),relevance:10},IDENTIFIER_REGEX="\
[A-Za-z_][A-Za-z0-9_'-]*",LOOKUP_PATH={scope:"symbol",match:new RegExp(`<${IDENTIFIER_REGEX}(/${IDENTIFIER_REGEX})*>`)},PATH_PIECE="[A-Za-z0-9_\\+\\.-]+",PATH={scope:"symbol",match:new RegExp(`(\\.\\.|\\.|~)?/(${PATH_PIECE})?(/${PATH_PIECE})*(?=[\\s;])`)},OPERATOR_WITHOUT_MINUS_REGEX=regex.either("==","=","\\+\\+","\\+","<=","<\\|","<",">=",">","->","//","/","!=","!","\\|\\|","\\|>","\\?","\\*","&&"),OPERATOR={scope:"operator",match:regex.concat(OPERATOR_WITHOUT_MINUS_REGEX,/(?!-)/),relevance:0},
NUMBER={scope:"number",match:new RegExp(`${hljs.NUMBER_RE}(?!-)`),relevance:0},MINUS_OPERATOR={variants:[{scope:"operator",beforeMatch:/\s/,begin:/-(?!>)/},{begin:[new RegExp(`${hljs.NUMBER_RE}`),/-/,/(?!>)/],beginScope:{1:"number",2:"operator"}},{begin:[OPERATOR_WITHOUT_MINUS_REGEX,/-/,/(?!>)/],beginScope:{1:"operator",2:"operator"}}],relevance:0},ATTRS={beforeMatch:/(^|\{|;)\s*/,begin:new RegExp(`${IDENTIFIER_REGEX}(\\.${IDENTIFIER_REGEX})*\\s*=(?!=)`),returnBegin:!0,relevance:0,contains:[{scope:"\
attr",match:new RegExp(`${IDENTIFIER_REGEX}(\\.${IDENTIFIER_REGEX})*(?=\\s*=)`),relevance:.2}]},NORMAL_ESCAPED_DOLLAR={scope:"char.escape",match:/\\\$/},INDENTED_ESCAPED_DOLLAR={scope:"char.escape",match:/''\$/},ANTIQUOTE={scope:"subst",begin:/\$\{/,end:/\}/,keywords:KEYWORDS2},ESCAPED_DOUBLEQUOTE={scope:"char.escape",match:/'''/},ESCAPED_LITERAL={scope:"char.escape",match:/\\(?!\$)./},STRING={scope:"string",variants:[{begin:"''",end:"''",contains:[INDENTED_ESCAPED_DOLLAR,ANTIQUOTE,ESCAPED_DOUBLEQUOTE,
ESCAPED_LITERAL]},{begin:'"',end:'"',contains:[NORMAL_ESCAPED_DOLLAR,ANTIQUOTE,ESCAPED_LITERAL]}]},FUNCTION_PARAMS={scope:"params",match:new RegExp(`${IDENTIFIER_REGEX}\\s*:(?=\\s)`)},EXPRESSIONS=[NUMBER,hljs.HASH_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.COMMENT(/\/\*\*(?!\/)/,/\*\//,{subLanguage:"markdown",relevance:0}),BUILTINS,STRING,LOOKUP_PATH,PATH,FUNCTION_PARAMS,ATTRS,MINUS_OPERATOR,OPERATOR];ANTIQUOTE.contains=EXPRESSIONS;const REPL=[{scope:"meta.prompt",match:/^nix-repl>(?=\s)/,relevance:10},
{scope:"meta",beforeMatch:/\s+/,begin:/:([a-z]+|\?)/}];return{name:"Nix",aliases:["nixos"],keywords:KEYWORDS2,contains:EXPRESSIONS.concat(REPL)}}function nodeRepl(hljs){return{name:"Node REPL",contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"javascript"}},variants:[{begin:/^>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function nsis(hljs){const regex=hljs.regex,LANGUAGE_CONSTANTS=["ADMINTOOLS","APPDATA","CDBURN_AREA","CMDLINE","COMMONFILES32","COMMONFILES64","COMMO\
NFILES","COOKIES","DESKTOP","DOCUMENTS","EXEDIR","EXEFILE","EXEPATH","FAVORITES","FONTS","HISTORY","HWNDPARENT","INSTDIR","INTERNET_CACHE","LANGUAGE","LOCALAPPDATA","MUSIC","NETHOOD","OUTDIR","PICTURES","PLUGINSDIR","PRINTHOOD","PROFILE","PROGRAMFILES32","PROGRAMFILES64","PROGRAMFILES","QUICKLAUNCH","RECENT","RESOURCES_LOCALIZED","RESOURCES","SENDTO","SMPROGRAMS","SMSTARTUP","STARTMENU","SYSDIR","TEMP","TEMPLATES","VIDEOS","WINDIR"],PARAM_NAMES=["ARCHIVE","FILE_ATTRIBUTE_ARCHIVE","FILE_ATTRIBUTE\
_NORMAL","FILE_ATTRIBUTE_OFFLINE","FILE_ATTRIBUTE_READONLY","FILE_ATTRIBUTE_SYSTEM","FILE_ATTRIBUTE_TEMPORARY","HKCR","HKCU","HKDD","HKEY_CLASSES_ROOT","HKEY_CURRENT_CONFIG","HKEY_CURRENT_USER","HKEY_DYN_DATA","HKEY_LOCAL_MACHINE","HKEY_PERFORMANCE_DATA","HKEY_USERS","HKLM","HKPD","HKU","IDABORT","IDCANCEL","IDIGNORE","IDNO","IDOK","IDRETRY","IDYES","MB_ABORTRETRYIGNORE","MB_DEFBUTTON1","MB_DEFBUTTON2","MB_DEFBUTTON3","MB_DEFBUTTON4","MB_ICONEXCLAMATION","MB_ICONINFORMATION","MB_ICONQUESTION","M\
B_ICONSTOP","MB_OK","MB_OKCANCEL","MB_RETRYCANCEL","MB_RIGHT","MB_RTLREADING","MB_SETFOREGROUND","MB_TOPMOST","MB_USERICON","MB_YESNO","NORMAL","OFFLINE","READONLY","SHCTX","SHELL_CONTEXT","SYSTEM|TEMPORARY"],COMPILER_FLAGS=["addincludedir","addplugindir","appendfile","assert","cd","define","delfile","echo","else","endif","error","execute","finalize","getdllversion","gettlbversion","if","ifdef","ifmacrodef","ifmacrondef","ifndef","include","insertmacro","macro","macroend","makensis","packhdr","s\
earchparse","searchreplace","system","tempfile","undef","uninstfinalize","verbose","warning"],CONSTANTS={className:"variable.constant",begin:regex.concat(/\$/,regex.either(...LANGUAGE_CONSTANTS))},DEFINES={className:"variable",begin:/\$+\{[\!\w.:-]+\}/},VARIABLES={className:"variable",begin:/\$+\w[\w\.]*/,illegal:/\(\)\{\}/},LANGUAGES={className:"variable",begin:/\$+\([\w^.:!-]+\)/},PARAMETERS={className:"params",begin:regex.either(...PARAM_NAMES)},COMPILER={className:"keyword",begin:regex.concat(
/!/,regex.either(...COMPILER_FLAGS))},ESCAPE_CHARS={className:"char.escape",begin:/\$(\\[nrt]|\$)/},PLUGINS={className:"title.function",begin:/\w+::\w+/},STRING={className:"string",variants:[{begin:'"',end:'"'},{begin:"'",end:"'"},{begin:"`",end:"`"}],illegal:/\n/,contains:[ESCAPE_CHARS,CONSTANTS,DEFINES,VARIABLES,LANGUAGES]},KEYWORDS2=["Abort","AddBrandingImage","AddSize","AllowRootDirInstall","AllowSkipFiles","AutoCloseWindow","BGFont","BGGradient","BrandingText","BringToFront","Call","CallIns\
tDLL","Caption","ChangeUI","CheckBitmap","ClearErrors","CompletedText","ComponentText","CopyFiles","CRCCheck","CreateDirectory","CreateFont","CreateShortCut","Delete","DeleteINISec","DeleteINIStr","DeleteRegKey","DeleteRegValue","DetailPrint","DetailsButtonText","DirText","DirVar","DirVerify","EnableWindow","EnumRegKey","EnumRegValue","Exch","Exec","ExecShell","ExecShellWait","ExecWait","ExpandEnvStrings","File","FileBufSize","FileClose","FileErrorText","FileOpen","FileRead","FileReadByte","File\
ReadUTF16LE","FileReadWord","FileWriteUTF16LE","FileSeek","FileWrite","FileWriteByte","FileWriteWord","FindClose","FindFirst","FindNext","FindWindow","FlushINI","GetCurInstType","GetCurrentAddress","GetDlgItem","GetDLLVersion","GetDLLVersionLocal","GetErrorLevel","GetFileTime","GetFileTimeLocal","GetFullPathName","GetFunctionAddress","GetInstDirError","GetKnownFolderPath","GetLabelAddress","GetTempFileName","GetWinVer","Goto","HideWindow","Icon","IfAbort","IfErrors","IfFileExists","IfRebootFlag",
"IfRtlLanguage","IfShellVarContextAll","IfSilent","InitPluginsDir","InstallButtonText","InstallColors","InstallDir","InstallDirRegKey","InstProgressFlags","InstType","InstTypeGetText","InstTypeSetText","Int64Cmp","Int64CmpU","Int64Fmt","IntCmp","IntCmpU","IntFmt","IntOp","IntPtrCmp","IntPtrCmpU","IntPtrOp","IsWindow","LangString","LicenseBkColor","LicenseData","LicenseForceSelection","LicenseLangString","LicenseText","LoadAndSetImage","LoadLanguageFile","LockWindow","LogSet","LogText","ManifestD\
PIAware","ManifestLongPathAware","ManifestMaxVersionTested","ManifestSupportedOS","MessageBox","MiscButtonText","Name|0","Nop","OutFile","Page","PageCallbacks","PEAddResource","PEDllCharacteristics","PERemoveResource","PESubsysVer","Pop","Push","Quit","ReadEnvStr","ReadINIStr","ReadRegDWORD","ReadRegStr","Reboot","RegDLL","Rename","RequestExecutionLevel","ReserveFile","Return","RMDir","SearchPath","SectionGetFlags","SectionGetInstTypes","SectionGetSize","SectionGetText","SectionIn","SectionSetFl\
ags","SectionSetInstTypes","SectionSetSize","SectionSetText","SendMessage","SetAutoClose","SetBrandingImage","SetCompress","SetCompressor","SetCompressorDictSize","SetCtlColors","SetCurInstType","SetDatablockOptimize","SetDateSave","SetDetailsPrint","SetDetailsView","SetErrorLevel","SetErrors","SetFileAttributes","SetFont","SetOutPath","SetOverwrite","SetRebootFlag","SetRegView","SetShellVarContext","SetSilent","ShowInstDetails","ShowUninstDetails","ShowWindow","SilentInstall","SilentUnInstall",
"Sleep","SpaceTexts","StrCmp","StrCmpS","StrCpy","StrLen","SubCaption","Unicode","UninstallButtonText","UninstallCaption","UninstallIcon","UninstallSubCaption","UninstallText","UninstPage","UnRegDLL","Var","VIAddVersionKey","VIFileVersion","VIProductVersion","WindowIcon","WriteINIStr","WriteRegBin","WriteRegDWORD","WriteRegExpandStr","WriteRegMultiStr","WriteRegNone","WriteRegStr","WriteUninstaller","XPStyle"],LITERALS2=["admin","all","auto","both","bottom","bzip2","colored","components","curren\
t","custom","directory","false","force","hide","highest","ifdiff","ifnewer","instfiles","lastused","leave","left","license","listonly","lzma","nevershow","none","normal","notset","off","on","open","print","right","show","silent","silentlog","smooth","textonly","top","true","try","un.components","un.custom","un.directory","un.instfiles","un.license","uninstConfirm","user","Win10","Win7","Win8","WinVista","zlib"],FUNCTION_DEFINITION={match:[/Function/,/\s+/,regex.concat(/(\.)?/,hljs.IDENT_RE)],scope:{
1:"keyword",3:"title.function"}},VARIABLE_DEFINITION={match:[/Var/,/\s+/,/(?:\/GLOBAL\s+)?/,/[A-Za-z][\w.]*/],scope:{1:"keyword",3:"params",4:"variable"}};return{name:"NSIS",case_insensitive:!0,keywords:{keyword:KEYWORDS2,literal:LITERALS2},contains:[hljs.HASH_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.COMMENT(";","$",{relevance:0}),VARIABLE_DEFINITION,FUNCTION_DEFINITION,{beginKeywords:"Function PageEx Section SectionGroup FunctionEnd SectionEnd"},STRING,COMPILER,DEFINES,VARIABLES,LANGUAGES,PARAMETERS,
PLUGINS,hljs.NUMBER_MODE]}}function ocaml(hljs){return{name:"OCaml",aliases:["ml"],keywords:{$pattern:"[a-z_]\\w*!?",keyword:"and as assert asr begin class constraint do done downto else end exception external for fun function functor if in include inherit! inherit initializer land lazy let lor lsl lsr lxor match method!|10 method mod module mutable new object of open! open or private rec sig struct then to try type val! val virtual when while with parser value",built_in:"array bool bytes char e\
xn|5 float int int32 int64 list lazy_t|5 nativeint|5 string unit in_channel out_channel ref",literal:"true false"},illegal:/\/\/|>>/,contains:[{className:"literal",begin:"\\[(\\|\\|)?\\]|\\(\\)",relevance:0},hljs.COMMENT("\\(\\*","\\*\\)",{contains:["self"]}),{className:"symbol",begin:"'[A-Za-z_](?!')[\\w']*"},{className:"type",begin:"`[A-Z][\\w']*"},{className:"type",begin:"\\b[A-Z][\\w']*",relevance:0},{begin:"[a-z_]\\w*'[\\w']*",relevance:0},hljs.inherit(hljs.APOS_STRING_MODE,{className:"stri\
ng",relevance:0}),hljs.inherit(hljs.QUOTE_STRING_MODE,{illegal:null}),{className:"number",begin:"\\b(0[xX][a-fA-F0-9_]+[Lln]?|0[oO][0-7_]+[Lln]?|0[bB][01_]+[Lln]?|[0-9][0-9_]*([Lln]|(\\.[0-9_]*)?([eE][-+]?[0-9_]+)?)?)",relevance:0},{begin:/->/}]}}function openscad(hljs){const SPECIAL_VARS={className:"keyword",begin:"\\$(f[asn]|t|vp[rtd]|children)"},LITERALS2={className:"literal",begin:"false|true|PI|undef"},NUMBERS={className:"number",begin:"\\b\\d+(\\.\\d+)?(e-?\\d+)?",relevance:0},STRING=hljs.
inherit(hljs.QUOTE_STRING_MODE,{illegal:null}),PREPRO={className:"meta",keywords:{keyword:"include use"},begin:"include|use <",end:">"},PARAMS={className:"params",begin:"\\(",end:"\\)",contains:["self",NUMBERS,STRING,SPECIAL_VARS,LITERALS2]},MODIFIERS={begin:"[*!#%]",relevance:0},FUNCTIONS={className:"function",beginKeywords:"module function",end:/=|\{/,contains:[PARAMS,hljs.UNDERSCORE_TITLE_MODE]};return{name:"OpenSCAD",aliases:["scad"],keywords:{keyword:"function module include use for interse\
ction_for if else \\%",literal:"false true PI undef",built_in:"circle square polygon text sphere cube cylinder polyhedron translate rotate scale resize mirror multmatrix color offset hull minkowski union difference intersection abs sign sin cos tan acos asin atan atan2 floor round ceil ln log pow sqrt exp rands min max concat lookup str chr search version version_num norm cross parent_module echo import import_dxf dxf_linear_extrude linear_extrude rotate_extrude surface projection render childre\
n dxf_cross dxf_dim let assign"},contains:[hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,NUMBERS,PREPRO,STRING,SPECIAL_VARS,MODIFIERS,FUNCTIONS]}}function oxygene(hljs){const OXYGENE_KEYWORDS={$pattern:/\.?\w+/,keyword:"abstract add and array as asc aspect assembly async begin break block by case class concat const copy constructor continue create default delegate desc distinct div do downto dynamic each else empty end ensure enum equals event except exit extension external false final fina\
lize finalizer finally flags for forward from function future global group has if implementation implements implies in index inherited inline interface into invariants is iterator join locked locking loop matching method mod module namespace nested new nil not notify nullable of old on operator or order out override parallel params partial pinned private procedure property protected public queryable raise read readonly record reintroduce remove repeat require result reverse sealed select self se\
quence set shl shr skip static step soft take then to true try tuple type union unit unsafe until uses using var virtual raises volatile where while with write xor yield await mapped deprecated stdcall cdecl pascal register safecall overload library platform reference packed strict published autoreleasepool selector strong weak unretained"},CURLY_COMMENT=hljs.COMMENT(/\{/,/\}/,{relevance:0}),PAREN_COMMENT=hljs.COMMENT("\\(\\*","\\*\\)",{relevance:10}),STRING={className:"string",begin:"'",end:"'",
contains:[{begin:"''"}]},CHAR_STRING={className:"string",begin:"(#\\d+)+"},FUNCTION={beginKeywords:"function constructor destructor procedure method",end:"[:;]",keywords:"function constructor|10 destructor|10 procedure|10 method|10",contains:[hljs.inherit(hljs.TITLE_MODE,{scope:"title.function"}),{className:"params",begin:"\\(",end:"\\)",keywords:OXYGENE_KEYWORDS,contains:[STRING,CHAR_STRING]},CURLY_COMMENT,PAREN_COMMENT]},SEMICOLON={scope:"punctuation",match:/;/,relevance:0};return{name:"Oxygen\
e",case_insensitive:!0,keywords:OXYGENE_KEYWORDS,illegal:'("|\\$[G-Zg-z]|\\/\\*|</|=>|->)',contains:[CURLY_COMMENT,PAREN_COMMENT,hljs.C_LINE_COMMENT_MODE,STRING,CHAR_STRING,hljs.NUMBER_MODE,FUNCTION,SEMICOLON]}}function parser3(hljs){const CURLY_SUBCOMMENT=hljs.COMMENT(/\{/,/\}/,{contains:["self"]});return{name:"Parser3",subLanguage:"xml",relevance:0,contains:[hljs.COMMENT("^#","$"),hljs.COMMENT(/\^rem\{/,/\}/,{relevance:10,contains:[CURLY_SUBCOMMENT]}),{className:"meta",begin:"^@(?:BASE|USE|CLA\
SS|OPTIONS)$",relevance:10},{className:"title",begin:"@[\\w\\-]+\\[[\\w^;\\-]*\\](?:\\[[\\w^;\\-]*\\])?(?:.*)$"},{className:"variable",begin:/\$\{?[\w\-.:]+\}?/},{className:"keyword",begin:/\^[\w\-.:]+/},{className:"number",begin:"\\^#[0-9a-fA-F]+"},hljs.C_NUMBER_MODE]}}function pf(hljs){const MACRO={className:"variable",begin:/\$[\w\d#@][\w\d_]*/,relevance:0},TABLE={className:"variable",begin:/<(?!\/)/,end:/>/};return{name:"Packet Filter config",aliases:["pf.conf"],keywords:{$pattern:/[a-z0-9_<>-]+/,
built_in:"block match pass load anchor|5 antispoof|10 set table",keyword:"in out log quick on rdomain inet inet6 proto from port os to route allow-opts divert-packet divert-reply divert-to flags group icmp-type icmp6-type label once probability recieved-on rtable prio queue tos tag tagged user keep fragment for os drop af-to|10 binat-to|10 nat-to|10 rdr-to|10 bitmask least-stats random round-robin source-hash static-port dup-to reply-to route-to parent bandwidth default min max qlimit block-poli\
cy debug fingerprints hostid limit loginterface optimization reassemble ruleset-optimization basic none profile skip state-defaults state-policy timeout const counters persist no modulate synproxy state|5 floating if-bound no-sync pflow|10 sloppy source-track global rule max-src-nodes max-src-states max-src-conn max-src-conn-rate overload flush scrub|5 max-mss min-ttl no-df|10 random-id",literal:"all any no-route self urpf-failed egress|5 unknown"},contains:[hljs.HASH_COMMENT_MODE,hljs.NUMBER_MODE,
hljs.QUOTE_STRING_MODE,MACRO,TABLE]}}function pgsql(hljs){const COMMENT_MODE=hljs.COMMENT("--","$"),UNQUOTED_IDENT="[a-zA-Z_][a-zA-Z_0-9$]*",DOLLAR_STRING="\\$([a-zA-Z_]?|[a-zA-Z_][a-zA-Z_0-9]*)\\$",LABEL="<<\\s*"+UNQUOTED_IDENT+"\\s*>>",SQL_KW="ABORT ALTER ANALYZE BEGIN CALL CHECKPOINT|10 CLOSE CLUSTER COMMENT COMMIT COPY CREATE DEALLOCATE DECLARE DELETE DISCARD DO DROP END EXECUTE EXPLAIN FETCH GRANT IMPORT INSERT LISTEN LOAD LOCK MOVE NOTIFY PREPARE REASSIGN|10 REFRESH REINDEX RELEASE RESET R\
EVOKE ROLLBACK SAVEPOINT SECURITY SELECT SET SHOW START TRUNCATE UNLISTEN|10 UPDATE VACUUM|10 VALUES AGGREGATE COLLATION CONVERSION|10 DATABASE DEFAULT PRIVILEGES DOMAIN TRIGGER EXTENSION FOREIGN WRAPPER|10 TABLE FUNCTION GROUP LANGUAGE LARGE OBJECT MATERIALIZED VIEW OPERATOR CLASS FAMILY POLICY PUBLICATION|10 ROLE RULE SCHEMA SEQUENCE SERVER STATISTICS SUBSCRIPTION SYSTEM TABLESPACE CONFIGURATION DICTIONARY PARSER TEMPLATE TYPE USER MAPPING PREPARED ACCESS METHOD CAST AS TRANSFORM TRANSACTION O\
WNED TO INTO SESSION AUTHORIZATION INDEX PROCEDURE ASSERTION ALL ANALYSE AND ANY ARRAY ASC ASYMMETRIC|10 BOTH CASE CHECK COLLATE COLUMN CONCURRENTLY|10 CONSTRAINT CROSS DEFERRABLE RANGE DESC DISTINCT ELSE EXCEPT FOR FREEZE|10 FROM FULL HAVING ILIKE IN INITIALLY INNER INTERSECT IS ISNULL JOIN LATERAL LEADING LIKE LIMIT NATURAL NOT NOTNULL NULL OFFSET ON ONLY OR ORDER OUTER OVERLAPS PLACING PRIMARY REFERENCES RETURNING SIMILAR SOME SYMMETRIC TABLESAMPLE THEN TRAILING UNION UNIQUE USING VARIADIC|10\
 VERBOSE WHEN WHERE WINDOW WITH BY RETURNS INOUT OUT SETOF|10 IF STRICT CURRENT CONTINUE OWNER LOCATION OVER PARTITION WITHIN BETWEEN ESCAPE EXTERNAL INVOKER DEFINER WORK RENAME VERSION CONNECTION CONNECT TABLES TEMP TEMPORARY FUNCTIONS SEQUENCES TYPES SCHEMAS OPTION CASCADE RESTRICT ADD ADMIN EXISTS VALID VALIDATE ENABLE DISABLE REPLICA|10 ALWAYS PASSING COLUMNS PATH REF VALUE OVERRIDING IMMUTABLE STABLE VOLATILE BEFORE AFTER EACH ROW PROCEDURAL ROUTINE NO HANDLER VALIDATOR OPTIONS STORAGE OIDS\
|10 WITHOUT INHERIT DEPENDS CALLED INPUT LEAKPROOF|10 COST ROWS NOWAIT SEARCH UNTIL ENCRYPTED|10 PASSWORD CONFLICT|10 INSTEAD INHERITS CHARACTERISTICS WRITE CURSOR ALSO STATEMENT SHARE EXCLUSIVE INLINE ISOLATION REPEATABLE READ COMMITTED SERIALIZABLE UNCOMMITTED LOCAL GLOBAL SQL PROCEDURES RECURSIVE SNAPSHOT ROLLUP CUBE TRUSTED|10 INCLUDE FOLLOWING PRECEDING UNBOUNDED RANGE GROUPS UNENCRYPTED|10 SYSID FORMAT DELIMITER HEADER QUOTE ENCODING FILTER OFF FORCE_QUOTE FORCE_NOT_NULL FORCE_NULL COSTS B\
UFFERS TIMING SUMMARY DISABLE_PAGE_SKIPPING RESTART CYCLE GENERATED IDENTITY DEFERRED IMMEDIATE LEVEL LOGGED UNLOGGED OF NOTHING NONE EXCLUDE ATTRIBUTE USAGE ROUTINES TRUE FALSE NAN INFINITY ",ROLE_ATTRS="SUPERUSER NOSUPERUSER CREATEDB NOCREATEDB CREATEROLE NOCREATEROLE INHERIT NOINHERIT LOGIN NOLOGIN REPLICATION NOREPLICATION BYPASSRLS NOBYPASSRLS ",PLPGSQL_KW="ALIAS BEGIN CONSTANT DECLARE END EXCEPTION RETURN PERFORM|10 RAISE GET DIAGNOSTICS STACKED|10 FOREACH LOOP ELSIF EXIT WHILE REVERSE SLI\
CE DEBUG LOG INFO NOTICE WARNING ASSERT OPEN ",TYPES2="BIGINT INT8 BIGSERIAL SERIAL8 BIT VARYING VARBIT BOOLEAN BOOL BOX BYTEA CHARACTER CHAR VARCHAR CIDR CIRCLE DATE DOUBLE PRECISION FLOAT8 FLOAT INET INTEGER INT INT4 INTERVAL JSON JSONB LINE LSEG|10 MACADDR MACADDR8 MONEY NUMERIC DEC DECIMAL PATH POINT POLYGON REAL FLOAT4 SMALLINT INT2 SMALLSERIAL|10 SERIAL2|10 SERIAL|10 SERIAL4|10 TEXT TIME ZONE TIMETZ|10 TIMESTAMP TIMESTAMPTZ|10 TSQUERY|10 TSVECTOR|10 TXID_SNAPSHOT|10 UUID XML NATIONAL NCHAR\
 INT4RANGE|10 INT8RANGE|10 NUMRANGE|10 TSRANGE|10 TSTZRANGE|10 DATERANGE|10 ANYELEMENT ANYARRAY ANYNONARRAY ANYENUM ANYRANGE CSTRING INTERNAL RECORD PG_DDL_COMMAND VOID UNKNOWN OPAQUE REFCURSOR NAME OID REGPROC|10 REGPROCEDURE|10 REGOPER|10 REGOPERATOR|10 REGCLASS|10 REGTYPE|10 REGROLE|10 REGNAMESPACE|10 REGCONFIG|10 REGDICTIONARY|10 ",TYPES_RE=TYPES2.trim().split(" ").map(function(val){return val.split("|")[0]}).join("|"),SQL_BI="CURRENT_TIME CURRENT_TIMESTAMP CURRENT_USER CURRENT_CATALOG|10 CU\
RRENT_DATE LOCALTIME LOCALTIMESTAMP CURRENT_ROLE|10 CURRENT_SCHEMA|10 SESSION_USER PUBLIC ",PLPGSQL_BI="FOUND NEW OLD TG_NAME|10 TG_WHEN|10 TG_LEVEL|10 TG_OP|10 TG_RELID|10 TG_RELNAME|10 TG_TABLE_NAME|10 TG_TABLE_SCHEMA|10 TG_NARGS|10 TG_ARGV|10 TG_EVENT|10 TG_TAG|10 ROW_COUNT RESULT_OID|10 PG_CONTEXT|10 RETURNED_SQLSTATE COLUMN_NAME CONSTRAINT_NAME PG_DATATYPE_NAME|10 MESSAGE_TEXT TABLE_NAME SCHEMA_NAME PG_EXCEPTION_DETAIL|10 PG_EXCEPTION_HINT|10 PG_EXCEPTION_CONTEXT|10 ",PLPGSQL_EXCEPTIONS="SQ\
LSTATE SQLERRM|10 SUCCESSFUL_COMPLETION WARNING DYNAMIC_RESULT_SETS_RETURNED IMPLICIT_ZERO_BIT_PADDING NULL_VALUE_ELIMINATED_IN_SET_FUNCTION PRIVILEGE_NOT_GRANTED PRIVILEGE_NOT_REVOKED STRING_DATA_RIGHT_TRUNCATION DEPRECATED_FEATURE NO_DATA NO_ADDITIONAL_DYNAMIC_RESULT_SETS_RETURNED SQL_STATEMENT_NOT_YET_COMPLETE CONNECTION_EXCEPTION CONNECTION_DOES_NOT_EXIST CONNECTION_FAILURE SQLCLIENT_UNABLE_TO_ESTABLISH_SQLCONNECTION SQLSERVER_REJECTED_ESTABLISHMENT_OF_SQLCONNECTION TRANSACTION_RESOLUTION_UN\
KNOWN PROTOCOL_VIOLATION TRIGGERED_ACTION_EXCEPTION FEATURE_NOT_SUPPORTED INVALID_TRANSACTION_INITIATION LOCATOR_EXCEPTION INVALID_LOCATOR_SPECIFICATION INVALID_GRANTOR INVALID_GRANT_OPERATION INVALID_ROLE_SPECIFICATION DIAGNOSTICS_EXCEPTION STACKED_DIAGNOSTICS_ACCESSED_WITHOUT_ACTIVE_HANDLER CASE_NOT_FOUND CARDINALITY_VIOLATION DATA_EXCEPTION ARRAY_SUBSCRIPT_ERROR CHARACTER_NOT_IN_REPERTOIRE DATETIME_FIELD_OVERFLOW DIVISION_BY_ZERO ERROR_IN_ASSIGNMENT ESCAPE_CHARACTER_CONFLICT INDICATOR_OVERFLO\
W INTERVAL_FIELD_OVERFLOW INVALID_ARGUMENT_FOR_LOGARITHM INVALID_ARGUMENT_FOR_NTILE_FUNCTION INVALID_ARGUMENT_FOR_NTH_VALUE_FUNCTION INVALID_ARGUMENT_FOR_POWER_FUNCTION INVALID_ARGUMENT_FOR_WIDTH_BUCKET_FUNCTION INVALID_CHARACTER_VALUE_FOR_CAST INVALID_DATETIME_FORMAT INVALID_ESCAPE_CHARACTER INVALID_ESCAPE_OCTET INVALID_ESCAPE_SEQUENCE NONSTANDARD_USE_OF_ESCAPE_CHARACTER INVALID_INDICATOR_PARAMETER_VALUE INVALID_PARAMETER_VALUE INVALID_REGULAR_EXPRESSION INVALID_ROW_COUNT_IN_LIMIT_CLAUSE INVALI\
D_ROW_COUNT_IN_RESULT_OFFSET_CLAUSE INVALID_TABLESAMPLE_ARGUMENT INVALID_TABLESAMPLE_REPEAT INVALID_TIME_ZONE_DISPLACEMENT_VALUE INVALID_USE_OF_ESCAPE_CHARACTER MOST_SPECIFIC_TYPE_MISMATCH NULL_VALUE_NOT_ALLOWED NULL_VALUE_NO_INDICATOR_PARAMETER NUMERIC_VALUE_OUT_OF_RANGE SEQUENCE_GENERATOR_LIMIT_EXCEEDED STRING_DATA_LENGTH_MISMATCH STRING_DATA_RIGHT_TRUNCATION SUBSTRING_ERROR TRIM_ERROR UNTERMINATED_C_STRING ZERO_LENGTH_CHARACTER_STRING FLOATING_POINT_EXCEPTION INVALID_TEXT_REPRESENTATION INVAL\
ID_BINARY_REPRESENTATION BAD_COPY_FILE_FORMAT UNTRANSLATABLE_CHARACTER NOT_AN_XML_DOCUMENT INVALID_XML_DOCUMENT INVALID_XML_CONTENT INVALID_XML_COMMENT INVALID_XML_PROCESSING_INSTRUCTION INTEGRITY_CONSTRAINT_VIOLATION RESTRICT_VIOLATION NOT_NULL_VIOLATION FOREIGN_KEY_VIOLATION UNIQUE_VIOLATION CHECK_VIOLATION EXCLUSION_VIOLATION INVALID_CURSOR_STATE INVALID_TRANSACTION_STATE ACTIVE_SQL_TRANSACTION BRANCH_TRANSACTION_ALREADY_ACTIVE HELD_CURSOR_REQUIRES_SAME_ISOLATION_LEVEL INAPPROPRIATE_ACCESS_MO\
DE_FOR_BRANCH_TRANSACTION INAPPROPRIATE_ISOLATION_LEVEL_FOR_BRANCH_TRANSACTION NO_ACTIVE_SQL_TRANSACTION_FOR_BRANCH_TRANSACTION READ_ONLY_SQL_TRANSACTION SCHEMA_AND_DATA_STATEMENT_MIXING_NOT_SUPPORTED NO_ACTIVE_SQL_TRANSACTION IN_FAILED_SQL_TRANSACTION IDLE_IN_TRANSACTION_SESSION_TIMEOUT INVALID_SQL_STATEMENT_NAME TRIGGERED_DATA_CHANGE_VIOLATION INVALID_AUTHORIZATION_SPECIFICATION INVALID_PASSWORD DEPENDENT_PRIVILEGE_DESCRIPTORS_STILL_EXIST DEPENDENT_OBJECTS_STILL_EXIST INVALID_TRANSACTION_TERMI\
NATION SQL_ROUTINE_EXCEPTION FUNCTION_EXECUTED_NO_RETURN_STATEMENT MODIFYING_SQL_DATA_NOT_PERMITTED PROHIBITED_SQL_STATEMENT_ATTEMPTED READING_SQL_DATA_NOT_PERMITTED INVALID_CURSOR_NAME EXTERNAL_ROUTINE_EXCEPTION CONTAINING_SQL_NOT_PERMITTED MODIFYING_SQL_DATA_NOT_PERMITTED PROHIBITED_SQL_STATEMENT_ATTEMPTED READING_SQL_DATA_NOT_PERMITTED EXTERNAL_ROUTINE_INVOCATION_EXCEPTION INVALID_SQLSTATE_RETURNED NULL_VALUE_NOT_ALLOWED TRIGGER_PROTOCOL_VIOLATED SRF_PROTOCOL_VIOLATED EVENT_TRIGGER_PROTOCOL_V\
IOLATED SAVEPOINT_EXCEPTION INVALID_SAVEPOINT_SPECIFICATION INVALID_CATALOG_NAME INVALID_SCHEMA_NAME TRANSACTION_ROLLBACK TRANSACTION_INTEGRITY_CONSTRAINT_VIOLATION SERIALIZATION_FAILURE STATEMENT_COMPLETION_UNKNOWN DEADLOCK_DETECTED SYNTAX_ERROR_OR_ACCESS_RULE_VIOLATION SYNTAX_ERROR INSUFFICIENT_PRIVILEGE CANNOT_COERCE GROUPING_ERROR WINDOWING_ERROR INVALID_RECURSION INVALID_FOREIGN_KEY INVALID_NAME NAME_TOO_LONG RESERVED_NAME DATATYPE_MISMATCH INDETERMINATE_DATATYPE COLLATION_MISMATCH INDETERM\
INATE_COLLATION WRONG_OBJECT_TYPE GENERATED_ALWAYS UNDEFINED_COLUMN UNDEFINED_FUNCTION UNDEFINED_TABLE UNDEFINED_PARAMETER UNDEFINED_OBJECT DUPLICATE_COLUMN DUPLICATE_CURSOR DUPLICATE_DATABASE DUPLICATE_FUNCTION DUPLICATE_PREPARED_STATEMENT DUPLICATE_SCHEMA DUPLICATE_TABLE DUPLICATE_ALIAS DUPLICATE_OBJECT AMBIGUOUS_COLUMN AMBIGUOUS_FUNCTION AMBIGUOUS_PARAMETER AMBIGUOUS_ALIAS INVALID_COLUMN_REFERENCE INVALID_COLUMN_DEFINITION INVALID_CURSOR_DEFINITION INVALID_DATABASE_DEFINITION INVALID_FUNCTION\
_DEFINITION INVALID_PREPARED_STATEMENT_DEFINITION INVALID_SCHEMA_DEFINITION INVALID_TABLE_DEFINITION INVALID_OBJECT_DEFINITION WITH_CHECK_OPTION_VIOLATION INSUFFICIENT_RESOURCES DISK_FULL OUT_OF_MEMORY TOO_MANY_CONNECTIONS CONFIGURATION_LIMIT_EXCEEDED PROGRAM_LIMIT_EXCEEDED STATEMENT_TOO_COMPLEX TOO_MANY_COLUMNS TOO_MANY_ARGUMENTS OBJECT_NOT_IN_PREREQUISITE_STATE OBJECT_IN_USE CANT_CHANGE_RUNTIME_PARAM LOCK_NOT_AVAILABLE OPERATOR_INTERVENTION QUERY_CANCELED ADMIN_SHUTDOWN CRASH_SHUTDOWN CANNOT_C\
ONNECT_NOW DATABASE_DROPPED SYSTEM_ERROR IO_ERROR UNDEFINED_FILE DUPLICATE_FILE SNAPSHOT_TOO_OLD CONFIG_FILE_ERROR LOCK_FILE_EXISTS FDW_ERROR FDW_COLUMN_NAME_NOT_FOUND FDW_DYNAMIC_PARAMETER_VALUE_NEEDED FDW_FUNCTION_SEQUENCE_ERROR FDW_INCONSISTENT_DESCRIPTOR_INFORMATION FDW_INVALID_ATTRIBUTE_VALUE FDW_INVALID_COLUMN_NAME FDW_INVALID_COLUMN_NUMBER FDW_INVALID_DATA_TYPE FDW_INVALID_DATA_TYPE_DESCRIPTORS FDW_INVALID_DESCRIPTOR_FIELD_IDENTIFIER FDW_INVALID_HANDLE FDW_INVALID_OPTION_INDEX FDW_INVALID\
_OPTION_NAME FDW_INVALID_STRING_LENGTH_OR_BUFFER_LENGTH FDW_INVALID_STRING_FORMAT FDW_INVALID_USE_OF_NULL_POINTER FDW_TOO_MANY_HANDLES FDW_OUT_OF_MEMORY FDW_NO_SCHEMAS FDW_OPTION_NAME_NOT_FOUND FDW_REPLY_HANDLE FDW_SCHEMA_NOT_FOUND FDW_TABLE_NOT_FOUND FDW_UNABLE_TO_CREATE_EXECUTION FDW_UNABLE_TO_CREATE_REPLY FDW_UNABLE_TO_ESTABLISH_CONNECTION PLPGSQL_ERROR RAISE_EXCEPTION NO_DATA_FOUND TOO_MANY_ROWS ASSERT_FAILURE INTERNAL_ERROR DATA_CORRUPTED INDEX_CORRUPTED ",FUNCTIONS_RE="ARRAY_AGG AVG BIT_AN\
D BIT_OR BOOL_AND BOOL_OR COUNT EVERY JSON_AGG JSONB_AGG JSON_OBJECT_AGG JSONB_OBJECT_AGG MAX MIN MODE STRING_AGG SUM XMLAGG CORR COVAR_POP COVAR_SAMP REGR_AVGX REGR_AVGY REGR_COUNT REGR_INTERCEPT REGR_R2 REGR_SLOPE REGR_SXX REGR_SXY REGR_SYY STDDEV STDDEV_POP STDDEV_SAMP VARIANCE VAR_POP VAR_SAMP PERCENTILE_CONT PERCENTILE_DISC ROW_NUMBER RANK DENSE_RANK PERCENT_RANK CUME_DIST NTILE LAG LEAD FIRST_VALUE LAST_VALUE NTH_VALUE NUM_NONNULLS NUM_NULLS ABS CBRT CEIL CEILING DEGREES DIV EXP FLOOR LN L\
OG MOD PI POWER RADIANS ROUND SCALE SIGN SQRT TRUNC WIDTH_BUCKET RANDOM SETSEED ACOS ACOSD ASIN ASIND ATAN ATAND ATAN2 ATAN2D COS COSD COT COTD SIN SIND TAN TAND BIT_LENGTH CHAR_LENGTH CHARACTER_LENGTH LOWER OCTET_LENGTH OVERLAY POSITION SUBSTRING TREAT TRIM UPPER ASCII BTRIM CHR CONCAT CONCAT_WS CONVERT CONVERT_FROM CONVERT_TO DECODE ENCODE INITCAP LEFT LENGTH LPAD LTRIM MD5 PARSE_IDENT PG_CLIENT_ENCODING QUOTE_IDENT|10 QUOTE_LITERAL|10 QUOTE_NULLABLE|10 REGEXP_MATCH REGEXP_MATCHES REGEXP_REPLA\
CE REGEXP_SPLIT_TO_ARRAY REGEXP_SPLIT_TO_TABLE REPEAT REPLACE REVERSE RIGHT RPAD RTRIM SPLIT_PART STRPOS SUBSTR TO_ASCII TO_HEX TRANSLATE OCTET_LENGTH GET_BIT GET_BYTE SET_BIT SET_BYTE TO_CHAR TO_DATE TO_NUMBER TO_TIMESTAMP AGE CLOCK_TIMESTAMP|10 DATE_PART DATE_TRUNC ISFINITE JUSTIFY_DAYS JUSTIFY_HOURS JUSTIFY_INTERVAL MAKE_DATE MAKE_INTERVAL|10 MAKE_TIME MAKE_TIMESTAMP|10 MAKE_TIMESTAMPTZ|10 NOW STATEMENT_TIMESTAMP|10 TIMEOFDAY TRANSACTION_TIMESTAMP|10 ENUM_FIRST ENUM_LAST ENUM_RANGE AREA CENTE\
R DIAMETER HEIGHT ISCLOSED ISOPEN NPOINTS PCLOSE POPEN RADIUS WIDTH BOX BOUND_BOX CIRCLE LINE LSEG PATH POLYGON ABBREV BROADCAST HOST HOSTMASK MASKLEN NETMASK NETWORK SET_MASKLEN TEXT INET_SAME_FAMILY INET_MERGE MACADDR8_SET7BIT ARRAY_TO_TSVECTOR GET_CURRENT_TS_CONFIG NUMNODE PLAINTO_TSQUERY PHRASETO_TSQUERY WEBSEARCH_TO_TSQUERY QUERYTREE SETWEIGHT STRIP TO_TSQUERY TO_TSVECTOR JSON_TO_TSVECTOR JSONB_TO_TSVECTOR TS_DELETE TS_FILTER TS_HEADLINE TS_RANK TS_RANK_CD TS_REWRITE TSQUERY_PHRASE TSVECTOR\
_TO_ARRAY TSVECTOR_UPDATE_TRIGGER TSVECTOR_UPDATE_TRIGGER_COLUMN XMLCOMMENT XMLCONCAT XMLELEMENT XMLFOREST XMLPI XMLROOT XMLEXISTS XML_IS_WELL_FORMED XML_IS_WELL_FORMED_DOCUMENT XML_IS_WELL_FORMED_CONTENT XPATH XPATH_EXISTS XMLTABLE XMLNAMESPACES TABLE_TO_XML TABLE_TO_XMLSCHEMA TABLE_TO_XML_AND_XMLSCHEMA QUERY_TO_XML QUERY_TO_XMLSCHEMA QUERY_TO_XML_AND_XMLSCHEMA CURSOR_TO_XML CURSOR_TO_XMLSCHEMA SCHEMA_TO_XML SCHEMA_TO_XMLSCHEMA SCHEMA_TO_XML_AND_XMLSCHEMA DATABASE_TO_XML DATABASE_TO_XMLSCHEMA D\
ATABASE_TO_XML_AND_XMLSCHEMA XMLATTRIBUTES TO_JSON TO_JSONB ARRAY_TO_JSON ROW_TO_JSON JSON_BUILD_ARRAY JSONB_BUILD_ARRAY JSON_BUILD_OBJECT JSONB_BUILD_OBJECT JSON_OBJECT JSONB_OBJECT JSON_ARRAY_LENGTH JSONB_ARRAY_LENGTH JSON_EACH JSONB_EACH JSON_EACH_TEXT JSONB_EACH_TEXT JSON_EXTRACT_PATH JSONB_EXTRACT_PATH JSON_OBJECT_KEYS JSONB_OBJECT_KEYS JSON_POPULATE_RECORD JSONB_POPULATE_RECORD JSON_POPULATE_RECORDSET JSONB_POPULATE_RECORDSET JSON_ARRAY_ELEMENTS JSONB_ARRAY_ELEMENTS JSON_ARRAY_ELEMENTS_TEX\
T JSONB_ARRAY_ELEMENTS_TEXT JSON_TYPEOF JSONB_TYPEOF JSON_TO_RECORD JSONB_TO_RECORD JSON_TO_RECORDSET JSONB_TO_RECORDSET JSON_STRIP_NULLS JSONB_STRIP_NULLS JSONB_SET JSONB_INSERT JSONB_PRETTY CURRVAL LASTVAL NEXTVAL SETVAL COALESCE NULLIF GREATEST LEAST ARRAY_APPEND ARRAY_CAT ARRAY_NDIMS ARRAY_DIMS ARRAY_FILL ARRAY_LENGTH ARRAY_LOWER ARRAY_POSITION ARRAY_POSITIONS ARRAY_PREPEND ARRAY_REMOVE ARRAY_REPLACE ARRAY_TO_STRING ARRAY_UPPER CARDINALITY STRING_TO_ARRAY UNNEST ISEMPTY LOWER_INC UPPER_INC L\
OWER_INF UPPER_INF RANGE_MERGE GENERATE_SERIES GENERATE_SUBSCRIPTS CURRENT_DATABASE CURRENT_QUERY CURRENT_SCHEMA|10 CURRENT_SCHEMAS|10 INET_CLIENT_ADDR INET_CLIENT_PORT INET_SERVER_ADDR INET_SERVER_PORT ROW_SECURITY_ACTIVE FORMAT_TYPE TO_REGCLASS TO_REGPROC TO_REGPROCEDURE TO_REGOPER TO_REGOPERATOR TO_REGTYPE TO_REGNAMESPACE TO_REGROLE COL_DESCRIPTION OBJ_DESCRIPTION SHOBJ_DESCRIPTION TXID_CURRENT TXID_CURRENT_IF_ASSIGNED TXID_CURRENT_SNAPSHOT TXID_SNAPSHOT_XIP TXID_SNAPSHOT_XMAX TXID_SNAPSHOT_X\
MIN TXID_VISIBLE_IN_SNAPSHOT TXID_STATUS CURRENT_SETTING SET_CONFIG BRIN_SUMMARIZE_NEW_VALUES BRIN_SUMMARIZE_RANGE BRIN_DESUMMARIZE_RANGE GIN_CLEAN_PENDING_LIST SUPPRESS_REDUNDANT_UPDATES_TRIGGER LO_FROM_BYTEA LO_PUT LO_GET LO_CREAT LO_CREATE LO_UNLINK LO_IMPORT LO_EXPORT LOREAD LOWRITE GROUPING CAST ".trim().split(" ").map(function(val){return val.split("|")[0]}).join("|");return{name:"PostgreSQL",aliases:["postgres","postgresql"],supersetOf:"sql",case_insensitive:!0,keywords:{keyword:SQL_KW+PLPGSQL_KW+
ROLE_ATTRS,built_in:SQL_BI+PLPGSQL_BI+PLPGSQL_EXCEPTIONS},illegal:/:==|\W\s*\(\*|(^|\s)\$[a-z]|\{\{|[a-z]:\s*$|\.\.\.|TO:|DO:/,contains:[{className:"keyword",variants:[{begin:/\bTEXT\s*SEARCH\b/},{begin:/\b(PRIMARY|FOREIGN|FOR(\s+NO)?)\s+KEY\b/},{begin:/\bPARALLEL\s+(UNSAFE|RESTRICTED|SAFE)\b/},{begin:/\bSTORAGE\s+(PLAIN|EXTERNAL|EXTENDED|MAIN)\b/},{begin:/\bMATCH\s+(FULL|PARTIAL|SIMPLE)\b/},{begin:/\bNULLS\s+(FIRST|LAST)\b/},{begin:/\bEVENT\s+TRIGGER\b/},{begin:/\b(MAPPING|OR)\s+REPLACE\b/},{begin:/\b(FROM|TO)\s+(PROGRAM|STDIN|STDOUT)\b/},
{begin:/\b(SHARE|EXCLUSIVE)\s+MODE\b/},{begin:/\b(LEFT|RIGHT)\s+(OUTER\s+)?JOIN\b/},{begin:/\b(FETCH|MOVE)\s+(NEXT|PRIOR|FIRST|LAST|ABSOLUTE|RELATIVE|FORWARD|BACKWARD)\b/},{begin:/\bPRESERVE\s+ROWS\b/},{begin:/\bDISCARD\s+PLANS\b/},{begin:/\bREFERENCING\s+(OLD|NEW)\b/},{begin:/\bSKIP\s+LOCKED\b/},{begin:/\bGROUPING\s+SETS\b/},{begin:/\b(BINARY|INSENSITIVE|SCROLL|NO\s+SCROLL)\s+(CURSOR|FOR)\b/},{begin:/\b(WITH|WITHOUT)\s+HOLD\b/},{begin:/\bWITH\s+(CASCADED|LOCAL)\s+CHECK\s+OPTION\b/},{begin:/\bEXCLUDE\s+(TIES|NO\s+OTHERS)\b/},
{begin:/\bFORMAT\s+(TEXT|XML|JSON|YAML)\b/},{begin:/\bSET\s+((SESSION|LOCAL)\s+)?NAMES\b/},{begin:/\bIS\s+(NOT\s+)?UNKNOWN\b/},{begin:/\bSECURITY\s+LABEL\b/},{begin:/\bSTANDALONE\s+(YES|NO|NO\s+VALUE)\b/},{begin:/\bWITH\s+(NO\s+)?DATA\b/},{begin:/\b(FOREIGN|SET)\s+DATA\b/},{begin:/\bSET\s+(CATALOG|CONSTRAINTS)\b/},{begin:/\b(WITH|FOR)\s+ORDINALITY\b/},{begin:/\bIS\s+(NOT\s+)?DOCUMENT\b/},{begin:/\bXML\s+OPTION\s+(DOCUMENT|CONTENT)\b/},{begin:/\b(STRIP|PRESERVE)\s+WHITESPACE\b/},{begin:/\bNO\s+(ACTION|MAXVALUE|MINVALUE)\b/},
{begin:/\bPARTITION\s+BY\s+(RANGE|LIST|HASH)\b/},{begin:/\bAT\s+TIME\s+ZONE\b/},{begin:/\bGRANTED\s+BY\b/},{begin:/\bRETURN\s+(QUERY|NEXT)\b/},{begin:/\b(ATTACH|DETACH)\s+PARTITION\b/},{begin:/\bFORCE\s+ROW\s+LEVEL\s+SECURITY\b/},{begin:/\b(INCLUDING|EXCLUDING)\s+(COMMENTS|CONSTRAINTS|DEFAULTS|IDENTITY|INDEXES|STATISTICS|STORAGE|ALL)\b/},{begin:/\bAS\s+(ASSIGNMENT|IMPLICIT|PERMISSIVE|RESTRICTIVE|ENUM|RANGE)\b/}]},{begin:/\b(FORMAT|FAMILY|VERSION)\s*\(/},{begin:/\bINCLUDE\s*\(/,keywords:"INCLUDE"},
{begin:/\bRANGE(?!\s*(BETWEEN|UNBOUNDED|CURRENT|[-0-9]+))/},{begin:/\b(VERSION|OWNER|TEMPLATE|TABLESPACE|CONNECTION\s+LIMIT|PROCEDURE|RESTRICT|JOIN|PARSER|COPY|START|END|COLLATION|INPUT|ANALYZE|STORAGE|LIKE|DEFAULT|DELIMITER|ENCODING|COLUMN|CONSTRAINT|TABLE|SCHEMA)\s*=/},{begin:/\b(PG_\w+?|HAS_[A-Z_]+_PRIVILEGE)\b/,relevance:10},{begin:/\bEXTRACT\s*\(/,end:/\bFROM\b/,returnEnd:!0,keywords:{type:"CENTURY DAY DECADE DOW DOY EPOCH HOUR ISODOW ISOYEAR MICROSECONDS MILLENNIUM MILLISECONDS MINUTE MONT\
H QUARTER SECOND TIMEZONE TIMEZONE_HOUR TIMEZONE_MINUTE WEEK YEAR"}},{begin:/\b(XMLELEMENT|XMLPI)\s*\(\s*NAME/,keywords:{keyword:"NAME"}},{begin:/\b(XMLPARSE|XMLSERIALIZE)\s*\(\s*(DOCUMENT|CONTENT)/,keywords:{keyword:"DOCUMENT CONTENT"}},{beginKeywords:"CACHE INCREMENT MAXVALUE MINVALUE",end:hljs.C_NUMBER_RE,returnEnd:!0,keywords:"BY CACHE INCREMENT MAXVALUE MINVALUE"},{className:"type",begin:/\b(WITH|WITHOUT)\s+TIME\s+ZONE\b/},{className:"type",begin:/\bINTERVAL\s+(YEAR|MONTH|DAY|HOUR|MINUTE|SECOND)(\s+TO\s+(MONTH|HOUR|MINUTE|SECOND))?\b/},
{begin:/\bRETURNS\s+(LANGUAGE_HANDLER|TRIGGER|EVENT_TRIGGER|FDW_HANDLER|INDEX_AM_HANDLER|TSM_HANDLER)\b/,keywords:{keyword:"RETURNS",type:"LANGUAGE_HANDLER TRIGGER EVENT_TRIGGER FDW_HANDLER INDEX_AM_HANDLER TSM_HANDLER"}},{begin:"\\b("+FUNCTIONS_RE+")\\s*\\("},{begin:"\\.("+TYPES_RE+")\\b"},{begin:"\\b("+TYPES_RE+")\\s+PATH\\b",keywords:{keyword:"PATH",type:TYPES2.replace("PATH ","")}},{className:"type",begin:"\\b("+TYPES_RE+")\\b"},{className:"string",begin:"'",end:"'",contains:[{begin:"''"}]},
{className:"string",begin:"(e|E|u&|U&)'",end:"'",contains:[{begin:"\\\\."}],relevance:10},hljs.END_SAME_AS_BEGIN({begin:DOLLAR_STRING,end:DOLLAR_STRING,contains:[{subLanguage:["pgsql","perl","python","tcl","r","lua","java","php","ruby","bash","scheme","xml","json"],endsWithParent:!0}]}),{begin:'"',end:'"',contains:[{begin:'""'}]},hljs.C_NUMBER_MODE,hljs.C_BLOCK_COMMENT_MODE,COMMENT_MODE,{className:"meta",variants:[{begin:"%(ROW)?TYPE",relevance:10},{begin:"\\$\\d+"},{begin:"^#\\w",end:"$"}]},{className:"\
symbol",begin:LABEL,relevance:10}]}}function pony(hljs){const KEYWORDS2={keyword:"actor addressof and as be break class compile_error compile_intrinsic consume continue delegate digestof do else elseif embed end error for fun if ifdef in interface is isnt lambda let match new not object or primitive recover repeat return struct then trait try type until use var where while with xor",meta:"iso val tag trn box ref",literal:"this false true"},TRIPLE_QUOTE_STRING_MODE={className:"string",begin:'"""',
end:'"""',relevance:10},QUOTE_STRING_MODE={className:"string",begin:'"',end:'"',contains:[hljs.BACKSLASH_ESCAPE]},SINGLE_QUOTE_CHAR_MODE={className:"string",begin:"'",end:"'",contains:[hljs.BACKSLASH_ESCAPE],relevance:0},TYPE_NAME={className:"type",begin:"\\b_?[A-Z][\\w]*",relevance:0},PRIMED_NAME={begin:hljs.IDENT_RE+"'",relevance:0};return{name:"Pony",keywords:KEYWORDS2,contains:[TYPE_NAME,TRIPLE_QUOTE_STRING_MODE,QUOTE_STRING_MODE,SINGLE_QUOTE_CHAR_MODE,PRIMED_NAME,{className:"number",begin:"\
(-?)(\\b0[xX][a-fA-F0-9]+|\\b0[bB][01]+|(\\b\\d+(_\\d+)?(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",relevance:0},hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE]}}function powershell(hljs){const TYPES2=["string","char","byte","int","long","bool","decimal","single","double","DateTime","xml","array","hashtable","void"],VALID_VERBS="Add|Clear|Close|Copy|Enter|Exit|Find|Format|Get|Hide|Join|Lock|Move|New|Open|Optimize|Pop|Push|Redo|Remove|Rename|Reset|Resize|Search|Select|Set|Show|Skip|Split|Step|Switc\
h|Undo|Unlock|Watch|Backup|Checkpoint|Compare|Compress|Convert|ConvertFrom|ConvertTo|Dismount|Edit|Expand|Export|Group|Import|Initialize|Limit|Merge|Mount|Out|Publish|Restore|Save|Sync|Unpublish|Update|Approve|Assert|Build|Complete|Confirm|Deny|Deploy|Disable|Enable|Install|Invoke|Register|Request|Restart|Resume|Start|Stop|Submit|Suspend|Uninstall|Unregister|Wait|Debug|Measure|Ping|Repair|Resolve|Test|Trace|Connect|Disconnect|Read|Receive|Send|Write|Block|Grant|Protect|Revoke|Unblock|Unprotect|U\
se|ForEach|Sort|Tee|Where",COMPARISON_OPERATORS="-and|-as|-band|-bnot|-bor|-bxor|-casesensitive|-ccontains|-ceq|-cge|-cgt|-cle|-clike|-clt|-cmatch|-cne|-cnotcontains|-cnotlike|-cnotmatch|-contains|-creplace|-csplit|-eq|-exact|-f|-file|-ge|-gt|-icontains|-ieq|-ige|-igt|-ile|-ilike|-ilt|-imatch|-in|-ine|-inotcontains|-inotlike|-inotmatch|-ireplace|-is|-isnot|-isplit|-join|-le|-like|-lt|-match|-ne|-not|-notcontains|-notin|-notlike|-notmatch|-or|-regex|-replace|-shl|-shr|-split|-wildcard|-xor",KEYWORDS2={
$pattern:/-?[A-z\.\-]+\b/,keyword:"if else foreach return do while until elseif begin for trap data dynamicparam end break throw param continue finally in switch exit filter try process catch hidden static parameter",built_in:"ac asnp cat cd CFS chdir clc clear clhy cli clp cls clv cnsn compare copy cp cpi cpp curl cvpa dbp del diff dir dnsn ebp echo|0 epal epcsv epsn erase etsn exsn fc fhx fl ft fw gal gbp gc gcb gci gcm gcs gdr gerr ghy gi gin gjb gl gm gmo gp gps gpv group gsn gsnp gsv gtz gu\
 gv gwmi h history icm iex ihy ii ipal ipcsv ipmo ipsn irm ise iwmi iwr kill lp ls man md measure mi mount move mp mv nal ndr ni nmo npssc nsn nv ogv oh popd ps pushd pwd r rbp rcjb rcsn rd rdr ren ri rjb rm rmdir rmo rni rnp rp rsn rsnp rujb rv rvpa rwmi sajb sal saps sasv sbp sc scb select set shcm si sl sleep sls sort sp spjb spps spsv start stz sujb sv swmi tee trcm type wget where wjb write"},TITLE_NAME_RE=/\w[\w\d]*((-)[\w\d]+)*/,BACKTICK_ESCAPE={begin:"`[\\s\\S]",relevance:0},VAR={className:"\
variable",variants:[{begin:/\$\B/},{className:"keyword",begin:/\$this/},{begin:/\$[\w\d][\w\d_:]*/}]},LITERAL={className:"literal",begin:/\$(null|true|false)\b/},QUOTE_STRING={className:"string",variants:[{begin:/"/,end:/"/},{begin:/@"/,end:/^"@/}],contains:[BACKTICK_ESCAPE,VAR,{className:"variable",begin:/\$[A-z]/,end:/[^A-z]/}]},APOS_STRING={className:"string",variants:[{begin:/'/,end:/'/},{begin:/@'/,end:/^'@/}]},PS_HELPTAGS={className:"doctag",variants:[{begin:/\.(synopsis|description|example|inputs|outputs|notes|link|component|role|functionality)/},
{begin:/\.(parameter|forwardhelptargetname|forwardhelpcategory|remotehelprunspace|externalhelp)\s+\S+/}]},PS_COMMENT=hljs.inherit(hljs.COMMENT(null,null),{variants:[{begin:/#/,end:/$/},{begin:/<#/,end:/#>/}],contains:[PS_HELPTAGS]}),CMDLETS={className:"built_in",variants:[{begin:"(".concat(VALID_VERBS,")+(-)[\\w\\d]+")}]},PS_CLASS={className:"class",beginKeywords:"class enum",end:/\s*[{]/,excludeEnd:!0,relevance:0,contains:[hljs.TITLE_MODE]},PS_FUNCTION={className:"function",begin:/function\s+/,
end:/\s*\{|$/,excludeEnd:!0,returnBegin:!0,relevance:0,contains:[{begin:"function",relevance:0,className:"keyword"},{className:"title",begin:TITLE_NAME_RE,relevance:0},{begin:/\(/,end:/\)/,className:"params",relevance:0,contains:[VAR]}]},PS_USING={begin:/using\s/,end:/$/,returnBegin:!0,contains:[QUOTE_STRING,APOS_STRING,{className:"keyword",begin:/(using|assembly|command|module|namespace|type)/}]},PS_ARGUMENTS={variants:[{className:"operator",begin:"(".concat(COMPARISON_OPERATORS,")\\b")},{className:"\
literal",begin:/(-){1,2}[\w\d-]+/,relevance:0}]},HASH_SIGNS={className:"selector-tag",begin:/@\B/,relevance:0},PS_METHODS={className:"function",begin:/\[.*\]\s*[\w]+[ ]??\(/,end:/$/,returnBegin:!0,relevance:0,contains:[{className:"keyword",begin:"(".concat(KEYWORDS2.keyword.toString().replace(/\s/g,"|"),")\\b"),endsParent:!0,relevance:0},hljs.inherit(hljs.TITLE_MODE,{endsParent:!0})]},GENTLEMANS_SET=[PS_METHODS,PS_COMMENT,BACKTICK_ESCAPE,hljs.NUMBER_MODE,QUOTE_STRING,APOS_STRING,CMDLETS,VAR,LITERAL,
HASH_SIGNS],PS_TYPE={begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0,relevance:0,contains:[].concat("self",GENTLEMANS_SET,{begin:"("+TYPES2.join("|")+")",className:"built_in",relevance:0},{className:"type",begin:/[\.\w\d]+/,relevance:0})};return PS_METHODS.contains.unshift(PS_TYPE),{name:"PowerShell",aliases:["pwsh","ps","ps1"],case_insensitive:!0,keywords:KEYWORDS2,contains:GENTLEMANS_SET.concat(PS_CLASS,PS_FUNCTION,PS_USING,PS_ARGUMENTS,PS_TYPE)}}function processing(hljs){const regex=hljs.regex,
BUILT_INS2=["displayHeight","displayWidth","mouseY","mouseX","mousePressed","pmouseX","pmouseY","key","keyCode","pixels","focused","frameCount","frameRate","height","width","size","createGraphics","beginDraw","createShape","loadShape","PShape","arc","ellipse","line","point","quad","rect","triangle","bezier","bezierDetail","bezierPoint","bezierTangent","curve","curveDetail","curvePoint","curveTangent","curveTightness","shape","shapeMode","beginContour","beginShape","bezierVertex","curveVertex","e\
ndContour","endShape","quadraticVertex","vertex","ellipseMode","noSmooth","rectMode","smooth","strokeCap","strokeJoin","strokeWeight","mouseClicked","mouseDragged","mouseMoved","mousePressed","mouseReleased","mouseWheel","keyPressed","keyPressedkeyReleased","keyTyped","print","println","save","saveFrame","day","hour","millis","minute","month","second","year","background","clear","colorMode","fill","noFill","noStroke","stroke","alpha","blue","brightness","color","green","hue","lerpColor","red","s\
aturation","modelX","modelY","modelZ","screenX","screenY","screenZ","ambient","emissive","shininess","specular","add","createImage","beginCamera","camera","endCamera","frustum","ortho","perspective","printCamera","printProjection","cursor","frameRate","noCursor","exit","loop","noLoop","popStyle","pushStyle","redraw","binary","boolean","byte","char","float","hex","int","str","unbinary","unhex","join","match","matchAll","nf","nfc","nfp","nfs","split","splitTokens","trim","append","arrayCopy","conc\
at","expand","reverse","shorten","sort","splice","subset","box","sphere","sphereDetail","createInput","createReader","loadBytes","loadJSONArray","loadJSONObject","loadStrings","loadTable","loadXML","open","parseXML","saveTable","selectFolder","selectInput","beginRaw","beginRecord","createOutput","createWriter","endRaw","endRecord","PrintWritersaveBytes","saveJSONArray","saveJSONObject","saveStream","saveStrings","saveXML","selectOutput","popMatrix","printMatrix","pushMatrix","resetMatrix","rotat\
e","rotateX","rotateY","rotateZ","scale","shearX","shearY","translate","ambientLight","directionalLight","lightFalloff","lights","lightSpecular","noLights","normal","pointLight","spotLight","image","imageMode","loadImage","noTint","requestImage","tint","texture","textureMode","textureWrap","blend","copy","filter","get","loadPixels","set","updatePixels","blendMode","loadShader","PShaderresetShader","shader","createFont","loadFont","text","textFont","textAlign","textLeading","textMode","textSize",
"textWidth","textAscent","textDescent","abs","ceil","constrain","dist","exp","floor","lerp","log","mag","map","max","min","norm","pow","round","sq","sqrt","acos","asin","atan","atan2","cos","degrees","radians","sin","tan","noise","noiseDetail","noiseSeed","random","randomGaussian","randomSeed"],IDENT=hljs.IDENT_RE,FUNC_NAME={variants:[{match:regex.concat(regex.either(...BUILT_INS2),regex.lookahead(/\s*\(/)),className:"built_in"},{relevance:0,match:regex.concat(/\b(?!for|if|while)/,IDENT,regex.lookahead(
/\s*\(/)),className:"title.function"}]},NEW_CLASS={match:[/new\s+/,IDENT],className:{1:"keyword",2:"class.title"}},PROPERTY={relevance:0,match:[/\./,IDENT],className:{2:"property"}},CLASS2={variants:[{match:[/class/,/\s+/,IDENT,/\s+/,/extends/,/\s+/,IDENT]},{match:[/class/,/\s+/,IDENT]}],className:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},TYPES2=["boolean","byte","char","color","double","float","int","long","short"],CLASSES=["BufferedReader","PVector","PFont","PImage",
"PGraphics","HashMap","String","Array","FloatDict","ArrayList","FloatList","IntDict","IntList","JSONArray","JSONObject","Object","StringDict","StringList","Table","TableRow","XML"];return{name:"Processing",aliases:["pde"],keywords:{keyword:[...["abstract","assert","break","case","catch","const","continue","default","else","enum","final","finally","for","if","import","instanceof","long","native","new","package","private","private","protected","protected","public","public","return","static","stric\
tfp","switch","synchronized","throw","throws","transient","try","void","volatile","while"]],literal:"P2D P3D HALF_PI PI QUARTER_PI TAU TWO_PI null true false",title:"setup draw",variable:"super this",built_in:[...BUILT_INS2,...CLASSES],type:TYPES2},contains:[CLASS2,NEW_CLASS,FUNC_NAME,PROPERTY,hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,hljs.C_NUMBER_MODE]}}function profile(hljs){return{name:"Python profiler",contains:[hljs.C_NUMBER_MODE,{begin:"\
[a-zA-Z_][\\da-zA-Z_]+\\.[\\da-zA-Z_]{1,3}",end:":",excludeEnd:!0},{begin:"(ncalls|tottime|cumtime)",end:"$",keywords:"ncalls tottime|10 cumtime|10 filename",relevance:10},{begin:"function calls",end:"$",contains:[hljs.C_NUMBER_MODE],relevance:10},hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,{className:"string",begin:"\\(",end:"\\)$",excludeBegin:!0,excludeEnd:!0,relevance:0}]}}function prolog(hljs){const ATOM={begin:/[a-z][A-Za-z0-9_]*/,relevance:0},VAR={className:"symbol",variants:[{begin:/[A-Z][a-zA-Z0-9_]*/},
{begin:/_[A-Za-z0-9_]*/}],relevance:0},PARENTED={begin:/\(/,end:/\)/,relevance:0},LIST={begin:/\[/,end:/\]/},LINE_COMMENT={className:"comment",begin:/%/,end:/$/,contains:[hljs.PHRASAL_WORDS_MODE]},BACKTICK_STRING={className:"string",begin:/`/,end:/`/,contains:[hljs.BACKSLASH_ESCAPE]},CHAR_CODE={className:"string",begin:/0'(\\'|.)/},SPACE_CODE={className:"string",begin:/0'\\s/},inner2=[ATOM,VAR,PARENTED,{begin:/:-/},LIST,LINE_COMMENT,hljs.C_BLOCK_COMMENT_MODE,hljs.QUOTE_STRING_MODE,hljs.APOS_STRING_MODE,
BACKTICK_STRING,CHAR_CODE,SPACE_CODE,hljs.C_NUMBER_MODE];return PARENTED.contains=inner2,LIST.contains=inner2,{name:"Prolog",contains:inner2.concat([{begin:/\.$/}])}}function properties(hljs){const WS0="[ \\t\\f]*",WS1="[ \\t\\f]+",EQUAL_DELIM=WS0+"[:=]"+WS0,WS_DELIM=WS1,DELIM="("+EQUAL_DELIM+"|"+WS_DELIM+")",KEY="([^\\\\:= \\t\\f\\n]|\\\\.)+",DELIM_AND_VALUE={end:DELIM,relevance:0,starts:{className:"string",end:/$/,relevance:0,contains:[{begin:"\\\\\\\\"},{begin:"\\\\\\n"}]}};return{name:".prop\
erties",disableAutodetect:!0,case_insensitive:!0,illegal:/\S/,contains:[hljs.COMMENT("^\\s*[!#]","$"),{returnBegin:!0,variants:[{begin:KEY+EQUAL_DELIM},{begin:KEY+WS_DELIM}],contains:[{className:"attr",begin:KEY,endsParent:!0}],starts:DELIM_AND_VALUE},{className:"attr",begin:KEY+WS0+"$"}]}}function protobuf(hljs){const KEYWORDS2=["package","import","option","optional","required","repeated","group","oneof"],TYPES2=["double","float","int32","int64","uint32","uint64","sint32","sint64","fixed32","fi\
xed64","sfixed32","sfixed64","bool","string","bytes"],CLASS_DEFINITION={match:[/(message|enum|service)\s+/,hljs.IDENT_RE],scope:{1:"keyword",2:"title.class"}};return{name:"Protocol Buffers",aliases:["proto"],keywords:{keyword:KEYWORDS2,type:TYPES2,literal:["true","false"]},contains:[hljs.QUOTE_STRING_MODE,hljs.NUMBER_MODE,hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,CLASS_DEFINITION,{className:"function",beginKeywords:"rpc",end:/[{;]/,excludeEnd:!0,keywords:"rpc returns"},{begin:/^\s*[A-Z_]+(?=\s*=[^\n]+;$)/}]}}
function puppet(hljs){const PUPPET_KEYWORDS={keyword:"and case default else elsif false if in import enherits node or true undef unless main settings $string ",literal:"alias audit before loglevel noop require subscribe tag owner ensure group mode name|0 changes context force incl lens load_path onlyif provider returns root show_diff type_check en_address ip_address realname command environment hour monute month monthday special target weekday creates cwd ogoutput refresh refreshonly tries try_s\
leep umask backup checksum content ctime force ignore links mtime purge recurse recurselimit replace selinux_ignore_defaults selrange selrole seltype seluser source souirce_permissions sourceselect validate_cmd validate_replacement allowdupe attribute_membership auth_membership forcelocal gid ia_load_module members system host_aliases ip allowed_trunk_vlans description device_url duplex encapsulation etherchannel native_vlan speed principals allow_root auth_class auth_type authenticate_user k_of\
_n mechanisms rule session_owner shared options device fstype enable hasrestart directory present absent link atboot blockdevice device dump pass remounts poller_tag use message withpath adminfile allow_virtual allowcdrom category configfiles flavor install_options instance package_settings platform responsefile status uninstall_options vendor unless_system_user unless_uid binary control flags hasstatus manifest pattern restart running start stop allowdupe auths expiry gid groups home iterations\
 key_membership keys managehome membership password password_max_age password_min_age profile_membership profiles project purge_ssh_keys role_membership roles salt shell uid baseurl cost descr enabled enablegroups exclude failovermethod gpgcheck gpgkey http_caching include includepkgs keepalive metadata_expire metalink mirrorlist priority protect proxy proxy_password proxy_username repo_gpgcheck s3_enabled skip_if_unavailable sslcacert sslclientcert sslclientkey sslverify mounted",built_in:"arch\
itecture augeasversion blockdevices boardmanufacturer boardproductname boardserialnumber cfkey dhcp_servers domain ec2_ ec2_userdata facterversion filesystems ldom fqdn gid hardwareisa hardwaremodel hostname id|0 interfaces ipaddress ipaddress_ ipaddress6 ipaddress6_ iphostnumber is_virtual kernel kernelmajversion kernelrelease kernelversion kernelrelease kernelversion lsbdistcodename lsbdistdescription lsbdistid lsbdistrelease lsbmajdistrelease lsbminordistrelease lsbrelease macaddress macaddre\
ss_ macosx_buildversion macosx_productname macosx_productversion macosx_productverson_major macosx_productversion_minor manufacturer memoryfree memorysize netmask metmask_ network_ operatingsystem operatingsystemmajrelease operatingsystemrelease osfamily partitions path physicalprocessorcount processor processorcount productname ps puppetversion rubysitedir rubyversion selinux selinux_config_mode selinux_config_policy selinux_current_mode selinux_current_mode selinux_enforced selinux_policyversi\
on serialnumber sp_ sshdsakey sshecdsakey sshrsakey swapencrypted swapfree swapsize timezone type uniqueid uptime uptime_days uptime_hours uptime_seconds uuid virtual vlans xendomains zfs_version zonenae zones zpool_version"},COMMENT=hljs.COMMENT("#","$"),IDENT_RE2="([A-Za-z_]|::)(\\w|::)*",TITLE=hljs.inherit(hljs.TITLE_MODE,{begin:IDENT_RE2}),VARIABLE={className:"variable",begin:"\\$"+IDENT_RE2},STRING={className:"string",contains:[hljs.BACKSLASH_ESCAPE,VARIABLE],variants:[{begin:/'/,end:/'/},{
begin:/"/,end:/"/}]};return{name:"Puppet",aliases:["pp"],contains:[COMMENT,VARIABLE,STRING,{beginKeywords:"class",end:"\\{|;",illegal:/=/,contains:[TITLE,COMMENT]},{beginKeywords:"define",end:/\{/,contains:[{className:"section",begin:hljs.IDENT_RE,endsParent:!0}]},{begin:hljs.IDENT_RE+"\\s+\\{",returnBegin:!0,end:/\S/,contains:[{className:"keyword",begin:hljs.IDENT_RE,relevance:.2},{begin:/\{/,end:/\}/,keywords:PUPPET_KEYWORDS,relevance:0,contains:[STRING,COMMENT,{begin:"[a-zA-Z_]+\\s*=>",returnBegin:!0,
end:"=>",contains:[{className:"attr",begin:hljs.IDENT_RE}]},{className:"number",begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",relevance:0},VARIABLE]}],relevance:0}]}}function purebasic(hljs){const STRINGS={className:"string",begin:'(~)?"',end:'"',illegal:"\\n"},CONSTANTS={className:"symbol",begin:"#[a-zA-Z_]\\w*\\$?"};return{name:"PureBASIC",aliases:["pb","pbi"],keywords:"Align And Array As Break CallDebugger Case CompilerCase CompilerDefault CompilerElse Comp\
ilerElseIf CompilerEndIf CompilerEndSelect CompilerError CompilerIf CompilerSelect CompilerWarning Continue Data DataSection Debug DebugLevel Declare DeclareC DeclareCDLL DeclareDLL DeclareModule Default Define Dim DisableASM DisableDebugger DisableExplicit Else ElseIf EnableASM EnableDebugger EnableExplicit End EndDataSection EndDeclareModule EndEnumeration EndIf EndImport EndInterface EndMacro EndModule EndProcedure EndSelect EndStructure EndStructureUnion EndWith Enumeration EnumerationBinary\
 Extends FakeReturn For ForEach ForEver Global Gosub Goto If Import ImportC IncludeBinary IncludeFile IncludePath Interface List Macro MacroExpandedCount Map Module NewList NewMap Next Not Or Procedure ProcedureC ProcedureCDLL ProcedureDLL ProcedureReturn Protected Prototype PrototypeC ReDim Read Repeat Restore Return Runtime Select Shared Static Step Structure StructureUnion Swap Threaded To UndefineMacro Until Until  UnuseModule UseModule Wend While With XIncludeFile XOr",contains:[hljs.COMMENT(
";","$",{relevance:0}),{className:"function",begin:"\\b(Procedure|Declare)(C|CDLL|DLL)?\\b",end:"\\(",excludeEnd:!0,returnBegin:!0,contains:[{className:"keyword",begin:"(Procedure|Declare)(C|CDLL|DLL)?",excludeEnd:!0},{className:"type",begin:"\\.\\w*"},hljs.UNDERSCORE_TITLE_MODE]},STRINGS,CONSTANTS]}}function q(hljs){return{name:"Q",aliases:["k","kdb"],keywords:{$pattern:/(`?)[A-Za-z0-9_]+\b/,keyword:"do while select delete by update from",literal:"0b 1b",built_in:"neg not null string reciprocal\
 floor ceiling signum mod xbar xlog and or each scan over prior mmu lsq inv md5 ltime gtime count first var dev med cov cor all any rand sums prds mins maxs fills deltas ratios avgs differ prev next rank reverse iasc idesc asc desc msum mcount mavg mdev xrank mmin mmax xprev rotate distinct group where flip type key til get value attr cut set upsert raze union inter except cross sv vs sublist enlist read0 read1 hopen hclose hdel hsym hcount peach system ltrim rtrim trim lower upper ssr view tabl\
es views cols xcols keys xkey xcol xasc xdesc fkeys meta lj aj aj0 ij pj asof uj ww wj wj1 fby xgroup ungroup ej save load rsave rload show csv parse eval min max avg wavg wsum sin cos tan sum",type:"`float `double int `timestamp `timespan `datetime `time `boolean `symbol `char `byte `short `long `real `month `date `minute `second `guid"},contains:[hljs.C_LINE_COMMENT_MODE,hljs.QUOTE_STRING_MODE,hljs.C_NUMBER_MODE]}}function qml(hljs){const regex=hljs.regex,KEYWORDS2={keyword:"in of on if for wh\
ile finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const export super debugger as async await import",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number\
 Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document Symbol Set Map WeakSet WeakMap Proxy Reflect Behavior bool color coordinate date double enumeration font geocircle georectangle geoshape int list matrix4x4 parent point quaternion real rect size string url variant vector2d vector3d vector4d Promise"},QML_IDENT_RE="[a-zA-Z_][a-z\
A-Z0-9\\._]*",PROPERTY={className:"keyword",begin:"\\bproperty\\b",starts:{className:"string",end:"(:|=|;|,|//|/\\*|$)",returnEnd:!0}},SIGNAL={className:"keyword",begin:"\\bsignal\\b",starts:{className:"string",end:"(\\(|:|=|;|,|//|/\\*|$)",returnEnd:!0}},ID_ID={className:"attribute",begin:"\\bid\\s*:",starts:{className:"string",end:QML_IDENT_RE,returnEnd:!1}},QML_ATTRIBUTE={begin:QML_IDENT_RE+"\\s*:",returnBegin:!0,contains:[{className:"attribute",begin:QML_IDENT_RE,end:"\\s*:",excludeEnd:!0,relevance:0}],
relevance:0},QML_OBJECT={begin:regex.concat(QML_IDENT_RE,/\s*\{/),end:/\{/,returnBegin:!0,relevance:0,contains:[hljs.inherit(hljs.TITLE_MODE,{begin:QML_IDENT_RE})]};return{name:"QML",aliases:["qt"],case_insensitive:!1,keywords:KEYWORDS2,contains:[{className:"meta",begin:/^\s*['"]use (strict|asm)['"]/},hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,{className:"string",begin:"`",end:"`",contains:[hljs.BACKSLASH_ESCAPE,{className:"subst",begin:"\\$\\{",end:"\\}"}]},hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,
{className:"number",variants:[{begin:"\\b(0[bB][01]+)"},{begin:"\\b(0[oO][0-7]+)"},{begin:hljs.C_NUMBER_RE}],relevance:0},{begin:"("+hljs.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",contains:[hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.REGEXP_MODE,{begin:/</,end:/>\s*[);\]]/,relevance:0,subLanguage:"xml"}],relevance:0},SIGNAL,PROPERTY,{className:"function",beginKeywords:"function",end:/\{/,excludeEnd:!0,contains:[hljs.inherit(hljs.TITLE_MODE,{begin:/[A-Za-z$_][0-9A-Za-z$_]*/}),
{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,contains:[hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE]}],illegal:/\[|%/},{begin:"\\."+hljs.IDENT_RE,relevance:0},ID_ID,QML_ATTRIBUTE,QML_OBJECT],illegal:/#/}}function reasonml(hljs){return{name:"ReasonML",aliases:["re"],keywords:{$pattern:/[a-z_]\w*!?/,keyword:["and","as","asr","assert","begin","class","constraint","do","done","downto","else","end","esfun","exception","external","for","fun","function","functor","if","in",
"include","inherit","initializer","land","lazy","let","lor","lsl","lsr","lxor","mod","module","mutable","new","nonrec","object","of","open","or","pri","pub","rec","sig","struct","switch","then","to","try","type","val","virtual","when","while","with"],built_in:["array","bool","bytes","char","exn|5","float","int","int32","int64","list","lazy_t|5","nativeint|5","ref","string","unit"],literal:["true","false"]},illegal:/(:-|:=|\$\{|\+=)/,contains:[{scope:"literal",match:/\[(\|\|)?\]|\(\)/,relevance:0},
hljs.C_LINE_COMMENT_MODE,hljs.COMMENT(/\/\*/,/\*\//,{illegal:/^(#,\/\/)/}),{scope:"symbol",match:/\'[A-Za-z_](?!\')[\w\']*/},{scope:"type",match:/`[A-Z][\w\']*/},{scope:"type",match:/\b[A-Z][\w\']*/,relevance:0},{match:/[a-z_]\w*\'[\w\']*/,relevance:0},{scope:"operator",match:/\s+(\|\||\+[\+\.]?|\*[\*\/\.]?|\/[\.]?|\.\.\.|\|>|&&|===?)\s+/,relevance:0},hljs.inherit(hljs.APOS_STRING_MODE,{scope:"string",relevance:0}),hljs.inherit(hljs.QUOTE_STRING_MODE,{illegal:null}),{scope:"number",variants:[{match:/\b0[xX][a-fA-F0-9_]+[Lln]?/},
{match:/\b0[oO][0-7_]+[Lln]?/},{match:/\b0[bB][01_]+[Lln]?/},{match:/\b[0-9][0-9_]*([Lln]|(\.[0-9_]*)?([eE][-+]?[0-9_]+)?)/}],relevance:0}]}}function rib(hljs){return{name:"RenderMan RIB",keywords:"ArchiveRecord AreaLightSource Atmosphere Attribute AttributeBegin AttributeEnd Basis Begin Blobby Bound Clipping ClippingPlane Color ColorSamples ConcatTransform Cone CoordinateSystem CoordSysTransform CropWindow Curves Cylinder DepthOfField Detail DetailRange Disk Displacement Display End ErrorHandle\
r Exposure Exterior Format FrameAspectRatio FrameBegin FrameEnd GeneralPolygon GeometricApproximation Geometry Hider Hyperboloid Identity Illuminate Imager Interior LightSource MakeCubeFaceEnvironment MakeLatLongEnvironment MakeShadow MakeTexture Matte MotionBegin MotionEnd NuPatch ObjectBegin ObjectEnd ObjectInstance Opacity Option Orientation Paraboloid Patch PatchMesh Perspective PixelFilter PixelSamples PixelVariance Points PointsGeneralPolygons PointsPolygons Polygon Procedural Projection Q\
uantize ReadArchive RelativeDetail ReverseOrientation Rotate Scale ScreenWindow ShadingInterpolation ShadingRate Shutter Sides Skew SolidBegin SolidEnd Sphere SubdivisionMesh Surface TextureCoordinates Torus Transform TransformBegin TransformEnd TransformPoints Translate TrimCurve WorldBegin WorldEnd",illegal:"</",contains:[hljs.HASH_COMMENT_MODE,hljs.C_NUMBER_MODE,hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE]}}function roboconf(hljs){const IDENTIFIER="[a-zA-Z-_][^\\n{]+\\{",PROPERTY={className:"\
attribute",begin:/[a-zA-Z-_]+/,end:/\s*:/,excludeEnd:!0,starts:{end:";",relevance:0,contains:[{className:"variable",begin:/\.[a-zA-Z-_]+/},{className:"keyword",begin:/\(optional\)/}]}};return{name:"Roboconf",aliases:["graph","instances"],case_insensitive:!0,keywords:"import",contains:[{begin:"^facet "+IDENTIFIER,end:/\}/,keywords:"facet",contains:[PROPERTY,hljs.HASH_COMMENT_MODE]},{begin:"^\\s*instance of "+IDENTIFIER,end:/\}/,keywords:"name count channels instance-data instance-state instance o\
f",illegal:/\S/,contains:["self",PROPERTY,hljs.HASH_COMMENT_MODE]},{begin:"^"+IDENTIFIER,end:/\}/,contains:[PROPERTY,hljs.HASH_COMMENT_MODE]},hljs.HASH_COMMENT_MODE]}}function routeros(hljs){const STATEMENTS="foreach do while for if from to step else on-error and or not in",GLOBAL_COMMANDS="global local beep delay put len typeof pick log time set find environment terminal error execute parse resolve toarray tobool toid toip toip6 tonum tostr totime",COMMON_COMMANDS="add remove enable disable set\
 get print export edit find run debug error info warning",LITERALS2="true false yes no nothing nil null",OBJECTS="traffic-flow traffic-generator firewall scheduler aaa accounting address-list address align area bandwidth-server bfd bgp bridge client clock community config connection console customer default dhcp-client dhcp-server discovery dns e-mail ethernet filter firmware gps graphing group hardware health hotspot identity igmp-proxy incoming instance interface ip ipsec ipv6 irq l2tp-server \
lcd ldp logging mac-server mac-winbox mangle manual mirror mme mpls nat nd neighbor network note ntp ospf ospf-v3 ovpn-server page peer pim ping policy pool port ppp pppoe-client pptp-server prefix profile proposal proxy queue radius resource rip ripng route routing screen script security-profiles server service service-port settings shares smb sms sniffer snmp snooper socks sstp-server system tool tracking type upgrade upnp user-manager users user vlan secret vrrp watchdog web-access wireless p\
ptp pppoe lan wan layer7-protocol lease simple raw",VAR={className:"variable",variants:[{begin:/\$[\w\d#@][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},QUOTE_STRING={className:"string",begin:/"/,end:/"/,contains:[hljs.BACKSLASH_ESCAPE,VAR,{className:"variable",begin:/\$\(/,end:/\)/,contains:[hljs.BACKSLASH_ESCAPE]}]},APOS_STRING={className:"string",begin:/'/,end:/'/};return{name:"MikroTik RouterOS script",aliases:["mikrotik"],case_insensitive:!0,keywords:{$pattern:/:?[\w-]+/,literal:LITERALS2,keyword:STATEMENTS+
" :"+STATEMENTS.split(" ").join(" :")+" :"+GLOBAL_COMMANDS.split(" ").join(" :")},contains:[{variants:[{begin:/\/\*/,end:/\*\//},{begin:/\/\//,end:/$/},{begin:/<\//,end:/>/}],illegal:/./},hljs.COMMENT("^#","$"),QUOTE_STRING,APOS_STRING,VAR,{begin:/[\w-]+=([^\s{}[\]()>]+)/,relevance:0,returnBegin:!0,contains:[{className:"attribute",begin:/[^=]+/},{begin:/=/,endsWithParent:!0,relevance:0,contains:[QUOTE_STRING,APOS_STRING,VAR,{className:"literal",begin:"\\b("+LITERALS2.split(" ").join("|")+")\\b"},
{begin:/("[^"]*"|[^\s{}[\]]+)/}]}]},{className:"number",begin:/\*[0-9a-fA-F]+/},{begin:"\\b("+COMMON_COMMANDS.split(" ").join("|")+")([\\s[(\\]|])",returnBegin:!0,contains:[{className:"built_in",begin:/\w+/}]},{className:"built_in",variants:[{begin:"(\\.\\./|/|\\s)(("+OBJECTS.split(" ").join("|")+");?\\s)+"},{begin:/\.\./,relevance:0}]}]}}function rsl(hljs){const BUILT_INS2=["abs","acos","ambient","area","asin","atan","atmosphere","attribute","calculatenormal","ceil","cellnoise","clamp","comp","\
concat","cos","degrees","depth","Deriv","diffuse","distance","Du","Dv","environment","exp","faceforward","filterstep","floor","format","fresnel","incident","length","lightsource","log","match","max","min","mod","noise","normalize","ntransform","opposite","option","phong","pnoise","pow","printf","ptlined","radians","random","reflect","refract","renderinfo","round","setcomp","setxcomp","setycomp","setzcomp","shadow","sign","sin","smoothstep","specular","specularbrdf","spline","sqrt","step","tan","\
texture","textureinfo","trace","transform","vtransform","xcomp","ycomp","zcomp"],TYPES2=["matrix","float","color","point","normal","vector"],KEYWORDS2=["while","for","if","do","return","else","break","extern","continue"],CLASS_DEFINITION={match:[/(surface|displacement|light|volume|imager)/,/\s+/,hljs.IDENT_RE],scope:{1:"keyword",3:"title.class"}};return{name:"RenderMan RSL",keywords:{keyword:KEYWORDS2,built_in:BUILT_INS2,type:TYPES2},illegal:"</",contains:[hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,
hljs.QUOTE_STRING_MODE,hljs.APOS_STRING_MODE,hljs.C_NUMBER_MODE,{className:"meta",begin:"#",end:"$"},CLASS_DEFINITION,{beginKeywords:"illuminate illuminance gather",end:"\\("}]}}function ruleslanguage(hljs){return{name:"Oracle Rules Language",keywords:{keyword:"BILL_PERIOD BILL_START BILL_STOP RS_EFFECTIVE_START RS_EFFECTIVE_STOP RS_JURIS_CODE RS_OPCO_CODE INTDADDATTRIBUTE|5 INTDADDVMSG|5 INTDBLOCKOP|5 INTDBLOCKOPNA|5 INTDCLOSE|5 INTDCOUNT|5 INTDCOUNTSTATUSCODE|5 INTDCREATEMASK|5 INTDCREATEDAYMA\
SK|5 INTDCREATEFACTORMASK|5 INTDCREATEHANDLE|5 INTDCREATEOVERRIDEDAYMASK|5 INTDCREATEOVERRIDEMASK|5 INTDCREATESTATUSCODEMASK|5 INTDCREATETOUPERIOD|5 INTDDELETE|5 INTDDIPTEST|5 INTDEXPORT|5 INTDGETERRORCODE|5 INTDGETERRORMESSAGE|5 INTDISEQUAL|5 INTDJOIN|5 INTDLOAD|5 INTDLOADACTUALCUT|5 INTDLOADDATES|5 INTDLOADHIST|5 INTDLOADLIST|5 INTDLOADLISTDATES|5 INTDLOADLISTENERGY|5 INTDLOADLISTHIST|5 INTDLOADRELATEDCHANNEL|5 INTDLOADSP|5 INTDLOADSTAGING|5 INTDLOADUOM|5 INTDLOADUOMDATES|5 INTDLOADUOMHIST|5 I\
NTDLOADVERSION|5 INTDOPEN|5 INTDREADFIRST|5 INTDREADNEXT|5 INTDRECCOUNT|5 INTDRELEASE|5 INTDREPLACE|5 INTDROLLAVG|5 INTDROLLPEAK|5 INTDSCALAROP|5 INTDSCALE|5 INTDSETATTRIBUTE|5 INTDSETDSTPARTICIPANT|5 INTDSETSTRING|5 INTDSETVALUE|5 INTDSETVALUESTATUS|5 INTDSHIFTSTARTTIME|5 INTDSMOOTH|5 INTDSORT|5 INTDSPIKETEST|5 INTDSUBSET|5 INTDTOU|5 INTDTOURELEASE|5 INTDTOUVALUE|5 INTDUPDATESTATS|5 INTDVALUE|5 STDEV INTDDELETEEX|5 INTDLOADEXACTUAL|5 INTDLOADEXCUT|5 INTDLOADEXDATES|5 INTDLOADEX|5 INTDLOADEXRELA\
TEDCHANNEL|5 INTDSAVEEX|5 MVLOAD|5 MVLOADACCT|5 MVLOADACCTDATES|5 MVLOADACCTHIST|5 MVLOADDATES|5 MVLOADHIST|5 MVLOADLIST|5 MVLOADLISTDATES|5 MVLOADLISTHIST|5 IF FOR NEXT DONE SELECT END CALL ABORT CLEAR CHANNEL FACTOR LIST NUMBER OVERRIDE SET WEEK DISTRIBUTIONNODE ELSE WHEN THEN OTHERWISE IENUM CSV INCLUDE LEAVE RIDER SAVE DELETE NOVALUE SECTION WARN SAVE_UPDATE DETERMINANT LABEL REPORT REVENUE EACH IN FROM TOTAL CHARGE BLOCK AND OR CSV_FILE RATE_CODE AUXILIARY_DEMAND UIDACCOUNT RS BILL_PERIOD_S\
ELECT HOURS_PER_MONTH INTD_ERROR_STOP SEASON_SCHEDULE_NAME ACCOUNTFACTOR ARRAYUPPERBOUND CALLSTOREDPROC GETADOCONNECTION GETCONNECT GETDATASOURCE GETQUALIFIER GETUSERID HASVALUE LISTCOUNT LISTOP LISTUPDATE LISTVALUE PRORATEFACTOR RSPRORATE SETBINPATH SETDBMONITOR WQ_OPEN BILLINGHOURS DATE DATEFROMFLOAT DATETIMEFROMSTRING DATETIMETOSTRING DATETOFLOAT DAY DAYDIFF DAYNAME DBDATETIME HOUR MINUTE MONTH MONTHDIFF MONTHHOURS MONTHNAME ROUNDDATE SAMEWEEKDAYLASTYEAR SECOND WEEKDAY WEEKDIFF YEAR YEARDAY Y\
EARSTR COMPSUM HISTCOUNT HISTMAX HISTMIN HISTMINNZ HISTVALUE MAXNRANGE MAXRANGE MINRANGE COMPIKVA COMPKVA COMPKVARFROMKQKW COMPLF IDATTR FLAG LF2KW LF2KWH MAXKW POWERFACTOR READING2USAGE AVGSEASON MAXSEASON MONTHLYMERGE SEASONVALUE SUMSEASON ACCTREADDATES ACCTTABLELOAD CONFIGADD CONFIGGET CREATEOBJECT CREATEREPORT EMAILCLIENT EXPBLKMDMUSAGE EXPMDMUSAGE EXPORT_USAGE FACTORINEFFECT GETUSERSPECIFIEDSTOP INEFFECT ISHOLIDAY RUNRATE SAVE_PROFILE SETREPORTTITLE USEREXIT WATFORRUNRATE TO TABLE ACOS ASIN\
 ATAN ATAN2 BITAND CEIL COS COSECANT COSH COTANGENT DIVQUOT DIVREM EXP FABS FLOOR FMOD FREPM FREXPN LOG LOG10 MAX MAXN MIN MINNZ MODF POW ROUND ROUND2VALUE ROUNDINT SECANT SIN SINH SQROOT TAN TANH FLOAT2STRING FLOAT2STRINGNC INSTR LEFT LEN LTRIM MID RIGHT RTRIM STRING STRINGNC TOLOWER TOUPPER TRIM NUMDAYS READ_DATE STAGING",built_in:"IDENTIFIER OPTIONS XML_ELEMENT XML_OP XML_ELEMENT_OF DOMDOCCREATE DOMDOCLOADFILE DOMDOCLOADXML DOMDOCSAVEFILE DOMDOCGETROOT DOMDOCADDPI DOMNODEGETNAME DOMNODEGETTYP\
E DOMNODEGETVALUE DOMNODEGETCHILDCT DOMNODEGETFIRSTCHILD DOMNODEGETSIBLING DOMNODECREATECHILDELEMENT DOMNODESETATTRIBUTE DOMNODEGETCHILDELEMENTCT DOMNODEGETFIRSTCHILDELEMENT DOMNODEGETSIBLINGELEMENT DOMNODEGETATTRIBUTECT DOMNODEGETATTRIBUTEI DOMNODEGETATTRIBUTEBYNAME DOMNODEGETBYNAME"},contains:[hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,hljs.C_NUMBER_MODE,{className:"literal",variants:[{begin:"#\\s+",relevance:0},{begin:"#[a-zA-Z .]+"}]}]}}function sas(hljs){
const regex=hljs.regex,SAS_KEYWORDS=["do","if","then","else","end","until","while","abort","array","attrib","by","call","cards","cards4","catname","continue","datalines","datalines4","delete","delim","delimiter","display","dm","drop","endsas","error","file","filename","footnote","format","goto","in","infile","informat","input","keep","label","leave","length","libname","link","list","lostcard","merge","missing","modify","options","output","out","page","put","redirect","remove","rename","replace",
"retain","return","select","set","skip","startsas","stop","title","update","waitsas","where","window","x|0","systask","add","and","alter","as","cascade","check","create","delete","describe","distinct","drop","foreign","from","group","having","index","insert","into","in","key","like","message","modify","msgtype","not","null","on","or","order","primary","references","reset","restrict","select","set","table","unique","update","validate","view","where"],FUNCTIONS=["abs","addr","airy","arcos","arsin",
"atan","attrc","attrn","band","betainv","blshift","bnot","bor","brshift","bxor","byte","cdf","ceil","cexist","cinv","close","cnonct","collate","compbl","compound","compress","cos","cosh","css","curobs","cv","daccdb","daccdbsl","daccsl","daccsyd","dacctab","dairy","date","datejul","datepart","datetime","day","dclose","depdb","depdbsl","depdbsl","depsl","depsl","depsyd","depsyd","deptab","deptab","dequote","dhms","dif","digamma","dim","dinfo","dnum","dopen","doptname","doptnum","dread","dropnote",
"dsname","erf","erfc","exist","exp","fappend","fclose","fcol","fdelete","fetch","fetchobs","fexist","fget","fileexist","filename","fileref","finfo","finv","fipname","fipnamel","fipstate","floor","fnonct","fnote","fopen","foptname","foptnum","fpoint","fpos","fput","fread","frewind","frlen","fsep","fuzz","fwrite","gaminv","gamma","getoption","getvarc","getvarn","hbound","hms","hosthelp","hour","ibessel","index","indexc","indexw","input","inputc","inputn","int","intck","intnx","intrr","irr","jbesse\
l","juldate","kurtosis","lag","lbound","left","length","lgamma","libname","libref","log","log10","log2","logpdf","logpmf","logsdf","lowcase","max","mdy","mean","min","minute","mod","month","mopen","mort","n","netpv","nmiss","normal","note","npv","open","ordinal","pathname","pdf","peek","peekc","pmf","point","poisson","poke","probbeta","probbnml","probchi","probf","probgam","probhypr","probit","probnegb","probnorm","probt","put","putc","putn","qtr","quote","ranbin","rancau","ranexp","rangam","ran\
ge","rank","rannor","ranpoi","rantbl","rantri","ranuni","repeat","resolve","reverse","rewind","right","round","saving","scan","sdf","second","sign","sin","sinh","skewness","soundex","spedis","sqrt","std","stderr","stfips","stname","stnamel","substr","sum","symget","sysget","sysmsg","sysprod","sysrc","system","tan","tanh","time","timepart","tinv","tnonct","today","translate","tranwrd","trigamma","trim","trimn","trunc","uniform","upcase","uss","var","varfmt","varinfmt","varlabel","varlen","varname",
"varnum","varray","varrayx","vartype","verify","vformat","vformatd","vformatdx","vformatn","vformatnx","vformatw","vformatwx","vformatx","vinarray","vinarrayx","vinformat","vinformatd","vinformatdx","vinformatn","vinformatnx","vinformatw","vinformatwx","vinformatx","vlabel","vlabelx","vlength","vlengthx","vname","vnamex","vtype","vtypex","weekday","year","yyq","zipfips","zipname","zipnamel","zipstate"],MACRO_FUNCTIONS=["bquote","nrbquote","cmpres","qcmpres","compstor","datatyp","display","do","e\
lse","end","eval","global","goto","if","index","input","keydef","label","left","length","let","local","lowcase","macro","mend","nrbquote","nrquote","nrstr","put","qcmpres","qleft","qlowcase","qscan","qsubstr","qsysfunc","qtrim","quote","qupcase","scan","str","substr","superq","syscall","sysevalf","sysexec","sysfunc","sysget","syslput","sysprod","sysrc","sysrput","then","to","trim","unquote","until","upcase","verify","while","window"];return{name:"SAS",case_insensitive:!0,keywords:{literal:["null",
"missing","_all_","_automatic_","_character_","_infile_","_n_","_name_","_null_","_numeric_","_user_","_webout_"],keyword:SAS_KEYWORDS},contains:[{className:"keyword",begin:/^\s*(proc [\w\d_]+|data|run|quit)[\s;]/},{className:"variable",begin:/&[a-zA-Z_&][a-zA-Z0-9_]*\.?/},{begin:[/^\s*/,/datalines;|cards;/,/(?:.*\n)+/,/^\s*;\s*$/],className:{2:"keyword",3:"string"}},{begin:[/%mend|%macro/,/\s+/,/[a-zA-Z_&][a-zA-Z0-9_]*/],className:{1:"built_in",3:"title.function"}},{className:"built_in",begin:"\
%"+regex.either(...MACRO_FUNCTIONS)},{className:"title.function",begin:/%[a-zA-Z_][a-zA-Z_0-9]*/},{className:"meta",begin:regex.either(...FUNCTIONS)+"(?=\\()"},{className:"string",variants:[hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE]},hljs.COMMENT("\\*",";"),hljs.C_BLOCK_COMMENT_MODE]}}function scala(hljs){const regex=hljs.regex,ANNOTATION={className:"meta",begin:"@[A-Za-z]+"},SUBST={className:"subst",variants:[{begin:"\\$[A-Za-z0-9_]+"},{begin:/\$\{/,end:/\}/}]},STRING={className:"string",variants:[
{begin:'"""',end:'"""'},{begin:'"',end:'"',illegal:"\\n",contains:[hljs.BACKSLASH_ESCAPE]},{begin:'[a-z]+"',end:'"',illegal:"\\n",contains:[hljs.BACKSLASH_ESCAPE,SUBST]},{className:"string",begin:'[a-z]+"""',end:'"""',contains:[SUBST],relevance:10}]},TYPE={className:"type",begin:"\\b[A-Z][A-Za-z0-9_]*",relevance:0},NAME={className:"title",begin:/[^0-9\n\t "'(),.`{}\[\]:;][^\n\t "'(),.`{}\[\]:;]+|[^0-9\n\t "'(),.`{}\[\]:;=]/,relevance:0},CLASS2={className:"class",beginKeywords:"class object trait\
 type",end:/[:={\[\n;]/,excludeEnd:!0,contains:[hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,{beginKeywords:"extends with",relevance:10},{begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0,relevance:0,contains:[TYPE,hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE]},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,relevance:0,contains:[TYPE,hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE]},NAME]},METHOD={className:"function",beginKeywords:"def",end:regex.lookahead(
/[:={\[(\n;]/),contains:[NAME]},EXTENSION={begin:[/^\s*/,"extension",/\s+(?=[[(])/],beginScope:{2:"keyword"}},END2={begin:[/^\s*/,/end/,/\s+/,/(extension\b)?/],beginScope:{2:"keyword",4:"keyword"}},INLINE_MODES=[{match:/\.inline\b/},{begin:/\binline(?=\s)/,keywords:"inline"}],USING_PARAM_CLAUSE={begin:[/\(\s*/,/using/,/\s+(?!\))/],beginScope:{2:"keyword"}};return{name:"Scala",keywords:{literal:"true false null",keyword:"type yield lazy override def with val var sealed abstract private trait obje\
ct if then forSome for while do throw finally protected extends import final return else break new catch super class case package default try this match continue throws implicit export enum given transparent"},contains:[{begin:["//>",/\s+/,/using/,/\s+/,/\S+/],beginScope:{1:"comment",3:"keyword",5:"type"},end:/$/,contains:[{className:"string",begin:/\S+/}]},hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,STRING,TYPE,METHOD,CLASS2,hljs.C_NUMBER_MODE,EXTENSION,END2,...INLINE_MODES,USING_PARAM_CLAUSE,
ANNOTATION]}}function scheme(hljs){const SCHEME_IDENT_RE="[^\\(\\)\\[\\]\\{\\}\",'`;#|\\\\\\s]+",SCHEME_SIMPLE_NUMBER_RE="(-|\\+)?\\d+([./]\\d+)?",SCHEME_COMPLEX_NUMBER_RE=SCHEME_SIMPLE_NUMBER_RE+"[+\\-]"+SCHEME_SIMPLE_NUMBER_RE+"i",KEYWORDS2={$pattern:SCHEME_IDENT_RE,built_in:"case-lambda call/cc class define-class exit-handler field import inherit init-field interface let*-values let-values let/ec mixin opt-lambda override protect provide public rename require require-for-syntax syntax syntax-\
case syntax-error unit/sig unless when with-syntax and begin call-with-current-continuation call-with-input-file call-with-output-file case cond define define-syntax delay do dynamic-wind else for-each if lambda let let* let-syntax letrec letrec-syntax map or syntax-rules ' * + , ,@ - ... / ; < <= = => > >= ` abs acos angle append apply asin assoc assq assv atan boolean? caar cadr call-with-input-file call-with-output-file call-with-values car cdddar cddddr cdr ceiling char->integer char-alphabe\
tic? char-ci<=? char-ci<? char-ci=? char-ci>=? char-ci>? char-downcase char-lower-case? char-numeric? char-ready? char-upcase char-upper-case? char-whitespace? char<=? char<? char=? char>=? char>? char? close-input-port close-output-port complex? cons cos current-input-port current-output-port denominator display eof-object? eq? equal? eqv? eval even? exact->inexact exact? exp expt floor force gcd imag-part inexact->exact inexact? input-port? integer->char integer? interaction-environment lcm le\
ngth list list->string list->vector list-ref list-tail list? load log magnitude make-polar make-rectangular make-string make-vector max member memq memv min modulo negative? newline not null-environment null? number->string number? numerator odd? open-input-file open-output-file output-port? pair? peek-char port? positive? procedure? quasiquote quote quotient rational? rationalize read read-char real-part real? remainder reverse round scheme-report-environment set! set-car! set-cdr! sin sqrt str\
ing string->list string->number string->symbol string-append string-ci<=? string-ci<? string-ci=? string-ci>=? string-ci>? string-copy string-fill! string-length string-ref string-set! string<=? string<? string=? string>=? string>? string? substring symbol->string symbol? tan transcript-off transcript-on truncate values vector vector->list vector-fill! vector-length vector-ref vector-set! with-input-from-file with-output-to-file write write-char zero?"},LITERAL={className:"literal",begin:"(#t|#f\
|#\\\\"+SCHEME_IDENT_RE+"|#\\\\.)"},NUMBER={className:"number",variants:[{begin:SCHEME_SIMPLE_NUMBER_RE,relevance:0},{begin:SCHEME_COMPLEX_NUMBER_RE,relevance:0},{begin:"#b[0-1]+(/[0-1]+)?"},{begin:"#o[0-7]+(/[0-7]+)?"},{begin:"#x[0-9a-f]+(/[0-9a-f]+)?"}]},STRING=hljs.QUOTE_STRING_MODE,COMMENT_MODES=[hljs.COMMENT(";","$",{relevance:0}),hljs.COMMENT("#\\|","\\|#")],IDENT={begin:SCHEME_IDENT_RE,relevance:0},QUOTED_IDENT={className:"symbol",begin:"'"+SCHEME_IDENT_RE},BODY={endsWithParent:!0,relevance:0},
QUOTED_LIST={variants:[{begin:/'/},{begin:"`"}],contains:[{begin:"\\(",end:"\\)",contains:["self",LITERAL,STRING,NUMBER,IDENT,QUOTED_IDENT]}]},NAME={className:"name",relevance:0,begin:SCHEME_IDENT_RE,keywords:KEYWORDS2},LIST={variants:[{begin:"\\(",end:"\\)"},{begin:"\\[",end:"\\]"}],contains:[{begin:/lambda/,endsWithParent:!0,returnBegin:!0,contains:[NAME,{endsParent:!0,variants:[{begin:/\(/,end:/\)/},{begin:/\[/,end:/\]/}],contains:[IDENT]}]},NAME,BODY]};return BODY.contains=[LITERAL,NUMBER,STRING,
IDENT,QUOTED_IDENT,QUOTED_LIST,LIST].concat(COMMENT_MODES),{name:"Scheme",aliases:["scm"],illegal:/\S/,contains:[hljs.SHEBANG(),NUMBER,STRING,QUOTED_IDENT,QUOTED_LIST,LIST].concat(COMMENT_MODES)}}function scilab(hljs){const COMMON_CONTAINS=[hljs.C_NUMBER_MODE,{className:"string",begin:`'|"`,end:`'|"`,contains:[hljs.BACKSLASH_ESCAPE,{begin:"''"}]}];return{name:"Scilab",aliases:["sci"],keywords:{$pattern:/%?\w+/,keyword:"abort break case clear catch continue do elseif else endfunction end for func\
tion global if pause return resume select try then while",literal:"%f %F %t %T %pi %eps %inf %nan %e %i %z %s",built_in:"abs and acos asin atan ceil cd chdir clearglobal cosh cos cumprod deff disp error exec execstr exists exp eye gettext floor fprintf fread fsolve imag isdef isempty isinfisnan isvector lasterror length load linspace list listfiles log10 log2 log max min msprintf mclose mopen ones or pathconvert poly printf prod pwd rand real round sinh sin size gsort sprintf sqrt strcat strcmps\
 tring sum system tanh tan type typename warning zeros matrix"},illegal:'("|#|/\\*|\\s+/\\w+)',contains:[{className:"function",beginKeywords:"function",end:"$",contains:[hljs.UNDERSCORE_TITLE_MODE,{className:"params",begin:"\\(",end:"\\)"}]},{begin:"[a-zA-Z_][a-zA-Z_0-9]*[\\.']+",relevance:0},{begin:"\\[",end:"\\][\\.']*",relevance:0,contains:COMMON_CONTAINS},hljs.COMMENT("//","$")].concat(COMMON_CONTAINS)}}function smali(hljs){const smali_instr_low_prio=["add","and","cmp","cmpg","cmpl","const",
"div","double","float","goto","if","int","long","move","mul","neg","new","nop","not","or","rem","return","shl","shr","sput","sub","throw","ushr","xor"],smali_instr_high_prio=["aget","aput","array","check","execute","fill","filled","goto/16","goto/32","iget","instance","invoke","iput","monitor","packed","sget","sparse"],smali_keywords=["transient","constructor","abstract","final","synthetic","public","private","protected","static","bridge","system"];return{name:"Smali",contains:[{className:"strin\
g",begin:'"',end:'"',relevance:0},hljs.COMMENT("#","$",{relevance:0}),{className:"keyword",variants:[{begin:"\\s*\\.end\\s[a-zA-Z0-9]*"},{begin:"^[ ]*\\.[a-zA-Z]*",relevance:0},{begin:"\\s:[a-zA-Z_0-9]*",relevance:0},{begin:"\\s("+smali_keywords.join("|")+")"}]},{className:"built_in",variants:[{begin:"\\s("+smali_instr_low_prio.join("|")+")\\s"},{begin:"\\s("+smali_instr_low_prio.join("|")+")((-|/)[a-zA-Z0-9]+)+\\s",relevance:10},{begin:"\\s("+smali_instr_high_prio.join("|")+")((-|/)[a-zA-Z0-9]+\
)*\\s",relevance:10}]},{className:"class",begin:`L[^(;:
]*;`,relevance:0},{begin:"[vp][0-9]+"}]}}function smalltalk(hljs){const VAR_IDENT_RE="[a-z][a-zA-Z0-9_]*",CHAR={className:"string",begin:"\\$.{1}"},SYMBOL={className:"symbol",begin:"#"+hljs.UNDERSCORE_IDENT_RE};return{name:"Smalltalk",aliases:["st"],keywords:["self","super","nil","true","false","thisContext"],contains:[hljs.COMMENT('"','"'),hljs.APOS_STRING_MODE,{className:"type",begin:"\\b[A-Z][A-Za-z0-9_]*",relevance:0},{begin:VAR_IDENT_RE+":",relevance:0},hljs.C_NUMBER_MODE,SYMBOL,CHAR,{begin:"\
\\|[ ]*"+VAR_IDENT_RE+"([ ]+"+VAR_IDENT_RE+")*[ ]*\\|",returnBegin:!0,end:/\|/,illegal:/\S/,contains:[{begin:"(\\|[ ]*)?"+VAR_IDENT_RE}]},{begin:"#\\(",end:"\\)",contains:[hljs.APOS_STRING_MODE,CHAR,hljs.C_NUMBER_MODE,SYMBOL]}]}}function sml(hljs){return{name:"SML (Standard ML)",aliases:["ml"],keywords:{$pattern:"[a-z_]\\w*!?",keyword:"abstype and andalso as case datatype do else end eqtype exception fn fun functor handle if in include infix infixr let local nonfix of op open orelse raise rec sh\
aring sig signature struct structure then type val with withtype where while",built_in:"array bool char exn int list option order real ref string substring vector unit word",literal:"true false NONE SOME LESS EQUAL GREATER nil"},illegal:/\/\/|>>/,contains:[{className:"literal",begin:/\[(\|\|)?\]|\(\)/,relevance:0},hljs.COMMENT("\\(\\*","\\*\\)",{contains:["self"]}),{className:"symbol",begin:"'[A-Za-z_](?!')[\\w']*"},{className:"type",begin:"`[A-Z][\\w']*"},{className:"type",begin:"\\b[A-Z][\\w']*",
relevance:0},{begin:"[a-z_]\\w*'[\\w']*"},hljs.inherit(hljs.APOS_STRING_MODE,{className:"string",relevance:0}),hljs.inherit(hljs.QUOTE_STRING_MODE,{illegal:null}),{className:"number",begin:"\\b(0[xX][a-fA-F0-9_]+[Lln]?|0[oO][0-7_]+[Lln]?|0[bB][01_]+[Lln]?|[0-9][0-9_]*([Lln]|(\\.[0-9_]*)?([eE][-+]?[0-9_]+)?)?)",relevance:0},{begin:/[-=]>/}]}}function sqf(hljs){const VARIABLE={className:"variable",begin:/\b_+[a-zA-Z]\w*/},FUNCTION={className:"title",begin:/[a-zA-Z][a-zA-Z_0-9]*_fnc_[a-zA-Z_0-9]+/},
STRINGS={className:"string",variants:[{begin:'"',end:'"',contains:[{begin:'""',relevance:0}]},{begin:"'",end:"'",contains:[{begin:"''",relevance:0}]}]},KEYWORDS2=["break","breakWith","breakOut","breakTo","case","catch","continue","continueWith","default","do","else","exit","exitWith","for","forEach","from","if","local","private","switch","step","then","throw","to","try","waitUntil","while","with"],LITERAL=["blufor","civilian","configNull","controlNull","displayNull","diaryRecordNull","east","end\
l","false","grpNull","independent","lineBreak","locationNull","nil","objNull","opfor","pi","resistance","scriptNull","sideAmbientLife","sideEmpty","sideEnemy","sideFriendly","sideLogic","sideUnknown","taskNull","teamMemberNull","true","west"],BUILT_IN=["abs","accTime","acos","action","actionIDs","actionKeys","actionKeysEx","actionKeysImages","actionKeysNames","actionKeysNamesArray","actionName","actionParams","activateAddons","activatedAddons","activateKey","activeTitleEffectParams","add3DENConn\
ection","add3DENEventHandler","add3DENLayer","addAction","addBackpack","addBackpackCargo","addBackpackCargoGlobal","addBackpackGlobal","addBinocularItem","addCamShake","addCuratorAddons","addCuratorCameraArea","addCuratorEditableObjects","addCuratorEditingArea","addCuratorPoints","addEditorObject","addEventHandler","addForce","addForceGeneratorRTD","addGoggles","addGroupIcon","addHandgunItem","addHeadgear","addItem","addItemCargo","addItemCargoGlobal","addItemPool","addItemToBackpack","addItemTo\
Uniform","addItemToVest","addLiveStats","addMagazine","addMagazineAmmoCargo","addMagazineCargo","addMagazineCargoGlobal","addMagazineGlobal","addMagazinePool","addMagazines","addMagazineTurret","addMenu","addMenuItem","addMissionEventHandler","addMPEventHandler","addMusicEventHandler","addonFiles","addOwnedMine","addPlayerScores","addPrimaryWeaponItem","addPublicVariableEventHandler","addRating","addResources","addScore","addScoreSide","addSecondaryWeaponItem","addSwitchableUnit","addTeamMember",
"addToRemainsCollector","addTorque","addUniform","addUserActionEventHandler","addVehicle","addVest","addWaypoint","addWeapon","addWeaponCargo","addWeaponCargoGlobal","addWeaponGlobal","addWeaponItem","addWeaponPool","addWeaponTurret","addWeaponWithAttachmentsCargo","addWeaponWithAttachmentsCargoGlobal","admin","agent","agents","AGLToASL","aimedAtTarget","aimPos","airDensityCurveRTD","airDensityRTD","airplaneThrottle","airportSide","AISFinishHeal","alive","all3DENEntities","allActiveTitleEffects",
"allAddonsInfo","allAirports","allControls","allCurators","allCutLayers","allDead","allDeadMen","allDiaryRecords","allDiarySubjects","allDisplays","allEnv3DSoundSources","allGroups","allLODs","allMapMarkers","allMines","allMissionObjects","allObjects","allow3DMode","allowCrewInImmobile","allowCuratorLogicIgnoreAreas","allowDamage","allowDammage","allowedService","allowFileOperations","allowFleeing","allowGetIn","allowService","allowSprint","allPlayers","allSimpleObjects","allSites","allTurrets",
"allUnits","allUnitsUAV","allUsers","allVariables","ambientTemperature","ammo","ammoOnPylon","and","animate","animateBay","animateDoor","animatePylon","animateSource","animationNames","animationPhase","animationSourcePhase","animationState","apertureParams","append","apply","armoryPoints","arrayIntersect","asin","ASLToAGL","ASLToATL","assert","assignAsCargo","assignAsCargoIndex","assignAsCommander","assignAsDriver","assignAsGunner","assignAsTurret","assignCurator","assignedCargo","assignedComman\
der","assignedDriver","assignedGroup","assignedGunner","assignedItems","assignedTarget","assignedTeam","assignedVehicle","assignedVehicleRole","assignedVehicles","assignItem","assignTeam","assignToAirport","atan","atan2","atg","ATLToASL","attachedObject","attachedObjects","attachedTo","attachObject","attachTo","attackEnabled","awake","backpack","backpackCargo","backpackContainer","backpackItems","backpackMagazines","backpackSpaceFor","behaviour","benchmark","bezierInterpolation","binocular","bin\
ocularItems","binocularMagazine","boundingBox","boundingBoxReal","boundingCenter","brakesDisabled","briefingName","buildingExit","buildingPos","buldozer_EnableRoadDiag","buldozer_IsEnabledRoadDiag","buldozer_LoadNewRoads","buldozer_reloadOperMap","buttonAction","buttonSetAction","cadetMode","calculatePath","calculatePlayerVisibilityByFriendly","call","callExtension","camCommand","camCommit","camCommitPrepared","camCommitted","camConstuctionSetParams","camCreate","camDestroy","cameraEffect","came\
raEffectEnableHUD","cameraInterest","cameraOn","cameraView","campaignConfigFile","camPreload","camPreloaded","camPrepareBank","camPrepareDir","camPrepareDive","camPrepareFocus","camPrepareFov","camPrepareFovRange","camPreparePos","camPrepareRelPos","camPrepareTarget","camSetBank","camSetDir","camSetDive","camSetFocus","camSetFov","camSetFovRange","camSetPos","camSetRelPos","camSetTarget","camTarget","camUseNVG","canAdd","canAddItemToBackpack","canAddItemToUniform","canAddItemToVest","cancelSimpl\
eTaskDestination","canDeployWeapon","canFire","canMove","canSlingLoad","canStand","canSuspend","canTriggerDynamicSimulation","canUnloadInCombat","canVehicleCargo","captive","captiveNum","cbChecked","cbSetChecked","ceil","channelEnabled","cheatsEnabled","checkAIFeature","checkVisibility","className","clear3DENAttribute","clear3DENInventory","clearAllItemsFromBackpack","clearBackpackCargo","clearBackpackCargoGlobal","clearForcesRTD","clearGroupIcons","clearItemCargo","clearItemCargoGlobal","clearI\
temPool","clearMagazineCargo","clearMagazineCargoGlobal","clearMagazinePool","clearOverlay","clearRadio","clearWeaponCargo","clearWeaponCargoGlobal","clearWeaponPool","clientOwner","closeDialog","closeDisplay","closeOverlay","collapseObjectTree","collect3DENHistory","collectiveRTD","collisionDisabledWith","combatBehaviour","combatMode","commandArtilleryFire","commandChat","commander","commandFire","commandFollow","commandFSM","commandGetOut","commandingMenu","commandMove","commandRadio","command\
Stop","commandSuppressiveFire","commandTarget","commandWatch","comment","commitOverlay","compatibleItems","compatibleMagazines","compile","compileFinal","compileScript","completedFSM","composeText","configClasses","configFile","configHierarchy","configName","configOf","configProperties","configSourceAddonList","configSourceMod","configSourceModList","confirmSensorTarget","connectTerminalToUAV","connectToServer","controlsGroupCtrl","conversationDisabled","copyFromClipboard","copyToClipboard","cop\
yWaypoints","cos","count","countEnemy","countFriendly","countSide","countType","countUnknown","create3DENComposition","create3DENEntity","createAgent","createCenter","createDialog","createDiaryLink","createDiaryRecord","createDiarySubject","createDisplay","createGearDialog","createGroup","createGuardedPoint","createHashMap","createHashMapFromArray","createLocation","createMarker","createMarkerLocal","createMenu","createMine","createMissionDisplay","createMPCampaignDisplay","createSimpleObject","\
createSimpleTask","createSite","createSoundSource","createTask","createTeam","createTrigger","createUnit","createVehicle","createVehicleCrew","createVehicleLocal","crew","ctAddHeader","ctAddRow","ctClear","ctCurSel","ctData","ctFindHeaderRows","ctFindRowHeader","ctHeaderControls","ctHeaderCount","ctRemoveHeaders","ctRemoveRows","ctrlActivate","ctrlAddEventHandler","ctrlAngle","ctrlAnimateModel","ctrlAnimationPhaseModel","ctrlAt","ctrlAutoScrollDelay","ctrlAutoScrollRewind","ctrlAutoScrollSpeed",
"ctrlBackgroundColor","ctrlChecked","ctrlClassName","ctrlCommit","ctrlCommitted","ctrlCreate","ctrlDelete","ctrlEnable","ctrlEnabled","ctrlFade","ctrlFontHeight","ctrlForegroundColor","ctrlHTMLLoaded","ctrlIDC","ctrlIDD","ctrlMapAnimAdd","ctrlMapAnimClear","ctrlMapAnimCommit","ctrlMapAnimDone","ctrlMapCursor","ctrlMapMouseOver","ctrlMapPosition","ctrlMapScale","ctrlMapScreenToWorld","ctrlMapSetPosition","ctrlMapWorldToScreen","ctrlModel","ctrlModelDirAndUp","ctrlModelScale","ctrlMousePosition","\
ctrlParent","ctrlParentControlsGroup","ctrlPosition","ctrlRemoveAllEventHandlers","ctrlRemoveEventHandler","ctrlScale","ctrlScrollValues","ctrlSetActiveColor","ctrlSetAngle","ctrlSetAutoScrollDelay","ctrlSetAutoScrollRewind","ctrlSetAutoScrollSpeed","ctrlSetBackgroundColor","ctrlSetChecked","ctrlSetDisabledColor","ctrlSetEventHandler","ctrlSetFade","ctrlSetFocus","ctrlSetFont","ctrlSetFontH1","ctrlSetFontH1B","ctrlSetFontH2","ctrlSetFontH2B","ctrlSetFontH3","ctrlSetFontH3B","ctrlSetFontH4","ctrl\
SetFontH4B","ctrlSetFontH5","ctrlSetFontH5B","ctrlSetFontH6","ctrlSetFontH6B","ctrlSetFontHeight","ctrlSetFontHeightH1","ctrlSetFontHeightH2","ctrlSetFontHeightH3","ctrlSetFontHeightH4","ctrlSetFontHeightH5","ctrlSetFontHeightH6","ctrlSetFontHeightSecondary","ctrlSetFontP","ctrlSetFontPB","ctrlSetFontSecondary","ctrlSetForegroundColor","ctrlSetModel","ctrlSetModelDirAndUp","ctrlSetModelScale","ctrlSetMousePosition","ctrlSetPixelPrecision","ctrlSetPosition","ctrlSetPositionH","ctrlSetPositionW","\
ctrlSetPositionX","ctrlSetPositionY","ctrlSetScale","ctrlSetScrollValues","ctrlSetShadow","ctrlSetStructuredText","ctrlSetText","ctrlSetTextColor","ctrlSetTextColorSecondary","ctrlSetTextSecondary","ctrlSetTextSelection","ctrlSetTooltip","ctrlSetTooltipColorBox","ctrlSetTooltipColorShade","ctrlSetTooltipColorText","ctrlSetTooltipMaxWidth","ctrlSetURL","ctrlSetURLOverlayMode","ctrlShadow","ctrlShow","ctrlShown","ctrlStyle","ctrlText","ctrlTextColor","ctrlTextHeight","ctrlTextSecondary","ctrlTextS\
election","ctrlTextWidth","ctrlTooltip","ctrlType","ctrlURL","ctrlURLOverlayMode","ctrlVisible","ctRowControls","ctRowCount","ctSetCurSel","ctSetData","ctSetHeaderTemplate","ctSetRowTemplate","ctSetValue","ctValue","curatorAddons","curatorCamera","curatorCameraArea","curatorCameraAreaCeiling","curatorCoef","curatorEditableObjects","curatorEditingArea","curatorEditingAreaType","curatorMouseOver","curatorPoints","curatorRegisteredObjects","curatorSelected","curatorWaypointCost","current3DENOperati\
on","currentChannel","currentCommand","currentMagazine","currentMagazineDetail","currentMagazineDetailTurret","currentMagazineTurret","currentMuzzle","currentNamespace","currentPilot","currentTask","currentTasks","currentThrowable","currentVisionMode","currentWaypoint","currentWeapon","currentWeaponMode","currentWeaponTurret","currentZeroing","cursorObject","cursorTarget","customChat","customRadio","customWaypointPosition","cutFadeOut","cutObj","cutRsc","cutText","damage","date","dateToNumber","\
dayTime","deActivateKey","debriefingText","debugFSM","debugLog","decayGraphValues","deg","delete3DENEntities","deleteAt","deleteCenter","deleteCollection","deleteEditorObject","deleteGroup","deleteGroupWhenEmpty","deleteIdentity","deleteLocation","deleteMarker","deleteMarkerLocal","deleteRange","deleteResources","deleteSite","deleteStatus","deleteTeam","deleteVehicle","deleteVehicleCrew","deleteWaypoint","detach","detectedMines","diag_activeMissionFSMs","diag_activeScripts","diag_activeSQFScript\
s","diag_activeSQSScripts","diag_allMissionEventHandlers","diag_captureFrame","diag_captureFrameToFile","diag_captureSlowFrame","diag_codePerformance","diag_deltaTime","diag_drawmode","diag_dumpCalltraceToLog","diag_dumpScriptAssembly","diag_dumpTerrainSynth","diag_dynamicSimulationEnd","diag_enable","diag_enabled","diag_exportConfig","diag_exportTerrainSVG","diag_fps","diag_fpsmin","diag_frameno","diag_getTerrainSegmentOffset","diag_lightNewLoad","diag_list","diag_localized","diag_log","diag_lo\
gSlowFrame","diag_mergeConfigFile","diag_recordTurretLimits","diag_resetFSM","diag_resetshapes","diag_scope","diag_setLightNew","diag_stacktrace","diag_tickTime","diag_toggle","dialog","diarySubjectExists","didJIP","didJIPOwner","difficulty","difficultyEnabled","difficultyEnabledRTD","difficultyOption","direction","directionStabilizationEnabled","directSay","disableAI","disableBrakes","disableCollisionWith","disableConversation","disableDebriefingStats","disableMapIndicators","disableNVGEquipmen\
t","disableRemoteSensors","disableSerialization","disableTIEquipment","disableUAVConnectability","disableUserInput","displayAddEventHandler","displayChild","displayCtrl","displayParent","displayRemoveAllEventHandlers","displayRemoveEventHandler","displaySetEventHandler","displayUniqueName","displayUpdate","dissolveTeam","distance","distance2D","distanceSqr","distributionRegion","do3DENAction","doArtilleryFire","doFire","doFollow","doFSM","doGetOut","doMove","doorPhase","doStop","doSuppressiveFir\
e","doTarget","doWatch","drawArrow","drawEllipse","drawIcon","drawIcon3D","drawLaser","drawLine","drawLine3D","drawLink","drawLocation","drawPolygon","drawRectangle","drawTriangle","driver","drop","dynamicSimulationDistance","dynamicSimulationDistanceCoef","dynamicSimulationEnabled","dynamicSimulationSystemEnabled","echo","edit3DENMissionAttributes","editObject","editorSetEventHandler","effectiveCommander","elevatePeriscope","emptyPositions","enableAI","enableAIFeature","enableAimPrecision","ena\
bleAttack","enableAudioFeature","enableAutoStartUpRTD","enableAutoTrimRTD","enableCamShake","enableCaustics","enableChannel","enableCollisionWith","enableCopilot","enableDebriefingStats","enableDiagLegend","enableDirectionStabilization","enableDynamicSimulation","enableDynamicSimulationSystem","enableEndDialog","enableEngineArtillery","enableEnvironment","enableFatigue","enableGunLights","enableInfoPanelComponent","enableIRLasers","enableMimics","enablePersonTurret","enableRadio","enableReload",
"enableRopeAttach","enableSatNormalOnDetail","enableSaving","enableSentences","enableSimulation","enableSimulationGlobal","enableStamina","enableStressDamage","enableTeamSwitch","enableTraffic","enableUAVConnectability","enableUAVWaypoints","enableVehicleCargo","enableVehicleSensor","enableWeaponDisassembly","endLoadingScreen","endMission","engineOn","enginesIsOnRTD","enginesPowerRTD","enginesRpmRTD","enginesTorqueRTD","entities","environmentEnabled","environmentVolume","equipmentDisabled","esti\
matedEndServerTime","estimatedTimeLeft","evalObjectArgument","everyBackpack","everyContainer","exec","execEditorScript","execFSM","execVM","exp","expectedDestination","exportJIPMessages","eyeDirection","eyePos","face","faction","fadeEnvironment","fadeMusic","fadeRadio","fadeSound","fadeSpeech","failMission","fileExists","fillWeaponsFromPool","find","findAny","findCover","findDisplay","findEditorObject","findEmptyPosition","findEmptyPositionReady","findIf","findNearestEnemy","finishMissionInit","\
finite","fire","fireAtTarget","firstBackpack","flag","flagAnimationPhase","flagOwner","flagSide","flagTexture","flatten","fleeing","floor","flyInHeight","flyInHeightASL","focusedCtrl","fog","fogForecast","fogParams","forceAddUniform","forceAtPositionRTD","forceCadetDifficulty","forcedMap","forceEnd","forceFlagTexture","forceFollowRoad","forceGeneratorRTD","forceMap","forceRespawn","forceSpeed","forceUnicode","forceWalk","forceWeaponFire","forceWeatherChange","forEachMember","forEachMemberAgent",
"forEachMemberTeam","forgetTarget","format","formation","formationDirection","formationLeader","formationMembers","formationPosition","formationTask","formatText","formLeader","freeExtension","freeLook","fromEditor","fuel","fullCrew","gearIDCAmmoCount","gearSlotAmmoCount","gearSlotData","gestureState","get","get3DENActionState","get3DENAttribute","get3DENCamera","get3DENConnections","get3DENEntity","get3DENEntityID","get3DENGrid","get3DENIconsVisible","get3DENLayerEntities","get3DENLinesVisible",
"get3DENMissionAttribute","get3DENMouseOver","get3DENSelected","getAimingCoef","getAllEnv3DSoundControllers","getAllEnvSoundControllers","getAllHitPointsDamage","getAllOwnedMines","getAllPylonsInfo","getAllSoundControllers","getAllUnitTraits","getAmmoCargo","getAnimAimPrecision","getAnimSpeedCoef","getArray","getArtilleryAmmo","getArtilleryComputerSettings","getArtilleryETA","getAssetDLCInfo","getAssignedCuratorLogic","getAssignedCuratorUnit","getAttackTarget","getAudioOptionVolumes","getBackpac\
kCargo","getBleedingRemaining","getBurningValue","getCalculatePlayerVisibilityByFriendly","getCameraViewDirection","getCargoIndex","getCenterOfMass","getClientState","getClientStateNumber","getCompatiblePylonMagazines","getConnectedUAV","getConnectedUAVUnit","getContainerMaxLoad","getCorpse","getCruiseControl","getCursorObjectParams","getCustomAimCoef","getCustomSoundController","getCustomSoundControllerCount","getDammage","getDebriefingText","getDescription","getDir","getDirVisual","getDiverSta\
te","getDLCAssetsUsage","getDLCAssetsUsageByName","getDLCs","getDLCUsageTime","getEditorCamera","getEditorMode","getEditorObjectScope","getElevationOffset","getEngineTargetRPMRTD","getEnv3DSoundController","getEnvSoundController","getEventHandlerInfo","getFatigue","getFieldManualStartPage","getForcedFlagTexture","getForcedSpeed","getFriend","getFSMVariable","getFuelCargo","getGraphValues","getGroupIcon","getGroupIconParams","getGroupIcons","getHideFrom","getHit","getHitIndex","getHitPointDamage",
"getItemCargo","getLighting","getLightingAt","getLoadedModsInfo","getMagazineCargo","getMarkerColor","getMarkerPos","getMarkerSize","getMarkerType","getMass","getMissionConfig","getMissionConfigValue","getMissionDLCs","getMissionLayerEntities","getMissionLayers","getMissionPath","getModelInfo","getMousePosition","getMusicPlayedTime","getNumber","getObjectArgument","getObjectChildren","getObjectDLC","getObjectFOV","getObjectID","getObjectMaterials","getObjectProxy","getObjectScale","getObjectText\
ures","getObjectType","getObjectViewDistance","getOpticsMode","getOrDefault","getOrDefaultCall","getOxygenRemaining","getPersonUsedDLCs","getPilotCameraDirection","getPilotCameraPosition","getPilotCameraRotation","getPilotCameraTarget","getPiPViewDistance","getPlateNumber","getPlayerChannel","getPlayerID","getPlayerScores","getPlayerUID","getPlayerVoNVolume","getPos","getPosASL","getPosASLVisual","getPosASLW","getPosATL","getPosATLVisual","getPosVisual","getPosWorld","getPosWorldVisual","getPylo\
nMagazines","getRelDir","getRelPos","getRemoteSensorsDisabled","getRepairCargo","getResolution","getRoadInfo","getRotorBrakeRTD","getSensorTargets","getSensorThreats","getShadowDistance","getShotParents","getSlingLoad","getSoundController","getSoundControllerResult","getSpeed","getStamina","getStatValue","getSteamFriendsServers","getSubtitleOptions","getSuppression","getTerrainGrid","getTerrainHeight","getTerrainHeightASL","getTerrainInfo","getText","getTextRaw","getTextureInfo","getTextWidth","\
getTiParameters","getTotalDLCUsageTime","getTrimOffsetRTD","getTurretLimits","getTurretOpticsMode","getUnitFreefallInfo","getUnitLoadout","getUnitTrait","getUnloadInCombat","getUserInfo","getUserMFDText","getUserMFDValue","getVariable","getVehicleCargo","getVehicleTiPars","getWeaponCargo","getWeaponSway","getWingsOrientationRTD","getWingsPositionRTD","getWPPos","glanceAt","globalChat","globalRadio","goggles","goto","group","groupChat","groupFromNetId","groupIconSelectable","groupIconsVisible","g\
roupID","groupOwner","groupRadio","groups","groupSelectedUnits","groupSelectUnit","gunner","gusts","halt","handgunItems","handgunMagazine","handgunWeapon","handsHit","hashValue","hasInterface","hasPilotCamera","hasWeapon","hcAllGroups","hcGroupParams","hcLeader","hcRemoveAllGroups","hcRemoveGroup","hcSelected","hcSelectGroup","hcSetGroup","hcShowBar","hcShownBar","headgear","hideBody","hideObject","hideObjectGlobal","hideSelection","hint","hintC","hintCadet","hintSilent","hmd","hostMission","htm\
lLoad","HUDMovementLevels","humidity","image","importAllGroups","importance","in","inArea","inAreaArray","incapacitatedState","inflame","inflamed","infoPanel","infoPanelComponentEnabled","infoPanelComponents","infoPanels","inGameUISetEventHandler","inheritsFrom","initAmbientLife","inPolygon","inputAction","inputController","inputMouse","inRangeOfArtillery","insert","insertEditorObject","intersect","is3DEN","is3DENMultiplayer","is3DENPreview","isAbleToBreathe","isActionMenuVisible","isAgent","isA\
imPrecisionEnabled","isAllowedCrewInImmobile","isArray","isAutoHoverOn","isAutonomous","isAutoStartUpEnabledRTD","isAutotest","isAutoTrimOnRTD","isAwake","isBleeding","isBurning","isClass","isCollisionLightOn","isCopilotEnabled","isDamageAllowed","isDedicated","isDLCAvailable","isEngineOn","isEqualRef","isEqualTo","isEqualType","isEqualTypeAll","isEqualTypeAny","isEqualTypeArray","isEqualTypeParams","isFilePatchingEnabled","isFinal","isFlashlightOn","isFlatEmpty","isForcedWalk","isFormationLeade\
r","isGameFocused","isGamePaused","isGroupDeletedWhenEmpty","isHidden","isInRemainsCollector","isInstructorFigureEnabled","isIRLaserOn","isKeyActive","isKindOf","isLaserOn","isLightOn","isLocalized","isManualFire","isMarkedForCollection","isMissionProfileNamespaceLoaded","isMultiplayer","isMultiplayerSolo","isNil","isNotEqualRef","isNotEqualTo","isNull","isNumber","isObjectHidden","isObjectRTD","isOnRoad","isPiPEnabled","isPlayer","isRealTime","isRemoteExecuted","isRemoteExecutedJIP","isSaving",
"isSensorTargetConfirmed","isServer","isShowing3DIcons","isSimpleObject","isSprintAllowed","isStaminaEnabled","isSteamMission","isSteamOverlayEnabled","isStreamFriendlyUIEnabled","isStressDamageEnabled","isText","isTouchingGround","isTurnedOut","isTutHintsEnabled","isUAVConnectable","isUAVConnected","isUIContext","isUniformAllowed","isVehicleCargo","isVehicleRadarOn","isVehicleSensorEnabled","isWalking","isWeaponDeployed","isWeaponRested","itemCargo","items","itemsWithMagazines","join","joinAs",
"joinAsSilent","joinSilent","joinString","kbAddDatabase","kbAddDatabaseTargets","kbAddTopic","kbHasTopic","kbReact","kbRemoveTopic","kbTell","kbWasSaid","keyImage","keyName","keys","knowsAbout","land","landAt","landResult","language","laserTarget","lbAdd","lbClear","lbColor","lbColorRight","lbCurSel","lbData","lbDelete","lbIsSelected","lbPicture","lbPictureRight","lbSelection","lbSetColor","lbSetColorRight","lbSetCurSel","lbSetData","lbSetPicture","lbSetPictureColor","lbSetPictureColorDisabled",
"lbSetPictureColorSelected","lbSetPictureRight","lbSetPictureRightColor","lbSetPictureRightColorDisabled","lbSetPictureRightColorSelected","lbSetSelectColor","lbSetSelectColorRight","lbSetSelected","lbSetText","lbSetTextRight","lbSetTooltip","lbSetValue","lbSize","lbSort","lbSortBy","lbSortByValue","lbText","lbTextRight","lbTooltip","lbValue","leader","leaderboardDeInit","leaderboardGetRows","leaderboardInit","leaderboardRequestRowsFriends","leaderboardRequestRowsGlobal","leaderboardRequestRowsG\
lobalAroundUser","leaderboardsRequestUploadScore","leaderboardsRequestUploadScoreKeepBest","leaderboardState","leaveVehicle","libraryCredits","libraryDisclaimers","lifeState","lightAttachObject","lightDetachObject","lightIsOn","lightnings","limitSpeed","linearConversion","lineIntersects","lineIntersectsObjs","lineIntersectsSurfaces","lineIntersectsWith","linkItem","list","listObjects","listRemoteTargets","listVehicleSensors","ln","lnbAddArray","lnbAddColumn","lnbAddRow","lnbClear","lnbColor","ln\
bColorRight","lnbCurSelRow","lnbData","lnbDeleteColumn","lnbDeleteRow","lnbGetColumnsPosition","lnbPicture","lnbPictureRight","lnbSetColor","lnbSetColorRight","lnbSetColumnsPos","lnbSetCurSelRow","lnbSetData","lnbSetPicture","lnbSetPictureColor","lnbSetPictureColorRight","lnbSetPictureColorSelected","lnbSetPictureColorSelectedRight","lnbSetPictureRight","lnbSetText","lnbSetTextRight","lnbSetTooltip","lnbSetValue","lnbSize","lnbSort","lnbSortBy","lnbSortByValue","lnbText","lnbTextRight","lnbValue",
"load","loadAbs","loadBackpack","loadConfig","loadFile","loadGame","loadIdentity","loadMagazine","loadOverlay","loadStatus","loadUniform","loadVest","localize","localNamespace","locationPosition","lock","lockCameraTo","lockCargo","lockDriver","locked","lockedCameraTo","lockedCargo","lockedDriver","lockedInventory","lockedTurret","lockIdentity","lockInventory","lockTurret","lockWp","log","logEntities","logNetwork","logNetworkTerminate","lookAt","lookAtPos","magazineCargo","magazines","magazinesAl\
lTurrets","magazinesAmmo","magazinesAmmoCargo","magazinesAmmoFull","magazinesDetail","magazinesDetailBackpack","magazinesDetailUniform","magazinesDetailVest","magazinesTurret","magazineTurretAmmo","mapAnimAdd","mapAnimClear","mapAnimCommit","mapAnimDone","mapCenterOnCamera","mapGridPosition","markAsFinishedOnSteam","markerAlpha","markerBrush","markerChannel","markerColor","markerDir","markerPolyline","markerPos","markerShadow","markerShape","markerSize","markerText","markerType","matrixMultiply",
"matrixTranspose","max","maxLoad","members","menuAction","menuAdd","menuChecked","menuClear","menuCollapse","menuData","menuDelete","menuEnable","menuEnabled","menuExpand","menuHover","menuPicture","menuSetAction","menuSetCheck","menuSetData","menuSetPicture","menuSetShortcut","menuSetText","menuSetURL","menuSetValue","menuShortcut","menuShortcutText","menuSize","menuSort","menuText","menuURL","menuValue","merge","min","mineActive","mineDetectedBy","missileTarget","missileTargetPos","missionConf\
igFile","missionDifficulty","missionEnd","missionName","missionNameSource","missionNamespace","missionProfileNamespace","missionStart","missionVersion","mod","modelToWorld","modelToWorldVisual","modelToWorldVisualWorld","modelToWorldWorld","modParams","moonIntensity","moonPhase","morale","move","move3DENCamera","moveInAny","moveInCargo","moveInCommander","moveInDriver","moveInGunner","moveInTurret","moveObjectToEnd","moveOut","moveTime","moveTo","moveToCompleted","moveToFailed","musicVolume","na\
me","namedProperties","nameSound","nearEntities","nearestBuilding","nearestLocation","nearestLocations","nearestLocationWithDubbing","nearestMines","nearestObject","nearestObjects","nearestTerrainObjects","nearObjects","nearObjectsReady","nearRoads","nearSupplies","nearTargets","needReload","needService","netId","netObjNull","newOverlay","nextMenuItemIndex","nextWeatherChange","nMenuItems","not","numberOfEnginesRTD","numberToDate","objectCurators","objectFromNetId","objectParent","objStatus","on\
BriefingGroup","onBriefingNotes","onBriefingPlan","onBriefingTeamSwitch","onCommandModeChanged","onDoubleClick","onEachFrame","onGroupIconClick","onGroupIconOverEnter","onGroupIconOverLeave","onHCGroupSelectionChanged","onMapSingleClick","onPlayerConnected","onPlayerDisconnected","onPreloadFinished","onPreloadStarted","onShowNewObject","onTeamSwitch","openCuratorInterface","openDLCPage","openGPS","openMap","openSteamApp","openYoutubeVideo","or","orderGetIn","overcast","overcastForecast","owner",
"param","params","parseNumber","parseSimpleArray","parseText","parsingNamespace","particlesQuality","periscopeElevation","pickWeaponPool","pitch","pixelGrid","pixelGridBase","pixelGridNoUIScale","pixelH","pixelW","playableSlotsNumber","playableUnits","playAction","playActionNow","player","playerRespawnTime","playerSide","playersNumber","playGesture","playMission","playMove","playMoveNow","playMusic","playScriptedMission","playSound","playSound3D","playSoundUI","pose","position","positionCameraTo\
World","posScreenToWorld","posWorldToScreen","ppEffectAdjust","ppEffectCommit","ppEffectCommitted","ppEffectCreate","ppEffectDestroy","ppEffectEnable","ppEffectEnabled","ppEffectForceInNVG","precision","preloadCamera","preloadObject","preloadSound","preloadTitleObj","preloadTitleRsc","preprocessFile","preprocessFileLineNumbers","primaryWeapon","primaryWeaponItems","primaryWeaponMagazine","priority","processDiaryLink","productVersion","profileName","profileNamespace","profileNameSteam","progressL\
oadingScreen","progressPosition","progressSetPosition","publicVariable","publicVariableClient","publicVariableServer","pushBack","pushBackUnique","putWeaponPool","queryItemsPool","queryMagazinePool","queryWeaponPool","rad","radioChannelAdd","radioChannelCreate","radioChannelInfo","radioChannelRemove","radioChannelSetCallSign","radioChannelSetLabel","radioEnabled","radioVolume","rain","rainbow","rainParams","random","rank","rankId","rating","rectangular","regexFind","regexMatch","regexReplace","r\
egisteredTasks","registerTask","reload","reloadEnabled","remoteControl","remoteExec","remoteExecCall","remoteExecutedOwner","remove3DENConnection","remove3DENEventHandler","remove3DENLayer","removeAction","removeAll3DENEventHandlers","removeAllActions","removeAllAssignedItems","removeAllBinocularItems","removeAllContainers","removeAllCuratorAddons","removeAllCuratorCameraAreas","removeAllCuratorEditingAreas","removeAllEventHandlers","removeAllHandgunItems","removeAllItems","removeAllItemsWithMag\
azines","removeAllMissionEventHandlers","removeAllMPEventHandlers","removeAllMusicEventHandlers","removeAllOwnedMines","removeAllPrimaryWeaponItems","removeAllSecondaryWeaponItems","removeAllUserActionEventHandlers","removeAllWeapons","removeBackpack","removeBackpackGlobal","removeBinocularItem","removeCuratorAddons","removeCuratorCameraArea","removeCuratorEditableObjects","removeCuratorEditingArea","removeDiaryRecord","removeDiarySubject","removeDrawIcon","removeDrawLinks","removeEventHandler",
"removeFromRemainsCollector","removeGoggles","removeGroupIcon","removeHandgunItem","removeHeadgear","removeItem","removeItemFromBackpack","removeItemFromUniform","removeItemFromVest","removeItems","removeMagazine","removeMagazineGlobal","removeMagazines","removeMagazinesTurret","removeMagazineTurret","removeMenuItem","removeMissionEventHandler","removeMPEventHandler","removeMusicEventHandler","removeOwnedMine","removePrimaryWeaponItem","removeSecondaryWeaponItem","removeSimpleTask","removeSwitch\
ableUnit","removeTeamMember","removeUniform","removeUserActionEventHandler","removeVest","removeWeapon","removeWeaponAttachmentCargo","removeWeaponCargo","removeWeaponGlobal","removeWeaponTurret","reportRemoteTarget","requiredVersion","resetCamShake","resetSubgroupDirection","resize","resources","respawnVehicle","restartEditorCamera","reveal","revealMine","reverse","reversedMouseY","roadAt","roadsConnectedTo","roleDescription","ropeAttachedObjects","ropeAttachedTo","ropeAttachEnabled","ropeAttac\
hTo","ropeCreate","ropeCut","ropeDestroy","ropeDetach","ropeEndPosition","ropeLength","ropes","ropesAttachedTo","ropeSegments","ropeUnwind","ropeUnwound","rotorsForcesRTD","rotorsRpmRTD","round","runInitScript","safeZoneH","safeZoneW","safeZoneWAbs","safeZoneX","safeZoneXAbs","safeZoneY","save3DENInventory","saveGame","saveIdentity","saveJoysticks","saveMissionProfileNamespace","saveOverlay","saveProfileNamespace","saveStatus","saveVar","savingEnabled","say","say2D","say3D","scopeName","score","\
scoreSide","screenshot","screenToWorld","scriptDone","scriptName","scudState","secondaryWeapon","secondaryWeaponItems","secondaryWeaponMagazine","select","selectBestPlaces","selectDiarySubject","selectedEditorObjects","selectEditorObject","selectionNames","selectionPosition","selectionVectorDirAndUp","selectLeader","selectMax","selectMin","selectNoPlayer","selectPlayer","selectRandom","selectRandomWeighted","selectWeapon","selectWeaponTurret","sendAUMessage","sendSimpleCommand","sendTask","sendT\
askResult","sendUDPMessage","sentencesEnabled","serverCommand","serverCommandAvailable","serverCommandExecutable","serverName","serverNamespace","serverTime","set","set3DENAttribute","set3DENAttributes","set3DENGrid","set3DENIconsVisible","set3DENLayer","set3DENLinesVisible","set3DENLogicType","set3DENMissionAttribute","set3DENMissionAttributes","set3DENModelsVisible","set3DENObjectType","set3DENSelected","setAccTime","setActualCollectiveRTD","setAirplaneThrottle","setAirportSide","setAmmo","set\
AmmoCargo","setAmmoOnPylon","setAnimSpeedCoef","setAperture","setApertureNew","setArmoryPoints","setAttributes","setAutonomous","setBehaviour","setBehaviourStrong","setBleedingRemaining","setBrakesRTD","setCameraInterest","setCamShakeDefParams","setCamShakeParams","setCamUseTi","setCaptive","setCenterOfMass","setCollisionLight","setCombatBehaviour","setCombatMode","setCompassOscillation","setConvoySeparation","setCruiseControl","setCuratorCameraAreaCeiling","setCuratorCoef","setCuratorEditingAre\
aType","setCuratorWaypointCost","setCurrentChannel","setCurrentTask","setCurrentWaypoint","setCustomAimCoef","SetCustomMissionData","setCustomSoundController","setCustomWeightRTD","setDamage","setDammage","setDate","setDebriefingText","setDefaultCamera","setDestination","setDetailMapBlendPars","setDiaryRecordText","setDiarySubjectPicture","setDir","setDirection","setDrawIcon","setDriveOnPath","setDropInterval","setDynamicSimulationDistance","setDynamicSimulationDistanceCoef","setEditorMode","set\
EditorObjectScope","setEffectCondition","setEffectiveCommander","setEngineRpmRTD","setFace","setFaceanimation","setFatigue","setFeatureType","setFlagAnimationPhase","setFlagOwner","setFlagSide","setFlagTexture","setFog","setForceGeneratorRTD","setFormation","setFormationTask","setFormDir","setFriend","setFromEditor","setFSMVariable","setFuel","setFuelCargo","setGroupIcon","setGroupIconParams","setGroupIconsSelectable","setGroupIconsVisible","setGroupid","setGroupIdGlobal","setGroupOwner","setGus\
ts","setHideBehind","setHit","setHitIndex","setHitPointDamage","setHorizonParallaxCoef","setHUDMovementLevels","setHumidity","setIdentity","setImportance","setInfoPanel","setLeader","setLightAmbient","setLightAttenuation","setLightBrightness","setLightColor","setLightConePars","setLightDayLight","setLightFlareMaxDistance","setLightFlareSize","setLightIntensity","setLightIR","setLightnings","setLightUseFlare","setLightVolumeShape","setLocalWindParams","setMagazineTurretAmmo","setMarkerAlpha","set\
MarkerAlphaLocal","setMarkerBrush","setMarkerBrushLocal","setMarkerColor","setMarkerColorLocal","setMarkerDir","setMarkerDirLocal","setMarkerPolyline","setMarkerPolylineLocal","setMarkerPos","setMarkerPosLocal","setMarkerShadow","setMarkerShadowLocal","setMarkerShape","setMarkerShapeLocal","setMarkerSize","setMarkerSizeLocal","setMarkerText","setMarkerTextLocal","setMarkerType","setMarkerTypeLocal","setMass","setMaxLoad","setMimic","setMissileTarget","setMissileTargetPos","setMousePosition","set\
MusicEffect","setMusicEventHandler","setName","setNameSound","setObjectArguments","setObjectMaterial","setObjectMaterialGlobal","setObjectProxy","setObjectScale","setObjectTexture","setObjectTextureGlobal","setObjectViewDistance","setOpticsMode","setOvercast","setOwner","setOxygenRemaining","setParticleCircle","setParticleClass","setParticleFire","setParticleParams","setParticleRandom","setPilotCameraDirection","setPilotCameraRotation","setPilotCameraTarget","setPilotLight","setPiPEffect","setPi\
PViewDistance","setPitch","setPlateNumber","setPlayable","setPlayerRespawnTime","setPlayerVoNVolume","setPos","setPosASL","setPosASL2","setPosASLW","setPosATL","setPosition","setPosWorld","setPylonLoadout","setPylonsPriority","setRadioMsg","setRain","setRainbow","setRandomLip","setRank","setRectangular","setRepairCargo","setRotorBrakeRTD","setShadowDistance","setShotParents","setSide","setSimpleTaskAlwaysVisible","setSimpleTaskCustomData","setSimpleTaskDescription","setSimpleTaskDestination","se\
tSimpleTaskTarget","setSimpleTaskType","setSimulWeatherLayers","setSize","setSkill","setSlingLoad","setSoundEffect","setSpeaker","setSpeech","setSpeedMode","setStamina","setStaminaScheme","setStatValue","setSuppression","setSystemOfUnits","setTargetAge","setTaskMarkerOffset","setTaskResult","setTaskState","setTerrainGrid","setTerrainHeight","setText","setTimeMultiplier","setTiParameter","setTitleEffect","setTowParent","setTrafficDensity","setTrafficDistance","setTrafficGap","setTrafficSpeed","se\
tTriggerActivation","setTriggerArea","setTriggerInterval","setTriggerStatements","setTriggerText","setTriggerTimeout","setTriggerType","setTurretLimits","setTurretOpticsMode","setType","setUnconscious","setUnitAbility","setUnitCombatMode","setUnitFreefallHeight","setUnitLoadout","setUnitPos","setUnitPosWeak","setUnitRank","setUnitRecoilCoefficient","setUnitTrait","setUnloadInCombat","setUserActionText","setUserMFDText","setUserMFDValue","setVariable","setVectorDir","setVectorDirAndUp","setVector\
Up","setVehicleAmmo","setVehicleAmmoDef","setVehicleArmor","setVehicleCargo","setVehicleId","setVehicleLock","setVehiclePosition","setVehicleRadar","setVehicleReceiveRemoteTargets","setVehicleReportOwnPosition","setVehicleReportRemoteTargets","setVehicleTiPars","setVehicleVarName","setVelocity","setVelocityModelSpace","setVelocityTransformation","setViewDistance","setVisibleIfTreeCollapsed","setWantedRPMRTD","setWaves","setWaypointBehaviour","setWaypointCombatMode","setWaypointCompletionRadius",
"setWaypointDescription","setWaypointForceBehaviour","setWaypointFormation","setWaypointHousePosition","setWaypointLoiterAltitude","setWaypointLoiterRadius","setWaypointLoiterType","setWaypointName","setWaypointPosition","setWaypointScript","setWaypointSpeed","setWaypointStatements","setWaypointTimeout","setWaypointType","setWaypointVisible","setWeaponReloadingTime","setWeaponZeroing","setWind","setWindDir","setWindForce","setWindStr","setWingForceScaleRTD","setWPPos","show3DIcons","showChat","s\
howCinemaBorder","showCommandingMenu","showCompass","showCuratorCompass","showGps","showHUD","showLegend","showMap","shownArtilleryComputer","shownChat","shownCompass","shownCuratorCompass","showNewEditorObject","shownGps","shownHUD","shownMap","shownPad","shownRadio","shownScoretable","shownSubtitles","shownUAVFeed","shownWarrant","shownWatch","showPad","showRadio","showScoretable","showSubtitles","showUAVFeed","showWarrant","showWatch","showWaypoint","showWaypoints","side","sideChat","sideRadi\
o","simpleTasks","simulationEnabled","simulCloudDensity","simulCloudOcclusion","simulInClouds","simulWeatherSync","sin","size","sizeOf","skill","skillFinal","skipTime","sleep","sliderPosition","sliderRange","sliderSetPosition","sliderSetRange","sliderSetSpeed","sliderSpeed","slingLoadAssistantShown","soldierMagazines","someAmmo","sort","soundVolume","spawn","speaker","speechVolume","speed","speedMode","splitString","sqrt","squadParams","stance","startLoadingScreen","stop","stopEngineRTD","stoppe\
d","str","sunOrMoon","supportInfo","suppressFor","surfaceIsWater","surfaceNormal","surfaceTexture","surfaceType","swimInDepth","switchableUnits","switchAction","switchCamera","switchGesture","switchLight","switchMove","synchronizedObjects","synchronizedTriggers","synchronizedWaypoints","synchronizeObjectsAdd","synchronizeObjectsRemove","synchronizeTrigger","synchronizeWaypoint","systemChat","systemOfUnits","systemTime","systemTimeUTC","tan","targetKnowledge","targets","targetsAggregate","targets\
Query","taskAlwaysVisible","taskChildren","taskCompleted","taskCustomData","taskDescription","taskDestination","taskHint","taskMarkerOffset","taskName","taskParent","taskResult","taskState","taskType","teamMember","teamName","teams","teamSwitch","teamSwitchEnabled","teamType","terminate","terrainIntersect","terrainIntersectASL","terrainIntersectAtASL","text","textLog","textLogFormat","tg","time","timeMultiplier","titleCut","titleFadeOut","titleObj","titleRsc","titleText","toArray","toFixed","toL\
ower","toLowerANSI","toString","toUpper","toUpperANSI","triggerActivated","triggerActivation","triggerAmmo","triggerArea","triggerAttachedVehicle","triggerAttachObject","triggerAttachVehicle","triggerDynamicSimulation","triggerInterval","triggerStatements","triggerText","triggerTimeout","triggerTimeoutCurrent","triggerType","trim","turretLocal","turretOwner","turretUnit","tvAdd","tvClear","tvCollapse","tvCollapseAll","tvCount","tvCurSel","tvData","tvDelete","tvExpand","tvExpandAll","tvIsSelected",
"tvPicture","tvPictureRight","tvSelection","tvSetColor","tvSetCurSel","tvSetData","tvSetPicture","tvSetPictureColor","tvSetPictureColorDisabled","tvSetPictureColorSelected","tvSetPictureRight","tvSetPictureRightColor","tvSetPictureRightColorDisabled","tvSetPictureRightColorSelected","tvSetSelectColor","tvSetSelected","tvSetText","tvSetTooltip","tvSetValue","tvSort","tvSortAll","tvSortByValue","tvSortByValueAll","tvText","tvTooltip","tvValue","type","typeName","typeOf","UAVControl","uiNamespace",
"uiSleep","unassignCurator","unassignItem","unassignTeam","unassignVehicle","underwater","uniform","uniformContainer","uniformItems","uniformMagazines","uniqueUnitItems","unitAddons","unitAimPosition","unitAimPositionVisual","unitBackpack","unitCombatMode","unitIsUAV","unitPos","unitReady","unitRecoilCoefficient","units","unitsBelowHeight","unitTurret","unlinkItem","unlockAchievement","unregisterTask","updateDrawIcon","updateMenuItem","updateObjectTree","useAIOperMapObstructionTest","useAISteeri\
ngComponent","useAudioTimeForMoves","userInputDisabled","values","vectorAdd","vectorCos","vectorCrossProduct","vectorDiff","vectorDir","vectorDirVisual","vectorDistance","vectorDistanceSqr","vectorDotProduct","vectorFromTo","vectorLinearConversion","vectorMagnitude","vectorMagnitudeSqr","vectorModelToWorld","vectorModelToWorldVisual","vectorMultiply","vectorNormalized","vectorUp","vectorUpVisual","vectorWorldToModel","vectorWorldToModelVisual","vehicle","vehicleCargoEnabled","vehicleChat","vehic\
leMoveInfo","vehicleRadio","vehicleReceiveRemoteTargets","vehicleReportOwnPosition","vehicleReportRemoteTargets","vehicles","vehicleVarName","velocity","velocityModelSpace","verifySignature","vest","vestContainer","vestItems","vestMagazines","viewDistance","visibleCompass","visibleGps","visibleMap","visiblePosition","visiblePositionASL","visibleScoretable","visibleWatch","waves","waypointAttachedObject","waypointAttachedVehicle","waypointAttachObject","waypointAttachVehicle","waypointBehaviour",
"waypointCombatMode","waypointCompletionRadius","waypointDescription","waypointForceBehaviour","waypointFormation","waypointHousePosition","waypointLoiterAltitude","waypointLoiterRadius","waypointLoiterType","waypointName","waypointPosition","waypoints","waypointScript","waypointsEnabledUAV","waypointShow","waypointSpeed","waypointStatements","waypointTimeout","waypointTimeoutCurrent","waypointType","waypointVisible","weaponAccessories","weaponAccessoriesCargo","weaponCargo","weaponDirection","w\
eaponInertia","weaponLowered","weaponReloadingTime","weapons","weaponsInfo","weaponsItems","weaponsItemsCargo","weaponState","weaponsTurret","weightRTD","WFSideText","wind","windDir","windRTD","windStr","wingsForcesRTD","worldName","worldSize","worldToModel","worldToModelVisual","worldToScreen"],PREPROCESSOR={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:"define undef ifdef ifndef else endif include if",contains:[{begin:/\\\n/,relevance:0},hljs.inherit(STRINGS,{className:"string"}),{begin:/<[^\n>]*>/,
end:/$/,illegal:"\\n"},hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE]};return{name:"SQF",case_insensitive:!0,keywords:{keyword:KEYWORDS2,built_in:BUILT_IN,literal:LITERAL},contains:[hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.NUMBER_MODE,VARIABLE,FUNCTION,STRINGS,PREPROCESSOR],illegal:[/\$[^a-fA-F0-9]/,/\w\$/,/\?/,/@/,/ \| /,/[a-zA-Z_]\./,/\:\=/,/\[\:/]}}function stan(hljs){const regex=hljs.regex,BLOCKS=["functions","model","data","parameters","quantities","transformed","generat\
ed"],STATEMENTS=["for","in","if","else","while","break","continue","return"],TYPES2=["array","tuple","complex","int","real","vector","complex_vector","ordered","positive_ordered","simplex","unit_vector","row_vector","complex_row_vector","matrix","complex_matrix","cholesky_factor_corr|10","cholesky_factor_cov|10","corr_matrix|10","cov_matrix|10","void"],FUNCTIONS=["abs","acos","acosh","add_diag","algebra_solver","algebra_solver_newton","append_array","append_col","append_row","asin","asinh","atan",
"atan2","atanh","bessel_first_kind","bessel_second_kind","binary_log_loss","block","cbrt","ceil","chol2inv","cholesky_decompose","choose","col","cols","columns_dot_product","columns_dot_self","complex_schur_decompose","complex_schur_decompose_t","complex_schur_decompose_u","conj","cos","cosh","cov_exp_quad","crossprod","csr_extract","csr_extract_u","csr_extract_v","csr_extract_w","csr_matrix_times_vector","csr_to_dense_matrix","cumulative_sum","dae","dae_tol","determinant","diag_matrix","diagona\
l","diag_post_multiply","diag_pre_multiply","digamma","dims","distance","dot_product","dot_self","eigendecompose","eigendecompose_sym","eigenvalues","eigenvalues_sym","eigenvectors","eigenvectors_sym","erf","erfc","exp","exp2","expm1","falling_factorial","fdim","fft","fft2","floor","fma","fmax","fmin","fmod","gamma_p","gamma_q","generalized_inverse","get_imag","get_real","head","hmm_hidden_state_prob","hmm_marginal","hypot","identity_matrix","inc_beta","integrate_1d","integrate_ode","integrate_o\
de_adams","integrate_ode_bdf","integrate_ode_rk45","int_step","inv","inv_cloglog","inv_erfc","inverse","inverse_spd","inv_fft","inv_fft2","inv_inc_beta","inv_logit","inv_Phi","inv_sqrt","inv_square","is_inf","is_nan","lambert_w0","lambert_wm1","lbeta","lchoose","ldexp","lgamma","linspaced_array","linspaced_int_array","linspaced_row_vector","linspaced_vector","lmgamma","lmultiply","log","log1m","log1m_exp","log1m_inv_logit","log1p","log1p_exp","log_determinant","log_diff_exp","log_falling_factori\
al","log_inv_logit","log_inv_logit_diff","logit","log_mix","log_modified_bessel_first_kind","log_rising_factorial","log_softmax","log_sum_exp","machine_precision","map_rect","matrix_exp","matrix_exp_multiply","matrix_power","max","mdivide_left_spd","mdivide_left_tri_low","mdivide_right_spd","mdivide_right_tri_low","mean","min","modified_bessel_first_kind","modified_bessel_second_kind","multiply_lower_tri_self_transpose","negative_infinity","norm","norm1","norm2","not_a_number","num_elements","od\
e_adams","ode_adams_tol","ode_adjoint_tol_ctl","ode_bdf","ode_bdf_tol","ode_ckrk","ode_ckrk_tol","ode_rk45","ode_rk45_tol","one_hot_array","one_hot_int_array","one_hot_row_vector","one_hot_vector","ones_array","ones_int_array","ones_row_vector","ones_vector","owens_t","Phi","Phi_approx","polar","positive_infinity","pow","print","prod","proj","qr","qr_Q","qr_R","qr_thin","qr_thin_Q","qr_thin_R","quad_form","quad_form_diag","quad_form_sym","quantile","rank","reduce_sum","reject","rep_array","rep_m\
atrix","rep_row_vector","rep_vector","reverse","rising_factorial","round","row","rows","rows_dot_product","rows_dot_self","scale_matrix_exp_multiply","sd","segment","sin","singular_values","sinh","size","softmax","sort_asc","sort_desc","sort_indices_asc","sort_indices_desc","sqrt","square","squared_distance","step","sub_col","sub_row","sum","svd","svd_U","svd_V","symmetrize_from_lower_tri","tail","tan","tanh","target","tcrossprod","tgamma","to_array_1d","to_array_2d","to_complex","to_int","to_ma\
trix","to_row_vector","to_vector","trace","trace_gen_quad_form","trace_quad_form","trigamma","trunc","uniform_simplex","variance","zeros_array","zeros_int_array","zeros_row_vector"],DISTRIBUTIONS=["bernoulli","bernoulli_logit","bernoulli_logit_glm","beta","beta_binomial","beta_proportion","binomial","binomial_logit","categorical","categorical_logit","categorical_logit_glm","cauchy","chi_square","dirichlet","discrete_range","double_exponential","exp_mod_normal","exponential","frechet","gamma","ga\
ussian_dlm_obs","gumbel","hmm_latent","hypergeometric","inv_chi_square","inv_gamma","inv_wishart","inv_wishart_cholesky","lkj_corr","lkj_corr_cholesky","logistic","loglogistic","lognormal","multi_gp","multi_gp_cholesky","multinomial","multinomial_logit","multi_normal","multi_normal_cholesky","multi_normal_prec","multi_student_cholesky_t","multi_student_t","multi_student_t_cholesky","neg_binomial","neg_binomial_2","neg_binomial_2_log","neg_binomial_2_log_glm","normal","normal_id_glm","ordered_log\
istic","ordered_logistic_glm","ordered_probit","pareto","pareto_type_2","poisson","poisson_log","poisson_log_glm","rayleigh","scaled_inv_chi_square","skew_double_exponential","skew_normal","std_normal","std_normal_log","student_t","uniform","von_mises","weibull","wiener","wishart","wishart_cholesky"],BLOCK_COMMENT=hljs.COMMENT(/\/\*/,/\*\//,{relevance:0,contains:[{scope:"doctag",match:/@(return|param)/}]}),INCLUDE={scope:"meta",begin:/#include\b/,end:/$/,contains:[{match:/[a-z][a-z-._]+/,scope:"\
string"},hljs.C_LINE_COMMENT_MODE]},RANGE_CONSTRAINTS=["lower","upper","offset","multiplier"];return{name:"Stan",aliases:["stanfuncs"],keywords:{$pattern:hljs.IDENT_RE,title:BLOCKS,type:TYPES2,keyword:STATEMENTS,built_in:FUNCTIONS},contains:[hljs.C_LINE_COMMENT_MODE,INCLUDE,hljs.HASH_COMMENT_MODE,BLOCK_COMMENT,{scope:"built_in",match:/\s(pi|e|sqrt2|log2|log10)(?=\()/,relevance:0},{match:regex.concat(/[<,]\s*/,regex.either(...RANGE_CONSTRAINTS),/\s*=/),keywords:RANGE_CONSTRAINTS},{scope:"keyword",
match:/\btarget(?=\s*\+=)/},{match:[/~\s*/,regex.either(...DISTRIBUTIONS),/(?:\(\))/,/\s*T(?=\s*\[)/],scope:{2:"built_in",4:"keyword"}},{scope:"built_in",keywords:DISTRIBUTIONS,begin:regex.concat(/\w*/,regex.either(...DISTRIBUTIONS),/(_lpdf|_lupdf|_lpmf|_cdf|_lcdf|_lccdf|_qf)(?=\s*[\(.*\)])/)},{begin:[/~/,/\s*/,regex.concat(regex.either(...DISTRIBUTIONS),/(?=\s*[\(.*\)])/)],scope:{3:"built_in"}},{begin:[/~/,/\s*\w+(?=\s*[\(.*\)])/,"(?!.*/\b("+regex.either(...DISTRIBUTIONS)+")\b)"],scope:{2:"titl\
e.function"}},{scope:"title.function",begin:/\w*(_lpdf|_lupdf|_lpmf|_cdf|_lcdf|_lccdf|_qf)(?=\s*[\(.*\)])/},{scope:"number",match:regex.concat(/(?:\b\d+(?:_\d+)*(?:\.(?:\d+(?:_\d+)*)?)?|\B\.\d+(?:_\d+)*)/,/(?:[eE][+-]?\d+(?:_\d+)*)?i?(?!\w)/),relevance:0},{scope:"string",begin:/"/,end:/"/}]}}function stata(hljs){return{name:"Stata",aliases:["do","ado"],case_insensitive:!0,keywords:"if else in foreach for forv forva forval forvalu forvalue forvalues by bys bysort xi quietly qui capture about ac a\
c_7 acprplot acprplot_7 adjust ado adopath adoupdate alpha ameans an ano anov anova anova_estat anova_terms anovadef aorder ap app appe appen append arch arch_dr arch_estat arch_p archlm areg areg_p args arima arima_dr arima_estat arima_p as asmprobit asmprobit_estat asmprobit_lf asmprobit_mfx__dlg asmprobit_p ass asse asser assert avplot avplot_7 avplots avplots_7 bcskew0 bgodfrey bias binreg bip0_lf biplot bipp_lf bipr_lf bipr_p biprobit bitest bitesti bitowt blogit bmemsize boot bootsamp boot\
strap bootstrap_8 boxco_l boxco_p boxcox boxcox_6 boxcox_p bprobit br break brier bro brow brows browse brr brrstat bs bs_7 bsampl_w bsample bsample_7 bsqreg bstat bstat_7 bstat_8 bstrap bstrap_7 bubble bubbleplot ca ca_estat ca_p cabiplot camat canon canon_8 canon_8_p canon_estat canon_p cap caprojection capt captu captur capture cat cc cchart cchart_7 cci cd censobs_table centile cf char chdir checkdlgfiles checkestimationsample checkhlpfiles checksum chelp ci cii cl class classutil clear cli \
clis clist clo clog clog_lf clog_p clogi clogi_sw clogit clogit_lf clogit_p clogitp clogl_sw cloglog clonevar clslistarray cluster cluster_measures cluster_stop cluster_tree cluster_tree_8 clustermat cmdlog cnr cnre cnreg cnreg_p cnreg_sw cnsreg codebook collaps4 collapse colormult_nb colormult_nw compare compress conf confi confir confirm conren cons const constr constra constrai constrain constraint continue contract copy copyright copysource cor corc corr corr2data corr_anti corr_kmo corr_smc\
 corre correl correla correlat correlate corrgram cou coun count cox cox_p cox_sw coxbase coxhaz coxvar cprplot cprplot_7 crc cret cretu cretur creturn cross cs cscript cscript_log csi ct ct_is ctset ctst_5 ctst_st cttost cumsp cumsp_7 cumul cusum cusum_7 cutil d|0 datasig datasign datasigna datasignat datasignatu datasignatur datasignature datetof db dbeta de dec deco decod decode deff des desc descr descri describ describe destring dfbeta dfgls dfuller di di_g dir dirstats dis discard disp dis\
p_res disp_s displ displa display distinct do doe doed doedi doedit dotplot dotplot_7 dprobit drawnorm drop ds ds_util dstdize duplicates durbina dwstat dydx e|0 ed edi edit egen eivreg emdef en enc enco encod encode eq erase ereg ereg_lf ereg_p ereg_sw ereghet ereghet_glf ereghet_glf_sh ereghet_gp ereghet_ilf ereghet_ilf_sh ereghet_ip eret eretu eretur ereturn err erro error esize est est_cfexist est_cfname est_clickable est_expand est_hold est_table est_unhold est_unholdok estat estat_default \
estat_summ estat_vce_only esti estimates etodow etof etomdy ex exi exit expand expandcl fac fact facto factor factor_estat factor_p factor_pca_rotated factor_rotate factormat fcast fcast_compute fcast_graph fdades fdadesc fdadescr fdadescri fdadescrib fdadescribe fdasav fdasave fdause fh_st file open file read file close file filefilter fillin find_hlp_file findfile findit findit_7 fit fl fli flis flist for5_0 forest forestplot form forma format fpredict frac_154 frac_adj frac_chk frac_cox frac_\
ddp frac_dis frac_dv frac_in frac_mun frac_pp frac_pq frac_pv frac_wgt frac_xo fracgen fracplot fracplot_7 fracpoly fracpred fron_ex fron_hn fron_p fron_tn fron_tn2 frontier ftodate ftoe ftomdy ftowdate funnel funnelplot g|0 gamhet_glf gamhet_gp gamhet_ilf gamhet_ip gamma gamma_d2 gamma_p gamma_sw gammahet gdi_hexagon gdi_spokes ge gen gene gener genera generat generate genrank genstd genvmean gettoken gl gladder gladder_7 glim_l01 glim_l02 glim_l03 glim_l04 glim_l05 glim_l06 glim_l07 glim_l08 g\
lim_l09 glim_l10 glim_l11 glim_l12 glim_lf glim_mu glim_nw1 glim_nw2 glim_nw3 glim_p glim_v1 glim_v2 glim_v3 glim_v4 glim_v5 glim_v6 glim_v7 glm glm_6 glm_p glm_sw glmpred glo glob globa global glogit glogit_8 glogit_p gmeans gnbre_lf gnbreg gnbreg_5 gnbreg_p gomp_lf gompe_sw gomper_p gompertz gompertzhet gomphet_glf gomphet_glf_sh gomphet_gp gomphet_ilf gomphet_ilf_sh gomphet_ip gphdot gphpen gphprint gprefs gprobi_p gprobit gprobit_8 gr gr7 gr_copy gr_current gr_db gr_describe gr_dir gr_draw g\
r_draw_replay gr_drop gr_edit gr_editviewopts gr_example gr_example2 gr_export gr_print gr_qscheme gr_query gr_read gr_rename gr_replay gr_save gr_set gr_setscheme gr_table gr_undo gr_use graph graph7 grebar greigen greigen_7 greigen_8 grmeanby grmeanby_7 gs_fileinfo gs_filetype gs_graphinfo gs_stat gsort gwood h|0 hadimvo hareg hausman haver he heck_d2 heckma_p heckman heckp_lf heckpr_p heckprob hel help hereg hetpr_lf hetpr_p hetprob hettest hexdump hilite hist hist_7 histogram hlogit hlu hmea\
ns hotel hotelling hprobit hreg hsearch icd9 icd9_ff icd9p iis impute imtest inbase include inf infi infil infile infix inp inpu input ins insheet insp inspe inspec inspect integ inten intreg intreg_7 intreg_p intrg2_ll intrg_ll intrg_ll2 ipolate iqreg ir irf irf_create irfm iri is_svy is_svysum isid istdize ivprob_1_lf ivprob_lf ivprobit ivprobit_p ivreg ivreg_footnote ivtob_1_lf ivtob_lf ivtobit ivtobit_p jackknife jacknife jknife jknife_6 jknife_8 jkstat joinby kalarma1 kap kap_3 kapmeier kap\
pa kapwgt kdensity kdensity_7 keep ksm ksmirnov ktau kwallis l|0 la lab labbe labbeplot labe label labelbook ladder levels levelsof leverage lfit lfit_p li lincom line linktest lis list lloghet_glf lloghet_glf_sh lloghet_gp lloghet_ilf lloghet_ilf_sh lloghet_ip llogi_sw llogis_p llogist llogistic llogistichet lnorm_lf lnorm_sw lnorma_p lnormal lnormalhet lnormhet_glf lnormhet_glf_sh lnormhet_gp lnormhet_ilf lnormhet_ilf_sh lnormhet_ip lnskew0 loadingplot loc loca local log logi logis_lf logistic\
 logistic_p logit logit_estat logit_p loglogs logrank loneway lookfor lookup lowess lowess_7 lpredict lrecomp lroc lroc_7 lrtest ls lsens lsens_7 lsens_x lstat ltable ltable_7 ltriang lv lvr2plot lvr2plot_7 m|0 ma mac macr macro makecns man manova manova_estat manova_p manovatest mantel mark markin markout marksample mat mat_capp mat_order mat_put_rr mat_rapp mata mata_clear mata_describe mata_drop mata_matdescribe mata_matsave mata_matuse mata_memory mata_mlib mata_mosave mata_rename mata_which\
 matalabel matcproc matlist matname matr matri matrix matrix_input__dlg matstrik mcc mcci md0_ md1_ md1debug_ md2_ md2debug_ mds mds_estat mds_p mdsconfig mdslong mdsmat mdsshepard mdytoe mdytof me_derd mean means median memory memsize menl meqparse mer merg merge meta mfp mfx mhelp mhodds minbound mixed_ll mixed_ll_reparm mkassert mkdir mkmat mkspline ml ml_5 ml_adjs ml_bhhhs ml_c_d ml_check ml_clear ml_cnt ml_debug ml_defd ml_e0 ml_e0_bfgs ml_e0_cycle ml_e0_dfp ml_e0i ml_e1 ml_e1_bfgs ml_e1_bh\
hh ml_e1_cycle ml_e1_dfp ml_e2 ml_e2_cycle ml_ebfg0 ml_ebfr0 ml_ebfr1 ml_ebh0q ml_ebhh0 ml_ebhr0 ml_ebr0i ml_ecr0i ml_edfp0 ml_edfr0 ml_edfr1 ml_edr0i ml_eds ml_eer0i ml_egr0i ml_elf ml_elf_bfgs ml_elf_bhhh ml_elf_cycle ml_elf_dfp ml_elfi ml_elfs ml_enr0i ml_enrr0 ml_erdu0 ml_erdu0_bfgs ml_erdu0_bhhh ml_erdu0_bhhhq ml_erdu0_cycle ml_erdu0_dfp ml_erdu0_nrbfgs ml_exde ml_footnote ml_geqnr ml_grad0 ml_graph ml_hbhhh ml_hd0 ml_hold ml_init ml_inv ml_log ml_max ml_mlout ml_mlout_8 ml_model ml_nb0 ml_\
opt ml_p ml_plot ml_query ml_rdgrd ml_repor ml_s_e ml_score ml_searc ml_technique ml_unhold mleval mlf_ mlmatbysum mlmatsum mlog mlogi mlogit mlogit_footnote mlogit_p mlopts mlsum mlvecsum mnl0_ mor more mov move mprobit mprobit_lf mprobit_p mrdu0_ mrdu1_ mvdecode mvencode mvreg mvreg_estat n|0 nbreg nbreg_al nbreg_lf nbreg_p nbreg_sw nestreg net newey newey_7 newey_p news nl nl_7 nl_9 nl_9_p nl_p nl_p_7 nlcom nlcom_p nlexp2 nlexp2_7 nlexp2a nlexp2a_7 nlexp3 nlexp3_7 nlgom3 nlgom3_7 nlgom4 nlgom\
4_7 nlinit nllog3 nllog3_7 nllog4 nllog4_7 nlog_rd nlogit nlogit_p nlogitgen nlogittree nlpred no nobreak noi nois noisi noisil noisily note notes notes_dlg nptrend numlabel numlist odbc old_ver olo olog ologi ologi_sw ologit ologit_p ologitp on one onew onewa oneway op_colnm op_comp op_diff op_inv op_str opr opro oprob oprob_sw oprobi oprobi_p oprobit oprobitp opts_exclusive order orthog orthpoly ou out outf outfi outfil outfile outs outsh outshe outshee outsheet ovtest pac pac_7 palette parse \
parse_dissim pause pca pca_8 pca_display pca_estat pca_p pca_rotate pcamat pchart pchart_7 pchi pchi_7 pcorr pctile pentium pergram pergram_7 permute permute_8 personal peto_st pkcollapse pkcross pkequiv pkexamine pkexamine_7 pkshape pksumm pksumm_7 pl plo plot plugin pnorm pnorm_7 poisgof poiss_lf poiss_sw poisso_p poisson poisson_estat post postclose postfile postutil pperron pr prais prais_e prais_e2 prais_p predict predictnl preserve print pro prob probi probit probit_estat probit_p proc_tim\
e procoverlay procrustes procrustes_estat procrustes_p profiler prog progr progra program prop proportion prtest prtesti pwcorr pwd q\\s qby qbys qchi qchi_7 qladder qladder_7 qnorm qnorm_7 qqplot qqplot_7 qreg qreg_c qreg_p qreg_sw qu quadchk quantile quantile_7 que quer query range ranksum ratio rchart rchart_7 rcof recast reclink recode reg reg3 reg3_p regdw regr regre regre_p2 regres regres_p regress regress_estat regriv_p remap ren rena renam rename renpfix repeat replace report reshape rest\
ore ret retu retur return rm rmdir robvar roccomp roccomp_7 roccomp_8 rocf_lf rocfit rocfit_8 rocgold rocplot rocplot_7 roctab roctab_7 rolling rologit rologit_p rot rota rotat rotate rotatemat rreg rreg_p ru run runtest rvfplot rvfplot_7 rvpplot rvpplot_7 sa safesum sample sampsi sav save savedresults saveold sc sca scal scala scalar scatter scm_mine sco scob_lf scob_p scobi_sw scobit scor score scoreplot scoreplot_help scree screeplot screeplot_help sdtest sdtesti se search separate seperate s\
errbar serrbar_7 serset set set_defaults sfrancia sh she shel shell shewhart shewhart_7 signestimationsample signrank signtest simul simul_7 simulate simulate_8 sktest sleep slogit slogit_d2 slogit_p smooth snapspan so sor sort spearman spikeplot spikeplot_7 spikeplt spline_x split sqreg sqreg_p sret sretu sretur sreturn ssc st st_ct st_hc st_hcd st_hcd_sh st_is st_issys st_note st_promo st_set st_show st_smpl st_subid stack statsby statsby_8 stbase stci stci_7 stcox stcox_estat stcox_fr stcox_f\
r_ll stcox_p stcox_sw stcoxkm stcoxkm_7 stcstat stcurv stcurve stcurve_7 stdes stem stepwise stereg stfill stgen stir stjoin stmc stmh stphplot stphplot_7 stphtest stphtest_7 stptime strate strate_7 streg streg_sw streset sts sts_7 stset stsplit stsum sttocc sttoct stvary stweib su suest suest_8 sum summ summa summar summari summariz summarize sunflower sureg survcurv survsum svar svar_p svmat svy svy_disp svy_dreg svy_est svy_est_7 svy_estat svy_get svy_gnbreg_p svy_head svy_header svy_heckman_\
p svy_heckprob_p svy_intreg_p svy_ivreg_p svy_logistic_p svy_logit_p svy_mlogit_p svy_nbreg_p svy_ologit_p svy_oprobit_p svy_poisson_p svy_probit_p svy_regress_p svy_sub svy_sub_7 svy_x svy_x_7 svy_x_p svydes svydes_8 svygen svygnbreg svyheckman svyheckprob svyintreg svyintreg_7 svyintrg svyivreg svylc svylog_p svylogit svymarkout svymarkout_8 svymean svymlog svymlogit svynbreg svyolog svyologit svyoprob svyoprobit svyopts svypois svypois_7 svypoisson svyprobit svyprobt svyprop svyprop_7 svyrati\
o svyreg svyreg_p svyregress svyset svyset_7 svyset_8 svytab svytab_7 svytest svytotal sw sw_8 swcnreg swcox swereg swilk swlogis swlogit swologit swoprbt swpois swprobit swqreg swtobit swweib symmetry symmi symplot symplot_7 syntax sysdescribe sysdir sysuse szroeter ta tab tab1 tab2 tab_or tabd tabdi tabdis tabdisp tabi table tabodds tabodds_7 tabstat tabu tabul tabula tabulat tabulate te tempfile tempname tempvar tes test testnl testparm teststd tetrachoric time_it timer tis tob tobi tobit tob\
it_p tobit_sw token tokeni tokeniz tokenize tostring total translate translator transmap treat_ll treatr_p treatreg trim trimfill trnb_cons trnb_mean trpoiss_d2 trunc_ll truncr_p truncreg tsappend tset tsfill tsline tsline_ex tsreport tsrevar tsrline tsset tssmooth tsunab ttest ttesti tut_chk tut_wait tutorial tw tware_st two twoway twoway__fpfit_serset twoway__function_gen twoway__histogram_gen twoway__ipoint_serset twoway__ipoints_serset twoway__kdensity_gen twoway__lfit_serset twoway__normgen\
_gen twoway__pci_serset twoway__qfit_serset twoway__scatteri_serset twoway__sunflower_gen twoway_ksm_serset ty typ type typeof u|0 unab unabbrev unabcmd update us use uselabel var var_mkcompanion var_p varbasic varfcast vargranger varirf varirf_add varirf_cgraph varirf_create varirf_ctable varirf_describe varirf_dir varirf_drop varirf_erase varirf_graph varirf_ograph varirf_rename varirf_set varirf_table varlist varlmar varnorm varsoc varstable varstable_w varstable_w2 varwle vce vec vec_fevd ve\
c_mkphi vec_p vec_p_w vecirf_create veclmar veclmar_w vecnorm vecnorm_w vecrank vecstable verinst vers versi versio version view viewsource vif vwls wdatetof webdescribe webseek webuse weib1_lf weib2_lf weib_lf weib_lf0 weibhet_glf weibhet_glf_sh weibhet_glfa weibhet_glfa_sh weibhet_gp weibhet_ilf weibhet_ilf_sh weibhet_ilfa weibhet_ilfa_sh weibhet_ip weibu_sw weibul_p weibull weibull_c weibull_s weibullhet wh whelp whi which whil while wilc_st wilcoxon win wind windo window winexec wntestb wnte\
stb_7 wntestq xchart xchart_7 xcorr xcorr_7 xi xi_6 xmlsav xmlsave xmluse xpose xsh xshe xshel xshell xt_iis xt_tis xtab_p xtabond xtbin_p xtclog xtcloglog xtcloglog_8 xtcloglog_d2 xtcloglog_pa_p xtcloglog_re_p xtcnt_p xtcorr xtdata xtdes xtfront_p xtfrontier xtgee xtgee_elink xtgee_estat xtgee_makeivar xtgee_p xtgee_plink xtgls xtgls_p xthaus xthausman xtht_p xthtaylor xtile xtint_p xtintreg xtintreg_8 xtintreg_d2 xtintreg_p xtivp_1 xtivp_2 xtivreg xtline xtline_ex xtlogit xtlogit_8 xtlogit_d2 \
xtlogit_fe_p xtlogit_pa_p xtlogit_re_p xtmixed xtmixed_estat xtmixed_p xtnb_fe xtnb_lf xtnbreg xtnbreg_pa_p xtnbreg_refe_p xtpcse xtpcse_p xtpois xtpoisson xtpoisson_d2 xtpoisson_pa_p xtpoisson_refe_p xtpred xtprobit xtprobit_8 xtprobit_d2 xtprobit_re_p xtps_fe xtps_lf xtps_ren xtps_ren_8 xtrar_p xtrc xtrc_p xtrchh xtrefe_p xtreg xtreg_be xtreg_fe xtreg_ml xtreg_pa_p xtreg_re xtregar xtrere_p xtset xtsf_ll xtsf_llti xtsum xttab xttest0 xttobit xttobit_8 xttobit_p xttrans yx yxview__barlike_draw \
yxview_area_draw yxview_bar_draw yxview_dot_draw yxview_dropline_draw yxview_function_draw yxview_iarrow_draw yxview_ilabels_draw yxview_normal_draw yxview_pcarrow_draw yxview_pcbarrow_draw yxview_pccapsym_draw yxview_pcscatter_draw yxview_pcspike_draw yxview_rarea_draw yxview_rbar_draw yxview_rbarm_draw yxview_rcap_draw yxview_rcapsym_draw yxview_rconnected_draw yxview_rline_draw yxview_rscatter_draw yxview_rspike_draw yxview_spike_draw yxview_sunflower_draw zap_s zinb zinb_llf zinb_plf zip zip\
_llf zip_p zip_plf zt_ct_5 zt_hc_5 zt_hcd_5 zt_is_5 zt_iss_5 zt_sho_5 zt_smp_5 ztbase_5 ztcox_5 ztdes_5 ztereg_5 ztfill_5 ztgen_5 ztir_5 ztjoin_5 ztnb ztnb_p ztp ztp_p zts_5 ztset_5 ztspli_5 ztsum_5 zttoct_5 ztvary_5 ztweib_5",contains:[{className:"symbol",begin:/`[a-zA-Z0-9_]+'/},{className:"variable",begin:/\$\{?[a-zA-Z0-9_]+\}?/,relevance:0},{className:"string",variants:[{begin:`\`"[^\r
]*?"'`},{begin:`"[^\r
"]*"`}]},{className:"built_in",variants:[{begin:"\\b(abs|acos|asin|atan|atan2|atanh|ceil|cloglog|comb|cos|digamma|exp|floor|invcloglog|invlogit|ln|lnfact|lnfactorial|lngamma|log|log10|max|min|mod|reldif|round|sign|sin|sqrt|sum|tan|tanh|trigamma|trunc|betaden|Binomial|binorm|binormal|chi2|chi2tail|dgammapda|dgammapdada|dgammapdadx|dgammapdx|dgammapdxdx|F|Fden|Ftail|gammaden|gammap|ibeta|invbinomial|invchi2|invchi2tail|invF|invFtail|invgammap|invibeta|invnchi2|invnFtail|invnibeta|invnorm|invnormal|\
invttail|nbetaden|nchi2|nFden|nFtail|nibeta|norm|normal|normalden|normd|npnchi2|tden|ttail|uniform|abbrev|char|index|indexnot|length|lower|ltrim|match|plural|proper|real|regexm|regexr|regexs|reverse|rtrim|string|strlen|strlower|strltrim|strmatch|strofreal|strpos|strproper|strreverse|strrtrim|strtrim|strupper|subinstr|subinword|substr|trim|upper|word|wordcount|_caller|autocode|byteorder|chop|clip|cond|e|epsdouble|epsfloat|group|inlist|inrange|irecode|matrix|maxbyte|maxdouble|maxfloat|maxint|maxlo\
ng|mi|minbyte|mindouble|minfloat|minint|minlong|missing|r|recode|replay|return|s|scalar|d|date|day|dow|doy|halfyear|mdy|month|quarter|week|year|d|daily|dofd|dofh|dofm|dofq|dofw|dofy|h|halfyearly|hofd|m|mofd|monthly|q|qofd|quarterly|tin|twithin|w|weekly|wofd|y|yearly|yh|ym|yofd|yq|yw|cholesky|colnumb|colsof|corr|det|diag|diag0cnt|el|get|hadamard|I|inv|invsym|issym|issymmetric|J|matmissing|matuniform|mreldif|nullmat|rownumb|rowsof|sweep|syminv|trace|vec|vecdiag)(?=\\()"}]},hljs.COMMENT("^[ 	]*\\*.*\
$",!1),hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE]}}function step21(hljs){return{name:"STEP Part 21",aliases:["p21","step","stp"],case_insensitive:!0,keywords:{$pattern:"[A-Z_][A-Z0-9_.]*",keyword:["HEADER","ENDSEC","DATA"]},contains:[{className:"meta",begin:"ISO-10303-21;",relevance:10},{className:"meta",begin:"END-ISO-10303-21;",relevance:10},hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.COMMENT("/\\*\\*!","\\*/"),hljs.C_NUMBER_MODE,hljs.inherit(hljs.APOS_STRING_MODE,{illegal:null}),
hljs.inherit(hljs.QUOTE_STRING_MODE,{illegal:null}),{className:"string",begin:"'",end:"'"},{className:"symbol",variants:[{begin:"#",end:"\\d+",illegal:"\\W"}]}]}}const MODES$3=hljs=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:hljs.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[
hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:hljs.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),HTML_TAGS$3=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form",
"h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],SVG_TAGS$3=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolv\
eMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],TAGS$3=[...HTML_TAGS$3,...SVG_TAGS$3],MEDIA_FEATURES$3=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-\
height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),PSEUDO_CLASSES$3=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty",
"enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-w\
ithin","user-invalid","valid","visited","where"].sort().reverse(),PSEUDO_ELEMENTS$3=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),ATTRIBUTES$3=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","anim\
ation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-s\
hift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","b\
order-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-\
width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-\
after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","conta\
in-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","\
font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variat\
ion-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-r\
endering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","marg\
in-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth",
"math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-bl\
ock","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pau\
se","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-en\
d","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-colo\
r","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip",
"text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","tran\
sition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","\
will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function stylus(hljs){const modes2=MODES$3(hljs),AT_MODIFIERS="and or not only",VARIABLE={className:"variable",begin:"\\$"+hljs.IDENT_RE},AT_KEYWORDS=["charset","css","debug","extend","font-face","for","import","include","keyframes","media","mixin","page","warn","while"],LOOKAHEAD_TAG_END="(?=[.\\s\\n[:,(])";return{name:"Stylus",aliases:["styl"],case_insensitive:!1,keywords:"if else for\
 in",illegal:"("+["\\?","(\\bReturn\\b)","(\\bEnd\\b)","(\\bend\\b)","(\\bdef\\b)",";","#\\s","\\*\\s","===\\s","\\|","%"].join("|")+")",contains:[hljs.QUOTE_STRING_MODE,hljs.APOS_STRING_MODE,hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,modes2.HEXCOLOR,{begin:"\\.[a-zA-Z][a-zA-Z0-9_-]*"+LOOKAHEAD_TAG_END,className:"selector-class"},{begin:"#[a-zA-Z][a-zA-Z0-9_-]*"+LOOKAHEAD_TAG_END,className:"selector-id"},{begin:"\\b("+TAGS$3.join("|")+")"+LOOKAHEAD_TAG_END,className:"selector-tag"},{className:"\
selector-pseudo",begin:"&?:("+PSEUDO_CLASSES$3.join("|")+")"+LOOKAHEAD_TAG_END},{className:"selector-pseudo",begin:"&?:(:)?("+PSEUDO_ELEMENTS$3.join("|")+")"+LOOKAHEAD_TAG_END},modes2.ATTRIBUTE_SELECTOR_MODE,{className:"keyword",begin:/@media/,starts:{end:/[{;}]/,keywords:{$pattern:/[a-z-]+/,keyword:AT_MODIFIERS,attribute:MEDIA_FEATURES$3.join(" ")},contains:[modes2.CSS_NUMBER_MODE]}},{className:"keyword",begin:"@((-(o|moz|ms|webkit)-)?("+AT_KEYWORDS.join("|")+"))\\b"},VARIABLE,modes2.CSS_NUMBER_MODE,
{className:"function",begin:"^[a-zA-Z][a-zA-Z0-9_-]*\\(.*\\)",illegal:"[\\n]",returnBegin:!0,contains:[{className:"title",begin:"\\b[a-zA-Z][a-zA-Z0-9_-]*"},{className:"params",begin:/\(/,end:/\)/,contains:[modes2.HEXCOLOR,VARIABLE,hljs.APOS_STRING_MODE,modes2.CSS_NUMBER_MODE,hljs.QUOTE_STRING_MODE]}]},modes2.CSS_VARIABLE,{className:"attribute",begin:"\\b("+ATTRIBUTES$3.join("|")+")\\b",starts:{end:/;|$/,contains:[modes2.HEXCOLOR,VARIABLE,hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,modes2.CSS_NUMBER_MODE,
hljs.C_BLOCK_COMMENT_MODE,modes2.IMPORTANT,modes2.FUNCTION_DISPATCH],illegal:/\./,relevance:0}},modes2.FUNCTION_DISPATCH]}}function subunit(hljs){return{name:"SubUnit",case_insensitive:!0,contains:[{className:"string",begin:`\\[
(multipart)?`,end:`\\]
`},{className:"string",begin:"\\d{4}-\\d{2}-\\d{2}(\\s+)\\d{2}:\\d{2}:\\d{2}.\\d+Z"},{className:"string",begin:"(\\+|-)\\d+"},{className:"keyword",relevance:10,variants:[{begin:"^(test|testing|success|successful|failure|error|skip|xfail|uxsuccess)(:?)\\s+(test)?"},{begin:"^progress(:?)(\\s+)?(pop|push)?"},{begin:"^tags:"},{begin:"^time:"}]}]}}function taggerscript(hljs){return{name:"Tagger Script",contains:[{className:"comment",begin:/\$noop\(/,end:/\)/,contains:[{begin:/\\[()]/},{begin:/\(/,end:/\)/,
contains:[{begin:/\\[()]/},"self"]}],relevance:10},{className:"keyword",begin:/\$[_a-zA-Z0-9]+(?=\()/},{className:"variable",begin:/%[_a-zA-Z0-9:]+%/},{className:"symbol",begin:/\\[\\nt$%,()]/},{className:"symbol",begin:/\\u[a-fA-F0-9]{4}/}]}}function tap(hljs){return{name:"Test Anything Protocol",case_insensitive:!0,contains:[hljs.HASH_COMMENT_MODE,{className:"meta",variants:[{begin:"^TAP version (\\d+)$"},{begin:"^1\\.\\.(\\d+)$"}]},{begin:/---$/,end:"\\.\\.\\.$",subLanguage:"yaml",relevance:0},
{className:"number",begin:" (\\d+) "},{className:"symbol",variants:[{begin:"^ok"},{begin:"^not ok"}]}]}}function tcl(hljs){const regex=hljs.regex,TCL_IDENT=/[a-zA-Z_][a-zA-Z0-9_]*/,NUMBER={className:"number",variants:[hljs.BINARY_NUMBER_MODE,hljs.C_NUMBER_MODE]};return{name:"Tcl",aliases:["tk"],keywords:["after","append","apply","array","auto_execok","auto_import","auto_load","auto_mkindex","auto_mkindex_old","auto_qualify","auto_reset","bgerror","binary","break","catch","cd","chan","clock","clo\
se","concat","continue","dde","dict","encoding","eof","error","eval","exec","exit","expr","fblocked","fconfigure","fcopy","file","fileevent","filename","flush","for","foreach","format","gets","glob","global","history","http","if","incr","info","interp","join","lappend|10","lassign|10","lindex|10","linsert|10","list","llength|10","load","lrange|10","lrepeat|10","lreplace|10","lreverse|10","lsearch|10","lset|10","lsort|10","mathfunc","mathop","memory","msgcat","namespace","open","package","parray",
"pid","pkg::create","pkg_mkIndex","platform","platform::shell","proc","puts","pwd","read","refchan","regexp","registry","regsub|10","rename","return","safe","scan","seek","set","socket","source","split","string","subst","switch","tcl_endOfWord","tcl_findLibrary","tcl_startOfNextWord","tcl_startOfPreviousWord","tcl_wordBreakAfter","tcl_wordBreakBefore","tcltest","tclvars","tell","time","tm","trace","unknown","unload","unset","update","uplevel","upvar","variable","vwait","while"],contains:[hljs.COMMENT(
";[ \\t]*#","$"),hljs.COMMENT("^[ \\t]*#","$"),{beginKeywords:"proc",end:"[\\{]",excludeEnd:!0,contains:[{className:"title",begin:"[ \\t\\n\\r]+(::)?[a-zA-Z_]((::)?[a-zA-Z0-9_])*",end:"[ \\t\\n\\r]",endsWithParent:!0,excludeEnd:!0}]},{className:"variable",variants:[{begin:regex.concat(/\$/,regex.optional(/::/),TCL_IDENT,"(::",TCL_IDENT,")*")},{begin:"\\$\\{(::)?[a-zA-Z_]((::)?[a-zA-Z0-9_])*",end:"\\}",contains:[NUMBER]}]},{className:"string",contains:[hljs.BACKSLASH_ESCAPE],variants:[hljs.inherit(
hljs.QUOTE_STRING_MODE,{illegal:null})]},NUMBER]}}function thrift(hljs){const TYPES2=["bool","byte","i16","i32","i64","double","string","binary"];return{name:"Thrift",keywords:{keyword:["namespace","const","typedef","struct","enum","service","exception","void","oneway","set","list","map","required","optional"],type:TYPES2,literal:"true false"},contains:[hljs.QUOTE_STRING_MODE,hljs.NUMBER_MODE,hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,{className:"class",beginKeywords:"struct enum service\
 exception",end:/\{/,illegal:/\n/,contains:[hljs.inherit(hljs.TITLE_MODE,{starts:{endsWithParent:!0,excludeEnd:!0}})]},{begin:"\\b(set|list|map)\\s*<",keywords:{type:[...TYPES2,"set","list","map"]},end:">",contains:["self"]}]}}function tp(hljs){const TPID={className:"number",begin:"[1-9][0-9]*",relevance:0},TPLABEL={className:"symbol",begin:":[^\\]]+"},TPDATA={className:"built_in",begin:"(AR|P|PAYLOAD|PR|R|SR|RSR|LBL|VR|UALM|MESSAGE|UTOOL|UFRAME|TIMER|TIMER_OVERFLOW|JOINT_MAX_SPEED|RESUME_PROG|D\
IAG_REC)\\[",end:"\\]",contains:["self",TPID,TPLABEL]},TPIO={className:"built_in",begin:"(AI|AO|DI|DO|F|RI|RO|UI|UO|GI|GO|SI|SO)\\[",end:"\\]",contains:["self",TPID,hljs.QUOTE_STRING_MODE,TPLABEL]};return{name:"TP",keywords:{keyword:["ABORT","ACC","ADJUST","AND","AP_LD","BREAK","CALL","CNT","COL","CONDITION","CONFIG","DA","DB","DIV","DETECT","ELSE","END","ENDFOR","ERR_NUM","ERROR_PROG","FINE","FOR","GP","GUARD","INC","IF","JMP","LINEAR_MAX_SPEED","LOCK","MOD","MONITOR","OFFSET","Offset","OR","OV\
ERRIDE","PAUSE","PREG","PTH","RT_LD","RUN","SELECT","SKIP","Skip","TA","TB","TO","TOOL_OFFSET","Tool_Offset","UF","UT","UFRAME_NUM","UTOOL_NUM","UNLOCK","WAIT","X","Y","Z","W","P","R","STRLEN","SUBSTR","FINDSTR","VOFFSET","PROG","ATTR","MN","POS"],literal:["ON","OFF","max_speed","LPOS","JPOS","ENABLE","DISABLE","START","STOP","RESET"]},contains:[TPDATA,TPIO,{className:"keyword",begin:"/(PROG|ATTR|MN|POS|END)\\b"},{className:"keyword",begin:"(CALL|RUN|POINT_LOGIC|LBL)\\b"},{className:"keyword",begin:"\
\\b(ACC|CNT|Skip|Offset|PSPD|RT_LD|AP_LD|Tool_Offset)"},{className:"number",begin:"\\d+(sec|msec|mm/sec|cm/min|inch/min|deg/sec|mm|in|cm)?\\b",relevance:0},hljs.COMMENT("//","[;$]"),hljs.COMMENT("!","[;$]"),hljs.COMMENT("--eg:","$"),hljs.QUOTE_STRING_MODE,{className:"string",begin:"'",end:"'"},hljs.C_NUMBER_MODE,{className:"variable",begin:"\\$[A-Za-z0-9_]+"}]}}function twig(hljs){const regex=hljs.regex,FUNCTION_NAMES=["absolute_url","asset|0","asset_version","attribute","block","constant","cont\
roller|0","country_timezones","csrf_token","cycle","date","dump","expression","form|0","form_end","form_errors","form_help","form_label","form_rest","form_row","form_start","form_widget","html_classes","include","is_granted","logout_path","logout_url","max","min","parent","path|0","random","range","relative_path","render","render_esi","source","template_from_string","url|0"],FILTERS=["abs","abbr_class","abbr_method","batch","capitalize","column","convert_encoding","country_name","currency_name",
"currency_symbol","data_uri","date","date_modify","default","escape","file_excerpt","file_link","file_relative","filter","first","format","format_args","format_args_as_text","format_currency","format_date","format_datetime","format_file","format_file_from_text","format_number","format_time","html_to_markdown","humanize","inky_to_html","inline_css","join","json_encode","keys","language_name","last","length","locale_name","lower","map","markdown","markdown_to_html","merge","nl2br","number_format",
"raw","reduce","replace","reverse","round","slice","slug","sort","spaceless","split","striptags","timezone_name","title","trans","transchoice","trim","u|0","upper","url_encode","yaml_dump","yaml_encode"];let TAG_NAMES=["apply","autoescape","block","cache","deprecated","do","embed","extends","filter","flush","for","form_theme","from","if","import","include","macro","sandbox","set","stopwatch","trans","trans_default_domain","transchoice","use","verbatim","with"];TAG_NAMES=TAG_NAMES.concat(TAG_NAMES.
map(t=>`end${t}`));const STRING={scope:"string",variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/}]},NUMBER={scope:"number",match:/\d+/},PARAMS={begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,contains:[STRING,NUMBER]},FUNCTIONS={beginKeywords:FUNCTION_NAMES.join(" "),keywords:{name:FUNCTION_NAMES},relevance:0,contains:[PARAMS]},FILTER={match:/\|(?=[A-Za-z_]+:?)/,beginScope:"punctuation",relevance:0,contains:[{match:/[A-Za-z_]+:?/,keywords:FILTERS}]},tagNamed=(tagnames,{relevance})=>({beginScope:{
1:"template-tag",3:"name"},relevance:relevance||2,endScope:"template-tag",begin:[/\{%/,/\s*/,regex.either(...tagnames)],end:/%\}/,keywords:"in",contains:[FILTER,FUNCTIONS,STRING,NUMBER]}),CUSTOM_TAG_RE=/[a-z_]+/,TAG=tagNamed(TAG_NAMES,{relevance:2}),CUSTOM_TAG=tagNamed([CUSTOM_TAG_RE],{relevance:1});return{name:"Twig",aliases:["craftcms"],case_insensitive:!0,subLanguage:"xml",contains:[hljs.COMMENT(/\{#/,/#\}/),TAG,CUSTOM_TAG,{className:"template-variable",begin:/\{\{/,end:/\}\}/,contains:["self",
FILTER,FUNCTIONS,STRING,NUMBER]}]}}function vala(hljs){return{name:"Vala",keywords:{keyword:"char uchar unichar int uint long ulong short ushort int8 int16 int32 int64 uint8 uint16 uint32 uint64 float double bool struct enum string void weak unowned owned async signal static abstract interface override virtual delegate if while do for foreach else switch case break default return try catch public private protected internal using new this get set const stdout stdin stderr var",built_in:"DBus GLib\
 CCode Gee Object Gtk Posix",literal:"false true null"},contains:[{className:"class",beginKeywords:"class interface namespace",end:/\{/,excludeEnd:!0,illegal:"[^,:\\n\\s\\.]",contains:[hljs.UNDERSCORE_TITLE_MODE]},hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,{className:"string",begin:'"""',end:'"""',relevance:5},hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,hljs.C_NUMBER_MODE,{className:"meta",begin:"^#",end:"$"}]}}function vbscript(hljs){const regex=hljs.regex,BUILT_IN_FUNCTIONS=["lcase","\
month","vartype","instrrev","ubound","setlocale","getobject","rgb","getref","string","weekdayname","rnd","dateadd","monthname","now","day","minute","isarray","cbool","round","formatcurrency","conversions","csng","timevalue","second","year","space","abs","clng","timeserial","fixs","len","asc","isempty","maths","dateserial","atn","timer","isobject","filter","weekday","datevalue","ccur","isdate","instr","datediff","formatdatetime","replace","isnull","right","sgn","array","snumeric","log","cdbl","he\
x","chr","lbound","msgbox","ucase","getlocale","cos","cdate","cbyte","rtrim","join","hour","oct","typename","trim","strcomp","int","createobject","loadpicture","tan","formatnumber","mid","split","cint","sin","datepart","ltrim","sqr","time","derived","eval","date","formatpercent","exp","inputbox","left","ascw","chrw","regexp","cstr","err"],BUILT_IN_OBJECTS=["server","response","request","scriptengine","scriptenginebuildversion","scriptengineminorversion","scriptenginemajorversion"],BUILT_IN_CALL={
begin:regex.concat(regex.either(...BUILT_IN_FUNCTIONS),"\\s*\\("),relevance:0,keywords:{built_in:BUILT_IN_FUNCTIONS}};return{name:"VBScript",aliases:["vbs"],case_insensitive:!0,keywords:{keyword:["call","class","const","dim","do","loop","erase","execute","executeglobal","exit","for","each","next","function","if","then","else","on","error","option","explicit","new","private","property","let","get","public","randomize","redim","rem","select","case","set","stop","sub","while","wend","with","end","t\
o","elseif","is","or","xor","and","not","class_initialize","class_terminate","default","preserve","in","me","byval","byref","step","resume","goto"],built_in:BUILT_IN_OBJECTS,literal:["true","false","null","nothing","empty"]},illegal:"//",contains:[BUILT_IN_CALL,hljs.inherit(hljs.QUOTE_STRING_MODE,{contains:[{begin:'""'}]}),hljs.COMMENT(/'/,/$/,{relevance:0}),hljs.C_NUMBER_MODE]}}function vbscriptHtml(hljs){return{name:"VBScript in HTML",subLanguage:"xml",contains:[{begin:"<%",end:"%>",subLanguage:"\
vbscript"}]}}function verilog(hljs){const regex=hljs.regex,KEYWORDS2={$pattern:/\$?[\w]+(\$[\w]+)*/,keyword:["accept_on","alias","always","always_comb","always_ff","always_latch","and","assert","assign","assume","automatic","before","begin","bind","bins","binsof","bit","break","buf|0","bufif0","bufif1","byte","case","casex","casez","cell","chandle","checker","class","clocking","cmos","config","const","constraint","context","continue","cover","covergroup","coverpoint","cross","deassign","default",
"defparam","design","disable","dist","do","edge","else","end","endcase","endchecker","endclass","endclocking","endconfig","endfunction","endgenerate","endgroup","endinterface","endmodule","endpackage","endprimitive","endprogram","endproperty","endspecify","endsequence","endtable","endtask","enum","event","eventually","expect","export","extends","extern","final","first_match","for","force","foreach","forever","fork","forkjoin","function","generate|5","genvar","global","highz0","highz1","if","iff",
"ifnone","ignore_bins","illegal_bins","implements","implies","import","incdir","include","initial","inout","input","inside","instance","int","integer","interconnect","interface","intersect","join","join_any","join_none","large","let","liblist","library","local","localparam","logic","longint","macromodule","matches","medium","modport","module","nand","negedge","nettype","new","nexttime","nmos","nor","noshowcancelled","not","notif0","notif1","or","output","package","packed","parameter","pmos","pos\
edge","primitive","priority","program","property","protected","pull0","pull1","pulldown","pullup","pulsestyle_ondetect","pulsestyle_onevent","pure","rand","randc","randcase","randsequence","rcmos","real","realtime","ref","reg","reject_on","release","repeat","restrict","return","rnmos","rpmos","rtran","rtranif0","rtranif1","s_always","s_eventually","s_nexttime","s_until","s_until_with","scalared","sequence","shortint","shortreal","showcancelled","signed","small","soft","solve","specify","specpara\
m","static","string","strong","strong0","strong1","struct","super","supply0","supply1","sync_accept_on","sync_reject_on","table","tagged","task","this","throughout","time","timeprecision","timeunit","tran","tranif0","tranif1","tri","tri0","tri1","triand","trior","trireg","type","typedef","union","unique","unique0","unsigned","until","until_with","untyped","use","uwire","var","vectored","virtual","void","wait","wait_order","wand","weak","weak0","weak1","while","wildcard","wire","with","within","w\
or","xnor","xor"],literal:["null"],built_in:["$finish","$stop","$exit","$fatal","$error","$warning","$info","$realtime","$time","$printtimescale","$bitstoreal","$bitstoshortreal","$itor","$signed","$cast","$bits","$stime","$timeformat","$realtobits","$shortrealtobits","$rtoi","$unsigned","$asserton","$assertkill","$assertpasson","$assertfailon","$assertnonvacuouson","$assertoff","$assertcontrol","$assertpassoff","$assertfailoff","$assertvacuousoff","$isunbounded","$sampled","$fell","$changed","$\
past_gclk","$fell_gclk","$changed_gclk","$rising_gclk","$steady_gclk","$coverage_control","$coverage_get","$coverage_save","$set_coverage_db_name","$rose","$stable","$past","$rose_gclk","$stable_gclk","$future_gclk","$falling_gclk","$changing_gclk","$display","$coverage_get_max","$coverage_merge","$get_coverage","$load_coverage_db","$typename","$unpacked_dimensions","$left","$low","$increment","$clog2","$ln","$log10","$exp","$sqrt","$pow","$floor","$ceil","$sin","$cos","$tan","$countbits","$oneh\
ot","$isunknown","$fatal","$warning","$dimensions","$right","$high","$size","$asin","$acos","$atan","$atan2","$hypot","$sinh","$cosh","$tanh","$asinh","$acosh","$atanh","$countones","$onehot0","$error","$info","$random","$dist_chi_square","$dist_erlang","$dist_exponential","$dist_normal","$dist_poisson","$dist_t","$dist_uniform","$q_initialize","$q_remove","$q_exam","$async$and$array","$async$nand$array","$async$or$array","$async$nor$array","$sync$and$array","$sync$nand$array","$sync$or$array","\
$sync$nor$array","$q_add","$q_full","$psprintf","$async$and$plane","$async$nand$plane","$async$or$plane","$async$nor$plane","$sync$and$plane","$sync$nand$plane","$sync$or$plane","$sync$nor$plane","$system","$display","$displayb","$displayh","$displayo","$strobe","$strobeb","$strobeh","$strobeo","$write","$readmemb","$readmemh","$writememh","$value$plusargs","$dumpvars","$dumpon","$dumplimit","$dumpports","$dumpportson","$dumpportslimit","$writeb","$writeh","$writeo","$monitor","$monitorb","$moni\
torh","$monitoro","$writememb","$dumpfile","$dumpoff","$dumpall","$dumpflush","$dumpportsoff","$dumpportsall","$dumpportsflush","$fclose","$fdisplay","$fdisplayb","$fdisplayh","$fdisplayo","$fstrobe","$fstrobeb","$fstrobeh","$fstrobeo","$swrite","$swriteb","$swriteh","$swriteo","$fscanf","$fread","$fseek","$fflush","$feof","$fopen","$fwrite","$fwriteb","$fwriteh","$fwriteo","$fmonitor","$fmonitorb","$fmonitorh","$fmonitoro","$sformat","$sformatf","$fgetc","$ungetc","$fgets","$sscanf","$rewind","\
$ftell","$ferror"]},BUILT_IN_CONSTANTS=["__FILE__","__LINE__"],DIRECTIVES=["begin_keywords","celldefine","default_nettype","default_decay_time","default_trireg_strength","define","delay_mode_distributed","delay_mode_path","delay_mode_unit","delay_mode_zero","else","elsif","end_keywords","endcelldefine","endif","ifdef","ifndef","include","line","nounconnected_drive","pragma","resetall","timescale","unconnected_drive","undef","undefineall"];return{name:"Verilog",aliases:["v","sv","svh"],case_insensitive:!1,
keywords:KEYWORDS2,contains:[hljs.C_BLOCK_COMMENT_MODE,hljs.C_LINE_COMMENT_MODE,hljs.QUOTE_STRING_MODE,{scope:"number",contains:[hljs.BACKSLASH_ESCAPE],variants:[{begin:/\b((\d+'([bhodBHOD]))[0-9xzXZa-fA-F_]+)/},{begin:/\B(('([bhodBHOD]))[0-9xzXZa-fA-F_]+)/},{begin:/\b[0-9][0-9_]*/,relevance:0}]},{scope:"variable",variants:[{begin:"#\\((?!parameter).+\\)"},{begin:"\\.\\w+",relevance:0}]},{scope:"variable.constant",match:regex.concat(/`/,regex.either(...BUILT_IN_CONSTANTS))},{scope:"meta",begin:regex.
concat(/`/,regex.either(...DIRECTIVES)),end:/$|\/\/|\/\*/,returnEnd:!0,keywords:DIRECTIVES}]}}function vhdl(hljs){const INTEGER_RE="\\d(_|\\d)*",EXPONENT_RE="[eE][-+]?"+INTEGER_RE,DECIMAL_LITERAL_RE=INTEGER_RE+"(\\."+INTEGER_RE+")?("+EXPONENT_RE+")?",BASED_INTEGER_RE="\\w+",NUMBER_RE="\\b("+(INTEGER_RE+"#"+BASED_INTEGER_RE+"(\\."+BASED_INTEGER_RE+")?#("+EXPONENT_RE+")?")+"|"+DECIMAL_LITERAL_RE+")";return{name:"VHDL",case_insensitive:!0,keywords:{keyword:["abs","access","after","alias","all","and",
"architecture","array","assert","assume","assume_guarantee","attribute","begin","block","body","buffer","bus","case","component","configuration","constant","context","cover","disconnect","downto","default","else","elsif","end","entity","exit","fairness","file","for","force","function","generate","generic","group","guarded","if","impure","in","inertial","inout","is","label","library","linkage","literal","loop","map","mod","nand","new","next","nor","not","null","of","on","open","or","others","out",
"package","parameter","port","postponed","procedure","process","property","protected","pure","range","record","register","reject","release","rem","report","restrict","restrict_guarantee","return","rol","ror","select","sequence","severity","shared","signal","sla","sll","sra","srl","strong","subtype","then","to","transport","type","unaffected","units","until","use","variable","view","vmode","vprop","vunit","wait","when","while","with","xnor","xor"],built_in:["boolean","bit","character","integer","\
time","delay_length","natural","positive","string","bit_vector","file_open_kind","file_open_status","std_logic","std_logic_vector","unsigned","signed","boolean_vector","integer_vector","std_ulogic","std_ulogic_vector","unresolved_unsigned","u_unsigned","unresolved_signed","u_signed","real_vector","time_vector"],literal:["false","true","note","warning","error","failure","line","text","side","width"]},illegal:/\{/,contains:[hljs.C_BLOCK_COMMENT_MODE,hljs.COMMENT("--","$"),hljs.QUOTE_STRING_MODE,{className:"\
number",begin:NUMBER_RE,relevance:0},{className:"string",begin:"'(U|X|0|1|Z|W|L|H|-)'",contains:[hljs.BACKSLASH_ESCAPE]},{className:"symbol",begin:"'[A-Za-z](_?[A-Za-z0-9])*",contains:[hljs.BACKSLASH_ESCAPE]}]}}function vim(hljs){return{name:"Vim Script",keywords:{$pattern:/[!#@\w]+/,keyword:"N|0 P|0 X|0 a|0 ab abc abo al am an|0 ar arga argd arge argdo argg argl argu as au aug aun b|0 bN ba bad bd be bel bf bl bm bn bo bp br brea breaka breakd breakl bro bufdo buffers bun bw c|0 cN cNf ca cabc \
caddb cad caddf cal cat cb cc ccl cd ce cex cf cfir cgetb cgete cg changes chd che checkt cl cla clo cm cmapc cme cn cnew cnf cno cnorea cnoreme co col colo com comc comp con conf cope cp cpf cq cr cs cst cu cuna cunme cw delm deb debugg delc delf dif diffg diffo diffp diffpu diffs diffthis dig di dl dell dj dli do doautoa dp dr ds dsp e|0 ea ec echoe echoh echom echon el elsei em en endfo endf endt endw ene ex exe exi exu f|0 files filet fin fina fini fir fix fo foldc foldd folddoc foldo for fu\
 go gr grepa gu gv ha helpf helpg helpt hi hid his ia iabc if ij il im imapc ime ino inorea inoreme int is isp iu iuna iunme j|0 ju k|0 keepa kee keepj lN lNf l|0 lad laddb laddf la lan lat lb lc lch lcl lcs le lefta let lex lf lfir lgetb lgete lg lgr lgrepa lh ll lla lli lmak lm lmapc lne lnew lnf ln loadk lo loc lockv lol lope lp lpf lr ls lt lu lua luad luaf lv lvimgrepa lw m|0 ma mak map mapc marks mat me menut mes mk mks mksp mkv mkvie mod mz mzf nbc nb nbs new nm nmapc nme nn nnoreme noa n\
o noh norea noreme norm nu nun nunme ol o|0 om omapc ome on ono onoreme opt ou ounme ow p|0 profd prof pro promptr pc ped pe perld po popu pp pre prev ps pt ptN ptf ptj ptl ptn ptp ptr pts pu pw py3 python3 py3d py3f py pyd pyf quita qa rec red redi redr redraws reg res ret retu rew ri rightb rub rubyd rubyf rund ru rv sN san sa sal sav sb sbN sba sbf sbl sbm sbn sbp sbr scrip scripte scs se setf setg setl sf sfir sh sim sig sil sl sla sm smap smapc sme sn sni sno snor snoreme sor so spelld spe \
spelli spellr spellu spellw sp spr sre st sta startg startr star stopi stj sts sun sunm sunme sus sv sw sy synti sync tN tabN tabc tabdo tabe tabf tabfir tabl tabm tabnew tabn tabo tabp tabr tabs tab ta tags tc tcld tclf te tf th tj tl tm tn to tp tr try ts tu u|0 undoj undol una unh unl unlo unm unme uns up ve verb vert vim vimgrepa vi viu vie vm vmapc vme vne vn vnoreme vs vu vunme windo w|0 wN wa wh wi winc winp wn wp wq wqa ws wu wv x|0 xa xmapc xm xme xn xnoreme xu xunme y|0 z|0 ~ Next Prin\
t append abbreviate abclear aboveleft all amenu anoremenu args argadd argdelete argedit argglobal arglocal argument ascii autocmd augroup aunmenu buffer bNext ball badd bdelete behave belowright bfirst blast bmodified bnext botright bprevious brewind break breakadd breakdel breaklist browse bunload bwipeout change cNext cNfile cabbrev cabclear caddbuffer caddexpr caddfile call catch cbuffer cclose center cexpr cfile cfirst cgetbuffer cgetexpr cgetfile chdir checkpath checktime clist clast close \
cmap cmapclear cmenu cnext cnewer cnfile cnoremap cnoreabbrev cnoremenu copy colder colorscheme command comclear compiler continue confirm copen cprevious cpfile cquit crewind cscope cstag cunmap cunabbrev cunmenu cwindow delete delmarks debug debuggreedy delcommand delfunction diffupdate diffget diffoff diffpatch diffput diffsplit digraphs display deletel djump dlist doautocmd doautoall deletep drop dsearch dsplit edit earlier echo echoerr echohl echomsg else elseif emenu endif endfor endfuncti\
on endtry endwhile enew execute exit exusage file filetype find finally finish first fixdel fold foldclose folddoopen folddoclosed foldopen function global goto grep grepadd gui gvim hardcopy help helpfind helpgrep helptags highlight hide history insert iabbrev iabclear ijump ilist imap imapclear imenu inoremap inoreabbrev inoremenu intro isearch isplit iunmap iunabbrev iunmenu join jumps keepalt keepmarks keepjumps lNext lNfile list laddexpr laddbuffer laddfile last language later lbuffer lcd l\
chdir lclose lcscope left leftabove lexpr lfile lfirst lgetbuffer lgetexpr lgetfile lgrep lgrepadd lhelpgrep llast llist lmake lmap lmapclear lnext lnewer lnfile lnoremap loadkeymap loadview lockmarks lockvar lolder lopen lprevious lpfile lrewind ltag lunmap luado luafile lvimgrep lvimgrepadd lwindow move mark make mapclear match menu menutranslate messages mkexrc mksession mkspell mkvimrc mkview mode mzscheme mzfile nbclose nbkey nbsart next nmap nmapclear nmenu nnoremap nnoremenu noautocmd nor\
emap nohlsearch noreabbrev noremenu normal number nunmap nunmenu oldfiles open omap omapclear omenu only onoremap onoremenu options ounmap ounmenu ownsyntax print profdel profile promptfind promptrepl pclose pedit perl perldo pop popup ppop preserve previous psearch ptag ptNext ptfirst ptjump ptlast ptnext ptprevious ptrewind ptselect put pwd py3do py3file python pydo pyfile quit quitall qall read recover redo redir redraw redrawstatus registers resize retab return rewind right rightbelow ruby r\
ubydo rubyfile rundo runtime rviminfo substitute sNext sandbox sargument sall saveas sbuffer sbNext sball sbfirst sblast sbmodified sbnext sbprevious sbrewind scriptnames scriptencoding scscope set setfiletype setglobal setlocal sfind sfirst shell simalt sign silent sleep slast smagic smapclear smenu snext sniff snomagic snoremap snoremenu sort source spelldump spellgood spellinfo spellrepall spellundo spellwrong split sprevious srewind stop stag startgreplace startreplace startinsert stopinsert\
 stjump stselect sunhide sunmap sunmenu suspend sview swapname syntax syntime syncbind tNext tabNext tabclose tabedit tabfind tabfirst tablast tabmove tabnext tabonly tabprevious tabrewind tag tcl tcldo tclfile tearoff tfirst throw tjump tlast tmenu tnext topleft tprevious trewind tselect tunmenu undo undojoin undolist unabbreviate unhide unlet unlockvar unmap unmenu unsilent update vglobal version verbose vertical vimgrep vimgrepadd visual viusage view vmap vmapclear vmenu vnew vnoremap vnoreme\
nu vsplit vunmap vunmenu write wNext wall while winsize wincmd winpos wnext wprevious wqall wsverb wundo wviminfo xit xall xmapclear xmap xmenu xnoremap xnoremenu xunmap xunmenu yank",built_in:"synIDtrans atan2 range matcharg did_filetype asin feedkeys xor argv complete_check add getwinposx getqflist getwinposy screencol clearmatches empty extend getcmdpos mzeval garbagecollect setreg ceil sqrt diff_hlID inputsecret get getfperm getpid filewritable shiftwidth max sinh isdirectory synID system in\
putrestore winline atan visualmode inputlist tabpagewinnr round getregtype mapcheck hasmapto histdel argidx findfile sha256 exists toupper getcmdline taglist string getmatches bufnr strftime winwidth bufexists strtrans tabpagebuflist setcmdpos remote_read printf setloclist getpos getline bufwinnr float2nr len getcmdtype diff_filler luaeval resolve libcallnr foldclosedend reverse filter has_key bufname str2float strlen setline getcharmod setbufvar index searchpos shellescape undofile foldclosed s\
etqflist buflisted strchars str2nr virtcol floor remove undotree remote_expr winheight gettabwinvar reltime cursor tabpagenr finddir localtime acos getloclist search tanh matchend rename gettabvar strdisplaywidth type abs py3eval setwinvar tolower wildmenumode log10 spellsuggest bufloaded synconcealed nextnonblank server2client complete settabwinvar executable input wincol setmatches getftype hlID inputsave searchpair or screenrow line settabvar histadd deepcopy strpart remote_peek and eval getf\
time submatch screenchar winsaveview matchadd mkdir screenattr getfontname libcall reltimestr getfsize winnr invert pow getbufline byte2line soundfold repeat fnameescape tagfiles sin strwidth spellbadword trunc maparg log lispindent hostname setpos globpath remote_foreground getchar synIDattr fnamemodify cscope_connection stridx winbufnr indent min complete_add nr2char searchpairpos inputdialog values matchlist items hlexists strridx browsedir expand fmod pathshorten line2byte argc count getwinv\
ar glob foldtextresult getreg foreground cosh matchdelete has char2nr simplify histget searchdecl iconv winrestcmd pumvisible writefile foldlevel haslocaldir keys cos matchstr foldtext histnr tan tempname getcwd byteidx getbufvar islocked escape eventhandler remote_send serverlist winrestview synstack pyeval prevnonblank readfile cindent filereadable changenr exp"},illegal:/;/,contains:[hljs.NUMBER_MODE,{className:"string",begin:"'",end:"'",illegal:"\\n"},{className:"string",begin:/"(\\"|\n\\|[^"\n])*"/},
hljs.COMMENT('"',"$"),{className:"variable",begin:/[bwtglsav]:[\w\d_]+/},{begin:[/\b(?:function|function!)/,/\s+/,hljs.IDENT_RE],className:{1:"keyword",3:"title"},end:"$",relevance:0,contains:[{className:"params",begin:"\\(",end:"\\)"}]},{className:"symbol",begin:/<[\w-]+>/}]}}function wren(hljs){const regex=hljs.regex,IDENT_RE2=/[a-zA-Z]\w*/,KEYWORDS2=["as","break","class","construct","continue","else","for","foreign","if","import","in","is","return","static","var","while"],LITERALS2=["true","f\
alse","null"],LANGUAGE_VARS=["this","super"],CORE_CLASSES=["Bool","Class","Fiber","Fn","List","Map","Null","Num","Object","Range","Sequence","String","System"],OPERATORS=["-","~",/\*/,"%",/\.\.\./,/\.\./,/\+/,"<<",">>",">=","<=","<",">",/\^/,/!=/,/!/,/\bis\b/,"==","&&","&",/\|\|/,/\|/,/\?:/,"="],FUNCTION={relevance:0,match:regex.concat(/\b(?!(if|while|for|else|super)\b)/,IDENT_RE2,/(?=\s*[({])/),className:"title.function"},FUNCTION_DEFINITION={match:regex.concat(regex.either(regex.concat(/\b(?!(if|while|for|else|super)\b)/,
IDENT_RE2),regex.either(...OPERATORS)),/(?=\s*\([^)]+\)\s*\{)/),className:"title.function",starts:{contains:[{begin:/\(/,end:/\)/,contains:[{relevance:0,scope:"params",match:IDENT_RE2}]}]}},CLASS_DEFINITION={variants:[{match:[/class\s+/,IDENT_RE2,/\s+is\s+/,IDENT_RE2]},{match:[/class\s+/,IDENT_RE2]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:KEYWORDS2},OPERATOR={relevance:0,match:regex.either(...OPERATORS),className:"operator"},TRIPLE_STRING={className:"string",begin:/"""/,end:/"""/},
PROPERTY={className:"property",begin:regex.concat(/\./,regex.lookahead(IDENT_RE2)),end:IDENT_RE2,excludeBegin:!0,relevance:0},FIELD={relevance:0,match:regex.concat(/\b_/,IDENT_RE2),scope:"variable"},CLASS_REFERENCE={relevance:0,match:/\b[A-Z]+[a-z]+([A-Z]+[a-z]+)*/,scope:"title.class",keywords:{_:CORE_CLASSES}},NUMBER=hljs.C_NUMBER_MODE,SETTER={match:[IDENT_RE2,/\s*/,/=/,/\s*/,/\(/,IDENT_RE2,/\)\s*\{/],scope:{1:"title.function",3:"operator",6:"params"}},COMMENT_DOCS=hljs.COMMENT(/\/\*\*/,/\*\//,
{contains:[{match:/@[a-z]+/,scope:"doctag"},"self"]}),SUBST={scope:"subst",begin:/%\(/,end:/\)/,contains:[NUMBER,CLASS_REFERENCE,FUNCTION,FIELD,OPERATOR]},STRING={scope:"string",begin:/"/,end:/"/,contains:[SUBST,{scope:"char.escape",variants:[{match:/\\\\|\\["0%abefnrtv]/},{match:/\\x[0-9A-F]{2}/},{match:/\\u[0-9A-F]{4}/},{match:/\\U[0-9A-F]{8}/}]}]};SUBST.contains.push(STRING);const ALL_KWS=[...KEYWORDS2,...LANGUAGE_VARS,...LITERALS2],VARIABLE={relevance:0,match:regex.concat("\\b(?!",ALL_KWS.join(
"|"),"\\b)",/[a-zA-Z_]\w*(?:[?!]|\b)/),className:"variable"};return{name:"Wren",keywords:{keyword:KEYWORDS2,"variable.language":LANGUAGE_VARS,literal:LITERALS2},contains:[{scope:"comment",variants:[{begin:[/#!?/,/[A-Za-z_]+(?=\()/],beginScope:{},keywords:{literal:LITERALS2},contains:[],end:/\)/},{begin:[/#!?/,/[A-Za-z_]+/],beginScope:{},end:/$/}]},NUMBER,STRING,TRIPLE_STRING,COMMENT_DOCS,hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,CLASS_REFERENCE,CLASS_DEFINITION,SETTER,FUNCTION_DEFINITION,
FUNCTION,OPERATOR,FIELD,PROPERTY,VARIABLE]}}function x86asm(hljs){return{name:"Intel x86 Assembly",case_insensitive:!0,keywords:{$pattern:"[.%]?"+hljs.IDENT_RE,keyword:"lock rep repe repz repne repnz xaquire xrelease bnd nobnd aaa aad aam aas adc add and arpl bb0_reset bb1_reset bound bsf bsr bswap bt btc btr bts call cbw cdq cdqe clc cld cli clts cmc cmp cmpsb cmpsd cmpsq cmpsw cmpxchg cmpxchg486 cmpxchg8b cmpxchg16b cpuid cpu_read cpu_write cqo cwd cwde daa das dec div dmint emms enter equ f2x\
m1 fabs fadd faddp fbld fbstp fchs fclex fcmovb fcmovbe fcmove fcmovnb fcmovnbe fcmovne fcmovnu fcmovu fcom fcomi fcomip fcomp fcompp fcos fdecstp fdisi fdiv fdivp fdivr fdivrp femms feni ffree ffreep fiadd ficom ficomp fidiv fidivr fild fimul fincstp finit fist fistp fisttp fisub fisubr fld fld1 fldcw fldenv fldl2e fldl2t fldlg2 fldln2 fldpi fldz fmul fmulp fnclex fndisi fneni fninit fnop fnsave fnstcw fnstenv fnstsw fpatan fprem fprem1 fptan frndint frstor fsave fscale fsetpm fsin fsincos fsqr\
t fst fstcw fstenv fstp fstsw fsub fsubp fsubr fsubrp ftst fucom fucomi fucomip fucomp fucompp fxam fxch fxtract fyl2x fyl2xp1 hlt ibts icebp idiv imul in inc incbin insb insd insw int int01 int1 int03 int3 into invd invpcid invlpg invlpga iret iretd iretq iretw jcxz jecxz jrcxz jmp jmpe lahf lar lds lea leave les lfence lfs lgdt lgs lidt lldt lmsw loadall loadall286 lodsb lodsd lodsq lodsw loop loope loopne loopnz loopz lsl lss ltr mfence monitor mov movd movq movsb movsd movsq movsw movsx movs\
xd movzx mul mwait neg nop not or out outsb outsd outsw packssdw packsswb packuswb paddb paddd paddsb paddsiw paddsw paddusb paddusw paddw pand pandn pause paveb pavgusb pcmpeqb pcmpeqd pcmpeqw pcmpgtb pcmpgtd pcmpgtw pdistib pf2id pfacc pfadd pfcmpeq pfcmpge pfcmpgt pfmax pfmin pfmul pfrcp pfrcpit1 pfrcpit2 pfrsqit1 pfrsqrt pfsub pfsubr pi2fd pmachriw pmaddwd pmagw pmulhriw pmulhrwa pmulhrwc pmulhw pmullw pmvgezb pmvlzb pmvnzb pmvzb pop popa popad popaw popf popfd popfq popfw por prefetch prefe\
tchw pslld psllq psllw psrad psraw psrld psrlq psrlw psubb psubd psubsb psubsiw psubsw psubusb psubusw psubw punpckhbw punpckhdq punpckhwd punpcklbw punpckldq punpcklwd push pusha pushad pushaw pushf pushfd pushfq pushfw pxor rcl rcr rdshr rdmsr rdpmc rdtsc rdtscp ret retf retn rol ror rdm rsdc rsldt rsm rsts sahf sal salc sar sbb scasb scasd scasq scasw sfence sgdt shl shld shr shrd sidt sldt skinit smi smint smintold smsw stc std sti stosb stosd stosq stosw str sub svdc svldt svts swapgs sysca\
ll sysenter sysexit sysret test ud0 ud1 ud2b ud2 ud2a umov verr verw fwait wbinvd wrshr wrmsr xadd xbts xchg xlatb xlat xor cmove cmovz cmovne cmovnz cmova cmovnbe cmovae cmovnb cmovb cmovnae cmovbe cmovna cmovg cmovnle cmovge cmovnl cmovl cmovnge cmovle cmovng cmovc cmovnc cmovo cmovno cmovs cmovns cmovp cmovpe cmovnp cmovpo je jz jne jnz ja jnbe jae jnb jb jnae jbe jna jg jnle jge jnl jl jnge jle jng jc jnc jo jno js jns jpo jnp jpe jp sete setz setne setnz seta setnbe setae setnb setnc setb s\
etnae setcset setbe setna setg setnle setge setnl setl setnge setle setng sets setns seto setno setpe setp setpo setnp addps addss andnps andps cmpeqps cmpeqss cmpleps cmpless cmpltps cmpltss cmpneqps cmpneqss cmpnleps cmpnless cmpnltps cmpnltss cmpordps cmpordss cmpunordps cmpunordss cmpps cmpss comiss cvtpi2ps cvtps2pi cvtsi2ss cvtss2si cvttps2pi cvttss2si divps divss ldmxcsr maxps maxss minps minss movaps movhps movlhps movlps movhlps movmskps movntps movss movups mulps mulss orps rcpps rcpss\
 rsqrtps rsqrtss shufps sqrtps sqrtss stmxcsr subps subss ucomiss unpckhps unpcklps xorps fxrstor fxrstor64 fxsave fxsave64 xgetbv xsetbv xsave xsave64 xsaveopt xsaveopt64 xrstor xrstor64 prefetchnta prefetcht0 prefetcht1 prefetcht2 maskmovq movntq pavgb pavgw pextrw pinsrw pmaxsw pmaxub pminsw pminub pmovmskb pmulhuw psadbw pshufw pf2iw pfnacc pfpnacc pi2fw pswapd maskmovdqu clflush movntdq movnti movntpd movdqa movdqu movdq2q movq2dq paddq pmuludq pshufd pshufhw pshuflw pslldq psrldq psubq pun\
pckhqdq punpcklqdq addpd addsd andnpd andpd cmpeqpd cmpeqsd cmplepd cmplesd cmpltpd cmpltsd cmpneqpd cmpneqsd cmpnlepd cmpnlesd cmpnltpd cmpnltsd cmpordpd cmpordsd cmpunordpd cmpunordsd cmppd comisd cvtdq2pd cvtdq2ps cvtpd2dq cvtpd2pi cvtpd2ps cvtpi2pd cvtps2dq cvtps2pd cvtsd2si cvtsd2ss cvtsi2sd cvtss2sd cvttpd2pi cvttpd2dq cvttps2dq cvttsd2si divpd divsd maxpd maxsd minpd minsd movapd movhpd movlpd movmskpd movupd mulpd mulsd orpd shufpd sqrtpd sqrtsd subpd subsd ucomisd unpckhpd unpcklpd xorp\
d addsubpd addsubps haddpd haddps hsubpd hsubps lddqu movddup movshdup movsldup clgi stgi vmcall vmclear vmfunc vmlaunch vmload vmmcall vmptrld vmptrst vmread vmresume vmrun vmsave vmwrite vmxoff vmxon invept invvpid pabsb pabsw pabsd palignr phaddw phaddd phaddsw phsubw phsubd phsubsw pmaddubsw pmulhrsw pshufb psignb psignw psignd extrq insertq movntsd movntss lzcnt blendpd blendps blendvpd blendvps dppd dpps extractps insertps movntdqa mpsadbw packusdw pblendvb pblendw pcmpeqq pextrb pextrd pe\
xtrq phminposuw pinsrb pinsrd pinsrq pmaxsb pmaxsd pmaxud pmaxuw pminsb pminsd pminud pminuw pmovsxbw pmovsxbd pmovsxbq pmovsxwd pmovsxwq pmovsxdq pmovzxbw pmovzxbd pmovzxbq pmovzxwd pmovzxwq pmovzxdq pmuldq pmulld ptest roundpd roundps roundsd roundss crc32 pcmpestri pcmpestrm pcmpistri pcmpistrm pcmpgtq popcnt getsec pfrcpv pfrsqrtv movbe aesenc aesenclast aesdec aesdeclast aesimc aeskeygenassist vaesenc vaesenclast vaesdec vaesdeclast vaesimc vaeskeygenassist vaddpd vaddps vaddsd vaddss vadds\
ubpd vaddsubps vandpd vandps vandnpd vandnps vblendpd vblendps vblendvpd vblendvps vbroadcastss vbroadcastsd vbroadcastf128 vcmpeq_ospd vcmpeqpd vcmplt_ospd vcmpltpd vcmple_ospd vcmplepd vcmpunord_qpd vcmpunordpd vcmpneq_uqpd vcmpneqpd vcmpnlt_uspd vcmpnltpd vcmpnle_uspd vcmpnlepd vcmpord_qpd vcmpordpd vcmpeq_uqpd vcmpnge_uspd vcmpngepd vcmpngt_uspd vcmpngtpd vcmpfalse_oqpd vcmpfalsepd vcmpneq_oqpd vcmpge_ospd vcmpgepd vcmpgt_ospd vcmpgtpd vcmptrue_uqpd vcmptruepd vcmplt_oqpd vcmple_oqpd vcmpuno\
rd_spd vcmpneq_uspd vcmpnlt_uqpd vcmpnle_uqpd vcmpord_spd vcmpeq_uspd vcmpnge_uqpd vcmpngt_uqpd vcmpfalse_ospd vcmpneq_ospd vcmpge_oqpd vcmpgt_oqpd vcmptrue_uspd vcmppd vcmpeq_osps vcmpeqps vcmplt_osps vcmpltps vcmple_osps vcmpleps vcmpunord_qps vcmpunordps vcmpneq_uqps vcmpneqps vcmpnlt_usps vcmpnltps vcmpnle_usps vcmpnleps vcmpord_qps vcmpordps vcmpeq_uqps vcmpnge_usps vcmpngeps vcmpngt_usps vcmpngtps vcmpfalse_oqps vcmpfalseps vcmpneq_oqps vcmpge_osps vcmpgeps vcmpgt_osps vcmpgtps vcmptrue_uq\
ps vcmptrueps vcmplt_oqps vcmple_oqps vcmpunord_sps vcmpneq_usps vcmpnlt_uqps vcmpnle_uqps vcmpord_sps vcmpeq_usps vcmpnge_uqps vcmpngt_uqps vcmpfalse_osps vcmpneq_osps vcmpge_oqps vcmpgt_oqps vcmptrue_usps vcmpps vcmpeq_ossd vcmpeqsd vcmplt_ossd vcmpltsd vcmple_ossd vcmplesd vcmpunord_qsd vcmpunordsd vcmpneq_uqsd vcmpneqsd vcmpnlt_ussd vcmpnltsd vcmpnle_ussd vcmpnlesd vcmpord_qsd vcmpordsd vcmpeq_uqsd vcmpnge_ussd vcmpngesd vcmpngt_ussd vcmpngtsd vcmpfalse_oqsd vcmpfalsesd vcmpneq_oqsd vcmpge_o\
ssd vcmpgesd vcmpgt_ossd vcmpgtsd vcmptrue_uqsd vcmptruesd vcmplt_oqsd vcmple_oqsd vcmpunord_ssd vcmpneq_ussd vcmpnlt_uqsd vcmpnle_uqsd vcmpord_ssd vcmpeq_ussd vcmpnge_uqsd vcmpngt_uqsd vcmpfalse_ossd vcmpneq_ossd vcmpge_oqsd vcmpgt_oqsd vcmptrue_ussd vcmpsd vcmpeq_osss vcmpeqss vcmplt_osss vcmpltss vcmple_osss vcmpless vcmpunord_qss vcmpunordss vcmpneq_uqss vcmpneqss vcmpnlt_usss vcmpnltss vcmpnle_usss vcmpnless vcmpord_qss vcmpordss vcmpeq_uqss vcmpnge_usss vcmpngess vcmpngt_usss vcmpngtss vcm\
pfalse_oqss vcmpfalsess vcmpneq_oqss vcmpge_osss vcmpgess vcmpgt_osss vcmpgtss vcmptrue_uqss vcmptruess vcmplt_oqss vcmple_oqss vcmpunord_sss vcmpneq_usss vcmpnlt_uqss vcmpnle_uqss vcmpord_sss vcmpeq_usss vcmpnge_uqss vcmpngt_uqss vcmpfalse_osss vcmpneq_osss vcmpge_oqss vcmpgt_oqss vcmptrue_usss vcmpss vcomisd vcomiss vcvtdq2pd vcvtdq2ps vcvtpd2dq vcvtpd2ps vcvtps2dq vcvtps2pd vcvtsd2si vcvtsd2ss vcvtsi2sd vcvtsi2ss vcvtss2sd vcvtss2si vcvttpd2dq vcvttps2dq vcvttsd2si vcvttss2si vdivpd vdivps vd\
ivsd vdivss vdppd vdpps vextractf128 vextractps vhaddpd vhaddps vhsubpd vhsubps vinsertf128 vinsertps vlddqu vldqqu vldmxcsr vmaskmovdqu vmaskmovps vmaskmovpd vmaxpd vmaxps vmaxsd vmaxss vminpd vminps vminsd vminss vmovapd vmovaps vmovd vmovq vmovddup vmovdqa vmovqqa vmovdqu vmovqqu vmovhlps vmovhpd vmovhps vmovlhps vmovlpd vmovlps vmovmskpd vmovmskps vmovntdq vmovntqq vmovntdqa vmovntpd vmovntps vmovsd vmovshdup vmovsldup vmovss vmovupd vmovups vmpsadbw vmulpd vmulps vmulsd vmulss vorpd vorps v\
pabsb vpabsw vpabsd vpacksswb vpackssdw vpackuswb vpackusdw vpaddb vpaddw vpaddd vpaddq vpaddsb vpaddsw vpaddusb vpaddusw vpalignr vpand vpandn vpavgb vpavgw vpblendvb vpblendw vpcmpestri vpcmpestrm vpcmpistri vpcmpistrm vpcmpeqb vpcmpeqw vpcmpeqd vpcmpeqq vpcmpgtb vpcmpgtw vpcmpgtd vpcmpgtq vpermilpd vpermilps vperm2f128 vpextrb vpextrw vpextrd vpextrq vphaddw vphaddd vphaddsw vphminposuw vphsubw vphsubd vphsubsw vpinsrb vpinsrw vpinsrd vpinsrq vpmaddwd vpmaddubsw vpmaxsb vpmaxsw vpmaxsd vpmaxu\
b vpmaxuw vpmaxud vpminsb vpminsw vpminsd vpminub vpminuw vpminud vpmovmskb vpmovsxbw vpmovsxbd vpmovsxbq vpmovsxwd vpmovsxwq vpmovsxdq vpmovzxbw vpmovzxbd vpmovzxbq vpmovzxwd vpmovzxwq vpmovzxdq vpmulhuw vpmulhrsw vpmulhw vpmullw vpmulld vpmuludq vpmuldq vpor vpsadbw vpshufb vpshufd vpshufhw vpshuflw vpsignb vpsignw vpsignd vpslldq vpsrldq vpsllw vpslld vpsllq vpsraw vpsrad vpsrlw vpsrld vpsrlq vptest vpsubb vpsubw vpsubd vpsubq vpsubsb vpsubsw vpsubusb vpsubusw vpunpckhbw vpunpckhwd vpunpckhdq\
 vpunpckhqdq vpunpcklbw vpunpcklwd vpunpckldq vpunpcklqdq vpxor vrcpps vrcpss vrsqrtps vrsqrtss vroundpd vroundps vroundsd vroundss vshufpd vshufps vsqrtpd vsqrtps vsqrtsd vsqrtss vstmxcsr vsubpd vsubps vsubsd vsubss vtestps vtestpd vucomisd vucomiss vunpckhpd vunpckhps vunpcklpd vunpcklps vxorpd vxorps vzeroall vzeroupper pclmullqlqdq pclmulhqlqdq pclmullqhqdq pclmulhqhqdq pclmulqdq vpclmullqlqdq vpclmulhqlqdq vpclmullqhqdq vpclmulhqhqdq vpclmulqdq vfmadd132ps vfmadd132pd vfmadd312ps vfmadd312p\
d vfmadd213ps vfmadd213pd vfmadd123ps vfmadd123pd vfmadd231ps vfmadd231pd vfmadd321ps vfmadd321pd vfmaddsub132ps vfmaddsub132pd vfmaddsub312ps vfmaddsub312pd vfmaddsub213ps vfmaddsub213pd vfmaddsub123ps vfmaddsub123pd vfmaddsub231ps vfmaddsub231pd vfmaddsub321ps vfmaddsub321pd vfmsub132ps vfmsub132pd vfmsub312ps vfmsub312pd vfmsub213ps vfmsub213pd vfmsub123ps vfmsub123pd vfmsub231ps vfmsub231pd vfmsub321ps vfmsub321pd vfmsubadd132ps vfmsubadd132pd vfmsubadd312ps vfmsubadd312pd vfmsubadd213ps vfm\
subadd213pd vfmsubadd123ps vfmsubadd123pd vfmsubadd231ps vfmsubadd231pd vfmsubadd321ps vfmsubadd321pd vfnmadd132ps vfnmadd132pd vfnmadd312ps vfnmadd312pd vfnmadd213ps vfnmadd213pd vfnmadd123ps vfnmadd123pd vfnmadd231ps vfnmadd231pd vfnmadd321ps vfnmadd321pd vfnmsub132ps vfnmsub132pd vfnmsub312ps vfnmsub312pd vfnmsub213ps vfnmsub213pd vfnmsub123ps vfnmsub123pd vfnmsub231ps vfnmsub231pd vfnmsub321ps vfnmsub321pd vfmadd132ss vfmadd132sd vfmadd312ss vfmadd312sd vfmadd213ss vfmadd213sd vfmadd123ss vf\
madd123sd vfmadd231ss vfmadd231sd vfmadd321ss vfmadd321sd vfmsub132ss vfmsub132sd vfmsub312ss vfmsub312sd vfmsub213ss vfmsub213sd vfmsub123ss vfmsub123sd vfmsub231ss vfmsub231sd vfmsub321ss vfmsub321sd vfnmadd132ss vfnmadd132sd vfnmadd312ss vfnmadd312sd vfnmadd213ss vfnmadd213sd vfnmadd123ss vfnmadd123sd vfnmadd231ss vfnmadd231sd vfnmadd321ss vfnmadd321sd vfnmsub132ss vfnmsub132sd vfnmsub312ss vfnmsub312sd vfnmsub213ss vfnmsub213sd vfnmsub123ss vfnmsub123sd vfnmsub231ss vfnmsub231sd vfnmsub321ss\
 vfnmsub321sd rdfsbase rdgsbase rdrand wrfsbase wrgsbase vcvtph2ps vcvtps2ph adcx adox rdseed clac stac xstore xcryptecb xcryptcbc xcryptctr xcryptcfb xcryptofb montmul xsha1 xsha256 llwpcb slwpcb lwpval lwpins vfmaddpd vfmaddps vfmaddsd vfmaddss vfmaddsubpd vfmaddsubps vfmsubaddpd vfmsubaddps vfmsubpd vfmsubps vfmsubsd vfmsubss vfnmaddpd vfnmaddps vfnmaddsd vfnmaddss vfnmsubpd vfnmsubps vfnmsubsd vfnmsubss vfrczpd vfrczps vfrczsd vfrczss vpcmov vpcomb vpcomd vpcomq vpcomub vpcomud vpcomuq vpcom\
uw vpcomw vphaddbd vphaddbq vphaddbw vphadddq vphaddubd vphaddubq vphaddubw vphaddudq vphadduwd vphadduwq vphaddwd vphaddwq vphsubbw vphsubdq vphsubwd vpmacsdd vpmacsdqh vpmacsdql vpmacssdd vpmacssdqh vpmacssdql vpmacsswd vpmacssww vpmacswd vpmacsww vpmadcsswd vpmadcswd vpperm vprotb vprotd vprotq vprotw vpshab vpshad vpshaq vpshaw vpshlb vpshld vpshlq vpshlw vbroadcasti128 vpblendd vpbroadcastb vpbroadcastw vpbroadcastd vpbroadcastq vpermd vpermpd vpermps vpermq vperm2i128 vextracti128 vinserti\
128 vpmaskmovd vpmaskmovq vpsllvd vpsllvq vpsravd vpsrlvd vpsrlvq vgatherdpd vgatherqpd vgatherdps vgatherqps vpgatherdd vpgatherqd vpgatherdq vpgatherqq xabort xbegin xend xtest andn bextr blci blcic blsi blsic blcfill blsfill blcmsk blsmsk blsr blcs bzhi mulx pdep pext rorx sarx shlx shrx tzcnt tzmsk t1mskc valignd valignq vblendmpd vblendmps vbroadcastf32x4 vbroadcastf64x4 vbroadcasti32x4 vbroadcasti64x4 vcompresspd vcompressps vcvtpd2udq vcvtps2udq vcvtsd2usi vcvtss2usi vcvttpd2udq vcvttps2u\
dq vcvttsd2usi vcvttss2usi vcvtudq2pd vcvtudq2ps vcvtusi2sd vcvtusi2ss vexpandpd vexpandps vextractf32x4 vextractf64x4 vextracti32x4 vextracti64x4 vfixupimmpd vfixupimmps vfixupimmsd vfixupimmss vgetexppd vgetexpps vgetexpsd vgetexpss vgetmantpd vgetmantps vgetmantsd vgetmantss vinsertf32x4 vinsertf64x4 vinserti32x4 vinserti64x4 vmovdqa32 vmovdqa64 vmovdqu32 vmovdqu64 vpabsq vpandd vpandnd vpandnq vpandq vpblendmd vpblendmq vpcmpltd vpcmpled vpcmpneqd vpcmpnltd vpcmpnled vpcmpd vpcmpltq vpcmpleq\
 vpcmpneqq vpcmpnltq vpcmpnleq vpcmpq vpcmpequd vpcmpltud vpcmpleud vpcmpnequd vpcmpnltud vpcmpnleud vpcmpud vpcmpequq vpcmpltuq vpcmpleuq vpcmpnequq vpcmpnltuq vpcmpnleuq vpcmpuq vpcompressd vpcompressq vpermi2d vpermi2pd vpermi2ps vpermi2q vpermt2d vpermt2pd vpermt2ps vpermt2q vpexpandd vpexpandq vpmaxsq vpmaxuq vpminsq vpminuq vpmovdb vpmovdw vpmovqb vpmovqd vpmovqw vpmovsdb vpmovsdw vpmovsqb vpmovsqd vpmovsqw vpmovusdb vpmovusdw vpmovusqb vpmovusqd vpmovusqw vpord vporq vprold vprolq vprolvd\
 vprolvq vprord vprorq vprorvd vprorvq vpscatterdd vpscatterdq vpscatterqd vpscatterqq vpsraq vpsravq vpternlogd vpternlogq vptestmd vptestmq vptestnmd vptestnmq vpxord vpxorq vrcp14pd vrcp14ps vrcp14sd vrcp14ss vrndscalepd vrndscaleps vrndscalesd vrndscaless vrsqrt14pd vrsqrt14ps vrsqrt14sd vrsqrt14ss vscalefpd vscalefps vscalefsd vscalefss vscatterdpd vscatterdps vscatterqpd vscatterqps vshuff32x4 vshuff64x2 vshufi32x4 vshufi64x2 kandnw kandw kmovw knotw kortestw korw kshiftlw kshiftrw kunpckb\
w kxnorw kxorw vpbroadcastmb2q vpbroadcastmw2d vpconflictd vpconflictq vplzcntd vplzcntq vexp2pd vexp2ps vrcp28pd vrcp28ps vrcp28sd vrcp28ss vrsqrt28pd vrsqrt28ps vrsqrt28sd vrsqrt28ss vgatherpf0dpd vgatherpf0dps vgatherpf0qpd vgatherpf0qps vgatherpf1dpd vgatherpf1dps vgatherpf1qpd vgatherpf1qps vscatterpf0dpd vscatterpf0dps vscatterpf0qpd vscatterpf0qps vscatterpf1dpd vscatterpf1dps vscatterpf1qpd vscatterpf1qps prefetchwt1 bndmk bndcl bndcu bndcn bndmov bndldx bndstx sha1rnds4 sha1nexte sha1ms\
g1 sha1msg2 sha256rnds2 sha256msg1 sha256msg2 hint_nop0 hint_nop1 hint_nop2 hint_nop3 hint_nop4 hint_nop5 hint_nop6 hint_nop7 hint_nop8 hint_nop9 hint_nop10 hint_nop11 hint_nop12 hint_nop13 hint_nop14 hint_nop15 hint_nop16 hint_nop17 hint_nop18 hint_nop19 hint_nop20 hint_nop21 hint_nop22 hint_nop23 hint_nop24 hint_nop25 hint_nop26 hint_nop27 hint_nop28 hint_nop29 hint_nop30 hint_nop31 hint_nop32 hint_nop33 hint_nop34 hint_nop35 hint_nop36 hint_nop37 hint_nop38 hint_nop39 hint_nop40 hint_nop41 hi\
nt_nop42 hint_nop43 hint_nop44 hint_nop45 hint_nop46 hint_nop47 hint_nop48 hint_nop49 hint_nop50 hint_nop51 hint_nop52 hint_nop53 hint_nop54 hint_nop55 hint_nop56 hint_nop57 hint_nop58 hint_nop59 hint_nop60 hint_nop61 hint_nop62 hint_nop63",built_in:"ip eip rip al ah bl bh cl ch dl dh sil dil bpl spl r8b r9b r10b r11b r12b r13b r14b r15b ax bx cx dx si di bp sp r8w r9w r10w r11w r12w r13w r14w r15w eax ebx ecx edx esi edi ebp esp eip r8d r9d r10d r11d r12d r13d r14d r15d rax rbx rcx rdx rsi rdi \
rbp rsp r8 r9 r10 r11 r12 r13 r14 r15 cs ds es fs gs ss st st0 st1 st2 st3 st4 st5 st6 st7 mm0 mm1 mm2 mm3 mm4 mm5 mm6 mm7 xmm0  xmm1  xmm2  xmm3  xmm4  xmm5  xmm6  xmm7  xmm8  xmm9 xmm10  xmm11 xmm12 xmm13 xmm14 xmm15 xmm16 xmm17 xmm18 xmm19 xmm20 xmm21 xmm22 xmm23 xmm24 xmm25 xmm26 xmm27 xmm28 xmm29 xmm30 xmm31 ymm0  ymm1  ymm2  ymm3  ymm4  ymm5  ymm6  ymm7  ymm8  ymm9 ymm10  ymm11 ymm12 ymm13 ymm14 ymm15 ymm16 ymm17 ymm18 ymm19 ymm20 ymm21 ymm22 ymm23 ymm24 ymm25 ymm26 ymm27 ymm28 ymm29 ymm30\
 ymm31 zmm0  zmm1  zmm2  zmm3  zmm4  zmm5  zmm6  zmm7  zmm8  zmm9 zmm10  zmm11 zmm12 zmm13 zmm14 zmm15 zmm16 zmm17 zmm18 zmm19 zmm20 zmm21 zmm22 zmm23 zmm24 zmm25 zmm26 zmm27 zmm28 zmm29 zmm30 zmm31 k0 k1 k2 k3 k4 k5 k6 k7 bnd0 bnd1 bnd2 bnd3 cr0 cr1 cr2 cr3 cr4 cr8 dr0 dr1 dr2 dr3 dr8 tr3 tr4 tr5 tr6 tr7 r0 r1 r2 r3 r4 r5 r6 r7 r0b r1b r2b r3b r4b r5b r6b r7b r0w r1w r2w r3w r4w r5w r6w r7w r0d r1d r2d r3d r4d r5d r6d r7d r0h r1h r2h r3h r0l r1l r2l r3l r4l r5l r6l r7l r8l r9l r10l r11l r12l r1\
3l r14l r15l db dw dd dq dt ddq do dy dz resb resw resd resq rest resdq reso resy resz incbin equ times byte word dword qword nosplit rel abs seg wrt strict near far a32 ptr",meta:"%define %xdefine %+ %undef %defstr %deftok %assign %strcat %strlen %substr %rotate %elif %else %endif %if %ifmacro %ifctx %ifidn %ifidni %ifid %ifnum %ifstr %iftoken %ifempty %ifenv %error %warning %fatal %rep %endrep %include %push %pop %repl %pathsearch %depend %use %arg %stacksize %local %line %comment %endcomment \
.nolist __FILE__ __LINE__ __SECT__  __BITS__ __OUTPUT_FORMAT__ __DATE__ __TIME__ __DATE_NUM__ __TIME_NUM__ __UTC_DATE__ __UTC_TIME__ __UTC_DATE_NUM__ __UTC_TIME_NUM__  __PASS__ struc endstruc istruc at iend align alignb sectalign daz nodaz up down zero default option assume public bits use16 use32 use64 default section segment absolute extern global common cpu float __utf16__ __utf16le__ __utf16be__ __utf32__ __utf32le__ __utf32be__ __float8__ __float16__ __float32__ __float64__ __float80m__ __f\
loat80e__ __float128l__ __float128h__ __Infinity__ __QNaN__ __SNaN__ Inf NaN QNaN SNaN float8 float16 float32 float64 float80m float80e float128l float128h __FLOAT_DAZ__ __FLOAT_ROUND__ __FLOAT__"},contains:[hljs.COMMENT(";","$",{relevance:0}),{className:"number",variants:[{begin:"\\b(?:([0-9][0-9_]*)?\\.[0-9_]*(?:[eE][+-]?[0-9_]+)?|(0[Xx])?[0-9][0-9_]*(\\.[0-9_]*)?(?:[pP](?:[+-]?[0-9_]+)?)?)\\b",relevance:0},{begin:"\\$[0-9][0-9A-Fa-f]*",relevance:0},{begin:"\\b(?:[0-9A-Fa-f][0-9A-Fa-f_]*[Hh]|[0\
-9][0-9_]*[DdTt]?|[0-7][0-7_]*[QqOo]|[0-1][0-1_]*[BbYy])\\b"},{begin:"\\b(?:0[Xx][0-9A-Fa-f_]+|0[DdTt][0-9_]+|0[QqOo][0-7_]+|0[BbYy][0-1_]+)\\b"}]},hljs.QUOTE_STRING_MODE,{className:"string",variants:[{begin:"'",end:"[^\\\\]'"},{begin:"`",end:"[^\\\\]`"}],relevance:0},{className:"symbol",variants:[{begin:"^\\s*[A-Za-z._?][A-Za-z0-9_$#@~.?]*(:|\\s+label)"},{begin:"^\\s*%%[A-Za-z0-9_$#@~.?]*:"}],relevance:0},{className:"subst",begin:"%[0-9]+",relevance:0},{className:"subst",begin:"%!S+",relevance:0},
{className:"meta",begin:/^\s*\.[\w_-]+/}]}}function xl(hljs){const KWS=["if","then","else","do","while","until","for","loop","import","with","is","as","where","when","by","data","constant","integer","real","text","name","boolean","symbol","infix","prefix","postfix","block","tree"],BUILT_INS2=["in","mod","rem","and","or","xor","not","abs","sign","floor","ceil","sqrt","sin","cos","tan","asin","acos","atan","exp","expm1","log","log2","log10","log1p","pi","at","text_length","text_range","text_find",
"text_replace","contains","page","slide","basic_slide","title_slide","title","subtitle","fade_in","fade_out","fade_at","clear_color","color","line_color","line_width","texture_wrap","texture_transform","texture","scale_?x","scale_?y","scale_?z?","translate_?x","translate_?y","translate_?z?","rotate_?x","rotate_?y","rotate_?z?","rectangle","circle","ellipse","sphere","path","line_to","move_to","quad_to","curve_to","theme","background","contents","locally","time","mouse_?x","mouse_?y","mouse_butto\
ns"],BUILTIN_MODULES=["ObjectLoader","Animate","MovieCredits","Slides","Filters","Shading","Materials","LensFlare","Mapping","VLCAudioVideo","StereoDecoder","PointCloud","NetworkAccess","RemoteControl","RegExp","ChromaKey","Snowfall","NodeJS","Speech","Charts"],KEYWORDS2={$pattern:/[a-zA-Z][a-zA-Z0-9_?]*/,keyword:KWS,literal:["true","false","nil"],built_in:BUILT_INS2.concat(BUILTIN_MODULES)},DOUBLE_QUOTE_TEXT={className:"string",begin:'"',end:'"',illegal:"\\n"},SINGLE_QUOTE_TEXT={className:"stri\
ng",begin:"'",end:"'",illegal:"\\n"},LONG_TEXT={className:"string",begin:"<<",end:">>"},BASED_NUMBER={className:"number",begin:"[0-9]+#[0-9A-Z_]+(\\.[0-9-A-Z_]+)?#?([Ee][+-]?[0-9]+)?"},IMPORT={beginKeywords:"import",end:"$",keywords:KEYWORDS2,contains:[DOUBLE_QUOTE_TEXT]},FUNCTION_DEFINITION={className:"function",begin:/[a-z][^\n]*->/,returnBegin:!0,end:/->/,contains:[hljs.inherit(hljs.TITLE_MODE,{starts:{endsWithParent:!0,keywords:KEYWORDS2}})]};return{name:"XL",aliases:["tao"],keywords:KEYWORDS2,
contains:[hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,DOUBLE_QUOTE_TEXT,SINGLE_QUOTE_TEXT,LONG_TEXT,FUNCTION_DEFINITION,IMPORT,BASED_NUMBER,hljs.NUMBER_MODE]}}function xquery(_hljs){return{name:"XQuery",aliases:["xpath","xq","xqm"],case_insensitive:!1,illegal:/(proc)|(abstract)|(extends)|(until)|(#)/,keywords:{$pattern:/[a-zA-Z$][a-zA-Z0-9_:-]*/,keyword:["module","schema","namespace","boundary-space","preserve","no-preserve","strip","default","collation","base-uri","ordering","context","d\
ecimal-format","decimal-separator","copy-namespaces","empty-sequence","except","exponent-separator","external","grouping-separator","inherit","no-inherit","lax","minus-sign","per-mille","percent","schema-attribute","schema-element","strict","unordered","zero-digit","declare","import","option","function","validate","variable","for","at","in","let","where","order","group","by","return","if","then","else","tumbling","sliding","window","start","when","only","end","previous","next","stable","ascendin\
g","descending","allowing","empty","greatest","least","some","every","satisfies","switch","case","typeswitch","try","catch","and","or","to","union","intersect","instance","of","treat","as","castable","cast","map","array","delete","insert","into","replace","value","rename","copy","modify","update"],type:["item","document-node","node","attribute","document","element","comment","namespace","namespace-node","processing-instruction","text","construction","xs:anyAtomicType","xs:untypedAtomic","xs:dura\
tion","xs:time","xs:decimal","xs:float","xs:double","xs:gYearMonth","xs:gYear","xs:gMonthDay","xs:gMonth","xs:gDay","xs:boolean","xs:base64Binary","xs:hexBinary","xs:anyURI","xs:QName","xs:NOTATION","xs:dateTime","xs:dateTimeStamp","xs:date","xs:string","xs:normalizedString","xs:token","xs:language","xs:NMTOKEN","xs:Name","xs:NCName","xs:ID","xs:IDREF","xs:ENTITY","xs:integer","xs:nonPositiveInteger","xs:negativeInteger","xs:long","xs:int","xs:short","xs:byte","xs:nonNegativeInteger","xs:unisign\
edLong","xs:unsignedInt","xs:unsignedShort","xs:unsignedByte","xs:positiveInteger","xs:yearMonthDuration","xs:dayTimeDuration"],literal:["eq","ne","lt","le","gt","ge","is","self::","child::","descendant::","descendant-or-self::","attribute::","following::","following-sibling::","parent::","ancestor::","ancestor-or-self::","preceding::","preceding-sibling::","NaN"]},contains:[{className:"variable",begin:/[$][\w\-:]+/},{className:"built_in",variants:[{begin:/\barray:/,end:/(?:append|filter|flatten|fold-(?:left|right)|for-each(?:-pair)?|get|head|insert-before|join|put|remove|reverse|size|sort|subarray|tail)\b/},
{begin:/\bmap:/,end:/(?:contains|entry|find|for-each|get|keys|merge|put|remove|size)\b/},{begin:/\bmath:/,end:/(?:a(?:cos|sin|tan[2]?)|cos|exp(?:10)?|log(?:10)?|pi|pow|sin|sqrt|tan)\b/},{begin:/\bop:/,end:/\(/,excludeEnd:!0},{begin:/\bfn:/,end:/\(/,excludeEnd:!0},{begin:/[^</$:'"-]\b(?:abs|accumulator-(?:after|before)|adjust-(?:date(?:Time)?|time)-to-timezone|analyze-string|apply|available-(?:environment-variables|system-properties)|avg|base-uri|boolean|ceiling|codepoints?-(?:equal|to-string)|collation-key|collection|compare|concat|contains(?:-token)?|copy-of|count|current(?:-)?(?:date(?:Time)?|time|group(?:ing-key)?|output-uri|merge-(?:group|key))?data|dateTime|days?-from-(?:date(?:Time)?|duration)|deep-equal|default-(?:collation|language)|distinct-values|document(?:-uri)?|doc(?:-available)?|element-(?:available|with-id)|empty|encode-for-uri|ends-with|environment-variable|error|escape-html-uri|exactly-one|exists|false|filter|floor|fold-(?:left|right)|for-each(?:-pair)?|format-(?:date(?:Time)?|time|integer|number)|function-(?:arity|available|lookup|name)|generate-id|has-children|head|hours-from-(?:dateTime|duration|time)|id(?:ref)?|implicit-timezone|in-scope-prefixes|index-of|innermost|insert-before|iri-to-uri|json-(?:doc|to-xml)|key|lang|last|load-xquery-module|local-name(?:-from-QName)?|(?:lower|upper)-case|matches|max|minutes-from-(?:dateTime|duration|time)|min|months?-from-(?:date(?:Time)?|duration)|name(?:space-uri-?(?:for-prefix|from-QName)?)?|nilled|node-name|normalize-(?:space|unicode)|not|number|one-or-more|outermost|parse-(?:ietf-date|json)|path|position|(?:prefix-from-)?QName|random-number-generator|regex-group|remove|replace|resolve-(?:QName|uri)|reverse|root|round(?:-half-to-even)?|seconds-from-(?:dateTime|duration|time)|snapshot|sort|starts-with|static-base-uri|stream-available|string-?(?:join|length|to-codepoints)?|subsequence|substring-?(?:after|before)?|sum|system-property|tail|timezone-from-(?:date(?:Time)?|time)|tokenize|trace|trans(?:form|late)|true|type-available|unordered|unparsed-(?:entity|text)?-?(?:public-id|uri|available|lines)?|uri-collection|xml-to-json|years?-from-(?:date(?:Time)?|duration)|zero-or-one)\b/},
{begin:/\blocal:/,end:/\(/,excludeEnd:!0},{begin:/\bzip:/,end:/(?:zip-file|(?:xml|html|text|binary)-entry| (?:update-)?entries)\b/},{begin:/\b(?:util|db|functx|app|xdmp|xmldb):/,end:/\(/,excludeEnd:!0}]},{className:"string",variants:[{begin:/"/,end:/"/,contains:[{begin:/""/,relevance:0}]},{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]}]},{className:"number",begin:/(\b0[0-7_]+)|(\b0x[0-9a-fA-F_]+)|(\b[1-9][0-9_]*(\.[0-9_]+)?)|[0_]\b/,relevance:0},{className:"comment",begin:/\(:/,end:/:\)/,
relevance:10,contains:[{className:"doctag",begin:/@\w+/}]},{className:"meta",begin:/%[\w\-:]+/},{className:"title",begin:/\bxquery version "[13]\.[01]"\s?(?:encoding ".+")?/,end:/;/},{beginKeywords:"element attribute comment document processing-instruction",end:/\{/,excludeEnd:!0},{begin:/<([\w._:-]+)(\s+\S*=('|").*('|"))?>/,end:/(\/[\w._:-]+>)/,subLanguage:"xml",contains:[{begin:/\{/,end:/\}/,subLanguage:"xquery"},"self"]}]}}function zephir(hljs){const STRING={className:"string",contains:[hljs.
BACKSLASH_ESCAPE],variants:[hljs.inherit(hljs.APOS_STRING_MODE,{illegal:null}),hljs.inherit(hljs.QUOTE_STRING_MODE,{illegal:null})]},TITLE_MODE=hljs.UNDERSCORE_TITLE_MODE,NUMBER={variants:[hljs.BINARY_NUMBER_MODE,hljs.C_NUMBER_MODE]},KEYWORDS2="namespace class interface use extends function return abstract final public protected private static deprecated throw try catch Exception echo empty isset instanceof unset let var new const self require if else elseif switch case default do while loop for\
 continue break likely unlikely __LINE__ __FILE__ __DIR__ __FUNCTION__ __CLASS__ __TRAIT__ __METHOD__ __NAMESPACE__ array boolean float double integer object resource string char long unsigned bool int uint ulong uchar true false null undefined";return{name:"Zephir",aliases:["zep"],keywords:KEYWORDS2,contains:[hljs.C_LINE_COMMENT_MODE,hljs.COMMENT(/\/\*/,/\*\//,{contains:[{className:"doctag",begin:/@[A-Za-z]+/}]}),{className:"string",begin:/<<<['"]?\w+['"]?$/,end:/^\w+;/,contains:[hljs.BACKSLASH_ESCAPE]},
{begin:/(::|->)+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/},{className:"function",beginKeywords:"function fn",end:/[;{]/,excludeEnd:!0,illegal:/\$|\[|%/,contains:[TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,keywords:KEYWORDS2,contains:["self",hljs.C_BLOCK_COMMENT_MODE,STRING,NUMBER]}]},{className:"class",beginKeywords:"class interface",end:/\{/,excludeEnd:!0,illegal:/[:($"]/,contains:[{beginKeywords:"extends implements"},TITLE_MODE]},{beginKeywords:"namespace",end:/;/,illegal:/[.']/,contains:[
TITLE_MODE]},{beginKeywords:"use",end:/;/,contains:[TITLE_MODE]},{begin:/=>/},STRING,NUMBER]}}function cPlusPlus(hljs){const regex=hljs.regex,C_LINE_COMMENT_MODE=hljs.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),DECLTYPE_AUTO_RE="decltype\\(auto\\)",NAMESPACE_RE="[a-zA-Z_]\\w*::",FUNCTION_TYPE_RE="(?!struct)("+DECLTYPE_AUTO_RE+"|"+regex.optional(NAMESPACE_RE)+"[a-zA-Z_]\\w*"+regex.optional("<[^<>]+>")+")",CPP_PRIMITIVE_TYPES={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},STRINGS={className:"stri\
ng",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[hljs.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},hljs.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},NUMBERS={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-F\
a-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},PREPROCESSOR={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef \
ifndef include"},contains:[{begin:/\\\n/,relevance:0},hljs.inherit(STRINGS,{className:"string"}),{className:"string",begin:/<.*?>/},C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE]},TITLE_MODE={className:"title",begin:regex.optional(NAMESPACE_RE)+hljs.IDENT_RE,relevance:0},FUNCTION_TITLE=regex.optional(NAMESPACE_RE)+hljs.IDENT_RE+"\\s*\\(",RESERVED_KEYWORDS=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","cl\
ass","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_ass\
ert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],RESERVED_TYPES=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],TYPE_HINTS=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","\
condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_typ\
e","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],FUNCTION_HINTS=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","ispr\
int","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh",
"terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],CPP_KEYWORDS={type:RESERVED_TYPES,keyword:RESERVED_KEYWORDS,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:TYPE_HINTS},FUNCTION_DISPATCH={className:"function.dispatch",relevance:0,keywords:{_hint:FUNCTION_HINTS},begin:regex.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,hljs.IDENT_RE,regex.lookahead(/(<[^<>]+>|)\s*\(/))},EXPRESSION_CONTAINS=[FUNCTION_DISPATCH,
PREPROCESSOR,CPP_PRIMITIVE_TYPES,C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,NUMBERS,STRINGS],EXPRESSION_CONTEXT={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:CPP_KEYWORDS,contains:EXPRESSION_CONTAINS.concat([{begin:/\(/,end:/\)/,keywords:CPP_KEYWORDS,contains:EXPRESSION_CONTAINS.concat(["self"]),relevance:0}]),relevance:0},FUNCTION_DECLARATION={className:"function",begin:"("+FUNCTION_TYPE_RE+"[\\*&\\s]+)+"+FUNCTION_TITLE,returnBegin:!0,
end:/[{;=]/,excludeEnd:!0,keywords:CPP_KEYWORDS,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:DECLTYPE_AUTO_RE,keywords:CPP_KEYWORDS,relevance:0},{begin:FUNCTION_TITLE,returnBegin:!0,contains:[TITLE_MODE],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[STRINGS,NUMBERS]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:CPP_KEYWORDS,relevance:0,contains:[C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,STRINGS,NUMBERS,CPP_PRIMITIVE_TYPES,{begin:/\(/,end:/\)/,
keywords:CPP_KEYWORDS,relevance:0,contains:["self",C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,STRINGS,NUMBERS,CPP_PRIMITIVE_TYPES]}]},CPP_PRIMITIVE_TYPES,C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,PREPROCESSOR]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:CPP_KEYWORDS,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(EXPRESSION_CONTEXT,FUNCTION_DECLARATION,FUNCTION_DISPATCH,EXPRESSION_CONTAINS,[PREPROCESSOR,{begin:"\\b(deque|l\
ist|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:CPP_KEYWORDS,contains:["self",CPP_PRIMITIVE_TYPES]},{begin:hljs.IDENT_RE+"::",keywords:CPP_KEYWORDS},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function arduino(hljs){const ARDUINO_KW={type:["boo\
lean","byte","word","String"],built_in:["KeyboardController","MouseController","SoftwareSerial","EthernetServer","EthernetClient","LiquidCrystal","RobotControl","GSMVoiceCall","EthernetUDP","EsploraTFT","HttpClient","RobotMotor","WiFiClient","GSMScanner","FileSystem","Scheduler","GSMServer","YunClient","YunServer","IPAddress","GSMClient","GSMModem","Keyboard","Ethernet","Console","GSMBand","Esplora","Stepper","Process","WiFiUDP","GSM_SMS","Mailbox","USBHost","Firmata","PImage","Client","Server",
"GSMPIN","FileIO","Bridge","Serial","EEPROM","Stream","Mouse","Audio","Servo","File","Task","GPRS","WiFi","Wire","TFT","GSM","SPI","SD"],_hints:["setup","loop","runShellCommandAsynchronously","analogWriteResolution","retrieveCallingNumber","printFirmwareVersion","analogReadResolution","sendDigitalPortPair","noListenOnLocalhost","readJoystickButton","setFirmwareVersion","readJoystickSwitch","scrollDisplayRight","getVoiceCallStatus","scrollDisplayLeft","writeMicroseconds","delayMicroseconds","begi\
nTransmission","getSignalStrength","runAsynchronously","getAsynchronously","listenOnLocalhost","getCurrentCarrier","readAccelerometer","messageAvailable","sendDigitalPorts","lineFollowConfig","countryNameWrite","runShellCommand","readStringUntil","rewindDirectory","readTemperature","setClockDivider","readLightSensor","endTransmission","analogReference","detachInterrupt","countryNameRead","attachInterrupt","encryptionType","readBytesUntil","robotNameWrite","readMicrophone","robotNameRead","cityNa\
meWrite","userNameWrite","readJoystickY","readJoystickX","mouseReleased","openNextFile","scanNetworks","noInterrupts","digitalWrite","beginSpeaker","mousePressed","isActionDone","mouseDragged","displayLogos","noAutoscroll","addParameter","remoteNumber","getModifiers","keyboardRead","userNameRead","waitContinue","processInput","parseCommand","printVersion","readNetworks","writeMessage","blinkVersion","cityNameRead","readMessage","setDataMode","parsePacket","isListening","setBitOrder","beginPacket",
"isDirectory","motorsWrite","drawCompass","digitalRead","clearScreen","serialEvent","rightToLeft","setTextSize","leftToRight","requestFrom","keyReleased","compassRead","analogWrite","interrupts","WiFiServer","disconnect","playMelody","parseFloat","autoscroll","getPINUsed","setPINUsed","setTimeout","sendAnalog","readSlider","analogRead","beginWrite","createChar","motorsStop","keyPressed","tempoWrite","readButton","subnetMask","debugPrint","macAddress","writeGreen","randomSeed","attachGPRS","readS\
tring","sendString","remotePort","releaseAll","mouseMoved","background","getXChange","getYChange","answerCall","getResult","voiceCall","endPacket","constrain","getSocket","writeJSON","getButton","available","connected","findUntil","readBytes","exitValue","readGreen","writeBlue","startLoop","IPAddress","isPressed","sendSysex","pauseMode","gatewayIP","setCursor","getOemKey","tuneWrite","noDisplay","loadImage","switchPIN","onRequest","onReceive","changePIN","playFile","noBuffer","parseInt","overflo\
w","checkPIN","knobRead","beginTFT","bitClear","updateIR","bitWrite","position","writeRGB","highByte","writeRed","setSpeed","readBlue","noStroke","remoteIP","transfer","shutdown","hangCall","beginSMS","endWrite","attached","maintain","noCursor","checkReg","checkPUK","shiftOut","isValid","shiftIn","pulseIn","connect","println","localIP","pinMode","getIMEI","display","noBlink","process","getBand","running","beginSD","drawBMP","lowByte","setBand","release","bitRead","prepare","pointTo","readRed","s\
etMode","noFill","remove","listen","stroke","detach","attach","noTone","exists","buffer","height","bitSet","circle","config","cursor","random","IRread","setDNS","endSMS","getKey","micros","millis","begin","print","write","ready","flush","width","isPIN","blink","clear","press","mkdir","rmdir","close","point","yield","image","BSSID","click","delay","read","text","move","peek","beep","rect","line","open","seek","fill","size","turn","stop","home","find","step","tone","sqrt","RSSI","SSID","end","bit",
"tan","cos","sin","pow","map","abs","max","min","get","run","put"],literal:["DIGITAL_MESSAGE","FIRMATA_STRING","ANALOG_MESSAGE","REPORT_DIGITAL","REPORT_ANALOG","INPUT_PULLUP","SET_PIN_MODE","INTERNAL2V56","SYSTEM_RESET","LED_BUILTIN","INTERNAL1V1","SYSEX_START","INTERNAL","EXTERNAL","DEFAULT","OUTPUT","INPUT","HIGH","LOW"]},ARDUINO=cPlusPlus(hljs),kws=ARDUINO.keywords;return kws.type=[...kws.type,...ARDUINO_KW.type],kws.literal=[...kws.literal,...ARDUINO_KW.literal],kws.built_in=[...kws.built_in,
...ARDUINO_KW.built_in],kws._hints=ARDUINO_KW._hints,ARDUINO.name="Arduino",ARDUINO.aliases=["ino"],ARDUINO.supersetOf="cpp",ARDUINO}function bash(hljs){const regex=hljs.regex,VAR={},BRACED_VAR={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[VAR]}]};Object.assign(VAR,{className:"variable",variants:[{begin:regex.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},BRACED_VAR]});const SUBST={className:"subst",begin:/\$\(/,end:/\)/,contains:[hljs.BACKSLASH_ESCAPE]},COMMENT=hljs.inherit(
hljs.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),HERE_DOC={begin:/<<-?\s*(?=\w+)/,starts:{contains:[hljs.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},QUOTE_STRING={className:"string",begin:/"/,end:/"/,contains:[hljs.BACKSLASH_ESCAPE,VAR,SUBST]};SUBST.contains.push(QUOTE_STRING);const ESCAPED_QUOTE={match:/\\"/},APOS_STRING={className:"string",begin:/'/,end:/'/},ESCAPED_APOS={match:/\\'/},ARITHMETIC={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,
className:"number"},hljs.NUMBER_MODE,VAR]},SH_LIKE_SHELLS=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],KNOWN_SHEBANG=hljs.SHEBANG({binary:`(${SH_LIKE_SHELLS.join("|")})`,relevance:10}),FUNCTION={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[hljs.inherit(hljs.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},KEYWORDS2=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],LITERALS2=["t\
rue","false"],PATH_MODE={match:/(\/[a-z._-]+)+/},SHELL_BUILT_INS=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],BASH_BUILT_INS=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],ZSH_BUILT_INS=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments",
"compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","\
zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],GNU_CORE_UTILS=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","\
tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:KEYWORDS2,literal:LITERALS2,built_in:[...SHELL_BUILT_INS,
...BASH_BUILT_INS,"set","shopt",...ZSH_BUILT_INS,...GNU_CORE_UTILS]},contains:[KNOWN_SHEBANG,hljs.SHEBANG(),FUNCTION,ARITHMETIC,COMMENT,HERE_DOC,PATH_MODE,QUOTE_STRING,ESCAPED_QUOTE,APOS_STRING,ESCAPED_APOS,VAR]}}function c(hljs){const regex=hljs.regex,C_LINE_COMMENT_MODE=hljs.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),DECLTYPE_AUTO_RE="decltype\\(auto\\)",NAMESPACE_RE="[a-zA-Z_]\\w*::",FUNCTION_TYPE_RE="("+DECLTYPE_AUTO_RE+"|"+regex.optional(NAMESPACE_RE)+"[a-zA-Z_]\\w*"+regex.optional("<[^<\
>]+>")+")",TYPES2={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},STRINGS={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[hljs.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},hljs.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},NUMBERS={className:"number",variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},
{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},PREPROCESSOR={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include"},contains:[{begin:/\\\n/,relevance:0},hljs.inherit(STRINGS,{className:"string"}),{className:"string",begin:/<.*?>/},
C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE]},TITLE_MODE={className:"title",begin:regex.optional(NAMESPACE_RE)+hljs.IDENT_RE,relevance:0},FUNCTION_TITLE=regex.optional(NAMESPACE_RE)+hljs.IDENT_RE+"\\s*\\(",KEYWORDS2={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","typeof","typeof_unqual","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Gene\
ric","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_BitInt","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal96","_Decimal128","_Decimal64x","_Decimal128x","_Float16","_Float32","_Float64","_Float128","_Float32x","_Float64x","_Float128x","const","static","constexpr","complex","bool","imaginary"],literal:"true false NULL",built_in:"\
std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit t\
olower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},EXPRESSION_CONTAINS=[PREPROCESSOR,TYPES2,C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,NUMBERS,STRINGS],EXPRESSION_CONTEXT={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"\
new throw return else",end:/;/}],keywords:KEYWORDS2,contains:EXPRESSION_CONTAINS.concat([{begin:/\(/,end:/\)/,keywords:KEYWORDS2,contains:EXPRESSION_CONTAINS.concat(["self"]),relevance:0}]),relevance:0},FUNCTION_DECLARATION={begin:"("+FUNCTION_TYPE_RE+"[\\*&\\s]+)+"+FUNCTION_TITLE,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:KEYWORDS2,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:DECLTYPE_AUTO_RE,keywords:KEYWORDS2,relevance:0},{begin:FUNCTION_TITLE,returnBegin:!0,contains:[hljs.inherit(TITLE_MODE,
{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:KEYWORDS2,relevance:0,contains:[C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,STRINGS,NUMBERS,TYPES2,{begin:/\(/,end:/\)/,keywords:KEYWORDS2,relevance:0,contains:["self",C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,STRINGS,NUMBERS,TYPES2]}]},TYPES2,C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,PREPROCESSOR]};return{name:"C",aliases:["h"],keywords:KEYWORDS2,disableAutodetect:!0,illegal:"\
</",contains:[].concat(EXPRESSION_CONTEXT,FUNCTION_DECLARATION,EXPRESSION_CONTAINS,[PREPROCESSOR,{begin:hljs.IDENT_RE+"::",keywords:KEYWORDS2},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},hljs.TITLE_MODE]}]),exports:{preprocessor:PREPROCESSOR,strings:STRINGS,keywords:KEYWORDS2}}}function cpp(hljs){const regex=hljs.regex,C_LINE_COMMENT_MODE=hljs.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),DECLTYPE_AUTO_RE="decltype\\(aut\
o\\)",NAMESPACE_RE="[a-zA-Z_]\\w*::",FUNCTION_TYPE_RE="(?!struct)("+DECLTYPE_AUTO_RE+"|"+regex.optional(NAMESPACE_RE)+"[a-zA-Z_]\\w*"+regex.optional("<[^<>]+>")+")",CPP_PRIMITIVE_TYPES={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},STRINGS={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[hljs.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},hljs.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,
end:/\)([^()\\ ]{0,16})"/})]},NUMBERS={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[\
1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},PREPROCESSOR={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},hljs.inherit(STRINGS,{className:"string"}),{className:"string",begin:/<.*?>/},C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE]},TITLE_MODE={className:"title",begin:regex.optional(NAMESPACE_RE)+hljs.IDENT_RE,
relevance:0},FUNCTION_TITLE=regex.optional(NAMESPACE_RE)+hljs.IDENT_RE+"\\s*\\(",RESERVED_KEYWORDS=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if",
"import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],RESERVED_TYPES=[
"bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],TYPE_HINTS=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promis\
e","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],FUNCTION_HINTS=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil",
"cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","real\
loc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],CPP_KEYWORDS={type:RESERVED_TYPES,keyword:RESERVED_KEYWORDS,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:TYPE_HINTS},FUNCTION_DISPATCH={
className:"function.dispatch",relevance:0,keywords:{_hint:FUNCTION_HINTS},begin:regex.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,hljs.IDENT_RE,regex.lookahead(/(<[^<>]+>|)\s*\(/))},EXPRESSION_CONTAINS=[FUNCTION_DISPATCH,PREPROCESSOR,CPP_PRIMITIVE_TYPES,C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,NUMBERS,STRINGS],EXPRESSION_CONTEXT={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:CPP_KEYWORDS,contains:EXPRESSION_CONTAINS.
concat([{begin:/\(/,end:/\)/,keywords:CPP_KEYWORDS,contains:EXPRESSION_CONTAINS.concat(["self"]),relevance:0}]),relevance:0},FUNCTION_DECLARATION={className:"function",begin:"("+FUNCTION_TYPE_RE+"[\\*&\\s]+)+"+FUNCTION_TITLE,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:CPP_KEYWORDS,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:DECLTYPE_AUTO_RE,keywords:CPP_KEYWORDS,relevance:0},{begin:FUNCTION_TITLE,returnBegin:!0,contains:[TITLE_MODE],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,
contains:[STRINGS,NUMBERS]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:CPP_KEYWORDS,relevance:0,contains:[C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,STRINGS,NUMBERS,CPP_PRIMITIVE_TYPES,{begin:/\(/,end:/\)/,keywords:CPP_KEYWORDS,relevance:0,contains:["self",C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,STRINGS,NUMBERS,CPP_PRIMITIVE_TYPES]}]},CPP_PRIMITIVE_TYPES,C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,PREPROCESSOR]};return{name:"C++",aliases:["cc","c++","h++",
"hpp","hh","hxx","cxx"],keywords:CPP_KEYWORDS,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(EXPRESSION_CONTEXT,FUNCTION_DECLARATION,FUNCTION_DISPATCH,EXPRESSION_CONTAINS,[PREPROCESSOR,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:CPP_KEYWORDS,contains:["self",CPP_PRIMITIVE_TYPES]},
{begin:hljs.IDENT_RE+"::",keywords:CPP_KEYWORDS},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function csharp(hljs){const BUILT_IN_KEYWORDS=["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],FUNCTION_MODIFIERS=["public","private","protected","static","internal","protected","abstract","async","extern","override",
"unsafe","virtual","new","sealed","partial"],LITERAL_KEYWORDS=["default","false","null","true"],NORMAL_KEYWORDS=["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct",
"switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"],CONTEXTUAL_KEYWORDS=["add","alias","and","ascending","args","async","await","by","descending","dynamic","equals","file","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","record","remove","required","scoped","select","set","unmanaged","value|0","var","when","where","with","yield"],KEYWORDS2={keyword:NORMAL_KEYWORDS.concat(CONTEXTUAL_KEYWORDS),
built_in:BUILT_IN_KEYWORDS,literal:LITERAL_KEYWORDS},TITLE_MODE=hljs.inherit(hljs.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),NUMBERS={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},RAW_STRING={className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},VERBATIM_STRING={className:"string",begin:'@"',end:'"',
contains:[{begin:'""'}]},VERBATIM_STRING_NO_LF=hljs.inherit(VERBATIM_STRING,{illegal:/\n/}),SUBST={className:"subst",begin:/\{/,end:/\}/,keywords:KEYWORDS2},SUBST_NO_LF=hljs.inherit(SUBST,{illegal:/\n/}),INTERPOLATED_STRING={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},hljs.BACKSLASH_ESCAPE,SUBST_NO_LF]},INTERPOLATED_VERBATIM_STRING={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},SUBST]},INTERPOLATED_VERBATIM_STRING_NO_LF=hljs.
inherit(INTERPOLATED_VERBATIM_STRING,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},SUBST_NO_LF]});SUBST.contains=[INTERPOLATED_VERBATIM_STRING,INTERPOLATED_STRING,VERBATIM_STRING,hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,NUMBERS,hljs.C_BLOCK_COMMENT_MODE],SUBST_NO_LF.contains=[INTERPOLATED_VERBATIM_STRING_NO_LF,INTERPOLATED_STRING,VERBATIM_STRING_NO_LF,hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,NUMBERS,hljs.inherit(hljs.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const STRING={
variants:[RAW_STRING,INTERPOLATED_VERBATIM_STRING,INTERPOLATED_STRING,VERBATIM_STRING,hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE]},GENERIC_MODIFIER={begin:"<",end:">",contains:[{beginKeywords:"in out"},TITLE_MODE]},TYPE_IDENT_RE=hljs.IDENT_RE+"(<"+hljs.IDENT_RE+"(\\s*,\\s*"+hljs.IDENT_RE+")*>)?(\\[\\])?",AT_IDENTIFIER={begin:"@"+hljs.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:KEYWORDS2,illegal:/::/,contains:[hljs.COMMENT("///","$",{returnBegin:!0,contains:[{className:"\
doctag",variants:[{begin:"///",relevance:0},{begin:"<!--|-->"},{begin:"</?",end:">"}]}]}),hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},STRING,NUMBERS,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},TITLE_MODE,GENERIC_MODIFIER,hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE]},{beginKeywords:"\
namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[TITLE_MODE,hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[TITLE_MODE,GENERIC_MODIFIER,hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"\
("+TYPE_IDENT_RE+"\\s+)+"+hljs.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:KEYWORDS2,contains:[{beginKeywords:FUNCTION_MODIFIERS.join(" "),relevance:0},{begin:hljs.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[hljs.TITLE_MODE,GENERIC_MODIFIER],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:KEYWORDS2,relevance:0,contains:[STRING,NUMBERS,hljs.C_BLOCK_COMMENT_MODE]},hljs.C_LINE_COMMENT_MODE,
hljs.C_BLOCK_COMMENT_MODE]},AT_IDENTIFIER]}}const MODES$2=hljs=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:hljs.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:hljs.NUMBER_RE+"(%|em|ex|ch|rem|\
vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),HTML_TAGS$2=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li",
"main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],SVG_TAGS$2=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOf\
fset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],TAGS$2=[...HTML_TAGS$2,...SVG_TAGS$2],MEDIA_FEATURES$2=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orient\
ation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),PSEUDO_CLASSES$2=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has",
"host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),PSEUDO_ELEMENTS$2=["after","backdrop","before","c\
ue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),ATTRIBUTES$2=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-r\
ange-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border\
-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-ima\
ge-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacin\
g","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","c\
olor-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment",
"counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font\
-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","\
grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","i\
nset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right",
"margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","\
min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavio\
r","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","point\
er-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scro\
ll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","spe\
ak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color",
"text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-funct\
ion","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function css(hljs){
const regex=hljs.regex,modes2=MODES$2(hljs),VENDOR_PREFIX={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},AT_MODIFIERS="and or not only",AT_PROPERTY_RE=/@-?\w[\w]*(-\w+)*/,IDENT_RE2="[a-zA-Z-][a-zA-Z0-9_-]*",STRINGS=[hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[modes2.BLOCK_COMMENT,VENDOR_PREFIX,modes2.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,
relevance:0},{className:"selector-class",begin:"\\."+IDENT_RE2,relevance:0},modes2.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+PSEUDO_CLASSES$2.join("|")+")"},{begin:":(:)?("+PSEUDO_ELEMENTS$2.join("|")+")"}]},modes2.CSS_VARIABLE,{className:"attribute",begin:"\\b("+ATTRIBUTES$2.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[modes2.BLOCK_COMMENT,modes2.HEXCOLOR,modes2.IMPORTANT,modes2.CSS_NUMBER_MODE,...STRINGS,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{
built_in:"url data-uri"},contains:[...STRINGS,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},modes2.FUNCTION_DISPATCH]},{begin:regex.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:AT_PROPERTY_RE},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:AT_MODIFIERS,attribute:MEDIA_FEATURES$2.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...STRINGS,modes2.CSS_NUMBER_MODE]}]},{className:"\
selector-tag",begin:"\\b("+TAGS$2.join("|")+")\\b"}]}}function diff(hljs){const regex=hljs.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:regex.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:regex.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,
end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}function go(hljs){const KEYWORDS2={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","fa\
lse","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:KEYWORDS2,illegal:"</",contains:[hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,{className:"string",variants:[hljs.QUOTE_STRING_MODE,hljs.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:"number",variants:[{match:/-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/,relevance:0},{match:/-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/,
relevance:0},{match:/-?\b0[oO](_?[0-7])*i?/,relevance:0},{match:/-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/,relevance:0}]},{begin:/:=/},{className:"function",beginKeywords:"func",end:"\\s*(\\{|$)",excludeEnd:!0,contains:[hljs.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:KEYWORDS2,illegal:/["']/}]}]}}function graphql(hljs){const regex=hljs.regex,GQL_NAME=/[_A-Za-z][_0-9A-Za-z]*/;return{name:"GraphQ\
L",aliases:["gql"],case_insensitive:!0,disableAutodetect:!1,keywords:{keyword:["query","mutation","subscription","type","input","schema","directive","interface","union","scalar","fragment","enum","on"],literal:["true","false","null"]},contains:[hljs.HASH_COMMENT_MODE,hljs.QUOTE_STRING_MODE,hljs.NUMBER_MODE,{scope:"punctuation",match:/[.]{3}/,relevance:0},{scope:"punctuation",begin:/[\!\(\)\:\=\[\]\{\|\}]{1}/,relevance:0},{scope:"variable",begin:/\$/,end:/\W/,excludeEnd:!0,relevance:0},{scope:"me\
ta",match:/@\w+/,excludeEnd:!0},{scope:"symbol",begin:regex.concat(GQL_NAME,regex.lookahead(/\s*:/)),relevance:0}],illegal:[/[;<']/,/BEGIN/]}}function ini(hljs){const regex=hljs.regex,NUMBERS={className:"number",relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:hljs.NUMBER_RE}]},COMMENTS=hljs.COMMENT();COMMENTS.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];const VARIABLES={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},LITERALS2={className:"lite\
ral",begin:/\bon|off|true|false|yes|no\b/},STRINGS={className:"string",contains:[hljs.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]},ARRAY2={begin:/\[/,end:/\]/,contains:[COMMENTS,LITERALS2,VARIABLES,STRINGS,NUMBERS,"self"],relevance:0},BARE_KEY=/[A-Za-z0-9_-]+/,QUOTED_KEY_DOUBLE_QUOTE=/"(\\"|[^"])*"/,QUOTED_KEY_SINGLE_QUOTE=/'[^']*'/,ANY_KEY=regex.either(BARE_KEY,QUOTED_KEY_DOUBLE_QUOTE,QUOTED_KEY_SINGLE_QUOTE),
DOTTED_KEY=regex.concat(ANY_KEY,"(\\s*\\.\\s*",ANY_KEY,")*",regex.lookahead(/\s*=\s*[^#\s]/));return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[COMMENTS,{className:"section",begin:/\[+/,end:/\]+/},{begin:DOTTED_KEY,className:"attr",starts:{end:/$/,contains:[COMMENTS,ARRAY2,LITERALS2,VARIABLES,STRINGS,NUMBERS]}}]}}var decimalDigits$1="[0-9](_*[0-9])*",frac$1=`\\.(${decimalDigits$1})`,hexDigits$1="[0-9a-fA-F](_*[0-9a-fA-F])*",NUMERIC$1={className:"number",variants:[
{begin:`(\\b(${decimalDigits$1})((${frac$1})|\\.)?|(${frac$1}))[eE][+-]?(${decimalDigits$1})[fFdD]?\\b`},{begin:`\\b(${decimalDigits$1})((${frac$1})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${frac$1})[fFdD]?\\b`},{begin:`\\b(${decimalDigits$1})[fFdD]\\b`},{begin:`\\b0[xX]((${hexDigits$1})\\.?|(${hexDigits$1})?\\.(${hexDigits$1}))[pP][+-]?(${decimalDigits$1})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${hexDigits$1})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[b\
B][01](_*[01])*[lL]?\\b"}],relevance:0};function recurRegex(re2,substitution,depth){return depth===-1?"":re2.replace(substitution,_=>recurRegex(re2,substitution,depth-1))}function java(hljs){const regex=hljs.regex,JAVA_IDENT_RE="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",GENERIC_IDENT_RE=JAVA_IDENT_RE+recurRegex("(?:<"+JAVA_IDENT_RE+"~~~(?:\\s*,\\s*"+JAVA_IDENT_RE+"~~~)*>)?",/~~~/g,2),KEYWORDS2={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally",
"protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},ANNOTATION={className:"meta",begin:"@"+JAVA_IDENT_RE,contains:[{begin:/\(/,
end:/\)/,contains:["self"]}]},PARAMS={className:"params",begin:/\(/,end:/\)/,keywords:KEYWORDS2,relevance:0,contains:[hljs.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:KEYWORDS2,illegal:/<\/|#/,contains:[hljs.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"\
string",contains:[hljs.BACKSLASH_ESCAPE]},hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,JAVA_IDENT_RE],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[regex.concat(/(?!else)/,JAVA_IDENT_RE),/\s+/,JAVA_IDENT_RE,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,JAVA_IDENT_RE],className:{1:"keyword",3:"title.class"},contains:[PARAMS,hljs.C_LINE_COMMENT_MODE,hljs.
C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+GENERIC_IDENT_RE+"\\s+)",hljs.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:KEYWORDS2,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:KEYWORDS2,relevance:0,contains:[ANNOTATION,hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,NUMERIC$1,hljs.C_BLOCK_COMMENT_MODE]},hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE]},NUMERIC$1,ANNOTATION]}}const IDENT_RE$1="[A-Za-z$_][0-9A-Za-\
z$_]*",KEYWORDS$1=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],LITERALS$1=["true","false","null","undefined","NaN","Infinity"],TYPES$1=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","\
Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],ERROR_TYPES$1=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],BUILT_IN_GLOBALS$1=["setInte\
rval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],BUILT_IN_VARIABLES$1=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],BUILT_INS$1=[].concat(BUILT_IN_GLOBALS$1,TYPES$1,ERROR_TYPES$1);function javascript$1(hljs){const regex=hljs.regex,hasClosingTag=(match,{after})=>{const tag="</"+match[0].
slice(1);return match.input.indexOf(tag,after)!==-1},IDENT_RE$1$1=IDENT_RE$1,FRAGMENT={begin:"<>",end:"</>"},XML_SELF_CLOSING=/<[A-Za-z0-9\\._:-]+\s*\/>/,XML_TAG={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(match,response)=>{const afterMatchIndex=match[0].length+match.index,nextChar=match.input[afterMatchIndex];if(nextChar==="<"||nextChar===","){response.ignoreMatch();return}nextChar===">"&&(hasClosingTag(match,{after:afterMatchIndex})||response.ignoreMatch());
let m;const afterMatch=match.input.substring(afterMatchIndex);if(m=afterMatch.match(/^\s*=/)){response.ignoreMatch();return}if((m=afterMatch.match(/^\s+extends\s+/))&&m.index===0){response.ignoreMatch();return}}},KEYWORDS$1$1={$pattern:IDENT_RE$1,keyword:KEYWORDS$1,literal:LITERALS$1,built_in:BUILT_INS$1,"variable.language":BUILT_IN_VARIABLES$1},decimalDigits2="[0-9](_?[0-9])*",frac2=`\\.(${decimalDigits2})`,decimalInteger="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",NUMBER={className:"number",variants:[
{begin:`(\\b(${decimalInteger})((${frac2})|\\.)?|(${frac2}))[eE][+-]?(${decimalDigits2})\\b`},{begin:`\\b(${decimalInteger})\\b((${frac2})\\b|\\.)?|(${frac2})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},SUBST={className:"subst",begin:"\\$\\{",end:"\\}",keywords:KEYWORDS$1$1,contains:[]},HTML_TEMPLATE={begin:".?html`",end:"",starts:{
end:"`",returnEnd:!1,contains:[hljs.BACKSLASH_ESCAPE,SUBST],subLanguage:"xml"}},CSS_TEMPLATE={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[hljs.BACKSLASH_ESCAPE,SUBST],subLanguage:"css"}},GRAPHQL_TEMPLATE={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[hljs.BACKSLASH_ESCAPE,SUBST],subLanguage:"graphql"}},TEMPLATE_STRING={className:"string",begin:"`",end:"`",contains:[hljs.BACKSLASH_ESCAPE,SUBST]},COMMENT={className:"comment",variants:[hljs.COMMENT(/\/\*\*(?!\/)/,"\\*\
/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:IDENT_RE$1$1+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),hljs.C_BLOCK_COMMENT_MODE,hljs.C_LINE_COMMENT_MODE]},SUBST_INTERNALS=[hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,HTML_TEMPLATE,CSS_TEMPLATE,GRAPHQL_TEMPLATE,TEMPLATE_STRING,{match:/\$\d+/},
NUMBER];SUBST.contains=SUBST_INTERNALS.concat({begin:/\{/,end:/\}/,keywords:KEYWORDS$1$1,contains:["self"].concat(SUBST_INTERNALS)});const SUBST_AND_COMMENTS=[].concat(COMMENT,SUBST.contains),PARAMS_CONTAINS=SUBST_AND_COMMENTS.concat([{begin:/(\s*)\(/,end:/\)/,keywords:KEYWORDS$1$1,contains:["self"].concat(SUBST_AND_COMMENTS)}]),PARAMS={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:KEYWORDS$1$1,contains:PARAMS_CONTAINS},CLASS_OR_EXTENDS={variants:[{match:[/class/,
/\s+/,IDENT_RE$1$1,/\s+/,/extends/,/\s+/,regex.concat(IDENT_RE$1$1,"(",regex.concat(/\./,IDENT_RE$1$1),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,IDENT_RE$1$1],scope:{1:"keyword",3:"title.class"}}]},CLASS_REFERENCE={relevance:0,match:regex.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...TYPES$1,...ERROR_TYPES$1]}},
USE_STRICT={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},FUNCTION_DEFINITION={variants:[{match:[/function/,/\s+/,IDENT_RE$1$1,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[PARAMS],illegal:/%/},UPPER_CASE_CONSTANT={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function noneOf(list2){return regex.concat("(?!",list2.join("|"),")")}const FUNCTION_CALL={match:regex.
concat(/\b/,noneOf([...BUILT_IN_GLOBALS$1,"super","import"].map(x=>`${x}\\s*\\(`)),IDENT_RE$1$1,regex.lookahead(/\s*\(/)),className:"title.function",relevance:0},PROPERTY_ACCESS={begin:regex.concat(/\./,regex.lookahead(regex.concat(IDENT_RE$1$1,/(?![0-9A-Za-z$_(])/))),end:IDENT_RE$1$1,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},GETTER_OR_SETTER={match:[/get|set/,/\s+/,IDENT_RE$1$1,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},PARAMS]},FUNC_LEAD_IN_RE="\
(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+hljs.UNDERSCORE_IDENT_RE+")\\s*=>",FUNCTION_VARIABLE={match:[/const|var|let/,/\s+/,IDENT_RE$1$1,/\s*/,/=\s*/,/(async\s*)?/,regex.lookahead(FUNC_LEAD_IN_RE)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[PARAMS]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:KEYWORDS$1$1,exports:{PARAMS_CONTAINS,CLASS_REFERENCE},illegal:/#(?![$_A-z])/,contains:[hljs.SHEBANG({label:"shebang",binary:"node",relevance:5}),
USE_STRICT,hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,HTML_TEMPLATE,CSS_TEMPLATE,GRAPHQL_TEMPLATE,TEMPLATE_STRING,COMMENT,{match:/\$\d+/},NUMBER,CLASS_REFERENCE,{scope:"attr",match:IDENT_RE$1$1+regex.lookahead(":"),relevance:0},FUNCTION_VARIABLE,{begin:"("+hljs.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[COMMENT,hljs.REGEXP_MODE,{className:"function",begin:FUNC_LEAD_IN_RE,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[
{begin:hljs.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:KEYWORDS$1$1,contains:PARAMS_CONTAINS}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:FRAGMENT.begin,end:FRAGMENT.end},{match:XML_SELF_CLOSING},{begin:XML_TAG.begin,"on:begin":XML_TAG.isTrulyOpeningTag,end:XML_TAG.end}],subLanguage:"xml",contains:[{begin:XML_TAG.begin,end:XML_TAG.end,skip:!0,contains:["self"]}]}]},FUNCTION_DEFINITION,
{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+hljs.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[PARAMS,hljs.inherit(hljs.TITLE_MODE,{begin:IDENT_RE$1$1,className:"title.function"})]},{match:/\.\.\./,relevance:0},PROPERTY_ACCESS,{match:"\\$"+IDENT_RE$1$1,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[PARAMS]},FUNCTION_CALL,UPPER_CASE_CONSTANT,CLASS_OR_EXTENDS,
GETTER_OR_SETTER,{match:/\$[(.]/}]}}function json(hljs){const ATTRIBUTE={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},PUNCTUATION={match:/[{}[\],:]/,className:"punctuation",relevance:0},LITERALS2=["true","false","null"],LITERALS_MODE={scope:"literal",beginKeywords:LITERALS2.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:LITERALS2},contains:[ATTRIBUTE,PUNCTUATION,hljs.QUOTE_STRING_MODE,LITERALS_MODE,hljs.C_NUMBER_MODE,hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE],
illegal:"\\S"}}var decimalDigits="[0-9](_*[0-9])*",frac=`\\.(${decimalDigits})`,hexDigits="[0-9a-fA-F](_*[0-9a-fA-F])*",NUMERIC={className:"number",variants:[{begin:`(\\b(${decimalDigits})((${frac})|\\.)?|(${frac}))[eE][+-]?(${decimalDigits})[fFdD]?\\b`},{begin:`\\b(${decimalDigits})((${frac})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${frac})[fFdD]?\\b`},{begin:`\\b(${decimalDigits})[fFdD]\\b`},{begin:`\\b0[xX]((${hexDigits})\\.?|(${hexDigits})?\\.(${hexDigits}))[pP][+-]?(${decimalDigits})[fFdD]?\\b`},
{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${hexDigits})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function kotlin(hljs){const KEYWORDS2={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal \
infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},KEYWORDS_WITH_LABEL={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},LABEL={className:"symbol",begin:hljs.UNDERSCORE_IDENT_RE+"@"},SUBST={className:"subst",begin:/\$\{/,end:/\}/,contains:[hljs.C_NUMBER_MODE]},VARIABLE={className:"\
variable",begin:"\\$"+hljs.UNDERSCORE_IDENT_RE},STRING={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[VARIABLE,SUBST]},{begin:"'",end:"'",illegal:/\n/,contains:[hljs.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[hljs.BACKSLASH_ESCAPE,VARIABLE,SUBST]}]};SUBST.contains.push(STRING);const ANNOTATION_USE_SITE={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+hljs.UNDERSCORE_IDENT_RE+")?"},ANNOTATION={className:"\
meta",begin:"@"+hljs.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[hljs.inherit(STRING,{className:"string"}),"self"]}]},KOTLIN_NUMBER_MODE=NUMERIC,KOTLIN_NESTED_COMMENT=hljs.COMMENT("/\\*","\\*/",{contains:[hljs.C_BLOCK_COMMENT_MODE]}),KOTLIN_PAREN_TYPE={variants:[{className:"type",begin:hljs.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},KOTLIN_PAREN_TYPE2=KOTLIN_PAREN_TYPE;return KOTLIN_PAREN_TYPE2.variants[1].contains=[KOTLIN_PAREN_TYPE],KOTLIN_PAREN_TYPE.variants[1].
contains=[KOTLIN_PAREN_TYPE2],{name:"Kotlin",aliases:["kt","kts"],keywords:KEYWORDS2,contains:[hljs.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),hljs.C_LINE_COMMENT_MODE,KOTLIN_NESTED_COMMENT,KEYWORDS_WITH_LABEL,LABEL,ANNOTATION_USE_SITE,ANNOTATION,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:KEYWORDS2,relevance:5,contains:[{begin:hljs.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[hljs.
UNDERSCORE_TITLE_MODE]},{className:"type",begin:/</,end:/>/,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:KEYWORDS2,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[KOTLIN_PAREN_TYPE,hljs.C_LINE_COMMENT_MODE,KOTLIN_NESTED_COMMENT],relevance:0},hljs.C_LINE_COMMENT_MODE,KOTLIN_NESTED_COMMENT,ANNOTATION_USE_SITE,ANNOTATION,STRING,hljs.C_NUMBER_MODE]},KOTLIN_NESTED_COMMENT]},{begin:[/class|interface|trait/,/\s+/,hljs.UNDERSCORE_IDENT_RE],
beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},hljs.UNDERSCORE_TITLE_MODE,{className:"type",begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},ANNOTATION_USE_SITE,ANNOTATION]},STRING,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:`
`},KOTLIN_NUMBER_MODE]}}const MODES$1=hljs=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:hljs.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:hljs.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|m\
m|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),HTML_TAGS$1=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu",
"nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],SVG_TAGS$1=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLigh\
ting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],TAGS$1=[...HTML_TAGS$1,...SVG_TAGS$1],MEDIA_FEATURES$1=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-bloc\
k","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),PSEUDO_CLASSES$1=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context",
"hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),PSEUDO_ELEMENTS$1=["after","backdrop","before","cue","cue-region","firs\
t-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),ATTRIBUTES$1=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation\
-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","bor\
der-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-ima\
ge-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-r\
adius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","c\
olor-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","cou\
nter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-\
smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","g\
rid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-b\
lock-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","marg\
in-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","\
min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-beh\
avior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","positi\
on","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block",
"scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","sr\
c","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-pos\
ition","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","\
unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse(),PSEUDO_SELECTORS=PSEUDO_CLASSES$1.
concat(PSEUDO_ELEMENTS$1).sort().reverse();function less(hljs){const modes2=MODES$1(hljs),PSEUDO_SELECTORS$1=PSEUDO_SELECTORS,AT_MODIFIERS="and or not only",IDENT_RE2="[\\w-]+",INTERP_IDENT_RE="("+IDENT_RE2+"|@\\{"+IDENT_RE2+"\\})",RULES=[],VALUE_MODES=[],STRING_MODE=function(c2){return{className:"string",begin:"~?"+c2+".*?"+c2}},IDENT_MODE=function(name,begin,relevance){return{className:name,begin,relevance}},AT_KEYWORDS={$pattern:/[a-z-]+/,keyword:AT_MODIFIERS,attribute:MEDIA_FEATURES$1.join("\
 ")},PARENS_MODE={begin:"\\(",end:"\\)",contains:VALUE_MODES,keywords:AT_KEYWORDS,relevance:0};VALUE_MODES.push(hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,STRING_MODE("'"),STRING_MODE('"'),modes2.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},modes2.HEXCOLOR,PARENS_MODE,IDENT_MODE("variable","@@?"+IDENT_RE2,10),IDENT_MODE("variable","@\\{"+IDENT_RE2+"\\}"),IDENT_MODE("built_in","~?`[^`]*?`"),{className:"attribute",begin:IDENT_RE2+"\\s*\
:",end:":",returnBegin:!0,excludeEnd:!0},modes2.IMPORTANT,{beginKeywords:"and not"},modes2.FUNCTION_DISPATCH);const VALUE_WITH_RULESETS=VALUE_MODES.concat({begin:/\{/,end:/\}/,contains:RULES}),MIXIN_GUARD_MODE={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(VALUE_MODES)},RULE_MODE={begin:INTERP_IDENT_RE+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},modes2.CSS_VARIABLE,{className:"attribute",begin:"\\b("+ATTRIBUTES$1.join(
"|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:VALUE_MODES}}]},AT_RULE_MODE={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:AT_KEYWORDS,returnEnd:!0,contains:VALUE_MODES,relevance:0}},VAR_RULE_MODE={className:"variable",variants:[{begin:"@"+IDENT_RE2+"\\s*:",relevance:15},{begin:"@"+IDENT_RE2}],starts:{end:"[;}]",returnEnd:!0,contains:VALUE_WITH_RULESETS}},
SELECTOR_MODE={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:INTERP_IDENT_RE,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,MIXIN_GUARD_MODE,IDENT_MODE("keyword","all\\b"),IDENT_MODE("variable","@\\{"+IDENT_RE2+"\\}"),{begin:"\\b("+TAGS$1.join("|")+")\\b",className:"selector-tag"},modes2.CSS_NUMBER_MODE,IDENT_MODE("selector-tag",INTERP_IDENT_RE,0),IDENT_MODE("selector-id","#"+INTERP_IDENT_RE),IDENT_MODE("sel\
ector-class","\\."+INTERP_IDENT_RE,0),IDENT_MODE("selector-tag","&",0),modes2.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+PSEUDO_CLASSES$1.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+PSEUDO_ELEMENTS$1.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:VALUE_WITH_RULESETS},{begin:"!important"},modes2.FUNCTION_DISPATCH]},PSEUDO_SELECTOR_MODE={begin:IDENT_RE2+`:(:)?(${PSEUDO_SELECTORS$1.join("|")})`,returnBegin:!0,contains:[SELECTOR_MODE]};return RULES.push(
hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,AT_RULE_MODE,VAR_RULE_MODE,PSEUDO_SELECTOR_MODE,RULE_MODE,SELECTOR_MODE,MIXIN_GUARD_MODE,modes2.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:RULES}}function lua(hljs){const OPENING_LONG_BRACKET="\\[=*\\[",CLOSING_LONG_BRACKET="\\]=*\\]",LONG_BRACKETS={begin:OPENING_LONG_BRACKET,end:CLOSING_LONG_BRACKET,contains:["self"]},COMMENTS=[hljs.COMMENT("--(?!"+OPENING_LONG_BRACKET+")","$"),hljs.COMMENT("--"+OPENING_LONG_BRACKET,
CLOSING_LONG_BRACKET,{contains:[LONG_BRACKETS],relevance:10})];return{name:"Lua",aliases:["pluto"],keywords:{$pattern:hljs.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfi\
le loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random ra\
ndomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:COMMENTS.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[hljs.inherit(hljs.TITLE_MODE,
{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:COMMENTS}].concat(COMMENTS)},hljs.C_NUMBER_MODE,hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,{className:"string",begin:OPENING_LONG_BRACKET,end:CLOSING_LONG_BRACKET,contains:[LONG_BRACKETS],relevance:5}])}}function makefile(hljs){const VARIABLE={className:"variable",variants:[{begin:"\\$\\("+hljs.UNDERSCORE_IDENT_RE+"\\)",contains:[hljs.BACKSLASH_ESCAPE]},{begin:/\$[@%<?\^\+\*]/}]},
QUOTE_STRING={className:"string",begin:/"/,end:/"/,contains:[hljs.BACKSLASH_ESCAPE,VARIABLE]},FUNC={className:"variable",begin:/\$\([\w-]+\s/,end:/\)/,keywords:{built_in:"subst patsubst strip findstring filter filter-out sort word wordlist firstword lastword dir notdir suffix basename addsuffix addprefix join wildcard realpath abspath error warning shell origin flavor foreach if or and call eval file value"},contains:[VARIABLE,QUOTE_STRING]},ASSIGNMENT={begin:"^"+hljs.UNDERSCORE_IDENT_RE+"\\s*(?=\
[:+?]?=)"},META={className:"meta",begin:/^\.PHONY:/,end:/$/,keywords:{$pattern:/[\.\w]+/,keyword:".PHONY"}},TARGET={className:"section",begin:/^[^\s]+:/,end:/$/,contains:[VARIABLE]};return{name:"Makefile",aliases:["mk","mak","make"],keywords:{$pattern:/[\w-]+/,keyword:"define endef undefine ifdef ifndef ifeq ifneq else endif include -include sinclude override export unexport private vpath"},contains:[hljs.HASH_COMMENT_MODE,VARIABLE,QUOTE_STRING,FUNC,ASSIGNMENT,META,TARGET]}}function markdown(hljs){
const regex=hljs.regex,INLINE_HTML={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},HORIZONTAL_RULE={begin:"^[-\\*]{3,}",end:"$"},CODE={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},LIST={className:"bullet",begin:"^[ 	]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},
LINK_REFERENCE={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},URL_SCHEME=/[A-Za-z][A-Za-z0-9+.-]*/,LINK={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:regex.concat(/\[.+?\]\(/,URL_SCHEME,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,
relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},BOLD={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},ITALIC={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,
end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},BOLD_WITHOUT_ITALIC=hljs.inherit(BOLD,{contains:[]}),ITALIC_WITHOUT_BOLD=hljs.inherit(ITALIC,{contains:[]});BOLD.contains.push(ITALIC_WITHOUT_BOLD),ITALIC.contains.push(BOLD_WITHOUT_ITALIC);let CONTAINABLE=[INLINE_HTML,LINK];return[BOLD,ITALIC,BOLD_WITHOUT_ITALIC,ITALIC_WITHOUT_BOLD].forEach(m=>{m.contains=m.contains.concat(CONTAINABLE)}),CONTAINABLE=CONTAINABLE.concat(BOLD,ITALIC),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"\
section",variants:[{begin:"^#{1,6}",end:"$",contains:CONTAINABLE},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:CONTAINABLE}]}]},INLINE_HTML,LIST,BOLD,ITALIC,{className:"quote",begin:"^>\\s+",contains:CONTAINABLE,end:"$"},CODE,HORIZONTAL_RULE,LINK,LINK_REFERENCE,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function objectivec(hljs){const API_CLASS={className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|N\
S|SCN|SK|UI|WK|XC)\\w+"},IDENTIFIER_RE=/[a-zA-Z@][a-zA-Z0-9_]*/,KEYWORDS2={"variable.language":["this","super"],$pattern:IDENTIFIER_RE,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak",
"copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__",
"__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_\
VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},CLASS_KEYWORDS={$pattern:IDENTIFIER_RE,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c+\
+"],keywords:KEYWORDS2,illegal:"</",contains:[API_CLASS,hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,hljs.C_NUMBER_MODE,hljs.QUOTE_STRING_MODE,hljs.APOS_STRING_MODE,{className:"string",variants:[{begin:'@"',end:'"',illegal:"\\n",contains:[hljs.BACKSLASH_ESCAPE]}]},{className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},hljs.inherit(hljs.QUOTE_STRING_MODE,{className:"\
string"}),{className:"string",begin:/<.*?>/,end:/$/,illegal:"\\n"},hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+CLASS_KEYWORDS.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:CLASS_KEYWORDS,contains:[hljs.UNDERSCORE_TITLE_MODE]},{begin:"\\."+hljs.UNDERSCORE_IDENT_RE,relevance:0}]}}function perl(hljs){const regex=hljs.regex,KEYWORDS2=["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","cho\
wn","chr","chroot","class","close","closedir","connect","continue","cos","crypt","dbmclose","dbmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","field","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeern\
ame","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","method","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","\
pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta","qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","\
sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","state","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"],REGEX_MODIFIERS=/[dualxmsipngr]{0,12}/,PERL_KEYWORDS={$pattern:/[\w.]+/,
keyword:KEYWORDS2.join(" ")},SUBST={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:PERL_KEYWORDS},METHOD={begin:/->\{/,end:/\}/},ATTR={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},VAR={scope:"variable",variants:[{begin:/\$\d/},{begin:regex.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[ATTR]},NUMBER={className:"number",variants:[{match:/0?\.[0-9][0-9_]+\b/},{match:/\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/},
{match:/\b0[0-7][0-7_]*\b/},{match:/\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/},{match:/\b0b[0-1][0-1_]*\b/}],relevance:0},STRING_CONTAINS=[hljs.BACKSLASH_ESCAPE,SUBST,VAR],REGEX_DELIMS=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],PAIRED_DOUBLE_RE=(prefix,open2,close2="\\1")=>{const middle=close2==="\\1"?close2:regex.concat(close2,open2);return regex.concat(regex.concat("(?:",prefix,")"),open2,/(?:\\.|[^\\\/])*?/,middle,/(?:\\.|[^\\\/])*?/,close2,REGEX_MODIFIERS)},PAIRED_RE=(prefix,open2,close2)=>regex.concat(regex.concat(
"(?:",prefix,")"),open2,/(?:\\.|[^\\\/])*?/,close2,REGEX_MODIFIERS),PERL_DEFAULT_CONTAINS=[VAR,hljs.HASH_COMMENT_MODE,hljs.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),METHOD,{className:"string",contains:STRING_CONTAINS,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},
{begin:"'",end:"'",contains:[hljs.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[hljs.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},NUMBER,{begin:"(\\/\\/|"+hljs.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[hljs.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:PAIRED_DOUBLE_RE("s|tr|y",regex.either(...REGEX_DELIMS,{capture:!0}))},{begin:PAIRED_DOUBLE_RE(
"s|tr|y","\\(","\\)")},{begin:PAIRED_DOUBLE_RE("s|tr|y","\\[","\\]")},{begin:PAIRED_DOUBLE_RE("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:PAIRED_RE("(?:m|qr)?",/\//,/\//)},{begin:PAIRED_RE("m|qr",regex.either(...REGEX_DELIMS,{capture:!0}),/\1/)},{begin:PAIRED_RE("m|qr",/\(/,/\)/)},{begin:PAIRED_RE("m|qr",/\[/,/\]/)},{begin:PAIRED_RE("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub method",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,
relevance:5,contains:[hljs.TITLE_MODE,ATTR]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[hljs.TITLE_MODE,ATTR,NUMBER]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return SUBST.contains=PERL_DEFAULT_CONTAINS,METHOD.contains=PERL_DEFAULT_CONTAINS,{name:"Perl",aliases:["pl","pm"],keywords:PERL_KEYWORDS,contains:PERL_DEFAULT_CONTAINS}}function php(hljs){
const regex=hljs.regex,NOT_PERL_ETC=/(?![A-Za-z0-9])(?![$])/,IDENT_RE2=regex.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,NOT_PERL_ETC),PASCAL_CASE_CLASS_NAME_RE=regex.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,NOT_PERL_ETC),UPCASE_NAME_RE=regex.concat(/[A-Z]+/,NOT_PERL_ETC),VARIABLE={scope:"variable",match:"\\$+"+IDENT_RE2},PREPROCESSOR={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},SUBST={
scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},SINGLE_QUOTED=hljs.inherit(hljs.APOS_STRING_MODE,{illegal:null}),DOUBLE_QUOTED=hljs.inherit(hljs.QUOTE_STRING_MODE,{illegal:null,contains:hljs.QUOTE_STRING_MODE.contains.concat(SUBST)}),HEREDOC={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:hljs.QUOTE_STRING_MODE.contains.concat(SUBST),"on:begin":(m,resp)=>{resp.data._beginMatch=m[1]||m[2]},"on:end":(m,resp)=>{resp.data._beginMatch!==m[1]&&resp.ignoreMatch()}},
NOWDOC=hljs.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),WHITESPACE=`[ 	
]`,STRING={scope:"string",variants:[DOUBLE_QUOTED,SINGLE_QUOTED,HEREDOC,NOWDOC]},NUMBER={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},LITERALS2=["false","null","true"],KWS=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__\
TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","iss\
et","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],BUILT_INS2=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroEr\
ror","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveD\
irectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess",
"BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],KEYWORDS2={keyword:KWS,literal:(items2=>{const result=[];return items2.forEach(item=>{result.push(item),item.toLowerCase()===item?result.push(item.toUpperCase()):result.push(item.toLowerCase())}),result})(LITERALS2),built_in:BUILT_INS2},normalizeKeywords=items2=>items2.
map(item=>item.replace(/\|\d+$/,"")),CONSTRUCTOR_CALL={variants:[{match:[/new/,regex.concat(WHITESPACE,"+"),regex.concat("(?!",normalizeKeywords(BUILT_INS2).join("\\b|"),"\\b)"),PASCAL_CASE_CLASS_NAME_RE],scope:{1:"keyword",4:"title.class"}}]},CONSTANT_REFERENCE=regex.concat(IDENT_RE2,"\\b(?!\\()"),LEFT_AND_RIGHT_SIDE_OF_DOUBLE_COLON={variants:[{match:[regex.concat(/::/,regex.lookahead(/(?!class\b)/)),CONSTANT_REFERENCE],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.lan\
guage"}},{match:[PASCAL_CASE_CLASS_NAME_RE,regex.concat(/::/,regex.lookahead(/(?!class\b)/)),CONSTANT_REFERENCE],scope:{1:"title.class",3:"variable.constant"}},{match:[PASCAL_CASE_CLASS_NAME_RE,regex.concat("::",regex.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[PASCAL_CASE_CLASS_NAME_RE,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},NAMED_ARGUMENT={scope:"attr",match:regex.concat(IDENT_RE2,regex.lookahead(":"),regex.lookahead(/(?!::)/))},PARAMS_MODE={relevance:0,begin:/\(/,
end:/\)/,keywords:KEYWORDS2,contains:[NAMED_ARGUMENT,VARIABLE,LEFT_AND_RIGHT_SIDE_OF_DOUBLE_COLON,hljs.C_BLOCK_COMMENT_MODE,STRING,NUMBER,CONSTRUCTOR_CALL]},FUNCTION_INVOKE={relevance:0,match:[/\b/,regex.concat("(?!fn\\b|function\\b|",normalizeKeywords(KWS).join("\\b|"),"|",normalizeKeywords(BUILT_INS2).join("\\b|"),"\\b)"),IDENT_RE2,regex.concat(WHITESPACE,"*"),regex.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[PARAMS_MODE]};PARAMS_MODE.contains.push(FUNCTION_INVOKE);const ATTRIBUTE_CONTAINS=[
NAMED_ARGUMENT,LEFT_AND_RIGHT_SIDE_OF_DOUBLE_COLON,hljs.C_BLOCK_COMMENT_MODE,STRING,NUMBER,CONSTRUCTOR_CALL],ATTRIBUTES2={begin:regex.concat(/#\[\s*\\?/,regex.either(PASCAL_CASE_CLASS_NAME_RE,UPCASE_NAME_RE)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:LITERALS2,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:LITERALS2,keyword:["new","array"]},contains:["self",...ATTRIBUTE_CONTAINS]},...ATTRIBUTE_CONTAINS,{scope:"meta",variants:[{match:PASCAL_CASE_CLASS_NAME_RE},
{match:UPCASE_NAME_RE}]}]};return{case_insensitive:!1,keywords:KEYWORDS2,contains:[ATTRIBUTES2,hljs.HASH_COMMENT_MODE,hljs.COMMENT("//","$"),hljs.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:hljs.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},PREPROCESSOR,{scope:"variable.language",match:/\$this\b/},VARIABLE,FUNCTION_INVOKE,LEFT_AND_RIGHT_SIDE_OF_DOUBLE_COLON,{match:[
/const/,/\s/,IDENT_RE2],scope:{1:"keyword",3:"variable.constant"}},CONSTRUCTOR_CALL,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},hljs.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:KEYWORDS2,contains:["self",ATTRIBUTES2,VARIABLE,LEFT_AND_RIGHT_SIDE_OF_DOUBLE_COLON,hljs.C_BLOCK_COMMENT_MODE,STRING,NUMBER]}]},{scope:"class",variants:[
{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},hljs.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[hljs.inherit(hljs.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},hljs.UNDERSCORE_TITLE_MODE]},STRING,NUMBER]}}function phpTemplate(hljs){
return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},hljs.inherit(hljs.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),hljs.inherit(hljs.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}function plaintext(hljs){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function python(hljs){
const regex=hljs.regex,IDENT_RE2=new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*","u"),RESERVED_WORDS=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],KEYWORDS2={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:RESERVED_WORDS,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint",
"bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","\
vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},PROMPT={className:"meta",begin:/^(>>>|\.\.\.) /},SUBST={className:"subst",begin:/\{/,end:/\}/,keywords:KEYWORDS2,illegal:/#/},LITERAL_BRACKET={begin:/\{\{/,relevance:0},STRING={className:"string",contains:[hljs.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,
contains:[hljs.BACKSLASH_ESCAPE,PROMPT],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[hljs.BACKSLASH_ESCAPE,PROMPT],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[hljs.BACKSLASH_ESCAPE,PROMPT,LITERAL_BRACKET,SUBST]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[hljs.BACKSLASH_ESCAPE,PROMPT,LITERAL_BRACKET,SUBST]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,
end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[hljs.BACKSLASH_ESCAPE,LITERAL_BRACKET,SUBST]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[hljs.BACKSLASH_ESCAPE,LITERAL_BRACKET,SUBST]},hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE]},digitpart="[0-9](_?[0-9])*",pointfloat=`(\\b(${digitpart}))?\\.(${digitpart})|\\b(${digitpart})\\.`,lookahead2=`\\b|${RESERVED_WORDS.join("|")}`,NUMBER={className:"number",relevance:0,variants:[{begin:`\
(\\b(${digitpart})|(${pointfloat}))[eE][+-]?(${digitpart})[jJ]?(?=${lookahead2})`},{begin:`(${pointfloat})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${lookahead2})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${lookahead2})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${lookahead2})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${lookahead2})`},{begin:`\\b(${digitpart})[jJ](?=${lookahead2})`}]},COMMENT_TYPE={className:"comment",begin:regex.lookahead(/# type:/),end:/$/,keywords:KEYWORDS2,contains:[{begin:/# type:/},
{begin:/#/,end:/\b\B/,endsWithParent:!0}]},PARAMS={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:KEYWORDS2,contains:["self",PROMPT,NUMBER,STRING,hljs.HASH_COMMENT_MODE]}]};return SUBST.contains=[STRING,NUMBER,PROMPT],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:KEYWORDS2,illegal:/(<\/|\?)|=>/,contains:[PROMPT,NUMBER,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},
{match:/\bor\b/,scope:"keyword"},STRING,COMMENT_TYPE,hljs.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,IDENT_RE2],scope:{1:"keyword",3:"title.function"},contains:[PARAMS]},{variants:[{match:[/\bclass/,/\s+/,IDENT_RE2,/\s*/,/\(\s*/,IDENT_RE2,/\s*\)/]},{match:[/\bclass/,/\s+/,IDENT_RE2]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[NUMBER,PARAMS,STRING]}]}}function pythonRepl(hljs){return{aliases:["pycon"],contains:[{className:"\
meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function r(hljs){const regex=hljs.regex,IDENT_RE2=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,NUMBER_TYPES_RE=regex.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),OPERATORS_RE=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,PUNCTUATION_RE=regex.
either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:IDENT_RE2,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c\
 call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log m\
ax min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[hljs.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:regex.lookahead(regex.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",
end:/$/,contains:[{scope:"variable",variants:[{match:IDENT_RE2},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),hljs.HASH_COMMENT_MODE,{scope:"string",contains:[hljs.BACKSLASH_ESCAPE],variants:[hljs.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),hljs.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),hljs.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),hljs.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),
hljs.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),hljs.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[OPERATORS_RE,NUMBER_TYPES_RE]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,NUMBER_TYPES_RE]},{scope:{1:"punctuation",2:"number"},match:[PUNCTUATION_RE,NUMBER_TYPES_RE]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,NUMBER_TYPES_RE]}]},{scope:{3:"\
operator"},match:[IDENT_RE2,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:OPERATORS_RE},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:PUNCTUATION_RE},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}function ruby(hljs){const regex=hljs.regex,RUBY_METHOD_RE="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",CLASS_NAME_RE=regex.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),CLASS_NAME_WITH_NAMESPACE_RE=regex.concat(CLASS_NAME_RE,
/(::\w+)*/),RUBY_KEYWORDS={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","lambda","attr_accessor",
"attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},YARDOCTAG={className:"doctag",begin:"@[A-Za-z]+"},IRB_OBJECT={begin:"#<",end:">"},COMMENT_MODES=[hljs.COMMENT("#","$",{contains:[YARDOCTAG]}),hljs.COMMENT("^=begin","^=end",{contains:[YARDOCTAG],relevance:10}),hljs.COMMENT("^__END__",hljs.MATCH_NOTHING_RE)],SUBST={className:"subst",begin:/#\{/,end:/\}/,keywords:RUBY_KEYWORDS},STRING={className:"string",contains:[hljs.BACKSLASH_ESCAPE,
SUBST],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},
{begin:/\B\?\\?\S/},{begin:regex.concat(/<<[-~]?'?/,regex.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[hljs.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[hljs.BACKSLASH_ESCAPE,SUBST]})]}]},decimal="[1-9](_?[0-9])*|0",digits="[0-9](_?[0-9])*",NUMBER={className:"number",relevance:0,variants:[{begin:`\\b(${decimal})(\\.(${digits}))?([eE][+-]?(${digits})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0\
-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},PARAMS={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:RUBY_KEYWORDS}]},RUBY_DEFAULT_CONTAINS=[STRING,{variants:[{match:[/class\s+/,CLASS_NAME_WITH_NAMESPACE_RE,/\s+<\s+/,CLASS_NAME_WITH_NAMESPACE_RE]},{match:[/\b(class|module)\s+/,CLASS_NAME_WITH_NAMESPACE_RE]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:RUBY_KEYWORDS},
{match:[/(include|extend)\s+/,CLASS_NAME_WITH_NAMESPACE_RE],scope:{2:"title.class"},keywords:RUBY_KEYWORDS},{relevance:0,match:[CLASS_NAME_WITH_NAMESPACE_RE,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:CLASS_NAME_RE,scope:"title.class"},{match:[/def/,/\s+/,RUBY_METHOD_RE],scope:{1:"keyword",3:"title.function"},contains:[PARAMS]},{begin:hljs.IDENT_RE+"::"},{className:"symbol",begin:hljs.UNDERSCORE_IDENT_RE+"(!|\\?\
)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[STRING,{begin:RUBY_METHOD_RE}],relevance:0},NUMBER,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:RUBY_KEYWORDS},{begin:"("+hljs.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[hljs.BACKSLASH_ESCAPE,SUBST],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{
begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(IRB_OBJECT,COMMENT_MODES),relevance:0}].concat(IRB_OBJECT,COMMENT_MODES);SUBST.contains=RUBY_DEFAULT_CONTAINS,PARAMS.contains=RUBY_DEFAULT_CONTAINS;const IRB_DEFAULT=[{begin:/^\s*=>/,starts:{end:"$",contains:RUBY_DEFAULT_CONTAINS}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")\
(?=[ ])",starts:{end:"$",keywords:RUBY_KEYWORDS,contains:RUBY_DEFAULT_CONTAINS}}];return COMMENT_MODES.unshift(IRB_OBJECT),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:RUBY_KEYWORDS,illegal:/\/\*/,contains:[hljs.SHEBANG({binary:"ruby"})].concat(IRB_DEFAULT).concat(COMMENT_MODES).concat(RUBY_DEFAULT_CONTAINS)}}function rust(hljs){const regex=hljs.regex,RAW_IDENTIFIER=/(r#)?/,UNDERSCORE_IDENT_RE=regex.concat(RAW_IDENTIFIER,hljs.UNDERSCORE_IDENT_RE),IDENT_RE2=regex.concat(RAW_IDENTIFIER,
hljs.IDENT_RE),FUNCTION_INVOKE={className:"title.function.invoke",relevance:0,begin:regex.concat(/\b/,/(?!let|for|while|if|else|match\b)/,IDENT_RE2,regex.lookahead(/\s*\(/))},NUMBER_SUFFIX="([ui](8|16|32|64|128|size)|f(32|64))?",KEYWORDS2=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self",
"static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],LITERALS2=["true","false","Some","None","Ok","Err"],BUILTINS=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!",
"bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],TYPES2=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","\
bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:hljs.IDENT_RE+"!?",type:TYPES2,keyword:KEYWORDS2,literal:LITERALS2,built_in:BUILTINS},illegal:"</",contains:[hljs.C_LINE_COMMENT_MODE,hljs.COMMENT("/\\*","\\*/",{contains:["self"]}),hljs.inherit(hljs.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*(?!')/},{scope:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'/,end:/'/,contains:[{scope:"\
char.escape",match:/\\('|\w|x\w{2}|u\w{4}|U\w{8})/}]}]},{className:"number",variants:[{begin:"\\b0b([01_]+)"+NUMBER_SUFFIX},{begin:"\\b0o([0-7_]+)"+NUMBER_SUFFIX},{begin:"\\b0x([A-Fa-f0-9_]+)"+NUMBER_SUFFIX},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+NUMBER_SUFFIX}],relevance:0},{begin:[/fn/,/\s+/,UNDERSCORE_IDENT_RE],className:{1:"keyword",3:"title.function"}},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"string",begin:/"/,end:/"/,contains:[hljs.BACKSLASH_ESCAPE]}]},
{begin:[/let/,/\s+/,/(?:mut\s+)?/,UNDERSCORE_IDENT_RE],className:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,UNDERSCORE_IDENT_RE,/\s+/,/in/],className:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,UNDERSCORE_IDENT_RE],className:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,UNDERSCORE_IDENT_RE],className:{1:"keyword",3:"title.class"}},{begin:hljs.IDENT_RE+"::",keywords:{keyword:"Self",built_in:BUILTINS,type:TYPES2}},{className:"\
punctuation",begin:"->"},FUNCTION_INVOKE]}}const MODES=hljs=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:hljs.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:hljs.NUMBER_RE+"(%|em|ex|ch|rem|vw|\
vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),HTML_TAGS=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","mai\
n","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],SVG_TAGS=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset",
"feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],TAGS=[...HTML_TAGS,...SVG_TAGS],MEDIA_FEATURES=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overfl\
ow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),PSEUDO_CLASSES=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-con\
text","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),PSEUDO_ELEMENTS=["after","backdrop","before","cue","cue-region","\
first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),ATTRIBUTES=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animati\
on-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","b\
order-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-i\
mage-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end\
-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation",
"color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","c\
ounter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","fon\
t-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area",
"grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset\
-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","ma\
rgin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size",
"min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-be\
havior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","posit\
ion","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block",
"scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","sr\
c","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-pos\
ition","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","\
unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function scss(hljs){const modes2=MODES(
hljs),PSEUDO_ELEMENTS$12=PSEUDO_ELEMENTS,PSEUDO_CLASSES$12=PSEUDO_CLASSES,AT_IDENTIFIER="@[a-z-]+",AT_MODIFIERS="and or not only",VARIABLE={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[hljs.C_LINE_COMMENT_MODE,hljs.C_BLOCK_COMMENT_MODE,modes2.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},modes2.ATTRIBUTE_SELECTOR_MODE,
{className:"selector-tag",begin:"\\b("+TAGS.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+PSEUDO_CLASSES$12.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+PSEUDO_ELEMENTS$12.join("|")+")"},VARIABLE,{begin:/\(/,end:/\)/,contains:[modes2.CSS_NUMBER_MODE]},modes2.CSS_VARIABLE,{className:"attribute",begin:"\\b("+ATTRIBUTES.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|tr\
ansparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|lef\
t|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|alw\
ays|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[modes2.BLOCK_COMMENT,VARIABLE,modes2.HEXCOLOR,modes2.CSS_NUMBER_MODE,hljs.QUOTE_STRING_MODE,hljs.APOS_STRING_MODE,modes2.IMPORTANT,modes2.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:AT_IDENTIFIER,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:AT_MODIFIERS,attribute:MEDIA_FEATURES.join(" ")},contains:[{begin:AT_IDENTIFIER,className:"\
keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},VARIABLE,hljs.QUOTE_STRING_MODE,hljs.APOS_STRING_MODE,modes2.HEXCOLOR,modes2.CSS_NUMBER_MODE]},modes2.FUNCTION_DISPATCH]}}function shell(hljs){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}function sql(hljs){const regex=hljs.regex,COMMENT_MODE=hljs.COMMENT("--","$"),STRING={scope:"string",variants:[
{begin:/'/,end:/'/,contains:[{match:/''/}]}]},QUOTED_IDENTIFIER={begin:/"/,end:/"/,contains:[{match:/""/}]},LITERALS2=["true","false","unknown"],MULTI_WORD_TYPES=["double precision","large object","with timezone","without timezone"],TYPES2=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],NON_RESERVED_WORDS=[
"add","asc","collation","desc","final","first","last","view"],RESERVED_WORDS=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier",
"clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle",
"date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant",
"group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lowe\
r","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentil\
e_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","sess\
ion_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_ar\
ray","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],RESERVED_FUNCTIONS=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_va\
lue","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","std\
dev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],POSSIBLE_WITHOUT_PARENS=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],COMBOS=[
"create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],FUNCTIONS=RESERVED_FUNCTIONS,KEYWORDS2=[...RESERVED_WORDS,...NON_RESERVED_WORDS].filter(keyword2=>!RESERVED_FUNCTIONS.includes(keyword2)),VARIABLE={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},OPERATOR={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,
relevance:0},FUNCTION_CALL={match:regex.concat(/\b/,regex.either(...FUNCTIONS),/\s*\(/),relevance:0,keywords:{built_in:FUNCTIONS}};function kws_to_regex(list2){return regex.concat(/\b/,regex.either(...list2.map(kw=>kw.replace(/\s+/,"\\s+"))),/\b/)}const MULTI_WORD_KEYWORDS={scope:"keyword",match:kws_to_regex(COMBOS),relevance:0};function reduceRelevancy(list2,{exceptions,when}={}){const qualifyFn=when;return exceptions=exceptions||[],list2.map(item=>item.match(/\|\d+$/)||exceptions.includes(item)?
item:qualifyFn(item)?`${item}|0`:item)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:reduceRelevancy(KEYWORDS2,{when:x=>x.length<3}),literal:LITERALS2,type:TYPES2,built_in:POSSIBLE_WITHOUT_PARENS},contains:[{scope:"type",match:kws_to_regex(MULTI_WORD_TYPES)},MULTI_WORD_KEYWORDS,FUNCTION_CALL,VARIABLE,STRING,QUOTED_IDENTIFIER,hljs.C_NUMBER_MODE,hljs.C_BLOCK_COMMENT_MODE,COMMENT_MODE,OPERATOR]}}function source(re2){return re2?typeof re2=="string"?re2:
re2.source:null}function lookahead(re2){return concat("(?=",re2,")")}function concat(...args){return args.map(x=>source(x)).join("")}function stripOptionsFromArgs(args){const opts=args[args.length-1];return typeof opts=="object"&&opts.constructor===Object?(args.splice(args.length-1,1),opts):{}}function either(...args){return"("+(stripOptionsFromArgs(args).capture?"":"?:")+args.map(x=>source(x)).join("|")+")"}const keywordWrapper=keyword2=>concat(/\b/,keyword2,/\w$/.test(keyword2)?/\b/:/\B/),dotKeywords=[
"Protocol","Type"].map(keywordWrapper),optionalDotKeywords=["init","self"].map(keywordWrapper),keywordTypes=["Any","Self"],keywords=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect",
"infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","package","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unow\
ned","var","weak","where","while","willSet"],literals=["false","nil","true"],precedencegroupKeywords=["assignment","associativity","higherThan","left","lowerThan","none","right"],numberSignKeywords=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],builtIns=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalErro\
r","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],operatorHead=either(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,
/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),operatorCharacter=either(operatorHead,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),operator=concat(operatorHead,operatorCharacter,"*"),identifierHead=either(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,
/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),identifierCharacter=either(identifierHead,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),
identifier=concat(identifierHead,identifierCharacter,"*"),typeIdentifier=concat(/[A-Z]/,identifierCharacter,"*"),keywordAttributes=["attached","autoclosure",concat(/convention\(/,either("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",concat(/objc\(/,identifier,/\)/),"\
objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],availabilityKeywords=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function swift(hljs){const WHITESPACE={match:/\s+/,relevance:0},BLOCK_COMMENT=hljs.
COMMENT("/\\*","\\*/",{contains:["self"]}),COMMENTS=[hljs.C_LINE_COMMENT_MODE,BLOCK_COMMENT],DOT_KEYWORD={match:[/\./,either(...dotKeywords,...optionalDotKeywords)],className:{2:"keyword"}},KEYWORD_GUARD={match:concat(/\./,either(...keywords)),relevance:0},PLAIN_KEYWORDS=keywords.filter(kw=>typeof kw=="string").concat(["_|0"]),REGEX_KEYWORDS=keywords.filter(kw=>typeof kw!="string").concat(keywordTypes).map(keywordWrapper),KEYWORD={variants:[{className:"keyword",match:either(...REGEX_KEYWORDS,...optionalDotKeywords)}]},
KEYWORDS2={$pattern:either(/\b\w+/,/#\w+/),keyword:PLAIN_KEYWORDS.concat(numberSignKeywords),literal:literals},KEYWORD_MODES=[DOT_KEYWORD,KEYWORD_GUARD,KEYWORD],BUILT_IN_GUARD={match:concat(/\./,either(...builtIns)),relevance:0},BUILT_IN={className:"built_in",match:concat(/\b/,either(...builtIns),/(?=\()/)},BUILT_INS2=[BUILT_IN_GUARD,BUILT_IN],OPERATOR_GUARD={match:/->/,relevance:0},OPERATOR={className:"operator",relevance:0,variants:[{match:operator},{match:`\\.(\\.|${operatorCharacter})+`}]},OPERATORS=[
OPERATOR_GUARD,OPERATOR],decimalDigits2="([0-9]_*)+",hexDigits2="([0-9a-fA-F]_*)+",NUMBER={className:"number",relevance:0,variants:[{match:`\\b(${decimalDigits2})(\\.(${decimalDigits2}))?([eE][+-]?(${decimalDigits2}))?\\b`},{match:`\\b0x(${hexDigits2})(\\.(${hexDigits2}))?([pP][+-]?(${decimalDigits2}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},ESCAPED_CHARACTER=(rawDelimiter="")=>({className:"subst",variants:[{match:concat(/\\/,rawDelimiter,/[0\\tnr"']/)},{match:concat(/\\/,rawDelimiter,
/u\{[0-9a-fA-F]{1,8}\}/)}]}),ESCAPED_NEWLINE=(rawDelimiter="")=>({className:"subst",match:concat(/\\/,rawDelimiter,/[\t ]*(?:[\r\n]|\r\n)/)}),INTERPOLATION=(rawDelimiter="")=>({className:"subst",label:"interpol",begin:concat(/\\/,rawDelimiter,/\(/),end:/\)/}),MULTILINE_STRING=(rawDelimiter="")=>({begin:concat(rawDelimiter,/"""/),end:concat(/"""/,rawDelimiter),contains:[ESCAPED_CHARACTER(rawDelimiter),ESCAPED_NEWLINE(rawDelimiter),INTERPOLATION(rawDelimiter)]}),SINGLE_LINE_STRING=(rawDelimiter="")=>({
begin:concat(rawDelimiter,/"/),end:concat(/"/,rawDelimiter),contains:[ESCAPED_CHARACTER(rawDelimiter),INTERPOLATION(rawDelimiter)]}),STRING={className:"string",variants:[MULTILINE_STRING(),MULTILINE_STRING("#"),MULTILINE_STRING("##"),MULTILINE_STRING("###"),SINGLE_LINE_STRING(),SINGLE_LINE_STRING("#"),SINGLE_LINE_STRING("##"),SINGLE_LINE_STRING("###")]},REGEXP_CONTENTS=[hljs.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[hljs.BACKSLASH_ESCAPE]}],BARE_REGEXP_LITERAL={begin:/\/[^\s](?=[^/\n]*\/)/,
end:/\//,contains:REGEXP_CONTENTS},EXTENDED_REGEXP_LITERAL=rawDelimiter=>{const begin=concat(rawDelimiter,/\//),end=concat(/\//,rawDelimiter);return{begin,end,contains:[...REGEXP_CONTENTS,{scope:"comment",begin:`#(?!.*${end})`,end:/$/}]}},REGEXP2={scope:"regexp",variants:[EXTENDED_REGEXP_LITERAL("###"),EXTENDED_REGEXP_LITERAL("##"),EXTENDED_REGEXP_LITERAL("#"),BARE_REGEXP_LITERAL]},QUOTED_IDENTIFIER={match:concat(/`/,identifier,/`/)},IMPLICIT_PARAMETER={className:"variable",match:/\$\d+/},PROPERTY_WRAPPER_PROJECTION={
className:"variable",match:`\\$${identifierCharacter}+`},IDENTIFIERS=[QUOTED_IDENTIFIER,IMPLICIT_PARAMETER,PROPERTY_WRAPPER_PROJECTION],AVAILABLE_ATTRIBUTE={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:availabilityKeywords,contains:[...OPERATORS,NUMBER,STRING]}]}},KEYWORD_ATTRIBUTE={scope:"keyword",match:concat(/@/,either(...keywordAttributes),lookahead(either(/\(/,/\s+/)))},USER_DEFINED_ATTRIBUTE={scope:"meta",match:concat(/@/,identifier)},ATTRIBUTES2=[
AVAILABLE_ATTRIBUTE,KEYWORD_ATTRIBUTE,USER_DEFINED_ATTRIBUTE],TYPE={match:lookahead(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:concat(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,identifierCharacter,"+")},{className:"type",match:typeIdentifier,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:concat(/\s+&\s+/,lookahead(typeIdentifier)),relevance:0}]},GENERIC_ARGUMENTS={begin:/</,end:/>/,keywords:KEYWORDS2,contains:[...COMMENTS,...KEYWORD_MODES,
...ATTRIBUTES2,OPERATOR_GUARD,TYPE]};TYPE.contains.push(GENERIC_ARGUMENTS);const TUPLE_ELEMENT_NAME={match:concat(identifier,/\s*:/),keywords:"_|0",relevance:0},TUPLE={begin:/\(/,end:/\)/,relevance:0,keywords:KEYWORDS2,contains:["self",TUPLE_ELEMENT_NAME,...COMMENTS,REGEXP2,...KEYWORD_MODES,...BUILT_INS2,...OPERATORS,NUMBER,STRING,...IDENTIFIERS,...ATTRIBUTES2,TYPE]},GENERIC_PARAMETERS={begin:/</,end:/>/,keywords:"repeat each",contains:[...COMMENTS,TYPE]},FUNCTION_PARAMETER_NAME={begin:either(lookahead(
concat(identifier,/\s*:/)),lookahead(concat(identifier,/\s+/,identifier,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:identifier}]},FUNCTION_PARAMETERS={begin:/\(/,end:/\)/,keywords:KEYWORDS2,contains:[FUNCTION_PARAMETER_NAME,...COMMENTS,...KEYWORD_MODES,...OPERATORS,NUMBER,STRING,...ATTRIBUTES2,TYPE,TUPLE],endsParent:!0,illegal:/["']/},FUNCTION_OR_MACRO={match:[/(func|macro)/,/\s+/,either(QUOTED_IDENTIFIER.match,identifier,operator)],className:{
1:"keyword",3:"title.function"},contains:[GENERIC_PARAMETERS,FUNCTION_PARAMETERS,WHITESPACE],illegal:[/\[/,/%/]},INIT_SUBSCRIPT={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[GENERIC_PARAMETERS,FUNCTION_PARAMETERS,WHITESPACE],illegal:/\[|%/},OPERATOR_DECLARATION={match:[/operator/,/\s+/,operator],className:{1:"keyword",3:"title"}},PRECEDENCEGROUP={begin:[/precedencegroup/,/\s+/,typeIdentifier],className:{1:"keyword",3:"title"},contains:[TYPE],keywords:[...precedencegroupKeywords,
...literals],end:/}/},CLASS_FUNC_DECLARATION={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},CLASS_VAR_DECLARATION={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},TYPE_DECLARATION={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,identifier,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:KEYWORDS2,contains:[GENERIC_PARAMETERS,...KEYWORD_MODES,{begin:/:/,end:/\{/,keywords:KEYWORDS2,contains:[
{scope:"title.class.inherited",match:typeIdentifier},...KEYWORD_MODES],relevance:0}]};for(const variant of STRING.variants){const interpolation=variant.contains.find(mode=>mode.label==="interpol");interpolation.keywords=KEYWORDS2;const submodes=[...KEYWORD_MODES,...BUILT_INS2,...OPERATORS,NUMBER,STRING,...IDENTIFIERS];interpolation.contains=[...submodes,{begin:/\(/,end:/\)/,contains:["self",...submodes]}]}return{name:"Swift",keywords:KEYWORDS2,contains:[...COMMENTS,FUNCTION_OR_MACRO,INIT_SUBSCRIPT,
CLASS_FUNC_DECLARATION,CLASS_VAR_DECLARATION,TYPE_DECLARATION,OPERATOR_DECLARATION,PRECEDENCEGROUP,{beginKeywords:"import",end:/$/,contains:[...COMMENTS],relevance:0},REGEXP2,...KEYWORD_MODES,...BUILT_INS2,...OPERATORS,NUMBER,STRING,...IDENTIFIERS,...ATTRIBUTES2,TYPE,TUPLE]}}const IDENT_RE="[A-Za-z$_][0-9A-Za-z$_]*",KEYWORDS=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","\
continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],LITERALS=["true","false","null","undefined","NaN","Infinity"],TYPES=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","A\
rrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],ERROR_TYPES=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],BUILT_IN_GLOBALS=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","une\
scape"],BUILT_IN_VARIABLES=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],BUILT_INS=[].concat(BUILT_IN_GLOBALS,TYPES,ERROR_TYPES);function javascript(hljs){const regex=hljs.regex,hasClosingTag=(match,{after})=>{const tag="</"+match[0].slice(1);return match.input.indexOf(tag,after)!==-1},IDENT_RE$12=IDENT_RE,FRAGMENT={begin:"<>",end:"</>"},XML_SELF_CLOSING=/<[A-Za-z0-9\\._:-]+\s*\/>/,XML_TAG={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,
isTrulyOpeningTag:(match,response)=>{const afterMatchIndex=match[0].length+match.index,nextChar=match.input[afterMatchIndex];if(nextChar==="<"||nextChar===","){response.ignoreMatch();return}nextChar===">"&&(hasClosingTag(match,{after:afterMatchIndex})||response.ignoreMatch());let m;const afterMatch=match.input.substring(afterMatchIndex);if(m=afterMatch.match(/^\s*=/)){response.ignoreMatch();return}if((m=afterMatch.match(/^\s+extends\s+/))&&m.index===0){response.ignoreMatch();return}}},KEYWORDS$12={
$pattern:IDENT_RE,keyword:KEYWORDS,literal:LITERALS,built_in:BUILT_INS,"variable.language":BUILT_IN_VARIABLES},decimalDigits2="[0-9](_?[0-9])*",frac2=`\\.(${decimalDigits2})`,decimalInteger="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",NUMBER={className:"number",variants:[{begin:`(\\b(${decimalInteger})((${frac2})|\\.)?|(${frac2}))[eE][+-]?(${decimalDigits2})\\b`},{begin:`\\b(${decimalInteger})\\b((${frac2})\\b|\\.)?|(${frac2})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a\
-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},SUBST={className:"subst",begin:"\\$\\{",end:"\\}",keywords:KEYWORDS$12,contains:[]},HTML_TEMPLATE={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[hljs.BACKSLASH_ESCAPE,SUBST],subLanguage:"xml"}},CSS_TEMPLATE={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[hljs.BACKSLASH_ESCAPE,SUBST],subLanguage:"css"}},GRAPHQL_TEMPLATE={begin:".?gql`",
end:"",starts:{end:"`",returnEnd:!1,contains:[hljs.BACKSLASH_ESCAPE,SUBST],subLanguage:"graphql"}},TEMPLATE_STRING={className:"string",begin:"`",end:"`",contains:[hljs.BACKSLASH_ESCAPE,SUBST]},COMMENT={className:"comment",variants:[hljs.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:IDENT_RE$12+"\
(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),hljs.C_BLOCK_COMMENT_MODE,hljs.C_LINE_COMMENT_MODE]},SUBST_INTERNALS=[hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,HTML_TEMPLATE,CSS_TEMPLATE,GRAPHQL_TEMPLATE,TEMPLATE_STRING,{match:/\$\d+/},NUMBER];SUBST.contains=SUBST_INTERNALS.concat({begin:/\{/,end:/\}/,keywords:KEYWORDS$12,contains:["self"].concat(SUBST_INTERNALS)});const SUBST_AND_COMMENTS=[].concat(COMMENT,SUBST.contains),PARAMS_CONTAINS=SUBST_AND_COMMENTS.concat(
[{begin:/(\s*)\(/,end:/\)/,keywords:KEYWORDS$12,contains:["self"].concat(SUBST_AND_COMMENTS)}]),PARAMS={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:KEYWORDS$12,contains:PARAMS_CONTAINS},CLASS_OR_EXTENDS={variants:[{match:[/class/,/\s+/,IDENT_RE$12,/\s+/,/extends/,/\s+/,regex.concat(IDENT_RE$12,"(",regex.concat(/\./,IDENT_RE$12),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,IDENT_RE$12],scope:{1:"keyw\
ord",3:"title.class"}}]},CLASS_REFERENCE={relevance:0,match:regex.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...TYPES,...ERROR_TYPES]}},USE_STRICT={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},FUNCTION_DEFINITION={variants:[{match:[/function/,/\s+/,IDENT_RE$12,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{
1:"keyword",3:"title.function"},label:"func.def",contains:[PARAMS],illegal:/%/},UPPER_CASE_CONSTANT={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function noneOf(list2){return regex.concat("(?!",list2.join("|"),")")}const FUNCTION_CALL={match:regex.concat(/\b/,noneOf([...BUILT_IN_GLOBALS,"super","import"].map(x=>`${x}\\s*\\(`)),IDENT_RE$12,regex.lookahead(/\s*\(/)),className:"title.function",relevance:0},PROPERTY_ACCESS={begin:regex.concat(/\./,regex.lookahead(regex.concat(
IDENT_RE$12,/(?![0-9A-Za-z$_(])/))),end:IDENT_RE$12,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},GETTER_OR_SETTER={match:[/get|set/,/\s+/,IDENT_RE$12,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},PARAMS]},FUNC_LEAD_IN_RE="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+hljs.UNDERSCORE_IDENT_RE+")\\s*=>",FUNCTION_VARIABLE={match:[/const|var|let/,/\s+/,IDENT_RE$12,/\s*/,/=\s*/,/(async\s*)?/,regex.lookahead(FUNC_LEAD_IN_RE)],keywords:"\
async",className:{1:"keyword",3:"title.function"},contains:[PARAMS]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:KEYWORDS$12,exports:{PARAMS_CONTAINS,CLASS_REFERENCE},illegal:/#(?![$_A-z])/,contains:[hljs.SHEBANG({label:"shebang",binary:"node",relevance:5}),USE_STRICT,hljs.APOS_STRING_MODE,hljs.QUOTE_STRING_MODE,HTML_TEMPLATE,CSS_TEMPLATE,GRAPHQL_TEMPLATE,TEMPLATE_STRING,COMMENT,{match:/\$\d+/},NUMBER,CLASS_REFERENCE,{scope:"attr",match:IDENT_RE$12+regex.lookahead(":"),relevance:0},
FUNCTION_VARIABLE,{begin:"("+hljs.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[COMMENT,hljs.REGEXP_MODE,{className:"function",begin:FUNC_LEAD_IN_RE,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:hljs.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:KEYWORDS$12,contains:PARAMS_CONTAINS}]}]},{begin:/,/,relevance:0},{match:/\s+/,
relevance:0},{variants:[{begin:FRAGMENT.begin,end:FRAGMENT.end},{match:XML_SELF_CLOSING},{begin:XML_TAG.begin,"on:begin":XML_TAG.isTrulyOpeningTag,end:XML_TAG.end}],subLanguage:"xml",contains:[{begin:XML_TAG.begin,end:XML_TAG.end,skip:!0,contains:["self"]}]}]},FUNCTION_DEFINITION,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+hljs.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[PARAMS,hljs.inherit(
hljs.TITLE_MODE,{begin:IDENT_RE$12,className:"title.function"})]},{match:/\.\.\./,relevance:0},PROPERTY_ACCESS,{match:"\\$"+IDENT_RE$12,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[PARAMS]},FUNCTION_CALL,UPPER_CASE_CONSTANT,CLASS_OR_EXTENDS,GETTER_OR_SETTER,{match:/\$[(.]/}]}}function typescript(hljs){const regex=hljs.regex,tsLanguage=javascript(hljs),IDENT_RE$12=IDENT_RE,TYPES2=["any","void","number","boolean","string","object","never","symbol","bigint",
"unknown"],NAMESPACE={begin:[/namespace/,/\s+/,hljs.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},INTERFACE={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:TYPES2},contains:[tsLanguage.exports.CLASS_REFERENCE]},USE_STRICT={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},TS_SPECIFIC_KEYWORDS=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],KEYWORDS$12={
$pattern:IDENT_RE,keyword:KEYWORDS.concat(TS_SPECIFIC_KEYWORDS),literal:LITERALS,built_in:BUILT_INS.concat(TYPES2),"variable.language":BUILT_IN_VARIABLES},DECORATOR={className:"meta",begin:"@"+IDENT_RE$12},swapMode=(mode,label,replacement)=>{const indx=mode.contains.findIndex(m=>m.label===label);if(indx===-1)throw new Error("can not find mode to replace");mode.contains.splice(indx,1,replacement)};Object.assign(tsLanguage.keywords,KEYWORDS$12),tsLanguage.exports.PARAMS_CONTAINS.push(DECORATOR);const ATTRIBUTE_HIGHLIGHT=tsLanguage.
contains.find(c2=>c2.scope==="attr"),OPTIONAL_KEY_OR_ARGUMENT=Object.assign({},ATTRIBUTE_HIGHLIGHT,{match:regex.concat(IDENT_RE$12,regex.lookahead(/\s*\?:/))});tsLanguage.exports.PARAMS_CONTAINS.push([tsLanguage.exports.CLASS_REFERENCE,ATTRIBUTE_HIGHLIGHT,OPTIONAL_KEY_OR_ARGUMENT]),tsLanguage.contains=tsLanguage.contains.concat([DECORATOR,NAMESPACE,INTERFACE,OPTIONAL_KEY_OR_ARGUMENT]),swapMode(tsLanguage,"shebang",hljs.SHEBANG()),swapMode(tsLanguage,"use_strict",USE_STRICT);const functionDeclaration=tsLanguage.
contains.find(m=>m.label==="func.def");return functionDeclaration.relevance=0,Object.assign(tsLanguage,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),tsLanguage}function vbnet(hljs){const regex=hljs.regex,CHARACTER={className:"string",begin:/"(""|[^/n])"C\b/},STRING={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},MM_DD_YYYY=/\d{1,2}\/\d{1,2}\/\d{4}/,YYYY_MM_DD=/\d{4}-\d{1,2}-\d{1,2}/,TIME_12H=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,TIME_24H=/\d{1,2}(:\d{1,2}){1,2}/,DATE2={
className:"literal",variants:[{begin:regex.concat(/# */,regex.either(YYYY_MM_DD,MM_DD_YYYY),/ *#/)},{begin:regex.concat(/# */,TIME_24H,/ *#/)},{begin:regex.concat(/# */,TIME_12H,/ *#/)},{begin:regex.concat(/# */,regex.either(YYYY_MM_DD,MM_DD_YYYY),/ +/,regex.either(TIME_12H,TIME_24H),/ *#/)}]},NUMBER={className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},
{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},LABEL={className:"label",begin:/^\w+:/},DOC_COMMENT=hljs.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),COMMENT=hljs.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue cust\
om declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public \
raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byt\
e char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[CHARACTER,STRING,DATE2,NUMBER,LABEL,DOC_COMMENT,COMMENT,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[COMMENT]}]}}function wasm(hljs){hljs.regex;const BLOCK_COMMENT=hljs.
COMMENT(/\(;/,/;\)/);BLOCK_COMMENT.contains.push("self");const LINE_COMMENT=hljs.COMMENT(/;;/,/$/),KWS=["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","\
then","type","unreachable"],FUNCTION_REFERENCE={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},ARGUMENT={className:"variable",begin:/\$[\w_]+/},PARENS={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},NUMBER={className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/},
TYPE={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},MATH_OPERATIONS={className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/};
return{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:KWS},contains:[LINE_COMMENT,BLOCK_COMMENT,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},ARGUMENT,PARENS,FUNCTION_REFERENCE,hljs.QUOTE_STRING_MODE,TYPE,MATH_OPERATIONS,NUMBER]}}function xml$1(hljs){const regex=hljs.regex,TAG_NAME_RE=regex.concat(/[\p{L}_]/u,regex.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),XML_IDENT_RE=/[\p{L}0-9._:-]+/u,XML_ENTITIES={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},
XML_META_KEYWORDS={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},XML_META_PAR_KEYWORDS=hljs.inherit(XML_META_KEYWORDS,{begin:/\(/,end:/\)/}),APOS_META_STRING_MODE=hljs.inherit(hljs.APOS_STRING_MODE,{className:"string"}),QUOTE_META_STRING_MODE=hljs.inherit(hljs.QUOTE_STRING_MODE,{className:"string"}),TAG_INTERNALS={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:XML_IDENT_RE,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"\
string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[XML_ENTITIES]},{begin:/'/,end:/'/,contains:[XML_ENTITIES]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[XML_META_KEYWORDS,QUOTE_META_STRING_MODE,APOS_META_STRING_MODE,XML_META_PAR_KEYWORDS,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,
end:/>/,contains:[XML_META_KEYWORDS,XML_META_PAR_KEYWORDS,QUOTE_META_STRING_MODE,APOS_META_STRING_MODE]}]}]},hljs.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},XML_ENTITIES,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[QUOTE_META_STRING_MODE]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[TAG_INTERNALS],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},
{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[TAG_INTERNALS],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:regex.concat(/</,regex.lookahead(regex.concat(TAG_NAME_RE,regex.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:TAG_NAME_RE,relevance:0,starts:TAG_INTERNALS}]},{className:"tag",begin:regex.concat(/<\//,regex.lookahead(regex.concat(TAG_NAME_RE,
/>/))),contains:[{className:"name",begin:TAG_NAME_RE,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function yaml(hljs){const LITERALS2="true false yes no null",URI_CHARACTERS="[\\w#;/?:@&=+$,.~*'()[\\]]+",KEY={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},TEMPLATE_VARIABLES={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},SINGLE_QUOTE_STRING={
className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},STRING={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[hljs.BACKSLASH_ESCAPE,TEMPLATE_VARIABLES]},CONTAINER_STRING=hljs.inherit(STRING,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),TIMESTAMP={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2}\
)?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},VALUE_CONTAINER={end:",",endsWithParent:!0,excludeEnd:!0,keywords:LITERALS2,relevance:0},OBJECT2={begin:/\{/,end:/\}/,contains:[VALUE_CONTAINER],illegal:"\\n",relevance:0},ARRAY2={begin:"\\[",end:"\\]",contains:[VALUE_CONTAINER],illegal:"\\n",relevance:0},MODES2=[KEY,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"\
[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+URI_CHARACTERS},{className:"type",begin:"!<"+URI_CHARACTERS+">"},{className:"type",begin:"!"+URI_CHARACTERS},{className:"type",begin:"!!"+URI_CHARACTERS},{className:"meta",begin:"&"+hljs.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+hljs.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},hljs.HASH_COMMENT_MODE,{beginKeywords:LITERALS2,keywords:{literal:LITERALS2}},
TIMESTAMP,{className:"number",begin:hljs.C_NUMBER_RE+"\\b",relevance:0},OBJECT2,ARRAY2,SINGLE_QUOTE_STRING,STRING],VALUE_MODES=[...MODES2];return VALUE_MODES.pop(),VALUE_MODES.push(CONTAINER_STRING),VALUE_CONTAINER.contains=VALUE_MODES,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:MODES2}}const grammars$1={arduino,bash,c,cpp,csharp,css,diff,go,graphql,ini,java,javascript:javascript$1,json,kotlin,less,lua,makefile,markdown,objectivec,perl,php,"php-template":phpTemplate,plaintext,python,
"python-repl":pythonRepl,r,ruby,rust,scss,shell,sql,swift,typescript,vbnet,wasm,xml:xml$1,yaml},grammars={...grammars$1,"1c":_1c,abnf,accesslog,actionscript,ada,angelscript,apache,applescript,arcade,armasm,asciidoc,aspectj,autohotkey,autoit,avrasm,awk,axapta,basic,bnf,brainfuck,cal,capnproto,ceylon,clean,clojure,"clojure-repl":clojureRepl,cmake,coffeescript,coq,cos,crmsh,crystal,csp,d,dart,delphi,django,dns,dockerfile,dos,dsconfig,dts,dust,ebnf,elixir,elm,erb,erlang,"erlang-repl":erlangRepl,excel,
fix,flix,fortran,fsharp,gams,gauss,gcode,gherkin,glsl,gml,golo,gradle,groovy,haml,handlebars,haskell,haxe,hsp,http,hy,inform7,irpf90,isbl,"jboss-cli":jbossCli,julia,"julia-repl":juliaRepl,lasso,latex,ldif,leaf,lisp,livecodeserver,livescript,llvm,lsl,mathematica,matlab,maxima,mel,mercury,mipsasm,mizar,mojolicious,monkey,moonscript,n1ql,nestedtext,nginx,nim,nix,"node-repl":nodeRepl,nsis,ocaml,openscad,oxygene,parser3,pf,pgsql,pony,powershell,processing,profile,prolog,properties,protobuf,puppet,purebasic,
q,qml,reasonml,rib,roboconf,routeros,rsl,ruleslanguage,sas,scala,scheme,scilab,smali,smalltalk,sml,sqf,stan,stata,step21,stylus,subunit,taggerscript,tap,tcl,thrift,tp,twig,vala,vbscript,"vbscript-html":vbscriptHtml,verilog,vhdl,vim,wren,x86asm,xl,xquery,zephir};var coreExports=requireCore$4();const HighlightJS=getDefaultExportFromCjs(coreExports),emptyOptions$4={},defaultPrefix="hljs-";function createLowlight(grammars2){const high=HighlightJS.newInstance();return grammars2&&register(grammars2),{
highlight,highlightAuto,listLanguages,register,registerAlias,registered};function highlight(language2,value,options){const settings=options||emptyOptions$4,prefix=typeof settings.prefix=="string"?settings.prefix:defaultPrefix;if(!high.getLanguage(language2))throw new Error("Unknown language: `"+language2+"` is not registered");high.configure({__emitter:HastEmitter,classPrefix:prefix});const result=high.highlight(value,{ignoreIllegals:!0,language:language2});if(result.errorRaised)throw new Error(
"Could not highlight with `Highlight.js`",{cause:result.errorRaised});const root2=result._emitter.root,data=root2.data;return data.language=result.language,data.relevance=result.relevance,root2}function highlightAuto(value,options){const subset=(options||emptyOptions$4).subset||listLanguages();let index2=-1,relevance=0,result;for(;++index2<subset.length;){const name=subset[index2];if(!high.getLanguage(name))continue;const current2=highlight(name,value,options);current2.data&&current2.data.relevance!==
void 0&&current2.data.relevance>relevance&&(relevance=current2.data.relevance,result=current2)}return result||{type:"root",children:[],data:{language:void 0,relevance}}}function listLanguages(){return high.listLanguages()}function register(grammarsOrName,grammar){if(typeof grammarsOrName=="string")high.registerLanguage(grammarsOrName,grammar);else{let name;for(name in grammarsOrName)Object.hasOwn(grammarsOrName,name)&&high.registerLanguage(name,grammarsOrName[name])}}function registerAlias(aliasesOrName,alias){
if(typeof aliasesOrName=="string")high.registerAliases(typeof alias=="string"?alias:[...alias],{languageName:aliasesOrName});else{let key2;for(key2 in aliasesOrName)if(Object.hasOwn(aliasesOrName,key2)){const aliases=aliasesOrName[key2];high.registerAliases(typeof aliases=="string"?aliases:[...aliases],{languageName:key2})}}}function registered(aliasOrName){return!!high.getLanguage(aliasOrName)}}class HastEmitter{constructor(options){this.options=options,this.root={type:"root",children:[],data:{
language:void 0,relevance:0}},this.stack=[this.root]}addText(value){if(value==="")return;const current2=this.stack[this.stack.length-1],tail=current2.children[current2.children.length-1];tail&&tail.type==="text"?tail.value+=value:current2.children.push({type:"text",value})}startScope(rawName){this.openNode(String(rawName))}endScope(){this.closeNode()}__addSublanguage(other,name){const current2=this.stack[this.stack.length-1],results=other.root.children;name?current2.children.push({type:"element",
tagName:"span",properties:{className:[name]},children:results}):current2.children.push(...results)}openNode(name){const self2=this,className=name.split(".").map(function(d2,i){return i?d2+"_".repeat(i):self2.options.classPrefix+d2}),current2=this.stack[this.stack.length-1],child2={type:"element",tagName:"span",properties:{className},children:[]};current2.children.push(child2),this.stack.push(child2)}closeNode(){this.stack.pop()}finalize(){}toHTML(){return""}}const emptyOptions$3={};function rehypeHighlight(options){
const settings=options||emptyOptions$3,aliases=settings.aliases,detect=settings.detect||!1,languages=settings.languages||grammars$1,plainText=settings.plainText,prefix=settings.prefix,subset=settings.subset;let name="hljs";const lowlight=createLowlight(languages);if(aliases&&lowlight.registerAlias(aliases),prefix){const pos=prefix.indexOf("-");name=pos===-1?prefix:prefix.slice(0,pos)}return function(tree,file){visit(tree,"element",function(node2,_,parent){if(node2.tagName!=="code"||!parent||parent.
type!=="element"||parent.tagName!=="pre")return;const lang=language(node2);if(lang===!1||!lang&&!detect||lang&&plainText&&plainText.includes(lang))return;Array.isArray(node2.properties.className)||(node2.properties.className=[]),node2.properties.className.includes(name)||node2.properties.className.unshift(name);const text2=toText(node2,{whitespace:"pre"});let result;try{result=lang?lowlight.highlight(lang,text2,{prefix}):lowlight.highlightAuto(text2,{prefix,subset})}catch(error2){const cause=error2;
if(lang&&/Unknown language/.test(cause.message)){file.message("Cannot highlight as `"+lang+"`, it’s not registered",{ancestors:[parent,node2],cause,place:node2.position,ruleId:"missing-language",source:"rehype-highlight"});return}throw cause}!lang&&result.data&&result.data.language&&node2.properties.className.push("language-"+result.data.language),result.children.length>0&&(node2.children=result.children)})}}function language(node2){const list2=node2.properties.className;let index2=-1;if(!Array.
isArray(list2))return;let name;for(;++index2<list2.length;){const value=String(list2[index2]);if(value==="no-highlight"||value==="nohighlight")return!1;!name&&value.slice(0,5)==="lang-"&&(name=value.slice(5)),!name&&value.slice(0,9)==="language-"&&(name=value.slice(9))}return name}function blockquote(state2,node2){const result={type:"element",tagName:"blockquote",properties:{},children:state2.wrap(state2.all(node2),!0)};return state2.patch(node2,result),state2.applyData(node2,result)}function hardBreak(state2,node2){
const result={type:"element",tagName:"br",properties:{},children:[]};return state2.patch(node2,result),[state2.applyData(node2,result),{type:"text",value:`
`}]}function code(state2,node2){const value=node2.value?node2.value+`
`:"",properties2={},language2=node2.lang?node2.lang.split(/\s+/):[];language2.length>0&&(properties2.className=["language-"+language2[0]]);let result={type:"element",tagName:"code",properties:properties2,children:[{type:"text",value}]};return node2.meta&&(result.data={meta:node2.meta}),state2.patch(node2,result),result=state2.applyData(node2,result),result={type:"element",tagName:"pre",properties:{},children:[result]},state2.patch(node2,result),result}function strikethrough(state2,node2){const result={
type:"element",tagName:"del",properties:{},children:state2.all(node2)};return state2.patch(node2,result),state2.applyData(node2,result)}function emphasis(state2,node2){const result={type:"element",tagName:"em",properties:{},children:state2.all(node2)};return state2.patch(node2,result),state2.applyData(node2,result)}function footnoteReference(state2,node2){const clobberPrefix=typeof state2.options.clobberPrefix=="string"?state2.options.clobberPrefix:"user-content-",id2=String(node2.identifier).toUpperCase(),
safeId=normalizeUri(id2.toLowerCase()),index2=state2.footnoteOrder.indexOf(id2);let counter,reuseCounter=state2.footnoteCounts.get(id2);reuseCounter===void 0?(reuseCounter=0,state2.footnoteOrder.push(id2),counter=state2.footnoteOrder.length):counter=index2+1,reuseCounter+=1,state2.footnoteCounts.set(id2,reuseCounter);const link2={type:"element",tagName:"a",properties:{href:"#"+clobberPrefix+"fn-"+safeId,id:clobberPrefix+"fnref-"+safeId+(reuseCounter>1?"-"+reuseCounter:""),dataFootnoteRef:!0,ariaDescribedBy:[
"footnote-label"]},children:[{type:"text",value:String(counter)}]};state2.patch(node2,link2);const sup2={type:"element",tagName:"sup",properties:{},children:[link2]};return state2.patch(node2,sup2),state2.applyData(node2,sup2)}function heading(state2,node2){const result={type:"element",tagName:"h"+node2.depth,properties:{},children:state2.all(node2)};return state2.patch(node2,result),state2.applyData(node2,result)}function html$4(state2,node2){if(state2.options.allowDangerousHtml){const result={
type:"raw",value:node2.value};return state2.patch(node2,result),state2.applyData(node2,result)}}function revert(state2,node2){const subtype=node2.referenceType;let suffix="]";if(subtype==="collapsed"?suffix+="[]":subtype==="full"&&(suffix+="["+(node2.label||node2.identifier)+"]"),node2.type==="imageReference")return[{type:"text",value:"!["+node2.alt+suffix}];const contents=state2.all(node2),head2=contents[0];head2&&head2.type==="text"?head2.value="["+head2.value:contents.unshift({type:"text",value:"\
["});const tail=contents[contents.length-1];return tail&&tail.type==="text"?tail.value+=suffix:contents.push({type:"text",value:suffix}),contents}function imageReference(state2,node2){const id2=String(node2.identifier).toUpperCase(),definition2=state2.definitionById.get(id2);if(!definition2)return revert(state2,node2);const properties2={src:normalizeUri(definition2.url||""),alt:node2.alt};definition2.title!==null&&definition2.title!==void 0&&(properties2.title=definition2.title);const result={type:"\
element",tagName:"img",properties:properties2,children:[]};return state2.patch(node2,result),state2.applyData(node2,result)}function image(state2,node2){const properties2={src:normalizeUri(node2.url)};node2.alt!==null&&node2.alt!==void 0&&(properties2.alt=node2.alt),node2.title!==null&&node2.title!==void 0&&(properties2.title=node2.title);const result={type:"element",tagName:"img",properties:properties2,children:[]};return state2.patch(node2,result),state2.applyData(node2,result)}function inlineCode(state2,node2){
const text2={type:"text",value:node2.value.replace(/\r?\n|\r/g," ")};state2.patch(node2,text2);const result={type:"element",tagName:"code",properties:{},children:[text2]};return state2.patch(node2,result),state2.applyData(node2,result)}function linkReference(state2,node2){const id2=String(node2.identifier).toUpperCase(),definition2=state2.definitionById.get(id2);if(!definition2)return revert(state2,node2);const properties2={href:normalizeUri(definition2.url||"")};definition2.title!==null&&definition2.
title!==void 0&&(properties2.title=definition2.title);const result={type:"element",tagName:"a",properties:properties2,children:state2.all(node2)};return state2.patch(node2,result),state2.applyData(node2,result)}function link(state2,node2){const properties2={href:normalizeUri(node2.url)};node2.title!==null&&node2.title!==void 0&&(properties2.title=node2.title);const result={type:"element",tagName:"a",properties:properties2,children:state2.all(node2)};return state2.patch(node2,result),state2.applyData(
node2,result)}function listItem(state2,node2,parent){const results=state2.all(node2),loose=parent?listLoose(parent):listItemLoose(node2),properties2={},children=[];if(typeof node2.checked=="boolean"){const head2=results[0];let paragraph2;head2&&head2.type==="element"&&head2.tagName==="p"?paragraph2=head2:(paragraph2={type:"element",tagName:"p",properties:{},children:[]},results.unshift(paragraph2)),paragraph2.children.length>0&&paragraph2.children.unshift({type:"text",value:" "}),paragraph2.children.
unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:node2.checked,disabled:!0},children:[]}),properties2.className=["task-list-item"]}let index2=-1;for(;++index2<results.length;){const child2=results[index2];(loose||index2!==0||child2.type!=="element"||child2.tagName!=="p")&&children.push({type:"text",value:`
`}),child2.type==="element"&&child2.tagName==="p"&&!loose?children.push(...child2.children):children.push(child2)}const tail=results[results.length-1];tail&&(loose||tail.type!=="element"||tail.tagName!=="p")&&children.push({type:"text",value:`
`});const result={type:"element",tagName:"li",properties:properties2,children};return state2.patch(node2,result),state2.applyData(node2,result)}function listLoose(node2){let loose=!1;if(node2.type==="list"){loose=node2.spread||!1;const children=node2.children;let index2=-1;for(;!loose&&++index2<children.length;)loose=listItemLoose(children[index2])}return loose}function listItemLoose(node2){const spread=node2.spread;return spread??node2.children.length>1}function list(state2,node2){const properties2={},
results=state2.all(node2);let index2=-1;for(typeof node2.start=="number"&&node2.start!==1&&(properties2.start=node2.start);++index2<results.length;){const child2=results[index2];if(child2.type==="element"&&child2.tagName==="li"&&child2.properties&&Array.isArray(child2.properties.className)&&child2.properties.className.includes("task-list-item")){properties2.className=["contains-task-list"];break}}const result={type:"element",tagName:node2.ordered?"ol":"ul",properties:properties2,children:state2.
wrap(results,!0)};return state2.patch(node2,result),state2.applyData(node2,result)}function paragraph(state2,node2){const result={type:"element",tagName:"p",properties:{},children:state2.all(node2)};return state2.patch(node2,result),state2.applyData(node2,result)}function root$W(state2,node2){const result={type:"root",children:state2.wrap(state2.all(node2))};return state2.patch(node2,result),state2.applyData(node2,result)}function strong(state2,node2){const result={type:"element",tagName:"strong",
properties:{},children:state2.all(node2)};return state2.patch(node2,result),state2.applyData(node2,result)}const pointEnd=point("end"),pointStart=point("start");function point(type2){return point2;function point2(node2){const point3=node2&&node2.position&&node2.position[type2]||{};if(typeof point3.line=="number"&&point3.line>0&&typeof point3.column=="number"&&point3.column>0)return{line:point3.line,column:point3.column,offset:typeof point3.offset=="number"&&point3.offset>-1?point3.offset:void 0}}}
function position(node2){const start2=pointStart(node2),end=pointEnd(node2);if(start2&&end)return{start:start2,end}}function table(state2,node2){const rows=state2.all(node2),firstRow=rows.shift(),tableContent=[];if(firstRow){const head2={type:"element",tagName:"thead",properties:{},children:state2.wrap([firstRow],!0)};state2.patch(node2.children[0],head2),tableContent.push(head2)}if(rows.length>0){const body2={type:"element",tagName:"tbody",properties:{},children:state2.wrap(rows,!0)},start2=pointStart(
node2.children[1]),end=pointEnd(node2.children[node2.children.length-1]);start2&&end&&(body2.position={start:start2,end}),tableContent.push(body2)}const result={type:"element",tagName:"table",properties:{},children:state2.wrap(tableContent,!0)};return state2.patch(node2,result),state2.applyData(node2,result)}function tableRow(state2,node2,parent){const siblings2=parent?parent.children:void 0,tagName=(siblings2?siblings2.indexOf(node2):1)===0?"th":"td",align=parent&&parent.type==="table"?parent.align:
void 0,length=align?align.length:node2.children.length;let cellIndex=-1;const cells2=[];for(;++cellIndex<length;){const cell2=node2.children[cellIndex],properties2={},alignValue=align?align[cellIndex]:void 0;alignValue&&(properties2.align=alignValue);let result2={type:"element",tagName,properties:properties2,children:[]};cell2&&(result2.children=state2.all(cell2),state2.patch(cell2,result2),result2=state2.applyData(cell2,result2)),cells2.push(result2)}const result={type:"element",tagName:"tr",properties:{},
children:state2.wrap(cells2,!0)};return state2.patch(node2,result),state2.applyData(node2,result)}function tableCell(state2,node2){const result={type:"element",tagName:"td",properties:{},children:state2.all(node2)};return state2.patch(node2,result),state2.applyData(node2,result)}const tab=9,space=32;function trimLines(value){const source2=String(value),search2=/\r?\n|\r/g;let match=search2.exec(source2),last=0;const lines=[];for(;match;)lines.push(trimLine(source2.slice(last,match.index),last>0,
!0),match[0]),last=match.index+match[0].length,match=search2.exec(source2);return lines.push(trimLine(source2.slice(last),last>0,!1)),lines.join("")}function trimLine(value,start2,end){let startIndex=0,endIndex=value.length;if(start2){let code2=value.codePointAt(startIndex);for(;code2===tab||code2===space;)startIndex++,code2=value.codePointAt(startIndex)}if(end){let code2=value.codePointAt(endIndex-1);for(;code2===tab||code2===space;)endIndex--,code2=value.codePointAt(endIndex-1)}return endIndex>
startIndex?value.slice(startIndex,endIndex):""}function text$2(state2,node2){const result={type:"text",value:trimLines(String(node2.value))};return state2.patch(node2,result),state2.applyData(node2,result)}function thematicBreak(state2,node2){const result={type:"element",tagName:"hr",properties:{},children:[]};return state2.patch(node2,result),state2.applyData(node2,result)}const handlers={blockquote,break:hardBreak,code,delete:strikethrough,emphasis,footnoteReference,heading,html:html$4,imageReference,
image,inlineCode,linkReference,link,listItem,list,paragraph,root:root$W,strong,table,tableCell,tableRow,text:text$2,thematicBreak,toml:ignore,yaml:ignore,definition:ignore,footnoteDefinition:ignore};function ignore(){}const VOID=-1,PRIMITIVE=0,ARRAY=1,OBJECT=2,DATE=3,REGEXP=4,MAP=5,SET=6,ERROR=7,BIGINT=8,env=typeof self=="object"?self:globalThis,deserializer=($,_)=>{const as=(out,index2)=>($.set(index2,out),out),unpair=index2=>{if($.has(index2))return $.get(index2);const[type2,value]=_[index2];switch(type2){case PRIMITIVE:case VOID:
return as(value,index2);case ARRAY:{const arr=as([],index2);for(const index3 of value)arr.push(unpair(index3));return arr}case OBJECT:{const object2=as({},index2);for(const[key2,index3]of value)object2[unpair(key2)]=unpair(index3);return object2}case DATE:return as(new Date(value),index2);case REGEXP:{const{source:source2,flags:flags2}=value;return as(new RegExp(source2,flags2),index2)}case MAP:{const map2=as(new Map,index2);for(const[key2,index3]of value)map2.set(unpair(key2),unpair(index3));return map2}case SET:{
const set2=as(new Set,index2);for(const index3 of value)set2.add(unpair(index3));return set2}case ERROR:{const{name,message}=value;return as(new env[name](message),index2)}case BIGINT:return as(BigInt(value),index2);case"BigInt":return as(Object(BigInt(value)),index2);case"ArrayBuffer":return as(new Uint8Array(value).buffer,value);case"DataView":{const{buffer}=new Uint8Array(value);return as(new DataView(buffer),value)}}return as(new env[type2](value),index2)};return unpair},deserialize=serialized=>deserializer(
new Map,serialized)(0),EMPTY="",{toString}={},{keys}=Object,typeOf=value=>{const type2=typeof value;if(type2!=="object"||!value)return[PRIMITIVE,type2];const asString=toString.call(value).slice(8,-1);switch(asString){case"Array":return[ARRAY,EMPTY];case"Object":return[OBJECT,EMPTY];case"Date":return[DATE,EMPTY];case"RegExp":return[REGEXP,EMPTY];case"Map":return[MAP,EMPTY];case"Set":return[SET,EMPTY];case"DataView":return[ARRAY,asString]}return asString.includes("Array")?[ARRAY,asString]:asString.
includes("Error")?[ERROR,asString]:[OBJECT,asString]},shouldSkip=([TYPE,type2])=>TYPE===PRIMITIVE&&(type2==="function"||type2==="symbol"),serializer=(strict,json2,$,_)=>{const as=(out,value)=>{const index2=_.push(out)-1;return $.set(value,index2),index2},pair=value=>{if($.has(value))return $.get(value);let[TYPE,type2]=typeOf(value);switch(TYPE){case PRIMITIVE:{let entry=value;switch(type2){case"bigint":TYPE=BIGINT,entry=value.toString();break;case"function":case"symbol":if(strict)throw new TypeError(
"unable to serialize "+type2);entry=null;break;case"undefined":return as([VOID],value)}return as([TYPE,entry],value)}case ARRAY:{if(type2){let spread=value;return type2==="DataView"?spread=new Uint8Array(value.buffer):type2==="ArrayBuffer"&&(spread=new Uint8Array(value)),as([type2,[...spread]],value)}const arr=[],index2=as([TYPE,arr],value);for(const entry of value)arr.push(pair(entry));return index2}case OBJECT:{if(type2)switch(type2){case"BigInt":return as([type2,value.toString()],value);case"\
Boolean":case"Number":case"String":return as([type2,value.valueOf()],value)}if(json2&&"toJSON"in value)return pair(value.toJSON());const entries=[],index2=as([TYPE,entries],value);for(const key2 of keys(value))(strict||!shouldSkip(typeOf(value[key2])))&&entries.push([pair(key2),pair(value[key2])]);return index2}case DATE:return as([TYPE,value.toISOString()],value);case REGEXP:{const{source:source2,flags:flags2}=value;return as([TYPE,{source:source2,flags:flags2}],value)}case MAP:{const entries=[],
index2=as([TYPE,entries],value);for(const[key2,entry]of value)(strict||!(shouldSkip(typeOf(key2))||shouldSkip(typeOf(entry))))&&entries.push([pair(key2),pair(entry)]);return index2}case SET:{const entries=[],index2=as([TYPE,entries],value);for(const entry of value)(strict||!shouldSkip(typeOf(entry)))&&entries.push(pair(entry));return index2}}const{message}=value;return as([TYPE,{name:type2,message}],value)};return pair},serialize=(value,{json:json2,lossy}={})=>{const _=[];return serializer(!(json2||
lossy),!!json2,new Map,_)(value),_},structuredClone$1=typeof structuredClone=="function"?(any2,options)=>options&&("json"in options||"lossy"in options)?deserialize(serialize(any2,options)):structuredClone(any2):(any2,options)=>deserialize(serialize(any2,options));function defaultFootnoteBackContent(_,rereferenceIndex){const result=[{type:"text",value:"↩"}];return rereferenceIndex>1&&result.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(rereferenceIndex)}]}),
result}function defaultFootnoteBackLabel(referenceIndex,rereferenceIndex){return"Back to reference "+(referenceIndex+1)+(rereferenceIndex>1?"-"+rereferenceIndex:"")}function footer(state2){const clobberPrefix=typeof state2.options.clobberPrefix=="string"?state2.options.clobberPrefix:"user-content-",footnoteBackContent=state2.options.footnoteBackContent||defaultFootnoteBackContent,footnoteBackLabel=state2.options.footnoteBackLabel||defaultFootnoteBackLabel,footnoteLabel=state2.options.footnoteLabel||
"Footnotes",footnoteLabelTagName=state2.options.footnoteLabelTagName||"h2",footnoteLabelProperties=state2.options.footnoteLabelProperties||{className:["sr-only"]},listItems=[];let referenceIndex=-1;for(;++referenceIndex<state2.footnoteOrder.length;){const definition2=state2.footnoteById.get(state2.footnoteOrder[referenceIndex]);if(!definition2)continue;const content2=state2.all(definition2),id2=String(definition2.identifier).toUpperCase(),safeId=normalizeUri(id2.toLowerCase());let rereferenceIndex=0;
const backReferences=[],counts=state2.footnoteCounts.get(id2);for(;counts!==void 0&&++rereferenceIndex<=counts;){backReferences.length>0&&backReferences.push({type:"text",value:" "});let children=typeof footnoteBackContent=="string"?footnoteBackContent:footnoteBackContent(referenceIndex,rereferenceIndex);typeof children=="string"&&(children={type:"text",value:children}),backReferences.push({type:"element",tagName:"a",properties:{href:"#"+clobberPrefix+"fnref-"+safeId+(rereferenceIndex>1?"-"+rereferenceIndex:
""),dataFootnoteBackref:"",ariaLabel:typeof footnoteBackLabel=="string"?footnoteBackLabel:footnoteBackLabel(referenceIndex,rereferenceIndex),className:["data-footnote-backref"]},children:Array.isArray(children)?children:[children]})}const tail=content2[content2.length-1];if(tail&&tail.type==="element"&&tail.tagName==="p"){const tailTail=tail.children[tail.children.length-1];tailTail&&tailTail.type==="text"?tailTail.value+=" ":tail.children.push({type:"text",value:" "}),tail.children.push(...backReferences)}else
content2.push(...backReferences);const listItem2={type:"element",tagName:"li",properties:{id:clobberPrefix+"fn-"+safeId},children:state2.wrap(content2,!0)};state2.patch(definition2,listItem2),listItems.push(listItem2)}if(listItems.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:footnoteLabelTagName,properties:{...structuredClone$1(footnoteLabelProperties),id:"footnote-label"},children:[{type:"text",value:footnoteLabel}]},
{type:"text",value:`
`},{type:"element",tagName:"ol",properties:{},children:state2.wrap(listItems,!0)},{type:"text",value:`
`}]}}const own$2={}.hasOwnProperty,emptyOptions$2={};function createState(tree,options){const settings=options||emptyOptions$2,definitionById=new Map,footnoteById=new Map,footnoteCounts=new Map,handlers$1={...handlers,...settings.handlers},state2={all:all2,applyData,definitionById,footnoteById,footnoteCounts,footnoteOrder:[],handlers:handlers$1,one:one2,options:settings,patch,wrap};return visit(tree,function(node2){if(node2.type==="definition"||node2.type==="footnoteDefinition"){const map2=node2.
type==="definition"?definitionById:footnoteById,id2=String(node2.identifier).toUpperCase();map2.has(id2)||map2.set(id2,node2)}}),state2;function one2(node2,parent){const type2=node2.type,handle2=state2.handlers[type2];if(own$2.call(state2.handlers,type2)&&handle2)return handle2(state2,node2,parent);if(state2.options.passThrough&&state2.options.passThrough.includes(type2)){if("children"in node2){const{children,...shallow}=node2,result=structuredClone$1(shallow);return result.children=state2.all(node2),
result}return structuredClone$1(node2)}return(state2.options.unknownHandler||defaultUnknownHandler)(state2,node2,parent)}function all2(parent){const values=[];if("children"in parent){const nodes2=parent.children;let index2=-1;for(;++index2<nodes2.length;){const result=state2.one(nodes2[index2],parent);if(result){if(index2&&nodes2[index2-1].type==="break"&&(!Array.isArray(result)&&result.type==="text"&&(result.value=trimMarkdownSpaceStart(result.value)),!Array.isArray(result)&&result.type==="elem\
ent")){const head2=result.children[0];head2&&head2.type==="text"&&(head2.value=trimMarkdownSpaceStart(head2.value))}Array.isArray(result)?values.push(...result):values.push(result)}}}return values}}function patch(from,to){from.position&&(to.position=position(from))}function applyData(from,to){let result=to;if(from&&from.data){const hName=from.data.hName,hChildren=from.data.hChildren,hProperties=from.data.hProperties;if(typeof hName=="string")if(result.type==="element")result.tagName=hName;else{const children="\
children"in result?result.children:[result];result={type:"element",tagName:hName,properties:{},children}}result.type==="element"&&hProperties&&Object.assign(result.properties,structuredClone$1(hProperties)),"children"in result&&result.children&&hChildren!==null&&hChildren!==void 0&&(result.children=hChildren)}return result}function defaultUnknownHandler(state2,node2){const data=node2.data||{},result="value"in node2&&!(own$2.call(data,"hProperties")||own$2.call(data,"hChildren"))?{type:"text",value:node2.
value}:{type:"element",tagName:"div",properties:{},children:state2.all(node2)};return state2.patch(node2,result),state2.applyData(node2,result)}function wrap(nodes2,loose){const result=[];let index2=-1;for(loose&&result.push({type:"text",value:`
`});++index2<nodes2.length;)index2&&result.push({type:"text",value:`
`}),result.push(nodes2[index2]);return loose&&nodes2.length>0&&result.push({type:"text",value:`
`}),result}function trimMarkdownSpaceStart(value){let index2=0,code2=value.charCodeAt(index2);for(;code2===9||code2===32;)index2++,code2=value.charCodeAt(index2);return value.slice(index2)}function toHast(tree,options){const state2=createState(tree,options),node2=state2.one(tree,void 0),foot=footer(state2),result=Array.isArray(node2)?{type:"root",children:node2}:node2||{type:"root",children:[]};return foot&&result.children.push({type:"text",value:`
`},foot),result}function remarkRehype(destination,options){return destination&&"run"in destination?async function(tree,file){const hastTree=toHast(tree,{file,...options});await destination.run(hastTree,file)}:function(tree,file){return toHast(tree,{file,...destination||options})}}class Schema{constructor(property,normal,space2){this.normal=normal,this.property=property,space2&&(this.space=space2)}}Schema.prototype.normal={};Schema.prototype.property={};Schema.prototype.space=void 0;function merge(definitions2,space2){
const property={},normal={};for(const definition2 of definitions2)Object.assign(property,definition2.property),Object.assign(normal,definition2.normal);return new Schema(property,normal,space2)}function normalize(value){return value.toLowerCase()}class Info{constructor(property,attribute){this.attribute=attribute,this.property=property}}Info.prototype.attribute="";Info.prototype.booleanish=!1;Info.prototype.boolean=!1;Info.prototype.commaOrSpaceSeparated=!1;Info.prototype.commaSeparated=!1;Info.
prototype.defined=!1;Info.prototype.mustUseProperty=!1;Info.prototype.number=!1;Info.prototype.overloadedBoolean=!1;Info.prototype.property="";Info.prototype.spaceSeparated=!1;Info.prototype.space=void 0;let powers=0;const boolean=increment(),booleanish=increment(),overloadedBoolean=increment(),number=increment(),spaceSeparated=increment(),commaSeparated=increment(),commaOrSpaceSeparated=increment();function increment(){return 2**++powers}const types=Object.freeze(Object.defineProperty({__proto__:null,
boolean,booleanish,commaOrSpaceSeparated,commaSeparated,number,overloadedBoolean,spaceSeparated},Symbol.toStringTag,{value:"Module"})),checks=Object.keys(types);class DefinedInfo extends Info{constructor(property,attribute,mask,space2){let index2=-1;if(super(property,attribute),mark(this,"space",space2),typeof mask=="number")for(;++index2<checks.length;){const check=checks[index2];mark(this,checks[index2],(mask&types[check])===types[check])}}}DefinedInfo.prototype.defined=!0;function mark(values,key2,value){
value&&(values[key2]=value)}function create(definition2){const properties2={},normals={};for(const[property,value]of Object.entries(definition2.properties)){const info2=new DefinedInfo(property,definition2.transform(definition2.attributes||{},property),value,definition2.space);definition2.mustUseProperty&&definition2.mustUseProperty.includes(property)&&(info2.mustUseProperty=!0),properties2[property]=info2,normals[normalize(property)]=property,normals[normalize(info2.attribute)]=property}return new Schema(
properties2,normals,definition2.space)}const aria=create({properties:{ariaActiveDescendant:null,ariaAtomic:booleanish,ariaAutoComplete:null,ariaBusy:booleanish,ariaChecked:booleanish,ariaColCount:number,ariaColIndex:number,ariaColSpan:number,ariaControls:spaceSeparated,ariaCurrent:null,ariaDescribedBy:spaceSeparated,ariaDetails:null,ariaDisabled:booleanish,ariaDropEffect:spaceSeparated,ariaErrorMessage:null,ariaExpanded:booleanish,ariaFlowTo:spaceSeparated,ariaGrabbed:booleanish,ariaHasPopup:null,
ariaHidden:booleanish,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:spaceSeparated,ariaLevel:number,ariaLive:null,ariaModal:booleanish,ariaMultiLine:booleanish,ariaMultiSelectable:booleanish,ariaOrientation:null,ariaOwns:spaceSeparated,ariaPlaceholder:null,ariaPosInSet:number,ariaPressed:booleanish,ariaReadOnly:booleanish,ariaRelevant:null,ariaRequired:booleanish,ariaRoleDescription:spaceSeparated,ariaRowCount:number,ariaRowIndex:number,ariaRowSpan:number,ariaSelected:booleanish,
ariaSetSize:number,ariaSort:null,ariaValueMax:number,ariaValueMin:number,ariaValueNow:number,ariaValueText:null,role:null},transform(_,property){return property==="role"?property:"aria-"+property.slice(4).toLowerCase()}});function caseSensitiveTransform(attributes,attribute){return attribute in attributes?attributes[attribute]:attribute}function caseInsensitiveTransform(attributes,property){return caseSensitiveTransform(attributes,property.toLowerCase())}const html$3=create({attributes:{acceptcharset:"\
accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:commaSeparated,acceptCharset:spaceSeparated,accessKey:spaceSeparated,action:null,allow:null,allowFullScreen:boolean,allowPaymentRequest:boolean,allowUserMedia:boolean,alt:null,as:null,async:boolean,autoCapitalize:null,autoComplete:spaceSeparated,autoFocus:boolean,autoPlay:boolean,blocking:spaceSeparated,capture:null,charSet:null,checked:boolean,
cite:null,className:spaceSeparated,cols:number,colSpan:null,content:null,contentEditable:booleanish,controls:boolean,controlsList:spaceSeparated,coords:number|commaSeparated,crossOrigin:null,data:null,dateTime:null,decoding:null,default:boolean,defer:boolean,dir:null,dirName:null,disabled:boolean,download:overloadedBoolean,draggable:booleanish,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:boolean,formTarget:null,headers:spaceSeparated,
height:number,hidden:overloadedBoolean,high:number,href:null,hrefLang:null,htmlFor:spaceSeparated,httpEquiv:spaceSeparated,id:null,imageSizes:null,imageSrcSet:null,inert:boolean,inputMode:null,integrity:null,is:null,isMap:boolean,itemId:null,itemProp:spaceSeparated,itemRef:spaceSeparated,itemScope:boolean,itemType:spaceSeparated,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:boolean,low:number,manifest:null,max:null,maxLength:number,media:null,method:null,min:null,minLength:number,
multiple:boolean,muted:boolean,name:null,nonce:null,noModule:boolean,noValidate:boolean,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,
onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,
onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,
open:boolean,optimum:number,pattern:null,ping:spaceSeparated,placeholder:null,playsInline:boolean,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:boolean,referrerPolicy:null,rel:spaceSeparated,required:boolean,reversed:boolean,rows:number,rowSpan:number,sandbox:spaceSeparated,scope:null,scoped:boolean,seamless:boolean,selected:boolean,shadowRootClonable:boolean,shadowRootDelegatesFocus:boolean,shadowRootMode:null,shape:null,size:number,sizes:null,slot:null,
span:number,spellCheck:booleanish,src:null,srcDoc:null,srcLang:null,srcSet:null,start:number,step:null,style:null,tabIndex:number,target:null,title:null,translate:null,type:null,typeMustMatch:boolean,useMap:null,value:booleanish,width:number,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:spaceSeparated,axis:null,background:null,bgColor:null,border:number,borderColor:null,bottomMargin:number,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,
codeBase:null,codeType:null,color:null,compact:boolean,declare:boolean,event:null,face:null,frame:null,frameBorder:null,hSpace:number,leftMargin:number,link:null,longDesc:null,lowSrc:null,marginHeight:number,marginWidth:number,noResize:boolean,noHref:boolean,noShade:boolean,noWrap:boolean,object:null,profile:null,prompt:null,rev:null,rightMargin:number,rules:null,scheme:null,scrolling:booleanish,standby:null,summary:null,text:null,topMargin:number,valueType:null,version:null,vAlign:null,vLink:null,
vSpace:number,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:boolean,disableRemotePlayback:boolean,prefix:null,property:null,results:number,security:null,unselectable:null},space:"html",transform:caseInsensitiveTransform}),svg$1=create({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"\
color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"\
font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"\
nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"o\
ndrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"\
onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"\
onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"\
paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"str\
oke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"\
vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:commaOrSpaceSeparated,accentHeight:number,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:number,amplitude:number,arabicForm:null,ascent:number,attributeName:null,attributeType:null,azimuth:number,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,
bbox:null,begin:null,bias:number,by:null,calcMode:null,capHeight:number,className:spaceSeparated,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:number,diffuseConstant:number,direction:null,display:null,dur:null,divisor:number,dominantBaseline:null,
download:boolean,dx:null,dy:null,edgeMode:null,editable:null,elevation:number,enableBackground:null,end:null,event:null,exponent:number,externalResourcesRequired:null,fill:null,fillOpacity:number,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:commaSeparated,
g2:commaSeparated,glyphName:commaSeparated,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:number,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:number,horizOriginX:number,horizOriginY:number,id:null,ideographic:number,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:number,k:number,k1:number,k2:number,k3:number,k4:number,kernelMatrix:commaOrSpaceSeparated,
kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:number,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:number,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,
navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,
onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,
onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:number,overlineThickness:number,
paintOrder:null,panose1:null,path:null,pathLength:number,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:spaceSeparated,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:number,pointsAtY:number,pointsAtZ:number,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:commaOrSpaceSeparated,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:commaOrSpaceSeparated,rev:commaOrSpaceSeparated,renderingIntent:null,
repeatCount:null,repeatDur:null,requiredExtensions:commaOrSpaceSeparated,requiredFeatures:commaOrSpaceSeparated,requiredFonts:commaOrSpaceSeparated,requiredFormats:commaOrSpaceSeparated,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:number,specularExponent:number,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,
stopOpacity:null,strikethroughPosition:number,strikethroughThickness:number,string:null,stroke:null,strokeDashArray:commaOrSpaceSeparated,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:number,strokeOpacity:number,strokeWidth:null,style:null,surfaceScale:number,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:commaOrSpaceSeparated,tabIndex:number,tableValues:null,target:null,targetX:number,targetY:number,
textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:commaOrSpaceSeparated,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:number,underlineThickness:number,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:number,values:null,vAlphabetic:number,vMathematical:number,vectorEffect:null,vHanging:number,vIdeographic:number,version:null,vertAdvY:number,vertOriginX:number,vertOriginY:number,
viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:number,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:caseSensitiveTransform}),xlink=create({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(_,property){return"xlink:"+property.slice(5).toLowerCase()}}),
xmlns=create({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:caseInsensitiveTransform}),xml=create({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(_,property){return"xml:"+property.slice(3).toLowerCase()}}),cap=/[A-Z]/g,dash=/-[a-z]/g,valid=/^data[-\w.:]+$/i;function find(schema,value){const normal=normalize(value);let property=value,Type=Info;if(normal in schema.normal)return schema.property[schema.normal[normal]];
if(normal.length>4&&normal.slice(0,4)==="data"&&valid.test(value)){if(value.charAt(4)==="-"){const rest=value.slice(5).replace(dash,camelcase);property="data"+rest.charAt(0).toUpperCase()+rest.slice(1)}else{const rest=value.slice(4);if(!dash.test(rest)){let dashes=rest.replace(cap,kebab);dashes.charAt(0)!=="-"&&(dashes="-"+dashes),value="data"+dashes}}Type=DefinedInfo}return new Type(property,value)}function kebab($0){return"-"+$0.toLowerCase()}function camelcase($0){return $0.charAt(1).toUpperCase()}
const html$2=merge([aria,html$3,xlink,xmlns,xml],"html"),svg=merge([aria,svg$1,xlink,xmlns,xml],"svg");function parse$1(value){const tokens=[],input=String(value||"");let index2=input.indexOf(","),start2=0,end=!1;for(;!end;){index2===-1&&(index2=input.length,end=!0);const token2=input.slice(start2,index2).trim();(token2||!end)&&tokens.push(token2),start2=index2+1,index2=input.indexOf(",",start2)}return tokens}function stringify$1(values,options){const settings=options||{};return(values[values.length-
1]===""?[...values,""]:values).join((settings.padRight?" ":"")+","+(settings.padLeft===!1?"":" ")).trim()}const search=/[#.]/g;function parseSelector(selector,defaultTagName){const value=selector||"",props={};let start2=0,previous2,tagName;for(;start2<value.length;){search.lastIndex=start2;const match=search.exec(value),subvalue=value.slice(start2,match?match.index:value.length);subvalue&&(previous2?previous2==="#"?props.id=subvalue:Array.isArray(props.className)?props.className.push(subvalue):props.
className=[subvalue]:tagName=subvalue,start2+=subvalue.length),match&&(previous2=match[0],start2++)}return{type:"element",tagName:tagName||defaultTagName||"div",properties:props,children:[]}}function parse(value){const input=String(value||"").trim();return input?input.split(/[ \t\n\r\f]+/g):[]}function stringify(values){return values.join(" ").trim()}function createH(schema,defaultTagName,caseSensitive){const adjust=caseSensitive?createAdjustMap(caseSensitive):void 0;function h2(selector,properties2,...children){
let node2;if(selector==null){node2={type:"root",children:[]};const child2=properties2;children.unshift(child2)}else{node2=parseSelector(selector,defaultTagName);const lower=node2.tagName.toLowerCase(),adjusted=adjust?adjust.get(lower):void 0;if(node2.tagName=adjusted||lower,isChild(properties2))children.unshift(properties2);else for(const[key2,value]of Object.entries(properties2))addProperty(schema,node2.properties,key2,value)}for(const child2 of children)addChild(node2.children,child2);return node2.
type==="element"&&node2.tagName==="template"&&(node2.content={type:"root",children:node2.children},node2.children=[]),node2}return h2}function isChild(value){if(value===null||typeof value!="object"||Array.isArray(value))return!0;if(typeof value.type!="string")return!1;const record2=value,keys2=Object.keys(value);for(const key2 of keys2){const value2=record2[key2];if(value2&&typeof value2=="object"){if(!Array.isArray(value2))return!0;const list2=value2;for(const item of list2)if(typeof item!="num\
ber"&&typeof item!="string")return!0}}return!!("children"in value&&Array.isArray(value.children))}function addProperty(schema,properties2,key2,value){const info2=find(schema,key2);let result;if(value!=null){if(typeof value=="number"){if(Number.isNaN(value))return;result=value}else typeof value=="boolean"?result=value:typeof value=="string"?info2.spaceSeparated?result=parse(value):info2.commaSeparated?result=parse$1(value):info2.commaOrSpaceSeparated?result=parse(parse$1(value).join(" ")):result=
parsePrimitive(info2,info2.property,value):Array.isArray(value)?result=[...value]:result=info2.property==="style"?style(value):String(value);if(Array.isArray(result)){const finalResult=[];for(const item of result)finalResult.push(parsePrimitive(info2,info2.property,item));result=finalResult}info2.property==="className"&&Array.isArray(properties2.className)&&(result=properties2.className.concat(result)),properties2[info2.property]=result}}function addChild(nodes2,value){if(value!=null)if(typeof value==
"number"||typeof value=="string")nodes2.push({type:"text",value:String(value)});else if(Array.isArray(value))for(const child2 of value)addChild(nodes2,child2);else if(typeof value=="object"&&"type"in value)value.type==="root"?addChild(nodes2,value.children):nodes2.push(value);else throw new Error("Expected node, nodes, or string, got `"+value+"`")}function parsePrimitive(info2,name,value){if(typeof value=="string"){if(info2.number&&value&&!Number.isNaN(Number(value)))return Number(value);if((info2.
boolean||info2.overloadedBoolean)&&(value===""||normalize(value)===normalize(name)))return!0}return value}function style(styles2){const result=[];for(const[key2,value]of Object.entries(styles2))result.push([key2,value].join(": "));return result.join("; ")}function createAdjustMap(values){const result=new Map;for(const value of values)result.set(value.toLowerCase(),value);return result}const svgCaseSensitiveTagNames=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateT\
ransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"],h=createH(html$2,"div"),s=createH(
svg,"g",svgCaseSensitiveTagNames),webNamespaces={html:"http://www.w3.org/1999/xhtml",svg:"http://www.w3.org/2000/svg"};function fromDom(tree,options){return transform(tree,{})||{type:"root",children:[]}}function transform(node2,options){const transformed=one$1(node2,options);return transformed&&options.afterTransform&&options.afterTransform(node2,transformed),transformed}function one$1(node2,options){switch(node2.nodeType){case 1:return element$1(node2,options);case 3:return text$1(node2);case 8:
return comment$1(node2);case 9:return root$V(node2,options);case 10:return doctype$1();case 11:return root$V(node2,options);default:return}}function root$V(node2,options){return{type:"root",children:all$1(node2,options)}}function doctype$1(){return{type:"doctype"}}function text$1(node2){return{type:"text",value:node2.nodeValue||""}}function comment$1(node2){return{type:"comment",value:node2.nodeValue||""}}function element$1(node2,options){const space2=node2.namespaceURI,x=space2===webNamespaces.
svg?s:h,tagName=space2===webNamespaces.html?node2.tagName.toLowerCase():node2.tagName,content2=space2===webNamespaces.html&&tagName==="template"?node2.content:node2,attributes=node2.getAttributeNames(),properties2={};let index2=-1;for(;++index2<attributes.length;)properties2[attributes[index2]]=node2.getAttribute(attributes[index2])||"";return x(tagName,properties2,all$1(content2,options))}function all$1(node2,options){const nodes2=node2.childNodes,children=[];let index2=-1;for(;++index2<nodes2.
length;){const child2=transform(nodes2[index2],options);child2!==void 0&&children.push(child2)}return children}new DOMParser;function fromHtmlIsomorphic(value,options){const node2=parseFragment(value);return fromDom(node2)}function parseFragment(value){const template=document.createElement("template");return template.innerHTML=value,template.content}const emptyOptions$1={},emptyClasses=[];function rehypeKatex(options){const settings=options||emptyOptions$1;return function(tree,file){visitParents(
tree,"element",function(element2,parents){const classes=Array.isArray(element2.properties.className)?element2.properties.className:emptyClasses,languageMath=classes.includes("language-math"),mathDisplay=classes.includes("math-display"),mathInline=classes.includes("math-inline");let displayMode=mathDisplay;if(!languageMath&&!mathDisplay&&!mathInline)return;let parent=parents[parents.length-1],scope2=element2;if(element2.tagName==="code"&&languageMath&&parent&&parent.type==="element"&&parent.tagName===
"pre"&&(scope2=parent,parent=parents[parents.length-2],displayMode=!0),!parent)return;const value=toText(scope2,{whitespace:"pre"});let result;try{result=katex.renderToString(value,{...settings,displayMode,throwOnError:!0})}catch(error2){const cause=error2,ruleId=cause.name.toLowerCase();file.message("Could not render math with KaTeX",{ancestors:[...parents,element2],cause,place:element2.position,ruleId,source:"rehype-katex"});try{result=katex.renderToString(value,{...settings,displayMode,strict:"\
ignore",throwOnError:!1})}catch{result=[{type:"element",tagName:"span",properties:{className:["katex-error"],style:"color:"+(settings.errorColor||"#cc0000"),title:String(error2)},children:[{type:"text",value}]}]}}typeof result=="string"&&(result=fromHtmlIsomorphic(result).children);const index2=parent.children.indexOf(scope2);return parent.children.splice(index2,1,...result),SKIP})}}const htmlVoidElements=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img",
"input","keygen","link","meta","param","source","track","wbr"],defaultSubsetRegex=/["&'<>`]/g,surrogatePairsRegex=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,controlCharactersRegex=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,regexEscapeRegex=/[|\\{}()[\]^$+*?.]/g,subsetToRegexCache=new WeakMap;function core(value,options){if(value=value.replace(options.subset?charactersToExpressionCached(options.subset):defaultSubsetRegex,basic2),options.subset||options.escapeOnly)return value;return value.
replace(surrogatePairsRegex,surrogate).replace(controlCharactersRegex,basic2);function surrogate(pair,index2,all2){return options.format((pair.charCodeAt(0)-55296)*1024+pair.charCodeAt(1)-56320+65536,all2.charCodeAt(index2+2),options)}function basic2(character,index2,all2){return options.format(character.charCodeAt(0),all2.charCodeAt(index2+1),options)}}function charactersToExpressionCached(subset){let cached2=subsetToRegexCache.get(subset);return cached2||(cached2=charactersToExpression(subset),
subsetToRegexCache.set(subset,cached2)),cached2}function charactersToExpression(subset){const groups=[];let index2=-1;for(;++index2<subset.length;)groups.push(subset[index2].replace(regexEscapeRegex,"\\$&"));return new RegExp("(?:"+groups.join("|")+")","g")}const hexadecimalRegex=/[\dA-Fa-f]/;function toHexadecimal(code2,next2,omit2){const value="&#x"+code2.toString(16).toUpperCase();return omit2&&next2&&!hexadecimalRegex.test(String.fromCharCode(next2))?value:value+";"}const decimalRegex=/\d/;function toDecimal(code2,next2,omit2){
const value="&#"+String(code2);return omit2&&next2&&!decimalRegex.test(String.fromCharCode(next2))?value:value+";"}const characterEntitiesLegacy=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","aum\
l","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],characterEntitiesHtml4={
nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"­",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"\
Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",
ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"\
σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",
prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"\
˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"‌",zwj:"‍",lrm:"‎",rlm:"‏",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},dangerous=["cent","copy","divide","gt","lt","not","para","times"],own$1={}.hasOwnProperty,characters={};let key;for(key in characterEntitiesHtml4)own$1.call(characterEntitiesHtml4,key)&&(characters[characterEntitiesHtml4[key]]=key);const notAlphanumericRegex=/[^\dA-Za-z]/;
function toNamed(code2,next2,omit2,attribute){const character=String.fromCharCode(code2);if(own$1.call(characters,character)){const name=characters[character],value="&"+name;return omit2&&characterEntitiesLegacy.includes(name)&&!dangerous.includes(name)&&(!attribute||next2&&next2!==61&&notAlphanumericRegex.test(String.fromCharCode(next2)))?value:value+";"}return""}function formatSmart(code2,next2,options){let numeric=toHexadecimal(code2,next2,options.omitOptionalSemicolons),named;if((options.useNamedReferences||
options.useShortestReferences)&&(named=toNamed(code2,next2,options.omitOptionalSemicolons,options.attribute)),(options.useShortestReferences||!named)&&options.useShortestReferences){const decimal=toDecimal(code2,next2,options.omitOptionalSemicolons);decimal.length<numeric.length&&(numeric=decimal)}return named&&(!options.useShortestReferences||named.length<numeric.length)?named:numeric}function stringifyEntities(value,options){return core(value,Object.assign({format:formatSmart},options))}const htmlCommentRegex=/^>|^->|<!--|-->|--!>|<!-$/g,
bogusCommentEntitySubset=[">"],commentEntitySubset=["<",">"];function comment(node2,_12,_22,state2){return state2.settings.bogusComments?"<?"+stringifyEntities(node2.value,Object.assign({},state2.settings.characterReferences,{subset:bogusCommentEntitySubset}))+">":"<!--"+node2.value.replace(htmlCommentRegex,encode2)+"-->";function encode2($0){return stringifyEntities($0,Object.assign({},state2.settings.characterReferences,{subset:commentEntitySubset}))}}function doctype(_12,_22,_32,state2){return"\
<!"+(state2.settings.upperDoctype?"DOCTYPE":"doctype")+(state2.settings.tightDoctype?"":" ")+"html>"}const re=/[ \t\n\f\r]/g;function whitespace(thing){return typeof thing=="object"?thing.type==="text"?empty(thing.value):!1:empty(thing)}function empty(value){return value.replace(re,"")===""}const siblingAfter=siblings(1),siblingBefore=siblings(-1),emptyChildren$1=[];function siblings(increment2){return sibling2;function sibling2(parent,index2,includeWhitespace){const siblings2=parent?parent.children:
emptyChildren$1;let offset2=(index2||0)+increment2,next2=siblings2[offset2];if(!includeWhitespace)for(;next2&&whitespace(next2);)offset2+=increment2,next2=siblings2[offset2];return next2}}const own={}.hasOwnProperty;function omission(handlers2){return omit2;function omit2(node2,index2,parent){return own.call(handlers2,node2.tagName)&&handlers2[node2.tagName](node2,index2,parent)}}const closing=omission({body:body$1,caption:headOrColgroupOrCaption,colgroup:headOrColgroupOrCaption,dd,dt,head:headOrColgroupOrCaption,
html:html$1,li,optgroup,option,p,rp:rubyElement,rt:rubyElement,tbody:tbody$1,td:cells,tfoot,th:cells,thead,tr});function headOrColgroupOrCaption(_,index2,parent){const next2=siblingAfter(parent,index2,!0);return!next2||next2.type!=="comment"&&!(next2.type==="text"&&whitespace(next2.value.charAt(0)))}function html$1(_,index2,parent){const next2=siblingAfter(parent,index2);return!next2||next2.type!=="comment"}function body$1(_,index2,parent){const next2=siblingAfter(parent,index2);return!next2||next2.
type!=="comment"}function p(_,index2,parent){const next2=siblingAfter(parent,index2);return next2?next2.type==="element"&&(next2.tagName==="address"||next2.tagName==="article"||next2.tagName==="aside"||next2.tagName==="blockquote"||next2.tagName==="details"||next2.tagName==="div"||next2.tagName==="dl"||next2.tagName==="fieldset"||next2.tagName==="figcaption"||next2.tagName==="figure"||next2.tagName==="footer"||next2.tagName==="form"||next2.tagName==="h1"||next2.tagName==="h2"||next2.tagName==="h\
3"||next2.tagName==="h4"||next2.tagName==="h5"||next2.tagName==="h6"||next2.tagName==="header"||next2.tagName==="hgroup"||next2.tagName==="hr"||next2.tagName==="main"||next2.tagName==="menu"||next2.tagName==="nav"||next2.tagName==="ol"||next2.tagName==="p"||next2.tagName==="pre"||next2.tagName==="section"||next2.tagName==="table"||next2.tagName==="ul"):!parent||!(parent.type==="element"&&(parent.tagName==="a"||parent.tagName==="audio"||parent.tagName==="del"||parent.tagName==="ins"||parent.tagName===
"map"||parent.tagName==="noscript"||parent.tagName==="video"))}function li(_,index2,parent){const next2=siblingAfter(parent,index2);return!next2||next2.type==="element"&&next2.tagName==="li"}function dt(_,index2,parent){const next2=siblingAfter(parent,index2);return!!(next2&&next2.type==="element"&&(next2.tagName==="dt"||next2.tagName==="dd"))}function dd(_,index2,parent){const next2=siblingAfter(parent,index2);return!next2||next2.type==="element"&&(next2.tagName==="dt"||next2.tagName==="dd")}function rubyElement(_,index2,parent){
const next2=siblingAfter(parent,index2);return!next2||next2.type==="element"&&(next2.tagName==="rp"||next2.tagName==="rt")}function optgroup(_,index2,parent){const next2=siblingAfter(parent,index2);return!next2||next2.type==="element"&&next2.tagName==="optgroup"}function option(_,index2,parent){const next2=siblingAfter(parent,index2);return!next2||next2.type==="element"&&(next2.tagName==="option"||next2.tagName==="optgroup")}function thead(_,index2,parent){const next2=siblingAfter(parent,index2);
return!!(next2&&next2.type==="element"&&(next2.tagName==="tbody"||next2.tagName==="tfoot"))}function tbody$1(_,index2,parent){const next2=siblingAfter(parent,index2);return!next2||next2.type==="element"&&(next2.tagName==="tbody"||next2.tagName==="tfoot")}function tfoot(_,index2,parent){return!siblingAfter(parent,index2)}function tr(_,index2,parent){const next2=siblingAfter(parent,index2);return!next2||next2.type==="element"&&next2.tagName==="tr"}function cells(_,index2,parent){const next2=siblingAfter(
parent,index2);return!next2||next2.type==="element"&&(next2.tagName==="td"||next2.tagName==="th")}const opening=omission({body,colgroup,head,html,tbody});function html(node2){const head2=siblingAfter(node2,-1);return!head2||head2.type!=="comment"}function head(node2){const seen2=new Set;for(const child3 of node2.children)if(child3.type==="element"&&(child3.tagName==="base"||child3.tagName==="title")){if(seen2.has(child3.tagName))return!1;seen2.add(child3.tagName)}const child2=node2.children[0];return!child2||
child2.type==="element"}function body(node2){const head2=siblingAfter(node2,-1,!0);return!head2||head2.type!=="comment"&&!(head2.type==="text"&&whitespace(head2.value.charAt(0)))&&!(head2.type==="element"&&(head2.tagName==="meta"||head2.tagName==="link"||head2.tagName==="script"||head2.tagName==="style"||head2.tagName==="template"))}function colgroup(node2,index2,parent){const previous2=siblingBefore(parent,index2),head2=siblingAfter(node2,-1,!0);return parent&&previous2&&previous2.type==="eleme\
nt"&&previous2.tagName==="colgroup"&&closing(previous2,parent.children.indexOf(previous2),parent)?!1:!!(head2&&head2.type==="element"&&head2.tagName==="col")}function tbody(node2,index2,parent){const previous2=siblingBefore(parent,index2),head2=siblingAfter(node2,-1);return parent&&previous2&&previous2.type==="element"&&(previous2.tagName==="thead"||previous2.tagName==="tbody")&&closing(previous2,parent.children.indexOf(previous2),parent)?!1:!!(head2&&head2.type==="element"&&head2.tagName==="tr")}
const constants={name:[[`	
\f\r &/=>`.split(""),`	
\f\r "&'/=>\``.split("")],[`\0	
\f\r "&'/<=>`.split(""),`\0	
\f\r "&'/<=>\``.split("")]],unquoted:[[`	
\f\r &>`.split(""),`\0	
\f\r "&'<=>\``.split("")],[`\0	
\f\r "&'<=>\``.split(""),`\0	
\f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function element(node2,index2,parent,state2){const schema=state2.schema,omit2=schema.space==="svg"?!1:state2.settings.omitOptionalTags;let selfClosing=schema.space==="svg"?state2.settings.closeEmptyElements:state2.settings.voids.includes(node2.tagName.toLowerCase());const parts=[];let last;schema.space===
"html"&&node2.tagName==="svg"&&(state2.schema=svg);const attributes=serializeAttributes(state2,node2.properties),content2=state2.all(schema.space==="html"&&node2.tagName==="template"?node2.content:node2);return state2.schema=schema,content2&&(selfClosing=!1),(attributes||!omit2||!opening(node2,index2,parent))&&(parts.push("<",node2.tagName,attributes?" "+attributes:""),selfClosing&&(schema.space==="svg"||state2.settings.closeSelfClosing)&&(last=attributes.charAt(attributes.length-1),(!state2.settings.
tightSelfClosing||last==="/"||last&&last!=='"'&&last!=="'")&&parts.push(" "),parts.push("/")),parts.push(">")),parts.push(content2),!selfClosing&&(!omit2||!closing(node2,index2,parent))&&parts.push("</"+node2.tagName+">"),parts.join("")}function serializeAttributes(state2,properties2){const values=[];let index2=-1,key2;if(properties2){for(key2 in properties2)if(properties2[key2]!==null&&properties2[key2]!==void 0){const value=serializeAttribute(state2,key2,properties2[key2]);value&&values.push(value)}}
for(;++index2<values.length;){const last=state2.settings.tightAttributes?values[index2].charAt(values[index2].length-1):void 0;index2!==values.length-1&&last!=='"'&&last!=="'"&&(values[index2]+=" ")}return values.join("")}function serializeAttribute(state2,key2,value){const info2=find(state2.schema,key2),x=state2.settings.allowParseErrors&&state2.schema.space==="html"?0:1,y=state2.settings.allowDangerousCharacters?0:1;let quote=state2.quote,result;if(info2.overloadedBoolean&&(value===info2.attribute||
value==="")?value=!0:(info2.boolean||info2.overloadedBoolean)&&(typeof value!="string"||value===info2.attribute||value==="")&&(value=!!value),value==null||value===!1||typeof value=="number"&&Number.isNaN(value))return"";const name=stringifyEntities(info2.attribute,Object.assign({},state2.settings.characterReferences,{subset:constants.name[x][y]}));return value===!0||(value=Array.isArray(value)?(info2.commaSeparated?stringify$1:stringify)(value,{padLeft:!state2.settings.tightCommaSeparatedLists}):
String(value),state2.settings.collapseEmptyAttributes&&!value)?name:(state2.settings.preferUnquoted&&(result=stringifyEntities(value,Object.assign({},state2.settings.characterReferences,{attribute:!0,subset:constants.unquoted[x][y]}))),result!==value&&(state2.settings.quoteSmart&&ccount(value,quote)>ccount(value,state2.alternative)&&(quote=state2.alternative),result=quote+stringifyEntities(value,Object.assign({},state2.settings.characterReferences,{subset:(quote==="'"?constants.single:constants.
double)[x][y],attribute:!0}))+quote),name+(result&&"="+result))}const textEntitySubset=["<","&"];function text(node2,_,parent,state2){return parent&&parent.type==="element"&&(parent.tagName==="script"||parent.tagName==="style")?node2.value:stringifyEntities(node2.value,Object.assign({},state2.settings.characterReferences,{subset:textEntitySubset}))}function raw(node2,index2,parent,state2){return state2.settings.allowDangerousHtml?node2.value:text(node2,index2,parent,state2)}function root$U(node2,_12,_22,state2){
return state2.all(node2)}const handle=zwitch("type",{invalid,unknown,handlers:{comment,doctype,element,raw,root:root$U,text}});function invalid(node2){throw new Error("Expected node, not `"+node2+"`")}function unknown(node_){const node2=node_;throw new Error("Cannot compile unknown node `"+node2.type+"`")}const emptyOptions={},emptyCharacterReferences={},emptyChildren=[];function toHtml(tree,options){const options_=options||emptyOptions,quote=options_.quote||'"',alternative=quote==='"'?"'":'"';if(quote!==
'"'&&quote!=="'")throw new Error("Invalid quote `"+quote+"`, expected `'` or `\"`");return{one,all,settings:{omitOptionalTags:options_.omitOptionalTags||!1,allowParseErrors:options_.allowParseErrors||!1,allowDangerousCharacters:options_.allowDangerousCharacters||!1,quoteSmart:options_.quoteSmart||!1,preferUnquoted:options_.preferUnquoted||!1,tightAttributes:options_.tightAttributes||!1,upperDoctype:options_.upperDoctype||!1,tightDoctype:options_.tightDoctype||!1,bogusComments:options_.bogusComments||
!1,tightCommaSeparatedLists:options_.tightCommaSeparatedLists||!1,tightSelfClosing:options_.tightSelfClosing||!1,collapseEmptyAttributes:options_.collapseEmptyAttributes||!1,allowDangerousHtml:options_.allowDangerousHtml||!1,voids:options_.voids||htmlVoidElements,characterReferences:options_.characterReferences||emptyCharacterReferences,closeSelfClosing:options_.closeSelfClosing||!1,closeEmptyElements:options_.closeEmptyElements||!1},schema:options_.space==="svg"?svg:html$2,quote,alternative}.one(
Array.isArray(tree)?{type:"root",children:tree}:tree,void 0,void 0)}function one(node2,index2,parent){return handle(node2,index2,parent,this)}function all(parent){const results=[],children=parent&&parent.children||emptyChildren;let index2=-1;for(;++index2<children.length;)results[index2]=this.one(children[index2],index2,parent);return results.join("")}function rehypeStringify(options){const self2=this,settings={...self2.data("settings"),...options};self2.compiler=compiler2;function compiler2(tree){
return toHtml(tree,settings)}}function expandBrTags(value){const matches2=[...value.matchAll(BR_PATTERN)];if(!matches2.length)return[{type:"text",value}];const result=[];let cursor=0;for(const m of matches2)m.index>cursor&&result.push({type:"text",value:value.slice(cursor,m.index)}),result.push({type:"element",tagName:"br",properties:{},children:[]}),cursor=m.index+m[0].length;return cursor<value.length&&result.push({type:"text",value:value.slice(cursor)}),result}function parseList(value){const match=value.
trim().match(LIST_PATTERN);if(!match)return null;const body2=match[1],items2=[];let cursor=0;for(const liMatch of body2.matchAll(LI_PATTERN)){if(body2.slice(cursor,liMatch.index).trim())return null;items2.push({type:"element",tagName:"li",properties:{},children:expandBrTags(liMatch[1]??"")}),cursor=liMatch.index+liMatch[0].length}return!items2.length||body2.slice(cursor).trim()?null:{type:"element",tagName:"ul",properties:{},children:items2}}function processCell(cell2){visitParents(cell2,"text",
(textNode,ancestors)=>{const parent=ancestors[ancestors.length-1];if(!parent||parent.type!=="element")return;const siblings2=parent.children,startIndex=siblings2.indexOf(textNode);if(startIndex===-1)return;let combined="",endIndex=startIndex;for(let i=startIndex;i<siblings2.length;i++){const sib=siblings2[i];if(sib.type==="text")combined+=sib.value,endIndex=i;else if(sib.type==="element"&&sib.tagName==="br")combined+=`
`,endIndex=i;else break}const list2=parseList(combined);if(list2){siblings2.splice(startIndex,endIndex-startIndex+1,list2);return}const expanded=expandBrTags(textNode.value);(expanded.length!==1||expanded[0]!==textNode)&&siblings2.splice(startIndex,1,...expanded)})}const rehypeRestoreTableHtml=()=>tree=>{visit(tree,"element",node2=>{(node2.tagName==="td"||node2.tagName==="th")&&processCell(node2)})},rehypeEnhanceLinks=()=>tree=>{visit(tree,"element",node2=>{if(node2.tagName!=="a")return;const props=node2.
properties??{};props.href&&(props.target="_blank",props.rel="noopener noreferrer",node2.properties=props)})},COPY_ICON_SVG='<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-copy-icon lucide-copy"><rect width="14" height="14" x="8" y="8" rx="2" ry="2"/><path d="M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2"/></svg>',PREVIEW_ICON_SVG='<s\
vg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-eye lucide-eye-icon"><path d="M2.062 12.345a1 1 0 0 1 0-.69C3.5 7.73 7.36 5 12 5s8.5 2.73 9.938 6.655a1 1 0 0 1 0 .69C20.5 16.27 16.64 19 12 19s-8.5-2.73-9.938-6.655"/><circle cx="12" cy="12" r="3"/></svg>';function createIconElement(svg2){return{type:"element",tagName:"span",properties:{},children:[
{type:"raw",value:svg2}]}}function createButton(className,title2,iconSvg,codeId){return{type:"element",tagName:"button",properties:{className:[className],"data-code-id":codeId,title:title2,type:"button"},children:[createIconElement(iconSvg)]}}function createCopyButton(codeId){return createButton(COPY_CODE_BTN_CLASS,"Copy code",COPY_ICON_SVG,codeId)}function createPreviewButton(codeId){return createButton(PREVIEW_CODE_BTN_CLASS,"Preview code",PREVIEW_ICON_SVG,codeId)}function createHeader(language2,codeId){
const actions=[createCopyButton(codeId)];return language2.toLowerCase()==="html"&&actions.push(createPreviewButton(codeId)),{type:"element",tagName:"div",properties:{className:[CODE_BLOCK_HEADER_CLASS]},children:[{type:"element",tagName:"span",properties:{className:[CODE_LANGUAGE_CLASS]},children:[{type:"text",value:language2}]},{type:"element",tagName:"div",properties:{className:[CODE_BLOCK_ACTIONS_CLASS]},children:actions}]}}function createScrollContainer(preElement){return{type:"element",tagName:"\
div",properties:{className:[CODE_BLOCK_SCROLL_CONTAINER_CLASS]},children:[preElement]}}function createWrapper(header,preElement){return{type:"element",tagName:"div",properties:{className:[CODE_BLOCK_WRAPPER_CLASS,RELATIVE_CLASS]},children:[header,createScrollContainer(preElement)]}}function extractLanguage(codeElement){const className=codeElement.properties?.className;if(!Array.isArray(className))return"text";for(const cls of className)if(typeof cls=="string"&&cls.startsWith("language-"))return cls.
replace("language-","");return"text"}function generateCodeId(){return typeof window<"u"?`code-${window.idxCodeBlock=(window.idxCodeBlock??0)+1}`:`code-${Date.now()}-${Math.random().toString(36).slice(2,7)}`}const rehypeEnhanceCodeBlocks=()=>tree=>{visit(tree,"element",(node2,index2,parent)=>{if(node2.tagName!=="pre"||!parent||index2===void 0)return;const codeElement=node2.children.find(child2=>child2.type==="element"&&child2.tagName==="code");if(!codeElement)return;const language2=extractLanguage(
codeElement),codeId=generateCodeId();codeElement.properties={...codeElement.properties,"data-code-id":codeId};const header=createHeader(language2,codeId),wrapper=createWrapper(header,node2);parent.children[index2]=wrapper})};function rehypeResolveAttachmentImages(options){return tree=>{visit(tree,"element",node2=>{if(node2.tagName==="img"&&node2.properties?.src){const src=String(node2.properties.src);if(src.startsWith(UrlProtocol.DATA)||src.startsWith(UrlProtocol.HTTP))return;const attachment=options.
attachments?.find(a=>a.type===AttachmentType.IMAGE&&a.name===src);attachment?.base64Url&&(node2.properties.src=attachment.base64Url)}})}}const rehypeRtlSupport=()=>tree=>{visit(tree,"element",node2=>{node2.children&&node2.children.length>0&&(node2.properties={...node2.properties,dir:"auto"})})};function preserveIndent(line){let index2=0,output="";for(;index2<line.length;){const char=line[index2];if(char===" "){output+=NBSP,index2+=1;continue}if(char==="	"){output+=TAB_AS_SPACES,index2+=1;continue}
break}return output+line.slice(index2)}function createLiteralChildren(value){const lines=value.split(LINE_BREAK),nodes2=[];for(const[lineIndex,rawLine]of lines.entries())lineIndex>0&&nodes2.push({type:"break"}),nodes2.push({type:"text",value:preserveIndent(rawLine)});return nodes2.length||nodes2.push({type:"text",value:""}),nodes2}const remarkLiteralHtml=()=>tree=>{visit(tree,"html",(node2,index2,parent)=>{if(!parent||typeof index2!="number")return;const replacement=createLiteralChildren(node2.value);
if(!PHRASE_PARENTS.has(parent.type)){const paragraph2={type:"paragraph",children:replacement,data:{literalHtml:!0}},siblings2=parent.children;if(siblings2.splice(index2,1,paragraph2),index2>0){const previous2=siblings2[index2-1];if(previous2?.type==="paragraph"&&previous2.data?.literalHtml){const prevChildren=previous2.children;return prevChildren.length&&prevChildren[prevChildren.length-1].type!=="break"&&prevChildren.push({type:"break"}),prevChildren.push(...paragraph2.children),siblings2.splice(
index2,1),index2}}return index2+1}return parent.children.splice(index2,1,...replacement),index2+replacement.length})},githubDarkCss="pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{color:#c9d1d9;background:#0d1117}.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-template-tag,.hljs-template-variable,.hljs-type,.hljs-variable.language_{color:#ff7b72}.hljs-title,.hljs-title.class_,.hljs-title.class_.inherited__,.hljs-title.function_{color:#d2a8ff}.hl\
js-attr,.hljs-attribute,.hljs-literal,.hljs-meta,.hljs-number,.hljs-operator,.hljs-variable,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id{color:#79c0ff}.hljs-regexp,.hljs-string,.hljs-meta .hljs-string{color:#a5d6ff}.hljs-built_in,.hljs-symbol{color:#ffa657}.hljs-comment,.hljs-code,.hljs-formula{color:#8b949e}.hljs-name,.hljs-quote,.hljs-selector-tag,.hljs-selector-pseudo{color:#7ee787}.hljs-subst{color:#c9d1d9}.hljs-section{color:#1f6feb;font-weight:700}.hljs-bullet{color:#f2cc60}.\
hljs-emphasis{color:#c9d1d9;font-style:italic}.hljs-strong{color:#c9d1d9;font-weight:700}.hljs-addition{color:#aff5b4;background-color:#033a16}.hljs-deletion{color:#ffdcd7;background-color:#67060c}",githubLightCss="pre code.hljs{display:block;overflow-x:auto;padding:1em}code.hljs{padding:3px 5px}.hljs{color:#24292e;background:#fff}.hljs-doctag,.hljs-keyword,.hljs-meta .hljs-keyword,.hljs-template-tag,.hljs-template-variable,.hljs-type,.hljs-variable.language_{color:#d73a49}.hljs-title,.hljs-titl\
e.class_,.hljs-title.class_.inherited__,.hljs-title.function_{color:#6f42c1}.hljs-attr,.hljs-attribute,.hljs-literal,.hljs-meta,.hljs-number,.hljs-operator,.hljs-variable,.hljs-selector-attr,.hljs-selector-class,.hljs-selector-id{color:#005cc5}.hljs-regexp,.hljs-string,.hljs-meta .hljs-string{color:#032f62}.hljs-built_in,.hljs-symbol{color:#e36209}.hljs-comment,.hljs-code,.hljs-formula{color:#6a737d}.hljs-name,.hljs-quote,.hljs-selector-tag,.hljs-selector-pseudo{color:#22863a}.hljs-subst{color:#\
24292e}.hljs-section{color:#005cc5;font-weight:700}.hljs-bullet{color:#735c0f}.hljs-emphasis{color:#24292e;font-style:italic}.hljs-strong{color:#24292e;font-weight:700}.hljs-addition{color:#22863a;background-color:#f0fff4}.hljs-deletion{color:#b31d28;background-color:#ffeef0}";var root_1$t=from_html('<div class="markdown-block svelte-wjdxdt"></div>'),root_2$K=from_html('<div class="markdown-block markdown-block--unstable svelte-wjdxdt" data-block-id="unstable"></div>'),root_3$C=from_html('<div c\
lass="code-block-wrapper streaming-code-block relative svelte-wjdxdt"><div class="code-block-header svelte-wjdxdt"><span class="code-language"> </span> <!></div> <div class="streaming-code-scroll-container svelte-wjdxdt"><pre class="streaming-code-pre svelte-wjdxdt"><code></code></pre></div></div>'),root$T=from_html("<div><!> <!> <!></div> <!>",1);function MarkdownContent($$anchor,$$props){push$1($$props,!0);let className=prop($$props,"class",3,""),disableMath=prop($$props,"disableMath",3,!1),containerRef=state$1(
void 0),renderedBlocks=state$1(proxy([])),unstableBlockHtml=state$1(""),incompleteCodeBlock=state$1(null),previewDialogOpen=state$1(!1),previewCode=state$1(""),previewLanguage=state$1("text"),streamingCodeScrollContainer=state$1(void 0);const streamingAutoScroll=createAutoScrollController();let pendingMarkdown=null,isProcessing=!1;const transformCache=new SvelteMap;let previousContent="";const themeStyleId=`highlight-theme-${window.idxThemeStyle=(window.idxThemeStyle??0)+1}`;let processor=user_derived(
()=>()=>{$$props.attachments;let proc=remark().use(remarkGfm);return disableMath()||(proc=proc.use(remarkMath)),proc=proc.use(remarkBreaks).use(remarkLiteralHtml).use(remarkRehype),disableMath()||(proc=proc.use(rehypeKatex)),proc.use(rehypeHighlight,{languages:grammars,aliases:{[FileTypeText.XML]:[FileTypeText.SVELTE,FileTypeText.VUE]}}).use(rehypeRestoreTableHtml).use(rehypeEnhanceLinks).use(rehypeEnhanceCodeBlocks).use(rehypeResolveAttachmentImages,{attachments:$$props.attachments}).use(rehypeRtlSupport).
use(rehypeStringify,{allowDangerousHtml:!0})});function cleanupEventListeners(){if(!get$3(containerRef))return;const copyButtons=get$3(containerRef).querySelectorAll(".copy-code-btn"),previewButtons=get$3(containerRef).querySelectorAll(".preview-code-btn");for(const button of copyButtons)button.removeEventListener("click",handleCopyClick);for(const button of previewButtons)button.removeEventListener("click",handlePreviewClick)}function cleanupHighlightTheme(){document.getElementById(themeStyleId)?.
remove()}function loadHighlightTheme(isDark){document.getElementById(themeStyleId)?.remove();const style2=document.createElement("style");style2.id=themeStyleId,style2.textContent=isDark?githubDarkCss:githubLightCss,document.head.appendChild(style2)}function getCodeInfoFromTarget(target2){const wrapper=target2.closest(".code-block-wrapper");if(!wrapper)return console.error("No wrapper found"),null;const codeElement=wrapper.querySelector("code[data-code-id]");if(!codeElement)return console.error(
"No code element found in wrapper"),null;const rawCode=codeElement.textContent??"",language2=wrapper.querySelector(".code-language")?.textContent?.trim()||"text";return{rawCode,language:language2}}function getHastNodeId(node2,indexFallback){const position2=node2.position;return position2?.start?.offset!=null&&position2?.end?.offset!=null?`hast-${position2.start.offset}-${position2.end.offset}`:`${node2.type}-${indexFallback}`}function getMdastNodeHash(node2,index2){const n=node2;return n.position?.
start?.offset!=null&&n.position?.end?.offset!=null?`${n.type}-${n.position.start.offset}-${n.position.end.offset}`:`${n.type}-idx${index2}`}function isAppendMode(newContent){return previousContent.length>0&&newContent.startsWith(previousContent)}async function transformMdastNode(processorInstance,node2,index2){const hash2=getMdastNodeHash(node2,index2),cached2=transformCache.get(hash2);if(cached2)return{html:cached2,hash:hash2};const singleNodeRoot={type:"root",children:[node2]},transformedRoot=await processorInstance.
run(singleNodeRoot),html2=processorInstance.stringify(transformedRoot);return transformCache.set(hash2,html2),{html:html2,hash:hash2}}async function handleCopyClick(event2){event2.preventDefault(),event2.stopPropagation();const target2=event2.currentTarget;if(!target2)return;const info2=getCodeInfoFromTarget(target2);if(info2)try{await copyCodeToClipboard(info2.rawCode)}catch(error2){console.error("Failed to copy code:",error2)}}function handlePreviewDialogOpenChange(open2){set$1(previewDialogOpen,
open2,!0),open2||(set$1(previewCode,""),set$1(previewLanguage,"text"))}function handlePreviewClick(event2){event2.preventDefault(),event2.stopPropagation();const target2=event2.currentTarget;if(!target2)return;const info2=getCodeInfoFromTarget(target2);info2&&(set$1(previewCode,info2.rawCode,!0),set$1(previewLanguage,info2.language,!0),set$1(previewDialogOpen,!0))}async function processMarkdown(markdown2){if(markdown2===previousContent)return;if(!markdown2){set$1(renderedBlocks,[],!0),set$1(unstableBlockHtml,
""),set$1(incompleteCodeBlock,null),previousContent="";return}const incompleteBlock=detectIncompleteCodeBlock(markdown2);if(incompleteBlock){const prefixMarkdown=markdown2.slice(0,incompleteBlock.openingIndex);if(prefixMarkdown.trim()){const normalizedPrefix=preprocessLaTeX(prefixMarkdown),processorInstance2=get$3(processor)(),mdastChildren2=processorInstance2.parse(normalizedPrefix).children??[],nextBlocks2=[],appendMode2=isAppendMode(prefixMarkdown),previousBlockCount2=appendMode2?get$3(renderedBlocks).
length:0;for(let index2=0;index2<mdastChildren2.length;index2++){const child2=mdastChildren2[index2];if(appendMode2&&index2<previousBlockCount2){const prevBlock=get$3(renderedBlocks)[index2],currentHash=getMdastNodeHash(child2,index2);if(prevBlock?.contentHash===currentHash){nextBlocks2.push(prevBlock);continue}}const{html:html2,hash:hash2}=await transformMdastNode(processorInstance2,child2,index2),id2=getHastNodeId({position:child2.position},index2);nextBlocks2.push({id:id2,html:html2,contentHash:hash2})}
set$1(renderedBlocks,nextBlocks2,!0)}else set$1(renderedBlocks,[],!0);previousContent=prefixMarkdown,set$1(unstableBlockHtml,""),set$1(incompleteCodeBlock,incompleteBlock,!0);return}set$1(incompleteCodeBlock,null);const normalized=preprocessLaTeX(markdown2),processorInstance=get$3(processor)(),mdastChildren=processorInstance.parse(normalized).children??[],stableCount=Math.max(mdastChildren.length-1,0),nextBlocks=[],appendMode=isAppendMode(markdown2),previousBlockCount=appendMode?get$3(renderedBlocks).
length:0;for(let index2=0;index2<stableCount;index2++){const child2=mdastChildren[index2];if(appendMode&&index2<previousBlockCount){const prevBlock=get$3(renderedBlocks)[index2],currentHash=getMdastNodeHash(child2,index2);if(prevBlock?.contentHash===currentHash){nextBlocks.push(prevBlock);continue}}const{html:html2,hash:hash2}=await transformMdastNode(processorInstance,child2,index2),id2=getHastNodeId({position:child2.position},index2);nextBlocks.push({id:id2,html:html2,contentHash:hash2})}let unstableHtml="";
if(mdastChildren.length>stableCount){const singleNodeRoot={type:"root",children:[mdastChildren[stableCount]]},transformedRoot=await processorInstance.run(singleNodeRoot);unstableHtml=processorInstance.stringify(transformedRoot)}set$1(renderedBlocks,nextBlocks,!0),previousContent=markdown2,await tick(),set$1(unstableBlockHtml,unstableHtml,!0)}function setupCodeBlockActions(){if(!get$3(containerRef))return;const wrappers=get$3(containerRef).querySelectorAll(".code-block-wrapper");for(const wrapper of wrappers){
const copyButton=wrapper.querySelector(".copy-code-btn"),previewButton=wrapper.querySelector(".preview-code-btn");copyButton&&copyButton.dataset.listenerBound!=="true"&&(copyButton.dataset.listenerBound="true",copyButton.addEventListener("click",handleCopyClick)),previewButton&&previewButton.dataset.listenerBound!=="true"&&(previewButton.dataset.listenerBound="true",previewButton.addEventListener("click",handlePreviewClick))}}function setupImageErrorHandlers(){if(!get$3(containerRef))return;const images=get$3(
containerRef).querySelectorAll(IMAGE_NOT_ERROR_BOUND_SELECTOR);for(const img of images)img.dataset[DATA_ERROR_BOUND_ATTR]=BOOL_TRUE_STRING,img.addEventListener("error",handleImageError)}function handleImageError(event2){const img=event2.target;if(!img||!img.src||img.src.startsWith(UrlProtocol.DATA)||img.dataset[DATA_ERROR_HANDLED_ATTR]===BOOL_TRUE_STRING)return;img.dataset[DATA_ERROR_HANDLED_ATTR]=BOOL_TRUE_STRING;const src=img.src,fallback2=document.createElement("div");fallback2.className="ima\
ge-load-error",fallback2.innerHTML=getImageErrorFallbackHtml(src),img.parentNode?.replaceChild(fallback2,img)}async function updateRenderedBlocks(markdown2){if(pendingMarkdown=markdown2,!isProcessing){isProcessing=!0;try{for(;pendingMarkdown!==null;){const nextMarkdown=pendingMarkdown;pendingMarkdown=null,await processMarkdown(nextMarkdown),pendingMarkdown!==null&&await new Promise(resolve2=>requestAnimationFrame(resolve2))}}catch(error2){console.error("Failed to process markdown:",error2),set$1(
renderedBlocks,[],!0),set$1(unstableBlockHtml,markdown2.replace(/\n/g,"<br>"),!0)}finally{isProcessing=!1}}}user_effect(()=>{const isDark=derivedMode.current===ColorMode.DARK;loadHighlightTheme(isDark)}),user_effect(()=>{updateRenderedBlocks($$props.content)}),user_effect(()=>{const hasRenderedBlocks=get$3(renderedBlocks).length>0,hasUnstableBlock=!!get$3(unstableBlockHtml);(hasRenderedBlocks||hasUnstableBlock)&&get$3(containerRef)&&(setupCodeBlockActions(),setupImageErrorHandlers())}),user_effect(
()=>{streamingAutoScroll.setContainer(get$3(streamingCodeScrollContainer))}),user_effect(()=>{streamingAutoScroll.updateInterval(get$3(incompleteCodeBlock)!==null)}),onDestroy(()=>{cleanupEventListeners(),cleanupHighlightTheme(),streamingAutoScroll.destroy()});var fragment=root$T(),div=first_child(fragment),node_1=child(div);each(node_1,17,()=>get$3(renderedBlocks),block2=>block2.id,($$anchor2,block2)=>{var div_1=root_1$t();html$6(div_1,()=>get$3(block2).html,!0),reset(div_1),action(div_1,($$node,$$action_arg)=>fadeInView?.(
$$node,$$action_arg),()=>({skipIfVisible:!0})),template_effect(()=>set_attribute(div_1,"data-block-id",get$3(block2).id)),append($$anchor2,div_1)});var node_2=sibling(node_1,2);{var consequent=$$anchor2=>{var div_2=root_2$K();html$6(div_2,()=>get$3(unstableBlockHtml),!0),reset(div_2),append($$anchor2,div_2)};if_block(node_2,$$render=>{get$3(unstableBlockHtml)&&$$render(consequent)})}var node_3=sibling(node_2,2);{var consequent_1=$$anchor2=>{var div_3=root_3$C(),div_4=child(div_3),span=child(div_4),
text2=child(span,!0);reset(span);var node_4=sibling(span,2);{let $0=user_derived(()=>get$3(incompleteCodeBlock).language||"text");CodeBlockActions(node_4,{get code(){return get$3(incompleteCodeBlock).code},get language(){return get$3($0)},disabled:!0,onPreview:(code2,lang)=>{set$1(previewCode,code2,!0),set$1(previewLanguage,lang,!0),set$1(previewDialogOpen,!0)}})}reset(div_4);var div_5=sibling(div_4,2),pre=child(div_5),code_1=child(pre);html$6(code_1,()=>highlightCode(get$3(incompleteCodeBlock).
code,get$3(incompleteCodeBlock).language||"text"),!0),reset(code_1),reset(pre),reset(div_5),bind_this(div_5,$$value=>set$1(streamingCodeScrollContainer,$$value),()=>get$3(streamingCodeScrollContainer)),reset(div_3),template_effect(()=>{set_text(text2,get$3(incompleteCodeBlock).language||"text"),set_class(code_1,1,`hljs language-${(get$3(incompleteCodeBlock).language||"text")??""}`,"svelte-wjdxdt")}),event("scroll",div_5,()=>streamingAutoScroll.handleScroll()),append($$anchor2,div_3)};if_block(node_3,
$$render=>{get$3(incompleteCodeBlock)&&$$render(consequent_1)})}reset(div),bind_this(div,$$value=>set$1(containerRef,$$value),()=>get$3(containerRef));var node_5=sibling(div,2);DialogCodePreview(node_5,{get open(){return get$3(previewDialogOpen)},get code(){return get$3(previewCode)},get language(){return get$3(previewLanguage)},onOpenChange:handlePreviewDialogOpenChange}),template_effect($0=>set_class(div,1,`${className()??""}${$0??""}`,"svelte-wjdxdt"),[()=>config$1()[SETTINGS_KEYS.FULL_HEIGHT_CODE_BLOCKS]?
" full-height-code-blocks":""]),append($$anchor,fragment),pop()}var root$S=from_html('<div><pre class="m-0 svelte-hp0zxr"><code class="hljs text-sm leading-relaxed svelte-hp0zxr"></code></pre></div>');function SyntaxHighlightedCode($$anchor,$$props){push$1($$props,!0);let language2=prop($$props,"language",3,"text"),className=prop($$props,"class",3,""),maxHeight=prop($$props,"maxHeight",3,"60vh"),maxWidth=prop($$props,"maxWidth",3,""),highlightedHtml=state$1("");function loadHighlightTheme(isDark){
document.querySelectorAll("style[data-highlight-theme-preview]").forEach(style3=>style3.remove());const style2=document.createElement("style");style2.setAttribute("data-highlight-theme-preview","true"),style2.textContent=isDark?githubDarkCss:githubLightCss,document.head.appendChild(style2)}user_effect(()=>{const isDark=derivedMode.current===ColorMode.DARK;loadHighlightTheme(isDark)}),user_effect(()=>{if(!$$props.code){set$1(highlightedHtml,"");return}try{const lang=language2().toLowerCase();if(HighlightJS$1.
getLanguage(lang)){const result=HighlightJS$1.highlight($$props.code,{language:lang});set$1(highlightedHtml,result.value,!0)}else{const result=HighlightJS$1.highlightAuto($$props.code);set$1(highlightedHtml,result.value,!0)}}catch{set$1(highlightedHtml,$$props.code.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),!0)}});var div=root$S(),pre=child(div),code_1=child(pre);html$6(code_1,()=>get$3(highlightedHtml),!0),reset(code_1),reset(pre),reset(div),template_effect(()=>{set_class(div,
1,`code-preview-wrapper rounded-lg border border-border bg-muted ${className()??""}`,"svelte-hp0zxr"),set_style(div,`max-height: ${maxHeight()??""}; max-width: ${maxWidth()??""};`)}),append($$anchor,div),pop()}var root_5$h=from_html('<span class="text-xs italic"> </span>'),root_3$B=from_html('<div class="flex items-center gap-2 text-muted-foreground"><!> <span class="font-mono text-sm font-medium"> </span> <!></div> <div><!> <span class="sr-only">Toggle content</span></div>',1),root_6$j=from_html(
'<div class="overflow-y-auto border-t border-muted px-3 pb-3" style="min-height: var(--min-message-height); max-height: var(--max-message-height);"><!></div>'),root_2$J=from_html("<!> <!>",1);function CollapsibleContentBlock($$anchor,$$props){push$1($$props,!0);let open2=prop($$props,"open",15,!1),className=prop($$props,"class",3,""),iconClass=prop($$props,"iconClass",3,"h-4 w-4"),isStreaming=prop($$props,"isStreaming",3,!1),contentContainer=state$1(void 0);const autoScroll=createAutoScrollController();
user_effect(()=>{autoScroll.setContainer(get$3(contentContainer))}),user_effect(()=>{autoScroll.updateInterval(open2()&&isStreaming())});function handleScroll(){autoScroll.handleScroll()}var fragment=comment$2(),node2=first_child(fragment);component(node2,()=>Collapsible,($$anchor2,Collapsible_Root)=>{Collapsible_Root($$anchor2,{get open(){return open2()},onOpenChange:value=>{open2(value),$$props.onToggle?.()},get class(){return className()},children:($$anchor3,$$slotProps)=>{Card($$anchor3,{class:"\
gap-0 border-muted bg-muted/30 py-0",children:($$anchor4,$$slotProps2)=>{var fragment_2=root_2$J(),node_1=first_child(fragment_2);component(node_1,()=>Collapsible_trigger,($$anchor5,Collapsible_Trigger)=>{Collapsible_Trigger($$anchor5,{class:"flex w-full cursor-pointer items-center justify-between p-3",children:($$anchor6,$$slotProps3)=>{var fragment_3=root_3$B(),div=first_child(fragment_3),node_2=child(div);{var consequent=$$anchor7=>{var fragment_4=comment$2(),node_3=first_child(fragment_4);component(
node_3,()=>$$props.icon,($$anchor8,IconComponent_1)=>{IconComponent_1($$anchor8,{get class(){return iconClass()}})}),append($$anchor7,fragment_4)};if_block(node_2,$$render=>{$$props.icon&&$$render(consequent)})}var span=sibling(node_2,2),text2=child(span,!0);reset(span);var node_4=sibling(span,2);{var consequent_1=$$anchor7=>{var span_1=root_5$h(),text_1=child(span_1,!0);reset(span_1),template_effect(()=>set_text(text_1,$$props.subtitle)),append($$anchor7,span_1)};if_block(node_4,$$render=>{$$props.
subtitle&&$$render(consequent_1)})}reset(div);var div_1=sibling(div,2),node_5=child(div_1);Chevrons_up_down(node_5,{class:"h-4 w-4"}),next$1(2),reset(div_1),template_effect($0=>{set_text(text2,$$props.title),set_class(div_1,1,$0)},[()=>clsx(buttonVariants({variant:"ghost",size:"sm",class:"h-6 w-6 p-0 text-muted-foreground hover:text-foreground"}))]),append($$anchor6,fragment_3)},$$slots:{default:!0}})});var node_6=sibling(node_1,2);component(node_6,()=>Collapsible_content,($$anchor5,Collapsible_Content)=>{
Collapsible_Content($$anchor5,{children:($$anchor6,$$slotProps3)=>{var div_2=root_6$j(),node_7=child(div_2);snippet(node_7,()=>$$props.children),reset(div_2),bind_this(div_2,$$value=>set$1(contentContainer,$$value),()=>get$3(contentContainer)),event("scroll",div_2,handleScroll),append($$anchor6,div_2)},$$slots:{default:!0}})}),append($$anchor4,fragment_2)},$$slots:{default:!0}})},$$slots:{default:!0}})}),append($$anchor,fragment),pop()}function Dialog_title($$anchor,$$props){push$1($$props,!0);let ref2=prop(
$$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class"]);var fragment=comment$2(),node2=first_child(fragment);{let $0=user_derived(()=>cn$1("text-lg leading-none font-semibold",$$props.class));component(node2,()=>Dialog_title$1,($$anchor2,DialogPrimitive_Title)=>{DialogPrimitive_Title($$anchor2,spread_props({"data-slot":"dialog-title",get class(){return get$3($0)}},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)}}))})}append($$anchor,
fragment),pop()}var root$R=from_html("<div><!></div>");function Dialog_footer($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class","children"]);var div=root$R();attribute_effect(div,$0=>({"data-slot":"dialog-footer",class:$0,...restProps}),[()=>cn$1("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",$$props.class)]);var node2=child(div);snippet(node2,()=>$$props.children??noop$3),reset(div),bind_this(
div,$$value=>ref2($$value),()=>ref2()),append($$anchor,div),pop()}var root$Q=from_html("<div><!></div>");function Dialog_header($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class","children"]);var div=root$Q();attribute_effect(div,$0=>({"data-slot":"dialog-header",class:$0,...restProps}),[()=>cn$1("flex flex-col gap-2 text-center sm:text-left",$$props.class)]);var node2=child(div);snippet(node2,()=>$$props.
children??noop$3),reset(div),bind_this(div,$$value=>ref2($$value),()=>ref2()),append($$anchor,div),pop()}function Dialog_overlay($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class"]);var fragment=comment$2(),node2=first_child(fragment);{let $0=user_derived(()=>cn$1("fixed inset-0 z-50 bg-black/50 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:fill-mode-forwards da\
ta-[state=open]:animate-in data-[state=open]:fade-in-0",$$props.class));component(node2,()=>Dialog_overlay$1,($$anchor2,DialogPrimitive_Overlay)=>{DialogPrimitive_Overlay($$anchor2,spread_props({"data-slot":"dialog-overlay",get class(){return get$3($0)}},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)}}))})}append($$anchor,fragment),pop()}var root_4$o=from_html('<!> <span class="sr-only">Close</span>',1),root_2$I=from_html("<!> <!>",1),root_1$s=from_html("<!> <!>",1);function Dialog_content($$anchor,$$props){
push$1($$props,!0);let ref2=prop($$props,"ref",15,null),showCloseButton=prop($$props,"showCloseButton",3,!0),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class","portalProps","children","showCloseButton"]);var fragment=comment$2(),node2=first_child(fragment);component(node2,()=>Portal$1,($$anchor2,Dialog_Portal)=>{Dialog_Portal($$anchor2,spread_props(()=>$$props.portalProps,{children:($$anchor3,$$slotProps)=>{var fragment_1=root_1$s(),node_1=first_child(fragment_1);component(
node_1,()=>Dialog_overlay,($$anchor4,Dialog_Overlay)=>{Dialog_Overlay($$anchor4,{})});var node_2=sibling(node_1,2);{let $0=user_derived(()=>cn$1("fixed top-[50%] left-[50%] z-50 grid max-h-[100dvh] w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 overflow-y-auto rounded-lg border border-border/30 bg-background p-6 shadow-lg duration-200 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:fill-mode-forwards data-[state=closed]:zoom-out-95 d\
ata-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95 sm:max-w-lg md:max-h-[100vh]",$$props.class));component(node_2,()=>Dialog_content$1,($$anchor4,DialogPrimitive_Content)=>{DialogPrimitive_Content($$anchor4,spread_props({"data-slot":"dialog-content",get class(){return get$3($0)}},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)},children:($$anchor5,$$slotProps2)=>{var fragment_2=root_2$I(),node_3=first_child(fragment_2);snippet(node_3,()=>$$props.
children??noop$3);var node_4=sibling(node_3,2);{var consequent=$$anchor6=>{var fragment_3=comment$2(),node_5=first_child(fragment_3);component(node_5,()=>Dialog_close,($$anchor7,DialogPrimitive_Close)=>{DialogPrimitive_Close($$anchor7,{class:"absolute top-4 right-4 rounded-xs opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:ring-2 focus:ring-ring focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:n\
ot([class*='size-'])]:size-4",children:($$anchor8,$$slotProps3)=>{var fragment_4=root_4$o(),node_6=first_child(fragment_4);X(node_6,{}),next$1(2),append($$anchor8,fragment_4)},$$slots:{default:!0}})}),append($$anchor6,fragment_3)};if_block(node_4,$$render=>{showCloseButton()&&$$render(consequent)})}append($$anchor5,fragment_2)},$$slots:{default:!0}}))})}append($$anchor3,fragment_1)},$$slots:{default:!0}}))}),append($$anchor,fragment),pop()}function Dialog_description($$anchor,$$props){push$1($$props,
!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class"]);var fragment=comment$2(),node2=first_child(fragment);{let $0=user_derived(()=>cn$1("text-sm text-muted-foreground",$$props.class));component(node2,()=>Dialog_description$1,($$anchor2,DialogPrimitive_Description)=>{DialogPrimitive_Description($$anchor2,spread_props({"data-slot":"dialog-description",get class(){return get$3($0)}},()=>restProps,{get ref(){return ref2()},set ref($$value){
ref2($$value)}}))})}append($$anchor,fragment),pop()}const Root$2=Dialog,Portal$1=Portal$2;var root_1$r=from_html("<!> Add New Server",1),root_2$H=from_html('<div class="rounded-md border border-dashed p-4 text-sm text-muted-foreground">No MCP Servers configured yet. Add one to enable agentic features.</div>'),root_3$A=from_html('<div class="grid gap-3" style="grid-template-columns: repeat(auto-fill, minmax(min(32rem, calc(100dvw - 2rem)), 1fr));"></div>'),root$P=from_html('<div class="h-full max\
-h-[100dvh] overflow-y-auto"><div class="flex items-center gap-2 p-4 md:absolute md:top-8 md:left-8 md:px-0 md:py-2"><!> <h1 class="text-xl font-semibold md:text-2xl">MCP Servers</h1></div> <div class="sticky top-0 z-10 mt-4 flex items-start gap-4 p-4 md:justify-end md:px-8"><!></div> <!> <div><!> <!></div></div>');function SettingsMcpServers($$anchor,$$props){push$1($$props,!0);let servers=user_derived(()=>mcpStore.getServersSorted()),initialLoadComplete=state$1(!1),isAddingServer=state$1(!1);onMount$1(
()=>{if(page$1.url.searchParams.has("add")){set$1(isAddingServer,!0);const newUrl=new URL(page$1.url);newUrl.searchParams.delete("add"),replaceState(newUrl,{})}}),user_effect(()=>{if(get$3(initialLoadComplete))return;get$3(servers).length>0&&get$3(servers).every(server=>{const state2=mcpStore.getHealthCheckState(server.id);return state2.status===HealthCheckStatus.SUCCESS||state2.status===HealthCheckStatus.ERROR})&&set$1(initialLoadComplete,!0)});var div=root$P(),div_1=child(div),node2=child(div_1);
McpLogo(node2,{class:"h-5 w-5 md:h-6 md:w-6"}),next$1(2),reset(div_1);var div_2=sibling(div_1,2),node_1=child(div_2);Button(node_1,{variant:"outline",size:"sm",class:"shrink-0",onclick:()=>set$1(isAddingServer,!0),children:($$anchor2,$$slotProps)=>{var fragment=root_1$r(),node_2=first_child(fragment);Plus(node_2,{class:"h-4 w-4"}),next$1(),append($$anchor2,fragment)},$$slots:{default:!0}}),reset(div_2);var node_3=sibling(div_2,2);DialogMcpServerAddNew(node_3,{get open(){return get$3(isAddingServer)},
set open($$value){set$1(isAddingServer,$$value,!0)}});var div_3=sibling(node_3,2),node_4=child(div_3);{var consequent=$$anchor2=>{var div_4=root_2$H();append($$anchor2,div_4)};if_block(node_4,$$render=>{get$3(servers).length===0&&!get$3(isAddingServer)&&$$render(consequent)})}var node_5=sibling(node_4,2);{var consequent_2=$$anchor2=>{var div_5=root_3$A();each(div_5,21,()=>get$3(servers),server=>server.id,($$anchor3,server)=>{var fragment_1=comment$2(),node_6=first_child(fragment_1);{var consequent_1=$$anchor4=>{
McpServerCardSkeleton($$anchor4)},alternate=$$anchor4=>{{let $0=user_derived(()=>conversationsStore.isMcpServerEnabledForChat(get$3(server).id));McpServerCard($$anchor4,{get server(){return get$3(server)},get enabled(){return get$3($0)},onToggle:async()=>{const wasEnabled=conversationsStore.isMcpServerEnabledForChat(get$3(server).id);await conversationsStore.toggleMcpServerForChat(get$3(server).id),wasEnabled||toolsStore.enableAllToolsForServer(get$3(server).id)},onUpdate:updates=>mcpStore.updateServer(
get$3(server).id,updates),onDelete:()=>mcpStore.removeServer(get$3(server).id)})}};if_block(node_6,$$render=>{get$3(initialLoadComplete)?$$render(alternate,-1):$$render(consequent_1)})}append($$anchor3,fragment_1)}),reset(div_5),append($$anchor2,div_5)};if_block(node_5,$$render=>{get$3(servers).length>0&&$$render(consequent_2)})}reset(div_3),reset(div),template_effect(()=>set_class(div_3,1,`grid gap-5 md:space-y-4 ${$$props.class??""}`)),transition(1,div,()=>fade,()=>({duration:150})),append($$anchor,
div),pop()}delegate(["click"]);var root_3$z=from_html("<!> Tools",1),root_5$g=from_html("<!> Resources",1),root_7$g=from_html("<!> Prompts",1),root_9$c=from_html("<!> Logging",1),root_11$7=from_html("<!> Completions",1),root_13$7=from_html("<!> Tasks",1),root_1$q=from_html("<!> <!> <!> <!> <!> <!>",1);function McpCapabilitiesBadges($$anchor,$$props){push$1($$props,!0);var fragment=comment$2(),node2=first_child(fragment);{var consequent_6=$$anchor2=>{var fragment_1=root_1$q(),node_1=first_child(fragment_1);
{var consequent=$$anchor3=>{Badge($$anchor3,{variant:"outline",class:"h-5 gap-1 bg-green-50 px-1.5 text-[10px] dark:bg-green-950",children:($$anchor4,$$slotProps)=>{var fragment_3=root_3$z(),node_2=first_child(fragment_3);Wrench(node_2,{class:"h-3 w-3 text-green-600 dark:text-green-400"}),next$1(),append($$anchor4,fragment_3)},$$slots:{default:!0}})};if_block(node_1,$$render=>{$$props.capabilities.server.tools&&$$render(consequent)})}var node_3=sibling(node_1,2);{var consequent_1=$$anchor3=>{Badge(
$$anchor3,{variant:"outline",class:"h-5 gap-1 bg-blue-50 px-1.5 text-[10px] dark:bg-blue-950",children:($$anchor4,$$slotProps)=>{var fragment_5=root_5$g(),node_4=first_child(fragment_5);Database(node_4,{class:"h-3 w-3 text-blue-600 dark:text-blue-400"}),next$1(),append($$anchor4,fragment_5)},$$slots:{default:!0}})};if_block(node_3,$$render=>{$$props.capabilities.server.resources&&$$render(consequent_1)})}var node_5=sibling(node_3,2);{var consequent_2=$$anchor3=>{Badge($$anchor3,{variant:"outline",
class:"h-5 gap-1 bg-purple-50 px-1.5 text-[10px] dark:bg-purple-950",children:($$anchor4,$$slotProps)=>{var fragment_7=root_7$g(),node_6=first_child(fragment_7);Message_square(node_6,{class:"h-3 w-3 text-purple-600 dark:text-purple-400"}),next$1(),append($$anchor4,fragment_7)},$$slots:{default:!0}})};if_block(node_5,$$render=>{$$props.capabilities.server.prompts&&$$render(consequent_2)})}var node_7=sibling(node_5,2);{var consequent_3=$$anchor3=>{Badge($$anchor3,{variant:"outline",class:"h-5 gap-\
1 bg-orange-50 px-1.5 text-[10px] dark:bg-orange-950",children:($$anchor4,$$slotProps)=>{var fragment_9=root_9$c(),node_8=first_child(fragment_9);File_text(node_8,{class:"h-3 w-3 text-orange-600 dark:text-orange-400"}),next$1(),append($$anchor4,fragment_9)},$$slots:{default:!0}})};if_block(node_7,$$render=>{$$props.capabilities.server.logging&&$$render(consequent_3)})}var node_9=sibling(node_7,2);{var consequent_4=$$anchor3=>{Badge($$anchor3,{variant:"outline",class:"h-5 gap-1 bg-cyan-50 px-1.5 \
text-[10px] dark:bg-cyan-950",children:($$anchor4,$$slotProps)=>{var fragment_11=root_11$7(),node_10=first_child(fragment_11);Sparkles(node_10,{class:"h-3 w-3 text-cyan-600 dark:text-cyan-400"}),next$1(),append($$anchor4,fragment_11)},$$slots:{default:!0}})};if_block(node_9,$$render=>{$$props.capabilities.server.completions&&$$render(consequent_4)})}var node_11=sibling(node_9,2);{var consequent_5=$$anchor3=>{Badge($$anchor3,{variant:"outline",class:"h-5 gap-1 bg-pink-50 px-1.5 text-[10px] dark:b\
g-pink-950",children:($$anchor4,$$slotProps)=>{var fragment_13=root_13$7(),node_12=first_child(fragment_13);List_checks(node_12,{class:"h-3 w-3 text-pink-600 dark:text-pink-400"}),next$1(),append($$anchor4,fragment_13)},$$slots:{default:!0}})};if_block(node_11,$$render=>{$$props.capabilities.server.tasks&&$$render(consequent_5)})}append($$anchor2,fragment_1)};if_block(node2,$$render=>{$$props.capabilities&&$$render(consequent_6)})}append($$anchor,fragment),pop()}var root_6$i=from_html('<span cla\
ss="ml-1"> </span>'),root_3$y=from_html("<!> <span> </span> <!>",1),root_9$b=from_html('<details class="ml-11"><summary class="cursor-pointer text-[10px] text-muted-foreground">details</summary> <pre class="mt-1 overflow-x-auto rounded bg-background/70 p-2 text-[10px] break-all whitespace-pre-wrap text-foreground/80"> </pre></details>'),root_8$i=from_html('<div><span class="shrink-0 text-muted-foreground"> </span> <!> <span class="break-all"> </span></div> <!>',1),root_7$f=from_html('<div class=\
"max-h-64 space-y-0.5 overflow-y-auto rounded bg-muted/50 p-2 font-mono text-[10px]"></div>'),root_2$G=from_html('<div class="space-y-2"><!></div> <!>',1);function McpConnectionLogs($$anchor,$$props){push$1($$props,!0);let defaultExpanded=prop($$props,"defaultExpanded",3,!1),isExpanded=user_derived(defaultExpanded);function formatLogDetails(details){if(details==null)return"";try{return JSON.stringify(details,null,2)}catch{return String(details)}}var fragment=comment$2(),node2=first_child(fragment);
{var consequent_3=$$anchor2=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);component(node_1,()=>Collapsible,($$anchor3,Collapsible_Root)=>{Collapsible_Root($$anchor3,{get class(){return $$props.class},get open(){return get$3(isExpanded)},set open($$value){set$1(isExpanded,$$value)},children:($$anchor4,$$slotProps)=>{var fragment_2=root_2$G(),div=first_child(fragment_2),node_2=child(div);component(node_2,()=>Collapsible_trigger,($$anchor5,Collapsible_Trigger)=>{Collapsible_Trigger($$anchor5,
{class:"flex w-full items-center gap-1 text-xs text-muted-foreground hover:text-foreground",children:($$anchor6,$$slotProps2)=>{var fragment_3=root_3$y(),node_3=first_child(fragment_3);{var consequent=$$anchor7=>{Chevron_down($$anchor7,{class:"h-3.5 w-3.5"})},alternate=$$anchor7=>{Chevron_right($$anchor7,{class:"h-3.5 w-3.5"})};if_block(node_3,$$render=>{get$3(isExpanded)?$$render(consequent):$$render(alternate,-1)})}var span=sibling(node_3,2),text2=child(span);reset(span);var node_4=sibling(span,
2);{var consequent_1=$$anchor7=>{var span_1=root_6$i(),text_1=child(span_1);reset(span_1),template_effect(()=>set_text(text_1,`· Connected in ${$$props.connectionTimeMs??""}ms`)),append($$anchor7,span_1)};if_block(node_4,$$render=>{$$props.connectionTimeMs!==void 0&&$$render(consequent_1)})}template_effect(()=>set_text(text2,`Connection Log (${$$props.logs.length??""})`)),append($$anchor6,fragment_3)},$$slots:{default:!0}})}),reset(div);var node_5=sibling(div,2);component(node_5,()=>Collapsible_content,
($$anchor5,Collapsible_Content)=>{Collapsible_Content($$anchor5,{class:"mt-2",children:($$anchor6,$$slotProps2)=>{var div_1=root_7$f();each(div_1,21,()=>$$props.logs,log=>log.timestamp.getTime()+log.message,($$anchor7,log)=>{const IconComponent=user_derived(()=>getMcpLogLevelIcon(get$3(log).level));var fragment_6=root_8$i(),div_2=first_child(fragment_6),span_2=child(div_2),text_2=child(span_2,!0);reset(span_2);var node_6=sibling(span_2,2);component(node_6,()=>get$3(IconComponent),($$anchor8,IconComponent_1)=>{
IconComponent_1($$anchor8,{class:"mt-0.5 h-3 w-3 shrink-0"})});var span_3=sibling(node_6,2),text_3=child(span_3,!0);reset(span_3),reset(div_2);var node_7=sibling(div_2,2);{var consequent_2=$$anchor8=>{var details_1=root_9$b(),pre=sibling(child(details_1),2),text_4=child(pre,!0);reset(pre),reset(details_1),template_effect($0=>set_text(text_4,$0),[()=>formatLogDetails(get$3(log).details)]),append($$anchor8,details_1)};if_block(node_7,$$render=>{get$3(log).details!==void 0&&$$render(consequent_2)})}
template_effect(($0,$1)=>{set_class(div_2,1,$0),set_text(text_2,$1),set_text(text_3,get$3(log).message)},[()=>clsx(["flex items-start gap-1.5",getMcpLogLevelClass(get$3(log).level)]),()=>formatTime(get$3(log).timestamp)]),append($$anchor7,fragment_6)}),reset(div_1),append($$anchor6,div_1)},$$slots:{default:!0}})}),append($$anchor4,fragment_2)},$$slots:{default:!0}})}),append($$anchor2,fragment_1)};if_block(node2,$$render=>{$$props.logs.length>0&&$$render(consequent_3)})}append($$anchor,fragment),
pop()}var root_1$p=from_html('<p class="mt-1.5 text-xs text-destructive"> </p>'),root_3$x=from_html('<span class="inline-flex gap-0.75 text-xs text-muted-foreground/60">(Run <pre>llama-server</pre> with <pre>--webui-mcp-proxy</pre> flag)</span>'),root_2$F=from_html('<label><!> <span><span class="text-xs text-muted-foreground">Use llama-server proxy</span> <br/> <!></span></label>'),root$O=from_html('<div class="grid gap-3"><div><label class="mb-2 block text-xs font-medium">Server URL <span class\
="text-destructive">*</span></label> <!> <!> <!></div> <!></div>');function McpServerForm($$anchor,$$props){push$1($$props,!0);let useProxy=prop($$props,"useProxy",3,!1),urlError=prop($$props,"urlError",3,null),id2=prop($$props,"id",3,"server"),isWebSocket=user_derived(()=>$$props.url.toLowerCase().startsWith(UrlProtocol.WEBSOCKET)||$$props.url.toLowerCase().startsWith(UrlProtocol.WEBSOCKET_SECURE)),headerPairs=user_derived(()=>parseHeadersToArray($$props.headers));function updateHeaderPairs(newPairs){
set$1(headerPairs,newPairs),$$props.onHeadersChange(serializeHeaders(newPairs))}var div=root$O(),div_1=child(div),label=child(div_1),node2=sibling(label,2);{let $0=user_derived(()=>urlError()?"border-destructive":"");Input(node2,{get id(){return`server-url-${id2()??""}`},type:"url",get placeholder(){return MCP_SERVER_URL_PLACEHOLDER},get value(){return $$props.url},oninput:e=>$$props.onUrlChange(e.currentTarget.value),get class(){return get$3($0)}})}var node_1=sibling(node2,2);{var consequent=$$anchor2=>{
var p2=root_1$p(),text2=child(p2,!0);reset(p2),template_effect(()=>set_text(text2,urlError())),append($$anchor2,p2)};if_block(node_1,$$render=>{urlError()&&$$render(consequent)})}var node_2=sibling(node_1,2);{var consequent_2=$$anchor2=>{var label_1=root_2$F(),node_3=child(label_1);{let $0=user_derived(()=>!mcpStore.isProxyAvailable);Switch(node_3,{class:"mt-1",get id(){return`use-proxy-${id2()??""}`},get checked(){return useProxy()},get disabled(){return get$3($0)},onCheckedChange:checked=>$$props.
onUseProxyChange?.(checked)})}var span=sibling(node_3,2),node_4=sibling(child(span),4);{var consequent_1=$$anchor3=>{var span_1=root_3$x();append($$anchor3,span_1)};if_block(node_4,$$render=>{mcpStore.isProxyAvailable||$$render(consequent_1)})}reset(span),reset(label_1),template_effect(()=>set_class(label_1,1,clsx(["mt-3 flex items-start gap-2",mcpStore.isProxyAvailable&&"cursor-pointer",!mcpStore.isProxyAvailable&&"opacity-80"]))),append($$anchor2,label_1)};if_block(node_2,$$render=>{!get$3(isWebSocket)&&
$$props.onUseProxyChange&&$$render(consequent_2)})}reset(div_1);var node_5=sibling(div_1,2);KeyValuePairs(node_5,{class:"mt-2",get pairs(){return get$3(headerPairs)},onPairsChange:updateHeaderPairs,keyPlaceholder:"Header name",valuePlaceholder:"Value",addButtonLabel:"Add",emptyMessage:"No custom headers configured.",sectionLabel:"Custom Headers",sectionLabelOptional:!0}),reset(div),template_effect(()=>set_attribute(label,"for",`server-url-${id2()??""}`)),append($$anchor,div),pop()}var root$N=from_html(
"<div></div>");function Skeleton($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class"]);var div=root$N();attribute_effect(div,$0=>({"data-slot":"skeleton",class:$0,...restProps}),[()=>cn$1("animate-pulse rounded-md bg-accent",$$props.class)]),bind_this(div,$$value=>ref2($$value),()=>ref2()),append($$anchor,div),pop()}var root_4$n=from_html('<p class="text-xs text-destructive"> </p>'),root_5$f=from_html(
'<p class="line-clamp-2 text-xs text-muted-foreground"> </p>'),root_6$h=from_html('<div class="space-y-2"><div class="flex items-center gap-2"><!> <!></div> <div class="flex flex-wrap gap-1.5"><!> <!> <!></div></div> <div class="space-y-1.5"><div class="flex items-center gap-2"><!> <!></div></div>',1),root_7$e=from_html("<!> <!> <!>",1),root_12$7=from_html('<div class="flex flex-wrap items-center gap-1"><span class="text-[10px] text-muted-foreground"> </span></div>'),root_3$w=from_html('<!> <!> \
<!> <div class="grid gap-3"><!></div> <div class="flex justify-between gap-4"><!> <!></div>',1),root$M=from_html("<!> <!>",1);function McpServerCard($$anchor,$$props){push$1($$props,!0);let healthState=user_derived(()=>mcpStore.getHealthCheckState($$props.server.id)),displayName=user_derived(()=>mcpStore.getServerLabel($$props.server)),faviconUrl=user_derived(()=>mcpStore.getServerFavicon($$props.server.id)),isIdle=user_derived(()=>get$3(healthState).status===HealthCheckStatus.IDLE),isHealthChecking=user_derived(
()=>get$3(healthState).status===HealthCheckStatus.CONNECTING),isConnected=user_derived(()=>get$3(healthState).status===HealthCheckStatus.SUCCESS),isError=user_derived(()=>get$3(healthState).status===HealthCheckStatus.ERROR),showSkeleton=user_derived(()=>get$3(isIdle)||get$3(isHealthChecking)),errorMessage=user_derived(()=>get$3(healthState).status===HealthCheckStatus.ERROR?get$3(healthState).message:void 0),tools=user_derived(()=>get$3(healthState).status===HealthCheckStatus.SUCCESS?get$3(healthState).
tools:[]),connectionLogs=user_derived(()=>get$3(healthState).status===HealthCheckStatus.CONNECTING||get$3(healthState).status===HealthCheckStatus.SUCCESS||get$3(healthState).status===HealthCheckStatus.ERROR?get$3(healthState).logs:[]),successState=user_derived(()=>get$3(healthState).status===HealthCheckStatus.SUCCESS?get$3(healthState):null),serverInfo=user_derived(()=>get$3(successState)?.serverInfo),capabilities=user_derived(()=>get$3(successState)?.capabilities),transportType=user_derived(()=>get$3(
successState)?.transportType),protocolVersion=user_derived(()=>get$3(successState)?.protocolVersion),connectionTimeMs=user_derived(()=>get$3(successState)?.connectionTimeMs),instructions=user_derived(()=>get$3(successState)?.instructions),isEditing2=user_derived(()=>!$$props.server.url.trim()),showDeleteDialog=state$1(!1),editFormRef=state$1(null);function handleHealthCheck(){mcpStore.runHealthCheck($$props.server)}async function startEditing(){set$1(isEditing2,!0),await tick(),get$3(editFormRef)?.
setInitialValues($$props.server.url,$$props.server.headers||"",$$props.server.useProxy||!1)}function cancelEditing(){$$props.server.url.trim()?set$1(isEditing2,!1):$$props.onDelete()}function saveEditing(url2,headers,useProxy){$$props.onUpdate({url:url2,headers:headers||void 0,useProxy}),set$1(isEditing2,!1),$$props.server.enabled&&url2&&setTimeout(()=>mcpStore.runHealthCheck({...$$props.server,url:url2,useProxy}),100)}function handleDeleteClick(){set$1(showDeleteDialog,!0)}var fragment=root$M(),
node2=first_child(fragment);component(node2,()=>Card,($$anchor2,Card_Root)=>{Card_Root($$anchor2,{class:"!gap-3 bg-muted/30 p-4",children:($$anchor3,$$slotProps)=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);{var consequent=$$anchor4=>{bind_this(McpServerCardEditForm($$anchor4,{get serverId(){return $$props.server.id},get serverUrl(){return $$props.server.url},get serverUseProxy(){return $$props.server.useProxy},onSave:saveEditing,onCancel:cancelEditing}),$$value=>set$1(editFormRef,
$$value,!0),()=>get$3(editFormRef))},alternate_1=$$anchor4=>{var fragment_3=root_3$w(),node_2=first_child(fragment_3);{let $0=user_derived(()=>$$props.enabled??$$props.server.enabled);McpServerCardHeader(node_2,{get displayName(){return get$3(displayName)},get faviconUrl(){return get$3(faviconUrl)},get enabled(){return get$3($0)},get disabled(){return get$3(isError)},get onToggle(){return $$props.onToggle},get serverInfo(){return get$3(serverInfo)},get capabilities(){return get$3(capabilities)},
get transportType(){return get$3(transportType)}})}var node_3=sibling(node_2,2);{var consequent_1=$$anchor5=>{var p2=root_4$n(),text2=child(p2,!0);reset(p2),template_effect(()=>set_text(text2,get$3(errorMessage))),append($$anchor5,p2)};if_block(node_3,$$render=>{get$3(isError)&&get$3(errorMessage)&&$$render(consequent_1)})}var node_4=sibling(node_3,2);{var consequent_2=$$anchor5=>{var p_1=root_5$f(),text_1=child(p_1,!0);reset(p_1),template_effect(()=>set_text(text_1,get$3(serverInfo).description)),
append($$anchor5,p_1)};if_block(node_4,$$render=>{get$3(isConnected)&&get$3(serverInfo)?.description&&$$render(consequent_2)})}var div=sibling(node_4,2),node_5=child(div);{var consequent_3=$$anchor5=>{var fragment_4=root_6$h(),div_1=first_child(fragment_4),div_2=child(div_1),node_6=child(div_2);Skeleton(node_6,{class:"h-4 w-4 rounded"});var node_7=sibling(node_6,2);Skeleton(node_7,{class:"h-3 w-24"}),reset(div_2);var div_3=sibling(div_2,2),node_8=child(div_3);Skeleton(node_8,{class:"h-5 w-16 rou\
nded-full"});var node_9=sibling(node_8,2);Skeleton(node_9,{class:"h-5 w-20 rounded-full"});var node_10=sibling(node_9,2);Skeleton(node_10,{class:"h-5 w-14 rounded-full"}),reset(div_3),reset(div_1);var div_4=sibling(div_1,2),div_5=child(div_4),node_11=child(div_5);Skeleton(node_11,{class:"h-4 w-4 rounded"});var node_12=sibling(node_11,2);Skeleton(node_12,{class:"h-3 w-32"}),reset(div_5),reset(div_4),append($$anchor5,fragment_4)},alternate=$$anchor5=>{var fragment_5=root_7$e(),node_13=first_child(
fragment_5);{var consequent_4=$$anchor6=>{McpServerInfo($$anchor6,{get instructions(){return get$3(instructions)}})};if_block(node_13,$$render=>{get$3(isConnected)&&get$3(instructions)&&$$render(consequent_4)})}var node_14=sibling(node_13,2);{var consequent_5=$$anchor6=>{McpServerCardToolsList($$anchor6,{get tools(){return get$3(tools)}})};if_block(node_14,$$render=>{get$3(tools).length>0&&$$render(consequent_5)})}var node_15=sibling(node_14,2);{var consequent_6=$$anchor6=>{McpConnectionLogs($$anchor6,
{get logs(){return get$3(connectionLogs)},get connectionTimeMs(){return get$3(connectionTimeMs)}})};if_block(node_15,$$render=>{get$3(connectionLogs).length>0&&$$render(consequent_6)})}append($$anchor5,fragment_5)};if_block(node_5,$$render=>{get$3(showSkeleton)?$$render(consequent_3):$$render(alternate,-1)})}reset(div);var div_6=sibling(div,2),node_16=child(div_6);{var consequent_7=$$anchor5=>{Skeleton($$anchor5,{class:"h-3 w-28"})},consequent_8=$$anchor5=>{var div_7=root_12$7(),span=child(div_7),
text_2=child(span);reset(span),reset(div_7),template_effect(()=>set_text(text_2,`Protocol version: ${get$3(protocolVersion)??""}`)),append($$anchor5,div_7)};if_block(node_16,$$render=>{get$3(showSkeleton)?$$render(consequent_7):get$3(protocolVersion)&&$$render(consequent_8,1)})}var node_17=sibling(node_16,2);McpServerCardActions(node_17,{get isHealthChecking(){return get$3(isHealthChecking)},onEdit:startEditing,onRefresh:handleHealthCheck,onDelete:handleDeleteClick}),reset(div_6),append($$anchor4,
fragment_3)};if_block(node_1,$$render=>{get$3(isEditing2)?$$render(consequent):$$render(alternate_1,-1)})}append($$anchor3,fragment_1)},$$slots:{default:!0}})});var node_18=sibling(node2,2);McpServerCardDeleteDialog(node_18,{get displayName(){return get$3(displayName)},onOpenChange:open2=>set$1(showDeleteDialog,open2,!0),get onConfirm(){return $$props.onDelete},get open(){return get$3(showDeleteDialog)},set open($$value){set$1(showDeleteDialog,$$value,!0)}}),append($$anchor,fragment),pop()}var root_3$v=from_html(
"<!> ",1),root_1$o=from_html('<div class="flex flex-wrap items-center gap-1.5"><!> <!></div>'),root$L=from_html('<div class="space-y-3"><div class="flex items-start justify-between gap-3"><div class="flex min-w-0 flex-col gap-3"><div class="inline-flex items-center gap-2"><!></div> <!></div> <div class="flex shrink-0 items-center pl-2"><!></div></div></div>');function McpServerCardHeader($$anchor,$$props){push$1($$props,!0);let disabled=prop($$props,"disabled",3,!1);var div=root$L(),div_1=child(
div),div_2=child(div_1),div_3=child(div_2),node2=child(div_3);McpServerIdentity(node2,{get displayName(){return $$props.displayName},get faviconUrl(){return $$props.faviconUrl},get serverInfo(){return $$props.serverInfo},iconClass:"h-5 w-5",iconRounded:"rounded",nameClass:"leading-6 font-medium"}),reset(div_3);var node_1=sibling(div_3,2);{var consequent_3=$$anchor2=>{var div_4=root_1$o(),node_2=child(div_4);{var consequent_1=$$anchor3=>{const TransportIcon=user_derived(()=>MCP_TRANSPORT_ICONS[$$props.
transportType]);Badge($$anchor3,{variant:"outline",class:"h-5 gap-1 px-1.5 text-[10px]",children:($$anchor4,$$slotProps)=>{var fragment_1=root_3$v(),node_3=first_child(fragment_1);{var consequent=$$anchor5=>{var fragment_2=comment$2(),node_4=first_child(fragment_2);component(node_4,()=>get$3(TransportIcon),($$anchor6,TransportIcon_1)=>{TransportIcon_1($$anchor6,{class:"h-3 w-3"})}),append($$anchor5,fragment_2)};if_block(node_3,$$render=>{get$3(TransportIcon)&&$$render(consequent)})}var text2=sibling(
node_3);template_effect(()=>set_text(text2,` ${(MCP_TRANSPORT_LABELS[$$props.transportType]||$$props.transportType)??""}`)),append($$anchor4,fragment_1)},$$slots:{default:!0}})};if_block(node_2,$$render=>{$$props.transportType&&$$render(consequent_1)})}var node_5=sibling(node_2,2);{var consequent_2=$$anchor3=>{McpCapabilitiesBadges($$anchor3,{get capabilities(){return $$props.capabilities}})};if_block(node_5,$$render=>{$$props.capabilities&&$$render(consequent_2)})}reset(div_4),append($$anchor2,
div_4)};if_block(node_1,$$render=>{($$props.capabilities||$$props.transportType)&&$$render(consequent_3)})}reset(div_2);var div_5=sibling(div_2,2),node_6=child(div_5);Switch(node_6,{get checked(){return $$props.enabled},get disabled(){return disabled()},get onCheckedChange(){return $$props.onToggle}}),reset(div_5),reset(div_1),reset(div),append($$anchor,div),pop()}var root$K=from_html('<div class="flex shrink-0 items-center gap-1"><!> <!> <!></div>');function McpServerCardActions($$anchor,$$props){
var div=root$K(),node2=child(div);Button(node2,{variant:"ghost",size:"icon",class:"h-7 w-7",get onclick(){return $$props.onEdit},"aria-label":"Edit",children:($$anchor2,$$slotProps)=>{Pencil($$anchor2,{class:"h-3.5 w-3.5"})},$$slots:{default:!0}});var node_1=sibling(node2,2);Button(node_1,{variant:"ghost",size:"icon",class:"h-7 w-7",get onclick(){return $$props.onRefresh},get disabled(){return $$props.isHealthChecking},"aria-label":"Refresh",children:($$anchor2,$$slotProps)=>{Refresh_cw($$anchor2,
{class:"h-3.5 w-3.5"})},$$slots:{default:!0}});var node_2=sibling(node_1,2);Button(node_2,{variant:"ghost",size:"icon",class:"hover:text-destructive-foreground h-7 w-7 text-destructive hover:bg-destructive/10",get onclick(){return $$props.onDelete},"aria-label":"Delete",children:($$anchor2,$$slotProps)=>{Trash_2($$anchor2,{class:"h-3.5 w-3.5"})},$$slots:{default:!0}}),reset(div),append($$anchor,div)}var root_2$E=from_html("<!> <span> </span>",1),root_8$h=from_html('<p class="mt-1 text-xs text-mu\
ted-foreground"> </p>'),root_6$g=from_html("<div><!> <!></div>"),root_5$e=from_html('<div class="max-h-64 space-y-3 overflow-y-auto"></div>'),root_1$n=from_html("<!> <!>",1);function McpServerCardToolsList($$anchor,$$props){push$1($$props,!0);let isExpanded=state$1(!1),toolsCount=user_derived(()=>$$props.tools.length);var fragment=comment$2(),node2=first_child(fragment);component(node2,()=>Collapsible,($$anchor2,Collapsible_Root)=>{Collapsible_Root($$anchor2,{get open(){return get$3(isExpanded)},
set open($$value){set$1(isExpanded,$$value,!0)},children:($$anchor3,$$slotProps)=>{var fragment_1=root_1$n(),node_1=first_child(fragment_1);component(node_1,()=>Collapsible_trigger,($$anchor4,Collapsible_Trigger)=>{Collapsible_Trigger($$anchor4,{class:"flex w-full items-center gap-1 text-xs text-muted-foreground hover:text-foreground",children:($$anchor5,$$slotProps2)=>{var fragment_2=root_2$E(),node_2=first_child(fragment_2);{var consequent=$$anchor6=>{Chevron_down($$anchor6,{class:"h-3.5 w-3.5"})},
alternate=$$anchor6=>{Chevron_right($$anchor6,{class:"h-3.5 w-3.5"})};if_block(node_2,$$render=>{get$3(isExpanded)?$$render(consequent):$$render(alternate,-1)})}var span=sibling(node_2,2),text2=child(span);reset(span),template_effect(()=>set_text(text2,`${get$3(toolsCount)??""} tools available · Show details`)),append($$anchor5,fragment_2)},$$slots:{default:!0}})});var node_3=sibling(node_1,2);component(node_3,()=>Collapsible_content,($$anchor4,Collapsible_Content)=>{Collapsible_Content($$anchor4,
{class:"mt-2",children:($$anchor5,$$slotProps2)=>{var div=root_5$e();each(div,21,()=>$$props.tools,tool=>tool.name,($$anchor6,tool)=>{var div_1=root_6$g(),node_4=child(div_1);Badge(node_4,{variant:"secondary",children:($$anchor7,$$slotProps3)=>{next$1();var text_1=text$8();template_effect(()=>set_text(text_1,get$3(tool).name)),append($$anchor7,text_1)},$$slots:{default:!0}});var node_5=sibling(node_4,2);{var consequent_1=$$anchor7=>{var p2=root_8$h(),text_2=child(p2,!0);reset(p2),template_effect(
()=>set_text(text_2,get$3(tool).description)),append($$anchor7,p2)};if_block(node_5,$$render=>{get$3(tool).description&&$$render(consequent_1)})}reset(div_1),append($$anchor6,div_1)}),reset(div),append($$anchor5,div)},$$slots:{default:!0}})}),append($$anchor3,fragment_1)},$$slots:{default:!0}})}),append($$anchor,fragment),pop()}var root$J=from_html('<div class="space-y-4"><p class="font-medium">Configure Server</p> <!> <div class="flex items-center justify-end gap-2"><!> <!></div></div>');function McpServerCardEditForm($$anchor,$$props){
push$1($$props,!0);let serverUseProxy=prop($$props,"serverUseProxy",3,!1),editUrl=user_derived(()=>$$props.serverUrl),editHeaders=state$1(""),editUseProxy=user_derived(serverUseProxy),urlError=user_derived(()=>{if(!get$3(editUrl).trim())return"URL is required";try{return new URL(get$3(editUrl)),null}catch{return"Invalid URL format"}}),canSave=user_derived(()=>!get$3(urlError));function handleSave(){get$3(canSave)&&$$props.onSave(get$3(editUrl).trim(),get$3(editHeaders).trim(),get$3(editUseProxy))}
function setInitialValues(url2,headers,useProxy){set$1(editUrl,url2),set$1(editHeaders,headers,!0),set$1(editUseProxy,useProxy)}var $$exports={setInitialValues},div=root$J(),node2=sibling(child(div),2);{let $0=user_derived(()=>get$3(editUrl)?get$3(urlError):null);McpServerForm(node2,{get url(){return get$3(editUrl)},get headers(){return get$3(editHeaders)},get useProxy(){return get$3(editUseProxy)},onUrlChange:v=>set$1(editUrl,v),onHeadersChange:v=>set$1(editHeaders,v,!0),onUseProxyChange:v=>set$1(
editUseProxy,v),get urlError(){return get$3($0)},get id(){return $$props.serverId}})}var div_1=sibling(node2,2),node_1=child(div_1);Button(node_1,{variant:"secondary",size:"sm",get onclick(){return $$props.onCancel},children:($$anchor2,$$slotProps)=>{next$1();var text2=text$8("Cancel");append($$anchor2,text2)},$$slots:{default:!0}});var node_2=sibling(node_1,2);{let $0=user_derived(()=>!get$3(canSave));Button(node_2,{size:"sm",onclick:handleSave,get disabled(){return get$3($0)},children:($$anchor2,$$slotProps)=>{
next$1();var text_1=text$8();template_effect($02=>set_text(text_1,$02),[()=>$$props.serverUrl.trim()?"Update":"Add"]),append($$anchor2,text_1)},$$slots:{default:!0}})}return reset(div_1),reset(div),append($$anchor,div),pop($$exports)}function Alert_dialog_title($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class"]);var fragment=comment$2(),node2=first_child(fragment);{let $0=user_derived(()=>cn$1("te\
xt-lg font-semibold",$$props.class));component(node2,()=>Dialog_title$1,($$anchor2,AlertDialogPrimitive_Title)=>{AlertDialogPrimitive_Title($$anchor2,spread_props({"data-slot":"alert-dialog-title",get class(){return get$3($0)}},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)}}))})}append($$anchor,fragment),pop()}function Alert_dialog_action($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy",
"ref","class"]);var fragment=comment$2(),node2=first_child(fragment);{let $0=user_derived(()=>cn$1(buttonVariants(),$$props.class));component(node2,()=>Alert_dialog_action$1,($$anchor2,AlertDialogPrimitive_Action)=>{AlertDialogPrimitive_Action($$anchor2,spread_props({"data-slot":"alert-dialog-action",get class(){return get$3($0)}},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)}}))})}append($$anchor,fragment),pop()}function Alert_dialog_cancel($$anchor,$$props){push$1($$props,
!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class"]);var fragment=comment$2(),node2=first_child(fragment);{let $0=user_derived(()=>cn$1(buttonVariants({variant:"outline"}),$$props.class));component(node2,()=>Alert_dialog_cancel$1,($$anchor2,AlertDialogPrimitive_Cancel)=>{AlertDialogPrimitive_Cancel($$anchor2,spread_props({"data-slot":"alert-dialog-cancel",get class(){return get$3($0)}},()=>restProps,{get ref(){return ref2()},set ref($$value){
ref2($$value)}}))})}append($$anchor,fragment),pop()}var root$I=from_html("<div><!></div>");function Alert_dialog_footer($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class","children"]);var div=root$I();attribute_effect(div,$0=>({"data-slot":"alert-dialog-footer",class:$0,...restProps}),[()=>cn$1("mt-6 flex flex-row gap-2 sm:mt-0 sm:justify-end [&>*]:flex-1 sm:[&>*]:flex-none",$$props.class)]);var node2=child(
div);snippet(node2,()=>$$props.children??noop$3),reset(div),bind_this(div,$$value=>ref2($$value),()=>ref2()),append($$anchor,div),pop()}var root$H=from_html("<div><!></div>");function Alert_dialog_header($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class","children"]);var div=root$H();attribute_effect(div,$0=>({"data-slot":"alert-dialog-header",class:$0,...restProps}),[()=>cn$1("flex flex-col gap-2 \
text-center sm:text-left",$$props.class)]);var node2=child(div);snippet(node2,()=>$$props.children??noop$3),reset(div),bind_this(div,$$value=>ref2($$value),()=>ref2()),append($$anchor,div),pop()}function Alert_dialog_overlay($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class"]);var fragment=comment$2(),node2=first_child(fragment);{let $0=user_derived(()=>cn$1("fixed inset-0 z-50 bg-black/50 data-[st\
ate=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:fill-mode-forwards data-[state=open]:animate-in data-[state=open]:fade-in-0",$$props.class));component(node2,()=>Dialog_overlay$1,($$anchor2,AlertDialogPrimitive_Overlay)=>{AlertDialogPrimitive_Overlay($$anchor2,spread_props({"data-slot":"alert-dialog-overlay",get class(){return get$3($0)}},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)}}))})}append($$anchor,fragment),pop()}var root_1$m=from_html("\
<!> <!>",1);function Alert_dialog_content($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class","portalProps"]);var fragment=comment$2(),node2=first_child(fragment);component(node2,()=>Portal$2,($$anchor2,AlertDialogPrimitive_Portal)=>{AlertDialogPrimitive_Portal($$anchor2,spread_props(()=>$$props.portalProps,{children:($$anchor3,$$slotProps)=>{var fragment_1=root_1$m(),node_1=first_child(fragment_1);
Alert_dialog_overlay(node_1,{});var node_2=sibling(node_1,2);{let $0=user_derived(()=>cn$1("fixed z-[999999] grid w-full gap-4 border bg-background p-6 shadow-lg duration-200","right-0 bottom-0 left-0 max-h-[100dvh] translate-x-0 translate-y-0 overflow-y-auto rounded-t-lg","data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:fill-mode-forwards data-[state=closed]:slide-out-to-bottom-full","data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:s\
lide-in-from-bottom-full","sm:top-[50%] sm:right-auto sm:bottom-auto sm:left-[50%] sm:max-h-[100vh] sm:max-w-lg sm:translate-x-[-50%] sm:translate-y-[-50%] sm:rounded-lg","sm:data-[state=closed]:slide-out-to-bottom-0 sm:data-[state=closed]:zoom-out-95","sm:data-[state=open]:slide-in-from-bottom-0 sm:data-[state=open]:zoom-in-95",$$props.class));component(node_2,()=>Alert_dialog_content$1,($$anchor4,AlertDialogPrimitive_Content)=>{AlertDialogPrimitive_Content($$anchor4,spread_props({"data-slot":"\
alert-dialog-content",get class(){return get$3($0)}},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)}}))})}append($$anchor3,fragment_1)},$$slots:{default:!0}}))}),append($$anchor,fragment),pop()}function Alert_dialog_description($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class"]);var fragment=comment$2(),node2=first_child(fragment);{let $0=user_derived(()=>cn$1("text-sm text\
-muted-foreground",$$props.class));component(node2,()=>Dialog_description$1,($$anchor2,AlertDialogPrimitive_Description)=>{AlertDialogPrimitive_Description($$anchor2,spread_props({"data-slot":"alert-dialog-description",get class(){return get$3($0)}},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)}}))})}append($$anchor,fragment),pop()}const Root$1=Alert_dialog,Portal=Portal$2;var root_5$d=from_html(`Are you sure you want to delete <strong> </strong>? This action cannot be
				undone.`,1),root_3$u=from_html("<!> <!>",1),root_6$f=from_html("<!> <!>",1),root_2$D=from_html("<!> <!>",1);function McpServerCardDeleteDialog($$anchor,$$props){push$1($$props,!0);let open2=prop($$props,"open",15);var fragment=comment$2(),node2=first_child(fragment);component(node2,()=>Root$1,($$anchor2,AlertDialog_Root)=>{AlertDialog_Root($$anchor2,{get onOpenChange(){return $$props.onOpenChange},get open(){return open2()},set open($$value){open2($$value)},children:($$anchor3,$$slotProps)=>{
var fragment_1=comment$2(),node_1=first_child(fragment_1);component(node_1,()=>Alert_dialog_content,($$anchor4,AlertDialog_Content)=>{AlertDialog_Content($$anchor4,{children:($$anchor5,$$slotProps2)=>{var fragment_2=root_2$D(),node_2=first_child(fragment_2);component(node_2,()=>Alert_dialog_header,($$anchor6,AlertDialog_Header)=>{AlertDialog_Header($$anchor6,{children:($$anchor7,$$slotProps3)=>{var fragment_3=root_3$u(),node_3=first_child(fragment_3);component(node_3,()=>Alert_dialog_title,($$anchor8,AlertDialog_Title)=>{
AlertDialog_Title($$anchor8,{children:($$anchor9,$$slotProps4)=>{next$1();var text2=text$8("Delete Server");append($$anchor9,text2)},$$slots:{default:!0}})});var node_4=sibling(node_3,2);component(node_4,()=>Alert_dialog_description,($$anchor8,AlertDialog_Description)=>{AlertDialog_Description($$anchor8,{children:($$anchor9,$$slotProps4)=>{next$1();var fragment_4=root_5$d(),strong2=sibling(first_child(fragment_4)),text_1=child(strong2,!0);reset(strong2),next$1(),template_effect(()=>set_text(text_1,
$$props.displayName)),append($$anchor9,fragment_4)},$$slots:{default:!0}})}),append($$anchor7,fragment_3)},$$slots:{default:!0}})});var node_5=sibling(node_2,2);component(node_5,()=>Alert_dialog_footer,($$anchor6,AlertDialog_Footer)=>{AlertDialog_Footer($$anchor6,{children:($$anchor7,$$slotProps3)=>{var fragment_5=root_6$f(),node_6=first_child(fragment_5);component(node_6,()=>Alert_dialog_cancel,($$anchor8,AlertDialog_Cancel)=>{AlertDialog_Cancel($$anchor8,{children:($$anchor9,$$slotProps4)=>{next$1();
var text_2=text$8("Cancel");append($$anchor9,text_2)},$$slots:{default:!0}})});var node_7=sibling(node_6,2);component(node_7,()=>Alert_dialog_action,($$anchor8,AlertDialog_Action)=>{AlertDialog_Action($$anchor8,{class:"text-destructive-foreground bg-destructive hover:bg-destructive/90",get onclick(){return $$props.onConfirm},children:($$anchor9,$$slotProps4)=>{next$1();var text_3=text$8("Delete");append($$anchor9,text_3)},$$slots:{default:!0}})}),append($$anchor7,fragment_5)},$$slots:{default:!0}})}),
append($$anchor5,fragment_2)},$$slots:{default:!0}})}),append($$anchor3,fragment_1)},$$slots:{default:!0}})}),append($$anchor,fragment),pop()}var root_1$l=from_html('<div class="flex items-center justify-between gap-4"><div class="flex items-center gap-2"><!> <!> <!></div> <!></div> <div class="flex flex-wrap gap-1.5"><!> <!> <!></div> <div class="space-y-1.5"><!> <!></div> <!> <div class="flex justify-end gap-2"><!> <!> <!></div>',1);function McpServerCardSkeleton($$anchor){Card($$anchor,{class:"\
grid gap-3 p-4",children:($$anchor2,$$slotProps)=>{var fragment_1=root_1$l(),div=first_child(fragment_1),div_1=child(div),node2=child(div_1);Skeleton(node2,{class:"h-5 w-5 rounded"});var node_1=sibling(node2,2);Skeleton(node_1,{class:"h-5 w-28"});var node_2=sibling(node_1,2);Skeleton(node_2,{class:"h-5 w-12 rounded-full"}),reset(div_1);var node_3=sibling(div_1,2);Skeleton(node_3,{class:"h-6 w-11 rounded-full"}),reset(div);var div_2=sibling(div,2),node_4=child(div_2);Skeleton(node_4,{class:"h-5 w\
-14 rounded-full"});var node_5=sibling(node_4,2);Skeleton(node_5,{class:"h-5 w-12 rounded-full"});var node_6=sibling(node_5,2);Skeleton(node_6,{class:"h-5 w-16 rounded-full"}),reset(div_2);var div_3=sibling(div_2,2),node_7=child(div_3);Skeleton(node_7,{class:"h-4 w-40"});var node_8=sibling(node_7,2);Skeleton(node_8,{class:"h-4 w-52"}),reset(div_3);var node_9=sibling(div_3,2);Skeleton(node_9,{class:"h-3.5 w-36"});var div_4=sibling(node_9,2),node_10=child(div_4);Skeleton(node_10,{class:"h-8 w-8 ro\
unded"});var node_11=sibling(node_10,2);Skeleton(node_11,{class:"h-8 w-8 rounded"});var node_12=sibling(node_11,2);Skeleton(node_12,{class:"h-8 w-8 rounded"}),reset(div_4),append($$anchor2,fragment_1)},$$slots:{default:!0}})}var root_1$k=from_html('<img alt=""/>'),root_4$m=from_html('<a target="_blank" rel="noopener noreferrer" class="shrink-0 text-muted-foreground hover:text-foreground" aria-label="Open website"><!></a>'),root$G=from_html('<span class="flex min-w-0 items-center gap-1.5"><!> <!>\
 <!> <!></span>');function McpServerIdentity($$anchor,$$props){push$1($$props,!0);let faviconUrl=prop($$props,"faviconUrl",3,null),iconClass=prop($$props,"iconClass",3,"h-5 w-5"),iconRounded=prop($$props,"iconRounded",3,"rounded-sm"),showVersion=prop($$props,"showVersion",3,!0),showWebsite=prop($$props,"showWebsite",3,!0),safeWebsiteUrl=user_derived(()=>$$props.serverInfo?.websiteUrl?sanitizeExternalUrl($$props.serverInfo.websiteUrl):null);var span=root$G(),node2=child(span);{var consequent=$$anchor2=>{
var img=root_1$k();template_effect(()=>{set_attribute(img,"src",faviconUrl()),set_class(img,1,clsx(["shrink-0",iconRounded(),iconClass()]))}),event("error",img,e=>{e.currentTarget.style.display="none"}),replay_events(img),append($$anchor2,img)};if_block(node2,$$render=>{faviconUrl()&&$$render(consequent)})}var node_1=sibling(node2,2);{let $0=user_derived(()=>$$props.displayName??""),$1=user_derived(()=>$$props.nameClass??"");TruncatedText(node_1,{get text(){return get$3($0)},get class(){return get$3(
$1)}})}var node_2=sibling(node_1,2);{var consequent_1=$$anchor2=>{Badge($$anchor2,{variant:"secondary",class:"h-4 min-w-0 shrink px-1 text-[10px]",children:($$anchor3,$$slotProps)=>{{let $0=user_derived(()=>`v${$$props.serverInfo.version}`);TruncatedText($$anchor3,{get text(){return get$3($0)}})}},$$slots:{default:!0}})};if_block(node_2,$$render=>{showVersion()&&$$props.serverInfo?.version&&$$render(consequent_1)})}var node_3=sibling(node_2,2);{var consequent_2=$$anchor2=>{var a=root_4$m(),node_4=child(
a);External_link(node_4,{class:"h-3 w-3"}),reset(a),template_effect(()=>set_attribute(a,"href",get$3(safeWebsiteUrl))),delegated("click",a,e=>e.stopPropagation()),append($$anchor2,a)};if_block(node_3,$$render=>{showWebsite()&&get$3(safeWebsiteUrl)&&$$render(consequent_2)})}reset(span),append($$anchor,span),pop()}delegate(["click"]);var root_3$t=from_html("<!> <span>Server instructions</span>",1),root_6$e=from_html('<p class="rounded bg-muted/50 p-2 text-xs text-muted-foreground"> </p>'),root_2$C=from_html(
"<!> <!>",1);function McpServerInfo($$anchor,$$props){let isExpanded=state$1(!1);var fragment=comment$2(),node2=first_child(fragment);{var consequent_1=$$anchor2=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);component(node_1,()=>Collapsible,($$anchor3,Collapsible_Root)=>{Collapsible_Root($$anchor3,{get class(){return $$props.class},get open(){return get$3(isExpanded)},set open($$value){set$1(isExpanded,$$value,!0)},children:($$anchor4,$$slotProps)=>{var fragment_2=root_2$C(),node_2=first_child(
fragment_2);component(node_2,()=>Collapsible_trigger,($$anchor5,Collapsible_Trigger)=>{Collapsible_Trigger($$anchor5,{class:"flex w-full items-center gap-1 text-xs text-muted-foreground hover:text-foreground",children:($$anchor6,$$slotProps2)=>{var fragment_3=root_3$t(),node_3=first_child(fragment_3);{var consequent=$$anchor7=>{Chevron_down($$anchor7,{class:"h-3.5 w-3.5"})},alternate=$$anchor7=>{Chevron_right($$anchor7,{class:"h-3.5 w-3.5"})};if_block(node_3,$$render=>{get$3(isExpanded)?$$render(
consequent):$$render(alternate,-1)})}next$1(2),append($$anchor6,fragment_3)},$$slots:{default:!0}})});var node_4=sibling(node_2,2);component(node_4,()=>Collapsible_content,($$anchor5,Collapsible_Content)=>{Collapsible_Content($$anchor5,{class:"mt-2",children:($$anchor6,$$slotProps2)=>{var p2=root_6$e(),text2=child(p2,!0);reset(p2),template_effect(()=>set_text(text2,$$props.instructions)),append($$anchor6,p2)},$$slots:{default:!0}})}),append($$anchor4,fragment_2)},$$slots:{default:!0}})}),append(
$$anchor2,fragment_1)};if_block(node2,$$render=>{$$props.instructions&&$$render(consequent_1)})}append($$anchor,fragment)}var root_2$B=from_html('<span class="text-xs text-muted-foreground/50">...</span>'),root_1$j=from_html('<span> <span class="text-destructive">*</span></span> <!>',1),root_4$l=from_html('<button type="button"> </button>'),root_3$s=from_html('<div class="absolute top-full right-0 left-0 z-10 mt-1 max-h-32 overflow-y-auto rounded-lg border border-border/50 bg-background shadow-l\
g"></div>'),root$F=from_html('<div class="relative grid gap-1"><!> <!> <!></div>');function InputWithSuggestions($$anchor,$$props){push$1($$props,!0);let value=prop($$props,"value",3,""),suggestions=prop($$props,"suggestions",19,()=>[]),isLoadingSuggestions=prop($$props,"isLoadingSuggestions",3,!1),isAutocompleteActive=prop($$props,"isAutocompleteActive",3,!1),autocompleteIndex=prop($$props,"autocompleteIndex",3,0);var div=root$F(),node2=child(div);Label(node2,{get for(){return`tpl-arg-${$$props.
name??""}`},class:"mb-1 text-muted-foreground",children:($$anchor2,$$slotProps)=>{var fragment=root_1$j(),span=first_child(fragment),text2=child(span);next$1(),reset(span);var node_1=sibling(span,2);{var consequent=$$anchor3=>{var span_1=root_2$B();append($$anchor3,span_1)};if_block(node_1,$$render=>{isLoadingSuggestions()&&$$render(consequent)})}template_effect(()=>set_text(text2,`${$$props.name??""} `)),append($$anchor2,fragment)},$$slots:{default:!0}});var node_2=sibling(node2,2);Input(node_2,
{get id(){return`tpl-arg-${$$props.name??""}`},type:"text",get value(){return value()},oninput:e=>$$props.onInput(e.currentTarget.value),get onkeydown(){return $$props.onKeydown},get onblur(){return $$props.onBlur},get onfocus(){return $$props.onFocus},get placeholder(){return`Enter ${$$props.name??""}`},autocomplete:"off"});var node_3=sibling(node_2,2);{var consequent_1=$$anchor2=>{var div_1=root_3$s();each(div_1,22,suggestions,suggestion=>suggestion,($$anchor3,suggestion,i)=>{var button=root_4$l(),
text_1=child(button,!0);reset(button),template_effect(()=>{set_class(button,1,`w-full px-3 py-1.5 text-left text-sm hover:bg-accent ${get$3(i)===autocompleteIndex()?"bg-accent":""}`),set_text(text_1,suggestion)}),delegated("mousedown",button,()=>$$props.onSelectSuggestion(suggestion)),append($$anchor3,button)}),reset(div_1),transition(3,div_1,()=>fly,()=>({y:-5,duration:100})),append($$anchor2,div_1)};if_block(node_3,$$render=>{isAutocompleteActive()&&suggestions().length>0&&$$render(consequent_1)})}
reset(div),append($$anchor,div),pop()}delegate(["mousedown"]);var root_2$A=from_html('<span class="text-muted-foreground">(optional)</span>'),root_1$i=from_html('<span class="text-xs font-medium"> <!></span>'),root_4$k=from_html('<div class="flex items-start gap-2"><!> <textarea class="flex-1 resize-none rounded-md border border-input bg-transparent px-3 py-2 text-sm leading-5 placeholder:text-muted-foreground focus-visible:ring-1 focus-visible:ring-ring focus-visible:outline-none" rows="1"></te\
xtarea> <button type="button" class="mt-1.5 shrink-0 cursor-pointer rounded-md p-1 text-muted-foreground hover:bg-destructive/10 hover:text-destructive" aria-label="Remove item"><!></button></div>'),root_3$r=from_html('<div class="space-y-3"></div>'),root_5$c=from_html('<p class="text-xs text-muted-foreground"> </p>'),root$E=from_html('<div><div class="mb-2 flex items-center justify-between"><!> <button type="button" class="inline-flex cursor-pointer items-center gap-1 rounded-md px-1.5 py-1 tex\
t-xs text-muted-foreground hover:bg-muted hover:text-foreground"><!> </button></div> <!></div>');function KeyValuePairs($$anchor,$$props){push$1($$props,!0);let className=prop($$props,"class",3,""),keyPlaceholder=prop($$props,"keyPlaceholder",3,"Key"),valuePlaceholder=prop($$props,"valuePlaceholder",3,"Value"),addButtonLabel=prop($$props,"addButtonLabel",3,"Add"),emptyMessage=prop($$props,"emptyMessage",3,"No items configured."),sectionLabelOptional=prop($$props,"sectionLabelOptional",3,!0);function addPair(){
$$props.onPairsChange([...$$props.pairs,{key:"",value:""}])}function removePair(index2){$$props.onPairsChange($$props.pairs.filter((_,i)=>i!==index2))}function updatePairKey(index2,rawKey){const key2=sanitizeKeyValuePairKey(rawKey),newPairs=[...$$props.pairs];newPairs[index2]={...newPairs[index2],key:key2},$$props.onPairsChange(newPairs)}function trimPairKey(index2,key2){const trimmed=key2.trim();if(trimmed===key2)return;const newPairs=[...$$props.pairs];newPairs[index2]={...newPairs[index2],key:trimmed},
$$props.onPairsChange(newPairs)}function updatePairValue(index2,rawValue){const value=sanitizeKeyValuePairValue(rawValue),newPairs=[...$$props.pairs];newPairs[index2]={...newPairs[index2],value},$$props.onPairsChange(newPairs)}function trimPairValue(index2,value){const trimmed=value.trim();if(trimmed===value)return;const newPairs=[...$$props.pairs];newPairs[index2]={...newPairs[index2],value:trimmed},$$props.onPairsChange(newPairs)}var div=root$E(),div_1=child(div),node2=child(div_1);{var consequent_1=$$anchor2=>{
var span=root_1$i(),text2=child(span),node_1=sibling(text2);{var consequent=$$anchor3=>{var span_1=root_2$A();append($$anchor3,span_1)};if_block(node_1,$$render=>{sectionLabelOptional()&&$$render(consequent)})}reset(span),template_effect(()=>set_text(text2,`${$$props.sectionLabel??""} `)),append($$anchor2,span)};if_block(node2,$$render=>{$$props.sectionLabel&&$$render(consequent_1)})}var button=sibling(node2,2),node_2=child(button);Plus(node_2,{class:"h-3 w-3"});var text_1=sibling(node_2);reset(
button),reset(div_1);var node_3=sibling(div_1,2);{var consequent_2=$$anchor2=>{var div_2=root_3$r();each(div_2,21,()=>$$props.pairs,index$2,($$anchor3,pair,index2)=>{var div_3=root_4$k(),node_4=child(div_3);Input(node_4,{type:"text",get placeholder(){return keyPlaceholder()},get value(){return get$3(pair).key},get maxlength(){return KEY_VALUE_PAIR_KEY_MAX_LENGTH},oninput:e=>updatePairKey(index2,e.currentTarget.value),onblur:e=>trimPairKey(index2,e.currentTarget.value),class:"flex-1"});var textarea=sibling(
node_4,2);remove_textarea_child(textarea),action(textarea,$$node=>autoResizeTextarea?.($$node));var button_1=sibling(textarea,2),node_5=child(button_1);Trash_2(node_5,{class:"h-3.5 w-3.5"}),reset(button_1),reset(div_3),template_effect(()=>{set_attribute(textarea,"placeholder",valuePlaceholder()),set_value(textarea,get$3(pair).value),set_attribute(textarea,"maxlength",KEY_VALUE_PAIR_VALUE_MAX_LENGTH)}),delegated("input",textarea,e=>{updatePairValue(index2,e.currentTarget.value),autoResizeTextarea(
e.currentTarget)}),event("blur",textarea,e=>trimPairValue(index2,e.currentTarget.value)),delegated("click",button_1,()=>removePair(index2)),append($$anchor3,div_3)}),reset(div_2),append($$anchor2,div_2)},alternate=$$anchor2=>{var p2=root_5$c(),text_2=child(p2,!0);reset(p2),template_effect(()=>set_text(text_2,emptyMessage())),append($$anchor2,p2)};if_block(node_3,$$render=>{$$props.pairs.length>0?$$render(consequent_2):$$render(alternate,-1)})}reset(div),template_effect(()=>{set_class(div,1,clsx(
className())),set_text(text_1,` ${addButtonLabel()??""}`)}),delegated("click",button,addPair),append($$anchor,div),pop()}delegate(["click","input"]);var root$D=from_html('<div class="flex flex-col gap-2"><div class="mb-2 flex items-center gap-4"><!> <!></div> <h3 class="text-sm font-medium">Available resources</h3></div>');function McpResourcesBrowserHeader($$anchor,$$props){push$1($$props,!0);let searchQuery=prop($$props,"searchQuery",3,"");var div=root$D(),div_1=child(div),node2=child(div_1);SearchInput(
node2,{placeholder:"Search resources...",get value(){return searchQuery()},onInput:value=>$$props.onSearch?.(value)});var node_1=sibling(node2,2);Button(node_1,{variant:"ghost",size:"sm",class:"h-8 w-8 p-0",get onclick(){return $$props.onRefresh},get disabled(){return $$props.isLoading},title:"Refresh resources",children:($$anchor2,$$slotProps)=>{var fragment=comment$2(),node_2=first_child(fragment);{var consequent=$$anchor3=>{Loader_circle($$anchor3,{class:"h-4 w-4 animate-spin"})},alternate=$$anchor3=>{
Refresh_cw($$anchor3,{class:"h-4 w-4"})};if_block(node_2,$$render=>{$$props.isLoading?$$render(consequent):$$render(alternate,-1)})}append($$anchor2,fragment)},$$slots:{default:!0}}),reset(div_1),next$1(2),reset(div),append($$anchor,div),pop()}var root$C=from_html('<div class="py-4 text-center text-sm text-muted-foreground"><!></div>');function McpResourcesBrowserEmptyState($$anchor,$$props){var div=root$C(),node2=child(div);{var consequent=$$anchor2=>{var text2=text$8("Loading resources...");append(
$$anchor2,text2)},alternate=$$anchor2=>{var text_1=text$8("No resources available");append($$anchor2,text_1)};if_block(node2,$$render=>{$$props.isLoading?$$render(consequent):$$render(alternate,-1)})}reset(div),append($$anchor,div)}function resourceMatchesSearch(resource,query){return resource.title?.toLowerCase().includes(query)||resource.uri.toLowerCase().includes(query)}function buildResourceTree(resourceList,serverName,searchQuery){const root2={name:"root",children:new Map};if(!searchQuery||
!searchQuery.trim()){for(const resource of resourceList){const pathParts=parseResourcePath(resource.uri);let current2=root2;for(let i=0;i<pathParts.length-1;i++){const part=pathParts[i];current2.children.has(part)||current2.children.set(part,{name:part,children:new Map}),current2=current2.children.get(part)}const fileName=pathParts[pathParts.length-1]||resource.name;current2.children.set(resource.uri,{name:fileName,resource:{...resource,serverName},children:new Map})}return root2}const query=searchQuery.
toLowerCase();for(const resource of resourceList){if(!resourceMatchesSearch(resource,query))continue;const pathParts=parseResourcePath(resource.uri);let current2=root2;for(let i=0;i<pathParts.length-1;i++){const part=pathParts[i];current2.children.has(part)||current2.children.set(part,{name:part,children:new Map,isFiltered:!0}),current2=current2.children.get(part)}const fileName=pathParts[pathParts.length-1]||resource.name;current2.children.set(resource.uri,{name:fileName,resource:{...resource,serverName},
children:new Map,isFiltered:!0})}function cleanupEmptyFolders(node2){if(node2.resource)return!0;const toDelete=[];for(const[name,child2]of node2.children.entries())cleanupEmptyFolders(child2)||toDelete.push(name);for(const name of toDelete)node2.children.delete(name);return node2.children.size>0}return cleanupEmptyFolders(root2),root2}function countTreeResources(node2){if(node2.resource)return 1;let count=0;for(const child2 of node2.children.values())count+=countTreeResources(child2);return count}
function sortTreeChildren(children){return children.sort((a,b)=>{const aIsFolder=!a.resource&&a.children.size>0,bIsFolder=!b.resource&&b.children.size>0;return aIsFolder&&!bIsFolder?-1:!aIsFolder&&bIsFolder?1:a.name.localeCompare(b.name)})}var root_4$j=from_html('<!> <!> <span class="font-medium"> </span> <span class="text-xs text-muted-foreground"> </span>',1),root_7$d=from_html('<div class="ml-4 flex flex-col gap-0.5 border-l border-border/50 pl-2"></div>'),root_3$q=from_html("<!> <!>",1),root_9$a=from_html(
'<div class="group flex w-full items-center gap-2"><!> <button><!> <span class="min-w-0 flex-1 truncate text-left"> </span></button></div>'),root_12$6=from_html('<!> <span class="inline-flex flex-col items-start gap-1 text-left"><div class="inline-flex min-w-0 items-center gap-1.5"><!></div> <span class="text-xs text-muted-foreground"> <!>)</span></span> <!>',1),root_18$2=from_html('<div class="py-1 text-xs text-red-500"> </div>'),root_19$5=from_html('<div class="py-1 text-xs text-muted-foregrou\
nd">No resources</div>'),root_24=from_html('<div class="my-1 border-t border-border/30"></div>'),root_25$1=from_html('<button><!> <span class="min-w-0 flex-1 truncate text-left"> </span></button>'),root_23$2=from_html('<!> <div class="py-0.5 text-[11px] font-medium tracking-wide text-muted-foreground/70 uppercase">Templates</div> <!>',1),root_20$2=from_html("<!> <!>",1),root_17$3=from_html('<div class="ml-4 flex flex-col gap-0.5 border-l border-border/50 pl-2"><!></div>'),root_11$6=from_html("<!\
> <!>",1);function McpResourcesBrowserServerItem($$anchor,$$props){push$1($$props,!0);const renderTreeNode=($$anchor2,node2=noop$3,depth=noop$3,parentPath=noop$3)=>{const isFolder=user_derived(()=>!node2().resource&&node2().children.size>0),folderId=user_derived(()=>`${$$props.serverName}:${parentPath()}/${node2().name}`),isFolderExpanded=user_derived(()=>$$props.expandedFolders.has(get$3(folderId)));var fragment=comment$2(),node_1=first_child(fragment);{var consequent_1=$$anchor3=>{const folderCount=user_derived(
()=>countTreeResources(node2()));var fragment_1=comment$2(),node_2=first_child(fragment_1);component(node_2,()=>Collapsible,($$anchor4,Collapsible_Root)=>{Collapsible_Root($$anchor4,{get open(){return get$3(isFolderExpanded)},onOpenChange:()=>$$props.onToggleFolder(get$3(folderId)),children:($$anchor5,$$slotProps)=>{var fragment_2=root_3$q(),node_3=first_child(fragment_2);component(node_3,()=>Collapsible_trigger,($$anchor6,Collapsible_Trigger)=>{Collapsible_Trigger($$anchor6,{class:"flex w-full \
items-center gap-2 rounded px-2 py-1 text-sm hover:bg-muted/50",children:($$anchor7,$$slotProps2)=>{var fragment_3=root_4$j(),node_4=first_child(fragment_3);{var consequent=$$anchor8=>{Chevron_down($$anchor8,{class:"h-3 w-3"})},alternate=$$anchor8=>{Chevron_right($$anchor8,{class:"h-3 w-3"})};if_block(node_4,$$render=>{get$3(isFolderExpanded)?$$render(consequent):$$render(alternate,-1)})}var node_5=sibling(node_4,2);Folder_open(node_5,{class:"h-3.5 w-3.5 text-muted-foreground"});var span=sibling(
node_5,2),text2=child(span,!0);reset(span);var span_1=sibling(span,2),text_1=child(span_1);reset(span_1),template_effect(()=>{set_text(text2,node2().name),set_text(text_1,`(${get$3(folderCount)??""})`)}),append($$anchor7,fragment_3)},$$slots:{default:!0}})});var node_6=sibling(node_3,2);component(node_6,()=>Collapsible_content,($$anchor6,Collapsible_Content)=>{Collapsible_Content($$anchor6,{children:($$anchor7,$$slotProps2)=>{var div=root_7$d();each(div,21,()=>sortTreeChildren([...node2().children.
values()]),child2=>child2.resource?.uri||`${$$props.serverName}:${parentPath()}/${node2().name}/${child2.name}`,($$anchor8,child2)=>{renderTreeNode($$anchor8,()=>get$3(child2),()=>depth()+1,()=>`${parentPath()}/${node2().name}`)}),reset(div),append($$anchor7,div)},$$slots:{default:!0}})}),append($$anchor5,fragment_2)},$$slots:{default:!0}})}),append($$anchor3,fragment_1)},consequent_3=$$anchor3=>{const resource=user_derived(()=>node2().resource),ResourceIcon=user_derived(()=>getResourceIcon(get$3(
resource).mimeType,get$3(resource).uri)),isSelected=user_derived(()=>isResourceSelected(get$3(resource))),resourceDisplayName=user_derived(()=>get$3(resource).title||getDisplayName(node2().name));var div_1=root_9$a(),node_7=child(div_1);{var consequent_2=$$anchor4=>{Checkbox($$anchor4,{get checked(){return get$3(isSelected)},onCheckedChange:checked=>handleCheckboxChange(get$3(resource),checked===!0),class:"h-4 w-4"})};if_block(node_7,$$render=>{$$props.onToggle&&$$render(consequent_2)})}var button=sibling(
node_7,2),node_8=child(button);component(node_8,()=>get$3(ResourceIcon),($$anchor4,ResourceIcon_1)=>{ResourceIcon_1($$anchor4,{class:"h-3.5 w-3.5 shrink-0 text-muted-foreground"})});var span_2=sibling(node_8,2),text_2=child(span_2,!0);reset(span_2),reset(button),reset(div_1),template_effect(()=>{set_class(button,1,clsx(["flex flex-1 items-center gap-2 rounded px-2 py-1 text-left text-sm transition-colors","hover:bg-muted/50",get$3(isSelected)&&"bg-muted"])),set_attribute(button,"title",get$3(resourceDisplayName)),
set_text(text_2,get$3(resourceDisplayName))}),delegated("click",button,e=>handleResourceClick(get$3(resource),e)),append($$anchor3,div_1)};if_block(node_1,$$render=>{get$3(isFolder)?$$render(consequent_1):node2().resource&&$$render(consequent_3,1)})}append($$anchor2,fragment)};let searchQuery=prop($$props,"searchQuery",3,""),serverDisplayName=user_derived(()=>mcpStore.getServerDisplayName($$props.serverName)),serverFaviconUrl=user_derived(()=>mcpStore.getServerFavicon($$props.serverName));const hasResources=user_derived(
()=>$$props.serverRes.resources.length>0),hasTemplates=user_derived(()=>$$props.serverRes.templates.length>0),hasContent=user_derived(()=>get$3(hasResources)||get$3(hasTemplates)),resourceTree=user_derived(()=>buildResourceTree($$props.serverRes.resources,$$props.serverName,searchQuery())),templateInfos=user_derived(()=>$$props.serverRes.templates.map(t=>({uriTemplate:t.uriTemplate,name:t.name,title:t.title,description:t.description,mimeType:t.mimeType,serverName:$$props.serverName,annotations:t.
annotations,icons:t.icons})));function handleResourceClick(resource,event2){$$props.onSelect?.(resource,event2.shiftKey)}function handleCheckboxChange(resource,checked){$$props.onToggle?.(resource,checked)}function isResourceSelected(resource){return $$props.selectedUris.has(resource.uri)}var fragment_8=comment$2(),node_9=first_child(fragment_8);component(node_9,()=>Collapsible,($$anchor2,Collapsible_Root_1)=>{Collapsible_Root_1($$anchor2,{get open(){return $$props.isExpanded},get onOpenChange(){
return $$props.onToggleServer},children:($$anchor3,$$slotProps)=>{var fragment_9=root_11$6(),node_10=first_child(fragment_9);component(node_10,()=>Collapsible_trigger,($$anchor4,Collapsible_Trigger_1)=>{Collapsible_Trigger_1($$anchor4,{class:"flex w-full items-center gap-2 rounded px-2 py-1.5 text-sm hover:bg-muted/50",children:($$anchor5,$$slotProps2)=>{var fragment_10=root_12$6(),node_11=first_child(fragment_10);{var consequent_4=$$anchor6=>{Chevron_down($$anchor6,{class:"h-3.5 w-3.5"})},alternate_1=$$anchor6=>{
Chevron_right($$anchor6,{class:"h-3.5 w-3.5"})};if_block(node_11,$$render=>{$$props.isExpanded?$$render(consequent_4):$$render(alternate_1,-1)})}var span_3=sibling(node_11,2),div_2=child(span_3),node_12=child(div_2);McpServerIdentity(node_12,{get displayName(){return get$3(serverDisplayName)},get faviconUrl(){return get$3(serverFaviconUrl)},iconClass:"h-4 w-4",showVersion:!1}),reset(div_2);var span_4=sibling(div_2,2),text_3=child(span_4),node_13=sibling(text_3);{var consequent_5=$$anchor6=>{var text_4=text$8();
template_effect(()=>set_text(text_4,`, ${$$props.serverRes.templates.length??""} template${$$props.serverRes.templates.length!==1?"s":""}`)),append($$anchor6,text_4)};if_block(node_13,$$render=>{get$3(hasTemplates)&&$$render(consequent_5)})}next$1(),reset(span_4),reset(span_3);var node_14=sibling(span_3,2);{var consequent_6=$$anchor6=>{Loader_circle($$anchor6,{class:"ml-auto h-3 w-3 animate-spin text-muted-foreground"})};if_block(node_14,$$render=>{$$props.serverRes.loading&&$$render(consequent_6)})}
template_effect(()=>set_text(text_3,`(${$$props.serverRes.resources.length??""} resource${$$props.serverRes.resources.length!==1?"s":""}`)),append($$anchor5,fragment_10)},$$slots:{default:!0}})});var node_15=sibling(node_10,2);component(node_15,()=>Collapsible_content,($$anchor4,Collapsible_Content_1)=>{Collapsible_Content_1($$anchor4,{children:($$anchor5,$$slotProps2)=>{var div_3=root_17$3(),node_16=child(div_3);{var consequent_7=$$anchor6=>{var div_4=root_18$2(),text_5=child(div_4);reset(div_4),
template_effect(()=>set_text(text_5,`Error: ${$$props.serverRes.error??""}`)),append($$anchor6,div_4)},consequent_8=$$anchor6=>{var div_5=root_19$5();append($$anchor6,div_5)},alternate_2=$$anchor6=>{var fragment_15=root_20$2(),node_17=first_child(fragment_15);{var consequent_9=$$anchor7=>{var fragment_16=comment$2(),node_18=first_child(fragment_16);each(node_18,17,()=>sortTreeChildren([...get$3(resourceTree).children.values()]),child2=>child2.resource?.uri||`${$$props.serverName}:${child2.name}`,
($$anchor8,child2)=>{renderTreeNode($$anchor8,()=>get$3(child2),()=>1,()=>"")}),append($$anchor7,fragment_16)};if_block(node_17,$$render=>{get$3(hasResources)&&$$render(consequent_9)})}var node_19=sibling(node_17,2);{var consequent_11=$$anchor7=>{var fragment_18=root_23$2(),node_20=first_child(fragment_18);{var consequent_10=$$anchor8=>{var div_6=root_24();append($$anchor8,div_6)};if_block(node_20,$$render=>{get$3(hasResources)&&$$render(consequent_10)})}var node_21=sibling(node_20,4);each(node_21,
17,()=>get$3(templateInfos),template=>template.uriTemplate,($$anchor8,template)=>{var button_1=root_25$1(),node_22=child(button_1);Braces(node_22,{class:"h-3.5 w-3.5 shrink-0 text-muted-foreground"});var span_5=sibling(node_22,2),text_6=child(span_5,!0);reset(span_5),reset(button_1),template_effect(()=>{set_class(button_1,1,clsx(["flex w-full items-center gap-2 rounded px-2 py-1 text-left text-sm transition-colors","hover:bg-muted/50",$$props.selectedTemplateUri===get$3(template).uriTemplate&&"b\
g-muted"])),set_attribute(button_1,"title",get$3(template).uriTemplate),set_text(text_6,get$3(template).title||get$3(template).name)}),delegated("click",button_1,()=>$$props.onTemplateSelect(get$3(template))),append($$anchor8,button_1)}),append($$anchor7,fragment_18)};if_block(node_19,$$render=>{get$3(hasTemplates)&&$$props.onTemplateSelect&&$$render(consequent_11)})}append($$anchor6,fragment_15)};if_block(node_16,$$render=>{$$props.serverRes.error?$$render(consequent_7):get$3(hasContent)?$$render(
alternate_2,-1):$$render(consequent_8,1)})}reset(div_3),append($$anchor5,div_3)},$$slots:{default:!0}})}),append($$anchor3,fragment_9)},$$slots:{default:!0}})}),append($$anchor,fragment_8),pop()}delegate(["click"]);var root$B=from_html('<div><!> <div class="flex flex-col gap-1"><!></div></div>');function McpResourcesBrowser($$anchor,$$props){push$1($$props,!0);let selectedUris=prop($$props,"selectedUris",19,()=>new Set),expandedServers=new SvelteSet,expandedFolders=new SvelteSet,searchQuery=state$1(
"");const resources=user_derived(mcpResources),isLoading2=user_derived(mcpResourcesLoading),filteredResources=user_derived(()=>{if(!get$3(searchQuery).trim())return get$3(resources);const query=get$3(searchQuery).toLowerCase(),filtered=new SvelteMap;for(const[serverName,serverRes]of get$3(resources).entries()){const filteredResources2=serverRes.resources.filter(r2=>r2.title?.toLowerCase().includes(query)||r2.uri.toLowerCase().includes(query)||serverName.toLowerCase().includes(query)),filteredTemplates=serverRes.
templates.filter(t=>t.name?.toLowerCase().includes(query)||t.title?.toLowerCase().includes(query)||t.uriTemplate.toLowerCase().includes(query)||serverName.toLowerCase().includes(query));(filteredResources2.length>0||filteredTemplates.length>0||query.trim())&&filtered.set(serverName,{...serverRes,resources:filteredResources2,templates:filteredTemplates})}return filtered});user_effect(()=>{$$props.expandToUri&&get$3(resources).size>0&&autoExpandToResource($$props.expandToUri)});function autoExpandToResource(uri2){
for(const[serverName,serverRes]of get$3(resources).entries())if(serverRes.resources.find(r2=>r2.uri===uri2)){expandedServers.add(serverName);const pathParts=parseResourcePath(uri2);if(pathParts.length>1){let currentPath="";for(let i=0;i<pathParts.length-1;i++){currentPath=`${currentPath}/${pathParts[i]}`;const folderId=`${serverName}:${currentPath}`;expandedFolders.add(folderId)}}break}}function toggleServer(serverName){expandedServers.has(serverName)?expandedServers.delete(serverName):expandedServers.
add(serverName)}function toggleFolder(folderId){expandedFolders.has(folderId)?expandedFolders.delete(folderId):expandedFolders.add(folderId)}function handleRefresh(){mcpStore.fetchAllResources()}var div=root$B(),node2=child(div);McpResourcesBrowserHeader(node2,{get isLoading(){return get$3(isLoading2)},onRefresh:handleRefresh,onSearch:q2=>set$1(searchQuery,q2,!0),get searchQuery(){return get$3(searchQuery)}});var div_1=sibling(node2,2),node_1=child(div_1);{var consequent=$$anchor2=>{McpResourcesBrowserEmptyState(
$$anchor2,{get isLoading(){return get$3(isLoading2)}})},alternate=$$anchor2=>{var fragment_1=comment$2(),node_2=first_child(fragment_1);each(node_2,17,()=>[...get$3(filteredResources).entries()],([serverName,serverRes])=>serverName,($$anchor3,$$item)=>{var $$array=user_derived(()=>to_array(get$3($$item),2));let serverName=()=>get$3($$array)[0],serverRes=()=>get$3($$array)[1];{let $0=user_derived(()=>expandedServers.has(serverName()));McpResourcesBrowserServerItem($$anchor3,{get serverName(){return serverName()},
get serverRes(){return serverRes()},get isExpanded(){return get$3($0)},get selectedUris(){return selectedUris()},get selectedTemplateUri(){return $$props.selectedTemplateUri},get expandedFolders(){return expandedFolders},onToggleServer:()=>toggleServer(serverName()),onToggleFolder:toggleFolder,get onSelect(){return $$props.onSelect},get onToggle(){return $$props.onToggle},get onTemplateSelect(){return $$props.onTemplateSelect},get searchQuery(){return get$3(searchQuery)}})}}),append($$anchor2,fragment_1)};
if_block(node_1,$$render=>{get$3(filteredResources).size===0?$$render(consequent):$$render(alternate,-1)})}reset(div_1),reset(div),template_effect(()=>set_class(div,1,clsx(["flex flex-col gap-2",$$props.class]))),append($$anchor,div),pop()}var root_1$h=from_html('<div class="flex flex-col items-center justify-center gap-2 py-8 text-muted-foreground"><!> <span class="text-sm">Select a resource to preview</span></div>'),root_3$p=from_html('<p class="mt-1 text-sm text-muted-foreground"> </p>'),root_5$b=from_html(
'<div class="flex items-center justify-center py-8"><!></div>'),root_6$d=from_html('<div class="flex flex-col items-center justify-center gap-2 py-8 text-red-500"><!> <span class="text-sm"> </span></div>'),root_8$g=from_html('<pre class="font-mono text-xs break-words whitespace-pre-wrap"> </pre>'),root_10$7=from_html('<img alt="Resource content" class="max-w-full rounded"/>'),root_11$5=from_html('<div class="flex items-center gap-2 rounded bg-muted p-2 text-sm text-muted-foreground"><!> <span> <\
/span></div>'),root_12$5=from_html('<div class="py-4 text-center text-sm text-muted-foreground">No content available</div>'),root_7$c=from_html("<!> <!> <!>",1),root_14$2=from_html('<span class="rounded bg-muted px-1.5 py-0.5"> </span>'),root_15$5=from_html('<span class="rounded bg-muted px-1.5 py-0.5"> </span>'),root_13$6=from_html('<div class="flex flex-wrap gap-2 text-xs text-muted-foreground"><!> <!> <span class="rounded bg-muted px-1.5 py-0.5"> </span></div>'),root_2$z=from_html('<div class\
="flex items-start justify-between gap-2"><div class="min-w-0 flex-1"><h3 class="truncate font-medium"> </h3> <p class="truncate text-xs text-muted-foreground"> </p> <!></div> <div class="flex items-center gap-1"><!> <!></div></div> <div class="min-h-[200px] overflow-auto rounded-md border bg-muted/30 p-3 break-all"><!></div> <!>',1),root$A=from_html("<div><!></div>");function McpResourcePreview($$anchor,$$props){push$1($$props,!0);let content2=state$1(null),isLoading2=state$1(!1),error2=state$1(
null);user_effect(()=>{$$props.resource?$$props.preloadedContent?(set$1(content2,$$props.preloadedContent,!0),set$1(isLoading2,!1),set$1(error2,null)):loadContent($$props.resource.uri):(set$1(content2,null),set$1(error2,null))});async function loadContent(uri2){set$1(isLoading2,!0),set$1(error2,null);try{const result=await mcpStore.readResource(uri2);result?set$1(content2,result,!0):set$1(error2,"Failed to load resource content")}catch(e){set$1(error2,e instanceof Error?e.message:"Unknown error",
!0)}finally{set$1(isLoading2,!1)}}function handleDownload(){const text2=getResourceTextContent(get$3(content2));!text2||!$$props.resource||downloadResourceContent(text2,$$props.resource.mimeType||MimeTypeText.PLAIN,$$props.resource.name||"resource.txt")}var div=root$A(),node2=child(div);{var consequent=$$anchor2=>{var div_1=root_1$h(),node_1=child(div_1);File_text(node_1,{class:"h-8 w-8 opacity-50"}),next$1(2),reset(div_1),append($$anchor2,div_1)},alternate_1=$$anchor2=>{var fragment=root_2$z(),
div_2=first_child(fragment),div_3=child(div_2),h3=child(div_3),text_1=child(h3,!0);reset(h3);var p2=sibling(h3,2),text_2=child(p2,!0);reset(p2);var node_2=sibling(p2,2);{var consequent_1=$$anchor3=>{var p_1=root_3$p(),text_3=child(p_1,!0);reset(p_1),template_effect(()=>set_text(text_3,$$props.resource.description)),append($$anchor3,p_1)};if_block(node_2,$$render=>{$$props.resource.description&&$$render(consequent_1)})}reset(div_3);var div_4=sibling(div_3,2),node_3=child(div_4);{let $0=user_derived(
()=>getResourceTextContent(get$3(content2))),$1=user_derived(()=>!get$3(isLoading2)&&!!getResourceTextContent(get$3(content2)));ActionIconCopyToClipboard(node_3,{get text(){return get$3($0)},get canCopy(){return get$3($1)},ariaLabel:"Copy content"})}var node_4=sibling(node_3,2);{let $0=user_derived(()=>get$3(isLoading2)||!getResourceTextContent(get$3(content2)));Button(node_4,{variant:"ghost",size:"sm",class:"h-7 w-7 p-0",onclick:handleDownload,get disabled(){return get$3($0)},title:"Download co\
ntent",children:($$anchor3,$$slotProps)=>{Download($$anchor3,{class:"h-3.5 w-3.5"})},$$slots:{default:!0}})}reset(div_4),reset(div_2);var div_5=sibling(div_2,2),node_5=child(div_5);{var consequent_2=$$anchor3=>{var div_6=root_5$b(),node_6=child(div_6);Loader_circle(node_6,{class:"h-6 w-6 animate-spin text-muted-foreground"}),reset(div_6),append($$anchor3,div_6)},consequent_3=$$anchor3=>{var div_7=root_6$d(),node_7=child(div_7);Circle_alert(node_7,{class:"h-6 w-6"});var span=sibling(node_7,2),text_4=child(
span,!0);reset(span),reset(div_7),template_effect(()=>set_text(text_4,get$3(error2))),append($$anchor3,div_7)},consequent_7=$$anchor3=>{const textContent=user_derived(()=>getResourceTextContent(get$3(content2))),blobContent=user_derived(()=>getResourceBlobContent(get$3(content2)));var fragment_2=root_7$c(),node_8=first_child(fragment_2);{var consequent_4=$$anchor4=>{var pre=root_8$g(),text_5=child(pre,!0);reset(pre),template_effect(()=>set_text(text_5,get$3(textContent))),append($$anchor4,pre)};
if_block(node_8,$$render=>{get$3(textContent)&&$$render(consequent_4)})}var node_9=sibling(node_8,2);each(node_9,17,()=>get$3(blobContent),blob=>blob.uri,($$anchor4,blob)=>{var fragment_3=comment$2(),node_10=first_child(fragment_3);{var consequent_5=$$anchor5=>{var img=root_10$7();template_effect($0=>set_attribute(img,"src",$0),[()=>createBase64DataUrl(get$3(blob).mimeType??MimeTypeApplication.OCTET_STREAM,get$3(blob).blob)]),append($$anchor5,img)},d2=user_derived(()=>isImageMimeType(get$3(blob).
mimeType??MimeTypeApplication.OCTET_STREAM)),alternate=$$anchor5=>{var div_8=root_11$5(),node_11=child(div_8);File_text(node_11,{class:"h-4 w-4"});var span_1=sibling(node_11,2),text_6=child(span_1);reset(span_1),reset(div_8),template_effect(()=>set_text(text_6,`Binary content (${(get$3(blob).mimeType||"unknown type")??""})`)),append($$anchor5,div_8)};if_block(node_10,$$render=>{get$3(d2)?$$render(consequent_5):$$render(alternate,-1)})}append($$anchor4,fragment_3)});var node_12=sibling(node_9,2);
{var consequent_6=$$anchor4=>{var div_9=root_12$5();append($$anchor4,div_9)};if_block(node_12,$$render=>{!get$3(textContent)&&get$3(blobContent).length===0&&$$render(consequent_6)})}append($$anchor3,fragment_2)};if_block(node_5,$$render=>{get$3(isLoading2)?$$render(consequent_2):get$3(error2)?$$render(consequent_3,1):get$3(content2)&&$$render(consequent_7,2)})}reset(div_5);var node_13=sibling(div_5,2);{var consequent_10=$$anchor3=>{var div_10=root_13$6(),node_14=child(div_10);{var consequent_8=$$anchor4=>{
var span_2=root_14$2(),text_7=child(span_2,!0);reset(span_2),template_effect(()=>set_text(text_7,$$props.resource.mimeType)),append($$anchor4,span_2)};if_block(node_14,$$render=>{$$props.resource.mimeType&&$$render(consequent_8)})}var node_15=sibling(node_14,2);{var consequent_9=$$anchor4=>{var span_3=root_15$5(),text_8=child(span_3);reset(span_3),template_effect(()=>set_text(text_8,`Priority: ${$$props.resource.annotations.priority??""}`)),append($$anchor4,span_3)};if_block(node_15,$$render=>{$$props.
resource.annotations?.priority!==void 0&&$$render(consequent_9)})}var span_4=sibling(node_15,2),text_9=child(span_4);reset(span_4),reset(div_10),template_effect(()=>set_text(text_9,`Server: ${$$props.resource.serverName??""}`)),append($$anchor3,div_10)};if_block(node_13,$$render=>{($$props.resource.mimeType||$$props.resource.annotations)&&$$render(consequent_10)})}template_effect(()=>{set_text(text_1,$$props.resource.title||$$props.resource.name),set_text(text_2,$$props.resource.uri)}),append($$anchor2,
fragment)};if_block(node2,$$render=>{$$props.resource?$$render(alternate_1,-1):$$render(consequent)})}reset(div),template_effect(()=>set_class(div,1,clsx(["flex flex-col gap-3",$$props.class]))),append($$anchor,div),pop()}var root_2$y=from_html('<div class="rounded-md bg-muted/50 px-3 py-2"><p class="text-xs text-muted-foreground">Resolved URI:</p> <p class="mt-0.5 font-mono text-xs break-all"> </p></div>'),root$z=from_html('<form class="space-y-3"><!> <!> <div class="flex justify-end gap-2 pt-1\
"><!> <!></div></form>');function McpResourceTemplateForm($$anchor,$$props){push$1($$props,!0);const variables=user_derived(()=>extractTemplateVariables($$props.template.uriTemplate));let values=proxy({}),suggestions=proxy({}),loadingSuggestions=proxy({}),activeAutocomplete=state$1(null),autocompleteIndex=state$1(0);const expandedUri=user_derived(()=>expandTemplate($$props.template.uriTemplate,values)),isComplete=user_derived(()=>isTemplateComplete($$props.template.uriTemplate,values)),fetchCompletions=debounce(
async(argName,value)=>{if(value.length<1){suggestions[argName]=[];return}loadingSuggestions[argName]=!0;try{const result=await mcpStore.getResourceCompletions($$props.template.serverName,$$props.template.uriTemplate,argName,value);if(result&&result.values.length>0){const filteredValues=result.values.filter(v=>v.trim()!=="");filteredValues.length>0?(suggestions[argName]=filteredValues,set$1(activeAutocomplete,argName,!0),set$1(autocompleteIndex,0)):suggestions[argName]=[]}else suggestions[argName]=
[]}catch(error2){console.error("[McpResourceTemplateForm] Failed to fetch completions:",error2),suggestions[argName]=[]}finally{loadingSuggestions[argName]=!1}},200);function handleArgInput(argName,value){values[argName]=value,fetchCompletions(argName,value)}function selectSuggestion(argName,value){values[argName]=value,suggestions[argName]=[],set$1(activeAutocomplete,null)}function handleArgKeydown(event2,argName){const argSuggestions=suggestions[argName]??[];if(event2.key===KeyboardKey.ESCAPE){
event2.preventDefault(),event2.stopPropagation(),argSuggestions.length>0&&get$3(activeAutocomplete)===argName?(suggestions[argName]=[],set$1(activeAutocomplete,null)):$$props.onCancel();return}argSuggestions.length===0||get$3(activeAutocomplete)!==argName||(event2.key===KeyboardKey.ARROW_DOWN?(event2.preventDefault(),set$1(autocompleteIndex,Math.min(get$3(autocompleteIndex)+1,argSuggestions.length-1),!0)):event2.key===KeyboardKey.ARROW_UP?(event2.preventDefault(),set$1(autocompleteIndex,Math.max(
get$3(autocompleteIndex)-1,0),!0)):event2.key===KeyboardKey.ENTER&&argSuggestions[get$3(autocompleteIndex)]&&(event2.preventDefault(),event2.stopPropagation(),selectSuggestion(argName,argSuggestions[get$3(autocompleteIndex)])))}function handleArgBlur(argName){setTimeout(()=>{get$3(activeAutocomplete)===argName&&(suggestions[argName]=[],set$1(activeAutocomplete,null))},150)}function handleArgFocus(argName){const value=values[argName]??"";value.length>=MIN_AUTOCOMPLETE_INPUT_LENGTH&&fetchCompletions(
argName,value)}function handleSubmit(event2){event2.preventDefault(),get$3(isComplete)&&$$props.onResolve(get$3(expandedUri),$$props.template.serverName)}var form=root$z(),node2=child(form);each(node2,17,()=>get$3(variables),variable=>variable.name,($$anchor2,variable)=>{{let $0=user_derived(()=>values[get$3(variable).name]??""),$1=user_derived(()=>suggestions[get$3(variable).name]??[]),$2=user_derived(()=>loadingSuggestions[get$3(variable).name]??!1),$3=user_derived(()=>get$3(activeAutocomplete)===
get$3(variable).name),$4=user_derived(()=>get$3(activeAutocomplete)===get$3(variable).name?get$3(autocompleteIndex):0);InputWithSuggestions($$anchor2,{get name(){return get$3(variable).name},get value(){return get$3($0)},get suggestions(){return get$3($1)},get isLoadingSuggestions(){return get$3($2)},get isAutocompleteActive(){return get$3($3)},get autocompleteIndex(){return get$3($4)},onInput:value=>handleArgInput(get$3(variable).name,value),onKeydown:e=>handleArgKeydown(e,get$3(variable).name),
onBlur:()=>handleArgBlur(get$3(variable).name),onFocus:()=>handleArgFocus(get$3(variable).name),onSelectSuggestion:value=>selectSuggestion(get$3(variable).name,value)})}});var node_1=sibling(node2,2);{var consequent=$$anchor2=>{var div=root_2$y(),p2=sibling(child(div),2),text2=child(p2,!0);reset(p2),reset(div),template_effect(()=>set_text(text2,get$3(expandedUri))),append($$anchor2,div)};if_block(node_1,$$render=>{get$3(isComplete)&&$$render(consequent)})}var div_1=sibling(node_1,2),node_2=child(
div_1);Button(node_2,{type:"button",size:"sm",variant:"secondary",get onclick(){return $$props.onCancel},children:($$anchor2,$$slotProps)=>{next$1();var text_1=text$8("Cancel");append($$anchor2,text_1)},$$slots:{default:!0}});var node_3=sibling(node_2,2);{let $0=user_derived(()=>!get$3(isComplete));Button(node_3,{size:"sm",type:"submit",get disabled(){return get$3($0)},children:($$anchor2,$$slotProps)=>{next$1();var text_2=text$8("Read Resource");append($$anchor2,text_2)},$$slots:{default:!0}})}
reset(div_1),reset(form),event("submit",form,handleSubmit),append($$anchor,form),pop()}var root_5$a=from_html("<!> <!>",1),root_2$x=from_html('<!> <div class="space-y-4 py-4"><!></div> <!>',1);function DialogMcpServerAddNew($$anchor,$$props){push$1($$props,!0);let open2=prop($$props,"open",15),newServerUrl=state$1(""),newServerHeaders=state$1(""),newServerUrlError=user_derived(()=>{if(!get$3(newServerUrl).trim())return"URL is required";try{return new URL(get$3(newServerUrl)),null}catch{return"In\
valid URL format"}});function handleOpenChange(value){value||(set$1(newServerUrl,""),set$1(newServerHeaders,"")),open2(value),$$props.onOpenChange?.(value)}function saveNewServer(){if(get$3(newServerUrlError))return;const newServerId=uuid$1()??`${MCP_SERVER_ID_PREFIX}-${Date.now()}`;mcpStore.addServer({id:newServerId,enabled:!0,url:get$3(newServerUrl).trim(),headers:get$3(newServerHeaders).trim()||void 0}),conversationsStore.setMcpServerOverride(newServerId,!0),handleOpenChange(!1)}var fragment=comment$2(),
node2=first_child(fragment);component(node2,()=>Root$2,($$anchor2,Dialog_Root)=>{Dialog_Root($$anchor2,{get open(){return open2()},onOpenChange:handleOpenChange,children:($$anchor3,$$slotProps)=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);component(node_1,()=>Dialog_content,($$anchor4,Dialog_Content)=>{Dialog_Content($$anchor4,{class:"sm:max-w-md",children:($$anchor5,$$slotProps2)=>{var fragment_2=root_2$x(),node_2=first_child(fragment_2);component(node_2,()=>Dialog_header,($$anchor6,Dialog_Header)=>{
Dialog_Header($$anchor6,{children:($$anchor7,$$slotProps3)=>{var fragment_3=comment$2(),node_3=first_child(fragment_3);component(node_3,()=>Dialog_title,($$anchor8,Dialog_Title)=>{Dialog_Title($$anchor8,{children:($$anchor9,$$slotProps4)=>{next$1();var text2=text$8("Add New Server");append($$anchor9,text2)},$$slots:{default:!0}})}),append($$anchor7,fragment_3)},$$slots:{default:!0}})});var div=sibling(node_2,2),node_4=child(div);{let $0=user_derived(()=>get$3(newServerUrl)?get$3(newServerUrlError):
null);McpServerForm(node_4,{get url(){return get$3(newServerUrl)},get headers(){return get$3(newServerHeaders)},onUrlChange:v=>set$1(newServerUrl,v,!0),onHeadersChange:v=>set$1(newServerHeaders,v,!0),get urlError(){return get$3($0)},id:"new-server"})}reset(div);var node_5=sibling(div,2);component(node_5,()=>Dialog_footer,($$anchor6,Dialog_Footer)=>{Dialog_Footer($$anchor6,{children:($$anchor7,$$slotProps3)=>{var fragment_4=root_5$a(),node_6=first_child(fragment_4);Button(node_6,{variant:"seconda\
ry",size:"sm",onclick:()=>handleOpenChange(!1),children:($$anchor8,$$slotProps4)=>{next$1();var text_1=text$8("Cancel");append($$anchor8,text_1)},$$slots:{default:!0}});var node_7=sibling(node_6,2);{let $0=user_derived(()=>!!get$3(newServerUrlError));Button(node_7,{variant:"default",size:"sm",onclick:saveNewServer,get disabled(){return get$3($0)},"aria-label":"Save",children:($$anchor8,$$slotProps4)=>{next$1();var text_2=text$8("Add");append($$anchor8,text_2)},$$slots:{default:!0}})}append($$anchor7,
fragment_4)},$$slots:{default:!0}})}),append($$anchor5,fragment_2)},$$slots:{default:!0}})}),append($$anchor3,fragment_1)},$$slots:{default:!0}})}),append($$anchor,fragment),pop()}var root_4$i=from_html("<!> Export Settings",1),root_8$f=from_html(`<p class="text-amber-500">Warning: This export will include sensitive data such as API keys and MCP server custom
						headers (e.g., authorization tokens). Do not share this file with anyone you don't
						trust.</p>`),root_9$9=from_html(`<p>Sensitive data (API keys, MCP server custom headers) will not be included in the export
						to protect your credentials.</p>`),root_3$o=from_html("<!> <!>",1),root_11$4=from_html('<span class="text-destructive">Include sensitive data (not recommended)</span>'),root_12$4=from_html("<span>Include sensitive data</span>"),root_13$5=from_html("<!> <!>",1),root_2$w=from_html('<!> <div class="flex items-center gap-2 py-2"><!> <!></div> <!>',1);function DialogExportSettings($$anchor,$$props){push$1($$props,!0);let includeSensitiveData=prop($$props,"includeSensitiveData",15,!1);function handleOpenChange(newOpen){
newOpen||$$props.onCancel()}var fragment=comment$2(),node2=first_child(fragment);component(node2,()=>Root$1,($$anchor2,AlertDialog_Root)=>{AlertDialog_Root($$anchor2,{get open(){return $$props.open},onOpenChange:handleOpenChange,children:($$anchor3,$$slotProps)=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);component(node_1,()=>Alert_dialog_content,($$anchor4,AlertDialog_Content)=>{AlertDialog_Content($$anchor4,{children:($$anchor5,$$slotProps2)=>{var fragment_2=root_2$w(),node_2=first_child(
fragment_2);component(node_2,()=>Alert_dialog_header,($$anchor6,AlertDialog_Header)=>{AlertDialog_Header($$anchor6,{children:($$anchor7,$$slotProps3)=>{var fragment_3=root_3$o(),node_3=first_child(fragment_3);component(node_3,()=>Alert_dialog_title,($$anchor8,AlertDialog_Title)=>{AlertDialog_Title($$anchor8,{class:"flex items-center gap-2",children:($$anchor9,$$slotProps4)=>{var fragment_4=root_4$i(),node_4=first_child(fragment_4);{var consequent=$$anchor10=>{Shield_off($$anchor10,{class:"h-5 w-\
5 text-destructive"})},alternate=$$anchor10=>{Shield($$anchor10,{class:"h-5 w-5 text-destructive"})};if_block(node_4,$$render=>{includeSensitiveData()?$$render(consequent):$$render(alternate,-1)})}next$1(),append($$anchor9,fragment_4)},$$slots:{default:!0}})});var node_5=sibling(node_3,2);component(node_5,()=>Alert_dialog_description,($$anchor8,AlertDialog_Description)=>{AlertDialog_Description($$anchor8,{children:($$anchor9,$$slotProps4)=>{var fragment_7=comment$2(),node_6=first_child(fragment_7);
{var consequent_1=$$anchor10=>{var p2=root_8$f();append($$anchor10,p2)},alternate_1=$$anchor10=>{var p_1=root_9$9();append($$anchor10,p_1)};if_block(node_6,$$render=>{includeSensitiveData()?$$render(consequent_1):$$render(alternate_1,-1)})}append($$anchor9,fragment_7)},$$slots:{default:!0}})}),append($$anchor7,fragment_3)},$$slots:{default:!0}})});var div=sibling(node_2,2),node_7=child(div);Checkbox(node_7,{id:"include-sensitive",get checked(){return includeSensitiveData()},set checked($$value){
includeSensitiveData($$value)}});var node_8=sibling(node_7,2);Label(node_8,{for:"include-sensitive",class:"text-sm leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",children:($$anchor6,$$slotProps3)=>{var fragment_8=comment$2(),node_9=first_child(fragment_8);{var consequent_2=$$anchor7=>{var span=root_11$4();append($$anchor7,span)},alternate_2=$$anchor7=>{var span_1=root_12$4();append($$anchor7,span_1)};if_block(node_9,$$render=>{includeSensitiveData()?$$render(consequent_2):
$$render(alternate_2,-1)})}append($$anchor6,fragment_8)},$$slots:{default:!0}}),reset(div);var node_10=sibling(div,2);component(node_10,()=>Alert_dialog_footer,($$anchor6,AlertDialog_Footer)=>{AlertDialog_Footer($$anchor6,{children:($$anchor7,$$slotProps3)=>{var fragment_9=root_13$5(),node_11=first_child(fragment_9);component(node_11,()=>Alert_dialog_cancel,($$anchor8,AlertDialog_Cancel)=>{AlertDialog_Cancel($$anchor8,{get onclick(){return $$props.onCancel},children:($$anchor9,$$slotProps4)=>{next$1();
var text2=text$8("Cancel");append($$anchor9,text2)},$$slots:{default:!0}})});var node_12=sibling(node_11,2);component(node_12,()=>Alert_dialog_action,($$anchor8,AlertDialog_Action)=>{AlertDialog_Action($$anchor8,{get onclick(){return $$props.onConfirm},class:"bg-destructive text-white hover:bg-destructive/80",children:($$anchor9,$$slotProps4)=>{var fragment_10=comment$2(),node_13=first_child(fragment_10);{var consequent_3=$$anchor10=>{var text_1=text$8("Export Anyway");append($$anchor10,text_1)},
alternate_3=$$anchor10=>{var text_2=text$8("Export Without Sensitive Data");append($$anchor10,text_2)};if_block(node_13,$$render=>{includeSensitiveData()?$$render(consequent_3):$$render(alternate_3,-1)})}append($$anchor9,fragment_10)},$$slots:{default:!0}})}),append($$anchor7,fragment_9)},$$slots:{default:!0}})}),append($$anchor5,fragment_2)},$$slots:{default:!0}})}),append($$anchor3,fragment_1)},$$slots:{default:!0}})}),append($$anchor,fragment),pop()}var root_4$h=from_html("<!> ",1),root_3$n=from_html(
"<!> <!>",1),root_8$e=from_html("<!> <!>",1),root_2$v=from_html("<!> <!> <!>",1);function DialogConfirmation($$anchor,$$props){push$1($$props,!0);let confirmText=prop($$props,"confirmText",3,"Confirm"),cancelText=prop($$props,"cancelText",3,"Cancel"),variant=prop($$props,"variant",3,"default");function handleKeydown(event2){event2.key===KeyboardKey.ENTER&&(event2.preventDefault(),$$props.onConfirm()),$$props.onKeydown?.(event2)}function handleOpenChange(newOpen){newOpen||$$props.onCancel()}var fragment=comment$2(),
node2=first_child(fragment);component(node2,()=>Root$1,($$anchor2,AlertDialog_Root)=>{AlertDialog_Root($$anchor2,{get open(){return $$props.open},onOpenChange:handleOpenChange,children:($$anchor3,$$slotProps)=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);component(node_1,()=>Alert_dialog_content,($$anchor4,AlertDialog_Content)=>{AlertDialog_Content($$anchor4,{onkeydown:handleKeydown,children:($$anchor5,$$slotProps2)=>{var fragment_2=root_2$v(),node_2=first_child(fragment_2);component(
node_2,()=>Alert_dialog_header,($$anchor6,AlertDialog_Header)=>{AlertDialog_Header($$anchor6,{children:($$anchor7,$$slotProps3)=>{var fragment_3=root_3$n(),node_3=first_child(fragment_3);component(node_3,()=>Alert_dialog_title,($$anchor8,AlertDialog_Title)=>{AlertDialog_Title($$anchor8,{class:"flex items-center gap-2",children:($$anchor9,$$slotProps4)=>{var fragment_4=root_4$h(),node_4=first_child(fragment_4);{var consequent=$$anchor10=>{const IconComponent=user_derived(()=>$$props.icon);var fragment_5=comment$2(),
node_5=first_child(fragment_5);{let $0=user_derived(()=>variant()==="destructive"?"text-destructive":"");component(node_5,()=>get$3(IconComponent),($$anchor11,IconComponent_1)=>{IconComponent_1($$anchor11,{get class(){return`h-5 w-5 ${get$3($0)??""}`}})})}append($$anchor10,fragment_5)};if_block(node_4,$$render=>{$$props.icon&&$$render(consequent)})}var text2=sibling(node_4);template_effect(()=>set_text(text2,` ${$$props.title??""}`)),append($$anchor9,fragment_4)},$$slots:{default:!0}})});var node_6=sibling(
node_3,2);component(node_6,()=>Alert_dialog_description,($$anchor8,AlertDialog_Description)=>{AlertDialog_Description($$anchor8,{children:($$anchor9,$$slotProps4)=>{next$1();var text_1=text$8();template_effect(()=>set_text(text_1,$$props.description)),append($$anchor9,text_1)},$$slots:{default:!0}})}),append($$anchor7,fragment_3)},$$slots:{default:!0}})});var node_7=sibling(node_2,2);{var consequent_1=$$anchor6=>{var fragment_7=comment$2(),node_8=first_child(fragment_7);snippet(node_8,()=>$$props.
children),append($$anchor6,fragment_7)};if_block(node_7,$$render=>{$$props.children&&$$render(consequent_1)})}var node_9=sibling(node_7,2);component(node_9,()=>Alert_dialog_footer,($$anchor6,AlertDialog_Footer)=>{AlertDialog_Footer($$anchor6,{children:($$anchor7,$$slotProps3)=>{var fragment_8=root_8$e(),node_10=first_child(fragment_8);component(node_10,()=>Alert_dialog_cancel,($$anchor8,AlertDialog_Cancel)=>{AlertDialog_Cancel($$anchor8,{get onclick(){return $$props.onCancel},children:($$anchor9,$$slotProps4)=>{
next$1();var text_2=text$8();template_effect(()=>set_text(text_2,cancelText())),append($$anchor9,text_2)},$$slots:{default:!0}})});var node_11=sibling(node_10,2);{let $0=user_derived(()=>variant()==="destructive"?"bg-destructive text-white hover:bg-destructive/80":"");component(node_11,()=>Alert_dialog_action,($$anchor8,AlertDialog_Action)=>{AlertDialog_Action($$anchor8,{get onclick(){return $$props.onConfirm},get class(){return get$3($0)},children:($$anchor9,$$slotProps4)=>{next$1();var text_3=text$8();
template_effect(()=>set_text(text_3,confirmText())),append($$anchor9,text_3)},$$slots:{default:!0}})})}append($$anchor7,fragment_8)},$$slots:{default:!0}})}),append($$anchor5,fragment_2)},$$slots:{default:!0}})}),append($$anchor3,fragment_1)},$$slots:{default:!0}})}),append($$anchor,fragment),pop()}var root_3$m=from_html("<!> <!>",1),root_6$c=from_html("<!> <!>",1),root_2$u=from_html('<!> <div class="space-y-4 pt-2 pb-6"><div class="space-y-2"><p class="text-sm font-medium text-muted-foreground"\
>Current title:</p> <p class="rounded-md bg-muted/50 p-3 text-sm font-medium"> </p></div> <div class="space-y-2"><p class="text-sm font-medium text-muted-foreground">New title would be:</p> <p class="rounded-md bg-muted/50 p-3 text-sm font-medium"> </p></div></div> <!>',1);function DialogConversationTitleUpdate($$anchor,$$props){push$1($$props,!0);let open2=prop($$props,"open",15);var fragment=comment$2(),node2=first_child(fragment);component(node2,()=>Root$1,($$anchor2,AlertDialog_Root)=>{AlertDialog_Root(
$$anchor2,{get open(){return open2()},set open($$value){open2($$value)},children:($$anchor3,$$slotProps)=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);component(node_1,()=>Alert_dialog_content,($$anchor4,AlertDialog_Content)=>{AlertDialog_Content($$anchor4,{children:($$anchor5,$$slotProps2)=>{var fragment_2=root_2$u(),node_2=first_child(fragment_2);component(node_2,()=>Alert_dialog_header,($$anchor6,AlertDialog_Header)=>{AlertDialog_Header($$anchor6,{children:($$anchor7,$$slotProps3)=>{
var fragment_3=root_3$m(),node_3=first_child(fragment_3);component(node_3,()=>Alert_dialog_title,($$anchor8,AlertDialog_Title)=>{AlertDialog_Title($$anchor8,{children:($$anchor9,$$slotProps4)=>{next$1();var text2=text$8("Update Conversation Title?");append($$anchor9,text2)},$$slots:{default:!0}})});var node_4=sibling(node_3,2);component(node_4,()=>Alert_dialog_description,($$anchor8,AlertDialog_Description)=>{AlertDialog_Description($$anchor8,{children:($$anchor9,$$slotProps4)=>{next$1();var text_1=text$8(
"Do you want to update the conversation title to match the first message content?");append($$anchor9,text_1)},$$slots:{default:!0}})}),append($$anchor7,fragment_3)},$$slots:{default:!0}})});var div=sibling(node_2,2),div_1=child(div),p2=sibling(child(div_1),2),text_2=child(p2,!0);reset(p2),reset(div_1);var div_2=sibling(div_1,2),p_1=sibling(child(div_2),2),text_3=child(p_1,!0);reset(p_1),reset(div_2),reset(div);var node_5=sibling(div,2);component(node_5,()=>Alert_dialog_footer,($$anchor6,AlertDialog_Footer)=>{
AlertDialog_Footer($$anchor6,{children:($$anchor7,$$slotProps3)=>{var fragment_4=root_6$c(),node_6=first_child(fragment_4);Button(node_6,{variant:"outline",get onclick(){return $$props.onCancel},children:($$anchor8,$$slotProps4)=>{next$1();var text_4=text$8("Keep Current Title");append($$anchor8,text_4)},$$slots:{default:!0}});var node_7=sibling(node_6,2);Button(node_7,{get onclick(){return $$props.onConfirm},children:($$anchor8,$$slotProps4)=>{next$1();var text_5=text$8("Update Title");append($$anchor8,
text_5)},$$slots:{default:!0}}),append($$anchor7,fragment_4)},$$slots:{default:!0}})}),template_effect(()=>{set_text(text_2,$$props.currentTitle),set_text(text_3,$$props.newTitle)}),append($$anchor5,fragment_2)},$$slots:{default:!0}})}),append($$anchor3,fragment_1)},$$slots:{default:!0}})}),append($$anchor,fragment),pop()}var root_4$g=from_html('<!> <span class="sr-only">Close preview</span>',1),root_3$l=from_html('<iframe sandbox="allow-scripts" class="code-preview-iframe"></iframe> <!>',1),root_2$t=from_html(
"<!> <!>",1);function DialogCodePreview($$anchor,$$props){push$1($$props,!0);let open2=prop($$props,"open",15),iframeRef=state$1(null);user_effect(()=>{get$3(iframeRef)&&(open2()?get$3(iframeRef).srcdoc=$$props.code:get$3(iframeRef).srcdoc="")});function handleOpenChange(nextOpen){open2(nextOpen),$$props.onOpenChange?.(nextOpen)}var fragment=comment$2(),node2=first_child(fragment);component(node2,()=>Dialog,($$anchor2,DialogPrimitive_Root)=>{DialogPrimitive_Root($$anchor2,{get open(){return open2()},
onOpenChange:handleOpenChange,children:($$anchor3,$$slotProps)=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);component(node_1,()=>Portal$2,($$anchor4,DialogPrimitive_Portal)=>{DialogPrimitive_Portal($$anchor4,{children:($$anchor5,$$slotProps2)=>{var fragment_2=root_2$t(),node_2=first_child(fragment_2);component(node_2,()=>Dialog_overlay$1,($$anchor6,DialogPrimitive_Overlay)=>{DialogPrimitive_Overlay($$anchor6,{class:"code-preview-overlay"})});var node_3=sibling(node_2,2);component(
node_3,()=>Dialog_content$1,($$anchor6,DialogPrimitive_Content)=>{DialogPrimitive_Content($$anchor6,{class:"code-preview-content",children:($$anchor7,$$slotProps3)=>{var fragment_3=root_3$l(),iframe=first_child(fragment_3);bind_this(iframe,$$value=>set$1(iframeRef,$$value),()=>get$3(iframeRef));var node_4=sibling(iframe,2);component(node_4,()=>Dialog_close,($$anchor8,DialogPrimitive_Close)=>{DialogPrimitive_Close($$anchor8,{class:"code-preview-close absolute top-4 right-4 border-none bg-transpar\
ent text-white opacity-70 mix-blend-difference transition-opacity hover:opacity-100 focus-visible:ring-0 focus-visible:ring-offset-0 focus-visible:outline-none disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-8","aria-label":"Close preview",children:($$anchor9,$$slotProps4)=>{var fragment_4=root_4$g(),node_5=first_child(fragment_4);X(node_5,{}),next$1(2),append($$anchor9,fragment_4)},$$slots:{default:!0}})}),template_effect(()=>set_attribute(
iframe,"title",`Preview ${$$props.language??""}`)),append($$anchor7,fragment_3)},$$slots:{default:!0}})}),append($$anchor5,fragment_2)},$$slots:{default:!0}})}),append($$anchor3,fragment_1)},$$slots:{default:!0}})}),append($$anchor,fragment),pop()}var root_3$k=from_html("<!> <!>",1),root_2$s=from_html("<!> <!>",1);function DialogChatAttachmentsPreview($$anchor,$$props){push$1($$props,!0);let open2=prop($$props,"open",15,!1),uploadedFiles=prop($$props,"uploadedFiles",19,()=>[]),attachments=prop($$props,
"attachments",19,()=>[]),previewFocusIndex=prop($$props,"previewFocusIndex",3,0);function handleClose(){open2(!1)}user_effect(()=>{if(!open2())return;function handleKeyDown(event2){const target2=event2.target;if(!(target2.tagName==="INPUT"||target2.tagName==="TEXTAREA"))switch(event2.key){case KeyboardKey.ARROW_LEFT:event2.preventDefault(),event2.stopPropagation(),document.dispatchEvent(new CustomEvent("chat-attachments-nav",{detail:-1}));break;case KeyboardKey.ARROW_RIGHT:event2.preventDefault(),
event2.stopPropagation(),document.dispatchEvent(new CustomEvent("chat-attachments-nav",{detail:1}));break;case KeyboardKey.SPACE:event2.preventDefault(),event2.stopPropagation(),document.dispatchEvent(new CustomEvent("chat-attachments-nav",{detail:1}));break}}return document.addEventListener("keydown",handleKeyDown),()=>document.removeEventListener("keydown",handleKeyDown)});var fragment=comment$2(),node2=first_child(fragment);component(node2,()=>Dialog,($$anchor2,Dialog_Root)=>{Dialog_Root($$anchor2,
{get open(){return open2()},set open($$value){open2($$value)},children:($$anchor3,$$slotProps)=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);component(node_1,()=>Portal$2,($$anchor4,Dialog_Portal)=>{Dialog_Portal($$anchor4,{children:($$anchor5,$$slotProps2)=>{var fragment_2=root_2$s(),node_2=first_child(fragment_2);component(node_2,()=>Dialog_overlay,($$anchor6,DialogUI_Overlay)=>{DialogUI_Overlay($$anchor6,{class:"bg-black/85",style:"z-index: 1000"})});var node_3=sibling(node_2,2);
component(node_3,()=>Dialog_content$1,($$anchor6,Dialog_Content)=>{Dialog_Content($$anchor6,{class:"fixed inset-0 z-[1000] flex flex-col bg-transparent outline-none",children:($$anchor7,$$slotProps3)=>{var fragment_3=root_3$k(),node_4=first_child(fragment_3);component(node_4,()=>Dialog_close,($$anchor8,Dialog_Close)=>{Dialog_Close($$anchor8,{class:"absolute top-4 right-4 z-10 cursor-pointer text-white hover:text-gray-400",onclick:handleClose,"aria-label":"Close",children:($$anchor9,$$slotProps4)=>{
X($$anchor9,{class:"size-4"})},$$slots:{default:!0}})});var node_5=sibling(node_4,2);ChatAttachmentsPreview(node_5,{get uploadedFiles(){return uploadedFiles()},get attachments(){return attachments()},get activeModelId(){return $$props.activeModelId},get previewFocusIndex(){return previewFocusIndex()},class:"min-h-0 flex-1"}),append($$anchor7,fragment_3)},$$slots:{default:!0}})}),append($$anchor5,fragment_2)},$$slots:{default:!0}})}),append($$anchor3,fragment_1)},$$slots:{default:!0}})}),append($$anchor,
fragment),pop()}var root_4$f=from_html("<!> ",1),root_3$j=from_html("<!> <!>",1),root_9$8=from_html('<p><span class="font-medium">Context size:</span> </p>'),root_8$d=from_html('<div class="mt-2 space-y-1 text-xs opacity-80"><p><span class="font-medium">Prompt tokens:</span> </p> <!></div>'),root_2$r=from_html('<!> <div><p class="font-medium"> </p> <!></div> <!>',1);function DialogChatError($$anchor,$$props){push$1($$props,!0);let open2=prop($$props,"open",15);const isTimeout=user_derived(()=>$$props.
type===ErrorDialogType.TIMEOUT),title2=user_derived(()=>get$3(isTimeout)?"TCP Timeout":"Server Error"),description2=user_derived(()=>get$3(isTimeout)?"The request did not receive a response from the server before timing out.":"The server responded with an error message. Review the details below."),iconClass=user_derived(()=>get$3(isTimeout)?"text-destructive":"text-amber-500"),badgeClass=user_derived(()=>get$3(isTimeout)?"border-destructive/40 bg-destructive/10 text-destructive":"border-amber-50\
0/40 bg-amber-500/10 text-amber-600 dark:text-amber-400");function handleOpenChange(newOpen){open2(newOpen),$$props.onOpenChange?.(newOpen)}var fragment=comment$2(),node2=first_child(fragment);component(node2,()=>Root$1,($$anchor2,AlertDialog_Root)=>{AlertDialog_Root($$anchor2,{get open(){return open2()},onOpenChange:handleOpenChange,children:($$anchor3,$$slotProps)=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);component(node_1,()=>Alert_dialog_content,($$anchor4,AlertDialog_Content)=>{
AlertDialog_Content($$anchor4,{children:($$anchor5,$$slotProps2)=>{var fragment_2=root_2$r(),node_2=first_child(fragment_2);component(node_2,()=>Alert_dialog_header,($$anchor6,AlertDialog_Header)=>{AlertDialog_Header($$anchor6,{children:($$anchor7,$$slotProps3)=>{var fragment_3=root_3$j(),node_3=first_child(fragment_3);component(node_3,()=>Alert_dialog_title,($$anchor8,AlertDialog_Title)=>{AlertDialog_Title($$anchor8,{class:"flex items-center gap-2",children:($$anchor9,$$slotProps4)=>{var fragment_4=root_4$f(),
node_4=first_child(fragment_4);{var consequent=$$anchor10=>{{let $0=user_derived(()=>`h-5 w-5 ${get$3(iconClass)}`);Timer_off($$anchor10,{get class(){return get$3($0)}})}},alternate=$$anchor10=>{{let $0=user_derived(()=>`h-5 w-5 ${get$3(iconClass)}`);Triangle_alert($$anchor10,{get class(){return get$3($0)}})}};if_block(node_4,$$render=>{get$3(isTimeout)?$$render(consequent):$$render(alternate,-1)})}var text2=sibling(node_4);template_effect(()=>set_text(text2,` ${get$3(title2)??""}`)),append($$anchor9,
fragment_4)},$$slots:{default:!0}})});var node_5=sibling(node_3,2);component(node_5,()=>Alert_dialog_description,($$anchor8,AlertDialog_Description)=>{AlertDialog_Description($$anchor8,{children:($$anchor9,$$slotProps4)=>{next$1();var text_1=text$8();template_effect(()=>set_text(text_1,get$3(description2))),append($$anchor9,text_1)},$$slots:{default:!0}})}),append($$anchor7,fragment_3)},$$slots:{default:!0}})});var div=sibling(node_2,2),p2=child(div),text_2=child(p2,!0);reset(p2);var node_6=sibling(
p2,2);{var consequent_2=$$anchor6=>{var div_1=root_8$d(),p_1=child(div_1),text_3=sibling(child(p_1));reset(p_1);var node_7=sibling(p_1,2);{var consequent_1=$$anchor7=>{var p_2=root_9$8(),text_4=sibling(child(p_2));reset(p_2),template_effect($0=>set_text(text_4,` ${$0??""}`),[()=>$$props.contextInfo.n_ctx.toLocaleString()]),append($$anchor7,p_2)};if_block(node_7,$$render=>{$$props.contextInfo.n_ctx&&$$render(consequent_1)})}reset(div_1),template_effect($0=>set_text(text_3,` ${$0??""}`),[()=>$$props.
contextInfo.n_prompt_tokens.toLocaleString()]),append($$anchor6,div_1)};if_block(node_6,$$render=>{$$props.contextInfo&&$$render(consequent_2)})}reset(div);var node_8=sibling(div,2);component(node_8,()=>Alert_dialog_footer,($$anchor6,AlertDialog_Footer)=>{AlertDialog_Footer($$anchor6,{children:($$anchor7,$$slotProps3)=>{var fragment_8=comment$2(),node_9=first_child(fragment_8);component(node_9,()=>Alert_dialog_action,($$anchor8,AlertDialog_Action)=>{AlertDialog_Action($$anchor8,{onclick:()=>handleOpenChange(
!1),children:($$anchor9,$$slotProps4)=>{next$1();var text_5=text$8("Close");append($$anchor9,text_5)},$$slots:{default:!0}})}),append($$anchor7,fragment_8)},$$slots:{default:!0}})}),template_effect(()=>{set_class(div,1,`rounded-lg border px-4 py-3 text-sm ${get$3(badgeClass)}`),set_text(text_2,$$props.message)}),append($$anchor5,fragment_2)},$$slots:{default:!0}})}),append($$anchor3,fragment_1)},$$slots:{default:!0}})}),append($$anchor,fragment),pop()}var root_4$e=from_html("<!> Empty Files Dete\
cted",1),root_3$i=from_html("<!> <!>",1),root_6$b=from_html('<li class="font-mono text-sm"> </li>'),root_2$q=from_html('<!> <div class="space-y-3 text-sm"><div class="rounded-lg bg-muted p-3"><div class="mb-2 font-medium">Empty Files:</div> <ul class="list-inside list-disc space-y-1 text-muted-foreground"></ul></div> <div><div class="mb-2 font-medium">What happened:</div> <ul class="list-inside list-disc space-y-1 text-muted-foreground"><li>Empty files cannot be processed or sent to the AI model\
</li> <li>These files have been automatically removed from your attachments</li> <li>You can try uploading files with content instead</li></ul></div></div> <!>',1);function DialogEmptyFileAlert($$anchor,$$props){push$1($$props,!0);let open2=prop($$props,"open",15);function handleOpenChange(newOpen){open2(newOpen),$$props.onOpenChange?.(newOpen)}var fragment=comment$2(),node2=first_child(fragment);component(node2,()=>Root$1,($$anchor2,AlertDialog_Root)=>{AlertDialog_Root($$anchor2,{get open(){return open2()},
onOpenChange:handleOpenChange,children:($$anchor3,$$slotProps)=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);component(node_1,()=>Alert_dialog_content,($$anchor4,AlertDialog_Content)=>{AlertDialog_Content($$anchor4,{children:($$anchor5,$$slotProps2)=>{var fragment_2=root_2$q(),node_2=first_child(fragment_2);component(node_2,()=>Alert_dialog_header,($$anchor6,AlertDialog_Header)=>{AlertDialog_Header($$anchor6,{children:($$anchor7,$$slotProps3)=>{var fragment_3=root_3$i(),node_3=first_child(
fragment_3);component(node_3,()=>Alert_dialog_title,($$anchor8,AlertDialog_Title)=>{AlertDialog_Title($$anchor8,{class:"flex items-center gap-2",children:($$anchor9,$$slotProps4)=>{var fragment_4=root_4$e(),node_4=first_child(fragment_4);File_x(node_4,{class:"h-5 w-5 text-destructive"}),next$1(),append($$anchor9,fragment_4)},$$slots:{default:!0}})});var node_5=sibling(node_3,2);component(node_5,()=>Alert_dialog_description,($$anchor8,AlertDialog_Description)=>{AlertDialog_Description($$anchor8,{
children:($$anchor9,$$slotProps4)=>{next$1();var text2=text$8("The following files are empty and have been removed from your attachments:");append($$anchor9,text2)},$$slots:{default:!0}})}),append($$anchor7,fragment_3)},$$slots:{default:!0}})});var div=sibling(node_2,2),div_1=child(div),ul=sibling(child(div_1),2);each(ul,20,()=>$$props.emptyFiles,fileName=>fileName,($$anchor6,fileName)=>{var li2=root_6$b(),text_1=child(li2,!0);reset(li2),template_effect(()=>set_text(text_1,fileName)),append($$anchor6,
li2)}),reset(ul),reset(div_1),next$1(2),reset(div);var node_6=sibling(div,2);component(node_6,()=>Alert_dialog_footer,($$anchor6,AlertDialog_Footer)=>{AlertDialog_Footer($$anchor6,{children:($$anchor7,$$slotProps3)=>{var fragment_5=comment$2(),node_7=first_child(fragment_5);component(node_7,()=>Alert_dialog_action,($$anchor8,AlertDialog_Action)=>{AlertDialog_Action($$anchor8,{onclick:()=>handleOpenChange(!1),children:($$anchor9,$$slotProps4)=>{next$1();var text_2=text$8("Got it");append($$anchor9,
text_2)},$$slots:{default:!0}})}),append($$anchor7,fragment_5)},$$slots:{default:!0}})}),append($$anchor5,fragment_2)},$$slots:{default:!0}})}),append($$anchor3,fragment_1)},$$slots:{default:!0}})}),append($$anchor,fragment),pop()}var root_4$d=from_html("<!> <!>",1),root_8$c=from_html('<div class="rounded-md bg-destructive/10 px-3 py-2"><p class="font-mono text-sm break-all text-destructive"> </p> <p class="mt-1 text-xs text-muted-foreground">File type not supported</p></div>'),root_7$b=from_html(
'<div class="space-y-2"><h4 class="text-sm font-medium text-destructive">Unsupported File Types</h4> <div class="space-y-1"></div></div>'),root_10$6=from_html('<div class="rounded-md bg-destructive/10 px-3 py-2"><p class="font-mono text-sm break-all text-destructive"> </p> <p class="mt-1 text-xs text-muted-foreground"> </p></div>'),root_9$7=from_html('<div class="space-y-2"><div class="space-y-1"></div></div>'),root_3$h=from_html('<!> <div class="!max-h-[50vh] min-h-0 flex-1 space-y-4 overflow-y\
-auto"><!> <!></div> <div class="rounded-md bg-muted/50 p-3"><h4 class="mb-2 text-sm font-medium">This model supports:</h4> <p class="text-sm text-muted-foreground"> </p></div> <!>',1),root_2$p=from_html("<!> <!>",1);function DialogFileUploadError($$anchor,$$props){push$1($$props,!0);let open2=prop($$props,"open",15);function handleOpenChange(newOpen){open2(newOpen),$$props.onOpenChange?.(newOpen)}var fragment=comment$2(),node2=first_child(fragment);component(node2,()=>Root$1,($$anchor2,AlertDialog_Root)=>{
AlertDialog_Root($$anchor2,{get open(){return open2()},onOpenChange:handleOpenChange,children:($$anchor3,$$slotProps)=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);component(node_1,()=>Portal,($$anchor4,AlertDialog_Portal)=>{AlertDialog_Portal($$anchor4,{children:($$anchor5,$$slotProps2)=>{var fragment_2=root_2$p(),node_2=first_child(fragment_2);component(node_2,()=>Alert_dialog_overlay,($$anchor6,AlertDialog_Overlay)=>{AlertDialog_Overlay($$anchor6,{})});var node_3=sibling(node_2,
2);component(node_3,()=>Alert_dialog_content,($$anchor6,AlertDialog_Content)=>{AlertDialog_Content($$anchor6,{class:"flex max-w-md flex-col",children:($$anchor7,$$slotProps3)=>{var fragment_3=root_3$h(),node_4=first_child(fragment_3);component(node_4,()=>Alert_dialog_header,($$anchor8,AlertDialog_Header)=>{AlertDialog_Header($$anchor8,{children:($$anchor9,$$slotProps4)=>{var fragment_4=root_4$d(),node_5=first_child(fragment_4);component(node_5,()=>Alert_dialog_title,($$anchor10,AlertDialog_Title)=>{
AlertDialog_Title($$anchor10,{children:($$anchor11,$$slotProps5)=>{next$1();var text2=text$8("File Upload Error");append($$anchor11,text2)},$$slots:{default:!0}})});var node_6=sibling(node_5,2);component(node_6,()=>Alert_dialog_description,($$anchor10,AlertDialog_Description)=>{AlertDialog_Description($$anchor10,{class:"text-sm text-muted-foreground",children:($$anchor11,$$slotProps5)=>{next$1();var text_1=text$8("Some files cannot be uploaded with the current model.");append($$anchor11,text_1)},
$$slots:{default:!0}})}),append($$anchor9,fragment_4)},$$slots:{default:!0}})});var div=sibling(node_4,2),node_7=child(div);{var consequent=$$anchor8=>{var div_1=root_7$b(),div_2=sibling(child(div_1),2);each(div_2,21,()=>$$props.fileErrorData.generallyUnsupported,file=>file.name,($$anchor9,file)=>{var div_3=root_8$c(),p2=child(div_3),text_2=child(p2,!0);reset(p2),next$1(2),reset(div_3),template_effect(()=>set_text(text_2,get$3(file).name)),append($$anchor9,div_3)}),reset(div_2),reset(div_1),append(
$$anchor8,div_1)};if_block(node_7,$$render=>{$$props.fileErrorData.generallyUnsupported.length>0&&$$render(consequent)})}var node_8=sibling(node_7,2);{var consequent_1=$$anchor8=>{var div_4=root_9$7(),div_5=child(div_4);each(div_5,21,()=>$$props.fileErrorData.modalityUnsupported,file=>file.name,($$anchor9,file)=>{var div_6=root_10$6(),p_1=child(div_6),text_3=child(p_1,!0);reset(p_1);var p_2=sibling(p_1,2),text_4=child(p_2,!0);reset(p_2),reset(div_6),template_effect(()=>{set_text(text_3,get$3(file).
name),set_text(text_4,$$props.fileErrorData.modalityReasons[get$3(file).name]||"Not supported by current model")}),append($$anchor9,div_6)}),reset(div_5),reset(div_4),append($$anchor8,div_4)};if_block(node_8,$$render=>{$$props.fileErrorData.modalityUnsupported.length>0&&$$render(consequent_1)})}reset(div);var div_7=sibling(div,2),p_3=sibling(child(div_7),2),text_5=child(p_3,!0);reset(p_3),reset(div_7);var node_9=sibling(div_7,2);component(node_9,()=>Alert_dialog_footer,($$anchor8,AlertDialog_Footer)=>{
AlertDialog_Footer($$anchor8,{children:($$anchor9,$$slotProps4)=>{var fragment_5=comment$2(),node_10=first_child(fragment_5);component(node_10,()=>Alert_dialog_action,($$anchor10,AlertDialog_Action)=>{AlertDialog_Action($$anchor10,{onclick:()=>handleOpenChange(!1),children:($$anchor11,$$slotProps5)=>{next$1();var text_6=text$8("Got it");append($$anchor11,text_6)},$$slots:{default:!0}})}),append($$anchor9,fragment_5)},$$slots:{default:!0}})}),template_effect($0=>set_text(text_5,$0),[()=>$$props.fileErrorData.
supportedTypes.join(", ")]),append($$anchor7,fragment_3)},$$slots:{default:!0}})}),append($$anchor5,fragment_2)},$$slots:{default:!0}})}),append($$anchor3,fragment_1)},$$slots:{default:!0}})}),append($$anchor,fragment),pop()}var root_4$c=from_html("<!> Model Not Available",1),root_3$g=from_html("<!> <!>",1),root_7$a=from_html('<button type="button" class="group flex w-full items-center justify-between gap-2 rounded-sm px-3 py-2 text-left text-sm transition-colors hover:bg-accent hover:text-accen\
t-foreground"><span class="min-w-0 truncate font-mono text-xs"> </span> <!></button>'),root_6$a=from_html('<div class="text-sm"><p class="mb-2 font-medium text-muted-foreground">Select an available model:</p> <div class="max-h-48 space-y-1 overflow-y-auto rounded-md border p-1"></div></div>'),root_2$o=from_html('<!> <div class="space-y-3"><div class="rounded-lg border border-amber-500/40 bg-amber-500/10 px-4 py-3 text-sm"><p class="font-medium text-amber-600 dark:text-amber-400">Requested: <code\
 class="rounded bg-amber-500/20 px-1.5 py-0.5"> </code></p></div> <!></div> <!>',1);function DialogModelNotAvailable($$anchor,$$props){push$1($$props,!0);let open2=prop($$props,"open",15),availableModels=prop($$props,"availableModels",19,()=>[]);function handleOpenChange(newOpen){open2(newOpen),$$props.onOpenChange?.(newOpen)}function handleSelectModel(model){const url2=new URL(page$1.url);url2.searchParams.set("model",model),handleOpenChange(!1),goto(url2.toString())}var fragment=comment$2(),node2=first_child(
fragment);component(node2,()=>Root$1,($$anchor2,AlertDialog_Root)=>{AlertDialog_Root($$anchor2,{get open(){return open2()},onOpenChange:handleOpenChange,children:($$anchor3,$$slotProps)=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);component(node_1,()=>Alert_dialog_content,($$anchor4,AlertDialog_Content)=>{AlertDialog_Content($$anchor4,{class:"max-w-lg",children:($$anchor5,$$slotProps2)=>{var fragment_2=root_2$o(),node_2=first_child(fragment_2);component(node_2,()=>Alert_dialog_header,
($$anchor6,AlertDialog_Header)=>{AlertDialog_Header($$anchor6,{children:($$anchor7,$$slotProps3)=>{var fragment_3=root_3$g(),node_3=first_child(fragment_3);component(node_3,()=>Alert_dialog_title,($$anchor8,AlertDialog_Title)=>{AlertDialog_Title($$anchor8,{class:"flex items-center gap-2",children:($$anchor9,$$slotProps4)=>{var fragment_4=root_4$c(),node_4=first_child(fragment_4);Triangle_alert(node_4,{class:"h-5 w-5 text-amber-500"}),next$1(),append($$anchor9,fragment_4)},$$slots:{default:!0}})});
var node_5=sibling(node_3,2);component(node_5,()=>Alert_dialog_description,($$anchor8,AlertDialog_Description)=>{AlertDialog_Description($$anchor8,{children:($$anchor9,$$slotProps4)=>{next$1();var text2=text$8("The requested model could not be found. Select an available model to continue.");append($$anchor9,text2)},$$slots:{default:!0}})}),append($$anchor7,fragment_3)},$$slots:{default:!0}})});var div=sibling(node_2,2),div_1=child(div),p2=child(div_1),code2=sibling(child(p2)),text_1=child(code2,
!0);reset(code2),reset(p2),reset(div_1);var node_6=sibling(div_1,2);{var consequent=$$anchor6=>{var div_2=root_6$a(),div_3=sibling(child(div_2),2);each(div_3,20,availableModels,model=>model,($$anchor7,model)=>{var button=root_7$a(),span=child(button),text_2=child(span,!0);reset(span);var node_7=sibling(span,2);Arrow_right(node_7,{class:"h-4 w-4 shrink-0 text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100"}),reset(button),template_effect(()=>set_text(text_2,model)),delegated(
"click",button,()=>handleSelectModel(model)),append($$anchor7,button)}),reset(div_3),reset(div_2),append($$anchor6,div_2)};if_block(node_6,$$render=>{availableModels().length>0&&$$render(consequent)})}reset(div);var node_8=sibling(div,2);component(node_8,()=>Alert_dialog_footer,($$anchor6,AlertDialog_Footer)=>{AlertDialog_Footer($$anchor6,{children:($$anchor7,$$slotProps3)=>{var fragment_5=comment$2(),node_9=first_child(fragment_5);component(node_9,()=>Alert_dialog_action,($$anchor8,AlertDialog_Action)=>{
AlertDialog_Action($$anchor8,{onclick:()=>handleOpenChange(!1),children:($$anchor9,$$slotProps4)=>{next$1();var text_3=text$8("Cancel");append($$anchor9,text_3)},$$slots:{default:!0}})}),append($$anchor7,fragment_5)},$$slots:{default:!0}})}),template_effect(()=>set_text(text_1,$$props.modelName)),append($$anchor5,fragment_2)},$$slots:{default:!0}})}),append($$anchor3,fragment_1)},$$slots:{default:!0}})}),append($$anchor,fragment),pop()}delegate(["click"]);var root_4$b=from_html("<!> <!>",1),root_3$f=from_html(
"<!> <!>",1),root_2$n=from_html("<!> <!>",1);function DialogConversationSelection($$anchor,$$props){push$1($$props,!0);let messageCountMap=prop($$props,"messageCountMap",19,()=>new Map),open2=prop($$props,"open",15,!1),conversationSelectionRef=state$1(void 0),previousOpen=state$1(!1);user_effect(()=>{open2()&&!get$3(previousOpen)&&get$3(conversationSelectionRef)?get$3(conversationSelectionRef).reset():!open2()&&get$3(previousOpen)&&$$props.onCancel(),set$1(previousOpen,open2(),!0)});var fragment=comment$2(),
node2=first_child(fragment);component(node2,()=>Root$2,($$anchor2,Dialog_Root)=>{Dialog_Root($$anchor2,{get open(){return open2()},set open($$value){open2($$value)},children:($$anchor3,$$slotProps)=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);component(node_1,()=>Portal$1,($$anchor4,Dialog_Portal)=>{Dialog_Portal($$anchor4,{children:($$anchor5,$$slotProps2)=>{var fragment_2=root_2$n(),node_2=first_child(fragment_2);component(node_2,()=>Dialog_overlay,($$anchor6,Dialog_Overlay)=>{Dialog_Overlay(
$$anchor6,{class:"z-[1000000]"})});var node_3=sibling(node_2,2);component(node_3,()=>Dialog_content,($$anchor6,Dialog_Content)=>{Dialog_Content($$anchor6,{class:"z-[1000001] max-w-2xl",children:($$anchor7,$$slotProps3)=>{var fragment_3=root_3$f(),node_4=first_child(fragment_3);component(node_4,()=>Dialog_header,($$anchor8,Dialog_Header)=>{Dialog_Header($$anchor8,{children:($$anchor9,$$slotProps4)=>{var fragment_4=root_4$b(),node_5=first_child(fragment_4);component(node_5,()=>Dialog_title,($$anchor10,Dialog_Title)=>{
Dialog_Title($$anchor10,{children:($$anchor11,$$slotProps5)=>{next$1();var text2=text$8();template_effect(()=>set_text(text2,`Select Conversations to ${$$props.mode==="export"?"Export":"Import"}`)),append($$anchor11,text2)},$$slots:{default:!0}})});var node_6=sibling(node_5,2);component(node_6,()=>Dialog_description,($$anchor10,Dialog_Description)=>{Dialog_Description($$anchor10,{children:($$anchor11,$$slotProps5)=>{var fragment_6=comment$2(),node_7=first_child(fragment_6);{var consequent=$$anchor12=>{
var text_1=text$8(`Choose which conversations you want to export. Selected conversations will be downloaded
						as a JSON file.`);append($$anchor12,text_1)},alternate=$$anchor12=>{var text_2=text$8(`Choose which conversations you want to import. Selected conversations will be merged
						with your existing conversations.`);append($$anchor12,text_2)};if_block(node_7,$$render=>{$$props.mode==="export"?$$render(consequent):$$render(alternate,-1)})}append($$anchor11,fragment_6)},$$slots:{default:!0}})}),append($$anchor9,fragment_4)},$$slots:{default:!0}})});var node_8=sibling(node_4,2);bind_this(ConversationSelection(node_8,{get conversations(){return $$props.conversations},get messageCountMap(){return messageCountMap()},get mode(){return $$props.mode},get onCancel(){return $$props.
onCancel},get onConfirm(){return $$props.onConfirm}}),$$value=>set$1(conversationSelectionRef,$$value,!0),()=>get$3(conversationSelectionRef)),append($$anchor7,fragment_3)},$$slots:{default:!0}})}),append($$anchor5,fragment_2)},$$slots:{default:!0}})}),append($$anchor3,fragment_1)},$$slots:{default:!0}})}),append($$anchor,fragment),pop()}var root$y=from_html('<div data-slot="table-container" class="relative w-full overflow-x-auto"><table><!></table></div>');function Table($$anchor,$$props){push$1(
$$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class","children"]);var div=root$y(),table2=child(div);attribute_effect(table2,$0=>({"data-slot":"table",class:$0,...restProps}),[()=>cn$1("w-full caption-bottom text-sm",$$props.class)]);var node2=child(table2);snippet(node2,()=>$$props.children??noop$3),reset(table2),bind_this(table2,$$value=>ref2($$value),()=>ref2()),reset(div),append($$anchor,div),pop()}var root$x=from_html("\
<tbody><!></tbody>");function Table_body($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class","children"]);var tbody2=root$x();attribute_effect(tbody2,$0=>({"data-slot":"table-body",class:$0,...restProps}),[()=>cn$1("[&_tr:last-child]:border-0",$$props.class)]);var node2=child(tbody2);snippet(node2,()=>$$props.children??noop$3),reset(tbody2),bind_this(tbody2,$$value=>ref2($$value),()=>ref2()),append(
$$anchor,tbody2),pop()}var root$w=from_html("<td><!></td>");function Table_cell($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class","children"]);var td=root$w();attribute_effect(td,$0=>({"data-slot":"table-cell",class:$0,...restProps}),[()=>cn$1("bg-clip-padding p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pe-0",$$props.class)]);var node2=child(td);snippet(node2,()=>$$props.children??
noop$3),reset(td),bind_this(td,$$value=>ref2($$value),()=>ref2()),append($$anchor,td),pop()}var root$v=from_html("<th><!></th>");function Table_head($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class","children"]);var th=root$v();attribute_effect(th,$0=>({"data-slot":"table-head",class:$0,...restProps}),[()=>cn$1("h-10 bg-clip-padding px-2 text-left align-middle font-medium whitespace-nowrap text-fo\
reground [&:has([role=checkbox])]:pe-0",$$props.class)]);var node2=child(th);snippet(node2,()=>$$props.children??noop$3),reset(th),bind_this(th,$$value=>ref2($$value),()=>ref2()),append($$anchor,th),pop()}var root$u=from_html("<thead><!></thead>");function Table_header($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class","children"]);var thead2=root$u();attribute_effect(thead2,$0=>({"data-slot":"tabl\
e-header",class:$0,...restProps}),[()=>cn$1("[&_tr]:border-b",$$props.class)]);var node2=child(thead2);snippet(node2,()=>$$props.children??noop$3),reset(thead2),bind_this(thead2,$$value=>ref2($$value),()=>ref2()),append($$anchor,thead2),pop()}var root$t=from_html("<tr><!></tr>");function Table_row($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class","children"]);var tr2=root$t();attribute_effect(tr2,
$0=>({"data-slot":"table-row",class:$0,...restProps}),[()=>cn$1("border-b transition-colors data-[state=selected]:bg-muted hover:[&,&>svelte-css-wrapper]:[&>th,td]:bg-muted/50",$$props.class)]);var node2=child(tr2);snippet(node2,()=>$$props.children??noop$3),reset(tr2),bind_this(tr2,$$value=>ref2($$value),()=>ref2()),append($$anchor,tr2),pop()}var root_3$e=from_html("<!> <!>",1),root_6$9=from_html('<div class="flex items-center justify-center py-8"><div class="text-sm text-muted-foreground">Load\
ing model information...</div></div>'),root_13$4=from_html('<div class="inline-flex items-center gap-2"><span class="resizable-text-container min-w-0 flex-1 truncate"> </span> <!></div>'),root_11$3=from_html("<!> <!>",1),root_17$2=from_html('<span class="resizable-text-container min-w-0 flex-1 truncate"> </span> <!>',1),root_15$4=from_html("<!> <!>",1),root_19$4=from_html("<!> <!>",1),root_23$1=from_html("<!> <!>",1),root_27=from_html("<!> <!>",1),root_31$1=from_html("<!> <!>",1),root_35=from_html(
"<!> <!>",1),root_39=from_html("<!> <!>",1),root_43=from_html("<!> <!>",1),root_47=from_html("<!> <!>",1),root_50=from_html("<!> <!>",1),root_56=from_html('<div class="flex flex-wrap gap-1"><!></div>'),root_54=from_html("<!> <!>",1),root_57=from_html("<!> <!>",1),root_63=from_html('<div class="rounded-md bg-muted p-4"><pre class="font-mono text-xs whitespace-pre-wrap"> </pre></div>'),root_61=from_html("<!> <!>",1),root_14$1=from_html("<!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!> <!>",1),root_9$6=from_html(
"<!> <!>",1),root_64=from_html('<div class="flex items-center justify-center py-8"><div class="text-sm text-muted-foreground">No model information available</div></div>'),root_2$m=from_html(`<style>@container (max-width: 56rem) {
				.resizable-text-container {
					max-width: calc(100vw - var(--threshold));
				}
			}</style> <!> <div class="space-y-6 py-4"><!></div>`,1);function DialogModelInformation($$anchor,$$props){push$1($$props,!0);let open2=prop($$props,"open",15),modelId=prop($$props,"modelId",3,null),isRouter=user_derived(()=>serverStore.isRouterMode),routerModelProps=state$1(null),isLoadingRouterProps=state$1(!1),serverProps2=user_derived(()=>get$3(isRouter)&&modelId()?get$3(routerModelProps):serverStore.props),modelName=user_derived(()=>get$3(isRouter)&&modelId()?modelId():modelsStore.singleModelName),
models=user_derived(modelOptions),isLoadingModels=user_derived(modelsLoading),firstModel=user_derived(()=>get$3(isRouter)&&modelId()?get$3(models).find(m=>m.model===modelId())??null:get$3(models)[0]??null),modalities=user_derived(()=>get$3(firstModel)?.id?modelsStore.getModelModalitiesArray(get$3(firstModel).id):[]);user_effect(()=>{open2()&&get$3(models).length===0&&modelsStore.fetch()}),user_effect(()=>{open2()&&get$3(isRouter)&&modelId()&&(set$1(isLoadingRouterProps,!0),modelsStore.fetchModelProps(
modelId()).then(props=>{set$1(routerModelProps,props,!0)}).catch(()=>{set$1(routerModelProps,null)}).finally(()=>{set$1(isLoadingRouterProps,!1)})),open2()||set$1(routerModelProps,null)});var fragment=comment$2(),node2=first_child(fragment);component(node2,()=>Root$2,($$anchor2,Dialog_Root)=>{Dialog_Root($$anchor2,{get onOpenChange(){return $$props.onOpenChange},get open(){return open2()},set open($$value){open2($$value)},children:($$anchor3,$$slotProps)=>{var fragment_1=comment$2(),node_1=first_child(
fragment_1);component(node_1,()=>Dialog_content,($$anchor4,Dialog_Content)=>{Dialog_Content($$anchor4,{class:"@container z-9999 !max-h-[80dvh] !max-w-[60rem] max-w-full",children:($$anchor5,$$slotProps2)=>{var fragment_2=root_2$m(),node_2=sibling(first_child(fragment_2),2);component(node_2,()=>Dialog_header,($$anchor6,Dialog_Header)=>{Dialog_Header($$anchor6,{children:($$anchor7,$$slotProps3)=>{var fragment_3=root_3$e(),node_3=first_child(fragment_3);component(node_3,()=>Dialog_title,($$anchor8,Dialog_Title)=>{
Dialog_Title($$anchor8,{children:($$anchor9,$$slotProps4)=>{next$1();var text2=text$8("Model Information");append($$anchor9,text2)},$$slots:{default:!0}})});var node_4=sibling(node_3,2);component(node_4,()=>Dialog_description,($$anchor8,Dialog_Description)=>{Dialog_Description($$anchor8,{children:($$anchor9,$$slotProps4)=>{next$1();var text_1=text$8("Current model details and capabilities");append($$anchor9,text_1)},$$slots:{default:!0}})}),append($$anchor7,fragment_3)},$$slots:{default:!0}})});
var div=sibling(node_2,2),node_5=child(div);{var consequent=$$anchor6=>{var div_1=root_6$9();append($$anchor6,div_1)},consequent_11=$$anchor6=>{const modelMeta=user_derived(()=>get$3(firstModel).meta);var fragment_4=comment$2(),node_6=first_child(fragment_4);{var consequent_10=$$anchor7=>{var fragment_5=comment$2(),node_7=first_child(fragment_5);component(node_7,()=>Table,($$anchor8,Table_Root)=>{Table_Root($$anchor8,{children:($$anchor9,$$slotProps3)=>{var fragment_6=root_9$6(),node_8=first_child(
fragment_6);component(node_8,()=>Table_header,($$anchor10,Table_Header)=>{Table_Header($$anchor10,{children:($$anchor11,$$slotProps4)=>{var fragment_7=comment$2(),node_9=first_child(fragment_7);component(node_9,()=>Table_row,($$anchor12,Table_Row)=>{Table_Row($$anchor12,{children:($$anchor13,$$slotProps5)=>{var fragment_8=root_11$3(),node_10=first_child(fragment_8);component(node_10,()=>Table_head,($$anchor14,Table_Head)=>{Table_Head($$anchor14,{class:"w-[10rem]",children:($$anchor15,$$slotProps6)=>{
next$1();var text_2=text$8("Model");append($$anchor15,text_2)},$$slots:{default:!0}})});var node_11=sibling(node_10,2);component(node_11,()=>Table_head,($$anchor14,Table_Head_1)=>{Table_Head_1($$anchor14,{children:($$anchor15,$$slotProps6)=>{var div_2=root_13$4(),span=child(div_2);set_style(span,"",{},{"--threshold":"12rem"});var text_3=child(span,!0);reset(span);var node_12=sibling(span,2);{let $0=user_derived(()=>get$3(modelName)||""),$1=user_derived(()=>!!get$3(modelName));ActionIconCopyToClipboard(
node_12,{get text(){return get$3($0)},get canCopy(){return get$3($1)},ariaLabel:"Copy model name to clipboard"})}reset(div_2),template_effect(()=>set_text(text_3,get$3(modelName))),append($$anchor15,div_2)},$$slots:{default:!0}})}),append($$anchor13,fragment_8)},$$slots:{default:!0}})}),append($$anchor11,fragment_7)},$$slots:{default:!0}})});var node_13=sibling(node_8,2);component(node_13,()=>Table_body,($$anchor10,Table_Body)=>{Table_Body($$anchor10,{children:($$anchor11,$$slotProps4)=>{var fragment_9=root_14$1(),
node_14=first_child(fragment_9);component(node_14,()=>Table_row,($$anchor12,Table_Row_1)=>{Table_Row_1($$anchor12,{children:($$anchor13,$$slotProps5)=>{var fragment_10=root_15$4(),node_15=first_child(fragment_10);component(node_15,()=>Table_cell,($$anchor14,Table_Cell)=>{Table_Cell($$anchor14,{class:"h-10 align-middle font-medium",children:($$anchor15,$$slotProps6)=>{next$1();var text_4=text$8("File Path");append($$anchor15,text_4)},$$slots:{default:!0}})});var node_16=sibling(node_15,2);component(
node_16,()=>Table_cell,($$anchor14,Table_Cell_1)=>{Table_Cell_1($$anchor14,{class:"inline-flex h-10 items-center gap-2 align-middle font-mono text-xs",children:($$anchor15,$$slotProps6)=>{var fragment_11=root_17$2(),span_1=first_child(fragment_11);set_style(span_1,"",{},{"--threshold":"14rem"});var text_5=child(span_1,!0);reset(span_1);var node_17=sibling(span_1,2);ActionIconCopyToClipboard(node_17,{get text(){return get$3(serverProps2).model_path},ariaLabel:"Copy model path to clipboard"}),template_effect(
()=>set_text(text_5,get$3(serverProps2).model_path)),append($$anchor15,fragment_11)},$$slots:{default:!0}})}),append($$anchor13,fragment_10)},$$slots:{default:!0}})});var node_18=sibling(node_14,2);{var consequent_1=$$anchor12=>{var fragment_12=comment$2(),node_19=first_child(fragment_12);component(node_19,()=>Table_row,($$anchor13,Table_Row_2)=>{Table_Row_2($$anchor13,{children:($$anchor14,$$slotProps5)=>{var fragment_13=root_19$4(),node_20=first_child(fragment_13);component(node_20,()=>Table_cell,
($$anchor15,Table_Cell_2)=>{Table_Cell_2($$anchor15,{class:"h-10 align-middle font-medium",children:($$anchor16,$$slotProps6)=>{next$1();var text_6=text$8("Context Size");append($$anchor16,text_6)},$$slots:{default:!0}})});var node_21=sibling(node_20,2);component(node_21,()=>Table_cell,($$anchor15,Table_Cell_3)=>{Table_Cell_3($$anchor15,{children:($$anchor16,$$slotProps6)=>{next$1();var text_7=text$8();template_effect($0=>set_text(text_7,`${$0??""} tokens`),[()=>formatNumber(get$3(serverProps2).
default_generation_settings.n_ctx)]),append($$anchor16,text_7)},$$slots:{default:!0}})}),append($$anchor14,fragment_13)},$$slots:{default:!0}})}),append($$anchor12,fragment_12)},alternate=$$anchor12=>{var fragment_15=comment$2(),node_22=first_child(fragment_15);component(node_22,()=>Table_row,($$anchor13,Table_Row_3)=>{Table_Row_3($$anchor13,{children:($$anchor14,$$slotProps5)=>{var fragment_16=root_23$1(),node_23=first_child(fragment_16);component(node_23,()=>Table_cell,($$anchor15,Table_Cell_4)=>{
Table_Cell_4($$anchor15,{class:"h-10 align-middle font-medium text-red-500",children:($$anchor16,$$slotProps6)=>{next$1();var text_8=text$8("Context Size");append($$anchor16,text_8)},$$slots:{default:!0}})});var node_24=sibling(node_23,2);component(node_24,()=>Table_cell,($$anchor15,Table_Cell_5)=>{Table_Cell_5($$anchor15,{class:"text-red-500",children:($$anchor16,$$slotProps6)=>{next$1();var text_9=text$8("Not available");append($$anchor16,text_9)},$$slots:{default:!0}})}),append($$anchor14,fragment_16)},
$$slots:{default:!0}})}),append($$anchor12,fragment_15)};if_block(node_18,$$render=>{get$3(serverProps2)?.default_generation_settings?.n_ctx?$$render(consequent_1):$$render(alternate,-1)})}var node_25=sibling(node_18,2);{var consequent_2=$$anchor12=>{var fragment_17=comment$2(),node_26=first_child(fragment_17);component(node_26,()=>Table_row,($$anchor13,Table_Row_4)=>{Table_Row_4($$anchor13,{children:($$anchor14,$$slotProps5)=>{var fragment_18=root_27(),node_27=first_child(fragment_18);component(
node_27,()=>Table_cell,($$anchor15,Table_Cell_6)=>{Table_Cell_6($$anchor15,{class:"h-10 align-middle font-medium",children:($$anchor16,$$slotProps6)=>{next$1();var text_10=text$8("Training Context");append($$anchor16,text_10)},$$slots:{default:!0}})});var node_28=sibling(node_27,2);component(node_28,()=>Table_cell,($$anchor15,Table_Cell_7)=>{Table_Cell_7($$anchor15,{children:($$anchor16,$$slotProps6)=>{next$1();var text_11=text$8();template_effect($0=>set_text(text_11,`${$0??""} tokens`),[()=>formatNumber(
get$3(modelMeta).n_ctx_train)]),append($$anchor16,text_11)},$$slots:{default:!0}})}),append($$anchor14,fragment_18)},$$slots:{default:!0}})}),append($$anchor12,fragment_17)};if_block(node_25,$$render=>{get$3(modelMeta)?.n_ctx_train&&$$render(consequent_2)})}var node_29=sibling(node_25,2);{var consequent_3=$$anchor12=>{var fragment_20=comment$2(),node_30=first_child(fragment_20);component(node_30,()=>Table_row,($$anchor13,Table_Row_5)=>{Table_Row_5($$anchor13,{children:($$anchor14,$$slotProps5)=>{
var fragment_21=root_31$1(),node_31=first_child(fragment_21);component(node_31,()=>Table_cell,($$anchor15,Table_Cell_8)=>{Table_Cell_8($$anchor15,{class:"h-10 align-middle font-medium",children:($$anchor16,$$slotProps6)=>{next$1();var text_12=text$8("Model Size");append($$anchor16,text_12)},$$slots:{default:!0}})});var node_32=sibling(node_31,2);component(node_32,()=>Table_cell,($$anchor15,Table_Cell_9)=>{Table_Cell_9($$anchor15,{children:($$anchor16,$$slotProps6)=>{next$1();var text_13=text$8();
template_effect($0=>set_text(text_13,$0),[()=>formatFileSize(get$3(modelMeta).size)]),append($$anchor16,text_13)},$$slots:{default:!0}})}),append($$anchor14,fragment_21)},$$slots:{default:!0}})}),append($$anchor12,fragment_20)};if_block(node_29,$$render=>{get$3(modelMeta)?.size&&$$render(consequent_3)})}var node_33=sibling(node_29,2);{var consequent_4=$$anchor12=>{var fragment_23=comment$2(),node_34=first_child(fragment_23);component(node_34,()=>Table_row,($$anchor13,Table_Row_6)=>{Table_Row_6($$anchor13,
{children:($$anchor14,$$slotProps5)=>{var fragment_24=root_35(),node_35=first_child(fragment_24);component(node_35,()=>Table_cell,($$anchor15,Table_Cell_10)=>{Table_Cell_10($$anchor15,{class:"h-10 align-middle font-medium",children:($$anchor16,$$slotProps6)=>{next$1();var text_14=text$8("Parameters");append($$anchor16,text_14)},$$slots:{default:!0}})});var node_36=sibling(node_35,2);component(node_36,()=>Table_cell,($$anchor15,Table_Cell_11)=>{Table_Cell_11($$anchor15,{children:($$anchor16,$$slotProps6)=>{
next$1();var text_15=text$8();template_effect($0=>set_text(text_15,$0),[()=>formatParameters(get$3(modelMeta).n_params)]),append($$anchor16,text_15)},$$slots:{default:!0}})}),append($$anchor14,fragment_24)},$$slots:{default:!0}})}),append($$anchor12,fragment_23)};if_block(node_33,$$render=>{get$3(modelMeta)?.n_params&&$$render(consequent_4)})}var node_37=sibling(node_33,2);{var consequent_5=$$anchor12=>{var fragment_26=comment$2(),node_38=first_child(fragment_26);component(node_38,()=>Table_row,
($$anchor13,Table_Row_7)=>{Table_Row_7($$anchor13,{children:($$anchor14,$$slotProps5)=>{var fragment_27=root_39(),node_39=first_child(fragment_27);component(node_39,()=>Table_cell,($$anchor15,Table_Cell_12)=>{Table_Cell_12($$anchor15,{class:"align-middle font-medium",children:($$anchor16,$$slotProps6)=>{next$1();var text_16=text$8("Embedding Size");append($$anchor16,text_16)},$$slots:{default:!0}})});var node_40=sibling(node_39,2);component(node_40,()=>Table_cell,($$anchor15,Table_Cell_13)=>{Table_Cell_13(
$$anchor15,{children:($$anchor16,$$slotProps6)=>{next$1();var text_17=text$8();template_effect($0=>set_text(text_17,$0),[()=>formatNumber(get$3(modelMeta).n_embd)]),append($$anchor16,text_17)},$$slots:{default:!0}})}),append($$anchor14,fragment_27)},$$slots:{default:!0}})}),append($$anchor12,fragment_26)};if_block(node_37,$$render=>{get$3(modelMeta)?.n_embd&&$$render(consequent_5)})}var node_41=sibling(node_37,2);{var consequent_6=$$anchor12=>{var fragment_29=comment$2(),node_42=first_child(fragment_29);
component(node_42,()=>Table_row,($$anchor13,Table_Row_8)=>{Table_Row_8($$anchor13,{children:($$anchor14,$$slotProps5)=>{var fragment_30=root_43(),node_43=first_child(fragment_30);component(node_43,()=>Table_cell,($$anchor15,Table_Cell_14)=>{Table_Cell_14($$anchor15,{class:"align-middle font-medium",children:($$anchor16,$$slotProps6)=>{next$1();var text_18=text$8("Vocabulary Size");append($$anchor16,text_18)},$$slots:{default:!0}})});var node_44=sibling(node_43,2);component(node_44,()=>Table_cell,
($$anchor15,Table_Cell_15)=>{Table_Cell_15($$anchor15,{children:($$anchor16,$$slotProps6)=>{next$1();var text_19=text$8();template_effect($0=>set_text(text_19,`${$0??""} tokens`),[()=>formatNumber(get$3(modelMeta).n_vocab)]),append($$anchor16,text_19)},$$slots:{default:!0}})}),append($$anchor14,fragment_30)},$$slots:{default:!0}})}),append($$anchor12,fragment_29)};if_block(node_41,$$render=>{get$3(modelMeta)?.n_vocab&&$$render(consequent_6)})}var node_45=sibling(node_41,2);{var consequent_7=$$anchor12=>{
var fragment_32=comment$2(),node_46=first_child(fragment_32);component(node_46,()=>Table_row,($$anchor13,Table_Row_9)=>{Table_Row_9($$anchor13,{children:($$anchor14,$$slotProps5)=>{var fragment_33=root_47(),node_47=first_child(fragment_33);component(node_47,()=>Table_cell,($$anchor15,Table_Cell_16)=>{Table_Cell_16($$anchor15,{class:"align-middle font-medium",children:($$anchor16,$$slotProps6)=>{next$1();var text_20=text$8("Vocabulary Type");append($$anchor16,text_20)},$$slots:{default:!0}})});var node_48=sibling(
node_47,2);component(node_48,()=>Table_cell,($$anchor15,Table_Cell_17)=>{Table_Cell_17($$anchor15,{class:"align-middle capitalize",children:($$anchor16,$$slotProps6)=>{next$1();var text_21=text$8();template_effect(()=>set_text(text_21,get$3(modelMeta).vocab_type)),append($$anchor16,text_21)},$$slots:{default:!0}})}),append($$anchor14,fragment_33)},$$slots:{default:!0}})}),append($$anchor12,fragment_32)};if_block(node_45,$$render=>{get$3(modelMeta)?.vocab_type&&$$render(consequent_7)})}var node_49=sibling(
node_45,2);component(node_49,()=>Table_row,($$anchor12,Table_Row_10)=>{Table_Row_10($$anchor12,{children:($$anchor13,$$slotProps5)=>{var fragment_35=root_50(),node_50=first_child(fragment_35);component(node_50,()=>Table_cell,($$anchor14,Table_Cell_18)=>{Table_Cell_18($$anchor14,{class:"align-middle font-medium",children:($$anchor15,$$slotProps6)=>{next$1();var text_22=text$8("Parallel Slots");append($$anchor15,text_22)},$$slots:{default:!0}})});var node_51=sibling(node_50,2);component(node_51,()=>Table_cell,
($$anchor14,Table_Cell_19)=>{Table_Cell_19($$anchor14,{children:($$anchor15,$$slotProps6)=>{next$1();var text_23=text$8();template_effect(()=>set_text(text_23,get$3(serverProps2).total_slots)),append($$anchor15,text_23)},$$slots:{default:!0}})}),append($$anchor13,fragment_35)},$$slots:{default:!0}})});var node_52=sibling(node_49,2);{var consequent_8=$$anchor12=>{var fragment_37=comment$2(),node_53=first_child(fragment_37);component(node_53,()=>Table_row,($$anchor13,Table_Row_11)=>{Table_Row_11($$anchor13,
{children:($$anchor14,$$slotProps5)=>{var fragment_38=root_54(),node_54=first_child(fragment_38);component(node_54,()=>Table_cell,($$anchor15,Table_Cell_20)=>{Table_Cell_20($$anchor15,{class:"align-middle font-medium",children:($$anchor16,$$slotProps6)=>{next$1();var text_24=text$8("Modalities");append($$anchor16,text_24)},$$slots:{default:!0}})});var node_55=sibling(node_54,2);component(node_55,()=>Table_cell,($$anchor15,Table_Cell_21)=>{Table_Cell_21($$anchor15,{children:($$anchor16,$$slotProps6)=>{
var div_3=root_56(),node_56=child(div_3);BadgesModality(node_56,{get modalities(){return get$3(modalities)}}),reset(div_3),append($$anchor16,div_3)},$$slots:{default:!0}})}),append($$anchor14,fragment_38)},$$slots:{default:!0}})}),append($$anchor12,fragment_37)};if_block(node_52,$$render=>{get$3(modalities).length>0&&$$render(consequent_8)})}var node_57=sibling(node_52,2);component(node_57,()=>Table_row,($$anchor12,Table_Row_12)=>{Table_Row_12($$anchor12,{children:($$anchor13,$$slotProps5)=>{var fragment_39=root_57(),
node_58=first_child(fragment_39);component(node_58,()=>Table_cell,($$anchor14,Table_Cell_22)=>{Table_Cell_22($$anchor14,{class:"align-middle font-medium",children:($$anchor15,$$slotProps6)=>{next$1();var text_25=text$8("Build Info");append($$anchor15,text_25)},$$slots:{default:!0}})});var node_59=sibling(node_58,2);component(node_59,()=>Table_cell,($$anchor14,Table_Cell_23)=>{Table_Cell_23($$anchor14,{class:"align-middle font-mono text-xs",children:($$anchor15,$$slotProps6)=>{next$1();var text_26=text$8();
template_effect(()=>set_text(text_26,get$3(serverProps2).build_info)),append($$anchor15,text_26)},$$slots:{default:!0}})}),append($$anchor13,fragment_39)},$$slots:{default:!0}})});var node_60=sibling(node_57,2);{var consequent_9=$$anchor12=>{var fragment_41=comment$2(),node_61=first_child(fragment_41);component(node_61,()=>Table_row,($$anchor13,Table_Row_13)=>{Table_Row_13($$anchor13,{children:($$anchor14,$$slotProps5)=>{var fragment_42=root_61(),node_62=first_child(fragment_42);component(node_62,
()=>Table_cell,($$anchor15,Table_Cell_24)=>{Table_Cell_24($$anchor15,{class:"align-middle font-medium",children:($$anchor16,$$slotProps6)=>{next$1();var text_27=text$8("Chat Template");append($$anchor16,text_27)},$$slots:{default:!0}})});var node_63=sibling(node_62,2);component(node_63,()=>Table_cell,($$anchor15,Table_Cell_25)=>{Table_Cell_25($$anchor15,{class:"py-10",children:($$anchor16,$$slotProps6)=>{var div_4=root_63(),pre=child(div_4),text_28=child(pre,!0);reset(pre),reset(div_4),template_effect(
()=>set_text(text_28,get$3(serverProps2).chat_template)),append($$anchor16,div_4)},$$slots:{default:!0}})}),append($$anchor14,fragment_42)},$$slots:{default:!0}})}),append($$anchor12,fragment_41)};if_block(node_60,$$render=>{get$3(serverProps2).chat_template&&$$render(consequent_9)})}append($$anchor11,fragment_9)},$$slots:{default:!0}})}),append($$anchor9,fragment_6)},$$slots:{default:!0}})}),append($$anchor7,fragment_5)};if_block(node_6,$$render=>{get$3(serverProps2)&&$$render(consequent_10)})}
append($$anchor6,fragment_4)},consequent_12=$$anchor6=>{var div_5=root_64();append($$anchor6,div_5)};if_block(node_5,$$render=>{get$3(isLoadingModels)||get$3(isLoadingRouterProps)?$$render(consequent):get$3(firstModel)?$$render(consequent_11,1):get$3(isLoadingModels)||$$render(consequent_12,2)})}reset(div),append($$anchor5,fragment_2)},$$slots:{default:!0}})}),append($$anchor3,fragment_1)},$$slots:{default:!0}})}),append($$anchor,fragment),pop()}var root_5$9=from_html('<span class="text-sm font-\
normal text-muted-foreground"> </span>'),root_4$a=from_html("<!> <span>MCP Resources</span> <!>",1),root_3$d=from_html("<!> <!>",1),root_8$b=from_html('<p class="mb-4 text-xs text-muted-foreground"> </p>'),root_9$5=from_html('<div class="flex flex-1 items-center justify-center"><!></div>'),root_10$5=from_html('<div class="flex flex-1 flex-col items-center justify-center gap-2 text-red-500"><span class="text-sm"> </span> <!></div>'),root_7$9=from_html('<div class="flex h-full flex-col"><div class\
="mb-3 flex items-center gap-2"><!> <span class="text-sm font-medium"> </span></div> <!> <div class="mb-4 rounded-md border border-border/50 bg-muted/30 px-3 py-2"><p class="font-mono text-xs break-all text-muted-foreground"> </p></div> <!></div>'),root_15$3=from_html('<div class="flex flex-col gap-10"></div>'),root_18$1=from_html('<div class="flex h-full items-center justify-center text-sm text-muted-foreground">Select a resource to preview</div>'),root_22$1=from_html("<!> Attach Resource",1),root_26$1=from_html(
"<!> ",1),root_19$3=from_html("<!> <!>",1),root_2$l=from_html('<!> <div class="flex h-[500px] min-w-0"><div class="w-72 shrink-0 overflow-y-auto border-r border-border/30 p-4"><!></div> <div class="min-w-0 flex-1 overflow-auto p-4"><!></div></div> <!>',1);function DialogMcpResourcesBrowser($$anchor,$$props){push$1($$props,!0);let open2=prop($$props,"open",15,!1),selectedResources=new SvelteSet,lastSelectedUri=state$1(null),isAttaching=state$1(!1),selectedTemplate=state$1(null),templatePreviewUri=state$1(
null),templatePreviewContent=state$1(null),templatePreviewLoading=state$1(!1),templatePreviewError=state$1(null);const totalCount=user_derived(mcpTotalResourceCount);user_effect(()=>{open2()&&(loadResources(),$$props.preSelectedUri&&(selectedResources.clear(),selectedResources.add($$props.preSelectedUri),set$1(lastSelectedUri,$$props.preSelectedUri,!0)))});async function loadResources(){const perChatOverrides=conversationsStore.getAllMcpServerOverrides();await mcpStore.ensureInitialized(perChatOverrides)&&
await mcpStore.fetchAllResources()}function handleOpenChange(newOpen){open2(newOpen),$$props.onOpenChange?.(newOpen),newOpen||(selectedResources.clear(),set$1(lastSelectedUri,null),clearTemplateState())}function clearTemplateState(){set$1(selectedTemplate,null),set$1(templatePreviewUri,null),set$1(templatePreviewContent,null),set$1(templatePreviewLoading,!1),set$1(templatePreviewError,null)}function handleTemplateSelect(template){if(selectedResources.clear(),set$1(lastSelectedUri,null),get$3(selectedTemplate)?.
uriTemplate===template.uriTemplate&&get$3(selectedTemplate)?.serverName===template.serverName){clearTemplateState();return}set$1(selectedTemplate,template,!0),set$1(templatePreviewUri,null),set$1(templatePreviewContent,null),set$1(templatePreviewLoading,!1),set$1(templatePreviewError,null)}async function handleTemplateResolve(uri2,serverName){set$1(templatePreviewUri,uri2,!0),set$1(templatePreviewContent,null),set$1(templatePreviewLoading,!0),set$1(templatePreviewError,null);try{const content2=await mcpStore.
readResourceByUri(serverName,uri2);content2?set$1(templatePreviewContent,content2,!0):set$1(templatePreviewError,"Failed to read resource")}catch(error2){set$1(templatePreviewError,error2 instanceof Error?error2.message:"Unknown error",!0)}finally{set$1(templatePreviewLoading,!1)}}function handleTemplateCancelForm(){clearTemplateState()}async function handleAttachTemplateResource(){if(!(!get$3(templatePreviewUri)||!get$3(selectedTemplate)||!get$3(templatePreviewContent))){set$1(isAttaching,!0);try{
const knownResource=mcpResourceStore.findResourceByUri(get$3(templatePreviewUri));if(knownResource)mcpResourceStore.isAttached(knownResource.uri)||await mcpStore.attachResource(knownResource.uri),toast.success(`Resource attached: ${knownResource.title||knownResource.name}`);else{if(mcpResourceStore.isAttached(get$3(templatePreviewUri))){toast.info("Resource already attached"),handleOpenChange(!1);return}const resourceInfo={uri:get$3(templatePreviewUri),name:get$3(templatePreviewUri).split("/").pop()||
get$3(templatePreviewUri),serverName:get$3(selectedTemplate).serverName},attachment=mcpResourceStore.addAttachment(resourceInfo);mcpResourceStore.updateAttachmentContent(attachment.id,get$3(templatePreviewContent)),toast.success(`Resource attached: ${resourceInfo.name}`)}handleOpenChange(!1)}catch(error2){console.error("Failed to attach template resource:",error2)}finally{set$1(isAttaching,!1)}}}function handleResourceSelect(resource,shiftKey=!1){if(clearTemplateState(),shiftKey&&get$3(lastSelectedUri)){
const allResources=getAllResourcesFlatInTreeOrder(),lastIndex=allResources.findIndex(r2=>r2.uri===get$3(lastSelectedUri)),currentIndex=allResources.findIndex(r2=>r2.uri===resource.uri);if(lastIndex!==-1&&currentIndex!==-1){const start2=Math.min(lastIndex,currentIndex),end=Math.max(lastIndex,currentIndex);for(let i=start2;i<=end;i++)selectedResources.add(allResources[i].uri)}}else selectedResources.clear(),selectedResources.add(resource.uri),set$1(lastSelectedUri,resource.uri,!0)}function handleResourceToggle(resource,checked){
clearTemplateState(),checked?selectedResources.add(resource.uri):selectedResources.delete(resource.uri),set$1(lastSelectedUri,resource.uri,!0)}function getAllResourcesFlatInTreeOrder(){const allResources=[],resourcesMap=mcpResources();for(const[serverName,serverRes]of resourcesMap.entries())for(const resource of serverRes.resources)allResources.push({...resource,serverName});return allResources.sort((a,b)=>{const aName=getResourceDisplayName(a),bName=getResourceDisplayName(b);return aName.localeCompare(
bName)})}async function handleAttach(){if(selectedResources.size!==0){set$1(isAttaching,!0);try{const resourcesToAttach=getAllResourcesFlatInTreeOrder().filter(r2=>selectedResources.has(r2.uri));for(const resource of resourcesToAttach)await mcpStore.attachResource(resource.uri),$$props.onAttach?.(resource);const count=resourcesToAttach.length;toast.success(count===1?`Resource attached: ${resourcesToAttach[0].name}`:`${count} resources attached`),handleOpenChange(!1)}catch(error2){console.error("\
Failed to attach resources:",error2)}finally{set$1(isAttaching,!1)}}}const selectedTemplateUri=user_derived(()=>get$3(selectedTemplate)?.uriTemplate??null),hasTemplateResult=user_derived(()=>!!get$3(selectedTemplate)&&!!get$3(templatePreviewContent)&&!!get$3(templatePreviewUri));var fragment=comment$2(),node2=first_child(fragment);component(node2,()=>Root$2,($$anchor2,Dialog_Root)=>{Dialog_Root($$anchor2,{get open(){return open2()},onOpenChange:handleOpenChange,children:($$anchor3,$$slotProps)=>{
var fragment_1=comment$2(),node_1=first_child(fragment_1);component(node_1,()=>Dialog_content,($$anchor4,Dialog_Content)=>{Dialog_Content($$anchor4,{class:"max-h-[80vh] !max-w-4xl overflow-hidden p-0",children:($$anchor5,$$slotProps2)=>{var fragment_2=root_2$l(),node_2=first_child(fragment_2);component(node_2,()=>Dialog_header,($$anchor6,Dialog_Header)=>{Dialog_Header($$anchor6,{class:"border-b border-border/30 px-6 py-4",children:($$anchor7,$$slotProps3)=>{var fragment_3=root_3$d(),node_3=first_child(
fragment_3);component(node_3,()=>Dialog_title,($$anchor8,Dialog_Title)=>{Dialog_Title($$anchor8,{class:"flex items-center gap-2",children:($$anchor9,$$slotProps4)=>{var fragment_4=root_4$a(),node_4=first_child(fragment_4);Folder_open(node_4,{class:"h-5 w-5"});var node_5=sibling(node_4,4);{var consequent=$$anchor10=>{var span=root_5$9(),text2=child(span);reset(span),template_effect(()=>set_text(text2,`(${get$3(totalCount)??""})`)),append($$anchor10,span)};if_block(node_5,$$render=>{get$3(totalCount)>
0&&$$render(consequent)})}append($$anchor9,fragment_4)},$$slots:{default:!0}})});var node_6=sibling(node_3,2);component(node_6,()=>Dialog_description,($$anchor8,Dialog_Description)=>{Dialog_Description($$anchor8,{children:($$anchor9,$$slotProps4)=>{next$1();var text_1=text$8("Browse and attach resources from connected MCP servers to your chat context.");append($$anchor9,text_1)},$$slots:{default:!0}})}),append($$anchor7,fragment_3)},$$slots:{default:!0}})});var div=sibling(node_2,2),div_1=child(
div),node_7=child(div_1);McpResourcesBrowser(node_7,{onSelect:handleResourceSelect,onToggle:handleResourceToggle,onTemplateSelect:handleTemplateSelect,get selectedUris(){return selectedResources},get selectedTemplateUri(){return get$3(selectedTemplateUri)},get expandToUri(){return $$props.preSelectedUri}}),reset(div_1);var div_2=sibling(div_1,2),node_8=child(div_2);{var consequent_4=$$anchor6=>{var div_3=root_7$9(),div_4=child(div_3),node_9=child(div_4);Braces(node_9,{class:"h-4 w-4 text-muted-f\
oreground"});var span_1=sibling(node_9,2),text_2=child(span_1,!0);reset(span_1),reset(div_4);var node_10=sibling(div_4,2);{var consequent_1=$$anchor7=>{var p2=root_8$b(),text_3=child(p2,!0);reset(p2),template_effect(()=>set_text(text_3,get$3(selectedTemplate).description)),append($$anchor7,p2)};if_block(node_10,$$render=>{get$3(selectedTemplate).description&&$$render(consequent_1)})}var div_5=sibling(node_10,2),p_1=child(div_5),text_4=child(p_1,!0);reset(p_1),reset(div_5);var node_11=sibling(div_5,
2);{var consequent_2=$$anchor7=>{var div_6=root_9$5(),node_12=child(div_6);Loader_circle(node_12,{class:"h-6 w-6 animate-spin text-muted-foreground"}),reset(div_6),append($$anchor7,div_6)},consequent_3=$$anchor7=>{var div_7=root_10$5(),span_2=child(div_7),text_5=child(span_2,!0);reset(span_2);var node_13=sibling(span_2,2);Button(node_13,{size:"sm",variant:"outline",onclick:()=>{set$1(templatePreviewError,null)},children:($$anchor8,$$slotProps3)=>{next$1();var text_6=text$8("Try again");append($$anchor8,
text_6)},$$slots:{default:!0}}),reset(div_7),template_effect(()=>set_text(text_5,get$3(templatePreviewError))),append($$anchor7,div_7)},alternate=$$anchor7=>{McpResourceTemplateForm($$anchor7,{get template(){return get$3(selectedTemplate)},onResolve:handleTemplateResolve,onCancel:handleTemplateCancelForm})};if_block(node_11,$$render=>{get$3(templatePreviewLoading)?$$render(consequent_2):get$3(templatePreviewError)?$$render(consequent_3,1):$$render(alternate,-1)})}reset(div_3),template_effect(()=>{
set_text(text_2,get$3(selectedTemplate).title||get$3(selectedTemplate).name),set_text(text_4,get$3(selectedTemplate).uriTemplate)}),append($$anchor6,div_3)},consequent_5=$$anchor6=>{{let $0=user_derived(()=>({uri:get$3(templatePreviewUri)??"",name:get$3(templatePreviewUri)?.split("/").pop()||(get$3(templatePreviewUri)??""),serverName:get$3(selectedTemplate)?.serverName||""}));McpResourcePreview($$anchor6,{get resource(){return get$3($0)},get preloadedContent(){return get$3(templatePreviewContent)}})}},
consequent_6=$$anchor6=>{const allResources=user_derived(getAllResourcesFlatInTreeOrder),selectedResource=user_derived(()=>get$3(allResources).find(r2=>selectedResources.has(r2.uri)));{let $0=user_derived(()=>get$3(selectedResource)??null);McpResourcePreview($$anchor6,{get resource(){return get$3($0)}})}},consequent_8=$$anchor6=>{var div_8=root_15$3();each(div_8,21,getAllResourcesFlatInTreeOrder,resource=>resource.uri,($$anchor7,resource)=>{var fragment_8=comment$2(),node_14=first_child(fragment_8);
{var consequent_7=$$anchor8=>{McpResourcePreview($$anchor8,{get resource(){return get$3(resource)}})},d2=user_derived(()=>selectedResources.has(get$3(resource).uri));if_block(node_14,$$render=>{get$3(d2)&&$$render(consequent_7)})}append($$anchor7,fragment_8)}),reset(div_8),append($$anchor6,div_8)},alternate_1=$$anchor6=>{var div_9=root_18$1();append($$anchor6,div_9)};if_block(node_8,$$render=>{get$3(selectedTemplate)&&!get$3(templatePreviewContent)?$$render(consequent_4):get$3(hasTemplateResult)?
$$render(consequent_5,1):selectedResources.size===1?$$render(consequent_6,2):selectedResources.size>1?$$render(consequent_8,3):$$render(alternate_1,-1)})}reset(div_2),reset(div);var node_15=sibling(div,2);component(node_15,()=>Dialog_footer,($$anchor6,Dialog_Footer)=>{Dialog_Footer($$anchor6,{class:"border-t border-border/30 px-6 py-4",children:($$anchor7,$$slotProps3)=>{var fragment_10=root_19$3(),node_16=first_child(fragment_10);Button(node_16,{variant:"outline",onclick:()=>handleOpenChange(!1),
children:($$anchor8,$$slotProps4)=>{next$1();var text_7=text$8("Cancel");append($$anchor8,text_7)},$$slots:{default:!0}});var node_17=sibling(node_16,2);{var consequent_10=$$anchor8=>{Button($$anchor8,{onclick:handleAttachTemplateResource,get disabled(){return get$3(isAttaching)},children:($$anchor9,$$slotProps4)=>{var fragment_12=root_22$1(),node_18=first_child(fragment_12);{var consequent_9=$$anchor10=>{Loader_circle($$anchor10,{class:"mr-2 h-4 w-4 animate-spin"})},alternate_2=$$anchor10=>{Plus(
$$anchor10,{class:"mr-2 h-4 w-4"})};if_block(node_18,$$render=>{get$3(isAttaching)?$$render(consequent_9):$$render(alternate_2,-1)})}next$1(),append($$anchor9,fragment_12)},$$slots:{default:!0}})},alternate_4=$$anchor8=>{{let $0=user_derived(()=>selectedResources.size===0||get$3(isAttaching));Button($$anchor8,{onclick:handleAttach,get disabled(){return get$3($0)},children:($$anchor9,$$slotProps4)=>{var fragment_16=root_26$1(),node_19=first_child(fragment_16);{var consequent_11=$$anchor10=>{Loader_circle(
$$anchor10,{class:"mr-2 h-4 w-4 animate-spin"})},alternate_3=$$anchor10=>{Plus($$anchor10,{class:"mr-2 h-4 w-4"})};if_block(node_19,$$render=>{get$3(isAttaching)?$$render(consequent_11):$$render(alternate_3,-1)})}var text_8=sibling(node_19);template_effect(()=>set_text(text_8,` Attach ${selectedResources.size>0?`(${selectedResources.size})`:"Resource"}`)),append($$anchor9,fragment_16)},$$slots:{default:!0}})}};if_block(node_17,$$render=>{get$3(hasTemplateResult)?$$render(consequent_10):$$render(
alternate_4,-1)})}append($$anchor7,fragment_10)},$$slots:{default:!0}})}),append($$anchor5,fragment_2)},$$slots:{default:!0}})}),append($$anchor3,fragment_1)},$$slots:{default:!0}})}),append($$anchor,fragment),pop()}var root_7$8=from_html('<img alt="" class="h-3 w-3 shrink-0 rounded-sm"/>'),root_6$8=from_html('<span class="flex items-center gap-1 text-xs text-muted-foreground">· <!> </span>'),root_8$a=from_html('<span class="rounded bg-muted px-1.5 py-0.5 text-xs"> </span>'),root_5$8=from_html(
'<div class="flex items-center gap-2"><span class="text-xs text-muted-foreground"> </span> <!> <!></div>'),root_3$c=from_html("<!> <!>",1),root_10$4=from_html('<div class="flex items-center justify-center"><img class="max-h-[70vh] max-w-full rounded object-contain"/></div>'),root_12$3=from_html('<pre class="max-h-[70vh] overflow-auto rounded-md border bg-muted/30 p-4 font-mono text-sm break-words whitespace-pre-wrap"> </pre>'),root_13$3=from_html('<div class="py-8 text-center text-sm text-muted-\
foreground">No content available</div>'),root_2$k=from_html('<!> <div class="flex items-center justify-end gap-1"><!> <!></div> <div class="overflow-auto"><!></div>',1);function DialogMcpResourcePreview($$anchor,$$props){push$1($$props,!0);let open2=prop($$props,"open",15);const serverName=user_derived(()=>mcpStore.getServerDisplayName($$props.extra.serverName)),favicon=user_derived(()=>mcpStore.getServerFavicon($$props.extra.serverName));function getLanguage(){if($$props.extra.mimeType?.includes(
MimeTypeIncludes.JSON))return MimeTypeIncludes.JSON;if($$props.extra.mimeType?.includes(MimeTypeIncludes.JAVASCRIPT))return MimeTypeIncludes.JAVASCRIPT;if($$props.extra.mimeType?.includes(MimeTypeIncludes.TYPESCRIPT))return MimeTypeIncludes.TYPESCRIPT;const name=$$props.extra.name||$$props.extra.uri||"";return getLanguageFromFilename(name)||"plaintext"}function handleDownload(){$$props.extra.content&&downloadResourceContent($$props.extra.content,$$props.extra.mimeType||MimeTypeText.PLAIN,$$props.
extra.name||DEFAULT_RESOURCE_FILENAME)}var fragment=comment$2(),node2=first_child(fragment);component(node2,()=>Root$2,($$anchor2,Dialog_Root)=>{Dialog_Root($$anchor2,{get onOpenChange(){return $$props.onOpenChange},get open(){return open2()},set open($$value){open2($$value)},children:($$anchor3,$$slotProps)=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);component(node_1,()=>Dialog_content,($$anchor4,Dialog_Content)=>{Dialog_Content($$anchor4,{class:"grid max-h-[90vh] max-w-5xl over\
flow-hidden sm:w-auto sm:max-w-6xl",children:($$anchor5,$$slotProps2)=>{var fragment_2=root_2$k(),node_2=first_child(fragment_2);component(node_2,()=>Dialog_header,($$anchor6,Dialog_Header)=>{Dialog_Header($$anchor6,{children:($$anchor7,$$slotProps3)=>{var fragment_3=root_3$c(),node_3=first_child(fragment_3);component(node_3,()=>Dialog_title,($$anchor8,Dialog_Title)=>{Dialog_Title($$anchor8,{class:"pr-8",children:($$anchor9,$$slotProps4)=>{next$1();var text2=text$8();template_effect(()=>set_text(
text2,$$props.extra.name)),append($$anchor9,text2)},$$slots:{default:!0}})});var node_4=sibling(node_3,2);component(node_4,()=>Dialog_description,($$anchor8,Dialog_Description)=>{Dialog_Description($$anchor8,{children:($$anchor9,$$slotProps4)=>{var div=root_5$8(),span=child(div),text_1=child(span,!0);reset(span);var node_5=sibling(span,2);{var consequent_1=$$anchor10=>{var span_1=root_6$8(),node_6=sibling(child(span_1));{var consequent=$$anchor11=>{var img=root_7$8();template_effect(()=>set_attribute(
img,"src",get$3(favicon))),event("error",img,e=>{e.currentTarget.style.display="none"}),replay_events(img),append($$anchor11,img)};if_block(node_6,$$render=>{get$3(favicon)&&$$render(consequent)})}var text_2=sibling(node_6);reset(span_1),template_effect(()=>set_text(text_2,` ${get$3(serverName)??""}`)),append($$anchor10,span_1)};if_block(node_5,$$render=>{get$3(serverName)&&$$render(consequent_1)})}var node_7=sibling(node_5,2);{var consequent_2=$$anchor10=>{var span_2=root_8$a(),text_3=child(span_2,
!0);reset(span_2),template_effect(()=>set_text(text_3,$$props.extra.mimeType)),append($$anchor10,span_2)};if_block(node_7,$$render=>{$$props.extra.mimeType&&$$render(consequent_2)})}reset(div),template_effect(()=>set_text(text_1,$$props.extra.uri)),append($$anchor9,div)},$$slots:{default:!0}})}),append($$anchor7,fragment_3)},$$slots:{default:!0}})});var div_1=sibling(node_2,2),node_8=child(div_1);{let $0=user_derived(()=>!!$$props.extra.content);ActionIconCopyToClipboard(node_8,{get text(){return $$props.
extra.content},get canCopy(){return get$3($0)},ariaLabel:"Copy content"})}var node_9=sibling(node_8,2);{let $0=user_derived(()=>!$$props.extra.content);Button(node_9,{variant:"ghost",size:"sm",class:"h-7 w-7 p-0",onclick:handleDownload,get disabled(){return get$3($0)},title:"Download content",children:($$anchor6,$$slotProps3)=>{Download($$anchor6,{class:"h-3.5 w-3.5"})},$$slots:{default:!0}})}reset(div_1);var div_2=sibling(div_1,2),node_10=child(div_2);{var consequent_3=$$anchor6=>{var div_3=root_10$4(),
img_1=child(div_3);reset(div_3),template_effect($0=>{set_attribute(img_1,"src",$0),set_attribute(img_1,"alt",$$props.extra.name)},[()=>$$props.extra.content.startsWith("data:")?$$props.extra.content:`data:${$$props.extra.mimeType||"image/png"};base64,${$$props.extra.content}`]),append($$anchor6,div_3)},d2=user_derived(()=>isImageResource($$props.extra.mimeType,$$props.extra.uri)&&$$props.extra.content),consequent_4=$$anchor6=>{{let $0=user_derived(getLanguage);SyntaxHighlightedCode($$anchor6,{get code(){
return $$props.extra.content},get language(){return get$3($0)},maxHeight:"70vh"})}},d_12=user_derived(()=>isCodeResource($$props.extra.mimeType,$$props.extra.uri)&&$$props.extra.content),consequent_5=$$anchor6=>{var pre=root_12$3(),text_4=child(pre,!0);reset(pre),template_effect(()=>set_text(text_4,$$props.extra.content)),append($$anchor6,pre)},alternate=$$anchor6=>{var div_4=root_13$3();append($$anchor6,div_4)};if_block(node_10,$$render=>{get$3(d2)?$$render(consequent_3):get$3(d_12)?$$render(consequent_4,
1):$$props.extra.content?$$render(consequent_5,2):$$render(alternate,-1)})}reset(div_2),append($$anchor5,fragment_2)},$$slots:{default:!0}})}),append($$anchor3,fragment_1)},$$slots:{default:!0}})}),append($$anchor,fragment),pop()}let _url=state$1(proxy(SETTINGS_FALLBACK_EXIT_ROUTE));const settingsReferrer={get url(){return get$3(_url)},set url(value){set$1(_url,value,!0)}};var root_3$b=from_html('<div class="space-y-6"><!></div>'),root$s=from_html(`<div class="mx-auto flex h-full max-h-[100dvh] \
w-full flex-col overflow-y-auto md:pl-8"><div class="flex flex-1 flex-col gap-4 md:flex-row"><!> <!> <div class="mx-auto max-w-3xl flex-1"><div class="space-y-6 p-4 md:p-6 md:pt-28"><div class="grid"><div class="mb-6 flex items-center gap-2 border-b border-border/30 pb-6 md:flex"><!> <h3 class="text-lg font-semibold"> </h3></div> <!></div> <div class="mt-8 border-t border-border/30 pt-6"><p class="text-xs text-muted-foreground">Settings are saved in browser's localStorage</p></div></div> <!></di\
v></div></div>`);function SettingsChat($$anchor,$$props){push$1($$props,!0);let activeSlug=user_derived(()=>$$props.initialSection??page$1.params.section??"general"),currentSection=user_derived(()=>SETTINGS_CHAT_SECTIONS.find(section=>section.slug===get$3(activeSlug))||SETTINGS_CHAT_SECTIONS[0]),localConfig=state$1(proxy({...config$1()})),mobileHeader,fetchInitiated=!1;user_effect(()=>{isRouterMode()&&get$3(currentSection).fields&&!fetchInitiated&&(fetchInitiated=!0,modelsStore.fetch().then(()=>modelsStore.
fetchRouterModels()).then(()=>modelsStore.fetchModalitiesForLoadedModels()).then(()=>modelsStore.ensureFirstModelSelected()))});function handleThemeChange(newTheme){get$3(localConfig).theme=newTheme,setMode(newTheme)}function handleConfigChange(key2,value){get$3(localConfig)[key2]=value}function handleReset(){set$1(localConfig,{...config$1()},!0),setMode(get$3(localConfig).theme),mobileHeader?.updateCarousel()}function handleSave(){if(get$3(localConfig).custom&&typeof get$3(localConfig).custom==
"string"&&get$3(localConfig).custom.trim())try{JSON.parse(get$3(localConfig).custom)}catch(error2){alert("Invalid JSON in custom parameters. Please check the format and try again."),console.error(error2);return}const processedConfig={...get$3(localConfig)};for(const field of NUMERIC_FIELDS)if(processedConfig[field]!==void 0&&processedConfig[field]!==""){const numValue=Number(processedConfig[field]);if(!isNaN(numValue))POSITIVE_INTEGER_FIELDS.includes(field)?processedConfig[field]=Math.max(1,Math.
round(numValue)):processedConfig[field]=numValue;else{alert(`Invalid numeric value for ${field}. Please enter a valid number.`);return}}settingsStore.updateMultipleConfig(processedConfig),goto(settingsReferrer.url)}function reset$1(){set$1(localConfig,{...config$1()},!0)}setChatSettingsConfigContext({get localConfig(){return get$3(localConfig)},handleConfigChange,handleThemeChange});var $$exports={reset:reset$1},div=root$s(),div_1=child(div),node2=child(div_1);{let $0=user_derived(()=>$$props.getSectionHref??
(section=>RouterService.settings(section.slug)));SettingsChatDesktopSidebar(node2,{get sections(){return SETTINGS_CHAT_SECTIONS},isActive:section=>section.slug===get$3(activeSlug),get getHref(){return get$3($0)}})}var node_1=sibling(node2,2);{let $0=user_derived(()=>$$props.getSectionHref??(section=>RouterService.settings(section.slug)));bind_this(SettingsChatMobileHeader(node_1,{get sections(){return SETTINGS_CHAT_SECTIONS},isActive:section=>section.slug===get$3(activeSlug),get getHref(){return get$3(
$0)}}),$$value=>mobileHeader=$$value,()=>mobileHeader)}var div_2=sibling(node_1,2),div_3=child(div_2),div_4=child(div_3),div_5=child(div_4),node_2=child(div_5);component(node_2,()=>get$3(currentSection).icon,($$anchor2,currentSection_icon)=>{currentSection_icon($$anchor2,{class:"h-5 w-5"})});var h3=sibling(node_2,2),text2=child(h3,!0);reset(h3),reset(div_5);var node_3=sibling(div_5,2);{var consequent=$$anchor2=>{SettingsChatToolsTab($$anchor2,{})},consequent_1=$$anchor2=>{SettingsChatImportExportTab(
$$anchor2,{})},consequent_2=$$anchor2=>{var div_6=root_3$b(),node_4=child(div_6);SettingsChatFields(node_4,{get fields(){return get$3(currentSection).fields},get localConfig(){return get$3(localConfig)},onConfigChange:handleConfigChange,onThemeChange:handleThemeChange}),reset(div_6),append($$anchor2,div_6)};if_block(node_3,$$render=>{get$3(currentSection).title===SETTINGS_SECTION_TITLES.TOOLS?$$render(consequent):get$3(currentSection).title===SETTINGS_SECTION_TITLES.IMPORT_EXPORT?$$render(consequent_1,
1):get$3(currentSection).fields&&$$render(consequent_2,2)})}reset(div_4),next$1(2),reset(div_3);var node_5=sibling(div_3,2);return SettingsFooter(node_5,{onReset:handleReset,onSave:handleSave}),reset(div_2),reset(div_1),reset(div),template_effect(()=>set_text(text2,get$3(currentSection).title)),transition(1,div,()=>fade,()=>({duration:150})),append($$anchor,div),pop($$exports)}var root_2$j=from_html('<a><!> <span class="ml-2"> </span></a>'),root_3$a=from_html('<button><!> <span class="ml-2"> </s\
pan></button>'),root$r=from_html('<div class="sticky top-0 hidden w-64 flex-col self-start bg-background pt-10 pb-4 md:flex"><div class="flex items-center gap-2 pb-10"><!> <h1 class="text-2xl font-semibold">Settings</h1></div> <nav class="space-y-1"></nav></div>');function SettingsChatDesktopSidebar($$anchor,$$props){push$1($$props,!0);var div=root$r(),div_1=child(div),node2=child(div_1);Settings$1(node2,{class:"h-6 w-6"}),next$1(2),reset(div_1);var nav=sibling(div_1,2);each(nav,21,()=>$$props.sections,
section=>section.title,($$anchor2,section)=>{var fragment=comment$2(),node_1=first_child(fragment);{var consequent=$$anchor3=>{var a=root_2$j(),node_2=child(a);component(node_2,()=>get$3(section).icon,($$anchor4,section_icon)=>{section_icon($$anchor4,{class:"h-4 w-4"})});var span=sibling(node_2,2),text2=child(span,!0);reset(span),reset(a),template_effect(($0,$1)=>{set_class(a,1,`flex w-full cursor-pointer items-center gap-3 rounded-lg px-3 py-2 text-left text-sm no-underline transition-colors ho\
ver:bg-accent ${$0??""}`),set_attribute(a,"href",$1),set_text(text2,get$3(section).title)},[()=>$$props.isActive(get$3(section))?"bg-accent text-accent-foreground":"text-muted-foreground",()=>$$props.getHref(get$3(section))]),append($$anchor3,a)},alternate=$$anchor3=>{var button=root_3$a(),node_3=child(button);component(node_3,()=>get$3(section).icon,($$anchor4,section_icon_1)=>{section_icon_1($$anchor4,{class:"h-4 w-4"})});var span_1=sibling(node_3,2),text_1=child(span_1,!0);reset(span_1),reset(
button),template_effect($0=>{set_class(button,1,`flex w-full cursor-pointer items-center gap-3 rounded-lg px-3 py-2 text-left text-sm transition-colors hover:bg-accent ${$0??""}`),set_text(text_1,get$3(section).title)},[()=>$$props.isActive(get$3(section))?"bg-accent text-accent-foreground":"text-muted-foreground"]),delegated("click",button,()=>$$props.onSectionChange?.(get$3(section).title)),append($$anchor3,button)};if_block(node_1,$$render=>{$$props.getHref?$$render(consequent):$$render(alternate,
-1)})}append($$anchor2,fragment)}),reset(nav),reset(div),append($$anchor,div),pop()}delegate(["click"]);function useScrollCarousel(){let canScrollLeft=state$1(!1),canScrollRight=state$1(!1),scrollContainer=state$1(void 0);function scrollToCenter(element2){if(!get$3(scrollContainer))return;const containerRect=get$3(scrollContainer).getBoundingClientRect(),elementRect=element2.getBoundingClientRect(),elementCenter=elementRect.left+elementRect.width/2,containerCenter=containerRect.left+containerRect.
width/2,scrollOffset=elementCenter-containerCenter;get$3(scrollContainer).scrollBy({left:scrollOffset,behavior:"smooth"})}function scrollLeft(){get$3(scrollContainer)&&get$3(scrollContainer).scrollBy({left:-250,behavior:"smooth"})}function scrollRight(){get$3(scrollContainer)&&get$3(scrollContainer).scrollBy({left:250,behavior:"smooth"})}function updateScrollButtons(){if(!get$3(scrollContainer))return;const{scrollLeft:sl,scrollWidth,clientWidth}=get$3(scrollContainer);set$1(canScrollLeft,sl>0),set$1(
canScrollRight,sl<scrollWidth-clientWidth-1)}return user_effect(()=>{get$3(scrollContainer)&&updateScrollButtons()}),{get canScrollLeft(){return get$3(canScrollLeft)},get canScrollRight(){return get$3(canScrollRight)},get scrollContainer(){return get$3(scrollContainer)},set scrollContainer(el){set$1(scrollContainer,el,!0)},scrollToCenter,scrollLeft,scrollRight,updateScrollButtons}}var root_2$i=from_html("<a><!> <span> </span></a>"),root_3$9=from_html("<button><!> <span> </span></button>"),root$q=from_html(
'<div class="sticky top-0 z-10 flex flex-col bg-background md:hidden"><div class="flex items-center gap-2 px-4 pt-4 pb-2 md:pt-6"><!> <h1 class="text-xl font-semibold md:text-2xl">Settings</h1></div> <div class="border-b border-border/30 py-2"><div class="relative flex items-center" style="scroll-padding: 1rem;"><button aria-label="Scroll left"><!></button> <div class="scrollbar-hide overflow-x-auto py-2"><div class="flex min-w-max gap-2"></div></div> <button aria-label="Scroll right"><!></butto\
n></div></div></div>');function SettingsChatMobileHeader($$anchor,$$props){push$1($$props,!0);const carousel=useScrollCarousel();onMount$1(async()=>{if(await tick(),carousel.scrollContainer){const activeTab=carousel.scrollContainer.querySelector('[data-active="true"]');activeTab instanceof HTMLElement&&carousel.scrollToCenter(activeTab)}});function updateCarousel(){setTimeout(carousel.updateScrollButtons,100)}var $$exports={updateCarousel},div=root$q(),div_1=child(div),node2=child(div_1);Settings$1(
node2,{class:"h-5 w-5 md:h-6 md:w-6"}),next$1(2),reset(div_1);var div_2=sibling(div_1,2),div_3=child(div_2),button=child(div_3),node_1=child(button);Chevron_left(node_1,{class:"h-4 w-4"}),reset(button);var div_4=sibling(button,2),div_5=child(div_4);each(div_5,21,()=>$$props.sections,section=>section.title,($$anchor2,section)=>{var fragment=comment$2(),node_2=first_child(fragment);{var consequent=$$anchor3=>{var a=root_2$i(),node_3=child(a);component(node_3,()=>get$3(section).icon,($$anchor4,section_icon)=>{
section_icon($$anchor4,{class:"h-4 w-4 flex-shrink-0"})});var span=sibling(node_3,2),text2=child(span,!0);reset(span),reset(a),template_effect(($0,$1,$2)=>{set_class(a,1,`flex cursor-pointer items-center gap-2 rounded-lg px-3 py-2 text-sm whitespace-nowrap no-underline transition-colors first:ml-4 last:mr-4 hover:bg-accent ${$0??""}`),set_attribute(a,"data-active",$1),set_attribute(a,"href",$2),set_text(text2,get$3(section).title)},[()=>$$props.isActive(get$3(section))?"bg-accent text-accent-for\
eground":"text-muted-foreground",()=>$$props.isActive(get$3(section)),()=>$$props.getHref(get$3(section))]),delegated("click",a,e=>{carousel.scrollToCenter(e.currentTarget)}),append($$anchor3,a)},alternate=$$anchor3=>{var button_1=root_3$9(),node_4=child(button_1);component(node_4,()=>get$3(section).icon,($$anchor4,section_icon_1)=>{section_icon_1($$anchor4,{class:"h-4 w-4 flex-shrink-0"})});var span_1=sibling(node_4,2),text_1=child(span_1,!0);reset(span_1),reset(button_1),template_effect(($0,$1)=>{
set_class(button_1,1,`flex cursor-pointer items-center gap-2 rounded-lg px-3 py-2 text-sm whitespace-nowrap transition-colors first:ml-4 last:mr-4 hover:bg-accent ${$0??""}`),set_attribute(button_1,"data-active",$1),set_text(text_1,get$3(section).title)},[()=>$$props.isActive(get$3(section))?"bg-accent text-accent-foreground":"text-muted-foreground",()=>$$props.isActive(get$3(section))]),delegated("click",button_1,e=>{$$props.onSectionChange?.(get$3(section).title),carousel.scrollToCenter(e.currentTarget)}),
append($$anchor3,button_1)};if_block(node_2,$$render=>{$$props.getHref?$$render(consequent):$$render(alternate,-1)})}append($$anchor2,fragment)}),reset(div_5),reset(div_4),bind_this(div_4,$$value=>carousel.scrollContainer=$$value,()=>carousel?.scrollContainer);var button_2=sibling(div_4,2),node_5=child(button_2);return Chevron_right(node_5,{class:"h-4 w-4"}),reset(button_2),reset(div_3),reset(div_2),reset(div),template_effect(()=>{set_class(button,1,`absolute left-2 z-10 flex h-6 w-6 items-cente\
r justify-center rounded-full bg-muted shadow-md backdrop-blur-sm transition-opacity hover:bg-accent ${carousel.canScrollLeft?"opacity-100":"pointer-events-none opacity-0"}`),set_class(button_2,1,`absolute right-2 z-10 flex h-6 w-6 items-center justify-center rounded-full bg-muted shadow-md backdrop-blur-sm transition-opacity hover:bg-accent ${carousel.canScrollRight?"opacity-100":"pointer-events-none opacity-0"}`)}),delegated("click",button,function(...$$args){carousel.scrollLeft?.apply(this,$$args)}),
event("scroll",div_4,function(...$$args){carousel.updateScrollButtons?.apply(this,$$args)}),delegated("click",button_2,function(...$$args){carousel.scrollRight?.apply(this,$$args)}),append($$anchor,div),pop($$exports)}delegate(["click"]);var root_1$g=from_html("<!> Custom",1);function SettingsChatParameterSourceIndicator($$anchor,$$props){let className=prop($$props,"class",3,"");Badge($$anchor,{variant:"secondary",get class(){return`h-5 bg-orange-100 px-1.5 py-0.5 text-xs text-orange-800 dark:bg\
-orange-900 dark:text-orange-200 ${className()??""}`},children:($$anchor2,$$slotProps)=>{var fragment_1=root_1$g(),node2=first_child(fragment_1);Wrench(node2,{class:"mr-1 h-3 w-3"}),next$1(),append($$anchor2,fragment_1)},$$slots:{default:!0}})}var root$p=from_html('<div><h3 class="mb-6 text-base font-semibold"> </h3> <div class="space-y-8"><!></div></div>');function SettingsGroup($$anchor,$$props){var div=root$p(),h3=child(div),text2=child(h3,!0);reset(h3);var div_1=sibling(h3,2),node2=child(div_1);
snippet(node2,()=>$$props.children),reset(div_1),reset(div),template_effect(()=>set_text(text2,$$props.title)),append($$anchor,div)}var root_1$f=from_html("<!> Reset to default",1),root_5$7=from_html("<!> <!>",1),root_8$9=from_html("<!> <!>",1),root_4$9=from_html("<!> <!>",1),root$o=from_html('<div class="sticky bottom-0 mx-auto mt-4 flex w-full justify-between p-6"><div class="flex gap-2"><!></div> <!></div> <!>',1);function SettingsFooter($$anchor,$$props){push$1($$props,!0);let showResetDialog=state$1(
!1);function handleResetClick(){set$1(showResetDialog,!0)}function handleConfirmReset(){settingsStore.forceSyncWithServerDefaults(),$$props.onReset?.(),set$1(showResetDialog,!1)}function handleSave(){$$props.onSave?.()}var fragment=root$o(),div=first_child(fragment),div_1=child(div),node2=child(div_1);Button(node2,{variant:"outline",onclick:handleResetClick,children:($$anchor2,$$slotProps)=>{var fragment_1=root_1$f(),node_1=first_child(fragment_1);Rotate_ccw(node_1,{class:"h-3 w-3"}),next$1(),append(
$$anchor2,fragment_1)},$$slots:{default:!0}}),reset(div_1);var node_2=sibling(div_1,2);Button(node_2,{onclick:handleSave,children:($$anchor2,$$slotProps)=>{next$1();var text2=text$8("Save settings");append($$anchor2,text2)},$$slots:{default:!0}}),reset(div);var node_3=sibling(div,2);component(node_3,()=>Root$1,($$anchor2,AlertDialog_Root)=>{AlertDialog_Root($$anchor2,{get open(){return get$3(showResetDialog)},set open($$value){set$1(showResetDialog,$$value,!0)},children:($$anchor3,$$slotProps)=>{
var fragment_2=comment$2(),node_4=first_child(fragment_2);component(node_4,()=>Alert_dialog_content,($$anchor4,AlertDialog_Content)=>{AlertDialog_Content($$anchor4,{children:($$anchor5,$$slotProps2)=>{var fragment_3=root_4$9(),node_5=first_child(fragment_3);component(node_5,()=>Alert_dialog_header,($$anchor6,AlertDialog_Header)=>{AlertDialog_Header($$anchor6,{children:($$anchor7,$$slotProps3)=>{var fragment_4=root_5$7(),node_6=first_child(fragment_4);component(node_6,()=>Alert_dialog_title,($$anchor8,AlertDialog_Title)=>{
AlertDialog_Title($$anchor8,{children:($$anchor9,$$slotProps4)=>{next$1();var text_1=text$8("Reset Settings to Default");append($$anchor9,text_1)},$$slots:{default:!0}})});var node_7=sibling(node_6,2);component(node_7,()=>Alert_dialog_description,($$anchor8,AlertDialog_Description)=>{AlertDialog_Description($$anchor8,{children:($$anchor9,$$slotProps4)=>{next$1();var text_2=text$8(`Are you sure you want to reset all settings to their default values? This will reset all
				parameters to the values provided by the server's /props endpoint and remove all your custom
				configurations.`);append($$anchor9,text_2)},$$slots:{default:!0}})}),append($$anchor7,fragment_4)},$$slots:{default:!0}})});var node_8=sibling(node_5,2);component(node_8,()=>Alert_dialog_footer,($$anchor6,AlertDialog_Footer)=>{AlertDialog_Footer($$anchor6,{children:($$anchor7,$$slotProps3)=>{var fragment_5=root_8$9(),node_9=first_child(fragment_5);component(node_9,()=>Alert_dialog_cancel,($$anchor8,AlertDialog_Cancel)=>{AlertDialog_Cancel($$anchor8,{children:($$anchor9,$$slotProps4)=>{next$1();
var text_3=text$8("Cancel");append($$anchor9,text_3)},$$slots:{default:!0}})});var node_10=sibling(node_9,2);component(node_10,()=>Alert_dialog_action,($$anchor8,AlertDialog_Action)=>{AlertDialog_Action($$anchor8,{onclick:handleConfirmReset,children:($$anchor9,$$slotProps4)=>{next$1();var text_4=text$8("Reset to Default");append($$anchor9,text_4)},$$slots:{default:!0}})}),append($$anchor7,fragment_5)},$$slots:{default:!0}})}),append($$anchor5,fragment_3)},$$slots:{default:!0}})}),append($$anchor3,
fragment_2)},$$slots:{default:!0}})}),append($$anchor,fragment),pop()}var root_1$e=from_html("<!> ",1),root_3$8=from_html('<li class="truncate"> </li>'),root_4$8=from_html('<li class="italic"> </li>'),root_2$h=from_html('<div class="mt-4 grid overflow-x-auto rounded-lg border border-border/50 bg-muted/30 p-4"><h5 class="mb-2 text-sm font-medium"> </h5> <ul class="space-y-1 text-sm text-muted-foreground"><!> <!></ul></div>'),root$n=from_html('<div><h4> </h4> <p class="mb-4 text-sm text-muted-fore\
ground"> </p> <!> <!></div>');function SettingsChatImportExportSection($$anchor,$$props){push$1($$props,!0);let sectionButtonClass=user_derived(()=>$$props.buttonClass??"justify-start justify-self-start md:w-auto"),sectionButtonVariant=user_derived(()=>$$props.buttonVariant??"outline");var div=root$n(),h4=child(div),text2=child(h4,!0);reset(h4);var p2=sibling(h4,2),text_1=child(p2,!0);reset(p2);var node2=sibling(p2,2);Button(node2,{get class(){return get$3(sectionButtonClass)},get onclick(){return $$props.
onclick},get variant(){return get$3(sectionButtonVariant)},children:($$anchor2,$$slotProps)=>{var fragment=root_1$e(),node_1=first_child(fragment);component(node_1,()=>$$props.IconComponent,($$anchor3,IconComponent_1)=>{IconComponent_1($$anchor3,{class:"mr-2 h-4 w-4"})});var text_2=sibling(node_1);template_effect(()=>set_text(text_2,` ${$$props.buttonText??""}`)),append($$anchor2,fragment)},$$slots:{default:!0}});var node_2=sibling(node2,2);{var consequent_1=$$anchor2=>{var div_1=root_2$h(),h5=child(
div_1),text_3=child(h5);reset(h5);var ul=sibling(h5,2),node_3=child(ul);each(node_3,17,()=>$$props.summary.items.slice(0,10),conv=>conv.id,($$anchor3,conv)=>{var li2=root_3$8(),text_4=child(li2);reset(li2),template_effect(()=>set_text(text_4,`• ${(get$3(conv).name||"Untitled conversation")??""}`)),append($$anchor3,li2)});var node_4=sibling(node_3,2);{var consequent=$$anchor3=>{var li_1=root_4$8(),text_5=child(li_1);reset(li_1),template_effect(()=>set_text(text_5,`... and ${$$props.summary.items.
length-10} more`)),append($$anchor3,li_1)};if_block(node_4,$$render=>{$$props.summary.items.length>10&&$$render(consequent)})}reset(ul),reset(div_1),template_effect(()=>set_text(text_3,`${$$props.summary.verb??""}
				${$$props.summary.items.length??""} conversation${$$props.summary.items.length===1?"":"s"}`)),append($$anchor2,div_1)};if_block(node_2,$$render=>{$$props.summary&&$$props.summary.show&&$$props.summary.items.length>0&&$$render(consequent_1)})}reset(div),template_effect(()=>{set_class(div,1,`grid gap-1 ${$$props.wrapperClass??""??""}`),set_class(h4,1,`mt-0 mb-2 text-sm font-medium ${$$props.titleClass??""??""}`),set_text(text2,$$props.title),set_text(text_1,$$props.description)}),append($$anchor,
div),pop()}var root_1$d=from_html("<!> <!> <!>",1),root_2$g=from_html("<!> <!>",1),root$m=from_html('<div class="space-y-12"><!> <!></div> <!> <!> <!> <!>',1);function SettingsChatImportExportTab($$anchor,$$props){push$1($$props,!0);let exportedConversations=state$1(proxy([])),importedConversations=state$1(proxy([])),showExportSummary=state$1(!1),showImportSummary=state$1(!1),showExportDialog=state$1(!1),showImportDialog=state$1(!1),availableConversations=state$1(proxy([])),messageCountMap=state$1(
proxy(new Map)),fullImportData=state$1(proxy([])),showDeleteDialog=state$1(!1),showSettingsExportSummary=state$1(!1),showSettingsImportSummary=state$1(!1),showSettingsExportDialog=state$1(!1),includeSensitiveData=state$1(!1);function handleSettingsExport(){set$1(showSettingsExportDialog,!0),set$1(includeSensitiveData,!1)}function handleSettingsExportConfirm(){set$1(showSettingsExportDialog,!1);try{const data=settingsStore.exportSettings(get$3(includeSensitiveData)),blob=new Blob([JSON.stringify(
data,null,2)],{type:"application/json"}),url2=URL.createObjectURL(blob),a=document.createElement("a");a.href=url2,a.download=`llama_settings_${new Date().toISOString().split("T")[0]}.json`,document.body.appendChild(a),a.click(),document.body.removeChild(a),URL.revokeObjectURL(url2),set$1(showSettingsExportSummary,!0),set$1(showSettingsImportSummary,!1),toast.success("Settings exported")}catch(err){console.error("Failed to export settings:",err),toast.error("Failed to export settings")}}function handleSettingsExportCancel(){
set$1(showSettingsExportDialog,!1)}function handleSettingsImport(){try{const input=document.createElement("input");input.type=HtmlInputType.FILE,input.accept=FileExtensionText.JSON,input.onchange=async e=>{const file=e.target?.files?.[0];if(file)try{const text2=await file.text(),data=JSON.parse(text2);if(!data||typeof data!="object"||!data.config){toast.error("Invalid settings file: missing config");return}settingsStore.importSettings(data),set$1(showSettingsImportSummary,!0),set$1(showSettingsExportSummary,
!1),toast.success("Settings imported successfully")}catch(err){console.error("Failed to import settings:",err),toast.error("Failed to import settings")}},input.click()}catch(err){console.error("Failed to open file picker:",err),toast.error("Failed to open file picker")}}async function handleExportClick(){try{const allConversations=conversations();if(allConversations.length===0){toast.info("No conversations to export");return}const conversationsWithMessages=await Promise.all(allConversations.map(
async conv=>{const messages=await conversationsStore.getConversationMessages(conv.id);return{conv,messages}}));set$1(messageCountMap,createMessageCountMap(conversationsWithMessages),!0),set$1(availableConversations,allConversations,!0),set$1(showExportDialog,!0)}catch(err){console.error("Failed to load conversations:",err),alert("Failed to load conversations")}}async function handleExportConfirm(selectedConversations){try{const allData=await Promise.all(selectedConversations.map(async conv=>{const messages=await conversationsStore.
getConversationMessages(conv.id);return{conv:snapshot(conv),messages:snapshot(messages)}}));conversationsStore.downloadConversationFile(allData),set$1(exportedConversations,selectedConversations,!0),set$1(showExportSummary,!0),set$1(showImportSummary,!1),set$1(showExportDialog,!1)}catch(err){console.error("Export failed:",err),alert("Failed to export conversations")}}async function handleImportClick(){try{const input=document.createElement("input");input.type=HtmlInputType.FILE,input.accept=FileExtensionText.
JSON,input.onchange=async e=>{const file=e.target?.files?.[0];if(file)try{const text2=await file.text(),parsedData=JSON.parse(text2);let importedData;if(Array.isArray(parsedData))importedData=parsedData;else if(parsedData&&typeof parsedData=="object"&&"conv"in parsedData&&"messages"in parsedData)importedData=[parsedData];else throw new Error("Invalid file format: expected array of conversations or single conversation object");set$1(fullImportData,importedData,!0),set$1(availableConversations,importedData.
map(item=>item.conv),!0),set$1(messageCountMap,createMessageCountMap(importedData),!0),set$1(showImportDialog,!0)}catch(err){const message=err instanceof Error?err.message:"Unknown error";console.error("Failed to parse file:",err),alert(`Failed to parse file: ${message}`)}},input.click()}catch(err){console.error("Import failed:",err),alert("Failed to import conversations")}}async function handleImportConfirm(selectedConversations){try{const selectedIds=new Set(selectedConversations.map(c2=>c2.id)),
selectedData=snapshot(get$3(fullImportData)).filter(item=>selectedIds.has(item.conv.id));await conversationsStore.importConversationsData(selectedData),set$1(importedConversations,selectedConversations,!0),set$1(showImportSummary,!0),set$1(showExportSummary,!1),set$1(showImportDialog,!1)}catch(err){console.error("Import failed:",err),alert("Failed to import conversations. Please check the file format.")}}async function handleDeleteAllClick(){try{if(conversations().length===0){toast.info("No conv\
ersations to delete");return}set$1(showDeleteDialog,!0)}catch(err){console.error("Failed to load conversations for deletion:",err),toast.error("Failed to load conversations")}}async function handleDeleteAllConfirm(){try{await conversationsStore.deleteAll(),set$1(showDeleteDialog,!1)}catch(err){console.error("Failed to delete conversations:",err)}}function handleDeleteAllCancel(){set$1(showDeleteDialog,!1)}var fragment=root$m(),div=first_child(fragment),node2=child(div);SettingsGroup(node2,{title:"\
Conversations",children:($$anchor2,$$slotProps)=>{var fragment_1=root_1$d(),node_1=first_child(fragment_1);{let $0=user_derived(()=>({show:get$3(showExportSummary),verb:"Exported",items:get$3(exportedConversations)}));SettingsChatImportExportSection(node_1,{title:"Export",description:"Download your conversations as a JSON file. This includes all messages, attachments, and conversation history.",get IconComponent(){return Download},buttonText:"Export conversations",onclick:handleExportClick,get summary(){
return get$3($0)}})}var node_2=sibling(node_1,2);{let $0=user_derived(()=>({show:get$3(showImportSummary),verb:"Imported",items:get$3(importedConversations)}));SettingsChatImportExportSection(node_2,{title:"Import",description:"Import one or more conversations from a previously exported JSON file. This will merge with your existing conversations.",get IconComponent(){return Upload},buttonText:"Import conversations",onclick:handleImportClick,get summary(){return get$3($0)}})}var node_3=sibling(node_2,
2);SettingsChatImportExportSection(node_3,{title:"Delete All",description:"Permanently delete all conversations and their messages. This action cannot be undone. Consider exporting your conversations first if you want to keep a backup.",get IconComponent(){return Trash_2},buttonText:"Delete all conversations",onclick:handleDeleteAllClick,titleClass:"text-destructive",buttonVariant:"destructive",buttonClass:"text-destructive-foreground justify-start justify-self-start bg-destructive hover:bg-dest\
ructive/80 md:w-auto"}),append($$anchor2,fragment_1)}});var node_4=sibling(node2,2);SettingsGroup(node_4,{title:"Settings",children:($$anchor2,$$slotProps)=>{var fragment_2=root_2$g(),node_5=first_child(fragment_2);{let $0=user_derived(()=>({show:get$3(showSettingsExportSummary),verb:"Exported",items:[]}));SettingsChatImportExportSection(node_5,{title:"Export",description:"Export your chat settings and preferences as a JSON file.",get IconComponent(){return Download},buttonText:"Export settings",
onclick:handleSettingsExport,get summary(){return get$3($0)}})}var node_6=sibling(node_5,2);{let $0=user_derived(()=>({show:get$3(showSettingsImportSummary),verb:"Imported",items:[]}));SettingsChatImportExportSection(node_6,{title:"Import",description:"Import chat settings from a previously exported JSON file. This will merge with your existing settings.",get IconComponent(){return Upload},buttonText:"Import settings",onclick:handleSettingsImport,get summary(){return get$3($0)}})}append($$anchor2,
fragment_2)}}),reset(div);var node_7=sibling(div,2);DialogExportSettings(node_7,{onConfirm:handleSettingsExportConfirm,onCancel:handleSettingsExportCancel,get open(){return get$3(showSettingsExportDialog)},set open($$value){set$1(showSettingsExportDialog,$$value,!0)},get includeSensitiveData(){return get$3(includeSensitiveData)},set includeSensitiveData($$value){set$1(includeSensitiveData,$$value,!0)}});var node_8=sibling(node_7,2);DialogConversationSelection(node_8,{get conversations(){return get$3(
availableConversations)},get messageCountMap(){return get$3(messageCountMap)},get mode(){return ConversationSelectionMode.EXPORT},onCancel:()=>set$1(showExportDialog,!1),onConfirm:handleExportConfirm,get open(){return get$3(showExportDialog)},set open($$value){set$1(showExportDialog,$$value,!0)}});var node_9=sibling(node_8,2);DialogConversationSelection(node_9,{get conversations(){return get$3(availableConversations)},get messageCountMap(){return get$3(messageCountMap)},get mode(){return ConversationSelectionMode.
IMPORT},onCancel:()=>set$1(showImportDialog,!1),onConfirm:handleImportConfirm,get open(){return get$3(showImportDialog)},set open($$value){set$1(showImportDialog,$$value,!0)}});var node_10=sibling(node_9,2);DialogConfirmation(node_10,{title:"Delete all conversations",description:"Are you sure you want to delete all conversations? This action cannot be undone and will permanently remove all your conversations and messages.",confirmText:"Delete All",cancelText:"Cancel",variant:"destructive",get icon(){
return Trash_2},onConfirm:handleDeleteAllConfirm,onCancel:handleDeleteAllCancel,get open(){return get$3(showDeleteDialog)},set open($$value){set$1(showDeleteDialog,$$value,!0)}}),transition(1,div,()=>fade,()=>({duration:150})),append($$anchor,fragment),pop()}var root_1$c=from_html('<span class="absolute right-2 flex size-3.5 items-center justify-center"><!></span> <!>',1);function Select_item($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,[
"$$slots","$$events","$$legacy","ref","class","value","label","children"]);var fragment=comment$2(),node2=first_child(fragment);{const children=($$anchor2,$$arg0)=>{let selected=()=>$$arg0?.().selected,highlighted=()=>$$arg0?.().highlighted;var fragment_1=root_1$c(),span=first_child(fragment_1),node_1=child(span);{var consequent=$$anchor3=>{Check($$anchor3,{class:"size-4"})};if_block(node_1,$$render=>{selected()&&$$render(consequent)})}reset(span);var node_2=sibling(span,2);{var consequent_1=$$anchor3=>{
var fragment_3=comment$2(),node_3=first_child(fragment_3);snippet(node_3,()=>$$props.children,()=>({selected:selected(),highlighted:highlighted()})),append($$anchor3,fragment_3)},alternate=$$anchor3=>{var text2=text$8();template_effect(()=>set_text(text2,$$props.label||$$props.value)),append($$anchor3,text2)};if_block(node_2,$$render=>{$$props.children?$$render(consequent_1):$$render(alternate,-1)})}append($$anchor2,fragment_1)};let $0=user_derived(()=>cn$1("relative flex w-full cursor-default i\
tems-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2",$$props.class));component(node2,()=>Select_item$1,($$anchor2,SelectPrimitive_Item)=>{
SelectPrimitive_Item($$anchor2,spread_props({get value(){return $$props.value},"data-slot":"select-item",get class(){return get$3($0)}},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)},children,$$slots:{default:!0}}))})}append($$anchor,fragment),pop()}function Select_scroll_up_button($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class"]);var fragment=comment$2(),node2=first_child(
fragment);{let $0=user_derived(()=>cn$1("flex cursor-default items-center justify-center py-1",$$props.class));component(node2,()=>Select_scroll_up_button$1,($$anchor2,SelectPrimitive_ScrollUpButton)=>{SelectPrimitive_ScrollUpButton($$anchor2,spread_props({"data-slot":"select-scroll-up-button",get class(){return get$3($0)}},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)},children:($$anchor3,$$slotProps)=>{Chevron_up($$anchor3,{class:"size-4"})},$$slots:{default:!0}}))})}append(
$$anchor,fragment),pop()}function Select_scroll_down_button($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class"]);var fragment=comment$2(),node2=first_child(fragment);{let $0=user_derived(()=>cn$1("flex cursor-default items-center justify-center py-1",$$props.class));component(node2,()=>Select_scroll_down_button$1,($$anchor2,SelectPrimitive_ScrollDownButton)=>{SelectPrimitive_ScrollDownButton($$anchor2,
spread_props({"data-slot":"select-scroll-down-button",get class(){return get$3($0)}},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)},children:($$anchor3,$$slotProps)=>{Chevron_down($$anchor3,{class:"size-4"})},$$slots:{default:!0}}))})}append($$anchor,fragment),pop()}var root_2$f=from_html("<!> <!> <!>",1);function Select_content($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),sideOffset=prop($$props,"sideOffset",3,4),restProps=rest_props($$props,
["$$slots","$$events","$$legacy","ref","class","sideOffset","portalProps","children"]),cleanupInternalListeners;onMount$1(()=>{const listenerOptions={passive:!1},blockOutsideWheel=event2=>{if(!ref2())return;const target2=event2.target;(!target2||!ref2().contains(target2))&&(event2.preventDefault(),event2.stopPropagation())},blockOutsideTouchMove=event2=>{if(!ref2())return;const target2=event2.target;(!target2||!ref2().contains(target2))&&(event2.preventDefault(),event2.stopPropagation())};return document.
addEventListener("wheel",blockOutsideWheel,listenerOptions),document.addEventListener("touchmove",blockOutsideTouchMove,listenerOptions),()=>{document.removeEventListener("wheel",blockOutsideWheel,listenerOptions),document.removeEventListener("touchmove",blockOutsideTouchMove,listenerOptions)}}),user_effect(()=>{const element2=ref2();if(cleanupInternalListeners?.(),!element2)return;const stopWheelPropagation=event2=>{event2.stopPropagation()},stopTouchPropagation=event2=>{event2.stopPropagation()};
element2.addEventListener("wheel",stopWheelPropagation),element2.addEventListener("touchmove",stopTouchPropagation),cleanupInternalListeners=()=>{element2.removeEventListener("wheel",stopWheelPropagation),element2.removeEventListener("touchmove",stopTouchPropagation)}}),onDestroy(()=>{cleanupInternalListeners?.()});var fragment=comment$2(),node2=first_child(fragment);component(node2,()=>Portal$2,($$anchor2,SelectPrimitive_Portal)=>{SelectPrimitive_Portal($$anchor2,spread_props(()=>$$props.portalProps,
{children:($$anchor3,$$slotProps)=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);{let $0=user_derived(()=>cn$1("relative z-[var(--layer-popover,1000000)] max-h-(--bits-select-content-available-height) min-w-[8rem] origin-(--bits-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover text-popover-foreground shadow-md data-[side=bottom]:translate-y-1 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:-translate-x-1 data-[side=left]:slide-i\
n-from-right-2 data-[side=right]:translate-x-1 data-[side=right]:slide-in-from-left-2 data-[side=top]:-translate-y-1 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:fill-mode-forwards data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95",$$props.class));component(node_1,()=>Select_content$1,($$anchor4,SelectPrimitive_Content)=>{SelectPrimitive_Content($$anchor4,
spread_props({get sideOffset(){return sideOffset()},"data-slot":"select-content",get class(){return get$3($0)}},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)},children:($$anchor5,$$slotProps2)=>{var fragment_2=root_2$f(),node_2=first_child(fragment_2);Select_scroll_up_button(node_2,{});var node_3=sibling(node_2,2);{let $02=user_derived(()=>cn$1("h-(--bits-select-anchor-height) w-full min-w-(--bits-select-anchor-width) scroll-my-1 p-1"));component(node_3,()=>Select_viewport,
($$anchor6,SelectPrimitive_Viewport)=>{SelectPrimitive_Viewport($$anchor6,{get class(){return get$3($02)},children:($$anchor7,$$slotProps3)=>{var fragment_3=comment$2(),node_4=first_child(fragment_3);snippet(node_4,()=>$$props.children??noop$3),append($$anchor7,fragment_3)},$$slots:{default:!0}})})}var node_5=sibling(node_3,2);Select_scroll_down_button(node_5,{}),append($$anchor5,fragment_2)},$$slots:{default:!0}}))})}append($$anchor3,fragment_1)},$$slots:{default:!0}}))}),append($$anchor,fragment),
pop()}var root_1$b=from_html("<!> <!>",1);function Select_trigger($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),size2=prop($$props,"size",3,"default"),variant=prop($$props,"variant",3,"default"),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class","children","size","variant"]);const baseClasses=user_derived(()=>variant()==="plain"?"group inline-flex w-full items-center justify-end gap-2 whitespace-nowrap px-0 py-0 text-sm font-medium text-muted-\
foreground transition-colors focus-visible:outline-none focus-visible:ring-0 focus-visible:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50 data-[placeholder]:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-3 [&_svg:not([class*='text-'])]:text-muted-foreground":"flex w-fit items-center justify-between gap-2 rounded-md border border-input bg-transparent px-3 py-2 text-sm whitespace-nowrap\
 shadow-xs transition-[color,box-shadow] outline-none select-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 data-[placeholder]:text-muted-foreground data-[size=default]:h-9 data-[size=sm]:h-8 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 dark:bg-input/\
30 dark:hover:bg-input/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground"),chevronClasses=user_derived(()=>variant()==="plain"?"size-3 opacity-60 transition-transform group-data-[state=open]:-rotate-180":"size-4 opacity-50");var fragment=comment$2(),node2=first_child(fragment);{let $0=user_derived(()=>cn$1(get$3(baseClasses),$$props.class));component(node2,()=>Select_trigger$1,
($$anchor2,SelectPrimitive_Trigger)=>{SelectPrimitive_Trigger($$anchor2,spread_props({"data-slot":"select-trigger",get"data-size"(){return size2()},get class(){return get$3($0)}},()=>restProps,{get ref(){return ref2()},set ref($$value){ref2($$value)},children:($$anchor3,$$slotProps)=>{var fragment_1=root_1$b(),node_1=first_child(fragment_1);snippet(node_1,()=>$$props.children??noop$3);var node_2=sibling(node_1,2);Chevron_down(node_2,{get class(){return get$3(chevronClasses)}}),append($$anchor3,fragment_1)},
$$slots:{default:!0}}))})}append($$anchor,fragment),pop()}const Root=Select;var root$l=from_html("<textarea></textarea>");function Textarea($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),value=prop($$props,"value",15),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","value","class"]);var textarea=root$l();remove_textarea_child(textarea),attribute_effect(textarea,$0=>({"data-slot":"textarea",class:$0,...restProps}),[()=>cn$1("flex field-sizing-content\
 min-h-16 w-full rounded-md border border-input bg-transparent px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none placeholder:text-muted-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:aria-invalid:ring-destructive/40",$$props.class)]),bind_this(textarea,$$value=>ref2($$value),()=>ref2()),bind_value(
textarea,value),append($$anchor,textarea),pop()}var root_3$7=from_html(" <!>",1),root_6$7=from_html('<button type="button" class="absolute top-1/2 right-2 inline-flex h-5 w-5 -translate-y-1/2 items-center justify-center rounded transition-colors hover:bg-muted" aria-label="Reset to default" title="Reset to default"><!></button>'),root_7$7=from_html('<p class="mt-1 text-xs text-muted-foreground"></p>'),root_2$e=from_html('<div class="flex items-center gap-2"><!> <!></div> <div class="relative w-f\
ull"><!> <!></div> <!>',1),root_10$3=from_html(" <!>",1),root_12$2=from_html('<p class="mt-1 text-xs text-muted-foreground"> </p>'),root_13$2=from_html('<div class="mt-3 flex items-center gap-2"><!> <!></div>'),root_8$8=from_html("<!> <!> <!> <!>",1),root_16$1=from_html(" <!>",1),root_20$1=from_html('<div class="flex items-center gap-2"><!> </div>'),root_22=from_html('<button type="button" class="absolute top-1/2 right-8 inline-flex h-5 w-5 -translate-y-1/2 items-center justify-center rounded tr\
ansition-colors hover:bg-muted" aria-label="Reset to default" title="Reset to default"><!></button>'),root_26=from_html('<div class="flex items-center gap-2"><!> </div>'),root_19$2=from_html('<div class="relative w-full md:w-auto"><!> <!></div> <!>',1),root_28=from_html('<p class="mt-1 text-xs text-muted-foreground"> </p>'),root_15$2=from_html('<div class="flex items-center gap-2"><!> <!></div> <!> <!>',1),root_31=from_html('<p class="text-xs text-muted-foreground"> </p>'),root_29=from_html('<di\
v class="flex items-start space-x-3"><!> <div class="space-y-1"><label class="flex cursor-pointer items-center gap-1.5 pt-1 pb-0.5 text-sm leading-none font-medium"> <!></label> <!></div></div>'),root_1$a=from_html('<div class="space-y-2"><!></div>');function SettingsChatFields($$anchor,$$props){push$1($$props,!0);let currentModelParams=user_derived(()=>{if(propsCacheVersion(),serverStore.isRouterMode){const currentModelName=selectedModelName();if(currentModelName)return modelsStore.getModelProps(
currentModelName)?.default_generation_settings?.params??{}}return serverStore.defaultParams??{}});var fragment=comment$2(),node2=first_child(fragment);each(node2,17,()=>$$props.fields,field=>field.key,($$anchor2,field)=>{var div=root_1$a(),node_1=child(div);{var consequent_4=$$anchor3=>{const currentValue=user_derived(()=>String($$props.localConfig[get$3(field).key]??"")),serverDefault=user_derived(()=>get$3(currentModelParams)[get$3(field).key]),isCustomRealTime=user_derived(()=>(()=>{if(get$3(
serverDefault)==null||get$3(currentValue)==="")return!1;const numericInput=parseFloat(get$3(currentValue)),normalizedInput=isNaN(numericInput)?get$3(currentValue):Math.round(numericInput*1e6)/1e6,normalizedDefault=typeof get$3(serverDefault)=="number"?Math.round(get$3(serverDefault)*1e6)/1e6:get$3(serverDefault);return normalizedInput!==normalizedDefault})());var fragment_1=root_2$e(),div_1=first_child(fragment_1),node_2=child(div_1);Label(node_2,{get for(){return get$3(field).key},class:"flex i\
tems-center gap-1.5 text-sm font-medium",children:($$anchor4,$$slotProps)=>{next$1();var fragment_2=root_3$7(),text2=first_child(fragment_2),node_3=sibling(text2);{var consequent=$$anchor5=>{Flask_conical($$anchor5,{class:"h-3.5 w-3.5 text-muted-foreground"})};if_block(node_3,$$render=>{get$3(field).isExperimental&&$$render(consequent)})}template_effect(()=>set_text(text2,`${get$3(field).label??""} `)),append($$anchor4,fragment_2)},$$slots:{default:!0}});var node_4=sibling(node_2,2);{var consequent_1=$$anchor4=>{
SettingsChatParameterSourceIndicator($$anchor4,{})};if_block(node_4,$$render=>{get$3(isCustomRealTime)&&$$render(consequent_1)})}reset(div_1);var div_2=sibling(div_1,2),node_5=child(div_2);{let $0=user_derived(()=>get$3(currentModelParams)[get$3(field).key]!=null?`Default: ${normalizeFloatingPoint(get$3(currentModelParams)[get$3(field).key])}`:""),$1=user_derived(()=>get$3(isCustomRealTime)?"pr-8":"");Input(node_5,{get id(){return get$3(field).key},get value(){return get$3(currentValue)},oninput:e=>{
$$props.onConfigChange(get$3(field).key,e.currentTarget.value)},get placeholder(){return get$3($0)},get class(){return`w-full ${get$3($1)??""}`}})}var node_6=sibling(node_5,2);{var consequent_2=$$anchor4=>{var button=root_6$7(),node_7=child(button);Rotate_ccw(node_7,{class:"h-3 w-3"}),reset(button),delegated("click",button,()=>{settingsStore.resetParameterToServerDefault(get$3(field).key),$$props.onConfigChange(get$3(field).key,"")}),append($$anchor4,button)};if_block(node_6,$$render=>{get$3(isCustomRealTime)&&
$$render(consequent_2)})}reset(div_2);var node_8=sibling(div_2,2);{var consequent_3=$$anchor4=>{var p2=root_7$7();html$6(p2,()=>get$3(field).help||SETTING_CONFIG_INFO[get$3(field).key],!0),reset(p2),append($$anchor4,p2)};if_block(node_8,$$render=>{(get$3(field).help||SETTING_CONFIG_INFO[get$3(field).key])&&$$render(consequent_3)})}append($$anchor3,fragment_1)},consequent_9=$$anchor3=>{var fragment_5=root_8$8(),node_9=first_child(fragment_5);{var consequent_6=$$anchor4=>{Label($$anchor4,{get for(){
return get$3(field).key},class:"block flex items-center gap-1.5 text-sm font-medium",children:($$anchor5,$$slotProps)=>{next$1();var fragment_7=root_10$3(),text_1=first_child(fragment_7),node_10=sibling(text_1);{var consequent_5=$$anchor6=>{Flask_conical($$anchor6,{class:"h-3.5 w-3.5 text-muted-foreground"})};if_block(node_10,$$render=>{get$3(field).isExperimental&&$$render(consequent_5)})}template_effect(()=>set_text(text_1,`${get$3(field).label??""} `)),append($$anchor5,fragment_7)},$$slots:{default:!0}})};
if_block(node_9,$$render=>{get$3(field).label&&$$render(consequent_6)})}var node_11=sibling(node_9,2);{let $0=user_derived(()=>String($$props.localConfig[get$3(field).key]??""));Textarea(node_11,{get id(){return get$3(field).key},get value(){return get$3($0)},onchange:e=>$$props.onConfigChange(get$3(field).key,e.currentTarget.value),placeholder:"",class:"min-h-[10rem] w-full md:max-w-3xl"})}var node_12=sibling(node_11,2);{var consequent_7=$$anchor4=>{var p_1=root_12$2(),text_2=child(p_1,!0);reset(
p_1),template_effect(()=>set_text(text_2,get$3(field).help||SETTING_CONFIG_INFO[get$3(field).key])),append($$anchor4,p_1)};if_block(node_12,$$render=>{(get$3(field).help||SETTING_CONFIG_INFO[get$3(field).key])&&$$render(consequent_7)})}var node_13=sibling(node_12,2);{var consequent_8=$$anchor4=>{var div_3=root_13$2(),node_14=child(div_3);{let $0=user_derived(()=>!!($$props.localConfig.showSystemMessage??!0));Checkbox(node_14,{id:"showSystemMessage",get checked(){return get$3($0)},onCheckedChange:checked=>$$props.
onConfigChange(SETTINGS_KEYS.SHOW_SYSTEM_MESSAGE,!!checked)})}var node_15=sibling(node_14,2);Label(node_15,{for:"showSystemMessage",class:"cursor-pointer text-sm font-normal",children:($$anchor5,$$slotProps)=>{next$1();var text_3=text$8("Show system message in conversations");append($$anchor5,text_3)},$$slots:{default:!0}}),reset(div_3),append($$anchor4,div_3)};if_block(node_13,$$render=>{get$3(field).key===SETTINGS_KEYS.SYSTEM_MESSAGE&&$$render(consequent_8)})}append($$anchor3,fragment_5)},consequent_17=$$anchor3=>{
const selectedOption=user_derived(()=>get$3(field).options?.find(opt=>opt.value===$$props.localConfig[get$3(field).key])),currentValue=user_derived(()=>$$props.localConfig[get$3(field).key]),serverDefault=user_derived(()=>get$3(currentModelParams)[get$3(field).key]),isCustomRealTime=user_derived(()=>get$3(serverDefault)==null||get$3(currentValue)===""||get$3(currentValue)===void 0?!1:get$3(currentValue)!==get$3(serverDefault));var fragment_9=root_15$2(),div_4=first_child(fragment_9),node_16=child(
div_4);Label(node_16,{get for(){return get$3(field).key},class:"flex items-center gap-1.5 text-sm font-medium",children:($$anchor4,$$slotProps)=>{next$1();var fragment_10=root_16$1(),text_4=first_child(fragment_10),node_17=sibling(text_4);{var consequent_10=$$anchor5=>{Flask_conical($$anchor5,{class:"h-3.5 w-3.5 text-muted-foreground"})};if_block(node_17,$$render=>{get$3(field).isExperimental&&$$render(consequent_10)})}template_effect(()=>set_text(text_4,`${get$3(field).label??""} `)),append($$anchor4,
fragment_10)},$$slots:{default:!0}});var node_18=sibling(node_16,2);{var consequent_11=$$anchor4=>{SettingsChatParameterSourceIndicator($$anchor4,{})};if_block(node_18,$$render=>{get$3(isCustomRealTime)&&$$render(consequent_11)})}reset(div_4);var node_19=sibling(div_4,2);component(node_19,()=>Root,($$anchor4,Select_Root)=>{Select_Root($$anchor4,{type:"single",get value(){return get$3(currentValue)},onValueChange:value=>{get$3(field).key===SETTINGS_KEYS.THEME&&value&&$$props.onThemeChange?$$props.
onThemeChange(value):$$props.onConfigChange(get$3(field).key,value)},children:($$anchor5,$$slotProps)=>{var fragment_13=root_19$2(),div_5=first_child(fragment_13),node_20=child(div_5);component(node_20,()=>Select_trigger,($$anchor6,Select_Trigger)=>{Select_Trigger($$anchor6,{class:"w-full",children:($$anchor7,$$slotProps2)=>{var div_6=root_20$1(),node_21=child(div_6);{var consequent_12=$$anchor8=>{const IconComponent=user_derived(()=>get$3(selectedOption).icon);var fragment_14=comment$2(),node_22=first_child(
fragment_14);component(node_22,()=>get$3(IconComponent),($$anchor9,IconComponent_1)=>{IconComponent_1($$anchor9,{class:"h-4 w-4"})}),append($$anchor8,fragment_14)};if_block(node_21,$$render=>{get$3(selectedOption)?.icon&&$$render(consequent_12)})}var text_5=sibling(node_21);reset(div_6),template_effect($0=>set_text(text_5,` ${$0??""}`),[()=>get$3(selectedOption)?.label||`Select ${get$3(field).label.toLowerCase()}`]),append($$anchor7,div_6)},$$slots:{default:!0}})});var node_23=sibling(node_20,2);
{var consequent_13=$$anchor6=>{var button_1=root_22(),node_24=child(button_1);Rotate_ccw(node_24,{class:"h-3 w-3"}),reset(button_1),delegated("click",button_1,()=>{settingsStore.resetParameterToServerDefault(get$3(field).key),$$props.onConfigChange(get$3(field).key,"")}),append($$anchor6,button_1)};if_block(node_23,$$render=>{get$3(isCustomRealTime)&&$$render(consequent_13)})}reset(div_5);var node_25=sibling(div_5,2);component(node_25,()=>Select_content,($$anchor6,Select_Content)=>{Select_Content(
$$anchor6,{children:($$anchor7,$$slotProps2)=>{var fragment_15=comment$2(),node_26=first_child(fragment_15);{var consequent_15=$$anchor8=>{var fragment_16=comment$2(),node_27=first_child(fragment_16);each(node_27,17,()=>get$3(field).options,option2=>option2.value,($$anchor9,option2)=>{var fragment_17=comment$2(),node_28=first_child(fragment_17);component(node_28,()=>Select_item,($$anchor10,Select_Item)=>{Select_Item($$anchor10,{get value(){return get$3(option2).value},get label(){return get$3(option2).
label},children:($$anchor11,$$slotProps3)=>{var div_7=root_26(),node_29=child(div_7);{var consequent_14=$$anchor12=>{const IconComponent=user_derived(()=>get$3(option2).icon);var fragment_18=comment$2(),node_30=first_child(fragment_18);component(node_30,()=>get$3(IconComponent),($$anchor13,IconComponent_2)=>{IconComponent_2($$anchor13,{class:"h-4 w-4"})}),append($$anchor12,fragment_18)};if_block(node_29,$$render=>{get$3(option2).icon&&$$render(consequent_14)})}var text_6=sibling(node_29);reset(div_7),
template_effect(()=>set_text(text_6,` ${get$3(option2).label??""}`)),append($$anchor11,div_7)},$$slots:{default:!0}})}),append($$anchor9,fragment_17)}),append($$anchor8,fragment_16)};if_block(node_26,$$render=>{get$3(field).options&&$$render(consequent_15)})}append($$anchor7,fragment_15)},$$slots:{default:!0}})}),append($$anchor5,fragment_13)},$$slots:{default:!0}})});var node_31=sibling(node_19,2);{var consequent_16=$$anchor4=>{var p_2=root_28(),text_7=child(p_2,!0);reset(p_2),template_effect(()=>set_text(
text_7,get$3(field).help||SETTING_CONFIG_INFO[get$3(field).key])),append($$anchor4,p_2)};if_block(node_31,$$render=>{(get$3(field).help||SETTING_CONFIG_INFO[get$3(field).key])&&$$render(consequent_16)})}append($$anchor3,fragment_9)},consequent_20=$$anchor3=>{var div_8=root_29(),node_32=child(div_8);{let $0=user_derived(()=>!!$$props.localConfig[get$3(field).key]);Checkbox(node_32,{get id(){return get$3(field).key},get checked(){return get$3($0)},onCheckedChange:checked=>$$props.onConfigChange(get$3(
field).key,checked),class:"mt-1"})}var div_9=sibling(node_32,2),label=child(div_9),text_8=child(label),node_33=sibling(text_8);{var consequent_18=$$anchor4=>{Flask_conical($$anchor4,{class:"h-3.5 w-3.5 text-muted-foreground"})};if_block(node_33,$$render=>{get$3(field).isExperimental&&$$render(consequent_18)})}reset(label);var node_34=sibling(label,2);{var consequent_19=$$anchor4=>{var p_3=root_31(),text_9=child(p_3,!0);reset(p_3),template_effect(()=>set_text(text_9,get$3(field).help||SETTING_CONFIG_INFO[get$3(
field).key])),append($$anchor4,p_3)};if_block(node_34,$$render=>{(get$3(field).help||SETTING_CONFIG_INFO[get$3(field).key])&&$$render(consequent_19)})}reset(div_9),reset(div_8),template_effect(()=>{set_attribute(label,"for",get$3(field).key),set_text(text_8,`${get$3(field).label??""} `)}),append($$anchor3,div_8)};if_block(node_1,$$render=>{get$3(field).type===SettingsFieldType.INPUT?$$render(consequent_4):get$3(field).type===SettingsFieldType.TEXTAREA?$$render(consequent_9,1):get$3(field).type===
SettingsFieldType.SELECT?$$render(consequent_17,2):get$3(field).type===SettingsFieldType.CHECKBOX&&$$render(consequent_20,3)})}reset(div),append($$anchor2,div)}),append($$anchor,fragment),pop()}delegate(["click"]);var root_1$9=from_html('<div class="py-8 text-center text-sm text-muted-foreground">No tools available</div>'),root_5$6=from_html('<!> <span class="inline-flex min-w-0 items-center gap-1.5 font-medium"><!></span> <span class="ml-auto shrink-0 text-xs text-muted-foreground"> </span>',1),
root_9$4=from_html('<div class="flex items-center gap-2 rounded px-2 py-1.5 text-sm hover:bg-muted/50"><!> <div class="flex w-16 shrink-0 justify-center"><!></div> <div class="flex w-20 shrink-0 justify-center"><!></div></div>'),root_8$7=from_html('<div class="ml-4 border-l border-border/50 pl-2"><div class="flex items-center gap-2 px-2 py-1 text-xs text-muted-foreground"><span class="min-w-0 flex-1">Tool</span> <span class="w-16 shrink-0 text-center">Enabled</span> <span class="w-20 shrink-0 te\
xt-center">Always allow</span></div> <!></div>'),root_4$7=from_html("<!> <!>",1),root_2$d=from_html('<div class="space-y-2"></div>');function SettingsChatToolsTab($$anchor,$$props){push$1($$props,!0);let expandedGroups=new SvelteSet,groups=user_derived(()=>toolsStore.toolGroups);function toggleExpanded(label){expandedGroups.has(label)?expandedGroups.delete(label):expandedGroups.add(label)}var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{var div=root_1$9();append($$anchor2,
div)},alternate_1=$$anchor2=>{var div_1=root_2$d();each(div_1,21,()=>get$3(groups),group=>group.label,($$anchor3,group)=>{const isExpanded=user_derived(()=>expandedGroups.has(get$3(group).label));var fragment_1=comment$2(),node_1=first_child(fragment_1);component(node_1,()=>Collapsible,($$anchor4,Collapsible_Root)=>{Collapsible_Root($$anchor4,{get open(){return get$3(isExpanded)},onOpenChange:()=>toggleExpanded(get$3(group).label),children:($$anchor5,$$slotProps)=>{var fragment_2=root_4$7(),node_2=first_child(
fragment_2);component(node_2,()=>Collapsible_trigger,($$anchor6,Collapsible_Trigger)=>{Collapsible_Trigger($$anchor6,{class:"flex w-full items-center gap-2 rounded-lg px-3 py-2 text-sm hover:bg-muted/50",children:($$anchor7,$$slotProps2)=>{const faviconUrl=user_derived(()=>get$3(group).serverId?mcpStore.getServerFavicon(get$3(group).serverId):null);var fragment_3=root_5$6(),node_3=first_child(fragment_3);{var consequent_1=$$anchor8=>{Chevron_down($$anchor8,{class:"h-3.5 w-3.5 shrink-0"})},alternate=$$anchor8=>{
Chevron_right($$anchor8,{class:"h-3.5 w-3.5 shrink-0"})};if_block(node_3,$$render=>{get$3(isExpanded)?$$render(consequent_1):$$render(alternate,-1)})}var span=sibling(node_3,2),node_4=child(span);McpServerIdentity(node_4,{iconClass:"h-4 w-4",iconRounded:"rounded-sm",showVersion:!1,get displayName(){return get$3(group).label},get faviconUrl(){return get$3(faviconUrl)}}),reset(span);var span_1=sibling(span,2),text2=child(span_1);reset(span_1),template_effect(()=>set_text(text2,`${get$3(group).tools.
length??""} tool${get$3(group).tools.length!==1?"s":""}`)),append($$anchor7,fragment_3)},$$slots:{default:!0}})});var node_5=sibling(node_2,2);component(node_5,()=>Collapsible_content,($$anchor6,Collapsible_Content)=>{Collapsible_Content($$anchor6,{children:($$anchor7,$$slotProps2)=>{var div_2=root_8$7(),node_6=sibling(child(div_2),2);each(node_6,17,()=>get$3(group).tools,tool=>tool.function.name,($$anchor8,tool)=>{const toolName=user_derived(()=>get$3(tool).function.name),isEnabled=user_derived(
()=>toolsStore.isToolEnabled(get$3(toolName))),permissionKey=user_derived(()=>toolsStore.getPermissionKey(get$3(toolName))),isAlwaysAllowed=user_derived(()=>get$3(permissionKey)?permissionsStore.hasTool(get$3(permissionKey)):!1);var div_3=root_9$4(),node_7=child(div_3);TruncatedText(node_7,{get text(){return get$3(toolName)},class:"flex-1",showTooltip:!0});var div_4=sibling(node_7,2),node_8=child(div_4);Checkbox(node_8,{get checked(){return get$3(isEnabled)},onCheckedChange:()=>toolsStore.toggleTool(
get$3(toolName)),class:"h-4 w-4"}),reset(div_4);var div_5=sibling(div_4,2),node_9=child(div_5);Checkbox(node_9,{get checked(){return get$3(isAlwaysAllowed)},onCheckedChange:()=>{get$3(isAlwaysAllowed)?permissionsStore.revokeTool(get$3(permissionKey)):permissionsStore.allowTool(get$3(permissionKey))},class:"h-4 w-4"}),reset(div_5),reset(div_3),append($$anchor8,div_3)}),reset(div_2),append($$anchor7,div_2)},$$slots:{default:!0}})}),append($$anchor5,fragment_2)},$$slots:{default:!0}})}),append($$anchor3,
fragment_1)}),reset(div_1),append($$anchor2,div_1)};if_block(node2,$$render=>{get$3(groups).length===0?$$render(consequent):$$render(alternate_1,-1)})}append($$anchor,fragment),pop()}function filterModelOptions(options,searchTerm){const term=searchTerm.trim().toLowerCase();return term?options.filter(option2=>option2.model.toLowerCase().includes(term)||option2.name?.toLowerCase().includes(term)||option2.aliases?.some(alias=>alias.toLowerCase().includes(term))||option2.tags?.some(tag=>tag.toLowerCase().
includes(term))):options}function groupModelOptions(filteredOptions,favoriteIds,isModelLoaded){const loaded=[];for(let i=0;i<filteredOptions.length;i++)isModelLoaded(filteredOptions[i].model)&&loaded.push({option:filteredOptions[i],flatIndex:i});const loadedModelIds=new Set(loaded.map(item=>item.option.model)),favorites=[];for(let i=0;i<filteredOptions.length;i++)favoriteIds.has(filteredOptions[i].model)&&!loadedModelIds.has(filteredOptions[i].model)&&favorites.push({option:filteredOptions[i],flatIndex:i});
const available=[],orgGroups=new SvelteMap;for(let i=0;i<filteredOptions.length;i++){const option2=filteredOptions[i];if(loadedModelIds.has(option2.model)||favoriteIds.has(option2.model))continue;const key2=option2.parsedId?.orgName??"";orgGroups.has(key2)||orgGroups.set(key2,[]),orgGroups.get(key2).push({option:option2,flatIndex:i})}for(const[orgName,items2]of orgGroups)available.push({orgName:orgName||null,items:items2});return{loaded,favorites,available}}function useModelsSelector(opts){const options=user_derived(
()=>modelOptions().filter(option2=>modelsStore.getModelProps(option2.model)?.webui!==!1)),loading=user_derived(modelsLoading),updating=user_derived(modelsUpdating),activeId=user_derived(selectedModelId),isRouter=user_derived(isRouterMode),serverModel=user_derived(singleModelName),currentModel=user_derived(()=>opts.currentModel()),useGlobalSelection=user_derived(()=>opts.useGlobalSelection?.()??!1),onModelChange=user_derived(()=>opts.onModelChange?.()),isHighlightedCurrentModelActive=user_derived(
()=>{if(!get$3(isRouter)||!get$3(currentModel))return!1;const currentOption=get$3(options).find(option2=>option2.model===get$3(currentModel));return currentOption?currentOption.id===get$3(activeId):!1}),isCurrentModelInCache=user_derived(()=>!get$3(isRouter)||!get$3(currentModel)?!0:get$3(options).some(option2=>option2.model===get$3(currentModel)));let isLoadingModel=state$1(!1),searchTerm=state$1(""),showModelDialog=state$1(!1),infoModelId=state$1(null);const filteredOptions=user_derived(()=>filterModelOptions(
get$3(options),get$3(searchTerm))),groupedFilteredOptions=user_derived(()=>groupModelOptions(get$3(filteredOptions),modelsStore.favoriteModelIds,m=>modelsStore.isModelLoaded(m)));function handleInfoClick(modelName){set$1(infoModelId,modelName,!0),set$1(showModelDialog,!0)}onMount$1(()=>{modelsStore.fetch().catch(error2=>{console.error("Unable to load models:",error2)})});function handleOpenChange(open2){get$3(loading)||get$3(updating)||(get$3(isRouter)?(set$1(searchTerm,""),open2&&modelsStore.fetchRouterModels().
then(()=>{modelsStore.fetchModalitiesForLoadedModels()}),opts.onOpenChange?.(open2)):set$1(showModelDialog,open2,!0))}async function handleSelect(modelId){const option2=get$3(options).find(opt=>opt.id===modelId);if(!option2)return;let shouldCloseMenu=!0;get$3(onModelChange)?await get$3(onModelChange)(option2.id,option2.model)===!1&&(shouldCloseMenu=!1):await modelsStore.selectModelById(option2.id),shouldCloseMenu&&(handleOpenChange(!1),requestAnimationFrame(()=>{document.querySelector('[data-slo\
t="chat-form"] textarea')?.focus()})),!get$3(onModelChange)&&get$3(isRouter)&&!modelsStore.isModelLoaded(option2.model)&&(set$1(isLoadingModel,!0),modelsStore.loadModel(option2.model).catch(error2=>console.error("Failed to load model:",error2)).finally(()=>set$1(isLoadingModel,!1)))}function getDisplayOption(){if(!get$3(isRouter)){const displayModel=get$3(serverModel)||get$3(currentModel);return displayModel?{id:get$3(serverModel)?"current":"offline-current",model:displayModel,name:displayModel.
split("/").pop()||displayModel,capabilities:[]}:void 0}if(get$3(useGlobalSelection)&&get$3(activeId)){const selected=get$3(options).find(option2=>option2.id===get$3(activeId));if(selected)return selected}if(get$3(currentModel))return get$3(isCurrentModelInCache)?get$3(options).find(option2=>option2.model===get$3(currentModel)):{id:"not-in-cache",model:get$3(currentModel),name:get$3(currentModel).split("/").pop()||get$3(currentModel),capabilities:[]};if(get$3(activeId))return get$3(options).find(
option2=>option2.id===get$3(activeId))}return{get options(){return get$3(options)},get loading(){return get$3(loading)},get updating(){return get$3(updating)},get activeId(){return get$3(activeId)},get isRouter(){return get$3(isRouter)},get serverModel(){return get$3(serverModel)},get isHighlightedCurrentModelActive(){return get$3(isHighlightedCurrentModelActive)},get isCurrentModelInCache(){return get$3(isCurrentModelInCache)},get filteredOptions(){return get$3(filteredOptions)},get groupedFilteredOptions(){
return get$3(groupedFilteredOptions)},get isLoadingModel(){return get$3(isLoadingModel)},get searchTerm(){return get$3(searchTerm)},get showModelDialog(){return get$3(showModelDialog)},get infoModelId(){return get$3(infoModelId)},setSearchTerm(value){set$1(searchTerm,value,!0)},setShowModelDialog(value){set$1(showModelDialog,value,!0)},handleInfoClick,handleSelect,handleOpenChange,isFavorite(model){return modelsStore.favoriteModelIds.has(model)},getDisplayOption}}var root_1$8=from_html('<div cla\
ss="flex items-center gap-2 text-xs text-muted-foreground"><!> Loading models…</div>'),root_3$6=from_html('<span style="max-width: min(calc(100cqw - 10rem), 20rem)"><!> <!></span>'),root_4$6=from_html('<p class="text-xs text-muted-foreground">No models available.</p>'),root_12$1=from_html('<p class="font-mono"> </p>'),root_10$2=from_html("<!> <!>",1),root_13$1=from_html('<span class="min-w-0 font-medium">Select model</span>'),root_8$6=from_html("<!> <!> <!>",1),root_19$1=from_html('<button typ\
e="button" class="flex w-full cursor-not-allowed items-center bg-red-400/10 p-2 text-left text-sm text-red-400" role="option" aria-selected="true" aria-disabled="true" disabled=""><!> <span class="ml-2 text-xs whitespace-nowrap opacity-70">(not available)</span></button>'),root_20=from_html('<p class="px-4 py-3 text-sm text-muted-foreground">No models found.</p>'),root_17$1=from_html('<div class="models-list"><!> <!> <!></div>'),root_7$6=from_html("<!> <!>",1),root_25=from_html('<p class="font-m\
ono"> </p>'),root_23=from_html("<!> <!>",1),root_21=from_html('<button style="max-width: min(calc(100cqw - 6.5rem), 32rem)"><!> <!> <!></button>'),root$k=from_html("<div><!></div> <!>",1);function ModelsSelectorDropdown($$anchor,$$props){push$1($$props,!0);let className=prop($$props,"class",3,""),currentModel=prop($$props,"currentModel",3,null),disabled=prop($$props,"disabled",3,!1),forceForegroundText=prop($$props,"forceForegroundText",3,!1),useGlobalSelection=prop($$props,"useGlobalSelection",
3,!1),isOpen=state$1(!1),highlightedIndex=state$1(-1);const ms=useModelsSelector({currentModel:()=>currentModel(),useGlobalSelection:()=>useGlobalSelection(),onModelChange:()=>$$props.onModelChange,onOpenChange:open3=>{set$1(isOpen,open3,!0),set$1(highlightedIndex,-1)}});user_effect(()=>{ms.searchTerm,set$1(highlightedIndex,-1)});function open2(){ms.handleOpenChange(!0)}function handleSearchKeyDown(event2){if(!event2.isComposing){if(event2.key===KeyboardKey.ARROW_DOWN){if(event2.preventDefault(),
ms.filteredOptions.length===0)return;get$3(highlightedIndex)===-1||get$3(highlightedIndex)===ms.filteredOptions.length-1?set$1(highlightedIndex,0):set$1(highlightedIndex,get$3(highlightedIndex)+1)}else if(event2.key===KeyboardKey.ARROW_UP){if(event2.preventDefault(),ms.filteredOptions.length===0)return;get$3(highlightedIndex)===-1||get$3(highlightedIndex)===0?set$1(highlightedIndex,ms.filteredOptions.length-1):set$1(highlightedIndex,get$3(highlightedIndex)-1)}else if(event2.key===KeyboardKey.ENTER)
if(event2.preventDefault(),get$3(highlightedIndex)>=0&&get$3(highlightedIndex)<ms.filteredOptions.length){const option2=ms.filteredOptions[get$3(highlightedIndex)];ms.handleSelect(option2.id)}else ms.filteredOptions.length>0&&set$1(highlightedIndex,0)}}var $$exports={open:open2},fragment=root$k(),div=first_child(fragment),node2=child(div);{var consequent=$$anchor2=>{var div_1=root_1$8(),node_1=child(div_1);Loader_circle(node_1,{class:"h-3.5 w-3.5 animate-spin"}),next$1(),reset(div_1),append($$anchor2,
div_1)},consequent_2=$$anchor2=>{var fragment_1=comment$2(),node_2=first_child(fragment_1);{var consequent_1=$$anchor3=>{var span=root_3$6(),node_3=child(span);Package(node_3,{class:"h-3.5 w-3.5"});var node_4=sibling(node_3,2);ModelId(node_4,{get modelId(){return currentModel()},class:"min-w-0",hideQuantization:!0}),reset(span),template_effect(()=>set_class(span,1,clsx(["inline-flex items-center gap-1.5 rounded-sm bg-muted-foreground/10 px-1.5 py-1 text-xs text-muted-foreground",className()]))),
append($$anchor3,span)},alternate=$$anchor3=>{var p2=root_4$6();append($$anchor3,p2)};if_block(node_2,$$render=>{currentModel()?$$render(consequent_1):$$render(alternate,-1)})}append($$anchor2,fragment_1)},alternate_4=$$anchor2=>{const selectedOption=user_derived(()=>ms.getDisplayOption());var fragment_2=comment$2(),node_5=first_child(fragment_2);{var consequent_7=$$anchor3=>{var fragment_3=comment$2(),node_6=first_child(fragment_3);component(node_6,()=>Root$4,($$anchor4,DropdownMenu_Root)=>{DropdownMenu_Root(
$$anchor4,{get onOpenChange(){return ms.handleOpenChange},get open(){return get$3(isOpen)},set open($$value){set$1(isOpen,$$value,!0)},children:($$anchor5,$$slotProps)=>{var fragment_4=root_7$6(),node_7=first_child(fragment_4);{let $0=user_derived(()=>["inline-grid cursor-pointer grid-cols-[1fr_auto_1fr] items-center gap-1.5 rounded-sm bg-background px-1.5 py-1 text-xs shadow-sm transition hover:bg-muted-foreground/20 focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:\
ring-offset-2 disabled:cursor-not-allowed disabled:opacity-60 dark:bg-muted-foreground/15 dark:text-secondary-foreground",ms.isCurrentModelInCache?(forceForegroundText()||ms.isHighlightedCurrentModelActive,"text-foreground"):"bg-red-400/10 !text-red-400 hover:bg-red-400/20 hover:text-red-400",get$3(isOpen)&&"text-foreground","max-w-[min(calc(100vw-4rem) md:max-w-[min(calc(100cqw-9rem),25rem)]"]),$1=user_derived(()=>disabled()||ms.updating);component(node_7,()=>Dropdown_menu_trigger,($$anchor6,DropdownMenu_Trigger)=>{
DropdownMenu_Trigger($$anchor6,{get class(){return get$3($0)},get disabled(){return get$3($1)},children:($$anchor7,$$slotProps2)=>{var fragment_5=root_8$6(),node_8=first_child(fragment_5);Package(node_8,{class:"h-3.5 w-3.5"});var node_9=sibling(node_8,2);{var consequent_3=$$anchor8=>{var fragment_6=comment$2(),node_10=first_child(fragment_6);component(node_10,()=>Root$5,($$anchor9,Tooltip_Root)=>{Tooltip_Root($$anchor9,{children:($$anchor10,$$slotProps3)=>{var fragment_7=root_10$2(),node_11=first_child(
fragment_7);{const child2=($$anchor11,$$arg0)=>{ModelId($$anchor11,spread_props({get modelId(){return get$3(selectedOption).model},class:"min-w-0 overflow-hidden",hideOrgName:!1},()=>$$arg0?.().props))};component(node_11,()=>Tooltip_trigger,($$anchor11,Tooltip_Trigger)=>{Tooltip_Trigger($$anchor11,{child:child2,$$slots:{child:!0}})})}var node_12=sibling(node_11,2);component(node_12,()=>Tooltip_content,($$anchor11,Tooltip_Content)=>{Tooltip_Content($$anchor11,{children:($$anchor12,$$slotProps4)=>{
var p_1=root_12$1(),text2=child(p_1,!0);reset(p_1),template_effect(()=>set_text(text2,get$3(selectedOption).model)),append($$anchor12,p_1)},$$slots:{default:!0}})}),append($$anchor10,fragment_7)},$$slots:{default:!0}})}),append($$anchor8,fragment_6)},alternate_1=$$anchor8=>{var span_1=root_13$1();append($$anchor8,span_1)};if_block(node_9,$$render=>{get$3(selectedOption)?$$render(consequent_3):$$render(alternate_1,-1)})}var node_13=sibling(node_9,2);{var consequent_4=$$anchor8=>{Loader_circle($$anchor8,
{class:"h-3 w-3.5 animate-spin"})},alternate_2=$$anchor8=>{Chevron_down($$anchor8,{class:"h-3 w-3.5"})};if_block(node_13,$$render=>{ms.updating||ms.isLoadingModel?$$render(consequent_4):$$render(alternate_2,-1)})}append($$anchor7,fragment_5)},$$slots:{default:!0}})})}var node_14=sibling(node_7,2);component(node_14,()=>Dropdown_menu_content,($$anchor6,DropdownMenu_Content)=>{DropdownMenu_Content($$anchor6,{align:"end",class:"w-full max-w-[100vw] pt-0 sm:w-max sm:max-w-[calc(100vw-2rem)]",children:($$anchor7,$$slotProps2)=>{
{let $0=user_derived(()=>ms.filteredOptions.length===0&&ms.isCurrentModelInCache);DropdownMenuSearchable($$anchor7,{get searchValue(){return ms.searchTerm},onSearchChange:v=>ms.setSearchTerm(v),placeholder:"Search models...",onSearchKeyDown:handleSearchKeyDown,emptyMessage:"No models found.",get isEmpty(){return get$3($0)},children:($$anchor8,$$slotProps3)=>{var div_2=root_17$1();{const modelOption=($$anchor9,item=noop$3,hideOrgName=noop$3)=>{const computed_const=user_derived(()=>{const{option:option2,
flatIndex}=item();return{option:option2,flatIndex}}),isSelected=user_derived(()=>currentModel()===get$3(computed_const).option.model||ms.activeId===get$3(computed_const).option.id),isHighlighted=user_derived(()=>get$3(computed_const).flatIndex===get$3(highlightedIndex)),isFav=user_derived(()=>ms.isFavorite(get$3(computed_const).option.model));ModelsSelectorOption($$anchor9,{get option(){return get$3(computed_const).option},get isSelected(){return get$3(isSelected)},get isHighlighted(){return get$3(
isHighlighted)},get isFav(){return get$3(isFav)},get hideOrgName(){return hideOrgName()},get onSelect(){return ms.handleSelect},get onInfoClick(){return ms.handleInfoClick},onMouseEnter:()=>set$1(highlightedIndex,get$3(computed_const).flatIndex,!0),onKeyDown:event2=>{(event2.key===KeyboardKey.ENTER||event2.key===KeyboardKey.SPACE)&&(event2.preventDefault(),ms.handleSelect(get$3(computed_const).option.id))}})};var node_15=child(div_2);{var consequent_5=$$anchor9=>{var button=root_19$1(),node_16=child(
button);ModelId(node_16,{get modelId(){return currentModel()},class:"flex-1",hideQuantization:!0}),next$1(2),reset(button),append($$anchor9,button)};if_block(node_15,$$render=>{!ms.isCurrentModelInCache&&currentModel()&&$$render(consequent_5)})}var node_17=sibling(node_15,2);{var consequent_6=$$anchor9=>{var p_2=root_20();append($$anchor9,p_2)};if_block(node_17,$$render=>{ms.filteredOptions.length===0&&$$render(consequent_6)})}var node_18=sibling(node_17,2);ModelsSelectorList(node_18,{get groups(){
return ms.groupedFilteredOptions},get currentModel(){return currentModel()},get activeId(){return ms.activeId},sectionHeaderClass:"my-1.5 px-2 py-2 text-[13px] font-semibold text-muted-foreground/70 select-none",get onSelect(){return ms.handleSelect},get onInfoClick(){return ms.handleInfoClick},get renderOption(){return modelOption}}),reset(div_2)}append($$anchor8,div_2)},$$slots:{default:!0}})}},$$slots:{default:!0}})}),append($$anchor5,fragment_4)},$$slots:{default:!0}})}),append($$anchor3,fragment_3)},
alternate_3=$$anchor3=>{var button_1=root_21(),node_19=child(button_1);Package(node_19,{class:"h-3.5 w-3.5"});var node_20=sibling(node_19,2);{var consequent_8=$$anchor4=>{var fragment_13=comment$2(),node_21=first_child(fragment_13);component(node_21,()=>Root$5,($$anchor5,Tooltip_Root_1)=>{Tooltip_Root_1($$anchor5,{children:($$anchor6,$$slotProps)=>{var fragment_14=root_23(),node_22=first_child(fragment_14);{const child2=($$anchor7,$$arg0)=>{ModelId($$anchor7,spread_props({get modelId(){return get$3(
selectedOption).model},class:"min-w-0 overflow-hidden",hideOrgName:!1},()=>$$arg0?.().props))};component(node_22,()=>Tooltip_trigger,($$anchor7,Tooltip_Trigger_1)=>{Tooltip_Trigger_1($$anchor7,{child:child2,$$slots:{child:!0}})})}var node_23=sibling(node_22,2);component(node_23,()=>Tooltip_content,($$anchor7,Tooltip_Content_1)=>{Tooltip_Content_1($$anchor7,{children:($$anchor8,$$slotProps2)=>{var p_3=root_25(),text_1=child(p_3,!0);reset(p_3),template_effect(()=>set_text(text_1,get$3(selectedOption).
model)),append($$anchor8,p_3)},$$slots:{default:!0}})}),append($$anchor6,fragment_14)},$$slots:{default:!0}})}),append($$anchor4,fragment_13)};if_block(node_20,$$render=>{get$3(selectedOption)&&$$render(consequent_8)})}var node_24=sibling(node_20,2);{var consequent_9=$$anchor4=>{Loader_circle($$anchor4,{class:"h-3 w-3.5 animate-spin"})};if_block(node_24,$$render=>{ms.updating&&$$render(consequent_9)})}reset(button_1),template_effect(()=>{set_class(button_1,1,clsx(["inline-flex cursor-pointer ite\
ms-center gap-1.5 rounded-sm bg-background px-1.5 py-1 text-xs shadow-sm transition hover:bg-muted-foreground/20 focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-60 dark:bg-muted-foreground/15 dark:text-secondary-foreground",ms.isCurrentModelInCache?(forceForegroundText()||ms.isHighlightedCurrentModelActive,"text-foreground"):"bg-red-400/10 !text-red-400 hover:bg-red-400/20 hover:text-red-400",get$3(isOpen)&&
"text-foreground"])),button_1.disabled=disabled()||ms.updating}),delegated("click",button_1,()=>ms.handleOpenChange(!0)),append($$anchor3,button_1)};if_block(node_5,$$render=>{ms.isRouter?$$render(consequent_7):$$render(alternate_3,-1)})}append($$anchor2,fragment_2)};if_block(node2,$$render=>{ms.loading&&ms.options.length===0&&ms.isRouter?$$render(consequent):ms.options.length===0&&ms.isRouter?$$render(consequent_2,1):$$render(alternate_4,-1)})}reset(div);var node_25=sibling(div,2);{var consequent_10=$$anchor2=>{
DialogModelInformation($$anchor2,{get open(){return ms.showModelDialog},onOpenChange:v=>ms.setShowModelDialog(v),get modelId(){return ms.infoModelId}})};if_block(node_25,$$render=>{ms.showModelDialog&&$$render(consequent_10)})}return template_effect(()=>set_class(div,1,clsx(["relative inline-flex flex-col items-end gap-1",className()]))),append($$anchor,fragment),pop($$exports)}delegate(["click"]);var root_2$c=from_html("<p>Loaded models</p> <!>",1),root_4$5=from_html("<p>Favorite models</p> <!>",
1),root_8$5=from_html("<p> </p>"),root_7$5=from_html("<!> <!>",1),root_6$6=from_html("<p>Available models</p> <!>",1),root$j=from_html("<!> <!> <!>",1);function ModelsSelectorList($$anchor,$$props){push$1($$props,!0);const defaultOption=($$anchor2,item=noop$3,hideOrgName=noop$3)=>{const computed_const=user_derived(()=>{const{option:option2}=item();return{option:option2}}),isSelected=user_derived(()=>$$props.currentModel===get$3(computed_const).option.model||$$props.activeId===get$3(computed_const).
option.id),isFav=user_derived(()=>modelsStore.favoriteModelIds.has(get$3(computed_const).option.model));ModelsSelectorOption($$anchor2,{get option(){return get$3(computed_const).option},get isSelected(){return get$3(isSelected)},isHighlighted:!1,get isFav(){return get$3(isFav)},get hideOrgName(){return hideOrgName()},get onSelect(){return $$props.onSelect},get onInfoClick(){return $$props.onInfoClick},onMouseEnter:()=>{},onKeyDown:()=>{}})};let sectionHeaderClass=prop($$props,"sectionHeaderClass",
3,"my-1 px-2 py-2 text-[13px] font-semibold text-muted-foreground/70 select-none"),orgHeaderClass=prop($$props,"orgHeaderClass",3,"px-2 py-2 text-[11px] font-semibold text-muted-foreground/50 select-none [&:not(:first-child)]:mt-1"),render3=user_derived(()=>$$props.renderOption??defaultOption);var fragment_1=root$j(),node2=first_child(fragment_1);{var consequent=$$anchor2=>{var fragment_2=root_2$c(),p2=first_child(fragment_2),node_1=sibling(p2,2);each(node_1,17,()=>$$props.groups.loaded,item=>`l\
oaded-${item.option.id}`,($$anchor3,item)=>{var fragment_3=comment$2(),node_2=first_child(fragment_3);snippet(node_2,()=>get$3(render3),()=>get$3(item),()=>!1),append($$anchor3,fragment_3)}),template_effect(()=>set_class(p2,1,clsx(sectionHeaderClass()))),append($$anchor2,fragment_2)};if_block(node2,$$render=>{$$props.groups.loaded.length>0&&$$render(consequent)})}var node_3=sibling(node2,2);{var consequent_1=$$anchor2=>{var fragment_4=root_4$5(),p_1=first_child(fragment_4),node_4=sibling(p_1,2);
each(node_4,17,()=>$$props.groups.favorites,item=>`fav-${item.option.id}`,($$anchor3,item)=>{var fragment_5=comment$2(),node_5=first_child(fragment_5);snippet(node_5,()=>get$3(render3),()=>get$3(item),()=>!0),append($$anchor3,fragment_5)}),template_effect(()=>set_class(p_1,1,clsx(sectionHeaderClass()))),append($$anchor2,fragment_4)};if_block(node_3,$$render=>{$$props.groups.favorites.length>0&&$$render(consequent_1)})}var node_6=sibling(node_3,2);{var consequent_3=$$anchor2=>{var fragment_6=root_6$6(),
p_2=first_child(fragment_6),node_7=sibling(p_2,2);each(node_7,17,()=>$$props.groups.available,group=>group.orgName,($$anchor3,group)=>{var fragment_7=root_7$5(),node_8=first_child(fragment_7);{var consequent_2=$$anchor4=>{var p_3=root_8$5(),text2=child(p_3,!0);reset(p_3),template_effect(()=>{set_class(p_3,1,clsx(orgHeaderClass())),set_text(text2,get$3(group).orgName)}),append($$anchor4,p_3)};if_block(node_8,$$render=>{get$3(group).orgName&&$$render(consequent_2)})}var node_9=sibling(node_8,2);each(
node_9,17,()=>get$3(group).items,item=>item.option.id,($$anchor4,item)=>{var fragment_8=comment$2(),node_10=first_child(fragment_8);snippet(node_10,()=>get$3(render3),()=>get$3(item),()=>!0),append($$anchor4,fragment_8)}),append($$anchor3,fragment_7)}),template_effect(()=>set_class(p_2,1,clsx(sectionHeaderClass()))),append($$anchor2,fragment_6)};if_block(node_6,$$render=>{$$props.groups.available.length>0&&$$render(consequent_3)})}append($$anchor,fragment_1),pop()}var root_5$5=from_html('<div cl\
ass="flex w-4 items-center justify-center"><!> <div class="hidden group-hover:flex"><!></div></div>'),root_6$5=from_html('<div class="flex w-4 items-center justify-center"><span class="h-2 w-2 rounded-full bg-orange-400 group-hover:hidden"></span> <div class="hidden group-hover:flex"><!></div></div>'),root_7$4=from_html('<div class="flex w-4 items-center justify-center"><span class="h-2 w-2 rounded-full bg-green-500 group-hover:hidden"></span> <div class="hidden group-hover:flex"><!></div></div>'),
root_8$4=from_html('<div class="flex w-4 items-center justify-center"><span class="h-2 w-2 rounded-full bg-muted-foreground/50 group-hover:hidden"></span> <div class="hidden group-hover:flex"><!></div></div>'),root$i=from_html('<div role="option" tabindex="0"><!> <div class="flex shrink-0 items-center gap-1"><div class="pointer-events-none flex items-center justify-center gap-0.75 pl-2 opacity-0 group-hover:pointer-events-auto group-hover:opacity-100"><!> <!></div> <!></div></div>');function ModelsSelectorOption($$anchor,$$props){
push$1($$props,!0);let hideOrgName=prop($$props,"hideOrgName",3,!1),currentRouterModels=user_derived(routerModels),serverStatus=user_derived(()=>get$3(currentRouterModels).find(m=>m.id===$$props.option.model)?.status?.value??null),isOperationInProgress=user_derived(()=>modelsStore.isModelOperationInProgress($$props.option.model)),isFailed=user_derived(()=>get$3(serverStatus)===ServerModelStatus.FAILED),isSleeping=user_derived(()=>get$3(serverStatus)===ServerModelStatus.SLEEPING),isLoaded=user_derived(
()=>(get$3(serverStatus)===ServerModelStatus.LOADED||get$3(isSleeping))&&!get$3(isOperationInProgress)),isLoading2=user_derived(()=>get$3(serverStatus)===ServerModelStatus.LOADING||get$3(isOperationInProgress));var div=root$i(),node2=child(div);ModelId(node2,{get modelId(){return $$props.option.model},get hideOrgName(){return hideOrgName()},get aliases(){return $$props.option.aliases},get tags(){return $$props.option.tags},class:"flex-1"});var div_1=sibling(node2,2),div_2=child(div_1),node_1=child(
div_2);{var consequent=$$anchor2=>{ActionIcon($$anchor2,{iconSize:"h-2.5 w-2.5",get icon(){return Heart_off},tooltip:"Remove from favorites",class:"h-3 w-3 hover:text-foreground",onclick:()=>modelsStore.toggleFavorite($$props.option.model)})},alternate=$$anchor2=>{ActionIcon($$anchor2,{iconSize:"h-2.5 w-2.5",get icon(){return Heart},tooltip:"Add to favorites",class:"h-3 w-3 hover:text-foreground",onclick:()=>modelsStore.toggleFavorite($$props.option.model)})};if_block(node_1,$$render=>{$$props.isFav?
$$render(consequent):$$render(alternate,-1)})}var node_2=sibling(node_1,2);{var consequent_1=$$anchor2=>{ActionIcon($$anchor2,{iconSize:"h-2.5 w-2.5",get icon(){return Info$1},tooltip:"Model information",class:"h-3 w-3 hover:text-foreground",onclick:()=>$$props.onInfoClick($$props.option.model)})};if_block(node_2,$$render=>{get$3(isLoaded)&&$$props.onInfoClick&&$$render(consequent_1)})}reset(div_2);var node_3=sibling(div_2,2);{var consequent_2=$$anchor2=>{Loader_circle($$anchor2,{class:"h-4 w-4 \
animate-spin text-muted-foreground"})},consequent_3=$$anchor2=>{var div_3=root_5$5(),node_4=child(div_3);Circle_alert(node_4,{class:"h-3.5 w-3.5 text-red-500 group-hover:hidden"});var div_4=sibling(node_4,2),node_5=child(div_4);ActionIcon(node_5,{iconSize:"h-2.5 w-2.5",get icon(){return Rotate_cw},tooltip:"Retry loading model",class:"h-3 w-3 text-red-500 hover:text-foreground",onclick:()=>modelsStore.loadModel($$props.option.model),stopPropagationOnClick:!0}),reset(div_4),reset(div_3),append($$anchor2,
div_3)},consequent_4=$$anchor2=>{var div_5=root_6$5(),div_6=sibling(child(div_5),2),node_6=child(div_6);ActionIcon(node_6,{iconSize:"h-2.5 w-2.5",get icon(){return Power_off},tooltip:"Unload model",class:"h-3 w-3 text-red-500 hover:text-red-600",onclick:e=>{e?.stopPropagation(),modelsStore.unloadModel($$props.option.model)}}),reset(div_6),reset(div_5),append($$anchor2,div_5)},consequent_5=$$anchor2=>{var div_7=root_7$4(),div_8=sibling(child(div_7),2),node_7=child(div_8);ActionIcon(node_7,{iconSize:"\
h-2.5 w-2.5",get icon(){return Power_off},tooltip:"Unload model",class:"h-3 w-3 text-red-500 hover:text-red-600",onclick:()=>modelsStore.unloadModel($$props.option.model),stopPropagationOnClick:!0}),reset(div_8),reset(div_7),append($$anchor2,div_7)},alternate_1=$$anchor2=>{var div_9=root_8$4(),div_10=sibling(child(div_9),2),node_8=child(div_10);ActionIcon(node_8,{iconSize:"h-2.5 w-2.5",get icon(){return Power},tooltip:"Load model",class:"h-3 w-3",onclick:()=>modelsStore.loadModel($$props.option.
model),stopPropagationOnClick:!0}),reset(div_10),reset(div_9),append($$anchor2,div_9)};if_block(node_3,$$render=>{get$3(isLoading2)?$$render(consequent_2):get$3(isFailed)?$$render(consequent_3,1):get$3(isSleeping)?$$render(consequent_4,2):get$3(isLoaded)?$$render(consequent_5,3):$$render(alternate_1,-1)})}reset(div_1),reset(div),template_effect(()=>{set_class(div,1,clsx(["group flex w-full items-center gap-2 rounded-sm p-2 text-left text-sm transition focus:outline-none","cursor-pointer hover:bg\
-muted focus:bg-muted",($$props.isSelected||$$props.isHighlighted)&&"bg-accent text-accent-foreground",!($$props.isSelected||$$props.isHighlighted)&&"hover:bg-accent hover:text-accent-foreground",get$3(isLoaded)?"text-popover-foreground":"text-muted-foreground"])),set_attribute(div,"aria-selected",$$props.isSelected||$$props.isHighlighted)}),delegated("click",div,()=>$$props.onSelect($$props.option.id)),event("mouseenter",div,function(...$$args){$$props.onMouseEnter?.apply(this,$$args)}),delegated(
"keydown",div,function(...$$args){$$props.onKeyDown?.apply(this,$$args)}),delegated("click",div_2,e=>e.stopPropagation()),append($$anchor,div),pop()}delegate(["click","keydown"]);var root_1$7=from_html('<div class="flex items-center gap-2 text-xs text-muted-foreground"><!> Loading models…</div>'),root_2$b=from_html('<p class="text-xs text-muted-foreground">No models available.</p>'),root_5$4=from_html('<span class="min-w-0 font-medium">Select model</span>'),root_11$2=from_html("<!> <!>",1),root_14=from_html(
'<button type="button" class="flex w-full cursor-not-allowed items-center rounded-md bg-red-400/10 px-3 py-2.5 text-left text-sm text-red-400" disabled=""><span class="min-w-0 flex-1 truncate"> </span> <span class="ml-2 text-xs whitespace-nowrap opacity-70">(not available)</span></button> <div class="my-1 h-px bg-border"></div>',1),root_15$1=from_html('<p class="px-3 py-3 text-center text-sm text-muted-foreground">No models found.</p>'),root_10$1=from_html('<!> <div class="flex flex-col gap-1 pb\
-4"><div class="mb-3 px-4"><!></div> <div class="max-h-[60vh] overflow-y-auto px-2"><!> <!> <!></div></div>',1),root_4$4=from_html('<button type="button" style="max-width: min(calc(100cqw - 9rem), 20rem)"><!> <!> <!></button> <!>',1),root_16=from_html('<button style="max-width: min(calc(100cqw - 6.5rem), 32rem)"><!> <!> <!></button>'),root$h=from_html("<div><!></div> <!>",1);function ModelsSelectorSheet($$anchor,$$props){push$1($$props,!0);let className=prop($$props,"class",3,""),currentModel=prop(
$$props,"currentModel",3,null),disabled=prop($$props,"disabled",3,!1),forceForegroundText=prop($$props,"forceForegroundText",3,!1),useGlobalSelection=prop($$props,"useGlobalSelection",3,!1),sheetOpen=state$1(!1);const ms=useModelsSelector({currentModel:()=>currentModel(),useGlobalSelection:()=>useGlobalSelection(),onModelChange:()=>$$props.onModelChange,onOpenChange:open3=>{set$1(sheetOpen,open3,!0)}});function open2(){ms.handleOpenChange(!0)}function handleSheetOpenChange(open3){open3||ms.handleOpenChange(
!1)}var $$exports={open:open2},fragment=root$h(),div=first_child(fragment),node2=child(div);{var consequent=$$anchor2=>{var div_1=root_1$7(),node_1=child(div_1);Loader_circle(node_1,{class:"h-3.5 w-3.5 animate-spin"}),next$1(),reset(div_1),append($$anchor2,div_1)},consequent_1=$$anchor2=>{var p2=root_2$b();append($$anchor2,p2)},alternate_3=$$anchor2=>{const selectedOption=user_derived(()=>ms.getDisplayOption());var fragment_1=comment$2(),node_2=first_child(fragment_1);{var consequent_6=$$anchor3=>{
var fragment_2=root_4$4(),button=first_child(fragment_2),node_3=child(button);Package(node_3,{class:"h-3.5 w-3.5"});var node_4=sibling(node_3,2);{var consequent_2=$$anchor4=>{var span=root_5$4();append($$anchor4,span)},alternate=$$anchor4=>{{let $0=user_derived(()=>get$3(selectedOption)?.model||"");ModelId($$anchor4,{class:"text-xs",get modelId(){return get$3($0)},hideQuantization:!0,hideOrgName:!0})}};if_block(node_4,$$render=>{get$3(selectedOption)?$$render(alternate,-1):$$render(consequent_2)})}
var node_5=sibling(node_4,2);{var consequent_3=$$anchor4=>{Loader_circle($$anchor4,{class:"h-3 w-3.5 animate-spin"})},alternate_1=$$anchor4=>{Chevron_down($$anchor4,{class:"h-3 w-3.5"})};if_block(node_5,$$render=>{ms.updating||ms.isLoadingModel?$$render(consequent_3):$$render(alternate_1,-1)})}reset(button);var node_6=sibling(button,2);component(node_6,()=>Root$3,($$anchor4,Sheet_Root)=>{Sheet_Root($$anchor4,{onOpenChange:handleSheetOpenChange,get open(){return get$3(sheetOpen)},set open($$value){
set$1(sheetOpen,$$value,!0)},children:($$anchor5,$$slotProps)=>{var fragment_6=comment$2(),node_7=first_child(fragment_6);component(node_7,()=>Sheet_content,($$anchor6,Sheet_Content)=>{Sheet_Content($$anchor6,{side:"bottom",class:"max-h-[85vh] gap-1",children:($$anchor7,$$slotProps2)=>{var fragment_7=root_10$1(),node_8=first_child(fragment_7);component(node_8,()=>Sheet_header,($$anchor8,Sheet_Header)=>{Sheet_Header($$anchor8,{children:($$anchor9,$$slotProps3)=>{var fragment_8=root_11$2(),node_9=first_child(
fragment_8);component(node_9,()=>Sheet_title,($$anchor10,Sheet_Title)=>{Sheet_Title($$anchor10,{children:($$anchor11,$$slotProps4)=>{next$1();var text2=text$8("Select Model");append($$anchor11,text2)},$$slots:{default:!0}})});var node_10=sibling(node_9,2);component(node_10,()=>Sheet_description,($$anchor10,Sheet_Description)=>{Sheet_Description($$anchor10,{class:"sr-only",children:($$anchor11,$$slotProps4)=>{next$1();var text_1=text$8("Choose a model to use for the conversation");append($$anchor11,
text_1)},$$slots:{default:!0}})}),append($$anchor9,fragment_8)},$$slots:{default:!0}})});var div_2=sibling(node_8,2),div_3=child(div_2),node_11=child(div_3);SearchInput(node_11,{placeholder:"Search models...",get value(){return ms.searchTerm},onInput:v=>ms.setSearchTerm(v)}),reset(div_3);var div_4=sibling(div_3,2),node_12=child(div_4);{var consequent_4=$$anchor8=>{var fragment_9=root_14(),button_1=first_child(fragment_9),span_1=child(button_1),text_2=child(span_1,!0);reset(span_1),next$1(2),reset(
button_1),next$1(2),template_effect(()=>set_text(text_2,get$3(selectedOption)?.name||currentModel())),append($$anchor8,fragment_9)};if_block(node_12,$$render=>{!ms.isCurrentModelInCache&&currentModel()&&$$render(consequent_4)})}var node_13=sibling(node_12,2);{var consequent_5=$$anchor8=>{var p_1=root_15$1();append($$anchor8,p_1)};if_block(node_13,$$render=>{ms.filteredOptions.length===0&&$$render(consequent_5)})}var node_14=sibling(node_13,2);ModelsSelectorList(node_14,{get groups(){return ms.groupedFilteredOptions},
get currentModel(){return currentModel()},get activeId(){return ms.activeId},sectionHeaderClass:"px-2 py-2 text-xs font-semibold text-muted-foreground/60 select-none",orgHeaderClass:"px-2 py-2 text-xs font-semibold text-muted-foreground/60 select-none [&:not(:first-child)]:mt-2",get onSelect(){return ms.handleSelect},get onInfoClick(){return ms.handleInfoClick}}),reset(div_4),reset(div_2),append($$anchor7,fragment_7)},$$slots:{default:!0}})}),append($$anchor5,fragment_6)},$$slots:{default:!0}})}),
template_effect(()=>{set_class(button,1,clsx(["inline-grid cursor-pointer grid-cols-[1fr_auto_1fr] items-center gap-1.5 rounded-sm bg-background px-1.5 py-1 text-xs shadow-sm transition hover:bg-muted-foreground/20 focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-60 dark:bg-muted-foreground/15 dark:text-secondary-foreground",ms.isCurrentModelInCache?(forceForegroundText()||ms.isHighlightedCurrentModelActive,"\
text-foreground"):"bg-red-400/10 !text-red-400 hover:bg-red-400/20 hover:text-red-400",get$3(sheetOpen)&&"text-foreground"])),button.disabled=disabled()||ms.updating}),delegated("click",button,()=>ms.handleOpenChange(!0)),append($$anchor3,fragment_2)},alternate_2=$$anchor3=>{var button_2=root_16(),node_15=child(button_2);Package(node_15,{class:"h-3.5 w-3.5"});var node_16=sibling(node_15,2);{let $0=user_derived(()=>get$3(selectedOption)?.model||"");TruncatedText(node_16,{get text(){return get$3($0)},
class:"font-medium"})}var node_17=sibling(node_16,2);{var consequent_7=$$anchor4=>{Loader_circle($$anchor4,{class:"h-3 w-3.5 animate-spin"})};if_block(node_17,$$render=>{ms.updating&&$$render(consequent_7)})}reset(button_2),template_effect(()=>{set_class(button_2,1,clsx(["inline-flex cursor-pointer items-center gap-1.5 rounded-sm bg-background px-1.5 py-1 text-xs shadow-sm transition hover:bg-muted-foreground/20 focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-o\
ffset-2 disabled:cursor-not-allowed disabled:opacity-60 dark:bg-muted-foreground/15 dark:text-secondary-foreground",ms.isCurrentModelInCache?(forceForegroundText()||ms.isHighlightedCurrentModelActive,"text-foreground"):"bg-red-400/10 !text-red-400 hover:bg-red-400/20 hover:text-red-400"])),button_2.disabled=disabled()||ms.updating}),delegated("click",button_2,()=>ms.handleOpenChange(!0)),append($$anchor3,button_2)};if_block(node_2,$$render=>{ms.isRouter?$$render(consequent_6):$$render(alternate_2,
-1)})}append($$anchor2,fragment_1)};if_block(node2,$$render=>{ms.loading&&ms.options.length===0&&ms.isRouter?$$render(consequent):ms.options.length===0&&ms.isRouter?$$render(consequent_1,1):$$render(alternate_3,-1)})}reset(div);var node_18=sibling(div,2);{var consequent_8=$$anchor2=>{DialogModelInformation($$anchor2,{get open(){return ms.showModelDialog},onOpenChange:v=>ms.setShowModelDialog(v),get modelId(){return ms.infoModelId}})};if_block(node_18,$$render=>{ms.showModelDialog&&$$render(consequent_8)})}
return template_effect(()=>set_class(div,1,clsx(["relative inline-flex flex-col items-end gap-1",className()]))),append($$anchor,fragment),pop($$exports)}delegate(["click"]);var root_4$3=from_html("<span> </span>"),root_5$3=from_html("<span> </span>"),root_7$3=from_html("<span> </span>"),root_9$3=from_html("<span> </span>"),root_2$a=from_html('<span><span class="min-w-0 truncate font-medium"><!> </span> <!> <!> <!> <!></span>');function ModelId($$anchor,$$props){push$1($$props,!0);let hideOrgName=prop(
$$props,"hideOrgName",3,!1),showRaw=prop($$props,"showRaw",3,void 0),hideQuantization=prop($$props,"hideQuantization",3,!1),className=prop($$props,"class",3,""),rest=rest_props($$props,["$$slots","$$events","$$legacy","modelId","hideOrgName","showRaw","hideQuantization","aliases","tags","class"]);const badgeClass="inline-flex w-fit shrink-0 items-center justify-center whitespace-nowrap rounded-md border border-border/50 px-1 py-0 text-[10px] font-mono bg-foreground/15 dark:bg-foreground/10 text-\
foreground [a&]:hover:bg-foreground/25",tagBadgeClass="inline-flex w-fit shrink-0 items-center justify-center whitespace-nowrap rounded-md border border-border/50 px-1 py-0 text-[10px] font-mono text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground";let parsed=user_derived(()=>ModelsService.parseModelId($$props.modelId)),resolvedShowRaw=user_derived(()=>showRaw()??config$1().showRawModelNames??!1),displayName=user_derived(()=>get$3(parsed).modelName??$$props.modelId),allAliases=user_derived(
()=>$$props.aliases??[]),allTags=user_derived(()=>[...get$3(parsed).tags??[],...$$props.tags??[]]);var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{TruncatedText($$anchor2,spread_props({get class(){return`font-medium ${className()??""}`},showTooltip:!1,get text(){return $$props.modelId}},()=>rest))},alternate=$$anchor2=>{var span=root_2$a();attribute_effect(span,()=>({class:`flex min-w-0 flex-wrap items-center gap-1 ${className()??""}`,...rest}));var span_1=child(
span),node_1=child(span_1);{var consequent_1=$$anchor3=>{var text2=text$8();template_effect(()=>set_text(text2,`${get$3(parsed).orgName??""}/`)),append($$anchor3,text2)};if_block(node_1,$$render=>{!hideOrgName()&&get$3(parsed).orgName&&$$render(consequent_1)})}var text_1=sibling(node_1,1,!0);reset(span_1);var node_2=sibling(span_1,2);{var consequent_2=$$anchor3=>{var span_2=root_4$3();set_class(span_2,1,clsx(badgeClass));var text_2=child(span_2);reset(span_2),template_effect(()=>set_text(text_2,
`${get$3(parsed).params??""}${get$3(parsed).activatedParams?`-${get$3(parsed).activatedParams}`:""}`)),append($$anchor3,span_2)};if_block(node_2,$$render=>{get$3(parsed).params&&$$render(consequent_2)})}var node_3=sibling(node_2,2);{var consequent_3=$$anchor3=>{var span_3=root_5$3();set_class(span_3,1,clsx(badgeClass));var text_3=child(span_3,!0);reset(span_3),template_effect(()=>set_text(text_3,get$3(parsed).quantization)),append($$anchor3,span_3)};if_block(node_3,$$render=>{get$3(parsed).quantization&&
!hideQuantization()&&$$render(consequent_3)})}var node_4=sibling(node_3,2);{var consequent_4=$$anchor3=>{var fragment_3=comment$2(),node_5=first_child(fragment_3);each(node_5,16,()=>get$3(allAliases),alias=>alias,($$anchor4,alias)=>{var span_4=root_7$3();set_class(span_4,1,clsx(badgeClass));var text_4=child(span_4,!0);reset(span_4),template_effect(()=>set_text(text_4,alias)),append($$anchor4,span_4)}),append($$anchor3,fragment_3)};if_block(node_4,$$render=>{get$3(allAliases).length>0&&$$render(consequent_4)})}
var node_6=sibling(node_4,2);{var consequent_5=$$anchor3=>{var fragment_4=comment$2(),node_7=first_child(fragment_4);each(node_7,16,()=>get$3(allTags),tag=>tag,($$anchor4,tag)=>{var span_5=root_9$3();set_class(span_5,1,clsx(tagBadgeClass));var text_5=child(span_5,!0);reset(span_5),template_effect(()=>set_text(text_5,tag)),append($$anchor4,span_5)}),append($$anchor3,fragment_4)};if_block(node_6,$$render=>{get$3(allTags).length>0&&$$render(consequent_5)})}reset(span),template_effect(()=>set_text(text_1,
get$3(displayName))),append($$anchor2,span)};if_block(node2,$$render=>{get$3(resolvedShowRaw)?$$render(consequent):$$render(alternate,-1)})}append($$anchor,fragment),pop()}var root_3$5=from_html("<!> <!>",1),root_8$3=from_html("<!> <!>",1);function ModelBadge($$anchor,$$props){push$1($$props,!0);const badgeContent=$$anchor2=>{BadgeInfo($$anchor2,{get class(){return className()},get onclick(){return $$props.onclick},icon:$$anchor3=>{Package($$anchor3,{class:"h-3 w-3"})},children:($$anchor3,$$slotProps)=>{
var fragment_2=root_3$5(),node2=first_child(fragment_2);{var consequent=$$anchor4=>{ModelId($$anchor4,{get modelId(){return get$3(model)}})};if_block(node2,$$render=>{get$3(model)&&$$render(consequent)})}var node_1=sibling(node2,2);{var consequent_1=$$anchor4=>{{let $0=user_derived(()=>get$3(model)||"");ActionIconCopyToClipboard($$anchor4,{get text(){return get$3($0)},ariaLabel:"Copy model name"})}};if_block(node_1,$$render=>{showCopyIcon()&&$$render(consequent_1)})}append($$anchor3,fragment_2)},
$$slots:{icon:!0,default:!0}})};let className=prop($$props,"class",3,""),showCopyIcon=prop($$props,"showCopyIcon",3,!1),showTooltip=prop($$props,"showTooltip",3,!1),model=user_derived(()=>$$props.model||modelsStore.singleModelName),isModelMode=user_derived(()=>serverStore.isModelMode),shouldShow=user_derived(()=>get$3(model)&&($$props.model!==void 0||get$3(isModelMode)));var fragment_5=comment$2(),node_2=first_child(fragment_5);{var consequent_3=$$anchor2=>{var fragment_6=comment$2(),node_3=first_child(
fragment_6);{var consequent_2=$$anchor3=>{var fragment_7=comment$2(),node_4=first_child(fragment_7);component(node_4,()=>Root$5,($$anchor4,Tooltip_Root)=>{Tooltip_Root($$anchor4,{children:($$anchor5,$$slotProps)=>{var fragment_8=root_8$3(),node_5=first_child(fragment_8);component(node_5,()=>Tooltip_trigger,($$anchor6,Tooltip_Trigger)=>{Tooltip_Trigger($$anchor6,{children:($$anchor7,$$slotProps2)=>{badgeContent($$anchor7)},$$slots:{default:!0}})});var node_6=sibling(node_5,2);component(node_6,()=>Tooltip_content,
($$anchor6,Tooltip_Content)=>{Tooltip_Content($$anchor6,{children:($$anchor7,$$slotProps2)=>{next$1();var text2=text$8();template_effect(()=>set_text(text2,$$props.onclick?"Click for model details":get$3(model))),append($$anchor7,text2)},$$slots:{default:!0}})}),append($$anchor5,fragment_8)},$$slots:{default:!0}})}),append($$anchor3,fragment_7)},alternate=$$anchor3=>{badgeContent($$anchor3)};if_block(node_3,$$render=>{showTooltip()?$$render(consequent_2):$$render(alternate,-1)})}append($$anchor2,
fragment_6)};if_block(node_2,$$render=>{get$3(shouldShow)&&$$render(consequent_3)})}append($$anchor,fragment_5),pop()}var root_1$6=from_html('<div class="px-2 py-3 text-center text-sm text-muted-foreground"> </div>'),root_2$9=from_html("<!> <!>",1),root$g=from_html('<div class="sticky top-0 z-10 mb-2 bg-popover p-1 pt-2"><!></div> <div class="overflow-y-auto"><!> <!></div> <!>',1);function DropdownMenuSearchable($$anchor,$$props){push$1($$props,!0);let placeholder=prop($$props,"placeholder",3,"S\
earch..."),searchValue=prop($$props,"searchValue",15,""),emptyMessage=prop($$props,"emptyMessage",3,"No items found"),isEmpty=prop($$props,"isEmpty",3,!1);var fragment=root$g(),div=first_child(fragment),node2=child(div);SearchInput(node2,{get placeholder(){return placeholder()},get onInput(){return $$props.onSearchChange},get onKeyDown(){return $$props.onSearchKeyDown},get value(){return searchValue()},set value($$value){searchValue($$value)}}),reset(div);var div_1=sibling(div,2),node_1=child(div_1);
snippet(node_1,()=>$$props.children);var node_2=sibling(node_1,2);{var consequent=$$anchor2=>{var div_2=root_1$6(),text2=child(div_2,!0);reset(div_2),template_effect(()=>set_text(text2,emptyMessage())),append($$anchor2,div_2)};if_block(node_2,$$render=>{isEmpty()&&$$render(consequent)})}reset(div_1);var node_3=sibling(div_1,2);{var consequent_1=$$anchor2=>{var fragment_1=root_2$9(),node_4=first_child(fragment_1);component(node_4,()=>Dropdown_menu_separator,($$anchor3,DropdownMenu_Separator)=>{DropdownMenu_Separator(
$$anchor3,{})});var node_5=sibling(node_4,2);snippet(node_5,()=>$$props.footer),append($$anchor2,fragment_1)};if_block(node_3,$$render=>{$$props.footer&&$$render(consequent_1)})}append($$anchor,fragment),pop()}const iconComponent=($$anchor,IconComponent=noop$3,className=noop$3)=>{var fragment=comment$2(),node2=first_child(fragment);component(node2,IconComponent,($$anchor2,IconComponent_1)=>{IconComponent_1($$anchor2,{get class(){return className()}})}),append($$anchor,fragment)};var root_6$4=from_html(
'<!> <span class="sr-only"> </span>',1),root_7$2=from_html("<p> </p>"),root_5$2=from_html("<!> <!>",1),root_12=from_html('<div class="flex items-center gap-2"><!> </div> <!>',1),root_10=from_html("<!> <!>",1),root_2$8=from_html("<!> <!>",1);function DropdownMenuActions($$anchor,$$props){push$1($$props,!0);let triggerClass=prop($$props,"triggerClass",3,""),align=prop($$props,"align",3,"end"),open2=prop($$props,"open",15,!1);var fragment_1=comment$2(),node_1=first_child(fragment_1);component(node_1,
()=>Root$4,($$anchor2,DropdownMenu_Root)=>{DropdownMenu_Root($$anchor2,{get open(){return open2()},set open($$value){open2($$value)},children:($$anchor3,$$slotProps)=>{var fragment_2=root_2$8(),node_2=first_child(fragment_2);component(node_2,()=>Dropdown_menu_trigger,($$anchor4,DropdownMenu_Trigger)=>{DropdownMenu_Trigger($$anchor4,{get class(){return`flex h-6 w-6 cursor-pointer items-center justify-center rounded-md p-0 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-for\
eground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[state=open]:bg-accent data-[state=open]:text-accent-foreground ${triggerClass()??""}`},onclick:e=>e.stopPropagation(),children:($$anchor5,$$slotProps2)=>{var fragment_3=comment$2(),node_3=first_child(fragment_3);{var consequent=$$anchor6=>{var fragment_4=comment$2(),node_4=first_child(fragment_4);component(node_4,()=>Root$5,($$anchor7,Tooltip_Root)=>{Tooltip_Root($$anchor7,
{children:($$anchor8,$$slotProps3)=>{var fragment_5=root_5$2(),node_5=first_child(fragment_5);component(node_5,()=>Tooltip_trigger,($$anchor9,Tooltip_Trigger)=>{Tooltip_Trigger($$anchor9,{children:($$anchor10,$$slotProps4)=>{var fragment_6=root_6$4(),node_6=first_child(fragment_6);iconComponent(node_6,()=>$$props.triggerIcon,()=>"h-3 w-3");var span=sibling(node_6,2),text2=child(span,!0);reset(span),template_effect(()=>set_text(text2,$$props.triggerTooltip)),append($$anchor10,fragment_6)},$$slots:{
default:!0}})});var node_7=sibling(node_5,2);component(node_7,()=>Tooltip_content,($$anchor9,Tooltip_Content)=>{Tooltip_Content($$anchor9,{children:($$anchor10,$$slotProps4)=>{var p2=root_7$2(),text_1=child(p2,!0);reset(p2),template_effect(()=>set_text(text_1,$$props.triggerTooltip)),append($$anchor10,p2)},$$slots:{default:!0}})}),append($$anchor8,fragment_5)},$$slots:{default:!0}})}),append($$anchor6,fragment_4)},alternate=$$anchor6=>{iconComponent($$anchor6,()=>$$props.triggerIcon,()=>"h-3 w-3")};
if_block(node_3,$$render=>{$$props.triggerTooltip?$$render(consequent):$$render(alternate,-1)})}append($$anchor5,fragment_3)},$$slots:{default:!0}})});var node_8=sibling(node_2,2);component(node_8,()=>Dropdown_menu_content,($$anchor4,DropdownMenu_Content)=>{DropdownMenu_Content($$anchor4,{get align(){return align()},class:"z-[999999] w-48",children:($$anchor5,$$slotProps2)=>{var fragment_8=comment$2(),node_9=first_child(fragment_8);each(node_9,19,()=>$$props.actions,action2=>action2.label,($$anchor6,action2,index2)=>{
var fragment_9=root_10(),node_10=first_child(fragment_9);{var consequent_1=$$anchor7=>{var fragment_10=comment$2(),node_11=first_child(fragment_10);component(node_11,()=>Dropdown_menu_separator,($$anchor8,DropdownMenu_Separator)=>{DropdownMenu_Separator($$anchor8,{})}),append($$anchor7,fragment_10)};if_block(node_10,$$render=>{get$3(action2).separator&&get$3(index2)>0&&$$render(consequent_1)})}var node_12=sibling(node_10,2);component(node_12,()=>Dropdown_menu_item,($$anchor7,DropdownMenu_Item)=>{
DropdownMenu_Item($$anchor7,{get onclick(){return get$3(action2).onclick},get variant(){return get$3(action2).variant},get disabled(){return get$3(action2).disabled},class:"flex items-center justify-between hover:[&>kbd]:opacity-100",children:($$anchor8,$$slotProps3)=>{var fragment_11=root_12(),div=first_child(fragment_11),node_13=child(div);iconComponent(node_13,()=>get$3(action2).icon,()=>`h-4 w-4 ${get$3(action2).variant==="destructive"?"text-destructive":""}`);var text_2=sibling(node_13);reset(
div);var node_14=sibling(div,2);{var consequent_2=$$anchor9=>{KeyboardShortcutInfo($$anchor9,{get keys(){return get$3(action2).shortcut},get variant(){return get$3(action2).variant}})};if_block(node_14,$$render=>{get$3(action2).shortcut&&$$render(consequent_2)})}template_effect(()=>set_text(text_2,` ${get$3(action2).label??""}`)),append($$anchor8,fragment_11)},$$slots:{default:!0}})}),append($$anchor6,fragment_9)}),append($$anchor5,fragment_8)},$$slots:{default:!0}})}),append($$anchor3,fragment_2)},
$$slots:{default:!0}})}),append($$anchor,fragment_1),pop()}function circIn(t){return 1-Math.sqrt(1-t*t)}var root_2$7=from_html("<div><!></div>"),root$f=from_html('<div></div> <aside><div class="mt-12 flex flex-col items-center gap-1"></div></aside>',1);function DesktopIconStrip($$anchor,$$props){push$1($$props,!0);let sidebarOpen=prop($$props,"sidebarOpen",3,!1);const{handleKeydown}=useKeyboardShortcuts({activateSearchMode:()=>$$props.onSearchClick()});let initialized=state$1(!1),showIcons=user_derived(
()=>!sidebarOpen());set$1(showIcons,!1),onMount$1(()=>{set$1(showIcons,!sidebarOpen()),setTimeout(()=>{set$1(initialized,!0)},ICON_STRIP_TRANSITION_DELAY_MULTIPLIER*SIDEBAR_ACTIONS_ITEMS.length)});var fragment=root$f();event("keydown",$window,handleKeydown);var div=first_child(fragment),aside=sibling(div,2),div_1=child(aside);each(div_1,23,()=>SIDEBAR_ACTIONS_ITEMS,item=>item.tooltip,($$anchor2,item,i)=>{const onclick=user_derived(()=>get$3(item).route?()=>goto(get$3(item).route):$$props.onSearchClick),
isActive=user_derived(()=>get$3(item).activeRouteId?page$1.route.id===get$3(item).activeRouteId:get$3(item).activeRoutePrefix?!!page$1.route.id?.startsWith(get$3(item).activeRoutePrefix):!1);var fragment_1=comment$2(),node2=first_child(fragment_1);{var consequent=$$anchor3=>{var div_2=root_2$7(),node_1=child(div_2);{let $0=user_derived(()=>get$3(isActive)?"bg-accent text-accent-foreground":"");ActionIcon(node_1,{get icon(){return get$3(item).icon},get tooltip(){return get$3(item).tooltip},get tooltipSide(){
return TooltipSide.RIGHT},size:"lg",iconSize:"h-4 w-4",get class(){return`h-9 w-9 rounded-full hover:bg-accent! ${get$3($0)??""}`},get onclick(){return get$3(onclick)}})}reset(div_2),transition(1,div_2,()=>fade,()=>({duration:ICON_STRIP_TRANSITION_DURATION,delay:get$3(initialized)?0:ICON_STRIP_TRANSITION_DELAY_MULTIPLIER+get$3(i)*ICON_STRIP_TRANSITION_DELAY_MULTIPLIER,easing:circIn})),append($$anchor3,div_2)};if_block(node2,$$render=>{get$3(showIcons)&&$$render(consequent)})}append($$anchor2,fragment_1)}),
reset(div_1),reset(aside),template_effect(()=>{set_class(div,1,`hidden shrink-0 transition-[width] duration-200 ease-linear md:block ${sidebarOpen()?"w-0":"w-[calc(var(--sidebar-width-icon)+1.5rem)]"}`),set_class(aside,1,`fixed top-0 bottom-0 left-0 z-10 hidden w-[calc(var(--sidebar-width-icon)+1.5rem)] flex-col items-center justify-between py-3 transition-opacity duration-200 ease-linear md:flex ${sidebarOpen()?"pointer-events-none opacity-0":"opacity-100"}`)}),append($$anchor,fragment),pop()}const itemIcon=($$anchor,IconComponent=noop$3)=>{
var fragment=comment$2(),node2=first_child(fragment);component(node2,IconComponent,($$anchor2,IconComponent_1)=>{IconComponent_1($$anchor2,{class:"h-4 w-4"})}),append($$anchor,fragment)};var root_6$3=from_html('<div class="flex items-center gap-2"><!> </div> <!>',1),root_9$2=from_html('<div class="flex items-center gap-2"><!> </div> <!>',1),root$e=from_html('<div class="my-1 space-y-1"><!></div>');function SidebarNavigationActions($$anchor,$$props){push$1($$props,!0);let isSearchModeActive=prop(
$$props,"isSearchModeActive",15),searchQuery=prop($$props,"searchQuery",15),isCancelAlwaysVisible=prop($$props,"isCancelAlwaysVisible",3,!1),searchInputRef=state$1(null);function handleSearchModeDeactivate(){isSearchModeActive(!1),searchQuery(""),$$props.onSearchDeactivated?.()}function activateSearch(){isSearchModeActive(!0),queueMicrotask(()=>get$3(searchInputRef)?.focus())}var $$exports={activateSearch},div=root$e(),node_1=child(div);{var consequent=$$anchor2=>{SearchInput($$anchor2,{onClose:handleSearchModeDeactivate,
onKeyDown:e=>e.key==="Escape"&&handleSearchModeDeactivate(),placeholder:"Search conversations...",get isCancelAlwaysVisible(){return isCancelAlwaysVisible()},get value(){return searchQuery()},set value($$value){searchQuery($$value)},get ref(){return get$3(searchInputRef)},set ref($$value){set$1(searchInputRef,$$value,!0)}})},alternate_1=$$anchor2=>{var fragment_2=comment$2(),node_2=first_child(fragment_2);each(node_2,17,()=>SIDEBAR_ACTIONS_ITEMS,item=>item.route,($$anchor3,item)=>{var fragment_3=comment$2(),
node_3=first_child(fragment_3);{var consequent_2=$$anchor4=>{Button($$anchor4,{class:"w-full justify-between px-2 backdrop-blur-none! hover:[&>kbd]:opacity-100",onclick:activateSearch,variant:"ghost",children:($$anchor5,$$slotProps)=>{var fragment_5=root_6$3(),div_1=first_child(fragment_5),node_4=child(div_1);itemIcon(node_4,()=>get$3(item).icon);var text2=sibling(node_4);reset(div_1);var node_5=sibling(div_1,2);{var consequent_1=$$anchor6=>{KeyboardShortcutInfo($$anchor6,{get keys(){return get$3(
item).keys}})};if_block(node_5,$$render=>{get$3(item).keys&&$$render(consequent_1)})}template_effect(()=>set_text(text2,` ${get$3(item).tooltip??""}`)),append($$anchor5,fragment_5)},$$slots:{default:!0}})},alternate=$$anchor4=>{{let $0=user_derived(()=>get$3(item).activeRouteId&&page$1.route.id===get$3(item).activeRouteId||get$3(item).activeRoutePrefix&&page$1.route.id?.startsWith(get$3(item).activeRoutePrefix)?"bg-accent text-accent-foreground":"");Button($$anchor4,{get class(){return`w-full ju\
stify-between px-2 backdrop-blur-none! hover:[&>kbd]:opacity-100 ${get$3($0)??""}`},get href(){return get$3(item).route},get onclick(){return $$props.handleMobileSidebarItemClick},variant:"ghost",children:($$anchor5,$$slotProps)=>{var fragment_8=root_9$2(),div_2=first_child(fragment_8),node_6=child(div_2);itemIcon(node_6,()=>get$3(item).icon);var text_1=sibling(node_6);reset(div_2);var node_7=sibling(div_2,2);{var consequent_3=$$anchor6=>{KeyboardShortcutInfo($$anchor6,{get keys(){return get$3(item).
keys}})};if_block(node_7,$$render=>{get$3(item).keys&&$$render(consequent_3)})}template_effect(()=>set_text(text_1,` ${get$3(item).tooltip??""}`)),append($$anchor5,fragment_8)},$$slots:{default:!0}})}};if_block(node_3,$$render=>{get$3(item).route?$$render(alternate,-1):$$render(consequent_2)})}append($$anchor3,fragment_3)}),append($$anchor2,fragment_2)};if_block(node_1,$$render=>{isSearchModeActive()?$$render(consequent):$$render(alternate_1,-1)})}return reset(div),append($$anchor,div),pop($$exports)}
var root_3$4=from_html('<a class="flex shrink-0 items-center text-muted-foreground transition-colors hover:text-foreground"><!></a>'),root_4$2=from_html("<p>See parent conversation</p>"),root_2$6=from_html("<!> <!>",1),root_7$1=from_html('<div class="stop-button flex h-4 w-4 shrink-0 cursor-pointer items-center justify-center rounded text-muted-foreground transition-colors hover:text-foreground svelte-19ekn76" role="button" tabindex="0" aria-label="Stop generation"><!> <!></div>'),root_8$2=from_html(
"<p>Stop generation</p>"),root_6$2=from_html("<!> <!>",1),root_9$1=from_html('<div class="actions flex items-center"><!></div>'),root$d=from_html('<button><div class="flex min-w-0 flex-1 items-center gap-2"><!> <!> <!></div> <!></button>');function SidebarNavigationConversationItem($$anchor,$$props){push$1($$props,!0);let isActive=prop($$props,"isActive",3,!1),depth=prop($$props,"depth",3,0),renderActionsDropdown=state$1(!1),dropdownOpen=state$1(!1),isLoading2=user_derived(()=>getAllLoadingChats().
includes($$props.conversation.id));function handleEdit(event2){event2.stopPropagation(),$$props.onEdit?.($$props.conversation.id)}function handleDelete2(event2){event2.stopPropagation(),$$props.onDelete?.($$props.conversation.id)}function handleStop(event2){event2.stopPropagation(),$$props.onStop?.($$props.conversation.id)}function handleGlobalEditEvent(event2){event2.detail.conversationId===$$props.conversation.id&&isActive()&&handleEdit(event2)}function handleMouseLeave(){get$3(dropdownOpen)||
set$1(renderActionsDropdown,!1)}function handleMouseOver(){set$1(renderActionsDropdown,!0)}function handleSelect(){$$props.onSelect?.($$props.conversation.id)}user_effect(()=>{get$3(dropdownOpen)||set$1(renderActionsDropdown,!1)}),onMount$1(()=>(document.addEventListener("edit-active-conversation",handleGlobalEditEvent),()=>{document.removeEventListener("edit-active-conversation",handleGlobalEditEvent)}));var button=root$d(),div=child(button);let styles2;var node2=child(div);{var consequent=$$anchor2=>{
var fragment=comment$2(),node_1=first_child(fragment);component(node_1,()=>Root$5,($$anchor3,Tooltip_Root)=>{Tooltip_Root($$anchor3,{children:($$anchor4,$$slotProps)=>{var fragment_1=root_2$6(),node_2=first_child(fragment_1);component(node_2,()=>Tooltip_trigger,($$anchor5,Tooltip_Trigger)=>{Tooltip_Trigger($$anchor5,{children:($$anchor6,$$slotProps2)=>{var a=root_3$4(),node_3=child(a);Git_branch(node_3,{class:"h-3.5 w-3.5"}),reset(a),template_effect($0=>set_attribute(a,"href",$0),[()=>RouterService.
chat($$props.conversation.forkedFromConversationId)]),append($$anchor6,a)},$$slots:{default:!0}})});var node_4=sibling(node_2,2);component(node_4,()=>Tooltip_content,($$anchor5,Tooltip_Content)=>{Tooltip_Content($$anchor5,{children:($$anchor6,$$slotProps2)=>{var p2=root_4$2();append($$anchor6,p2)},$$slots:{default:!0}})}),append($$anchor4,fragment_1)},$$slots:{default:!0}})}),append($$anchor2,fragment)};if_block(node2,$$render=>{depth()>0&&$$render(consequent)})}var node_5=sibling(node2,2);{var consequent_1=$$anchor2=>{
var fragment_2=comment$2(),node_6=first_child(fragment_2);component(node_6,()=>Root$5,($$anchor3,Tooltip_Root_1)=>{Tooltip_Root_1($$anchor3,{children:($$anchor4,$$slotProps)=>{var fragment_3=root_6$2(),node_7=first_child(fragment_3);component(node_7,()=>Tooltip_trigger,($$anchor5,Tooltip_Trigger_1)=>{Tooltip_Trigger_1($$anchor5,{children:($$anchor6,$$slotProps2)=>{var div_1=root_7$1(),node_8=child(div_1);Loader_circle(node_8,{class:"loading-icon h-3.5 w-3.5 animate-spin"});var node_9=sibling(node_8,
2);Square(node_9,{class:"stop-icon hidden h-3 w-3 fill-current text-destructive"}),reset(div_1),delegated("click",div_1,handleStop),delegated("keydown",div_1,e=>e.key==="Enter"&&handleStop(e)),append($$anchor6,div_1)},$$slots:{default:!0}})});var node_10=sibling(node_7,2);component(node_10,()=>Tooltip_content,($$anchor5,Tooltip_Content_1)=>{Tooltip_Content_1($$anchor5,{children:($$anchor6,$$slotProps2)=>{var p_1=root_8$2();append($$anchor6,p_1)},$$slots:{default:!0}})}),append($$anchor4,fragment_3)},
$$slots:{default:!0}})}),append($$anchor2,fragment_2)};if_block(node_5,$$render=>{get$3(isLoading2)&&$$render(consequent_1)})}var node_11=sibling(node_5,2);TruncatedText(node_11,{get text(){return $$props.conversation.name},class:"text-sm font-medium",showTooltip:!1}),reset(div);var node_12=sibling(div,2);{var consequent_2=$$anchor2=>{var div_2=root_9$1(),node_13=child(div_2);{let $0=user_derived(()=>[{icon:Pencil,label:"Edit",onclick:handleEdit,shortcut:["shift","cmd","e"]},{icon:Download,label:"\
Export",onclick:e=>{e.stopPropagation(),conversationsStore.downloadConversation($$props.conversation.id)},shortcut:["shift","cmd","s"]},{icon:Trash_2,label:"Delete",onclick:handleDelete2,variant:"destructive",shortcut:["shift","cmd","d"],separator:!0}]);DropdownMenuActions(node_13,{get triggerIcon(){return Ellipsis},triggerTooltip:"More actions",get actions(){return get$3($0)},get open(){return get$3(dropdownOpen)},set open($$value){set$1(dropdownOpen,$$value,!0)}})}reset(div_2),append($$anchor2,
div_2)};if_block(node_12,$$render=>{get$3(renderActionsDropdown)&&$$render(consequent_2)})}reset(button),template_effect(()=>{set_class(button,1,`group flex min-h-9 w-full cursor-pointer items-center justify-between space-x-3 rounded-lg py-1.5 text-left transition-colors hover:bg-foreground/10 ${isActive()?"bg-foreground/5 text-accent-foreground":""} px-3`,"svelte-19ekn76"),styles2=set_style(div,"",styles2,{"padding-left":`${depth()*FORK_TREE_DEPTH_PADDING}px`})}),delegated("click",button,handleSelect),
delegated("mouseover",button,handleMouseOver),event("mouseleave",button,handleMouseLeave),append($$anchor,button),pop()}delegate(["click","mouseover","keydown"]);const SIDEBAR_COOKIE_NAME="sidebar:state",SIDEBAR_COOKIE_MAX_AGE=3600*24*7,SIDEBAR_MIN_WIDTH="18rem",SIDEBAR_MAX_WIDTH="32rem",SIDEBAR_WIDTH_ICON="3rem",SIDEBAR_KEYBOARD_SHORTCUT="b";class SidebarState{props;#open=user_derived(()=>this.props.open());get open(){return get$3(this.#open)}set open(value){set$1(this.#open,value)}#openMobile=state$1(
!1);get openMobile(){return get$3(this.#openMobile)}set openMobile(value){set$1(this.#openMobile,value,!0)}#sidebarWidth=state$1(proxy(SIDEBAR_MIN_WIDTH));get sidebarWidth(){return get$3(this.#sidebarWidth)}set sidebarWidth(value){set$1(this.#sidebarWidth,value,!0)}#isResizing=state$1(!1);get isResizing(){return get$3(this.#isResizing)}set isResizing(value){set$1(this.#isResizing,value,!0)}setOpen;#isMobile;#state=user_derived(()=>this.open?"expanded":"collapsed");get state(){return get$3(this.#state)}set state(value){
set$1(this.#state,value)}constructor(props){this.setOpen=props.setOpen,this.#isMobile=new IsMobile,this.props=props}get isMobile(){return this.#isMobile.current}handleShortcutKeydown=e=>{e.key===SIDEBAR_KEYBOARD_SHORTCUT&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),this.toggle())};setOpenMobile=value=>{this.openMobile=value};toggle=()=>{this.setOpen(!this.open)}}const SYMBOL_KEY="scn-sidebar";function setSidebar(props){return setContext(Symbol.for(SYMBOL_KEY),new SidebarState(props))}function useSidebar(){
return getContext(Symbol.for(SYMBOL_KEY))}var root$c=from_html("<div><!></div>");function Sidebar_group_content($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class","children"]);var div=root$c();attribute_effect(div,$0=>({"data-slot":"sidebar-group-content","data-sidebar":"group-content",class:$0,...restProps}),[()=>cn$1("w-full text-sm",$$props.class)]);var node2=child(div);snippet(node2,()=>$$props.
children??noop$3),reset(div),bind_this(div,$$value=>ref2($$value),()=>ref2()),append($$anchor,div),pop()}var root_2$5=from_html("<div><!></div>");function Sidebar_group_label($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","children","child","class"]);const mergedProps=user_derived(()=>({class:cn$1("text-sidebar-foreground/70 ring-sidebar-ring outline-hidden flex h-8 shrink-0 items-center rounded-md px-\
2 text-xs font-medium transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0","group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0",$$props.class),"data-slot":"sidebar-group-label","data-sidebar":"group-label",...restProps}));var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{var fragment_1=comment$2(),node_1=first_child(fragment_1);snippet(node_1,()=>$$props.child,()=>({props:get$3(mergedProps)})),
append($$anchor2,fragment_1)},alternate=$$anchor2=>{var div=root_2$5();attribute_effect(div,()=>({...get$3(mergedProps)}));var node_2=child(div);snippet(node_2,()=>$$props.children??noop$3),reset(div),bind_this(div,$$value=>ref2($$value),()=>ref2()),append($$anchor2,div)};if_block(node2,$$render=>{$$props.child?$$render(consequent):$$render(alternate,-1)})}append($$anchor,fragment),pop()}var root$b=from_html("<div><!></div>");function Sidebar_group($$anchor,$$props){push$1($$props,!0);let ref2=prop(
$$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class","children"]);var div=root$b();attribute_effect(div,$0=>({"data-slot":"sidebar-group","data-sidebar":"group",class:$0,...restProps}),[()=>cn$1("relative flex w-full min-w-0 flex-col p-2",$$props.class)]);var node2=child(div);snippet(node2,()=>$$props.children??noop$3),reset(div),bind_this(div,$$value=>ref2($$value),()=>ref2()),append($$anchor,div),pop()}var root$a=from_html("<div><!></div>");function Sidebar_header($$anchor,$$props){
push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class","children"]);var div=root$a();attribute_effect(div,$0=>({"data-slot":"sidebar-header","data-sidebar":"header",class:$0,...restProps}),[()=>cn$1("flex flex-col gap-2 p-2",$$props.class)]);var node2=child(div);snippet(node2,()=>$$props.children??noop$3),reset(div),bind_this(div,$$value=>ref2($$value),()=>ref2()),append($$anchor,div),pop()}var root$9=from_html("<main><\
!></main>");function Sidebar_inset($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class","children"]);var main2=root$9();attribute_effect(main2,$0=>({"data-slot":"sidebar-inset",class:$0,...restProps}),[()=>cn$1("relative flex w-full flex-1 flex-col","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:pee\
r-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",$$props.class)]);var node2=child(main2);snippet(node2,()=>$$props.children??noop$3),reset(main2),bind_this(main2,$$value=>ref2($$value),()=>ref2()),append($$anchor,main2),pop()}tv({base:"peer/menu-button outline-hidden ring-sidebar-ring hover:bg-sidebar-accent hover:text-sidebar-accent-foreground active:bg-sidebar-accent active:text-sidebar-accent-foreground group-has-data-[sidebar=menu-action]/menu-item:pr-8 data-[active=true]:bg-sidebar-\
accent data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! flex w-full items-center gap-2 overflow-hidden rounded-md py-2 px-1 text-left text-sm transition-[width,height,padding] focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:font-\
medium [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0",variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background hover:bg-sidebar-accent hover:text-sidebar-accent-foreground shadow-[0_0_0_1px_var(--sidebar-border)] hover:shadow-[0_0_0_1px_var(--sidebar-accent)]"},size:{default:"h-8 text-sm",sm:"h-7 text-xs",lg:"group-data-[collapsible=icon]:p-0! h-12 text-sm"}},defaultVariants:{variant:"default",size:"default"}});var root$8=from_html(
"<li><!></li>");function Sidebar_menu_item($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class","children"]);var li2=root$8();attribute_effect(li2,$0=>({"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",class:$0,...restProps}),[()=>cn$1("group/menu-item relative",$$props.class)]);var node2=child(li2);snippet(node2,()=>$$props.children??noop$3),reset(li2),bind_this(li2,$$value=>ref2($$value),
()=>ref2()),append($$anchor,li2),pop()}var root$7=from_html("<ul><!></ul>");function Sidebar_menu($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","class","children"]);var ul=root$7();attribute_effect(ul,$0=>({"data-slot":"sidebar-menu","data-sidebar":"menu",class:$0,...restProps}),[()=>cn$1("flex w-full min-w-0 flex-col gap-1",$$props.class)]);var node2=child(ul);snippet(node2,()=>$$props.children??noop$3),
reset(ul),bind_this(ul,$$value=>ref2($$value),()=>ref2()),append($$anchor,ul),pop()}var root$6=from_html("<div><!></div>");function Sidebar_provider($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),open2=prop($$props,"open",15,!0),onOpenChange=prop($$props,"onOpenChange",3,()=>{}),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","open","onOpenChange","class","style","children"]);const sidebar=setSidebar({open:()=>open2(),setOpen:value=>{open2(value),onOpenChange()(
value),document.cookie=`${SIDEBAR_COOKIE_NAME}=${open2()}; path=/; max-age=${SIDEBAR_COOKIE_MAX_AGE}`}});var div=root$6();event("keydown",$window,function(...$$args){sidebar.handleShortcutKeydown?.apply(this,$$args)}),attribute_effect(div,$0=>({"data-slot":"sidebar-wrapper",style:`--sidebar-width: ${sidebar.sidebarWidth??""}; --sidebar-min-width: ${SIDEBAR_MIN_WIDTH}; --sidebar-max-width: ${SIDEBAR_MAX_WIDTH}; --sidebar-width-icon: ${SIDEBAR_WIDTH_ICON}; ${$$props.style??""}`,class:$0,...restProps}),
[()=>cn$1("group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar",$$props.class)]);var node2=child(div);snippet(node2,()=>$$props.children??noop$3),reset(div),bind_this(div,$$value=>ref2($$value),()=>ref2()),append($$anchor,div),pop()}var root_1$5=from_html('<!> <span class="sr-only">Toggle Sidebar</span>',1);function Sidebar_trigger($$anchor,$$props){push$1($$props,!0),prop($$props,"ref",11,null);let restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","\
class","onclick"]);const sidebar=useSidebar();{let $0=user_derived(()=>$$props.class),$1=user_derived(()=>sidebar.open?"top-1.5":"top-0"),$2=user_derived(()=>sidebar.isResizing?"!duration-0":"");Button($$anchor,spread_props({"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon-lg",get class(){return`rounded-full backdrop-blur-lg ${get$3($0)??""} ${get$3($1)??""} md:left-[calc(var(--sidebar-width)-3.25rem)] ${get$3($2)??""}`},type:"button",onclick:e=>{$$props.onclick?.(
e),sidebar.toggle()}},()=>restProps,{children:($$anchor2,$$slotProps)=>{var fragment_1=root_1$5(),node2=first_child(fragment_1);{var consequent=$$anchor3=>{Panel_left_close($$anchor3,{})},alternate=$$anchor3=>{Panel_left($$anchor3,{})};if_block(node2,$$render=>{sidebar.open?$$render(consequent):$$render(alternate,-1)})}next$1(2),append($$anchor2,fragment_1)},$$slots:{default:!0}}))}pop()}var root_1$4=from_html("<div><!></div>"),root_3$3=from_html('<div data-slot="sidebar-resize-handle"></div>'),
root_4$1=from_html('<div data-slot="sidebar-resize-handle"></div>'),root_2$4=from_html('<div class="group peer block text-sidebar-foreground" data-slot="sidebar"><div data-slot="sidebar-gap"></div> <div><div data-sidebar="sidebar" data-slot="sidebar-inner" class="flex h-full w-full flex-col bg-sidebar"><!></div> <!></div></div>');function Sidebar($$anchor,$$props){push$1($$props,!0);let ref2=prop($$props,"ref",15,null),side=prop($$props,"side",3,"left"),variant=prop($$props,"variant",3,"sidebar"),
collapsible=prop($$props,"collapsible",3,"offcanvas"),restProps=rest_props($$props,["$$slots","$$events","$$legacy","ref","side","variant","collapsible","class","children"]);const sidebar=useSidebar();function handleResizePointerDown(e){if(sidebar.isMobile)return;e.preventDefault();const target2=e.currentTarget;target2.setPointerCapture(e.pointerId);const minPx=remToPx(SIDEBAR_MIN_WIDTH),maxPx=remToPx(SIDEBAR_MAX_WIDTH);sidebar.isResizing=!0;function onPointerMove(ev){const newWidth=side()==="le\
ft"?ev.clientX:window.innerWidth-ev.clientX,clamped=Math.min(maxPx,Math.max(minPx,newWidth));sidebar.sidebarWidth=`${clamped}px`}function onPointerUp(){sidebar.isResizing=!1,target2.removeEventListener("pointermove",onPointerMove),target2.removeEventListener("pointerup",onPointerUp)}target2.addEventListener("pointermove",onPointerMove),target2.addEventListener("pointerup",onPointerUp)}var fragment=comment$2(),node2=first_child(fragment);{var consequent=$$anchor2=>{var div=root_1$4();attribute_effect(
div,$0=>({class:$0,...restProps}),[()=>cn$1("flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground",$$props.class)]);var node_1=child(div);snippet(node_1,()=>$$props.children??noop$3),reset(div),bind_this(div,$$value=>ref2($$value),()=>ref2()),append($$anchor2,div)},alternate_1=$$anchor2=>{var div_1=root_2$4(),div_2=child(div_1),div_3=sibling(div_2,2);attribute_effect(div_3,$0=>({"data-slot":"sidebar-container",class:$0,style:variant()==="floating"?"height: calc(100dvh - 1.\
5rem);":void 0,...restProps}),[()=>cn$1("fixed inset-y-0 z-[900] flex w-[calc(100dvw-1.5rem)] duration-200 ease-linear md:z-0 md:w-(--sidebar-width)","group-data-[collapsible=offcanvas]:pointer-events-none md:group-data-[collapsible=offcanvas]:pointer-events-auto",sidebar.isResizing&&"!duration-0",variant()==="floating"?["transition-[left,right,width,opacity]",side()==="left"?"left-3 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-0.775)] group-data-[collapsible=offcanvas]:op\
acity-0":"right-3 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-0.775)] group-data-[collapsible=offcanvas]:opacity-0","my-3 overflow-hidden rounded-3xl border border-sidebar-border shadow-md"]:["h-svh transition-[left,right,width]",side()==="left"?"left-0 group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)]":"right-0 group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)]"],variant()==="inset"?"p-2 group-data-[collapsible=icon]:w-[calc(v\
ar(--sidebar-width-icon)+(--spacing(4))+2px)]":variant()==="floating"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)",$$props.class)]);var div_4=child(div_3),node_2=child(div_4);snippet(node_2,()=>$$props.children??noop$3),reset(div_4);var node_3=sibling(div_4,2);{var consequent_1=$$anchor3=>{var div_5=root_3$3();let classes;template_effect(()=>classes=set_class(div_5,1,"absolute inset-y-0 right-0 z-5\
0 hidden w-1.5 cursor-ew-resize touch-none select-none hover:bg-sidebar-border/50 active:bg-sidebar-border md:block",null,classes,{"bg-sidebar-border":sidebar.isResizing})),delegated("pointerdown",div_5,handleResizePointerDown),append($$anchor3,div_5)},alternate=$$anchor3=>{var div_6=root_4$1();let classes_1;template_effect(()=>classes_1=set_class(div_6,1,"absolute inset-y-0 left-0 z-50 hidden w-1.5 cursor-ew-resize touch-none select-none hover:bg-sidebar-border/50 active:bg-sidebar-border md:bl\
ock",null,classes_1,{"bg-sidebar-border":sidebar.isResizing})),delegated("pointerdown",div_6,handleResizePointerDown),append($$anchor3,div_6)};if_block(node_3,$$render=>{side()==="left"?$$render(consequent_1):$$render(alternate,-1)})}reset(div_3),reset(div_1),bind_this(div_1,$$value=>ref2($$value),()=>ref2()),template_effect($0=>{set_attribute(div_1,"data-state",sidebar.state),set_attribute(div_1,"data-collapsible",sidebar.state==="collapsed"?collapsible():""),set_attribute(div_1,"data-variant",
variant()),set_attribute(div_1,"data-side",side()),set_class(div_2,1,$0)},[()=>clsx(cn$1("relative bg-transparent transition-[width] duration-200 ease-linear",sidebar.isResizing&&"!duration-0","w-0",variant()==="floating"?"md:w-[calc(var(--sidebar-width)+0.75rem)]":"md:w-(--sidebar-width)","md:group-data-[collapsible=offcanvas]:w-0","group-data-[side=right]:rotate-180",variant()==="floating"||variant()==="inset"?"group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)\
]":"group-data-[collapsible=icon]:w-(--sidebar-width-icon)"))]),append($$anchor2,div_1)};if_block(node2,$$render=>{collapsible()==="none"?$$render(consequent):$$render(alternate_1,-1)})}append($$anchor,fragment),pop()}delegate(["pointerdown"]);var root_3$2=from_html('<!> <span class="sr-only">Close sidebar</span>',1),root_2$3=from_html('<div class="flex items-center justify-between"><a><h1 class="inline-flex items-center gap-1 px-2 text-xl font-semibold"> </h1></a> <!></div> <!>',1),root_11$1=from_html(
'<div class="px-2 py-4 text-center"><p class="mb-4 p-4 text-sm text-muted-foreground"> </p></div>'),root_8$1=from_html("<!> <!>",1),root_4=from_html("<!> <!>",1),root_1$3=from_html("<!> <!>",1),root_13=from_html('<div class="flex items-center gap-2 py-2"><!> <!></div>'),root$5=from_html('<div class="flex h-full flex-col"><!></div> <!> <!>',1);function SidebarNavigation($$anchor,$$props){push$1($$props,!0);const sidebar=useSidebar();let currentChatId=user_derived(()=>page$1.params.id),isSearchModeActive=state$1(
!1),searchQuery=state$1(""),showDeleteDialog=state$1(!1),deleteWithForks=state$1(!1),showEditDialog=state$1(!1),selectedConversation=state$1(null),editedName=state$1(""),selectedConversationNamePreview=user_derived(()=>get$3(selectedConversation)?getPreviewText(get$3(selectedConversation).name):""),filteredConversations=user_derived(()=>get$3(isSearchModeActive)?get$3(searchQuery).trim().length>0?conversations().filter(conversation=>conversation.name.toLowerCase().includes(get$3(searchQuery).toLowerCase())):
[]:conversations()),conversationTree=user_derived(()=>buildConversationTree(get$3(filteredConversations))),selectedConversationHasDescendants=user_derived(()=>{if(!get$3(selectedConversation))return!1;const allConvs=conversations(),queue=[get$3(selectedConversation).id];for(;queue.length>0;){const parentId=queue.pop();for(const c2 of allConvs)if(c2.forkedFromConversationId===parentId)return!0}return!1});async function handleDeleteConversation(id2){const conversation=conversations().find(conv=>conv.
id===id2);conversation&&(set$1(selectedConversation,conversation,!0),set$1(deleteWithForks,!1),set$1(showDeleteDialog,!0))}async function handleEditConversation(id2){const conversation=conversations().find(conv=>conv.id===id2);conversation&&(set$1(selectedConversation,conversation,!0),set$1(editedName,conversation.name,!0),set$1(showEditDialog,!0))}function handleConfirmDelete(){if(get$3(selectedConversation)){const convId=get$3(selectedConversation).id,withForks=get$3(deleteWithForks);set$1(showDeleteDialog,
!1),setTimeout(()=>{conversationsStore.deleteConversation(convId,{deleteWithForks:withForks})},100)}}function handleConfirmEdit(){!get$3(editedName).trim()||!get$3(selectedConversation)||(set$1(showEditDialog,!1),conversationsStore.updateConversationName(get$3(selectedConversation).id,get$3(editedName)),set$1(selectedConversation,null))}function handleMobileSidebarItemClick(){sidebar.isMobile&&sidebar.toggle()}let chatSidebarActions=state$1(void 0),openedForSearch=state$1(!1);function activateSearchMode(){
sidebar.open||set$1(openedForSearch,!0),get$3(chatSidebarActions)?.activateSearch?.()}function handleSearchDeactivated(){get$3(openedForSearch)&&(set$1(openedForSearch,!1),sidebar.toggle())}user_effect(()=>{sidebar.open||(set$1(isSearchModeActive,!1),set$1(searchQuery,""),set$1(openedForSearch,!1))});function editActiveConversation(){if(get$3(currentChatId)&&get$3(filteredConversations).find(conv=>conv.id===get$3(currentChatId))){const event2=new CustomEvent("edit-active-conversation",{detail:{conversationId:get$3(
currentChatId)}});document.dispatchEvent(event2)}}async function selectConversation(id2){get$3(isSearchModeActive)&&(set$1(isSearchModeActive,!1),set$1(searchQuery,"")),handleMobileSidebarItemClick(),await goto(RouterService.chat(id2))}function handleStopGeneration(id2){chatStore.stopGenerationForChat(id2)}var $$exports={handleMobileSidebarItemClick,activateSearchMode,editActiveConversation},fragment=root$5(),div=first_child(fragment),node2=child(div);Scroll_area(node2,{class:"h-full flex-1",children:($$anchor2,$$slotProps)=>{
var fragment_1=root_1$3(),node_1=first_child(fragment_1);component(node_1,()=>Sidebar_header,($$anchor3,Sidebar_Header)=>{Sidebar_Header($$anchor3,{class:"gap-4 bg-sidebar/50 p-3 backdrop-blur-lg md:pt-4 md:pb-2",children:($$anchor4,$$slotProps2)=>{var fragment_2=root_2$3(),div_1=first_child(fragment_2),a=child(div_1),h1=child(a),text2=child(h1,!0);reset(h1),reset(a);var node_2=sibling(a,2);Button(node_2,{class:"rounded-full md:hidden",variant:"ghost",size:"icon",onclick:()=>sidebar.toggle(),children:($$anchor5,$$slotProps3)=>{
var fragment_3=root_3$2(),node_3=first_child(fragment_3);X(node_3,{class:"h-4 w-4"}),next$1(2),append($$anchor5,fragment_3)},$$slots:{default:!0}}),reset(div_1);var node_4=sibling(div_1,2);bind_this(SidebarNavigationActions(node_4,{handleMobileSidebarItemClick,onSearchDeactivated:handleSearchDeactivated,get isSearchModeActive(){return get$3(isSearchModeActive)},set isSearchModeActive($$value){set$1(isSearchModeActive,$$value,!0)},get searchQuery(){return get$3(searchQuery)},set searchQuery($$value){
set$1(searchQuery,$$value,!0)}}),$$value=>set$1(chatSidebarActions,$$value,!0),()=>get$3(chatSidebarActions)),template_effect(()=>{set_attribute(a,"href",ROUTES.START),set_text(text2,APP_NAME)}),delegated("click",a,handleMobileSidebarItemClick),append($$anchor4,fragment_2)},$$slots:{default:!0}})});var node_5=sibling(node_1,2);component(node_5,()=>Sidebar_group,($$anchor3,Sidebar_Group)=>{Sidebar_Group($$anchor3,{class:"mt-2 h-[calc(100vh-21rem)] space-y-2 p-0 px-3",children:($$anchor4,$$slotProps2)=>{
var fragment_4=root_4(),node_6=first_child(fragment_4);{var consequent=$$anchor5=>{var fragment_5=comment$2(),node_7=first_child(fragment_5);component(node_7,()=>Sidebar_group_label,($$anchor6,Sidebar_GroupLabel)=>{Sidebar_GroupLabel($$anchor6,{children:($$anchor7,$$slotProps3)=>{next$1();var text_1=text$8();template_effect(()=>set_text(text_1,get$3(isSearchModeActive)?"Search results":"Recent conversations")),append($$anchor7,text_1)},$$slots:{default:!0}})}),append($$anchor5,fragment_5)};if_block(
node_6,$$render=>{(get$3(filteredConversations).length>0&&get$3(isSearchModeActive)||!get$3(isSearchModeActive))&&$$render(consequent)})}var node_8=sibling(node_6,2);component(node_8,()=>Sidebar_group_content,($$anchor5,Sidebar_GroupContent)=>{Sidebar_GroupContent($$anchor5,{children:($$anchor6,$$slotProps3)=>{var fragment_7=comment$2(),node_9=first_child(fragment_7);component(node_9,()=>Sidebar_menu,($$anchor7,Sidebar_Menu)=>{Sidebar_Menu($$anchor7,{children:($$anchor8,$$slotProps4)=>{var fragment_8=root_8$1(),
node_10=first_child(fragment_8);each(node_10,17,()=>get$3(conversationTree),({conversation,depth})=>conversation.id,($$anchor9,$$item)=>{let conversation=()=>get$3($$item).conversation,depth=()=>get$3($$item).depth;var fragment_9=comment$2(),node_11=first_child(fragment_9);component(node_11,()=>Sidebar_menu_item,($$anchor10,Sidebar_MenuItem)=>{Sidebar_MenuItem($$anchor10,{class:"mb-1 p-0",children:($$anchor11,$$slotProps5)=>{{let $0=user_derived(()=>({id:conversation().id,name:conversation().name,
lastModified:conversation().lastModified,currNode:conversation().currNode,forkedFromConversationId:conversation().forkedFromConversationId})),$1=user_derived(()=>get$3(currentChatId)===conversation().id);SidebarNavigationConversationItem($$anchor11,{get conversation(){return get$3($0)},get depth(){return depth()},get isActive(){return get$3($1)},onSelect:selectConversation,onEdit:handleEditConversation,onDelete:handleDeleteConversation,onStop:handleStopGeneration})}},$$slots:{default:!0}})}),append(
$$anchor9,fragment_9)});var node_12=sibling(node_10,2);{var consequent_1=$$anchor9=>{var div_2=root_11$1(),p2=child(div_2),text_2=child(p2,!0);reset(p2),reset(div_2),template_effect(()=>set_text(text_2,get$3(searchQuery).length>0?"No results found":get$3(isSearchModeActive)?"Start typing to see results":"No conversations yet")),append($$anchor9,div_2)};if_block(node_12,$$render=>{get$3(conversationTree).length===0&&$$render(consequent_1)})}append($$anchor8,fragment_8)},$$slots:{default:!0}})}),append(
$$anchor6,fragment_7)},$$slots:{default:!0}})}),append($$anchor4,fragment_4)},$$slots:{default:!0}})}),append($$anchor2,fragment_1)},$$slots:{default:!0}}),reset(div);var node_13=sibling(div,2);{let $0=user_derived(()=>get$3(selectedConversation)?`Are you sure you want to delete "${get$3(selectedConversationNamePreview)}"? This action cannot be undone and will permanently remove all messages in this conversation.`:"");DialogConfirmation(node_13,{title:"Delete Conversation",get description(){return get$3(
$0)},confirmText:"Delete",cancelText:"Cancel",variant:"destructive",get icon(){return Trash_2},onConfirm:handleConfirmDelete,onCancel:()=>{set$1(showDeleteDialog,!1),set$1(selectedConversation,null)},get open(){return get$3(showDeleteDialog)},set open($$value){set$1(showDeleteDialog,$$value,!0)},children:($$anchor2,$$slotProps)=>{var fragment_11=comment$2(),node_14=first_child(fragment_11);{var consequent_2=$$anchor3=>{var div_3=root_13(),node_15=child(div_3);Checkbox(node_15,{id:"delete-with-fo\
rks",get checked(){return get$3(deleteWithForks)},set checked($$value){set$1(deleteWithForks,$$value,!0)}});var node_16=sibling(node_15,2);Label(node_16,{for:"delete-with-forks",class:"text-sm",children:($$anchor4,$$slotProps2)=>{next$1();var text_3=text$8("Also delete all forked conversations");append($$anchor4,text_3)},$$slots:{default:!0}}),reset(div_3),append($$anchor3,div_3)};if_block(node_14,$$render=>{get$3(selectedConversationHasDescendants)&&$$render(consequent_2)})}append($$anchor2,fragment_11)},
$$slots:{default:!0}})}var node_17=sibling(node_13,2);return DialogConfirmation(node_17,{title:"Edit Conversation Name",description:"",confirmText:"Save",cancelText:"Cancel",get icon(){return Pencil},onConfirm:handleConfirmEdit,onCancel:()=>{set$1(showEditDialog,!1),set$1(selectedConversation,null)},onKeydown:event2=>{event2.key==="Enter"&&(event2.preventDefault(),event2.stopImmediatePropagation(),handleConfirmEdit())},get open(){return get$3(showEditDialog)},set open($$value){set$1(showEditDialog,
$$value,!0)},children:($$anchor2,$$slotProps)=>{Input($$anchor2,{class:"text-foreground",placeholder:"Enter a new name",type:"text",get value(){return get$3(editedName)},set value($$value){set$1(editedName,$$value,!0)}})},$$slots:{default:!0}}),append($$anchor,fragment),pop($$exports)}delegate(["click"]);var root_2$2=from_html("<!> ",1),root_1$2=from_html("<!> <!>",1),root_6$1=from_html("<!> ",1),root$4=from_html('<div><div class="flex items-center space-x-2"><div></div> <span class="text-sm tex\
t-muted-foreground"> </span></div> <!> <!></div>');function ServerStatus($$anchor,$$props){push$1($$props,!0);let className=prop($$props,"class",3,""),showActions=prop($$props,"showActions",3,!1),error2=user_derived(serverError),loading=user_derived(serverLoading),model=user_derived(singleModelName),serverData=user_derived(serverProps);function getStatusColor(){return get$3(loading)?"bg-yellow-500":get$3(error2)?"bg-red-500":get$3(serverData)?"bg-green-500":"bg-gray-500"}function getStatusText(){
return get$3(loading)?"Connecting...":get$3(error2)?"Connection Error":get$3(serverData)?"Connected":"Unknown"}var div=root$4(),div_1=child(div),div_2=child(div_1),span=sibling(div_2,2),text2=child(span,!0);reset(span),reset(div_1);var node2=sibling(div_1,2);{var consequent_1=$$anchor2=>{var fragment=root_1$2(),node_1=first_child(fragment);Badge(node_1,{variant:"outline",class:"text-xs",children:($$anchor3,$$slotProps)=>{var fragment_1=root_2$2(),node_2=first_child(fragment_1);Server(node_2,{class:"\
mr-1 h-3 w-3"});var text_1=sibling(node_2);template_effect(()=>set_text(text_1,` ${(get$3(model)||"Unknown Model")??""}`)),append($$anchor3,fragment_1)},$$slots:{default:!0}});var node_3=sibling(node_1,2);{var consequent=$$anchor3=>{Badge($$anchor3,{variant:"secondary",class:"text-xs",children:($$anchor4,$$slotProps)=>{next$1();var text_2=text$8();template_effect($0=>set_text(text_2,`ctx: ${$0??""}`),[()=>get$3(serverData).default_generation_settings.n_ctx.toLocaleString()]),append($$anchor4,text_2)},
$$slots:{default:!0}})};if_block(node_3,$$render=>{get$3(serverData)?.default_generation_settings?.n_ctx&&$$render(consequent)})}append($$anchor2,fragment)};if_block(node2,$$render=>{get$3(serverData)&&!get$3(error2)&&$$render(consequent_1)})}var node_4=sibling(node2,2);{var consequent_2=$$anchor2=>{Button($$anchor2,{variant:"outline",size:"sm",class:"text-destructive",children:($$anchor3,$$slotProps)=>{var fragment_5=root_6$1(),node_5=first_child(fragment_5);Triangle_alert(node_5,{class:"h-4 w-\
4"});var text_3=sibling(node_5);template_effect(()=>set_text(text_3,` ${get$3(error2)??""}`)),append($$anchor3,fragment_5)},$$slots:{default:!0}})};if_block(node_4,$$render=>{showActions()&&get$3(error2)&&$$render(consequent_2)})}reset(div),template_effect(($0,$1)=>{set_class(div,1,`flex items-center space-x-3 ${className()??""}`),set_class(div_2,1,`h-2 w-2 rounded-full ${$0??""}`),set_text(text2,$1)},[()=>getStatusColor(),()=>getStatusText()]),append($$anchor,div),pop()}var root_2$1=from_html("\
<!> Enter API Key",1),root_1$1=from_html('<div class="mb-4"><!></div>'),root_5$1=from_html('<div class="absolute top-1/2 right-3 -translate-y-1/2"><!></div>'),root_6=from_html('<div class="absolute top-1/2 right-3 -translate-y-1/2"><!></div>'),root_7=from_html('<div class="absolute top-1/2 right-3 -translate-y-1/2"><!></div>'),root_8=from_html('<p class="text-sm text-destructive"> </p>'),root_9=from_html('<p class="text-sm text-green-600">✓ API key validated successfully! Connecting...</p>'),root_11=from_html(
"<!> Validating...",1),root_3$1=from_html('<div class="mb-4 space-y-3 text-left"><div class="space-y-2"><!> <div class="relative"><!> <!></div> <!> <!></div> <div class="flex gap-2"><!> <!></div></div>'),root_17=from_html("<!> Connecting...",1),root_18=from_html("<!> Retry Connection",1),root_15=from_html("<div><!></div>"),root_19=from_html('<div class="mt-4 text-left"><details class="text-sm"><summary class="cursor-pointer text-muted-foreground hover:text-foreground">Troubleshooting</summary> <\
div class="mt-2 space-y-3 text-xs text-muted-foreground"><div class="space-y-2"><p class="mb-4 font-medium">Start the llama-server:</p> <div class="rounded bg-muted/50 px-2 py-1 font-mono text-xs"><p>llama-server -hf ggml-org/gemma-3-4b-it-GGUF</p></div> <p>or</p> <div class="rounded bg-muted/50 px-2 py-1 font-mono text-xs"><p class="mt-1">llama-server -m locally-stored-model.gguf</p></div></div> <ul class="list-disc space-y-1 pl-4"><li>Check that the server is accessible at the correct URL</li>\
 <li>Verify your network connection</li> <li>Check server logs for any error messages</li></ul></div></details></div>'),root$3=from_html('<div><div class="w-full max-w-md px-4 text-center"><div class="mb-6"><div class="mx-auto mb-4 flex h-16 w-16 items-center justify-center rounded-full bg-destructive/10"><!></div> <h2 class="mb-2 text-xl font-semibold">Server Connection Error</h2> <p class="mb-4 text-sm text-muted-foreground"> </p></div> <!> <!> <!> <!></div></div>');function ServerErrorSplash($$anchor,$$props){
push$1($$props,!0);let className=prop($$props,"class",3,""),showRetry=prop($$props,"showRetry",3,!0),showTroubleshooting=prop($$props,"showTroubleshooting",3,!1),isServerLoading=user_derived(serverLoading),isAccessDeniedError=user_derived(()=>$$props.error.toLowerCase().includes("access denied")||$$props.error.toLowerCase().includes("invalid api key")||$$props.error.toLowerCase().includes("unauthorized")||$$props.error.toLowerCase().includes("401")||$$props.error.toLowerCase().includes("403")),apiKeyInput=state$1(
""),showApiKeyInput=state$1(!1),apiKeyState=state$1("idle"),apiKeyError=state$1("");function handleRetryConnection(){$$props.onRetry?$$props.onRetry():serverStore.fetch()}function handleShowApiKeyInput(){set$1(showApiKeyInput,!0);const currentConfig=config$1();set$1(apiKeyInput,currentConfig.apiKey?.toString()||"",!0)}async function handleSaveApiKey(){if(get$3(apiKeyInput).trim()){set$1(apiKeyState,"validating"),set$1(apiKeyError,"");try{settingsStore.updateConfig(SETTINGS_KEYS.API_KEY,get$3(apiKeyInput).
trim());const response=await fetch(`${base}/props`,{headers:{"Content-Type":"application/json",Authorization:`Bearer ${get$3(apiKeyInput).trim()}`}});response.ok?(set$1(apiKeyState,"success"),setTimeout(()=>{goto(ROUTES.START)},1e3)):(set$1(apiKeyState,"error"),response.status===401||response.status===403?set$1(apiKeyError,"Invalid API key - please check and try again"):set$1(apiKeyError,`Authentication failed (${response.status})`),setTimeout(()=>{set$1(apiKeyState,"idle")},3e3))}catch(error2){
set$1(apiKeyState,"error"),error2 instanceof Error?error2.message.includes("fetch")?set$1(apiKeyError,"Cannot connect to server - check if server is running"):set$1(apiKeyError,error2.message,!0):set$1(apiKeyError,"Connection error - please try again"),setTimeout(()=>{set$1(apiKeyState,"idle")},3e3)}}}function handleApiKeyKeydown(event2){event2.key===KeyboardKey.ENTER&&handleSaveApiKey()}var div=root$3(),div_1=child(div),div_2=child(div_1),div_3=child(div_2),node2=child(div_3);Triangle_alert(node2,
{class:"h-8 w-8 text-destructive"}),reset(div_3);var p2=sibling(div_3,4),text2=child(p2,!0);reset(p2),reset(div_2);var node_1=sibling(div_2,2);{var consequent=$$anchor2=>{var div_4=root_1$1(),node_2=child(div_4);Button(node_2,{onclick:handleShowApiKeyInput,variant:"outline",class:"w-full",children:($$anchor3,$$slotProps)=>{var fragment=root_2$1(),node_3=first_child(fragment);Key(node_3,{class:"h-4 w-4"}),next$1(),append($$anchor3,fragment)},$$slots:{default:!0}}),reset(div_4),transition(1,div_4,
()=>fly,()=>({y:10,duration:300,delay:200})),append($$anchor2,div_4)};if_block(node_1,$$render=>{get$3(isAccessDeniedError)&&!get$3(showApiKeyInput)&&$$render(consequent)})}var node_4=sibling(node_1,2);{var consequent_8=$$anchor2=>{var div_5=root_3$1(),div_6=child(div_5),node_5=child(div_6);Label(node_5,{for:"api-key-input",class:"text-sm font-medium",children:($$anchor3,$$slotProps)=>{next$1();var text_1=text$8("API Key");append($$anchor3,text_1)},$$slots:{default:!0}});var div_7=sibling(node_5,
2),node_6=child(div_7);{let $0=user_derived(()=>get$3(apiKeyState)==="error"?"border-destructive":get$3(apiKeyState)==="success"?"border-green-500":""),$1=user_derived(()=>get$3(apiKeyState)==="validating");Input(node_6,{id:"api-key-input",placeholder:"Enter your API key...",onkeydown:handleApiKeyKeydown,get class(){return`w-full pr-10 ${get$3($0)??""}`},get disabled(){return get$3($1)},get value(){return get$3(apiKeyInput)},set value($$value){set$1(apiKeyInput,$$value,!0)}})}var node_7=sibling(
node_6,2);{var consequent_1=$$anchor3=>{var div_8=root_5$1(),node_8=child(div_8);Refresh_cw(node_8,{class:"h-4 w-4 animate-spin text-muted-foreground"}),reset(div_8),append($$anchor3,div_8)},consequent_2=$$anchor3=>{var div_9=root_6(),node_9=child(div_9);Circle_check_big(node_9,{class:"h-4 w-4 text-green-500"}),reset(div_9),transition(1,div_9,()=>scale,()=>({duration:200,start:.8})),append($$anchor3,div_9)},consequent_3=$$anchor3=>{var div_10=root_7(),node_10=child(div_10);Circle_x(node_10,{class:"\
h-4 w-4 text-destructive"}),reset(div_10),transition(1,div_10,()=>scale,()=>({duration:200,start:.8})),append($$anchor3,div_10)};if_block(node_7,$$render=>{get$3(apiKeyState)==="validating"?$$render(consequent_1):get$3(apiKeyState)==="success"?$$render(consequent_2,1):get$3(apiKeyState)==="error"&&$$render(consequent_3,2)})}reset(div_7);var node_11=sibling(div_7,2);{var consequent_4=$$anchor3=>{var p_1=root_8(),text_2=child(p_1,!0);reset(p_1),template_effect(()=>set_text(text_2,get$3(apiKeyError))),
transition(1,p_1,()=>fly,()=>({y:-10,duration:200})),append($$anchor3,p_1)};if_block(node_11,$$render=>{get$3(apiKeyError)&&$$render(consequent_4)})}var node_12=sibling(node_11,2);{var consequent_5=$$anchor3=>{var p_2=root_9();transition(1,p_2,()=>fly,()=>({y:-10,duration:200})),append($$anchor3,p_2)};if_block(node_12,$$render=>{get$3(apiKeyState)==="success"&&$$render(consequent_5)})}reset(div_6);var div_11=sibling(div_6,2),node_13=child(div_11);{let $0=user_derived(()=>!get$3(apiKeyInput).trim()||
get$3(apiKeyState)==="validating"||get$3(apiKeyState)==="success");Button(node_13,{onclick:handleSaveApiKey,get disabled(){return get$3($0)},class:"flex-1",children:($$anchor3,$$slotProps)=>{var fragment_1=comment$2(),node_14=first_child(fragment_1);{var consequent_6=$$anchor4=>{var fragment_2=root_11(),node_15=first_child(fragment_2);Refresh_cw(node_15,{class:"h-4 w-4 animate-spin"}),next$1(),append($$anchor4,fragment_2)},consequent_7=$$anchor4=>{var text_3=text$8("Success!");append($$anchor4,text_3)},
alternate=$$anchor4=>{var text_4=text$8("Save & Retry");append($$anchor4,text_4)};if_block(node_14,$$render=>{get$3(apiKeyState)==="validating"?$$render(consequent_6):get$3(apiKeyState)==="success"?$$render(consequent_7,1):$$render(alternate,-1)})}append($$anchor3,fragment_1)},$$slots:{default:!0}})}var node_16=sibling(node_13,2);{let $0=user_derived(()=>get$3(apiKeyState)==="validating");Button(node_16,{onclick:()=>{set$1(showApiKeyInput,!1),set$1(apiKeyState,"idle"),set$1(apiKeyError,"")},variant:"\
outline",class:"flex-1",get disabled(){return get$3($0)},children:($$anchor3,$$slotProps)=>{next$1();var text_5=text$8("Cancel");append($$anchor3,text_5)},$$slots:{default:!0}})}reset(div_11),reset(div_5),transition(1,div_5,()=>fly,()=>({y:10,duration:300,delay:200})),append($$anchor2,div_5)};if_block(node_4,$$render=>{get$3(showApiKeyInput)&&$$render(consequent_8)})}var node_17=sibling(node_4,2);{var consequent_10=$$anchor2=>{var div_12=root_15(),node_18=child(div_12);Button(node_18,{onclick:handleRetryConnection,
get disabled(){return get$3(isServerLoading)},class:"w-full",children:($$anchor3,$$slotProps)=>{var fragment_3=comment$2(),node_19=first_child(fragment_3);{var consequent_9=$$anchor4=>{var fragment_4=root_17(),node_20=first_child(fragment_4);Refresh_cw(node_20,{class:"h-4 w-4 animate-spin"}),next$1(),append($$anchor4,fragment_4)},alternate_1=$$anchor4=>{var fragment_5=root_18(),node_21=first_child(fragment_5);Refresh_cw(node_21,{class:"h-4 w-4"}),next$1(),append($$anchor4,fragment_5)};if_block(node_19,
$$render=>{get$3(isServerLoading)?$$render(consequent_9):$$render(alternate_1,-1)})}append($$anchor3,fragment_3)},$$slots:{default:!0}}),reset(div_12),transition(1,div_12,()=>fly,()=>({y:10,duration:300,delay:200})),append($$anchor2,div_12)};if_block(node_17,$$render=>{showRetry()&&$$render(consequent_10)})}var node_22=sibling(node_17,2);{var consequent_11=$$anchor2=>{var div_13=root_19();transition(1,div_13,()=>fly,()=>({y:10,duration:300,delay:400})),append($$anchor2,div_13)};if_block(node_22,
$$render=>{showTroubleshooting()&&$$render(consequent_11)})}reset(div_1),reset(div),template_effect(()=>{set_class(div,1,`flex h-full items-center justify-center ${className()??""}`),set_text(text2,$$props.error)}),transition(1,div_2,()=>fade,()=>({duration:300})),append($$anchor,div),pop()}var root$2=from_html('<div><div class="text-center"><div class="mb-4"><div class="mx-auto mb-4 flex h-16 w-16 items-center justify-center rounded-full bg-muted"><!></div> <h2 class="mb-2 text-xl font-semibold\
">Connecting to Server</h2> <p class="text-sm text-muted-foreground"> </p></div> <div class="mt-4"><!></div></div></div>');function ServerLoadingSplash($$anchor,$$props){let className=prop($$props,"class",3,""),message=prop($$props,"message",3,"Initializing connection to llama.cpp server...");var div=root$2(),div_1=child(div),div_2=child(div_1),div_3=child(div_2),node2=child(div_3);Server(node2,{class:"h-8 w-8 animate-pulse text-muted-foreground"}),reset(div_3);var p2=sibling(div_3,4),text2=child(
p2,!0);reset(p2),reset(div_2);var div_4=sibling(div_2,2),node_1=child(div_4);ServerStatus(node_1,{class:"justify-center"}),reset(div_4),reset(div_1),reset(div),template_effect(()=>{set_class(div,1,`flex h-full items-center justify-center ${className()??""}`),set_text(text2,message())}),transition(1,div_2,()=>fade,()=>({duration:300})),append($$anchor,div)}function useSettingsNavigation(){const subroute=proxy({activePanel:"chat",chatSettingsRef:void 0}),isSettingsRoute=user_derived(()=>!!page$1.route.
id?.startsWith("/settings"));return beforeNavigate(({to,from})=>{to?.route?.id?.startsWith("/settings")&&!from?.route?.id?.startsWith("/settings")&&(settingsReferrer.url=window.location.hash||ROUTES.START)}),user_effect(()=>{subroute.activePanel==="settings"&&subroute.chatSettingsRef&&subroute.chatSettingsRef.reset()}),user_effect(()=>{page$1.url,subroute.activePanel="chat"}),{get panel(){return subroute},get isSettingsRoute(){return get$3(isSettingsRoute)}}}var root_5=from_html("<div><!></div>"),
root_2=from_html('<div class="flex h-screen w-full"><!> <!> <!> <!></div>'),root_1=from_html("<!> <!> <!> <!>",1);function _layout$2($$anchor,$$props){push$1($$props,!0);let alwaysShowSidebarOnDesktop=user_derived(()=>config$1().alwaysShowSidebarOnDesktop),isMobile=new IsMobile,isDesktop=user_derived(()=>!isMobile.current),sidebarOpen=state$1(!1),mounted=state$1(!1),innerHeight=state$1(void 0),chatSidebar=state$1(void 0),titleUpdateDialogOpen=state$1(!1),titleUpdateCurrentTitle=state$1(""),titleUpdateNewTitle=state$1(
""),titleUpdateResolve=null;const panelNav=useSettingsNavigation();function navigateToConversation(direction){const allConvs=conversations();if(allConvs.length===0)return;const currentId=page$1.params.id;if(!currentId){goto(RouterService.chat(allConvs[direction===1?0:allConvs.length-1].id));return}const idx=allConvs.findIndex(c2=>c2.id===currentId);if(idx===-1)return;const targetIdx=idx+direction;targetIdx>=0&&targetIdx<allConvs.length?goto(RouterService.chat(allConvs[targetIdx].id)):goto(ROUTES.
NEW_CHAT)}const{handleKeydown}=useKeyboardShortcuts({editActiveConversation:()=>get$3(chatSidebar)?.editActiveConversation?.(),navigateToPrevConversation:()=>navigateToConversation(-1),navigateToNextConversation:()=>navigateToConversation(1)});function checkApiKey(){const apiKey=config$1().apiKey;if((page$1.route.id==="/(chat)"||page$1.route.id==="/(chat)/chat/[id]")&&page$1.status!==401&&page$1.status!==403){const headers={"Content-Type":"application/json"};apiKey&&apiKey.trim()!==""&&(headers.
Authorization=`Bearer ${apiKey.trim()}`),fetch(`${base}/props`,{headers}).then(response=>{(response.status===401||response.status===403)&&window.location.reload()}).catch(e=>{console.error("Error checking API key:",e)})}}function handleTitleUpdateCancel(){set$1(titleUpdateDialogOpen,!1),titleUpdateResolve&&(titleUpdateResolve(!1),titleUpdateResolve=null)}function handleTitleUpdateConfirm(){set$1(titleUpdateDialogOpen,!1),titleUpdateResolve&&(titleUpdateResolve(!0),titleUpdateResolve=null)}onMount$1(
()=>{set$1(mounted,!0)}),user_effect(()=>{if(get$3(alwaysShowSidebarOnDesktop)&&get$3(isDesktop)){set$1(sidebarOpen,!0);return}}),user_effect(()=>{serverStore.props||untrack$1(()=>{serverStore.fetch()})}),user_effect(()=>{serverStore.props&&settingsStore.syncWithServerDefaults()});let routerModelsFetched=!1;user_effect(()=>{const isRouter=isRouterMode(),modelsCount=modelsStore.models.length;isRouter&&modelsCount>0&&!routerModelsFetched&&(routerModelsFetched=!0,untrack$1(()=>{modelsStore.fetchRouterModels()}))}),
user_effect(()=>{const enabledServers=mcpStore.getServers().filter(s2=>s2.enabled&&s2.url.trim());enabledServers.length>0&&untrack$1(()=>{mcpStore.runHealthChecksForServers(enabledServers,!1).catch(error2=>{console.warn("[layout] MCP health checks failed:",error2)})})}),user_effect(()=>{checkApiKey()}),user_effect(()=>{conversationsStore.setTitleUpdateConfirmationCallback(async(currentTitle,newTitle)=>new Promise(resolve2=>{set$1(titleUpdateCurrentTitle,currentTitle,!0),set$1(titleUpdateNewTitle,
newTitle,!0),titleUpdateResolve=resolve2,set$1(titleUpdateDialogOpen,!0)}))});var fragment=comment$2();event("keydown",$window,handleKeydown);var node2=first_child(fragment);component(node2,()=>Provider,($$anchor2,Tooltip_Provider)=>{Tooltip_Provider($$anchor2,{get delayDuration(){return TOOLTIP_DELAY_DURATION},children:($$anchor3,$$slotProps)=>{var fragment_1=root_1(),node_1=first_child(fragment_1);Mode_watcher(node_1,{});var node_2=sibling(node_1,2);Toaster(node_2,{richColors:!0});var node_3=sibling(
node_2,2);DialogConversationTitleUpdate(node_3,{get currentTitle(){return get$3(titleUpdateCurrentTitle)},get newTitle(){return get$3(titleUpdateNewTitle)},onConfirm:handleTitleUpdateConfirm,onCancel:handleTitleUpdateCancel,get open(){return get$3(titleUpdateDialogOpen)},set open($$value){set$1(titleUpdateDialogOpen,$$value,!0)}});var node_4=sibling(node_3,2);component(node_4,()=>Sidebar_provider,($$anchor4,Sidebar_Provider)=>{Sidebar_Provider($$anchor4,{get open(){return get$3(sidebarOpen)},set open($$value){
set$1(sidebarOpen,$$value,!0)},children:($$anchor5,$$slotProps2)=>{var div=root_2();let styles2;var node_5=child(div);component(node_5,()=>Sidebar,($$anchor6,Sidebar_Root)=>{Sidebar_Root($$anchor6,{variant:"floating",class:"h-full",children:($$anchor7,$$slotProps3)=>{bind_this(SidebarNavigation($$anchor7,{}),$$value=>set$1(chatSidebar,$$value,!0),()=>get$3(chatSidebar))},$$slots:{default:!0}})});var node_6=sibling(node_5,2);{var consequent_1=$$anchor6=>{var fragment_3=comment$2(),node_7=first_child(
fragment_3);{var consequent=$$anchor7=>{var div_1=root_5(),node_8=child(div_1);{let $0=user_derived(()=>get$3(sidebarOpen)?"left-[calc(var(--sidebar-width)+0.75rem)] max-md:hidden":"left-0!");component(node_8,()=>Sidebar_trigger,($$anchor8,Sidebar_Trigger)=>{Sidebar_Trigger($$anchor8,{get class(){return`transition-left absolute left-0 z-[900] duration-200 ease-linear ${get$3($0)??""}`},style:"translate: 1rem 1rem;"})})}reset(div_1),transition(1,div_1,()=>fade,()=>({duration:200})),append($$anchor7,
div_1)};if_block(node_7,$$render=>{get$3(mounted)&&$$render(consequent)})}append($$anchor6,fragment_3)};if_block(node_6,$$render=>{!(get$3(alwaysShowSidebarOnDesktop)&&get$3(isDesktop))&&!(panelNav.isSettingsRoute&&!get$3(isDesktop))&&$$render(consequent_1)})}var node_9=sibling(node_6,2);{var consequent_2=$$anchor6=>{DesktopIconStrip($$anchor6,{get sidebarOpen(){return get$3(sidebarOpen)},onSearchClick:()=>{get$3(chatSidebar)?.activateSearchMode&&get$3(chatSidebar).activateSearchMode(),set$1(sidebarOpen,
!0)}})};if_block(node_9,$$render=>{get$3(isDesktop)&&!get$3(alwaysShowSidebarOnDesktop)&&$$render(consequent_2)})}var node_10=sibling(node_9,2);component(node_10,()=>Sidebar_inset,($$anchor6,Sidebar_Inset)=>{Sidebar_Inset($$anchor6,{class:"flex flex-1 flex-col overflow-hidden",children:($$anchor7,$$slotProps3)=>{var fragment_5=comment$2(),node_11=first_child(fragment_5);snippet(node_11,()=>$$props.children??noop$3),append($$anchor7,fragment_5)},$$slots:{default:!0}})}),reset(div),template_effect(
()=>styles2=set_style(div,"",styles2,{height:`${get$3(innerHeight)??""}px`})),append($$anchor5,div)},$$slots:{default:!0}})}),append($$anchor3,fragment_1)},$$slots:{default:!0}})}),bind_window_size("innerHeight",$$value=>set$1(innerHeight,$$value,!0)),append($$anchor,fragment),pop()}const _0=Object.freeze(Object.defineProperty({__proto__:null,component:_layout$2},Symbol.toStringTag,{value:"Module"})),getStores=()=>{const stores$1=stores;return{page:{subscribe:stores$1.page.subscribe},navigating:{
subscribe:stores$1.navigating.subscribe},updated:stores$1.updated}},page={subscribe(fn){return getStores().page.subscribe(fn)}};var root_3=from_html('<div class="flex h-full items-center justify-center"><div class="w-full max-w-md px-4 text-center"><div class="mb-6"><div class="mx-auto mb-4 flex h-16 w-16 items-center justify-center rounded-full bg-destructive/10"><svg class="h-8 w-8 text-destructive" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linej\
oin="round" stroke-width="2" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-2.5L13.732 4c-.77-.833-1.964-.833-2.732 0L3.732 16.5c-.77.833.192 2.5 1.732 2.5z"></path></svg></div> <h1 class="mb-2 text-2xl font-bold"> </h1> <p class="text-muted-foreground"> </p></div> <button class="rounded-md bg-primary px-4 py-2 text-primary-foreground hover:bg-primary/90">Go Home</button></div></div>');function _error($$anchor,$$props){push$1($$props,!0);const $page=()=>store_get(page,"$page",$$stores),
[$$stores,$$cleanup]=setup_stores();let error2=user_derived(()=>$page().error),status=user_derived(()=>$page().status),isApiKeyError=user_derived(()=>get$3(status)===401||get$3(status)===403||get$3(error2)?.message?.toLowerCase().includes("access denied")||get$3(error2)?.message?.toLowerCase().includes("unauthorized")||get$3(error2)?.message?.toLowerCase().includes("invalid api key"));function handleRetry(){goto(ROUTES.START)}var fragment=comment$2();head$1("1j96wlh",$$anchor2=>{deferred_template_effect(
()=>{$document.title=`Error ${get$3(status)??""} - WebUI`})});var node2=first_child(fragment);{var consequent=$$anchor2=>{{let $0=user_derived(()=>get$3(error2)?.message||"Access denied - check server permissions");ServerErrorSplash($$anchor2,{get error(){return get$3($0)},onRetry:handleRetry,showRetry:!1,showTroubleshooting:!1})}},alternate=$$anchor2=>{var div=root_3(),div_1=child(div),div_2=child(div_1),h1=sibling(child(div_2),2),text2=child(h1);reset(h1);var p2=sibling(h1,2),text_1=child(p2,!0);
reset(p2),reset(div_2);var button=sibling(div_2,2);reset(div_1),reset(div),template_effect(()=>{set_text(text2,`Error ${get$3(status)??""}`),set_text(text_1,get$3(error2)?.message||"Something went wrong")}),delegated("click",button,()=>goto(ROUTES.START)),append($$anchor2,div)};if_block(node2,$$render=>{get$3(isApiKeyError)?$$render(consequent):$$render(alternate,-1)})}append($$anchor,fragment),pop(),$$cleanup()}delegate(["click"]);const _1=Object.freeze(Object.defineProperty({__proto__:null,component:_error},
Symbol.toStringTag,{value:"Module"}));var root$1=from_html("<!> <!>",1);function _layout$1($$anchor,$$props){push$1($$props,!0);let showCenteredEmpty=user_derived(()=>!page$1.params.id);var fragment=root$1(),node2=first_child(fragment);ChatScreen(node2,{get showCenteredEmpty(){return get$3(showCenteredEmpty)}});var node_1=sibling(node2,2);snippet(node_1,()=>$$props.children??noop$3),append($$anchor,fragment),pop()}const _2=Object.freeze(Object.defineProperty({__proto__:null,component:_layout$1},
Symbol.toStringTag,{value:"Module"}));var root=from_html('<div class="relative h-full"><div class="fixed top-4.5 right-4 z-50 md:hidden"><!></div> <div class="min-h-full"><!></div></div>');function _layout($$anchor,$$props){push$1($$props,!0);let previousRouteId=state$1(null);user_effect(()=>{const currentId=page$1.route.id;return()=>{set$1(previousRouteId,currentId,!0)}});function handleClose(){const prevIsSettings=get$3(previousRouteId)?.startsWith("/settings");window.history.length>1&&!prevIsSettings?
history.back():goto(SETTINGS_FALLBACK_EXIT_ROUTE)}var div=root(),div_1=child(div),node2=child(div_1);ActionIcon(node2,{get icon(){return X},tooltip:"Close",onclick:handleClose}),reset(div_1);var div_2=sibling(div_1,2),node_1=child(div_2);snippet(node_1,()=>$$props.children??noop$3),reset(div_2),reset(div),append($$anchor,div),pop()}const _3=Object.freeze(Object.defineProperty({__proto__:null,component:_layout},Symbol.toStringTag,{value:"Module"})),load$1=async({fetch:fetch2})=>{await validateApiKey(
fetch2)},_page$5=Object.freeze(Object.defineProperty({__proto__:null,load:load$1},Symbol.toStringTag,{value:"Module"}));function _page$4($$anchor,$$props){push$1($$props,!0);let qParam=user_derived(()=>page$1.url.searchParams.get("q")),modelParam=user_derived(()=>page$1.url.searchParams.get("model")),newChatParam=user_derived(()=>page$1.url.searchParams.get(NEW_CHAT_PARAM)),showModelNotAvailable=state$1(!1),requestedModelName=state$1(""),availableModelNames=user_derived(()=>modelOptions().map(m=>m.
model));function clearUrlParams(){const url2=new URL(page$1.url);url2.searchParams.delete("q"),url2.searchParams.delete("model"),url2.searchParams.delete(NEW_CHAT_PARAM),replaceState(url2.toString(),{})}async function handleUrlParams(){if(await modelsStore.fetch(),get$3(modelParam)){const model=modelsStore.findModelByName(get$3(modelParam));if(model)try{await modelsStore.selectModelById(model.id)}catch(error2){console.error("Failed to select model:",error2),set$1(requestedModelName,get$3(modelParam),
!0),set$1(showModelNotAvailable,!0);return}else{set$1(requestedModelName,get$3(modelParam),!0),set$1(showModelNotAvailable,!0);return}}get$3(qParam)!==null?(await conversationsStore.createConversation(),clearUrlParams()):(get$3(modelParam)||get$3(newChatParam)==="true")&&clearUrlParams()}onMount$1(async()=>{if(isConversationsInitialized()||await conversationsStore.initialize(),conversationsStore.clearActiveConversation(),chatStore.clearUIState(),isRouterMode()&&modelsStore.selectedModelName&&!modelsStore.
isModelLoaded(modelsStore.selectedModelName)){modelsStore.clearSelection();const first=modelOptions().find(m=>modelsStore.loadedModelIds.includes(m.model));first&&await modelsStore.selectModelById(first.id)}(get$3(qParam)!==null||get$3(modelParam)!==null||get$3(newChatParam)==="true")&&await handleUrlParams()}),head$1("ku01nm",$$anchor2=>{deferred_template_effect(()=>{$document.title=APP_NAME})}),DialogModelNotAvailable($$anchor,{get modelName(){return get$3(requestedModelName)},get availableModels(){
return get$3(availableModelNames)},get open(){return get$3(showModelNotAvailable)},set open($$value){set$1(showModelNotAvailable,$$value,!0)}}),pop()}const _4=Object.freeze(Object.defineProperty({__proto__:null,component:_page$4,universal:_page$5},Symbol.toStringTag,{value:"Module"})),load=async({fetch:fetch2})=>{await validateApiKey(fetch2)},_page$3=Object.freeze(Object.defineProperty({__proto__:null,load},Symbol.toStringTag,{value:"Module"}));function _page$2($$anchor,$$props){push$1($$props,!0);
let chatId=user_derived(()=>page$1.params.id),currentChatId,qParam=user_derived(()=>page$1.url.searchParams.get("q")),modelParam=user_derived(()=>page$1.url.searchParams.get("model")),showModelNotAvailable=state$1(!1),requestedModelName=state$1(""),availableModelNames=user_derived(()=>modelOptions().map(m=>m.model)),urlParamsProcessed=state$1(!1);function clearUrlParams(){const url2=new URL(page$1.url);url2.searchParams.delete("q"),url2.searchParams.delete("model"),replaceState(url2.toString(),{})}
async function handleUrlParams(){if(await modelsStore.fetch(),get$3(modelParam)){const model=modelsStore.findModelByName(get$3(modelParam));if(model)try{await modelsStore.selectModelById(model.id)}catch(error2){console.error("Failed to select model:",error2),set$1(requestedModelName,get$3(modelParam),!0),set$1(showModelNotAvailable,!0);return}else{set$1(requestedModelName,get$3(modelParam),!0),set$1(showModelNotAvailable,!0);return}}get$3(qParam)!==null?(await chatStore.sendMessage(get$3(qParam)),
clearUrlParams()):get$3(modelParam)&&clearUrlParams(),set$1(urlParamsProcessed,!0)}afterNavigate(()=>{setTimeout(()=>{modelsStore.selectModelFromLastAssistantResponse()},100)}),user_effect(()=>{if(get$3(chatId)&&get$3(chatId)!==currentChatId){if(currentChatId=get$3(chatId),set$1(urlParamsProcessed,!1),activeConversation()?.id===get$3(chatId)){(get$3(qParam)!==null||get$3(modelParam)!==null)&&!get$3(urlParamsProcessed)&&handleUrlParams();return}(async()=>await conversationsStore.loadConversation(
get$3(chatId))?(chatStore.syncLoadingStateForChat(get$3(chatId)),(get$3(qParam)!==null||get$3(modelParam)!==null)&&!get$3(urlParamsProcessed)&&await handleUrlParams()):await goto(ROUTES.START))()}}),user_effect(()=>{if(typeof window<"u"){const handleBeforeUnload=()=>{isLoading()&&(console.log("Page unload detected while streaming - aborting stream"),chatStore.stopGeneration())};return window.addEventListener("beforeunload",handleBeforeUnload),()=>{window.removeEventListener("beforeunload",handleBeforeUnload)}}}),
head$1("jib4ir",$$anchor2=>{deferred_template_effect($0=>{$document.title=`${$0??""} - llama.cpp`},[()=>activeConversation()?.name||"Chat"])}),DialogModelNotAvailable($$anchor,{get modelName(){return get$3(requestedModelName)},get availableModels(){return get$3(availableModelNames)},get open(){return get$3(showModelNotAvailable)},set open($$value){set$1(showModelNotAvailable,$$value,!0)}}),pop()}const _5=Object.freeze(Object.defineProperty({__proto__:null,component:_page$2,universal:_page$3},Symbol.
toStringTag,{value:"Module"}));function _page$1($$anchor){SettingsMcpServers($$anchor,{class:"mx-auto w-full p-4 md:p-8 md:py-8"})}const _6=Object.freeze(Object.defineProperty({__proto__:null,component:_page$1},Symbol.toStringTag,{value:"Module"}));function _page($$anchor,$$props){push$1($$props,!1),onMount$1(()=>{page$1.params.section||replaceState(RouterService.settings(SETTINGS_SECTION_SLUGS.GENERAL),{})}),init(),SettingsChat($$anchor,{get initialSection(){return page$1.params.section}}),pop()}
const _7=Object.freeze(Object.defineProperty({__proto__:null,component:_page},Symbol.toStringTag,{value:"Module"})),pdf_worker_min='/**\n * @licstart The following is the entire license notice for the\n * JavaScript code in this page\n *\n * Copyright 2024 Mozilla Foundation\n *\n * Licensed under the Apache License, Version 2.0 (the "License");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n *     http://www.apache.org/licenses/LICENS\
E-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an "AS IS" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n *\n * @licend The above is the entire license notice for the\n * JavaScript code in this page\n */\n/**\n * pdfjsVersion = 5.4.54\n * pdfjsBuild = 295fb3ec4\n */\nconst e=!("obj\
ect"!=typeof process||process+""!="[object process]"||process.versions.nw||process.versions.electron&&process.type&&"browser"!==process.type),t=[.001,0,0,.001,0,0],a=1.35,r=.35,i=.25925925925925924,n=1,s=2,o=4,c=8,l=16,h=64,u=128,d=256,f="pdfjs_internal_editor_",g=3,p=9,m=13,b=15,y=101,w={PRINT:4,MODIFY_CONTENTS:8,COPY:16,MODIFY_ANNOTATIONS:32,FILL_INTERACTIVE_FORMS:256,COPY_FOR_ACCESSIBILITY:512,ASSEMBLE:1024,PRINT_HIGH_QUALITY:2048},x=0,S=4,k=1,C=2,v=3,F=1,T=2,O=3,M=4,D=5,R=6,N=7,E=8,L=9,j=10,\
_=11,U=12,X=13,q=14,H=15,W=16,z=17,$=20,G="Group",V="R",K=1,J=2,Y=4,Z=16,Q=32,ee=128,te=512,ae=1,re=2,ie=4096,ne=8192,se=32768,oe=65536,ce=131072,le=1048576,he=2097152,ue=8388608,de=16777216,fe=1,ge=2,pe=3,me=4,be=5,ye={E:"Mouse Enter",X:"Mouse Exit",D:"Mouse Down",U:"Mouse Up",Fo:"Focus",Bl:"Blur",PO:"PageOpen",PC:"PageClose",PV:"PageVisible",PI:"PageInvisible",K:"Keystroke",F:"Format",V:"Validate",C:"Calculate"},we={WC:"WillClose",WS:"WillSave",DS:"DidSave",WP:"WillPrint",DP:"DidPrint"},xe={O:\
"PageOpen",C:"PageClose"},Se=1,Ae=5,ke=1,Ce=2,ve=3,Fe=4,Ie=5,Te=6,Oe=7,Me=8,De=9,Be=10,Re=11,Ne=12,Ee=13,Pe=14,Le=15,je=16,_e=17,Ue=18,Xe=19,qe=20,He=21,We=22,ze=23,$e=24,Ge=25,Ve=26,Ke=27,Je=28,Ye=29,Ze=30,Qe=31,et=32,tt=33,at=34,rt=35,it=36,nt=37,st=38,ot=39,ct=40,lt=41,ht=42,ut=43,dt=44,ft=45,gt=46,pt=47,mt=48,bt=49,yt=50,wt=51,xt=52,St=53,At=54,kt=55,Ct=56,vt=57,Ft=58,It=59,Tt=60,Ot=61,Mt=62,Dt=63,Bt=64,Rt=65,Nt=66,Et=67,Pt=68,Lt=69,jt=70,_t=71,Ut=72,Xt=73,qt=74,Ht=75,Wt=76,zt=77,$t=80,Gt=81\
,Vt=83,Kt=84,Jt=85,Yt=86,Zt=87,Qt=88,ea=89,ta=90,aa=91,ra=92,ia=93,na=94,sa=0,oa=1,ca=2,la=3,ha=1,ua=2;let da=Se;function getVerbosityLevel(){return da}function info(e){da>=Ae&&console.log(`Info: ${e}`)}function warn(e){da>=Se&&console.log(`Warning: ${e}`)}function unreachable(e){throw new Error(e)}function assert(e,t){e||unreachable(t)}function createValidAbsoluteUrl(e,t=null,a=null){if(!e)return null;if(a&&"string"==typeof e){if(a.addDefaultProtocol&&e.startsWith("www.")){const t=e.match(/\\./g\
);t?.length>=2&&(e=`http://${e}`)}if(a.tryConvertEncoding)try{e=stringToUTF8String(e)}catch{}}const r=t?URL.parse(e,t):URL.parse(e);return function _isValidProtocol(e){switch(e?.protocol){case"http:":case"https:":case"ftp:":case"mailto:":case"tel:":return!0;default:return!1}}(r)?r:null}function shadow(e,t,a,r=!1){Object.defineProperty(e,t,{value:a,enumerable:!r,configurable:!0,writable:!1});return a}const fa=function BaseExceptionClosure(){function BaseException(e,t){this.message=e;this.name=t}B\
aseException.prototype=new Error;BaseException.constructor=BaseException;return BaseException}();class PasswordException extends fa{constructor(e,t){super(e,"PasswordException");this.code=t}}class UnknownErrorException extends fa{constructor(e,t){super(e,"UnknownErrorException");this.details=t}}class InvalidPDFException extends fa{constructor(e){super(e,"InvalidPDFException")}}class ResponseException extends fa{constructor(e,t,a){super(e,"ResponseException");this.status=t;this.missing=a}}class F\
ormatError extends fa{constructor(e){super(e,"FormatError")}}class AbortException extends fa{constructor(e){super(e,"AbortException")}}function bytesToString(e){"object"==typeof e&&void 0!==e?.length||unreachable("Invalid argument for bytesToString");const t=e.length,a=8192;if(t<a)return String.fromCharCode.apply(null,e);const r=[];for(let i=0;i<t;i+=a){const n=Math.min(i+a,t),s=e.subarray(i,n);r.push(String.fromCharCode.apply(null,s))}return r.join("")}function stringToBytes(e){"string"!=typeof\
 e&&unreachable("Invalid argument for stringToBytes");const t=e.length,a=new Uint8Array(t);for(let r=0;r<t;++r)a[r]=255&e.charCodeAt(r);return a}function string32(e){return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e)}function objectSize(e){return Object.keys(e).length}class FeatureTest{static get isLittleEndian(){return shadow(this,"isLittleEndian",function isLittleEndian(){const e=new Uint8Array(4);e[0]=1;return 1===new Uint32Array(e.buffer,0,1)[0]}())}static get isEvalSupported(){r\
eturn shadow(this,"isEvalSupported",function isEvalSupported(){try{new Function("");return!0}catch{return!1}}())}static get isOffscreenCanvasSupported(){return shadow(this,"isOffscreenCanvasSupported","undefined"!=typeof OffscreenCanvas)}static get isImageDecoderSupported(){return shadow(this,"isImageDecoderSupported","undefined"!=typeof ImageDecoder)}static get platform(){const{platform:e,userAgent:t}=navigator;return shadow(this,"platform",{isAndroid:t.includes("Android"),isLinux:e.includes("L\
inux"),isMac:e.includes("Mac"),isWindows:e.includes("Win"),isFirefox:t.includes("Firefox")})}static get isCSSRoundSupported(){return shadow(this,"isCSSRoundSupported",globalThis.CSS?.supports?.("width: round(1.5px, 1px)"))}}const ga=Array.from(Array(256).keys(),(e=>e.toString(16).padStart(2,"0")));class Util{static makeHexColor(e,t,a){return`#${ga[e]}${ga[t]}${ga[a]}`}static scaleMinMax(e,t){let a;if(e[0]){if(e[0]<0){a=t[0];t[0]=t[2];t[2]=a}t[0]*=e[0];t[2]*=e[0];if(e[3]<0){a=t[1];t[1]=t[3];t[3]=\
a}t[1]*=e[3];t[3]*=e[3]}else{a=t[0];t[0]=t[1];t[1]=a;a=t[2];t[2]=t[3];t[3]=a;if(e[1]<0){a=t[1];t[1]=t[3];t[3]=a}t[1]*=e[1];t[3]*=e[1];if(e[2]<0){a=t[0];t[0]=t[2];t[2]=a}t[0]*=e[2];t[2]*=e[2]}t[0]+=e[4];t[1]+=e[5];t[2]+=e[4];t[3]+=e[5]}static transform(e,t){return[e[0]*t[0]+e[2]*t[1],e[1]*t[0]+e[3]*t[1],e[0]*t[2]+e[2]*t[3],e[1]*t[2]+e[3]*t[3],e[0]*t[4]+e[2]*t[5]+e[4],e[1]*t[4]+e[3]*t[5]+e[5]]}static applyTransform(e,t,a=0){const r=e[a],i=e[a+1];e[a]=r*t[0]+i*t[2]+t[4];e[a+1]=r*t[1]+i*t[3]+t[5]}st\
atic applyTransformToBezier(e,t,a=0){const r=t[0],i=t[1],n=t[2],s=t[3],o=t[4],c=t[5];for(let t=0;t<6;t+=2){const l=e[a+t],h=e[a+t+1];e[a+t]=l*r+h*n+o;e[a+t+1]=l*i+h*s+c}}static applyInverseTransform(e,t){const a=e[0],r=e[1],i=t[0]*t[3]-t[1]*t[2];e[0]=(a*t[3]-r*t[2]+t[2]*t[5]-t[4]*t[3])/i;e[1]=(-a*t[1]+r*t[0]+t[4]*t[1]-t[5]*t[0])/i}static axialAlignedBoundingBox(e,t,a){const r=t[0],i=t[1],n=t[2],s=t[3],o=t[4],c=t[5],l=e[0],h=e[1],u=e[2],d=e[3];let f=r*l+o,g=f,p=r*u+o,m=p,b=s*h+c,y=b,w=s*d+c,x=w;i\
f(0!==i||0!==n){const e=i*l,t=i*u,a=n*h,r=n*d;f+=a;m+=a;p+=r;g+=r;b+=e;x+=e;w+=t;y+=t}a[0]=Math.min(a[0],f,p,g,m);a[1]=Math.min(a[1],b,w,y,x);a[2]=Math.max(a[2],f,p,g,m);a[3]=Math.max(a[3],b,w,y,x)}static inverseTransform(e){const t=e[0]*e[3]-e[1]*e[2];return[e[3]/t,-e[1]/t,-e[2]/t,e[0]/t,(e[2]*e[5]-e[4]*e[3])/t,(e[4]*e[1]-e[5]*e[0])/t]}static singularValueDecompose2dScale(e,t){const a=e[0],r=e[1],i=e[2],n=e[3],s=a**2+r**2,o=a*i+r*n,c=i**2+n**2,l=(s+c)/2,h=Math.sqrt(l**2-(s*c-o**2));t[0]=Math.sq\
rt(l+h||1);t[1]=Math.sqrt(l-h||1)}static normalizeRect(e){const t=e.slice(0);if(e[0]>e[2]){t[0]=e[2];t[2]=e[0]}if(e[1]>e[3]){t[1]=e[3];t[3]=e[1]}return t}static intersect(e,t){const a=Math.max(Math.min(e[0],e[2]),Math.min(t[0],t[2])),r=Math.min(Math.max(e[0],e[2]),Math.max(t[0],t[2]));if(a>r)return null;const i=Math.max(Math.min(e[1],e[3]),Math.min(t[1],t[3])),n=Math.min(Math.max(e[1],e[3]),Math.max(t[1],t[3]));return i>n?null:[a,i,r,n]}static pointBoundingBox(e,t,a){a[0]=Math.min(a[0],e);a[1]=M\
ath.min(a[1],t);a[2]=Math.max(a[2],e);a[3]=Math.max(a[3],t)}static rectBoundingBox(e,t,a,r,i){i[0]=Math.min(i[0],e,a);i[1]=Math.min(i[1],t,r);i[2]=Math.max(i[2],e,a);i[3]=Math.max(i[3],t,r)}static#e(e,t,a,r,i,n,s,o,c,l){if(c<=0||c>=1)return;const h=1-c,u=c*c,d=u*c,f=h*(h*(h*e+3*c*t)+3*u*a)+d*r,g=h*(h*(h*i+3*c*n)+3*u*s)+d*o;l[0]=Math.min(l[0],f);l[1]=Math.min(l[1],g);l[2]=Math.max(l[2],f);l[3]=Math.max(l[3],g)}static#t(e,t,a,r,i,n,s,o,c,l,h,u){if(Math.abs(c)<1e-12){Math.abs(l)>=1e-12&&this.#e(e,t\
,a,r,i,n,s,o,-h/l,u);return}const d=l**2-4*h*c;if(d<0)return;const f=Math.sqrt(d),g=2*c;this.#e(e,t,a,r,i,n,s,o,(-l+f)/g,u);this.#e(e,t,a,r,i,n,s,o,(-l-f)/g,u)}static bezierBoundingBox(e,t,a,r,i,n,s,o,c){c[0]=Math.min(c[0],e,s);c[1]=Math.min(c[1],t,o);c[2]=Math.max(c[2],e,s);c[3]=Math.max(c[3],t,o);this.#t(e,a,i,s,t,r,n,o,3*(3*(a-i)-e+s),6*(e-2*a+i),3*(a-e),c);this.#t(e,a,i,s,t,r,n,o,3*(3*(r-n)-t+o),6*(t-2*r+n),3*(r-t),c)}}const pa=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,728,711,710,729\
,733,731,730,732,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,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,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,8226,8224,8225,8230,8212,8211,402,8260,8249,8250,8722,8240,8222,8220,8221,8216,8217,8218,8482,64257,64258,321,338,352,376,381,305,322,339,353,382,0,8364];function stringToPDFString(e,t=!1){if(e[0]>="ï"){let a;if("þ"===e[0]&&"ÿ"===e[1]){a="utf-16be";e.length%2==1&&(e=e.slice(0,-1))}else if("\
ÿ"===e[0]&&"þ"===e[1]){a="utf-16le";e.length%2==1&&(e=e.slice(0,-1))}else"ï"===e[0]&&"»"===e[1]&&"¿"===e[2]&&(a="utf-8");if(a)try{const r=new TextDecoder(a,{fatal:!0}),i=stringToBytes(e),n=r.decode(i);return t||!n.includes("\x1B")?n:n.replaceAll(/\\x1b[^\\x1b]*(?:\\x1b|$)/g,"")}catch(e){warn(`stringToPDFString: "${e}".`)}}const a=[];for(let r=0,i=e.length;r<i;r++){const n=e.charCodeAt(r);if(!t&&27===n){for(;++r<i&&27!==e.charCodeAt(r););continue}const s=pa[n];a.push(s?String.fromCharCode(s):e.charAt(r\
))}return a.join("")}function stringToUTF8String(e){return decodeURIComponent(escape(e))}function utf8StringToString(e){return unescape(encodeURIComponent(e))}function isArrayEqual(e,t){if(e.length!==t.length)return!1;for(let a=0,r=e.length;a<r;a++)if(e[a]!==t[a])return!1;return!0}function getModificationDate(e=new Date){e instanceof Date||(e=new Date(e));return[e.getUTCFullYear().toString(),(e.getUTCMonth()+1).toString().padStart(2,"0"),e.getUTCDate().toString().padStart(2,"0"),e.getUTCHours().\
toString().padStart(2,"0"),e.getUTCMinutes().toString().padStart(2,"0"),e.getUTCSeconds().toString().padStart(2,"0")].join("")}let ma=null,ba=null;function MathClamp(e,t,a){return Math.min(Math.max(e,t),a)}function toHexUtil(e){return Uint8Array.prototype.toHex?e.toHex():Array.from(e,(e=>ga[e])).join("")}"function"!=typeof Promise.try&&(Promise.try=function(e,...t){return new Promise((a=>{a(e(...t))}))});"function"!=typeof Math.sumPrecise&&(Math.sumPrecise=function(e){return e.reduce(((e,t)=>e+t\
),0)});const ya=Symbol("CIRCULAR_REF"),wa=Symbol("EOF");let xa=Object.create(null),Sa=Object.create(null),Aa=Object.create(null);class Name{constructor(e){this.name=e}static get(e){return Sa[e]||=new Name(e)}}class Cmd{constructor(e){this.cmd=e}static get(e){return xa[e]||=new Cmd(e)}}const ka=function nonSerializableClosure(){return ka};class Dict{constructor(e=null){this._map=new Map;this.xref=e;this.objId=null;this.suppressEncryption=!1;this.__nonSerializable__=ka}assignXref(e){this.xref=e}ge\
t size(){return this._map.size}get(e,t,a){let r=this._map.get(e);if(void 0===r&&void 0!==t){r=this._map.get(t);void 0===r&&void 0!==a&&(r=this._map.get(a))}return r instanceof Ref&&this.xref?this.xref.fetch(r,this.suppressEncryption):r}async getAsync(e,t,a){let r=this._map.get(e);if(void 0===r&&void 0!==t){r=this._map.get(t);void 0===r&&void 0!==a&&(r=this._map.get(a))}return r instanceof Ref&&this.xref?this.xref.fetchAsync(r,this.suppressEncryption):r}getArray(e,t,a){let r=this._map.get(e);if(v\
oid 0===r&&void 0!==t){r=this._map.get(t);void 0===r&&void 0!==a&&(r=this._map.get(a))}r instanceof Ref&&this.xref&&(r=this.xref.fetch(r,this.suppressEncryption));if(Array.isArray(r)){r=r.slice();for(let e=0,t=r.length;e<t;e++)r[e]instanceof Ref&&this.xref&&(r[e]=this.xref.fetch(r[e],this.suppressEncryption))}return r}getRaw(e){return this._map.get(e)}getKeys(){return[...this._map.keys()]}getRawValues(){return[...this._map.values()]}set(e,t){this._map.set(e,t)}setIfNotExists(e,t){this.has(e)||th\
is.set(e,t)}setIfNumber(e,t){"number"==typeof t&&this.set(e,t)}setIfArray(e,t){(Array.isArray(t)||ArrayBuffer.isView(t))&&this.set(e,t)}setIfDefined(e,t){null!=t&&this.set(e,t)}setIfName(e,t){"string"==typeof t?this.set(e,Name.get(t)):t instanceof Name&&this.set(e,t)}has(e){return this._map.has(e)}*[Symbol.iterator](){for(const[e,t]of this._map)yield[e,t instanceof Ref&&this.xref?this.xref.fetch(t,this.suppressEncryption):t]}static get empty(){const e=new Dict(null);e.set=(e,t)=>{unreachable("Sh\
ould not call `set` on the empty dictionary.")};return shadow(this,"empty",e)}static merge({xref:e,dictArray:t,mergeSubDicts:a=!1}){const r=new Dict(e),i=new Map;for(const e of t)if(e instanceof Dict)for(const[t,r]of e._map){let e=i.get(t);if(void 0===e){e=[];i.set(t,e)}else if(!(a&&r instanceof Dict))continue;e.push(r)}for(const[t,a]of i){if(1===a.length||!(a[0]instanceof Dict)){r._map.set(t,a[0]);continue}const i=new Dict(e);for(const e of a)for(const[t,a]of e._map)i._map.has(t)||i._map.set(t,\
a);i.size>0&&r._map.set(t,i)}i.clear();return r.size>0?r:Dict.empty}clone(){const e=new Dict(this.xref);for(const t of this.getKeys())e.set(t,this.getRaw(t));return e}delete(e){delete this._map[e]}}class Ref{constructor(e,t){this.num=e;this.gen=t}toString(){return 0===this.gen?`${this.num}R`:`${this.num}R${this.gen}`}static fromString(e){const t=Aa[e];if(t)return t;const a=/^(\\d+)R(\\d*)$/.exec(e);return a&&"0"!==a[1]?Aa[e]=new Ref(parseInt(a[1]),a[2]?parseInt(a[2]):0):null}static get(e,t){const \
a=0===t?`${e}R`:`${e}R${t}`;return Aa[a]||=new Ref(e,t)}}class RefSet{constructor(e=null){this._set=new Set(e?._set)}has(e){return this._set.has(e.toString())}put(e){this._set.add(e.toString())}remove(e){this._set.delete(e.toString())}[Symbol.iterator](){return this._set.values()}clear(){this._set.clear()}}class RefSetCache{constructor(){this._map=new Map}get size(){return this._map.size}get(e){return this._map.get(e.toString())}has(e){return this._map.has(e.toString())}put(e,t){this._map.set(e.\
toString(),t)}putAlias(e,t){this._map.set(e.toString(),this.get(t))}[Symbol.iterator](){return this._map.values()}clear(){this._map.clear()}*values(){yield*this._map.values()}*items(){for(const[e,t]of this._map)yield[Ref.fromString(e),t]}}function isName(e,t){return e instanceof Name&&(void 0===t||e.name===t)}function isCmd(e,t){return e instanceof Cmd&&(void 0===t||e.cmd===t)}function isDict(e,t){return e instanceof Dict&&(void 0===t||isName(e.get("Type"),t))}function isRefsEqual(e,t){return e.\
num===t.num&&e.gen===t.gen}class BaseStream{get length(){unreachable("Abstract getter `length` accessed")}get isEmpty(){unreachable("Abstract getter `isEmpty` accessed")}get isDataLoaded(){return shadow(this,"isDataLoaded",!0)}getByte(){unreachable("Abstract method `getByte` called")}getBytes(e){unreachable("Abstract method `getBytes` called")}async getImageData(e,t){return this.getBytes(e,t)}async asyncGetBytes(){unreachable("Abstract method `asyncGetBytes` called")}get isAsync(){return!1}get i\
sAsyncDecoder(){return!1}get canAsyncDecodeImageFromBuffer(){return!1}async getTransferableImage(){return null}peekByte(){const e=this.getByte();-1!==e&&this.pos--;return e}peekBytes(e){const t=this.getBytes(e);this.pos-=t.length;return t}getUint16(){const e=this.getByte(),t=this.getByte();return-1===e||-1===t?-1:(e<<8)+t}getInt32(){return(this.getByte()<<24)+(this.getByte()<<16)+(this.getByte()<<8)+this.getByte()}getByteRange(e,t){unreachable("Abstract method `getByteRange` called")}getString(e\
){return bytesToString(this.getBytes(e))}skip(e){this.pos+=e||1}reset(){unreachable("Abstract method `reset` called")}moveStart(){unreachable("Abstract method `moveStart` called")}makeSubStream(e,t,a=null){unreachable("Abstract method `makeSubStream` called")}getBaseStreams(){return null}}const Ca=/^[1-9]\\.\\d$/,va=2**31-1,Fa=[1,0,0,1,0,0],Ia=["ColorSpace","ExtGState","Font","Pattern","Properties","Shading","XObject"],Ta=["ExtGState","Font","Properties","XObject"];function getLookupTableFactory(e\
){let t;return function(){if(e){t=Object.create(null);e(t);e=null}return t}}class MissingDataException extends fa{constructor(e,t){super(`Missing data [${e}, ${t})`,"MissingDataException");this.begin=e;this.end=t}}class ParserEOFException extends fa{constructor(e){super(e,"ParserEOFException")}}class XRefEntryException extends fa{constructor(e){super(e,"XRefEntryException")}}class XRefParseException extends fa{constructor(e){super(e,"XRefParseException")}}function arrayBuffersToBytes(e){const t=\
e.length;if(0===t)return new Uint8Array(0);if(1===t)return new Uint8Array(e[0]);let a=0;for(let r=0;r<t;r++)a+=e[r].byteLength;const r=new Uint8Array(a);let i=0;for(let a=0;a<t;a++){const t=new Uint8Array(e[a]);r.set(t,i);i+=t.byteLength}return r}async function fetchBinaryData(e){const t=await fetch(e);if(!t.ok)throw new Error(`Failed to fetch file "${e}" with "${t.statusText}".`);return new Uint8Array(await t.arrayBuffer())}function getInheritableProperty({dict:e,key:t,getArray:a=!1,stopWhenFou\
nd:r=!0}){let i;const n=new RefSet;for(;e instanceof Dict&&(!e.objId||!n.has(e.objId));){e.objId&&n.put(e.objId);const s=a?e.getArray(t):e.get(t);if(void 0!==s){if(r)return s;(i||=[]).push(s)}e=e.get("Parent")}return i}const Oa=["","C","CC","CCC","CD","D","DC","DCC","DCCC","CM","","X","XX","XXX","XL","L","LX","LXX","LXXX","XC","","I","II","III","IV","V","VI","VII","VIII","IX"];function toRomanNumerals(e,t=!1){assert(Number.isInteger(e)&&e>0,"The number should be a positive integer.");const a="M"\
.repeat(e/1e3|0)+Oa[e%1e3/100|0]+Oa[10+(e%100/10|0)]+Oa[20+e%10];return t?a.toLowerCase():a}function log2(e){return e>0?Math.ceil(Math.log2(e)):0}function readInt8(e,t){return e[t]<<24>>24}function readInt16(e,t){return(e[t]<<24|e[t+1]<<16)>>16}function readUint16(e,t){return e[t]<<8|e[t+1]}function readUint32(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}function isWhiteSpace(e){return 32===e||9===e||13===e||10===e}function isNumberArray(e,t){return Array.isArray(e)?(null===t||e.length=\
==t)&&e.every((e=>"number"==typeof e)):ArrayBuffer.isView(e)&&!(e instanceof BigInt64Array||e instanceof BigUint64Array)&&(null===t||e.length===t)}function lookupMatrix(e,t){return isNumberArray(e,6)?e:t}function lookupRect(e,t){return isNumberArray(e,4)?e:t}function lookupNormalRect(e,t){return isNumberArray(e,4)?Util.normalizeRect(e):t}function parseXFAPath(e){const t=/(.+)\\[(\\d+)\\]$/;return e.split(".").map((e=>{const a=e.match(t);return a?{name:a[1],pos:parseInt(a[2],10)}:{name:e,pos:0}}))}f\
unction escapePDFName(e){const t=[];let a=0;for(let r=0,i=e.length;r<i;r++){const i=e.charCodeAt(r);if(i<33||i>126||35===i||40===i||41===i||60===i||62===i||91===i||93===i||123===i||125===i||47===i||37===i){a<r&&t.push(e.substring(a,r));t.push(`#${i.toString(16)}`);a=r+1}}if(0===t.length)return e;a<e.length&&t.push(e.substring(a,e.length));return t.join("")}function escapeString(e){return e.replaceAll(/([()\\\\\\n\\r])/g,(e=>"\\n"===e?"\\\\n":"\\r"===e?"\\\\r":`\\\\${e}`))}function _collectJS(e,t,a,r){if(!e)\
return;let i=null;if(e instanceof Ref){if(r.has(e))return;i=e;r.put(i);e=t.fetch(e)}if(Array.isArray(e))for(const i of e)_collectJS(i,t,a,r);else if(e instanceof Dict){if(isName(e.get("S"),"JavaScript")){const t=e.get("JS");let r;t instanceof BaseStream?r=t.getString():"string"==typeof t&&(r=t);r&&=stringToPDFString(r,!0).replaceAll("\\0","");r&&a.push(r.trim())}_collectJS(e.getRaw("Next"),t,a,r)}i&&r.remove(i)}function collectActions(e,t,a){const r=Object.create(null),i=getInheritableProperty({d\
ict:t,key:"AA",stopWhenFound:!1});if(i)for(let t=i.length-1;t>=0;t--){const n=i[t];if(n instanceof Dict)for(const t of n.getKeys()){const i=a[t];if(!i)continue;const s=[];_collectJS(n.getRaw(t),e,s,new RefSet);s.length>0&&(r[i]=s)}}if(t.has("A")){const a=[];_collectJS(t.get("A"),e,a,new RefSet);a.length>0&&(r.Action=a)}return objectSize(r)>0?r:null}const Ma={60:"&lt;",62:"&gt;",38:"&amp;",34:"&quot;",39:"&apos;"};function*codePointIter(e){for(let t=0,a=e.length;t<a;t++){const a=e.codePointAt(t);\
a>55295&&(a<57344||a>65533)&&t++;yield a}}function encodeToXmlString(e){const t=[];let a=0;for(let r=0,i=e.length;r<i;r++){const i=e.codePointAt(r);if(32<=i&&i<=126){const n=Ma[i];if(n){a<r&&t.push(e.substring(a,r));t.push(n);a=r+1}}else{a<r&&t.push(e.substring(a,r));t.push(`&#x${i.toString(16).toUpperCase()};`);i>55295&&(i<57344||i>65533)&&r++;a=r+1}}if(0===t.length)return e;a<e.length&&t.push(e.substring(a,e.length));return t.join("")}function validateFontName(e,t=!1){const a=/^("|\').*("|\')$/.\
exec(e);if(a&&a[1]===a[2]){if(new RegExp(`[^\\\\\\\\]${a[1]}`).test(e.slice(1,-1))){t&&warn(`FontFamily contains unescaped ${a[1]}: ${e}.`);return!1}}else for(const a of e.split(/[ \\t]+/))if(/^(\\d|(-(\\d|-)))/.test(a)||!/^[\\w-\\\\]+$/.test(a)){t&&warn(`FontFamily contains invalid <custom-ident>: ${e}.`);return!1}return!0}function validateCSSFont(e){const t=new Set(["100","200","300","400","500","600","700","800","900","1000","normal","bold","bolder","lighter"]),{fontFamily:a,fontWeight:r,italicAngle:i}\
=e;if(!validateFontName(a,!0))return!1;const n=r?r.toString():"";e.fontWeight=t.has(n)?n:"400";const s=parseFloat(i);e.italicAngle=isNaN(s)||s<-90||s>90?"14":i.toString();return!0}function recoverJsURL(e){const t=new RegExp("^\\\\s*("+["app.launchURL","window.open","xfa.host.gotoURL"].join("|").replaceAll(".","\\\\.")+")\\\\((?:\'|\\")([^\'\\"]*)(?:\'|\\")(?:,\\\\s*(\\\\w+)\\\\)|\\\\))","i").exec(e);return t?.[2]?{url:t[2],newWindow:"app.launchURL"===t[1]&&"true"===t[3]}:null}function numberToString(e){if(Number.is\
Integer(e))return e.toString();const t=Math.round(100*e);return t%100==0?(t/100).toString():t%10==0?e.toFixed(1):e.toFixed(2)}function getNewAnnotationsMap(e){if(!e)return null;const t=new Map;for(const[a,r]of e){if(!a.startsWith(f))continue;let e=t.get(r.pageIndex);if(!e){e=[];t.set(r.pageIndex,e)}e.push(r)}return t.size>0?t:null}function stringToAsciiOrUTF16BE(e){return null==e||function isAscii(e){if("string"!=typeof e)return!1;return!e||/^[\\x00-\\x7F]*$/.test(e)}(e)?e:stringToUTF16String(e,!0\
)}function stringToUTF16HexString(e){const t=[];for(let a=0,r=e.length;a<r;a++){const r=e.charCodeAt(a);t.push(ga[r>>8&255],ga[255&r])}return t.join("")}function stringToUTF16String(e,t=!1){const a=[];t&&a.push("þÿ");for(let t=0,r=e.length;t<r;t++){const r=e.charCodeAt(t);a.push(String.fromCharCode(r>>8&255),String.fromCharCode(255&r))}return a.join("")}function getRotationMatrix(e,t,a){switch(e){case 90:return[0,1,-1,0,t,0];case 180:return[-1,0,0,-1,t,a];case 270:return[0,-1,1,0,0,a];default:th\
row new Error("Invalid rotation")}}function getSizeInBytes(e){return Math.ceil(Math.ceil(Math.log2(1+e))/8)}class QCMS{static#a=null;static _memory=null;static _mustAddAlpha=!1;static _destBuffer=null;static _destOffset=0;static _destLength=0;static _cssColor="";static _makeHexColor=null;static get _memoryArray(){const e=this.#a;return e?.byteLength?e:this.#a=new Uint8Array(this._memory.buffer)}}let Da;const Ba="undefined"!=typeof TextDecoder?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{dec\
ode:()=>{throw Error("TextDecoder not available")}};"undefined"!=typeof TextDecoder&&Ba.decode();let Ra=null;function getUint8ArrayMemory0(){null!==Ra&&0!==Ra.byteLength||(Ra=new Uint8Array(Da.memory.buffer));return Ra}let Na=0;function passArray8ToWasm0(e,t){const a=t(1*e.length,1)>>>0;getUint8ArrayMemory0().set(e,a/1);Na=e.length;return a}const Ea=Object.freeze({RGB8:0,0:"RGB8",RGBA8:1,1:"RGBA8",BGRA8:2,2:"BGRA8",Gray8:3,3:"Gray8",GrayA8:4,4:"GrayA8",CMYK:5,5:"CMYK"}),Pa=Object.freeze({Percept\
ual:0,0:"Perceptual",RelativeColorimetric:1,1:"RelativeColorimetric",Saturation:2,2:"Saturation",AbsoluteColorimetric:3,3:"AbsoluteColorimetric"});function __wbg_get_imports(){const e={wbg:{}};e.wbg.__wbg_copyresult_b08ee7d273f295dd=function(e,t){!function copy_result(e,t){const{_mustAddAlpha:a,_destBuffer:r,_destOffset:i,_destLength:n,_memoryArray:s}=QCMS;if(t!==n)if(a)for(let a=e,n=e+t,o=i;a<n;a+=3,o+=4){r[o]=s[a];r[o+1]=s[a+1];r[o+2]=s[a+2];r[o+3]=255}else for(let a=e,n=e+t,o=i;a<n;a+=3,o+=4)\
{r[o]=s[a];r[o+1]=s[a+1];r[o+2]=s[a+2]}else r.set(s.subarray(e,e+t),i)}(e>>>0,t>>>0)};e.wbg.__wbg_copyrgb_d60ce17bb05d9b67=function(e){!function copy_rgb(e){const{_destBuffer:t,_destOffset:a,_memoryArray:r}=QCMS;t[a]=r[e];t[a+1]=r[e+1];t[a+2]=r[e+2]}(e>>>0)};e.wbg.__wbg_makecssRGB_893bf0cd9fdb302d=function(e){!function make_cssRGB(e){const{_memoryArray:t}=QCMS;QCMS._cssColor=QCMS._makeHexColor(t[e],t[e+1],t[e+2])}(e>>>0)};e.wbg.__wbindgen_init_externref_table=function(){const e=Da.__wbindgen_exp\
ort_0,t=e.grow(4);e.set(0,void 0);e.set(t+0,void 0);e.set(t+1,null);e.set(t+2,!0);e.set(t+3,!1)};e.wbg.__wbindgen_throw=function(e,t){throw new Error(function getStringFromWasm0(e,t){e>>>=0;return Ba.decode(getUint8ArrayMemory0().subarray(e,e+t))}(e,t))};return e}function __wbg_finalize_init(e,t){Da=e.exports;__wbg_init.__wbindgen_wasm_module=t;Ra=null;Da.__wbindgen_start();return Da}async function __wbg_init(e){if(void 0!==Da)return Da;void 0!==e&&(Object.getPrototypeOf(e)===Object.prototype?({\
module_or_path:e}=e):console.warn("using deprecated parameters for the initialization function; pass a single object instead"));const t=__wbg_get_imports();("string"==typeof e||"function"==typeof Request&&e instanceof Request||"function"==typeof URL&&e instanceof URL)&&(e=fetch(e));const{instance:a,module:r}=await async function __wbg_load(e,t){if("function"==typeof Response&&e instanceof Response){if("function"==typeof WebAssembly.instantiateStreaming)try{return await WebAssembly.instantiateStr\
eaming(e,t)}catch(t){if("application/wasm"==e.headers.get("Content-Type"))throw t;console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\\n",t)}const a=await e.arrayBuffer();return await WebAssembly.instantiate(a,t)}{const a=await WebAssembly.instantiate(e,t);return a instanceof WebAssembly.Instance?{instance:a,module:e}:a}}(await e,t);return __wbg\
_finalize_init(a,r)}class ColorSpace{static#r=new Uint8ClampedArray(3);constructor(e,t){this.name=e;this.numComps=t}getRgb(e,t,a=new Uint8ClampedArray(3)){this.getRgbItem(e,t,a,0);return a}getRgbHex(e,t){const a=this.getRgb(e,t,ColorSpace.#r);return Util.makeHexColor(a[0],a[1],a[2])}getRgbItem(e,t,a,r){unreachable("Should not call ColorSpace.getRgbItem")}getRgbBuffer(e,t,a,r,i,n,s){unreachable("Should not call ColorSpace.getRgbBuffer")}getOutputLength(e,t){unreachable("Should not call ColorSpace\
.getOutputLength")}isPassthrough(e){return!1}isDefaultDecode(e,t){return ColorSpace.isDefaultDecode(e,this.numComps)}fillRgb(e,t,a,r,i,n,s,o,c){const l=t*a;let h=null;const u=1<<s,d=a!==i||t!==r;if(this.isPassthrough(s))h=o;else if(1===this.numComps&&l>u&&"DeviceGray"!==this.name&&"DeviceRGB"!==this.name){const t=s<=8?new Uint8Array(u):new Uint16Array(u);for(let e=0;e<u;e++)t[e]=e;const a=new Uint8ClampedArray(3*u);this.getRgbBuffer(t,0,u,a,0,s,0);if(d){h=new Uint8Array(3*l);let e=0;for(let t=0;\
t<l;++t){const r=3*o[t];h[e++]=a[r];h[e++]=a[r+1];h[e++]=a[r+2]}}else{let t=0;for(let r=0;r<l;++r){const i=3*o[r];e[t++]=a[i];e[t++]=a[i+1];e[t++]=a[i+2];t+=c}}}else if(d){h=new Uint8ClampedArray(3*l);this.getRgbBuffer(o,0,l,h,0,s,0)}else this.getRgbBuffer(o,0,r*n,e,0,s,c);if(h)if(d)!function resizeRgbImage(e,t,a,r,i,n,s){s=1!==s?0:s;const o=a/i,c=r/n;let l,h=0;const u=new Uint16Array(i),d=3*a;for(let e=0;e<i;e++)u[e]=3*Math.floor(e*o);for(let a=0;a<n;a++){const r=Math.floor(a*c)*d;for(let a=0;a\
<i;a++){l=r+u[a];t[h++]=e[l++];t[h++]=e[l++];t[h++]=e[l++];h+=s}}}(h,e,t,a,r,i,c);else{let t=0,a=0;for(let i=0,s=r*n;i<s;i++){e[t++]=h[a++];e[t++]=h[a++];e[t++]=h[a++];t+=c}}}get usesZeroToOneRange(){return shadow(this,"usesZeroToOneRange",!0)}static isDefaultDecode(e,t){if(!Array.isArray(e))return!0;if(2*t!==e.length){warn("The decode map is not the correct length");return!0}for(let t=0,a=e.length;t<a;t+=2)if(0!==e[t]||1!==e[t+1])return!1;return!0}}class AlternateCS extends ColorSpace{construct\
or(e,t,a){super("Alternate",e);this.base=t;this.tintFn=a;this.tmpBuf=new Float32Array(t.numComps)}getRgbItem(e,t,a,r){const i=this.tmpBuf;this.tintFn(e,t,i,0);this.base.getRgbItem(i,0,a,r)}getRgbBuffer(e,t,a,r,i,n,s){const o=this.tintFn,c=this.base,l=1/((1<<n)-1),h=c.numComps,u=c.usesZeroToOneRange,d=(c.isPassthrough(8)||!u)&&0===s;let f=d?i:0;const g=d?r:new Uint8ClampedArray(h*a),p=this.numComps,m=new Float32Array(p),b=new Float32Array(h);let y,w;for(y=0;y<a;y++){for(w=0;w<p;w++)m[w]=e[t++]*l;\
o(m,0,b,0);if(u)for(w=0;w<h;w++)g[f++]=255*b[w];else{c.getRgbItem(b,0,g,f);f+=h}}d||c.getRgbBuffer(g,0,a,r,i,8,s)}getOutputLength(e,t){return this.base.getOutputLength(e*this.base.numComps/this.numComps,t)}}class PatternCS extends ColorSpace{constructor(e){super("Pattern",null);this.base=e}isDefaultDecode(e,t){unreachable("Should not call PatternCS.isDefaultDecode")}}class IndexedCS extends ColorSpace{constructor(e,t,a){super("Indexed",1);this.base=e;this.highVal=t;const r=e.numComps*(t+1);this.\
lookup=new Uint8Array(r);if(a instanceof BaseStream){const e=a.getBytes(r);this.lookup.set(e)}else{if("string"!=typeof a)throw new FormatError(`IndexedCS - unrecognized lookup table: ${a}`);for(let e=0;e<r;++e)this.lookup[e]=255&a.charCodeAt(e)}}getRgbItem(e,t,a,r){const{base:i,highVal:n,lookup:s}=this,o=MathClamp(Math.round(e[t]),0,n)*i.numComps;i.getRgbBuffer(s,o,1,a,r,8,0)}getRgbBuffer(e,t,a,r,i,n,s){const{base:o,highVal:c,lookup:l}=this,{numComps:h}=o,u=o.getOutputLength(h,s);for(let n=0;n<a\
;++n){const a=MathClamp(Math.round(e[t++]),0,c)*h;o.getRgbBuffer(l,a,1,r,i,8,s);i+=u}}getOutputLength(e,t){return this.base.getOutputLength(e*this.base.numComps,t)}isDefaultDecode(e,t){if(!Array.isArray(e))return!0;if(2!==e.length){warn("Decode map length is not correct");return!0}if(!Number.isInteger(t)||t<1){warn("Bits per component is not correct");return!0}return 0===e[0]&&e[1]===(1<<t)-1}}class DeviceGrayCS extends ColorSpace{constructor(){super("DeviceGray",1)}getRgbItem(e,t,a,r){const i=2\
55*e[t];a[r]=a[r+1]=a[r+2]=i}getRgbBuffer(e,t,a,r,i,n,s){const o=255/((1<<n)-1);let c=t,l=i;for(let t=0;t<a;++t){const t=o*e[c++];r[l++]=t;r[l++]=t;r[l++]=t;l+=s}}getOutputLength(e,t){return e*(3+t)}}class DeviceRgbCS extends ColorSpace{constructor(){super("DeviceRGB",3)}getRgbItem(e,t,a,r){a[r]=255*e[t];a[r+1]=255*e[t+1];a[r+2]=255*e[t+2]}getRgbBuffer(e,t,a,r,i,n,s){if(8===n&&0===s){r.set(e.subarray(t,t+3*a),i);return}const o=255/((1<<n)-1);let c=t,l=i;for(let t=0;t<a;++t){r[l++]=o*e[c++];r[l++\
]=o*e[c++];r[l++]=o*e[c++];l+=s}}getOutputLength(e,t){return e*(3+t)/3|0}isPassthrough(e){return 8===e}}class DeviceRgbaCS extends ColorSpace{constructor(){super("DeviceRGBA",4)}getOutputLength(e,t){return 4*e}isPassthrough(e){return 8===e}fillRgb(e,t,a,r,i,n,s,o,c){a!==i||t!==r?function resizeRgbaImage(e,t,a,r,i,n,s){const o=a/i,c=r/n;let l=0;const h=new Uint16Array(i);if(1===s){for(let e=0;e<i;e++)h[e]=Math.floor(e*o);const r=new Uint32Array(e.buffer),s=new Uint32Array(t.buffer),u=FeatureTest.\
isLittleEndian?16777215:4294967040;for(let e=0;e<n;e++){const t=r.subarray(Math.floor(e*c)*a);for(let e=0;e<i;e++)s[l++]|=t[h[e]]&u}}else{const r=4,s=a*r;for(let e=0;e<i;e++)h[e]=Math.floor(e*o)*r;for(let a=0;a<n;a++){const r=e.subarray(Math.floor(a*c)*s);for(let e=0;e<i;e++){const a=h[e];t[l++]=r[a];t[l++]=r[a+1];t[l++]=r[a+2]}}}}(o,e,t,a,r,i,c):function copyRgbaImage(e,t,a){if(1===a){const a=new Uint32Array(e.buffer),r=new Uint32Array(t.buffer),i=FeatureTest.isLittleEndian?16777215:4294967040;\
for(let e=0,t=a.length;e<t;e++)r[e]|=a[e]&i}else{let a=0;for(let r=0,i=e.length;r<i;r+=4){t[a++]=e[r];t[a++]=e[r+1];t[a++]=e[r+2]}}}(o,e,c)}}class DeviceCmykCS extends ColorSpace{constructor(){super("DeviceCMYK",4)}#i(e,t,a,r,i){const n=e[t]*a,s=e[t+1]*a,o=e[t+2]*a,c=e[t+3]*a;r[i]=255+n*(-4.387332384609988*n+54.48615194189176*s+18.82290502165302*o+212.25662451639585*c-285.2331026137004)+s*(1.7149763477362134*s-5.6096736904047315*o+-17.873870861415444*c-5.497006427196366)+o*(-2.5217340131683033*o\
-21.248923337353073*c+17.5119270841813)+c*(-21.86122147463605*c-189.48180835922747);r[i+1]=255+n*(8.841041422036149*n+60.118027045597366*s+6.871425592049007*o+31.159100130055922*c-79.2970844816548)+s*(-15.310361306967817*s+17.575251261109482*o+131.35250912493976*c-190.9453302588951)+o*(4.444339102852739*o+9.8632861493405*c-24.86741582555878)+c*(-20.737325471181034*c-187.80453709719578);r[i+2]=255+n*(.8842522430003296*n+8.078677503112928*s+30.89978309703729*o-.23883238689178934*c-14.1835767996732\
86)+s*(10.49593273432072*s+63.02378494754052*o+50.606957656360734*c-112.23884253719248)+o*(.03296041114873217*o+115.60384449646641*c-193.58209356861505)+c*(-22.33816807309886*c-180.12613974708367)}getRgbItem(e,t,a,r){this.#i(e,t,1,a,r)}getRgbBuffer(e,t,a,r,i,n,s){const o=1/((1<<n)-1);for(let n=0;n<a;n++){this.#i(e,t,o,r,i);t+=4;i+=3+s}}getOutputLength(e,t){return e/4*(3+t)|0}}class CalGrayCS extends ColorSpace{constructor(e,t,a){super("CalGray",1);if(!e)throw new FormatError("WhitePoint missing \
- required for color space CalGray");[this.XW,this.YW,this.ZW]=e;[this.XB,this.YB,this.ZB]=t||[0,0,0];this.G=a||1;if(this.XW<0||this.ZW<0||1!==this.YW)throw new FormatError(`Invalid WhitePoint components for ${this.name}, no fallback available`);if(this.XB<0||this.YB<0||this.ZB<0){info(`Invalid BlackPoint for ${this.name}, falling back to default.`);this.XB=this.YB=this.ZB=0}0===this.XB&&0===this.YB&&0===this.ZB||warn(`${this.name}, BlackPoint: XB: ${this.XB}, YB: ${this.YB}, ZB: ${this.ZB}, onl\
y default values are supported.`);if(this.G<1){info(`Invalid Gamma: ${this.G} for ${this.name}, falling back to default.`);this.G=1}}#i(e,t,a,r,i){const n=(e[t]*i)**this.G,s=this.YW*n,o=Math.max(295.8*s**.3333333333333333-40.8,0);a[r]=o;a[r+1]=o;a[r+2]=o}getRgbItem(e,t,a,r){this.#i(e,t,a,r,1)}getRgbBuffer(e,t,a,r,i,n,s){const o=1/((1<<n)-1);for(let n=0;n<a;++n){this.#i(e,t,r,i,o);t+=1;i+=3+s}}getOutputLength(e,t){return e*(3+t)}}class CalRGBCS extends ColorSpace{static#n=new Float32Array([.8951,\
.2664,-.1614,-.7502,1.7135,.0367,.0389,-.0685,1.0296]);static#s=new Float32Array([.9869929,-.1470543,.1599627,.4323053,.5183603,.0492912,-.0085287,.0400428,.9684867]);static#o=new Float32Array([3.2404542,-1.5371385,-.4985314,-.969266,1.8760108,.041556,.0556434,-.2040259,1.0572252]);static#c=new Float32Array([1,1,1]);static#l=new Float32Array(3);static#h=new Float32Array(3);static#u=new Float32Array(3);static#d=(24/116)**3/8;constructor(e,t,a,r){super("CalRGB",3);if(!e)throw new FormatError("Whit\
ePoint missing - required for color space CalRGB");const[i,n,s]=this.whitePoint=e,[o,c,l]=this.blackPoint=t||new Float32Array(3);[this.GR,this.GG,this.GB]=a||new Float32Array([1,1,1]);[this.MXA,this.MYA,this.MZA,this.MXB,this.MYB,this.MZB,this.MXC,this.MYC,this.MZC]=r||new Float32Array([1,0,0,0,1,0,0,0,1]);if(i<0||s<0||1!==n)throw new FormatError(`Invalid WhitePoint components for ${this.name}, no fallback available`);if(o<0||c<0||l<0){info(`Invalid BlackPoint for ${this.name} [${o}, ${c}, ${l}]\
, falling back to default.`);this.blackPoint=new Float32Array(3)}if(this.GR<0||this.GG<0||this.GB<0){info(`Invalid Gamma [${this.GR}, ${this.GG}, ${this.GB}] for ${this.name}, falling back to default.`);this.GR=this.GG=this.GB=1}}#f(e,t,a){a[0]=e[0]*t[0]+e[1]*t[1]+e[2]*t[2];a[1]=e[3]*t[0]+e[4]*t[1]+e[5]*t[2];a[2]=e[6]*t[0]+e[7]*t[1]+e[8]*t[2]}#g(e,t,a){a[0]=1*t[0]/e[0];a[1]=1*t[1]/e[1];a[2]=1*t[2]/e[2]}#p(e,t,a){a[0]=.95047*t[0]/e[0];a[1]=1*t[1]/e[1];a[2]=1.08883*t[2]/e[2]}#m(e){return e<=.00313\
08?MathClamp(12.92*e,0,1):e>=.99554525?1:MathClamp(1.055*e**(1/2.4)-.055,0,1)}#b(e){return e<0?-this.#b(-e):e>8?((e+16)/116)**3:e*CalRGBCS.#d}#y(e,t,a){if(0===e[0]&&0===e[1]&&0===e[2]){a[0]=t[0];a[1]=t[1];a[2]=t[2];return}const r=this.#b(0),i=(1-r)/(1-this.#b(e[0])),n=1-i,s=(1-r)/(1-this.#b(e[1])),o=1-s,c=(1-r)/(1-this.#b(e[2])),l=1-c;a[0]=t[0]*i+n;a[1]=t[1]*s+o;a[2]=t[2]*c+l}#w(e,t,a){if(1===e[0]&&1===e[2]){a[0]=t[0];a[1]=t[1];a[2]=t[2];return}const r=a;this.#f(CalRGBCS.#n,t,r);const i=CalRGBCS\
.#l;this.#g(e,r,i);this.#f(CalRGBCS.#s,i,a)}#x(e,t,a){const r=a;this.#f(CalRGBCS.#n,t,r);const i=CalRGBCS.#l;this.#p(e,r,i);this.#f(CalRGBCS.#s,i,a)}#i(e,t,a,r,i){const n=MathClamp(e[t]*i,0,1),s=MathClamp(e[t+1]*i,0,1),o=MathClamp(e[t+2]*i,0,1),c=1===n?1:n**this.GR,l=1===s?1:s**this.GG,h=1===o?1:o**this.GB,u=this.MXA*c+this.MXB*l+this.MXC*h,d=this.MYA*c+this.MYB*l+this.MYC*h,f=this.MZA*c+this.MZB*l+this.MZC*h,g=CalRGBCS.#h;g[0]=u;g[1]=d;g[2]=f;const p=CalRGBCS.#u;this.#w(this.whitePoint,g,p);con\
st m=CalRGBCS.#h;this.#y(this.blackPoint,p,m);const b=CalRGBCS.#u;this.#x(CalRGBCS.#c,m,b);const y=CalRGBCS.#h;this.#f(CalRGBCS.#o,b,y);a[r]=255*this.#m(y[0]);a[r+1]=255*this.#m(y[1]);a[r+2]=255*this.#m(y[2])}getRgbItem(e,t,a,r){this.#i(e,t,a,r,1)}getRgbBuffer(e,t,a,r,i,n,s){const o=1/((1<<n)-1);for(let n=0;n<a;++n){this.#i(e,t,r,i,o);t+=3;i+=3+s}}getOutputLength(e,t){return e*(3+t)/3|0}}class LabCS extends ColorSpace{constructor(e,t,a){super("Lab",3);if(!e)throw new FormatError("WhitePoint miss\
ing - required for color space Lab");[this.XW,this.YW,this.ZW]=e;[this.amin,this.amax,this.bmin,this.bmax]=a||[-100,100,-100,100];[this.XB,this.YB,this.ZB]=t||[0,0,0];if(this.XW<0||this.ZW<0||1!==this.YW)throw new FormatError("Invalid WhitePoint components, no fallback available");if(this.XB<0||this.YB<0||this.ZB<0){info("Invalid BlackPoint, falling back to default");this.XB=this.YB=this.ZB=0}if(this.amin>this.amax||this.bmin>this.bmax){info("Invalid Range, falling back to defaults");this.amin=-\
100;this.amax=100;this.bmin=-100;this.bmax=100}}#S(e){return e>=6/29?e**3:108/841*(e-4/29)}#A(e,t,a,r){return a+e*(r-a)/t}#i(e,t,a,r,i){let n=e[t],s=e[t+1],o=e[t+2];if(!1!==a){n=this.#A(n,a,0,100);s=this.#A(s,a,this.amin,this.amax);o=this.#A(o,a,this.bmin,this.bmax)}s>this.amax?s=this.amax:s<this.amin&&(s=this.amin);o>this.bmax?o=this.bmax:o<this.bmin&&(o=this.bmin);const c=(n+16)/116,l=c+s/500,h=c-o/200,u=this.XW*this.#S(l),d=this.YW*this.#S(c),f=this.ZW*this.#S(h);let g,p,m;if(this.ZW<1){g=3.1\
339*u+-1.617*d+-.4906*f;p=-.9785*u+1.916*d+.0333*f;m=.072*u+-.229*d+1.4057*f}else{g=3.2406*u+-1.5372*d+-.4986*f;p=-.9689*u+1.8758*d+.0415*f;m=.0557*u+-.204*d+1.057*f}r[i]=255*Math.sqrt(g);r[i+1]=255*Math.sqrt(p);r[i+2]=255*Math.sqrt(m)}getRgbItem(e,t,a,r){this.#i(e,t,!1,a,r)}getRgbBuffer(e,t,a,r,i,n,s){const o=(1<<n)-1;for(let n=0;n<a;n++){this.#i(e,t,o,r,i);t+=3;i+=3+s}}getOutputLength(e,t){return e*(3+t)/3|0}isDefaultDecode(e,t){return!0}get usesZeroToOneRange(){return shadow(this,"usesZeroToO\
neRange",!1)}}function fetchSync(e){const t=new XMLHttpRequest;t.open("GET",e,!1);t.responseType="arraybuffer";t.send(null);return t.response}class IccColorSpace extends ColorSpace{#k;#C;static#v=!0;static#F=null;static#I=new FinalizationRegistry((e=>{!function qcms_drop_transformer(e){Da.qcms_drop_transformer(e)}(e)}));constructor(e,t,a){if(!IccColorSpace.isUsable)throw new Error("No ICC color space support");super(t,a);let r;switch(a){case 1:r=Ea.Gray8;this.#C=(e,t,a)=>function qcms_convert_on\
e(e,t,a){Da.qcms_convert_one(e,t,a)}(this.#k,255*e[t],a);break;case 3:r=Ea.RGB8;this.#C=(e,t,a)=>function qcms_convert_three(e,t,a,r,i){Da.qcms_convert_three(e,t,a,r,i)}(this.#k,255*e[t],255*e[t+1],255*e[t+2],a);break;case 4:r=Ea.CMYK;this.#C=(e,t,a)=>function qcms_convert_four(e,t,a,r,i,n){Da.qcms_convert_four(e,t,a,r,i,n)}(this.#k,255*e[t],255*e[t+1],255*e[t+2],255*e[t+3],a);break;default:throw new Error(`Unsupported number of components: ${a}`)}this.#k=function qcms_transformer_from_memory(e,\
t,a){const r=passArray8ToWasm0(e,Da.__wbindgen_malloc),i=Na;return Da.qcms_transformer_from_memory(r,i,t,a)>>>0}(e,r,Pa.Perceptual);if(!this.#k)throw new Error("Failed to create ICC color space");IccColorSpace.#I.register(this,this.#k)}getRgbHex(e,t){this.#C(e,t,!0);return QCMS._cssColor}getRgbItem(e,t,a,r){QCMS._destBuffer=a;QCMS._destOffset=r;QCMS._destLength=3;this.#C(e,t,!1);QCMS._destBuffer=null}getRgbBuffer(e,t,a,r,i,n,s){e=e.subarray(t,t+a*this.numComps);if(8!==n){const t=255/((1<<n)-1);f\
or(let a=0,r=e.length;a<r;a++)e[a]*=t}QCMS._mustAddAlpha=s&&r.buffer===e.buffer;QCMS._destBuffer=r;QCMS._destOffset=i;QCMS._destLength=a*(3+s);!function qcms_convert_array(e,t){const a=passArray8ToWasm0(t,Da.__wbindgen_malloc),r=Na;Da.qcms_convert_array(e,a,r)}(this.#k,e);QCMS._mustAddAlpha=!1;QCMS._destBuffer=null}getOutputLength(e,t){return e/this.numComps*(3+t)|0}static setOptions({useWasm:e,useWorkerFetch:t,wasmUrl:a}){if(t){this.#v=e;this.#F=a}else this.#v=!1}static get isUsable(){let e=!1;\
if(this.#v)if(this.#F)try{this._module=function initSync(e){if(void 0!==Da)return Da;void 0!==e&&(Object.getPrototypeOf(e)===Object.prototype?({module:e}=e):console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));const t=__wbg_get_imports();e instanceof WebAssembly.Module||(e=new WebAssembly.Module(e));return __wbg_finalize_init(new WebAssembly.Instance(e,t),e)}({module:fetchSync(`${this.#F}qcms_bg.wasm`)});e=!!this._module;QCMS._memory=this._module.memory;QCM\
S._makeHexColor=Util.makeHexColor}catch(e){warn(`ICCBased color space: "${e}".`)}else warn("No ICC color space support due to missing `wasmUrl` API option");return shadow(this,"isUsable",e)}}class CmykICCBasedCS extends IccColorSpace{static#T;constructor(){super(new Uint8Array(fetchSync(`${CmykICCBasedCS.#T}CGATS001Compat-v2-micro.icc`)),"DeviceCMYK",4)}static setOptions({iccUrl:e}){this.#T=e}static get isUsable(){let e=!1;IccColorSpace.isUsable&&(this.#T?e=!0:warn("No CMYK ICC profile support d\
ue to missing `iccUrl` API option"));return shadow(this,"isUsable",e)}}class Stream extends BaseStream{constructor(e,t,a,r){super();this.bytes=e instanceof Uint8Array?e:new Uint8Array(e);this.start=t||0;this.pos=this.start;this.end=t+a||this.bytes.length;this.dict=r}get length(){return this.end-this.start}get isEmpty(){return 0===this.length}getByte(){return this.pos>=this.end?-1:this.bytes[this.pos++]}getBytes(e){const t=this.bytes,a=this.pos,r=this.end;if(!e)return t.subarray(a,r);let i=a+e;i>\
r&&(i=r);this.pos=i;return t.subarray(a,i)}getByteRange(e,t){e<0&&(e=0);t>this.end&&(t=this.end);return this.bytes.subarray(e,t)}reset(){this.pos=this.start}moveStart(){this.start=this.pos}makeSubStream(e,t,a=null){return new Stream(this.bytes.buffer,e,t,a)}}class StringStream extends Stream{constructor(e){super(stringToBytes(e))}}class NullStream extends Stream{constructor(){super(new Uint8Array(0))}}class ChunkedStream extends Stream{constructor(e,t,a){super(new Uint8Array(e),0,e,null);this.ch\
unkSize=t;this._loadedChunks=new Set;this.numChunks=Math.ceil(e/t);this.manager=a;this.progressiveDataLength=0;this.lastSuccessfulEnsureByteChunk=-1}getMissingChunks(){const e=[];for(let t=0,a=this.numChunks;t<a;++t)this._loadedChunks.has(t)||e.push(t);return e}get numChunksLoaded(){return this._loadedChunks.size}get isDataLoaded(){return this.numChunksLoaded===this.numChunks}onReceiveData(e,t){const a=this.chunkSize;if(e%a!=0)throw new Error(`Bad begin offset: ${e}`);const r=e+t.byteLength;if(r\
%a!=0&&r!==this.bytes.length)throw new Error(`Bad end offset: ${r}`);this.bytes.set(new Uint8Array(t),e);const i=Math.floor(e/a),n=Math.floor((r-1)/a)+1;for(let e=i;e<n;++e)this._loadedChunks.add(e)}onReceiveProgressiveData(e){let t=this.progressiveDataLength;const a=Math.floor(t/this.chunkSize);this.bytes.set(new Uint8Array(e),t);t+=e.byteLength;this.progressiveDataLength=t;const r=t>=this.end?this.numChunks:Math.floor(t/this.chunkSize);for(let e=a;e<r;++e)this._loadedChunks.add(e)}ensureByte(e\
){if(e<this.progressiveDataLength)return;const t=Math.floor(e/this.chunkSize);if(!(t>this.numChunks)&&t!==this.lastSuccessfulEnsureByteChunk){if(!this._loadedChunks.has(t))throw new MissingDataException(e,e+1);this.lastSuccessfulEnsureByteChunk=t}}ensureRange(e,t){if(e>=t)return;if(t<=this.progressiveDataLength)return;const a=Math.floor(e/this.chunkSize);if(a>this.numChunks)return;const r=Math.min(Math.floor((t-1)/this.chunkSize)+1,this.numChunks);for(let i=a;i<r;++i)if(!this._loadedChunks.has(i\
))throw new MissingDataException(e,t)}nextEmptyChunk(e){const t=this.numChunks;for(let a=0;a<t;++a){const r=(e+a)%t;if(!this._loadedChunks.has(r))return r}return null}hasChunk(e){return this._loadedChunks.has(e)}getByte(){const e=this.pos;if(e>=this.end)return-1;e>=this.progressiveDataLength&&this.ensureByte(e);return this.bytes[this.pos++]}getBytes(e){const t=this.bytes,a=this.pos,r=this.end;if(!e){r>this.progressiveDataLength&&this.ensureRange(a,r);return t.subarray(a,r)}let i=a+e;i>r&&(i=r);i\
>this.progressiveDataLength&&this.ensureRange(a,i);this.pos=i;return t.subarray(a,i)}getByteRange(e,t){e<0&&(e=0);t>this.end&&(t=this.end);t>this.progressiveDataLength&&this.ensureRange(e,t);return this.bytes.subarray(e,t)}makeSubStream(e,t,a=null){t?e+t>this.progressiveDataLength&&this.ensureRange(e,e+t):e>=this.progressiveDataLength&&this.ensureByte(e);function ChunkedStreamSubstream(){}ChunkedStreamSubstream.prototype=Object.create(this);ChunkedStreamSubstream.prototype.getMissingChunks=funct\
ion(){const e=this.chunkSize,t=Math.floor(this.start/e),a=Math.floor((this.end-1)/e)+1,r=[];for(let e=t;e<a;++e)this._loadedChunks.has(e)||r.push(e);return r};Object.defineProperty(ChunkedStreamSubstream.prototype,"isDataLoaded",{get(){return this.numChunksLoaded===this.numChunks||0===this.getMissingChunks().length},configurable:!0});const r=new ChunkedStreamSubstream;r.pos=r.start=e;r.end=e+t||this.end;r.dict=a;return r}getBaseStreams(){return[this]}}class ChunkedStreamManager{constructor(e,t){\
this.length=t.length;this.chunkSize=t.rangeChunkSize;this.stream=new ChunkedStream(this.length,this.chunkSize,this);this.pdfNetworkStream=e;this.disableAutoFetch=t.disableAutoFetch;this.msgHandler=t.msgHandler;this.currRequestId=0;this._chunksNeededByRequest=new Map;this._requestsByChunk=new Map;this._promisesByRequest=new Map;this.progressiveDataLength=0;this.aborted=!1;this._loadedStreamCapability=Promise.withResolvers()}sendRequest(e,t){const a=this.pdfNetworkStream.getRangeReader(e,t);a.isSt\
reamingSupported||(a.onProgress=this.onProgress.bind(this));let r=[],i=0;return new Promise(((e,t)=>{const readChunk=({value:n,done:s})=>{try{if(s){const t=arrayBuffersToBytes(r);r=null;e(t);return}i+=n.byteLength;a.isStreamingSupported&&this.onProgress({loaded:i});r.push(n);a.read().then(readChunk,t)}catch(e){t(e)}};a.read().then(readChunk,t)})).then((t=>{this.aborted||this.onReceiveData({chunk:t,begin:e})}))}requestAllChunks(e=!1){if(!e){const e=this.stream.getMissingChunks();this._requestChun\
ks(e)}return this._loadedStreamCapability.promise}_requestChunks(e){const t=this.currRequestId++,a=new Set;this._chunksNeededByRequest.set(t,a);for(const t of e)this.stream.hasChunk(t)||a.add(t);if(0===a.size)return Promise.resolve();const r=Promise.withResolvers();this._promisesByRequest.set(t,r);const i=[];for(const e of a){let a=this._requestsByChunk.get(e);if(!a){a=[];this._requestsByChunk.set(e,a);i.push(e)}a.push(t)}if(i.length>0){const e=this.groupChunks(i);for(const t of e){const e=t.beg\
inChunk*this.chunkSize,a=Math.min(t.endChunk*this.chunkSize,this.length);this.sendRequest(e,a).catch(r.reject)}}return r.promise.catch((e=>{if(!this.aborted)throw e}))}getStream(){return this.stream}requestRange(e,t){t=Math.min(t,this.length);const a=this.getBeginChunk(e),r=this.getEndChunk(t),i=[];for(let e=a;e<r;++e)i.push(e);return this._requestChunks(i)}requestRanges(e=[]){const t=[];for(const a of e){const e=this.getBeginChunk(a.begin),r=this.getEndChunk(a.end);for(let a=e;a<r;++a)t.include\
s(a)||t.push(a)}t.sort(((e,t)=>e-t));return this._requestChunks(t)}groupChunks(e){const t=[];let a=-1,r=-1;for(let i=0,n=e.length;i<n;++i){const n=e[i];a<0&&(a=n);if(r>=0&&r+1!==n){t.push({beginChunk:a,endChunk:r+1});a=n}i+1===e.length&&t.push({beginChunk:a,endChunk:n+1});r=n}return t}onProgress(e){this.msgHandler.send("DocProgress",{loaded:this.stream.numChunksLoaded*this.chunkSize+e.loaded,total:this.length})}onReceiveData(e){const t=e.chunk,a=void 0===e.begin,r=a?this.progressiveDataLength:e.\
begin,i=r+t.byteLength,n=Math.floor(r/this.chunkSize),s=i<this.length?Math.floor(i/this.chunkSize):Math.ceil(i/this.chunkSize);if(a){this.stream.onReceiveProgressiveData(t);this.progressiveDataLength=i}else this.stream.onReceiveData(r,t);this.stream.isDataLoaded&&this._loadedStreamCapability.resolve(this.stream);const o=[];for(let e=n;e<s;++e){const t=this._requestsByChunk.get(e);if(t){this._requestsByChunk.delete(e);for(const a of t){const t=this._chunksNeededByRequest.get(a);t.has(e)&&t.delete\
(e);t.size>0||o.push(a)}}}if(!this.disableAutoFetch&&0===this._requestsByChunk.size){let e;if(1===this.stream.numChunksLoaded){const t=this.stream.numChunks-1;this.stream.hasChunk(t)||(e=t)}else e=this.stream.nextEmptyChunk(s);Number.isInteger(e)&&this._requestChunks([e])}for(const e of o){const t=this._promisesByRequest.get(e);this._promisesByRequest.delete(e);t.resolve()}this.msgHandler.send("DocProgress",{loaded:this.stream.numChunksLoaded*this.chunkSize,total:this.length})}onError(e){this._l\
oadedStreamCapability.reject(e)}getBeginChunk(e){return Math.floor(e/this.chunkSize)}getEndChunk(e){return Math.floor((e-1)/this.chunkSize)+1}abort(e){this.aborted=!0;this.pdfNetworkStream?.cancelAllRequests(e);for(const t of this._promisesByRequest.values())t.reject(e)}}function convertToRGBA(e){switch(e.kind){case k:return convertBlackAndWhiteToRGBA(e);case C:return function convertRGBToRGBA({src:e,srcPos:t=0,dest:a,destPos:r=0,width:i,height:n}){let s=0;const o=i*n*3,c=o>>2,l=new Uint32Array(\
e.buffer,t,c);if(FeatureTest.isLittleEndian){for(;s<c-2;s+=3,r+=4){const e=l[s],t=l[s+1],i=l[s+2];a[r]=4278190080|e;a[r+1]=e>>>24|t<<8|4278190080;a[r+2]=t>>>16|i<<16|4278190080;a[r+3]=i>>>8|4278190080}for(let i=4*s,n=t+o;i<n;i+=3)a[r++]=e[i]|e[i+1]<<8|e[i+2]<<16|4278190080}else{for(;s<c-2;s+=3,r+=4){const e=l[s],t=l[s+1],i=l[s+2];a[r]=255|e;a[r+1]=e<<24|t>>>8|255;a[r+2]=t<<16|i>>>16|255;a[r+3]=i<<8|255}for(let i=4*s,n=t+o;i<n;i+=3)a[r++]=e[i]<<24|e[i+1]<<16|e[i+2]<<8|255}return{srcPos:t+o,destPo\
s:r}}(e)}return null}function convertBlackAndWhiteToRGBA({src:e,srcPos:t=0,dest:a,width:r,height:i,nonBlackColor:n=4294967295,inverseDecode:s=!1}){const o=FeatureTest.isLittleEndian?4278190080:255,[c,l]=s?[n,o]:[o,n],h=r>>3,u=7&r,d=e.length;a=new Uint32Array(a.buffer);let f=0;for(let r=0;r<i;r++){for(const r=t+h;t<r;t++){const r=t<d?e[t]:255;a[f++]=128&r?l:c;a[f++]=64&r?l:c;a[f++]=32&r?l:c;a[f++]=16&r?l:c;a[f++]=8&r?l:c;a[f++]=4&r?l:c;a[f++]=2&r?l:c;a[f++]=1&r?l:c}if(0===u)continue;const r=t<d?e\
[t++]:255;for(let e=0;e<u;e++)a[f++]=r&1<<7-e?l:c}return{srcPos:t,destPos:f}}class ImageResizer{static#O=2048;static#M=FeatureTest.isImageDecoderSupported;constructor(e,t){this._imgData=e;this._isMask=t}static get canUseImageDecoder(){return shadow(this,"canUseImageDecoder",this.#M?ImageDecoder.isTypeSupported("image/bmp"):Promise.resolve(!1))}static needsToBeResized(e,t){if(e<=this.#O&&t<=this.#O)return!1;const{MAX_DIM:a}=this;if(e>a||t>a)return!0;const r=e*t;if(this._hasMaxArea)return r>this.M\
AX_AREA;if(r<this.#O**2)return!1;if(this._areGoodDims(e,t)){this.#O=Math.max(this.#O,Math.floor(Math.sqrt(e*t)));return!1}this.#O=this._guessMax(this.#O,a,128,0);return r>(this.MAX_AREA=this.#O**2)}static getReducePowerForJPX(e,t,a){const r=e*t,i=2**30/(4*a);if(!this.needsToBeResized(e,t))return r>i?Math.ceil(Math.log2(r/i)):0;const{MAX_DIM:n,MAX_AREA:s}=this,o=Math.max(e/n,t/n,Math.sqrt(r/Math.min(i,s)));return Math.ceil(Math.log2(o))}static get MAX_DIM(){return shadow(this,"MAX_DIM",this._gues\
sMax(2048,65537,0,1))}static get MAX_AREA(){this._hasMaxArea=!0;return shadow(this,"MAX_AREA",this._guessMax(this.#O,this.MAX_DIM,128,0)**2)}static set MAX_AREA(e){if(e>=0){this._hasMaxArea=!0;shadow(this,"MAX_AREA",e)}}static setOptions({canvasMaxAreaInBytes:e=-1,isImageDecoderSupported:t=!1}){this._hasMaxArea||(this.MAX_AREA=e>>2);this.#M=t}static _areGoodDims(e,t){try{const a=new OffscreenCanvas(e,t),r=a.getContext("2d");r.fillRect(0,0,1,1);const i=r.getImageData(0,0,1,1).data[3];a.width=a.he\
ight=1;return 0!==i}catch{return!1}}static _guessMax(e,t,a,r){for(;e+a+1<t;){const a=Math.floor((e+t)/2),i=r||a;this._areGoodDims(a,i)?e=a:t=a}return e}static async createImage(e,t=!1){return new ImageResizer(e,t)._createImage()}async _createImage(){const{_imgData:e}=this,{width:t,height:a}=e;if(t*a*4>va){const e=this.#D();if(e)return e}const r=this._encodeBMP();let i,n;if(await ImageResizer.canUseImageDecoder){i=new ImageDecoder({data:r,type:"image/bmp",preferAnimation:!1,transfer:[r.buffer]});\
n=i.decode().catch((e=>{warn(`BMP image decoding failed: ${e}`);return createImageBitmap(new Blob([this._encodeBMP().buffer],{type:"image/bmp"}))})).finally((()=>{i.close()}))}else n=createImageBitmap(new Blob([r.buffer],{type:"image/bmp"}));const{MAX_AREA:s,MAX_DIM:o}=ImageResizer,c=Math.max(t/o,a/o,Math.sqrt(t*a/s)),l=Math.max(c,2),h=Math.round(10*(c+1.25))/10/l,u=Math.floor(Math.log2(h)),d=new Array(u+2).fill(2);d[0]=l;d.splice(-1,1,h/(1<<u));let f=t,g=a;const p=await n;let m=p.image||p;for(c\
onst e of d){const t=f,a=g;f=Math.floor(f/e)-1;g=Math.floor(g/e)-1;const r=new OffscreenCanvas(f,g);r.getContext("2d").drawImage(m,0,0,t,a,0,0,f,g);m.close();m=r.transferToImageBitmap()}e.data=null;e.bitmap=m;e.width=f;e.height=g;return e}#D(){const{_imgData:e}=this,{data:t,width:a,height:r,kind:i}=e,n=a*r*4,s=Math.ceil(Math.log2(n/va)),o=a>>s,c=r>>s;let l,h=r;try{l=new Uint8Array(n)}catch{let e=Math.floor(Math.log2(n+1));for(;;)try{l=new Uint8Array(2**e-1);break}catch{e-=1}h=Math.floor((2**e-1)\
/(4*a));const t=a*h*4;t<l.length&&(l=new Uint8Array(t))}const u=new Uint32Array(l.buffer),d=new Uint32Array(o*c);let f=0,g=0;const p=Math.ceil(r/h),m=r%h==0?r:r%h;for(let e=0;e<p;e++){const r=e<p-1?h:m;({srcPos:f}=convertToRGBA({kind:i,src:t,dest:u,width:a,height:r,inverseDecode:this._isMask,srcPos:f}));for(let e=0,t=r>>s;e<t;e++){const t=u.subarray((e<<s)*a);for(let e=0;e<o;e++)d[g++]=t[e<<s]}}if(ImageResizer.needsToBeResized(o,c)){e.data=d;e.width=o;e.height=c;e.kind=v;return null}const b=new \
OffscreenCanvas(o,c);b.getContext("2d",{willReadFrequently:!0}).putImageData(new ImageData(new Uint8ClampedArray(d.buffer),o,c),0,0);e.data=null;e.bitmap=b.transferToImageBitmap();e.width=o;e.height=c;return e}_encodeBMP(){const{width:e,height:t,kind:a}=this._imgData;let r,i=this._imgData.data,n=new Uint8Array(0),s=n,o=0;switch(a){case k:{r=1;n=new Uint8Array(this._isMask?[255,255,255,255,0,0,0,0]:[0,0,0,0,255,255,255,255]);const a=e+7>>3,s=a+3&-4;if(a!==s){const e=new Uint8Array(s*t);let r=0;fo\
r(let n=0,o=t*a;n<o;n+=a,r+=s)e.set(i.subarray(n,n+a),r);i=e}break}case C:r=24;if(3&e){const a=3*e,r=a+3&-4,n=r-a,s=new Uint8Array(r*t);let o=0;for(let e=0,r=t*a;e<r;e+=a){const t=i.subarray(e,e+a);for(let e=0;e<a;e+=3){s[o++]=t[e+2];s[o++]=t[e+1];s[o++]=t[e]}o+=n}i=s}else for(let e=0,t=i.length;e<t;e+=3){const t=i[e];i[e]=i[e+2];i[e+2]=t}break;case v:r=32;o=3;s=new Uint8Array(68);const a=new DataView(s.buffer);if(FeatureTest.isLittleEndian){a.setUint32(0,255,!0);a.setUint32(4,65280,!0);a.setUin\
t32(8,16711680,!0);a.setUint32(12,4278190080,!0)}else{a.setUint32(0,4278190080,!0);a.setUint32(4,16711680,!0);a.setUint32(8,65280,!0);a.setUint32(12,255,!0)}break;default:throw new Error("invalid format")}let c=0;const l=40+s.length,h=14+l+n.length+i.length,u=new Uint8Array(h),d=new DataView(u.buffer);d.setUint16(c,19778,!0);c+=2;d.setUint32(c,h,!0);c+=4;d.setUint32(c,0,!0);c+=4;d.setUint32(c,14+l+n.length,!0);c+=4;d.setUint32(c,l,!0);c+=4;d.setInt32(c,e,!0);c+=4;d.setInt32(c,-t,!0);c+=4;d.setUi\
nt16(c,1,!0);c+=2;d.setUint16(c,r,!0);c+=2;d.setUint32(c,o,!0);c+=4;d.setUint32(c,0,!0);c+=4;d.setInt32(c,0,!0);c+=4;d.setInt32(c,0,!0);c+=4;d.setUint32(c,n.length/4,!0);c+=4;d.setUint32(c,0,!0);c+=4;u.set(s,c);c+=s.length;u.set(n,c);c+=n.length;u.set(i,c);return u}}const La=new Uint8Array(0);class DecodeStream extends BaseStream{constructor(e){super();this._rawMinBufferLength=e||0;this.pos=0;this.bufferLength=0;this.eof=!1;this.buffer=La;this.minBufferLength=512;if(e)for(;this.minBufferLength<e\
;)this.minBufferLength*=2}get isEmpty(){for(;!this.eof&&0===this.bufferLength;)this.readBlock();return 0===this.bufferLength}ensureBuffer(e){const t=this.buffer;if(e<=t.byteLength)return t;let a=this.minBufferLength;for(;a<e;)a*=2;const r=new Uint8Array(a);r.set(t);return this.buffer=r}getByte(){const e=this.pos;for(;this.bufferLength<=e;){if(this.eof)return-1;this.readBlock()}return this.buffer[this.pos++]}getBytes(e,t=null){const a=this.pos;let r;if(e){this.ensureBuffer(a+e);r=a+e;for(;!this.e\
of&&this.bufferLength<r;)this.readBlock(t);const i=this.bufferLength;r>i&&(r=i)}else{for(;!this.eof;)this.readBlock(t);r=this.bufferLength}this.pos=r;return this.buffer.subarray(a,r)}async getImageData(e,t){if(!this.canAsyncDecodeImageFromBuffer)return this.isAsyncDecoder?this.decodeImage(null,t):this.getBytes(e,t);const a=await this.stream.asyncGetBytes();return this.decodeImage(a,t)}reset(){this.pos=0}makeSubStream(e,t,a=null){if(void 0===t)for(;!this.eof;)this.readBlock();else{const a=e+t;for\
(;this.bufferLength<=a&&!this.eof;)this.readBlock()}return new Stream(this.buffer,e,t,a)}getBaseStreams(){return this.str?this.str.getBaseStreams():null}}class StreamsSequenceStream extends DecodeStream{constructor(e,t=null){e=e.filter((e=>e instanceof BaseStream));let a=0;for(const t of e)a+=t instanceof DecodeStream?t._rawMinBufferLength:t.length;super(a);this.streams=e;this._onError=t}readBlock(){const e=this.streams;if(0===e.length){this.eof=!0;return}const t=e.shift();let a;try{a=t.getBytes\
()}catch(e){if(this._onError){this._onError(e,t.dict?.objId);return}throw e}const r=this.bufferLength,i=r+a.length;this.ensureBuffer(i).set(a,r);this.bufferLength=i}getBaseStreams(){const e=[];for(const t of this.streams){const a=t.getBaseStreams();a&&e.push(...a)}return e.length>0?e:null}}class ColorSpaceUtils{static parse({cs:e,xref:t,resources:a=null,pdfFunctionFactory:r,globalColorSpaceCache:i,localColorSpaceCache:n,asyncIfNotCached:s=!1}){const o={xref:t,resources:a,pdfFunctionFactory:r,glo\
balColorSpaceCache:i,localColorSpaceCache:n};let c,l,h;if(e instanceof Ref){l=e;const a=i.getByRef(l)||n.getByRef(l);if(a)return a;e=t.fetch(e)}if(e instanceof Name){c=e.name;const t=n.getByName(c);if(t)return t}try{h=this.#B(e,o)}catch(e){if(s&&!(e instanceof MissingDataException))return Promise.reject(e);throw e}if(c||l){n.set(c,l,h);l&&i.set(null,l,h)}return s?Promise.resolve(h):h}static#R(e,t){const{globalColorSpaceCache:a}=t;let r;if(e instanceof Ref){r=e;const t=a.getByRef(r);if(t)return t\
}const i=this.#B(e,t);r&&a.set(null,r,i);return i}static#B(e,t){const{xref:a,resources:r,pdfFunctionFactory:i,globalColorSpaceCache:n}=t;if((e=a.fetchIfRef(e))instanceof Name)switch(e.name){case"G":case"DeviceGray":return this.gray;case"RGB":case"DeviceRGB":return this.rgb;case"DeviceRGBA":return this.rgba;case"CMYK":case"DeviceCMYK":return this.cmyk;case"Pattern":return new PatternCS(null);default:if(r instanceof Dict){const a=r.get("ColorSpace");if(a instanceof Dict){const r=a.get(e.name);if(r\
){if(r instanceof Name)return this.#B(r,t);e=r;break}}}warn(`Unrecognized ColorSpace: ${e.name}`);return this.gray}if(Array.isArray(e)){const r=a.fetchIfRef(e[0]).name;let s,o,c,l,h,u;switch(r){case"G":case"DeviceGray":return this.gray;case"RGB":case"DeviceRGB":return this.rgb;case"CMYK":case"DeviceCMYK":return this.cmyk;case"CalGray":s=a.fetchIfRef(e[1]);l=s.getArray("WhitePoint");h=s.getArray("BlackPoint");u=s.get("Gamma");return new CalGrayCS(l,h,u);case"CalRGB":s=a.fetchIfRef(e[1]);l=s.getAr\
ray("WhitePoint");h=s.getArray("BlackPoint");u=s.getArray("Gamma");const d=s.getArray("Matrix");return new CalRGBCS(l,h,u,d);case"ICCBased":const f=e[1]instanceof Ref;if(f){const t=n.getByRef(e[1]);if(t)return t}const g=a.fetchIfRef(e[1]),p=g.dict;o=p.get("N");if(IccColorSpace.isUsable)try{const t=new IccColorSpace(g.getBytes(),"ICCBased",o);f&&n.set(null,e[1],t);return t}catch(t){if(t instanceof MissingDataException)throw t;warn(`ICCBased color space (${e[1]}): "${t}".`)}const m=p.getRaw("Alter\
nate");if(m){const e=this.#R(m,t);if(e.numComps===o)return e;warn("ICCBased color space: Ignoring incorrect /Alternate entry.")}if(1===o)return this.gray;if(3===o)return this.rgb;if(4===o)return this.cmyk;break;case"Pattern":c=e[1]||null;c&&(c=this.#R(c,t));return new PatternCS(c);case"I":case"Indexed":c=this.#R(e[1],t);const b=MathClamp(a.fetchIfRef(e[2]),0,255),y=a.fetchIfRef(e[3]);return new IndexedCS(c,b,y);case"Separation":case"DeviceN":const w=a.fetchIfRef(e[1]);o=Array.isArray(w)?w.length\
:1;c=this.#R(e[2],t);const x=i.create(e[3]);return new AlternateCS(o,c,x);case"Lab":s=a.fetchIfRef(e[1]);l=s.getArray("WhitePoint");h=s.getArray("BlackPoint");const S=s.getArray("Range");return new LabCS(l,h,S);default:warn(`Unimplemented ColorSpace object: ${r}`);return this.gray}}warn(`Unrecognized ColorSpace object: ${e}`);return this.gray}static get gray(){return shadow(this,"gray",new DeviceGrayCS)}static get rgb(){return shadow(this,"rgb",new DeviceRgbCS)}static get rgba(){return shadow(th\
is,"rgba",new DeviceRgbaCS)}static get cmyk(){if(CmykICCBasedCS.isUsable)try{return shadow(this,"cmyk",new CmykICCBasedCS)}catch{warn("CMYK fallback: DeviceCMYK")}return shadow(this,"cmyk",new DeviceCmykCS)}}class JpegError extends fa{constructor(e){super(e,"JpegError")}}class DNLMarkerError extends fa{constructor(e,t){super(e,"DNLMarkerError");this.scanLines=t}}class EOIMarkerError extends fa{constructor(e){super(e,"EOIMarkerError")}}const ja=new Uint8Array([0,1,8,16,9,2,3,10,17,24,32,25,18,11,\
4,5,12,19,26,33,40,48,41,34,27,20,13,6,7,14,21,28,35,42,49,56,57,50,43,36,29,22,15,23,30,37,44,51,58,59,52,45,38,31,39,46,53,60,61,54,47,55,62,63]),_a=4017,Ua=799,Xa=3406,qa=2276,Ha=1567,Wa=3784,za=5793,$a=2896;function buildHuffmanTable(e,t){let a,r,i=0,n=16;for(;n>0&&!e[n-1];)n--;const s=[{children:[],index:0}];let o,c=s[0];for(a=0;a<n;a++){for(r=0;r<e[a];r++){c=s.pop();c.children[c.index]=t[i];for(;c.index>0;)c=s.pop();c.index++;s.push(c);for(;s.length<=a;){s.push(o={children:[],index:0});c.c\
hildren[c.index]=o.children;c=o}i++}if(a+1<n){s.push(o={children:[],index:0});c.children[c.index]=o.children;c=o}}return s[0].children}function getBlockBufferOffset(e,t,a){return 64*((e.blocksPerLine+1)*t+a)}function decodeScan(e,t,a,r,i,n,s,o,c,l=!1){const h=a.mcusPerLine,u=a.progressive,d=t;let f=0,g=0;function readBit(){if(g>0){g--;return f>>g&1}f=e[t++];if(255===f){const r=e[t++];if(r){if(220===r&&l){const r=readUint16(e,t+=2);t+=2;if(r>0&&r!==a.scanLines)throw new DNLMarkerError("Found DNL \
marker (0xFFDC) while parsing scan data",r)}else if(217===r){if(l){const e=y*(8===a.precision?8:0);if(e>0&&Math.round(a.scanLines/e)>=5)throw new DNLMarkerError("Found EOI marker (0xFFD9) while parsing scan data, possibly caused by incorrect `scanLines` parameter",e)}throw new EOIMarkerError("Found EOI marker (0xFFD9) while parsing scan data")}throw new JpegError(`unexpected marker ${(f<<8|r).toString(16)}`)}}g=7;return f>>>7}function decodeHuffman(e){let t=e;for(;;){t=t[readBit()];switch(typeof\
 t){case"number":return t;case"object":continue}throw new JpegError("invalid huffman sequence")}}function receive(e){let t=0;for(;e>0;){t=t<<1|readBit();e--}return t}function receiveAndExtend(e){if(1===e)return 1===readBit()?1:-1;const t=receive(e);return t>=1<<e-1?t:t+(-1<<e)+1}let p=0;let m,b=0;let y=0;function decodeMcu(e,t,a,r,i){const n=a%h;y=(a/h|0)*e.v+r;const s=n*e.h+i;t(e,getBlockBufferOffset(e,y,s))}function decodeBlock(e,t,a){y=a/e.blocksPerLine|0;const r=a%e.blocksPerLine;t(e,getBloc\
kBufferOffset(e,y,r))}const w=r.length;let x,S,k,C,v,F;F=u?0===n?0===o?function decodeDCFirst(e,t){const a=decodeHuffman(e.huffmanTableDC),r=0===a?0:receiveAndExtend(a)<<c;e.blockData[t]=e.pred+=r}:function decodeDCSuccessive(e,t){e.blockData[t]|=readBit()<<c}:0===o?function decodeACFirst(e,t){if(p>0){p--;return}let a=n;const r=s;for(;a<=r;){const r=decodeHuffman(e.huffmanTableAC),i=15&r,n=r>>4;if(0===i){if(n<15){p=receive(n)+(1<<n)-1;break}a+=16;continue}a+=n;const s=ja[a];e.blockData[t+s]=rece\
iveAndExtend(i)*(1<<c);a++}}:function decodeACSuccessive(e,t){let a=n;const r=s;let i,o,l=0;for(;a<=r;){const r=t+ja[a],n=e.blockData[r]<0?-1:1;switch(b){case 0:o=decodeHuffman(e.huffmanTableAC);i=15&o;l=o>>4;if(0===i)if(l<15){p=receive(l)+(1<<l);b=4}else{l=16;b=1}else{if(1!==i)throw new JpegError("invalid ACn encoding");m=receiveAndExtend(i);b=l?2:3}continue;case 1:case 2:if(e.blockData[r])e.blockData[r]+=n*(readBit()<<c);else{l--;0===l&&(b=2===b?3:0)}break;case 3:if(e.blockData[r])e.blockData[\
r]+=n*(readBit()<<c);else{e.blockData[r]=m<<c;b=0}break;case 4:e.blockData[r]&&(e.blockData[r]+=n*(readBit()<<c))}a++}if(4===b){p--;0===p&&(b=0)}}:function decodeBaseline(e,t){const a=decodeHuffman(e.huffmanTableDC),r=0===a?0:receiveAndExtend(a);e.blockData[t]=e.pred+=r;let i=1;for(;i<64;){const a=decodeHuffman(e.huffmanTableAC),r=15&a,n=a>>4;if(0===r){if(n<15)break;i+=16;continue}i+=n;const s=ja[i];e.blockData[t+s]=receiveAndExtend(r);i++}};let T,O=0;const M=1===w?r[0].blocksPerLine*r[0].blocks\
PerColumn:h*a.mcusPerColumn;let D,R;for(;O<=M;){const a=i?Math.min(M-O,i):M;if(a>0){for(S=0;S<w;S++)r[S].pred=0;p=0;if(1===w){x=r[0];for(v=0;v<a;v++){decodeBlock(x,F,O);O++}}else for(v=0;v<a;v++){for(S=0;S<w;S++){x=r[S];D=x.h;R=x.v;for(k=0;k<R;k++)for(C=0;C<D;C++)decodeMcu(x,F,O,k,C)}O++}}g=0;T=findNextFileMarker(e,t);if(!T)break;if(T.invalid){warn(`decodeScan - ${a>0?"unexpected":"excessive"} MCU data, current marker is: ${T.invalid}`);t=T.offset}if(!(T.marker>=65488&&T.marker<=65495))break;t+=\
2}return t-d}function quantizeAndInverse(e,t,a){const r=e.quantizationTable,i=e.blockData;let n,s,o,c,l,h,u,d,f,g,p,m,b,y,w,x,S;if(!r)throw new JpegError("missing required Quantization Table.");for(let e=0;e<64;e+=8){f=i[t+e];g=i[t+e+1];p=i[t+e+2];m=i[t+e+3];b=i[t+e+4];y=i[t+e+5];w=i[t+e+6];x=i[t+e+7];f*=r[e];if(g|p|m|b|y|w|x){g*=r[e+1];p*=r[e+2];m*=r[e+3];b*=r[e+4];y*=r[e+5];w*=r[e+6];x*=r[e+7];n=za*f+128>>8;s=za*b+128>>8;o=p;c=w;l=$a*(g-x)+128>>8;d=$a*(g+x)+128>>8;h=m<<4;u=y<<4;n=n+s+1>>1;s=n-\
s;S=o*Wa+c*Ha+128>>8;o=o*Ha-c*Wa+128>>8;c=S;l=l+u+1>>1;u=l-u;d=d+h+1>>1;h=d-h;n=n+c+1>>1;c=n-c;s=s+o+1>>1;o=s-o;S=l*qa+d*Xa+2048>>12;l=l*Xa-d*qa+2048>>12;d=S;S=h*Ua+u*_a+2048>>12;h=h*_a-u*Ua+2048>>12;u=S;a[e]=n+d;a[e+7]=n-d;a[e+1]=s+u;a[e+6]=s-u;a[e+2]=o+h;a[e+5]=o-h;a[e+3]=c+l;a[e+4]=c-l}else{S=za*f+512>>10;a[e]=S;a[e+1]=S;a[e+2]=S;a[e+3]=S;a[e+4]=S;a[e+5]=S;a[e+6]=S;a[e+7]=S}}for(let e=0;e<8;++e){f=a[e];g=a[e+8];p=a[e+16];m=a[e+24];b=a[e+32];y=a[e+40];w=a[e+48];x=a[e+56];if(g|p|m|b|y|w|x){n=za\
*f+2048>>12;s=za*b+2048>>12;o=p;c=w;l=$a*(g-x)+2048>>12;d=$a*(g+x)+2048>>12;h=m;u=y;n=4112+(n+s+1>>1);s=n-s;S=o*Wa+c*Ha+2048>>12;o=o*Ha-c*Wa+2048>>12;c=S;l=l+u+1>>1;u=l-u;d=d+h+1>>1;h=d-h;n=n+c+1>>1;c=n-c;s=s+o+1>>1;o=s-o;S=l*qa+d*Xa+2048>>12;l=l*Xa-d*qa+2048>>12;d=S;S=h*Ua+u*_a+2048>>12;h=h*_a-u*Ua+2048>>12;u=S;f=n+d;x=n-d;g=s+u;w=s-u;p=o+h;y=o-h;m=c+l;b=c-l;f<16?f=0:f>=4080?f=255:f>>=4;g<16?g=0:g>=4080?g=255:g>>=4;p<16?p=0:p>=4080?p=255:p>>=4;m<16?m=0:m>=4080?m=255:m>>=4;b<16?b=0:b>=4080?b=255\
:b>>=4;y<16?y=0:y>=4080?y=255:y>>=4;w<16?w=0:w>=4080?w=255:w>>=4;x<16?x=0:x>=4080?x=255:x>>=4;i[t+e]=f;i[t+e+8]=g;i[t+e+16]=p;i[t+e+24]=m;i[t+e+32]=b;i[t+e+40]=y;i[t+e+48]=w;i[t+e+56]=x}else{S=za*f+8192>>14;S=S<-2040?0:S>=2024?255:S+2056>>4;i[t+e]=S;i[t+e+8]=S;i[t+e+16]=S;i[t+e+24]=S;i[t+e+32]=S;i[t+e+40]=S;i[t+e+48]=S;i[t+e+56]=S}}}function buildComponentData(e,t){const a=t.blocksPerLine,r=t.blocksPerColumn,i=new Int16Array(64);for(let e=0;e<r;e++)for(let r=0;r<a;r++){quantizeAndInverse(t,getBl\
ockBufferOffset(t,e,r),i)}return t.blockData}function findNextFileMarker(e,t,a=t){const r=e.length-1;let i=a<t?a:t;if(t>=r)return null;const n=readUint16(e,t);if(n>=65472&&n<=65534)return{invalid:null,marker:n,offset:t};let s=readUint16(e,i);for(;!(s>=65472&&s<=65534);){if(++i>=r)return null;s=readUint16(e,i)}return{invalid:n.toString(16),marker:s,offset:i}}function prepareComponents(e){const t=Math.ceil(e.samplesPerLine/8/e.maxH),a=Math.ceil(e.scanLines/8/e.maxV);for(const r of e.components){co\
nst i=Math.ceil(Math.ceil(e.samplesPerLine/8)*r.h/e.maxH),n=Math.ceil(Math.ceil(e.scanLines/8)*r.v/e.maxV),s=t*r.h,o=64*(a*r.v)*(s+1);r.blockData=new Int16Array(o);r.blocksPerLine=i;r.blocksPerColumn=n}e.mcusPerLine=t;e.mcusPerColumn=a}function readDataBlock(e,t){const a=readUint16(e,t);let r=(t+=2)+a-2;const i=findNextFileMarker(e,r,t);if(i?.invalid){warn("readDataBlock - incorrect length, current marker is: "+i.invalid);r=i.offset}const n=e.subarray(t,r);return{appData:n,oldOffset:t,newOffset:\
t+n.length}}function skipData(e,t){const a=readUint16(e,t),r=(t+=2)+a-2,i=findNextFileMarker(e,r,t);return i?.invalid?i.offset:r}class JpegImage{constructor({decodeTransform:e=null,colorTransform:t=-1}={}){this._decodeTransform=e;this._colorTransform=t}static canUseImageDecoder(e,t=-1){let a=null,r=0,i=null,n=readUint16(e,r);r+=2;if(65496!==n)throw new JpegError("SOI not found");n=readUint16(e,r);r+=2;e:for(;65497!==n;){switch(n){case 65505:const{appData:t,oldOffset:s,newOffset:o}=readDataBlock(\
e,r);r=o;if(69===t[0]&&120===t[1]&&105===t[2]&&102===t[3]&&0===t[4]&&0===t[5]){if(a)throw new JpegError("Duplicate EXIF-blocks found.");a={exifStart:s+6,exifEnd:o}}n=readUint16(e,r);r+=2;continue;case 65472:case 65473:case 65474:i=e[r+7];break e;case 65535:255!==e[r]&&r--}r=skipData(e,r);n=readUint16(e,r);r+=2}return 4===i||3===i&&0===t?null:a||{}}parse(e,{dnlScanLines:t=null}={}){let a,r,i=0,n=null,s=null,o=0;const c=[],l=[],h=[];let u=readUint16(e,i);i+=2;if(65496!==u)throw new JpegError("SOI \
not found");u=readUint16(e,i);i+=2;e:for(;65497!==u;){let d,f,g;switch(u){case 65504:case 65505:case 65506:case 65507:case 65508:case 65509:case 65510:case 65511:case 65512:case 65513:case 65514:case 65515:case 65516:case 65517:case 65518:case 65519:case 65534:const{appData:p,newOffset:m}=readDataBlock(e,i);i=m;65504===u&&74===p[0]&&70===p[1]&&73===p[2]&&70===p[3]&&0===p[4]&&(n={version:{major:p[5],minor:p[6]},densityUnits:p[7],xDensity:p[8]<<8|p[9],yDensity:p[10]<<8|p[11],thumbWidth:p[12],thumb\
Height:p[13],thumbData:p.subarray(14,14+3*p[12]*p[13])});65518===u&&65===p[0]&&100===p[1]&&111===p[2]&&98===p[3]&&101===p[4]&&(s={version:p[5]<<8|p[6],flags0:p[7]<<8|p[8],flags1:p[9]<<8|p[10],transformCode:p[11]});break;case 65499:const b=readUint16(e,i);i+=2;const y=b+i-2;let w;for(;i<y;){const t=e[i++],a=new Uint16Array(64);if(t>>4){if(t>>4!=1)throw new JpegError("DQT - invalid table spec");for(f=0;f<64;f++){w=ja[f];a[w]=readUint16(e,i);i+=2}}else for(f=0;f<64;f++){w=ja[f];a[w]=e[i++]}c[15&t]=\
a}break;case 65472:case 65473:case 65474:if(a)throw new JpegError("Only single frame JPEGs supported");i+=2;a={};a.extended=65473===u;a.progressive=65474===u;a.precision=e[i++];const x=readUint16(e,i);i+=2;a.scanLines=t||x;a.samplesPerLine=readUint16(e,i);i+=2;a.components=[];a.componentIds={};const S=e[i++];let k=0,C=0;for(d=0;d<S;d++){const t=e[i],r=e[i+1]>>4,n=15&e[i+1];k<r&&(k=r);C<n&&(C=n);const s=e[i+2];g=a.components.push({h:r,v:n,quantizationId:s,quantizationTable:null});a.componentIds[t\
]=g-1;i+=3}a.maxH=k;a.maxV=C;prepareComponents(a);break;case 65476:const v=readUint16(e,i);i+=2;for(d=2;d<v;){const t=e[i++],a=new Uint8Array(16);let r=0;for(f=0;f<16;f++,i++)r+=a[f]=e[i];const n=new Uint8Array(r);for(f=0;f<r;f++,i++)n[f]=e[i];d+=17+r;(t>>4?l:h)[15&t]=buildHuffmanTable(a,n)}break;case 65501:i+=2;r=readUint16(e,i);i+=2;break;case 65498:const F=1==++o&&!t;i+=2;const T=e[i++],O=[];for(d=0;d<T;d++){const t=e[i++],r=a.componentIds[t],n=a.components[r];n.index=t;const s=e[i++];n.huffm\
anTableDC=h[s>>4];n.huffmanTableAC=l[15&s];O.push(n)}const M=e[i++],D=e[i++],R=e[i++];try{i+=decodeScan(e,i,a,O,r,M,D,R>>4,15&R,F)}catch(t){if(t instanceof DNLMarkerError){warn(`${t.message} -- attempting to re-parse the JPEG image.`);return this.parse(e,{dnlScanLines:t.scanLines})}if(t instanceof EOIMarkerError){warn(`${t.message} -- ignoring the rest of the image data.`);break e}throw t}break;case 65500:i+=4;break;case 65535:255!==e[i]&&i--;break;default:const N=findNextFileMarker(e,i-2,i-3);i\
f(N?.invalid){warn("JpegImage.parse - unexpected data, current marker is: "+N.invalid);i=N.offset;break}if(!N||i>=e.length-1){warn("JpegImage.parse - reached the end of the image data without finding an EOI marker (0xFFD9).");break e}throw new JpegError("JpegImage.parse - unknown marker: "+u.toString(16))}u=readUint16(e,i);i+=2}if(!a)throw new JpegError("JpegImage.parse - no frame data found.");this.width=a.samplesPerLine;this.height=a.scanLines;this.jfif=n;this.adobe=s;this.components=[];for(co\
nst e of a.components){const t=c[e.quantizationId];t&&(e.quantizationTable=t);this.components.push({index:e.index,output:buildComponentData(0,e),scaleX:e.h/a.maxH,scaleY:e.v/a.maxV,blocksPerLine:e.blocksPerLine,blocksPerColumn:e.blocksPerColumn})}this.numComponents=this.components.length}_getLinearizedBlockData(e,t,a=!1){const r=this.width/e,i=this.height/t;let n,s,o,c,l,h,u,d,f,g,p,m=0;const b=this.components.length,y=e*t*b,w=new Uint8ClampedArray(y),x=new Uint32Array(e),S=4294967288;let k;for(\
u=0;u<b;u++){n=this.components[u];s=n.scaleX*r;o=n.scaleY*i;m=u;p=n.output;c=n.blocksPerLine+1<<3;if(s!==k){for(l=0;l<e;l++){d=0|l*s;x[l]=(d&S)<<3|7&d}k=s}for(h=0;h<t;h++){d=0|h*o;g=c*(d&S)|(7&d)<<3;for(l=0;l<e;l++){w[m]=p[g+x[l]];m+=b}}}let C=this._decodeTransform;a||4!==b||C||(C=new Int32Array([-256,255,-256,255,-256,255,-256,255]));if(C)for(u=0;u<y;)for(d=0,f=0;d<b;d++,u++,f+=2)w[u]=(w[u]*C[f]>>8)+C[f+1];return w}get _isColorConversionNeeded(){return this.adobe?!!this.adobe.transformCode:3===\
this.numComponents?0!==this._colorTransform&&(82!==this.components[0].index||71!==this.components[1].index||66!==this.components[2].index):1===this._colorTransform}_convertYccToRgb(e){let t,a,r;for(let i=0,n=e.length;i<n;i+=3){t=e[i];a=e[i+1];r=e[i+2];e[i]=t-179.456+1.402*r;e[i+1]=t+135.459-.344*a-.714*r;e[i+2]=t-226.816+1.772*a}return e}_convertYccToRgba(e,t){for(let a=0,r=0,i=e.length;a<i;a+=3,r+=4){const i=e[a],n=e[a+1],s=e[a+2];t[r]=i-179.456+1.402*s;t[r+1]=i+135.459-.344*n-.714*s;t[r+2]=i-2\
26.816+1.772*n;t[r+3]=255}return t}_convertYcckToRgb(e){this._convertYcckToCmyk(e);return this._convertCmykToRgb(e)}_convertYcckToRgba(e){this._convertYcckToCmyk(e);return this._convertCmykToRgba(e)}_convertYcckToCmyk(e){let t,a,r;for(let i=0,n=e.length;i<n;i+=4){t=e[i];a=e[i+1];r=e[i+2];e[i]=434.456-t-1.402*r;e[i+1]=119.541-t+.344*a+.714*r;e[i+2]=481.816-t-1.772*a}return e}_convertCmykToRgb(e){const t=e.length/4;ColorSpaceUtils.cmyk.getRgbBuffer(e,0,t,e,0,8,0);return e.subarray(0,3*t)}_convertC\
mykToRgba(e){ColorSpaceUtils.cmyk.getRgbBuffer(e,0,e.length/4,e,0,8,1);if(ColorSpaceUtils.cmyk instanceof DeviceCmykCS)for(let t=3,a=e.length;t<a;t+=4)e[t]=255;return e}getData({width:e,height:t,forceRGBA:a=!1,forceRGB:r=!1,isSourcePDF:i=!1}){if(this.numComponents>4)throw new JpegError("Unsupported color mode");const n=this._getLinearizedBlockData(e,t,i);if(1===this.numComponents&&(a||r)){const e=n.length*(a?4:3),t=new Uint8ClampedArray(e);let r=0;if(a)!function grayToRGBA(e,t){if(FeatureTest.is\
LittleEndian)for(let a=0,r=e.length;a<r;a++)t[a]=65793*e[a]|4278190080;else for(let a=0,r=e.length;a<r;a++)t[a]=16843008*e[a]|255}(n,new Uint32Array(t.buffer));else for(const e of n){t[r++]=e;t[r++]=e;t[r++]=e}return t}if(3===this.numComponents&&this._isColorConversionNeeded){if(a){const e=new Uint8ClampedArray(n.length/3*4);return this._convertYccToRgba(n,e)}return this._convertYccToRgb(n)}if(4===this.numComponents){if(this._isColorConversionNeeded)return a?this._convertYcckToRgba(n):r?this._co\
nvertYcckToRgb(n):this._convertYcckToCmyk(n);if(a)return this._convertCmykToRgba(n);if(r)return this._convertCmykToRgb(n)}return n}}class JpegStream extends DecodeStream{static#M=FeatureTest.isImageDecoderSupported;constructor(e,t,a){super(t);this.stream=e;this.dict=e.dict;this.maybeLength=t;this.params=a}static get canUseImageDecoder(){return shadow(this,"canUseImageDecoder",this.#M?ImageDecoder.isTypeSupported("image/jpeg"):Promise.resolve(!1))}static setOptions({isImageDecoderSupported:e=!1})\
{this.#M=e}get bytes(){return shadow(this,"bytes",this.stream.getBytes(this.maybeLength))}ensureBuffer(e){}readBlock(){this.decodeImage()}get jpegOptions(){const e={decodeTransform:void 0,colorTransform:void 0},t=this.dict.getArray("D","Decode");if((this.forceRGBA||this.forceRGB)&&Array.isArray(t)){const a=this.dict.get("BPC","BitsPerComponent")||8,r=t.length,i=new Int32Array(r);let n=!1;const s=(1<<a)-1;for(let e=0;e<r;e+=2){i[e]=256*(t[e+1]-t[e])|0;i[e+1]=t[e]*s|0;256===i[e]&&0===i[e+1]||(n=!0\
)}n&&(e.decodeTransform=i)}if(this.params instanceof Dict){const t=this.params.get("ColorTransform");Number.isInteger(t)&&(e.colorTransform=t)}return shadow(this,"jpegOptions",e)}#N(e){for(let t=0,a=e.length-1;t<a;t++)if(255===e[t]&&216===e[t+1]){t>0&&(e=e.subarray(t));break}return e}decodeImage(e){if(this.eof)return this.buffer;e=this.#N(e||this.bytes);const t=new JpegImage(this.jpegOptions);t.parse(e);const a=t.getData({width:this.drawWidth,height:this.drawHeight,forceRGBA:this.forceRGBA,force\
RGB:this.forceRGB,isSourcePDF:!0});this.buffer=a;this.bufferLength=a.length;this.eof=!0;return this.buffer}get canAsyncDecodeImageFromBuffer(){return this.stream.isAsync}async getTransferableImage(){if(!await JpegStream.canUseImageDecoder)return null;const e=this.jpegOptions;if(e.decodeTransform)return null;let t;try{const a=this.canAsyncDecodeImageFromBuffer&&await this.stream.asyncGetBytes()||this.bytes;if(!a)return null;let r=this.#N(a);const i=JpegImage.canUseImageDecoder(r,e.colorTransform)\
;if(!i)return null;if(i.exifStart){r=r.slice();r.fill(0,i.exifStart,i.exifEnd)}t=new ImageDecoder({data:r,type:"image/jpeg",preferAnimation:!1});return(await t.decode()).image}catch(e){warn(`getTransferableImage - failed: "${e}".`);return null}finally{t?.close()}}}var OpenJPEG=async function(e={}){var t,a,r=e,i=new Promise(((e,r)=>{t=e;a=r})),n="./this.program",quit_=(e,t)=>{throw t},s=import.meta.url;try{new URL(".",s).href}catch{}var o,c,l,h,u,d,f=console.log.bind(console),g=console.error.bind\
(console),p=!1;function updateMemoryViews(){var e=o.buffer;l=new Int8Array(e);new Int16Array(e);h=new Uint8Array(e);new Uint16Array(e);u=new Int32Array(e);d=new Uint32Array(e);new Float32Array(e);new Float64Array(e);new BigInt64Array(e);new BigUint64Array(e)}var m=0,b=null;class ExitStatus{name="ExitStatus";constructor(e){this.message=`Program terminated with exit(${e})`;this.status=e}}var callRuntimeCallbacks=e=>{for(;e.length>0;)e.shift()(r)},y=[],addOnPostRun=e=>y.push(e),w=[],addOnPreRun=e=>\
w.push(e),x=!0,S=0,k={},handleException=e=>{if(e instanceof ExitStatus||"unwind"==e)return c;quit_(0,e)},keepRuntimeAlive=()=>x||S>0,_proc_exit=e=>{c=e;if(!keepRuntimeAlive()){r.onExit?.(e);p=!0}quit_(0,new ExitStatus(e))},_exit=(e,t)=>{c=e;_proc_exit(e)},callUserCallback=e=>{if(!p)try{e();(()=>{if(!keepRuntimeAlive())try{_exit(c)}catch(e){handleException(e)}})()}catch(e){handleException(e)}},growMemory=e=>{var t=(e-o.buffer.byteLength+65535)/65536|0;try{o.grow(t);updateMemoryViews();return 1}ca\
tch(e){}},C={},getEnvStrings=()=>{if(!getEnvStrings.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:n||"./this.program"};for(var t in C)void 0===C[t]?delete e[t]:e[t]=C[t];var a=[];for(var t in e)a.push(`${t}=${e[t]}`);getEnvStrings.strings=a}return getEnvStrings.strings},lengthBytesUTF8=e=>{for(var t=0,a=0;a<e.length;++a){var r=e.charCodeAt(a)\
;if(r<=127)t++;else if(r<=2047)t+=2;else if(r>=55296&&r<=57343){t+=4;++a}else t+=3}return t},v=[null,[],[]],F="undefined"!=typeof TextDecoder?new TextDecoder:void 0,UTF8ArrayToString=(e,t=0,a=NaN)=>{for(var r=t+a,i=t;e[i]&&!(i>=r);)++i;if(i-t>16&&e.buffer&&F)return F.decode(e.subarray(t,i));for(var n="";t<i;){var s=e[t++];if(128&s){var o=63&e[t++];if(192!=(224&s)){var c=63&e[t++];if((s=224==(240&s)?(15&s)<<12|o<<6|c:(7&s)<<18|o<<12|c<<6|63&e[t++])<65536)n+=String.fromCharCode(s);else{var l=s-655\
36;n+=String.fromCharCode(55296|l>>10,56320|1023&l)}}else n+=String.fromCharCode((31&s)<<6|o)}else n+=String.fromCharCode(s)}return n},printChar=(e,t)=>{var a=v[e];if(0===t||10===t){(1===e?f:g)(UTF8ArrayToString(a));a.length=0}else a.push(t)},UTF8ToString=(e,t)=>e?UTF8ArrayToString(h,e,t):"";r.noExitRuntime&&(x=r.noExitRuntime);r.print&&(f=r.print);r.printErr&&(g=r.printErr);r.wasmBinary&&r.wasmBinary;r.arguments&&r.arguments;r.thisProgram&&(n=r.thisProgram);r.writeArrayToMemory=(e,t)=>{l.set(e,\
t)};var T={l:()=>function abort(e){r.onAbort?.(e);g(e="Aborted("+e+")");p=!0;e+=". Build with -sASSERTIONS for more info.";var t=new WebAssembly.RuntimeError(e);a(t);throw t}(""),k:()=>{x=!1;S=0},m:(e,t)=>{if(k[e]){clearTimeout(k[e].id);delete k[e]}if(!t)return 0;var a=setTimeout((()=>{delete k[e];callUserCallback((()=>M(e,performance.now())))}),t);k[e]={id:a,timeout_ms:t};return 0},g:function _copy_pixels_1(e,t){e>>=2;const a=r.imageData=new Uint8ClampedArray(t),i=u.subarray(e,e+t);a.set(i)},f:\
function _copy_pixels_3(e,t,a,i){e>>=2;t>>=2;a>>=2;const n=r.imageData=new Uint8ClampedArray(3*i),s=u.subarray(e,e+i),o=u.subarray(t,t+i),c=u.subarray(a,a+i);for(let e=0;e<i;e++){n[3*e]=s[e];n[3*e+1]=o[e];n[3*e+2]=c[e]}},e:function _copy_pixels_4(e,t,a,i,n){e>>=2;t>>=2;a>>=2;i>>=2;const s=r.imageData=new Uint8ClampedArray(4*n),o=u.subarray(e,e+n),c=u.subarray(t,t+n),l=u.subarray(a,a+n),h=u.subarray(i,i+n);for(let e=0;e<n;e++){s[4*e]=o[e];s[4*e+1]=c[e];s[4*e+2]=l[e];s[4*e+3]=h[e]}},n:e=>{var t,a,\
r=h.length,i=2147483648;if((e>>>=0)>i)return!1;for(var n=1;n<=4;n*=2){var s=r*(1+.2/n);s=Math.min(s,e+100663296);var o=Math.min(i,(t=Math.max(e,s),a=65536,Math.ceil(t/a)*a));if(growMemory(o))return!0}return!1},p:(e,t)=>{var a=0,r=0;for(var i of getEnvStrings()){var n=t+a;d[e+r>>2]=n;a+=((e,t,a,r)=>{if(!(r>0))return 0;for(var i=a,n=a+r-1,s=0;s<e.length;++s){var o=e.charCodeAt(s);o>=55296&&o<=57343&&(o=65536+((1023&o)<<10)|1023&e.charCodeAt(++s));if(o<=127){if(a>=n)break;t[a++]=o}else if(o<=2047){\
if(a+1>=n)break;t[a++]=192|o>>6;t[a++]=128|63&o}else if(o<=65535){if(a+2>=n)break;t[a++]=224|o>>12;t[a++]=128|o>>6&63;t[a++]=128|63&o}else{if(a+3>=n)break;t[a++]=240|o>>18;t[a++]=128|o>>12&63;t[a++]=128|o>>6&63;t[a++]=128|63&o}}t[a]=0;return a-i})(i,h,n,1/0)+1;r+=4}return 0},q:(e,t)=>{var a=getEnvStrings();d[e>>2]=a.length;var r=0;for(var i of a)r+=lengthBytesUTF8(i)+1;d[t>>2]=r;return 0},b:e=>52,o:function _fd_seek(e,t,a,r){t=(i=t)<-9007199254740992||i>9007199254740992?NaN:Number(i);var i;retur\
n 70},c:(e,t,a,r)=>{for(var i=0,n=0;n<a;n++){var s=d[t>>2],o=d[t+4>>2];t+=8;for(var c=0;c<o;c++)printChar(e,h[s+c]);i+=o}d[r>>2]=i;return 0},r:function _gray_to_rgba(e,t){e>>=2;const a=r.imageData=new Uint8ClampedArray(4*t),i=u.subarray(e,e+t);for(let e=0;e<t;e++){a[4*e]=a[4*e+1]=a[4*e+2]=i[e];a[4*e+3]=255}},i:function _graya_to_rgba(e,t,a){e>>=2;t>>=2;const i=r.imageData=new Uint8ClampedArray(4*a),n=u.subarray(e,e+a),s=u.subarray(t,t+a);for(let e=0;e<a;e++){i[4*e]=i[4*e+1]=i[4*e+2]=n[e];i[4*e+3\
]=s[e]}},d:function _jsPrintWarning(e){const t=UTF8ToString(e);(r.warn||console.warn)(`OpenJPEG: ${t}`)},j:_proc_exit,h:function _rgb_to_rgba(e,t,a,i){e>>=2;t>>=2;a>>=2;const n=r.imageData=new Uint8ClampedArray(4*i),s=u.subarray(e,e+i),o=u.subarray(t,t+i),c=u.subarray(a,a+i);for(let e=0;e<i;e++){n[4*e]=s[e];n[4*e+1]=o[e];n[4*e+2]=c[e];n[4*e+3]=255}},a:function _storeErrorMessage(e){const t=UTF8ToString(e);r.errorMessages?r.errorMessages+="\\n"+t:r.errorMessages=t}},O=await async function createWa\
sm(){function receiveInstance(e,t){O=e.exports;o=O.s;updateMemoryViews();!function removeRunDependency(e){m--;r.monitorRunDependencies?.(m);if(0==m&&b){var t=b;b=null;t()}}();return O}!function addRunDependency(e){m++;r.monitorRunDependencies?.(m)}();var e=function getWasmImports(){return{a:T}}();return new Promise(((t,a)=>{r.instantiateWasm(e,((e,a)=>{t(receiveInstance(e))}))}))}(),M=(O.t,r._malloc=O.u,r._free=O.v,r._jp2_decode=O.w,O.x);!function preInit(){if(r.preInit){"function"==typeof r.pre\
Init&&(r.preInit=[r.preInit]);for(;r.preInit.length>0;)r.preInit.shift()()}}();!function run(){if(m>0)b=run;else{!function preRun(){if(r.preRun){"function"==typeof r.preRun&&(r.preRun=[r.preRun]);for(;r.preRun.length;)addOnPreRun(r.preRun.shift())}callRuntimeCallbacks(w)}();if(m>0)b=run;else if(r.setStatus){r.setStatus("Running...");setTimeout((()=>{setTimeout((()=>r.setStatus("")),1);doRun()}),1)}else doRun()}function doRun(){r.calledRun=!0;if(!p){!function initRuntime(){O.t()}();t(r);r.onRunti\
meInitialized?.();!function postRun(){if(r.postRun){"function"==typeof r.postRun&&(r.postRun=[r.postRun]);for(;r.postRun.length;)addOnPostRun(r.postRun.shift())}callRuntimeCallbacks(y)}()}}}();return i};const Ga=OpenJPEG;class JpxError extends fa{constructor(e){super(e,"JpxError")}}class JpxImage{static#E=null;static#P=null;static#L=null;static#v=!0;static#j=!0;static#F=null;static setOptions({handler:e,useWasm:t,useWorkerFetch:a,wasmUrl:r}){this.#v=t;this.#j=a;this.#F=r;a||(this.#P=e)}static as\
ync#_(e){const t=`${this.#F}openjpeg_nowasm_fallback.js`;let a=null;try{a=(await import(\n/*webpackIgnore: true*/\n/*@vite-ignore*/\nt)).default()}catch(e){warn(`JpxImage#getJsModule: ${e}`)}e(a)}static async#U(e,t,a){const r="openjpeg.wasm";try{this.#E||(this.#j?this.#E=await fetchBinaryData(`${this.#F}${r}`):this.#E=await this.#P.sendWithPromise("FetchBinaryData",{type:"wasmFactory",filename:r}));return a((await WebAssembly.instantiate(this.#E,t)).instance)}catch(t){warn(`JpxImage#instantiateWasm\
: ${t}`);this.#_(e);return null}finally{this.#P=null}}static async decode(e,{numComponents:t=4,isIndexedColormap:a=!1,smaskInData:r=!1,reducePower:i=0}={}){if(!this.#L){const{promise:e,resolve:t}=Promise.withResolvers(),a=[e];this.#v?a.push(Ga({warn,instantiateWasm:this.#U.bind(this,t)})):this.#_(t);this.#L=Promise.race(a)}const n=await this.#L;if(!n)throw new JpxError("OpenJPEG failed to initialize");let s;try{const o=e.length;s=n._malloc(o);n.writeArrayToMemory(e,s);if(n._jp2_decode(s,o,t>0?t:\
0,!!a,!!r,i)){const{errorMessages:e}=n;if(e){delete n.errorMessages;throw new JpxError(e)}throw new JpxError("Unknown error")}const{imageData:c}=n;n.imageData=null;return c}finally{s&&n._free(s)}}static cleanup(){this.#L=null}static parseImageProperties(e){let t=e.getByte();for(;t>=0;){const a=t;t=e.getByte();if(65361===(a<<8|t)){e.skip(4);const t=e.getInt32()>>>0,a=e.getInt32()>>>0,r=e.getInt32()>>>0,i=e.getInt32()>>>0;e.skip(16);return{width:t-r,height:a-i,bitsPerComponent:8,componentsCount:e.\
getUint16()}}}throw new JpxError("No size marker found in JPX stream")}}function addState(e,t,a,r,i){let n=e;for(let e=0,a=t.length-1;e<a;e++){const a=t[e];n=n[a]||=[]}n[t.at(-1)]={checkFn:a,iterateFn:r,processFn:i}}const Va=[];addState(Va,[Be,Ne,Yt,Re],null,(function iterateInlineImageGroup(e,t){const a=e.fnArray,r=(t-(e.iCurr-3))%4;switch(r){case 0:return a[t]===Be;case 1:return a[t]===Ne;case 2:return a[t]===Yt;case 3:return a[t]===Re}throw new Error(`iterateInlineImageGroup - invalid pos: ${\
r}`)}),(function foundInlineImageGroup(e,t){const a=e.fnArray,r=e.argsArray,i=e.iCurr,n=i-3,s=i-2,o=i-1,c=Math.min(Math.floor((t-n)/4),200);if(c<10)return t-(t-n)%4;let l=0;const h=[];let u=0,d=1,f=1;for(let e=0;e<c;e++){const t=r[s+(e<<2)],a=r[o+(e<<2)][0];if(d+a.width>1e3){l=Math.max(l,d);f+=u+2;d=0;u=0}h.push({transform:t,x:d,y:f,w:a.width,h:a.height});d+=a.width+2;u=Math.max(u,a.height)}const g=Math.max(l,d)+1,p=f+u+1,m=new Uint8Array(g*p*4),b=g<<2;for(let e=0;e<c;e++){const t=r[o+(e<<2)][0]\
.data,a=h[e].w<<2;let i=0,n=h[e].x+h[e].y*g<<2;m.set(t.subarray(0,a),n-b);for(let r=0,s=h[e].h;r<s;r++){m.set(t.subarray(i,i+a),n);i+=a;n+=b}m.set(t.subarray(i-a,i),n);for(;n>=0;){t[n-4]=t[n];t[n-3]=t[n+1];t[n-2]=t[n+2];t[n-1]=t[n+3];t[n+a]=t[n+a-4];t[n+a+1]=t[n+a-3];t[n+a+2]=t[n+a-2];t[n+a+3]=t[n+a-1];n-=b}}const y={width:g,height:p};if(e.isOffscreenCanvasSupported){const e=new OffscreenCanvas(g,p);e.getContext("2d").putImageData(new ImageData(new Uint8ClampedArray(m.buffer),g,p),0,0);y.bitmap=\
e.transferToImageBitmap();y.data=null}else{y.kind=v;y.data=m}a.splice(n,4*c,Zt);r.splice(n,4*c,[y,h]);return n+1}));addState(Va,[Be,Ne,Vt,Re],null,(function iterateImageMaskGroup(e,t){const a=e.fnArray,r=(t-(e.iCurr-3))%4;switch(r){case 0:return a[t]===Be;case 1:return a[t]===Ne;case 2:return a[t]===Vt;case 3:return a[t]===Re}throw new Error(`iterateImageMaskGroup - invalid pos: ${r}`)}),(function foundImageMaskGroup(e,t){const a=e.fnArray,r=e.argsArray,i=e.iCurr,n=i-3,s=i-2,o=i-1;let c=Math.flo\
or((t-n)/4);if(c<10)return t-(t-n)%4;let l,h,u=!1;const d=r[o][0],f=r[s][0],g=r[s][1],p=r[s][2],m=r[s][3];if(g===p){u=!0;l=s+4;let e=o+4;for(let t=1;t<c;t++,l+=4,e+=4){h=r[l];if(r[e][0]!==d||h[0]!==f||h[1]!==g||h[2]!==p||h[3]!==m){t<10?u=!1:c=t;break}}}if(u){c=Math.min(c,1e3);const e=new Float32Array(2*c);l=s;for(let t=0;t<c;t++,l+=4){h=r[l];e[t<<1]=h[4];e[1+(t<<1)]=h[5]}a.splice(n,4*c,ea);r.splice(n,4*c,[d,f,g,p,m,e])}else{c=Math.min(c,100);const e=[];for(let t=0;t<c;t++){h=r[s+(t<<2)];const a=\
r[o+(t<<2)][0];e.push({data:a.data,width:a.width,height:a.height,interpolate:a.interpolate,count:a.count,transform:h})}a.splice(n,4*c,Kt);r.splice(n,4*c,[e])}return n+1}));addState(Va,[Be,Ne,Jt,Re],(function(e){const t=e.argsArray,a=e.iCurr-2;return 0===t[a][1]&&0===t[a][2]}),(function iterateImageGroup(e,t){const a=e.fnArray,r=e.argsArray,i=(t-(e.iCurr-3))%4;switch(i){case 0:return a[t]===Be;case 1:if(a[t]!==Ne)return!1;const i=e.iCurr-2,n=r[i][0],s=r[i][3];return r[t][0]===n&&0===r[t][1]&&0===\
r[t][2]&&r[t][3]===s;case 2:if(a[t]!==Jt)return!1;const o=r[e.iCurr-1][0];return r[t][0]===o;case 3:return a[t]===Re}throw new Error(`iterateImageGroup - invalid pos: ${i}`)}),(function(e,t){const a=e.fnArray,r=e.argsArray,i=e.iCurr,n=i-3,s=i-2,o=r[i-1][0],c=r[s][0],l=r[s][3],h=Math.min(Math.floor((t-n)/4),1e3);if(h<3)return t-(t-n)%4;const u=new Float32Array(2*h);let d=s;for(let e=0;e<h;e++,d+=4){const t=r[d];u[e<<1]=t[4];u[1+(e<<1)]=t[5]}const f=[o,c,l,u];a.splice(n,4*h,Qt);r.splice(n,4*h,f);r\
eturn n+1}));addState(Va,[Qe,nt,ht,dt,et],null,(function iterateShowTextGroup(e,t){const a=e.fnArray,r=e.argsArray,i=(t-(e.iCurr-4))%5;switch(i){case 0:return a[t]===Qe;case 1:return a[t]===nt;case 2:return a[t]===ht;case 3:if(a[t]!==dt)return!1;const i=e.iCurr-3,n=r[i][0],s=r[i][1];return r[t][0]===n&&r[t][1]===s;case 4:return a[t]===et}throw new Error(`iterateShowTextGroup - invalid pos: ${i}`)}),(function(e,t){const a=e.fnArray,r=e.argsArray,i=e.iCurr,n=i-4,s=i-3,o=i-2,c=i-1,l=i,h=r[s][0],u=r\
[s][1];let d=Math.min(Math.floor((t-n)/5),1e3);if(d<3)return t-(t-n)%5;let f=n;if(n>=4&&a[n-4]===a[s]&&a[n-3]===a[o]&&a[n-2]===a[c]&&a[n-1]===a[l]&&r[n-4][0]===h&&r[n-4][1]===u){d++;f-=5}let g=f+4;for(let e=1;e<d;e++){a.splice(g,3);r.splice(g,3);g+=2}return g+1}));addState(Va,[Be,Ne,aa,Re],(e=>{const t=e.argsArray,a=t[e.iCurr-1][0];if(a!==qe&&a!==He&&a!==$e&&a!==Ge&&a!==Ve&&a!==Ke)return!0;const r=t[e.iCurr-2];return 1===r[0]&&0===r[1]&&0===r[2]&&1===r[3]}),(()=>!1),((e,t)=>{const{fnArray:a,args\
Array:r}=e,i=e.iCurr,n=i-3,s=i-2,o=r[i-1],c=r[s],[,[l],h]=o;if(h){Util.scaleMinMax(c,h);for(let e=0,t=l.length;e<t;)switch(l[e++]){case sa:case oa:Util.applyTransform(l,c,e);e+=2;break;case ca:Util.applyTransformToBezier(l,c,e);e+=6}}a.splice(n,4,aa);r.splice(n,4,o);return n+1}));class NullOptimizer{constructor(e){this.queue=e}_optimize(){}push(e,t){this.queue.fnArray.push(e);this.queue.argsArray.push(t);this._optimize()}flush(){}reset(){}}class QueueOptimizer extends NullOptimizer{constructor(e\
){super(e);this.state=null;this.context={iCurr:0,fnArray:e.fnArray,argsArray:e.argsArray,isOffscreenCanvasSupported:OperatorList.isOffscreenCanvasSupported};this.match=null;this.lastProcessed=0}_optimize(){const e=this.queue.fnArray;let t=this.lastProcessed,a=e.length,r=this.state,i=this.match;if(!r&&!i&&t+1===a&&!Va[e[t]]){this.lastProcessed=a;return}const n=this.context;for(;t<a;){if(i){if((0,i.iterateFn)(n,t)){t++;continue}t=(0,i.processFn)(n,t+1);a=e.length;i=null;r=null;if(t>=a)break}r=(r||\
Va)[e[t]];if(r&&!Array.isArray(r)){n.iCurr=t;t++;if(!r.checkFn||(0,r.checkFn)(n)){i=r;r=null}else r=null}else t++}this.state=r;this.match=i;this.lastProcessed=t}flush(){for(;this.match;){const e=this.queue.fnArray.length;this.lastProcessed=(0,this.match.processFn)(this.context,e);this.match=null;this.state=null;this._optimize()}}reset(){this.state=null;this.match=null;this.lastProcessed=0}}class OperatorList{static CHUNK_SIZE=1e3;static CHUNK_SIZE_ABOUT=this.CHUNK_SIZE-5;static isOffscreenCanvas\
Supported=!1;constructor(e=0,t){this._streamSink=t;this.fnArray=[];this.argsArray=[];this.optimizer=!t||e&d?new NullOptimizer(this):new QueueOptimizer(this);this.dependencies=new Set;this._totalLength=0;this.weight=0;this._resolved=t?null:Promise.resolve()}static setOptions({isOffscreenCanvasSupported:e}){this.isOffscreenCanvasSupported=e}get length(){return this.argsArray.length}get ready(){return this._resolved||this._streamSink.ready}get totalLength(){return this._totalLength+this.length}addO\
p(e,t){this.optimizer.push(e,t);this.weight++;this._streamSink&&(this.weight>=OperatorList.CHUNK_SIZE||this.weight>=OperatorList.CHUNK_SIZE_ABOUT&&(e===Re||e===et))&&this.flush()}addImageOps(e,t,a,r=!1){if(r){this.addOp(Be);this.addOp(De,[[["SMask",!1]]])}void 0!==a&&this.addOp(jt,["OC",a]);this.addOp(e,t);void 0!==a&&this.addOp(_t,[]);r&&this.addOp(Re)}addDependency(e){if(!this.dependencies.has(e)){this.dependencies.add(e);this.addOp(ke,[e])}}addDependencies(e){for(const t of e)this.addDependen\
cy(t)}addOpList(e){if(e instanceof OperatorList){for(const t of e.dependencies)this.dependencies.add(t);for(let t=0,a=e.length;t<a;t++)this.addOp(e.fnArray[t],e.argsArray[t])}else warn(\'addOpList - ignoring invalid "opList" parameter.\')}getIR(){return{fnArray:this.fnArray,argsArray:this.argsArray,length:this.length}}get _transfers(){const e=[],{fnArray:t,argsArray:a,length:r}=this;for(let i=0;i<r;i++)switch(t[i]){case Yt:case Zt:case Vt:{const{bitmap:t,data:r}=a[i][0];(t||r?.buffer)&&e.push(t||r\
.buffer);break}case aa:{const[,[t],r]=a[i];t&&e.push(t.buffer,r.buffer);break}case qt:const[t,r]=a[i];t&&e.push(t.buffer);r&&e.push(r.buffer);break;case ht:e.push(a[i][0].buffer)}return e}flush(e=!1,t=null){this.optimizer.flush();const a=this.length;this._totalLength+=a;this._streamSink.enqueue({fnArray:this.fnArray,argsArray:this.argsArray,lastChunk:e,separateAnnots:t,length:a},1,this._transfers);this.dependencies.clear();this.fnArray.length=0;this.argsArray.length=0;this.weight=0;this.optimize\
r.reset()}}function hexToInt(e,t){let a=0;for(let r=0;r<=t;r++)a=a<<8|e[r];return a>>>0}function hexToStr(e,t){return 1===t?String.fromCharCode(e[0],e[1]):3===t?String.fromCharCode(e[0],e[1],e[2],e[3]):String.fromCharCode(...e.subarray(0,t+1))}function addHex(e,t,a){let r=0;for(let i=a;i>=0;i--){r+=e[i]+t[i];e[i]=255&r;r>>=8}}function incHex(e,t){let a=1;for(let r=t;r>=0&&a>0;r--){a+=e[r];e[r]=255&a;a>>=8}}const Ka=16;class BinaryCMapStream{constructor(e){this.buffer=e;this.pos=0;this.end=e.leng\
th;this.tmpBuf=new Uint8Array(19)}readByte(){return this.pos>=this.end?-1:this.buffer[this.pos++]}readNumber(){let e,t=0;do{const a=this.readByte();if(a<0)throw new FormatError("unexpected EOF in bcmap");e=!(128&a);t=t<<7|127&a}while(!e);return t}readSigned(){const e=this.readNumber();return 1&e?~(e>>>1):e>>>1}readHex(e,t){e.set(this.buffer.subarray(this.pos,this.pos+t+1));this.pos+=t+1}readHexNumber(e,t){let a;const r=this.tmpBuf;let i=0;do{const e=this.readByte();if(e<0)throw new FormatError("\
unexpected EOF in bcmap");a=!(128&e);r[i++]=127&e}while(!a);let n=t,s=0,o=0;for(;n>=0;){for(;o<8&&r.length>0;){s|=r[--i]<<o;o+=7}e[n]=255&s;n--;s>>=8;o-=8}}readHexSigned(e,t){this.readHexNumber(e,t);const a=1&e[t]?255:0;let r=0;for(let i=0;i<=t;i++){r=(1&r)<<8|e[i];e[i]=r>>1^a}}readString(){const e=this.readNumber(),t=new Array(e);for(let a=0;a<e;a++)t[a]=this.readNumber();return String.fromCharCode(...t)}}class BinaryCMapReader{async process(e,t,a){const r=new BinaryCMapStream(e),i=r.readByte()\
;t.vertical=!!(1&i);let n=null;const s=new Uint8Array(Ka),o=new Uint8Array(Ka),c=new Uint8Array(Ka),l=new Uint8Array(Ka),h=new Uint8Array(Ka);let u,d;for(;(d=r.readByte())>=0;){const e=d>>5;if(7===e){switch(31&d){case 0:r.readString();break;case 1:n=r.readString()}continue}const a=!!(16&d),i=15&d;if(i+1>Ka)throw new Error("BinaryCMapReader.process: Invalid dataSize.");const f=1,g=r.readNumber();switch(e){case 0:r.readHex(s,i);r.readHexNumber(o,i);addHex(o,s,i);t.addCodespaceRange(i+1,hexToInt(s,\
i),hexToInt(o,i));for(let e=1;e<g;e++){incHex(o,i);r.readHexNumber(s,i);addHex(s,o,i);r.readHexNumber(o,i);addHex(o,s,i);t.addCodespaceRange(i+1,hexToInt(s,i),hexToInt(o,i))}break;case 1:r.readHex(s,i);r.readHexNumber(o,i);addHex(o,s,i);r.readNumber();for(let e=1;e<g;e++){incHex(o,i);r.readHexNumber(s,i);addHex(s,o,i);r.readHexNumber(o,i);addHex(o,s,i);r.readNumber()}break;case 2:r.readHex(c,i);u=r.readNumber();t.mapOne(hexToInt(c,i),u);for(let e=1;e<g;e++){incHex(c,i);if(!a){r.readHexNumber(h,i\
);addHex(c,h,i)}u=r.readSigned()+(u+1);t.mapOne(hexToInt(c,i),u)}break;case 3:r.readHex(s,i);r.readHexNumber(o,i);addHex(o,s,i);u=r.readNumber();t.mapCidRange(hexToInt(s,i),hexToInt(o,i),u);for(let e=1;e<g;e++){incHex(o,i);if(a)s.set(o);else{r.readHexNumber(s,i);addHex(s,o,i)}r.readHexNumber(o,i);addHex(o,s,i);u=r.readNumber();t.mapCidRange(hexToInt(s,i),hexToInt(o,i),u)}break;case 4:r.readHex(c,f);r.readHex(l,i);t.mapOne(hexToInt(c,f),hexToStr(l,i));for(let e=1;e<g;e++){incHex(c,f);if(!a){r.rea\
dHexNumber(h,f);addHex(c,h,f)}incHex(l,i);r.readHexSigned(h,i);addHex(l,h,i);t.mapOne(hexToInt(c,f),hexToStr(l,i))}break;case 5:r.readHex(s,f);r.readHexNumber(o,f);addHex(o,s,f);r.readHex(l,i);t.mapBfRange(hexToInt(s,f),hexToInt(o,f),hexToStr(l,i));for(let e=1;e<g;e++){incHex(o,f);if(a)s.set(o);else{r.readHexNumber(s,f);addHex(s,o,f)}r.readHexNumber(o,f);addHex(o,s,f);r.readHex(l,i);t.mapBfRange(hexToInt(s,f),hexToInt(o,f),hexToStr(l,i))}break;default:throw new Error(`BinaryCMapReader.process - \
unknown type: ${e}`)}}return n?a(n):t}}class Ascii85Stream extends DecodeStream{constructor(e,t){t&&(t*=.8);super(t);this.str=e;this.dict=e.dict;this.input=new Uint8Array(5)}readBlock(){const e=this.str;let t=e.getByte();for(;isWhiteSpace(t);)t=e.getByte();if(-1===t||126===t){this.eof=!0;return}const a=this.bufferLength;let r,i;if(122===t){r=this.ensureBuffer(a+4);for(i=0;i<4;++i)r[a+i]=0;this.bufferLength+=4}else{const n=this.input;n[0]=t;for(i=1;i<5;++i){t=e.getByte();for(;isWhiteSpace(t);)t=e\
.getByte();n[i]=t;if(-1===t||126===t)break}r=this.ensureBuffer(a+i-1);this.bufferLength+=i-1;if(i<5){for(;i<5;++i)n[i]=117;this.eof=!0}let s=0;for(i=0;i<5;++i)s=85*s+(n[i]-33);for(i=3;i>=0;--i){r[a+i]=255&s;s>>=8}}}}class AsciiHexStream extends DecodeStream{constructor(e,t){t&&(t*=.5);super(t);this.str=e;this.dict=e.dict;this.firstDigit=-1}readBlock(){const e=this.str.getBytes(8e3);if(!e.length){this.eof=!0;return}const t=e.length+1>>1,a=this.ensureBuffer(this.bufferLength+t);let r=this.bufferLe\
ngth,i=this.firstDigit;for(const t of e){let e;if(t>=48&&t<=57)e=15&t;else{if(!(t>=65&&t<=70||t>=97&&t<=102)){if(62===t){this.eof=!0;break}continue}e=9+(15&t)}if(i<0)i=e;else{a[r++]=i<<4|e;i=-1}}if(i>=0&&this.eof){a[r++]=i<<4;i=-1}this.firstDigit=i;this.bufferLength=r}}const Ja=-1,Ya=[[-1,-1],[-1,-1],[7,8],[7,7],[6,6],[6,6],[6,5],[6,5],[4,0],[4,0],[4,0],[4,0],[4,0],[4,0],[4,0],[4,0],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,4],[3,4],[3,4],\
[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,4],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[3,3],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1\
,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2],[1,2]],Za=[[-1,-1],[12,-2],[-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],[11,1792],[11,1792],[12,1984],[12,2048],[12,2112],[12,2176],[12,2240],[12,2304],[11,1856],[11,1856],[11,1920],[11,1920],[12,2368],[12,2432],[12,2496],[12,2560]],Qa=[[-1,-1],[-1,-1],[-1,-1],[-1,-1],[8,29],[8,29],[8,30],[8,30],[8,45],[8,45],[8,46],[8,46],[7,22],[7,22],[7,22],[7,22],[7,23],[7,23],[7,23],[7,23],\
[8,47],[8,47],[8,48],[8,48],[6,13],[6,13],[6,13],[6,13],[6,13],[6,13],[6,13],[6,13],[7,20],[7,20],[7,20],[7,20],[8,33],[8,33],[8,34],[8,34],[8,35],[8,35],[8,36],[8,36],[8,37],[8,37],[8,38],[8,38],[7,19],[7,19],[7,19],[7,19],[8,31],[8,31],[8,32],[8,32],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,1],[6,12],[6,12],[6,12],[6,12],[6,12],[6,12],[6,12],[6,12],[8,53],[8,53],[8,54],[8,54],[7,26],[7,26],[7,26],[7,26],[8,39],[8,39],[8,40],[8,40],[8,41],[8,41],[8,42],[8,42],[8,43],[8,43],[8,44],[8,44],[7,2\
1],[7,21],[7,21],[7,21],[7,28],[7,28],[7,28],[7,28],[8,61],[8,61],[8,62],[8,62],[8,63],[8,63],[8,0],[8,0],[8,320],[8,320],[8,384],[8,384],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,10],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[5,11],[7,27],[7,27],[7,27],[7,27],[8,59],[8,59],[8,60],[8,60],[9,1472],[9,1536],[9,1600],[9,1728],[7,18],[7,18],[7,18],[7,18],[7,24],[7,24],[7,2\
4],[7,24],[8,49],[8,49],[8,50],[8,50],[8,51],[8,51],[8,52],[8,52],[7,25],[7,25],[7,25],[7,25],[8,55],[8,55],[8,56],[8,56],[8,57],[8,57],[8,58],[8,58],[6,192],[6,192],[6,192],[6,192],[6,192],[6,192],[6,192],[6,192],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[6,1664],[8,448],[8,448],[8,512],[8,512],[9,704],[9,768],[8,640],[8,640],[8,576],[8,576],[9,832],[9,896],[9,960],[9,1024],[9,1088],[9,1152],[9,1216],[9,1280],[9,1344],[9,1408],[7,256],[7,256],[7,256],[7,256],[4,2],[4,2],[4,\
2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,2],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[4,3],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,128],[5,\
8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,8],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[5,9],[6,16],[6,16],[6,16],[6,16],[6,16],[6,16],[6,16],[6,16],[6,17],[6,17],[6,17],[6,17],[6,17],[6,17],[6,17],[6,17],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,4],[4,5],[\
4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[4,5],[6,14],[6,14],[6,14],[6,14],[6,14],[6,14],[6,14],[6,14],[6,15],[6,15],[6,15],[6,15],[6,15],[6,15],[6,15],[6,15],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[5,64],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[\
4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,6],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7],[4,7]],er=[[-1,-1],[-1,-1],[12,-2],[12,-2],[-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,-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],[11,1792],[11,1792],[11,1792],[11,1792],[12,1984],[12,1984],[12,2048],[12,2048],[12,2112],[12,2112],[12,2176],[12,2176],[12,2240],[12,2240],[12,2304],[12,2304],[11,1856],[11,1856],[11,1856],[11,1856],[11,1920],[11,1920],[11,1920],[11,1920],[12,2368],[12,2368],[12,2432],[12,2432],[12,2496],[12,2496],[12,2560],[12,2560],[10,18],[10,18],[10,18],[10,18],[10,18],[10,18],[10,18],[10,18],[12,52],[12,52],[13,640],[13,704],[13,768],[13,832],[12,55],[1\
2,55],[12,56],[12,56],[13,1280],[13,1344],[13,1408],[13,1472],[12,59],[12,59],[12,60],[12,60],[13,1536],[13,1600],[11,24],[11,24],[11,24],[11,24],[11,25],[11,25],[11,25],[11,25],[13,1664],[13,1728],[12,320],[12,320],[12,384],[12,384],[12,448],[12,448],[13,512],[13,576],[12,53],[12,53],[12,54],[12,54],[13,896],[13,960],[13,1024],[13,1088],[13,1152],[13,1216],[10,64],[10,64],[10,64],[10,64],[10,64],[10,64],[10,64],[10,64]],tr=[[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[\
8,13],[8,13],[8,13],[8,13],[8,13],[8,13],[11,23],[11,23],[12,50],[12,51],[12,44],[12,45],[12,46],[12,47],[12,57],[12,58],[12,61],[12,256],[10,16],[10,16],[10,16],[10,16],[10,17],[10,17],[10,17],[10,17],[12,48],[12,49],[12,62],[12,63],[12,30],[12,31],[12,32],[12,33],[12,40],[12,41],[11,22],[11,22],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[8,14],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10]\
,[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,10],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[7,11],[9,15],[9,15],[9,15],[9,15],[9,15],[9,15],[9,15],[9,15],[12,128],[12,192],[12,26],[12,27],[12,28],[12,29],[11,19],[11,19],[11,20],[11,20],[12,\
34],[12,35],[12,36],[12,37],[12,38],[12,39],[11,21],[11,21],[12,42],[12,43],[10,0],[10,0],[10,0],[10,0],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12],[7,12]],ar=[[-1,-1],[-1,-1],[-1,-1],[-1,-1],[6,9],[6,8],[5,7],[5,7],[4,6],[4,6],[4,6],[4,6],[4,5],[4,5],[4,5],[4,5],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,1],[3,4],[3,4],[3,\
4],[3,4],[3,4],[3,4],[3,4],[3,4],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,3],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2],[2,2]];class CCITTFaxDecoder{constructor(e,t={}){if("function"!=typeof e?.next)throw new Error(\'CCITTFaxDecoder - invalid "source" parameter.\');this.source=e;this.eof=!1;this.encoding=t.K||0;this.eoline=t.EndOfLine||!1;this.byteAlign=t.EncodedByteAlign||!1;this.columns=t.Columns||\
1728;this.rows=t.Rows||0;this.eoblock=t.EndOfBlock??!0;this.black=t.BlackIs1||!1;this.codingLine=new Uint32Array(this.columns+1);this.refLine=new Uint32Array(this.columns+2);this.codingLine[0]=this.columns;this.codingPos=0;this.row=0;this.nextLine2D=this.encoding<0;this.inputBits=0;this.inputBuf=0;this.outputBits=0;this.rowsDone=!1;let a;for(;0===(a=this._lookBits(12));)this._eatBits(1);1===a&&this._eatBits(12);if(this.encoding>0){this.nextLine2D=!this._lookBits(1);this._eatBits(1)}}readNextChar\
(){if(this.eof)return-1;const e=this.refLine,t=this.codingLine,a=this.columns;let r,i,n,s,o;if(0===this.outputBits){this.rowsDone&&(this.eof=!0);if(this.eof)return-1;this.err=!1;let n,o,c;if(this.nextLine2D){for(s=0;t[s]<a;++s)e[s]=t[s];e[s++]=a;e[s]=a;t[0]=0;this.codingPos=0;r=0;i=0;for(;t[this.codingPos]<a;){n=this._getTwoDimCode();switch(n){case 0:this._addPixels(e[r+1],i);e[r+1]<a&&(r+=2);break;case 1:n=o=0;if(i){do{n+=c=this._getBlackCode()}while(c>=64);do{o+=c=this._getWhiteCode()}while(c>\
=64)}else{do{n+=c=this._getWhiteCode()}while(c>=64);do{o+=c=this._getBlackCode()}while(c>=64)}this._addPixels(t[this.codingPos]+n,i);t[this.codingPos]<a&&this._addPixels(t[this.codingPos]+o,1^i);for(;e[r]<=t[this.codingPos]&&e[r]<a;)r+=2;break;case 7:this._addPixels(e[r]+3,i);i^=1;if(t[this.codingPos]<a){++r;for(;e[r]<=t[this.codingPos]&&e[r]<a;)r+=2}break;case 5:this._addPixels(e[r]+2,i);i^=1;if(t[this.codingPos]<a){++r;for(;e[r]<=t[this.codingPos]&&e[r]<a;)r+=2}break;case 3:this._addPixels(e[r\
]+1,i);i^=1;if(t[this.codingPos]<a){++r;for(;e[r]<=t[this.codingPos]&&e[r]<a;)r+=2}break;case 2:this._addPixels(e[r],i);i^=1;if(t[this.codingPos]<a){++r;for(;e[r]<=t[this.codingPos]&&e[r]<a;)r+=2}break;case 8:this._addPixelsNeg(e[r]-3,i);i^=1;if(t[this.codingPos]<a){r>0?--r:++r;for(;e[r]<=t[this.codingPos]&&e[r]<a;)r+=2}break;case 6:this._addPixelsNeg(e[r]-2,i);i^=1;if(t[this.codingPos]<a){r>0?--r:++r;for(;e[r]<=t[this.codingPos]&&e[r]<a;)r+=2}break;case 4:this._addPixelsNeg(e[r]-1,i);i^=1;if(t[\
this.codingPos]<a){r>0?--r:++r;for(;e[r]<=t[this.codingPos]&&e[r]<a;)r+=2}break;case Ja:this._addPixels(a,0);this.eof=!0;break;default:info("bad 2d code");this._addPixels(a,0);this.err=!0}}}else{t[0]=0;this.codingPos=0;i=0;for(;t[this.codingPos]<a;){n=0;if(i)do{n+=c=this._getBlackCode()}while(c>=64);else do{n+=c=this._getWhiteCode()}while(c>=64);this._addPixels(t[this.codingPos]+n,i);i^=1}}let l=!1;this.byteAlign&&(this.inputBits&=-8);if(this.eoblock||this.row!==this.rows-1){n=this._lookBits(12)\
;if(this.eoline)for(;n!==Ja&&1!==n;){this._eatBits(1);n=this._lookBits(12)}else for(;0===n;){this._eatBits(1);n=this._lookBits(12)}if(1===n){this._eatBits(12);l=!0}else n===Ja&&(this.eof=!0)}else this.rowsDone=!0;if(!this.eof&&this.encoding>0&&!this.rowsDone){this.nextLine2D=!this._lookBits(1);this._eatBits(1)}if(this.eoblock&&l&&this.byteAlign){n=this._lookBits(12);if(1===n){this._eatBits(12);if(this.encoding>0){this._lookBits(1);this._eatBits(1)}if(this.encoding>=0)for(s=0;s<4;++s){n=this._loo\
kBits(12);1!==n&&info("bad rtc code: "+n);this._eatBits(12);if(this.encoding>0){this._lookBits(1);this._eatBits(1)}}this.eof=!0}}else if(this.err&&this.eoline){for(;;){n=this._lookBits(13);if(n===Ja){this.eof=!0;return-1}if(n>>1==1)break;this._eatBits(1)}this._eatBits(12);if(this.encoding>0){this._eatBits(1);this.nextLine2D=!(1&n)}}this.outputBits=t[0]>0?t[this.codingPos=0]:t[this.codingPos=1];this.row++}if(this.outputBits>=8){o=1&this.codingPos?0:255;this.outputBits-=8;if(0===this.outputBits&&t\
[this.codingPos]<a){this.codingPos++;this.outputBits=t[this.codingPos]-t[this.codingPos-1]}}else{n=8;o=0;do{if("number"!=typeof this.outputBits)throw new FormatError(\'Invalid /CCITTFaxDecode data, "outputBits" must be a number.\');if(this.outputBits>n){o<<=n;1&this.codingPos||(o|=255>>8-n);this.outputBits-=n;n=0}else{o<<=this.outputBits;1&this.codingPos||(o|=255>>8-this.outputBits);n-=this.outputBits;this.outputBits=0;if(t[this.codingPos]<a){this.codingPos++;this.outputBits=t[this.codingPos]-t[th\
is.codingPos-1]}else if(n>0){o<<=n;n=0}}}while(n)}this.black&&(o^=255);return o}_addPixels(e,t){const a=this.codingLine;let r=this.codingPos;if(e>a[r]){if(e>this.columns){info("row is wrong length");this.err=!0;e=this.columns}1&r^t&&++r;a[r]=e}this.codingPos=r}_addPixelsNeg(e,t){const a=this.codingLine;let r=this.codingPos;if(e>a[r]){if(e>this.columns){info("row is wrong length");this.err=!0;e=this.columns}1&r^t&&++r;a[r]=e}else if(e<a[r]){if(e<0){info("invalid code");this.err=!0;e=0}for(;r>0&&e\
<a[r-1];)--r;a[r]=e}this.codingPos=r}_findTableCode(e,t,a,r){const i=r||0;for(let r=e;r<=t;++r){let e=this._lookBits(r);if(e===Ja)return[!0,1,!1];r<t&&(e<<=t-r);if(!i||e>=i){const t=a[e-i];if(t[0]===r){this._eatBits(r);return[!0,t[1],!0]}}}return[!1,0,!1]}_getTwoDimCode(){let e,t=0;if(this.eoblock){t=this._lookBits(7);e=Ya[t];if(e?.[0]>0){this._eatBits(e[0]);return e[1]}}else{const e=this._findTableCode(1,7,Ya);if(e[0]&&e[2])return e[1]}info("Bad two dim code");return Ja}_getWhiteCode(){let e,t=\
0;if(this.eoblock){t=this._lookBits(12);if(t===Ja)return 1;e=t>>5?Qa[t>>3]:Za[t];if(e[0]>0){this._eatBits(e[0]);return e[1]}}else{let e=this._findTableCode(1,9,Qa);if(e[0])return e[1];e=this._findTableCode(11,12,Za);if(e[0])return e[1]}info("bad white code");this._eatBits(1);return 1}_getBlackCode(){let e,t;if(this.eoblock){e=this._lookBits(13);if(e===Ja)return 1;t=e>>7?!(e>>9)&&e>>7?tr[(e>>1)-64]:ar[e>>7]:er[e];if(t[0]>0){this._eatBits(t[0]);return t[1]}}else{let e=this._findTableCode(2,6,ar);i\
f(e[0])return e[1];e=this._findTableCode(7,12,tr,64);if(e[0])return e[1];e=this._findTableCode(10,13,er);if(e[0])return e[1]}info("bad black code");this._eatBits(1);return 1}_lookBits(e){let t;for(;this.inputBits<e;){if(-1===(t=this.source.next()))return 0===this.inputBits?Ja:this.inputBuf<<e-this.inputBits&65535>>16-e;this.inputBuf=this.inputBuf<<8|t;this.inputBits+=8}return this.inputBuf>>this.inputBits-e&65535>>16-e}_eatBits(e){(this.inputBits-=e)<0&&(this.inputBits=0)}}class CCITTFaxStream e\
xtends DecodeStream{constructor(e,t,a){super(t);this.str=e;this.dict=e.dict;a instanceof Dict||(a=Dict.empty);const r={next:()=>e.getByte()};this.ccittFaxDecoder=new CCITTFaxDecoder(r,{K:a.get("K"),EndOfLine:a.get("EndOfLine"),EncodedByteAlign:a.get("EncodedByteAlign"),Columns:a.get("Columns"),Rows:a.get("Rows"),EndOfBlock:a.get("EndOfBlock"),BlackIs1:a.get("BlackIs1")})}readBlock(){for(;!this.eof;){const e=this.ccittFaxDecoder.readNextChar();if(-1===e){this.eof=!0;return}this.ensureBuffer(this.\
bufferLength+1);this.buffer[this.bufferLength++]=e}}}const rr=new Int32Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),ir=new Int32Array([3,4,5,6,7,8,9,10,65547,65549,65551,65553,131091,131095,131099,131103,196643,196651,196659,196667,262211,262227,262243,262259,327811,327843,327875,327907,258,258,258]),nr=new Int32Array([1,2,3,4,65541,65543,131081,131085,196625,196633,262177,262193,327745,327777,393345,393409,459009,459137,524801,525057,590849,591361,657409,658433,724993,727041,794625,7\
98721,868353,876545]),sr=[new Int32Array([459008,524368,524304,524568,459024,524400,524336,590016,459016,524384,524320,589984,524288,524416,524352,590048,459012,524376,524312,589968,459028,524408,524344,590032,459020,524392,524328,59e4,524296,524424,524360,590064,459010,524372,524308,524572,459026,524404,524340,590024,459018,524388,524324,589992,524292,524420,524356,590056,459014,524380,524316,589976,459030,524412,524348,590040,459022,524396,524332,590008,524300,524428,524364,590072,459009,52437\
0,524306,524570,459025,524402,524338,590020,459017,524386,524322,589988,524290,524418,524354,590052,459013,524378,524314,589972,459029,524410,524346,590036,459021,524394,524330,590004,524298,524426,524362,590068,459011,524374,524310,524574,459027,524406,524342,590028,459019,524390,524326,589996,524294,524422,524358,590060,459015,524382,524318,589980,459031,524414,524350,590044,459023,524398,524334,590012,524302,524430,524366,590076,459008,524369,524305,524569,459024,524401,524337,590018,459016,5\
24385,524321,589986,524289,524417,524353,590050,459012,524377,524313,589970,459028,524409,524345,590034,459020,524393,524329,590002,524297,524425,524361,590066,459010,524373,524309,524573,459026,524405,524341,590026,459018,524389,524325,589994,524293,524421,524357,590058,459014,524381,524317,589978,459030,524413,524349,590042,459022,524397,524333,590010,524301,524429,524365,590074,459009,524371,524307,524571,459025,524403,524339,590022,459017,524387,524323,589990,524291,524419,524355,590054,4590\
13,524379,524315,589974,459029,524411,524347,590038,459021,524395,524331,590006,524299,524427,524363,590070,459011,524375,524311,524575,459027,524407,524343,590030,459019,524391,524327,589998,524295,524423,524359,590062,459015,524383,524319,589982,459031,524415,524351,590046,459023,524399,524335,590014,524303,524431,524367,590078,459008,524368,524304,524568,459024,524400,524336,590017,459016,524384,524320,589985,524288,524416,524352,590049,459012,524376,524312,589969,459028,524408,524344,590033,\
459020,524392,524328,590001,524296,524424,524360,590065,459010,524372,524308,524572,459026,524404,524340,590025,459018,524388,524324,589993,524292,524420,524356,590057,459014,524380,524316,589977,459030,524412,524348,590041,459022,524396,524332,590009,524300,524428,524364,590073,459009,524370,524306,524570,459025,524402,524338,590021,459017,524386,524322,589989,524290,524418,524354,590053,459013,524378,524314,589973,459029,524410,524346,590037,459021,524394,524330,590005,524298,524426,524362,590\
069,459011,524374,524310,524574,459027,524406,524342,590029,459019,524390,524326,589997,524294,524422,524358,590061,459015,524382,524318,589981,459031,524414,524350,590045,459023,524398,524334,590013,524302,524430,524366,590077,459008,524369,524305,524569,459024,524401,524337,590019,459016,524385,524321,589987,524289,524417,524353,590051,459012,524377,524313,589971,459028,524409,524345,590035,459020,524393,524329,590003,524297,524425,524361,590067,459010,524373,524309,524573,459026,524405,524341\
,590027,459018,524389,524325,589995,524293,524421,524357,590059,459014,524381,524317,589979,459030,524413,524349,590043,459022,524397,524333,590011,524301,524429,524365,590075,459009,524371,524307,524571,459025,524403,524339,590023,459017,524387,524323,589991,524291,524419,524355,590055,459013,524379,524315,589975,459029,524411,524347,590039,459021,524395,524331,590007,524299,524427,524363,590071,459011,524375,524311,524575,459027,524407,524343,590031,459019,524391,524327,589999,524295,524423,52\
4359,590063,459015,524383,524319,589983,459031,524415,524351,590047,459023,524399,524335,590015,524303,524431,524367,590079]),9],or=[new Int32Array([327680,327696,327688,327704,327684,327700,327692,327708,327682,327698,327690,327706,327686,327702,327694,0,327681,327697,327689,327705,327685,327701,327693,327709,327683,327699,327691,327707,327687,327703,327695,0]),5];class FlateStream extends DecodeStream{constructor(e,t){super(t);this.str=e;this.dict=e.dict;const a=e.getByte(),r=e.getByte();if(-1\
===a||-1===r)throw new FormatError(`Invalid header in flate stream: ${a}, ${r}`);if(8!=(15&a))throw new FormatError(`Unknown compression method in flate stream: ${a}, ${r}`);if(((a<<8)+r)%31!=0)throw new FormatError(`Bad FCHECK in flate stream: ${a}, ${r}`);if(32&r)throw new FormatError(`FDICT bit set in flate stream: ${a}, ${r}`);this.codeSize=0;this.codeBuf=0}async getImageData(e,t){const a=await this.asyncGetBytes();return a?a.length<=e?a:a.subarray(0,e):this.getBytes(e)}async asyncGetBytes()\
{this.str.reset();const e=this.str.getBytes();try{const{readable:t,writable:a}=new DecompressionStream("deflate"),r=a.getWriter();await r.ready;r.write(e).then((async()=>{await r.ready;await r.close()})).catch((()=>{}));const i=[];let n=0;for await(const e of t){i.push(e);n+=e.byteLength}const s=new Uint8Array(n);let o=0;for(const e of i){s.set(e,o);o+=e.byteLength}return s}catch{this.str=new Stream(e,2,e.length,this.str.dict);this.reset();return null}}get isAsync(){return!0}getBits(e){const t=t\
his.str;let a,r=this.codeSize,i=this.codeBuf;for(;r<e;){if(-1===(a=t.getByte()))throw new FormatError("Bad encoding in flate stream");i|=a<<r;r+=8}a=i&(1<<e)-1;this.codeBuf=i>>e;this.codeSize=r-=e;return a}getCode(e){const t=this.str,a=e[0],r=e[1];let i,n=this.codeSize,s=this.codeBuf;for(;n<r&&-1!==(i=t.getByte());){s|=i<<n;n+=8}const o=a[s&(1<<r)-1],c=o>>16,l=65535&o;if(c<1||n<c)throw new FormatError("Bad encoding in flate stream");this.codeBuf=s>>c;this.codeSize=n-c;return l}generateHuffmanTab\
le(e){const t=e.length;let a,r=0;for(a=0;a<t;++a)e[a]>r&&(r=e[a]);const i=1<<r,n=new Int32Array(i);for(let s=1,o=0,c=2;s<=r;++s,o<<=1,c<<=1)for(let r=0;r<t;++r)if(e[r]===s){let e=0,t=o;for(a=0;a<s;++a){e=e<<1|1&t;t>>=1}for(a=e;a<i;a+=c)n[a]=s<<16|r;++o}return[n,r]}#X(e){info(e);this.eof=!0}readBlock(){let e,t,a;const r=this.str;try{t=this.getBits(3)}catch(e){this.#X(e.message);return}1&t&&(this.eof=!0);t>>=1;if(0===t){let t;if(-1===(t=r.getByte())){this.#X("Bad block header in flate stream");ret\
urn}let a=t;if(-1===(t=r.getByte())){this.#X("Bad block header in flate stream");return}a|=t<<8;if(-1===(t=r.getByte())){this.#X("Bad block header in flate stream");return}let i=t;if(-1===(t=r.getByte())){this.#X("Bad block header in flate stream");return}i|=t<<8;if(i!==(65535&~a)&&(0!==a||0!==i))throw new FormatError("Bad uncompressed block length in flate stream");this.codeBuf=0;this.codeSize=0;const n=this.bufferLength,s=n+a;e=this.ensureBuffer(s);this.bufferLength=s;if(0===a)-1===r.peekByte(\
)&&(this.eof=!0);else{const t=r.getBytes(a);e.set(t,n);t.length<a&&(this.eof=!0)}return}let i,n;if(1===t){i=sr;n=or}else{if(2!==t)throw new FormatError("Unknown block type in flate stream");{const e=this.getBits(5)+257,t=this.getBits(5)+1,r=this.getBits(4)+4,s=new Uint8Array(rr.length);let o;for(o=0;o<r;++o)s[rr[o]]=this.getBits(3);const c=this.generateHuffmanTable(s);a=0;o=0;const l=e+t,h=new Uint8Array(l);let u,d,f;for(;o<l;){const e=this.getCode(c);if(16===e){u=2;d=3;f=a}else if(17===e){u=3;d\
=3;f=a=0}else{if(18!==e){h[o++]=a=e;continue}u=7;d=11;f=a=0}let t=this.getBits(u)+d;for(;t-- >0;)h[o++]=f}i=this.generateHuffmanTable(h.subarray(0,e));n=this.generateHuffmanTable(h.subarray(e,l))}}e=this.buffer;let s=e?e.length:0,o=this.bufferLength;for(;;){let t=this.getCode(i);if(t<256){if(o+1>=s){e=this.ensureBuffer(o+1);s=e.length}e[o++]=t;continue}if(256===t){this.bufferLength=o;return}t-=257;t=ir[t];let r=t>>16;r>0&&(r=this.getBits(r));a=(65535&t)+r;t=this.getCode(n);t=nr[t];r=t>>16;r>0&&(\
r=this.getBits(r));const c=(65535&t)+r;if(o+a>=s){e=this.ensureBuffer(o+a);s=e.length}for(let t=0;t<a;++t,++o)e[o]=e[o-c]}}}const cr=[{qe:22017,nmps:1,nlps:1,switchFlag:1},{qe:13313,nmps:2,nlps:6,switchFlag:0},{qe:6145,nmps:3,nlps:9,switchFlag:0},{qe:2753,nmps:4,nlps:12,switchFlag:0},{qe:1313,nmps:5,nlps:29,switchFlag:0},{qe:545,nmps:38,nlps:33,switchFlag:0},{qe:22017,nmps:7,nlps:6,switchFlag:1},{qe:21505,nmps:8,nlps:14,switchFlag:0},{qe:18433,nmps:9,nlps:14,switchFlag:0},{qe:14337,nmps:10,nlps:\
14,switchFlag:0},{qe:12289,nmps:11,nlps:17,switchFlag:0},{qe:9217,nmps:12,nlps:18,switchFlag:0},{qe:7169,nmps:13,nlps:20,switchFlag:0},{qe:5633,nmps:29,nlps:21,switchFlag:0},{qe:22017,nmps:15,nlps:14,switchFlag:1},{qe:21505,nmps:16,nlps:14,switchFlag:0},{qe:20737,nmps:17,nlps:15,switchFlag:0},{qe:18433,nmps:18,nlps:16,switchFlag:0},{qe:14337,nmps:19,nlps:17,switchFlag:0},{qe:13313,nmps:20,nlps:18,switchFlag:0},{qe:12289,nmps:21,nlps:19,switchFlag:0},{qe:10241,nmps:22,nlps:19,switchFlag:0},{qe:92\
17,nmps:23,nlps:20,switchFlag:0},{qe:8705,nmps:24,nlps:21,switchFlag:0},{qe:7169,nmps:25,nlps:22,switchFlag:0},{qe:6145,nmps:26,nlps:23,switchFlag:0},{qe:5633,nmps:27,nlps:24,switchFlag:0},{qe:5121,nmps:28,nlps:25,switchFlag:0},{qe:4609,nmps:29,nlps:26,switchFlag:0},{qe:4353,nmps:30,nlps:27,switchFlag:0},{qe:2753,nmps:31,nlps:28,switchFlag:0},{qe:2497,nmps:32,nlps:29,switchFlag:0},{qe:2209,nmps:33,nlps:30,switchFlag:0},{qe:1313,nmps:34,nlps:31,switchFlag:0},{qe:1089,nmps:35,nlps:32,switchFlag:0}\
,{qe:673,nmps:36,nlps:33,switchFlag:0},{qe:545,nmps:37,nlps:34,switchFlag:0},{qe:321,nmps:38,nlps:35,switchFlag:0},{qe:273,nmps:39,nlps:36,switchFlag:0},{qe:133,nmps:40,nlps:37,switchFlag:0},{qe:73,nmps:41,nlps:38,switchFlag:0},{qe:37,nmps:42,nlps:39,switchFlag:0},{qe:21,nmps:43,nlps:40,switchFlag:0},{qe:9,nmps:44,nlps:41,switchFlag:0},{qe:5,nmps:45,nlps:42,switchFlag:0},{qe:1,nmps:45,nlps:43,switchFlag:0},{qe:22017,nmps:46,nlps:46,switchFlag:0}];class ArithmeticDecoder{constructor(e,t,a){this.d\
ata=e;this.bp=t;this.dataEnd=a;this.chigh=e[t];this.clow=0;this.byteIn();this.chigh=this.chigh<<7&65535|this.clow>>9&127;this.clow=this.clow<<7&65535;this.ct-=7;this.a=32768}byteIn(){const e=this.data;let t=this.bp;if(255===e[t])if(e[t+1]>143){this.clow+=65280;this.ct=8}else{t++;this.clow+=e[t]<<9;this.ct=7;this.bp=t}else{t++;this.clow+=t<this.dataEnd?e[t]<<8:65280;this.ct=8;this.bp=t}if(this.clow>65535){this.chigh+=this.clow>>16;this.clow&=65535}}readBit(e,t){let a=e[t]>>1,r=1&e[t];const i=cr[a\
],n=i.qe;let s,o=this.a-n;if(this.chigh<n)if(o<n){o=n;s=r;a=i.nmps}else{o=n;s=1^r;1===i.switchFlag&&(r=s);a=i.nlps}else{this.chigh-=n;if(32768&o){this.a=o;return r}if(o<n){s=1^r;1===i.switchFlag&&(r=s);a=i.nlps}else{s=r;a=i.nmps}}do{0===this.ct&&this.byteIn();o<<=1;this.chigh=this.chigh<<1&65535|this.clow>>15&1;this.clow=this.clow<<1&65535;this.ct--}while(!(32768&o));this.a=o;e[t]=a<<1|r;return s}}class Jbig2Error extends fa{constructor(e){super(e,"Jbig2Error")}}class ContextCache{getContexts(e)\
{return e in this?this[e]:this[e]=new Int8Array(65536)}}class DecodingContext{constructor(e,t,a){this.data=e;this.start=t;this.end=a}get decoder(){return shadow(this,"decoder",new ArithmeticDecoder(this.data,this.start,this.end))}get contextCache(){return shadow(this,"contextCache",new ContextCache)}}function decodeInteger(e,t,a){const r=e.getContexts(t);let i=1;function readBits(e){let t=0;for(let n=0;n<e;n++){const e=a.readBit(r,i);i=i<256?i<<1|e:511&(i<<1|e)|256;t=t<<1|e}return t>>>0}const n=\
readBits(1),s=readBits(1)?readBits(1)?readBits(1)?readBits(1)?readBits(1)?readBits(32)+4436:readBits(12)+340:readBits(8)+84:readBits(6)+20:readBits(4)+4:readBits(2);let o;0===n?o=s:s>0&&(o=-s);return o>=-2147483648&&o<=va?o:null}function decodeIAID(e,t,a){const r=e.getContexts("IAID");let i=1;for(let e=0;e<a;e++){i=i<<1|t.readBit(r,i)}return a<31?i&(1<<a)-1:2147483647&i}const lr=["SymbolDictionary",null,null,null,"IntermediateTextRegion",null,"ImmediateTextRegion","ImmediateLosslessTextRegion",n\
ull,null,null,null,null,null,null,null,"PatternDictionary",null,null,null,"IntermediateHalftoneRegion",null,"ImmediateHalftoneRegion","ImmediateLosslessHalftoneRegion",null,null,null,null,null,null,null,null,null,null,null,null,"IntermediateGenericRegion",null,"ImmediateGenericRegion","ImmediateLosslessGenericRegion","IntermediateGenericRefinementRegion",null,"ImmediateGenericRefinementRegion","ImmediateLosslessGenericRefinementRegion",null,null,null,null,"PageInformation","EndOfPage","EndOfStri\
pe","EndOfFile","Profiles","Tables",null,null,null,null,null,null,null,null,"Extension"],hr=[[{x:-1,y:-2},{x:0,y:-2},{x:1,y:-2},{x:-2,y:-1},{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:2,y:-1},{x:-4,y:0},{x:-3,y:0},{x:-2,y:0},{x:-1,y:0}],[{x:-1,y:-2},{x:0,y:-2},{x:1,y:-2},{x:2,y:-2},{x:-2,y:-1},{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:2,y:-1},{x:-3,y:0},{x:-2,y:0},{x:-1,y:0}],[{x:-1,y:-2},{x:0,y:-2},{x:1,y:-2},{x:-2,y:-1},{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:-2,y:0},{x:-1,y:0}],[{x:-3,y:-1},{x:-2,y:-1},{x:-\
1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:-4,y:0},{x:-3,y:0},{x:-2,y:0},{x:-1,y:0}]],ur=[{coding:[{x:0,y:-1},{x:1,y:-1},{x:-1,y:0}],reference:[{x:0,y:-1},{x:1,y:-1},{x:-1,y:0},{x:0,y:0},{x:1,y:0},{x:-1,y:1},{x:0,y:1},{x:1,y:1}]},{coding:[{x:-1,y:-1},{x:0,y:-1},{x:1,y:-1},{x:-1,y:0}],reference:[{x:0,y:-1},{x:-1,y:0},{x:0,y:0},{x:1,y:0},{x:0,y:1},{x:1,y:1}]}],dr=[39717,1941,229,405],fr=[32,8];function decodeBitmap(e,t,a,r,i,n,s,o){if(e){return decodeMMRBitmap(new Reader(o.data,o.start,o.end),t,a,!1)}if(0==\
=r&&!n&&!i&&4===s.length&&3===s[0].x&&-1===s[0].y&&-3===s[1].x&&-1===s[1].y&&2===s[2].x&&-2===s[2].y&&-2===s[3].x&&-2===s[3].y)return function decodeBitmapTemplate0(e,t,a){const r=a.decoder,i=a.contextCache.getContexts("GB"),n=[];let s,o,c,l,h,u,d;for(o=0;o<t;o++){h=n[o]=new Uint8Array(e);u=o<1?h:n[o-1];d=o<2?h:n[o-2];s=d[0]<<13|d[1]<<12|d[2]<<11|u[0]<<7|u[1]<<6|u[2]<<5|u[3]<<4;for(c=0;c<e;c++){h[c]=l=r.readBit(i,s);s=(31735&s)<<1|(c+3<e?d[c+3]<<11:0)|(c+4<e?u[c+4]<<4:0)|l}}return n}(t,a,o);cons\
t c=!!n,l=hr[r].concat(s);l.sort(((e,t)=>e.y-t.y||e.x-t.x));const h=l.length,u=new Int8Array(h),d=new Int8Array(h),f=[];let g,p,m=0,b=0,y=0,w=0;for(p=0;p<h;p++){u[p]=l[p].x;d[p]=l[p].y;b=Math.min(b,l[p].x);y=Math.max(y,l[p].x);w=Math.min(w,l[p].y);p<h-1&&l[p].y===l[p+1].y&&l[p].x===l[p+1].x-1?m|=1<<h-1-p:f.push(p)}const x=f.length,S=new Int8Array(x),k=new Int8Array(x),C=new Uint16Array(x);for(g=0;g<x;g++){p=f[g];S[g]=l[p].x;k[g]=l[p].y;C[g]=1<<h-1-p}const v=-b,F=-w,T=t-y,O=dr[r];let M=new Uint8A\
rray(t);const D=[],R=o.decoder,N=o.contextCache.getContexts("GB");let E,L,j,_,U,X=0,q=0;for(let e=0;e<a;e++){if(i){X^=R.readBit(N,O);if(X){D.push(M);continue}}M=new Uint8Array(M);D.push(M);for(E=0;E<t;E++){if(c&&n[e][E]){M[E]=0;continue}if(E>=v&&E<T&&e>=F){q=q<<1&m;for(p=0;p<x;p++){L=e+k[p];j=E+S[p];_=D[L][j];if(_){_=C[p];q|=_}}}else{q=0;U=h-1;for(p=0;p<h;p++,U--){j=E+u[p];if(j>=0&&j<t){L=e+d[p];if(L>=0){_=D[L][j];_&&(q|=_<<U)}}}}const a=R.readBit(N,q);M[E]=a}}return D}function decodeRefinement(\
e,t,a,r,i,n,s,o,c){let l=ur[a].coding;0===a&&(l=l.concat([o[0]]));const h=l.length,u=new Int32Array(h),d=new Int32Array(h);let f;for(f=0;f<h;f++){u[f]=l[f].x;d[f]=l[f].y}let g=ur[a].reference;0===a&&(g=g.concat([o[1]]));const p=g.length,m=new Int32Array(p),b=new Int32Array(p);for(f=0;f<p;f++){m[f]=g[f].x;b[f]=g[f].y}const y=r[0].length,w=r.length,x=fr[a],S=[],k=c.decoder,C=c.contextCache.getContexts("GR");let v=0;for(let a=0;a<t;a++){if(s){v^=k.readBit(C,x);if(v)throw new Jbig2Error("prediction \
is not supported")}const t=new Uint8Array(e);S.push(t);for(let s=0;s<e;s++){let o,c,l=0;for(f=0;f<h;f++){o=a+d[f];c=s+u[f];o<0||c<0||c>=e?l<<=1:l=l<<1|S[o][c]}for(f=0;f<p;f++){o=a+b[f]-n;c=s+m[f]-i;o<0||o>=w||c<0||c>=y?l<<=1:l=l<<1|r[o][c]}const g=k.readBit(C,l);t[s]=g}}return S}function decodeTextRegion(e,t,a,r,i,n,s,o,c,l,h,u,d,f,g,p,m,b,y){if(e&&t)throw new Jbig2Error("refinement with Huffman is not supported");const w=[];let x,S;for(x=0;x<r;x++){S=new Uint8Array(a);i&&S.fill(i);w.push(S)}con\
st k=m.decoder,C=m.contextCache;let v=e?-f.tableDeltaT.decode(y):-decodeInteger(C,"IADT",k),F=0;x=0;for(;x<n;){v+=e?f.tableDeltaT.decode(y):decodeInteger(C,"IADT",k);F+=e?f.tableFirstS.decode(y):decodeInteger(C,"IAFS",k);let r=F;for(;;){let i=0;s>1&&(i=e?y.readBits(b):decodeInteger(C,"IAIT",k));const n=s*v+i,F=e?f.symbolIDTable.decode(y):decodeIAID(C,k,c),T=t&&(e?y.readBit():decodeInteger(C,"IARI",k));let O=o[F],M=O[0].length,D=O.length;if(T){const e=decodeInteger(C,"IARDW",k),t=decodeInteger(C,\
"IARDH",k);M+=e;D+=t;O=decodeRefinement(M,D,g,O,(e>>1)+decodeInteger(C,"IARDX",k),(t>>1)+decodeInteger(C,"IARDY",k),!1,p,m)}let R=0;l?1&u?R=D-1:r+=D-1:u>1?r+=M-1:R=M-1;const N=n-(1&u?0:D-1),E=r-(2&u?M-1:0);let L,j,_;if(l)for(L=0;L<D;L++){S=w[E+L];if(!S)continue;_=O[L];const e=Math.min(a-N,M);switch(d){case 0:for(j=0;j<e;j++)S[N+j]|=_[j];break;case 2:for(j=0;j<e;j++)S[N+j]^=_[j];break;default:throw new Jbig2Error(`operator ${d} is not supported`)}}else for(j=0;j<D;j++){S=w[N+j];if(S){_=O[j];switc\
h(d){case 0:for(L=0;L<M;L++)S[E+L]|=_[L];break;case 2:for(L=0;L<M;L++)S[E+L]^=_[L];break;default:throw new Jbig2Error(`operator ${d} is not supported`)}}}x++;const U=e?f.tableDeltaS.decode(y):decodeInteger(C,"IADS",k);if(null===U)break;r+=R+U+h}}return w}function readSegmentHeader(e,t){const a={};a.number=readUint32(e,t);const r=e[t+4],i=63&r;if(!lr[i])throw new Jbig2Error("invalid segment type: "+i);a.type=i;a.typeName=lr[i];a.deferredNonRetain=!!(128&r);const n=!!(64&r),s=e[t+5];let o=s>>5&7;c\
onst c=[31&s];let l=t+6;if(7===s){o=536870911&readUint32(e,l-1);l+=3;let t=o+7>>3;c[0]=e[l++];for(;--t>0;)c.push(e[l++])}else if(5===s||6===s)throw new Jbig2Error("invalid referred-to flags");a.retainBits=c;let h=4;a.number<=256?h=1:a.number<=65536&&(h=2);const u=[];let d,f;for(d=0;d<o;d++){let t;t=1===h?e[l]:2===h?readUint16(e,l):readUint32(e,l);u.push(t);l+=h}a.referredTo=u;if(n){a.pageAssociation=readUint32(e,l);l+=4}else a.pageAssociation=e[l++];a.length=readUint32(e,l);l+=4;if(4294967295===\
a.length){if(38!==i)throw new Jbig2Error("invalid unknown segment length");{const t=readRegionSegmentInformation(e,l),r=!!(1&e[l+gr]),i=6,n=new Uint8Array(i);if(!r){n[0]=255;n[1]=172}n[2]=t.height>>>24&255;n[3]=t.height>>16&255;n[4]=t.height>>8&255;n[5]=255&t.height;for(d=l,f=e.length;d<f;d++){let t=0;for(;t<i&&n[t]===e[d+t];)t++;if(t===i){a.length=d+i;break}}if(4294967295===a.length)throw new Jbig2Error("segment end was not found")}}a.headerEnd=l;return a}function readSegments(e,t,a,r){const i=\
[];let n=a;for(;n<r;){const a=readSegmentHeader(t,n);n=a.headerEnd;const r={header:a,data:t};if(!e.randomAccess){r.start=n;n+=a.length;r.end=n}i.push(r);if(51===a.type)break}if(e.randomAccess)for(let e=0,t=i.length;e<t;e++){i[e].start=n;n+=i[e].header.length;i[e].end=n}return i}function readRegionSegmentInformation(e,t){return{width:readUint32(e,t),height:readUint32(e,t+4),x:readUint32(e,t+8),y:readUint32(e,t+12),combinationOperator:7&e[t+16]}}const gr=17;function processSegment(e,t){const a=e.h\
eader,r=e.data,i=e.end;let n,s,o,c,l=e.start;switch(a.type){case 0:const e={},t=readUint16(r,l);e.huffman=!!(1&t);e.refinement=!!(2&t);e.huffmanDHSelector=t>>2&3;e.huffmanDWSelector=t>>4&3;e.bitmapSizeSelector=t>>6&1;e.aggregationInstancesSelector=t>>7&1;e.bitmapCodingContextUsed=!!(256&t);e.bitmapCodingContextRetained=!!(512&t);e.template=t>>10&3;e.refinementTemplate=t>>12&1;l+=2;if(!e.huffman){c=0===e.template?4:1;s=[];for(o=0;o<c;o++){s.push({x:readInt8(r,l),y:readInt8(r,l+1)});l+=2}e.at=s}if\
(e.refinement&&!e.refinementTemplate){s=[];for(o=0;o<2;o++){s.push({x:readInt8(r,l),y:readInt8(r,l+1)});l+=2}e.refinementAt=s}e.numberOfExportedSymbols=readUint32(r,l);l+=4;e.numberOfNewSymbols=readUint32(r,l);l+=4;n=[e,a.number,a.referredTo,r,l,i];break;case 6:case 7:const h={};h.info=readRegionSegmentInformation(r,l);l+=gr;const u=readUint16(r,l);l+=2;h.huffman=!!(1&u);h.refinement=!!(2&u);h.logStripSize=u>>2&3;h.stripSize=1<<h.logStripSize;h.referenceCorner=u>>4&3;h.transposed=!!(64&u);h.comb\
inationOperator=u>>7&3;h.defaultPixelValue=u>>9&1;h.dsOffset=u<<17>>27;h.refinementTemplate=u>>15&1;if(h.huffman){const e=readUint16(r,l);l+=2;h.huffmanFS=3&e;h.huffmanDS=e>>2&3;h.huffmanDT=e>>4&3;h.huffmanRefinementDW=e>>6&3;h.huffmanRefinementDH=e>>8&3;h.huffmanRefinementDX=e>>10&3;h.huffmanRefinementDY=e>>12&3;h.huffmanRefinementSizeSelector=!!(16384&e)}if(h.refinement&&!h.refinementTemplate){s=[];for(o=0;o<2;o++){s.push({x:readInt8(r,l),y:readInt8(r,l+1)});l+=2}h.refinementAt=s}h.numberOfSym\
bolInstances=readUint32(r,l);l+=4;n=[h,a.referredTo,r,l,i];break;case 16:const d={},f=r[l++];d.mmr=!!(1&f);d.template=f>>1&3;d.patternWidth=r[l++];d.patternHeight=r[l++];d.maxPatternIndex=readUint32(r,l);l+=4;n=[d,a.number,r,l,i];break;case 22:case 23:const g={};g.info=readRegionSegmentInformation(r,l);l+=gr;const p=r[l++];g.mmr=!!(1&p);g.template=p>>1&3;g.enableSkip=!!(8&p);g.combinationOperator=p>>4&7;g.defaultPixelValue=p>>7&1;g.gridWidth=readUint32(r,l);l+=4;g.gridHeight=readUint32(r,l);l+=4\
;g.gridOffsetX=4294967295&readUint32(r,l);l+=4;g.gridOffsetY=4294967295&readUint32(r,l);l+=4;g.gridVectorX=readUint16(r,l);l+=2;g.gridVectorY=readUint16(r,l);l+=2;n=[g,a.referredTo,r,l,i];break;case 38:case 39:const m={};m.info=readRegionSegmentInformation(r,l);l+=gr;const b=r[l++];m.mmr=!!(1&b);m.template=b>>1&3;m.prediction=!!(8&b);if(!m.mmr){c=0===m.template?4:1;s=[];for(o=0;o<c;o++){s.push({x:readInt8(r,l),y:readInt8(r,l+1)});l+=2}m.at=s}n=[m,r,l,i];break;case 48:const y={width:readUint32(r,\
l),height:readUint32(r,l+4),resolutionX:readUint32(r,l+8),resolutionY:readUint32(r,l+12)};4294967295===y.height&&delete y.height;const w=r[l+16];readUint16(r,l+17);y.lossless=!!(1&w);y.refinement=!!(2&w);y.defaultPixelValue=w>>2&1;y.combinationOperator=w>>3&3;y.requiresBuffer=!!(32&w);y.combinationOperatorOverride=!!(64&w);n=[y];break;case 49:case 50:case 51:case 62:break;case 53:n=[a.number,r,l,i];break;default:throw new Jbig2Error(`segment type ${a.typeName}(${a.type}) is not implemented`)}con\
st h="on"+a.typeName;h in t&&t[h].apply(t,n)}function processSegments(e,t){for(let a=0,r=e.length;a<r;a++)processSegment(e[a],t)}class SimpleSegmentVisitor{onPageInformation(e){this.currentPageInfo=e;const t=e.width+7>>3,a=new Uint8ClampedArray(t*e.height);e.defaultPixelValue&&a.fill(255);this.buffer=a}drawBitmap(e,t){const a=this.currentPageInfo,r=e.width,i=e.height,n=a.width+7>>3,s=a.combinationOperatorOverride?e.combinationOperator:a.combinationOperator,o=this.buffer,c=128>>(7&e.x);let l,h,u,\
d,f=e.y*n+(e.x>>3);switch(s){case 0:for(l=0;l<i;l++){u=c;d=f;for(h=0;h<r;h++){t[l][h]&&(o[d]|=u);u>>=1;if(!u){u=128;d++}}f+=n}break;case 2:for(l=0;l<i;l++){u=c;d=f;for(h=0;h<r;h++){t[l][h]&&(o[d]^=u);u>>=1;if(!u){u=128;d++}}f+=n}break;default:throw new Jbig2Error(`operator ${s} is not supported`)}}onImmediateGenericRegion(e,t,a,r){const i=e.info,n=new DecodingContext(t,a,r),s=decodeBitmap(e.mmr,i.width,i.height,e.template,e.prediction,null,e.at,n);this.drawBitmap(i,s)}onImmediateLosslessGenericR\
egion(){this.onImmediateGenericRegion(...arguments)}onSymbolDictionary(e,t,a,r,i,n){let s,o;if(e.huffman){s=function getSymbolDictionaryHuffmanTables(e,t,a){let r,i,n,s,o=0;switch(e.huffmanDHSelector){case 0:case 1:r=getStandardTable(e.huffmanDHSelector+4);break;case 3:r=getCustomHuffmanTable(o,t,a);o++;break;default:throw new Jbig2Error("invalid Huffman DH selector")}switch(e.huffmanDWSelector){case 0:case 1:i=getStandardTable(e.huffmanDWSelector+2);break;case 3:i=getCustomHuffmanTable(o,t,a);o\
++;break;default:throw new Jbig2Error("invalid Huffman DW selector")}if(e.bitmapSizeSelector){n=getCustomHuffmanTable(o,t,a);o++}else n=getStandardTable(1);s=e.aggregationInstancesSelector?getCustomHuffmanTable(o,t,a):getStandardTable(1);return{tableDeltaHeight:r,tableDeltaWidth:i,tableBitmapSize:n,tableAggregateInstances:s}}(e,a,this.customTables);o=new Reader(r,i,n)}let c=this.symbols;c||(this.symbols=c={});const l=[];for(const e of a){const t=c[e];t&&l.push(...t)}const h=new DecodingContext(r\
,i,n);c[t]=function decodeSymbolDictionary(e,t,a,r,i,n,s,o,c,l,h,u){if(e&&t)throw new Jbig2Error("symbol refinement with Huffman is not supported");const d=[];let f=0,g=log2(a.length+r);const p=h.decoder,m=h.contextCache;let b,y;if(e){b=getStandardTable(1);y=[];g=Math.max(g,1)}for(;d.length<r;){f+=e?n.tableDeltaHeight.decode(u):decodeInteger(m,"IADH",p);let r=0,i=0;const b=e?y.length:0;for(;;){const b=e?n.tableDeltaWidth.decode(u):decodeInteger(m,"IADW",p);if(null===b)break;r+=b;i+=r;let w;if(t)\
{const i=decodeInteger(m,"IAAI",p);if(i>1)w=decodeTextRegion(e,t,r,f,0,i,1,a.concat(d),g,0,0,1,0,n,c,l,h,0,u);else{const e=decodeIAID(m,p,g),t=decodeInteger(m,"IARDX",p),i=decodeInteger(m,"IARDY",p);w=decodeRefinement(r,f,c,e<a.length?a[e]:d[e-a.length],t,i,!1,l,h)}d.push(w)}else if(e)y.push(r);else{w=decodeBitmap(!1,r,f,s,!1,null,o,h);d.push(w)}}if(e&&!t){const e=n.tableBitmapSize.decode(u);u.byteAlign();let t;if(0===e)t=readUncompressedBitmap(u,i,f);else{const a=u.end,r=u.position+e;u.end=r;t=\
decodeMMRBitmap(u,i,f,!1);u.end=a;u.position=r}const a=y.length;if(b===a-1)d.push(t);else{let e,r,i,n,s,o=0;for(e=b;e<a;e++){n=y[e];i=o+n;s=[];for(r=0;r<f;r++)s.push(t[r].subarray(o,i));d.push(s);o=i}}}}const w=[],x=[];let S,k,C=!1;const v=a.length+r;for(;x.length<v;){let t=e?b.decode(u):decodeInteger(m,"IAEX",p);for(;t--;)x.push(C);C=!C}for(S=0,k=a.length;S<k;S++)x[S]&&w.push(a[S]);for(let e=0;e<r;S++,e++)x[S]&&w.push(d[e]);return w}(e.huffman,e.refinement,l,e.numberOfNewSymbols,e.numberOfExpor\
tedSymbols,s,e.template,e.at,e.refinementTemplate,e.refinementAt,h,o)}onImmediateTextRegion(e,t,a,r,i){const n=e.info;let s,o;const c=this.symbols,l=[];for(const e of t){const t=c[e];t&&l.push(...t)}const h=log2(l.length);if(e.huffman){o=new Reader(a,r,i);s=function getTextRegionHuffmanTables(e,t,a,r,i){const n=[];for(let e=0;e<=34;e++){const t=i.readBits(4);n.push(new HuffmanLine([e,t,0,0]))}const s=new HuffmanTable(n,!1);n.length=0;for(let e=0;e<r;){const t=s.decode(i);if(t>=32){let a,r,s;swit\
ch(t){case 32:if(0===e)throw new Jbig2Error("no previous value in symbol ID table");r=i.readBits(2)+3;a=n[e-1].prefixLength;break;case 33:r=i.readBits(3)+3;a=0;break;case 34:r=i.readBits(7)+11;a=0;break;default:throw new Jbig2Error("invalid code length in symbol ID table")}for(s=0;s<r;s++){n.push(new HuffmanLine([e,a,0,0]));e++}}else{n.push(new HuffmanLine([e,t,0,0]));e++}}i.byteAlign();const o=new HuffmanTable(n,!1);let c,l,h,u=0;switch(e.huffmanFS){case 0:case 1:c=getStandardTable(e.huffmanFS+\
6);break;case 3:c=getCustomHuffmanTable(u,t,a);u++;break;default:throw new Jbig2Error("invalid Huffman FS selector")}switch(e.huffmanDS){case 0:case 1:case 2:l=getStandardTable(e.huffmanDS+8);break;case 3:l=getCustomHuffmanTable(u,t,a);u++;break;default:throw new Jbig2Error("invalid Huffman DS selector")}switch(e.huffmanDT){case 0:case 1:case 2:h=getStandardTable(e.huffmanDT+11);break;case 3:h=getCustomHuffmanTable(u,t,a);u++;break;default:throw new Jbig2Error("invalid Huffman DT selector")}if(e\
.refinement)throw new Jbig2Error("refinement with Huffman is not supported");return{symbolIDTable:o,tableFirstS:c,tableDeltaS:l,tableDeltaT:h}}(e,t,this.customTables,l.length,o)}const u=new DecodingContext(a,r,i),d=decodeTextRegion(e.huffman,e.refinement,n.width,n.height,e.defaultPixelValue,e.numberOfSymbolInstances,e.stripSize,l,h,e.transposed,e.dsOffset,e.referenceCorner,e.combinationOperator,s,e.refinementTemplate,e.refinementAt,u,e.logStripSize,o);this.drawBitmap(n,d)}onImmediateLosslessText\
Region(){this.onImmediateTextRegion(...arguments)}onPatternDictionary(e,t,a,r,i){let n=this.patterns;n||(this.patterns=n={});const s=new DecodingContext(a,r,i);n[t]=function decodePatternDictionary(e,t,a,r,i,n){const s=[];if(!e){s.push({x:-t,y:0});0===i&&s.push({x:-3,y:-1},{x:2,y:-2},{x:-2,y:-2})}const o=decodeBitmap(e,(r+1)*t,a,i,!1,null,s,n),c=[];for(let e=0;e<=r;e++){const r=[],i=t*e,n=i+t;for(let e=0;e<a;e++)r.push(o[e].subarray(i,n));c.push(r)}return c}(e.mmr,e.patternWidth,e.patternHeight,\
e.maxPatternIndex,e.template,s)}onImmediateHalftoneRegion(e,t,a,r,i){const n=this.patterns[t[0]],s=e.info,o=new DecodingContext(a,r,i),c=function decodeHalftoneRegion(e,t,a,r,i,n,s,o,c,l,h,u,d,f,g){if(s)throw new Jbig2Error("skip is not supported");if(0!==o)throw new Jbig2Error(`operator "${o}" is not supported in halftone region`);const p=[];let m,b,y;for(m=0;m<i;m++){y=new Uint8Array(r);n&&y.fill(n);p.push(y)}const w=t.length,x=t[0],S=x[0].length,k=x.length,C=log2(w),v=[];if(!e){v.push({x:a<=1\
?3:2,y:-1});0===a&&v.push({x:-3,y:-1},{x:2,y:-2},{x:-2,y:-2})}const F=[];let T,O,M,D,R,N,E,L,j,_,U;e&&(T=new Reader(g.data,g.start,g.end));for(m=C-1;m>=0;m--){O=e?decodeMMRBitmap(T,c,l,!0):decodeBitmap(!1,c,l,a,!1,null,v,g);F[m]=O}for(M=0;M<l;M++)for(D=0;D<c;D++){R=0;N=0;for(b=C-1;b>=0;b--){R^=F[b][M][D];N|=R<<b}E=t[N];L=h+M*f+D*d>>8;j=u+M*d-D*f>>8;if(L>=0&&L+S<=r&&j>=0&&j+k<=i)for(m=0;m<k;m++){U=p[j+m];_=E[m];for(b=0;b<S;b++)U[L+b]|=_[b]}else{let e,t;for(m=0;m<k;m++){t=j+m;if(!(t<0||t>=i)){U=p[\
t];_=E[m];for(b=0;b<S;b++){e=L+b;e>=0&&e<r&&(U[e]|=_[b])}}}}}return p}(e.mmr,n,e.template,s.width,s.height,e.defaultPixelValue,e.enableSkip,e.combinationOperator,e.gridWidth,e.gridHeight,e.gridOffsetX,e.gridOffsetY,e.gridVectorX,e.gridVectorY,o);this.drawBitmap(s,c)}onImmediateLosslessHalftoneRegion(){this.onImmediateHalftoneRegion(...arguments)}onTables(e,t,a,r){let i=this.customTables;i||(this.customTables=i={});i[e]=function decodeTablesSegment(e,t,a){const r=e[t],i=4294967295&readUint32(e,t+\
1),n=4294967295&readUint32(e,t+5),s=new Reader(e,t+9,a),o=1+(r>>1&7),c=1+(r>>4&7),l=[];let h,u,d=i;do{h=s.readBits(o);u=s.readBits(c);l.push(new HuffmanLine([d,h,u,0]));d+=1<<u}while(d<n);h=s.readBits(o);l.push(new HuffmanLine([i-1,h,32,0,"lower"]));h=s.readBits(o);l.push(new HuffmanLine([n,h,32,0]));if(1&r){h=s.readBits(o);l.push(new HuffmanLine([h,0]))}return new HuffmanTable(l,!1)}(t,a,r)}}class HuffmanLine{constructor(e){if(2===e.length){this.isOOB=!0;this.rangeLow=0;this.prefixLength=e[0];t\
his.rangeLength=0;this.prefixCode=e[1];this.isLowerRange=!1}else{this.isOOB=!1;this.rangeLow=e[0];this.prefixLength=e[1];this.rangeLength=e[2];this.prefixCode=e[3];this.isLowerRange="lower"===e[4]}}}class HuffmanTreeNode{constructor(e){this.children=[];if(e){this.isLeaf=!0;this.rangeLength=e.rangeLength;this.rangeLow=e.rangeLow;this.isLowerRange=e.isLowerRange;this.isOOB=e.isOOB}else this.isLeaf=!1}buildTree(e,t){const a=e.prefixCode>>t&1;if(t<=0)this.children[a]=new HuffmanTreeNode(e);else{let \
r=this.children[a];r||(this.children[a]=r=new HuffmanTreeNode(null));r.buildTree(e,t-1)}}decodeNode(e){if(this.isLeaf){if(this.isOOB)return null;const t=e.readBits(this.rangeLength);return this.rangeLow+(this.isLowerRange?-t:t)}const t=this.children[e.readBit()];if(!t)throw new Jbig2Error("invalid Huffman data");return t.decodeNode(e)}}class HuffmanTable{constructor(e,t){t||this.assignPrefixCodes(e);this.rootNode=new HuffmanTreeNode(null);for(let t=0,a=e.length;t<a;t++){const a=e[t];a.prefixLeng\
th>0&&this.rootNode.buildTree(a,a.prefixLength-1)}}decode(e){return this.rootNode.decodeNode(e)}assignPrefixCodes(e){const t=e.length;let a=0;for(let r=0;r<t;r++)a=Math.max(a,e[r].prefixLength);const r=new Uint32Array(a+1);for(let a=0;a<t;a++)r[e[a].prefixLength]++;let i,n,s,o=1,c=0;r[0]=0;for(;o<=a;){c=c+r[o-1]<<1;i=c;n=0;for(;n<t;){s=e[n];if(s.prefixLength===o){s.prefixCode=i;i++}n++}o++}}}const pr={};function getStandardTable(e){let t,a=pr[e];if(a)return a;switch(e){case 1:t=[[0,1,4,0],[16,2,\
8,2],[272,3,16,6],[65808,3,32,7]];break;case 2:t=[[0,1,0,0],[1,2,0,2],[2,3,0,6],[3,4,3,14],[11,5,6,30],[75,6,32,62],[6,63]];break;case 3:t=[[-256,8,8,254],[0,1,0,0],[1,2,0,2],[2,3,0,6],[3,4,3,14],[11,5,6,30],[-257,8,32,255,"lower"],[75,7,32,126],[6,62]];break;case 4:t=[[1,1,0,0],[2,2,0,2],[3,3,0,6],[4,4,3,14],[12,5,6,30],[76,5,32,31]];break;case 5:t=[[-255,7,8,126],[1,1,0,0],[2,2,0,2],[3,3,0,6],[4,4,3,14],[12,5,6,30],[-256,7,32,127,"lower"],[76,6,32,62]];break;case 6:t=[[-2048,5,10,28],[-1024,4,\
9,8],[-512,4,8,9],[-256,4,7,10],[-128,5,6,29],[-64,5,5,30],[-32,4,5,11],[0,2,7,0],[128,3,7,2],[256,3,8,3],[512,4,9,12],[1024,4,10,13],[-2049,6,32,62,"lower"],[2048,6,32,63]];break;case 7:t=[[-1024,4,9,8],[-512,3,8,0],[-256,4,7,9],[-128,5,6,26],[-64,5,5,27],[-32,4,5,10],[0,4,5,11],[32,5,5,28],[64,5,6,29],[128,4,7,12],[256,3,8,1],[512,3,9,2],[1024,3,10,3],[-1025,5,32,30,"lower"],[2048,5,32,31]];break;case 8:t=[[-15,8,3,252],[-7,9,1,508],[-5,8,1,253],[-3,9,0,509],[-2,7,0,124],[-1,4,0,10],[0,2,1,0],\
[2,5,0,26],[3,6,0,58],[4,3,4,4],[20,6,1,59],[22,4,4,11],[38,4,5,12],[70,5,6,27],[134,5,7,28],[262,6,7,60],[390,7,8,125],[646,6,10,61],[-16,9,32,510,"lower"],[1670,9,32,511],[2,1]];break;case 9:t=[[-31,8,4,252],[-15,9,2,508],[-11,8,2,253],[-7,9,1,509],[-5,7,1,124],[-3,4,1,10],[-1,3,1,2],[1,3,1,3],[3,5,1,26],[5,6,1,58],[7,3,5,4],[39,6,2,59],[43,4,5,11],[75,4,6,12],[139,5,7,27],[267,5,8,28],[523,6,8,60],[779,7,9,125],[1291,6,11,61],[-32,9,32,510,"lower"],[3339,9,32,511],[2,0]];break;case 10:t=[[-21\
,7,4,122],[-5,8,0,252],[-4,7,0,123],[-3,5,0,24],[-2,2,2,0],[2,5,0,25],[3,6,0,54],[4,7,0,124],[5,8,0,253],[6,2,6,1],[70,5,5,26],[102,6,5,55],[134,6,6,56],[198,6,7,57],[326,6,8,58],[582,6,9,59],[1094,6,10,60],[2118,7,11,125],[-22,8,32,254,"lower"],[4166,8,32,255],[2,2]];break;case 11:t=[[1,1,0,0],[2,2,1,2],[4,4,0,12],[5,4,1,13],[7,5,1,28],[9,5,2,29],[13,6,2,60],[17,7,2,122],[21,7,3,123],[29,7,4,124],[45,7,5,125],[77,7,6,126],[141,7,32,127]];break;case 12:t=[[1,1,0,0],[2,2,0,2],[3,3,1,6],[5,5,0,28]\
,[6,5,1,29],[8,6,1,60],[10,7,0,122],[11,7,1,123],[13,7,2,124],[17,7,3,125],[25,7,4,126],[41,8,5,254],[73,8,32,255]];break;case 13:t=[[1,1,0,0],[2,3,0,4],[3,4,0,12],[4,5,0,28],[5,4,1,13],[7,3,3,5],[15,6,1,58],[17,6,2,59],[21,6,3,60],[29,6,4,61],[45,6,5,62],[77,7,6,126],[141,7,32,127]];break;case 14:t=[[-2,3,0,4],[-1,3,0,5],[0,1,0,0],[1,3,0,6],[2,3,0,7]];break;case 15:t=[[-24,7,4,124],[-8,6,2,60],[-4,5,1,28],[-2,4,0,12],[-1,3,0,4],[0,1,0,0],[1,3,0,5],[2,4,0,13],[3,5,1,29],[5,6,2,61],[9,7,4,125],[-\
25,7,32,126,"lower"],[25,7,32,127]];break;default:throw new Jbig2Error(`standard table B.${e} does not exist`)}for(let e=0,a=t.length;e<a;e++)t[e]=new HuffmanLine(t[e]);a=new HuffmanTable(t,!0);pr[e]=a;return a}class Reader{constructor(e,t,a){this.data=e;this.start=t;this.end=a;this.position=t;this.shift=-1;this.currentByte=0}readBit(){if(this.shift<0){if(this.position>=this.end)throw new Jbig2Error("end of data while reading bit");this.currentByte=this.data[this.position++];this.shift=7}const e\
=this.currentByte>>this.shift&1;this.shift--;return e}readBits(e){let t,a=0;for(t=e-1;t>=0;t--)a|=this.readBit()<<t;return a}byteAlign(){this.shift=-1}next(){return this.position>=this.end?-1:this.data[this.position++]}}function getCustomHuffmanTable(e,t,a){let r=0;for(let i=0,n=t.length;i<n;i++){const n=a[t[i]];if(n){if(e===r)return n;r++}}throw new Jbig2Error("can\'t find custom Huffman table")}function readUncompressedBitmap(e,t,a){const r=[];for(let i=0;i<a;i++){const a=new Uint8Array(t);r.pu\
sh(a);for(let r=0;r<t;r++)a[r]=e.readBit();e.byteAlign()}return r}function decodeMMRBitmap(e,t,a,r){const i=new CCITTFaxDecoder(e,{K:-1,Columns:t,Rows:a,BlackIs1:!0,EndOfBlock:r}),n=[];let s,o=!1;for(let e=0;e<a;e++){const e=new Uint8Array(t);n.push(e);let a=-1;for(let r=0;r<t;r++){if(a<0){s=i.readNextChar();if(-1===s){s=0;o=!0}a=7}e[r]=s>>a&1;a--}}if(r&&!o){const e=5;for(let t=0;t<e&&-1!==i.readNextChar();t++);}return n}class Jbig2Image{parseChunks(e){return function parseJbig2Chunks(e){const t\
=new SimpleSegmentVisitor;for(let a=0,r=e.length;a<r;a++){const r=e[a];processSegments(readSegments({},r.data,r.start,r.end),t)}return t.buffer}(e)}parse(e){throw new Error("Not implemented: Jbig2Image.parse")}}class Jbig2Stream extends DecodeStream{constructor(e,t,a){super(t);this.stream=e;this.dict=e.dict;this.maybeLength=t;this.params=a}get bytes(){return shadow(this,"bytes",this.stream.getBytes(this.maybeLength))}ensureBuffer(e){}readBlock(){this.decodeImage()}decodeImage(e){if(this.eof)retu\
rn this.buffer;e||=this.bytes;const t=new Jbig2Image,a=[];if(this.params instanceof Dict){const e=this.params.get("JBIG2Globals");if(e instanceof BaseStream){const t=e.getBytes();a.push({data:t,start:0,end:t.length})}}a.push({data:e,start:0,end:e.length});const r=t.parseChunks(a),i=r.length;for(let e=0;e<i;e++)r[e]^=255;this.buffer=r;this.bufferLength=i;this.eof=!0;return this.buffer}get canAsyncDecodeImageFromBuffer(){return this.stream.isAsync}}class JpxStream extends DecodeStream{constructor(\
e,t,a){super(t);this.stream=e;this.dict=e.dict;this.maybeLength=t;this.params=a}get bytes(){return shadow(this,"bytes",this.stream.getBytes(this.maybeLength))}ensureBuffer(e){}readBlock(e){unreachable("JpxStream.readBlock")}get isAsyncDecoder(){return!0}async decodeImage(e,t){if(this.eof)return this.buffer;e||=this.bytes;this.buffer=await JpxImage.decode(e,t);this.bufferLength=this.buffer.length;this.eof=!0;return this.buffer}get canAsyncDecodeImageFromBuffer(){return this.stream.isAsync}}class \
LZWStream extends DecodeStream{constructor(e,t,a){super(t);this.str=e;this.dict=e.dict;this.cachedData=0;this.bitsCached=0;const r=4096,i={earlyChange:a,codeLength:9,nextCode:258,dictionaryValues:new Uint8Array(r),dictionaryLengths:new Uint16Array(r),dictionaryPrevCodes:new Uint16Array(r),currentSequence:new Uint8Array(r),currentSequenceLength:0};for(let e=0;e<256;++e){i.dictionaryValues[e]=e;i.dictionaryLengths[e]=1}this.lzwState=i}readBits(e){let t=this.bitsCached,a=this.cachedData;for(;t<e;){\
const e=this.str.getByte();if(-1===e){this.eof=!0;return null}a=a<<8|e;t+=8}this.bitsCached=t-=e;this.cachedData=a;this.lastCode=null;return a>>>t&(1<<e)-1}readBlock(){let e,t,a,r=1024;const i=this.lzwState;if(!i)return;const n=i.earlyChange;let s=i.nextCode;const o=i.dictionaryValues,c=i.dictionaryLengths,l=i.dictionaryPrevCodes;let h=i.codeLength,u=i.prevCode;const d=i.currentSequence;let f=i.currentSequenceLength,g=0,p=this.bufferLength,m=this.ensureBuffer(this.bufferLength+r);for(e=0;e<512;e\
++){const e=this.readBits(h),i=f>0;if(e<256){d[0]=e;f=1}else{if(!(e>=258)){if(256===e){h=9;s=258;f=0;continue}this.eof=!0;delete this.lzwState;break}if(e<s){f=c[e];for(t=f-1,a=e;t>=0;t--){d[t]=o[a];a=l[a]}}else d[f++]=d[0]}if(i){l[s]=u;c[s]=c[u]+1;o[s]=d[0];s++;h=s+n&s+n-1?h:0|Math.min(Math.log(s+n)/.6931471805599453+1,12)}u=e;g+=f;if(r<g){do{r+=512}while(r<g);m=this.ensureBuffer(this.bufferLength+r)}for(t=0;t<f;t++)m[p++]=d[t]}i.nextCode=s;i.codeLength=h;i.prevCode=u;i.currentSequenceLength=f;t\
his.bufferLength=p}}class PredictorStream extends DecodeStream{constructor(e,t,a){super(t);if(!(a instanceof Dict))return e;const r=this.predictor=a.get("Predictor")||1;if(r<=1)return e;if(2!==r&&(r<10||r>15))throw new FormatError(`Unsupported predictor: ${r}`);this.readBlock=2===r?this.readBlockTiff:this.readBlockPng;this.str=e;this.dict=e.dict;const i=this.colors=a.get("Colors")||1,n=this.bits=a.get("BPC","BitsPerComponent")||8,s=this.columns=a.get("Columns")||1;this.pixBytes=i*n+7>>3;this.row\
Bytes=s*i*n+7>>3;return this}readBlockTiff(){const e=this.rowBytes,t=this.bufferLength,a=this.ensureBuffer(t+e),r=this.bits,i=this.colors,n=this.str.getBytes(e);this.eof=!n.length;if(this.eof)return;let s,o=0,c=0,l=0,h=0,u=t;if(1===r&&1===i)for(s=0;s<e;++s){let e=n[s]^o;e^=e>>1;e^=e>>2;e^=e>>4;o=(1&e)<<7;a[u++]=e}else if(8===r){for(s=0;s<i;++s)a[u++]=n[s];for(;s<e;++s){a[u]=a[u-i]+n[s];u++}}else if(16===r){const t=2*i;for(s=0;s<t;++s)a[u++]=n[s];for(;s<e;s+=2){const e=((255&n[s])<<8)+(255&n[s+1]\
)+((255&a[u-t])<<8)+(255&a[u-t+1]);a[u++]=e>>8&255;a[u++]=255&e}}else{const e=new Uint8Array(i+1),u=(1<<r)-1;let d=0,f=t;const g=this.columns;for(s=0;s<g;++s)for(let t=0;t<i;++t){if(l<r){o=o<<8|255&n[d++];l+=8}e[t]=e[t]+(o>>l-r)&u;l-=r;c=c<<r|e[t];h+=r;if(h>=8){a[f++]=c>>h-8&255;h-=8}}h>0&&(a[f++]=(c<<8-h)+(o&(1<<8-h)-1))}this.bufferLength+=e}readBlockPng(){const e=this.rowBytes,t=this.pixBytes,a=this.str.getByte(),r=this.str.getBytes(e);this.eof=!r.length;if(this.eof)return;const i=this.bufferL\
ength,n=this.ensureBuffer(i+e);let s=n.subarray(i-e,i);0===s.length&&(s=new Uint8Array(e));let o,c,l,h=i;switch(a){case 0:for(o=0;o<e;++o)n[h++]=r[o];break;case 1:for(o=0;o<t;++o)n[h++]=r[o];for(;o<e;++o){n[h]=n[h-t]+r[o]&255;h++}break;case 2:for(o=0;o<e;++o)n[h++]=s[o]+r[o]&255;break;case 3:for(o=0;o<t;++o)n[h++]=(s[o]>>1)+r[o];for(;o<e;++o){n[h]=(s[o]+n[h-t]>>1)+r[o]&255;h++}break;case 4:for(o=0;o<t;++o){c=s[o];l=r[o];n[h++]=c+l}for(;o<e;++o){c=s[o];const e=s[o-t],a=n[h-t],i=a+c-e;let u=i-a;u<\
0&&(u=-u);let d=i-c;d<0&&(d=-d);let f=i-e;f<0&&(f=-f);l=r[o];n[h++]=u<=d&&u<=f?a+l:d<=f?c+l:e+l}break;default:throw new FormatError(`Unsupported predictor: ${a}`)}this.bufferLength+=e}}class RunLengthStream extends DecodeStream{constructor(e,t){super(t);this.str=e;this.dict=e.dict}readBlock(){const e=this.str.getBytes(2);if(!e||e.length<2||128===e[0]){this.eof=!0;return}let t,a=this.bufferLength,r=e[0];if(r<128){t=this.ensureBuffer(a+r+1);t[a++]=e[1];if(r>0){const e=this.str.getBytes(r);t.set(e,\
a);a+=r}}else{r=257-r;t=this.ensureBuffer(a+r+1);t.fill(e[1],a,a+r);a+=r}this.bufferLength=a}}class Parser{constructor({lexer:e,xref:t,allowStreams:a=!1,recoveryMode:r=!1}){this.lexer=e;this.xref=t;this.allowStreams=a;this.recoveryMode=r;this.imageCache=Object.create(null);this._imageId=0;this.refill()}refill(){this.buf1=this.lexer.getObj();this.buf2=this.lexer.getObj()}shift(){if(this.buf2 instanceof Cmd&&"ID"===this.buf2.cmd){this.buf1=this.buf2;this.buf2=null}else{this.buf1=this.buf2;this.buf\
2=this.lexer.getObj()}}tryShift(){try{this.shift();return!0}catch(e){if(e instanceof MissingDataException)throw e;return!1}}getObj(e=null){const t=this.buf1;this.shift();if(t instanceof Cmd)switch(t.cmd){case"BI":return this.makeInlineImage(e);case"[":const a=[];for(;!isCmd(this.buf1,"]")&&this.buf1!==wa;)a.push(this.getObj(e));if(this.buf1===wa){if(this.recoveryMode)return a;throw new ParserEOFException("End of file inside array.")}this.shift();return a;case"<<":const r=new Dict(this.xref);for(\
;!isCmd(this.buf1,">>")&&this.buf1!==wa;){if(!(this.buf1 instanceof Name)){info("Malformed dictionary: key must be a name object");this.shift();continue}const t=this.buf1.name;this.shift();if(this.buf1===wa)break;r.set(t,this.getObj(e))}if(this.buf1===wa){if(this.recoveryMode)return r;throw new ParserEOFException("End of file inside dictionary.")}if(isCmd(this.buf2,"stream"))return this.allowStreams?this.makeStream(r,e):r;this.shift();return r;default:return t}if(Number.isInteger(t)){if(Number.i\
sInteger(this.buf1)&&isCmd(this.buf2,"R")){const e=Ref.get(t,this.buf1);this.shift();this.shift();return e}return t}return"string"==typeof t&&e?e.decryptString(t):t}findDefaultInlineStreamEnd(e){const{knownCommands:t}=this.lexer,a=e.pos;let r,i,n=0;for(;-1!==(r=e.getByte());)if(0===n)n=69===r?1:0;else if(1===n)n=73===r?2:0;else if(32===r||10===r||13===r){i=e.pos;const a=e.peekBytes(15),s=a.length;if(0===s)break;for(let e=0;e<s;e++){r=a[e];if((0!==r||0===a[e+1])&&(10!==r&&13!==r&&(r<32||r>127))){\
n=0;break}}if(2!==n)continue;if(!t){warn("findDefaultInlineStreamEnd - `lexer.knownCommands` is undefined.");continue}const o=new Lexer(new Stream(e.peekBytes(75)),t);o._hexStringWarn=()=>{};let c=0;for(;;){const e=o.getObj();if(e===wa){n=0;break}if(e instanceof Cmd){const a=t[e.cmd];if(!a){n=0;break}if(a.variableArgs?c<=a.numArgs:c===a.numArgs)break;c=0}else c++}if(2===n)break}else n=0;if(-1===r){warn("findDefaultInlineStreamEnd: Reached the end of the stream without finding a valid EI marker")\
;if(i){warn(\'... trying to recover by using the last "EI" occurrence.\');e.skip(-(e.pos-i))}}let s=4;e.skip(-s);r=e.peekByte();e.skip(s);isWhiteSpace(r)||s--;return e.pos-s-a}findDCTDecodeInlineStreamEnd(e){const t=e.pos;let a,r,i=!1;for(;-1!==(a=e.getByte());)if(255===a){switch(e.getByte()){case 0:break;case 255:e.skip(-1);break;case 217:i=!0;break;case 192:case 193:case 194:case 195:case 197:case 198:case 199:case 201:case 202:case 203:case 205:case 206:case 207:case 196:case 204:case 218:case \
219:case 220:case 221:case 222:case 223:case 224:case 225:case 226:case 227:case 228:case 229:case 230:case 231:case 232:case 233:case 234:case 235:case 236:case 237:case 238:case 239:case 254:r=e.getUint16();r>2?e.skip(r-2):e.skip(-2)}if(i)break}const n=e.pos-t;if(-1===a){warn("Inline DCTDecode image stream: EOI marker not found, searching for /EI/ instead.");e.skip(-n);return this.findDefaultInlineStreamEnd(e)}this.inlineStreamSkipEI(e);return n}findASCII85DecodeInlineStreamEnd(e){const t=e.po\
s;let a;for(;-1!==(a=e.getByte());)if(126===a){const t=e.pos;a=e.peekByte();for(;isWhiteSpace(a);){e.skip();a=e.peekByte()}if(62===a){e.skip();break}if(e.pos>t){const t=e.peekBytes(2);if(69===t[0]&&73===t[1])break}}const r=e.pos-t;if(-1===a){warn("Inline ASCII85Decode image stream: EOD marker not found, searching for /EI/ instead.");e.skip(-r);return this.findDefaultInlineStreamEnd(e)}this.inlineStreamSkipEI(e);return r}findASCIIHexDecodeInlineStreamEnd(e){const t=e.pos;let a;for(;-1!==(a=e.getB\
yte())&&62!==a;);const r=e.pos-t;if(-1===a){warn("Inline ASCIIHexDecode image stream: EOD marker not found, searching for /EI/ instead.");e.skip(-r);return this.findDefaultInlineStreamEnd(e)}this.inlineStreamSkipEI(e);return r}inlineStreamSkipEI(e){let t,a=0;for(;-1!==(t=e.getByte());)if(0===a)a=69===t?1:0;else if(1===a)a=73===t?2:0;else if(2===a)break}makeInlineImage(e){const t=this.lexer,a=t.stream,r=Object.create(null);let i;for(;!isCmd(this.buf1,"ID")&&this.buf1!==wa;){if(!(this.buf1 instanc\
eof Name))throw new FormatError("Dictionary key must be a name object");const t=this.buf1.name;this.shift();if(this.buf1===wa)break;r[t]=this.getObj(e)}-1!==t.beginInlineImagePos&&(i=a.pos-t.beginInlineImagePos);const n=this.xref.fetchIfRef(r.F||r.Filter);let s;if(n instanceof Name)s=n.name;else if(Array.isArray(n)){const e=this.xref.fetchIfRef(n[0]);e instanceof Name&&(s=e.name)}const o=a.pos;let c,l;switch(s){case"DCT":case"DCTDecode":c=this.findDCTDecodeInlineStreamEnd(a);break;case"A85":case\
"ASCII85Decode":c=this.findASCII85DecodeInlineStreamEnd(a);break;case"AHx":case"ASCIIHexDecode":c=this.findASCIIHexDecodeInlineStreamEnd(a);break;default:c=this.findDefaultInlineStreamEnd(a)}if(c<1e3&&i>0){const e=a.pos;a.pos=t.beginInlineImagePos;l=function getInlineImageCacheKey(e){const t=[],a=e.length;let r=0;for(;r<a-1;)t.push(e[r++]<<8|e[r++]);r<a&&t.push(e[r]);return a+"_"+String.fromCharCode.apply(null,t)}(a.getBytes(i+c));a.pos=e;const r=this.imageCache[l];if(void 0!==r){this.buf2=Cmd.g\
et("EI");this.shift();r.reset();return r}}const h=new Dict(this.xref);for(const e in r)h.set(e,r[e]);let u=a.makeSubStream(o,c,h);e&&(u=e.createStream(u,c));u=this.filter(u,h,c);u.dict=h;if(void 0!==l){u.cacheKey="inline_img_"+ ++this._imageId;this.imageCache[l]=u}this.buf2=Cmd.get("EI");this.shift();return u}#q(e){const{stream:t}=this.lexer;t.pos=e;const a=new Uint8Array([101,110,100]),r=a.length,i=[new Uint8Array([115,116,114,101,97,109]),new Uint8Array([115,116,101,97,109]),new Uint8Array([11\
5,116,114,101,97])],n=9-r;for(;t.pos<t.end;){const s=t.peekBytes(2048),o=s.length-9;if(o<=0)break;let c=0;for(;c<o;){let o=0;for(;o<r&&s[c+o]===a[o];)o++;if(o>=r){let r=!1;for(const e of i){const t=e.length;let i=0;for(;i<t&&s[c+o+i]===e[i];)i++;if(i>=n){r=!0;break}if(i>=t){if(isWhiteSpace(s[c+o+i])){info(`Found "${bytesToString([...a,...e])}" when searching for endstream command.`);r=!0}break}}if(r){t.pos+=c;return t.pos-e}}c++}t.pos+=o}return-1}makeStream(e,t){const a=this.lexer;let r=a.stream\
;a.skipToNextLine();const i=r.pos-1;let n=e.get("Length");if(!Number.isInteger(n)){info(`Bad length "${n&&n.toString()}" in stream.`);n=0}r.pos=i+n;a.nextChar();if(this.tryShift()&&isCmd(this.buf2,"endstream"))this.shift();else{n=this.#q(i);if(n<0)throw new FormatError("Missing endstream command.");a.nextChar();this.shift();this.shift()}this.shift();r=r.makeSubStream(i,n,e);t&&(r=t.createStream(r,n));r=this.filter(r,e,n);r.dict=e;return r}filter(e,t,a){let r=t.get("F","Filter"),i=t.get("DP","Dec\
odeParms");if(r instanceof Name){Array.isArray(i)&&warn("/DecodeParms should not be an Array, when /Filter is a Name.");return this.makeFilter(e,r.name,a,i)}let n=a;if(Array.isArray(r)){const t=r,a=i;for(let s=0,o=t.length;s<o;++s){r=this.xref.fetchIfRef(t[s]);if(!(r instanceof Name))throw new FormatError(`Bad filter name "${r}"`);i=null;Array.isArray(a)&&s in a&&(i=this.xref.fetchIfRef(a[s]));e=this.makeFilter(e,r.name,n,i);n=null}}return e}makeFilter(e,t,a,r){if(0===a){warn(`Empty "${t}" strea\
m.`);return new NullStream}try{switch(t){case"Fl":case"FlateDecode":return r?new PredictorStream(new FlateStream(e,a),a,r):new FlateStream(e,a);case"LZW":case"LZWDecode":let t=1;if(r){r.has("EarlyChange")&&(t=r.get("EarlyChange"));return new PredictorStream(new LZWStream(e,a,t),a,r)}return new LZWStream(e,a,t);case"DCT":case"DCTDecode":return new JpegStream(e,a,r);case"JPX":case"JPXDecode":return new JpxStream(e,a,r);case"A85":case"ASCII85Decode":return new Ascii85Stream(e,a);case"AHx":case"ASCI\
IHexDecode":return new AsciiHexStream(e,a);case"CCF":case"CCITTFaxDecode":return new CCITTFaxStream(e,a,r);case"RL":case"RunLengthDecode":return new RunLengthStream(e,a);case"JBIG2Decode":return new Jbig2Stream(e,a,r)}warn(`Filter "${t}" is not supported.`);return e}catch(e){if(e instanceof MissingDataException)throw e;warn(`Invalid stream: "${e}"`);return new NullStream}}}const mr=[1,0,0,0,0,0,0,0,0,1,1,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,2,0,0,2,2,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,\
0,0,0,2,0,2,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,2,0,2,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,2,0,2,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,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,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,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];function toHexDigit(e){return e>=48&&e<=57?15&e:e>=65&&e<=70||e>=97&&e<=102?9+(15&e):-1}class Lexer{c\
onstructor(e,t=null){this.stream=e;this.nextChar();this.strBuf=[];this.knownCommands=t;this._hexStringNumWarn=0;this.beginInlineImagePos=-1}nextChar(){return this.currentChar=this.stream.getByte()}peekChar(){return this.stream.peekByte()}getNumber(){let e=this.currentChar,t=!1,a=0,r=1;if(45===e){r=-1;e=this.nextChar();45===e&&(e=this.nextChar())}else 43===e&&(e=this.nextChar());if(10===e||13===e)do{e=this.nextChar()}while(10===e||13===e);if(46===e){a=10;e=this.nextChar()}if(e<48||e>57){const t=`\
Invalid number: ${String.fromCharCode(e)} (charCode ${e})`;if(isWhiteSpace(e)||40===e||60===e||-1===e){info(`Lexer.getNumber - "${t}".`);return 0}throw new FormatError(t)}let i=e-48,n=0,s=1;for(;(e=this.nextChar())>=0;)if(e>=48&&e<=57){const r=e-48;if(t)n=10*n+r;else{0!==a&&(a*=10);i=10*i+r}}else if(46===e){if(0!==a)break;a=1}else if(45===e)warn("Badly formatted number: minus sign in the middle");else{if(69!==e&&101!==e)break;e=this.peekChar();if(43===e||45===e){s=45===e?-1:1;this.nextChar()}els\
e if(e<48||e>57)break;t=!0}0!==a&&(i/=a);t&&(i*=10**(s*n));return r*i}getString(){let e=1,t=!1;const a=this.strBuf;a.length=0;let r=this.nextChar();for(;;){let i=!1;switch(0|r){case-1:warn("Unterminated string");t=!0;break;case 40:++e;a.push("(");break;case 41:if(0==--e){this.nextChar();t=!0}else a.push(")");break;case 92:r=this.nextChar();switch(r){case-1:warn("Unterminated string");t=!0;break;case 110:a.push("\\n");break;case 114:a.push("\\r");break;case 116:a.push("\\t");break;case 98:a.push("\\b\
");break;case 102:a.push("\\f");break;case 92:case 40:case 41:a.push(String.fromCharCode(r));break;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:let e=15&r;r=this.nextChar();i=!0;if(r>=48&&r<=55){e=(e<<3)+(15&r);r=this.nextChar();if(r>=48&&r<=55){i=!1;e=(e<<3)+(15&r)}}a.push(String.fromCharCode(e));break;case 13:10===this.peekChar()&&this.nextChar();break;case 10:break;default:a.push(String.fromCharCode(r))}break;default:a.push(String.fromCharCode(r))}if(t)break;i||(r=this.nextC\
har())}return a.join("")}getName(){let e,t;const a=this.strBuf;a.length=0;for(;(e=this.nextChar())>=0&&!mr[e];)if(35===e){e=this.nextChar();if(mr[e]){warn("Lexer_getName: NUMBER SIGN (#) should be followed by a hexadecimal number.");a.push("#");break}const r=toHexDigit(e);if(-1!==r){t=e;e=this.nextChar();const i=toHexDigit(e);if(-1===i){warn(`Lexer_getName: Illegal digit (${String.fromCharCode(e)}) in hexadecimal number.`);a.push("#",String.fromCharCode(t));if(mr[e])break;a.push(String.fromCharC\
ode(e));continue}a.push(String.fromCharCode(r<<4|i))}else a.push("#",String.fromCharCode(e))}else a.push(String.fromCharCode(e));a.length>127&&warn(`Name token is longer than allowed by the spec: ${a.length}`);return Name.get(a.join(""))}_hexStringWarn(e){5!=this._hexStringNumWarn++?this._hexStringNumWarn>5||warn(`getHexString - ignoring invalid character: ${e}`):warn("getHexString - ignoring additional invalid characters.")}getHexString(){const e=this.strBuf;e.length=0;let t=this.currentChar,a=\
-1,r=-1;this._hexStringNumWarn=0;for(;;){if(t<0){warn("Unterminated hex string");break}if(62===t){this.nextChar();break}if(1!==mr[t]){r=toHexDigit(t);if(-1===r)this._hexStringWarn(t);else if(-1===a)a=r;else{e.push(String.fromCharCode(a<<4|r));a=-1}t=this.nextChar()}else t=this.nextChar()}-1!==a&&e.push(String.fromCharCode(a<<4));return e.join("")}getObj(){let e=!1,t=this.currentChar;for(;;){if(t<0)return wa;if(e)10!==t&&13!==t||(e=!1);else if(37===t)e=!0;else if(1!==mr[t])break;t=this.nextChar()\
}switch(0|t){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 43:case 45:case 46:return this.getNumber();case 40:return this.getString();case 47:return this.getName();case 91:this.nextChar();return Cmd.get("[");case 93:this.nextChar();return Cmd.get("]");case 60:t=this.nextChar();if(60===t){this.nextChar();return Cmd.get("<<")}return this.getHexString();case 62:t=this.nextChar();if(62===t){this.nextChar();return Cmd.get(">>")}return Cmd.get(">");case 123:this.\
nextChar();return Cmd.get("{");case 125:this.nextChar();return Cmd.get("}");case 41:this.nextChar();throw new FormatError(`Illegal character: ${t}`)}let a=String.fromCharCode(t);if(t<32||t>127){const e=this.peekChar();if(e>=32&&e<=127){this.nextChar();return Cmd.get(a)}}const r=this.knownCommands;let i=void 0!==r?.[a];for(;(t=this.nextChar())>=0&&!mr[t];){const e=a+String.fromCharCode(t);if(i&&void 0===r[e])break;if(128===a.length)throw new FormatError(`Command token too long: ${a.length}`);a=e;\
i=void 0!==r?.[a]}if("true"===a)return!0;if("false"===a)return!1;if("null"===a)return null;"BI"===a&&(this.beginInlineImagePos=this.stream.pos);return Cmd.get(a)}skipToNextLine(){let e=this.currentChar;for(;e>=0;){if(13===e){e=this.nextChar();10===e&&this.nextChar();break}if(10===e){this.nextChar();break}e=this.nextChar()}}}class Linearization{static create(e){function getInt(e,t,a=!1){const r=e.get(t);if(Number.isInteger(r)&&(a?r>=0:r>0))return r;throw new Error(`The "${t}" parameter in the lin\
earization dictionary is invalid.`)}const t=new Parser({lexer:new Lexer(e),xref:null}),a=t.getObj(),r=t.getObj(),i=t.getObj(),n=t.getObj();let s,o;if(!(Number.isInteger(a)&&Number.isInteger(r)&&isCmd(i,"obj")&&n instanceof Dict&&"number"==typeof(s=n.get("Linearized"))&&s>0))return null;if((o=getInt(n,"L"))!==e.length)throw new Error(\'The "L" parameter in the linearization dictionary does not equal the stream length.\');return{length:o,hints:function getHints(e){const t=e.get("H");let a;if(Array.i\
sArray(t)&&(2===(a=t.length)||4===a)){for(let e=0;e<a;e++){const a=t[e];if(!(Number.isInteger(a)&&a>0))throw new Error(`Hint (${e}) in the linearization dictionary is invalid.`)}return t}throw new Error("Hint array in the linearization dictionary is invalid.")}(n),objectNumberFirst:getInt(n,"O"),endFirst:getInt(n,"E"),numPages:getInt(n,"N"),mainXRefEntriesOffset:getInt(n,"T"),pageFirst:n.has("P")?getInt(n,"P",!0):0}}}const br=["Adobe-GB1-UCS2","Adobe-CNS1-UCS2","Adobe-Japan1-UCS2","Adobe-Korea1-\
UCS2","78-EUC-H","78-EUC-V","78-H","78-RKSJ-H","78-RKSJ-V","78-V","78ms-RKSJ-H","78ms-RKSJ-V","83pv-RKSJ-H","90ms-RKSJ-H","90ms-RKSJ-V","90msp-RKSJ-H","90msp-RKSJ-V","90pv-RKSJ-H","90pv-RKSJ-V","Add-H","Add-RKSJ-H","Add-RKSJ-V","Add-V","Adobe-CNS1-0","Adobe-CNS1-1","Adobe-CNS1-2","Adobe-CNS1-3","Adobe-CNS1-4","Adobe-CNS1-5","Adobe-CNS1-6","Adobe-GB1-0","Adobe-GB1-1","Adobe-GB1-2","Adobe-GB1-3","Adobe-GB1-4","Adobe-GB1-5","Adobe-Japan1-0","Adobe-Japan1-1","Adobe-Japan1-2","Adobe-Japan1-3","Adobe-\
Japan1-4","Adobe-Japan1-5","Adobe-Japan1-6","Adobe-Korea1-0","Adobe-Korea1-1","Adobe-Korea1-2","B5-H","B5-V","B5pc-H","B5pc-V","CNS-EUC-H","CNS-EUC-V","CNS1-H","CNS1-V","CNS2-H","CNS2-V","ETHK-B5-H","ETHK-B5-V","ETen-B5-H","ETen-B5-V","ETenms-B5-H","ETenms-B5-V","EUC-H","EUC-V","Ext-H","Ext-RKSJ-H","Ext-RKSJ-V","Ext-V","GB-EUC-H","GB-EUC-V","GB-H","GB-V","GBK-EUC-H","GBK-EUC-V","GBK2K-H","GBK2K-V","GBKp-EUC-H","GBKp-EUC-V","GBT-EUC-H","GBT-EUC-V","GBT-H","GBT-V","GBTpc-EUC-H","GBTpc-EUC-V","GBpc\
-EUC-H","GBpc-EUC-V","H","HKdla-B5-H","HKdla-B5-V","HKdlb-B5-H","HKdlb-B5-V","HKgccs-B5-H","HKgccs-B5-V","HKm314-B5-H","HKm314-B5-V","HKm471-B5-H","HKm471-B5-V","HKscs-B5-H","HKscs-B5-V","Hankaku","Hiragana","KSC-EUC-H","KSC-EUC-V","KSC-H","KSC-Johab-H","KSC-Johab-V","KSC-V","KSCms-UHC-H","KSCms-UHC-HW-H","KSCms-UHC-HW-V","KSCms-UHC-V","KSCpc-EUC-H","KSCpc-EUC-V","Katakana","NWP-H","NWP-V","RKSJ-H","RKSJ-V","Roman","UniCNS-UCS2-H","UniCNS-UCS2-V","UniCNS-UTF16-H","UniCNS-UTF16-V","UniCNS-UTF32-H\
","UniCNS-UTF32-V","UniCNS-UTF8-H","UniCNS-UTF8-V","UniGB-UCS2-H","UniGB-UCS2-V","UniGB-UTF16-H","UniGB-UTF16-V","UniGB-UTF32-H","UniGB-UTF32-V","UniGB-UTF8-H","UniGB-UTF8-V","UniJIS-UCS2-H","UniJIS-UCS2-HW-H","UniJIS-UCS2-HW-V","UniJIS-UCS2-V","UniJIS-UTF16-H","UniJIS-UTF16-V","UniJIS-UTF32-H","UniJIS-UTF32-V","UniJIS-UTF8-H","UniJIS-UTF8-V","UniJIS2004-UTF16-H","UniJIS2004-UTF16-V","UniJIS2004-UTF32-H","UniJIS2004-UTF32-V","UniJIS2004-UTF8-H","UniJIS2004-UTF8-V","UniJISPro-UCS2-HW-V","UniJISPr\
o-UCS2-V","UniJISPro-UTF8-V","UniJISX0213-UTF32-H","UniJISX0213-UTF32-V","UniJISX02132004-UTF32-H","UniJISX02132004-UTF32-V","UniKS-UCS2-H","UniKS-UCS2-V","UniKS-UTF16-H","UniKS-UTF16-V","UniKS-UTF32-H","UniKS-UTF32-V","UniKS-UTF8-H","UniKS-UTF8-V","V","WP-Symbol"],yr=2**24-1;class CMap{constructor(e=!1){this.codespaceRanges=[[],[],[],[]];this.numCodespaceRanges=0;this._map=[];this.name="";this.vertical=!1;this.useCMap=null;this.builtInCMap=e}addCodespaceRange(e,t,a){this.codespaceRanges[e-1].pu\
sh(t,a);this.numCodespaceRanges++}mapCidRange(e,t,a){if(t-e>yr)throw new Error("mapCidRange - ignoring data above MAX_MAP_RANGE.");for(;e<=t;)this._map[e++]=a++}mapBfRange(e,t,a){if(t-e>yr)throw new Error("mapBfRange - ignoring data above MAX_MAP_RANGE.");const r=a.length-1;for(;e<=t;){this._map[e++]=a;const t=a.charCodeAt(r)+1;t>255?a=a.substring(0,r-1)+String.fromCharCode(a.charCodeAt(r-1)+1)+"\\0":a=a.substring(0,r)+String.fromCharCode(t)}}mapBfRangeToArray(e,t,a){if(t-e>yr)throw new Error("ma\
pBfRangeToArray - ignoring data above MAX_MAP_RANGE.");const r=a.length;let i=0;for(;e<=t&&i<r;){this._map[e]=a[i++];++e}}mapOne(e,t){this._map[e]=t}lookup(e){return this._map[e]}contains(e){return void 0!==this._map[e]}forEach(e){const t=this._map,a=t.length;if(a<=65536)for(let r=0;r<a;r++)void 0!==t[r]&&e(r,t[r]);else for(const a in t)e(a,t[a])}charCodeOf(e){const t=this._map;if(t.length<=65536)return t.indexOf(e);for(const a in t)if(t[a]===e)return 0|a;return-1}getMap(){return this._map}readC\
harCode(e,t,a){let r=0;const i=this.codespaceRanges;for(let n=0,s=i.length;n<s;n++){r=(r<<8|e.charCodeAt(t+n))>>>0;const s=i[n];for(let e=0,t=s.length;e<t;){const t=s[e++],i=s[e++];if(r>=t&&r<=i){a.charcode=r;a.length=n+1;return}}}a.charcode=0;a.length=1}getCharCodeLength(e){const t=this.codespaceRanges;for(let a=0,r=t.length;a<r;a++){const r=t[a];for(let t=0,i=r.length;t<i;){const i=r[t++],n=r[t++];if(e>=i&&e<=n)return a+1}}return 1}get length(){return this._map.length}get isIdentityCMap(){if("\
Identity-H"!==this.name&&"Identity-V"!==this.name)return!1;if(65536!==this._map.length)return!1;for(let e=0;e<65536;e++)if(this._map[e]!==e)return!1;return!0}}class IdentityCMap extends CMap{constructor(e,t){super();this.vertical=e;this.addCodespaceRange(t,0,65535)}mapCidRange(e,t,a){unreachable("should not call mapCidRange")}mapBfRange(e,t,a){unreachable("should not call mapBfRange")}mapBfRangeToArray(e,t,a){unreachable("should not call mapBfRangeToArray")}mapOne(e,t){unreachable("should not ca\
ll mapCidOne")}lookup(e){return Number.isInteger(e)&&e<=65535?e:void 0}contains(e){return Number.isInteger(e)&&e<=65535}forEach(e){for(let t=0;t<=65535;t++)e(t,t)}charCodeOf(e){return Number.isInteger(e)&&e<=65535?e:-1}getMap(){const e=new Array(65536);for(let t=0;t<=65535;t++)e[t]=t;return e}get length(){return 65536}get isIdentityCMap(){unreachable("should not access .isIdentityCMap")}}function strToInt(e){let t=0;for(let a=0;a<e.length;a++)t=t<<8|e.charCodeAt(a);return t>>>0}function expectSt\
ring(e){if("string"!=typeof e)throw new FormatError("Malformed CMap: expected string.")}function expectInt(e){if(!Number.isInteger(e))throw new FormatError("Malformed CMap: expected int.")}function parseBfChar(e,t){for(;;){let a=t.getObj();if(a===wa)break;if(isCmd(a,"endbfchar"))return;expectString(a);const r=strToInt(a);a=t.getObj();expectString(a);const i=a;e.mapOne(r,i)}}function parseBfRange(e,t){for(;;){let a=t.getObj();if(a===wa)break;if(isCmd(a,"endbfrange"))return;expectString(a);const r\
=strToInt(a);a=t.getObj();expectString(a);const i=strToInt(a);a=t.getObj();if(Number.isInteger(a)||"string"==typeof a){const t=Number.isInteger(a)?String.fromCharCode(a):a;e.mapBfRange(r,i,t)}else{if(!isCmd(a,"["))break;{a=t.getObj();const n=[];for(;!isCmd(a,"]")&&a!==wa;){n.push(a);a=t.getObj()}e.mapBfRangeToArray(r,i,n)}}}throw new FormatError("Invalid bf range.")}function parseCidChar(e,t){for(;;){let a=t.getObj();if(a===wa)break;if(isCmd(a,"endcidchar"))return;expectString(a);const r=strToIn\
t(a);a=t.getObj();expectInt(a);const i=a;e.mapOne(r,i)}}function parseCidRange(e,t){for(;;){let a=t.getObj();if(a===wa)break;if(isCmd(a,"endcidrange"))return;expectString(a);const r=strToInt(a);a=t.getObj();expectString(a);const i=strToInt(a);a=t.getObj();expectInt(a);const n=a;e.mapCidRange(r,i,n)}}function parseCodespaceRange(e,t){for(;;){let a=t.getObj();if(a===wa)break;if(isCmd(a,"endcodespacerange"))return;if("string"!=typeof a)break;const r=strToInt(a);a=t.getObj();if("string"!=typeof a)br\
eak;const i=strToInt(a);e.addCodespaceRange(a.length,r,i)}throw new FormatError("Invalid codespace range.")}function parseWMode(e,t){const a=t.getObj();Number.isInteger(a)&&(e.vertical=!!a)}function parseCMapName(e,t){const a=t.getObj();a instanceof Name&&(e.name=a.name)}async function parseCMap(e,t,a,r){let i,n;e:for(;;)try{const a=t.getObj();if(a===wa)break;if(a instanceof Name){"WMode"===a.name?parseWMode(e,t):"CMapName"===a.name&&parseCMapName(e,t);i=a}else if(a instanceof Cmd)switch(a.cmd){\
case"endcmap":break e;case"usecmap":i instanceof Name&&(n=i.name);break;case"begincodespacerange":parseCodespaceRange(e,t);break;case"beginbfchar":parseBfChar(e,t);break;case"begincidchar":parseCidChar(e,t);break;case"beginbfrange":parseBfRange(e,t);break;case"begincidrange":parseCidRange(e,t)}}catch(e){if(e instanceof MissingDataException)throw e;warn("Invalid cMap data: "+e);continue}!r&&n&&(r=n);return r?extendCMap(e,a,r):e}async function extendCMap(e,t,a){e.useCMap=await createBuiltInCMap(a,\
t);if(0===e.numCodespaceRanges){const t=e.useCMap.codespaceRanges;for(let a=0;a<t.length;a++)e.codespaceRanges[a]=t[a].slice();e.numCodespaceRanges=e.useCMap.numCodespaceRanges}e.useCMap.forEach((function(t,a){e.contains(t)||e.mapOne(t,a)}));return e}async function createBuiltInCMap(e,t){if("Identity-H"===e)return new IdentityCMap(!1,2);if("Identity-V"===e)return new IdentityCMap(!0,2);if(!br.includes(e))throw new Error("Unknown CMap name: "+e);if(!t)throw new Error("Built-in CMap parameters are\
 not provided.");const{cMapData:a,isCompressed:r}=await t(e),i=new CMap(!0);if(r)return(new BinaryCMapReader).process(a,i,(e=>extendCMap(i,t,e)));const n=new Lexer(new Stream(a));return parseCMap(i,n,t,null)}class CMapFactory{static async create({encoding:e,fetchBuiltInCMap:t,useCMap:a}){if(e instanceof Name)return createBuiltInCMap(e.name,t);if(e instanceof BaseStream){const r=await parseCMap(new CMap,new Lexer(e),t,a);return r.isIdentityCMap?createBuiltInCMap(r.name,t):r}throw new Error("Encod\
ing required.")}}const wr=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclamsmall","Hungarumlautsmall","","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","comma","hyphen","period","fraction","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","colon\
","semicolon","commasuperior","threequartersemdash","periodsuperior","questionsmall","","asuperior","bsuperior","centsuperior","dsuperior","esuperior","","","","isuperior","","","lsuperior","msuperior","nsuperior","osuperior","","","rsuperior","ssuperior","tsuperior","","ff","fi","fl","ffi","ffl","parenleftinferior","","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","M\
small","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","exclamdownsmall","centoldstyle","Lslashsmall","","","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","","Dotaccentsmall","","","Macronsmall","","","figuredash","hypheninferior","","","Ogoneksmall","Ring\
small","Cedillasmall","","","","onequarter","onehalf","threequarters","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","","","zerosuperior","onesuperior","twosuperior","threesuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinf\
erior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmal\
l","Ydieresissmall"],xr=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclamsmall","Hungarumlautsmall","centoldstyle","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","comma","hyphen","period","fraction","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldsty\
le","colon","semicolon","","threequartersemdash","","questionsmall","","","","","Ethsmall","","","onequarter","onehalf","threequarters","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","","","","","","","ff","fi","fl","ffi","ffl","parenleftinferior","","parenrightinferior","Circumflexsmall","hypheninferior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsm\
all","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","","","asuperior","centsuperior","","","","","Aacutesmall","Agravesmall","Acircumflexsmall","Adieresissmall","Atildesmall","Aringsmall","Ccedillasmall","Eacutesmall","Egravesmall","Ecircumflexsmall","Edieresissmall","Iacutesmall","Igravesmall","Icircumflexsmall","Idieresissmall","Ntildesmall","Oacutesmall","Ogravesmall","Ocircumflexsmall","Odieresissmall","Otild\
esmall","Uacutesmall","Ugravesmall","Ucircumflexsmall","Udieresissmall","","eightsuperior","fourinferior","threeinferior","sixinferior","eightinferior","seveninferior","Scaronsmall","","centinferior","twoinferior","","Dieresissmall","","Caronsmall","osuperior","fiveinferior","","commainferior","periodinferior","Yacutesmall","","dollarinferior","","","Thornsmall","","nineinferior","zeroinferior","Zcaronsmall","AEsmall","Oslashsmall","questiondownsmall","oneinferior","Lslashsmall","","","","","","\
","Cedillasmall","","","","","","OEsmall","figuredash","hyphensuperior","","","","","exclamdownsmall","","Ydieresissmall","","onesuperior","twosuperior","threesuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","ninesuperior","zerosuperior","","esuperior","rsuperior","tsuperior","","","isuperior","ssuperior","dsuperior","","","","","","lsuperior","Ogoneksmall","Brevesmall","Macronsmall","bsuperior","nsuperior","msuperior","commasuperior","periodsuperior","Dotaccentsmall","Rings\
mall","","","",""],Sr=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quotesingle","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V"\
,"W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","grave","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","","Adieresis","Aring","Ccedilla","Eacute","Ntilde","Odieresis","Udieresis","aacute","agrave","acircumflex","adieresis","atilde","aring","ccedilla","eacute","egrave","ecircumflex","edieresis","iacute","igrave","icircumflex","idieresis","ntilde","oacute","ogra\
ve","ocircumflex","odieresis","otilde","uacute","ugrave","ucircumflex","udieresis","dagger","degree","cent","sterling","section","bullet","paragraph","germandbls","registered","copyright","trademark","acute","dieresis","notequal","AE","Oslash","infinity","plusminus","lessequal","greaterequal","yen","mu","partialdiff","summation","product","pi","integral","ordfeminine","ordmasculine","Omega","ae","oslash","questiondown","exclamdown","logicalnot","radical","florin","approxequal","Delta","guillemot\
left","guillemotright","ellipsis","space","Agrave","Atilde","Otilde","OE","oe","endash","emdash","quotedblleft","quotedblright","quoteleft","quoteright","divide","lozenge","ydieresis","Ydieresis","fraction","currency","guilsinglleft","guilsinglright","fi","fl","daggerdbl","periodcentered","quotesinglbase","quotedblbase","perthousand","Acircumflex","Ecircumflex","Aacute","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Oacute","Ocircumflex","apple","Ograve","Uacute","Ucircumflex"\
,"Ugrave","dotlessi","circumflex","tilde","macron","breve","dotaccent","ring","cedilla","hungarumlaut","ogonek","caron"],Ar=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","q\
uestion","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quoteleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","exclamdown","cent","sterling","fraction","yen","flo\
rin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","","endash","dagger","daggerdbl","periodcentered","","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","","questiondown","","grave","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","","ring","cedilla","","hungarumlaut","ogonek","caron","emdash","","","","","","","","","","","","","","","","","AE","","ord\
feminine","","","","","Lslash","Oslash","OE","ordmasculine","","","","","","ae","","","","dotlessi","","","lslash","oslash","oe","germandbls","","","",""],kr=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quotesingle","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","sem\
icolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","grave","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","bullet","Euro","bullet","quotesinglbase","florin","quotedblbase","ellipsis","dagger","daggerdbl","circumflex","perthousand\
","Scaron","guilsinglleft","OE","bullet","Zcaron","bullet","bullet","quoteleft","quoteright","quotedblleft","quotedblright","bullet","endash","emdash","tilde","trademark","scaron","guilsinglright","oe","bullet","zcaron","Ydieresis","space","exclamdown","cent","sterling","currency","yen","brokenbar","section","dieresis","copyright","ordfeminine","guillemotleft","logicalnot","hyphen","registered","macron","degree","plusminus","twosuperior","threesuperior","acute","mu","paragraph","periodcentered",\
"cedilla","onesuperior","ordmasculine","guillemotright","onequarter","onehalf","threequarters","questiondown","Agrave","Aacute","Acircumflex","Atilde","Adieresis","Aring","AE","Ccedilla","Egrave","Eacute","Ecircumflex","Edieresis","Igrave","Iacute","Icircumflex","Idieresis","Eth","Ntilde","Ograve","Oacute","Ocircumflex","Otilde","Odieresis","multiply","Oslash","Ugrave","Uacute","Ucircumflex","Udieresis","Yacute","Thorn","germandbls","agrave","aacute","acircumflex","atilde","adieresis","aring","a\
e","ccedilla","egrave","eacute","ecircumflex","edieresis","igrave","iacute","icircumflex","idieresis","eth","ntilde","ograve","oacute","ocircumflex","otilde","odieresis","divide","oslash","ugrave","uacute","ucircumflex","udieresis","yacute","thorn","ydieresis"],Cr=["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","exclam","universal","numbersign","existential","percent","ampersand","suchthat","parenleft","parenright","asteriskmath","plus","c\
omma","minus","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","congruent","Alpha","Beta","Chi","Delta","Epsilon","Phi","Gamma","Eta","Iota","theta1","Kappa","Lambda","Mu","Nu","Omicron","Pi","Theta","Rho","Sigma","Tau","Upsilon","sigma1","Omega","Xi","Psi","Zeta","bracketleft","therefore","bracketright","perpendicular","underscore","radicalex","alpha","beta","chi","delta","epsilon","phi","gamma","eta",\
"iota","phi1","kappa","lambda","mu","nu","omicron","pi","theta","rho","sigma","tau","upsilon","omega1","omega","xi","psi","zeta","braceleft","bar","braceright","similar","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","Euro","Upsilon1","minute","lessequal","fraction","infinity","florin","club","diamond","heart","spade","arrowboth","arrowleft","arrowup","arrowright","arrowdown","degree","plusminus","second","greaterequal","multiply","proportional\
","partialdiff","bullet","divide","notequal","equivalence","approxequal","ellipsis","arrowvertex","arrowhorizex","carriagereturn","aleph","Ifraktur","Rfraktur","weierstrass","circlemultiply","circleplus","emptyset","intersection","union","propersuperset","reflexsuperset","notsubset","propersubset","reflexsubset","element","notelement","angle","gradient","registerserif","copyrightserif","trademarkserif","product","radical","dotmath","logicalnot","logicaland","logicalor","arrowdblboth","arrowdblle\
ft","arrowdblup","arrowdblright","arrowdbldown","lozenge","angleleft","registersans","copyrightsans","trademarksans","summation","parenlefttp","parenleftex","parenleftbt","bracketlefttp","bracketleftex","bracketleftbt","bracelefttp","braceleftmid","braceleftbt","braceex","","angleright","integral","integraltp","integralex","integralbt","parenrighttp","parenrightex","parenrightbt","bracketrighttp","bracketrightex","bracketrightbt","bracerighttp","bracerightmid","bracerightbt",""],vr=["","","","",\
"","","","","","","","","","","","","","","","","","","","","","","","","","","","","space","a1","a2","a202","a3","a4","a5","a119","a118","a117","a11","a12","a13","a14","a15","a16","a105","a17","a18","a19","a20","a21","a22","a23","a24","a25","a26","a27","a28","a6","a7","a8","a9","a10","a29","a30","a31","a32","a33","a34","a35","a36","a37","a38","a39","a40","a41","a42","a43","a44","a45","a46","a47","a48","a49","a50","a51","a52","a53","a54","a55","a56","a57","a58","a59","a60","a61","a62","a63","a64\
","a65","a66","a67","a68","a69","a70","a71","a72","a73","a74","a203","a75","a204","a76","a77","a78","a79","a81","a82","a83","a84","a97","a98","a99","a100","","a89","a90","a93","a94","a91","a92","a205","a85","a206","a86","a87","a88","a95","a96","","","","","","","","","","","","","","","","","","","","a101","a102","a103","a104","a106","a107","a108","a112","a111","a110","a109","a120","a121","a122","a123","a124","a125","a126","a127","a128","a129","a130","a131","a132","a133","a134","a135","a136","a1\
37","a138","a139","a140","a141","a142","a143","a144","a145","a146","a147","a148","a149","a150","a151","a152","a153","a154","a155","a156","a157","a158","a159","a160","a161","a163","a164","a196","a165","a192","a166","a167","a168","a169","a170","a171","a172","a173","a162","a174","a175","a176","a177","a178","a179","a193","a180","a199","a181","a200","a182","","a201","a183","a184","a197","a185","a194","a198","a186","a195","a187","a188","a189","a190","a191",""];function getEncoding(e){switch(e){case"Wi\
nAnsiEncoding":return kr;case"StandardEncoding":return Ar;case"MacRomanEncoding":return Sr;case"SymbolSetEncoding":return Cr;case"ZapfDingbatsEncoding":return vr;case"ExpertEncoding":return wr;case"MacExpertEncoding":return xr;default:return null}}const Fr=getLookupTableFactory((function(e){e.A=65;e.AE=198;e.AEacute=508;e.AEmacron=482;e.AEsmall=63462;e.Aacute=193;e.Aacutesmall=63457;e.Abreve=258;e.Abreveacute=7854;e.Abrevecyrillic=1232;e.Abrevedotbelow=7862;e.Abrevegrave=7856;e.Abrevehookabove=7\
858;e.Abrevetilde=7860;e.Acaron=461;e.Acircle=9398;e.Acircumflex=194;e.Acircumflexacute=7844;e.Acircumflexdotbelow=7852;e.Acircumflexgrave=7846;e.Acircumflexhookabove=7848;e.Acircumflexsmall=63458;e.Acircumflextilde=7850;e.Acute=63177;e.Acutesmall=63412;e.Acyrillic=1040;e.Adblgrave=512;e.Adieresis=196;e.Adieresiscyrillic=1234;e.Adieresismacron=478;e.Adieresissmall=63460;e.Adotbelow=7840;e.Adotmacron=480;e.Agrave=192;e.Agravesmall=63456;e.Ahookabove=7842;e.Aiecyrillic=1236;e.Ainvertedbreve=514;e.\
Alpha=913;e.Alphatonos=902;e.Amacron=256;e.Amonospace=65313;e.Aogonek=260;e.Aring=197;e.Aringacute=506;e.Aringbelow=7680;e.Aringsmall=63461;e.Asmall=63329;e.Atilde=195;e.Atildesmall=63459;e.Aybarmenian=1329;e.B=66;e.Bcircle=9399;e.Bdotaccent=7682;e.Bdotbelow=7684;e.Becyrillic=1041;e.Benarmenian=1330;e.Beta=914;e.Bhook=385;e.Blinebelow=7686;e.Bmonospace=65314;e.Brevesmall=63220;e.Bsmall=63330;e.Btopbar=386;e.C=67;e.Caarmenian=1342;e.Cacute=262;e.Caron=63178;e.Caronsmall=63221;e.Ccaron=268;e.Ccedi\
lla=199;e.Ccedillaacute=7688;e.Ccedillasmall=63463;e.Ccircle=9400;e.Ccircumflex=264;e.Cdot=266;e.Cdotaccent=266;e.Cedillasmall=63416;e.Chaarmenian=1353;e.Cheabkhasiancyrillic=1212;e.Checyrillic=1063;e.Chedescenderabkhasiancyrillic=1214;e.Chedescendercyrillic=1206;e.Chedieresiscyrillic=1268;e.Cheharmenian=1347;e.Chekhakassiancyrillic=1227;e.Cheverticalstrokecyrillic=1208;e.Chi=935;e.Chook=391;e.Circumflexsmall=63222;e.Cmonospace=65315;e.Coarmenian=1361;e.Csmall=63331;e.D=68;e.DZ=497;e.DZcaron=452\
;e.Daarmenian=1332;e.Dafrican=393;e.Dcaron=270;e.Dcedilla=7696;e.Dcircle=9401;e.Dcircumflexbelow=7698;e.Dcroat=272;e.Ddotaccent=7690;e.Ddotbelow=7692;e.Decyrillic=1044;e.Deicoptic=1006;e.Delta=8710;e.Deltagreek=916;e.Dhook=394;e.Dieresis=63179;e.DieresisAcute=63180;e.DieresisGrave=63181;e.Dieresissmall=63400;e.Digammagreek=988;e.Djecyrillic=1026;e.Dlinebelow=7694;e.Dmonospace=65316;e.Dotaccentsmall=63223;e.Dslash=272;e.Dsmall=63332;e.Dtopbar=395;e.Dz=498;e.Dzcaron=453;e.Dzeabkhasiancyrillic=1248\
;e.Dzecyrillic=1029;e.Dzhecyrillic=1039;e.E=69;e.Eacute=201;e.Eacutesmall=63465;e.Ebreve=276;e.Ecaron=282;e.Ecedillabreve=7708;e.Echarmenian=1333;e.Ecircle=9402;e.Ecircumflex=202;e.Ecircumflexacute=7870;e.Ecircumflexbelow=7704;e.Ecircumflexdotbelow=7878;e.Ecircumflexgrave=7872;e.Ecircumflexhookabove=7874;e.Ecircumflexsmall=63466;e.Ecircumflextilde=7876;e.Ecyrillic=1028;e.Edblgrave=516;e.Edieresis=203;e.Edieresissmall=63467;e.Edot=278;e.Edotaccent=278;e.Edotbelow=7864;e.Efcyrillic=1060;e.Egrave=2\
00;e.Egravesmall=63464;e.Eharmenian=1335;e.Ehookabove=7866;e.Eightroman=8551;e.Einvertedbreve=518;e.Eiotifiedcyrillic=1124;e.Elcyrillic=1051;e.Elevenroman=8554;e.Emacron=274;e.Emacronacute=7702;e.Emacrongrave=7700;e.Emcyrillic=1052;e.Emonospace=65317;e.Encyrillic=1053;e.Endescendercyrillic=1186;e.Eng=330;e.Enghecyrillic=1188;e.Enhookcyrillic=1223;e.Eogonek=280;e.Eopen=400;e.Epsilon=917;e.Epsilontonos=904;e.Ercyrillic=1056;e.Ereversed=398;e.Ereversedcyrillic=1069;e.Escyrillic=1057;e.Esdescendercy\
rillic=1194;e.Esh=425;e.Esmall=63333;e.Eta=919;e.Etarmenian=1336;e.Etatonos=905;e.Eth=208;e.Ethsmall=63472;e.Etilde=7868;e.Etildebelow=7706;e.Euro=8364;e.Ezh=439;e.Ezhcaron=494;e.Ezhreversed=440;e.F=70;e.Fcircle=9403;e.Fdotaccent=7710;e.Feharmenian=1366;e.Feicoptic=996;e.Fhook=401;e.Fitacyrillic=1138;e.Fiveroman=8548;e.Fmonospace=65318;e.Fourroman=8547;e.Fsmall=63334;e.G=71;e.GBsquare=13191;e.Gacute=500;e.Gamma=915;e.Gammaafrican=404;e.Gangiacoptic=1002;e.Gbreve=286;e.Gcaron=486;e.Gcedilla=290;e\
.Gcircle=9404;e.Gcircumflex=284;e.Gcommaaccent=290;e.Gdot=288;e.Gdotaccent=288;e.Gecyrillic=1043;e.Ghadarmenian=1346;e.Ghemiddlehookcyrillic=1172;e.Ghestrokecyrillic=1170;e.Gheupturncyrillic=1168;e.Ghook=403;e.Gimarmenian=1331;e.Gjecyrillic=1027;e.Gmacron=7712;e.Gmonospace=65319;e.Grave=63182;e.Gravesmall=63328;e.Gsmall=63335;e.Gsmallhook=667;e.Gstroke=484;e.H=72;e.H18533=9679;e.H18543=9642;e.H18551=9643;e.H22073=9633;e.HPsquare=13259;e.Haabkhasiancyrillic=1192;e.Hadescendercyrillic=1202;e.Hards\
igncyrillic=1066;e.Hbar=294;e.Hbrevebelow=7722;e.Hcedilla=7720;e.Hcircle=9405;e.Hcircumflex=292;e.Hdieresis=7718;e.Hdotaccent=7714;e.Hdotbelow=7716;e.Hmonospace=65320;e.Hoarmenian=1344;e.Horicoptic=1e3;e.Hsmall=63336;e.Hungarumlaut=63183;e.Hungarumlautsmall=63224;e.Hzsquare=13200;e.I=73;e.IAcyrillic=1071;e.IJ=306;e.IUcyrillic=1070;e.Iacute=205;e.Iacutesmall=63469;e.Ibreve=300;e.Icaron=463;e.Icircle=9406;e.Icircumflex=206;e.Icircumflexsmall=63470;e.Icyrillic=1030;e.Idblgrave=520;e.Idieresis=207;e\
.Idieresisacute=7726;e.Idieresiscyrillic=1252;e.Idieresissmall=63471;e.Idot=304;e.Idotaccent=304;e.Idotbelow=7882;e.Iebrevecyrillic=1238;e.Iecyrillic=1045;e.Ifraktur=8465;e.Igrave=204;e.Igravesmall=63468;e.Ihookabove=7880;e.Iicyrillic=1048;e.Iinvertedbreve=522;e.Iishortcyrillic=1049;e.Imacron=298;e.Imacroncyrillic=1250;e.Imonospace=65321;e.Iniarmenian=1339;e.Iocyrillic=1025;e.Iogonek=302;e.Iota=921;e.Iotaafrican=406;e.Iotadieresis=938;e.Iotatonos=906;e.Ismall=63337;e.Istroke=407;e.Itilde=296;e.I\
tildebelow=7724;e.Izhitsacyrillic=1140;e.Izhitsadblgravecyrillic=1142;e.J=74;e.Jaarmenian=1345;e.Jcircle=9407;e.Jcircumflex=308;e.Jecyrillic=1032;e.Jheharmenian=1355;e.Jmonospace=65322;e.Jsmall=63338;e.K=75;e.KBsquare=13189;e.KKsquare=13261;e.Kabashkircyrillic=1184;e.Kacute=7728;e.Kacyrillic=1050;e.Kadescendercyrillic=1178;e.Kahookcyrillic=1219;e.Kappa=922;e.Kastrokecyrillic=1182;e.Kaverticalstrokecyrillic=1180;e.Kcaron=488;e.Kcedilla=310;e.Kcircle=9408;e.Kcommaaccent=310;e.Kdotbelow=7730;e.Keha\
rmenian=1364;e.Kenarmenian=1343;e.Khacyrillic=1061;e.Kheicoptic=998;e.Khook=408;e.Kjecyrillic=1036;e.Klinebelow=7732;e.Kmonospace=65323;e.Koppacyrillic=1152;e.Koppagreek=990;e.Ksicyrillic=1134;e.Ksmall=63339;e.L=76;e.LJ=455;e.LL=63167;e.Lacute=313;e.Lambda=923;e.Lcaron=317;e.Lcedilla=315;e.Lcircle=9409;e.Lcircumflexbelow=7740;e.Lcommaaccent=315;e.Ldot=319;e.Ldotaccent=319;e.Ldotbelow=7734;e.Ldotbelowmacron=7736;e.Liwnarmenian=1340;e.Lj=456;e.Ljecyrillic=1033;e.Llinebelow=7738;e.Lmonospace=65324;\
e.Lslash=321;e.Lslashsmall=63225;e.Lsmall=63340;e.M=77;e.MBsquare=13190;e.Macron=63184;e.Macronsmall=63407;e.Macute=7742;e.Mcircle=9410;e.Mdotaccent=7744;e.Mdotbelow=7746;e.Menarmenian=1348;e.Mmonospace=65325;e.Msmall=63341;e.Mturned=412;e.Mu=924;e.N=78;e.NJ=458;e.Nacute=323;e.Ncaron=327;e.Ncedilla=325;e.Ncircle=9411;e.Ncircumflexbelow=7754;e.Ncommaaccent=325;e.Ndotaccent=7748;e.Ndotbelow=7750;e.Nhookleft=413;e.Nineroman=8552;e.Nj=459;e.Njecyrillic=1034;e.Nlinebelow=7752;e.Nmonospace=65326;e.Now\
armenian=1350;e.Nsmall=63342;e.Ntilde=209;e.Ntildesmall=63473;e.Nu=925;e.O=79;e.OE=338;e.OEsmall=63226;e.Oacute=211;e.Oacutesmall=63475;e.Obarredcyrillic=1256;e.Obarreddieresiscyrillic=1258;e.Obreve=334;e.Ocaron=465;e.Ocenteredtilde=415;e.Ocircle=9412;e.Ocircumflex=212;e.Ocircumflexacute=7888;e.Ocircumflexdotbelow=7896;e.Ocircumflexgrave=7890;e.Ocircumflexhookabove=7892;e.Ocircumflexsmall=63476;e.Ocircumflextilde=7894;e.Ocyrillic=1054;e.Odblacute=336;e.Odblgrave=524;e.Odieresis=214;e.Odieresiscy\
rillic=1254;e.Odieresissmall=63478;e.Odotbelow=7884;e.Ogoneksmall=63227;e.Ograve=210;e.Ogravesmall=63474;e.Oharmenian=1365;e.Ohm=8486;e.Ohookabove=7886;e.Ohorn=416;e.Ohornacute=7898;e.Ohorndotbelow=7906;e.Ohorngrave=7900;e.Ohornhookabove=7902;e.Ohorntilde=7904;e.Ohungarumlaut=336;e.Oi=418;e.Oinvertedbreve=526;e.Omacron=332;e.Omacronacute=7762;e.Omacrongrave=7760;e.Omega=8486;e.Omegacyrillic=1120;e.Omegagreek=937;e.Omegaroundcyrillic=1146;e.Omegatitlocyrillic=1148;e.Omegatonos=911;e.Omicron=927;e\
.Omicrontonos=908;e.Omonospace=65327;e.Oneroman=8544;e.Oogonek=490;e.Oogonekmacron=492;e.Oopen=390;e.Oslash=216;e.Oslashacute=510;e.Oslashsmall=63480;e.Osmall=63343;e.Ostrokeacute=510;e.Otcyrillic=1150;e.Otilde=213;e.Otildeacute=7756;e.Otildedieresis=7758;e.Otildesmall=63477;e.P=80;e.Pacute=7764;e.Pcircle=9413;e.Pdotaccent=7766;e.Pecyrillic=1055;e.Peharmenian=1354;e.Pemiddlehookcyrillic=1190;e.Phi=934;e.Phook=420;e.Pi=928;e.Piwrarmenian=1363;e.Pmonospace=65328;e.Psi=936;e.Psicyrillic=1136;e.Psma\
ll=63344;e.Q=81;e.Qcircle=9414;e.Qmonospace=65329;e.Qsmall=63345;e.R=82;e.Raarmenian=1356;e.Racute=340;e.Rcaron=344;e.Rcedilla=342;e.Rcircle=9415;e.Rcommaaccent=342;e.Rdblgrave=528;e.Rdotaccent=7768;e.Rdotbelow=7770;e.Rdotbelowmacron=7772;e.Reharmenian=1360;e.Rfraktur=8476;e.Rho=929;e.Ringsmall=63228;e.Rinvertedbreve=530;e.Rlinebelow=7774;e.Rmonospace=65330;e.Rsmall=63346;e.Rsmallinverted=641;e.Rsmallinvertedsuperior=694;e.S=83;e.SF010000=9484;e.SF020000=9492;e.SF030000=9488;e.SF040000=9496;e.SF\
050000=9532;e.SF060000=9516;e.SF070000=9524;e.SF080000=9500;e.SF090000=9508;e.SF100000=9472;e.SF110000=9474;e.SF190000=9569;e.SF200000=9570;e.SF210000=9558;e.SF220000=9557;e.SF230000=9571;e.SF240000=9553;e.SF250000=9559;e.SF260000=9565;e.SF270000=9564;e.SF280000=9563;e.SF360000=9566;e.SF370000=9567;e.SF380000=9562;e.SF390000=9556;e.SF400000=9577;e.SF410000=9574;e.SF420000=9568;e.SF430000=9552;e.SF440000=9580;e.SF450000=9575;e.SF460000=9576;e.SF470000=9572;e.SF480000=9573;e.SF490000=9561;e.SF5000\
00=9560;e.SF510000=9554;e.SF520000=9555;e.SF530000=9579;e.SF540000=9578;e.Sacute=346;e.Sacutedotaccent=7780;e.Sampigreek=992;e.Scaron=352;e.Scarondotaccent=7782;e.Scaronsmall=63229;e.Scedilla=350;e.Schwa=399;e.Schwacyrillic=1240;e.Schwadieresiscyrillic=1242;e.Scircle=9416;e.Scircumflex=348;e.Scommaaccent=536;e.Sdotaccent=7776;e.Sdotbelow=7778;e.Sdotbelowdotaccent=7784;e.Seharmenian=1357;e.Sevenroman=8550;e.Shaarmenian=1351;e.Shacyrillic=1064;e.Shchacyrillic=1065;e.Sheicoptic=994;e.Shhacyrillic=1\
210;e.Shimacoptic=1004;e.Sigma=931;e.Sixroman=8549;e.Smonospace=65331;e.Softsigncyrillic=1068;e.Ssmall=63347;e.Stigmagreek=986;e.T=84;e.Tau=932;e.Tbar=358;e.Tcaron=356;e.Tcedilla=354;e.Tcircle=9417;e.Tcircumflexbelow=7792;e.Tcommaaccent=354;e.Tdotaccent=7786;e.Tdotbelow=7788;e.Tecyrillic=1058;e.Tedescendercyrillic=1196;e.Tenroman=8553;e.Tetsecyrillic=1204;e.Theta=920;e.Thook=428;e.Thorn=222;e.Thornsmall=63486;e.Threeroman=8546;e.Tildesmall=63230;e.Tiwnarmenian=1359;e.Tlinebelow=7790;e.Tmonospace\
=65332;e.Toarmenian=1337;e.Tonefive=444;e.Tonesix=388;e.Tonetwo=423;e.Tretroflexhook=430;e.Tsecyrillic=1062;e.Tshecyrillic=1035;e.Tsmall=63348;e.Twelveroman=8555;e.Tworoman=8545;e.U=85;e.Uacute=218;e.Uacutesmall=63482;e.Ubreve=364;e.Ucaron=467;e.Ucircle=9418;e.Ucircumflex=219;e.Ucircumflexbelow=7798;e.Ucircumflexsmall=63483;e.Ucyrillic=1059;e.Udblacute=368;e.Udblgrave=532;e.Udieresis=220;e.Udieresisacute=471;e.Udieresisbelow=7794;e.Udieresiscaron=473;e.Udieresiscyrillic=1264;e.Udieresisgrave=475\
;e.Udieresismacron=469;e.Udieresissmall=63484;e.Udotbelow=7908;e.Ugrave=217;e.Ugravesmall=63481;e.Uhookabove=7910;e.Uhorn=431;e.Uhornacute=7912;e.Uhorndotbelow=7920;e.Uhorngrave=7914;e.Uhornhookabove=7916;e.Uhorntilde=7918;e.Uhungarumlaut=368;e.Uhungarumlautcyrillic=1266;e.Uinvertedbreve=534;e.Ukcyrillic=1144;e.Umacron=362;e.Umacroncyrillic=1262;e.Umacrondieresis=7802;e.Umonospace=65333;e.Uogonek=370;e.Upsilon=933;e.Upsilon1=978;e.Upsilonacutehooksymbolgreek=979;e.Upsilonafrican=433;e.Upsilondie\
resis=939;e.Upsilondieresishooksymbolgreek=980;e.Upsilonhooksymbol=978;e.Upsilontonos=910;e.Uring=366;e.Ushortcyrillic=1038;e.Usmall=63349;e.Ustraightcyrillic=1198;e.Ustraightstrokecyrillic=1200;e.Utilde=360;e.Utildeacute=7800;e.Utildebelow=7796;e.V=86;e.Vcircle=9419;e.Vdotbelow=7806;e.Vecyrillic=1042;e.Vewarmenian=1358;e.Vhook=434;e.Vmonospace=65334;e.Voarmenian=1352;e.Vsmall=63350;e.Vtilde=7804;e.W=87;e.Wacute=7810;e.Wcircle=9420;e.Wcircumflex=372;e.Wdieresis=7812;e.Wdotaccent=7814;e.Wdotbelow\
=7816;e.Wgrave=7808;e.Wmonospace=65335;e.Wsmall=63351;e.X=88;e.Xcircle=9421;e.Xdieresis=7820;e.Xdotaccent=7818;e.Xeharmenian=1341;e.Xi=926;e.Xmonospace=65336;e.Xsmall=63352;e.Y=89;e.Yacute=221;e.Yacutesmall=63485;e.Yatcyrillic=1122;e.Ycircle=9422;e.Ycircumflex=374;e.Ydieresis=376;e.Ydieresissmall=63487;e.Ydotaccent=7822;e.Ydotbelow=7924;e.Yericyrillic=1067;e.Yerudieresiscyrillic=1272;e.Ygrave=7922;e.Yhook=435;e.Yhookabove=7926;e.Yiarmenian=1349;e.Yicyrillic=1031;e.Yiwnarmenian=1362;e.Ymonospace=\
65337;e.Ysmall=63353;e.Ytilde=7928;e.Yusbigcyrillic=1130;e.Yusbigiotifiedcyrillic=1132;e.Yuslittlecyrillic=1126;e.Yuslittleiotifiedcyrillic=1128;e.Z=90;e.Zaarmenian=1334;e.Zacute=377;e.Zcaron=381;e.Zcaronsmall=63231;e.Zcircle=9423;e.Zcircumflex=7824;e.Zdot=379;e.Zdotaccent=379;e.Zdotbelow=7826;e.Zecyrillic=1047;e.Zedescendercyrillic=1176;e.Zedieresiscyrillic=1246;e.Zeta=918;e.Zhearmenian=1338;e.Zhebrevecyrillic=1217;e.Zhecyrillic=1046;e.Zhedescendercyrillic=1174;e.Zhedieresiscyrillic=1244;e.Zlin\
ebelow=7828;e.Zmonospace=65338;e.Zsmall=63354;e.Zstroke=437;e.a=97;e.aabengali=2438;e.aacute=225;e.aadeva=2310;e.aagujarati=2694;e.aagurmukhi=2566;e.aamatragurmukhi=2622;e.aarusquare=13059;e.aavowelsignbengali=2494;e.aavowelsigndeva=2366;e.aavowelsigngujarati=2750;e.abbreviationmarkarmenian=1375;e.abbreviationsigndeva=2416;e.abengali=2437;e.abopomofo=12570;e.abreve=259;e.abreveacute=7855;e.abrevecyrillic=1233;e.abrevedotbelow=7863;e.abrevegrave=7857;e.abrevehookabove=7859;e.abrevetilde=7861;e.ac\
aron=462;e.acircle=9424;e.acircumflex=226;e.acircumflexacute=7845;e.acircumflexdotbelow=7853;e.acircumflexgrave=7847;e.acircumflexhookabove=7849;e.acircumflextilde=7851;e.acute=180;e.acutebelowcmb=791;e.acutecmb=769;e.acutecomb=769;e.acutedeva=2388;e.acutelowmod=719;e.acutetonecmb=833;e.acyrillic=1072;e.adblgrave=513;e.addakgurmukhi=2673;e.adeva=2309;e.adieresis=228;e.adieresiscyrillic=1235;e.adieresismacron=479;e.adotbelow=7841;e.adotmacron=481;e.ae=230;e.aeacute=509;e.aekorean=12624;e.aemacron\
=483;e.afii00208=8213;e.afii08941=8356;e.afii10017=1040;e.afii10018=1041;e.afii10019=1042;e.afii10020=1043;e.afii10021=1044;e.afii10022=1045;e.afii10023=1025;e.afii10024=1046;e.afii10025=1047;e.afii10026=1048;e.afii10027=1049;e.afii10028=1050;e.afii10029=1051;e.afii10030=1052;e.afii10031=1053;e.afii10032=1054;e.afii10033=1055;e.afii10034=1056;e.afii10035=1057;e.afii10036=1058;e.afii10037=1059;e.afii10038=1060;e.afii10039=1061;e.afii10040=1062;e.afii10041=1063;e.afii10042=1064;e.afii10043=1065;e.\
afii10044=1066;e.afii10045=1067;e.afii10046=1068;e.afii10047=1069;e.afii10048=1070;e.afii10049=1071;e.afii10050=1168;e.afii10051=1026;e.afii10052=1027;e.afii10053=1028;e.afii10054=1029;e.afii10055=1030;e.afii10056=1031;e.afii10057=1032;e.afii10058=1033;e.afii10059=1034;e.afii10060=1035;e.afii10061=1036;e.afii10062=1038;e.afii10063=63172;e.afii10064=63173;e.afii10065=1072;e.afii10066=1073;e.afii10067=1074;e.afii10068=1075;e.afii10069=1076;e.afii10070=1077;e.afii10071=1105;e.afii10072=1078;e.afii1\
0073=1079;e.afii10074=1080;e.afii10075=1081;e.afii10076=1082;e.afii10077=1083;e.afii10078=1084;e.afii10079=1085;e.afii10080=1086;e.afii10081=1087;e.afii10082=1088;e.afii10083=1089;e.afii10084=1090;e.afii10085=1091;e.afii10086=1092;e.afii10087=1093;e.afii10088=1094;e.afii10089=1095;e.afii10090=1096;e.afii10091=1097;e.afii10092=1098;e.afii10093=1099;e.afii10094=1100;e.afii10095=1101;e.afii10096=1102;e.afii10097=1103;e.afii10098=1169;e.afii10099=1106;e.afii10100=1107;e.afii10101=1108;e.afii10102=11\
09;e.afii10103=1110;e.afii10104=1111;e.afii10105=1112;e.afii10106=1113;e.afii10107=1114;e.afii10108=1115;e.afii10109=1116;e.afii10110=1118;e.afii10145=1039;e.afii10146=1122;e.afii10147=1138;e.afii10148=1140;e.afii10192=63174;e.afii10193=1119;e.afii10194=1123;e.afii10195=1139;e.afii10196=1141;e.afii10831=63175;e.afii10832=63176;e.afii10846=1241;e.afii299=8206;e.afii300=8207;e.afii301=8205;e.afii57381=1642;e.afii57388=1548;e.afii57392=1632;e.afii57393=1633;e.afii57394=1634;e.afii57395=1635;e.afii5\
7396=1636;e.afii57397=1637;e.afii57398=1638;e.afii57399=1639;e.afii57400=1640;e.afii57401=1641;e.afii57403=1563;e.afii57407=1567;e.afii57409=1569;e.afii57410=1570;e.afii57411=1571;e.afii57412=1572;e.afii57413=1573;e.afii57414=1574;e.afii57415=1575;e.afii57416=1576;e.afii57417=1577;e.afii57418=1578;e.afii57419=1579;e.afii57420=1580;e.afii57421=1581;e.afii57422=1582;e.afii57423=1583;e.afii57424=1584;e.afii57425=1585;e.afii57426=1586;e.afii57427=1587;e.afii57428=1588;e.afii57429=1589;e.afii57430=15\
90;e.afii57431=1591;e.afii57432=1592;e.afii57433=1593;e.afii57434=1594;e.afii57440=1600;e.afii57441=1601;e.afii57442=1602;e.afii57443=1603;e.afii57444=1604;e.afii57445=1605;e.afii57446=1606;e.afii57448=1608;e.afii57449=1609;e.afii57450=1610;e.afii57451=1611;e.afii57452=1612;e.afii57453=1613;e.afii57454=1614;e.afii57455=1615;e.afii57456=1616;e.afii57457=1617;e.afii57458=1618;e.afii57470=1607;e.afii57505=1700;e.afii57506=1662;e.afii57507=1670;e.afii57508=1688;e.afii57509=1711;e.afii57511=1657;e.af\
ii57512=1672;e.afii57513=1681;e.afii57514=1722;e.afii57519=1746;e.afii57534=1749;e.afii57636=8362;e.afii57645=1470;e.afii57658=1475;e.afii57664=1488;e.afii57665=1489;e.afii57666=1490;e.afii57667=1491;e.afii57668=1492;e.afii57669=1493;e.afii57670=1494;e.afii57671=1495;e.afii57672=1496;e.afii57673=1497;e.afii57674=1498;e.afii57675=1499;e.afii57676=1500;e.afii57677=1501;e.afii57678=1502;e.afii57679=1503;e.afii57680=1504;e.afii57681=1505;e.afii57682=1506;e.afii57683=1507;e.afii57684=1508;e.afii57685\
=1509;e.afii57686=1510;e.afii57687=1511;e.afii57688=1512;e.afii57689=1513;e.afii57690=1514;e.afii57694=64298;e.afii57695=64299;e.afii57700=64331;e.afii57705=64287;e.afii57716=1520;e.afii57717=1521;e.afii57718=1522;e.afii57723=64309;e.afii57793=1460;e.afii57794=1461;e.afii57795=1462;e.afii57796=1467;e.afii57797=1464;e.afii57798=1463;e.afii57799=1456;e.afii57800=1458;e.afii57801=1457;e.afii57802=1459;e.afii57803=1474;e.afii57804=1473;e.afii57806=1465;e.afii57807=1468;e.afii57839=1469;e.afii57841=1\
471;e.afii57842=1472;e.afii57929=700;e.afii61248=8453;e.afii61289=8467;e.afii61352=8470;e.afii61573=8236;e.afii61574=8237;e.afii61575=8238;e.afii61664=8204;e.afii63167=1645;e.afii64937=701;e.agrave=224;e.agujarati=2693;e.agurmukhi=2565;e.ahiragana=12354;e.ahookabove=7843;e.aibengali=2448;e.aibopomofo=12574;e.aideva=2320;e.aiecyrillic=1237;e.aigujarati=2704;e.aigurmukhi=2576;e.aimatragurmukhi=2632;e.ainarabic=1593;e.ainfinalarabic=65226;e.aininitialarabic=65227;e.ainmedialarabic=65228;e.ainverted\
breve=515;e.aivowelsignbengali=2504;e.aivowelsigndeva=2376;e.aivowelsigngujarati=2760;e.akatakana=12450;e.akatakanahalfwidth=65393;e.akorean=12623;e.alef=1488;e.alefarabic=1575;e.alefdageshhebrew=64304;e.aleffinalarabic=65166;e.alefhamzaabovearabic=1571;e.alefhamzaabovefinalarabic=65156;e.alefhamzabelowarabic=1573;e.alefhamzabelowfinalarabic=65160;e.alefhebrew=1488;e.aleflamedhebrew=64335;e.alefmaddaabovearabic=1570;e.alefmaddaabovefinalarabic=65154;e.alefmaksuraarabic=1609;e.alefmaksurafinalara\
bic=65264;e.alefmaksurainitialarabic=65267;e.alefmaksuramedialarabic=65268;e.alefpatahhebrew=64302;e.alefqamatshebrew=64303;e.aleph=8501;e.allequal=8780;e.alpha=945;e.alphatonos=940;e.amacron=257;e.amonospace=65345;e.ampersand=38;e.ampersandmonospace=65286;e.ampersandsmall=63270;e.amsquare=13250;e.anbopomofo=12578;e.angbopomofo=12580;e.angbracketleft=12296;e.angbracketright=12297;e.angkhankhuthai=3674;e.angle=8736;e.anglebracketleft=12296;e.anglebracketleftvertical=65087;e.anglebracketright=1229\
7;e.anglebracketrightvertical=65088;e.angleleft=9001;e.angleright=9002;e.angstrom=8491;e.anoteleia=903;e.anudattadeva=2386;e.anusvarabengali=2434;e.anusvaradeva=2306;e.anusvaragujarati=2690;e.aogonek=261;e.apaatosquare=13056;e.aparen=9372;e.apostrophearmenian=1370;e.apostrophemod=700;e.apple=63743;e.approaches=8784;e.approxequal=8776;e.approxequalorimage=8786;e.approximatelyequal=8773;e.araeaekorean=12686;e.araeakorean=12685;e.arc=8978;e.arighthalfring=7834;e.aring=229;e.aringacute=507;e.aringbe\
low=7681;e.arrowboth=8596;e.arrowdashdown=8675;e.arrowdashleft=8672;e.arrowdashright=8674;e.arrowdashup=8673;e.arrowdblboth=8660;e.arrowdbldown=8659;e.arrowdblleft=8656;e.arrowdblright=8658;e.arrowdblup=8657;e.arrowdown=8595;e.arrowdownleft=8601;e.arrowdownright=8600;e.arrowdownwhite=8681;e.arrowheaddownmod=709;e.arrowheadleftmod=706;e.arrowheadrightmod=707;e.arrowheadupmod=708;e.arrowhorizex=63719;e.arrowleft=8592;e.arrowleftdbl=8656;e.arrowleftdblstroke=8653;e.arrowleftoverright=8646;e.arrowle\
ftwhite=8678;e.arrowright=8594;e.arrowrightdblstroke=8655;e.arrowrightheavy=10142;e.arrowrightoverleft=8644;e.arrowrightwhite=8680;e.arrowtableft=8676;e.arrowtabright=8677;e.arrowup=8593;e.arrowupdn=8597;e.arrowupdnbse=8616;e.arrowupdownbase=8616;e.arrowupleft=8598;e.arrowupleftofdown=8645;e.arrowupright=8599;e.arrowupwhite=8679;e.arrowvertex=63718;e.asciicircum=94;e.asciicircummonospace=65342;e.asciitilde=126;e.asciitildemonospace=65374;e.ascript=593;e.ascriptturned=594;e.asmallhiragana=12353;e\
.asmallkatakana=12449;e.asmallkatakanahalfwidth=65383;e.asterisk=42;e.asteriskaltonearabic=1645;e.asteriskarabic=1645;e.asteriskmath=8727;e.asteriskmonospace=65290;e.asterisksmall=65121;e.asterism=8258;e.asuperior=63209;e.asymptoticallyequal=8771;e.at=64;e.atilde=227;e.atmonospace=65312;e.atsmall=65131;e.aturned=592;e.aubengali=2452;e.aubopomofo=12576;e.audeva=2324;e.augujarati=2708;e.augurmukhi=2580;e.aulengthmarkbengali=2519;e.aumatragurmukhi=2636;e.auvowelsignbengali=2508;e.auvowelsigndeva=23\
80;e.auvowelsigngujarati=2764;e.avagrahadeva=2365;e.aybarmenian=1377;e.ayin=1506;e.ayinaltonehebrew=64288;e.ayinhebrew=1506;e.b=98;e.babengali=2476;e.backslash=92;e.backslashmonospace=65340;e.badeva=2348;e.bagujarati=2732;e.bagurmukhi=2604;e.bahiragana=12400;e.bahtthai=3647;e.bakatakana=12496;e.bar=124;e.barmonospace=65372;e.bbopomofo=12549;e.bcircle=9425;e.bdotaccent=7683;e.bdotbelow=7685;e.beamedsixteenthnotes=9836;e.because=8757;e.becyrillic=1073;e.beharabic=1576;e.behfinalarabic=65168;e.behi\
nitialarabic=65169;e.behiragana=12409;e.behmedialarabic=65170;e.behmeeminitialarabic=64671;e.behmeemisolatedarabic=64520;e.behnoonfinalarabic=64621;e.bekatakana=12505;e.benarmenian=1378;e.bet=1489;e.beta=946;e.betasymbolgreek=976;e.betdagesh=64305;e.betdageshhebrew=64305;e.bethebrew=1489;e.betrafehebrew=64332;e.bhabengali=2477;e.bhadeva=2349;e.bhagujarati=2733;e.bhagurmukhi=2605;e.bhook=595;e.bihiragana=12403;e.bikatakana=12499;e.bilabialclick=664;e.bindigurmukhi=2562;e.birusquare=13105;e.blackc\
ircle=9679;e.blackdiamond=9670;e.blackdownpointingtriangle=9660;e.blackleftpointingpointer=9668;e.blackleftpointingtriangle=9664;e.blacklenticularbracketleft=12304;e.blacklenticularbracketleftvertical=65083;e.blacklenticularbracketright=12305;e.blacklenticularbracketrightvertical=65084;e.blacklowerlefttriangle=9699;e.blacklowerrighttriangle=9698;e.blackrectangle=9644;e.blackrightpointingpointer=9658;e.blackrightpointingtriangle=9654;e.blacksmallsquare=9642;e.blacksmilingface=9787;e.blacksquare=9\
632;e.blackstar=9733;e.blackupperlefttriangle=9700;e.blackupperrighttriangle=9701;e.blackuppointingsmalltriangle=9652;e.blackuppointingtriangle=9650;e.blank=9251;e.blinebelow=7687;e.block=9608;e.bmonospace=65346;e.bobaimaithai=3610;e.bohiragana=12412;e.bokatakana=12508;e.bparen=9373;e.bqsquare=13251;e.braceex=63732;e.braceleft=123;e.braceleftbt=63731;e.braceleftmid=63730;e.braceleftmonospace=65371;e.braceleftsmall=65115;e.bracelefttp=63729;e.braceleftvertical=65079;e.braceright=125;e.bracerightb\
t=63742;e.bracerightmid=63741;e.bracerightmonospace=65373;e.bracerightsmall=65116;e.bracerighttp=63740;e.bracerightvertical=65080;e.bracketleft=91;e.bracketleftbt=63728;e.bracketleftex=63727;e.bracketleftmonospace=65339;e.bracketlefttp=63726;e.bracketright=93;e.bracketrightbt=63739;e.bracketrightex=63738;e.bracketrightmonospace=65341;e.bracketrighttp=63737;e.breve=728;e.brevebelowcmb=814;e.brevecmb=774;e.breveinvertedbelowcmb=815;e.breveinvertedcmb=785;e.breveinverteddoublecmb=865;e.bridgebelowc\
mb=810;e.bridgeinvertedbelowcmb=826;e.brokenbar=166;e.bstroke=384;e.bsuperior=63210;e.btopbar=387;e.buhiragana=12406;e.bukatakana=12502;e.bullet=8226;e.bulletinverse=9688;e.bulletoperator=8729;e.bullseye=9678;e.c=99;e.caarmenian=1390;e.cabengali=2458;e.cacute=263;e.cadeva=2330;e.cagujarati=2714;e.cagurmukhi=2586;e.calsquare=13192;e.candrabindubengali=2433;e.candrabinducmb=784;e.candrabindudeva=2305;e.candrabindugujarati=2689;e.capslock=8682;e.careof=8453;e.caron=711;e.caronbelowcmb=812;e.caroncm\
b=780;e.carriagereturn=8629;e.cbopomofo=12568;e.ccaron=269;e.ccedilla=231;e.ccedillaacute=7689;e.ccircle=9426;e.ccircumflex=265;e.ccurl=597;e.cdot=267;e.cdotaccent=267;e.cdsquare=13253;e.cedilla=184;e.cedillacmb=807;e.cent=162;e.centigrade=8451;e.centinferior=63199;e.centmonospace=65504;e.centoldstyle=63394;e.centsuperior=63200;e.chaarmenian=1401;e.chabengali=2459;e.chadeva=2331;e.chagujarati=2715;e.chagurmukhi=2587;e.chbopomofo=12564;e.cheabkhasiancyrillic=1213;e.checkmark=10003;e.checyrillic=1\
095;e.chedescenderabkhasiancyrillic=1215;e.chedescendercyrillic=1207;e.chedieresiscyrillic=1269;e.cheharmenian=1395;e.chekhakassiancyrillic=1228;e.cheverticalstrokecyrillic=1209;e.chi=967;e.chieuchacirclekorean=12919;e.chieuchaparenkorean=12823;e.chieuchcirclekorean=12905;e.chieuchkorean=12618;e.chieuchparenkorean=12809;e.chochangthai=3594;e.chochanthai=3592;e.chochingthai=3593;e.chochoethai=3596;e.chook=392;e.cieucacirclekorean=12918;e.cieucaparenkorean=12822;e.cieuccirclekorean=12904;e.cieucko\
rean=12616;e.cieucparenkorean=12808;e.cieucuparenkorean=12828;e.circle=9675;e.circlecopyrt=169;e.circlemultiply=8855;e.circleot=8857;e.circleplus=8853;e.circlepostalmark=12342;e.circlewithlefthalfblack=9680;e.circlewithrighthalfblack=9681;e.circumflex=710;e.circumflexbelowcmb=813;e.circumflexcmb=770;e.clear=8999;e.clickalveolar=450;e.clickdental=448;e.clicklateral=449;e.clickretroflex=451;e.club=9827;e.clubsuitblack=9827;e.clubsuitwhite=9831;e.cmcubedsquare=13220;e.cmonospace=65347;e.cmsquaredsq\
uare=13216;e.coarmenian=1409;e.colon=58;e.colonmonetary=8353;e.colonmonospace=65306;e.colonsign=8353;e.colonsmall=65109;e.colontriangularhalfmod=721;e.colontriangularmod=720;e.comma=44;e.commaabovecmb=787;e.commaaboverightcmb=789;e.commaaccent=63171;e.commaarabic=1548;e.commaarmenian=1373;e.commainferior=63201;e.commamonospace=65292;e.commareversedabovecmb=788;e.commareversedmod=701;e.commasmall=65104;e.commasuperior=63202;e.commaturnedabovecmb=786;e.commaturnedmod=699;e.compass=9788;e.congruent\
=8773;e.contourintegral=8750;e.control=8963;e.controlACK=6;e.controlBEL=7;e.controlBS=8;e.controlCAN=24;e.controlCR=13;e.controlDC1=17;e.controlDC2=18;e.controlDC3=19;e.controlDC4=20;e.controlDEL=127;e.controlDLE=16;e.controlEM=25;e.controlENQ=5;e.controlEOT=4;e.controlESC=27;e.controlETB=23;e.controlETX=3;e.controlFF=12;e.controlFS=28;e.controlGS=29;e.controlHT=9;e.controlLF=10;e.controlNAK=21;e.controlNULL=0;e.controlRS=30;e.controlSI=15;e.controlSO=14;e.controlSOT=2;e.controlSTX=1;e.controlSU\
B=26;e.controlSYN=22;e.controlUS=31;e.controlVT=11;e.copyright=169;e.copyrightsans=63721;e.copyrightserif=63193;e.cornerbracketleft=12300;e.cornerbracketlefthalfwidth=65378;e.cornerbracketleftvertical=65089;e.cornerbracketright=12301;e.cornerbracketrighthalfwidth=65379;e.cornerbracketrightvertical=65090;e.corporationsquare=13183;e.cosquare=13255;e.coverkgsquare=13254;e.cparen=9374;e.cruzeiro=8354;e.cstretched=663;e.curlyand=8911;e.curlyor=8910;e.currency=164;e.cyrBreve=63185;e.cyrFlex=63186;e.cy\
rbreve=63188;e.cyrflex=63189;e.d=100;e.daarmenian=1380;e.dabengali=2470;e.dadarabic=1590;e.dadeva=2342;e.dadfinalarabic=65214;e.dadinitialarabic=65215;e.dadmedialarabic=65216;e.dagesh=1468;e.dageshhebrew=1468;e.dagger=8224;e.daggerdbl=8225;e.dagujarati=2726;e.dagurmukhi=2598;e.dahiragana=12384;e.dakatakana=12480;e.dalarabic=1583;e.dalet=1491;e.daletdagesh=64307;e.daletdageshhebrew=64307;e.dalethebrew=1491;e.dalfinalarabic=65194;e.dammaarabic=1615;e.dammalowarabic=1615;e.dammatanaltonearabic=1612\
;e.dammatanarabic=1612;e.danda=2404;e.dargahebrew=1447;e.dargalefthebrew=1447;e.dasiapneumatacyrilliccmb=1157;e.dblGrave=63187;e.dblanglebracketleft=12298;e.dblanglebracketleftvertical=65085;e.dblanglebracketright=12299;e.dblanglebracketrightvertical=65086;e.dblarchinvertedbelowcmb=811;e.dblarrowleft=8660;e.dblarrowright=8658;e.dbldanda=2405;e.dblgrave=63190;e.dblgravecmb=783;e.dblintegral=8748;e.dbllowline=8215;e.dbllowlinecmb=819;e.dbloverlinecmb=831;e.dblprimemod=698;e.dblverticalbar=8214;e.d\
blverticallineabovecmb=782;e.dbopomofo=12553;e.dbsquare=13256;e.dcaron=271;e.dcedilla=7697;e.dcircle=9427;e.dcircumflexbelow=7699;e.dcroat=273;e.ddabengali=2465;e.ddadeva=2337;e.ddagujarati=2721;e.ddagurmukhi=2593;e.ddalarabic=1672;e.ddalfinalarabic=64393;e.dddhadeva=2396;e.ddhabengali=2466;e.ddhadeva=2338;e.ddhagujarati=2722;e.ddhagurmukhi=2594;e.ddotaccent=7691;e.ddotbelow=7693;e.decimalseparatorarabic=1643;e.decimalseparatorpersian=1643;e.decyrillic=1076;e.degree=176;e.dehihebrew=1453;e.dehir\
agana=12391;e.deicoptic=1007;e.dekatakana=12487;e.deleteleft=9003;e.deleteright=8998;e.delta=948;e.deltaturned=397;e.denominatorminusonenumeratorbengali=2552;e.dezh=676;e.dhabengali=2471;e.dhadeva=2343;e.dhagujarati=2727;e.dhagurmukhi=2599;e.dhook=599;e.dialytikatonos=901;e.dialytikatonoscmb=836;e.diamond=9830;e.diamondsuitwhite=9826;e.dieresis=168;e.dieresisacute=63191;e.dieresisbelowcmb=804;e.dieresiscmb=776;e.dieresisgrave=63192;e.dieresistonos=901;e.dihiragana=12386;e.dikatakana=12482;e.ditt\
omark=12291;e.divide=247;e.divides=8739;e.divisionslash=8725;e.djecyrillic=1106;e.dkshade=9619;e.dlinebelow=7695;e.dlsquare=13207;e.dmacron=273;e.dmonospace=65348;e.dnblock=9604;e.dochadathai=3598;e.dodekthai=3604;e.dohiragana=12393;e.dokatakana=12489;e.dollar=36;e.dollarinferior=63203;e.dollarmonospace=65284;e.dollaroldstyle=63268;e.dollarsmall=65129;e.dollarsuperior=63204;e.dong=8363;e.dorusquare=13094;e.dotaccent=729;e.dotaccentcmb=775;e.dotbelowcmb=803;e.dotbelowcomb=803;e.dotkatakana=12539;\
e.dotlessi=305;e.dotlessj=63166;e.dotlessjstrokehook=644;e.dotmath=8901;e.dottedcircle=9676;e.doubleyodpatah=64287;e.doubleyodpatahhebrew=64287;e.downtackbelowcmb=798;e.downtackmod=725;e.dparen=9375;e.dsuperior=63211;e.dtail=598;e.dtopbar=396;e.duhiragana=12389;e.dukatakana=12485;e.dz=499;e.dzaltone=675;e.dzcaron=454;e.dzcurl=677;e.dzeabkhasiancyrillic=1249;e.dzecyrillic=1109;e.dzhecyrillic=1119;e.e=101;e.eacute=233;e.earth=9793;e.ebengali=2447;e.ebopomofo=12572;e.ebreve=277;e.ecandradeva=2317;e\
.ecandragujarati=2701;e.ecandravowelsigndeva=2373;e.ecandravowelsigngujarati=2757;e.ecaron=283;e.ecedillabreve=7709;e.echarmenian=1381;e.echyiwnarmenian=1415;e.ecircle=9428;e.ecircumflex=234;e.ecircumflexacute=7871;e.ecircumflexbelow=7705;e.ecircumflexdotbelow=7879;e.ecircumflexgrave=7873;e.ecircumflexhookabove=7875;e.ecircumflextilde=7877;e.ecyrillic=1108;e.edblgrave=517;e.edeva=2319;e.edieresis=235;e.edot=279;e.edotaccent=279;e.edotbelow=7865;e.eegurmukhi=2575;e.eematragurmukhi=2631;e.efcyrill\
ic=1092;e.egrave=232;e.egujarati=2703;e.eharmenian=1383;e.ehbopomofo=12573;e.ehiragana=12360;e.ehookabove=7867;e.eibopomofo=12575;e.eight=56;e.eightarabic=1640;e.eightbengali=2542;e.eightcircle=9319;e.eightcircleinversesansserif=10129;e.eightdeva=2414;e.eighteencircle=9329;e.eighteenparen=9349;e.eighteenperiod=9369;e.eightgujarati=2798;e.eightgurmukhi=2670;e.eighthackarabic=1640;e.eighthangzhou=12328;e.eighthnotebeamed=9835;e.eightideographicparen=12839;e.eightinferior=8328;e.eightmonospace=6530\
4;e.eightoldstyle=63288;e.eightparen=9339;e.eightperiod=9359;e.eightpersian=1784;e.eightroman=8567;e.eightsuperior=8312;e.eightthai=3672;e.einvertedbreve=519;e.eiotifiedcyrillic=1125;e.ekatakana=12456;e.ekatakanahalfwidth=65396;e.ekonkargurmukhi=2676;e.ekorean=12628;e.elcyrillic=1083;e.element=8712;e.elevencircle=9322;e.elevenparen=9342;e.elevenperiod=9362;e.elevenroman=8570;e.ellipsis=8230;e.ellipsisvertical=8942;e.emacron=275;e.emacronacute=7703;e.emacrongrave=7701;e.emcyrillic=1084;e.emdash=8\
212;e.emdashvertical=65073;e.emonospace=65349;e.emphasismarkarmenian=1371;e.emptyset=8709;e.enbopomofo=12579;e.encyrillic=1085;e.endash=8211;e.endashvertical=65074;e.endescendercyrillic=1187;e.eng=331;e.engbopomofo=12581;e.enghecyrillic=1189;e.enhookcyrillic=1224;e.enspace=8194;e.eogonek=281;e.eokorean=12627;e.eopen=603;e.eopenclosed=666;e.eopenreversed=604;e.eopenreversedclosed=606;e.eopenreversedhook=605;e.eparen=9376;e.epsilon=949;e.epsilontonos=941;e.equal=61;e.equalmonospace=65309;e.equalsm\
all=65126;e.equalsuperior=8316;e.equivalence=8801;e.erbopomofo=12582;e.ercyrillic=1088;e.ereversed=600;e.ereversedcyrillic=1101;e.escyrillic=1089;e.esdescendercyrillic=1195;e.esh=643;e.eshcurl=646;e.eshortdeva=2318;e.eshortvowelsigndeva=2374;e.eshreversedloop=426;e.eshsquatreversed=645;e.esmallhiragana=12359;e.esmallkatakana=12455;e.esmallkatakanahalfwidth=65386;e.estimated=8494;e.esuperior=63212;e.eta=951;e.etarmenian=1384;e.etatonos=942;e.eth=240;e.etilde=7869;e.etildebelow=7707;e.etnahtafoukh\
hebrew=1425;e.etnahtafoukhlefthebrew=1425;e.etnahtahebrew=1425;e.etnahtalefthebrew=1425;e.eturned=477;e.eukorean=12641;e.euro=8364;e.evowelsignbengali=2503;e.evowelsigndeva=2375;e.evowelsigngujarati=2759;e.exclam=33;e.exclamarmenian=1372;e.exclamdbl=8252;e.exclamdown=161;e.exclamdownsmall=63393;e.exclammonospace=65281;e.exclamsmall=63265;e.existential=8707;e.ezh=658;e.ezhcaron=495;e.ezhcurl=659;e.ezhreversed=441;e.ezhtail=442;e.f=102;e.fadeva=2398;e.fagurmukhi=2654;e.fahrenheit=8457;e.fathaarabi\
c=1614;e.fathalowarabic=1614;e.fathatanarabic=1611;e.fbopomofo=12552;e.fcircle=9429;e.fdotaccent=7711;e.feharabic=1601;e.feharmenian=1414;e.fehfinalarabic=65234;e.fehinitialarabic=65235;e.fehmedialarabic=65236;e.feicoptic=997;e.female=9792;e.ff=64256;e.f_f=64256;e.ffi=64259;e.f_f_i=64259;e.ffl=64260;e.f_f_l=64260;e.fi=64257;e.f_i=64257;e.fifteencircle=9326;e.fifteenparen=9346;e.fifteenperiod=9366;e.figuredash=8210;e.filledbox=9632;e.filledrect=9644;e.finalkaf=1498;e.finalkafdagesh=64314;e.finalk\
afdageshhebrew=64314;e.finalkafhebrew=1498;e.finalmem=1501;e.finalmemhebrew=1501;e.finalnun=1503;e.finalnunhebrew=1503;e.finalpe=1507;e.finalpehebrew=1507;e.finaltsadi=1509;e.finaltsadihebrew=1509;e.firsttonechinese=713;e.fisheye=9673;e.fitacyrillic=1139;e.five=53;e.fivearabic=1637;e.fivebengali=2539;e.fivecircle=9316;e.fivecircleinversesansserif=10126;e.fivedeva=2411;e.fiveeighths=8541;e.fivegujarati=2795;e.fivegurmukhi=2667;e.fivehackarabic=1637;e.fivehangzhou=12325;e.fiveideographicparen=1283\
6;e.fiveinferior=8325;e.fivemonospace=65301;e.fiveoldstyle=63285;e.fiveparen=9336;e.fiveperiod=9356;e.fivepersian=1781;e.fiveroman=8564;e.fivesuperior=8309;e.fivethai=3669;e.fl=64258;e.f_l=64258;e.florin=402;e.fmonospace=65350;e.fmsquare=13209;e.fofanthai=3615;e.fofathai=3613;e.fongmanthai=3663;e.forall=8704;e.four=52;e.fourarabic=1636;e.fourbengali=2538;e.fourcircle=9315;e.fourcircleinversesansserif=10125;e.fourdeva=2410;e.fourgujarati=2794;e.fourgurmukhi=2666;e.fourhackarabic=1636;e.fourhangzh\
ou=12324;e.fourideographicparen=12835;e.fourinferior=8324;e.fourmonospace=65300;e.fournumeratorbengali=2551;e.fouroldstyle=63284;e.fourparen=9335;e.fourperiod=9355;e.fourpersian=1780;e.fourroman=8563;e.foursuperior=8308;e.fourteencircle=9325;e.fourteenparen=9345;e.fourteenperiod=9365;e.fourthai=3668;e.fourthtonechinese=715;e.fparen=9377;e.fraction=8260;e.franc=8355;e.g=103;e.gabengali=2455;e.gacute=501;e.gadeva=2327;e.gafarabic=1711;e.gaffinalarabic=64403;e.gafinitialarabic=64404;e.gafmedialarab\
ic=64405;e.gagujarati=2711;e.gagurmukhi=2583;e.gahiragana=12364;e.gakatakana=12460;e.gamma=947;e.gammalatinsmall=611;e.gammasuperior=736;e.gangiacoptic=1003;e.gbopomofo=12557;e.gbreve=287;e.gcaron=487;e.gcedilla=291;e.gcircle=9430;e.gcircumflex=285;e.gcommaaccent=291;e.gdot=289;e.gdotaccent=289;e.gecyrillic=1075;e.gehiragana=12370;e.gekatakana=12466;e.geometricallyequal=8785;e.gereshaccenthebrew=1436;e.gereshhebrew=1523;e.gereshmuqdamhebrew=1437;e.germandbls=223;e.gershayimaccenthebrew=1438;e.ge\
rshayimhebrew=1524;e.getamark=12307;e.ghabengali=2456;e.ghadarmenian=1394;e.ghadeva=2328;e.ghagujarati=2712;e.ghagurmukhi=2584;e.ghainarabic=1594;e.ghainfinalarabic=65230;e.ghaininitialarabic=65231;e.ghainmedialarabic=65232;e.ghemiddlehookcyrillic=1173;e.ghestrokecyrillic=1171;e.gheupturncyrillic=1169;e.ghhadeva=2394;e.ghhagurmukhi=2650;e.ghook=608;e.ghzsquare=13203;e.gihiragana=12366;e.gikatakana=12462;e.gimarmenian=1379;e.gimel=1490;e.gimeldagesh=64306;e.gimeldageshhebrew=64306;e.gimelhebrew=1\
490;e.gjecyrillic=1107;e.glottalinvertedstroke=446;e.glottalstop=660;e.glottalstopinverted=662;e.glottalstopmod=704;e.glottalstopreversed=661;e.glottalstopreversedmod=705;e.glottalstopreversedsuperior=740;e.glottalstopstroke=673;e.glottalstopstrokereversed=674;e.gmacron=7713;e.gmonospace=65351;e.gohiragana=12372;e.gokatakana=12468;e.gparen=9378;e.gpasquare=13228;e.gradient=8711;e.grave=96;e.gravebelowcmb=790;e.gravecmb=768;e.gravecomb=768;e.gravedeva=2387;e.gravelowmod=718;e.gravemonospace=65344\
;e.gravetonecmb=832;e.greater=62;e.greaterequal=8805;e.greaterequalorless=8923;e.greatermonospace=65310;e.greaterorequivalent=8819;e.greaterorless=8823;e.greateroverequal=8807;e.greatersmall=65125;e.gscript=609;e.gstroke=485;e.guhiragana=12368;e.guillemotleft=171;e.guillemotright=187;e.guilsinglleft=8249;e.guilsinglright=8250;e.gukatakana=12464;e.guramusquare=13080;e.gysquare=13257;e.h=104;e.haabkhasiancyrillic=1193;e.haaltonearabic=1729;e.habengali=2489;e.hadescendercyrillic=1203;e.hadeva=2361;\
e.hagujarati=2745;e.hagurmukhi=2617;e.haharabic=1581;e.hahfinalarabic=65186;e.hahinitialarabic=65187;e.hahiragana=12399;e.hahmedialarabic=65188;e.haitusquare=13098;e.hakatakana=12495;e.hakatakanahalfwidth=65418;e.halantgurmukhi=2637;e.hamzaarabic=1569;e.hamzalowarabic=1569;e.hangulfiller=12644;e.hardsigncyrillic=1098;e.harpoonleftbarbup=8636;e.harpoonrightbarbup=8640;e.hasquare=13258;e.hatafpatah=1458;e.hatafpatah16=1458;e.hatafpatah23=1458;e.hatafpatah2f=1458;e.hatafpatahhebrew=1458;e.hatafpata\
hnarrowhebrew=1458;e.hatafpatahquarterhebrew=1458;e.hatafpatahwidehebrew=1458;e.hatafqamats=1459;e.hatafqamats1b=1459;e.hatafqamats28=1459;e.hatafqamats34=1459;e.hatafqamatshebrew=1459;e.hatafqamatsnarrowhebrew=1459;e.hatafqamatsquarterhebrew=1459;e.hatafqamatswidehebrew=1459;e.hatafsegol=1457;e.hatafsegol17=1457;e.hatafsegol24=1457;e.hatafsegol30=1457;e.hatafsegolhebrew=1457;e.hatafsegolnarrowhebrew=1457;e.hatafsegolquarterhebrew=1457;e.hatafsegolwidehebrew=1457;e.hbar=295;e.hbopomofo=12559;e.h\
brevebelow=7723;e.hcedilla=7721;e.hcircle=9431;e.hcircumflex=293;e.hdieresis=7719;e.hdotaccent=7715;e.hdotbelow=7717;e.he=1492;e.heart=9829;e.heartsuitblack=9829;e.heartsuitwhite=9825;e.hedagesh=64308;e.hedageshhebrew=64308;e.hehaltonearabic=1729;e.heharabic=1607;e.hehebrew=1492;e.hehfinalaltonearabic=64423;e.hehfinalalttwoarabic=65258;e.hehfinalarabic=65258;e.hehhamzaabovefinalarabic=64421;e.hehhamzaaboveisolatedarabic=64420;e.hehinitialaltonearabic=64424;e.hehinitialarabic=65259;e.hehiragana=1\
2408;e.hehmedialaltonearabic=64425;e.hehmedialarabic=65260;e.heiseierasquare=13179;e.hekatakana=12504;e.hekatakanahalfwidth=65421;e.hekutaarusquare=13110;e.henghook=615;e.herutusquare=13113;e.het=1495;e.hethebrew=1495;e.hhook=614;e.hhooksuperior=689;e.hieuhacirclekorean=12923;e.hieuhaparenkorean=12827;e.hieuhcirclekorean=12909;e.hieuhkorean=12622;e.hieuhparenkorean=12813;e.hihiragana=12402;e.hikatakana=12498;e.hikatakanahalfwidth=65419;e.hiriq=1460;e.hiriq14=1460;e.hiriq21=1460;e.hiriq2d=1460;e.\
hiriqhebrew=1460;e.hiriqnarrowhebrew=1460;e.hiriqquarterhebrew=1460;e.hiriqwidehebrew=1460;e.hlinebelow=7830;e.hmonospace=65352;e.hoarmenian=1392;e.hohipthai=3627;e.hohiragana=12411;e.hokatakana=12507;e.hokatakanahalfwidth=65422;e.holam=1465;e.holam19=1465;e.holam26=1465;e.holam32=1465;e.holamhebrew=1465;e.holamnarrowhebrew=1465;e.holamquarterhebrew=1465;e.holamwidehebrew=1465;e.honokhukthai=3630;e.hookabovecomb=777;e.hookcmb=777;e.hookpalatalizedbelowcmb=801;e.hookretroflexbelowcmb=802;e.hoonsq\
uare=13122;e.horicoptic=1001;e.horizontalbar=8213;e.horncmb=795;e.hotsprings=9832;e.house=8962;e.hparen=9379;e.hsuperior=688;e.hturned=613;e.huhiragana=12405;e.huiitosquare=13107;e.hukatakana=12501;e.hukatakanahalfwidth=65420;e.hungarumlaut=733;e.hungarumlautcmb=779;e.hv=405;e.hyphen=45;e.hypheninferior=63205;e.hyphenmonospace=65293;e.hyphensmall=65123;e.hyphensuperior=63206;e.hyphentwo=8208;e.i=105;e.iacute=237;e.iacyrillic=1103;e.ibengali=2439;e.ibopomofo=12583;e.ibreve=301;e.icaron=464;e.icir\
cle=9432;e.icircumflex=238;e.icyrillic=1110;e.idblgrave=521;e.ideographearthcircle=12943;e.ideographfirecircle=12939;e.ideographicallianceparen=12863;e.ideographiccallparen=12858;e.ideographiccentrecircle=12965;e.ideographicclose=12294;e.ideographiccomma=12289;e.ideographiccommaleft=65380;e.ideographiccongratulationparen=12855;e.ideographiccorrectcircle=12963;e.ideographicearthparen=12847;e.ideographicenterpriseparen=12861;e.ideographicexcellentcircle=12957;e.ideographicfestivalparen=12864;e.ide\
ographicfinancialcircle=12950;e.ideographicfinancialparen=12854;e.ideographicfireparen=12843;e.ideographichaveparen=12850;e.ideographichighcircle=12964;e.ideographiciterationmark=12293;e.ideographiclaborcircle=12952;e.ideographiclaborparen=12856;e.ideographicleftcircle=12967;e.ideographiclowcircle=12966;e.ideographicmedicinecircle=12969;e.ideographicmetalparen=12846;e.ideographicmoonparen=12842;e.ideographicnameparen=12852;e.ideographicperiod=12290;e.ideographicprintcircle=12958;e.ideographicrea\
chparen=12867;e.ideographicrepresentparen=12857;e.ideographicresourceparen=12862;e.ideographicrightcircle=12968;e.ideographicsecretcircle=12953;e.ideographicselfparen=12866;e.ideographicsocietyparen=12851;e.ideographicspace=12288;e.ideographicspecialparen=12853;e.ideographicstockparen=12849;e.ideographicstudyparen=12859;e.ideographicsunparen=12848;e.ideographicsuperviseparen=12860;e.ideographicwaterparen=12844;e.ideographicwoodparen=12845;e.ideographiczero=12295;e.ideographmetalcircle=12942;e.id\
eographmooncircle=12938;e.ideographnamecircle=12948;e.ideographsuncircle=12944;e.ideographwatercircle=12940;e.ideographwoodcircle=12941;e.ideva=2311;e.idieresis=239;e.idieresisacute=7727;e.idieresiscyrillic=1253;e.idotbelow=7883;e.iebrevecyrillic=1239;e.iecyrillic=1077;e.ieungacirclekorean=12917;e.ieungaparenkorean=12821;e.ieungcirclekorean=12903;e.ieungkorean=12615;e.ieungparenkorean=12807;e.igrave=236;e.igujarati=2695;e.igurmukhi=2567;e.ihiragana=12356;e.ihookabove=7881;e.iibengali=2440;e.iicy\
rillic=1080;e.iideva=2312;e.iigujarati=2696;e.iigurmukhi=2568;e.iimatragurmukhi=2624;e.iinvertedbreve=523;e.iishortcyrillic=1081;e.iivowelsignbengali=2496;e.iivowelsigndeva=2368;e.iivowelsigngujarati=2752;e.ij=307;e.ikatakana=12452;e.ikatakanahalfwidth=65394;e.ikorean=12643;e.ilde=732;e.iluyhebrew=1452;e.imacron=299;e.imacroncyrillic=1251;e.imageorapproximatelyequal=8787;e.imatragurmukhi=2623;e.imonospace=65353;e.increment=8710;e.infinity=8734;e.iniarmenian=1387;e.integral=8747;e.integralbottom=\
8993;e.integralbt=8993;e.integralex=63733;e.integraltop=8992;e.integraltp=8992;e.intersection=8745;e.intisquare=13061;e.invbullet=9688;e.invcircle=9689;e.invsmileface=9787;e.iocyrillic=1105;e.iogonek=303;e.iota=953;e.iotadieresis=970;e.iotadieresistonos=912;e.iotalatin=617;e.iotatonos=943;e.iparen=9380;e.irigurmukhi=2674;e.ismallhiragana=12355;e.ismallkatakana=12451;e.ismallkatakanahalfwidth=65384;e.issharbengali=2554;e.istroke=616;e.isuperior=63213;e.iterationhiragana=12445;e.iterationkatakana=\
12541;e.itilde=297;e.itildebelow=7725;e.iubopomofo=12585;e.iucyrillic=1102;e.ivowelsignbengali=2495;e.ivowelsigndeva=2367;e.ivowelsigngujarati=2751;e.izhitsacyrillic=1141;e.izhitsadblgravecyrillic=1143;e.j=106;e.jaarmenian=1393;e.jabengali=2460;e.jadeva=2332;e.jagujarati=2716;e.jagurmukhi=2588;e.jbopomofo=12560;e.jcaron=496;e.jcircle=9433;e.jcircumflex=309;e.jcrossedtail=669;e.jdotlessstroke=607;e.jecyrillic=1112;e.jeemarabic=1580;e.jeemfinalarabic=65182;e.jeeminitialarabic=65183;e.jeemmedialara\
bic=65184;e.jeharabic=1688;e.jehfinalarabic=64395;e.jhabengali=2461;e.jhadeva=2333;e.jhagujarati=2717;e.jhagurmukhi=2589;e.jheharmenian=1403;e.jis=12292;e.jmonospace=65354;e.jparen=9381;e.jsuperior=690;e.k=107;e.kabashkircyrillic=1185;e.kabengali=2453;e.kacute=7729;e.kacyrillic=1082;e.kadescendercyrillic=1179;e.kadeva=2325;e.kaf=1499;e.kafarabic=1603;e.kafdagesh=64315;e.kafdageshhebrew=64315;e.kaffinalarabic=65242;e.kafhebrew=1499;e.kafinitialarabic=65243;e.kafmedialarabic=65244;e.kafrafehebrew=\
64333;e.kagujarati=2709;e.kagurmukhi=2581;e.kahiragana=12363;e.kahookcyrillic=1220;e.kakatakana=12459;e.kakatakanahalfwidth=65398;e.kappa=954;e.kappasymbolgreek=1008;e.kapyeounmieumkorean=12657;e.kapyeounphieuphkorean=12676;e.kapyeounpieupkorean=12664;e.kapyeounssangpieupkorean=12665;e.karoriisquare=13069;e.kashidaautoarabic=1600;e.kashidaautonosidebearingarabic=1600;e.kasmallkatakana=12533;e.kasquare=13188;e.kasraarabic=1616;e.kasratanarabic=1613;e.kastrokecyrillic=1183;e.katahiraprolongmarkhal\
fwidth=65392;e.kaverticalstrokecyrillic=1181;e.kbopomofo=12558;e.kcalsquare=13193;e.kcaron=489;e.kcedilla=311;e.kcircle=9434;e.kcommaaccent=311;e.kdotbelow=7731;e.keharmenian=1412;e.kehiragana=12369;e.kekatakana=12465;e.kekatakanahalfwidth=65401;e.kenarmenian=1391;e.kesmallkatakana=12534;e.kgreenlandic=312;e.khabengali=2454;e.khacyrillic=1093;e.khadeva=2326;e.khagujarati=2710;e.khagurmukhi=2582;e.khaharabic=1582;e.khahfinalarabic=65190;e.khahinitialarabic=65191;e.khahmedialarabic=65192;e.kheicop\
tic=999;e.khhadeva=2393;e.khhagurmukhi=2649;e.khieukhacirclekorean=12920;e.khieukhaparenkorean=12824;e.khieukhcirclekorean=12906;e.khieukhkorean=12619;e.khieukhparenkorean=12810;e.khokhaithai=3586;e.khokhonthai=3589;e.khokhuatthai=3587;e.khokhwaithai=3588;e.khomutthai=3675;e.khook=409;e.khorakhangthai=3590;e.khzsquare=13201;e.kihiragana=12365;e.kikatakana=12461;e.kikatakanahalfwidth=65399;e.kiroguramusquare=13077;e.kiromeetorusquare=13078;e.kirosquare=13076;e.kiyeokacirclekorean=12910;e.kiyeokap\
arenkorean=12814;e.kiyeokcirclekorean=12896;e.kiyeokkorean=12593;e.kiyeokparenkorean=12800;e.kiyeoksioskorean=12595;e.kjecyrillic=1116;e.klinebelow=7733;e.klsquare=13208;e.kmcubedsquare=13222;e.kmonospace=65355;e.kmsquaredsquare=13218;e.kohiragana=12371;e.kohmsquare=13248;e.kokaithai=3585;e.kokatakana=12467;e.kokatakanahalfwidth=65402;e.kooposquare=13086;e.koppacyrillic=1153;e.koreanstandardsymbol=12927;e.koroniscmb=835;e.kparen=9382;e.kpasquare=13226;e.ksicyrillic=1135;e.ktsquare=13263;e.kturne\
d=670;e.kuhiragana=12367;e.kukatakana=12463;e.kukatakanahalfwidth=65400;e.kvsquare=13240;e.kwsquare=13246;e.l=108;e.labengali=2482;e.lacute=314;e.ladeva=2354;e.lagujarati=2738;e.lagurmukhi=2610;e.lakkhangyaothai=3653;e.lamaleffinalarabic=65276;e.lamalefhamzaabovefinalarabic=65272;e.lamalefhamzaaboveisolatedarabic=65271;e.lamalefhamzabelowfinalarabic=65274;e.lamalefhamzabelowisolatedarabic=65273;e.lamalefisolatedarabic=65275;e.lamalefmaddaabovefinalarabic=65270;e.lamalefmaddaaboveisolatedarabic=6\
5269;e.lamarabic=1604;e.lambda=955;e.lambdastroke=411;e.lamed=1500;e.lameddagesh=64316;e.lameddageshhebrew=64316;e.lamedhebrew=1500;e.lamfinalarabic=65246;e.lamhahinitialarabic=64714;e.laminitialarabic=65247;e.lamjeeminitialarabic=64713;e.lamkhahinitialarabic=64715;e.lamlamhehisolatedarabic=65010;e.lammedialarabic=65248;e.lammeemhahinitialarabic=64904;e.lammeeminitialarabic=64716;e.largecircle=9711;e.lbar=410;e.lbelt=620;e.lbopomofo=12556;e.lcaron=318;e.lcedilla=316;e.lcircle=9435;e.lcircumflexb\
elow=7741;e.lcommaaccent=316;e.ldot=320;e.ldotaccent=320;e.ldotbelow=7735;e.ldotbelowmacron=7737;e.leftangleabovecmb=794;e.lefttackbelowcmb=792;e.less=60;e.lessequal=8804;e.lessequalorgreater=8922;e.lessmonospace=65308;e.lessorequivalent=8818;e.lessorgreater=8822;e.lessoverequal=8806;e.lesssmall=65124;e.lezh=622;e.lfblock=9612;e.lhookretroflex=621;e.lira=8356;e.liwnarmenian=1388;e.lj=457;e.ljecyrillic=1113;e.ll=63168;e.lladeva=2355;e.llagujarati=2739;e.llinebelow=7739;e.llladeva=2356;e.llvocalic\
bengali=2529;e.llvocalicdeva=2401;e.llvocalicvowelsignbengali=2531;e.llvocalicvowelsigndeva=2403;e.lmiddletilde=619;e.lmonospace=65356;e.lmsquare=13264;e.lochulathai=3628;e.logicaland=8743;e.logicalnot=172;e.logicalnotreversed=8976;e.logicalor=8744;e.lolingthai=3621;e.longs=383;e.lowlinecenterline=65102;e.lowlinecmb=818;e.lowlinedashed=65101;e.lozenge=9674;e.lparen=9383;e.lslash=322;e.lsquare=8467;e.lsuperior=63214;e.ltshade=9617;e.luthai=3622;e.lvocalicbengali=2444;e.lvocalicdeva=2316;e.lvocali\
cvowelsignbengali=2530;e.lvocalicvowelsigndeva=2402;e.lxsquare=13267;e.m=109;e.mabengali=2478;e.macron=175;e.macronbelowcmb=817;e.macroncmb=772;e.macronlowmod=717;e.macronmonospace=65507;e.macute=7743;e.madeva=2350;e.magujarati=2734;e.magurmukhi=2606;e.mahapakhhebrew=1444;e.mahapakhlefthebrew=1444;e.mahiragana=12414;e.maichattawalowleftthai=63637;e.maichattawalowrightthai=63636;e.maichattawathai=3659;e.maichattawaupperleftthai=63635;e.maieklowleftthai=63628;e.maieklowrightthai=63627;e.maiekthai=\
3656;e.maiekupperleftthai=63626;e.maihanakatleftthai=63620;e.maihanakatthai=3633;e.maitaikhuleftthai=63625;e.maitaikhuthai=3655;e.maitholowleftthai=63631;e.maitholowrightthai=63630;e.maithothai=3657;e.maithoupperleftthai=63629;e.maitrilowleftthai=63634;e.maitrilowrightthai=63633;e.maitrithai=3658;e.maitriupperleftthai=63632;e.maiyamokthai=3654;e.makatakana=12510;e.makatakanahalfwidth=65423;e.male=9794;e.mansyonsquare=13127;e.maqafhebrew=1470;e.mars=9794;e.masoracirclehebrew=1455;e.masquare=13187\
;e.mbopomofo=12551;e.mbsquare=13268;e.mcircle=9436;e.mcubedsquare=13221;e.mdotaccent=7745;e.mdotbelow=7747;e.meemarabic=1605;e.meemfinalarabic=65250;e.meeminitialarabic=65251;e.meemmedialarabic=65252;e.meemmeeminitialarabic=64721;e.meemmeemisolatedarabic=64584;e.meetorusquare=13133;e.mehiragana=12417;e.meizierasquare=13182;e.mekatakana=12513;e.mekatakanahalfwidth=65426;e.mem=1502;e.memdagesh=64318;e.memdageshhebrew=64318;e.memhebrew=1502;e.menarmenian=1396;e.merkhahebrew=1445;e.merkhakefulahebre\
w=1446;e.merkhakefulalefthebrew=1446;e.merkhalefthebrew=1445;e.mhook=625;e.mhzsquare=13202;e.middledotkatakanahalfwidth=65381;e.middot=183;e.mieumacirclekorean=12914;e.mieumaparenkorean=12818;e.mieumcirclekorean=12900;e.mieumkorean=12609;e.mieumpansioskorean=12656;e.mieumparenkorean=12804;e.mieumpieupkorean=12654;e.mieumsioskorean=12655;e.mihiragana=12415;e.mikatakana=12511;e.mikatakanahalfwidth=65424;e.minus=8722;e.minusbelowcmb=800;e.minuscircle=8854;e.minusmod=727;e.minusplus=8723;e.minute=82\
42;e.miribaarusquare=13130;e.mirisquare=13129;e.mlonglegturned=624;e.mlsquare=13206;e.mmcubedsquare=13219;e.mmonospace=65357;e.mmsquaredsquare=13215;e.mohiragana=12418;e.mohmsquare=13249;e.mokatakana=12514;e.mokatakanahalfwidth=65427;e.molsquare=13270;e.momathai=3617;e.moverssquare=13223;e.moverssquaredsquare=13224;e.mparen=9384;e.mpasquare=13227;e.mssquare=13235;e.msuperior=63215;e.mturned=623;e.mu=181;e.mu1=181;e.muasquare=13186;e.muchgreater=8811;e.muchless=8810;e.mufsquare=13196;e.mugreek=95\
6;e.mugsquare=13197;e.muhiragana=12416;e.mukatakana=12512;e.mukatakanahalfwidth=65425;e.mulsquare=13205;e.multiply=215;e.mumsquare=13211;e.munahhebrew=1443;e.munahlefthebrew=1443;e.musicalnote=9834;e.musicalnotedbl=9835;e.musicflatsign=9837;e.musicsharpsign=9839;e.mussquare=13234;e.muvsquare=13238;e.muwsquare=13244;e.mvmegasquare=13241;e.mvsquare=13239;e.mwmegasquare=13247;e.mwsquare=13245;e.n=110;e.nabengali=2472;e.nabla=8711;e.nacute=324;e.nadeva=2344;e.nagujarati=2728;e.nagurmukhi=2600;e.nahi\
ragana=12394;e.nakatakana=12490;e.nakatakanahalfwidth=65413;e.napostrophe=329;e.nasquare=13185;e.nbopomofo=12555;e.nbspace=160;e.ncaron=328;e.ncedilla=326;e.ncircle=9437;e.ncircumflexbelow=7755;e.ncommaaccent=326;e.ndotaccent=7749;e.ndotbelow=7751;e.nehiragana=12397;e.nekatakana=12493;e.nekatakanahalfwidth=65416;e.newsheqelsign=8362;e.nfsquare=13195;e.ngabengali=2457;e.ngadeva=2329;e.ngagujarati=2713;e.ngagurmukhi=2585;e.ngonguthai=3591;e.nhiragana=12435;e.nhookleft=626;e.nhookretroflex=627;e.ni\
eunacirclekorean=12911;e.nieunaparenkorean=12815;e.nieuncieuckorean=12597;e.nieuncirclekorean=12897;e.nieunhieuhkorean=12598;e.nieunkorean=12596;e.nieunpansioskorean=12648;e.nieunparenkorean=12801;e.nieunsioskorean=12647;e.nieuntikeutkorean=12646;e.nihiragana=12395;e.nikatakana=12491;e.nikatakanahalfwidth=65414;e.nikhahitleftthai=63641;e.nikhahitthai=3661;e.nine=57;e.ninearabic=1641;e.ninebengali=2543;e.ninecircle=9320;e.ninecircleinversesansserif=10130;e.ninedeva=2415;e.ninegujarati=2799;e.nine\
gurmukhi=2671;e.ninehackarabic=1641;e.ninehangzhou=12329;e.nineideographicparen=12840;e.nineinferior=8329;e.ninemonospace=65305;e.nineoldstyle=63289;e.nineparen=9340;e.nineperiod=9360;e.ninepersian=1785;e.nineroman=8568;e.ninesuperior=8313;e.nineteencircle=9330;e.nineteenparen=9350;e.nineteenperiod=9370;e.ninethai=3673;e.nj=460;e.njecyrillic=1114;e.nkatakana=12531;e.nkatakanahalfwidth=65437;e.nlegrightlong=414;e.nlinebelow=7753;e.nmonospace=65358;e.nmsquare=13210;e.nnabengali=2467;e.nnadeva=2339\
;e.nnagujarati=2723;e.nnagurmukhi=2595;e.nnnadeva=2345;e.nohiragana=12398;e.nokatakana=12494;e.nokatakanahalfwidth=65417;e.nonbreakingspace=160;e.nonenthai=3603;e.nonuthai=3609;e.noonarabic=1606;e.noonfinalarabic=65254;e.noonghunnaarabic=1722;e.noonghunnafinalarabic=64415;e.nooninitialarabic=65255;e.noonjeeminitialarabic=64722;e.noonjeemisolatedarabic=64587;e.noonmedialarabic=65256;e.noonmeeminitialarabic=64725;e.noonmeemisolatedarabic=64590;e.noonnoonfinalarabic=64653;e.notcontains=8716;e.notel\
ement=8713;e.notelementof=8713;e.notequal=8800;e.notgreater=8815;e.notgreaternorequal=8817;e.notgreaternorless=8825;e.notidentical=8802;e.notless=8814;e.notlessnorequal=8816;e.notparallel=8742;e.notprecedes=8832;e.notsubset=8836;e.notsucceeds=8833;e.notsuperset=8837;e.nowarmenian=1398;e.nparen=9385;e.nssquare=13233;e.nsuperior=8319;e.ntilde=241;e.nu=957;e.nuhiragana=12396;e.nukatakana=12492;e.nukatakanahalfwidth=65415;e.nuktabengali=2492;e.nuktadeva=2364;e.nuktagujarati=2748;e.nuktagurmukhi=2620\
;e.numbersign=35;e.numbersignmonospace=65283;e.numbersignsmall=65119;e.numeralsigngreek=884;e.numeralsignlowergreek=885;e.numero=8470;e.nun=1504;e.nundagesh=64320;e.nundageshhebrew=64320;e.nunhebrew=1504;e.nvsquare=13237;e.nwsquare=13243;e.nyabengali=2462;e.nyadeva=2334;e.nyagujarati=2718;e.nyagurmukhi=2590;e.o=111;e.oacute=243;e.oangthai=3629;e.obarred=629;e.obarredcyrillic=1257;e.obarreddieresiscyrillic=1259;e.obengali=2451;e.obopomofo=12571;e.obreve=335;e.ocandradeva=2321;e.ocandragujarati=27\
05;e.ocandravowelsigndeva=2377;e.ocandravowelsigngujarati=2761;e.ocaron=466;e.ocircle=9438;e.ocircumflex=244;e.ocircumflexacute=7889;e.ocircumflexdotbelow=7897;e.ocircumflexgrave=7891;e.ocircumflexhookabove=7893;e.ocircumflextilde=7895;e.ocyrillic=1086;e.odblacute=337;e.odblgrave=525;e.odeva=2323;e.odieresis=246;e.odieresiscyrillic=1255;e.odotbelow=7885;e.oe=339;e.oekorean=12634;e.ogonek=731;e.ogonekcmb=808;e.ograve=242;e.ogujarati=2707;e.oharmenian=1413;e.ohiragana=12362;e.ohookabove=7887;e.oho\
rn=417;e.ohornacute=7899;e.ohorndotbelow=7907;e.ohorngrave=7901;e.ohornhookabove=7903;e.ohorntilde=7905;e.ohungarumlaut=337;e.oi=419;e.oinvertedbreve=527;e.okatakana=12458;e.okatakanahalfwidth=65397;e.okorean=12631;e.olehebrew=1451;e.omacron=333;e.omacronacute=7763;e.omacrongrave=7761;e.omdeva=2384;e.omega=969;e.omega1=982;e.omegacyrillic=1121;e.omegalatinclosed=631;e.omegaroundcyrillic=1147;e.omegatitlocyrillic=1149;e.omegatonos=974;e.omgujarati=2768;e.omicron=959;e.omicrontonos=972;e.omonospac\
e=65359;e.one=49;e.onearabic=1633;e.onebengali=2535;e.onecircle=9312;e.onecircleinversesansserif=10122;e.onedeva=2407;e.onedotenleader=8228;e.oneeighth=8539;e.onefitted=63196;e.onegujarati=2791;e.onegurmukhi=2663;e.onehackarabic=1633;e.onehalf=189;e.onehangzhou=12321;e.oneideographicparen=12832;e.oneinferior=8321;e.onemonospace=65297;e.onenumeratorbengali=2548;e.oneoldstyle=63281;e.oneparen=9332;e.oneperiod=9352;e.onepersian=1777;e.onequarter=188;e.oneroman=8560;e.onesuperior=185;e.onethai=3665;\
e.onethird=8531;e.oogonek=491;e.oogonekmacron=493;e.oogurmukhi=2579;e.oomatragurmukhi=2635;e.oopen=596;e.oparen=9386;e.openbullet=9702;e.option=8997;e.ordfeminine=170;e.ordmasculine=186;e.orthogonal=8735;e.oshortdeva=2322;e.oshortvowelsigndeva=2378;e.oslash=248;e.oslashacute=511;e.osmallhiragana=12361;e.osmallkatakana=12457;e.osmallkatakanahalfwidth=65387;e.ostrokeacute=511;e.osuperior=63216;e.otcyrillic=1151;e.otilde=245;e.otildeacute=7757;e.otildedieresis=7759;e.oubopomofo=12577;e.overline=825\
4;e.overlinecenterline=65098;e.overlinecmb=773;e.overlinedashed=65097;e.overlinedblwavy=65100;e.overlinewavy=65099;e.overscore=175;e.ovowelsignbengali=2507;e.ovowelsigndeva=2379;e.ovowelsigngujarati=2763;e.p=112;e.paampssquare=13184;e.paasentosquare=13099;e.pabengali=2474;e.pacute=7765;e.padeva=2346;e.pagedown=8671;e.pageup=8670;e.pagujarati=2730;e.pagurmukhi=2602;e.pahiragana=12401;e.paiyannoithai=3631;e.pakatakana=12497;e.palatalizationcyrilliccmb=1156;e.palochkacyrillic=1216;e.pansioskorean=1\
2671;e.paragraph=182;e.parallel=8741;e.parenleft=40;e.parenleftaltonearabic=64830;e.parenleftbt=63725;e.parenleftex=63724;e.parenleftinferior=8333;e.parenleftmonospace=65288;e.parenleftsmall=65113;e.parenleftsuperior=8317;e.parenlefttp=63723;e.parenleftvertical=65077;e.parenright=41;e.parenrightaltonearabic=64831;e.parenrightbt=63736;e.parenrightex=63735;e.parenrightinferior=8334;e.parenrightmonospace=65289;e.parenrightsmall=65114;e.parenrightsuperior=8318;e.parenrighttp=63734;e.parenrightvertic\
al=65078;e.partialdiff=8706;e.paseqhebrew=1472;e.pashtahebrew=1433;e.pasquare=13225;e.patah=1463;e.patah11=1463;e.patah1d=1463;e.patah2a=1463;e.patahhebrew=1463;e.patahnarrowhebrew=1463;e.patahquarterhebrew=1463;e.patahwidehebrew=1463;e.pazerhebrew=1441;e.pbopomofo=12550;e.pcircle=9439;e.pdotaccent=7767;e.pe=1508;e.pecyrillic=1087;e.pedagesh=64324;e.pedageshhebrew=64324;e.peezisquare=13115;e.pefinaldageshhebrew=64323;e.peharabic=1662;e.peharmenian=1402;e.pehebrew=1508;e.pehfinalarabic=64343;e.pe\
hinitialarabic=64344;e.pehiragana=12410;e.pehmedialarabic=64345;e.pekatakana=12506;e.pemiddlehookcyrillic=1191;e.perafehebrew=64334;e.percent=37;e.percentarabic=1642;e.percentmonospace=65285;e.percentsmall=65130;e.period=46;e.periodarmenian=1417;e.periodcentered=183;e.periodhalfwidth=65377;e.periodinferior=63207;e.periodmonospace=65294;e.periodsmall=65106;e.periodsuperior=63208;e.perispomenigreekcmb=834;e.perpendicular=8869;e.perthousand=8240;e.peseta=8359;e.pfsquare=13194;e.phabengali=2475;e.ph\
adeva=2347;e.phagujarati=2731;e.phagurmukhi=2603;e.phi=966;e.phi1=981;e.phieuphacirclekorean=12922;e.phieuphaparenkorean=12826;e.phieuphcirclekorean=12908;e.phieuphkorean=12621;e.phieuphparenkorean=12812;e.philatin=632;e.phinthuthai=3642;e.phisymbolgreek=981;e.phook=421;e.phophanthai=3614;e.phophungthai=3612;e.phosamphaothai=3616;e.pi=960;e.pieupacirclekorean=12915;e.pieupaparenkorean=12819;e.pieupcieuckorean=12662;e.pieupcirclekorean=12901;e.pieupkiyeokkorean=12658;e.pieupkorean=12610;e.pieuppa\
renkorean=12805;e.pieupsioskiyeokkorean=12660;e.pieupsioskorean=12612;e.pieupsiostikeutkorean=12661;e.pieupthieuthkorean=12663;e.pieuptikeutkorean=12659;e.pihiragana=12404;e.pikatakana=12500;e.pisymbolgreek=982;e.piwrarmenian=1411;e.planckover2pi=8463;e.planckover2pi1=8463;e.plus=43;e.plusbelowcmb=799;e.pluscircle=8853;e.plusminus=177;e.plusmod=726;e.plusmonospace=65291;e.plussmall=65122;e.plussuperior=8314;e.pmonospace=65360;e.pmsquare=13272;e.pohiragana=12413;e.pointingindexdownwhite=9759;e.po\
intingindexleftwhite=9756;e.pointingindexrightwhite=9758;e.pointingindexupwhite=9757;e.pokatakana=12509;e.poplathai=3611;e.postalmark=12306;e.postalmarkface=12320;e.pparen=9387;e.precedes=8826;e.prescription=8478;e.primemod=697;e.primereversed=8245;e.product=8719;e.projective=8965;e.prolongedkana=12540;e.propellor=8984;e.propersubset=8834;e.propersuperset=8835;e.proportion=8759;e.proportional=8733;e.psi=968;e.psicyrillic=1137;e.psilipneumatacyrilliccmb=1158;e.pssquare=13232;e.puhiragana=12407;e.\
pukatakana=12503;e.pvsquare=13236;e.pwsquare=13242;e.q=113;e.qadeva=2392;e.qadmahebrew=1448;e.qafarabic=1602;e.qaffinalarabic=65238;e.qafinitialarabic=65239;e.qafmedialarabic=65240;e.qamats=1464;e.qamats10=1464;e.qamats1a=1464;e.qamats1c=1464;e.qamats27=1464;e.qamats29=1464;e.qamats33=1464;e.qamatsde=1464;e.qamatshebrew=1464;e.qamatsnarrowhebrew=1464;e.qamatsqatanhebrew=1464;e.qamatsqatannarrowhebrew=1464;e.qamatsqatanquarterhebrew=1464;e.qamatsqatanwidehebrew=1464;e.qamatsquarterhebrew=1464;e.q\
amatswidehebrew=1464;e.qarneyparahebrew=1439;e.qbopomofo=12561;e.qcircle=9440;e.qhook=672;e.qmonospace=65361;e.qof=1511;e.qofdagesh=64327;e.qofdageshhebrew=64327;e.qofhebrew=1511;e.qparen=9388;e.quarternote=9833;e.qubuts=1467;e.qubuts18=1467;e.qubuts25=1467;e.qubuts31=1467;e.qubutshebrew=1467;e.qubutsnarrowhebrew=1467;e.qubutsquarterhebrew=1467;e.qubutswidehebrew=1467;e.question=63;e.questionarabic=1567;e.questionarmenian=1374;e.questiondown=191;e.questiondownsmall=63423;e.questiongreek=894;e.qu\
estionmonospace=65311;e.questionsmall=63295;e.quotedbl=34;e.quotedblbase=8222;e.quotedblleft=8220;e.quotedblmonospace=65282;e.quotedblprime=12318;e.quotedblprimereversed=12317;e.quotedblright=8221;e.quoteleft=8216;e.quoteleftreversed=8219;e.quotereversed=8219;e.quoteright=8217;e.quoterightn=329;e.quotesinglbase=8218;e.quotesingle=39;e.quotesinglemonospace=65287;e.r=114;e.raarmenian=1404;e.rabengali=2480;e.racute=341;e.radeva=2352;e.radical=8730;e.radicalex=63717;e.radoverssquare=13230;e.radovers\
squaredsquare=13231;e.radsquare=13229;e.rafe=1471;e.rafehebrew=1471;e.ragujarati=2736;e.ragurmukhi=2608;e.rahiragana=12425;e.rakatakana=12521;e.rakatakanahalfwidth=65431;e.ralowerdiagonalbengali=2545;e.ramiddlediagonalbengali=2544;e.ramshorn=612;e.ratio=8758;e.rbopomofo=12566;e.rcaron=345;e.rcedilla=343;e.rcircle=9441;e.rcommaaccent=343;e.rdblgrave=529;e.rdotaccent=7769;e.rdotbelow=7771;e.rdotbelowmacron=7773;e.referencemark=8251;e.reflexsubset=8838;e.reflexsuperset=8839;e.registered=174;e.regis\
tersans=63720;e.registerserif=63194;e.reharabic=1585;e.reharmenian=1408;e.rehfinalarabic=65198;e.rehiragana=12428;e.rekatakana=12524;e.rekatakanahalfwidth=65434;e.resh=1512;e.reshdageshhebrew=64328;e.reshhebrew=1512;e.reversedtilde=8765;e.reviahebrew=1431;e.reviamugrashhebrew=1431;e.revlogicalnot=8976;e.rfishhook=638;e.rfishhookreversed=639;e.rhabengali=2525;e.rhadeva=2397;e.rho=961;e.rhook=637;e.rhookturned=635;e.rhookturnedsuperior=693;e.rhosymbolgreek=1009;e.rhotichookmod=734;e.rieulacircleko\
rean=12913;e.rieulaparenkorean=12817;e.rieulcirclekorean=12899;e.rieulhieuhkorean=12608;e.rieulkiyeokkorean=12602;e.rieulkiyeoksioskorean=12649;e.rieulkorean=12601;e.rieulmieumkorean=12603;e.rieulpansioskorean=12652;e.rieulparenkorean=12803;e.rieulphieuphkorean=12607;e.rieulpieupkorean=12604;e.rieulpieupsioskorean=12651;e.rieulsioskorean=12605;e.rieulthieuthkorean=12606;e.rieultikeutkorean=12650;e.rieulyeorinhieuhkorean=12653;e.rightangle=8735;e.righttackbelowcmb=793;e.righttriangle=8895;e.rihir\
agana=12426;e.rikatakana=12522;e.rikatakanahalfwidth=65432;e.ring=730;e.ringbelowcmb=805;e.ringcmb=778;e.ringhalfleft=703;e.ringhalfleftarmenian=1369;e.ringhalfleftbelowcmb=796;e.ringhalfleftcentered=723;e.ringhalfright=702;e.ringhalfrightbelowcmb=825;e.ringhalfrightcentered=722;e.rinvertedbreve=531;e.rittorusquare=13137;e.rlinebelow=7775;e.rlongleg=636;e.rlonglegturned=634;e.rmonospace=65362;e.rohiragana=12429;e.rokatakana=12525;e.rokatakanahalfwidth=65435;e.roruathai=3619;e.rparen=9389;e.rrabe\
ngali=2524;e.rradeva=2353;e.rragurmukhi=2652;e.rreharabic=1681;e.rrehfinalarabic=64397;e.rrvocalicbengali=2528;e.rrvocalicdeva=2400;e.rrvocalicgujarati=2784;e.rrvocalicvowelsignbengali=2500;e.rrvocalicvowelsigndeva=2372;e.rrvocalicvowelsigngujarati=2756;e.rsuperior=63217;e.rtblock=9616;e.rturned=633;e.rturnedsuperior=692;e.ruhiragana=12427;e.rukatakana=12523;e.rukatakanahalfwidth=65433;e.rupeemarkbengali=2546;e.rupeesignbengali=2547;e.rupiah=63197;e.ruthai=3620;e.rvocalicbengali=2443;e.rvocalicd\
eva=2315;e.rvocalicgujarati=2699;e.rvocalicvowelsignbengali=2499;e.rvocalicvowelsigndeva=2371;e.rvocalicvowelsigngujarati=2755;e.s=115;e.sabengali=2488;e.sacute=347;e.sacutedotaccent=7781;e.sadarabic=1589;e.sadeva=2360;e.sadfinalarabic=65210;e.sadinitialarabic=65211;e.sadmedialarabic=65212;e.sagujarati=2744;e.sagurmukhi=2616;e.sahiragana=12373;e.sakatakana=12469;e.sakatakanahalfwidth=65403;e.sallallahoualayhewasallamarabic=65018;e.samekh=1505;e.samekhdagesh=64321;e.samekhdageshhebrew=64321;e.sam\
ekhhebrew=1505;e.saraaathai=3634;e.saraaethai=3649;e.saraaimaimalaithai=3652;e.saraaimaimuanthai=3651;e.saraamthai=3635;e.saraathai=3632;e.saraethai=3648;e.saraiileftthai=63622;e.saraiithai=3637;e.saraileftthai=63621;e.saraithai=3636;e.saraothai=3650;e.saraueeleftthai=63624;e.saraueethai=3639;e.saraueleftthai=63623;e.sarauethai=3638;e.sarauthai=3640;e.sarauuthai=3641;e.sbopomofo=12569;e.scaron=353;e.scarondotaccent=7783;e.scedilla=351;e.schwa=601;e.schwacyrillic=1241;e.schwadieresiscyrillic=1243\
;e.schwahook=602;e.scircle=9442;e.scircumflex=349;e.scommaaccent=537;e.sdotaccent=7777;e.sdotbelow=7779;e.sdotbelowdotaccent=7785;e.seagullbelowcmb=828;e.second=8243;e.secondtonechinese=714;e.section=167;e.seenarabic=1587;e.seenfinalarabic=65202;e.seeninitialarabic=65203;e.seenmedialarabic=65204;e.segol=1462;e.segol13=1462;e.segol1f=1462;e.segol2c=1462;e.segolhebrew=1462;e.segolnarrowhebrew=1462;e.segolquarterhebrew=1462;e.segoltahebrew=1426;e.segolwidehebrew=1462;e.seharmenian=1405;e.sehiragana\
=12379;e.sekatakana=12475;e.sekatakanahalfwidth=65406;e.semicolon=59;e.semicolonarabic=1563;e.semicolonmonospace=65307;e.semicolonsmall=65108;e.semivoicedmarkkana=12444;e.semivoicedmarkkanahalfwidth=65439;e.sentisquare=13090;e.sentosquare=13091;e.seven=55;e.sevenarabic=1639;e.sevenbengali=2541;e.sevencircle=9318;e.sevencircleinversesansserif=10128;e.sevendeva=2413;e.seveneighths=8542;e.sevengujarati=2797;e.sevengurmukhi=2669;e.sevenhackarabic=1639;e.sevenhangzhou=12327;e.sevenideographicparen=12\
838;e.seveninferior=8327;e.sevenmonospace=65303;e.sevenoldstyle=63287;e.sevenparen=9338;e.sevenperiod=9358;e.sevenpersian=1783;e.sevenroman=8566;e.sevensuperior=8311;e.seventeencircle=9328;e.seventeenparen=9348;e.seventeenperiod=9368;e.seventhai=3671;e.sfthyphen=173;e.shaarmenian=1399;e.shabengali=2486;e.shacyrillic=1096;e.shaddaarabic=1617;e.shaddadammaarabic=64609;e.shaddadammatanarabic=64606;e.shaddafathaarabic=64608;e.shaddakasraarabic=64610;e.shaddakasratanarabic=64607;e.shade=9618;e.shaded\
ark=9619;e.shadelight=9617;e.shademedium=9618;e.shadeva=2358;e.shagujarati=2742;e.shagurmukhi=2614;e.shalshelethebrew=1427;e.shbopomofo=12565;e.shchacyrillic=1097;e.sheenarabic=1588;e.sheenfinalarabic=65206;e.sheeninitialarabic=65207;e.sheenmedialarabic=65208;e.sheicoptic=995;e.sheqel=8362;e.sheqelhebrew=8362;e.sheva=1456;e.sheva115=1456;e.sheva15=1456;e.sheva22=1456;e.sheva2e=1456;e.shevahebrew=1456;e.shevanarrowhebrew=1456;e.shevaquarterhebrew=1456;e.shevawidehebrew=1456;e.shhacyrillic=1211;e.\
shimacoptic=1005;e.shin=1513;e.shindagesh=64329;e.shindageshhebrew=64329;e.shindageshshindot=64300;e.shindageshshindothebrew=64300;e.shindageshsindot=64301;e.shindageshsindothebrew=64301;e.shindothebrew=1473;e.shinhebrew=1513;e.shinshindot=64298;e.shinshindothebrew=64298;e.shinsindot=64299;e.shinsindothebrew=64299;e.shook=642;e.sigma=963;e.sigma1=962;e.sigmafinal=962;e.sigmalunatesymbolgreek=1010;e.sihiragana=12375;e.sikatakana=12471;e.sikatakanahalfwidth=65404;e.siluqhebrew=1469;e.siluqlefthebr\
ew=1469;e.similar=8764;e.sindothebrew=1474;e.siosacirclekorean=12916;e.siosaparenkorean=12820;e.sioscieuckorean=12670;e.sioscirclekorean=12902;e.sioskiyeokkorean=12666;e.sioskorean=12613;e.siosnieunkorean=12667;e.siosparenkorean=12806;e.siospieupkorean=12669;e.siostikeutkorean=12668;e.six=54;e.sixarabic=1638;e.sixbengali=2540;e.sixcircle=9317;e.sixcircleinversesansserif=10127;e.sixdeva=2412;e.sixgujarati=2796;e.sixgurmukhi=2668;e.sixhackarabic=1638;e.sixhangzhou=12326;e.sixideographicparen=12837\
;e.sixinferior=8326;e.sixmonospace=65302;e.sixoldstyle=63286;e.sixparen=9337;e.sixperiod=9357;e.sixpersian=1782;e.sixroman=8565;e.sixsuperior=8310;e.sixteencircle=9327;e.sixteencurrencydenominatorbengali=2553;e.sixteenparen=9347;e.sixteenperiod=9367;e.sixthai=3670;e.slash=47;e.slashmonospace=65295;e.slong=383;e.slongdotaccent=7835;e.smileface=9786;e.smonospace=65363;e.sofpasuqhebrew=1475;e.softhyphen=173;e.softsigncyrillic=1100;e.sohiragana=12381;e.sokatakana=12477;e.sokatakanahalfwidth=65407;e.\
soliduslongoverlaycmb=824;e.solidusshortoverlaycmb=823;e.sorusithai=3625;e.sosalathai=3624;e.sosothai=3595;e.sosuathai=3626;e.space=32;e.spacehackarabic=32;e.spade=9824;e.spadesuitblack=9824;e.spadesuitwhite=9828;e.sparen=9390;e.squarebelowcmb=827;e.squarecc=13252;e.squarecm=13213;e.squarediagonalcrosshatchfill=9641;e.squarehorizontalfill=9636;e.squarekg=13199;e.squarekm=13214;e.squarekmcapital=13262;e.squareln=13265;e.squarelog=13266;e.squaremg=13198;e.squaremil=13269;e.squaremm=13212;e.squarem\
squared=13217;e.squareorthogonalcrosshatchfill=9638;e.squareupperlefttolowerrightfill=9639;e.squareupperrighttolowerleftfill=9640;e.squareverticalfill=9637;e.squarewhitewithsmallblack=9635;e.srsquare=13275;e.ssabengali=2487;e.ssadeva=2359;e.ssagujarati=2743;e.ssangcieuckorean=12617;e.ssanghieuhkorean=12677;e.ssangieungkorean=12672;e.ssangkiyeokkorean=12594;e.ssangnieunkorean=12645;e.ssangpieupkorean=12611;e.ssangsioskorean=12614;e.ssangtikeutkorean=12600;e.ssuperior=63218;e.sterling=163;e.sterli\
ngmonospace=65505;e.strokelongoverlaycmb=822;e.strokeshortoverlaycmb=821;e.subset=8834;e.subsetnotequal=8842;e.subsetorequal=8838;e.succeeds=8827;e.suchthat=8715;e.suhiragana=12377;e.sukatakana=12473;e.sukatakanahalfwidth=65405;e.sukunarabic=1618;e.summation=8721;e.sun=9788;e.superset=8835;e.supersetnotequal=8843;e.supersetorequal=8839;e.svsquare=13276;e.syouwaerasquare=13180;e.t=116;e.tabengali=2468;e.tackdown=8868;e.tackleft=8867;e.tadeva=2340;e.tagujarati=2724;e.tagurmukhi=2596;e.taharabic=15\
91;e.tahfinalarabic=65218;e.tahinitialarabic=65219;e.tahiragana=12383;e.tahmedialarabic=65220;e.taisyouerasquare=13181;e.takatakana=12479;e.takatakanahalfwidth=65408;e.tatweelarabic=1600;e.tau=964;e.tav=1514;e.tavdages=64330;e.tavdagesh=64330;e.tavdageshhebrew=64330;e.tavhebrew=1514;e.tbar=359;e.tbopomofo=12554;e.tcaron=357;e.tccurl=680;e.tcedilla=355;e.tcheharabic=1670;e.tchehfinalarabic=64379;e.tchehinitialarabic=64380;e.tchehmedialarabic=64381;e.tcircle=9443;e.tcircumflexbelow=7793;e.tcommaac\
cent=355;e.tdieresis=7831;e.tdotaccent=7787;e.tdotbelow=7789;e.tecyrillic=1090;e.tedescendercyrillic=1197;e.teharabic=1578;e.tehfinalarabic=65174;e.tehhahinitialarabic=64674;e.tehhahisolatedarabic=64524;e.tehinitialarabic=65175;e.tehiragana=12390;e.tehjeeminitialarabic=64673;e.tehjeemisolatedarabic=64523;e.tehmarbutaarabic=1577;e.tehmarbutafinalarabic=65172;e.tehmedialarabic=65176;e.tehmeeminitialarabic=64676;e.tehmeemisolatedarabic=64526;e.tehnoonfinalarabic=64627;e.tekatakana=12486;e.tekatakan\
ahalfwidth=65411;e.telephone=8481;e.telephoneblack=9742;e.telishagedolahebrew=1440;e.telishaqetanahebrew=1449;e.tencircle=9321;e.tenideographicparen=12841;e.tenparen=9341;e.tenperiod=9361;e.tenroman=8569;e.tesh=679;e.tet=1496;e.tetdagesh=64312;e.tetdageshhebrew=64312;e.tethebrew=1496;e.tetsecyrillic=1205;e.tevirhebrew=1435;e.tevirlefthebrew=1435;e.thabengali=2469;e.thadeva=2341;e.thagujarati=2725;e.thagurmukhi=2597;e.thalarabic=1584;e.thalfinalarabic=65196;e.thanthakhatlowleftthai=63640;e.thanth\
akhatlowrightthai=63639;e.thanthakhatthai=3660;e.thanthakhatupperleftthai=63638;e.theharabic=1579;e.thehfinalarabic=65178;e.thehinitialarabic=65179;e.thehmedialarabic=65180;e.thereexists=8707;e.therefore=8756;e.theta=952;e.theta1=977;e.thetasymbolgreek=977;e.thieuthacirclekorean=12921;e.thieuthaparenkorean=12825;e.thieuthcirclekorean=12907;e.thieuthkorean=12620;e.thieuthparenkorean=12811;e.thirteencircle=9324;e.thirteenparen=9344;e.thirteenperiod=9364;e.thonangmonthothai=3601;e.thook=429;e.thoph\
uthaothai=3602;e.thorn=254;e.thothahanthai=3607;e.thothanthai=3600;e.thothongthai=3608;e.thothungthai=3606;e.thousandcyrillic=1154;e.thousandsseparatorarabic=1644;e.thousandsseparatorpersian=1644;e.three=51;e.threearabic=1635;e.threebengali=2537;e.threecircle=9314;e.threecircleinversesansserif=10124;e.threedeva=2409;e.threeeighths=8540;e.threegujarati=2793;e.threegurmukhi=2665;e.threehackarabic=1635;e.threehangzhou=12323;e.threeideographicparen=12834;e.threeinferior=8323;e.threemonospace=65299;e\
.threenumeratorbengali=2550;e.threeoldstyle=63283;e.threeparen=9334;e.threeperiod=9354;e.threepersian=1779;e.threequarters=190;e.threequartersemdash=63198;e.threeroman=8562;e.threesuperior=179;e.threethai=3667;e.thzsquare=13204;e.tihiragana=12385;e.tikatakana=12481;e.tikatakanahalfwidth=65409;e.tikeutacirclekorean=12912;e.tikeutaparenkorean=12816;e.tikeutcirclekorean=12898;e.tikeutkorean=12599;e.tikeutparenkorean=12802;e.tilde=732;e.tildebelowcmb=816;e.tildecmb=771;e.tildecomb=771;e.tildedoublec\
mb=864;e.tildeoperator=8764;e.tildeoverlaycmb=820;e.tildeverticalcmb=830;e.timescircle=8855;e.tipehahebrew=1430;e.tipehalefthebrew=1430;e.tippigurmukhi=2672;e.titlocyrilliccmb=1155;e.tiwnarmenian=1407;e.tlinebelow=7791;e.tmonospace=65364;e.toarmenian=1385;e.tohiragana=12392;e.tokatakana=12488;e.tokatakanahalfwidth=65412;e.tonebarextrahighmod=741;e.tonebarextralowmod=745;e.tonebarhighmod=742;e.tonebarlowmod=744;e.tonebarmidmod=743;e.tonefive=445;e.tonesix=389;e.tonetwo=424;e.tonos=900;e.tonsquare\
=13095;e.topatakthai=3599;e.tortoiseshellbracketleft=12308;e.tortoiseshellbracketleftsmall=65117;e.tortoiseshellbracketleftvertical=65081;e.tortoiseshellbracketright=12309;e.tortoiseshellbracketrightsmall=65118;e.tortoiseshellbracketrightvertical=65082;e.totaothai=3605;e.tpalatalhook=427;e.tparen=9391;e.trademark=8482;e.trademarksans=63722;e.trademarkserif=63195;e.tretroflexhook=648;e.triagdn=9660;e.triaglf=9668;e.triagrt=9658;e.triagup=9650;e.ts=678;e.tsadi=1510;e.tsadidagesh=64326;e.tsadidages\
hhebrew=64326;e.tsadihebrew=1510;e.tsecyrillic=1094;e.tsere=1461;e.tsere12=1461;e.tsere1e=1461;e.tsere2b=1461;e.tserehebrew=1461;e.tserenarrowhebrew=1461;e.tserequarterhebrew=1461;e.tserewidehebrew=1461;e.tshecyrillic=1115;e.tsuperior=63219;e.ttabengali=2463;e.ttadeva=2335;e.ttagujarati=2719;e.ttagurmukhi=2591;e.tteharabic=1657;e.ttehfinalarabic=64359;e.ttehinitialarabic=64360;e.ttehmedialarabic=64361;e.tthabengali=2464;e.tthadeva=2336;e.tthagujarati=2720;e.tthagurmukhi=2592;e.tturned=647;e.tuhi\
ragana=12388;e.tukatakana=12484;e.tukatakanahalfwidth=65410;e.tusmallhiragana=12387;e.tusmallkatakana=12483;e.tusmallkatakanahalfwidth=65391;e.twelvecircle=9323;e.twelveparen=9343;e.twelveperiod=9363;e.twelveroman=8571;e.twentycircle=9331;e.twentyhangzhou=21316;e.twentyparen=9351;e.twentyperiod=9371;e.two=50;e.twoarabic=1634;e.twobengali=2536;e.twocircle=9313;e.twocircleinversesansserif=10123;e.twodeva=2408;e.twodotenleader=8229;e.twodotleader=8229;e.twodotleadervertical=65072;e.twogujarati=2792\
;e.twogurmukhi=2664;e.twohackarabic=1634;e.twohangzhou=12322;e.twoideographicparen=12833;e.twoinferior=8322;e.twomonospace=65298;e.twonumeratorbengali=2549;e.twooldstyle=63282;e.twoparen=9333;e.twoperiod=9353;e.twopersian=1778;e.tworoman=8561;e.twostroke=443;e.twosuperior=178;e.twothai=3666;e.twothirds=8532;e.u=117;e.uacute=250;e.ubar=649;e.ubengali=2441;e.ubopomofo=12584;e.ubreve=365;e.ucaron=468;e.ucircle=9444;e.ucircumflex=251;e.ucircumflexbelow=7799;e.ucyrillic=1091;e.udattadeva=2385;e.udbla\
cute=369;e.udblgrave=533;e.udeva=2313;e.udieresis=252;e.udieresisacute=472;e.udieresisbelow=7795;e.udieresiscaron=474;e.udieresiscyrillic=1265;e.udieresisgrave=476;e.udieresismacron=470;e.udotbelow=7909;e.ugrave=249;e.ugujarati=2697;e.ugurmukhi=2569;e.uhiragana=12358;e.uhookabove=7911;e.uhorn=432;e.uhornacute=7913;e.uhorndotbelow=7921;e.uhorngrave=7915;e.uhornhookabove=7917;e.uhorntilde=7919;e.uhungarumlaut=369;e.uhungarumlautcyrillic=1267;e.uinvertedbreve=535;e.ukatakana=12454;e.ukatakanahalfwi\
dth=65395;e.ukcyrillic=1145;e.ukorean=12636;e.umacron=363;e.umacroncyrillic=1263;e.umacrondieresis=7803;e.umatragurmukhi=2625;e.umonospace=65365;e.underscore=95;e.underscoredbl=8215;e.underscoremonospace=65343;e.underscorevertical=65075;e.underscorewavy=65103;e.union=8746;e.universal=8704;e.uogonek=371;e.uparen=9392;e.upblock=9600;e.upperdothebrew=1476;e.upsilon=965;e.upsilondieresis=971;e.upsilondieresistonos=944;e.upsilonlatin=650;e.upsilontonos=973;e.uptackbelowcmb=797;e.uptackmod=724;e.uragu\
rmukhi=2675;e.uring=367;e.ushortcyrillic=1118;e.usmallhiragana=12357;e.usmallkatakana=12453;e.usmallkatakanahalfwidth=65385;e.ustraightcyrillic=1199;e.ustraightstrokecyrillic=1201;e.utilde=361;e.utildeacute=7801;e.utildebelow=7797;e.uubengali=2442;e.uudeva=2314;e.uugujarati=2698;e.uugurmukhi=2570;e.uumatragurmukhi=2626;e.uuvowelsignbengali=2498;e.uuvowelsigndeva=2370;e.uuvowelsigngujarati=2754;e.uvowelsignbengali=2497;e.uvowelsigndeva=2369;e.uvowelsigngujarati=2753;e.v=118;e.vadeva=2357;e.vaguja\
rati=2741;e.vagurmukhi=2613;e.vakatakana=12535;e.vav=1493;e.vavdagesh=64309;e.vavdagesh65=64309;e.vavdageshhebrew=64309;e.vavhebrew=1493;e.vavholam=64331;e.vavholamhebrew=64331;e.vavvavhebrew=1520;e.vavyodhebrew=1521;e.vcircle=9445;e.vdotbelow=7807;e.vecyrillic=1074;e.veharabic=1700;e.vehfinalarabic=64363;e.vehinitialarabic=64364;e.vehmedialarabic=64365;e.vekatakana=12537;e.venus=9792;e.verticalbar=124;e.verticallineabovecmb=781;e.verticallinebelowcmb=809;e.verticallinelowmod=716;e.verticallinem\
od=712;e.vewarmenian=1406;e.vhook=651;e.vikatakana=12536;e.viramabengali=2509;e.viramadeva=2381;e.viramagujarati=2765;e.visargabengali=2435;e.visargadeva=2307;e.visargagujarati=2691;e.vmonospace=65366;e.voarmenian=1400;e.voicediterationhiragana=12446;e.voicediterationkatakana=12542;e.voicedmarkkana=12443;e.voicedmarkkanahalfwidth=65438;e.vokatakana=12538;e.vparen=9393;e.vtilde=7805;e.vturned=652;e.vuhiragana=12436;e.vukatakana=12532;e.w=119;e.wacute=7811;e.waekorean=12633;e.wahiragana=12431;e.wa\
katakana=12527;e.wakatakanahalfwidth=65436;e.wakorean=12632;e.wasmallhiragana=12430;e.wasmallkatakana=12526;e.wattosquare=13143;e.wavedash=12316;e.wavyunderscorevertical=65076;e.wawarabic=1608;e.wawfinalarabic=65262;e.wawhamzaabovearabic=1572;e.wawhamzaabovefinalarabic=65158;e.wbsquare=13277;e.wcircle=9446;e.wcircumflex=373;e.wdieresis=7813;e.wdotaccent=7815;e.wdotbelow=7817;e.wehiragana=12433;e.weierstrass=8472;e.wekatakana=12529;e.wekorean=12638;e.weokorean=12637;e.wgrave=7809;e.whitebullet=97\
02;e.whitecircle=9675;e.whitecircleinverse=9689;e.whitecornerbracketleft=12302;e.whitecornerbracketleftvertical=65091;e.whitecornerbracketright=12303;e.whitecornerbracketrightvertical=65092;e.whitediamond=9671;e.whitediamondcontainingblacksmalldiamond=9672;e.whitedownpointingsmalltriangle=9663;e.whitedownpointingtriangle=9661;e.whiteleftpointingsmalltriangle=9667;e.whiteleftpointingtriangle=9665;e.whitelenticularbracketleft=12310;e.whitelenticularbracketright=12311;e.whiterightpointingsmalltrian\
gle=9657;e.whiterightpointingtriangle=9655;e.whitesmallsquare=9643;e.whitesmilingface=9786;e.whitesquare=9633;e.whitestar=9734;e.whitetelephone=9743;e.whitetortoiseshellbracketleft=12312;e.whitetortoiseshellbracketright=12313;e.whiteuppointingsmalltriangle=9653;e.whiteuppointingtriangle=9651;e.wihiragana=12432;e.wikatakana=12528;e.wikorean=12639;e.wmonospace=65367;e.wohiragana=12434;e.wokatakana=12530;e.wokatakanahalfwidth=65382;e.won=8361;e.wonmonospace=65510;e.wowaenthai=3623;e.wparen=9394;e.w\
ring=7832;e.wsuperior=695;e.wturned=653;e.wynn=447;e.x=120;e.xabovecmb=829;e.xbopomofo=12562;e.xcircle=9447;e.xdieresis=7821;e.xdotaccent=7819;e.xeharmenian=1389;e.xi=958;e.xmonospace=65368;e.xparen=9395;e.xsuperior=739;e.y=121;e.yaadosquare=13134;e.yabengali=2479;e.yacute=253;e.yadeva=2351;e.yaekorean=12626;e.yagujarati=2735;e.yagurmukhi=2607;e.yahiragana=12420;e.yakatakana=12516;e.yakatakanahalfwidth=65428;e.yakorean=12625;e.yamakkanthai=3662;e.yasmallhiragana=12419;e.yasmallkatakana=12515;e.y\
asmallkatakanahalfwidth=65388;e.yatcyrillic=1123;e.ycircle=9448;e.ycircumflex=375;e.ydieresis=255;e.ydotaccent=7823;e.ydotbelow=7925;e.yeharabic=1610;e.yehbarreearabic=1746;e.yehbarreefinalarabic=64431;e.yehfinalarabic=65266;e.yehhamzaabovearabic=1574;e.yehhamzaabovefinalarabic=65162;e.yehhamzaaboveinitialarabic=65163;e.yehhamzaabovemedialarabic=65164;e.yehinitialarabic=65267;e.yehmedialarabic=65268;e.yehmeeminitialarabic=64733;e.yehmeemisolatedarabic=64600;e.yehnoonfinalarabic=64660;e.yehthreed\
otsbelowarabic=1745;e.yekorean=12630;e.yen=165;e.yenmonospace=65509;e.yeokorean=12629;e.yeorinhieuhkorean=12678;e.yerahbenyomohebrew=1450;e.yerahbenyomolefthebrew=1450;e.yericyrillic=1099;e.yerudieresiscyrillic=1273;e.yesieungkorean=12673;e.yesieungpansioskorean=12675;e.yesieungsioskorean=12674;e.yetivhebrew=1434;e.ygrave=7923;e.yhook=436;e.yhookabove=7927;e.yiarmenian=1397;e.yicyrillic=1111;e.yikorean=12642;e.yinyang=9775;e.yiwnarmenian=1410;e.ymonospace=65369;e.yod=1497;e.yoddagesh=64313;e.yod\
dageshhebrew=64313;e.yodhebrew=1497;e.yodyodhebrew=1522;e.yodyodpatahhebrew=64287;e.yohiragana=12424;e.yoikorean=12681;e.yokatakana=12520;e.yokatakanahalfwidth=65430;e.yokorean=12635;e.yosmallhiragana=12423;e.yosmallkatakana=12519;e.yosmallkatakanahalfwidth=65390;e.yotgreek=1011;e.yoyaekorean=12680;e.yoyakorean=12679;e.yoyakthai=3618;e.yoyingthai=3597;e.yparen=9396;e.ypogegrammeni=890;e.ypogegrammenigreekcmb=837;e.yr=422;e.yring=7833;e.ysuperior=696;e.ytilde=7929;e.yturned=654;e.yuhiragana=12422\
;e.yuikorean=12684;e.yukatakana=12518;e.yukatakanahalfwidth=65429;e.yukorean=12640;e.yusbigcyrillic=1131;e.yusbigiotifiedcyrillic=1133;e.yuslittlecyrillic=1127;e.yuslittleiotifiedcyrillic=1129;e.yusmallhiragana=12421;e.yusmallkatakana=12517;e.yusmallkatakanahalfwidth=65389;e.yuyekorean=12683;e.yuyeokorean=12682;e.yyabengali=2527;e.yyadeva=2399;e.z=122;e.zaarmenian=1382;e.zacute=378;e.zadeva=2395;e.zagurmukhi=2651;e.zaharabic=1592;e.zahfinalarabic=65222;e.zahinitialarabic=65223;e.zahiragana=12374\
;e.zahmedialarabic=65224;e.zainarabic=1586;e.zainfinalarabic=65200;e.zakatakana=12470;e.zaqefgadolhebrew=1429;e.zaqefqatanhebrew=1428;e.zarqahebrew=1432;e.zayin=1494;e.zayindagesh=64310;e.zayindageshhebrew=64310;e.zayinhebrew=1494;e.zbopomofo=12567;e.zcaron=382;e.zcircle=9449;e.zcircumflex=7825;e.zcurl=657;e.zdot=380;e.zdotaccent=380;e.zdotbelow=7827;e.zecyrillic=1079;e.zedescendercyrillic=1177;e.zedieresiscyrillic=1247;e.zehiragana=12380;e.zekatakana=12476;e.zero=48;e.zeroarabic=1632;e.zerobeng\
ali=2534;e.zerodeva=2406;e.zerogujarati=2790;e.zerogurmukhi=2662;e.zerohackarabic=1632;e.zeroinferior=8320;e.zeromonospace=65296;e.zerooldstyle=63280;e.zeropersian=1776;e.zerosuperior=8304;e.zerothai=3664;e.zerowidthjoiner=65279;e.zerowidthnonjoiner=8204;e.zerowidthspace=8203;e.zeta=950;e.zhbopomofo=12563;e.zhearmenian=1386;e.zhebrevecyrillic=1218;e.zhecyrillic=1078;e.zhedescendercyrillic=1175;e.zhedieresiscyrillic=1245;e.zihiragana=12376;e.zikatakana=12472;e.zinorhebrew=1454;e.zlinebelow=7829;e\
.zmonospace=65370;e.zohiragana=12382;e.zokatakana=12478;e.zparen=9397;e.zretroflexhook=656;e.zstroke=438;e.zuhiragana=12378;e.zukatakana=12474;e[".notdef"]=0;e.angbracketleftbig=9001;e.angbracketleftBig=9001;e.angbracketleftbigg=9001;e.angbracketleftBigg=9001;e.angbracketrightBig=9002;e.angbracketrightbig=9002;e.angbracketrightBigg=9002;e.angbracketrightbigg=9002;e.arrowhookleft=8618;e.arrowhookright=8617;e.arrowlefttophalf=8636;e.arrowleftbothalf=8637;e.arrownortheast=8599;e.arrownorthwest=8598\
;e.arrowrighttophalf=8640;e.arrowrightbothalf=8641;e.arrowsoutheast=8600;e.arrowsouthwest=8601;e.backslashbig=8726;e.backslashBig=8726;e.backslashBigg=8726;e.backslashbigg=8726;e.bardbl=8214;e.bracehtipdownleft=65079;e.bracehtipdownright=65079;e.bracehtipupleft=65080;e.bracehtipupright=65080;e.braceleftBig=123;e.braceleftbig=123;e.braceleftbigg=123;e.braceleftBigg=123;e.bracerightBig=125;e.bracerightbig=125;e.bracerightbigg=125;e.bracerightBigg=125;e.bracketleftbig=91;e.bracketleftBig=91;e.brack\
etleftbigg=91;e.bracketleftBigg=91;e.bracketrightBig=93;e.bracketrightbig=93;e.bracketrightbigg=93;e.bracketrightBigg=93;e.ceilingleftbig=8968;e.ceilingleftBig=8968;e.ceilingleftBigg=8968;e.ceilingleftbigg=8968;e.ceilingrightbig=8969;e.ceilingrightBig=8969;e.ceilingrightbigg=8969;e.ceilingrightBigg=8969;e.circledotdisplay=8857;e.circledottext=8857;e.circlemultiplydisplay=8855;e.circlemultiplytext=8855;e.circleplusdisplay=8853;e.circleplustext=8853;e.contintegraldisplay=8750;e.contintegraltext=87\
50;e.coproductdisplay=8720;e.coproducttext=8720;e.floorleftBig=8970;e.floorleftbig=8970;e.floorleftbigg=8970;e.floorleftBigg=8970;e.floorrightbig=8971;e.floorrightBig=8971;e.floorrightBigg=8971;e.floorrightbigg=8971;e.hatwide=770;e.hatwider=770;e.hatwidest=770;e.intercal=7488;e.integraldisplay=8747;e.integraltext=8747;e.intersectiondisplay=8898;e.intersectiontext=8898;e.logicalanddisplay=8743;e.logicalandtext=8743;e.logicalordisplay=8744;e.logicalortext=8744;e.parenleftBig=40;e.parenleftbig=40;e\
.parenleftBigg=40;e.parenleftbigg=40;e.parenrightBig=41;e.parenrightbig=41;e.parenrightBigg=41;e.parenrightbigg=41;e.prime=8242;e.productdisplay=8719;e.producttext=8719;e.radicalbig=8730;e.radicalBig=8730;e.radicalBigg=8730;e.radicalbigg=8730;e.radicalbt=8730;e.radicaltp=8730;e.radicalvertex=8730;e.slashbig=47;e.slashBig=47;e.slashBigg=47;e.slashbigg=47;e.summationdisplay=8721;e.summationtext=8721;e.tildewide=732;e.tildewider=732;e.tildewidest=732;e.uniondisplay=8899;e.unionmultidisplay=8846;e.u\
nionmultitext=8846;e.unionsqdisplay=8852;e.unionsqtext=8852;e.uniontext=8899;e.vextenddouble=8741;e.vextendsingle=8739})),Ir=getLookupTableFactory((function(e){e.space=32;e.a1=9985;e.a2=9986;e.a202=9987;e.a3=9988;e.a4=9742;e.a5=9990;e.a119=9991;e.a118=9992;e.a117=9993;e.a11=9755;e.a12=9758;e.a13=9996;e.a14=9997;e.a15=9998;e.a16=9999;e.a105=1e4;e.a17=10001;e.a18=10002;e.a19=10003;e.a20=10004;e.a21=10005;e.a22=10006;e.a23=10007;e.a24=10008;e.a25=10009;e.a26=10010;e.a27=10011;e.a28=10012;e.a6=10013\
;e.a7=10014;e.a8=10015;e.a9=10016;e.a10=10017;e.a29=10018;e.a30=10019;e.a31=10020;e.a32=10021;e.a33=10022;e.a34=10023;e.a35=9733;e.a36=10025;e.a37=10026;e.a38=10027;e.a39=10028;e.a40=10029;e.a41=10030;e.a42=10031;e.a43=10032;e.a44=10033;e.a45=10034;e.a46=10035;e.a47=10036;e.a48=10037;e.a49=10038;e.a50=10039;e.a51=10040;e.a52=10041;e.a53=10042;e.a54=10043;e.a55=10044;e.a56=10045;e.a57=10046;e.a58=10047;e.a59=10048;e.a60=10049;e.a61=10050;e.a62=10051;e.a63=10052;e.a64=10053;e.a65=10054;e.a66=10055\
;e.a67=10056;e.a68=10057;e.a69=10058;e.a70=10059;e.a71=9679;e.a72=10061;e.a73=9632;e.a74=10063;e.a203=10064;e.a75=10065;e.a204=10066;e.a76=9650;e.a77=9660;e.a78=9670;e.a79=10070;e.a81=9687;e.a82=10072;e.a83=10073;e.a84=10074;e.a97=10075;e.a98=10076;e.a99=10077;e.a100=10078;e.a101=10081;e.a102=10082;e.a103=10083;e.a104=10084;e.a106=10085;e.a107=10086;e.a108=10087;e.a112=9827;e.a111=9830;e.a110=9829;e.a109=9824;e.a120=9312;e.a121=9313;e.a122=9314;e.a123=9315;e.a124=9316;e.a125=9317;e.a126=9318;e.a\
127=9319;e.a128=9320;e.a129=9321;e.a130=10102;e.a131=10103;e.a132=10104;e.a133=10105;e.a134=10106;e.a135=10107;e.a136=10108;e.a137=10109;e.a138=10110;e.a139=10111;e.a140=10112;e.a141=10113;e.a142=10114;e.a143=10115;e.a144=10116;e.a145=10117;e.a146=10118;e.a147=10119;e.a148=10120;e.a149=10121;e.a150=10122;e.a151=10123;e.a152=10124;e.a153=10125;e.a154=10126;e.a155=10127;e.a156=10128;e.a157=10129;e.a158=10130;e.a159=10131;e.a160=10132;e.a161=8594;e.a163=8596;e.a164=8597;e.a196=10136;e.a165=10137;e.\
a192=10138;e.a166=10139;e.a167=10140;e.a168=10141;e.a169=10142;e.a170=10143;e.a171=10144;e.a172=10145;e.a173=10146;e.a162=10147;e.a174=10148;e.a175=10149;e.a176=10150;e.a177=10151;e.a178=10152;e.a179=10153;e.a193=10154;e.a180=10155;e.a199=10156;e.a181=10157;e.a200=10158;e.a182=10159;e.a201=10161;e.a183=10162;e.a184=10163;e.a197=10164;e.a185=10165;e.a194=10166;e.a198=10167;e.a186=10168;e.a195=10169;e.a187=10170;e.a188=10171;e.a189=10172;e.a190=10173;e.a191=10174;e.a89=10088;e.a90=10089;e.a93=1009\
0;e.a94=10091;e.a91=10092;e.a92=10093;e.a205=10094;e.a85=10095;e.a206=10096;e.a86=10097;e.a87=10098;e.a88=10099;e.a95=10100;e.a96=10101;e[".notdef"]=0})),Tr=getLookupTableFactory((function(e){e[63721]=169;e[63193]=169;e[63720]=174;e[63194]=174;e[63722]=8482;e[63195]=8482;e[63729]=9127;e[63730]=9128;e[63731]=9129;e[63740]=9131;e[63741]=9132;e[63742]=9133;e[63726]=9121;e[63727]=9122;e[63728]=9123;e[63737]=9124;e[63738]=9125;e[63739]=9126;e[63723]=9115;e[63724]=9116;e[63725]=9117;e[63734]=9118;e[63\
735]=9119;e[63736]=9120}));function getUnicodeForGlyph(e,t){let a=t[e];if(void 0!==a)return a;if(!e)return-1;if("u"===e[0]){const t=e.length;let r;if(7===t&&"n"===e[1]&&"i"===e[2])r=e.substring(3);else{if(!(t>=5&&t<=7))return-1;r=e.substring(1)}if(r===r.toUpperCase()){a=parseInt(r,16);if(a>=0)return a}}return-1}const Or=[[0,127],[128,255],[256,383],[384,591],[592,687,7424,7551,7552,7615],[688,767,42752,42783],[768,879,7616,7679],[880,1023],[11392,11519],[1024,1279,1280,1327,11744,11775,42560,426\
55],[1328,1423],[1424,1535],[42240,42559],[1536,1791,1872,1919],[1984,2047],[2304,2431],[2432,2559],[2560,2687],[2688,2815],[2816,2943],[2944,3071],[3072,3199],[3200,3327],[3328,3455],[3584,3711],[3712,3839],[4256,4351,11520,11567],[6912,7039],[4352,4607],[7680,7935,11360,11391,42784,43007],[7936,8191],[8192,8303,11776,11903],[8304,8351],[8352,8399],[8400,8447],[8448,8527],[8528,8591],[8592,8703,10224,10239,10496,10623,11008,11263],[8704,8959,10752,11007,10176,10223,10624,10751],[8960,9215],[921\
6,9279],[9280,9311],[9312,9471],[9472,9599],[9600,9631],[9632,9727],[9728,9983],[9984,10175],[12288,12351],[12352,12447],[12448,12543,12784,12799],[12544,12591,12704,12735],[12592,12687],[43072,43135],[12800,13055],[13056,13311],[44032,55215],[55296,57343],[67840,67871],[19968,40959,11904,12031,12032,12255,12272,12287,13312,19903,131072,173791,12688,12703],[57344,63743],[12736,12783,63744,64255,194560,195103],[64256,64335],[64336,65023],[65056,65071],[65040,65055],[65104,65135],[65136,65279],[65\
280,65519],[65520,65535],[3840,4095],[1792,1871],[1920,1983],[3456,3583],[4096,4255],[4608,4991,4992,5023,11648,11743],[5024,5119],[5120,5759],[5760,5791],[5792,5887],[6016,6143],[6144,6319],[10240,10495],[40960,42127],[5888,5919,5920,5951,5952,5983,5984,6015],[66304,66351],[66352,66383],[66560,66639],[118784,119039,119040,119295,119296,119375],[119808,120831],[1044480,1048573],[65024,65039,917760,917999],[917504,917631],[6400,6479],[6480,6527],[6528,6623],[6656,6687],[11264,11359],[11568,11647]\
,[19904,19967],[43008,43055],[65536,65663,65664,65791,65792,65855],[65856,65935],[66432,66463],[66464,66527],[66640,66687],[66688,66735],[67584,67647],[68096,68191],[119552,119647],[73728,74751,74752,74879],[119648,119679],[7040,7103],[7168,7247],[7248,7295],[43136,43231],[43264,43311],[43312,43359],[43520,43615],[65936,65999],[66e3,66047],[66208,66271,66176,66207,67872,67903],[127024,127135,126976,127023]];function getUnicodeRangeFor(e,t=-1){if(-1!==t){const a=Or[t];for(let r=0,i=a.length;r<i;r\
+=2)if(e>=a[r]&&e<=a[r+1])return t}for(let t=0,a=Or.length;t<a;t++){const a=Or[t];for(let r=0,i=a.length;r<i;r+=2)if(e>=a[r]&&e<=a[r+1])return t}return-1}const Mr=new RegExp("^(\\\\s)|(\\\\p{Mn})|(\\\\p{Cf})$","u"),Dr=new Map;const Rr=!0,Nr=1,Er=2,Pr=4,Lr=32,jr=[".notdef",".null","nonmarkingreturn","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quotesingle","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","s\
ix","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","grave","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","Adieresis","Aring","Ccedilla","Eacute","Ntilde","Odieresis","Udieresis","aacute","a\
grave","acircumflex","adieresis","atilde","aring","ccedilla","eacute","egrave","ecircumflex","edieresis","iacute","igrave","icircumflex","idieresis","ntilde","oacute","ograve","ocircumflex","odieresis","otilde","uacute","ugrave","ucircumflex","udieresis","dagger","degree","cent","sterling","section","bullet","paragraph","germandbls","registered","copyright","trademark","acute","dieresis","notequal","AE","Oslash","infinity","plusminus","lessequal","greaterequal","yen","mu","partialdiff","summatio\
n","product","pi","integral","ordfeminine","ordmasculine","Omega","ae","oslash","questiondown","exclamdown","logicalnot","radical","florin","approxequal","Delta","guillemotleft","guillemotright","ellipsis","nonbreakingspace","Agrave","Atilde","Otilde","OE","oe","endash","emdash","quotedblleft","quotedblright","quoteleft","quoteright","divide","lozenge","ydieresis","Ydieresis","fraction","currency","guilsinglleft","guilsinglright","fi","fl","daggerdbl","periodcentered","quotesinglbase","quotedblb\
ase","perthousand","Acircumflex","Ecircumflex","Aacute","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Oacute","Ocircumflex","apple","Ograve","Uacute","Ucircumflex","Ugrave","dotlessi","circumflex","tilde","macron","breve","dotaccent","ring","cedilla","hungarumlaut","ogonek","caron","Lslash","lslash","Scaron","scaron","Zcaron","zcaron","brokenbar","Eth","eth","Yacute","yacute","Thorn","thorn","minus","multiply","onesuperior","twosuperior","threesuperior","onehalf","onequarter"\
,"threequarters","franc","Gbreve","gbreve","Idotaccent","Scedilla","scedilla","Cacute","cacute","Ccaron","ccaron","dcroat"];function recoverGlyphName(e,t){if(void 0!==t[e])return e;const a=getUnicodeForGlyph(e,t);if(-1!==a)for(const e in t)if(t[e]===a)return e;info("Unable to recover a standard glyph name for: "+e);return e}function type1FontGlyphMapping(e,t,a){const r=Object.create(null);let i,n,s;const o=!!(e.flags&Pr);if(e.isInternalFont){s=t;for(n=0;n<s.length;n++){i=a.indexOf(s[n]);r[n]=i>=\
0?i:0}}else if(e.baseEncodingName){s=getEncoding(e.baseEncodingName);for(n=0;n<s.length;n++){i=a.indexOf(s[n]);r[n]=i>=0?i:0}}else if(o)for(n in t)r[n]=t[n];else{s=Ar;for(n=0;n<s.length;n++){i=a.indexOf(s[n]);r[n]=i>=0?i:0}}const c=e.differences;let l;if(c)for(n in c){const e=c[n];i=a.indexOf(e);if(-1===i){l||(l=Fr());const t=recoverGlyphName(e,l);t!==e&&(i=a.indexOf(t))}r[n]=i>=0?i:0}return r}function normalizeFontName(e){return e.replaceAll(/[,_]/g,"-").replaceAll(/\\s/g,"")}const _r=getLookupT\
ableFactory((e=>{e[8211]=65074;e[8212]=65073;e[8229]=65072;e[8230]=65049;e[12289]=65041;e[12290]=65042;e[12296]=65087;e[12297]=65088;e[12298]=65085;e[12299]=65086;e[12300]=65089;e[12301]=65090;e[12302]=65091;e[12303]=65092;e[12304]=65083;e[12305]=65084;e[12308]=65081;e[12309]=65082;e[12310]=65047;e[12311]=65048;e[65103]=65076;e[65281]=65045;e[65288]=65077;e[65289]=65078;e[65292]=65040;e[65306]=65043;e[65307]=65044;e[65311]=65046;e[65339]=65095;e[65341]=65096;e[65343]=65075;e[65371]=65079;e[65373\
]=65080}));const Ur=[".notdef","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quo\
teleft","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","endash","dagger","daggerdbl","periodcentered","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","questiondown","grav\
e","acute","circumflex","tilde","macron","breve","dotaccent","dieresis","ring","cedilla","hungarumlaut","ogonek","caron","emdash","AE","ordfeminine","Lslash","Oslash","OE","ordmasculine","ae","dotlessi","lslash","oslash","oe","germandbls","onesuperior","logicalnot","mu","trademark","Eth","onehalf","plusminus","Thorn","onequarter","divide","brokenbar","degree","thorn","threequarters","twosuperior","registered","minus","eth","multiply","threesuperior","copyright","Aacute","Acircumflex","Adieresis"\
,"Agrave","Aring","Atilde","Ccedilla","Eacute","Ecircumflex","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Ntilde","Oacute","Ocircumflex","Odieresis","Ograve","Otilde","Scaron","Uacute","Ucircumflex","Udieresis","Ugrave","Yacute","Ydieresis","Zcaron","aacute","acircumflex","adieresis","agrave","aring","atilde","ccedilla","eacute","ecircumflex","edieresis","egrave","iacute","icircumflex","idieresis","igrave","ntilde","oacute","ocircumflex","odieresis","ograve","otilde","scaron\
","uacute","ucircumflex","udieresis","ugrave","yacute","ydieresis","zcaron"],Xr=[".notdef","space","exclamsmall","Hungarumlautsmall","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","comma","hyphen","period","fraction","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","colon","semicolon","commasuperior","thre\
equartersemdash","periodsuperior","questionsmall","asuperior","bsuperior","centsuperior","dsuperior","esuperior","isuperior","lsuperior","msuperior","nsuperior","osuperior","rsuperior","ssuperior","tsuperior","ff","fi","fl","ffi","ffl","parenleftinferior","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsm\
all","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupiah","Tildesmall","exclamdownsmall","centoldstyle","Lslashsmall","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","Dotaccentsmall","Macronsmall","figuredash","hypheninferior","Ogoneksmall","Ringsmall","Cedillasmall","onequarter","onehalf","threequarters","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","zerosuperior","onesuperior","twos\
uperior","threesuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edie\
resissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissmall","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall"],qr=[".notdef","space","dollaroldstyle","dollarsuperior","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","comma","hyphen","period","fraction","zerooldstyle","oneo\
ldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","colon","semicolon","commasuperior","threequartersemdash","periodsuperior","asuperior","bsuperior","centsuperior","dsuperior","esuperior","isuperior","lsuperior","msuperior","nsuperior","osuperior","rsuperior","ssuperior","tsuperior","ff","fi","fl","ffi","ffl","parenleftinferior","parenrightinferior","hyphensuperior","colonmonetary","onefitted","rupiah","centoldstyle"\
,"figuredash","hypheninferior","onequarter","onehalf","threequarters","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","zerosuperior","onesuperior","twosuperior","threesuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior","fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","c\
ommainferior"],Hr=[".notdef","space","exclam","quotedbl","numbersign","dollar","percent","ampersand","quoteright","parenleft","parenright","asterisk","plus","comma","hyphen","period","slash","zero","one","two","three","four","five","six","seven","eight","nine","colon","semicolon","less","equal","greater","question","at","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","bracketleft","backslash","bracketright","asciicircum","underscore","quote\
left","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","braceleft","bar","braceright","asciitilde","exclamdown","cent","sterling","fraction","yen","florin","section","currency","quotesingle","quotedblleft","guillemotleft","guilsinglleft","guilsinglright","fi","fl","endash","dagger","daggerdbl","periodcentered","paragraph","bullet","quotesinglbase","quotedblbase","quotedblright","guillemotright","ellipsis","perthousand","questiondown","grave"\
,"acute","circumflex","tilde","macron","breve","dotaccent","dieresis","ring","cedilla","hungarumlaut","ogonek","caron","emdash","AE","ordfeminine","Lslash","Oslash","OE","ordmasculine","ae","dotlessi","lslash","oslash","oe","germandbls","onesuperior","logicalnot","mu","trademark","Eth","onehalf","plusminus","Thorn","onequarter","divide","brokenbar","degree","thorn","threequarters","twosuperior","registered","minus","eth","multiply","threesuperior","copyright","Aacute","Acircumflex","Adieresis","\
Agrave","Aring","Atilde","Ccedilla","Eacute","Ecircumflex","Edieresis","Egrave","Iacute","Icircumflex","Idieresis","Igrave","Ntilde","Oacute","Ocircumflex","Odieresis","Ograve","Otilde","Scaron","Uacute","Ucircumflex","Udieresis","Ugrave","Yacute","Ydieresis","Zcaron","aacute","acircumflex","adieresis","agrave","aring","atilde","ccedilla","eacute","ecircumflex","edieresis","egrave","iacute","icircumflex","idieresis","igrave","ntilde","oacute","ocircumflex","odieresis","ograve","otilde","scaron",\
"uacute","ucircumflex","udieresis","ugrave","yacute","ydieresis","zcaron","exclamsmall","Hungarumlautsmall","dollaroldstyle","dollarsuperior","ampersandsmall","Acutesmall","parenleftsuperior","parenrightsuperior","twodotenleader","onedotenleader","zerooldstyle","oneoldstyle","twooldstyle","threeoldstyle","fouroldstyle","fiveoldstyle","sixoldstyle","sevenoldstyle","eightoldstyle","nineoldstyle","commasuperior","threequartersemdash","periodsuperior","questionsmall","asuperior","bsuperior","centsup\
erior","dsuperior","esuperior","isuperior","lsuperior","msuperior","nsuperior","osuperior","rsuperior","ssuperior","tsuperior","ff","ffi","ffl","parenleftinferior","parenrightinferior","Circumflexsmall","hyphensuperior","Gravesmall","Asmall","Bsmall","Csmall","Dsmall","Esmall","Fsmall","Gsmall","Hsmall","Ismall","Jsmall","Ksmall","Lsmall","Msmall","Nsmall","Osmall","Psmall","Qsmall","Rsmall","Ssmall","Tsmall","Usmall","Vsmall","Wsmall","Xsmall","Ysmall","Zsmall","colonmonetary","onefitted","rupi\
ah","Tildesmall","exclamdownsmall","centoldstyle","Lslashsmall","Scaronsmall","Zcaronsmall","Dieresissmall","Brevesmall","Caronsmall","Dotaccentsmall","Macronsmall","figuredash","hypheninferior","Ogoneksmall","Ringsmall","Cedillasmall","questiondownsmall","oneeighth","threeeighths","fiveeighths","seveneighths","onethird","twothirds","zerosuperior","foursuperior","fivesuperior","sixsuperior","sevensuperior","eightsuperior","ninesuperior","zeroinferior","oneinferior","twoinferior","threeinferior",\
"fourinferior","fiveinferior","sixinferior","seveninferior","eightinferior","nineinferior","centinferior","dollarinferior","periodinferior","commainferior","Agravesmall","Aacutesmall","Acircumflexsmall","Atildesmall","Adieresissmall","Aringsmall","AEsmall","Ccedillasmall","Egravesmall","Eacutesmall","Ecircumflexsmall","Edieresissmall","Igravesmall","Iacutesmall","Icircumflexsmall","Idieresissmall","Ethsmall","Ntildesmall","Ogravesmall","Oacutesmall","Ocircumflexsmall","Otildesmall","Odieresissma\
ll","OEsmall","Oslashsmall","Ugravesmall","Uacutesmall","Ucircumflexsmall","Udieresissmall","Yacutesmall","Thornsmall","Ydieresissmall","001.000","001.001","001.002","001.003","Black","Bold","Book","Light","Medium","Regular","Roman","Semibold"],Wr=391,zr=[null,{id:"hstem",min:2,stackClearing:!0,stem:!0},null,{id:"vstem",min:2,stackClearing:!0,stem:!0},{id:"vmoveto",min:1,stackClearing:!0},{id:"rlineto",min:2,resetStack:!0},{id:"hlineto",min:1,resetStack:!0},{id:"vlineto",min:1,resetStack:!0},{id\
:"rrcurveto",min:6,resetStack:!0},null,{id:"callsubr",min:1,undefStack:!0},{id:"return",min:0,undefStack:!0},null,null,{id:"endchar",min:0,stackClearing:!0},null,null,null,{id:"hstemhm",min:2,stackClearing:!0,stem:!0},{id:"hintmask",min:0,stackClearing:!0},{id:"cntrmask",min:0,stackClearing:!0},{id:"rmoveto",min:2,stackClearing:!0},{id:"hmoveto",min:1,stackClearing:!0},{id:"vstemhm",min:2,stackClearing:!0,stem:!0},{id:"rcurveline",min:8,resetStack:!0},{id:"rlinecurve",min:8,resetStack:!0},{id:"v\
vcurveto",min:4,resetStack:!0},{id:"hhcurveto",min:4,resetStack:!0},null,{id:"callgsubr",min:1,undefStack:!0},{id:"vhcurveto",min:4,resetStack:!0},{id:"hvcurveto",min:4,resetStack:!0}],$r=[null,null,null,{id:"and",min:2,stackDelta:-1},{id:"or",min:2,stackDelta:-1},{id:"not",min:1,stackDelta:0},null,null,null,{id:"abs",min:1,stackDelta:0},{id:"add",min:2,stackDelta:-1,stackFn(e,t){e[t-2]=e[t-2]+e[t-1]}},{id:"sub",min:2,stackDelta:-1,stackFn(e,t){e[t-2]=e[t-2]-e[t-1]}},{id:"div",min:2,stackDelta:-\
1,stackFn(e,t){e[t-2]=e[t-2]/e[t-1]}},null,{id:"neg",min:1,stackDelta:0,stackFn(e,t){e[t-1]=-e[t-1]}},{id:"eq",min:2,stackDelta:-1},null,null,{id:"drop",min:1,stackDelta:-1},null,{id:"put",min:2,stackDelta:-2},{id:"get",min:1,stackDelta:0},{id:"ifelse",min:4,stackDelta:-3},{id:"random",min:0,stackDelta:1},{id:"mul",min:2,stackDelta:-1,stackFn(e,t){e[t-2]=e[t-2]*e[t-1]}},null,{id:"sqrt",min:1,stackDelta:0},{id:"dup",min:1,stackDelta:1},{id:"exch",min:2,stackDelta:0},{id:"index",min:2,stackDelta:0\
},{id:"roll",min:3,stackDelta:-2},null,null,null,{id:"hflex",min:7,resetStack:!0},{id:"flex",min:13,resetStack:!0},{id:"hflex1",min:9,resetStack:!0},{id:"flex1",min:11,resetStack:!0}];class CFFParser{constructor(e,t,a){this.bytes=e.getBytes();this.properties=t;this.seacAnalysisEnabled=!!a}parse(){const e=this.properties,t=new CFF;this.cff=t;const a=this.parseHeader(),r=this.parseIndex(a.endPos),i=this.parseIndex(r.endPos),n=this.parseIndex(i.endPos),s=this.parseIndex(n.endPos),o=this.parseDict(i\
.obj.get(0)),c=this.createDict(CFFTopDict,o,t.strings);t.header=a.obj;t.names=this.parseNameIndex(r.obj);t.strings=this.parseStringIndex(n.obj);t.topDict=c;t.globalSubrIndex=s.obj;this.parsePrivateDict(t.topDict);t.isCIDFont=c.hasName("ROS");const l=c.getByName("CharStrings"),h=this.parseIndex(l).obj,u=c.getByName("FontMatrix");u&&(e.fontMatrix=u);const d=c.getByName("FontBBox");if(d){e.ascent=Math.max(d[3],d[1]);e.descent=Math.min(d[1],d[3]);e.ascentScaled=!0}let f,g;if(t.isCIDFont){const e=thi\
s.parseIndex(c.getByName("FDArray")).obj;for(let a=0,r=e.count;a<r;++a){const r=e.get(a),i=this.createDict(CFFTopDict,this.parseDict(r),t.strings);this.parsePrivateDict(i);t.fdArray.push(i)}g=null;f=this.parseCharsets(c.getByName("charset"),h.count,t.strings,!0);t.fdSelect=this.parseFDSelect(c.getByName("FDSelect"),h.count)}else{f=this.parseCharsets(c.getByName("charset"),h.count,t.strings,!1);g=this.parseEncoding(c.getByName("Encoding"),e,t.strings,f.charset)}t.charset=f;t.encoding=g;const p=th\
is.parseCharStrings({charStrings:h,localSubrIndex:c.privateDict.subrsIndex,globalSubrIndex:s.obj,fdSelect:t.fdSelect,fdArray:t.fdArray,privateDict:c.privateDict});t.charStrings=p.charStrings;t.seacs=p.seacs;t.widths=p.widths;return t}parseHeader(){let e=this.bytes;const t=e.length;let a=0;for(;a<t&&1!==e[a];)++a;if(a>=t)throw new FormatError("Invalid CFF header");if(0!==a){info("cff data is shifted");e=e.subarray(a);this.bytes=e}const r=e[0],i=e[1],n=e[2],s=e[3];return{obj:new CFFHeader(r,i,n,s)\
,endPos:n}}parseDict(e){let t=0;function parseOperand(){let a=e[t++];if(30===a)return function parseFloatOperand(){let a="";const r=15,i=["0","1","2","3","4","5","6","7","8","9",".","E","E-",null,"-"],n=e.length;for(;t<n;){const n=e[t++],s=n>>4,o=15&n;if(s===r)break;a+=i[s];if(o===r)break;a+=i[o]}return parseFloat(a)}();if(28===a){a=readInt16(e,t);t+=2;return a}if(29===a){a=e[t++];a=a<<8|e[t++];a=a<<8|e[t++];a=a<<8|e[t++];return a}if(a>=32&&a<=246)return a-139;if(a>=247&&a<=250)return 256*(a-247\
)+e[t++]+108;if(a>=251&&a<=254)return-256*(a-251)-e[t++]-108;warn(\'CFFParser_parseDict: "\'+a+\'" is a reserved command.\');return NaN}let a=[];const r=[];t=0;const i=e.length;for(;t<i;){let i=e[t];if(i<=21){12===i&&(i=i<<8|e[++t]);r.push([i,a]);a=[];++t}else a.push(parseOperand())}return r}parseIndex(e){const t=new CFFIndex,a=this.bytes,r=a[e++]<<8|a[e++],i=[];let n,s,o=e;if(0!==r){const t=a[e++],c=e+(r+1)*t-1;for(n=0,s=r+1;n<s;++n){let r=0;for(let i=0;i<t;++i){r<<=8;r+=a[e++]}i.push(c+r)}o=i[r]}f\
or(n=0,s=i.length-1;n<s;++n){const e=i[n],r=i[n+1];t.add(a.subarray(e,r))}return{obj:t,endPos:o}}parseNameIndex(e){const t=[];for(let a=0,r=e.count;a<r;++a){const r=e.get(a);t.push(bytesToString(r))}return t}parseStringIndex(e){const t=new CFFStrings;for(let a=0,r=e.count;a<r;++a){const r=e.get(a);t.add(bytesToString(r))}return t}createDict(e,t,a){const r=new e(a);for(const[e,a]of t)r.setByKey(e,a);return r}parseCharString(e,t,a,r){if(!t||e.callDepth>10)return!1;let i=e.stackSize;const n=e.stack\
;let s=t.length;for(let o=0;o<s;){const c=t[o++];let l=null;if(12===c){const e=t[o++];if(0===e){t[o-2]=139;t[o-1]=22;i=0}else l=$r[e]}else if(28===c){n[i]=readInt16(t,o);o+=2;i++}else if(14===c){if(i>=4){i-=4;if(this.seacAnalysisEnabled){e.seac=n.slice(i,i+4);return!1}}l=zr[c]}else if(c>=32&&c<=246){n[i]=c-139;i++}else if(c>=247&&c<=254){n[i]=c<251?(c-247<<8)+t[o]+108:-(c-251<<8)-t[o]-108;o++;i++}else if(255===c){n[i]=(t[o]<<24|t[o+1]<<16|t[o+2]<<8|t[o+3])/65536;o+=4;i++}else if(19===c||20===c){\
e.hints+=i>>1;if(0===e.hints){t.copyWithin(o-1,o,-1);o-=1;s-=1;continue}o+=e.hints+7>>3;i%=2;l=zr[c]}else{if(10===c||29===c){const t=10===c?a:r;if(!t){l=zr[c];warn("Missing subrsIndex for "+l.id);return!1}let s=32768;t.count<1240?s=107:t.count<33900&&(s=1131);const o=n[--i]+s;if(o<0||o>=t.count||isNaN(o)){l=zr[c];warn("Out of bounds subrIndex for "+l.id);return!1}e.stackSize=i;e.callDepth++;if(!this.parseCharString(e,t.get(o),a,r))return!1;e.callDepth--;i=e.stackSize;continue}if(11===c){e.stackS\
ize=i;return!0}if(0===c&&o===t.length){t[o-1]=14;l=zr[14]}else{if(9===c){t.copyWithin(o-1,o,-1);o-=1;s-=1;continue}l=zr[c]}}if(l){if(l.stem){e.hints+=i>>1;if(3===c||23===c)e.hasVStems=!0;else if(e.hasVStems&&(1===c||18===c)){warn("CFF stem hints are in wrong order");t[o-1]=1===c?3:23}}if("min"in l&&!e.undefStack&&i<l.min){warn("Not enough parameters for "+l.id+"; actual: "+i+", expected: "+l.min);if(0===i){t[o-1]=14;return!0}return!1}if(e.firstStackClearing&&l.stackClearing){e.firstStackClearing\
=!1;i-=l.min;i>=2&&l.stem?i%=2:i>1&&warn("Found too many parameters for stack-clearing command");i>0&&(e.width=n[i-1])}if("stackDelta"in l){"stackFn"in l&&l.stackFn(n,i);i+=l.stackDelta}else if(l.stackClearing)i=0;else if(l.resetStack){i=0;e.undefStack=!1}else if(l.undefStack){i=0;e.undefStack=!0;e.firstStackClearing=!1}}}s<t.length&&t.fill(14,s);e.stackSize=i;return!0}parseCharStrings({charStrings:e,localSubrIndex:t,globalSubrIndex:a,fdSelect:r,fdArray:i,privateDict:n}){const s=[],o=[],c=e.coun\
t;for(let l=0;l<c;l++){const c=e.get(l),h={callDepth:0,stackSize:0,stack:[],undefStack:!0,hints:0,firstStackClearing:!0,seac:null,width:null,hasVStems:!1};let u=!0,d=null,f=n;if(r&&i.length){const e=r.getFDIndex(l);if(-1===e){warn("Glyph index is not in fd select.");u=!1}if(e>=i.length){warn("Invalid fd index for glyph index.");u=!1}if(u){f=i[e].privateDict;d=f.subrsIndex}}else t&&(d=t);u&&(u=this.parseCharString(h,c,d,a));if(null!==h.width){const e=f.getByName("nominalWidthX");o[l]=e+h.width}el\
se{const e=f.getByName("defaultWidthX");o[l]=e}null!==h.seac&&(s[l]=h.seac);u||e.set(l,new Uint8Array([14]))}return{charStrings:e,seacs:s,widths:o}}emptyPrivateDictionary(e){const t=this.createDict(CFFPrivateDict,[],e.strings);e.setByKey(18,[0,0]);e.privateDict=t}parsePrivateDict(e){if(!e.hasName("Private")){this.emptyPrivateDictionary(e);return}const t=e.getByName("Private");if(!Array.isArray(t)||2!==t.length){e.removeByName("Private");return}const a=t[0],r=t[1];if(0===a||r>=this.bytes.length){\
this.emptyPrivateDictionary(e);return}const i=r+a,n=this.bytes.subarray(r,i),s=this.parseDict(n),o=this.createDict(CFFPrivateDict,s,e.strings);e.privateDict=o;0===o.getByName("ExpansionFactor")&&o.setByName("ExpansionFactor",.06);if(!o.getByName("Subrs"))return;const c=o.getByName("Subrs"),l=r+c;if(0===c||l>=this.bytes.length){this.emptyPrivateDictionary(e);return}const h=this.parseIndex(l);o.subrsIndex=h.obj}parseCharsets(e,t,a,r){if(0===e)return new CFFCharset(!0,Kr.ISO_ADOBE,Ur);if(1===e)retu\
rn new CFFCharset(!0,Kr.EXPERT,Xr);if(2===e)return new CFFCharset(!0,Kr.EXPERT_SUBSET,qr);const i=this.bytes,n=e,s=i[e++],o=[r?0:".notdef"];let c,l,h;t-=1;switch(s){case 0:for(h=0;h<t;h++){c=i[e++]<<8|i[e++];o.push(r?c:a.get(c))}break;case 1:for(;o.length<=t;){c=i[e++]<<8|i[e++];l=i[e++];for(h=0;h<=l;h++)o.push(r?c++:a.get(c++))}break;case 2:for(;o.length<=t;){c=i[e++]<<8|i[e++];l=i[e++]<<8|i[e++];for(h=0;h<=l;h++)o.push(r?c++:a.get(c++))}break;default:throw new FormatError("Unknown charset form\
at")}const u=e,d=i.subarray(n,u);return new CFFCharset(!1,s,o,d)}parseEncoding(e,t,a,r){const i=Object.create(null),n=this.bytes;let s,o,c,l=!1,h=null;if(0===e||1===e){l=!0;s=e;const t=e?wr:Ar;for(o=0,c=r.length;o<c;o++){const e=t.indexOf(r[o]);-1!==e&&(i[e]=o)}}else{const t=e;s=n[e++];switch(127&s){case 0:const t=n[e++];for(o=1;o<=t;o++)i[n[e++]]=o;break;case 1:const a=n[e++];let r=1;for(o=0;o<a;o++){const t=n[e++],a=n[e++];for(let e=t;e<=t+a;e++)i[e]=r++}break;default:throw new FormatError(`Un\
known encoding format: ${s} in CFF`)}const c=e;if(128&s){n[t]&=127;!function readSupplement(){const t=n[e++];for(o=0;o<t;o++){const t=n[e++],s=(n[e++]<<8)+(255&n[e++]);i[t]=r.indexOf(a.get(s))}}()}h=n.subarray(t,c)}s&=127;return new CFFEncoding(l,s,i,h)}parseFDSelect(e,t){const a=this.bytes,r=a[e++],i=[];let n;switch(r){case 0:for(n=0;n<t;++n){const t=a[e++];i.push(t)}break;case 3:const s=a[e++]<<8|a[e++];for(n=0;n<s;++n){let t=a[e++]<<8|a[e++];if(0===n&&0!==t){warn("parseFDSelect: The first ran\
ge must have a first GID of 0 -- trying to recover.");t=0}const r=a[e++],s=a[e]<<8|a[e+1];for(let e=t;e<s;++e)i.push(r)}e+=2;break;default:throw new FormatError(`parseFDSelect: Unknown format "${r}".`)}if(i.length!==t)throw new FormatError("parseFDSelect: Invalid font data.");return new CFFFDSelect(r,i)}}class CFF{constructor(){this.header=null;this.names=[];this.topDict=null;this.strings=new CFFStrings;this.globalSubrIndex=null;this.encoding=null;this.charset=null;this.charStrings=null;this.fdA\
rray=[];this.fdSelect=null;this.isCIDFont=!1}duplicateFirstGlyph(){if(this.charStrings.count>=65535){warn("Not enough space in charstrings to duplicate first glyph.");return}const e=this.charStrings.get(0);this.charStrings.add(e);this.isCIDFont&&this.fdSelect.fdSelect.push(this.fdSelect.fdSelect[0])}hasGlyphId(e){if(e<0||e>=this.charStrings.count)return!1;return this.charStrings.get(e).length>0}}class CFFHeader{constructor(e,t,a,r){this.major=e;this.minor=t;this.hdrSize=a;this.offSize=r}}class C\
FFStrings{constructor(){this.strings=[]}get(e){return e>=0&&e<=390?Hr[e]:e-Wr<=this.strings.length?this.strings[e-Wr]:Hr[0]}getSID(e){let t=Hr.indexOf(e);if(-1!==t)return t;t=this.strings.indexOf(e);return-1!==t?t+Wr:-1}add(e){this.strings.push(e)}get count(){return this.strings.length}}class CFFIndex{constructor(){this.objects=[];this.length=0}add(e){this.length+=e.length;this.objects.push(e)}set(e,t){this.length+=t.length-this.objects[e].length;this.objects[e]=t}get(e){return this.objects[e]}g\
et count(){return this.objects.length}}class CFFDict{constructor(e,t){this.keyToNameMap=e.keyToNameMap;this.nameToKeyMap=e.nameToKeyMap;this.defaults=e.defaults;this.types=e.types;this.opcodes=e.opcodes;this.order=e.order;this.strings=t;this.values=Object.create(null)}setByKey(e,t){if(!(e in this.keyToNameMap))return!1;if(0===t.length)return!0;for(const a of t)if(isNaN(a)){warn(`Invalid CFFDict value: "${t}" for key "${e}".`);return!0}const a=this.types[e];"num"!==a&&"sid"!==a&&"offset"!==a||(t=\
t[0]);this.values[e]=t;return!0}setByName(e,t){if(!(e in this.nameToKeyMap))throw new FormatError(`Invalid dictionary name "${e}"`);this.values[this.nameToKeyMap[e]]=t}hasName(e){return this.nameToKeyMap[e]in this.values}getByName(e){if(!(e in this.nameToKeyMap))throw new FormatError(`Invalid dictionary name ${e}"`);const t=this.nameToKeyMap[e];return t in this.values?this.values[t]:this.defaults[t]}removeByName(e){delete this.values[this.nameToKeyMap[e]]}static createTables(e){const t={keyToNam\
eMap:{},nameToKeyMap:{},defaults:{},types:{},opcodes:{},order:[]};for(const a of e){const e=Array.isArray(a[0])?(a[0][0]<<8)+a[0][1]:a[0];t.keyToNameMap[e]=a[1];t.nameToKeyMap[a[1]]=e;t.types[e]=a[2];t.defaults[e]=a[3];t.opcodes[e]=Array.isArray(a[0])?a[0]:[a[0]];t.order.push(e)}return t}}const Gr=[[[12,30],"ROS",["sid","sid","num"],null],[[12,20],"SyntheticBase","num",null],[0,"version","sid",null],[1,"Notice","sid",null],[[12,0],"Copyright","sid",null],[2,"FullName","sid",null],[3,"FamilyName"\
,"sid",null],[4,"Weight","sid",null],[[12,1],"isFixedPitch","num",0],[[12,2],"ItalicAngle","num",0],[[12,3],"UnderlinePosition","num",-100],[[12,4],"UnderlineThickness","num",50],[[12,5],"PaintType","num",0],[[12,6],"CharstringType","num",2],[[12,7],"FontMatrix",["num","num","num","num","num","num"],[.001,0,0,.001,0,0]],[13,"UniqueID","num",null],[5,"FontBBox",["num","num","num","num"],[0,0,0,0]],[[12,8],"StrokeWidth","num",0],[14,"XUID","array",null],[15,"charset","offset",0],[16,"Encoding","of\
fset",0],[17,"CharStrings","offset",0],[18,"Private",["offset","offset"],null],[[12,21],"PostScript","sid",null],[[12,22],"BaseFontName","sid",null],[[12,23],"BaseFontBlend","delta",null],[[12,31],"CIDFontVersion","num",0],[[12,32],"CIDFontRevision","num",0],[[12,33],"CIDFontType","num",0],[[12,34],"CIDCount","num",8720],[[12,35],"UIDBase","num",null],[[12,37],"FDSelect","offset",null],[[12,36],"FDArray","offset",null],[[12,38],"FontName","sid",null]];class CFFTopDict extends CFFDict{static get \
tables(){return shadow(this,"tables",this.createTables(Gr))}constructor(e){super(CFFTopDict.tables,e);this.privateDict=null}}const Vr=[[6,"BlueValues","delta",null],[7,"OtherBlues","delta",null],[8,"FamilyBlues","delta",null],[9,"FamilyOtherBlues","delta",null],[[12,9],"BlueScale","num",.039625],[[12,10],"BlueShift","num",7],[[12,11],"BlueFuzz","num",1],[10,"StdHW","num",null],[11,"StdVW","num",null],[[12,12],"StemSnapH","delta",null],[[12,13],"StemSnapV","delta",null],[[12,14],"ForceBold","num"\
,0],[[12,17],"LanguageGroup","num",0],[[12,18],"ExpansionFactor","num",.06],[[12,19],"initialRandomSeed","num",0],[20,"defaultWidthX","num",0],[21,"nominalWidthX","num",0],[19,"Subrs","offset",null]];class CFFPrivateDict extends CFFDict{static get tables(){return shadow(this,"tables",this.createTables(Vr))}constructor(e){super(CFFPrivateDict.tables,e);this.subrsIndex=null}}const Kr={ISO_ADOBE:0,EXPERT:1,EXPERT_SUBSET:2};class CFFCharset{constructor(e,t,a,r){this.predefined=e;this.format=t;this.c\
harset=a;this.raw=r}}class CFFEncoding{constructor(e,t,a,r){this.predefined=e;this.format=t;this.encoding=a;this.raw=r}}class CFFFDSelect{constructor(e,t){this.format=e;this.fdSelect=t}getFDIndex(e){return e<0||e>=this.fdSelect.length?-1:this.fdSelect[e]}}class CFFOffsetTracker{constructor(){this.offsets=Object.create(null)}isTracking(e){return e in this.offsets}track(e,t){if(e in this.offsets)throw new FormatError(`Already tracking location of ${e}`);this.offsets[e]=t}offset(e){for(const t in t\
his.offsets)this.offsets[t]+=e}setEntryLocation(e,t,a){if(!(e in this.offsets))throw new FormatError(`Not tracking location of ${e}`);const r=a.data,i=this.offsets[e];for(let e=0,a=t.length;e<a;++e){const a=5*e+i,n=a+1,s=a+2,o=a+3,c=a+4;if(29!==r[a]||0!==r[n]||0!==r[s]||0!==r[o]||0!==r[c])throw new FormatError("writing to an offset that is not empty");const l=t[e];r[a]=29;r[n]=l>>24&255;r[s]=l>>16&255;r[o]=l>>8&255;r[c]=255&l}}}class CFFCompiler{constructor(e){this.cff=e}compile(){const e=this.c\
ff,t={data:[],length:0,add(e){try{this.data.push(...e)}catch{this.data=this.data.concat(e)}this.length=this.data.length}},a=this.compileHeader(e.header);t.add(a);const r=this.compileNameIndex(e.names);t.add(r);if(e.isCIDFont&&e.topDict.hasName("FontMatrix")){const t=e.topDict.getByName("FontMatrix");e.topDict.removeByName("FontMatrix");for(const a of e.fdArray){let e=t.slice(0);a.hasName("FontMatrix")&&(e=Util.transform(e,a.getByName("FontMatrix")));a.setByName("FontMatrix",e)}}const i=e.topDict\
.getByName("XUID");i?.length>16&&e.topDict.removeByName("XUID");e.topDict.setByName("charset",0);let n=this.compileTopDicts([e.topDict],t.length,e.isCIDFont);t.add(n.output);const s=n.trackers[0],o=this.compileStringIndex(e.strings.strings);t.add(o);const c=this.compileIndex(e.globalSubrIndex);t.add(c);if(e.encoding&&e.topDict.hasName("Encoding"))if(e.encoding.predefined)s.setEntryLocation("Encoding",[e.encoding.format],t);else{const a=this.compileEncoding(e.encoding);s.setEntryLocation("Encodin\
g",[t.length],t);t.add(a)}const l=this.compileCharset(e.charset,e.charStrings.count,e.strings,e.isCIDFont);s.setEntryLocation("charset",[t.length],t);t.add(l);const h=this.compileCharStrings(e.charStrings);s.setEntryLocation("CharStrings",[t.length],t);t.add(h);if(e.isCIDFont){s.setEntryLocation("FDSelect",[t.length],t);const a=this.compileFDSelect(e.fdSelect);t.add(a);n=this.compileTopDicts(e.fdArray,t.length,!0);s.setEntryLocation("FDArray",[t.length],t);t.add(n.output);const r=n.trackers;this\
.compilePrivateDicts(e.fdArray,r,t)}this.compilePrivateDicts([e.topDict],[s],t);t.add([0]);return t.data}encodeNumber(e){return Number.isInteger(e)?this.encodeInteger(e):this.encodeFloat(e)}static get EncodeFloatRegExp(){return shadow(this,"EncodeFloatRegExp",/\\.(\\d*?)(?:9{5,20}|0{5,20})\\d{0,2}(?:e(.+)|$)/)}encodeFloat(e){let t=e.toString();const a=CFFCompiler.EncodeFloatRegExp.exec(t);if(a){const r=parseFloat("1e"+((a[2]?+a[2]:0)+a[1].length));t=(Math.round(e*r)/r).toString()}let r,i,n="";for(r\
=0,i=t.length;r<i;++r){const e=t[r];n+="e"===e?"-"===t[++r]?"c":"b":"."===e?"a":"-"===e?"e":e}n+=1&n.length?"f":"ff";const s=[30];for(r=0,i=n.length;r<i;r+=2)s.push(parseInt(n.substring(r,r+2),16));return s}encodeInteger(e){let t;t=e>=-107&&e<=107?[e+139]:e>=108&&e<=1131?[247+((e-=108)>>8),255&e]:e>=-1131&&e<=-108?[251+((e=-e-108)>>8),255&e]:e>=-32768&&e<=32767?[28,e>>8&255,255&e]:[29,e>>24&255,e>>16&255,e>>8&255,255&e];return t}compileHeader(e){return[e.major,e.minor,4,e.offSize]}compileNameInd\
ex(e){const t=new CFFIndex;for(const a of e){const e=Math.min(a.length,127);let r=new Array(e);for(let t=0;t<e;t++){let e=a[t];(e<"!"||e>"~"||"["===e||"]"===e||"("===e||")"===e||"{"===e||"}"===e||"<"===e||">"===e||"/"===e||"%"===e)&&(e="_");r[t]=e}r=r.join("");""===r&&(r="Bad_Font_Name");t.add(stringToBytes(r))}return this.compileIndex(t)}compileTopDicts(e,t,a){const r=[];let i=new CFFIndex;for(const n of e){if(a){n.removeByName("CIDFontVersion");n.removeByName("CIDFontRevision");n.removeByName(\
"CIDFontType");n.removeByName("CIDCount");n.removeByName("UIDBase")}const e=new CFFOffsetTracker,s=this.compileDict(n,e);r.push(e);i.add(s);e.offset(t)}i=this.compileIndex(i,r);return{trackers:r,output:i}}compilePrivateDicts(e,t,a){for(let r=0,i=e.length;r<i;++r){const i=e[r],n=i.privateDict;if(!n||!i.hasName("Private"))throw new FormatError("There must be a private dictionary.");const s=new CFFOffsetTracker,o=this.compileDict(n,s);let c=a.length;s.offset(c);o.length||(c=0);t[r].setEntryLocation\
("Private",[o.length,c],a);a.add(o);if(n.subrsIndex&&n.hasName("Subrs")){const e=this.compileIndex(n.subrsIndex);s.setEntryLocation("Subrs",[o.length],a);a.add(e)}}}compileDict(e,t){const a=[];for(const r of e.order){if(!(r in e.values))continue;let i=e.values[r],n=e.types[r];Array.isArray(n)||(n=[n]);Array.isArray(i)||(i=[i]);if(0!==i.length){for(let s=0,o=n.length;s<o;++s){const o=n[s],c=i[s];switch(o){case"num":case"sid":a.push(...this.encodeNumber(c));break;case"offset":const n=e.keyToNameMa\
p[r];t.isTracking(n)||t.track(n,a.length);a.push(29,0,0,0,0);break;case"array":case"delta":a.push(...this.encodeNumber(c));for(let e=1,t=i.length;e<t;++e)a.push(...this.encodeNumber(i[e]));break;default:throw new FormatError(`Unknown data type of ${o}`)}}a.push(...e.opcodes[r])}}return a}compileStringIndex(e){const t=new CFFIndex;for(const a of e)t.add(stringToBytes(a));return this.compileIndex(t)}compileCharStrings(e){const t=new CFFIndex;for(let a=0;a<e.count;a++){const r=e.get(a);0!==r.length\
?t.add(r):t.add(new Uint8Array([139,14]))}return this.compileIndex(t)}compileCharset(e,t,a,r){let i;const n=t-1;if(r){const e=n-1;i=new Uint8Array([2,0,1,e>>8&255,255&e])}else{i=new Uint8Array(1+2*n);i[0]=0;let t=0;const r=e.charset.length;let s=!1;for(let n=1;n<i.length;n+=2){let o=0;if(t<r){const r=e.charset[t++];o=a.getSID(r);if(-1===o){o=0;if(!s){s=!0;warn(`Couldn\'t find ${r} in CFF strings`)}}}i[n]=o>>8&255;i[n+1]=255&o}}return this.compileTypedArray(i)}compileEncoding(e){return this.compil\
eTypedArray(e.raw)}compileFDSelect(e){const t=e.format;let a,r;switch(t){case 0:a=new Uint8Array(1+e.fdSelect.length);a[0]=t;for(r=0;r<e.fdSelect.length;r++)a[r+1]=e.fdSelect[r];break;case 3:const i=0;let n=e.fdSelect[0];const s=[t,0,0,i>>8&255,255&i,n];for(r=1;r<e.fdSelect.length;r++){const t=e.fdSelect[r];if(t!==n){s.push(r>>8&255,255&r,t);n=t}}const o=(s.length-3)/3;s[1]=o>>8&255;s[2]=255&o;s.push(r>>8&255,255&r);a=new Uint8Array(s)}return this.compileTypedArray(a)}compileTypedArray(e){return\
 Array.from(e)}compileIndex(e,t=[]){const a=e.objects,r=a.length;if(0===r)return[0,0];const i=[r>>8&255,255&r];let n,s,o=1;for(n=0;n<r;++n)o+=a[n].length;s=o<256?1:o<65536?2:o<16777216?3:4;i.push(s);let c=1;for(n=0;n<r+1;n++){1===s?i.push(255&c):2===s?i.push(c>>8&255,255&c):3===s?i.push(c>>16&255,c>>8&255,255&c):i.push(c>>>24&255,c>>16&255,c>>8&255,255&c);a[n]&&(c+=a[n].length)}for(n=0;n<r;n++){t[n]&&t[n].offset(i.length);i.push(...a[n])}return i}}const Jr=getLookupTableFactory((function(e){e["T\
imes-Roman"]="Times-Roman";e.Helvetica="Helvetica";e.Courier="Courier";e.Symbol="Symbol";e["Times-Bold"]="Times-Bold";e["Helvetica-Bold"]="Helvetica-Bold";e["Courier-Bold"]="Courier-Bold";e.ZapfDingbats="ZapfDingbats";e["Times-Italic"]="Times-Italic";e["Helvetica-Oblique"]="Helvetica-Oblique";e["Courier-Oblique"]="Courier-Oblique";e["Times-BoldItalic"]="Times-BoldItalic";e["Helvetica-BoldOblique"]="Helvetica-BoldOblique";e["Courier-BoldOblique"]="Courier-BoldOblique";e.ArialNarrow="Helvetica";e[\
"ArialNarrow-Bold"]="Helvetica-Bold";e["ArialNarrow-BoldItalic"]="Helvetica-BoldOblique";e["ArialNarrow-Italic"]="Helvetica-Oblique";e.ArialBlack="Helvetica";e["ArialBlack-Bold"]="Helvetica-Bold";e["ArialBlack-BoldItalic"]="Helvetica-BoldOblique";e["ArialBlack-Italic"]="Helvetica-Oblique";e["Arial-Black"]="Helvetica";e["Arial-Black-Bold"]="Helvetica-Bold";e["Arial-Black-BoldItalic"]="Helvetica-BoldOblique";e["Arial-Black-Italic"]="Helvetica-Oblique";e.Arial="Helvetica";e["Arial-Bold"]="Helvetica\
-Bold";e["Arial-BoldItalic"]="Helvetica-BoldOblique";e["Arial-Italic"]="Helvetica-Oblique";e.ArialMT="Helvetica";e["Arial-BoldItalicMT"]="Helvetica-BoldOblique";e["Arial-BoldMT"]="Helvetica-Bold";e["Arial-ItalicMT"]="Helvetica-Oblique";e["Arial-BoldItalicMT-BoldItalic"]="Helvetica-BoldOblique";e["Arial-BoldMT-Bold"]="Helvetica-Bold";e["Arial-ItalicMT-Italic"]="Helvetica-Oblique";e.ArialUnicodeMS="Helvetica";e["ArialUnicodeMS-Bold"]="Helvetica-Bold";e["ArialUnicodeMS-BoldItalic"]="Helvetica-BoldO\
blique";e["ArialUnicodeMS-Italic"]="Helvetica-Oblique";e["Courier-BoldItalic"]="Courier-BoldOblique";e["Courier-Italic"]="Courier-Oblique";e.CourierNew="Courier";e["CourierNew-Bold"]="Courier-Bold";e["CourierNew-BoldItalic"]="Courier-BoldOblique";e["CourierNew-Italic"]="Courier-Oblique";e["CourierNewPS-BoldItalicMT"]="Courier-BoldOblique";e["CourierNewPS-BoldMT"]="Courier-Bold";e["CourierNewPS-ItalicMT"]="Courier-Oblique";e.CourierNewPSMT="Courier";e["Helvetica-BoldItalic"]="Helvetica-BoldObliqu\
e";e["Helvetica-Italic"]="Helvetica-Oblique";e["HelveticaLTStd-Bold"]="Helvetica-Bold";e["Symbol-Bold"]="Symbol";e["Symbol-BoldItalic"]="Symbol";e["Symbol-Italic"]="Symbol";e.TimesNewRoman="Times-Roman";e["TimesNewRoman-Bold"]="Times-Bold";e["TimesNewRoman-BoldItalic"]="Times-BoldItalic";e["TimesNewRoman-Italic"]="Times-Italic";e.TimesNewRomanPS="Times-Roman";e["TimesNewRomanPS-Bold"]="Times-Bold";e["TimesNewRomanPS-BoldItalic"]="Times-BoldItalic";e["TimesNewRomanPS-BoldItalicMT"]="Times-BoldIta\
lic";e["TimesNewRomanPS-BoldMT"]="Times-Bold";e["TimesNewRomanPS-Italic"]="Times-Italic";e["TimesNewRomanPS-ItalicMT"]="Times-Italic";e.TimesNewRomanPSMT="Times-Roman";e["TimesNewRomanPSMT-Bold"]="Times-Bold";e["TimesNewRomanPSMT-BoldItalic"]="Times-BoldItalic";e["TimesNewRomanPSMT-Italic"]="Times-Italic"})),Yr=getLookupTableFactory((function(e){e.Courier="FoxitFixed.pfb";e["Courier-Bold"]="FoxitFixedBold.pfb";e["Courier-BoldOblique"]="FoxitFixedBoldItalic.pfb";e["Courier-Oblique"]="FoxitFixedIt\
alic.pfb";e.Helvetica="LiberationSans-Regular.ttf";e["Helvetica-Bold"]="LiberationSans-Bold.ttf";e["Helvetica-BoldOblique"]="LiberationSans-BoldItalic.ttf";e["Helvetica-Oblique"]="LiberationSans-Italic.ttf";e["Times-Roman"]="FoxitSerif.pfb";e["Times-Bold"]="FoxitSerifBold.pfb";e["Times-BoldItalic"]="FoxitSerifBoldItalic.pfb";e["Times-Italic"]="FoxitSerifItalic.pfb";e.Symbol="FoxitSymbol.pfb";e.ZapfDingbats="FoxitDingbats.pfb";e["LiberationSans-Regular"]="LiberationSans-Regular.ttf";e["Liberation\
Sans-Bold"]="LiberationSans-Bold.ttf";e["LiberationSans-Italic"]="LiberationSans-Italic.ttf";e["LiberationSans-BoldItalic"]="LiberationSans-BoldItalic.ttf"})),Zr=getLookupTableFactory((function(e){e.Calibri="Helvetica";e["Calibri-Bold"]="Helvetica-Bold";e["Calibri-BoldItalic"]="Helvetica-BoldOblique";e["Calibri-Italic"]="Helvetica-Oblique";e.CenturyGothic="Helvetica";e["CenturyGothic-Bold"]="Helvetica-Bold";e["CenturyGothic-BoldItalic"]="Helvetica-BoldOblique";e["CenturyGothic-Italic"]="Helvetic\
a-Oblique";e.ComicSansMS="Comic Sans MS";e["ComicSansMS-Bold"]="Comic Sans MS-Bold";e["ComicSansMS-BoldItalic"]="Comic Sans MS-BoldItalic";e["ComicSansMS-Italic"]="Comic Sans MS-Italic";e.GillSansMT="Helvetica";e["GillSansMT-Bold"]="Helvetica-Bold";e["GillSansMT-BoldItalic"]="Helvetica-BoldOblique";e["GillSansMT-Italic"]="Helvetica-Oblique";e.Impact="Helvetica";e["ItcSymbol-Bold"]="Helvetica-Bold";e["ItcSymbol-BoldItalic"]="Helvetica-BoldOblique";e["ItcSymbol-Book"]="Helvetica";e["ItcSymbol-Book\
Italic"]="Helvetica-Oblique";e["ItcSymbol-Medium"]="Helvetica";e["ItcSymbol-MediumItalic"]="Helvetica-Oblique";e.LucidaConsole="Courier";e["LucidaConsole-Bold"]="Courier-Bold";e["LucidaConsole-BoldItalic"]="Courier-BoldOblique";e["LucidaConsole-Italic"]="Courier-Oblique";e["LucidaSans-Demi"]="Helvetica-Bold";e["MS-Gothic"]="MS Gothic";e["MS-Gothic-Bold"]="MS Gothic-Bold";e["MS-Gothic-BoldItalic"]="MS Gothic-BoldItalic";e["MS-Gothic-Italic"]="MS Gothic-Italic";e["MS-Mincho"]="MS Mincho";e["MS-Min\
cho-Bold"]="MS Mincho-Bold";e["MS-Mincho-BoldItalic"]="MS Mincho-BoldItalic";e["MS-Mincho-Italic"]="MS Mincho-Italic";e["MS-PGothic"]="MS PGothic";e["MS-PGothic-Bold"]="MS PGothic-Bold";e["MS-PGothic-BoldItalic"]="MS PGothic-BoldItalic";e["MS-PGothic-Italic"]="MS PGothic-Italic";e["MS-PMincho"]="MS PMincho";e["MS-PMincho-Bold"]="MS PMincho-Bold";e["MS-PMincho-BoldItalic"]="MS PMincho-BoldItalic";e["MS-PMincho-Italic"]="MS PMincho-Italic";e.NuptialScript="Times-Italic";e.SegoeUISymbol="Helvetica"\
})),Qr=getLookupTableFactory((function(e){e["Adobe Jenson"]=!0;e["Adobe Text"]=!0;e.Albertus=!0;e.Aldus=!0;e.Alexandria=!0;e.Algerian=!0;e["American Typewriter"]=!0;e.Antiqua=!0;e.Apex=!0;e.Arno=!0;e.Aster=!0;e.Aurora=!0;e.Baskerville=!0;e.Bell=!0;e.Bembo=!0;e["Bembo Schoolbook"]=!0;e.Benguiat=!0;e["Berkeley Old Style"]=!0;e["Bernhard Modern"]=!0;e["Berthold City"]=!0;e.Bodoni=!0;e["Bauer Bodoni"]=!0;e["Book Antiqua"]=!0;e.Bookman=!0;e["Bordeaux Roman"]=!0;e["Californian FB"]=!0;e.Calisto=!0;e.C\
alvert=!0;e.Capitals=!0;e.Cambria=!0;e.Cartier=!0;e.Caslon=!0;e.Catull=!0;e.Centaur=!0;e["Century Old Style"]=!0;e["Century Schoolbook"]=!0;e.Chaparral=!0;e["Charis SIL"]=!0;e.Cheltenham=!0;e["Cholla Slab"]=!0;e.Clarendon=!0;e.Clearface=!0;e.Cochin=!0;e.Colonna=!0;e["Computer Modern"]=!0;e["Concrete Roman"]=!0;e.Constantia=!0;e["Cooper Black"]=!0;e.Corona=!0;e.Ecotype=!0;e.Egyptienne=!0;e.Elephant=!0;e.Excelsior=!0;e.Fairfield=!0;e["FF Scala"]=!0;e.Folkard=!0;e.Footlight=!0;e.FreeSerif=!0;e["Fri\
z Quadrata"]=!0;e.Garamond=!0;e.Gentium=!0;e.Georgia=!0;e.Gloucester=!0;e["Goudy Old Style"]=!0;e["Goudy Schoolbook"]=!0;e["Goudy Pro Font"]=!0;e.Granjon=!0;e["Guardian Egyptian"]=!0;e.Heather=!0;e.Hercules=!0;e["High Tower Text"]=!0;e.Hiroshige=!0;e["Hoefler Text"]=!0;e["Humana Serif"]=!0;e.Imprint=!0;e["Ionic No. 5"]=!0;e.Janson=!0;e.Joanna=!0;e.Korinna=!0;e.Lexicon=!0;e.LiberationSerif=!0;e["Liberation Serif"]=!0;e["Linux Libertine"]=!0;e.Literaturnaya=!0;e.Lucida=!0;e["Lucida Bright"]=!0;e.M\
elior=!0;e.Memphis=!0;e.Miller=!0;e.Minion=!0;e.Modern=!0;e["Mona Lisa"]=!0;e["Mrs Eaves"]=!0;e["MS Serif"]=!0;e["Museo Slab"]=!0;e["New York"]=!0;e["Nimbus Roman"]=!0;e["NPS Rawlinson Roadway"]=!0;e.NuptialScript=!0;e.Palatino=!0;e.Perpetua=!0;e.Plantin=!0;e["Plantin Schoolbook"]=!0;e.Playbill=!0;e["Poor Richard"]=!0;e["Rawlinson Roadway"]=!0;e.Renault=!0;e.Requiem=!0;e.Rockwell=!0;e.Roman=!0;e["Rotis Serif"]=!0;e.Sabon=!0;e.Scala=!0;e.Seagull=!0;e.Sistina=!0;e.Souvenir=!0;e.STIX=!0;e["Stone In\
formal"]=!0;e["Stone Serif"]=!0;e.Sylfaen=!0;e.Times=!0;e.Trajan=!0;e["Trinité"]=!0;e["Trump Mediaeval"]=!0;e.Utopia=!0;e["Vale Type"]=!0;e["Bitstream Vera"]=!0;e["Vera Serif"]=!0;e.Versailles=!0;e.Wanted=!0;e.Weiss=!0;e["Wide Latin"]=!0;e.Windsor=!0;e.XITS=!0})),ei=getLookupTableFactory((function(e){e.Dingbats=!0;e.Symbol=!0;e.ZapfDingbats=!0;e.Wingdings=!0;e["Wingdings-Bold"]=!0;e["Wingdings-Regular"]=!0})),ti=getLookupTableFactory((function(e){e[2]=10;e[3]=32;e[4]=33;e[5]=34;e[6]=35;e[7]=36;e\
[8]=37;e[9]=38;e[10]=39;e[11]=40;e[12]=41;e[13]=42;e[14]=43;e[15]=44;e[16]=45;e[17]=46;e[18]=47;e[19]=48;e[20]=49;e[21]=50;e[22]=51;e[23]=52;e[24]=53;e[25]=54;e[26]=55;e[27]=56;e[28]=57;e[29]=58;e[30]=894;e[31]=60;e[32]=61;e[33]=62;e[34]=63;e[35]=64;e[36]=65;e[37]=66;e[38]=67;e[39]=68;e[40]=69;e[41]=70;e[42]=71;e[43]=72;e[44]=73;e[45]=74;e[46]=75;e[47]=76;e[48]=77;e[49]=78;e[50]=79;e[51]=80;e[52]=81;e[53]=82;e[54]=83;e[55]=84;e[56]=85;e[57]=86;e[58]=87;e[59]=88;e[60]=89;e[61]=90;e[62]=91;e[63]=9\
2;e[64]=93;e[65]=94;e[66]=95;e[67]=96;e[68]=97;e[69]=98;e[70]=99;e[71]=100;e[72]=101;e[73]=102;e[74]=103;e[75]=104;e[76]=105;e[77]=106;e[78]=107;e[79]=108;e[80]=109;e[81]=110;e[82]=111;e[83]=112;e[84]=113;e[85]=114;e[86]=115;e[87]=116;e[88]=117;e[89]=118;e[90]=119;e[91]=120;e[92]=121;e[93]=122;e[94]=123;e[95]=124;e[96]=125;e[97]=126;e[98]=196;e[99]=197;e[100]=199;e[101]=201;e[102]=209;e[103]=214;e[104]=220;e[105]=225;e[106]=224;e[107]=226;e[108]=228;e[109]=227;e[110]=229;e[111]=231;e[112]=233;e[\
113]=232;e[114]=234;e[115]=235;e[116]=237;e[117]=236;e[118]=238;e[119]=239;e[120]=241;e[121]=243;e[122]=242;e[123]=244;e[124]=246;e[125]=245;e[126]=250;e[127]=249;e[128]=251;e[129]=252;e[130]=8224;e[131]=176;e[132]=162;e[133]=163;e[134]=167;e[135]=8226;e[136]=182;e[137]=223;e[138]=174;e[139]=169;e[140]=8482;e[141]=180;e[142]=168;e[143]=8800;e[144]=198;e[145]=216;e[146]=8734;e[147]=177;e[148]=8804;e[149]=8805;e[150]=165;e[151]=181;e[152]=8706;e[153]=8721;e[154]=8719;e[156]=8747;e[157]=170;e[158]=\
186;e[159]=8486;e[160]=230;e[161]=248;e[162]=191;e[163]=161;e[164]=172;e[165]=8730;e[166]=402;e[167]=8776;e[168]=8710;e[169]=171;e[170]=187;e[171]=8230;e[179]=8220;e[180]=8221;e[181]=8216;e[182]=8217;e[200]=193;e[203]=205;e[207]=211;e[210]=218;e[223]=711;e[224]=321;e[225]=322;e[226]=352;e[227]=353;e[228]=381;e[229]=382;e[233]=221;e[234]=253;e[252]=263;e[253]=268;e[254]=269;e[258]=258;e[260]=260;e[261]=261;e[265]=280;e[266]=281;e[267]=282;e[268]=283;e[269]=313;e[275]=323;e[276]=324;e[278]=328;e[2\
83]=344;e[284]=345;e[285]=346;e[286]=347;e[292]=367;e[295]=377;e[296]=378;e[298]=380;e[305]=963;e[306]=964;e[307]=966;e[308]=8215;e[309]=8252;e[310]=8319;e[311]=8359;e[312]=8592;e[313]=8593;e[337]=9552;e[493]=1039;e[494]=1040;e[570]=1040;e[571]=1041;e[572]=1042;e[573]=1043;e[574]=1044;e[575]=1045;e[576]=1046;e[577]=1047;e[578]=1048;e[579]=1049;e[580]=1050;e[581]=1051;e[582]=1052;e[583]=1053;e[584]=1054;e[585]=1055;e[586]=1056;e[587]=1057;e[588]=1058;e[589]=1059;e[590]=1060;e[591]=1061;e[592]=106\
2;e[593]=1063;e[594]=1064;e[595]=1065;e[596]=1066;e[597]=1067;e[598]=1068;e[599]=1069;e[600]=1070;e[672]=1488;e[673]=1489;e[674]=1490;e[675]=1491;e[676]=1492;e[677]=1493;e[678]=1494;e[679]=1495;e[680]=1496;e[681]=1497;e[682]=1498;e[683]=1499;e[684]=1500;e[685]=1501;e[686]=1502;e[687]=1503;e[688]=1504;e[689]=1505;e[690]=1506;e[691]=1507;e[692]=1508;e[693]=1509;e[694]=1510;e[695]=1511;e[696]=1512;e[697]=1513;e[698]=1514;e[705]=1524;e[706]=8362;e[710]=64288;e[711]=64298;e[759]=1617;e[761]=1776;e[76\
3]=1778;e[775]=1652;e[777]=1764;e[778]=1780;e[779]=1781;e[780]=1782;e[782]=771;e[783]=64726;e[786]=8363;e[788]=8532;e[790]=768;e[791]=769;e[792]=768;e[795]=803;e[797]=64336;e[798]=64337;e[799]=64342;e[800]=64343;e[801]=64344;e[802]=64345;e[803]=64362;e[804]=64363;e[805]=64364;e[2424]=7821;e[2425]=7822;e[2426]=7823;e[2427]=7824;e[2428]=7825;e[2429]=7826;e[2430]=7827;e[2433]=7682;e[2678]=8045;e[2679]=8046;e[2830]=1552;e[2838]=686;e[2840]=751;e[2842]=753;e[2843]=754;e[2844]=755;e[2846]=757;e[2856]=\
767;e[2857]=848;e[2858]=849;e[2862]=853;e[2863]=854;e[2864]=855;e[2865]=861;e[2866]=862;e[2906]=7460;e[2908]=7462;e[2909]=7463;e[2910]=7464;e[2912]=7466;e[2913]=7467;e[2914]=7468;e[2916]=7470;e[2917]=7471;e[2918]=7472;e[2920]=7474;e[2921]=7475;e[2922]=7476;e[2924]=7478;e[2925]=7479;e[2926]=7480;e[2928]=7482;e[2929]=7483;e[2930]=7484;e[2932]=7486;e[2933]=7487;e[2934]=7488;e[2936]=7490;e[2937]=7491;e[2938]=7492;e[2940]=7494;e[2941]=7495;e[2942]=7496;e[2944]=7498;e[2946]=7500;e[2948]=7502;e[2950]=7\
504;e[2951]=7505;e[2952]=7506;e[2954]=7508;e[2955]=7509;e[2956]=7510;e[2958]=7512;e[2959]=7513;e[2960]=7514;e[2962]=7516;e[2963]=7517;e[2964]=7518;e[2966]=7520;e[2967]=7521;e[2968]=7522;e[2970]=7524;e[2971]=7525;e[2972]=7526;e[2974]=7528;e[2975]=7529;e[2976]=7530;e[2978]=1537;e[2979]=1538;e[2980]=1539;e[2982]=1549;e[2983]=1551;e[2984]=1552;e[2986]=1554;e[2987]=1555;e[2988]=1556;e[2990]=1623;e[2991]=1624;e[2995]=1775;e[2999]=1791;e[3002]=64290;e[3003]=64291;e[3004]=64292;e[3006]=64294;e[3007]=642\
95;e[3008]=64296;e[3011]=1900;e[3014]=8223;e[3015]=8244;e[3017]=7532;e[3018]=7533;e[3019]=7534;e[3075]=7590;e[3076]=7591;e[3079]=7594;e[3080]=7595;e[3083]=7598;e[3084]=7599;e[3087]=7602;e[3088]=7603;e[3091]=7606;e[3092]=7607;e[3095]=7610;e[3096]=7611;e[3099]=7614;e[3100]=7615;e[3103]=7618;e[3104]=7619;e[3107]=8337;e[3108]=8338;e[3116]=1884;e[3119]=1885;e[3120]=1885;e[3123]=1886;e[3124]=1886;e[3127]=1887;e[3128]=1887;e[3131]=1888;e[3132]=1888;e[3135]=1889;e[3136]=1889;e[3139]=1890;e[3140]=1890;e[\
3143]=1891;e[3144]=1891;e[3147]=1892;e[3148]=1892;e[3153]=580;e[3154]=581;e[3157]=584;e[3158]=585;e[3161]=588;e[3162]=589;e[3165]=891;e[3166]=892;e[3169]=1274;e[3170]=1275;e[3173]=1278;e[3174]=1279;e[3181]=7622;e[3182]=7623;e[3282]=11799;e[3316]=578;e[3379]=42785;e[3393]=1159;e[3416]=8377})),ai=getLookupTableFactory((function(e){e[227]=322;e[264]=261;e[291]=346})),ri=getLookupTableFactory((function(e){e[1]=32;e[4]=65;e[5]=192;e[6]=193;e[9]=196;e[17]=66;e[18]=67;e[21]=268;e[24]=68;e[28]=69;e[29]=\
200;e[30]=201;e[32]=282;e[38]=70;e[39]=71;e[44]=72;e[47]=73;e[48]=204;e[49]=205;e[58]=74;e[60]=75;e[62]=76;e[68]=77;e[69]=78;e[75]=79;e[76]=210;e[80]=214;e[87]=80;e[89]=81;e[90]=82;e[92]=344;e[94]=83;e[97]=352;e[100]=84;e[104]=85;e[109]=220;e[115]=86;e[116]=87;e[121]=88;e[122]=89;e[124]=221;e[127]=90;e[129]=381;e[258]=97;e[259]=224;e[260]=225;e[263]=228;e[268]=261;e[271]=98;e[272]=99;e[273]=263;e[275]=269;e[282]=100;e[286]=101;e[287]=232;e[288]=233;e[290]=283;e[295]=281;e[296]=102;e[336]=103;e[3\
46]=104;e[349]=105;e[350]=236;e[351]=237;e[361]=106;e[364]=107;e[367]=108;e[371]=322;e[373]=109;e[374]=110;e[381]=111;e[382]=242;e[383]=243;e[386]=246;e[393]=112;e[395]=113;e[396]=114;e[398]=345;e[400]=115;e[401]=347;e[403]=353;e[410]=116;e[437]=117;e[442]=252;e[448]=118;e[449]=119;e[454]=120;e[455]=121;e[457]=253;e[460]=122;e[462]=382;e[463]=380;e[853]=44;e[855]=58;e[856]=46;e[876]=47;e[878]=45;e[882]=45;e[894]=40;e[895]=41;e[896]=91;e[897]=93;e[923]=64;e[940]=163;e[1004]=48;e[1005]=49;e[1006]=\
50;e[1007]=51;e[1008]=52;e[1009]=53;e[1010]=54;e[1011]=55;e[1012]=56;e[1013]=57;e[1081]=37;e[1085]=43;e[1086]=45}));function getStandardFontName(e){const t=normalizeFontName(e);return Jr()[t]}function isKnownFontName(e){const t=normalizeFontName(e);return!!(Jr()[t]||Zr()[t]||Qr()[t]||ei()[t])}class ToUnicodeMap{constructor(e=[]){this._map=e}get length(){return this._map.length}forEach(e){for(const t in this._map)e(t,this._map[t].codePointAt(0))}has(e){return void 0!==this._map[e]}get(e){return t\
his._map[e]}charCodeOf(e){const t=this._map;if(t.length<=65536)return t.indexOf(e);for(const a in t)if(t[a]===e)return 0|a;return-1}amend(e){for(const t in e)this._map[t]=e[t]}}class IdentityToUnicodeMap{constructor(e,t){this.firstChar=e;this.lastChar=t}get length(){return this.lastChar+1-this.firstChar}forEach(e){for(let t=this.firstChar,a=this.lastChar;t<=a;t++)e(t,t)}has(e){return this.firstChar<=e&&e<=this.lastChar}get(e){if(this.firstChar<=e&&e<=this.lastChar)return String.fromCharCode(e)}c\
harCodeOf(e){return Number.isInteger(e)&&e>=this.firstChar&&e<=this.lastChar?e:-1}amend(e){unreachable("Should not call amend()")}}class CFFFont{constructor(e,t){this.properties=t;const a=new CFFParser(e,t,Rr);this.cff=a.parse();this.cff.duplicateFirstGlyph();const r=new CFFCompiler(this.cff);this.seacs=this.cff.seacs;try{this.data=r.compile()}catch{warn("Failed to compile font "+t.loadedName);this.data=e}this._createBuiltInEncoding()}get numGlyphs(){return this.cff.charStrings.count}getCharset(\
){return this.cff.charset.charset}getGlyphMapping(){const e=this.cff,t=this.properties,{cidToGidMap:a,cMap:r}=t,i=e.charset.charset;let n,s;if(t.composite){let t,o;if(a?.length>0){t=Object.create(null);for(let e=0,r=a.length;e<r;e++){const r=a[e];void 0!==r&&(t[r]=e)}}n=Object.create(null);if(e.isCIDFont)for(s=0;s<i.length;s++){const e=i[s];o=r.charCodeOf(e);void 0!==t?.[o]&&(o=t[o]);n[o]=s}else for(s=0;s<e.charStrings.count;s++){o=r.charCodeOf(s);n[o]=s}return n}let o=e.encoding?e.encoding.enco\
ding:null;t.isInternalFont&&(o=t.defaultEncoding);n=type1FontGlyphMapping(t,o,i);return n}hasGlyphId(e){return this.cff.hasGlyphId(e)}_createBuiltInEncoding(){const{charset:e,encoding:t}=this.cff;if(!e||!t)return;const a=e.charset,r=t.encoding,i=[];for(const e in r){const t=r[e];if(t>=0){const r=a[t];r&&(i[e]=r)}}i.length>0&&(this.properties.builtInEncoding=i)}}function getFloat214(e,t){return readInt16(e,t)/16384}function getSubroutineBias(e){const t=e.length;let a=32768;t<1240?a=107:t<33900&&(\
a=1131);return a}function parseCmap(e,t,a){const r=1===readUint16(e,t+2)?readUint32(e,t+8):readUint32(e,t+16),i=readUint16(e,t+r);let n,s,o;if(4===i){readUint16(e,t+r+2);const a=readUint16(e,t+r+6)>>1;s=t+r+14;n=[];for(o=0;o<a;o++,s+=2)n[o]={end:readUint16(e,s)};s+=2;for(o=0;o<a;o++,s+=2)n[o].start=readUint16(e,s);for(o=0;o<a;o++,s+=2)n[o].idDelta=readUint16(e,s);for(o=0;o<a;o++,s+=2){let t=readUint16(e,s);if(0!==t){n[o].ids=[];for(let a=0,r=n[o].end-n[o].start+1;a<r;a++){n[o].ids[a]=readUint16(\
e,s+t);t+=2}}}return n}if(12===i){const a=readUint32(e,t+r+12);s=t+r+16;n=[];for(o=0;o<a;o++){t=readUint32(e,s);n.push({start:t,end:readUint32(e,s+4),idDelta:readUint32(e,s+8)-t});s+=12}return n}throw new FormatError(`unsupported cmap: ${i}`)}function parseCff(e,t,a,r){const i=new CFFParser(new Stream(e,t,a-t),{},r).parse();return{glyphs:i.charStrings.objects,subrs:i.topDict.privateDict?.subrsIndex?.objects,gsubrs:i.globalSubrIndex?.objects,isCFFCIDFont:i.isCIDFont,fdSelect:i.fdSelect,fdArray:i.\
fdArray}}function lookupCmap(e,t){const a=t.codePointAt(0);let r=0,i=0,n=e.length-1;for(;i<n;){const t=i+n+1>>1;a<e[t].start?n=t-1:i=t}e[i].start<=a&&a<=e[i].end&&(r=e[i].idDelta+(e[i].ids?e[i].ids[a-e[i].start]:a)&65535);return{charCode:a,glyphId:r}}function compileGlyf(e,t,a){function moveTo(e,a){s&&t.add("L",s);s=[e,a];t.add("M",[e,a])}function lineTo(e,a){t.add("L",[e,a])}function quadraticCurveTo(e,a,r,i){t.add("Q",[e,a,r,i])}let r=0;const i=readInt16(e,r);let n,s=null,o=0,c=0;r+=10;if(i<0)\
do{n=readUint16(e,r);const i=readUint16(e,r+2);r+=4;let s,l;if(1&n){if(2&n){s=readInt16(e,r);l=readInt16(e,r+2)}else{s=readUint16(e,r);l=readUint16(e,r+2)}r+=4}else if(2&n){s=readInt8(e,r++);l=readInt8(e,r++)}else{s=e[r++];l=e[r++]}if(2&n){o=s;c=l}else{o=0;c=0}let h=1,u=1,d=0,f=0;if(8&n){h=u=getFloat214(e,r);r+=2}else if(64&n){h=getFloat214(e,r);u=getFloat214(e,r+2);r+=4}else if(128&n){h=getFloat214(e,r);d=getFloat214(e,r+2);f=getFloat214(e,r+4);u=getFloat214(e,r+6);r+=8}const g=a.glyphs[i];if(g\
){t.save();t.transform([h,d,f,u,o,c]);compileGlyf(g,t,a);t.restore()}}while(32&n);else{const t=[];let a,s;for(a=0;a<i;a++){t.push(readUint16(e,r));r+=2}r+=2+readUint16(e,r);const l=t.at(-1)+1,h=[];for(;h.length<l;){n=e[r++];let t=1;8&n&&(t+=e[r++]);for(;t-- >0;)h.push({flags:n})}for(a=0;a<l;a++){switch(18&h[a].flags){case 0:o+=readInt16(e,r);r+=2;break;case 2:o-=e[r++];break;case 18:o+=e[r++]}h[a].x=o}for(a=0;a<l;a++){switch(36&h[a].flags){case 0:c+=readInt16(e,r);r+=2;break;case 4:c-=e[r++];bre\
ak;case 36:c+=e[r++]}h[a].y=c}let u=0;for(r=0;r<i;r++){const e=t[r],i=h.slice(u,e+1);if(1&i[0].flags)i.push(i[0]);else if(1&i.at(-1).flags)i.unshift(i.at(-1));else{const e={flags:1,x:(i[0].x+i.at(-1).x)/2,y:(i[0].y+i.at(-1).y)/2};i.unshift(e);i.push(e)}moveTo(i[0].x,i[0].y);for(a=1,s=i.length;a<s;a++)if(1&i[a].flags)lineTo(i[a].x,i[a].y);else if(1&i[a+1].flags){quadraticCurveTo(i[a].x,i[a].y,i[a+1].x,i[a+1].y);a++}else quadraticCurveTo(i[a].x,i[a].y,(i[a].x+i[a+1].x)/2,(i[a].y+i[a+1].y)/2);u=e+1\
}}}function compileCharString(e,t,a,r){function moveTo(e,a){c&&t.add("L",c);c=[e,a];t.add("M",[e,a])}function lineTo(e,a){t.add("L",[e,a])}function bezierCurveTo(e,a,r,i,n,s){t.add("C",[e,a,r,i,n,s])}const i=[];let n=0,s=0,o=0,c=null;!function parse(e){let c=0;for(;c<e.length;){let l,h,u,d,f,g,p,m,b,y=!1,w=e[c++];switch(w){case 1:case 3:case 18:case 23:o+=i.length>>1;y=!0;break;case 4:s+=i.pop();moveTo(n,s);y=!0;break;case 5:for(;i.length>0;){n+=i.shift();s+=i.shift();lineTo(n,s)}break;case 6:fo\
r(;i.length>0;){n+=i.shift();lineTo(n,s);if(0===i.length)break;s+=i.shift();lineTo(n,s)}break;case 7:for(;i.length>0;){s+=i.shift();lineTo(n,s);if(0===i.length)break;n+=i.shift();lineTo(n,s)}break;case 8:for(;i.length>0;){l=n+i.shift();u=s+i.shift();h=l+i.shift();d=u+i.shift();n=h+i.shift();s=d+i.shift();bezierCurveTo(l,u,h,d,n,s)}break;case 10:m=i.pop();b=null;if(a.isCFFCIDFont){const e=a.fdSelect.getFDIndex(r);if(e>=0&&e<a.fdArray.length){const t=a.fdArray[e];let r;t.privateDict?.subrsIndex&&(\
r=t.privateDict.subrsIndex.objects);if(r){m+=getSubroutineBias(r);b=r[m]}}else warn("Invalid fd index for glyph index.")}else b=a.subrs[m+a.subrsBias];b&&parse(b);break;case 11:return;case 12:w=e[c++];switch(w){case 34:l=n+i.shift();h=l+i.shift();f=s+i.shift();n=h+i.shift();bezierCurveTo(l,s,h,f,n,f);l=n+i.shift();h=l+i.shift();n=h+i.shift();bezierCurveTo(l,f,h,s,n,s);break;case 35:l=n+i.shift();u=s+i.shift();h=l+i.shift();d=u+i.shift();n=h+i.shift();s=d+i.shift();bezierCurveTo(l,u,h,d,n,s);l=n+\
i.shift();u=s+i.shift();h=l+i.shift();d=u+i.shift();n=h+i.shift();s=d+i.shift();bezierCurveTo(l,u,h,d,n,s);i.pop();break;case 36:l=n+i.shift();f=s+i.shift();h=l+i.shift();g=f+i.shift();n=h+i.shift();bezierCurveTo(l,f,h,g,n,g);l=n+i.shift();h=l+i.shift();p=g+i.shift();n=h+i.shift();bezierCurveTo(l,g,h,p,n,s);break;case 37:const e=n,t=s;l=n+i.shift();u=s+i.shift();h=l+i.shift();d=u+i.shift();n=h+i.shift();s=d+i.shift();bezierCurveTo(l,u,h,d,n,s);l=n+i.shift();u=s+i.shift();h=l+i.shift();d=u+i.shif\
t();n=h;s=d;Math.abs(n-e)>Math.abs(s-t)?n+=i.shift():s+=i.shift();bezierCurveTo(l,u,h,d,n,s);break;default:throw new FormatError(`unknown operator: 12 ${w}`)}break;case 14:if(i.length>=4){const e=i.pop(),r=i.pop();s=i.pop();n=i.pop();t.save();t.translate(n,s);let o=lookupCmap(a.cmap,String.fromCharCode(a.glyphNameMap[Ar[e]]));compileCharString(a.glyphs[o.glyphId],t,a,o.glyphId);t.restore();o=lookupCmap(a.cmap,String.fromCharCode(a.glyphNameMap[Ar[r]]));compileCharString(a.glyphs[o.glyphId],t,a,o\
.glyphId)}return;case 19:case 20:o+=i.length>>1;c+=o+7>>3;y=!0;break;case 21:s+=i.pop();n+=i.pop();moveTo(n,s);y=!0;break;case 22:n+=i.pop();moveTo(n,s);y=!0;break;case 24:for(;i.length>2;){l=n+i.shift();u=s+i.shift();h=l+i.shift();d=u+i.shift();n=h+i.shift();s=d+i.shift();bezierCurveTo(l,u,h,d,n,s)}n+=i.shift();s+=i.shift();lineTo(n,s);break;case 25:for(;i.length>6;){n+=i.shift();s+=i.shift();lineTo(n,s)}l=n+i.shift();u=s+i.shift();h=l+i.shift();d=u+i.shift();n=h+i.shift();s=d+i.shift();bezierC\
urveTo(l,u,h,d,n,s);break;case 26:i.length%2&&(n+=i.shift());for(;i.length>0;){l=n;u=s+i.shift();h=l+i.shift();d=u+i.shift();n=h;s=d+i.shift();bezierCurveTo(l,u,h,d,n,s)}break;case 27:i.length%2&&(s+=i.shift());for(;i.length>0;){l=n+i.shift();u=s;h=l+i.shift();d=u+i.shift();n=h+i.shift();s=d;bezierCurveTo(l,u,h,d,n,s)}break;case 28:i.push(readInt16(e,c));c+=2;break;case 29:m=i.pop()+a.gsubrsBias;b=a.gsubrs[m];b&&parse(b);break;case 30:for(;i.length>0;){l=n;u=s+i.shift();h=l+i.shift();d=u+i.shift\
();n=h+i.shift();s=d+(1===i.length?i.shift():0);bezierCurveTo(l,u,h,d,n,s);if(0===i.length)break;l=n+i.shift();u=s;h=l+i.shift();d=u+i.shift();s=d+i.shift();n=h+(1===i.length?i.shift():0);bezierCurveTo(l,u,h,d,n,s)}break;case 31:for(;i.length>0;){l=n+i.shift();u=s;h=l+i.shift();d=u+i.shift();s=d+i.shift();n=h+(1===i.length?i.shift():0);bezierCurveTo(l,u,h,d,n,s);if(0===i.length)break;l=n;u=s+i.shift();h=l+i.shift();d=u+i.shift();n=h+i.shift();s=d+(1===i.length?i.shift():0);bezierCurveTo(l,u,h,d,\
n,s)}break;default:if(w<32)throw new FormatError(`unknown operator: ${w}`);if(w<247)i.push(w-139);else if(w<251)i.push(256*(w-247)+e[c++]+108);else if(w<255)i.push(256*-(w-251)-e[c++]-108);else{i.push((e[c]<<24|e[c+1]<<16|e[c+2]<<8|e[c+3])/65536);c+=4}}y&&(i.length=0)}}(e)}class Commands{cmds=[];transformStack=[];currentTransform=[1,0,0,1,0,0];add(e,t){if(t){const{currentTransform:a}=this;for(let e=0,r=t.length;e<r;e+=2)Util.applyTransform(t,a,e);this.cmds.push(`${e}${t.join(" ")}`)}else this.cm\
ds.push(e)}transform(e){this.currentTransform=Util.transform(this.currentTransform,e)}translate(e,t){this.transform([1,0,0,1,e,t])}save(){this.transformStack.push(this.currentTransform.slice())}restore(){this.currentTransform=this.transformStack.pop()||[1,0,0,1,0,0]}getSVG(){return this.cmds.join("")}}class CompiledFont{constructor(e){this.fontMatrix=e;this.compiledGlyphs=Object.create(null);this.compiledCharCodeToGlyphId=Object.create(null)}getPathJs(e){const{charCode:t,glyphId:a}=lookupCmap(th\
is.cmap,e);let r,i=this.compiledGlyphs[a];if(void 0===i){try{i=this.compileGlyph(this.glyphs[a],a)}catch(e){i="";r=e}this.compiledGlyphs[a]=i}this.compiledCharCodeToGlyphId[t]??=a;if(r)throw r;return i}compileGlyph(e,a){if(!e?.length||14===e[0])return"";let r=this.fontMatrix;if(this.isCFFCIDFont){const e=this.fdSelect.getFDIndex(a);if(e>=0&&e<this.fdArray.length){r=this.fdArray[e].getByName("FontMatrix")||t}else warn("Invalid fd index for glyph index.")}assert(isNumberArray(r,6),"Expected a vali\
d fontMatrix.");const i=new Commands;i.transform(r.slice());this.compileGlyphImpl(e,i,a);i.add("Z");return i.getSVG()}compileGlyphImpl(){unreachable("Children classes should implement this.")}hasBuiltPath(e){const{charCode:t,glyphId:a}=lookupCmap(this.cmap,e);return void 0!==this.compiledGlyphs[a]&&void 0!==this.compiledCharCodeToGlyphId[t]}}class TrueTypeCompiled extends CompiledFont{constructor(e,t,a){super(a||[488e-6,0,0,488e-6,0,0]);this.glyphs=e;this.cmap=t}compileGlyphImpl(e,t){compileGlyf\
(e,t,this)}}class Type2Compiled extends CompiledFont{constructor(e,t,a){super(a||[.001,0,0,.001,0,0]);this.glyphs=e.glyphs;this.gsubrs=e.gsubrs||[];this.subrs=e.subrs||[];this.cmap=t;this.glyphNameMap=Fr();this.gsubrsBias=getSubroutineBias(this.gsubrs);this.subrsBias=getSubroutineBias(this.subrs);this.isCFFCIDFont=e.isCFFCIDFont;this.fdSelect=e.fdSelect;this.fdArray=e.fdArray}compileGlyphImpl(e,t,a){compileCharString(e,t,this,a)}}class FontRendererFactory{static create(e,t){const a=new Uint8Arra\
y(e.data);let r,i,n,s,o,c;const l=readUint16(a,4);for(let e=0,h=12;e<l;e++,h+=16){const e=bytesToString(a.subarray(h,h+4)),l=readUint32(a,h+8),u=readUint32(a,h+12);switch(e){case"cmap":r=parseCmap(a,l);break;case"glyf":i=a.subarray(l,l+u);break;case"loca":n=a.subarray(l,l+u);break;case"head":c=readUint16(a,l+18);o=readUint16(a,l+50);break;case"CFF ":s=parseCff(a,l,l+u,t)}}if(i){const t=c?[1/c,0,0,1/c,0,0]:e.fontMatrix;return new TrueTypeCompiled(function parseGlyfTable(e,t,a){let r,i;if(a){r=4;i\
=readUint32}else{r=2;i=(e,t)=>2*readUint16(e,t)}const n=[];let s=i(t,0);for(let a=r;a<t.length;a+=r){const r=i(t,a);n.push(e.subarray(s,r));s=r}return n}(i,n,o),r,t)}return new Type2Compiled(s,r,e.fontMatrix)}}const ii=getLookupTableFactory((function(e){e.Courier=600;e["Courier-Bold"]=600;e["Courier-BoldOblique"]=600;e["Courier-Oblique"]=600;e.Helvetica=getLookupTableFactory((function(e){e.space=278;e.exclam=278;e.quotedbl=355;e.numbersign=556;e.dollar=556;e.percent=889;e.ampersand=667;e.quoteri\
ght=222;e.parenleft=333;e.parenright=333;e.asterisk=389;e.plus=584;e.comma=278;e.hyphen=333;e.period=278;e.slash=278;e.zero=556;e.one=556;e.two=556;e.three=556;e.four=556;e.five=556;e.six=556;e.seven=556;e.eight=556;e.nine=556;e.colon=278;e.semicolon=278;e.less=584;e.equal=584;e.greater=584;e.question=556;e.at=1015;e.A=667;e.B=667;e.C=722;e.D=722;e.E=667;e.F=611;e.G=778;e.H=722;e.I=278;e.J=500;e.K=667;e.L=556;e.M=833;e.N=722;e.O=778;e.P=667;e.Q=778;e.R=722;e.S=667;e.T=611;e.U=722;e.V=667;e.W=944\
;e.X=667;e.Y=667;e.Z=611;e.bracketleft=278;e.backslash=278;e.bracketright=278;e.asciicircum=469;e.underscore=556;e.quoteleft=222;e.a=556;e.b=556;e.c=500;e.d=556;e.e=556;e.f=278;e.g=556;e.h=556;e.i=222;e.j=222;e.k=500;e.l=222;e.m=833;e.n=556;e.o=556;e.p=556;e.q=556;e.r=333;e.s=500;e.t=278;e.u=556;e.v=500;e.w=722;e.x=500;e.y=500;e.z=500;e.braceleft=334;e.bar=260;e.braceright=334;e.asciitilde=584;e.exclamdown=333;e.cent=556;e.sterling=556;e.fraction=167;e.yen=556;e.florin=556;e.section=556;e.curren\
cy=556;e.quotesingle=191;e.quotedblleft=333;e.guillemotleft=556;e.guilsinglleft=333;e.guilsinglright=333;e.fi=500;e.fl=500;e.endash=556;e.dagger=556;e.daggerdbl=556;e.periodcentered=278;e.paragraph=537;e.bullet=350;e.quotesinglbase=222;e.quotedblbase=333;e.quotedblright=333;e.guillemotright=556;e.ellipsis=1e3;e.perthousand=1e3;e.questiondown=611;e.grave=333;e.acute=333;e.circumflex=333;e.tilde=333;e.macron=333;e.breve=333;e.dotaccent=333;e.dieresis=333;e.ring=333;e.cedilla=333;e.hungarumlaut=333\
;e.ogonek=333;e.caron=333;e.emdash=1e3;e.AE=1e3;e.ordfeminine=370;e.Lslash=556;e.Oslash=778;e.OE=1e3;e.ordmasculine=365;e.ae=889;e.dotlessi=278;e.lslash=222;e.oslash=611;e.oe=944;e.germandbls=611;e.Idieresis=278;e.eacute=556;e.abreve=556;e.uhungarumlaut=556;e.ecaron=556;e.Ydieresis=667;e.divide=584;e.Yacute=667;e.Acircumflex=667;e.aacute=556;e.Ucircumflex=722;e.yacute=500;e.scommaaccent=500;e.ecircumflex=556;e.Uring=722;e.Udieresis=722;e.aogonek=556;e.Uacute=722;e.uogonek=556;e.Edieresis=667;e.D\
croat=722;e.commaaccent=250;e.copyright=737;e.Emacron=667;e.ccaron=500;e.aring=556;e.Ncommaaccent=722;e.lacute=222;e.agrave=556;e.Tcommaaccent=611;e.Cacute=722;e.atilde=556;e.Edotaccent=667;e.scaron=500;e.scedilla=500;e.iacute=278;e.lozenge=471;e.Rcaron=722;e.Gcommaaccent=778;e.ucircumflex=556;e.acircumflex=556;e.Amacron=667;e.rcaron=333;e.ccedilla=500;e.Zdotaccent=611;e.Thorn=667;e.Omacron=778;e.Racute=722;e.Sacute=667;e.dcaron=643;e.Umacron=722;e.uring=556;e.threesuperior=333;e.Ograve=778;e.Ag\
rave=667;e.Abreve=667;e.multiply=584;e.uacute=556;e.Tcaron=611;e.partialdiff=476;e.ydieresis=500;e.Nacute=722;e.icircumflex=278;e.Ecircumflex=667;e.adieresis=556;e.edieresis=556;e.cacute=500;e.nacute=556;e.umacron=556;e.Ncaron=722;e.Iacute=278;e.plusminus=584;e.brokenbar=260;e.registered=737;e.Gbreve=778;e.Idotaccent=278;e.summation=600;e.Egrave=667;e.racute=333;e.omacron=556;e.Zacute=611;e.Zcaron=611;e.greaterequal=549;e.Eth=722;e.Ccedilla=722;e.lcommaaccent=222;e.tcaron=317;e.eogonek=556;e.Uog\
onek=722;e.Aacute=667;e.Adieresis=667;e.egrave=556;e.zacute=500;e.iogonek=222;e.Oacute=778;e.oacute=556;e.amacron=556;e.sacute=500;e.idieresis=278;e.Ocircumflex=778;e.Ugrave=722;e.Delta=612;e.thorn=556;e.twosuperior=333;e.Odieresis=778;e.mu=556;e.igrave=278;e.ohungarumlaut=556;e.Eogonek=667;e.dcroat=556;e.threequarters=834;e.Scedilla=667;e.lcaron=299;e.Kcommaaccent=667;e.Lacute=556;e.trademark=1e3;e.edotaccent=556;e.Igrave=278;e.Imacron=278;e.Lcaron=556;e.onehalf=834;e.lessequal=549;e.ocircumfle\
x=556;e.ntilde=556;e.Uhungarumlaut=722;e.Eacute=667;e.emacron=556;e.gbreve=556;e.onequarter=834;e.Scaron=667;e.Scommaaccent=667;e.Ohungarumlaut=778;e.degree=400;e.ograve=556;e.Ccaron=722;e.ugrave=556;e.radical=453;e.Dcaron=722;e.rcommaaccent=333;e.Ntilde=722;e.otilde=556;e.Rcommaaccent=722;e.Lcommaaccent=556;e.Atilde=667;e.Aogonek=667;e.Aring=667;e.Otilde=778;e.zdotaccent=500;e.Ecaron=667;e.Iogonek=278;e.kcommaaccent=500;e.minus=584;e.Icircumflex=278;e.ncaron=556;e.tcommaaccent=278;e.logicalnot=\
584;e.odieresis=556;e.udieresis=556;e.notequal=549;e.gcommaaccent=556;e.eth=556;e.zcaron=500;e.ncommaaccent=556;e.onesuperior=333;e.imacron=278;e.Euro=556}));e["Helvetica-Bold"]=getLookupTableFactory((function(e){e.space=278;e.exclam=333;e.quotedbl=474;e.numbersign=556;e.dollar=556;e.percent=889;e.ampersand=722;e.quoteright=278;e.parenleft=333;e.parenright=333;e.asterisk=389;e.plus=584;e.comma=278;e.hyphen=333;e.period=278;e.slash=278;e.zero=556;e.one=556;e.two=556;e.three=556;e.four=556;e.five=\
556;e.six=556;e.seven=556;e.eight=556;e.nine=556;e.colon=333;e.semicolon=333;e.less=584;e.equal=584;e.greater=584;e.question=611;e.at=975;e.A=722;e.B=722;e.C=722;e.D=722;e.E=667;e.F=611;e.G=778;e.H=722;e.I=278;e.J=556;e.K=722;e.L=611;e.M=833;e.N=722;e.O=778;e.P=667;e.Q=778;e.R=722;e.S=667;e.T=611;e.U=722;e.V=667;e.W=944;e.X=667;e.Y=667;e.Z=611;e.bracketleft=333;e.backslash=278;e.bracketright=333;e.asciicircum=584;e.underscore=556;e.quoteleft=278;e.a=556;e.b=611;e.c=556;e.d=611;e.e=556;e.f=333;e.\
g=611;e.h=611;e.i=278;e.j=278;e.k=556;e.l=278;e.m=889;e.n=611;e.o=611;e.p=611;e.q=611;e.r=389;e.s=556;e.t=333;e.u=611;e.v=556;e.w=778;e.x=556;e.y=556;e.z=500;e.braceleft=389;e.bar=280;e.braceright=389;e.asciitilde=584;e.exclamdown=333;e.cent=556;e.sterling=556;e.fraction=167;e.yen=556;e.florin=556;e.section=556;e.currency=556;e.quotesingle=238;e.quotedblleft=500;e.guillemotleft=556;e.guilsinglleft=333;e.guilsinglright=333;e.fi=611;e.fl=611;e.endash=556;e.dagger=556;e.daggerdbl=556;e.periodcenter\
ed=278;e.paragraph=556;e.bullet=350;e.quotesinglbase=278;e.quotedblbase=500;e.quotedblright=500;e.guillemotright=556;e.ellipsis=1e3;e.perthousand=1e3;e.questiondown=611;e.grave=333;e.acute=333;e.circumflex=333;e.tilde=333;e.macron=333;e.breve=333;e.dotaccent=333;e.dieresis=333;e.ring=333;e.cedilla=333;e.hungarumlaut=333;e.ogonek=333;e.caron=333;e.emdash=1e3;e.AE=1e3;e.ordfeminine=370;e.Lslash=611;e.Oslash=778;e.OE=1e3;e.ordmasculine=365;e.ae=889;e.dotlessi=278;e.lslash=278;e.oslash=611;e.oe=944;\
e.germandbls=611;e.Idieresis=278;e.eacute=556;e.abreve=556;e.uhungarumlaut=611;e.ecaron=556;e.Ydieresis=667;e.divide=584;e.Yacute=667;e.Acircumflex=722;e.aacute=556;e.Ucircumflex=722;e.yacute=556;e.scommaaccent=556;e.ecircumflex=556;e.Uring=722;e.Udieresis=722;e.aogonek=556;e.Uacute=722;e.uogonek=611;e.Edieresis=667;e.Dcroat=722;e.commaaccent=250;e.copyright=737;e.Emacron=667;e.ccaron=556;e.aring=556;e.Ncommaaccent=722;e.lacute=278;e.agrave=556;e.Tcommaaccent=611;e.Cacute=722;e.atilde=556;e.Edot\
accent=667;e.scaron=556;e.scedilla=556;e.iacute=278;e.lozenge=494;e.Rcaron=722;e.Gcommaaccent=778;e.ucircumflex=611;e.acircumflex=556;e.Amacron=722;e.rcaron=389;e.ccedilla=556;e.Zdotaccent=611;e.Thorn=667;e.Omacron=778;e.Racute=722;e.Sacute=667;e.dcaron=743;e.Umacron=722;e.uring=611;e.threesuperior=333;e.Ograve=778;e.Agrave=722;e.Abreve=722;e.multiply=584;e.uacute=611;e.Tcaron=611;e.partialdiff=494;e.ydieresis=556;e.Nacute=722;e.icircumflex=278;e.Ecircumflex=667;e.adieresis=556;e.edieresis=556;e\
.cacute=556;e.nacute=611;e.umacron=611;e.Ncaron=722;e.Iacute=278;e.plusminus=584;e.brokenbar=280;e.registered=737;e.Gbreve=778;e.Idotaccent=278;e.summation=600;e.Egrave=667;e.racute=389;e.omacron=611;e.Zacute=611;e.Zcaron=611;e.greaterequal=549;e.Eth=722;e.Ccedilla=722;e.lcommaaccent=278;e.tcaron=389;e.eogonek=556;e.Uogonek=722;e.Aacute=722;e.Adieresis=722;e.egrave=556;e.zacute=500;e.iogonek=278;e.Oacute=778;e.oacute=611;e.amacron=556;e.sacute=556;e.idieresis=278;e.Ocircumflex=778;e.Ugrave=722;e\
.Delta=612;e.thorn=611;e.twosuperior=333;e.Odieresis=778;e.mu=611;e.igrave=278;e.ohungarumlaut=611;e.Eogonek=667;e.dcroat=611;e.threequarters=834;e.Scedilla=667;e.lcaron=400;e.Kcommaaccent=722;e.Lacute=611;e.trademark=1e3;e.edotaccent=556;e.Igrave=278;e.Imacron=278;e.Lcaron=611;e.onehalf=834;e.lessequal=549;e.ocircumflex=611;e.ntilde=611;e.Uhungarumlaut=722;e.Eacute=667;e.emacron=556;e.gbreve=611;e.onequarter=834;e.Scaron=667;e.Scommaaccent=667;e.Ohungarumlaut=778;e.degree=400;e.ograve=611;e.Cca\
ron=722;e.ugrave=611;e.radical=549;e.Dcaron=722;e.rcommaaccent=389;e.Ntilde=722;e.otilde=611;e.Rcommaaccent=722;e.Lcommaaccent=611;e.Atilde=722;e.Aogonek=722;e.Aring=722;e.Otilde=778;e.zdotaccent=500;e.Ecaron=667;e.Iogonek=278;e.kcommaaccent=556;e.minus=584;e.Icircumflex=278;e.ncaron=611;e.tcommaaccent=333;e.logicalnot=584;e.odieresis=611;e.udieresis=611;e.notequal=549;e.gcommaaccent=611;e.eth=611;e.zcaron=500;e.ncommaaccent=611;e.onesuperior=333;e.imacron=278;e.Euro=556}));e["Helvetica-BoldObli\
que"]=getLookupTableFactory((function(e){e.space=278;e.exclam=333;e.quotedbl=474;e.numbersign=556;e.dollar=556;e.percent=889;e.ampersand=722;e.quoteright=278;e.parenleft=333;e.parenright=333;e.asterisk=389;e.plus=584;e.comma=278;e.hyphen=333;e.period=278;e.slash=278;e.zero=556;e.one=556;e.two=556;e.three=556;e.four=556;e.five=556;e.six=556;e.seven=556;e.eight=556;e.nine=556;e.colon=333;e.semicolon=333;e.less=584;e.equal=584;e.greater=584;e.question=611;e.at=975;e.A=722;e.B=722;e.C=722;e.D=722;e.\
E=667;e.F=611;e.G=778;e.H=722;e.I=278;e.J=556;e.K=722;e.L=611;e.M=833;e.N=722;e.O=778;e.P=667;e.Q=778;e.R=722;e.S=667;e.T=611;e.U=722;e.V=667;e.W=944;e.X=667;e.Y=667;e.Z=611;e.bracketleft=333;e.backslash=278;e.bracketright=333;e.asciicircum=584;e.underscore=556;e.quoteleft=278;e.a=556;e.b=611;e.c=556;e.d=611;e.e=556;e.f=333;e.g=611;e.h=611;e.i=278;e.j=278;e.k=556;e.l=278;e.m=889;e.n=611;e.o=611;e.p=611;e.q=611;e.r=389;e.s=556;e.t=333;e.u=611;e.v=556;e.w=778;e.x=556;e.y=556;e.z=500;e.braceleft=38\
9;e.bar=280;e.braceright=389;e.asciitilde=584;e.exclamdown=333;e.cent=556;e.sterling=556;e.fraction=167;e.yen=556;e.florin=556;e.section=556;e.currency=556;e.quotesingle=238;e.quotedblleft=500;e.guillemotleft=556;e.guilsinglleft=333;e.guilsinglright=333;e.fi=611;e.fl=611;e.endash=556;e.dagger=556;e.daggerdbl=556;e.periodcentered=278;e.paragraph=556;e.bullet=350;e.quotesinglbase=278;e.quotedblbase=500;e.quotedblright=500;e.guillemotright=556;e.ellipsis=1e3;e.perthousand=1e3;e.questiondown=611;e.g\
rave=333;e.acute=333;e.circumflex=333;e.tilde=333;e.macron=333;e.breve=333;e.dotaccent=333;e.dieresis=333;e.ring=333;e.cedilla=333;e.hungarumlaut=333;e.ogonek=333;e.caron=333;e.emdash=1e3;e.AE=1e3;e.ordfeminine=370;e.Lslash=611;e.Oslash=778;e.OE=1e3;e.ordmasculine=365;e.ae=889;e.dotlessi=278;e.lslash=278;e.oslash=611;e.oe=944;e.germandbls=611;e.Idieresis=278;e.eacute=556;e.abreve=556;e.uhungarumlaut=611;e.ecaron=556;e.Ydieresis=667;e.divide=584;e.Yacute=667;e.Acircumflex=722;e.aacute=556;e.Ucirc\
umflex=722;e.yacute=556;e.scommaaccent=556;e.ecircumflex=556;e.Uring=722;e.Udieresis=722;e.aogonek=556;e.Uacute=722;e.uogonek=611;e.Edieresis=667;e.Dcroat=722;e.commaaccent=250;e.copyright=737;e.Emacron=667;e.ccaron=556;e.aring=556;e.Ncommaaccent=722;e.lacute=278;e.agrave=556;e.Tcommaaccent=611;e.Cacute=722;e.atilde=556;e.Edotaccent=667;e.scaron=556;e.scedilla=556;e.iacute=278;e.lozenge=494;e.Rcaron=722;e.Gcommaaccent=778;e.ucircumflex=611;e.acircumflex=556;e.Amacron=722;e.rcaron=389;e.ccedilla=\
556;e.Zdotaccent=611;e.Thorn=667;e.Omacron=778;e.Racute=722;e.Sacute=667;e.dcaron=743;e.Umacron=722;e.uring=611;e.threesuperior=333;e.Ograve=778;e.Agrave=722;e.Abreve=722;e.multiply=584;e.uacute=611;e.Tcaron=611;e.partialdiff=494;e.ydieresis=556;e.Nacute=722;e.icircumflex=278;e.Ecircumflex=667;e.adieresis=556;e.edieresis=556;e.cacute=556;e.nacute=611;e.umacron=611;e.Ncaron=722;e.Iacute=278;e.plusminus=584;e.brokenbar=280;e.registered=737;e.Gbreve=778;e.Idotaccent=278;e.summation=600;e.Egrave=667\
;e.racute=389;e.omacron=611;e.Zacute=611;e.Zcaron=611;e.greaterequal=549;e.Eth=722;e.Ccedilla=722;e.lcommaaccent=278;e.tcaron=389;e.eogonek=556;e.Uogonek=722;e.Aacute=722;e.Adieresis=722;e.egrave=556;e.zacute=500;e.iogonek=278;e.Oacute=778;e.oacute=611;e.amacron=556;e.sacute=556;e.idieresis=278;e.Ocircumflex=778;e.Ugrave=722;e.Delta=612;e.thorn=611;e.twosuperior=333;e.Odieresis=778;e.mu=611;e.igrave=278;e.ohungarumlaut=611;e.Eogonek=667;e.dcroat=611;e.threequarters=834;e.Scedilla=667;e.lcaron=40\
0;e.Kcommaaccent=722;e.Lacute=611;e.trademark=1e3;e.edotaccent=556;e.Igrave=278;e.Imacron=278;e.Lcaron=611;e.onehalf=834;e.lessequal=549;e.ocircumflex=611;e.ntilde=611;e.Uhungarumlaut=722;e.Eacute=667;e.emacron=556;e.gbreve=611;e.onequarter=834;e.Scaron=667;e.Scommaaccent=667;e.Ohungarumlaut=778;e.degree=400;e.ograve=611;e.Ccaron=722;e.ugrave=611;e.radical=549;e.Dcaron=722;e.rcommaaccent=389;e.Ntilde=722;e.otilde=611;e.Rcommaaccent=722;e.Lcommaaccent=611;e.Atilde=722;e.Aogonek=722;e.Aring=722;e.\
Otilde=778;e.zdotaccent=500;e.Ecaron=667;e.Iogonek=278;e.kcommaaccent=556;e.minus=584;e.Icircumflex=278;e.ncaron=611;e.tcommaaccent=333;e.logicalnot=584;e.odieresis=611;e.udieresis=611;e.notequal=549;e.gcommaaccent=611;e.eth=611;e.zcaron=500;e.ncommaaccent=611;e.onesuperior=333;e.imacron=278;e.Euro=556}));e["Helvetica-Oblique"]=getLookupTableFactory((function(e){e.space=278;e.exclam=278;e.quotedbl=355;e.numbersign=556;e.dollar=556;e.percent=889;e.ampersand=667;e.quoteright=222;e.parenleft=333;e.\
parenright=333;e.asterisk=389;e.plus=584;e.comma=278;e.hyphen=333;e.period=278;e.slash=278;e.zero=556;e.one=556;e.two=556;e.three=556;e.four=556;e.five=556;e.six=556;e.seven=556;e.eight=556;e.nine=556;e.colon=278;e.semicolon=278;e.less=584;e.equal=584;e.greater=584;e.question=556;e.at=1015;e.A=667;e.B=667;e.C=722;e.D=722;e.E=667;e.F=611;e.G=778;e.H=722;e.I=278;e.J=500;e.K=667;e.L=556;e.M=833;e.N=722;e.O=778;e.P=667;e.Q=778;e.R=722;e.S=667;e.T=611;e.U=722;e.V=667;e.W=944;e.X=667;e.Y=667;e.Z=611;e\
.bracketleft=278;e.backslash=278;e.bracketright=278;e.asciicircum=469;e.underscore=556;e.quoteleft=222;e.a=556;e.b=556;e.c=500;e.d=556;e.e=556;e.f=278;e.g=556;e.h=556;e.i=222;e.j=222;e.k=500;e.l=222;e.m=833;e.n=556;e.o=556;e.p=556;e.q=556;e.r=333;e.s=500;e.t=278;e.u=556;e.v=500;e.w=722;e.x=500;e.y=500;e.z=500;e.braceleft=334;e.bar=260;e.braceright=334;e.asciitilde=584;e.exclamdown=333;e.cent=556;e.sterling=556;e.fraction=167;e.yen=556;e.florin=556;e.section=556;e.currency=556;e.quotesingle=191;e\
.quotedblleft=333;e.guillemotleft=556;e.guilsinglleft=333;e.guilsinglright=333;e.fi=500;e.fl=500;e.endash=556;e.dagger=556;e.daggerdbl=556;e.periodcentered=278;e.paragraph=537;e.bullet=350;e.quotesinglbase=222;e.quotedblbase=333;e.quotedblright=333;e.guillemotright=556;e.ellipsis=1e3;e.perthousand=1e3;e.questiondown=611;e.grave=333;e.acute=333;e.circumflex=333;e.tilde=333;e.macron=333;e.breve=333;e.dotaccent=333;e.dieresis=333;e.ring=333;e.cedilla=333;e.hungarumlaut=333;e.ogonek=333;e.caron=333;\
e.emdash=1e3;e.AE=1e3;e.ordfeminine=370;e.Lslash=556;e.Oslash=778;e.OE=1e3;e.ordmasculine=365;e.ae=889;e.dotlessi=278;e.lslash=222;e.oslash=611;e.oe=944;e.germandbls=611;e.Idieresis=278;e.eacute=556;e.abreve=556;e.uhungarumlaut=556;e.ecaron=556;e.Ydieresis=667;e.divide=584;e.Yacute=667;e.Acircumflex=667;e.aacute=556;e.Ucircumflex=722;e.yacute=500;e.scommaaccent=500;e.ecircumflex=556;e.Uring=722;e.Udieresis=722;e.aogonek=556;e.Uacute=722;e.uogonek=556;e.Edieresis=667;e.Dcroat=722;e.commaaccent=25\
0;e.copyright=737;e.Emacron=667;e.ccaron=500;e.aring=556;e.Ncommaaccent=722;e.lacute=222;e.agrave=556;e.Tcommaaccent=611;e.Cacute=722;e.atilde=556;e.Edotaccent=667;e.scaron=500;e.scedilla=500;e.iacute=278;e.lozenge=471;e.Rcaron=722;e.Gcommaaccent=778;e.ucircumflex=556;e.acircumflex=556;e.Amacron=667;e.rcaron=333;e.ccedilla=500;e.Zdotaccent=611;e.Thorn=667;e.Omacron=778;e.Racute=722;e.Sacute=667;e.dcaron=643;e.Umacron=722;e.uring=556;e.threesuperior=333;e.Ograve=778;e.Agrave=667;e.Abreve=667;e.mu\
ltiply=584;e.uacute=556;e.Tcaron=611;e.partialdiff=476;e.ydieresis=500;e.Nacute=722;e.icircumflex=278;e.Ecircumflex=667;e.adieresis=556;e.edieresis=556;e.cacute=500;e.nacute=556;e.umacron=556;e.Ncaron=722;e.Iacute=278;e.plusminus=584;e.brokenbar=260;e.registered=737;e.Gbreve=778;e.Idotaccent=278;e.summation=600;e.Egrave=667;e.racute=333;e.omacron=556;e.Zacute=611;e.Zcaron=611;e.greaterequal=549;e.Eth=722;e.Ccedilla=722;e.lcommaaccent=222;e.tcaron=317;e.eogonek=556;e.Uogonek=722;e.Aacute=667;e.Ad\
ieresis=667;e.egrave=556;e.zacute=500;e.iogonek=222;e.Oacute=778;e.oacute=556;e.amacron=556;e.sacute=500;e.idieresis=278;e.Ocircumflex=778;e.Ugrave=722;e.Delta=612;e.thorn=556;e.twosuperior=333;e.Odieresis=778;e.mu=556;e.igrave=278;e.ohungarumlaut=556;e.Eogonek=667;e.dcroat=556;e.threequarters=834;e.Scedilla=667;e.lcaron=299;e.Kcommaaccent=667;e.Lacute=556;e.trademark=1e3;e.edotaccent=556;e.Igrave=278;e.Imacron=278;e.Lcaron=556;e.onehalf=834;e.lessequal=549;e.ocircumflex=556;e.ntilde=556;e.Uhung\
arumlaut=722;e.Eacute=667;e.emacron=556;e.gbreve=556;e.onequarter=834;e.Scaron=667;e.Scommaaccent=667;e.Ohungarumlaut=778;e.degree=400;e.ograve=556;e.Ccaron=722;e.ugrave=556;e.radical=453;e.Dcaron=722;e.rcommaaccent=333;e.Ntilde=722;e.otilde=556;e.Rcommaaccent=722;e.Lcommaaccent=556;e.Atilde=667;e.Aogonek=667;e.Aring=667;e.Otilde=778;e.zdotaccent=500;e.Ecaron=667;e.Iogonek=278;e.kcommaaccent=500;e.minus=584;e.Icircumflex=278;e.ncaron=556;e.tcommaaccent=278;e.logicalnot=584;e.odieresis=556;e.udie\
resis=556;e.notequal=549;e.gcommaaccent=556;e.eth=556;e.zcaron=500;e.ncommaaccent=556;e.onesuperior=333;e.imacron=278;e.Euro=556}));e.Symbol=getLookupTableFactory((function(e){e.space=250;e.exclam=333;e.universal=713;e.numbersign=500;e.existential=549;e.percent=833;e.ampersand=778;e.suchthat=439;e.parenleft=333;e.parenright=333;e.asteriskmath=500;e.plus=549;e.comma=250;e.minus=549;e.period=250;e.slash=278;e.zero=500;e.one=500;e.two=500;e.three=500;e.four=500;e.five=500;e.six=500;e.seven=500;e.ei\
ght=500;e.nine=500;e.colon=278;e.semicolon=278;e.less=549;e.equal=549;e.greater=549;e.question=444;e.congruent=549;e.Alpha=722;e.Beta=667;e.Chi=722;e.Delta=612;e.Epsilon=611;e.Phi=763;e.Gamma=603;e.Eta=722;e.Iota=333;e.theta1=631;e.Kappa=722;e.Lambda=686;e.Mu=889;e.Nu=722;e.Omicron=722;e.Pi=768;e.Theta=741;e.Rho=556;e.Sigma=592;e.Tau=611;e.Upsilon=690;e.sigma1=439;e.Omega=768;e.Xi=645;e.Psi=795;e.Zeta=611;e.bracketleft=333;e.therefore=863;e.bracketright=333;e.perpendicular=658;e.underscore=500;e\
.radicalex=500;e.alpha=631;e.beta=549;e.chi=549;e.delta=494;e.epsilon=439;e.phi=521;e.gamma=411;e.eta=603;e.iota=329;e.phi1=603;e.kappa=549;e.lambda=549;e.mu=576;e.nu=521;e.omicron=549;e.pi=549;e.theta=521;e.rho=549;e.sigma=603;e.tau=439;e.upsilon=576;e.omega1=713;e.omega=686;e.xi=493;e.psi=686;e.zeta=494;e.braceleft=480;e.bar=200;e.braceright=480;e.similar=549;e.Euro=750;e.Upsilon1=620;e.minute=247;e.lessequal=549;e.fraction=167;e.infinity=713;e.florin=500;e.club=753;e.diamond=753;e.heart=753;e\
.spade=753;e.arrowboth=1042;e.arrowleft=987;e.arrowup=603;e.arrowright=987;e.arrowdown=603;e.degree=400;e.plusminus=549;e.second=411;e.greaterequal=549;e.multiply=549;e.proportional=713;e.partialdiff=494;e.bullet=460;e.divide=549;e.notequal=549;e.equivalence=549;e.approxequal=549;e.ellipsis=1e3;e.arrowvertex=603;e.arrowhorizex=1e3;e.carriagereturn=658;e.aleph=823;e.Ifraktur=686;e.Rfraktur=795;e.weierstrass=987;e.circlemultiply=768;e.circleplus=768;e.emptyset=823;e.intersection=768;e.union=768;e.\
propersuperset=713;e.reflexsuperset=713;e.notsubset=713;e.propersubset=713;e.reflexsubset=713;e.element=713;e.notelement=713;e.angle=768;e.gradient=713;e.registerserif=790;e.copyrightserif=790;e.trademarkserif=890;e.product=823;e.radical=549;e.dotmath=250;e.logicalnot=713;e.logicaland=603;e.logicalor=603;e.arrowdblboth=1042;e.arrowdblleft=987;e.arrowdblup=603;e.arrowdblright=987;e.arrowdbldown=603;e.lozenge=494;e.angleleft=329;e.registersans=790;e.copyrightsans=790;e.trademarksans=786;e.summatio\
n=713;e.parenlefttp=384;e.parenleftex=384;e.parenleftbt=384;e.bracketlefttp=384;e.bracketleftex=384;e.bracketleftbt=384;e.bracelefttp=494;e.braceleftmid=494;e.braceleftbt=494;e.braceex=494;e.angleright=329;e.integral=274;e.integraltp=686;e.integralex=686;e.integralbt=686;e.parenrighttp=384;e.parenrightex=384;e.parenrightbt=384;e.bracketrighttp=384;e.bracketrightex=384;e.bracketrightbt=384;e.bracerighttp=494;e.bracerightmid=494;e.bracerightbt=494;e.apple=790}));e["Times-Roman"]=getLookupTableFact\
ory((function(e){e.space=250;e.exclam=333;e.quotedbl=408;e.numbersign=500;e.dollar=500;e.percent=833;e.ampersand=778;e.quoteright=333;e.parenleft=333;e.parenright=333;e.asterisk=500;e.plus=564;e.comma=250;e.hyphen=333;e.period=250;e.slash=278;e.zero=500;e.one=500;e.two=500;e.three=500;e.four=500;e.five=500;e.six=500;e.seven=500;e.eight=500;e.nine=500;e.colon=278;e.semicolon=278;e.less=564;e.equal=564;e.greater=564;e.question=444;e.at=921;e.A=722;e.B=667;e.C=667;e.D=722;e.E=611;e.F=556;e.G=722;e.\
H=722;e.I=333;e.J=389;e.K=722;e.L=611;e.M=889;e.N=722;e.O=722;e.P=556;e.Q=722;e.R=667;e.S=556;e.T=611;e.U=722;e.V=722;e.W=944;e.X=722;e.Y=722;e.Z=611;e.bracketleft=333;e.backslash=278;e.bracketright=333;e.asciicircum=469;e.underscore=500;e.quoteleft=333;e.a=444;e.b=500;e.c=444;e.d=500;e.e=444;e.f=333;e.g=500;e.h=500;e.i=278;e.j=278;e.k=500;e.l=278;e.m=778;e.n=500;e.o=500;e.p=500;e.q=500;e.r=333;e.s=389;e.t=278;e.u=500;e.v=500;e.w=722;e.x=500;e.y=500;e.z=444;e.braceleft=480;e.bar=200;e.braceright\
=480;e.asciitilde=541;e.exclamdown=333;e.cent=500;e.sterling=500;e.fraction=167;e.yen=500;e.florin=500;e.section=500;e.currency=500;e.quotesingle=180;e.quotedblleft=444;e.guillemotleft=500;e.guilsinglleft=333;e.guilsinglright=333;e.fi=556;e.fl=556;e.endash=500;e.dagger=500;e.daggerdbl=500;e.periodcentered=250;e.paragraph=453;e.bullet=350;e.quotesinglbase=333;e.quotedblbase=444;e.quotedblright=444;e.guillemotright=500;e.ellipsis=1e3;e.perthousand=1e3;e.questiondown=444;e.grave=333;e.acute=333;e.c\
ircumflex=333;e.tilde=333;e.macron=333;e.breve=333;e.dotaccent=333;e.dieresis=333;e.ring=333;e.cedilla=333;e.hungarumlaut=333;e.ogonek=333;e.caron=333;e.emdash=1e3;e.AE=889;e.ordfeminine=276;e.Lslash=611;e.Oslash=722;e.OE=889;e.ordmasculine=310;e.ae=667;e.dotlessi=278;e.lslash=278;e.oslash=500;e.oe=722;e.germandbls=500;e.Idieresis=333;e.eacute=444;e.abreve=444;e.uhungarumlaut=500;e.ecaron=444;e.Ydieresis=722;e.divide=564;e.Yacute=722;e.Acircumflex=722;e.aacute=444;e.Ucircumflex=722;e.yacute=500;\
e.scommaaccent=389;e.ecircumflex=444;e.Uring=722;e.Udieresis=722;e.aogonek=444;e.Uacute=722;e.uogonek=500;e.Edieresis=611;e.Dcroat=722;e.commaaccent=250;e.copyright=760;e.Emacron=611;e.ccaron=444;e.aring=444;e.Ncommaaccent=722;e.lacute=278;e.agrave=444;e.Tcommaaccent=611;e.Cacute=667;e.atilde=444;e.Edotaccent=611;e.scaron=389;e.scedilla=389;e.iacute=278;e.lozenge=471;e.Rcaron=667;e.Gcommaaccent=722;e.ucircumflex=500;e.acircumflex=444;e.Amacron=722;e.rcaron=333;e.ccedilla=444;e.Zdotaccent=611;e.T\
horn=556;e.Omacron=722;e.Racute=667;e.Sacute=556;e.dcaron=588;e.Umacron=722;e.uring=500;e.threesuperior=300;e.Ograve=722;e.Agrave=722;e.Abreve=722;e.multiply=564;e.uacute=500;e.Tcaron=611;e.partialdiff=476;e.ydieresis=500;e.Nacute=722;e.icircumflex=278;e.Ecircumflex=611;e.adieresis=444;e.edieresis=444;e.cacute=444;e.nacute=500;e.umacron=500;e.Ncaron=722;e.Iacute=333;e.plusminus=564;e.brokenbar=200;e.registered=760;e.Gbreve=722;e.Idotaccent=333;e.summation=600;e.Egrave=611;e.racute=333;e.omacron=\
500;e.Zacute=611;e.Zcaron=611;e.greaterequal=549;e.Eth=722;e.Ccedilla=667;e.lcommaaccent=278;e.tcaron=326;e.eogonek=444;e.Uogonek=722;e.Aacute=722;e.Adieresis=722;e.egrave=444;e.zacute=444;e.iogonek=278;e.Oacute=722;e.oacute=500;e.amacron=444;e.sacute=389;e.idieresis=278;e.Ocircumflex=722;e.Ugrave=722;e.Delta=612;e.thorn=500;e.twosuperior=300;e.Odieresis=722;e.mu=500;e.igrave=278;e.ohungarumlaut=500;e.Eogonek=611;e.dcroat=500;e.threequarters=750;e.Scedilla=556;e.lcaron=344;e.Kcommaaccent=722;e.L\
acute=611;e.trademark=980;e.edotaccent=444;e.Igrave=333;e.Imacron=333;e.Lcaron=611;e.onehalf=750;e.lessequal=549;e.ocircumflex=500;e.ntilde=500;e.Uhungarumlaut=722;e.Eacute=611;e.emacron=444;e.gbreve=500;e.onequarter=750;e.Scaron=556;e.Scommaaccent=556;e.Ohungarumlaut=722;e.degree=400;e.ograve=500;e.Ccaron=667;e.ugrave=500;e.radical=453;e.Dcaron=722;e.rcommaaccent=333;e.Ntilde=722;e.otilde=500;e.Rcommaaccent=667;e.Lcommaaccent=611;e.Atilde=722;e.Aogonek=722;e.Aring=722;e.Otilde=722;e.zdotaccent=\
444;e.Ecaron=611;e.Iogonek=333;e.kcommaaccent=500;e.minus=564;e.Icircumflex=333;e.ncaron=500;e.tcommaaccent=278;e.logicalnot=564;e.odieresis=500;e.udieresis=500;e.notequal=549;e.gcommaaccent=500;e.eth=500;e.zcaron=444;e.ncommaaccent=500;e.onesuperior=300;e.imacron=278;e.Euro=500}));e["Times-Bold"]=getLookupTableFactory((function(e){e.space=250;e.exclam=333;e.quotedbl=555;e.numbersign=500;e.dollar=500;e.percent=1e3;e.ampersand=833;e.quoteright=333;e.parenleft=333;e.parenright=333;e.asterisk=500;e\
.plus=570;e.comma=250;e.hyphen=333;e.period=250;e.slash=278;e.zero=500;e.one=500;e.two=500;e.three=500;e.four=500;e.five=500;e.six=500;e.seven=500;e.eight=500;e.nine=500;e.colon=333;e.semicolon=333;e.less=570;e.equal=570;e.greater=570;e.question=500;e.at=930;e.A=722;e.B=667;e.C=722;e.D=722;e.E=667;e.F=611;e.G=778;e.H=778;e.I=389;e.J=500;e.K=778;e.L=667;e.M=944;e.N=722;e.O=778;e.P=611;e.Q=778;e.R=722;e.S=556;e.T=667;e.U=722;e.V=722;e.W=1e3;e.X=722;e.Y=722;e.Z=667;e.bracketleft=333;e.backslash=278\
;e.bracketright=333;e.asciicircum=581;e.underscore=500;e.quoteleft=333;e.a=500;e.b=556;e.c=444;e.d=556;e.e=444;e.f=333;e.g=500;e.h=556;e.i=278;e.j=333;e.k=556;e.l=278;e.m=833;e.n=556;e.o=500;e.p=556;e.q=556;e.r=444;e.s=389;e.t=333;e.u=556;e.v=500;e.w=722;e.x=500;e.y=500;e.z=444;e.braceleft=394;e.bar=220;e.braceright=394;e.asciitilde=520;e.exclamdown=333;e.cent=500;e.sterling=500;e.fraction=167;e.yen=500;e.florin=500;e.section=500;e.currency=500;e.quotesingle=278;e.quotedblleft=500;e.guillemotlef\
t=500;e.guilsinglleft=333;e.guilsinglright=333;e.fi=556;e.fl=556;e.endash=500;e.dagger=500;e.daggerdbl=500;e.periodcentered=250;e.paragraph=540;e.bullet=350;e.quotesinglbase=333;e.quotedblbase=500;e.quotedblright=500;e.guillemotright=500;e.ellipsis=1e3;e.perthousand=1e3;e.questiondown=500;e.grave=333;e.acute=333;e.circumflex=333;e.tilde=333;e.macron=333;e.breve=333;e.dotaccent=333;e.dieresis=333;e.ring=333;e.cedilla=333;e.hungarumlaut=333;e.ogonek=333;e.caron=333;e.emdash=1e3;e.AE=1e3;e.ordfemin\
ine=300;e.Lslash=667;e.Oslash=778;e.OE=1e3;e.ordmasculine=330;e.ae=722;e.dotlessi=278;e.lslash=278;e.oslash=500;e.oe=722;e.germandbls=556;e.Idieresis=389;e.eacute=444;e.abreve=500;e.uhungarumlaut=556;e.ecaron=444;e.Ydieresis=722;e.divide=570;e.Yacute=722;e.Acircumflex=722;e.aacute=500;e.Ucircumflex=722;e.yacute=500;e.scommaaccent=389;e.ecircumflex=444;e.Uring=722;e.Udieresis=722;e.aogonek=500;e.Uacute=722;e.uogonek=556;e.Edieresis=667;e.Dcroat=722;e.commaaccent=250;e.copyright=747;e.Emacron=667;\
e.ccaron=444;e.aring=500;e.Ncommaaccent=722;e.lacute=278;e.agrave=500;e.Tcommaaccent=667;e.Cacute=722;e.atilde=500;e.Edotaccent=667;e.scaron=389;e.scedilla=389;e.iacute=278;e.lozenge=494;e.Rcaron=722;e.Gcommaaccent=778;e.ucircumflex=556;e.acircumflex=500;e.Amacron=722;e.rcaron=444;e.ccedilla=444;e.Zdotaccent=667;e.Thorn=611;e.Omacron=778;e.Racute=722;e.Sacute=556;e.dcaron=672;e.Umacron=722;e.uring=556;e.threesuperior=300;e.Ograve=778;e.Agrave=722;e.Abreve=722;e.multiply=570;e.uacute=556;e.Tcaron\
=667;e.partialdiff=494;e.ydieresis=500;e.Nacute=722;e.icircumflex=278;e.Ecircumflex=667;e.adieresis=500;e.edieresis=444;e.cacute=444;e.nacute=556;e.umacron=556;e.Ncaron=722;e.Iacute=389;e.plusminus=570;e.brokenbar=220;e.registered=747;e.Gbreve=778;e.Idotaccent=389;e.summation=600;e.Egrave=667;e.racute=444;e.omacron=500;e.Zacute=667;e.Zcaron=667;e.greaterequal=549;e.Eth=722;e.Ccedilla=722;e.lcommaaccent=278;e.tcaron=416;e.eogonek=444;e.Uogonek=722;e.Aacute=722;e.Adieresis=722;e.egrave=444;e.zacut\
e=444;e.iogonek=278;e.Oacute=778;e.oacute=500;e.amacron=500;e.sacute=389;e.idieresis=278;e.Ocircumflex=778;e.Ugrave=722;e.Delta=612;e.thorn=556;e.twosuperior=300;e.Odieresis=778;e.mu=556;e.igrave=278;e.ohungarumlaut=500;e.Eogonek=667;e.dcroat=556;e.threequarters=750;e.Scedilla=556;e.lcaron=394;e.Kcommaaccent=778;e.Lacute=667;e.trademark=1e3;e.edotaccent=444;e.Igrave=389;e.Imacron=389;e.Lcaron=667;e.onehalf=750;e.lessequal=549;e.ocircumflex=500;e.ntilde=556;e.Uhungarumlaut=722;e.Eacute=667;e.emac\
ron=444;e.gbreve=500;e.onequarter=750;e.Scaron=556;e.Scommaaccent=556;e.Ohungarumlaut=778;e.degree=400;e.ograve=500;e.Ccaron=722;e.ugrave=556;e.radical=549;e.Dcaron=722;e.rcommaaccent=444;e.Ntilde=722;e.otilde=500;e.Rcommaaccent=722;e.Lcommaaccent=667;e.Atilde=722;e.Aogonek=722;e.Aring=722;e.Otilde=778;e.zdotaccent=444;e.Ecaron=667;e.Iogonek=389;e.kcommaaccent=556;e.minus=570;e.Icircumflex=389;e.ncaron=556;e.tcommaaccent=333;e.logicalnot=570;e.odieresis=500;e.udieresis=556;e.notequal=549;e.gcomm\
aaccent=500;e.eth=500;e.zcaron=444;e.ncommaaccent=556;e.onesuperior=300;e.imacron=278;e.Euro=500}));e["Times-BoldItalic"]=getLookupTableFactory((function(e){e.space=250;e.exclam=389;e.quotedbl=555;e.numbersign=500;e.dollar=500;e.percent=833;e.ampersand=778;e.quoteright=333;e.parenleft=333;e.parenright=333;e.asterisk=500;e.plus=570;e.comma=250;e.hyphen=333;e.period=250;e.slash=278;e.zero=500;e.one=500;e.two=500;e.three=500;e.four=500;e.five=500;e.six=500;e.seven=500;e.eight=500;e.nine=500;e.colon\
=333;e.semicolon=333;e.less=570;e.equal=570;e.greater=570;e.question=500;e.at=832;e.A=667;e.B=667;e.C=667;e.D=722;e.E=667;e.F=667;e.G=722;e.H=778;e.I=389;e.J=500;e.K=667;e.L=611;e.M=889;e.N=722;e.O=722;e.P=611;e.Q=722;e.R=667;e.S=556;e.T=611;e.U=722;e.V=667;e.W=889;e.X=667;e.Y=611;e.Z=611;e.bracketleft=333;e.backslash=278;e.bracketright=333;e.asciicircum=570;e.underscore=500;e.quoteleft=333;e.a=500;e.b=500;e.c=444;e.d=500;e.e=444;e.f=333;e.g=500;e.h=556;e.i=278;e.j=278;e.k=500;e.l=278;e.m=778;e.\
n=556;e.o=500;e.p=500;e.q=500;e.r=389;e.s=389;e.t=278;e.u=556;e.v=444;e.w=667;e.x=500;e.y=444;e.z=389;e.braceleft=348;e.bar=220;e.braceright=348;e.asciitilde=570;e.exclamdown=389;e.cent=500;e.sterling=500;e.fraction=167;e.yen=500;e.florin=500;e.section=500;e.currency=500;e.quotesingle=278;e.quotedblleft=500;e.guillemotleft=500;e.guilsinglleft=333;e.guilsinglright=333;e.fi=556;e.fl=556;e.endash=500;e.dagger=500;e.daggerdbl=500;e.periodcentered=250;e.paragraph=500;e.bullet=350;e.quotesinglbase=333\
;e.quotedblbase=500;e.quotedblright=500;e.guillemotright=500;e.ellipsis=1e3;e.perthousand=1e3;e.questiondown=500;e.grave=333;e.acute=333;e.circumflex=333;e.tilde=333;e.macron=333;e.breve=333;e.dotaccent=333;e.dieresis=333;e.ring=333;e.cedilla=333;e.hungarumlaut=333;e.ogonek=333;e.caron=333;e.emdash=1e3;e.AE=944;e.ordfeminine=266;e.Lslash=611;e.Oslash=722;e.OE=944;e.ordmasculine=300;e.ae=722;e.dotlessi=278;e.lslash=278;e.oslash=500;e.oe=722;e.germandbls=500;e.Idieresis=389;e.eacute=444;e.abreve=5\
00;e.uhungarumlaut=556;e.ecaron=444;e.Ydieresis=611;e.divide=570;e.Yacute=611;e.Acircumflex=667;e.aacute=500;e.Ucircumflex=722;e.yacute=444;e.scommaaccent=389;e.ecircumflex=444;e.Uring=722;e.Udieresis=722;e.aogonek=500;e.Uacute=722;e.uogonek=556;e.Edieresis=667;e.Dcroat=722;e.commaaccent=250;e.copyright=747;e.Emacron=667;e.ccaron=444;e.aring=500;e.Ncommaaccent=722;e.lacute=278;e.agrave=500;e.Tcommaaccent=611;e.Cacute=667;e.atilde=500;e.Edotaccent=667;e.scaron=389;e.scedilla=389;e.iacute=278;e.lo\
zenge=494;e.Rcaron=667;e.Gcommaaccent=722;e.ucircumflex=556;e.acircumflex=500;e.Amacron=667;e.rcaron=389;e.ccedilla=444;e.Zdotaccent=611;e.Thorn=611;e.Omacron=722;e.Racute=667;e.Sacute=556;e.dcaron=608;e.Umacron=722;e.uring=556;e.threesuperior=300;e.Ograve=722;e.Agrave=667;e.Abreve=667;e.multiply=570;e.uacute=556;e.Tcaron=611;e.partialdiff=494;e.ydieresis=444;e.Nacute=722;e.icircumflex=278;e.Ecircumflex=667;e.adieresis=500;e.edieresis=444;e.cacute=444;e.nacute=556;e.umacron=556;e.Ncaron=722;e.Ia\
cute=389;e.plusminus=570;e.brokenbar=220;e.registered=747;e.Gbreve=722;e.Idotaccent=389;e.summation=600;e.Egrave=667;e.racute=389;e.omacron=500;e.Zacute=611;e.Zcaron=611;e.greaterequal=549;e.Eth=722;e.Ccedilla=667;e.lcommaaccent=278;e.tcaron=366;e.eogonek=444;e.Uogonek=722;e.Aacute=667;e.Adieresis=667;e.egrave=444;e.zacute=389;e.iogonek=278;e.Oacute=722;e.oacute=500;e.amacron=500;e.sacute=389;e.idieresis=278;e.Ocircumflex=722;e.Ugrave=722;e.Delta=612;e.thorn=500;e.twosuperior=300;e.Odieresis=722\
;e.mu=576;e.igrave=278;e.ohungarumlaut=500;e.Eogonek=667;e.dcroat=500;e.threequarters=750;e.Scedilla=556;e.lcaron=382;e.Kcommaaccent=667;e.Lacute=611;e.trademark=1e3;e.edotaccent=444;e.Igrave=389;e.Imacron=389;e.Lcaron=611;e.onehalf=750;e.lessequal=549;e.ocircumflex=500;e.ntilde=556;e.Uhungarumlaut=722;e.Eacute=667;e.emacron=444;e.gbreve=500;e.onequarter=750;e.Scaron=556;e.Scommaaccent=556;e.Ohungarumlaut=722;e.degree=400;e.ograve=500;e.Ccaron=667;e.ugrave=556;e.radical=549;e.Dcaron=722;e.rcomma\
accent=389;e.Ntilde=722;e.otilde=500;e.Rcommaaccent=667;e.Lcommaaccent=611;e.Atilde=667;e.Aogonek=667;e.Aring=667;e.Otilde=722;e.zdotaccent=389;e.Ecaron=667;e.Iogonek=389;e.kcommaaccent=500;e.minus=606;e.Icircumflex=389;e.ncaron=556;e.tcommaaccent=278;e.logicalnot=606;e.odieresis=500;e.udieresis=556;e.notequal=549;e.gcommaaccent=500;e.eth=500;e.zcaron=389;e.ncommaaccent=556;e.onesuperior=300;e.imacron=278;e.Euro=500}));e["Times-Italic"]=getLookupTableFactory((function(e){e.space=250;e.exclam=333\
;e.quotedbl=420;e.numbersign=500;e.dollar=500;e.percent=833;e.ampersand=778;e.quoteright=333;e.parenleft=333;e.parenright=333;e.asterisk=500;e.plus=675;e.comma=250;e.hyphen=333;e.period=250;e.slash=278;e.zero=500;e.one=500;e.two=500;e.three=500;e.four=500;e.five=500;e.six=500;e.seven=500;e.eight=500;e.nine=500;e.colon=333;e.semicolon=333;e.less=675;e.equal=675;e.greater=675;e.question=500;e.at=920;e.A=611;e.B=611;e.C=667;e.D=722;e.E=611;e.F=611;e.G=722;e.H=722;e.I=333;e.J=444;e.K=667;e.L=556;e.M\
=833;e.N=667;e.O=722;e.P=611;e.Q=722;e.R=611;e.S=500;e.T=556;e.U=722;e.V=611;e.W=833;e.X=611;e.Y=556;e.Z=556;e.bracketleft=389;e.backslash=278;e.bracketright=389;e.asciicircum=422;e.underscore=500;e.quoteleft=333;e.a=500;e.b=500;e.c=444;e.d=500;e.e=444;e.f=278;e.g=500;e.h=500;e.i=278;e.j=278;e.k=444;e.l=278;e.m=722;e.n=500;e.o=500;e.p=500;e.q=500;e.r=389;e.s=389;e.t=278;e.u=500;e.v=444;e.w=667;e.x=444;e.y=444;e.z=389;e.braceleft=400;e.bar=275;e.braceright=400;e.asciitilde=541;e.exclamdown=389;e.\
cent=500;e.sterling=500;e.fraction=167;e.yen=500;e.florin=500;e.section=500;e.currency=500;e.quotesingle=214;e.quotedblleft=556;e.guillemotleft=500;e.guilsinglleft=333;e.guilsinglright=333;e.fi=500;e.fl=500;e.endash=500;e.dagger=500;e.daggerdbl=500;e.periodcentered=250;e.paragraph=523;e.bullet=350;e.quotesinglbase=333;e.quotedblbase=556;e.quotedblright=556;e.guillemotright=500;e.ellipsis=889;e.perthousand=1e3;e.questiondown=500;e.grave=333;e.acute=333;e.circumflex=333;e.tilde=333;e.macron=333;e.\
breve=333;e.dotaccent=333;e.dieresis=333;e.ring=333;e.cedilla=333;e.hungarumlaut=333;e.ogonek=333;e.caron=333;e.emdash=889;e.AE=889;e.ordfeminine=276;e.Lslash=556;e.Oslash=722;e.OE=944;e.ordmasculine=310;e.ae=667;e.dotlessi=278;e.lslash=278;e.oslash=500;e.oe=667;e.germandbls=500;e.Idieresis=333;e.eacute=444;e.abreve=500;e.uhungarumlaut=500;e.ecaron=444;e.Ydieresis=556;e.divide=675;e.Yacute=556;e.Acircumflex=611;e.aacute=500;e.Ucircumflex=722;e.yacute=444;e.scommaaccent=389;e.ecircumflex=444;e.Ur\
ing=722;e.Udieresis=722;e.aogonek=500;e.Uacute=722;e.uogonek=500;e.Edieresis=611;e.Dcroat=722;e.commaaccent=250;e.copyright=760;e.Emacron=611;e.ccaron=444;e.aring=500;e.Ncommaaccent=667;e.lacute=278;e.agrave=500;e.Tcommaaccent=556;e.Cacute=667;e.atilde=500;e.Edotaccent=611;e.scaron=389;e.scedilla=389;e.iacute=278;e.lozenge=471;e.Rcaron=611;e.Gcommaaccent=722;e.ucircumflex=500;e.acircumflex=500;e.Amacron=611;e.rcaron=389;e.ccedilla=444;e.Zdotaccent=556;e.Thorn=611;e.Omacron=722;e.Racute=611;e.Sac\
ute=500;e.dcaron=544;e.Umacron=722;e.uring=500;e.threesuperior=300;e.Ograve=722;e.Agrave=611;e.Abreve=611;e.multiply=675;e.uacute=500;e.Tcaron=556;e.partialdiff=476;e.ydieresis=444;e.Nacute=667;e.icircumflex=278;e.Ecircumflex=611;e.adieresis=500;e.edieresis=444;e.cacute=444;e.nacute=500;e.umacron=500;e.Ncaron=667;e.Iacute=333;e.plusminus=675;e.brokenbar=275;e.registered=760;e.Gbreve=722;e.Idotaccent=333;e.summation=600;e.Egrave=611;e.racute=389;e.omacron=500;e.Zacute=556;e.Zcaron=556;e.greatereq\
ual=549;e.Eth=722;e.Ccedilla=667;e.lcommaaccent=278;e.tcaron=300;e.eogonek=444;e.Uogonek=722;e.Aacute=611;e.Adieresis=611;e.egrave=444;e.zacute=389;e.iogonek=278;e.Oacute=722;e.oacute=500;e.amacron=500;e.sacute=389;e.idieresis=278;e.Ocircumflex=722;e.Ugrave=722;e.Delta=612;e.thorn=500;e.twosuperior=300;e.Odieresis=722;e.mu=500;e.igrave=278;e.ohungarumlaut=500;e.Eogonek=611;e.dcroat=500;e.threequarters=750;e.Scedilla=500;e.lcaron=300;e.Kcommaaccent=667;e.Lacute=556;e.trademark=980;e.edotaccent=44\
4;e.Igrave=333;e.Imacron=333;e.Lcaron=611;e.onehalf=750;e.lessequal=549;e.ocircumflex=500;e.ntilde=500;e.Uhungarumlaut=722;e.Eacute=611;e.emacron=444;e.gbreve=500;e.onequarter=750;e.Scaron=500;e.Scommaaccent=500;e.Ohungarumlaut=722;e.degree=400;e.ograve=500;e.Ccaron=667;e.ugrave=500;e.radical=453;e.Dcaron=722;e.rcommaaccent=389;e.Ntilde=667;e.otilde=500;e.Rcommaaccent=611;e.Lcommaaccent=556;e.Atilde=611;e.Aogonek=611;e.Aring=611;e.Otilde=722;e.zdotaccent=389;e.Ecaron=611;e.Iogonek=333;e.kcommaac\
cent=444;e.minus=675;e.Icircumflex=333;e.ncaron=500;e.tcommaaccent=278;e.logicalnot=675;e.odieresis=500;e.udieresis=500;e.notequal=549;e.gcommaaccent=500;e.eth=500;e.zcaron=389;e.ncommaaccent=500;e.onesuperior=300;e.imacron=278;e.Euro=500}));e.ZapfDingbats=getLookupTableFactory((function(e){e.space=278;e.a1=974;e.a2=961;e.a202=974;e.a3=980;e.a4=719;e.a5=789;e.a119=790;e.a118=791;e.a117=690;e.a11=960;e.a12=939;e.a13=549;e.a14=855;e.a15=911;e.a16=933;e.a105=911;e.a17=945;e.a18=974;e.a19=755;e.a20=\
846;e.a21=762;e.a22=761;e.a23=571;e.a24=677;e.a25=763;e.a26=760;e.a27=759;e.a28=754;e.a6=494;e.a7=552;e.a8=537;e.a9=577;e.a10=692;e.a29=786;e.a30=788;e.a31=788;e.a32=790;e.a33=793;e.a34=794;e.a35=816;e.a36=823;e.a37=789;e.a38=841;e.a39=823;e.a40=833;e.a41=816;e.a42=831;e.a43=923;e.a44=744;e.a45=723;e.a46=749;e.a47=790;e.a48=792;e.a49=695;e.a50=776;e.a51=768;e.a52=792;e.a53=759;e.a54=707;e.a55=708;e.a56=682;e.a57=701;e.a58=826;e.a59=815;e.a60=789;e.a61=789;e.a62=707;e.a63=687;e.a64=696;e.a65=689;\
e.a66=786;e.a67=787;e.a68=713;e.a69=791;e.a70=785;e.a71=791;e.a72=873;e.a73=761;e.a74=762;e.a203=762;e.a75=759;e.a204=759;e.a76=892;e.a77=892;e.a78=788;e.a79=784;e.a81=438;e.a82=138;e.a83=277;e.a84=415;e.a97=392;e.a98=392;e.a99=668;e.a100=668;e.a89=390;e.a90=390;e.a93=317;e.a94=317;e.a91=276;e.a92=276;e.a205=509;e.a85=509;e.a206=410;e.a86=410;e.a87=234;e.a88=234;e.a95=334;e.a96=334;e.a101=732;e.a102=544;e.a103=544;e.a104=910;e.a106=667;e.a107=760;e.a108=760;e.a112=776;e.a111=595;e.a110=694;e.a10\
9=626;e.a120=788;e.a121=788;e.a122=788;e.a123=788;e.a124=788;e.a125=788;e.a126=788;e.a127=788;e.a128=788;e.a129=788;e.a130=788;e.a131=788;e.a132=788;e.a133=788;e.a134=788;e.a135=788;e.a136=788;e.a137=788;e.a138=788;e.a139=788;e.a140=788;e.a141=788;e.a142=788;e.a143=788;e.a144=788;e.a145=788;e.a146=788;e.a147=788;e.a148=788;e.a149=788;e.a150=788;e.a151=788;e.a152=788;e.a153=788;e.a154=788;e.a155=788;e.a156=788;e.a157=788;e.a158=788;e.a159=788;e.a160=894;e.a161=838;e.a163=1016;e.a164=458;e.a196=74\
8;e.a165=924;e.a192=748;e.a166=918;e.a167=927;e.a168=928;e.a169=928;e.a170=834;e.a171=873;e.a172=828;e.a173=924;e.a162=924;e.a174=917;e.a175=930;e.a176=931;e.a177=463;e.a178=883;e.a179=836;e.a193=836;e.a180=867;e.a199=867;e.a181=696;e.a200=696;e.a182=874;e.a201=874;e.a183=760;e.a184=946;e.a197=771;e.a185=865;e.a194=771;e.a198=888;e.a186=967;e.a195=888;e.a187=831;e.a188=873;e.a189=927;e.a190=970;e.a191=918}))})),ni=getLookupTableFactory((function(e){e.Courier={ascent:629,descent:-157,capHeight:56\
2,xHeight:-426};e["Courier-Bold"]={ascent:629,descent:-157,capHeight:562,xHeight:439};e["Courier-Oblique"]={ascent:629,descent:-157,capHeight:562,xHeight:426};e["Courier-BoldOblique"]={ascent:629,descent:-157,capHeight:562,xHeight:426};e.Helvetica={ascent:718,descent:-207,capHeight:718,xHeight:523};e["Helvetica-Bold"]={ascent:718,descent:-207,capHeight:718,xHeight:532};e["Helvetica-Oblique"]={ascent:718,descent:-207,capHeight:718,xHeight:523};e["Helvetica-BoldOblique"]={ascent:718,descent:-207,c\
apHeight:718,xHeight:532};e["Times-Roman"]={ascent:683,descent:-217,capHeight:662,xHeight:450};e["Times-Bold"]={ascent:683,descent:-217,capHeight:676,xHeight:461};e["Times-Italic"]={ascent:683,descent:-217,capHeight:653,xHeight:441};e["Times-BoldItalic"]={ascent:683,descent:-217,capHeight:669,xHeight:462};e.Symbol={ascent:Math.NaN,descent:Math.NaN,capHeight:Math.NaN,xHeight:Math.NaN};e.ZapfDingbats={ascent:Math.NaN,descent:Math.NaN,capHeight:Math.NaN,xHeight:Math.NaN}}));class GlyfTable{construc\
tor({glyfTable:e,isGlyphLocationsLong:t,locaTable:a,numGlyphs:r}){this.glyphs=[];const i=new DataView(a.buffer,a.byteOffset,a.byteLength),n=new DataView(e.buffer,e.byteOffset,e.byteLength),s=t?4:2;let o=t?i.getUint32(0):2*i.getUint16(0),c=0;for(let e=0;e<r;e++){c+=s;const e=t?i.getUint32(c):2*i.getUint16(c);if(e===o){this.glyphs.push(new Glyph({}));continue}const a=Glyph.parse(o,n);this.glyphs.push(a);o=e}}getSize(){return Math.sumPrecise(this.glyphs.map((e=>e.getSize()+3&-4)))}write(){const e=t\
his.getSize(),t=new DataView(new ArrayBuffer(e)),a=e>131070,r=a?4:2,i=new DataView(new ArrayBuffer((this.glyphs.length+1)*r));a?i.setUint32(0,0):i.setUint16(0,0);let n=0,s=0;for(const e of this.glyphs){n+=e.write(n,t);n=n+3&-4;s+=r;a?i.setUint32(s,n):i.setUint16(s,n>>1)}return{isLocationLong:a,loca:new Uint8Array(i.buffer),glyf:new Uint8Array(t.buffer)}}scale(e){for(let t=0,a=this.glyphs.length;t<a;t++)this.glyphs[t].scale(e[t])}}class Glyph{constructor({header:e=null,simple:t=null,composites:a=\
null}){this.header=e;this.simple=t;this.composites=a}static parse(e,t){const[a,r]=GlyphHeader.parse(e,t);e+=a;if(r.numberOfContours<0){const a=[];for(;;){const[r,i]=CompositeGlyph.parse(e,t);e+=r;a.push(i);if(!(32&i.flags))break}return new Glyph({header:r,composites:a})}const i=SimpleGlyph.parse(e,t,r.numberOfContours);return new Glyph({header:r,simple:i})}getSize(){if(!this.header)return 0;const e=this.simple?this.simple.getSize():Math.sumPrecise(this.composites.map((e=>e.getSize())));return th\
is.header.getSize()+e}write(e,t){if(!this.header)return 0;const a=e;e+=this.header.write(e,t);if(this.simple)e+=this.simple.write(e,t);else for(const a of this.composites)e+=a.write(e,t);return e-a}scale(e){if(!this.header)return;const t=(this.header.xMin+this.header.xMax)/2;this.header.scale(t,e);if(this.simple)this.simple.scale(t,e);else for(const a of this.composites)a.scale(t,e)}}class GlyphHeader{constructor({numberOfContours:e,xMin:t,yMin:a,xMax:r,yMax:i}){this.numberOfContours=e;this.xMin\
=t;this.yMin=a;this.xMax=r;this.yMax=i}static parse(e,t){return[10,new GlyphHeader({numberOfContours:t.getInt16(e),xMin:t.getInt16(e+2),yMin:t.getInt16(e+4),xMax:t.getInt16(e+6),yMax:t.getInt16(e+8)})]}getSize(){return 10}write(e,t){t.setInt16(e,this.numberOfContours);t.setInt16(e+2,this.xMin);t.setInt16(e+4,this.yMin);t.setInt16(e+6,this.xMax);t.setInt16(e+8,this.yMax);return 10}scale(e,t){this.xMin=Math.round(e+(this.xMin-e)*t);this.xMax=Math.round(e+(this.xMax-e)*t)}}class Contour{constructor\
({flags:e,xCoordinates:t,yCoordinates:a}){this.xCoordinates=t;this.yCoordinates=a;this.flags=e}}class SimpleGlyph{constructor({contours:e,instructions:t}){this.contours=e;this.instructions=t}static parse(e,t,a){const r=[];for(let i=0;i<a;i++){const a=t.getUint16(e);e+=2;r.push(a)}const i=r[a-1]+1,n=t.getUint16(e);e+=2;const s=new Uint8Array(t).slice(e,e+n);e+=n;const o=[];for(let a=0;a<i;e++,a++){let r=t.getUint8(e);o.push(r);if(8&r){const i=t.getUint8(++e);r^=8;for(let e=0;e<i;e++)o.push(r);a+=\
i}}const c=[];let l=[],h=[],u=[];const d=[];let f=0,g=0;for(let a=0;a<i;a++){const i=o[a];if(2&i){const a=t.getUint8(e++);g+=16&i?a:-a;l.push(g)}else if(16&i)l.push(g);else{g+=t.getInt16(e);e+=2;l.push(g)}if(r[f]===a){f++;c.push(l);l=[]}}g=0;f=0;for(let a=0;a<i;a++){const i=o[a];if(4&i){const a=t.getUint8(e++);g+=32&i?a:-a;h.push(g)}else if(32&i)h.push(g);else{g+=t.getInt16(e);e+=2;h.push(g)}u.push(1&i|64&i);if(r[f]===a){l=c[f];f++;d.push(new Contour({flags:u,xCoordinates:l,yCoordinates:h}));h=[\
];u=[]}}return new SimpleGlyph({contours:d,instructions:s})}getSize(){let e=2*this.contours.length+2+this.instructions.length,t=0,a=0;for(const r of this.contours){e+=r.flags.length;for(let i=0,n=r.xCoordinates.length;i<n;i++){const n=r.xCoordinates[i],s=r.yCoordinates[i];let o=Math.abs(n-t);o>255?e+=2:o>0&&(e+=1);t=n;o=Math.abs(s-a);o>255?e+=2:o>0&&(e+=1);a=s}}return e}write(e,t){const a=e,r=[],i=[],n=[];let s=0,o=0;for(const a of this.contours){for(let e=0,t=a.xCoordinates.length;e<t;e++){let \
t=a.flags[e];const c=a.xCoordinates[e];let l=c-s;if(0===l){t|=16;r.push(0)}else{const e=Math.abs(l);if(e<=255){t|=l>=0?18:2;r.push(e)}else r.push(l)}s=c;const h=a.yCoordinates[e];l=h-o;if(0===l){t|=32;i.push(0)}else{const e=Math.abs(l);if(e<=255){t|=l>=0?36:4;i.push(e)}else i.push(l)}o=h;n.push(t)}t.setUint16(e,r.length-1);e+=2}t.setUint16(e,this.instructions.length);e+=2;if(this.instructions.length){new Uint8Array(t.buffer,0,t.buffer.byteLength).set(this.instructions,e);e+=this.instructions.len\
gth}for(const a of n)t.setUint8(e++,a);for(let a=0,i=r.length;a<i;a++){const i=r[a],s=n[a];if(2&s)t.setUint8(e++,i);else if(!(16&s)){t.setInt16(e,i);e+=2}}for(let a=0,r=i.length;a<r;a++){const r=i[a],s=n[a];if(4&s)t.setUint8(e++,r);else if(!(32&s)){t.setInt16(e,r);e+=2}}return e-a}scale(e,t){for(const a of this.contours)if(0!==a.xCoordinates.length)for(let r=0,i=a.xCoordinates.length;r<i;r++)a.xCoordinates[r]=Math.round(e+(a.xCoordinates[r]-e)*t)}}class CompositeGlyph{constructor({flags:e,glyphI\
ndex:t,argument1:a,argument2:r,transf:i,instructions:n}){this.flags=e;this.glyphIndex=t;this.argument1=a;this.argument2=r;this.transf=i;this.instructions=n}static parse(e,t){const a=e,r=[];let i=t.getUint16(e);const n=t.getUint16(e+2);e+=4;let s,o;if(1&i){if(2&i){s=t.getInt16(e);o=t.getInt16(e+2)}else{s=t.getUint16(e);o=t.getUint16(e+2)}e+=4;i^=1}else{if(2&i){s=t.getInt8(e);o=t.getInt8(e+1)}else{s=t.getUint8(e);o=t.getUint8(e+1)}e+=2}if(8&i){r.push(t.getUint16(e));e+=2}else if(64&i){r.push(t.get\
Uint16(e),t.getUint16(e+2));e+=4}else if(128&i){r.push(t.getUint16(e),t.getUint16(e+2),t.getUint16(e+4),t.getUint16(e+6));e+=8}let c=null;if(256&i){const a=t.getUint16(e);e+=2;c=new Uint8Array(t).slice(e,e+a);e+=a}return[e-a,new CompositeGlyph({flags:i,glyphIndex:n,argument1:s,argument2:o,transf:r,instructions:c})]}getSize(){let e=4+2*this.transf.length;256&this.flags&&(e+=2+this.instructions.length);e+=2;2&this.flags?this.argument1>=-128&&this.argument1<=127&&this.argument2>=-128&&this.argument\
2<=127||(e+=2):this.argument1>=0&&this.argument1<=255&&this.argument2>=0&&this.argument2<=255||(e+=2);return e}write(e,t){const a=e;2&this.flags?this.argument1>=-128&&this.argument1<=127&&this.argument2>=-128&&this.argument2<=127||(this.flags|=1):this.argument1>=0&&this.argument1<=255&&this.argument2>=0&&this.argument2<=255||(this.flags|=1);t.setUint16(e,this.flags);t.setUint16(e+2,this.glyphIndex);e+=4;if(1&this.flags){if(2&this.flags){t.setInt16(e,this.argument1);t.setInt16(e+2,this.argument2)\
}else{t.setUint16(e,this.argument1);t.setUint16(e+2,this.argument2)}e+=4}else{t.setUint8(e,this.argument1);t.setUint8(e+1,this.argument2);e+=2}if(256&this.flags){t.setUint16(e,this.instructions.length);e+=2;if(this.instructions.length){new Uint8Array(t.buffer,0,t.buffer.byteLength).set(this.instructions,e);e+=this.instructions.length}}return e-a}scale(e,t){}}function writeInt16(e,t,a){e[t]=a>>8&255;e[t+1]=255&a}function writeInt32(e,t,a){e[t]=a>>24&255;e[t+1]=a>>16&255;e[t+2]=a>>8&255;e[t+3]=255\
&a}function writeData(e,t,a){if(a instanceof Uint8Array)e.set(a,t);else if("string"==typeof a)for(let r=0,i=a.length;r<i;r++)e[t++]=255&a.charCodeAt(r);else for(const r of a)e[t++]=255&r}class OpenTypeFileBuilder{constructor(e){this.sfnt=e;this.tables=Object.create(null)}static getSearchParams(e,t){let a=1,r=0;for(;(a^e)>a;){a<<=1;r++}const i=a*t;return{range:i,entry:r,rangeShift:t*e-i}}toArray(){let e=this.sfnt;const t=this.tables,a=Object.keys(t);a.sort();const r=a.length;let i,n,s,o,c,l=12+16\
*r;const h=[l];for(i=0;i<r;i++){o=t[a[i]];l+=(o.length+3&-4)>>>0;h.push(l)}const u=new Uint8Array(l);for(i=0;i<r;i++){o=t[a[i]];writeData(u,h[i],o)}"true"===e&&(e=string32(65536));u[0]=255&e.charCodeAt(0);u[1]=255&e.charCodeAt(1);u[2]=255&e.charCodeAt(2);u[3]=255&e.charCodeAt(3);writeInt16(u,4,r);const d=OpenTypeFileBuilder.getSearchParams(r,16);writeInt16(u,6,d.range);writeInt16(u,8,d.entry);writeInt16(u,10,d.rangeShift);l=12;for(i=0;i<r;i++){c=a[i];u[l]=255&c.charCodeAt(0);u[l+1]=255&c.charCod\
eAt(1);u[l+2]=255&c.charCodeAt(2);u[l+3]=255&c.charCodeAt(3);let e=0;for(n=h[i],s=h[i+1];n<s;n+=4){e=e+readUint32(u,n)>>>0}writeInt32(u,l+4,e);writeInt32(u,l+8,h[i]);writeInt32(u,l+12,t[c].length);l+=16}return u}addTable(e,t){if(e in this.tables)throw new Error("Table "+e+" already exists");this.tables[e]=t}}const si=[4],oi=[5],ci=[6],li=[7],hi=[8],ui=[12,35],di=[14],fi=[21],gi=[22],pi=[30],mi=[31];class Type1CharString{constructor(){this.width=0;this.lsb=0;this.flexing=!1;this.output=[];this.st\
ack=[]}convert(e,t,a){const r=e.length;let i,n,s,o=!1;for(let c=0;c<r;c++){let r=e[c];if(r<32){12===r&&(r=(r<<8)+e[++c]);switch(r){case 1:case 3:case 9:case 3072:case 3073:case 3074:case 3105:this.stack=[];break;case 4:if(this.flexing){if(this.stack.length<1){o=!0;break}const e=this.stack.pop();this.stack.push(0,e);break}o=this.executeCommand(1,si);break;case 5:o=this.executeCommand(2,oi);break;case 6:o=this.executeCommand(1,ci);break;case 7:o=this.executeCommand(1,li);break;case 8:o=this.execut\
eCommand(6,hi);break;case 10:if(this.stack.length<1){o=!0;break}s=this.stack.pop();if(!t[s]){o=!0;break}o=this.convert(t[s],t,a);break;case 11:return o;case 13:if(this.stack.length<2){o=!0;break}i=this.stack.pop();n=this.stack.pop();this.lsb=n;this.width=i;this.stack.push(i,n);o=this.executeCommand(2,gi);break;case 14:this.output.push(di[0]);break;case 21:if(this.flexing)break;o=this.executeCommand(2,fi);break;case 22:if(this.flexing){this.stack.push(0);break}o=this.executeCommand(1,gi);break;ca\
se 30:o=this.executeCommand(4,pi);break;case 31:o=this.executeCommand(4,mi);break;case 3078:if(a){const e=this.stack.at(-5);this.seac=this.stack.splice(-4,4);this.seac[0]+=this.lsb-e;o=this.executeCommand(0,di)}else o=this.executeCommand(4,di);break;case 3079:if(this.stack.length<4){o=!0;break}this.stack.pop();i=this.stack.pop();const e=this.stack.pop();n=this.stack.pop();this.lsb=n;this.width=i;this.stack.push(i,n,e);o=this.executeCommand(3,fi);break;case 3084:if(this.stack.length<2){o=!0;break\
}const c=this.stack.pop(),l=this.stack.pop();this.stack.push(l/c);break;case 3088:if(this.stack.length<2){o=!0;break}s=this.stack.pop();const h=this.stack.pop();if(0===s&&3===h){const e=this.stack.splice(-17,17);this.stack.push(e[2]+e[0],e[3]+e[1],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14]);o=this.executeCommand(13,ui,!0);this.flexing=!1;this.stack.push(e[15],e[16])}else 1===s&&0===h&&(this.flexing=!0);break;case 3089:break;default:warn(\'Unknown type 1 charstring command of "\'+r\
+\'"\')}if(o)break}else{r<=246?r-=139:r=r<=250?256*(r-247)+e[++c]+108:r<=254?-256*(r-251)-e[++c]-108:(255&e[++c])<<24|(255&e[++c])<<16|(255&e[++c])<<8|255&e[++c];this.stack.push(r)}}return o}executeCommand(e,t,a){const r=this.stack.length;if(e>r)return!0;const i=r-e;for(let e=i;e<r;e++){let t=this.stack[e];if(Number.isInteger(t))this.output.push(28,t>>8&255,255&t);else{t=65536*t|0;this.output.push(255,t>>24&255,t>>16&255,t>>8&255,255&t)}}this.output.push(...t);a?this.stack.splice(i,e):this.stack.l\
ength=0;return!1}}function isHexDigit(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function decrypt(e,t,a){if(a>=e.length)return new Uint8Array(0);let r,i,n=0|t;for(r=0;r<a;r++)n=52845*(e[r]+n)+22719&65535;const s=e.length-a,o=new Uint8Array(s);for(r=a,i=0;i<s;r++,i++){const t=e[r];o[i]=t^n>>8;n=52845*(t+n)+22719&65535}return o}function isSpecial(e){return 47===e||91===e||93===e||123===e||125===e||40===e||41===e}class Type1Parser{constructor(e,t,a){if(t){const t=e.getBytes(),a=!((isHexDig\
it(t[0])||isWhiteSpace(t[0]))&&isHexDigit(t[1])&&isHexDigit(t[2])&&isHexDigit(t[3])&&isHexDigit(t[4])&&isHexDigit(t[5])&&isHexDigit(t[6])&&isHexDigit(t[7]));e=new Stream(a?decrypt(t,55665,4):function decryptAscii(e,t,a){let r=0|t;const i=e.length,n=new Uint8Array(i>>>1);let s,o;for(s=0,o=0;s<i;s++){const t=e[s];if(!isHexDigit(t))continue;s++;let a;for(;s<i&&!isHexDigit(a=e[s]);)s++;if(s<i){const e=parseInt(String.fromCharCode(t,a),16);n[o++]=e^r>>8;r=52845*(e+r)+22719&65535}}return n.slice(a,o)}\
(t,55665,4))}this.seacAnalysisEnabled=!!a;this.stream=e;this.nextChar()}readNumberArray(){this.getToken();const e=[];for(;;){const t=this.getToken();if(null===t||"]"===t||"}"===t)break;e.push(parseFloat(t||0))}return e}readNumber(){const e=this.getToken();return parseFloat(e||0)}readInt(){const e=this.getToken();return 0|parseInt(e||0,10)}readBoolean(){return"true"===this.getToken()?1:0}nextChar(){return this.currentChar=this.stream.getByte()}prevChar(){this.stream.skip(-2);return this.currentCh\
ar=this.stream.getByte()}getToken(){let e=!1,t=this.currentChar;for(;;){if(-1===t)return null;if(e)10!==t&&13!==t||(e=!1);else if(37===t)e=!0;else if(!isWhiteSpace(t))break;t=this.nextChar()}if(isSpecial(t)){this.nextChar();return String.fromCharCode(t)}let a="";do{a+=String.fromCharCode(t);t=this.nextChar()}while(t>=0&&!isWhiteSpace(t)&&!isSpecial(t));return a}readCharStrings(e,t){return-1===t?e:decrypt(e,4330,t)}extractFontProgram(e){const t=this.stream,a=[],r=[],i=Object.create(null);i.lenIV=\
4;const n={subrs:[],charstrings:[],properties:{privateData:i}};let s,o,c,l;for(;null!==(s=this.getToken());)if("/"===s){s=this.getToken();switch(s){case"CharStrings":this.getToken();this.getToken();this.getToken();this.getToken();for(;;){s=this.getToken();if(null===s||"end"===s)break;if("/"!==s)continue;const e=this.getToken();o=this.readInt();this.getToken();c=o>0?t.getBytes(o):new Uint8Array(0);l=n.properties.privateData.lenIV;const a=this.readCharStrings(c,l);this.nextChar();s=this.getToken()\
;"noaccess"===s?this.getToken():"/"===s&&this.prevChar();r.push({glyph:e,encoded:a})}break;case"Subrs":this.readInt();this.getToken();for(;"dup"===this.getToken();){const e=this.readInt();o=this.readInt();this.getToken();c=o>0?t.getBytes(o):new Uint8Array(0);l=n.properties.privateData.lenIV;const r=this.readCharStrings(c,l);this.nextChar();s=this.getToken();"noaccess"===s&&this.getToken();a[e]=r}break;case"BlueValues":case"OtherBlues":case"FamilyBlues":case"FamilyOtherBlues":const e=this.readNum\
berArray();e.length>0&&e.length,0;break;case"StemSnapH":case"StemSnapV":n.properties.privateData[s]=this.readNumberArray();break;case"StdHW":case"StdVW":n.properties.privateData[s]=this.readNumberArray()[0];break;case"BlueShift":case"lenIV":case"BlueFuzz":case"BlueScale":case"LanguageGroup":n.properties.privateData[s]=this.readNumber();break;case"ExpansionFactor":n.properties.privateData[s]=this.readNumber()||.06;break;case"ForceBold":n.properties.privateData[s]=this.readBoolean()}}for(const{enc\
oded:t,glyph:i}of r){const r=new Type1CharString,s=r.convert(t,a,this.seacAnalysisEnabled);let o=r.output;s&&(o=[14]);const c={glyphName:i,charstring:o,width:r.width,lsb:r.lsb,seac:r.seac};".notdef"===i?n.charstrings.unshift(c):n.charstrings.push(c);if(e.builtInEncoding){const t=e.builtInEncoding.indexOf(i);t>-1&&void 0===e.widths[t]&&t>=e.firstChar&&t<=e.lastChar&&(e.widths[t]=r.width)}}return n}extractFontHeader(e){let t;for(;null!==(t=this.getToken());)if("/"===t){t=this.getToken();switch(t){\
case"FontMatrix":const a=this.readNumberArray();e.fontMatrix=a;break;case"Encoding":const r=this.getToken();let i;if(/^\\d+$/.test(r)){i=[];const e=0|parseInt(r,10);this.getToken();for(let a=0;a<e;a++){t=this.getToken();for(;"dup"!==t&&"def"!==t;){t=this.getToken();if(null===t)return}if("def"===t)break;const e=this.readInt();this.getToken();const a=this.getToken();i[e]=a;this.getToken()}}else i=getEncoding(r);e.builtInEncoding=i;break;case"FontBBox":const n=this.readNumberArray();e.ascent=Math.ma\
x(n[3],n[1]);e.descent=Math.min(n[1],n[3]);e.ascentScaled=!0}}}}function findBlock(e,t,a){const r=e.length,i=t.length,n=r-i;let s=a,o=!1;for(;s<n;){let a=0;for(;a<i&&e[s+a]===t[a];)a++;if(a>=i){s+=a;for(;s<r&&isWhiteSpace(e[s]);)s++;o=!0;break}s++}return{found:o,length:s}}class Type1Font{constructor(e,t,a){let r=a.length1,i=a.length2,n=t.peekBytes(6);const s=128===n[0]&&1===n[1];if(s){t.skip(6);r=n[5]<<24|n[4]<<16|n[3]<<8|n[2]}const o=function getHeaderBlock(e,t){const a=[101,101,120,101,99],r=e\
.pos;let i,n,s,o;try{i=e.getBytes(t);n=i.length}catch{}if(n===t){s=findBlock(i,a,t-2*a.length);if(s.found&&s.length===t)return{stream:new Stream(i),length:t}}warn(\'Invalid "Length1" property in Type1 font -- trying to recover.\');e.pos=r;for(;;){s=findBlock(e.peekBytes(2048),a,0);if(0===s.length)break;e.pos+=s.length;if(s.found){o=e.pos-r;break}}e.pos=r;if(o)return{stream:new Stream(e.getBytes(o)),length:o};warn(\'Unable to recover "Length1" property in Type1 font -- using as is.\');return{stream:n\
ew Stream(e.getBytes(t)),length:t}}(t,r);new Type1Parser(o.stream,!1,Rr).extractFontHeader(a);if(s){n=t.getBytes(6);i=n[5]<<24|n[4]<<16|n[3]<<8|n[2]}const c=function getEexecBlock(e,t){const a=e.getBytes();if(0===a.length)throw new FormatError("getEexecBlock - no font program found.");return{stream:new Stream(a),length:a.length}}(t),l=new Type1Parser(c.stream,!0,Rr).extractFontProgram(a);for(const e in l.properties)a[e]=l.properties[e];const h=l.charstrings,u=this.getType2Charstrings(h),d=this.g\
etType2Subrs(l.subrs);this.charstrings=h;this.data=this.wrap(e,u,this.charstrings,d,a);this.seacs=this.getSeacs(l.charstrings)}get numGlyphs(){return this.charstrings.length+1}getCharset(){const e=[".notdef"];for(const{glyphName:t}of this.charstrings)e.push(t);return e}getGlyphMapping(e){const t=this.charstrings;if(e.composite){const a=Object.create(null);for(let r=0,i=t.length;r<i;r++){a[e.cMap.charCodeOf(r)]=r+1}return a}const a=[".notdef"];let r,i;for(i=0;i<t.length;i++)a.push(t[i].glyphName)\
;const n=e.builtInEncoding;if(n){r=Object.create(null);for(const e in n){i=a.indexOf(n[e]);i>=0&&(r[e]=i)}}return type1FontGlyphMapping(e,r,a)}hasGlyphId(e){if(e<0||e>=this.numGlyphs)return!1;if(0===e)return!0;return this.charstrings[e-1].charstring.length>0}getSeacs(e){const t=[];for(let a=0,r=e.length;a<r;a++){const r=e[a];r.seac&&(t[a+1]=r.seac)}return t}getType2Charstrings(e){const t=[];for(const a of e)t.push(a.charstring);return t}getType2Subrs(e){let t=0;const a=e.length;t=a<1133?107:a<33\
769?1131:32768;const r=[];let i;for(i=0;i<t;i++)r.push([11]);for(i=0;i<a;i++)r.push(e[i]);return r}wrap(e,t,a,r,i){const n=new CFF;n.header=new CFFHeader(1,0,4,4);n.names=[e];const s=new CFFTopDict;s.setByName("version",391);s.setByName("Notice",392);s.setByName("FullName",393);s.setByName("FamilyName",394);s.setByName("Weight",395);s.setByName("Encoding",null);s.setByName("FontMatrix",i.fontMatrix);s.setByName("FontBBox",i.bbox);s.setByName("charset",null);s.setByName("CharStrings",null);s.setB\
yName("Private",null);n.topDict=s;const o=new CFFStrings;o.add("Version 0.11");o.add("See original notice");o.add(e);o.add(e);o.add("Medium");n.strings=o;n.globalSubrIndex=new CFFIndex;const c=t.length,l=[".notdef"];let h,u;for(h=0;h<c;h++){const e=a[h].glyphName;-1===Hr.indexOf(e)&&o.add(e);l.push(e)}n.charset=new CFFCharset(!1,0,l);const d=new CFFIndex;d.add([139,14]);for(h=0;h<c;h++)d.add(t[h]);n.charStrings=d;const f=new CFFPrivateDict;f.setByName("Subrs",null);const g=["BlueValues","OtherBl\
ues","FamilyBlues","FamilyOtherBlues","StemSnapH","StemSnapV","BlueShift","BlueFuzz","BlueScale","LanguageGroup","ExpansionFactor","ForceBold","StdHW","StdVW"];for(h=0,u=g.length;h<u;h++){const e=g[h];if(!(e in i.privateData))continue;const t=i.privateData[e];if(Array.isArray(t))for(let e=t.length-1;e>0;e--)t[e]-=t[e-1];f.setByName(e,t)}n.topDict.privateDict=f;const p=new CFFIndex;for(h=0,u=r.length;h<u;h++)p.add(r[h]);f.subrsIndex=p;return new CFFCompiler(n).compile()}}const bi=[[57344,63743],[\
1048576,1114109]],yi=1e3,wi=["ascent","bbox","black","bold","charProcOperatorList","cssFontInfo","data","defaultVMetrics","defaultWidth","descent","disableFontFace","fallbackName","fontExtraProperties","fontMatrix","isInvalidPDFjsFont","isType3Font","italic","loadedName","mimetype","missingFile","name","remeasure","systemFontInfo","vertical"],xi=["cMap","composite","defaultEncoding","differences","isMonospace","isSerifFont","isSymbolicFont","seacMap","subtype","toFontChar","toUnicode","type","vm\
etrics","widths"];function adjustWidths(e){if(!e.fontMatrix)return;if(e.fontMatrix[0]===t[0])return;const a=.001/e.fontMatrix[0],r=e.widths;for(const e in r)r[e]*=a;e.defaultWidth*=a}function amendFallbackToUnicode(e){if(!e.fallbackToUnicode)return;if(e.toUnicode instanceof IdentityToUnicodeMap)return;const t=[];for(const a in e.fallbackToUnicode)e.toUnicode.has(a)||(t[a]=e.fallbackToUnicode[a]);t.length>0&&e.toUnicode.amend(t)}class fonts_Glyph{constructor(e,t,a,r,i,n,s,o,c){this.originalCharCo\
de=e;this.fontChar=t;this.unicode=a;this.accent=r;this.width=i;this.vmetric=n;this.operatorListId=s;this.isSpace=o;this.isInFont=c}get category(){return shadow(this,"category",function getCharUnicodeCategory(e){const t=Dr.get(e);if(t)return t;const a=e.match(Mr),r={isWhitespace:!!a?.[1],isZeroWidthDiacritic:!!a?.[2],isInvisibleFormatMark:!!a?.[3]};Dr.set(e,r);return r}(this.unicode),!0)}}function int16(e,t){return(e<<8)+t}function writeSignedInt16(e,t,a){e[t+1]=a;e[t]=a>>>8}function signedInt16(\
e,t){const a=(e<<8)+t;return 32768&a?a-65536:a}function string16(e){return String.fromCharCode(e>>8&255,255&e)}function safeString16(e){e>32767?e=32767:e<-32768&&(e=-32768);return String.fromCharCode(e>>8&255,255&e)}function isTrueTypeCollectionFile(e){return"ttcf"===bytesToString(e.peekBytes(4))}function getFontFileType(e,{type:t,subtype:a,composite:r}){let i,n;if(function isTrueTypeFile(e){const t=e.peekBytes(4);return 65536===readUint32(t,0)||"true"===bytesToString(t)}(e)||isTrueTypeCollectio\
nFile(e))i=r?"CIDFontType2":"TrueType";else if(function isOpenTypeFile(e){return"OTTO"===bytesToString(e.peekBytes(4))}(e))i=r?"CIDFontType2":"OpenType";else if(function isType1File(e){const t=e.peekBytes(2);return 37===t[0]&&33===t[1]||128===t[0]&&1===t[1]}(e))i=r?"CIDFontType0":"MMType1"===t?"MMType1":"Type1";else if(function isCFFFile(e){const t=e.peekBytes(4);return t[0]>=1&&t[3]>=1&&t[3]<=4}(e))if(r){i="CIDFontType0";n="CIDFontType0C"}else{i="MMType1"===t?"MMType1":"Type1";n="Type1C"}else{w\
arn("getFontFileType: Unable to detect correct font file Type/Subtype.");i=t;n=a}return[i,n]}function applyStandardFontGlyphMap(e,t){for(const a in t)e[+a]=t[a]}function buildToFontChar(e,t,a){const r=[];let i;for(let a=0,n=e.length;a<n;a++){i=getUnicodeForGlyph(e[a],t);-1!==i&&(r[a]=i)}for(const e in a){i=getUnicodeForGlyph(a[e],t);-1!==i&&(r[+e]=i)}return r}function isMacNameRecord(e){return 1===e.platform&&0===e.encoding&&0===e.language}function isWinNameRecord(e){return 3===e.platform&&1===e\
.encoding&&1033===e.language}function convertCidString(e,t,a=!1){switch(t.length){case 1:return t.charCodeAt(0);case 2:return t.charCodeAt(0)<<8|t.charCodeAt(1)}const r=`Unsupported CID string (charCode ${e}): "${t}".`;if(a)throw new FormatError(r);warn(r);return t}function adjustMapping(e,t,a,r){const i=Object.create(null),n=new Map,s=[],o=new Set;let c=0;let l=bi[c][0],h=bi[c][1];let u=null;for(const f in e){let g=e[f];if(!t(g))continue;if(l>h){c++;if(c>=bi.length){warn("Ran out of space in fo\
nt private use area.");break}l=bi[c][0];h=bi[c][1]}const p=l++;0===g&&(g=a);let m=r.get(f);if("string"==typeof m)if(1===m.length)m=m.codePointAt(0);else{if(!u){u=new Map;for(let e=64256;e<=64335;e++){const t=String.fromCharCode(e).normalize("NFKD");t.length>1&&u.set(t,e)}}m=u.get(m)||m.codePointAt(0)}if(m&&!(d=m,bi[0][0]<=d&&d<=bi[0][1]||bi[1][0]<=d&&d<=bi[1][1])&&!o.has(g)){n.set(m,g);o.add(g)}i[p]=g;s[f]=p}var d;return{toFontChar:s,charCodeToGlyphId:i,toUnicodeExtraMap:n,nextAvailableFontCharC\
ode:l}}function createCmapTable(e,t,a){const r=function getRanges(e,t,a){const r=[];for(const t in e)e[t]>=a||r.push({fontCharCode:0|t,glyphId:e[t]});if(t)for(const[e,i]of t)i>=a||r.push({fontCharCode:e,glyphId:i});0===r.length&&r.push({fontCharCode:0,glyphId:0});r.sort(((e,t)=>e.fontCharCode-t.fontCharCode));const i=[],n=r.length;for(let e=0;e<n;){const t=r[e].fontCharCode,a=[r[e].glyphId];++e;let s=t;for(;e<n&&s+1===r[e].fontCharCode;){a.push(r[e].glyphId);++s;++e;if(65535===s)break}i.push([t,\
s,a])}return i}(e,t,a),i=r.at(-1)[1]>65535?2:1;let n,s,o,c,l="\\0\\0"+string16(i)+"\\0\\0"+string32(4+8*i);for(n=r.length-1;n>=0&&!(r[n][0]<=65535);--n);const h=n+1;r[n][0]<65535&&65535===r[n][1]&&(r[n][1]=65534);const u=r[n][1]<65535?1:0,d=h+u,f=OpenTypeFileBuilder.getSearchParams(d,2);let g,p,m,b,y="",w="",x="",S="",k="",C=0;for(n=0,s=h;n<s;n++){g=r[n];p=g[0];m=g[1];y+=string16(p);w+=string16(m);b=g[2];let e=!0;for(o=1,c=b.length;o<c;++o)if(b[o]!==b[o-1]+1){e=!1;break}if(e){x+=string16(b[0]-p&65\
535);S+=string16(0)}else{const e=2*(d-n)+2*C;C+=m-p+1;x+=string16(0);S+=string16(e);for(o=0,c=b.length;o<c;++o)k+=string16(b[o])}}if(u>0){w+="ÿÿ";y+="ÿÿ";x+="\\0";S+="\\0\\0"}const v="\\0\\0"+string16(2*d)+string16(f.range)+string16(f.entry)+string16(f.rangeShift)+w+"\\0\\0"+y+x+S+k;let F="",T="";if(i>1){l+="\\0\\0\\n"+string32(4+8*i+4+v.length);F="";for(n=0,s=r.length;n<s;n++){g=r[n];p=g[0];b=g[2];let e=b[0];for(o=1,c=b.length;o<c;++o)if(b[o]!==b[o-1]+1){m=g[0]+o-1;F+=string32(p)+string32(m)+string32(e\
);p=m+1;e=b[o]}F+=string32(p)+string32(g[1])+string32(e)}T="\\0\\f\\0\\0"+string32(F.length+16)+"\\0\\0\\0\\0"+string32(F.length/12)}return l+"\\0"+string16(v.length+4)+v+T+F}function createOS2Table(e,t,a){a||={unitsPerEm:0,yMax:0,yMin:0,ascent:0,descent:0};let r=0,i=0,n=0,s=0,o=null,c=0,l=-1;if(t){for(let e in t){e|=0;(o>e||!o)&&(o=e);c<e&&(c=e);l=getUnicodeRangeFor(e,l);if(l<32)r|=1<<l;else if(l<64)i|=1<<l-32;else if(l<96)n|=1<<l-64;else{if(!(l<123))throw new FormatError("Unicode ranges Bits > 123 are\
 reserved for internal usage");s|=1<<l-96}}c>65535&&(c=65535)}else{o=0;c=255}const h=e.bbox||[0,0,0,0],u=a.unitsPerEm||(e.fontMatrix?1/Math.max(...e.fontMatrix.slice(0,4).map(Math.abs)):1e3),d=e.ascentScaled?1:u/yi,f=a.ascent||Math.round(d*(e.ascent||h[3]));let g=a.descent||Math.round(d*(e.descent||h[1]));g>0&&e.descent>0&&h[1]<0&&(g=-g);const p=a.yMax||f,m=-a.yMin||-g;return"\\0$ô\\0\\0\\0»\\0\\0\\0»\\0\\0ß\\x001\\0\\0\\0\\0"+String.fromCharCode(e.fixedPitch?9:0)+"\\0\\0\\0\\0\\0\\0"+string32(r)+str\
ing32(i)+string32(n)+string32(s)+"*21*"+string16(e.italicAngle?1:0)+string16(o||e.firstChar)+string16(c||e.lastChar)+string16(f)+string16(g)+"\\0d"+string16(p)+string16(m)+"\\0\\0\\0\\0\\0\\0\\0\\0"+string16(e.xHeight)+string16(e.capHeight)+string16(0)+string16(o||e.firstChar)+"\\0"}function createPostTable(e){return"\\0\\0\\0"+string32(Math.floor(65536*e.italicAngle))+"\\0\\0\\0\\0"+string32(e.fixedPitch?1:0)+"\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0"}function createPostscriptName(e){return e.replaceAll(/[^\\x21-\\x7E]\
|[[\\](){}<>/%]/g,"").slice(0,63)}function createNameTable(e,t){t||(t=[[],[]]);const a=[t[0][0]||"Original licence",t[0][1]||e,t[0][2]||"Unknown",t[0][3]||"uniqueID",t[0][4]||e,t[0][5]||"Version 0.11",t[0][6]||createPostscriptName(e),t[0][7]||"Unknown",t[0][8]||"Unknown",t[0][9]||"Unknown"],r=[];let i,n,s,o,c;for(i=0,n=a.length;i<n;i++){c=t[1][i]||a[i];const e=[];for(s=0,o=c.length;s<o;s++)e.push(string16(c.charCodeAt(s)));r.push(e.join(""))}const l=[a,r],h=["\\0","\\0"],u=["\\0\\0","\\0"],d=["\\0\\0\
","\\t"],f=a.length*h.length;let g="\\0\\0"+string16(f)+string16(12*f+6),p=0;for(i=0,n=h.length;i<n;i++){const e=l[i];for(s=0,o=e.length;s<o;s++){c=e[s];g+=h[i]+u[i]+d[i]+string16(s)+string16(c.length)+string16(p);p+=c.length}}g+=a.join("")+r.join("");return g}class Font{constructor(e,t,a,r){this.name=e;this.psName=null;this.mimetype=null;this.disableFontFace=r.disableFontFace;this.fontExtraProperties=r.fontExtraProperties;this.loadedName=a.loadedName;this.isType3Font=a.isType3Font;this.missingFil\
e=!1;this.cssFontInfo=a.cssFontInfo;this._charsCache=Object.create(null);this._glyphCache=Object.create(null);let i=!!(a.flags&Er);if(!i&&!a.isSimulatedFlags){const t=e.replaceAll(/[,_]/g,"-").split("-",1)[0],a=Qr();for(const e of t.split("+"))if(a[e]){i=!0;break}}this.isSerifFont=i;this.isSymbolicFont=!!(a.flags&Pr);this.isMonospace=!!(a.flags&Nr);let{type:n,subtype:s}=a;this.type=n;this.subtype=s;this.systemFontInfo=a.systemFontInfo;const o=e.match(/^InvalidPDFjsFont_(.*)_\\d+$/);this.isInvalid\
PDFjsFont=!!o;this.isInvalidPDFjsFont?this.fallbackName=o[1]:this.isMonospace?this.fallbackName="monospace":this.isSerifFont?this.fallbackName="serif":this.fallbackName="sans-serif";if(this.systemFontInfo?.guessFallback){this.systemFontInfo.guessFallback=!1;this.systemFontInfo.css+=`,${this.fallbackName}`}this.differences=a.differences;this.widths=a.widths;this.defaultWidth=a.defaultWidth;this.composite=a.composite;this.cMap=a.cMap;this.capHeight=a.capHeight/yi;this.ascent=a.ascent/yi;this.desce\
nt=a.descent/yi;this.lineHeight=this.ascent-this.descent;this.fontMatrix=a.fontMatrix;this.bbox=a.bbox;this.defaultEncoding=a.defaultEncoding;this.toUnicode=a.toUnicode;this.toFontChar=[];if("Type3"===a.type){for(let e=0;e<256;e++)this.toFontChar[e]=this.differences[e]||a.defaultEncoding[e];return}this.cidEncoding=a.cidEncoding||"";this.vertical=!!a.vertical;if(this.vertical){this.vmetrics=a.vmetrics;this.defaultVMetrics=a.defaultVMetrics}if(!t||t.isEmpty){t&&warn(\'Font file is empty in "\'+e+\'" \
(\'+this.loadedName+")");this.fallbackToSystemFont(a);return}[n,s]=getFontFileType(t,a);n===this.type&&s===this.subtype||info(`Inconsistent font file Type/SubType, expected: ${this.type}/${this.subtype} but found: ${n}/${s}.`);let c;try{switch(n){case"MMType1":info("MMType1 font ("+e+"), falling back to Type1.");case"Type1":case"CIDFontType0":this.mimetype="font/opentype";const r="Type1C"===s||"CIDFontType0C"===s?new CFFFont(t,a):new Type1Font(e,t,a);adjustWidths(a);c=this.convert(e,r,a);break;ca\
se"OpenType":case"TrueType":case"CIDFontType2":this.mimetype="font/opentype";c=this.checkAndRepair(e,t,a);adjustWidths(a);this.isOpenType&&(n="OpenType");break;default:throw new FormatError(`Font ${n} is not supported`)}}catch(e){warn(e);this.fallbackToSystemFont(a);return}amendFallbackToUnicode(a);this.data=c;this.type=n;this.subtype=s;this.fontMatrix=a.fontMatrix;this.widths=a.widths;this.defaultWidth=a.defaultWidth;this.toUnicode=a.toUnicode;this.seacMap=a.seacMap}get renderer(){return shadow\
(this,"renderer",FontRendererFactory.create(this,Rr))}exportData(){const e=this.fontExtraProperties?[...wi,...xi]:wi,t=Object.create(null);for(const a of e){const e=this[a];void 0!==e&&(t[a]=e)}return t}fallbackToSystemFont(e){this.missingFile=!0;const{name:t,type:a}=this;let r=normalizeFontName(t);const i=Jr(),n=Zr(),s=!!i[r],o=!(!n[r]||!i[n[r]]);r=i[r]||n[r]||r;const c=ni()[r];if(c){isNaN(this.ascent)&&(this.ascent=c.ascent/yi);isNaN(this.descent)&&(this.descent=c.descent/yi);isNaN(this.capHei\
ght)&&(this.capHeight=c.capHeight/yi)}this.bold=/bold/gi.test(r);this.italic=/oblique|italic/gi.test(r);this.black=/Black/g.test(t);const l=/Narrow/g.test(t);this.remeasure=(!s||l)&&Object.keys(this.widths).length>0;if((s||o)&&"CIDFontType2"===a&&this.cidEncoding.startsWith("Identity-")){const a=e.cidToGidMap,r=[];applyStandardFontGlyphMap(r,ti());/Arial-?Black/i.test(t)?applyStandardFontGlyphMap(r,ai()):/Calibri/i.test(t)&&applyStandardFontGlyphMap(r,ri());if(a){for(const e in r){const t=r[e];v\
oid 0!==a[t]&&(r[+e]=a[t])}a.length!==this.toUnicode.length&&e.hasIncludedToUnicodeMap&&this.toUnicode instanceof IdentityToUnicodeMap&&this.toUnicode.forEach((function(e,t){const i=r[e];void 0===a[i]&&(r[+e]=t)}))}this.toUnicode instanceof IdentityToUnicodeMap||this.toUnicode.forEach((function(e,t){r[+e]=t}));this.toFontChar=r;this.toUnicode=new ToUnicodeMap(r)}else if(/Symbol/i.test(r))this.toFontChar=buildToFontChar(Cr,Fr(),this.differences);else if(/Dingbats/i.test(r))this.toFontChar=buildTo\
FontChar(vr,Ir(),this.differences);else if(s||o){const e=buildToFontChar(this.defaultEncoding,Fr(),this.differences);"CIDFontType2"!==a||this.cidEncoding.startsWith("Identity-")||this.toUnicode instanceof IdentityToUnicodeMap||this.toUnicode.forEach((function(t,a){e[+t]=a}));this.toFontChar=e}else{const e=Fr(),a=[];this.toUnicode.forEach(((t,r)=>{if(!this.composite){const a=getUnicodeForGlyph(this.differences[t]||this.defaultEncoding[t],e);-1!==a&&(r=a)}a[+t]=r}));this.composite&&this.toUnicode \
instanceof IdentityToUnicodeMap&&/Tahoma|Verdana/i.test(t)&&applyStandardFontGlyphMap(a,ti());this.toFontChar=a}amendFallbackToUnicode(e);this.loadedName=r.split("-",1)[0]}checkAndRepair(e,t,a){const r=["OS/2","cmap","head","hhea","hmtx","maxp","name","post","loca","glyf","fpgm","prep","cvt ","CFF "];function readTables(e,t){const a=Object.create(null);a["OS/2"]=null;a.cmap=null;a.head=null;a.hhea=null;a.hmtx=null;a.maxp=null;a.name=null;a.post=null;for(let i=0;i<t;i++){const t=readTableEntry(e)\
;r.includes(t.tag)&&(0!==t.length&&(a[t.tag]=t))}return a}function readTableEntry(e){const t=e.getString(4),a=e.getInt32()>>>0,r=e.getInt32()>>>0,i=e.getInt32()>>>0,n=e.pos;e.pos=e.start||0;e.skip(r);const s=e.getBytes(i);e.pos=n;if("head"===t){s[8]=s[9]=s[10]=s[11]=0;s[17]|=32}return{tag:t,checksum:a,length:i,offset:r,data:s}}function readOpenTypeHeader(e){return{version:e.getString(4),numTables:e.getUint16(),searchRange:e.getUint16(),entrySelector:e.getUint16(),rangeShift:e.getUint16()}}functi\
on sanitizeGlyph(e,t,a,r,i,n){const s={length:0,sizeOfInstructions:0};if(t<0||t>=e.length||a>e.length||a-t<=12)return s;const o=e.subarray(t,a),c=signedInt16(o[2],o[3]),l=signedInt16(o[4],o[5]),h=signedInt16(o[6],o[7]),u=signedInt16(o[8],o[9]);if(c>h){writeSignedInt16(o,2,h);writeSignedInt16(o,6,c)}if(l>u){writeSignedInt16(o,4,u);writeSignedInt16(o,8,l)}const d=signedInt16(o[0],o[1]);if(d<0){if(d<-1)return s;r.set(o,i);s.length=o.length;return s}let f,g=10,p=0;for(f=0;f<d;f++){p=(o[g]<<8|o[g+1])\
+1;g+=2}const m=g,b=o[g]<<8|o[g+1];s.sizeOfInstructions=b;g+=2+b;const y=g;let w=0;for(f=0;f<p;f++){const e=o[g++];192&e&&(o[g-1]=63&e);let t=2;2&e?t=1:16&e&&(t=0);let a=2;4&e?a=1:32&e&&(a=0);const r=t+a;w+=r;if(8&e){const e=o[g++];0===e&&(o[g-1]^=8);f+=e;w+=e*r}}if(0===w)return s;let x=g+w;if(x>o.length)return s;if(!n&&b>0){r.set(o.subarray(0,m),i);r.set([0,0],i+m);r.set(o.subarray(y,x),i+m+2);x-=b;o.length-x>3&&(x=x+3&-4);s.length=x;return s}if(o.length-x>3){x=x+3&-4;r.set(o.subarray(0,x),i);s\
.length=x;return s}r.set(o,i);s.length=o.length;return s}function readNameTable(e){const a=(t.start||0)+e.offset;t.pos=a;const r=[[],[]],i=[],n=e.length,s=a+n;if(0!==t.getUint16()||n<6)return[r,i];const o=t.getUint16(),c=t.getUint16();let l,h;for(l=0;l<o&&t.pos+12<=s;l++){const e={platform:t.getUint16(),encoding:t.getUint16(),language:t.getUint16(),name:t.getUint16(),length:t.getUint16(),offset:t.getUint16()};(isMacNameRecord(e)||isWinNameRecord(e))&&i.push(e)}for(l=0,h=i.length;l<h;l++){const e\
=i[l];if(e.length<=0)continue;const n=a+c+e.offset;if(n+e.length>s)continue;t.pos=n;const o=e.name;if(e.encoding){let a="";for(let r=0,i=e.length;r<i;r+=2)a+=String.fromCharCode(t.getUint16());r[1][o]=a}else r[0][o]=t.getString(e.length)}return[r,i]}const i=[0,0,0,0,0,0,0,0,-2,-2,-2,-2,0,0,-2,-5,-1,-1,-1,-1,-1,-1,-1,-1,0,0,-1,0,-1,-1,-1,-1,1,-1,-999,0,1,0,-1,-2,0,-1,-2,-1,-1,0,-1,-1,0,0,-999,-999,-1,-1,-1,-1,-2,-999,-2,-2,-999,0,-2,-2,0,0,-2,0,-2,0,0,0,-2,-1,-1,1,1,0,0,-1,-1,-1,-1,-1,-1,-1,0,0,-\
1,0,-1,-1,0,-999,-1,-1,-1,-1,-1,-1,0,0,0,0,0,0,0,0,0,0,0,0,-2,-999,-999,-999,-999,-999,-1,-1,-2,-2,0,0,0,0,-1,-1,-999,-2,-2,0,0,-1,-2,-2,0,0,0,-1,-1,-1,-2];function sanitizeTTProgram(e,t){let a,r,n,s,o,c=e.data,l=0,h=0,u=0;const d=[],f=[],g=[];let p=t.tooComplexToFollowFunctions,m=!1,b=0,y=0;for(let e=c.length;l<e;){const e=c[l++];if(64===e){r=c[l++];if(m||y)l+=r;else for(a=0;a<r;a++)d.push(c[l++])}else if(65===e){r=c[l++];if(m||y)l+=2*r;else for(a=0;a<r;a++){n=c[l++];d.push(n<<8|c[l++])}}else i\
f(176==(248&e)){r=e-176+1;if(m||y)l+=r;else for(a=0;a<r;a++)d.push(c[l++])}else if(184==(248&e)){r=e-184+1;if(m||y)l+=2*r;else for(a=0;a<r;a++){n=c[l++];d.push(signedInt16(n,c[l++]))}}else if(43!==e||p)if(44!==e||p){if(45===e)if(m){m=!1;h=l}else{o=f.pop();if(!o){warn("TT: ENDF bad stack");t.hintsValid=!1;return}s=g.pop();c=o.data;l=o.i;t.functionsStackDeltas[s]=d.length-o.stackTop}else if(137===e){if(m||y){warn("TT: nested IDEFs not allowed");p=!0}m=!0;u=l}else if(88===e)++b;else if(27===e)y=b;e\
lse if(89===e){y===b&&(y=0);--b}else if(28===e&&!m&&!y){const e=d.at(-1);e>0&&(l+=e-1)}}else{if(m||y){warn("TT: nested FDEFs not allowed");p=!0}m=!0;u=l;s=d.pop();t.functionsDefined[s]={data:c,i:l}}else if(!m&&!y){s=d.at(-1);if(isNaN(s))info("TT: CALL empty stack (or invalid entry).");else{t.functionsUsed[s]=!0;if(s in t.functionsStackDeltas){const e=d.length+t.functionsStackDeltas[s];if(e<0){warn("TT: CALL invalid functions stack delta.");t.hintsValid=!1;return}d.length=e}else if(s in t.functio\
nsDefined&&!g.includes(s)){f.push({data:c,i:l,stackTop:d.length-1});g.push(s);o=t.functionsDefined[s];if(!o){warn("TT: CALL non-existent function");t.hintsValid=!1;return}c=o.data;l=o.i}}}if(!m&&!y){let t=0;e<=142?t=i[e]:e>=192&&e<=223?t=-1:e>=224&&(t=-2);if(e>=113&&e<=117){r=d.pop();isNaN(r)||(t=2*-r)}for(;t<0&&d.length>0;){d.pop();t++}for(;t>0;){d.push(NaN);t--}}}t.tooComplexToFollowFunctions=p;const w=[c];l>c.length&&w.push(new Uint8Array(l-c.length));if(u>h){warn("TT: complementing a missing\
 function tail");w.push(new Uint8Array([34,45]))}!function foldTTTable(e,t){if(t.length>1){let a,r,i=0;for(a=0,r=t.length;a<r;a++)i+=t[a].length;i=i+3&-4;const n=new Uint8Array(i);let s=0;for(a=0,r=t.length;a<r;a++){n.set(t[a],s);s+=t[a].length}e.data=n;e.length=i}}(e,w)}let n,s,o,c;if(isTrueTypeCollectionFile(t=new Stream(new Uint8Array(t.getBytes())))){const e=function readTrueTypeCollectionData(e,t){const{numFonts:a,offsetTable:r}=function readTrueTypeCollectionHeader(e){const t=e.getString(4\
);assert("ttcf"===t,"Must be a TrueType Collection font.");const a=e.getUint16(),r=e.getUint16(),i=e.getInt32()>>>0,n=[];for(let t=0;t<i;t++)n.push(e.getInt32()>>>0);const s={ttcTag:t,majorVersion:a,minorVersion:r,numFonts:i,offsetTable:n};switch(a){case 1:return s;case 2:s.dsigTag=e.getInt32()>>>0;s.dsigLength=e.getInt32()>>>0;s.dsigOffset=e.getInt32()>>>0;return s}throw new FormatError(`Invalid TrueType Collection majorVersion: ${a}.`)}(e),i=t.split("+");let n;for(let s=0;s<a;s++){e.pos=(e.sta\
rt||0)+r[s];const a=readOpenTypeHeader(e),o=readTables(e,a.numTables);if(!o.name)throw new FormatError(\'TrueType Collection font must contain a "name" table.\');const[c]=readNameTable(o.name);for(let e=0,r=c.length;e<r;e++)for(let r=0,s=c[e].length;r<s;r++){const s=c[e][r]?.replaceAll(/\\s/g,"");if(s){if(s===t)return{header:a,tables:o};if(!(i.length<2))for(const e of i)s===e&&(n={name:e,header:a,tables:o})}}}if(n){warn(`TrueType Collection does not contain "${t}" font, falling back to "${n.name}" \
font instead.`);return{header:n.header,tables:n.tables}}throw new FormatError(`TrueType Collection does not contain "${t}" font.`)}(t,this.name);n=e.header;s=e.tables}else{n=readOpenTypeHeader(t);s=readTables(t,n.numTables)}const l=!s["CFF "];if(l){if(!s.loca)throw new FormatError(\'Required "loca" table is not found\');if(!s.glyf){warn(\'Required "glyf" table is not found -- trying to recover.\');s.glyf={tag:"glyf",data:new Uint8Array(0)}}this.isOpenType=!1}else{const t=a.composite&&(a.cidToGidMap?\
.length>0||!(a.cMap instanceof IdentityCMap));if("OTTO"===n.version&&!t||!s.head||!s.hhea||!s.maxp||!s.post){c=new Stream(s["CFF "].data);o=new CFFFont(c,a);return this.convert(e,o,a)}delete s.glyf;delete s.loca;delete s.fpgm;delete s.prep;delete s["cvt "];this.isOpenType=!0}if(!s.maxp)throw new FormatError(\'Required "maxp" table is not found\');t.pos=(t.start||0)+s.maxp.offset;let h=t.getInt32();const u=t.getUint16();if(65536!==h&&20480!==h){if(6===s.maxp.length)h=20480;else{if(!(s.maxp.length>=\
32))throw new FormatError(\'"maxp" table has a wrong version number\');h=65536}!function writeUint32(e,t,a){e[t+3]=255&a;e[t+2]=a>>>8;e[t+1]=a>>>16;e[t]=a>>>24}(s.maxp.data,0,h)}if(a.scaleFactors?.length===u&&l){const{scaleFactors:e}=a,t=int16(s.head.data[50],s.head.data[51]),r=new GlyfTable({glyfTable:s.glyf.data,isGlyphLocationsLong:t,locaTable:s.loca.data,numGlyphs:u});r.scale(e);const{glyf:i,loca:n,isLocationLong:o}=r.write();s.glyf.data=i;s.loca.data=n;if(o!==!!t){s.head.data[50]=0;s.head.dat\
a[51]=o?1:0}const c=s.hmtx.data;for(let t=0;t<u;t++){const a=4*t,r=Math.round(e[t]*int16(c[a],c[a+1]));c[a]=r>>8&255;c[a+1]=255&r;writeSignedInt16(c,a+2,Math.round(e[t]*signedInt16(c[a+2],c[a+3])))}}let d=u+1,f=!0;if(d>65535){f=!1;d=u;warn("Not enough space in glyfs to duplicate first glyph.")}let g=0,p=0;if(h>=65536&&s.maxp.length>=32){t.pos+=8;if(t.getUint16()>2){s.maxp.data[14]=0;s.maxp.data[15]=2}t.pos+=4;g=t.getUint16();t.pos+=4;p=t.getUint16()}s.maxp.data[4]=d>>8;s.maxp.data[5]=255&d;const\
 m=function sanitizeTTPrograms(e,t,a,r){const i={functionsDefined:[],functionsUsed:[],functionsStackDeltas:[],tooComplexToFollowFunctions:!1,hintsValid:!0};e&&sanitizeTTProgram(e,i);t&&sanitizeTTProgram(t,i);e&&function checkInvalidFunctions(e,t){if(!e.tooComplexToFollowFunctions)if(e.functionsDefined.length>t){warn("TT: more functions defined than expected");e.hintsValid=!1}else for(let a=0,r=e.functionsUsed.length;a<r;a++){if(a>t){warn("TT: invalid function id: "+a);e.hintsValid=!1;return}if(e\
.functionsUsed[a]&&!e.functionsDefined[a]){warn("TT: undefined function: "+a);e.hintsValid=!1;return}}}(i,r);if(a&&1&a.length){const e=new Uint8Array(a.length+1);e.set(a.data);a.data=e}return i.hintsValid}(s.fpgm,s.prep,s["cvt "],g);if(!m){delete s.fpgm;delete s.prep;delete s["cvt "]}!function sanitizeMetrics(e,t,a,r,i,n){if(!t){a&&(a.data=null);return}e.pos=(e.start||0)+t.offset;e.pos+=4;e.pos+=2;e.pos+=2;e.pos+=2;e.pos+=2;e.pos+=2;e.pos+=2;e.pos+=2;e.pos+=2;e.pos+=2;const s=e.getUint16();e.pos\
+=8;e.pos+=2;let o=e.getUint16();if(0!==s){if(!(2&int16(r.data[44],r.data[45]))){t.data[22]=0;t.data[23]=0}}if(o>i){info(`The numOfMetrics (${o}) should not be greater than the numGlyphs (${i}).`);o=i;t.data[34]=(65280&o)>>8;t.data[35]=255&o}const c=i-o-(a.length-4*o>>1);if(c>0){const e=new Uint8Array(a.length+2*c);e.set(a.data);if(n){e[a.length]=a.data[2];e[a.length+1]=a.data[3]}a.data=e}}(t,s.hhea,s.hmtx,s.head,d,f);if(!s.head)throw new FormatError(\'Required "head" table is not found\');!functi\
on sanitizeHead(e,t,a){const r=e.data,i=function int32(e,t,a,r){return(e<<24)+(t<<16)+(a<<8)+r}(r[0],r[1],r[2],r[3]);if(i>>16!=1){info("Attempting to fix invalid version in head table: "+i);r[0]=0;r[1]=1;r[2]=0;r[3]=0}const n=int16(r[50],r[51]);if(n<0||n>1){info("Attempting to fix invalid indexToLocFormat in head table: "+n);const e=t+1;if(a===e<<1){r[50]=0;r[51]=0}else{if(a!==e<<2)throw new FormatError("Could not fix indexToLocFormat: "+n);r[50]=0;r[51]=1}}}(s.head,u,l?s.loca.length:0);let b=Ob\
ject.create(null);if(l){const e=int16(s.head.data[50],s.head.data[51]),t=function sanitizeGlyphLocations(e,t,a,r,i,n,s){let o,c,l;if(r){o=4;c=function fontItemDecodeLong(e,t){return e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3]};l=function fontItemEncodeLong(e,t,a){e[t]=a>>>24&255;e[t+1]=a>>16&255;e[t+2]=a>>8&255;e[t+3]=255&a}}else{o=2;c=function fontItemDecode(e,t){return e[t]<<9|e[t+1]<<1};l=function fontItemEncode(e,t,a){e[t]=a>>9&255;e[t+1]=a>>1&255}}const h=n?a+1:a,u=o*(1+h),d=new Uint8Array(u);d.se\
t(e.data.subarray(0,u));e.data=d;const f=t.data,g=f.length,p=new Uint8Array(g);let m,b;const y=[];for(m=0,b=0;m<a+1;m++,b+=o){let e=c(d,b);e>g&&(e=g);y.push({index:m,offset:e,endOffset:0})}y.sort(((e,t)=>e.offset-t.offset));for(m=0;m<a;m++)y[m].endOffset=y[m+1].offset;y.sort(((e,t)=>e.index-t.index));for(m=0;m<a;m++){const{offset:e,endOffset:t}=y[m];if(0!==e||0!==t)break;const a=y[m+1].offset;if(0!==a){y[m].endOffset=a;break}}const w=y.at(-2);0!==w.offset&&0===w.endOffset&&(w.endOffset=g);const \
x=Object.create(null);let S=0;l(d,0,S);for(m=0,b=o;m<a;m++,b+=o){const e=sanitizeGlyph(f,y[m].offset,y[m].endOffset,p,S,i),t=e.length;0===t&&(x[m]=!0);e.sizeOfInstructions>s&&(s=e.sizeOfInstructions);S+=t;l(d,b,S)}if(0===S){const e=new Uint8Array([0,1,0,0,0,0,0,0,0,0,0,0,0,0,49,0]);for(m=0,b=o;m<h;m++,b+=o)l(d,b,e.length);t.data=e}else if(n){const a=c(d,o);if(p.length>a+S)t.data=p.subarray(0,a+S);else{t.data=new Uint8Array(a+S);t.data.set(p.subarray(0,S))}t.data.set(p.subarray(0,a),S);l(e.data,d\
.length-o,S+a)}else t.data=p.subarray(0,S);return{missingGlyphs:x,maxSizeOfInstructions:s}}(s.loca,s.glyf,u,e,m,f,p);b=t.missingGlyphs;if(h>=65536&&s.maxp.length>=32){s.maxp.data[26]=t.maxSizeOfInstructions>>8;s.maxp.data[27]=255&t.maxSizeOfInstructions}}if(!s.hhea)throw new FormatError(\'Required "hhea" table is not found\');if(0===s.hhea.data[10]&&0===s.hhea.data[11]){s.hhea.data[10]=255;s.hhea.data[11]=255}const y={unitsPerEm:int16(s.head.data[18],s.head.data[19]),yMax:signedInt16(s.head.data[4\
2],s.head.data[43]),yMin:signedInt16(s.head.data[38],s.head.data[39]),ascent:signedInt16(s.hhea.data[4],s.hhea.data[5]),descent:signedInt16(s.hhea.data[6],s.hhea.data[7]),lineGap:signedInt16(s.hhea.data[8],s.hhea.data[9])};this.ascent=y.ascent/y.unitsPerEm;this.descent=y.descent/y.unitsPerEm;this.lineGap=y.lineGap/y.unitsPerEm;if(this.cssFontInfo?.lineHeight){this.lineHeight=this.cssFontInfo.metrics.lineHeight;this.lineGap=this.cssFontInfo.metrics.lineGap}else this.lineHeight=this.ascent-this.de\
scent+this.lineGap;s.post&&function readPostScriptTable(e,a,r){const i=(t.start||0)+e.offset;t.pos=i;const n=i+e.length,s=t.getInt32();t.skip(28);let o,c,l=!0;switch(s){case 65536:o=jr;break;case 131072:const e=t.getUint16();if(e!==r){l=!1;break}const i=[];for(c=0;c<e;++c){const e=t.getUint16();if(e>=32768){l=!1;break}i.push(e)}if(!l)break;const h=[],u=[];for(;t.pos<n;){const e=t.getByte();u.length=e;for(c=0;c<e;++c)u[c]=String.fromCharCode(t.getByte());h.push(u.join(""))}o=[];for(c=0;c<e;++c){c\
onst e=i[c];e<258?o.push(jr[e]):o.push(h[e-258])}break;case 196608:break;default:warn("Unknown/unsupported post table version "+s);l=!1;a.defaultEncoding&&(o=a.defaultEncoding)}a.glyphNames=o;return l}(s.post,a,u);s.post={tag:"post",data:createPostTable(a)};const w=Object.create(null);function hasGlyph(e){return!b[e]}if(a.composite){const e=a.cidToGidMap||[],t=0===e.length;a.cMap.forEach((function(a,r){"string"==typeof r&&(r=convertCidString(a,r,!0));if(r>65535)throw new FormatError("Max size of\
 CID is 65,535");let i=-1;t?i=r:void 0!==e[r]&&(i=e[r]);i>=0&&i<u&&hasGlyph(i)&&(w[a]=i)}))}else{const e=function readCmapTable(e,t,a,r){if(!e){warn("No cmap table available.");return{platformId:-1,encodingId:-1,mappings:[],hasShortCmap:!1}}let i,n=(t.start||0)+e.offset;t.pos=n;t.skip(2);const s=t.getUint16();let o,c=!1;for(let e=0;e<s;e++){const i=t.getUint16(),n=t.getUint16(),l=t.getInt32()>>>0;let h=!1;if(o?.platformId!==i||o?.encodingId!==n){if(0!==i||0!==n&&1!==n&&3!==n)if(1===i&&0===n)h=!0\
;else if(3!==i||1!==n||!r&&o){if(a&&3===i&&0===n){h=!0;let a=!0;if(e<s-1){const e=t.peekBytes(2);int16(e[0],e[1])<i&&(a=!1)}a&&(c=!0)}}else{h=!0;a||(c=!0)}else h=!0;h&&(o={platformId:i,encodingId:n,offset:l});if(c)break}}o&&(t.pos=n+o.offset);if(!o||-1===t.peekByte()){warn("Could not find a preferred cmap table.");return{platformId:-1,encodingId:-1,mappings:[],hasShortCmap:!1}}const l=t.getUint16();let h=!1;const u=[];let d,f;if(0===l){t.skip(4);for(d=0;d<256;d++){const e=t.getByte();e&&u.push({\
charCode:d,glyphId:e})}h=!0}else if(2===l){t.skip(4);const e=[];let a=0;for(let r=0;r<256;r++){const r=t.getUint16()>>3;e.push(r);a=Math.max(r,a)}const r=[];for(let e=0;e<=a;e++)r.push({firstCode:t.getUint16(),entryCount:t.getUint16(),idDelta:signedInt16(t.getByte(),t.getByte()),idRangePos:t.pos+t.getUint16()});for(let a=0;a<256;a++)if(0===e[a]){t.pos=r[0].idRangePos+2*a;f=t.getUint16();u.push({charCode:a,glyphId:f})}else{const i=r[e[a]];for(d=0;d<i.entryCount;d++){const e=(a<<8)+d+i.firstCode;t\
.pos=i.idRangePos+2*d;f=t.getUint16();0!==f&&(f=(f+i.idDelta)%65536);u.push({charCode:e,glyphId:f})}}}else if(4===l){t.skip(4);const e=t.getUint16()>>1;t.skip(6);const a=[];let r;for(r=0;r<e;r++)a.push({end:t.getUint16()});t.skip(2);for(r=0;r<e;r++)a[r].start=t.getUint16();for(r=0;r<e;r++)a[r].delta=t.getUint16();let s,o=0;for(r=0;r<e;r++){i=a[r];const n=t.getUint16();if(n){s=(n>>1)-(e-r);i.offsetIndex=s;o=Math.max(o,s+i.end-i.start+1)}else i.offsetIndex=-1}const c=[];for(d=0;d<o;d++)c.push(t.ge\
tUint16());for(r=0;r<e;r++){i=a[r];n=i.start;const e=i.end,t=i.delta;s=i.offsetIndex;for(d=n;d<=e;d++)if(65535!==d){f=s<0?d:c[s+d-n];f=f+t&65535;u.push({charCode:d,glyphId:f})}}}else if(6===l){t.skip(4);const e=t.getUint16(),a=t.getUint16();for(d=0;d<a;d++){f=t.getUint16();const a=e+d;u.push({charCode:a,glyphId:f})}}else{if(12!==l){warn("cmap table has unsupported format: "+l);return{platformId:-1,encodingId:-1,mappings:[],hasShortCmap:!1}}{t.skip(10);const e=t.getInt32()>>>0;for(d=0;d<e;d++){co\
nst e=t.getInt32()>>>0,a=t.getInt32()>>>0;let r=t.getInt32()>>>0;for(let t=e;t<=a;t++)u.push({charCode:t,glyphId:r++})}}}u.sort(((e,t)=>e.charCode-t.charCode));const g=[],p=new Set;for(const e of u){const{charCode:t}=e;if(!p.has(t)){p.add(t);g.push(e)}}return{platformId:o.platformId,encodingId:o.encodingId,mappings:g,hasShortCmap:h}}(s.cmap,t,this.isSymbolicFont,a.hasEncoding),r=e.platformId,i=e.encodingId,n=e.mappings;let o=[],c=!1;!a.hasEncoding||"MacRomanEncoding"!==a.baseEncodingName&&"WinAn\
siEncoding"!==a.baseEncodingName||(o=getEncoding(a.baseEncodingName));if(a.hasEncoding&&!this.isSymbolicFont&&(3===r&&1===i||1===r&&0===i)){const e=Fr();for(let t=0;t<256;t++){let s;s=void 0!==this.differences[t]?this.differences[t]:o.length&&""!==o[t]?o[t]:Ar[t];if(!s)continue;const c=recoverGlyphName(s,e);let l;3===r&&1===i?l=e[c]:1===r&&0===i&&(l=Sr.indexOf(c));if(void 0===l){if(!a.glyphNames&&a.hasIncludedToUnicodeMap&&!(this.toUnicode instanceof IdentityToUnicodeMap)){const e=this.toUnicode\
.get(t);e&&(l=e.codePointAt(0))}if(void 0===l)continue}for(const e of n)if(e.charCode===l){w[t]=e.glyphId;break}}}else if(0===r){for(const e of n)w[e.charCode]=e.glyphId;c=!0}else if(3===r&&0===i)for(const e of n){let t=e.charCode;t>=61440&&t<=61695&&(t&=255);w[t]=e.glyphId}else for(const e of n)w[e.charCode]=e.glyphId;if(a.glyphNames&&(o.length||this.differences.length))for(let e=0;e<256;++e){if(!c&&void 0!==w[e])continue;const t=this.differences[e]||o[e];if(!t)continue;const r=a.glyphNames.ind\
exOf(t);r>0&&hasGlyph(r)&&(w[e]=r)}}0===w.length&&(w[0]=0);let x=d-1;f||(x=0);if(!a.cssFontInfo){const e=adjustMapping(w,hasGlyph,x,this.toUnicode);this.toFontChar=e.toFontChar;s.cmap={tag:"cmap",data:createCmapTable(e.charCodeToGlyphId,e.toUnicodeExtraMap,d)};s["OS/2"]&&function validateOS2Table(e,t){t.pos=(t.start||0)+e.offset;const a=t.getUint16();t.skip(60);const r=t.getUint16();if(a<4&&768&r)return!1;if(t.getUint16()>t.getUint16())return!1;t.skip(6);if(0===t.getUint16())return!1;e.data[8]=e\
.data[9]=0;return!0}(s["OS/2"],t)||(s["OS/2"]={tag:"OS/2",data:createOS2Table(a,e.charCodeToGlyphId,y)})}if(!l)try{c=new Stream(s["CFF "].data);o=new CFFParser(c,a,Rr).parse();o.duplicateFirstGlyph();const e=new CFFCompiler(o);s["CFF "].data=e.compile()}catch{warn("Failed to compile font "+a.loadedName)}if(s.name){const[t,r]=readNameTable(s.name);s.name.data=createNameTable(e,t);this.psName=t[0][6]||null;a.composite||function adjustTrueTypeToUnicode(e,t,a){if(e.isInternalFont)return;if(e.hasIncl\
udedToUnicodeMap)return;if(e.hasEncoding)return;if(e.toUnicode instanceof IdentityToUnicodeMap)return;if(!t)return;if(0===a.length)return;if(e.defaultEncoding===kr)return;for(const e of a)if(!isWinNameRecord(e))return;const r=kr,i=[],n=Fr();for(const e in r){const t=r[e];if(""===t)continue;const a=n[t];void 0!==a&&(i[e]=String.fromCharCode(a))}i.length>0&&e.toUnicode.amend(i)}(a,this.isSymbolicFont,r)}else s.name={tag:"name",data:createNameTable(this.name)};const S=new OpenTypeFileBuilder(n.vers\
ion);for(const e in s)S.addTable(e,s[e].data);return S.toArray()}convert(e,a,r){r.fixedPitch=!1;r.builtInEncoding&&function adjustType1ToUnicode(e,t){if(e.isInternalFont)return;if(e.hasIncludedToUnicodeMap)return;if(t===e.defaultEncoding)return;if(e.toUnicode instanceof IdentityToUnicodeMap)return;const a=[],r=Fr();for(const i in t){if(e.hasEncoding&&(e.baseEncodingName||void 0!==e.differences[i]))continue;const n=getUnicodeForGlyph(t[i],r);-1!==n&&(a[i]=String.fromCharCode(n))}a.length>0&&e.toU\
nicode.amend(a)}(r,r.builtInEncoding);let i=1;a instanceof CFFFont&&(i=a.numGlyphs-1);const n=a.getGlyphMapping(r);let s=null,o=n,c=null;if(!r.cssFontInfo){s=adjustMapping(n,a.hasGlyphId.bind(a),i,this.toUnicode);this.toFontChar=s.toFontChar;o=s.charCodeToGlyphId;c=s.toUnicodeExtraMap}const l=a.numGlyphs;function getCharCodes(e,t){let a=null;for(const r in e)t===e[r]&&(a||=[]).push(0|r);return a}function createCharCode(e,t){for(const a in e)if(t===e[a])return 0|a;s.charCodeToGlyphId[s.nextAvaila\
bleFontCharCode]=t;return s.nextAvailableFontCharCode++}const h=a.seacs;if(s&&h?.length){const e=r.fontMatrix||t,i=a.getCharset(),o=Object.create(null);for(let t in h){t|=0;const a=h[t],r=Ar[a[2]],c=Ar[a[3]],l=i.indexOf(r),u=i.indexOf(c);if(l<0||u<0)continue;const d={x:a[0]*e[0]+a[1]*e[2]+e[4],y:a[0]*e[1]+a[1]*e[3]+e[5]},f=getCharCodes(n,t);if(f)for(const e of f){const t=s.charCodeToGlyphId,a=createCharCode(t,l),r=createCharCode(t,u);o[e]={baseFontCharCode:a,accentFontCharCode:r,accentOffset:d}}\
}r.seacMap=o}const u=r.fontMatrix?1/Math.max(...r.fontMatrix.slice(0,4).map(Math.abs)):1e3,d=new OpenTypeFileBuilder("OTTO");d.addTable("CFF ",a.data);d.addTable("OS/2",createOS2Table(r,o));d.addTable("cmap",createCmapTable(o,c,l));d.addTable("head","\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0_<õ\\0\\0"+safeString16(u)+"\\0\\0\\0\\0\\v~\'\\0\\0\\0\\0\\v~\'\\0\\0"+safeString16(r.descent)+"ÿ"+safeString16(r.ascent)+string16(r.italicAngle?2:0)+"\\0\\0\\0\\0\\0\\0\\0");d.addTable("hhea","\\0\\0\\0"+safeString16(r.ascent)+safeString16(r.des\
cent)+"\\0\\0ÿÿ\\0\\0\\0\\0\\0\\0"+safeString16(r.capHeight)+safeString16(Math.tan(r.italicAngle)*r.xHeight)+"\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0"+string16(l));d.addTable("hmtx",function fontFieldsHmtx(){const e=a.charstrings,t=a.cff?a.cff.widths:null;let r="\\0\\0\\0\\0";for(let a=1,i=l;a<i;a++){let i=0;if(e){const t=e[a-1];i="width"in t?t.width:0}else t&&(i=Math.ceil(t[a]||0));r+=string16(i)+string16(0)}return r}());d.addTable("maxp","\\0\\0P\\0"+string16(l));d.addTable("name",createNameTable(e));d.addTable("post",crea\
tePostTable(r));return d.toArray()}get _spaceWidth(){const e=["space","minus","one","i","I"];let t;for(const a of e){if(a in this.widths){t=this.widths[a];break}const e=Fr()[a];let r=0;if(this.composite&&this.cMap.contains(e)){r=this.cMap.lookup(e);"string"==typeof r&&(r=convertCidString(e,r))}!r&&this.toUnicode&&(r=this.toUnicode.charCodeOf(e));r<=0&&(r=e);t=this.widths[r];if(t)break}return shadow(this,"_spaceWidth",t||this.defaultWidth)}_charToGlyph(e,t=!1){let a,r,i,n=this._glyphCache[e];if(n\
?.isSpace===t)return n;let s=e;if(this.cMap?.contains(e)){s=this.cMap.lookup(e);"string"==typeof s&&(s=convertCidString(e,s))}r=this.widths[s];"number"!=typeof r&&(r=this.defaultWidth);const o=this.vmetrics?.[s];let c=this.toUnicode.get(e)||e;"number"==typeof c&&(c=String.fromCharCode(c));let l=void 0!==this.toFontChar[e];a=this.toFontChar[e]||e;if(this.missingFile){const t=this.differences[e]||this.defaultEncoding[e];if((".notdef"===t||""===t)&&"Type1"===this.type){a=32;if(""===t){r||=this._spa\
ceWidth;c=String.fromCharCode(a)}}a=function mapSpecialUnicodeValues(e){return e>=65520&&e<=65535?0:e>=62976&&e<=63743?Tr()[e]||e:173===e?45:e}(a)}this.isType3Font&&(i=a);let h=null;if(this.seacMap?.[e]){l=!0;const t=this.seacMap[e];a=t.baseFontCharCode;h={fontChar:String.fromCodePoint(t.accentFontCharCode),offset:t.accentOffset}}let u="";"number"==typeof a&&(a<=1114111?u=String.fromCodePoint(a):warn(`charToGlyph - invalid fontCharCode: ${a}`));if(this.missingFile&&this.vertical&&1===u.length){c\
onst e=_r()[u.charCodeAt(0)];e&&(u=c=String.fromCharCode(e))}n=new fonts_Glyph(e,u,c,h,r,o,i,t,l);return this._glyphCache[e]=n}charsToGlyphs(e){let t=this._charsCache[e];if(t)return t;t=[];if(this.cMap){const a=Object.create(null),r=e.length;let i=0;for(;i<r;){this.cMap.readCharCode(e,i,a);const{charcode:r,length:n}=a;i+=n;const s=this._charToGlyph(r,1===n&&32===e.charCodeAt(i-1));t.push(s)}}else for(let a=0,r=e.length;a<r;++a){const r=e.charCodeAt(a),i=this._charToGlyph(r,32===r);t.push(i)}retu\
rn this._charsCache[e]=t}getCharPositions(e){const t=[];if(this.cMap){const a=Object.create(null);let r=0;for(;r<e.length;){this.cMap.readCharCode(e,r,a);const i=a.length;t.push([r,r+i]);r+=i}}else for(let a=0,r=e.length;a<r;++a)t.push([a,a+1]);return t}get glyphCacheValues(){return Object.values(this._glyphCache)}encodeString(e){const t=[],a=[],hasCurrentBufErrors=()=>t.length%2==1,r=this.toUnicode instanceof IdentityToUnicodeMap?e=>this.toUnicode.charCodeOf(e):e=>this.toUnicode.charCodeOf(Stri\
ng.fromCodePoint(e));for(let i=0,n=e.length;i<n;i++){const n=e.codePointAt(i);n>55295&&(n<57344||n>65533)&&i++;if(this.toUnicode){const e=r(n);if(-1!==e){if(hasCurrentBufErrors()){t.push(a.join(""));a.length=0}for(let t=(this.cMap?this.cMap.getCharCodeLength(e):1)-1;t>=0;t--)a.push(String.fromCharCode(e>>8*t&255));continue}}if(!hasCurrentBufErrors()){t.push(a.join(""));a.length=0}a.push(String.fromCodePoint(n))}t.push(a.join(""));return t}}class ErrorFont{constructor(e){this.error=e;this.loadedN\
ame="g_font_error";this.missingFile=!0}charsToGlyphs(){return[]}encodeString(e){return[e]}exportData(){return{error:this.error}}}const Si=2,Ai=3,ki=4,Ci=5,vi=6,Fi=7;class Pattern{constructor(){unreachable("Cannot initialize Pattern.")}static parseShading(e,t,a,r,i,n){const s=e instanceof BaseStream?e.dict:e,o=s.get("ShadingType");try{switch(o){case Si:case Ai:return new RadialAxialShading(s,t,a,r,i,n);case ki:case Ci:case vi:case Fi:return new MeshShading(e,t,a,r,i,n);default:throw new FormatErr\
or("Unsupported ShadingType: "+o)}}catch(e){if(e instanceof MissingDataException)throw e;warn(e);return new DummyShading}}}class BaseShading{static SMALL_NUMBER=1e-6;getIR(){unreachable("Abstract method `getIR` called.")}}class RadialAxialShading extends BaseShading{constructor(e,t,a,r,i,n){super();this.shadingType=e.get("ShadingType");let s=0;this.shadingType===Si?s=4:this.shadingType===Ai&&(s=6);this.coordsArr=e.getArray("Coords");if(!isNumberArray(this.coordsArr,s))throw new FormatError("Radi\
alAxialShading: Invalid /Coords array.");const o=ColorSpaceUtils.parse({cs:e.getRaw("CS")||e.getRaw("ColorSpace"),xref:t,resources:a,pdfFunctionFactory:r,globalColorSpaceCache:i,localColorSpaceCache:n});this.bbox=lookupNormalRect(e.getArray("BBox"),null);let c=0,l=1;const h=e.getArray("Domain");isNumberArray(h,2)&&([c,l]=h);let u=!1,d=!1;const f=e.getArray("Extend");(function isBooleanArray(e,t){return Array.isArray(e)&&(null===t||e.length===t)&&e.every((e=>"boolean"==typeof e))})(f,2)&&([u,d]=f\
);if(!(this.shadingType!==Ai||u&&d)){const[e,t,a,r,i,n]=this.coordsArr,s=Math.hypot(e-r,t-i);a<=n+s&&n<=a+s&&warn("Unsupported radial gradient.")}this.extendStart=u;this.extendEnd=d;const g=e.getRaw("Function"),p=r.create(g,!0),m=(l-c)/840,b=this.colorStops=[];if(c>=l||m<=0){info("Bad shading domain.");return}const y=new Float32Array(o.numComps),w=new Float32Array(1);let x=0;w[0]=c;p(w,0,y,0);const S=new Uint8ClampedArray(3);o.getRgb(y,0,S);let[k,C,v]=S;b.push([0,Util.makeHexColor(k,C,v)]);let F\
=1;w[0]=c+m;p(w,0,y,0);o.getRgb(y,0,S);let[T,O,M]=S,D=T-k+1,R=O-C+1,N=M-v+1,E=T-k-1,L=O-C-1,j=M-v-1;for(let e=2;e<840;e++){w[0]=c+e*m;p(w,0,y,0);o.getRgb(y,0,S);const[t,a,r]=S,i=e-x;D=Math.min(D,(t-k+1)/i);R=Math.min(R,(a-C+1)/i);N=Math.min(N,(r-v+1)/i);E=Math.max(E,(t-k-1)/i);L=Math.max(L,(a-C-1)/i);j=Math.max(j,(r-v-1)/i);if(!(E<=D&&L<=R&&j<=N)){const e=Util.makeHexColor(T,O,M);b.push([F/840,e]);D=t-T+1;R=a-O+1;N=r-M+1;E=t-T-1;L=a-O-1;j=r-M-1;x=F;k=T;C=O;v=M}F=e;T=t;O=a;M=r}b.push([1,Util.make\
HexColor(T,O,M)]);let _="transparent";e.has("Background")&&(_=o.getRgbHex(e.get("Background"),0));if(!u){b.unshift([0,_]);b[1][0]+=BaseShading.SMALL_NUMBER}if(!d){b.at(-1)[0]-=BaseShading.SMALL_NUMBER;b.push([1,_])}this.colorStops=b}getIR(){const{coordsArr:e,shadingType:t}=this;let a,r,i,n,s;if(t===Si){r=[e[0],e[1]];i=[e[2],e[3]];n=null;s=null;a="axial"}else if(t===Ai){r=[e[0],e[1]];i=[e[3],e[4]];n=e[2];s=e[5];a="radial"}else unreachable(`getPattern type unknown: ${t}`);return["RadialAxial",a,th\
is.bbox,this.colorStops,r,i,n,s]}}class MeshStreamReader{constructor(e,t){this.stream=e;this.context=t;this.buffer=0;this.bufferLength=0;const a=t.numComps;this.tmpCompsBuf=new Float32Array(a);const r=t.colorSpace.numComps;this.tmpCsCompsBuf=t.colorFn?new Float32Array(r):this.tmpCompsBuf}get hasData(){if(this.stream.end)return this.stream.pos<this.stream.end;if(this.bufferLength>0)return!0;const e=this.stream.getByte();if(e<0)return!1;this.buffer=e;this.bufferLength=8;return!0}readBits(e){const{\
stream:t}=this;let{buffer:a,bufferLength:r}=this;if(32===e){if(0===r)return t.getInt32()>>>0;a=a<<24|t.getByte()<<16|t.getByte()<<8|t.getByte();const e=t.getByte();this.buffer=e&(1<<r)-1;return(a<<8-r|(255&e)>>r)>>>0}if(8===e&&0===r)return t.getByte();for(;r<e;){a=a<<8|t.getByte();r+=8}r-=e;this.bufferLength=r;this.buffer=a&(1<<r)-1;return a>>r}align(){this.buffer=0;this.bufferLength=0}readFlag(){return this.readBits(this.context.bitsPerFlag)}readCoordinate(){const{bitsPerCoordinate:e,decode:t}=\
this.context,a=this.readBits(e),r=this.readBits(e),i=e<32?1/((1<<e)-1):2.3283064365386963e-10;return[a*i*(t[1]-t[0])+t[0],r*i*(t[3]-t[2])+t[2]]}readComponents(){const{bitsPerComponent:e,colorFn:t,colorSpace:a,decode:r,numComps:i}=this.context,n=e<32?1/((1<<e)-1):2.3283064365386963e-10,s=this.tmpCompsBuf;for(let t=0,a=4;t<i;t++,a+=2){const i=this.readBits(e);s[t]=i*n*(r[a+1]-r[a])+r[a]}const o=this.tmpCsCompsBuf;t?.(s,0,o,0);return a.getRgb(o,0)}}let Ii=Object.create(null);function getB(e){return\
 Ii[e]||=function buildB(e){const t=[];for(let a=0;a<=e;a++){const r=a/e,i=1-r;t.push(new Float32Array([i**3,3*r*i**2,3*r**2*i,r**3]))}return t}(e)}class MeshShading extends BaseShading{static MIN_SPLIT_PATCH_CHUNKS_AMOUNT=3;static MAX_SPLIT_PATCH_CHUNKS_AMOUNT=20;static TRIANGLE_DENSITY=20;constructor(e,t,a,r,i,n){super();if(!(e instanceof BaseStream))throw new FormatError("Mesh data is not a stream");const s=e.dict;this.shadingType=s.get("ShadingType");this.bbox=lookupNormalRect(s.getArray("BB\
ox"),null);const o=ColorSpaceUtils.parse({cs:s.getRaw("CS")||s.getRaw("ColorSpace"),xref:t,resources:a,pdfFunctionFactory:r,globalColorSpaceCache:i,localColorSpaceCache:n});this.background=s.has("Background")?o.getRgb(s.get("Background"),0):null;const c=s.getRaw("Function"),l=c?r.create(c,!0):null;this.coords=[];this.colors=[];this.figures=[];const h={bitsPerCoordinate:s.get("BitsPerCoordinate"),bitsPerComponent:s.get("BitsPerComponent"),bitsPerFlag:s.get("BitsPerFlag"),decode:s.getArray("Decode\
"),colorFn:l,colorSpace:o,numComps:l?1:o.numComps},u=new MeshStreamReader(e,h);let d=!1;switch(this.shadingType){case ki:this._decodeType4Shading(u);break;case Ci:const e=0|s.get("VerticesPerRow");if(e<2)throw new FormatError("Invalid VerticesPerRow");this._decodeType5Shading(u,e);break;case vi:this._decodeType6Shading(u);d=!0;break;case Fi:this._decodeType7Shading(u);d=!0;break;default:unreachable("Unsupported mesh type.")}if(d){this._updateBounds();for(let e=0,t=this.figures.length;e<t;e++)thi\
s._buildFigureFromPatch(e)}this._updateBounds();this._packData()}_decodeType4Shading(e){const t=this.coords,a=this.colors,r=[],i=[];let n=0;for(;e.hasData;){const s=e.readFlag(),o=e.readCoordinate(),c=e.readComponents();if(0===n){if(!(0<=s&&s<=2))throw new FormatError("Unknown type4 flag");switch(s){case 0:n=3;break;case 1:i.push(i.at(-2),i.at(-1));n=1;break;case 2:i.push(i.at(-3),i.at(-1));n=1}r.push(s)}i.push(t.length);t.push(o);a.push(c);n--;e.align()}this.figures.push({type:"triangles",coord\
s:new Int32Array(i),colors:new Int32Array(i)})}_decodeType5Shading(e,t){const a=this.coords,r=this.colors,i=[];for(;e.hasData;){const t=e.readCoordinate(),n=e.readComponents();i.push(a.length);a.push(t);r.push(n)}this.figures.push({type:"lattice",coords:new Int32Array(i),colors:new Int32Array(i),verticesPerRow:t})}_decodeType6Shading(e){const t=this.coords,a=this.colors,r=new Int32Array(16),i=new Int32Array(4);for(;e.hasData;){const n=e.readFlag();if(!(0<=n&&n<=3))throw new FormatError("Unknown \
type6 flag");const s=t.length;for(let a=0,r=0!==n?8:12;a<r;a++)t.push(e.readCoordinate());const o=a.length;for(let t=0,r=0!==n?2:4;t<r;t++)a.push(e.readComponents());let c,l,h,u;switch(n){case 0:r[12]=s+3;r[13]=s+4;r[14]=s+5;r[15]=s+6;r[8]=s+2;r[11]=s+7;r[4]=s+1;r[7]=s+8;r[0]=s;r[1]=s+11;r[2]=s+10;r[3]=s+9;i[2]=o+1;i[3]=o+2;i[0]=o;i[1]=o+3;break;case 1:c=r[12];l=r[13];h=r[14];u=r[15];r[12]=u;r[13]=s+0;r[14]=s+1;r[15]=s+2;r[8]=h;r[11]=s+3;r[4]=l;r[7]=s+4;r[0]=c;r[1]=s+7;r[2]=s+6;r[3]=s+5;c=i[2];l\
=i[3];i[2]=l;i[3]=o;i[0]=c;i[1]=o+1;break;case 2:c=r[15];l=r[11];r[12]=r[3];r[13]=s+0;r[14]=s+1;r[15]=s+2;r[8]=r[7];r[11]=s+3;r[4]=l;r[7]=s+4;r[0]=c;r[1]=s+7;r[2]=s+6;r[3]=s+5;c=i[3];i[2]=i[1];i[3]=o;i[0]=c;i[1]=o+1;break;case 3:r[12]=r[0];r[13]=s+0;r[14]=s+1;r[15]=s+2;r[8]=r[1];r[11]=s+3;r[4]=r[2];r[7]=s+4;r[0]=r[3];r[1]=s+7;r[2]=s+6;r[3]=s+5;i[2]=i[0];i[3]=o;i[0]=i[1];i[1]=o+1}r[5]=t.length;t.push([(-4*t[r[0]][0]-t[r[15]][0]+6*(t[r[4]][0]+t[r[1]][0])-2*(t[r[12]][0]+t[r[3]][0])+3*(t[r[13]][0]+t\
[r[7]][0]))/9,(-4*t[r[0]][1]-t[r[15]][1]+6*(t[r[4]][1]+t[r[1]][1])-2*(t[r[12]][1]+t[r[3]][1])+3*(t[r[13]][1]+t[r[7]][1]))/9]);r[6]=t.length;t.push([(-4*t[r[3]][0]-t[r[12]][0]+6*(t[r[2]][0]+t[r[7]][0])-2*(t[r[0]][0]+t[r[15]][0])+3*(t[r[4]][0]+t[r[14]][0]))/9,(-4*t[r[3]][1]-t[r[12]][1]+6*(t[r[2]][1]+t[r[7]][1])-2*(t[r[0]][1]+t[r[15]][1])+3*(t[r[4]][1]+t[r[14]][1]))/9]);r[9]=t.length;t.push([(-4*t[r[12]][0]-t[r[3]][0]+6*(t[r[8]][0]+t[r[13]][0])-2*(t[r[0]][0]+t[r[15]][0])+3*(t[r[11]][0]+t[r[1]][0]))\
/9,(-4*t[r[12]][1]-t[r[3]][1]+6*(t[r[8]][1]+t[r[13]][1])-2*(t[r[0]][1]+t[r[15]][1])+3*(t[r[11]][1]+t[r[1]][1]))/9]);r[10]=t.length;t.push([(-4*t[r[15]][0]-t[r[0]][0]+6*(t[r[11]][0]+t[r[14]][0])-2*(t[r[12]][0]+t[r[3]][0])+3*(t[r[2]][0]+t[r[8]][0]))/9,(-4*t[r[15]][1]-t[r[0]][1]+6*(t[r[11]][1]+t[r[14]][1])-2*(t[r[12]][1]+t[r[3]][1])+3*(t[r[2]][1]+t[r[8]][1]))/9]);this.figures.push({type:"patch",coords:new Int32Array(r),colors:new Int32Array(i)})}}_decodeType7Shading(e){const t=this.coords,a=this.co\
lors,r=new Int32Array(16),i=new Int32Array(4);for(;e.hasData;){const n=e.readFlag();if(!(0<=n&&n<=3))throw new FormatError("Unknown type7 flag");const s=t.length;for(let a=0,r=0!==n?12:16;a<r;a++)t.push(e.readCoordinate());const o=a.length;for(let t=0,r=0!==n?2:4;t<r;t++)a.push(e.readComponents());let c,l,h,u;switch(n){case 0:r[12]=s+3;r[13]=s+4;r[14]=s+5;r[15]=s+6;r[8]=s+2;r[9]=s+13;r[10]=s+14;r[11]=s+7;r[4]=s+1;r[5]=s+12;r[6]=s+15;r[7]=s+8;r[0]=s;r[1]=s+11;r[2]=s+10;r[3]=s+9;i[2]=o+1;i[3]=o+2;\
i[0]=o;i[1]=o+3;break;case 1:c=r[12];l=r[13];h=r[14];u=r[15];r[12]=u;r[13]=s+0;r[14]=s+1;r[15]=s+2;r[8]=h;r[9]=s+9;r[10]=s+10;r[11]=s+3;r[4]=l;r[5]=s+8;r[6]=s+11;r[7]=s+4;r[0]=c;r[1]=s+7;r[2]=s+6;r[3]=s+5;c=i[2];l=i[3];i[2]=l;i[3]=o;i[0]=c;i[1]=o+1;break;case 2:c=r[15];l=r[11];r[12]=r[3];r[13]=s+0;r[14]=s+1;r[15]=s+2;r[8]=r[7];r[9]=s+9;r[10]=s+10;r[11]=s+3;r[4]=l;r[5]=s+8;r[6]=s+11;r[7]=s+4;r[0]=c;r[1]=s+7;r[2]=s+6;r[3]=s+5;c=i[3];i[2]=i[1];i[3]=o;i[0]=c;i[1]=o+1;break;case 3:r[12]=r[0];r[13]=s+\
0;r[14]=s+1;r[15]=s+2;r[8]=r[1];r[9]=s+9;r[10]=s+10;r[11]=s+3;r[4]=r[2];r[5]=s+8;r[6]=s+11;r[7]=s+4;r[0]=r[3];r[1]=s+7;r[2]=s+6;r[3]=s+5;i[2]=i[0];i[3]=o;i[0]=i[1];i[1]=o+1}this.figures.push({type:"patch",coords:new Int32Array(r),colors:new Int32Array(i)})}}_buildFigureFromPatch(e){const t=this.figures[e];assert("patch"===t.type,"Unexpected patch mesh figure");const a=this.coords,r=this.colors,i=t.coords,n=t.colors,s=Math.min(a[i[0]][0],a[i[3]][0],a[i[12]][0],a[i[15]][0]),o=Math.min(a[i[0]][1],a\
[i[3]][1],a[i[12]][1],a[i[15]][1]),c=Math.max(a[i[0]][0],a[i[3]][0],a[i[12]][0],a[i[15]][0]),l=Math.max(a[i[0]][1],a[i[3]][1],a[i[12]][1],a[i[15]][1]);let h=Math.ceil((c-s)*MeshShading.TRIANGLE_DENSITY/(this.bounds[2]-this.bounds[0]));h=MathClamp(h,MeshShading.MIN_SPLIT_PATCH_CHUNKS_AMOUNT,MeshShading.MAX_SPLIT_PATCH_CHUNKS_AMOUNT);let u=Math.ceil((l-o)*MeshShading.TRIANGLE_DENSITY/(this.bounds[3]-this.bounds[1]));u=MathClamp(u,MeshShading.MIN_SPLIT_PATCH_CHUNKS_AMOUNT,MeshShading.MAX_SPLIT_PATC\
H_CHUNKS_AMOUNT);const d=h+1,f=new Int32Array((u+1)*d),g=new Int32Array((u+1)*d);let p=0;const m=new Uint8Array(3),b=new Uint8Array(3),y=r[n[0]],w=r[n[1]],x=r[n[2]],S=r[n[3]],k=getB(u),C=getB(h);for(let e=0;e<=u;e++){m[0]=(y[0]*(u-e)+x[0]*e)/u|0;m[1]=(y[1]*(u-e)+x[1]*e)/u|0;m[2]=(y[2]*(u-e)+x[2]*e)/u|0;b[0]=(w[0]*(u-e)+S[0]*e)/u|0;b[1]=(w[1]*(u-e)+S[1]*e)/u|0;b[2]=(w[2]*(u-e)+S[2]*e)/u|0;for(let t=0;t<=h;t++,p++){if(!(0!==e&&e!==u||0!==t&&t!==h))continue;let n=0,s=0,o=0;for(let r=0;r<=3;r++)for(\
let c=0;c<=3;c++,o++){const l=k[e][r]*C[t][c];n+=a[i[o]][0]*l;s+=a[i[o]][1]*l}f[p]=a.length;a.push([n,s]);g[p]=r.length;const c=new Uint8Array(3);c[0]=(m[0]*(h-t)+b[0]*t)/h|0;c[1]=(m[1]*(h-t)+b[1]*t)/h|0;c[2]=(m[2]*(h-t)+b[2]*t)/h|0;r.push(c)}}f[0]=i[0];g[0]=n[0];f[h]=i[3];g[h]=n[1];f[d*u]=i[12];g[d*u]=n[2];f[d*u+h]=i[15];g[d*u+h]=n[3];this.figures[e]={type:"lattice",coords:f,colors:g,verticesPerRow:d}}_updateBounds(){let e=this.coords[0][0],t=this.coords[0][1],a=e,r=t;for(let i=1,n=this.coords.\
length;i<n;i++){const n=this.coords[i][0],s=this.coords[i][1];e=e>n?n:e;t=t>s?s:t;a=a<n?n:a;r=r<s?s:r}this.bounds=[e,t,a,r]}_packData(){let e,t,a,r;const i=this.coords,n=new Float32Array(2*i.length);for(e=0,a=0,t=i.length;e<t;e++){const t=i[e];n[a++]=t[0];n[a++]=t[1]}this.coords=n;const s=this.colors,o=new Uint8Array(3*s.length);for(e=0,a=0,t=s.length;e<t;e++){const t=s[e];o[a++]=t[0];o[a++]=t[1];o[a++]=t[2]}this.colors=o;const c=this.figures;for(e=0,t=c.length;e<t;e++){const t=c[e],i=t.coords,n\
=t.colors;for(a=0,r=i.length;a<r;a++){i[a]*=2;n[a]*=3}}}getIR(){const{bounds:e}=this;if(e[2]-e[0]==0||e[3]-e[1]==0)throw new FormatError(`Invalid MeshShading bounds: [${e}].`);return["Mesh",this.shadingType,this.coords,this.colors,this.figures,e,this.bbox,this.background]}}class DummyShading extends BaseShading{getIR(){return["Dummy"]}}function getTilingPatternIR(e,t,a){const r=lookupMatrix(t.getArray("Matrix"),Fa),i=lookupNormalRect(t.getArray("BBox"),null);if(!i||i[2]-i[0]==0||i[3]-i[1]==0)thr\
ow new FormatError("Invalid getTilingPatternIR /BBox array.");const n=t.get("XStep");if("number"!=typeof n)throw new FormatError("Invalid getTilingPatternIR /XStep value.");const s=t.get("YStep");if("number"!=typeof s)throw new FormatError("Invalid getTilingPatternIR /YStep value.");const o=t.get("PaintType");if(!Number.isInteger(o))throw new FormatError("Invalid getTilingPatternIR /PaintType value.");const c=t.get("TilingType");if(!Number.isInteger(c))throw new FormatError("Invalid getTilingPat\
ternIR /TilingType value.");return["TilingPattern",a,e,r,i,n,s,o,c]}const Ti=[1.3877,1,1,1,.97801,.92482,.89552,.91133,.81988,.97566,.98152,.93548,.93548,1.2798,.85284,.92794,1,.96134,1.54657,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.82845,.82845,.85284,.85284,.85284,.75859,.92138,.83908,.7762,.73293,.87289,.73133,.7514,.81921,.87356,.95958,.59526,.75727,.69225,1.04924,.9121,.86943,.79795,.88198,.77958,.70864,.81055,.90399,.88653,.96017,.82577,.77892,.78257,.97507,1.\
54657,.97507,.85284,.89552,.90176,.88762,.8785,.75241,.8785,.90518,.95015,.77618,.8785,.88401,.91916,.86304,.88401,.91488,.8785,.8801,.8785,.8785,.91343,.7173,1.04106,.8785,.85075,.95794,.82616,.85162,.79492,.88331,1.69808,.88331,.85284,.97801,.89552,.91133,.89552,.91133,1.7801,.89552,1.24487,1.13254,1.12401,.96839,.85284,.68787,.70645,.85592,.90747,1.01466,1.0088,.90323,1,1.07463,1,.91056,.75806,1.19118,.96839,.78864,.82845,.84133,.75859,.83908,.83908,.83908,.83908,.83908,.83908,.77539,.73293,.\
73133,.73133,.73133,.73133,.95958,.95958,.95958,.95958,.88506,.9121,.86943,.86943,.86943,.86943,.86943,.85284,.87508,.90399,.90399,.90399,.90399,.77892,.79795,.90807,.88762,.88762,.88762,.88762,.88762,.88762,.8715,.75241,.90518,.90518,.90518,.90518,.88401,.88401,.88401,.88401,.8785,.8785,.8801,.8801,.8801,.8801,.8801,.90747,.89049,.8785,.8785,.8785,.8785,.85162,.8785,.85162,.83908,.88762,.83908,.88762,.83908,.88762,.73293,.75241,.73293,.75241,.73293,.75241,.73293,.75241,.87289,.83016,.88506,.931\
25,.73133,.90518,.73133,.90518,.73133,.90518,.73133,.90518,.73133,.90518,.81921,.77618,.81921,.77618,.81921,.77618,1,1,.87356,.8785,.91075,.89608,.95958,.88401,.95958,.88401,.95958,.88401,.95958,.88401,.95958,.88401,.76229,.90167,.59526,.91916,1,1,.86304,.69225,.88401,1,1,.70424,.79468,.91926,.88175,.70823,.94903,.9121,.8785,1,1,.9121,.8785,.87802,.88656,.8785,.86943,.8801,.86943,.8801,.86943,.8801,.87402,.89291,.77958,.91343,1,1,.77958,.91343,.70864,.7173,.70864,.7173,.70864,.7173,.70864,.7173,\
1,1,.81055,.75841,.81055,1.06452,.90399,.8785,.90399,.8785,.90399,.8785,.90399,.8785,.90399,.8785,.90399,.8785,.96017,.95794,.77892,.85162,.77892,.78257,.79492,.78257,.79492,.78257,.79492,.9297,.56892,.83908,.88762,.77539,.8715,.87508,.89049,1,1,.81055,1.04106,1.20528,1.20528,1,1.15543,.70674,.98387,.94721,1.33431,1.45894,.95161,1.06303,.83908,.80352,.57184,.6965,.56289,.82001,.56029,.81235,1.02988,.83908,.7762,.68156,.80367,.73133,.78257,.87356,.86943,.95958,.75727,.89019,1.04924,.9121,.7648,.8\
6943,.87356,.79795,.78275,.81055,.77892,.9762,.82577,.99819,.84896,.95958,.77892,.96108,1.01407,.89049,1.02988,.94211,.96108,.8936,.84021,.87842,.96399,.79109,.89049,1.00813,1.02988,.86077,.87445,.92099,.84723,.86513,.8801,.75638,.85714,.78216,.79586,.87965,.94211,.97747,.78287,.97926,.84971,1.02988,.94211,.8801,.94211,.84971,.73133,1,1,1,1,1,1,1,1,1,1,1,1,.90264,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,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,1,1,1,1,1,1,1,1,.9\
0518,1,1,1,1,1,1,1,1,1,1,1,1,.90548,1,1,1,1,1,1,.96017,.95794,.96017,.95794,.96017,.95794,.77892,.85162,1,1,.89552,.90527,1,.90363,.92794,.92794,.92794,.92794,.87012,.87012,.87012,.89552,.89552,1.42259,.71143,1.06152,1,1,1.03372,1.03372,.97171,1.4956,2.2807,.93835,.83406,.91133,.84107,.91133,1,1,1,.72021,1,1.23108,.83489,.88525,.88525,.81499,.90527,1.81055,.90527,1.81055,1.31006,1.53711,.94434,1.08696,1,.95018,.77192,.85284,.90747,1.17534,.69825,.9716,1.37077,.90747,.90747,.85356,.90747,.90747,1\
.44947,.85284,.8941,.8941,.70572,.8,.70572,.70572,.70572,.70572,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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.99862,.99862,1,1,1,1,1,1.08004,.91027,1,1,1,.99862,1,1,1,1,1,1,1,1,1,1,1,1,.90727,.90727,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],Oi={lineHeight:1.2207,lineGap:.2207},Mi=[1.3877,1,1,1,.97801,.92482,.89552,.91133,.81988,.97566,.98152,.93548,.93548,1.2798,.85284,.92794,1,.96134,1.56239,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91\
133,.82845,.82845,.85284,.85284,.85284,.75859,.92138,.83908,.7762,.71805,.87289,.73133,.7514,.81921,.87356,.95958,.59526,.75727,.69225,1.04924,.90872,.85938,.79795,.87068,.77958,.69766,.81055,.90399,.88653,.96068,.82577,.77892,.78257,.97507,1.529,.97507,.85284,.89552,.90176,.94908,.86411,.74012,.86411,.88323,.95015,.86411,.86331,.88401,.91916,.86304,.88401,.9039,.86331,.86331,.86411,.86411,.90464,.70852,1.04106,.86331,.84372,.95794,.82616,.84548,.79492,.88331,1.69808,.88331,.85284,.97801,.89552,\
.91133,.89552,.91133,1.7801,.89552,1.24487,1.13254,1.19129,.96839,.85284,.68787,.70645,.85592,.90747,1.01466,1.0088,.90323,1,1.07463,1,.91056,.75806,1.19118,.96839,.78864,.82845,.84133,.75859,.83908,.83908,.83908,.83908,.83908,.83908,.77539,.71805,.73133,.73133,.73133,.73133,.95958,.95958,.95958,.95958,.88506,.90872,.85938,.85938,.85938,.85938,.85938,.85284,.87068,.90399,.90399,.90399,.90399,.77892,.79795,.90807,.94908,.94908,.94908,.94908,.94908,.94908,.85887,.74012,.88323,.88323,.88323,.88323,\
.88401,.88401,.88401,.88401,.8785,.86331,.86331,.86331,.86331,.86331,.86331,.90747,.89049,.86331,.86331,.86331,.86331,.84548,.86411,.84548,.83908,.94908,.83908,.94908,.83908,.94908,.71805,.74012,.71805,.74012,.71805,.74012,.71805,.74012,.87289,.79538,.88506,.92726,.73133,.88323,.73133,.88323,.73133,.88323,.73133,.88323,.73133,.88323,.81921,.86411,.81921,.86411,.81921,.86411,1,1,.87356,.86331,.91075,.8777,.95958,.88401,.95958,.88401,.95958,.88401,.95958,.88401,.95958,.88401,.76467,.90167,.59526,.\
91916,1,1,.86304,.69225,.88401,1,1,.70424,.77312,.91926,.88175,.70823,.94903,.90872,.86331,1,1,.90872,.86331,.86906,.88116,.86331,.85938,.86331,.85938,.86331,.85938,.86331,.87402,.86549,.77958,.90464,1,1,.77958,.90464,.69766,.70852,.69766,.70852,.69766,.70852,.69766,.70852,1,1,.81055,.75841,.81055,1.06452,.90399,.86331,.90399,.86331,.90399,.86331,.90399,.86331,.90399,.86331,.90399,.86331,.96068,.95794,.77892,.84548,.77892,.78257,.79492,.78257,.79492,.78257,.79492,.9297,.56892,.83908,.94908,.7753\
9,.85887,.87068,.89049,1,1,.81055,1.04106,1.20528,1.20528,1,1.15543,.70088,.98387,.94721,1.33431,1.45894,.95161,1.48387,.83908,.80352,.57118,.6965,.56347,.79179,.55853,.80346,1.02988,.83908,.7762,.67174,.86036,.73133,.78257,.87356,.86441,.95958,.75727,.89019,1.04924,.90872,.74889,.85938,.87891,.79795,.7957,.81055,.77892,.97447,.82577,.97466,.87179,.95958,.77892,.94252,.95612,.8753,1.02988,.92733,.94252,.87411,.84021,.8728,.95612,.74081,.8753,1.02189,1.02988,.84814,.87445,.91822,.84723,.85668,.86\
331,.81344,.87581,.76422,.82046,.96057,.92733,.99375,.78022,.95452,.86015,1.02988,.92733,.86331,.92733,.86015,.73133,1,1,1,1,1,1,1,1,1,1,1,1,.90631,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,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,1,1,1,1,1,1,1,1,.88323,1,1,1,1,1,1,1,1,1,1,1,1,.85174,1,1,1,1,1,1,.96068,.95794,.96068,.95794,.96068,.95794,.77892,.84548,1,1,.89552,.90527,1,.90363,.92794,.92794,.92794,.89807,.87012,.87012,.87012,.89552,.89552,1.42259,.71094,1.06152,1\
,1,1.03372,1.03372,.97171,1.4956,2.2807,.92972,.83406,.91133,.83326,.91133,1,1,1,.72021,1,1.23108,.83489,.88525,.88525,.81499,.90616,1.81055,.90527,1.81055,1.3107,1.53711,.94434,1.08696,1,.95018,.77192,.85284,.90747,1.17534,.69825,.9716,1.37077,.90747,.90747,.85356,.90747,.90747,1.44947,.85284,.8941,.8941,.70572,.8,.70572,.70572,.70572,.70572,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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.99862,.99862,1,1,1,1,1,1.08004,.91027,1,1,1,.99862,1,1,1,1,1,1,1,1\
,1,1,1,1,.90727,.90727,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],Di={lineHeight:1.2207,lineGap:.2207},Bi=[1.3877,1,1,1,1.17223,1.1293,.89552,.91133,.80395,1.02269,1.15601,.91056,.91056,1.2798,.85284,.89807,1,.90861,1.39543,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.91133,.96309,.96309,.85284,.85284,.85284,.83319,.88071,.8675,.81552,.72346,.85193,.73206,.7522,.81105,.86275,.90685,.6377,.77892,.75593,1.02638,.89249,.84118,.77452,.85374,.75186,.67789,.79776,.88844,.85066,.94309,.778\
18,.7306,.76659,1.10369,1.38313,1.10369,1.06139,.89552,.8739,.9245,.9245,.83203,.9245,.85865,1.09842,.9245,.9245,1.03297,1.07692,.90918,1.03297,.94959,.9245,.92274,.9245,.9245,1.02933,.77832,1.20562,.9245,.8916,.98986,.86621,.89453,.79004,.94152,1.77256,.94152,.85284,.97801,.89552,.91133,.89552,.91133,1.91729,.89552,1.17889,1.13254,1.16359,.92098,.85284,.68787,.71353,.84737,.90747,1.0088,1.0044,.87683,1,1.09091,1,.92229,.739,1.15642,.92098,.76288,.80504,.80972,.75859,.8675,.8675,.8675,.8675,.867\
5,.8675,.76318,.72346,.73206,.73206,.73206,.73206,.90685,.90685,.90685,.90685,.86477,.89249,.84118,.84118,.84118,.84118,.84118,.85284,.84557,.88844,.88844,.88844,.88844,.7306,.77452,.86331,.9245,.9245,.9245,.9245,.9245,.9245,.84843,.83203,.85865,.85865,.85865,.85865,.82601,.82601,.82601,.82601,.94469,.9245,.92274,.92274,.92274,.92274,.92274,.90747,.86651,.9245,.9245,.9245,.9245,.89453,.9245,.89453,.8675,.9245,.8675,.9245,.8675,.9245,.72346,.83203,.72346,.83203,.72346,.83203,.72346,.83203,.85193,\
.8875,.86477,.99034,.73206,.85865,.73206,.85865,.73206,.85865,.73206,.85865,.73206,.85865,.81105,.9245,.81105,.9245,.81105,.9245,1,1,.86275,.9245,.90872,.93591,.90685,.82601,.90685,.82601,.90685,.82601,.90685,1.03297,.90685,.82601,.77896,1.05611,.6377,1.07692,1,1,.90918,.75593,1.03297,1,1,.76032,.9375,.98156,.93407,.77261,1.11429,.89249,.9245,1,1,.89249,.9245,.92534,.86698,.9245,.84118,.92274,.84118,.92274,.84118,.92274,.8667,.86291,.75186,1.02933,1,1,.75186,1.02933,.67789,.77832,.67789,.77832,.\
67789,.77832,.67789,.77832,1,1,.79776,.97655,.79776,1.23023,.88844,.9245,.88844,.9245,.88844,.9245,.88844,.9245,.88844,.9245,.88844,.9245,.94309,.98986,.7306,.89453,.7306,.76659,.79004,.76659,.79004,.76659,.79004,1.09231,.54873,.8675,.9245,.76318,.84843,.84557,.86651,1,1,.79776,1.20562,1.18622,1.18622,1,1.1437,.67009,.96334,.93695,1.35191,1.40909,.95161,1.48387,.8675,.90861,.6192,.7363,.64824,.82411,.56321,.85696,1.23516,.8675,.81552,.7286,.84134,.73206,.76659,.86275,.84369,.90685,.77892,.85871,\
1.02638,.89249,.75828,.84118,.85984,.77452,.76466,.79776,.7306,.90782,.77818,.903,.87291,.90685,.7306,.99058,1.03667,.94635,1.23516,.9849,.99058,.92393,.8916,.942,1.03667,.75026,.94635,1.0297,1.23516,.90918,.94048,.98217,.89746,.84153,.92274,.82507,.88832,.84438,.88178,1.03525,.9849,1.00225,.78086,.97248,.89404,1.23516,.9849,.92274,.9849,.89404,.73206,1,1,1,1,1,1,1,1,1,1,1,1,.89693,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,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\
,1,1,1,1,1,1,1,1,.85865,1,1,1,1,1,1,1,1,1,1,1,1,.90933,1,1,1,1,1,1,.94309,.98986,.94309,.98986,.94309,.98986,.7306,.89453,1,1,.89552,.90527,1,.90186,1.12308,1.12308,1.12308,1.12308,1.2566,1.2566,1.2566,.89552,.89552,1.42259,.68994,1.03809,1,1,1.0176,1.0176,1.11523,1.4956,2.01462,.97858,.82616,.91133,.83437,.91133,1,1,1,.70508,1,1.23108,.79801,.84426,.84426,.774,.90572,1.81055,.90749,1.81055,1.28809,1.55469,.94434,1.07806,1,.97094,.7589,.85284,.90747,1.19658,.69825,.97622,1.33512,.90747,.90747,.8\
5284,.90747,.90747,1.44947,.85284,.8941,.8941,.70572,.8,.70572,.70572,.70572,.70572,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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.99862,.99862,1,1,1,1,1,1.0336,.91027,1,1,1,.99862,1,1,1,1,1,1,1,1,1,1,1,1,1.05859,1.05859,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],Ri={lineHeight:1.2207,lineGap:.2207},Ni=[1.3877,1,1,1,1.17223,1.1293,.89552,.91133,.80395,1.02269,1.15601,.91056,.91056,1.2798,.85284,.89807,1,.90861,1.39016,.91133,.91133,.91133,.91133,.91133,.91133,\
.91133,.91133,.91133,.91133,.96309,.96309,.85284,.85284,.85284,.83319,.88071,.8675,.81552,.73834,.85193,.73206,.7522,.81105,.86275,.90685,.6377,.77892,.75593,1.02638,.89385,.85122,.77452,.86503,.75186,.68887,.79776,.88844,.85066,.94258,.77818,.7306,.76659,1.10369,1.39016,1.10369,1.06139,.89552,.8739,.86128,.94469,.8457,.94469,.89464,1.09842,.84636,.94469,1.03297,1.07692,.90918,1.03297,.95897,.94469,.9482,.94469,.94469,1.04692,.78223,1.20562,.94469,.90332,.98986,.86621,.90527,.79004,.94152,1.7725\
6,.94152,.85284,.97801,.89552,.91133,.89552,.91133,1.91729,.89552,1.17889,1.13254,1.08707,.92098,.85284,.68787,.71353,.84737,.90747,1.0088,1.0044,.87683,1,1.09091,1,.92229,.739,1.15642,.92098,.76288,.80504,.80972,.75859,.8675,.8675,.8675,.8675,.8675,.8675,.76318,.73834,.73206,.73206,.73206,.73206,.90685,.90685,.90685,.90685,.86477,.89385,.85122,.85122,.85122,.85122,.85122,.85284,.85311,.88844,.88844,.88844,.88844,.7306,.77452,.86331,.86128,.86128,.86128,.86128,.86128,.86128,.8693,.8457,.89464,.8\
9464,.89464,.89464,.82601,.82601,.82601,.82601,.94469,.94469,.9482,.9482,.9482,.9482,.9482,.90747,.86651,.94469,.94469,.94469,.94469,.90527,.94469,.90527,.8675,.86128,.8675,.86128,.8675,.86128,.73834,.8457,.73834,.8457,.73834,.8457,.73834,.8457,.85193,.92454,.86477,.9921,.73206,.89464,.73206,.89464,.73206,.89464,.73206,.89464,.73206,.89464,.81105,.84636,.81105,.84636,.81105,.84636,1,1,.86275,.94469,.90872,.95786,.90685,.82601,.90685,.82601,.90685,.82601,.90685,1.03297,.90685,.82601,.77741,1.0561\
1,.6377,1.07692,1,1,.90918,.75593,1.03297,1,1,.76032,.90452,.98156,1.11842,.77261,1.11429,.89385,.94469,1,1,.89385,.94469,.95877,.86901,.94469,.85122,.9482,.85122,.9482,.85122,.9482,.8667,.90016,.75186,1.04692,1,1,.75186,1.04692,.68887,.78223,.68887,.78223,.68887,.78223,.68887,.78223,1,1,.79776,.92188,.79776,1.23023,.88844,.94469,.88844,.94469,.88844,.94469,.88844,.94469,.88844,.94469,.88844,.94469,.94258,.98986,.7306,.90527,.7306,.76659,.79004,.76659,.79004,.76659,.79004,1.09231,.54873,.8675,.8\
6128,.76318,.8693,.85311,.86651,1,1,.79776,1.20562,1.18622,1.18622,1,1.1437,.67742,.96334,.93695,1.35191,1.40909,.95161,1.48387,.86686,.90861,.62267,.74359,.65649,.85498,.56963,.88254,1.23516,.8675,.81552,.75443,.84503,.73206,.76659,.86275,.85122,.90685,.77892,.85746,1.02638,.89385,.75657,.85122,.86275,.77452,.74171,.79776,.7306,.95165,.77818,.89772,.88831,.90685,.7306,.98142,1.02191,.96576,1.23516,.99018,.98142,.9236,.89258,.94035,1.02191,.78848,.96576,.9561,1.23516,.90918,.92578,.95424,.89746,\
.83969,.9482,.80113,.89442,.85208,.86155,.98022,.99018,1.00452,.81209,.99247,.89181,1.23516,.99018,.9482,.99018,.89181,.73206,1,1,1,1,1,1,1,1,1,1,1,1,.88844,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,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,1,1,1,1,1,1,1,1,.89464,1,1,1,1,1,1,1,1,1,1,1,1,.96766,1,1,1,1,1,1,.94258,.98986,.94258,.98986,.94258,.98986,.7306,.90527,1,1,.89552,.90527,1,.90186,1.12308,1.12308,1.12308,1.12308,1.2566,1.2566,1.2566,.89552,.89552,1.42259,.690\
43,1.03809,1,1,1.0176,1.0176,1.11523,1.4956,2.01462,.99331,.82616,.91133,.84286,.91133,1,1,1,.70508,1,1.23108,.79801,.84426,.84426,.774,.90527,1.81055,.90527,1.81055,1.28809,1.55469,.94434,1.07806,1,.97094,.7589,.85284,.90747,1.19658,.69825,.97622,1.33512,.90747,.90747,.85356,.90747,.90747,1.44947,.85284,.8941,.8941,.70572,.8,.70572,.70572,.70572,.70572,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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,.99862,.99862,1,1,1,1,1,1.0336,.91027,1,1,1,.99862,1,1,1\
,1,1,1,1,1,1,1,1,1,1.05859,1.05859,1,1,1,1.07185,.99413,.96334,1.08065,1,1,1,1,1,1,1,1,1,1,1],Ei={lineHeight:1.2207,lineGap:.2207},Pi=[.76116,1,1,1.0006,.99998,.99974,.99973,.99973,.99982,.99977,1.00087,.99998,.99998,.99959,1.00003,1.0006,.99998,1.0006,1.0006,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99998,1,1.00003,1.00003,1.00003,1.00026,.9999,.99977,.99977,.99977,.99977,1.00001,1.00026,1.00022,.99977,1.0006,.99973,.99977,1.00026,.99999,.99977,1.00022,1.00001,1.000\
22,.99977,1.00001,1.00026,.99977,1.00001,1.00016,1.00001,1.00001,1.00026,.99998,1.0006,.99998,1.00003,.99973,.99998,.99973,1.00026,.99973,1.00026,.99973,.99998,1.00026,1.00026,1.0006,1.0006,.99973,1.0006,.99982,1.00026,1.00026,1.00026,1.00026,.99959,.99973,.99998,1.00026,.99973,1.00022,.99973,.99973,1,.99959,1.00077,.99959,1.00003,.99998,.99973,.99973,.99973,.99973,1.00077,.99973,.99998,1.00025,.99968,.99973,1.00003,1.00025,.60299,1.00024,1.06409,1,1,.99998,1,.99973,1.0006,.99998,1,.99936,.99973\
,1.00002,1.00002,1.00002,1.00026,.99977,.99977,.99977,.99977,.99977,.99977,1,.99977,1.00001,1.00001,1.00001,1.00001,1.0006,1.0006,1.0006,1.0006,.99977,.99977,1.00022,1.00022,1.00022,1.00022,1.00022,1.00003,1.00022,.99977,.99977,.99977,.99977,1.00001,1.00001,1.00026,.99973,.99973,.99973,.99973,.99973,.99973,.99982,.99973,.99973,.99973,.99973,.99973,1.0006,1.0006,1.0006,1.0006,1.00026,1.00026,1.00026,1.00026,1.00026,1.00026,1.00026,1.06409,1.00026,1.00026,1.00026,1.00026,1.00026,.99973,1.00026,.99\
973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,1.03374,.99977,1.00026,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00022,1.00026,1.00022,1.00026,1.00022,1.00026,1.00022,1.00026,.99977,1.00026,.99977,1.00026,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.00042,.99973,.99973,1.0006,.99977,.99973,.99973,1.00026,1.0006,1.00026,1.0006,1.00026,1.03828,1.00026,.99999,1.00026,1.0006,.99\
977,1.00026,.99977,1.00026,.99977,1.00026,.9993,.9998,1.00026,1.00022,1.00026,1.00022,1.00026,1.00022,1.00026,1,1.00016,.99977,.99959,.99977,.99959,.99977,.99959,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00026,.99998,1.00026,.8121,1.00026,.99998,.99977,1.00026,.99977,1.00026,.99977,1.00026,.99977,1.00026,.99977,1.00026,.99977,1.00026,1.00016,1.00022,1.00001,.99973,1.00001,1.00026,1,1.00026,1,1.00026,1,1.0006,.99973,.99977,.99973,1,.99982,1.00022,1.00026,1.00001,.99973,1.00026\
,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,1.00034,.99977,1,.99997,1.00026,1.00078,1.00036,.99973,1.00013,1.0006,.99977,.99977,.99988,.85148,1.00001,1.00026,.99977,1.00022,1.0006,.99977,1.00001,.99999,.99977,1.00069,1.00022,.99977,1.00001,.99984,1.00026,1.00001,1.00024,1.00001,.9999,1,1.0006,1.00001,1.00041,.99962,1.00026,1.0006,.99995,1.00041,.99942,.99973,.99927,1.00082,.99902,1.00026,1.00087,1.0006,1.00069,.99973,.99867,.99973,.9993,1.00026,1.00049,1.00056,1\
,.99988,.99935,.99995,.99954,1.00055,.99945,1.00032,1.0006,.99995,1.00026,.99995,1.00032,1.00001,1.00008,.99971,1.00019,.9994,1.00001,1.0006,1.00044,.99973,1.00023,1.00047,1,.99942,.99561,.99989,1.00035,.99977,1.00035,.99977,1.00019,.99944,1.00001,1.00021,.99926,1.00035,1.00035,.99942,1.00048,.99999,.99977,1.00022,1.00035,1.00001,.99977,1.00026,.99989,1.00057,1.00001,.99936,1.00052,1.00012,.99996,1.00043,1,1.00035,.9994,.99976,1.00035,.99973,1.00052,1.00041,1.00119,1.00037,.99973,1.00002,.99986,\
1.00041,1.00041,.99902,.9996,1.00034,.99999,1.00026,.99999,1.00026,.99973,1.00052,.99973,1,.99973,1.00041,1.00075,.9994,1.0003,.99999,1,1.00041,.99955,1,.99915,.99973,.99973,1.00026,1.00119,.99955,.99973,1.0006,.99911,1.0006,1.00026,.99972,1.00026,.99902,1.00041,.99973,.99999,1,1,1.00038,1.0005,1.00016,1.00022,1.00016,1.00022,1.00016,1.00022,1.00001,.99973,1,1,.99973,1,1,.99955,1.0006,1.0006,1.0006,1.0006,1,1,1,.99973,.99973,.99972,1,1,1.00106,.99999,.99998,.99998,.99999,.99998,1.66475,1,.99973,\
.99973,1.00023,.99973,.99971,1.00047,1.00023,1,.99991,.99984,1.00002,1.00002,1.00002,1.00002,1,1,1,1,1,1,1,.99972,1,1.20985,1.39713,1.00003,1.00031,1.00015,1,.99561,1.00027,1.00031,1.00031,.99915,1.00031,1.00031,.99999,1.00003,.99999,.99999,1.41144,1.6,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144\
,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.40579,1.40579,1.36625,.99999,1,.99861,.99861,1,1.00026,1.00026,1.00026,1.00026,.99972,.99999,.99999,.99999,.99999,1.40483,1,.99977,1.00054,1,1,.99953,.99962,1.00042,.9995,1,1,1,1,1,1,1,1,.99998,.99998,.99998,.99998,1,1,1,1,1,1,1,1,1,1,1],ji={lineHeight:1.2,lineGap:.2},_i=[.76116,1,1,1.0006,.99998,.99974,.99973,.99973,.99982,.99977,1.00087,.99998,.99998,.99959,1.00003,1.0006,.99998,1.0006,1.0006,.99\
973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99998,1,1.00003,1.00003,1.00003,1.00026,.9999,.99977,.99977,.99977,.99977,1.00001,1.00026,1.00022,.99977,1.0006,.99973,.99977,1.00026,.99999,.99977,1.00022,1.00001,1.00022,.99977,1.00001,1.00026,.99977,1.00001,1.00016,1.00001,1.00001,1.00026,.99998,1.0006,.99998,1.00003,.99973,.99998,.99973,1.00026,.99973,1.00026,.99973,.99998,1.00026,1.00026,1.0006,1.0006,.99973,1.0006,.99982,1.00026,1.00026,1.00026,1.00026,.99959,.99973,.99998\
,1.00026,.99973,1.00022,.99973,.99973,1,.99959,1.00077,.99959,1.00003,.99998,.99973,.99973,.99973,.99973,1.00077,.99973,.99998,1.00025,.99968,.99973,1.00003,1.00025,.60299,1.00024,1.06409,1,1,.99998,1,.99973,1.0006,.99998,1,.99936,.99973,1.00002,1.00002,1.00002,1.00026,.99977,.99977,.99977,.99977,.99977,.99977,1,.99977,1.00001,1.00001,1.00001,1.00001,1.0006,1.0006,1.0006,1.0006,.99977,.99977,1.00022,1.00022,1.00022,1.00022,1.00022,1.00003,1.00022,.99977,.99977,.99977,.99977,1.00001,1.00001,1.000\
26,.99973,.99973,.99973,.99973,.99973,.99973,.99982,.99973,.99973,.99973,.99973,.99973,1.0006,1.0006,1.0006,1.0006,1.00026,1.00026,1.00026,1.00026,1.00026,1.00026,1.00026,1.06409,1.00026,1.00026,1.00026,1.00026,1.00026,.99973,1.00026,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,1.0044,.99977,1.00026,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00022,1.00026,1.00022,1.00026,1.00022,1.00026,1.00022,1\
.00026,.99977,1.00026,.99977,1.00026,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,.99971,.99973,.99973,1.0006,.99977,.99973,.99973,1.00026,1.0006,1.00026,1.0006,1.00026,1.01011,1.00026,.99999,1.00026,1.0006,.99977,1.00026,.99977,1.00026,.99977,1.00026,.9993,.9998,1.00026,1.00022,1.00026,1.00022,1.00026,1.00022,1.00026,1,1.00016,.99977,.99959,.99977,.99959,.99977,.99959,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00026,.99998,1.00026,.8121,1.00026,.99998\
,.99977,1.00026,.99977,1.00026,.99977,1.00026,.99977,1.00026,.99977,1.00026,.99977,1.00026,1.00016,1.00022,1.00001,.99973,1.00001,1.00026,1,1.00026,1,1.00026,1,1.0006,.99973,.99977,.99973,1,.99982,1.00022,1.00026,1.00001,.99973,1.00026,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99977,1,1,1.00026,.99969,.99972,.99981,.9998,1.0006,.99977,.99977,1.00022,.91155,1.00001,1.00026,.99977,1.00022,1.0006,.99977,1.00001,.99999,.99977,.99966,1.00022,1.00032,1.00001,\
.99944,1.00026,1.00001,.99968,1.00001,1.00047,1,1.0006,1.00001,.99981,1.00101,1.00026,1.0006,.99948,.99981,1.00064,.99973,.99942,1.00101,1.00061,1.00026,1.00069,1.0006,1.00014,.99973,1.01322,.99973,1.00065,1.00026,1.00012,.99923,1,1.00064,1.00076,.99948,1.00055,1.00063,1.00007,.99943,1.0006,.99948,1.00026,.99948,.99943,1.00001,1.00001,1.00029,1.00038,1.00035,1.00001,1.0006,1.0006,.99973,.99978,1.00001,1.00057,.99989,.99967,.99964,.99967,.99977,.99999,.99977,1.00038,.99977,1.00001,.99973,1.00066,\
.99967,.99967,1.00041,.99998,.99999,.99977,1.00022,.99967,1.00001,.99977,1.00026,.99964,1.00031,1.00001,.99999,.99999,1,1.00023,1,1,.99999,1.00035,1.00001,.99999,.99973,.99977,.99999,1.00058,.99973,.99973,.99955,.9995,1.00026,1.00026,1.00032,.99989,1.00034,.99999,1.00026,1.00026,1.00026,.99973,.45998,.99973,1.00026,.99973,1.00001,.99999,.99982,.99994,.99996,1,1.00042,1.00044,1.00029,1.00023,.99973,.99973,1.00026,.99949,1.00002,.99973,1.0006,1.0006,1.0006,.99975,1.00026,1.00026,1.00032,.98685,.99\
973,1.00026,1,1,.99966,1.00044,1.00016,1.00022,1.00016,1.00022,1.00016,1.00022,1.00001,.99973,1,1,.99973,1,1,.99955,1.0006,1.0006,1.0006,1.0006,1,1,1,.99973,.99973,.99972,1,1,1.00106,.99999,.99998,.99998,.99999,.99998,1.66475,1,.99973,.99973,1,.99973,.99971,.99978,1,1,.99991,.99984,1.00002,1.00002,1.00002,1.00002,1.00098,1,1,1,1.00049,1,1,.99972,1,1.20985,1.39713,1.00003,1.00031,1.00015,1,.99561,1.00027,1.00031,1.00031,.99915,1.00031,1.00031,.99999,1.00003,.99999,.99999,1.41144,1.6,1.41144,1.411\
44,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.40579,1.40579,1.36625,.99999,1,.99861,.99861,1,1.00026,1.00026,1.00026,1.00026,.99972,.99999,.99999,.99999,.99999,1.40483,1,.99977,1.00054,1,1,.99953,.99962,1.00042,.9\
995,1,1,1,1,1,1,1,1,.99998,.99998,.99998,.99998,1,1,1,1,1,1,1,1,1,1,1],Xi={lineHeight:1.35,lineGap:.2},qi=[.76116,1,1,1.0006,1.0006,1.00006,.99973,.99973,.99982,1.00001,1.00043,.99998,.99998,.99959,1.00003,1.0006,.99998,1.0006,1.0006,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,1.0006,1,1.00003,1.00003,1.00003,.99973,.99987,1.00001,1.00001,.99977,.99977,1.00001,1.00026,1.00022,.99977,1.0006,1,1.00001,.99973,.99999,.99977,1.00022,1.00001,1.00022,.99977,1.00001,1.00026,.99\
977,1.00001,1.00016,1.00001,1.00001,1.00026,1.0006,1.0006,1.0006,.99949,.99973,.99998,.99973,.99973,1,.99973,.99973,1.0006,.99973,.99973,.99924,.99924,1,.99924,.99999,.99973,.99973,.99973,.99973,.99998,1,1.0006,.99973,1,.99977,1,1,1,1.00005,1.0009,1.00005,1.00003,.99998,.99973,.99973,.99973,.99973,1.0009,.99973,.99998,1.00025,.99968,.99973,1.00003,1.00025,.60299,1.00024,1.06409,1,1,.99998,1,.9998,1.0006,.99998,1,.99936,.99973,1.00002,1.00002,1.00002,1.00026,1.00001,1.00001,1.00001,1.00001,1.0000\
1,1.00001,1,.99977,1.00001,1.00001,1.00001,1.00001,1.0006,1.0006,1.0006,1.0006,.99977,.99977,1.00022,1.00022,1.00022,1.00022,1.00022,1.00003,1.00022,.99977,.99977,.99977,.99977,1.00001,1.00001,1.00026,.99973,.99973,.99973,.99973,.99973,.99973,.99982,1,.99973,.99973,.99973,.99973,1.0006,1.0006,1.0006,1.0006,.99973,.99973,.99973,.99973,.99973,.99973,.99973,1.06409,1.00026,.99973,.99973,.99973,.99973,1,.99973,1,1.00001,.99973,1.00001,.99973,1.00001,.99973,.99977,1,.99977,1,.99977,1,.99977,1,.99977,\
1.0288,.99977,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00022,.99973,1.00022,.99973,1.00022,.99973,1.00022,.99973,.99977,.99973,.99977,.99973,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,.99924,1.0006,1.0006,.99946,1.00034,1,.99924,1.00001,1,1,.99973,.99924,.99973,.99924,.99973,1.06311,.99973,1.00024,.99973,.99924,.99977,.99973,.99977,.99973,.99977,.99973,1.00041,.9998,.99973,1.00022,.99973,1.00022,.99973,1.00022,.99973,1,1.00016,.99977,.99998,.99977\
,.99998,.99977,.99998,1.00001,1,1.00001,1,1.00001,1,1.00001,1,1.00026,1.0006,1.00026,.89547,1.00026,1.0006,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,1.00016,.99977,1.00001,1,1.00001,1.00026,1,1.00026,1,1.00026,1,.99924,.99973,1.00001,.99973,1,.99982,1.00022,1.00026,1.00001,1,1.00026,1.0006,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,1.00001,1,1.00054,.99977,1.00084,1.00007,.99973,1.00013,.99924,1.00001,1.00001,.99945,.912\
21,1.00001,1.00026,.99977,1.00022,1.0006,1.00001,1.00001,.99999,.99977,.99933,1.00022,1.00054,1.00001,1.00065,1.00026,1.00001,1.0001,1.00001,1.00052,1,1.0006,1.00001,.99945,.99897,.99968,.99924,1.00036,.99945,.99949,1,1.0006,.99897,.99918,.99968,.99911,.99924,1,.99962,1.01487,1,1.0005,.99973,1.00012,1.00043,1,.99995,.99994,1.00036,.99947,1.00019,1.00063,1.00025,.99924,1.00036,.99973,1.00036,1.00025,1.00001,1.00001,1.00027,1.0001,1.00068,1.00001,1.0006,1.0006,1,1.00008,.99957,.99972,.9994,.99954,\
.99975,1.00051,1.00001,1.00019,1.00001,1.0001,.99986,1.00001,1.00001,1.00038,.99954,.99954,.9994,1.00066,.99999,.99977,1.00022,1.00054,1.00001,.99977,1.00026,.99975,1.0001,1.00001,.99993,.9995,.99955,1.00016,.99978,.99974,1.00019,1.00022,.99955,1.00053,.99973,1.00089,1.00005,.99967,1.00048,.99973,1.00002,1.00034,.99973,.99973,.99964,1.00006,1.00066,.99947,.99973,.98894,.99973,1,.44898,1,.99946,1,1.00039,1.00082,.99991,.99991,.99985,1.00022,1.00023,1.00061,1.00006,.99966,.99973,.99973,.99973,1.00\
019,1.0008,1,.99924,.99924,.99924,.99983,1.00044,.99973,.99964,.98332,1,.99973,1,1,.99962,.99895,1.00016,.99977,1.00016,.99977,1.00016,.99977,1.00001,1,1,1,.99973,1,1,.99955,.99924,.99924,.99924,.99924,.99998,.99998,.99998,.99973,.99973,.99972,1,1,1.00267,.99999,.99998,.99998,1,.99998,1.66475,1,.99973,.99973,1.00023,.99973,1.00423,.99925,.99999,1,.99991,.99984,1.00002,1.00002,1.00002,1.00002,1.00049,1,1.00245,1,1,1,1,.96329,1,1.20985,1.39713,1.00003,.8254,1.00015,1,1.00035,1.00027,1.00031,1.0003\
1,1.00003,1.00031,1.00031,.99999,1.00003,.99999,.99999,1.41144,1.6,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.40579,1.40579,1.36625,.99999,1,.99861,.99861,1,1.00026,1.00026,1.00026,1.00026,.95317,.\
99999,.99999,.99999,.99999,1.40483,1,.99977,1.00054,1,1,.99953,.99962,1.00042,.9995,1,1,1,1,1,1,1,1,.99998,.99998,.99998,.99998,1,1,1,1,1,1,1,1,1,1,1],Hi={lineHeight:1.35,lineGap:.2},Wi=[.76116,1,1,1.0006,1.0006,1.00006,.99973,.99973,.99982,1.00001,1.00043,.99998,.99998,.99959,1.00003,1.0006,.99998,1.0006,1.0006,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,.99973,1.0006,1,1.00003,1.00003,1.00003,.99973,.99987,1.00001,1.00001,.99977,.99977,1.00001,1.00026,1.00022,.99977,1.0006,1\
,1.00001,.99973,.99999,.99977,1.00022,1.00001,1.00022,.99977,1.00001,1.00026,.99977,1.00001,1.00016,1.00001,1.00001,1.00026,1.0006,1.0006,1.0006,.99949,.99973,.99998,.99973,.99973,1,.99973,.99973,1.0006,.99973,.99973,.99924,.99924,1,.99924,.99999,.99973,.99973,.99973,.99973,.99998,1,1.0006,.99973,1,.99977,1,1,1,1.00005,1.0009,1.00005,1.00003,.99998,.99973,.99973,.99973,.99973,1.0009,.99973,.99998,1.00025,.99968,.99973,1.00003,1.00025,.60299,1.00024,1.06409,1,1,.99998,1,.9998,1.0006,.99998,1,.999\
36,.99973,1.00002,1.00002,1.00002,1.00026,1.00001,1.00001,1.00001,1.00001,1.00001,1.00001,1,.99977,1.00001,1.00001,1.00001,1.00001,1.0006,1.0006,1.0006,1.0006,.99977,.99977,1.00022,1.00022,1.00022,1.00022,1.00022,1.00003,1.00022,.99977,.99977,.99977,.99977,1.00001,1.00001,1.00026,.99973,.99973,.99973,.99973,.99973,.99973,.99982,1,.99973,.99973,.99973,.99973,1.0006,1.0006,1.0006,1.0006,.99973,.99973,.99973,.99973,.99973,.99973,.99973,1.06409,1.00026,.99973,.99973,.99973,.99973,1,.99973,1,1.00001,\
.99973,1.00001,.99973,1.00001,.99973,.99977,1,.99977,1,.99977,1,.99977,1,.99977,1.04596,.99977,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00001,.99973,1.00022,.99973,1.00022,.99973,1.00022,.99973,1.00022,.99973,.99977,.99973,.99977,.99973,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,1.0006,.99924,1.0006,1.0006,1.00019,1.00034,1,.99924,1.00001,1,1,.99973,.99924,.99973,.99924,.99973,1.02572,.99973,1.00005,.99973,.99924,.99977,.99973,.99977,.99973,.99977,.99973,.99999,.9998,.\
99973,1.00022,.99973,1.00022,.99973,1.00022,.99973,1,1.00016,.99977,.99998,.99977,.99998,.99977,.99998,1.00001,1,1.00001,1,1.00001,1,1.00001,1,1.00026,1.0006,1.00026,.84533,1.00026,1.0006,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,.99977,.99973,1.00016,.99977,1.00001,1,1.00001,1.00026,1,1.00026,1,1.00026,1,.99924,.99973,1.00001,.99973,1,.99982,1.00022,1.00026,1.00001,1,1.00026,1.0006,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99998,.99928,1,\
.99977,1.00013,1.00055,.99947,.99945,.99941,.99924,1.00001,1.00001,1.0004,.91621,1.00001,1.00026,.99977,1.00022,1.0006,1.00001,1.00005,.99999,.99977,1.00015,1.00022,.99977,1.00001,.99973,1.00026,1.00001,1.00019,1.00001,.99946,1,1.0006,1.00001,.99978,1.00045,.99973,.99924,1.00023,.99978,.99966,1,1.00065,1.00045,1.00019,.99973,.99973,.99924,1,1,.96499,1,1.00055,.99973,1.00008,1.00027,1,.9997,.99995,1.00023,.99933,1.00019,1.00015,1.00031,.99924,1.00023,.99973,1.00023,1.00031,1.00001,.99928,1.00029,\
1.00092,1.00035,1.00001,1.0006,1.0006,1,.99988,.99975,1,1.00082,.99561,.9996,1.00035,1.00001,.99962,1.00001,1.00092,.99964,1.00001,.99963,.99999,1.00035,1.00035,1.00082,.99962,.99999,.99977,1.00022,1.00035,1.00001,.99977,1.00026,.9996,.99967,1.00001,1.00034,1.00074,1.00054,1.00053,1.00063,.99971,.99962,1.00035,.99975,.99977,.99973,1.00043,.99953,1.0007,.99915,.99973,1.00008,.99892,1.00073,1.00073,1.00114,.99915,1.00073,.99955,.99973,1.00092,.99973,1,.99998,1,1.0003,1,1.00043,1.00001,.99969,1.000\
3,1,1.00035,1.00001,.9995,1,1.00092,.99973,.99973,.99973,1.0007,.9995,1,.99924,1.0006,.99924,.99972,1.00062,.99973,1.00114,1.00073,1,.99955,1,1,1.00047,.99968,1.00016,.99977,1.00016,.99977,1.00016,.99977,1.00001,1,1,1,.99973,1,1,.99955,.99924,.99924,.99924,.99924,.99998,.99998,.99998,.99973,.99973,.99972,1,1,1.00267,.99999,.99998,.99998,1,.99998,1.66475,1,.99973,.99973,1.00023,.99973,.99971,.99925,1.00023,1,.99991,.99984,1.00002,1.00002,1.00002,1.00002,1,1,1,1,1,1,1,.96329,1,1.20985,1.39713,1.00\
003,.8254,1.00015,1,1.00035,1.00027,1.00031,1.00031,.99915,1.00031,1.00031,.99999,1.00003,.99999,.99999,1.41144,1.6,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.41144,1.40579,1.40579,1.36625,.99999,1,.99861,\
.99861,1,1.00026,1.00026,1.00026,1.00026,.95317,.99999,.99999,.99999,.99999,1.40483,1,.99977,1.00054,1,1,.99953,.99962,1.00042,.9995,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],zi={lineHeight:1.2,lineGap:.2},$i=[365,0,333,278,333,474,556,556,889,722,238,333,333,389,584,278,333,278,278,556,556,556,556,556,556,556,556,556,556,333,333,584,584,584,611,975,722,722,722,722,667,611,778,722,278,556,722,611,833,722,778,667,778,722,667,611,722,667,944,667,667,611,333,278,333,584,556,333,556,611,556,611\
,556,333,611,611,278,278,556,278,889,611,611,611,611,389,556,333,611,556,778,556,556,500,389,280,389,584,333,556,556,556,556,280,556,333,737,370,556,584,737,552,400,549,333,333,333,576,556,278,333,333,365,556,834,834,834,611,722,722,722,722,722,722,1e3,722,667,667,667,667,278,278,278,278,722,722,778,778,778,778,778,584,778,722,722,722,722,667,667,611,556,556,556,556,556,556,889,556,556,556,556,556,278,278,278,278,611,611,611,611,611,611,611,549,611,611,611,611,611,556,611,556,722,556,722,556,722\
,556,722,556,722,556,722,556,722,556,722,719,722,611,667,556,667,556,667,556,667,556,667,556,778,611,778,611,778,611,778,611,722,611,722,611,278,278,278,278,278,278,278,278,278,278,785,556,556,278,722,556,556,611,278,611,278,611,385,611,479,611,278,722,611,722,611,722,611,708,723,611,778,611,778,611,778,611,1e3,944,722,389,722,389,722,389,667,556,667,556,667,556,667,556,611,333,611,479,611,333,722,611,722,611,722,611,722,611,722,611,722,611,944,778,667,556,667,611,500,611,500,611,500,278,556,722\
,556,1e3,889,778,611,667,556,611,333,333,333,333,333,333,333,333,333,333,333,465,722,333,853,906,474,825,927,838,278,722,722,601,719,667,611,722,778,278,722,667,833,722,644,778,722,667,600,611,667,821,667,809,802,278,667,615,451,611,278,582,615,610,556,606,475,460,611,541,278,558,556,612,556,445,611,766,619,520,684,446,582,715,576,753,845,278,582,611,582,845,667,669,885,567,711,667,278,276,556,1094,1062,875,610,722,622,719,722,719,722,567,712,667,904,626,719,719,610,702,833,722,778,719,667,722,6\
11,622,854,667,730,703,1005,1019,870,979,719,711,1031,719,556,618,615,417,635,556,709,497,615,615,500,635,740,604,611,604,611,556,490,556,875,556,615,581,833,844,729,854,615,552,854,583,556,556,611,417,552,556,278,281,278,969,906,611,500,615,556,604,778,611,487,447,944,778,944,778,944,778,667,556,333,333,556,1e3,1e3,552,278,278,278,278,500,500,500,556,556,350,1e3,1e3,240,479,333,333,604,333,167,396,556,556,1094,556,885,489,1115,1e3,768,600,834,834,834,834,1e3,500,1e3,500,1e3,500,500,494,612,823,\
713,584,549,713,979,722,274,549,549,583,549,549,604,584,604,604,708,625,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,729,604,604,354,354,1e3,990,990,990,990,494,604,604,604,604,354,1021,1052,917,750,750,531,656,594,510,500,750,750,611,611,333,333,333,333,333,333,333,333,222,222,333,333,333,333,333,333,333,333],Gi=[-1,-1,-1,32,33,34,35,36,37,38,39,40,41,42,43,44,4\
5,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,161,162,163,164,165,166,167,168,169,170,171,172,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,\
219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,\
344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,402,506,507,508,509,510,511,536,537,538,539,710,711,713,728,729,730,731,732,733,900,901,902,903,904,905,906,908,910,911,912,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,\
968,969,970,971,972,973,974,1024,1025,1026,1027,1028,1029,1030,1031,1032,1033,1034,1035,1036,1037,1038,1039,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,1104,1105,1106,1107,1108,1109,1110,1111,1112,1113,1114,1115,1116,1117,11\
18,1119,1138,1139,1168,1169,7808,7809,7810,7811,7812,7813,7922,7923,8208,8209,8211,8212,8213,8215,8216,8217,8218,8219,8220,8221,8222,8224,8225,8226,8230,8240,8242,8243,8249,8250,8252,8254,8260,8319,8355,8356,8359,8364,8453,8467,8470,8482,8486,8494,8539,8540,8541,8542,8592,8593,8594,8595,8596,8597,8616,8706,8710,8719,8721,8722,8730,8734,8735,8745,8747,8776,8800,8801,8804,8805,8962,8976,8992,8993,9472,9474,9484,9488,9492,9496,9500,9508,9516,9524,9532,9552,9553,9554,9555,9556,9557,9558,9559,9560,95\
61,9562,9563,9564,9565,9566,9567,9568,9569,9570,9571,9572,9573,9574,9575,9576,9577,9578,9579,9580,9600,9604,9608,9612,9616,9617,9618,9619,9632,9633,9642,9643,9644,9650,9658,9660,9668,9674,9675,9679,9688,9689,9702,9786,9787,9788,9792,9794,9824,9827,9829,9830,9834,9835,9836,61441,61442,61445,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],Vi=[365,0,333,278,333,474,556,556,889,722,238,333,333,389,584,278,333,278,278,556,556,556,556,556,556,556,556,556,556,333,333,584,584,584,611,975,722,722,722\
,722,667,611,778,722,278,556,722,611,833,722,778,667,778,722,667,611,722,667,944,667,667,611,333,278,333,584,556,333,556,611,556,611,556,333,611,611,278,278,556,278,889,611,611,611,611,389,556,333,611,556,778,556,556,500,389,280,389,584,333,556,556,556,556,280,556,333,737,370,556,584,737,552,400,549,333,333,333,576,556,278,333,333,365,556,834,834,834,611,722,722,722,722,722,722,1e3,722,667,667,667,667,278,278,278,278,722,722,778,778,778,778,778,584,778,722,722,722,722,667,667,611,556,556,556,556\
,556,556,889,556,556,556,556,556,278,278,278,278,611,611,611,611,611,611,611,549,611,611,611,611,611,556,611,556,722,556,722,556,722,556,722,556,722,556,722,556,722,556,722,740,722,611,667,556,667,556,667,556,667,556,667,556,778,611,778,611,778,611,778,611,722,611,722,611,278,278,278,278,278,278,278,278,278,278,782,556,556,278,722,556,556,611,278,611,278,611,396,611,479,611,278,722,611,722,611,722,611,708,723,611,778,611,778,611,778,611,1e3,944,722,389,722,389,722,389,667,556,667,556,667,556,667\
,556,611,333,611,479,611,333,722,611,722,611,722,611,722,611,722,611,722,611,944,778,667,556,667,611,500,611,500,611,500,278,556,722,556,1e3,889,778,611,667,556,611,333,333,333,333,333,333,333,333,333,333,333,333,722,333,854,906,473,844,930,847,278,722,722,610,671,667,611,722,778,278,722,667,833,722,657,778,718,667,590,611,667,822,667,829,781,278,667,620,479,611,278,591,620,621,556,610,479,492,611,558,278,566,556,603,556,450,611,712,605,532,664,409,591,704,578,773,834,278,591,611,591,834,667,667\
,886,614,719,667,278,278,556,1094,1042,854,622,719,677,719,722,708,722,614,722,667,927,643,719,719,615,687,833,722,778,719,667,722,611,677,781,667,729,708,979,989,854,1e3,708,719,1042,729,556,619,604,534,618,556,736,510,611,611,507,622,740,604,611,611,611,556,889,556,885,556,646,583,889,935,707,854,594,552,865,589,556,556,611,469,563,556,278,278,278,969,906,611,507,619,556,611,778,611,575,467,944,778,944,778,944,778,667,556,333,333,556,1e3,1e3,552,278,278,278,278,500,500,500,556,556,350,1e3,1e3,\
240,479,333,333,604,333,167,396,556,556,1104,556,885,516,1146,1e3,768,600,834,834,834,834,999,500,1e3,500,1e3,500,500,494,612,823,713,584,549,713,979,722,274,549,549,583,549,549,604,584,604,604,708,625,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,729,604,604,354,354,1e3,990,990,990,990,494,604,604,604,604,354,1021,1052,917,750,750,531,656,594,510,500,750,750,611,\
611,333,333,333,333,333,333,333,333,222,222,333,333,333,333,333,333,333,333],Ki=[-1,-1,-1,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,161,162,163,164,165,166,167,168,169,170,171,172,174,175,176,177,178,179,180,181,182,183,184,185,18\
6,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,31\
1,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,402,506,507,508,509,510,511,536,537,538,539,710,711,713,728,729,730,731,732,733,900,901,902,903,904,905,906,908,910,911,912,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,931,932,933,934,93\
5,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,1024,1025,1026,1027,1028,1029,1030,1031,1032,1033,1034,1035,1036,1037,1038,1039,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,10\
92,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,1104,1105,1106,1107,1108,1109,1110,1111,1112,1113,1114,1115,1116,1117,1118,1119,1138,1139,1168,1169,7808,7809,7810,7811,7812,7813,7922,7923,8208,8209,8211,8212,8213,8215,8216,8217,8218,8219,8220,8221,8222,8224,8225,8226,8230,8240,8242,8243,8249,8250,8252,8254,8260,8319,8355,8356,8359,8364,8453,8467,8470,8482,8486,8494,8539,8540,8541,8542,8592,8593,8594,8595,8596,8597,8616,8706,8710,8719,8721,8722,8730,8734,8735,8745,8747,8776,8800,8801,88\
04,8805,8962,8976,8992,8993,9472,9474,9484,9488,9492,9496,9500,9508,9516,9524,9532,9552,9553,9554,9555,9556,9557,9558,9559,9560,9561,9562,9563,9564,9565,9566,9567,9568,9569,9570,9571,9572,9573,9574,9575,9576,9577,9578,9579,9580,9600,9604,9608,9612,9616,9617,9618,9619,9632,9633,9642,9643,9644,9650,9658,9660,9668,9674,9675,9679,9688,9689,9702,9786,9787,9788,9792,9794,9824,9827,9829,9830,9834,9835,9836,61441,61442,61445,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],Ji=[365,0,333,278,278,355,5\
56,556,889,667,191,333,333,389,584,278,333,278,278,556,556,556,556,556,556,556,556,556,556,278,278,584,584,584,556,1015,667,667,722,722,667,611,778,722,278,500,667,556,833,722,778,667,778,722,667,611,722,667,944,667,667,611,278,278,278,469,556,333,556,556,500,556,556,278,556,556,222,222,500,222,833,556,556,556,556,333,500,278,556,500,722,500,500,500,334,260,334,584,333,556,556,556,556,260,556,333,737,370,556,584,737,552,400,549,333,333,333,576,537,278,333,333,365,556,834,834,834,611,667,667,667,\
667,667,667,1e3,722,667,667,667,667,278,278,278,278,722,722,778,778,778,778,778,584,778,722,722,722,722,667,667,611,556,556,556,556,556,556,889,500,556,556,556,556,278,278,278,278,556,556,556,556,556,556,556,549,611,556,556,556,556,500,556,500,667,556,667,556,667,556,722,500,722,500,722,500,722,500,722,625,722,556,667,556,667,556,667,556,667,556,667,556,778,556,778,556,778,556,778,556,722,556,722,556,278,278,278,278,278,278,278,222,278,278,733,444,500,222,667,500,500,556,222,556,222,556,281,556,\
400,556,222,722,556,722,556,722,556,615,723,556,778,556,778,556,778,556,1e3,944,722,333,722,333,722,333,667,500,667,500,667,500,667,500,611,278,611,354,611,278,722,556,722,556,722,556,722,556,722,556,722,556,944,722,667,500,667,611,500,611,500,611,500,222,556,667,556,1e3,889,778,611,667,500,611,278,333,333,333,333,333,333,333,333,333,333,333,667,278,789,846,389,794,865,775,222,667,667,570,671,667,611,722,778,278,667,667,833,722,648,778,725,667,600,611,667,837,667,831,761,278,667,570,439,555,222,\
550,570,571,500,556,439,463,555,542,222,500,492,548,500,447,556,670,573,486,603,374,550,652,546,728,779,222,550,556,550,779,667,667,843,544,708,667,278,278,500,1066,982,844,589,715,639,724,667,651,667,544,704,667,917,614,715,715,589,686,833,722,778,725,667,722,611,639,795,667,727,673,920,923,805,886,651,694,1022,682,556,562,522,493,553,556,688,465,556,556,472,564,686,550,556,556,556,500,833,500,835,500,572,518,830,851,621,736,526,492,752,534,556,556,556,378,496,500,222,222,222,910,828,556,472,56\
5,500,556,778,556,492,339,944,722,944,722,944,722,667,500,333,333,556,1e3,1e3,552,222,222,222,222,333,333,333,556,556,350,1e3,1e3,188,354,333,333,500,333,167,365,556,556,1094,556,885,323,1083,1e3,768,600,834,834,834,834,1e3,500,998,500,1e3,500,500,494,612,823,713,584,549,713,979,719,274,549,549,584,549,549,604,584,604,604,708,625,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,\
708,708,708,729,604,604,354,354,1e3,990,990,990,990,494,604,604,604,604,354,1021,1052,917,750,750,531,656,594,510,500,750,750,500,500,333,333,333,333,333,333,333,333,222,222,294,294,324,324,316,328,398,285],Yi=[-1,-1,-1,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,\
119,120,121,122,123,124,125,126,161,162,163,164,165,166,167,168,169,170,171,172,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,\
279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,381,382,383,402,506,507,508,509,510,511,536,537,538,539,710,711,713,728,729,730,731,732,733,\
900,901,902,903,904,905,906,908,910,911,912,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,1024,1025,1026,1027,1028,1029,1030,1031,1032,1033,1034,1035,1036,1037,1038,1039,1040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,10\
66,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,1104,1105,1106,1107,1108,1109,1110,1111,1112,1113,1114,1115,1116,1117,1118,1119,1138,1139,1168,1169,7808,7809,7810,7811,7812,7813,7922,7923,8208,8209,8211,8212,8213,8215,8216,8217,8218,8219,8220,8221,8222,8224,8225,8226,8230,8240,8242,8243,8249,8250,8252,8254,8260,8319,8355,8356,8359,8364,8453,8467,8470,8482,84\
86,8494,8539,8540,8541,8542,8592,8593,8594,8595,8596,8597,8616,8706,8710,8719,8721,8722,8730,8734,8735,8745,8747,8776,8800,8801,8804,8805,8962,8976,8992,8993,9472,9474,9484,9488,9492,9496,9500,9508,9516,9524,9532,9552,9553,9554,9555,9556,9557,9558,9559,9560,9561,9562,9563,9564,9565,9566,9567,9568,9569,9570,9571,9572,9573,9574,9575,9576,9577,9578,9579,9580,9600,9604,9608,9612,9616,9617,9618,9619,9632,9633,9642,9643,9644,9650,9658,9660,9668,9674,9675,9679,9688,9689,9702,9786,9787,9788,9792,9794,98\
24,9827,9829,9830,9834,9835,9836,61441,61442,61445,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],Zi=[365,0,333,278,278,355,556,556,889,667,191,333,333,389,584,278,333,278,278,556,556,556,556,556,556,556,556,556,556,278,278,584,584,584,556,1015,667,667,722,722,667,611,778,722,278,500,667,556,833,722,778,667,778,722,667,611,722,667,944,667,667,611,278,278,278,469,556,333,556,556,500,556,556,278,556,556,222,222,500,222,833,556,556,556,556,333,500,278,556,500,722,500,500,500,334,260,334,584,33\
3,556,556,556,556,260,556,333,737,370,556,584,737,552,400,549,333,333,333,576,537,278,333,333,365,556,834,834,834,611,667,667,667,667,667,667,1e3,722,667,667,667,667,278,278,278,278,722,722,778,778,778,778,778,584,778,722,722,722,722,667,667,611,556,556,556,556,556,556,889,500,556,556,556,556,278,278,278,278,556,556,556,556,556,556,556,549,611,556,556,556,556,500,556,500,667,556,667,556,667,556,722,500,722,500,722,500,722,500,722,615,722,556,667,556,667,556,667,556,667,556,667,556,778,556,778,55\
6,778,556,778,556,722,556,722,556,278,278,278,278,278,278,278,222,278,278,735,444,500,222,667,500,500,556,222,556,222,556,292,556,334,556,222,722,556,722,556,722,556,604,723,556,778,556,778,556,778,556,1e3,944,722,333,722,333,722,333,667,500,667,500,667,500,667,500,611,278,611,375,611,278,722,556,722,556,722,556,722,556,722,556,722,556,944,722,667,500,667,611,500,611,500,611,500,222,556,667,556,1e3,889,778,611,667,500,611,278,333,333,333,333,333,333,333,333,333,333,333,667,278,784,838,384,774,85\
5,752,222,667,667,551,668,667,611,722,778,278,667,668,833,722,650,778,722,667,618,611,667,798,667,835,748,278,667,578,446,556,222,547,578,575,500,557,446,441,556,556,222,500,500,576,500,448,556,690,569,482,617,395,547,648,525,713,781,222,547,556,547,781,667,667,865,542,719,667,278,278,500,1057,1010,854,583,722,635,719,667,656,667,542,677,667,923,604,719,719,583,656,833,722,778,719,667,722,611,635,760,667,740,667,917,938,792,885,656,719,1010,722,556,573,531,365,583,556,669,458,559,559,438,583,688\
,552,556,542,556,500,458,500,823,500,573,521,802,823,625,719,521,510,750,542,556,556,556,365,510,500,222,278,222,906,812,556,438,559,500,552,778,556,489,411,944,722,944,722,944,722,667,500,333,333,556,1e3,1e3,552,222,222,222,222,333,333,333,556,556,350,1e3,1e3,188,354,333,333,500,333,167,365,556,556,1094,556,885,323,1073,1e3,768,600,834,834,834,834,1e3,500,1e3,500,1e3,500,500,494,612,823,713,584,549,713,979,719,274,549,549,583,549,549,604,584,604,604,708,625,708,708,708,708,708,708,708,708,708,7\
08,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,708,729,604,604,354,354,1e3,990,990,990,990,494,604,604,604,604,354,1021,1052,917,750,750,531,656,594,510,500,750,750,500,500,333,333,333,333,333,333,333,333,222,222,294,294,324,324,316,328,398,285],Qi=[-1,-1,-1,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81\
,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,161,162,163,164,165,166,167,168,169,170,171,172,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,2\
46,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280,281,282,283,284,285,286,287,288,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,307,308,309,310,311,312,313,314,315,316,317,318,319,320,321,322,323,324,325,326,327,328,329,330,331,332,333,334,335,336,337,338,339,340,341,342,343,344,345,346,347,348,349,350,351,352,353,354,355,356,357,358,359,360,361,362,363,364,365,366,367,368,369,370,3\
71,372,373,374,375,376,377,378,379,380,381,382,383,402,506,507,508,509,510,511,536,537,538,539,710,711,713,728,729,730,731,732,733,900,901,902,903,904,905,906,908,910,911,912,913,914,915,916,917,918,919,920,921,922,923,924,925,926,927,928,929,931,932,933,934,935,936,937,938,939,940,941,942,943,944,945,946,947,948,949,950,951,952,953,954,955,956,957,958,959,960,961,962,963,964,965,966,967,968,969,970,971,972,973,974,1024,1025,1026,1027,1028,1029,1030,1031,1032,1033,1034,1035,1036,1037,1038,1039,1\
040,1041,1042,1043,1044,1045,1046,1047,1048,1049,1050,1051,1052,1053,1054,1055,1056,1057,1058,1059,1060,1061,1062,1063,1064,1065,1066,1067,1068,1069,1070,1071,1072,1073,1074,1075,1076,1077,1078,1079,1080,1081,1082,1083,1084,1085,1086,1087,1088,1089,1090,1091,1092,1093,1094,1095,1096,1097,1098,1099,1100,1101,1102,1103,1104,1105,1106,1107,1108,1109,1110,1111,1112,1113,1114,1115,1116,1117,1118,1119,1138,1139,1168,1169,7808,7809,7810,7811,7812,7813,7922,7923,8208,8209,8211,8212,8213,8215,8216,8217,8\
218,8219,8220,8221,8222,8224,8225,8226,8230,8240,8242,8243,8249,8250,8252,8254,8260,8319,8355,8356,8359,8364,8453,8467,8470,8482,8486,8494,8539,8540,8541,8542,8592,8593,8594,8595,8596,8597,8616,8706,8710,8719,8721,8722,8730,8734,8735,8745,8747,8776,8800,8801,8804,8805,8962,8976,8992,8993,9472,9474,9484,9488,9492,9496,9500,9508,9516,9524,9532,9552,9553,9554,9555,9556,9557,9558,9559,9560,9561,9562,9563,9564,9565,9566,9567,9568,9569,9570,9571,9572,9573,9574,9575,9576,9577,9578,9579,9580,9600,9604,9\
608,9612,9616,9617,9618,9619,9632,9633,9642,9643,9644,9650,9658,9660,9668,9674,9675,9679,9688,9689,9702,9786,9787,9788,9792,9794,9824,9827,9829,9830,9834,9835,9836,61441,61442,61445,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1],en=[1.36898,1,1,.72706,.80479,.83734,.98894,.99793,.9897,.93884,.86209,.94292,.94292,1.16661,1.02058,.93582,.96694,.93582,1.19137,.99793,.99793,.99793,.99793,.99793,.99793,.99793,.99793,.99793,.99793,.78076,.78076,1.02058,1.02058,1.02058,.72851,.78966,.90838,.83637,\
.82391,.96376,.80061,.86275,.8768,.95407,1.0258,.73901,.85022,.83655,1.0156,.95546,.92179,.87107,.92179,.82114,.8096,.89713,.94438,.95353,.94083,.91905,.90406,.9446,.94292,1.18777,.94292,1.02058,.89903,.90088,.94938,.97898,.81093,.97571,.94938,1.024,.9577,.95933,.98621,1.0474,.97455,.98981,.9672,.95933,.9446,.97898,.97407,.97646,.78036,1.10208,.95442,.95298,.97579,.9332,.94039,.938,.80687,1.01149,.80687,1.02058,.80479,.99793,.99793,.99793,.99793,1.01149,1.00872,.90088,.91882,1.0213,.8361,1.02058\
,.62295,.54324,.89022,1.08595,1,1,.90088,1,.97455,.93582,.90088,1,1.05686,.8361,.99642,.99642,.99642,.72851,.90838,.90838,.90838,.90838,.90838,.90838,.868,.82391,.80061,.80061,.80061,.80061,1.0258,1.0258,1.0258,1.0258,.97484,.95546,.92179,.92179,.92179,.92179,.92179,1.02058,.92179,.94438,.94438,.94438,.94438,.90406,.86958,.98225,.94938,.94938,.94938,.94938,.94938,.94938,.9031,.81093,.94938,.94938,.94938,.94938,.98621,.98621,.98621,.98621,.93969,.95933,.9446,.9446,.9446,.9446,.9446,1.08595,.9446,\
.95442,.95442,.95442,.95442,.94039,.97898,.94039,.90838,.94938,.90838,.94938,.90838,.94938,.82391,.81093,.82391,.81093,.82391,.81093,.82391,.81093,.96376,.84313,.97484,.97571,.80061,.94938,.80061,.94938,.80061,.94938,.80061,.94938,.80061,.94938,.8768,.9577,.8768,.9577,.8768,.9577,1,1,.95407,.95933,.97069,.95933,1.0258,.98621,1.0258,.98621,1.0258,.98621,1.0258,.98621,1.0258,.98621,.887,1.01591,.73901,1.0474,1,1,.97455,.83655,.98981,1,1,.83655,.73977,.83655,.73903,.84638,1.033,.95546,.95933,1,1,.9\
5546,.95933,.8271,.95417,.95933,.92179,.9446,.92179,.9446,.92179,.9446,.936,.91964,.82114,.97646,1,1,.82114,.97646,.8096,.78036,.8096,.78036,1,1,.8096,.78036,1,1,.89713,.77452,.89713,1.10208,.94438,.95442,.94438,.95442,.94438,.95442,.94438,.95442,.94438,.95442,.94438,.95442,.94083,.97579,.90406,.94039,.90406,.9446,.938,.9446,.938,.9446,.938,1,.99793,.90838,.94938,.868,.9031,.92179,.9446,1,1,.89713,1.10208,.90088,.90088,.90088,.90088,.90088,.90088,.90088,.90088,.90088,.90989,.9358,.91945,.83181,.\
75261,.87992,.82976,.96034,.83689,.97268,1.0078,.90838,.83637,.8019,.90157,.80061,.9446,.95407,.92436,1.0258,.85022,.97153,1.0156,.95546,.89192,.92179,.92361,.87107,.96318,.89713,.93704,.95638,.91905,.91709,.92796,1.0258,.93704,.94836,1.0373,.95933,1.0078,.95871,.94836,.96174,.92601,.9498,.98607,.95776,.95933,1.05453,1.0078,.98275,.9314,.95617,.91701,1.05993,.9446,.78367,.9553,1,.86832,1.0128,.95871,.99394,.87548,.96361,.86774,1.0078,.95871,.9446,.95871,.86774,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,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,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,1,1,1,1,1,1,1,1,1,1,1,1,1,.94083,.97579,.94083,.97579,.94083,.97579,.90406,.94039,.96694,1,.89903,1,1,1,.93582,.93582,.93582,1,.908,.908,.918,.94219,.94219,.96544,1,1.285,1,1,.81079,.81079,1,1,.74854,1,1,1,1,.99793,1,1,1,.65,1,1.36145,1,1,1,1,1,1,1,1,1,1,1,1.17173,1,.80535,.76169,1.02058,1.0732,1.05486,1,1,1.30692,1.08595,1.08595,1,1.08595,1.08595,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,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,1,1,1,1.16161,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,1,1,1,1,1,1,1,1],tn={lineHeight:1.2,lineGap:.2},an=[1.36898,1,1,.66227,.80779,.81625,.97276,.97276,.97733,.92222,.83266,.94292,.94292,1.16148,1.02058,.93582,.96694,.93582,1.17337,.97276,.97276,.97276,.97276,.97276,.97276,.97276,.97276,.97276,.97276,.78076,.78076,1.02058,1.02058,1.02058,.71541,.76813,.85576,.80591,.80729,.\
94299,.77512,.83655,.86523,.92222,.98621,.71743,.81698,.79726,.98558,.92222,.90637,.83809,.90637,.80729,.76463,.86275,.90699,.91605,.9154,.85308,.85458,.90531,.94292,1.21296,.94292,1.02058,.89903,1.18616,.99613,.91677,.78216,.91677,.90083,.98796,.9135,.92168,.95381,.98981,.95298,.95381,.93459,.92168,.91513,.92004,.91677,.95077,.748,1.04502,.91677,.92061,.94236,.89544,.89364,.9,.80687,.8578,.80687,1.02058,.80779,.97276,.97276,.97276,.97276,.8578,.99973,1.18616,.91339,1.08074,.82891,1.02058,.55509\
,.71526,.89022,1.08595,1,1,1.18616,1,.96736,.93582,1.18616,1,1.04864,.82711,.99043,.99043,.99043,.71541,.85576,.85576,.85576,.85576,.85576,.85576,.845,.80729,.77512,.77512,.77512,.77512,.98621,.98621,.98621,.98621,.95961,.92222,.90637,.90637,.90637,.90637,.90637,1.02058,.90251,.90699,.90699,.90699,.90699,.85458,.83659,.94951,.99613,.99613,.99613,.99613,.99613,.99613,.85811,.78216,.90083,.90083,.90083,.90083,.95381,.95381,.95381,.95381,.9135,.92168,.91513,.91513,.91513,.91513,.91513,1.08595,.9167\
7,.91677,.91677,.91677,.91677,.89364,.92332,.89364,.85576,.99613,.85576,.99613,.85576,.99613,.80729,.78216,.80729,.78216,.80729,.78216,.80729,.78216,.94299,.76783,.95961,.91677,.77512,.90083,.77512,.90083,.77512,.90083,.77512,.90083,.77512,.90083,.86523,.9135,.86523,.9135,.86523,.9135,1,1,.92222,.92168,.92222,.92168,.98621,.95381,.98621,.95381,.98621,.95381,.98621,.95381,.98621,.95381,.86036,.97096,.71743,.98981,1,1,.95298,.79726,.95381,1,1,.79726,.6894,.79726,.74321,.81691,1.0006,.92222,.92168,\
1,1,.92222,.92168,.79464,.92098,.92168,.90637,.91513,.90637,.91513,.90637,.91513,.909,.87514,.80729,.95077,1,1,.80729,.95077,.76463,.748,.76463,.748,1,1,.76463,.748,1,1,.86275,.72651,.86275,1.04502,.90699,.91677,.90699,.91677,.90699,.91677,.90699,.91677,.90699,.91677,.90699,.91677,.9154,.94236,.85458,.89364,.85458,.90531,.9,.90531,.9,.90531,.9,1,.97276,.85576,.99613,.845,.85811,.90251,.91677,1,1,.86275,1.04502,1.18616,1.18616,1.18616,1.18616,1.18616,1.18616,1.18616,1.18616,1.18616,1.00899,1.3062\
8,.85576,.80178,.66862,.7927,.69323,.88127,.72459,.89711,.95381,.85576,.80591,.7805,.94729,.77512,.90531,.92222,.90637,.98621,.81698,.92655,.98558,.92222,.85359,.90637,.90976,.83809,.94523,.86275,.83509,.93157,.85308,.83392,.92346,.98621,.83509,.92886,.91324,.92168,.95381,.90646,.92886,.90557,.86847,.90276,.91324,.86842,.92168,.99531,.95381,.9224,.85408,.92699,.86847,1.0051,.91513,.80487,.93481,1,.88159,1.05214,.90646,.97355,.81539,.89398,.85923,.95381,.90646,.91513,.90646,.85923,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,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,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,1,1,1,1,1,1,1,1,1,1,1,1,1,.9154,.94236,.9154,.94236,.9154,.94236,.85458,.89364,.96694,1,.89903,1,1,1,.91782,.91782,.91782,1,.896,.896,.896,.9332,.9332,.95973,1,1.26,1,1,.80479,.80178,1,1,.85633,1,1,1,1,.97276,1,1,1,.698,1,1.36145,1,1,1,1,1,1,1,1,1,1,1,1.14542,1,.79199,.78694,1.02058,1.03493,1.05486,1,1,1.23026,1.08595,1.08595,1,1.08595,1.0\
8595,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,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,1,1,1,1.20006,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,1,1,1,1,1,1,1,1],rn={lineHeight:1.2,lineGap:.2},nn=[1.36898,1,1,.65507,.84943,.85639,.88465,.88465,.86936,.88307,.86948,.85283,.85283,1.06383,1.02058,.75945,.9219,.75945,1.17337,.88465,.88465,.88465,.88465,.88465,.88465,.88465,.88465,.88465,.88465,.75945,.75945,1.02058,1.02058,1.02058,.69046,.70926,.85158,\
.77812,.76852,.89591,.70466,.76125,.80094,.86822,.83864,.728,.77212,.79475,.93637,.87514,.8588,.76013,.8588,.72421,.69866,.77598,.85991,.80811,.87832,.78112,.77512,.8562,1.0222,1.18417,1.0222,1.27014,.89903,1.15012,.93859,.94399,.846,.94399,.81453,1.0186,.94219,.96017,1.03075,1.02175,.912,1.03075,.96998,.96017,.93859,.94399,.94399,.95493,.746,1.12658,.94578,.91,.979,.882,.882,.83,.85034,.83537,.85034,1.02058,.70869,.88465,.88465,.88465,.88465,.83537,.90083,1.15012,.9161,.94565,.73541,1.02058,.53\
609,.69353,.79519,1.08595,1,1,1.15012,1,.91974,.75945,1.15012,1,.9446,.73361,.9005,.9005,.9005,.62864,.85158,.85158,.85158,.85158,.85158,.85158,.773,.76852,.70466,.70466,.70466,.70466,.83864,.83864,.83864,.83864,.90561,.87514,.8588,.8588,.8588,.8588,.8588,1.02058,.85751,.85991,.85991,.85991,.85991,.77512,.76013,.88075,.93859,.93859,.93859,.93859,.93859,.93859,.8075,.846,.81453,.81453,.81453,.81453,.82424,.82424,.82424,.82424,.9278,.96017,.93859,.93859,.93859,.93859,.93859,1.08595,.8562,.94578,.9\
4578,.94578,.94578,.882,.94578,.882,.85158,.93859,.85158,.93859,.85158,.93859,.76852,.846,.76852,.846,.76852,.846,.76852,.846,.89591,.8544,.90561,.94399,.70466,.81453,.70466,.81453,.70466,.81453,.70466,.81453,.70466,.81453,.80094,.94219,.80094,.94219,.80094,.94219,1,1,.86822,.96017,.86822,.96017,.83864,.82424,.83864,.82424,.83864,.82424,.83864,1.03075,.83864,.82424,.81402,1.02738,.728,1.02175,1,1,.912,.79475,1.03075,1,1,.79475,.83911,.79475,.66266,.80553,1.06676,.87514,.96017,1,1,.87514,.96017,.\
86865,.87396,.96017,.8588,.93859,.8588,.93859,.8588,.93859,.867,.84759,.72421,.95493,1,1,.72421,.95493,.69866,.746,.69866,.746,1,1,.69866,.746,1,1,.77598,.88417,.77598,1.12658,.85991,.94578,.85991,.94578,.85991,.94578,.85991,.94578,.85991,.94578,.85991,.94578,.87832,.979,.77512,.882,.77512,.8562,.83,.8562,.83,.8562,.83,1,.88465,.85158,.93859,.773,.8075,.85751,.8562,1,1,.77598,1.12658,1.15012,1.15012,1.15012,1.15012,1.15012,1.15313,1.15012,1.15012,1.15012,1.08106,1.03901,.85158,.77025,.62264,.764\
6,.65351,.86026,.69461,.89947,1.03075,.85158,.77812,.76449,.88836,.70466,.8562,.86822,.8588,.83864,.77212,.85308,.93637,.87514,.82352,.8588,.85701,.76013,.89058,.77598,.8156,.82565,.78112,.77899,.89386,.83864,.8156,.9486,.92388,.96186,1.03075,.91123,.9486,.93298,.878,.93942,.92388,.84596,.96186,.95119,1.03075,.922,.88787,.95829,.88,.93559,.93859,.78815,.93758,1,.89217,1.03737,.91123,.93969,.77487,.85769,.86799,1.03075,.91123,.93859,.91123,.86799,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,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,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,1,1,1,1,1,1,1,1,1,1,1,1,1,.87832,.979,.87832,.979,.87832,.979,.77512,.882,.9219,1,.89903,1,1,1,.87321,.87321,.87321,1,1.027,1.027,1.027,.86847,.86847,.79121,1,1.124,1,1,.73572,.73572,1,1,.85034,1,1,1,1,.88465,1,1,1,.669,1,1.36145,1,1,1,1,1,1,1,1,1,1,1,1.04828,1,.74948,.75187,1.02058,.98391,1.02119,1,1,1.06233,1.08595,1.08595,1,1.08595,1.08595,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,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,1,1,1,1.05233,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,1,1,1,1,1,1,1,1],sn={lineHeight:1.2,lineGap:.2},on=[1.36898,1,1,.76305,.82784,.94935,.89364,.92241,.89073,.90706,.98472,.85283,.85283,1.0664,1.02058,.74505,.9219,.74505,1.23456,.92241,.92241,.92241,.92241,.92241,.92241,.92241,.92241,.92241,.92241,.74505,.74505,1.02058,1.02058,1.02058,.73002,.72601,.91755,.8126,.80314,.92222,.73764,.79726,.83\
051,.90284,.86023,.74,.8126,.84869,.96518,.91115,.8858,.79761,.8858,.74498,.73914,.81363,.89591,.83659,.89633,.85608,.8111,.90531,1.0222,1.22736,1.0222,1.27014,.89903,.90088,.86667,1.0231,.896,1.01411,.90083,1.05099,1.00512,.99793,1.05326,1.09377,.938,1.06226,1.00119,.99793,.98714,1.0231,1.01231,.98196,.792,1.19137,.99074,.962,1.01915,.926,.942,.856,.85034,.92006,.85034,1.02058,.69067,.92241,.92241,.92241,.92241,.92006,.9332,.90088,.91882,.93484,.75339,1.02058,.56866,.54324,.79519,1.08595,1,1,.9\
0088,1,.95325,.74505,.90088,1,.97198,.75339,.91009,.91009,.91009,.66466,.91755,.91755,.91755,.91755,.91755,.91755,.788,.80314,.73764,.73764,.73764,.73764,.86023,.86023,.86023,.86023,.92915,.91115,.8858,.8858,.8858,.8858,.8858,1.02058,.8858,.89591,.89591,.89591,.89591,.8111,.79611,.89713,.86667,.86667,.86667,.86667,.86667,.86667,.86936,.896,.90083,.90083,.90083,.90083,.84224,.84224,.84224,.84224,.97276,.99793,.98714,.98714,.98714,.98714,.98714,1.08595,.89876,.99074,.99074,.99074,.99074,.942,1.023\
1,.942,.91755,.86667,.91755,.86667,.91755,.86667,.80314,.896,.80314,.896,.80314,.896,.80314,.896,.92222,.93372,.92915,1.01411,.73764,.90083,.73764,.90083,.73764,.90083,.73764,.90083,.73764,.90083,.83051,1.00512,.83051,1.00512,.83051,1.00512,1,1,.90284,.99793,.90976,.99793,.86023,.84224,.86023,.84224,.86023,.84224,.86023,1.05326,.86023,.84224,.82873,1.07469,.74,1.09377,1,1,.938,.84869,1.06226,1,1,.84869,.83704,.84869,.81441,.85588,1.08927,.91115,.99793,1,1,.91115,.99793,.91887,.90991,.99793,.8858\
,.98714,.8858,.98714,.8858,.98714,.894,.91434,.74498,.98196,1,1,.74498,.98196,.73914,.792,.73914,.792,1,1,.73914,.792,1,1,.81363,.904,.81363,1.19137,.89591,.99074,.89591,.99074,.89591,.99074,.89591,.99074,.89591,.99074,.89591,.99074,.89633,1.01915,.8111,.942,.8111,.90531,.856,.90531,.856,.90531,.856,1,.92241,.91755,.86667,.788,.86936,.8858,.89876,1,1,.81363,1.19137,.90088,.90088,.90088,.90088,.90088,.90088,.90088,.90088,.90088,.90388,1.03901,.92138,.78105,.7154,.86169,.80513,.94007,.82528,.98612\
,1.06226,.91755,.8126,.81884,.92819,.73764,.90531,.90284,.8858,.86023,.8126,.91172,.96518,.91115,.83089,.8858,.87791,.79761,.89297,.81363,.88157,.89992,.85608,.81992,.94307,.86023,.88157,.95308,.98699,.99793,1.06226,.95817,.95308,.97358,.928,.98088,.98699,.92761,.99793,.96017,1.06226,.986,.944,.95978,.938,.96705,.98714,.80442,.98972,1,.89762,1.04552,.95817,.99007,.87064,.91879,.88888,1.06226,.95817,.98714,.95817,.88888,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,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,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,1,1,1,1,1,1,1,1,1,1,1,1,1,.89633,1.01915,.89633,1.01915,.89633,1.01915,.8111,.942,.9219,1,.89903,1,1,1,.93173,.93173,.93173,1,1.06304,1.06304,1.06904,.89903,.89903,.80549,1,1.156,1,1,.76575,.76575,1,1,.72458,1,1,1,1,.92241,1,1,1,.619,1,1.36145,1,1,1,1,1,1,1,1,1,1,1,1.07257,1,.74705,.71119,1.02058,1.024,1.02119,1,1,1.1536,1.08595,1.08595,1,1.08595,1.08595,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,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,1,1,1,1.05638,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,1,1,1,1,1,1,1,1],cn={lineHeight:1.2,lineGap:.2},ln=[1.76738,1,1,.99297,.9824,1.04016,1.06497,1.03424,.97529,1.17647,1.23203,1.1085,1.1085,1.16939,1.2107,.9754,1.21408,.9754,1.59578,1.03424,1.03424,1.03424,1.03424,1.03424,1.03424,1.03424,1.03424,1.03424,1.03424,.81378,.81378,1.2107,1.2107,1.2107,.71703,.97847,.97363,.88776,.8641,1.02096,.79795,.85132,.914,1\
.06085,1.1406,.8007,.89858,.83693,1.14889,1.09398,.97489,.92094,.97489,.90399,.84041,.95923,1.00135,1,1.06467,.98243,.90996,.99361,1.1085,1.56942,1.1085,1.2107,.74627,.94282,.96752,1.01519,.86304,1.01359,.97278,1.15103,1.01359,.98561,1.02285,1.02285,1.00527,1.02285,1.0302,.99041,1.0008,1.01519,1.01359,1.02258,.79104,1.16862,.99041,.97454,1.02511,.99298,.96752,.95801,.94856,1.16579,.94856,1.2107,.9824,1.03424,1.03424,1,1.03424,1.16579,.8727,1.3871,1.18622,1.10818,1.04478,1.2107,1.18622,.75155,.94\
994,1.28826,1.21408,1.21408,.91056,1,.91572,.9754,.64663,1.18328,1.24866,1.04478,1.14169,1.15749,1.17389,.71703,.97363,.97363,.97363,.97363,.97363,.97363,.93506,.8641,.79795,.79795,.79795,.79795,1.1406,1.1406,1.1406,1.1406,1.02096,1.09398,.97426,.97426,.97426,.97426,.97426,1.2107,.97489,1.00135,1.00135,1.00135,1.00135,.90996,.92094,1.02798,.96752,.96752,.96752,.96752,.96752,.96752,.93136,.86304,.97278,.97278,.97278,.97278,1.02285,1.02285,1.02285,1.02285,.97122,.99041,1,1,1,1,1,1.28826,1.0008,.99\
041,.99041,.99041,.99041,.96752,1.01519,.96752,.97363,.96752,.97363,.96752,.97363,.96752,.8641,.86304,.8641,.86304,.8641,.86304,.8641,.86304,1.02096,1.03057,1.02096,1.03517,.79795,.97278,.79795,.97278,.79795,.97278,.79795,.97278,.79795,.97278,.914,1.01359,.914,1.01359,.914,1.01359,1,1,1.06085,.98561,1.06085,1.00879,1.1406,1.02285,1.1406,1.02285,1.1406,1.02285,1.1406,1.02285,1.1406,1.02285,.97138,1.08692,.8007,1.02285,1,1,1.00527,.83693,1.02285,1,1,.83693,.9455,.83693,.90418,.83693,1.13005,1.0939\
8,.99041,1,1,1.09398,.99041,.96692,1.09251,.99041,.97489,1.0008,.97489,1.0008,.97489,1.0008,.93994,.97931,.90399,1.02258,1,1,.90399,1.02258,.84041,.79104,.84041,.79104,.84041,.79104,.84041,.79104,1,1,.95923,1.07034,.95923,1.16862,1.00135,.99041,1.00135,.99041,1.00135,.99041,1.00135,.99041,1.00135,.99041,1.00135,.99041,1.06467,1.02511,.90996,.96752,.90996,.99361,.95801,.99361,.95801,.99361,.95801,1.07733,1.03424,.97363,.96752,.93506,.93136,.97489,1.0008,1,1,.95923,1.16862,1.15103,1.15103,1.01173,\
1.03959,.75953,.81378,.79912,1.15103,1.21994,.95161,.87815,1.01149,.81525,.7676,.98167,1.01134,1.02546,.84097,1.03089,1.18102,.97363,.88776,.85134,.97826,.79795,.99361,1.06085,.97489,1.1406,.89858,1.0388,1.14889,1.09398,.86039,.97489,1.0595,.92094,.94793,.95923,.90996,.99346,.98243,1.02112,.95493,1.1406,.90996,1.03574,1.02597,1.0008,1.18102,1.06628,1.03574,1.0192,1.01932,1.00886,.97531,1.0106,1.0008,1.13189,1.18102,1.02277,.98683,1.0016,.99561,1.07237,1.0008,.90434,.99921,.93803,.8965,1.23085,1.\
06628,1.04983,.96268,1.0499,.98439,1.18102,1.06628,1.0008,1.06628,.98439,.79795,1,1,1,1,1,1,1,1,1,1,1,1,1.09466,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,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,1,1,1,1,1,1,1,1,.97278,1,1,1,1,1,1,1,1,1,1,1,1,1.02065,1,1,1,1,1,1,1.06467,1.02511,1.06467,1.02511,1.06467,1.02511,.90996,.96752,1,1.21408,.89903,1,1,.75155,1.04394,1.04394,1.04394,1.04394,.98633,.98633,.98633,.73047,.73047,1.20642,.91211,1.25635,1.222,1.02956,1.03372,1.0\
3372,.96039,1.24633,1,1.12454,.93503,1.03424,1.19687,1.03424,1,1,1,.771,1,1,1.15749,1.15749,1.15749,1.10948,.86279,.94434,.86279,.94434,.86182,1,1,1.16897,1,.96085,.90137,1.2107,1.18416,1.13973,.69825,.9716,2.10339,1.29004,1.29004,1.21172,1.29004,1.29004,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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1.42603,1,.99862,.99862,1,.87025,.87025,.87025,.87025,1.18874,1.42603,1,1.42603,1.42603,.99862,1,1,1,1,1,1.2886,1.04315,1.15296,1.34163,1,1,1\
,1.09193,1.09193,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],hn={lineHeight:1.33008,lineGap:0},un=[1.76738,1,1,.98946,1.03959,1.04016,1.02809,1.036,.97639,1.10953,1.23203,1.11144,1.11144,1.16939,1.21237,.9754,1.21261,.9754,1.59754,1.036,1.036,1.036,1.036,1.036,1.036,1.036,1.036,1.036,1.036,.81378,.81378,1.21237,1.21237,1.21237,.73541,.97847,.97363,.89723,.87897,1.0426,.79429,.85292,.91149,1.05815,1.1406,.79631,.90128,.83853,1.04396,1.10615,.97552,.94436,.97552,.88641,.80527,.96083,1.00135,1,1.06777,.98\
17,.91142,.99361,1.11144,1.57293,1.11144,1.21237,.74627,1.31818,1.06585,.97042,.83055,.97042,.93503,1.1261,.97042,.97922,1.14236,.94552,1.01054,1.14236,1.02471,.97922,.94165,.97042,.97042,1.0276,.78929,1.1261,.97922,.95874,1.02197,.98507,.96752,.97168,.95107,1.16579,.95107,1.21237,1.03959,1.036,1.036,1,1.036,1.16579,.87357,1.31818,1.18754,1.26781,1.05356,1.21237,1.18622,.79487,.94994,1.29004,1.24047,1.24047,1.31818,1,.91484,.9754,1.31818,1.1349,1.24866,1.05356,1.13934,1.15574,1.17389,.73541,.973\
63,.97363,.97363,.97363,.97363,.97363,.94385,.87897,.79429,.79429,.79429,.79429,1.1406,1.1406,1.1406,1.1406,1.0426,1.10615,.97552,.97552,.97552,.97552,.97552,1.21237,.97552,1.00135,1.00135,1.00135,1.00135,.91142,.94436,.98721,1.06585,1.06585,1.06585,1.06585,1.06585,1.06585,.96705,.83055,.93503,.93503,.93503,.93503,1.14236,1.14236,1.14236,1.14236,.93125,.97922,.94165,.94165,.94165,.94165,.94165,1.29004,.94165,.97922,.97922,.97922,.97922,.96752,.97042,.96752,.97363,1.06585,.97363,1.06585,.97363,1.\
06585,.87897,.83055,.87897,.83055,.87897,.83055,.87897,.83055,1.0426,1.0033,1.0426,.97042,.79429,.93503,.79429,.93503,.79429,.93503,.79429,.93503,.79429,.93503,.91149,.97042,.91149,.97042,.91149,.97042,1,1,1.05815,.97922,1.05815,.97922,1.1406,1.14236,1.1406,1.14236,1.1406,1.14236,1.1406,1.14236,1.1406,1.14236,.97441,1.04302,.79631,1.01582,1,1,1.01054,.83853,1.14236,1,1,.83853,1.09125,.83853,.90418,.83853,1.19508,1.10615,.97922,1,1,1.10615,.97922,1.01034,1.10466,.97922,.97552,.94165,.97552,.94165\
,.97552,.94165,.91602,.91981,.88641,1.0276,1,1,.88641,1.0276,.80527,.78929,.80527,.78929,.80527,.78929,.80527,.78929,1,1,.96083,1.05403,.95923,1.16862,1.00135,.97922,1.00135,.97922,1.00135,.97922,1.00135,.97922,1.00135,.97922,1.00135,.97922,1.06777,1.02197,.91142,.96752,.91142,.99361,.97168,.99361,.97168,.99361,.97168,1.23199,1.036,.97363,1.06585,.94385,.96705,.97552,.94165,1,1,.96083,1.1261,1.31818,1.31818,1.31818,1.31818,1.31818,1.31818,1.31818,1.31818,1.31818,.95161,1.27126,1.00811,.83284,.77\
702,.99137,.95253,1.0347,.86142,1.07205,1.14236,.97363,.89723,.86869,1.09818,.79429,.99361,1.05815,.97552,1.1406,.90128,1.06662,1.04396,1.10615,.84918,.97552,1.04694,.94436,.98015,.96083,.91142,1.00356,.9817,1.01945,.98999,1.1406,.91142,1.04961,.9898,1.00639,1.14236,1.07514,1.04961,.99607,1.02897,1.008,.9898,.95134,1.00639,1.11121,1.14236,1.00518,.97981,1.02186,1,1.08578,.94165,.99314,.98387,.93028,.93377,1.35125,1.07514,1.10687,.93491,1.04232,1.00351,1.14236,1.07514,.94165,1.07514,1.00351,.7942\
9,1,1,1,1,1,1,1,1,1,1,1,1,1.09097,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,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,1,1,1,1,1,1,1,1,.93503,1,1,1,1,1,1,1,1,1,1,1,1,.96609,1,1,1,1,1,1,1.06777,1.02197,1.06777,1.02197,1.06777,1.02197,.91142,.96752,1,1.21261,.89903,1,1,.75155,1.04745,1.04745,1.04745,1.04394,.98633,.98633,.98633,.72959,.72959,1.20502,.91406,1.26514,1.222,1.02956,1.03372,1.03372,.96039,1.24633,1,1.09125,.93327,1.03336,1.16541,1.036,1,1,1,.771,1,1,1.155\
74,1.15574,1.15574,1.15574,.86364,.94434,.86279,.94434,.86224,1,1,1.16798,1,.96085,.90068,1.21237,1.18416,1.13904,.69825,.9716,2.10339,1.29004,1.29004,1.21339,1.29004,1.29004,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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1.42603,1,.99862,.99862,1,.87025,.87025,.87025,.87025,1.18775,1.42603,1,1.42603,1.42603,.99862,1,1,1,1,1,1.2886,1.04315,1.15296,1.34163,1,1,1,1.13269,1.13269,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],dn={lineHeight:1.33008,lin\
eGap:0},fn=[1.76738,1,1,.98946,1.14763,1.05365,1.06234,.96927,.92586,1.15373,1.18414,.91349,.91349,1.07403,1.17308,.78383,1.20088,.78383,1.42531,.96927,.96927,.96927,.96927,.96927,.96927,.96927,.96927,.96927,.96927,.78383,.78383,1.17308,1.17308,1.17308,.77349,.94565,.94729,.85944,.88506,.9858,.74817,.80016,.88449,.98039,.95782,.69238,.89898,.83231,.98183,1.03989,.96924,.86237,.96924,.80595,.74524,.86091,.95402,.94143,.98448,.8858,.83089,.93285,1.0949,1.39016,1.0949,1.45994,.74627,1.04839,.97454,\
.97454,.87207,.97454,.87533,1.06151,.97454,1.00176,1.16484,1.08132,.98047,1.16484,1.02989,1.01054,.96225,.97454,.97454,1.06598,.79004,1.16344,1.00351,.94629,.9973,.91016,.96777,.9043,.91082,.92481,.91082,1.17308,.95748,.96927,.96927,1,.96927,.92481,.80597,1.04839,1.23393,1.1781,.9245,1.17308,1.20808,.63218,.94261,1.24822,1.09971,1.09971,1.04839,1,.85273,.78032,1.04839,1.09971,1.22326,.9245,1.09836,1.13525,1.15222,.70424,.94729,.94729,.94729,.94729,.94729,.94729,.85498,.88506,.74817,.74817,.74817\
,.74817,.95782,.95782,.95782,.95782,.9858,1.03989,.96924,.96924,.96924,.96924,.96924,1.17308,.96924,.95402,.95402,.95402,.95402,.83089,.86237,.88409,.97454,.97454,.97454,.97454,.97454,.97454,.92916,.87207,.87533,.87533,.87533,.87533,.93146,.93146,.93146,.93146,.93854,1.01054,.96225,.96225,.96225,.96225,.96225,1.24822,.8761,1.00351,1.00351,1.00351,1.00351,.96777,.97454,.96777,.94729,.97454,.94729,.97454,.94729,.97454,.88506,.87207,.88506,.87207,.88506,.87207,.88506,.87207,.9858,.95391,.9858,.9745\
4,.74817,.87533,.74817,.87533,.74817,.87533,.74817,.87533,.74817,.87533,.88449,.97454,.88449,.97454,.88449,.97454,1,1,.98039,1.00176,.98039,1.00176,.95782,.93146,.95782,.93146,.95782,.93146,.95782,1.16484,.95782,.93146,.84421,1.12761,.69238,1.08132,1,1,.98047,.83231,1.16484,1,1,.84723,1.04861,.84723,.78755,.83231,1.23736,1.03989,1.01054,1,1,1.03989,1.01054,.9857,1.03849,1.01054,.96924,.96225,.96924,.96225,.96924,.96225,.92383,.90171,.80595,1.06598,1,1,.80595,1.06598,.74524,.79004,.74524,.79004,.\
74524,.79004,.74524,.79004,1,1,.86091,1.02759,.85771,1.16344,.95402,1.00351,.95402,1.00351,.95402,1.00351,.95402,1.00351,.95402,1.00351,.95402,1.00351,.98448,.9973,.83089,.96777,.83089,.93285,.9043,.93285,.9043,.93285,.9043,1.31868,.96927,.94729,.97454,.85498,.92916,.96924,.8761,1,1,.86091,1.16344,1.04839,1.04839,1.04839,1.04839,1.04839,1.04839,1.04839,1.04839,1.04839,.81965,.81965,.94729,.78032,.71022,.90883,.84171,.99877,.77596,1.05734,1.2,.94729,.85944,.82791,.9607,.74817,.93285,.98039,.96924\
,.95782,.89898,.98316,.98183,1.03989,.78614,.96924,.97642,.86237,.86075,.86091,.83089,.90082,.8858,.97296,1.01284,.95782,.83089,1.0976,1.04,1.03342,1.2,1.0675,1.0976,.98205,1.03809,1.05097,1.04,.95364,1.03342,1.05401,1.2,1.02148,1.0119,1.04724,1.0127,1.02732,.96225,.8965,.97783,.93574,.94818,1.30679,1.0675,1.11826,.99821,1.0557,1.0326,1.2,1.0675,.96225,1.0675,1.0326,.74817,1,1,1,1,1,1,1,1,1,1,1,1,1.03754,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,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,1,1,1,1,1,1,1,1,.87533,1,1,1,1,1,1,1,1,1,1,1,1,.98705,1,1,1,1,1,1,.98448,.9973,.98448,.9973,.98448,.9973,.83089,.96777,1,1.20088,.89903,1,1,.75155,.94945,.94945,.94945,.94945,1.12317,1.12317,1.12317,.67603,.67603,1.15621,.73584,1.21191,1.22135,1.06483,.94868,.94868,.95996,1.24633,1,1.07497,.87709,.96927,1.01473,.96927,1,1,1,.77295,1,1,1.09836,1.09836,1.09836,1.01522,.86321,.94434,.8649,.94434,.86182,1,1,1.083,1,.91578,.86438,1.17308,1.18416,1.14589,.69825,.97622,1.96791,1\
.24822,1.24822,1.17308,1.24822,1.24822,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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1.42603,1,.99862,.99862,1,.87025,.87025,.87025,.87025,1.17984,1.42603,1,1.42603,1.42603,.99862,1,1,1,1,1,1.2886,1.04315,1.15296,1.34163,1,1,1,1.10742,1.10742,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],gn={lineHeight:1.33008,lineGap:0},pn=[1.76738,1,1,.98594,1.02285,1.10454,1.06234,.96927,.92037,1.19985,1.2046,.90616,.90616,1.07152,1.1714,.78032,1.20088,.78032,1\
.40246,.96927,.96927,.96927,.96927,.96927,.96927,.96927,.96927,.96927,.96927,.78032,.78032,1.1714,1.1714,1.1714,.80597,.94084,.96706,.85944,.85734,.97093,.75842,.79936,.88198,.9831,.95782,.71387,.86969,.84636,1.07796,1.03584,.96924,.83968,.96924,.82826,.79649,.85771,.95132,.93119,.98965,.88433,.8287,.93365,1.08612,1.3638,1.08612,1.45786,.74627,.80499,.91484,1.05707,.92383,1.05882,.9403,1.12654,1.05882,1.01756,1.09011,1.09011,.99414,1.09011,1.034,1.01756,1.05356,1.05707,1.05882,1.04399,.84863,1.2\
1968,1.01756,.95801,1.00068,.91797,.96777,.9043,.90351,.92105,.90351,1.1714,.85337,.96927,.96927,.99912,.96927,.92105,.80597,1.2434,1.20808,1.05937,.90957,1.1714,1.20808,.75155,.94261,1.24644,1.09971,1.09971,.84751,1,.85273,.78032,.61584,1.05425,1.17914,.90957,1.08665,1.11593,1.14169,.73381,.96706,.96706,.96706,.96706,.96706,.96706,.86035,.85734,.75842,.75842,.75842,.75842,.95782,.95782,.95782,.95782,.97093,1.03584,.96924,.96924,.96924,.96924,.96924,1.1714,.96924,.95132,.95132,.95132,.95132,.828\
7,.83968,.89049,.91484,.91484,.91484,.91484,.91484,.91484,.93575,.92383,.9403,.9403,.9403,.9403,.8717,.8717,.8717,.8717,1.00527,1.01756,1.05356,1.05356,1.05356,1.05356,1.05356,1.24644,.95923,1.01756,1.01756,1.01756,1.01756,.96777,1.05707,.96777,.96706,.91484,.96706,.91484,.96706,.91484,.85734,.92383,.85734,.92383,.85734,.92383,.85734,.92383,.97093,1.0969,.97093,1.05882,.75842,.9403,.75842,.9403,.75842,.9403,.75842,.9403,.75842,.9403,.88198,1.05882,.88198,1.05882,.88198,1.05882,1,1,.9831,1.01756,\
.9831,1.01756,.95782,.8717,.95782,.8717,.95782,.8717,.95782,1.09011,.95782,.8717,.84784,1.11551,.71387,1.09011,1,1,.99414,.84636,1.09011,1,1,.84636,1.0536,.84636,.94298,.84636,1.23297,1.03584,1.01756,1,1,1.03584,1.01756,1.00323,1.03444,1.01756,.96924,1.05356,.96924,1.05356,.96924,1.05356,.93066,.98293,.82826,1.04399,1,1,.82826,1.04399,.79649,.84863,.79649,.84863,.79649,.84863,.79649,.84863,1,1,.85771,1.17318,.85771,1.21968,.95132,1.01756,.95132,1.01756,.95132,1.01756,.95132,1.01756,.95132,1.0175\
6,.95132,1.01756,.98965,1.00068,.8287,.96777,.8287,.93365,.9043,.93365,.9043,.93365,.9043,1.08571,.96927,.96706,.91484,.86035,.93575,.96924,.95923,1,1,.85771,1.21968,1.11437,1.11437,.93109,.91202,.60411,.84164,.55572,1.01173,.97361,.81818,.81818,.96635,.78032,.72727,.92366,.98601,1.03405,.77968,1.09799,1.2,.96706,.85944,.85638,.96491,.75842,.93365,.9831,.96924,.95782,.86969,.94152,1.07796,1.03584,.78437,.96924,.98715,.83968,.83491,.85771,.8287,.94492,.88433,.9287,1.0098,.95782,.8287,1.0625,.9824\
8,1.03424,1.2,1.01071,1.0625,.95246,1.03809,1.04912,.98248,1.00221,1.03424,1.05443,1.2,1.04785,.99609,1.00169,1.05176,.99346,1.05356,.9087,1.03004,.95542,.93117,1.23362,1.01071,1.07831,1.02512,1.05205,1.03502,1.2,1.01071,1.05356,1.01071,1.03502,.75842,1,1,1,1,1,1,1,1,1,1,1,1,1.03719,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,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,1,1,1,1,1,1,1,1,.9403,1,1,1,1,1,1,1,1,1,1,1,1,1.04021,1,1,1,1,1,1,.98965,1.00068,.98965,1.00068,.989\
65,1.00068,.8287,.96777,1,1.20088,.89903,1,1,.75155,1.03077,1.03077,1.03077,1.03077,1.13196,1.13196,1.13196,.67428,.67428,1.16039,.73291,1.20996,1.22135,1.06483,.94868,.94868,.95996,1.24633,1,1.07497,.87796,.96927,1.01518,.96927,1,1,1,.77295,1,1,1.10539,1.10539,1.11358,1.06967,.86279,.94434,.86279,.94434,.86182,1,1,1.083,1,.91578,.86507,1.1714,1.18416,1.14589,.69825,.97622,1.9697,1.24822,1.24822,1.17238,1.24822,1.24822,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,1,1,1,1,1,1,1,1,1,1\
,1,1,1,1,1,1,1,1,1,1,1,1,1,1.42603,1,.99862,.99862,1,.87025,.87025,.87025,.87025,1.18083,1.42603,1,1.42603,1.42603,.99862,1,1,1,1,1,1.2886,1.04315,1.15296,1.34163,1,1,1,1.10938,1.10938,1,1,1,1.05425,1.09971,1.09971,1.09971,1,1,1,1,1,1,1,1,1,1,1],mn={lineHeight:1.33008,lineGap:0},bn=getLookupTableFactory((function(e){e["MyriadPro-Regular"]=e["PdfJS-Fallback-Regular"]={name:"LiberationSans-Regular",factors:on,baseWidths:Zi,baseMapping:Qi,metrics:cn};e["MyriadPro-Bold"]=e["PdfJS-Fallback-Bold"]={na\
me:"LiberationSans-Bold",factors:en,baseWidths:$i,baseMapping:Gi,metrics:tn};e["MyriadPro-It"]=e["MyriadPro-Italic"]=e["PdfJS-Fallback-Italic"]={name:"LiberationSans-Italic",factors:nn,baseWidths:Ji,baseMapping:Yi,metrics:sn};e["MyriadPro-BoldIt"]=e["MyriadPro-BoldItalic"]=e["PdfJS-Fallback-BoldItalic"]={name:"LiberationSans-BoldItalic",factors:an,baseWidths:Vi,baseMapping:Ki,metrics:rn};e.ArialMT=e.Arial=e["Arial-Regular"]={name:"LiberationSans-Regular",baseWidths:Zi,baseMapping:Qi};e["Arial-Bo\
ldMT"]=e["Arial-Bold"]={name:"LiberationSans-Bold",baseWidths:$i,baseMapping:Gi};e["Arial-ItalicMT"]=e["Arial-Italic"]={name:"LiberationSans-Italic",baseWidths:Ji,baseMapping:Yi};e["Arial-BoldItalicMT"]=e["Arial-BoldItalic"]={name:"LiberationSans-BoldItalic",baseWidths:Vi,baseMapping:Ki};e["Calibri-Regular"]={name:"LiberationSans-Regular",factors:Ni,baseWidths:Zi,baseMapping:Qi,metrics:Ei};e["Calibri-Bold"]={name:"LiberationSans-Bold",factors:Ti,baseWidths:$i,baseMapping:Gi,metrics:Oi};e["Calibr\
i-Italic"]={name:"LiberationSans-Italic",factors:Bi,baseWidths:Ji,baseMapping:Yi,metrics:Ri};e["Calibri-BoldItalic"]={name:"LiberationSans-BoldItalic",factors:Mi,baseWidths:Vi,baseMapping:Ki,metrics:Di};e["Segoeui-Regular"]={name:"LiberationSans-Regular",factors:pn,baseWidths:Zi,baseMapping:Qi,metrics:mn};e["Segoeui-Bold"]={name:"LiberationSans-Bold",factors:ln,baseWidths:$i,baseMapping:Gi,metrics:hn};e["Segoeui-Italic"]={name:"LiberationSans-Italic",factors:fn,baseWidths:Ji,baseMapping:Yi,metri\
cs:gn};e["Segoeui-BoldItalic"]={name:"LiberationSans-BoldItalic",factors:un,baseWidths:Vi,baseMapping:Ki,metrics:dn};e["Helvetica-Regular"]=e.Helvetica={name:"LiberationSans-Regular",factors:Wi,baseWidths:Zi,baseMapping:Qi,metrics:zi};e["Helvetica-Bold"]={name:"LiberationSans-Bold",factors:Pi,baseWidths:$i,baseMapping:Gi,metrics:ji};e["Helvetica-Italic"]={name:"LiberationSans-Italic",factors:qi,baseWidths:Ji,baseMapping:Yi,metrics:Hi};e["Helvetica-BoldItalic"]={name:"LiberationSans-BoldItalic",f\
actors:_i,baseWidths:Vi,baseMapping:Ki,metrics:Xi}}));function getXfaFontName(e){const t=normalizeFontName(e);return bn()[t]}function getXfaFontDict(e){const t=function getXfaFontWidths(e){const t=getXfaFontName(e);if(!t)return null;const{baseWidths:a,baseMapping:r,factors:i}=t,n=i?a.map(((e,t)=>e*i[t])):a;let s,o=-2;const c=[];for(const[e,t]of r.map(((e,t)=>[e,t])).sort((([e],[t])=>e-t)))if(-1!==e)if(e===o+1){s.push(n[t]);o+=1}else{o=e;s=[n[t]];c.push(e,s)}return c}(e),a=new Dict(null);a.set("B\
aseFont",Name.get(e));a.set("Type",Name.get("Font"));a.set("Subtype",Name.get("CIDFontType2"));a.set("Encoding",Name.get("Identity-H"));a.set("CIDToGIDMap",Name.get("Identity"));a.set("W",t);a.set("FirstChar",t[0]);a.set("LastChar",t.at(-2)+t.at(-1).length-1);const r=new Dict(null);a.set("FontDescriptor",r);const i=new Dict(null);i.set("Ordering","Identity");i.set("Registry","Adobe");i.set("Supplement",0);a.set("CIDSystemInfo",i);return a}class PostScriptParser{constructor(e){this.lexer=e;this.o\
perators=[];this.token=null;this.prev=null}nextToken(){this.prev=this.token;this.token=this.lexer.getToken()}accept(e){if(this.token.type===e){this.nextToken();return!0}return!1}expect(e){if(this.accept(e))return!0;throw new FormatError(`Unexpected symbol: found ${this.token.type} expected ${e}.`)}parse(){this.nextToken();this.expect(yn.LBRACE);this.parseBlock();this.expect(yn.RBRACE);return this.operators}parseBlock(){for(;;)if(this.accept(yn.NUMBER))this.operators.push(this.prev.value);else if\
(this.accept(yn.OPERATOR))this.operators.push(this.prev.value);else{if(!this.accept(yn.LBRACE))return;this.parseCondition()}}parseCondition(){const e=this.operators.length;this.operators.push(null,null);this.parseBlock();this.expect(yn.RBRACE);if(this.accept(yn.IF)){this.operators[e]=this.operators.length;this.operators[e+1]="jz"}else{if(!this.accept(yn.LBRACE))throw new FormatError("PS Function: error parsing conditional.");{const t=this.operators.length;this.operators.push(null,null);const a=t\
his.operators.length;this.parseBlock();this.expect(yn.RBRACE);this.expect(yn.IFELSE);this.operators[t]=this.operators.length;this.operators[t+1]="j";this.operators[e]=a;this.operators[e+1]="jz"}}}}const yn={LBRACE:0,RBRACE:1,NUMBER:2,OPERATOR:3,IF:4,IFELSE:5};class PostScriptToken{static get opCache(){return shadow(this,"opCache",Object.create(null))}constructor(e,t){this.type=e;this.value=t}static getOperator(e){return PostScriptToken.opCache[e]||=new PostScriptToken(yn.OPERATOR,e)}static get L\
BRACE(){return shadow(this,"LBRACE",new PostScriptToken(yn.LBRACE,"{"))}static get RBRACE(){return shadow(this,"RBRACE",new PostScriptToken(yn.RBRACE,"}"))}static get IF(){return shadow(this,"IF",new PostScriptToken(yn.IF,"IF"))}static get IFELSE(){return shadow(this,"IFELSE",new PostScriptToken(yn.IFELSE,"IFELSE"))}}class PostScriptLexer{constructor(e){this.stream=e;this.nextChar();this.strBuf=[]}nextChar(){return this.currentChar=this.stream.getByte()}getToken(){let e=!1,t=this.currentChar;for\
(;;){if(t<0)return wa;if(e)10!==t&&13!==t||(e=!1);else if(37===t)e=!0;else if(!isWhiteSpace(t))break;t=this.nextChar()}switch(0|t){case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:case 43:case 45:case 46:return new PostScriptToken(yn.NUMBER,this.getNumber());case 123:this.nextChar();return PostScriptToken.LBRACE;case 125:this.nextChar();return PostScriptToken.RBRACE}const a=this.strBuf;a.length=0;a[0]=String.fromCharCode(t);for(;(t=this.nextChar())>=0&&(t>=65&&t<=9\
0||t>=97&&t<=122);)a.push(String.fromCharCode(t));const r=a.join("");switch(r.toLowerCase()){case"if":return PostScriptToken.IF;case"ifelse":return PostScriptToken.IFELSE;default:return PostScriptToken.getOperator(r)}}getNumber(){let e=this.currentChar;const t=this.strBuf;t.length=0;t[0]=String.fromCharCode(e);for(;(e=this.nextChar())>=0&&(e>=48&&e<=57||45===e||46===e);)t.push(String.fromCharCode(e));const a=parseFloat(t.join(""));if(isNaN(a))throw new FormatError(`Invalid floating point number:\
 ${a}`);return a}}class BaseLocalCache{constructor(e){this._onlyRefs=!0===e?.onlyRefs;if(!this._onlyRefs){this._nameRefMap=new Map;this._imageMap=new Map}this._imageCache=new RefSetCache}getByName(e){this._onlyRefs&&unreachable("Should not call `getByName` method.");const t=this._nameRefMap.get(e);return t?this.getByRef(t):this._imageMap.get(e)||null}getByRef(e){return this._imageCache.get(e)||null}set(e,t,a){unreachable("Abstract method `set` called.")}}class LocalImageCache extends BaseLocalCa\
che{set(e,t=null,a){if("string"!=typeof e)throw new Error(\'LocalImageCache.set - expected "name" argument.\');if(t){if(this._imageCache.has(t))return;this._nameRefMap.set(e,t);this._imageCache.put(t,a)}else this._imageMap.has(e)||this._imageMap.set(e,a)}}class LocalColorSpaceCache extends BaseLocalCache{set(e=null,t=null,a){if("string"!=typeof e&&!t)throw new Error(\'LocalColorSpaceCache.set - expected "name" and/or "ref" argument.\');if(t){if(this._imageCache.has(t))return;null!==e&&this._nameRefM\
ap.set(e,t);this._imageCache.put(t,a)}else this._imageMap.has(e)||this._imageMap.set(e,a)}}class LocalFunctionCache extends BaseLocalCache{constructor(e){super({onlyRefs:!0})}set(e=null,t,a){if(!t)throw new Error(\'LocalFunctionCache.set - expected "ref" argument.\');this._imageCache.has(t)||this._imageCache.put(t,a)}}class LocalGStateCache extends BaseLocalCache{set(e,t=null,a){if("string"!=typeof e)throw new Error(\'LocalGStateCache.set - expected "name" argument.\');if(t){if(this._imageCache.has(\
t))return;this._nameRefMap.set(e,t);this._imageCache.put(t,a)}else this._imageMap.has(e)||this._imageMap.set(e,a)}}class LocalTilingPatternCache extends BaseLocalCache{constructor(e){super({onlyRefs:!0})}set(e=null,t,a){if(!t)throw new Error(\'LocalTilingPatternCache.set - expected "ref" argument.\');this._imageCache.has(t)||this._imageCache.put(t,a)}}class RegionalImageCache extends BaseLocalCache{constructor(e){super({onlyRefs:!0})}set(e=null,t,a){if(!t)throw new Error(\'RegionalImageCache.set - \
expected "ref" argument.\');this._imageCache.has(t)||this._imageCache.put(t,a)}}class GlobalColorSpaceCache extends BaseLocalCache{constructor(e){super({onlyRefs:!0})}set(e=null,t,a){if(!t)throw new Error(\'GlobalColorSpaceCache.set - expected "ref" argument.\');this._imageCache.has(t)||this._imageCache.put(t,a)}clear(){this._imageCache.clear()}}class GlobalImageCache{static NUM_PAGES_THRESHOLD=2;static MIN_IMAGES_TO_CACHE=10;static MAX_BYTE_SIZE=5e7;#H=new RefSet;constructor(){this._refCache=new R\
efSetCache;this._imageCache=new RefSetCache}get#W(){let e=0;for(const t of this._imageCache)e+=t.byteSize;return e}get#z(){return!(this._imageCache.size<GlobalImageCache.MIN_IMAGES_TO_CACHE)&&!(this.#W<GlobalImageCache.MAX_BYTE_SIZE)}shouldCache(e,t){let a=this._refCache.get(e);if(!a){a=new Set;this._refCache.put(e,a)}a.add(t);return!(a.size<GlobalImageCache.NUM_PAGES_THRESHOLD)&&!(!this._imageCache.has(e)&&this.#z)}addDecodeFailed(e){this.#H.put(e)}hasDecodeFailed(e){return this.#H.has(e)}addBy\
teSize(e,t){const a=this._imageCache.get(e);a&&(a.byteSize||(a.byteSize=t))}getData(e,t){const a=this._refCache.get(e);if(!a)return null;if(a.size<GlobalImageCache.NUM_PAGES_THRESHOLD)return null;const r=this._imageCache.get(e);if(!r)return null;a.add(t);return r}setData(e,t){if(!this._refCache.has(e))throw new Error(\'GlobalImageCache.setData - expected "shouldCache" to have been called.\');this._imageCache.has(e)||(this.#z?warn("GlobalImageCache.setData - cache limit reached."):this._imageCache.\
put(e,t))}clear(e=!1){if(!e){this.#H.clear();this._refCache.clear()}this._imageCache.clear()}}class PDFFunctionFactory{constructor({xref:e,isEvalSupported:t=!0}){this.xref=e;this.isEvalSupported=!1!==t}create(e,t=!1){let a,r;e instanceof Ref?a=e:e instanceof Dict?a=e.objId:e instanceof BaseStream&&(a=e.dict?.objId);if(a){const e=this._localFunctionCache.getByRef(a);if(e)return e}const i=this.xref.fetchIfRef(e);if(Array.isArray(i)){if(!t)throw new Error(\'PDFFunctionFactory.create - expected "pars\
eArray" argument.\');r=PDFFunction.parseArray(this,i)}else r=PDFFunction.parse(this,i);a&&this._localFunctionCache.set(null,a,r);return r}get _localFunctionCache(){return shadow(this,"_localFunctionCache",new LocalFunctionCache)}}function toNumberArray(e){return Array.isArray(e)?isNumberArray(e,null)?e:e.map((e=>+e)):null}class PDFFunction{static getSampleArray(e,t,a,r){let i,n,s=1;for(i=0,n=e.length;i<n;i++)s*=e[i];s*=t;const o=new Array(s);let c=0,l=0;const h=1/(2**a-1),u=r.getBytes((s*a+7)/8);\
let d=0;for(i=0;i<s;i++){for(;c<a;){l<<=8;l|=u[d++];c+=8}c-=a;o[i]=(l>>c)*h;l&=(1<<c)-1}return o}static parse(e,t){const a=t.dict||t;switch(a.get("FunctionType")){case 0:return this.constructSampled(e,t,a);case 1:break;case 2:return this.constructInterpolated(e,a);case 3:return this.constructStiched(e,a);case 4:return this.constructPostScript(e,t,a)}throw new FormatError("Unknown type of function")}static parseArray(e,t){const{xref:a}=e,r=[];for(const i of t)r.push(this.parse(e,a.fetchIfRef(i)))\
;return function(e,t,a,i){for(let n=0,s=r.length;n<s;n++)r[n](e,t,a,i+n)}}static constructSampled(e,t,a){function toMultiArray(e){const t=e.length,a=[];let r=0;for(let i=0;i<t;i+=2)a[r++]=[e[i],e[i+1]];return a}function interpolate(e,t,a,r,i){return r+(i-r)/(a-t)*(e-t)}let r=toNumberArray(a.getArray("Domain")),i=toNumberArray(a.getArray("Range"));if(!r||!i)throw new FormatError("No domain or range");const n=r.length/2,s=i.length/2;r=toMultiArray(r);i=toMultiArray(i);const o=toNumberArray(a.getAr\
ray("Size")),c=a.get("BitsPerSample"),l=a.get("Order")||1;1!==l&&info("No support for cubic spline interpolation: "+l);let h=toNumberArray(a.getArray("Encode"));if(h)h=toMultiArray(h);else{h=[];for(let e=0;e<n;++e)h.push([0,o[e]-1])}let u=toNumberArray(a.getArray("Decode"));u=u?toMultiArray(u):i;const d=this.getSampleArray(o,s,c,t);return function constructSampledFn(e,t,a,c){const l=1<<n,f=new Float64Array(l).fill(1),g=new Uint32Array(l);let p,m,b=s,y=1;for(p=0;p<n;++p){const a=r[p][0],i=r[p][1]\
;let n=interpolate(MathClamp(e[t+p],a,i),a,i,h[p][0],h[p][1]);const s=o[p];n=MathClamp(n,0,s-1);const c=n<s-1?Math.floor(n):n-1,u=c+1-n,d=n-c,w=c*b,x=w+b;for(m=0;m<l;m++)if(m&y){f[m]*=d;g[m]+=x}else{f[m]*=u;g[m]+=w}b*=s;y<<=1}for(m=0;m<s;++m){let e=0;for(p=0;p<l;p++)e+=d[g[p]+m]*f[p];e=interpolate(e,0,1,u[m][0],u[m][1]);a[c+m]=MathClamp(e,i[m][0],i[m][1])}}}static constructInterpolated(e,t){const a=toNumberArray(t.getArray("C0"))||[0],r=toNumberArray(t.getArray("C1"))||[1],i=t.get("N"),n=[];for(\
let e=0,t=a.length;e<t;++e)n.push(r[e]-a[e]);const s=n.length;return function constructInterpolatedFn(e,t,r,o){const c=1===i?e[t]:e[t]**i;for(let e=0;e<s;++e)r[o+e]=a[e]+c*n[e]}}static constructStiched(e,t){const a=toNumberArray(t.getArray("Domain"));if(!a)throw new FormatError("No domain");if(1!==a.length/2)throw new FormatError("Bad domain for stiched function");const{xref:r}=e,i=[];for(const a of t.get("Functions"))i.push(this.parse(e,r.fetchIfRef(a)));const n=toNumberArray(t.getArray("Bounds\
")),s=toNumberArray(t.getArray("Encode")),o=new Float32Array(1);return function constructStichedFn(e,t,r,c){const l=MathClamp(e[t],a[0],a[1]),h=n.length;let u;for(u=0;u<h&&!(l<n[u]);++u);let d=a[0];u>0&&(d=n[u-1]);let f=a[1];u<n.length&&(f=n[u]);const g=s[2*u],p=s[2*u+1];o[0]=d===f?g:g+(l-d)*(p-g)/(f-d);i[u](o,0,r,c)}}static constructPostScript(e,t,a){const r=toNumberArray(a.getArray("Domain")),i=toNumberArray(a.getArray("Range"));if(!r)throw new FormatError("No domain.");if(!i)throw new FormatE\
rror("No range.");const n=new PostScriptLexer(t),s=new PostScriptParser(n).parse();if(e.isEvalSupported&&FeatureTest.isEvalSupported){const e=(new PostScriptCompiler).compile(s,r,i);if(e)return new Function("src","srcOffset","dest","destOffset",e)}info("Unable to compile PS function");const o=i.length>>1,c=r.length>>1,l=new PostScriptEvaluator(s),h=Object.create(null);let u=8192;const d=new Float32Array(c);return function constructPostScriptFn(e,t,a,r){let n,s,f="";const g=d;for(n=0;n<c;n++){s=e\
[t+n];g[n]=s;f+=s+"_"}const p=h[f];if(void 0!==p){a.set(p,r);return}const m=new Float32Array(o),b=l.execute(g),y=b.length-o;for(n=0;n<o;n++){s=b[y+n];let e=i[2*n];if(s<e)s=e;else{e=i[2*n+1];s>e&&(s=e)}m[n]=s}if(u>0){u--;h[f]=m}a.set(m,r)}}}function isPDFFunction(e){let t;if(e instanceof Dict)t=e;else{if(!(e instanceof BaseStream))return!1;t=e.dict}return t.has("FunctionType")}class PostScriptStack{static MAX_STACK_SIZE=100;constructor(e){this.stack=e?Array.from(e):[]}push(e){if(this.stack.length\
>=PostScriptStack.MAX_STACK_SIZE)throw new Error("PostScript function stack overflow.");this.stack.push(e)}pop(){if(this.stack.length<=0)throw new Error("PostScript function stack underflow.");return this.stack.pop()}copy(e){if(this.stack.length+e>=PostScriptStack.MAX_STACK_SIZE)throw new Error("PostScript function stack overflow.");const t=this.stack;for(let a=t.length-e,r=e-1;r>=0;r--,a++)t.push(t[a])}index(e){this.push(this.stack[this.stack.length-e-1])}roll(e,t){const a=this.stack,r=a.length\
-e,i=a.length-1,n=r+(t-Math.floor(t/e)*e);for(let e=r,t=i;e<t;e++,t--){const r=a[e];a[e]=a[t];a[t]=r}for(let e=r,t=n-1;e<t;e++,t--){const r=a[e];a[e]=a[t];a[t]=r}for(let e=n,t=i;e<t;e++,t--){const r=a[e];a[e]=a[t];a[t]=r}}}class PostScriptEvaluator{constructor(e){this.operators=e}execute(e){const t=new PostScriptStack(e);let a=0;const r=this.operators,i=r.length;let n,s,o;for(;a<i;){n=r[a++];if("number"!=typeof n)switch(n){case"jz":o=t.pop();s=t.pop();s||(a=o);break;case"j":s=t.pop();a=s;break;c\
ase"abs":s=t.pop();t.push(Math.abs(s));break;case"add":o=t.pop();s=t.pop();t.push(s+o);break;case"and":o=t.pop();s=t.pop();"boolean"==typeof s&&"boolean"==typeof o?t.push(s&&o):t.push(s&o);break;case"atan":o=t.pop();s=t.pop();s=Math.atan2(s,o)/Math.PI*180;s<0&&(s+=360);t.push(s);break;case"bitshift":o=t.pop();s=t.pop();s>0?t.push(s<<o):t.push(s>>o);break;case"ceiling":s=t.pop();t.push(Math.ceil(s));break;case"copy":s=t.pop();t.copy(s);break;case"cos":s=t.pop();t.push(Math.cos(s%360/180*Math.PI))\
;break;case"cvi":s=0|t.pop();t.push(s);break;case"cvr":break;case"div":o=t.pop();s=t.pop();t.push(s/o);break;case"dup":t.copy(1);break;case"eq":o=t.pop();s=t.pop();t.push(s===o);break;case"exch":t.roll(2,1);break;case"exp":o=t.pop();s=t.pop();t.push(s**o);break;case"false":t.push(!1);break;case"floor":s=t.pop();t.push(Math.floor(s));break;case"ge":o=t.pop();s=t.pop();t.push(s>=o);break;case"gt":o=t.pop();s=t.pop();t.push(s>o);break;case"idiv":o=t.pop();s=t.pop();t.push(s/o|0);break;case"index":s\
=t.pop();t.index(s);break;case"le":o=t.pop();s=t.pop();t.push(s<=o);break;case"ln":s=t.pop();t.push(Math.log(s));break;case"log":s=t.pop();t.push(Math.log10(s));break;case"lt":o=t.pop();s=t.pop();t.push(s<o);break;case"mod":o=t.pop();s=t.pop();t.push(s%o);break;case"mul":o=t.pop();s=t.pop();t.push(s*o);break;case"ne":o=t.pop();s=t.pop();t.push(s!==o);break;case"neg":s=t.pop();t.push(-s);break;case"not":s=t.pop();"boolean"==typeof s?t.push(!s):t.push(~s);break;case"or":o=t.pop();s=t.pop();"boolea\
n"==typeof s&&"boolean"==typeof o?t.push(s||o):t.push(s|o);break;case"pop":t.pop();break;case"roll":o=t.pop();s=t.pop();t.roll(s,o);break;case"round":s=t.pop();t.push(Math.round(s));break;case"sin":s=t.pop();t.push(Math.sin(s%360/180*Math.PI));break;case"sqrt":s=t.pop();t.push(Math.sqrt(s));break;case"sub":o=t.pop();s=t.pop();t.push(s-o);break;case"true":t.push(!0);break;case"truncate":s=t.pop();s=s<0?Math.ceil(s):Math.floor(s);t.push(s);break;case"xor":o=t.pop();s=t.pop();"boolean"==typeof s&&"\
boolean"==typeof o?t.push(s!==o):t.push(s^o);break;default:throw new FormatError(`Unknown operator ${n}`)}else t.push(n)}return t.stack}}class AstNode{constructor(e){this.type=e}visit(e){unreachable("abstract method")}}class AstArgument extends AstNode{constructor(e,t,a){super("args");this.index=e;this.min=t;this.max=a}visit(e){e.visitArgument(this)}}class AstLiteral extends AstNode{constructor(e){super("literal");this.number=e;this.min=e;this.max=e}visit(e){e.visitLiteral(this)}}class AstBinary\
Operation extends AstNode{constructor(e,t,a,r,i){super("binary");this.op=e;this.arg1=t;this.arg2=a;this.min=r;this.max=i}visit(e){e.visitBinaryOperation(this)}}class AstMin extends AstNode{constructor(e,t){super("max");this.arg=e;this.min=e.min;this.max=t}visit(e){e.visitMin(this)}}class AstVariable extends AstNode{constructor(e,t,a){super("var");this.index=e;this.min=t;this.max=a}visit(e){e.visitVariable(this)}}class AstVariableDefinition extends AstNode{constructor(e,t){super("definition");thi\
s.variable=e;this.arg=t}visit(e){e.visitVariableDefinition(this)}}class ExpressionBuilderVisitor{constructor(){this.parts=[]}visitArgument(e){this.parts.push("Math.max(",e.min,", Math.min(",e.max,", src[srcOffset + ",e.index,"]))")}visitVariable(e){this.parts.push("v",e.index)}visitLiteral(e){this.parts.push(e.number)}visitBinaryOperation(e){this.parts.push("(");e.arg1.visit(this);this.parts.push(" ",e.op," ");e.arg2.visit(this);this.parts.push(")")}visitVariableDefinition(e){this.parts.push("va\
r ");e.variable.visit(this);this.parts.push(" = ");e.arg.visit(this);this.parts.push(";")}visitMin(e){this.parts.push("Math.min(");e.arg.visit(this);this.parts.push(", ",e.max,")")}toString(){return this.parts.join("")}}function buildAddOperation(e,t){return"literal"===t.type&&0===t.number?e:"literal"===e.type&&0===e.number?t:"literal"===t.type&&"literal"===e.type?new AstLiteral(e.number+t.number):new AstBinaryOperation("+",e,t,e.min+t.min,e.max+t.max)}function buildMulOperation(e,t){if("literal\
"===t.type){if(0===t.number)return new AstLiteral(0);if(1===t.number)return e;if("literal"===e.type)return new AstLiteral(e.number*t.number)}if("literal"===e.type){if(0===e.number)return new AstLiteral(0);if(1===e.number)return t}const a=Math.min(e.min*t.min,e.min*t.max,e.max*t.min,e.max*t.max),r=Math.max(e.min*t.min,e.min*t.max,e.max*t.min,e.max*t.max);return new AstBinaryOperation("*",e,t,a,r)}function buildSubOperation(e,t){if("literal"===t.type){if(0===t.number)return e;if("literal"===e.type\
)return new AstLiteral(e.number-t.number)}return"binary"===t.type&&"-"===t.op&&"literal"===e.type&&1===e.number&&"literal"===t.arg1.type&&1===t.arg1.number?t.arg2:new AstBinaryOperation("-",e,t,e.min-t.max,e.max-t.min)}function buildMinOperation(e,t){return e.min>=t?new AstLiteral(t):e.max<=t?e:new AstMin(e,t)}class PostScriptCompiler{compile(e,t,a){const r=[],i=[],n=t.length>>1,s=a.length>>1;let o,c,l,h,u,d,f,g,p=0;for(let e=0;e<n;e++)r.push(new AstArgument(e,t[2*e],t[2*e+1]));for(let t=0,a=e.l\
ength;t<a;t++){g=e[t];if("number"!=typeof g)switch(g){case"add":if(r.length<2)return null;h=r.pop();l=r.pop();r.push(buildAddOperation(l,h));break;case"cvr":if(r.length<1)return null;break;case"mul":if(r.length<2)return null;h=r.pop();l=r.pop();r.push(buildMulOperation(l,h));break;case"sub":if(r.length<2)return null;h=r.pop();l=r.pop();r.push(buildSubOperation(l,h));break;case"exch":if(r.length<2)return null;u=r.pop();d=r.pop();r.push(u,d);break;case"pop":if(r.length<1)return null;r.pop();break;\
case"index":if(r.length<1)return null;l=r.pop();if("literal"!==l.type)return null;o=l.number;if(o<0||!Number.isInteger(o)||r.length<o)return null;u=r[r.length-o-1];if("literal"===u.type||"var"===u.type){r.push(u);break}f=new AstVariable(p++,u.min,u.max);r[r.length-o-1]=f;r.push(f);i.push(new AstVariableDefinition(f,u));break;case"dup":if(r.length<1)return null;if("number"==typeof e[t+1]&&"gt"===e[t+2]&&e[t+3]===t+7&&"jz"===e[t+4]&&"pop"===e[t+5]&&e[t+6]===e[t+1]){l=r.pop();r.push(buildMinOperati\
on(l,e[t+1]));t+=6;break}u=r.at(-1);if("literal"===u.type||"var"===u.type){r.push(u);break}f=new AstVariable(p++,u.min,u.max);r[r.length-1]=f;r.push(f);i.push(new AstVariableDefinition(f,u));break;case"roll":if(r.length<2)return null;h=r.pop();l=r.pop();if("literal"!==h.type||"literal"!==l.type)return null;c=h.number;o=l.number;if(o<=0||!Number.isInteger(o)||!Number.isInteger(c)||r.length<o)return null;c=(c%o+o)%o;if(0===c)break;r.push(...r.splice(r.length-o,o-c));break;default:return null}else \
r.push(new AstLiteral(g))}if(r.length!==s)return null;const m=[];for(const e of i){const t=new ExpressionBuilderVisitor;e.visit(t);m.push(t.toString())}for(let e=0,t=r.length;e<t;e++){const t=r[e],i=new ExpressionBuilderVisitor;t.visit(i);const n=a[2*e],s=a[2*e+1],o=[i.toString()];if(n>t.min){o.unshift("Math.max(",n,", ");o.push(")")}if(s<t.max){o.unshift("Math.min(",s,", ");o.push(")")}o.unshift("dest[destOffset + ",e,"] = ");o.push(";");m.push(o.join(""))}return m.join("\\n")}}const wn=["BN","B\
N","BN","BN","BN","BN","BN","BN","BN","S","B","S","WS","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","B","B","B","S","WS","ON","ON","ET","ET","ET","ON","ON","ON","ON","ON","ES","CS","ES","CS","CS","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","CS","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L",\
"L","L","L","L","L","L","L","L","L","L","L","L","ON","ON","ON","ON","BN","BN","BN","BN","BN","BN","B","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","BN","CS","ON","ET","ET","ET","ET","ON","ON","ON","ON","L","ON","ON","BN","ON","ON","ET","ET","EN","EN","ON","L","ON","ON","ON","EN","L","ON","ON","ON","ON","ON","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L\
","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","L","ON","L","L","L","L","L","L","L","L"],xn=["AN","AN","AN","AN","AN","AN","ON","ON","AL","ET","ET","AL","CS","AL","ON","ON","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL"\
,"AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","AN","AN","AN","AN","AN","AN","AN","AN","AN","ET","AN","AN","AL","AL","AL","NSM","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","A\
L","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","AL","NSM","NSM","NSM","NSM","NSM","NSM","NSM","AN","ON","NSM","NSM","NSM","NSM","NSM","NSM","AL","AL","NSM","NSM","ON","NSM","NSM","NSM","NSM","AL","AL","EN","EN","EN","EN","EN","EN","EN","EN","EN","EN","AL","AL","AL","AL","AL","AL"];function isOdd(e)\
{return!!(1&e)}function isEven(e){return!(1&e)}function findUnequal(e,t,a){let r,i;for(r=t,i=e.length;r<i;++r)if(e[r]!==a)return r;return r}function reverseValues(e,t,a){for(let r=t,i=a-1;r<i;++r,--i){const t=e[r];e[r]=e[i];e[i]=t}}function createBidiText(e,t,a=!1){let r="ltr";a?r="ttb":t||(r="rtl");return{str:e,dir:r}}const Sn=[],An=[];function bidi(e,t=-1,a=!1){let r=!0;const i=e.length;if(0===i||a)return createBidiText(e,r,a);Sn.length=i;An.length=i;let n,s,o=0;for(n=0;n<i;++n){Sn[n]=e.charAt\
(n);const t=e.charCodeAt(n);let a="L";if(t<=255)a=wn[t];else if(1424<=t&&t<=1524)a="R";else if(1536<=t&&t<=1791){a=xn[255&t];a||warn("Bidi: invalid Unicode character "+t.toString(16))}else(1792<=t&&t<=2220||64336<=t&&t<=65023||65136<=t&&t<=65279)&&(a="AL");"R"!==a&&"AL"!==a&&"AN"!==a||o++;An[n]=a}if(0===o){r=!0;return createBidiText(e,r)}if(-1===t)if(o/i<.3&&i>4){r=!0;t=0}else{r=!1;t=1}const c=[];for(n=0;n<i;++n)c[n]=t;const l=isOdd(t)?"R":"L",h=l,u=h;let d,f=h;for(n=0;n<i;++n)"NSM"===An[n]?An[n\
]=f:f=An[n];f=h;for(n=0;n<i;++n){d=An[n];"EN"===d?An[n]="AL"===f?"AN":"EN":"R"!==d&&"L"!==d&&"AL"!==d||(f=d)}for(n=0;n<i;++n){d=An[n];"AL"===d&&(An[n]="R")}for(n=1;n<i-1;++n){"ES"===An[n]&&"EN"===An[n-1]&&"EN"===An[n+1]&&(An[n]="EN");"CS"!==An[n]||"EN"!==An[n-1]&&"AN"!==An[n-1]||An[n+1]!==An[n-1]||(An[n]=An[n-1])}for(n=0;n<i;++n)if("EN"===An[n]){for(let e=n-1;e>=0&&"ET"===An[e];--e)An[e]="EN";for(let e=n+1;e<i&&"ET"===An[e];++e)An[e]="EN"}for(n=0;n<i;++n){d=An[n];"WS"!==d&&"ES"!==d&&"ET"!==d&&"C\
S"!==d||(An[n]="ON")}f=h;for(n=0;n<i;++n){d=An[n];"EN"===d?An[n]="L"===f?"L":"EN":"R"!==d&&"L"!==d||(f=d)}for(n=0;n<i;++n)if("ON"===An[n]){const e=findUnequal(An,n+1,"ON");let t=h;n>0&&(t=An[n-1]);let a=u;e+1<i&&(a=An[e+1]);"L"!==t&&(t="R");"L"!==a&&(a="R");t===a&&An.fill(t,n,e);n=e-1}for(n=0;n<i;++n)"ON"===An[n]&&(An[n]=l);for(n=0;n<i;++n){d=An[n];isEven(c[n])?"R"===d?c[n]+=1:"AN"!==d&&"EN"!==d||(c[n]+=2):"L"!==d&&"AN"!==d&&"EN"!==d||(c[n]+=1)}let g,p=-1,m=99;for(n=0,s=c.length;n<s;++n){g=c[n];\
p<g&&(p=g);m>g&&isOdd(g)&&(m=g)}for(g=p;g>=m;--g){let e=-1;for(n=0,s=c.length;n<s;++n)if(c[n]<g){if(e>=0){reverseValues(Sn,e,n);e=-1}}else e<0&&(e=n);e>=0&&reverseValues(Sn,e,c.length)}for(n=0,s=Sn.length;n<s;++n){const e=Sn[n];"<"!==e&&">"!==e||(Sn[n]="")}return createBidiText(Sn.join(""),r)}const kn={style:"normal",weight:"normal"},Cn={style:"normal",weight:"bold"},vn={style:"italic",weight:"normal"},Fn={style:"italic",weight:"bold"},In=new Map([["Times-Roman",{local:["Times New Roman","Times-\
Roman","Times","Liberation Serif","Nimbus Roman","Nimbus Roman L","Tinos","Thorndale","TeX Gyre Termes","FreeSerif","Linux Libertine O","Libertinus Serif","DejaVu Serif","Bitstream Vera Serif","Ubuntu"],style:kn,ultimate:"serif"}],["Times-Bold",{alias:"Times-Roman",style:Cn,ultimate:"serif"}],["Times-Italic",{alias:"Times-Roman",style:vn,ultimate:"serif"}],["Times-BoldItalic",{alias:"Times-Roman",style:Fn,ultimate:"serif"}],["Helvetica",{local:["Helvetica","Helvetica Neue","Arial","Arial Nova","\
Liberation Sans","Arimo","Nimbus Sans","Nimbus Sans L","A030","TeX Gyre Heros","FreeSans","DejaVu Sans","Albany","Bitstream Vera Sans","Arial Unicode MS","Microsoft Sans Serif","Apple Symbols","Cantarell"],path:"LiberationSans-Regular.ttf",style:kn,ultimate:"sans-serif"}],["Helvetica-Bold",{alias:"Helvetica",path:"LiberationSans-Bold.ttf",style:Cn,ultimate:"sans-serif"}],["Helvetica-Oblique",{alias:"Helvetica",path:"LiberationSans-Italic.ttf",style:vn,ultimate:"sans-serif"}],["Helvetica-BoldObli\
que",{alias:"Helvetica",path:"LiberationSans-BoldItalic.ttf",style:Fn,ultimate:"sans-serif"}],["Courier",{local:["Courier","Courier New","Liberation Mono","Nimbus Mono","Nimbus Mono L","Cousine","Cumberland","TeX Gyre Cursor","FreeMono","Linux Libertine Mono O","Libertinus Mono"],style:kn,ultimate:"monospace"}],["Courier-Bold",{alias:"Courier",style:Cn,ultimate:"monospace"}],["Courier-Oblique",{alias:"Courier",style:vn,ultimate:"monospace"}],["Courier-BoldOblique",{alias:"Courier",style:Fn,ultim\
ate:"monospace"}],["ArialBlack",{local:["Arial Black"],style:{style:"normal",weight:"900"},fallback:"Helvetica-Bold"}],["ArialBlack-Bold",{alias:"ArialBlack"}],["ArialBlack-Italic",{alias:"ArialBlack",style:{style:"italic",weight:"900"},fallback:"Helvetica-BoldOblique"}],["ArialBlack-BoldItalic",{alias:"ArialBlack-Italic"}],["ArialNarrow",{local:["Arial Narrow","Liberation Sans Narrow","Helvetica Condensed","Nimbus Sans Narrow","TeX Gyre Heros Cn"],style:kn,fallback:"Helvetica"}],["ArialNarrow-B\
old",{alias:"ArialNarrow",style:Cn,fallback:"Helvetica-Bold"}],["ArialNarrow-Italic",{alias:"ArialNarrow",style:vn,fallback:"Helvetica-Oblique"}],["ArialNarrow-BoldItalic",{alias:"ArialNarrow",style:Fn,fallback:"Helvetica-BoldOblique"}],["Calibri",{local:["Calibri","Carlito"],style:kn,fallback:"Helvetica"}],["Calibri-Bold",{alias:"Calibri",style:Cn,fallback:"Helvetica-Bold"}],["Calibri-Italic",{alias:"Calibri",style:vn,fallback:"Helvetica-Oblique"}],["Calibri-BoldItalic",{alias:"Calibri",style:F\
n,fallback:"Helvetica-BoldOblique"}],["Wingdings",{local:["Wingdings","URW Dingbats"],style:kn}],["Wingdings-Regular",{alias:"Wingdings"}],["Wingdings-Bold",{alias:"Wingdings"}]]),Tn=new Map([["Arial-Black","ArialBlack"]]);function getFamilyName(e){const t=new Set(["thin","extralight","ultralight","demilight","semilight","light","book","regular","normal","medium","demibold","semibold","bold","extrabold","ultrabold","black","heavy","extrablack","ultrablack","roman","italic","oblique","ultraconden\
sed","extracondensed","condensed","semicondensed","normal","semiexpanded","expanded","extraexpanded","ultraexpanded","bolditalic"]);return e.split(/[- ,+]+/g).filter((e=>!t.has(e.toLowerCase()))).join(" ")}function generateFont({alias:e,local:t,path:a,fallback:r,style:i,ultimate:n},s,o,c=!0,l=!0,h=""){const u={style:null,ultimate:null};if(t){const e=h?` ${h}`:"";for(const a of t)s.push(`local(${a}${e})`)}if(e){const t=In.get(e),n=h||function getStyleToAppend(e){switch(e){case Cn:return"Bold";cas\
e vn:return"Italic";case Fn:return"Bold Italic";default:if("bold"===e?.weight)return"Bold";if("italic"===e?.style)return"Italic"}return""}(i);Object.assign(u,generateFont(t,s,o,c&&!r,l&&!a,n))}i&&(u.style=i);n&&(u.ultimate=n);if(c&&r){const e=In.get(r),{ultimate:t}=generateFont(e,s,o,c,l&&!a,h);u.ultimate||=t}l&&a&&o&&s.push(`url(${o}${a})`);return u}function getFontSubstitution(e,t,a,r,i,n){if(r.startsWith("InvalidPDFjsFont_"))return null;"TrueType"!==n&&"Type1"!==n||!/^[A-Z]{6}\\+/.test(r)||(r=\
r.slice(7));const s=r=normalizeFontName(r);let o=e.get(s);if(o)return o;let c=In.get(r);if(!c)for(const[e,t]of Tn)if(r.startsWith(e)){r=`${t}${r.substring(e.length)}`;c=In.get(r);break}let l=!1;if(!c){c=In.get(i);l=!0}const h=`${t.getDocId()}_s${t.createFontId()}`;if(!c){if(!validateFontName(r)){warn(`Cannot substitute the font because of its name: ${r}`);e.set(s,null);return null}const t=/bold/gi.test(r),a=/oblique|italic/gi.test(r),i=t&&a&&Fn||t&&Cn||a&&vn||kn;o={css:`"${getFamilyName(r)}",${h\
}`,guessFallback:!0,loadedName:h,baseFontName:r,src:`local(${r})`,style:i};e.set(s,o);return o}const u=[];l&&validateFontName(r)&&u.push(`local(${r})`);const{style:d,ultimate:f}=generateFont(c,u,a),g=null===f,p=g?"":`,${f}`;o={css:`"${getFamilyName(r)}",${h}${p}`,guessFallback:g,loadedName:h,baseFontName:r,src:u.join(","),style:d};e.set(s,o);return o}const On=3285377520,Mn=4294901760,Dn=65535;class MurmurHash3_64{constructor(e){this.h1=e?4294967295&e:On;this.h2=e?4294967295&e:On}update(e){let t,\
a;if("string"==typeof e){t=new Uint8Array(2*e.length);a=0;for(let r=0,i=e.length;r<i;r++){const i=e.charCodeAt(r);if(i<=255)t[a++]=i;else{t[a++]=i>>>8;t[a++]=255&i}}}else{if(!ArrayBuffer.isView(e))throw new Error("Invalid data format, must be a string or TypedArray.");t=e.slice();a=t.byteLength}const r=a>>2,i=a-4*r,n=new Uint32Array(t.buffer,0,r);let s=0,o=0,c=this.h1,l=this.h2;const h=3432918353,u=461845907,d=11601,f=13715;for(let e=0;e<r;e++)if(1&e){s=n[e];s=s*h&Mn|s*d&Dn;s=s<<15|s>>>17;s=s*u&\
Mn|s*f&Dn;c^=s;c=c<<13|c>>>19;c=5*c+3864292196}else{o=n[e];o=o*h&Mn|o*d&Dn;o=o<<15|o>>>17;o=o*u&Mn|o*f&Dn;l^=o;l=l<<13|l>>>19;l=5*l+3864292196}s=0;switch(i){case 3:s^=t[4*r+2]<<16;case 2:s^=t[4*r+1]<<8;case 1:s^=t[4*r];s=s*h&Mn|s*d&Dn;s=s<<15|s>>>17;s=s*u&Mn|s*f&Dn;1&r?c^=s:l^=s}this.h1=c;this.h2=l}hexdigest(){let e=this.h1,t=this.h2;e^=t>>>1;e=3981806797*e&Mn|36045*e&Dn;t=4283543511*t&Mn|(2950163797*(t<<16|e>>>16)&Mn)>>>16;e^=t>>>1;e=444984403*e&Mn|60499*e&Dn;t=3301882366*t&Mn|(3120437893*(t<<1\
6|e>>>16)&Mn)>>>16;e^=t>>>1;return(e>>>0).toString(16).padStart(8,"0")+(t>>>0).toString(16).padStart(8,"0")}}function resizeImageMask(e,t,a,r,i,n){const s=i*n;let o;o=t<=8?new Uint8Array(s):t<=16?new Uint16Array(s):new Uint32Array(s);const c=a/i,l=r/n;let h,u,d,f,g=0;const p=new Uint16Array(i),m=a;for(h=0;h<i;h++)p[h]=Math.floor(h*c);for(h=0;h<n;h++){d=Math.floor(h*l)*m;for(u=0;u<i;u++){f=d+p[u];o[g++]=e[f]}}return o}class PDFImage{constructor({xref:e,res:t,image:a,isInline:r=!1,smask:i=null,mas\
k:n=null,isMask:s=!1,pdfFunctionFactory:o,globalColorSpaceCache:c,localColorSpaceCache:l}){this.image=a;const h=a.dict,u=h.get("F","Filter");let d;if(u instanceof Name)d=u.name;else if(Array.isArray(u)){const t=e.fetchIfRef(u[0]);t instanceof Name&&(d=t.name)}switch(d){case"JPXDecode":({width:a.width,height:a.height,componentsCount:a.numComps,bitsPerComponent:a.bitsPerComponent}=JpxImage.parseImageProperties(a.stream));a.stream.reset();const e=ImageResizer.getReducePowerForJPX(a.width,a.height,a\
.numComps);this.jpxDecoderOptions={numComponents:0,isIndexedColormap:!1,smaskInData:h.has("SMaskInData"),reducePower:e};if(e){const t=2**e;a.width=Math.ceil(a.width/t);a.height=Math.ceil(a.height/t)}break;case"JBIG2Decode":a.bitsPerComponent=1;a.numComps=1}let f=h.get("W","Width"),g=h.get("H","Height");if(Number.isInteger(a.width)&&a.width>0&&Number.isInteger(a.height)&&a.height>0&&(a.width!==f||a.height!==g)){warn("PDFImage - using the Width/Height of the image data, rather than the image dicti\
onary.");f=a.width;g=a.height}else{const e="number"==typeof f&&f>0,t="number"==typeof g&&g>0;if(!e||!t){if(!a.fallbackDims)throw new FormatError(`Invalid image width: ${f} or height: ${g}`);warn("PDFImage - using the Width/Height of the parent image, for SMask/Mask data.");e||(f=a.fallbackDims.width);t||(g=a.fallbackDims.height)}}this.width=f;this.height=g;this.interpolate=h.get("I","Interpolate");this.imageMask=h.get("IM","ImageMask")||!1;this.matte=h.get("Matte")||!1;let p=a.bitsPerComponent;i\
f(!p){p=h.get("BPC","BitsPerComponent");if(!p){if(!this.imageMask)throw new FormatError(`Bits per component missing in image: ${this.imageMask}`);p=1}}this.bpc=p;if(!this.imageMask){let i=h.getRaw("CS")||h.getRaw("ColorSpace");const n=!!i;if(n)this.jpxDecoderOptions?.smaskInData&&(i=Name.get("DeviceRGBA"));else if(this.jpxDecoderOptions)i=Name.get("DeviceRGBA");else switch(a.numComps){case 1:i=Name.get("DeviceGray");break;case 3:i=Name.get("DeviceRGB");break;case 4:i=Name.get("DeviceCMYK");break\
;default:throw new Error(`Images with ${a.numComps} color components not supported.`)}this.colorSpace=ColorSpaceUtils.parse({cs:i,xref:e,resources:r?t:null,pdfFunctionFactory:o,globalColorSpaceCache:c,localColorSpaceCache:l});this.numComps=this.colorSpace.numComps;if(this.jpxDecoderOptions){this.jpxDecoderOptions.numComponents=n?this.numComps:0;this.jpxDecoderOptions.isIndexedColormap="Indexed"===this.colorSpace.name}}this.decode=h.getArray("D","Decode");this.needsDecode=!1;if(this.decode&&(this\
.colorSpace&&!this.colorSpace.isDefaultDecode(this.decode,p)||s&&!ColorSpace.isDefaultDecode(this.decode,1))){this.needsDecode=!0;const e=(1<<p)-1;this.decodeCoefficients=[];this.decodeAddends=[];const t="Indexed"===this.colorSpace?.name;for(let a=0,r=0;a<this.decode.length;a+=2,++r){const i=this.decode[a],n=this.decode[a+1];this.decodeCoefficients[r]=t?(n-i)/e:n-i;this.decodeAddends[r]=t?i:e*i}}if(i){i.fallbackDims??={width:f,height:g};this.smask=new PDFImage({xref:e,res:t,image:i,isInline:r,pd\
fFunctionFactory:o,globalColorSpaceCache:c,localColorSpaceCache:l})}else if(n)if(n instanceof BaseStream){if(n.dict.get("IM","ImageMask")){n.fallbackDims??={width:f,height:g};this.mask=new PDFImage({xref:e,res:t,image:n,isInline:r,isMask:!0,pdfFunctionFactory:o,globalColorSpaceCache:c,localColorSpaceCache:l})}else warn("Ignoring /Mask in image without /ImageMask.")}else this.mask=n}static async buildImage({xref:e,res:t,image:a,isInline:r=!1,pdfFunctionFactory:i,globalColorSpaceCache:n,localColor\
SpaceCache:s}){const o=a;let c=null,l=null;const h=a.dict.get("SMask"),u=a.dict.get("Mask");h?h instanceof BaseStream?c=h:warn("Unsupported /SMask format."):u&&(u instanceof BaseStream||Array.isArray(u)?l=u:warn("Unsupported /Mask format."));return new PDFImage({xref:e,res:t,image:o,isInline:r,smask:c,mask:l,pdfFunctionFactory:i,globalColorSpaceCache:n,localColorSpaceCache:s})}static async createMask({image:e,isOffscreenCanvasSupported:t=!1}){const{dict:a}=e,r=a.get("W","Width"),i=a.get("H","Hei\
ght"),n=a.get("I","Interpolate"),s=a.getArray("D","Decode"),o=s?.[0]>0,c=(r+7>>3)*i,l=e.getBytes(c),h=1===r&&1===i&&o===(0===l.length||!!(128&l[0]));if(h)return{isSingleOpaquePixel:h};if(t){if(ImageResizer.needsToBeResized(r,i)){const e=new Uint8ClampedArray(r*i*4);convertBlackAndWhiteToRGBA({src:l,dest:e,width:r,height:i,nonBlackColor:0,inverseDecode:o});return ImageResizer.createImage({kind:v,data:e,width:r,height:i,interpolate:n})}const e=new OffscreenCanvas(r,i),t=e.getContext("2d"),a=t.crea\
teImageData(r,i);convertBlackAndWhiteToRGBA({src:l,dest:a.data,width:r,height:i,nonBlackColor:0,inverseDecode:o});t.putImageData(a,0,0);return{data:null,width:r,height:i,interpolate:n,bitmap:e.transferToImageBitmap()}}const u=l.byteLength;let d;if(e instanceof DecodeStream&&(!o||c===u))d=l;else if(o){d=new Uint8Array(c);d.set(l);d.fill(255,u)}else d=new Uint8Array(l);if(o)for(let e=0;e<u;e++)d[e]^=255;return{data:d,width:r,height:i,interpolate:n}}get drawWidth(){return Math.max(this.width,this.s\
mask?.width||0,this.mask?.width||0)}get drawHeight(){return Math.max(this.height,this.smask?.height||0,this.mask?.height||0)}decodeBuffer(e){const t=this.bpc,a=this.numComps,r=this.decodeAddends,i=this.decodeCoefficients,n=(1<<t)-1;let s,o;if(1===t){for(s=0,o=e.length;s<o;s++)e[s]=+!e[s];return}let c=0;for(s=0,o=this.width*this.height;s<o;s++)for(let t=0;t<a;t++){e[c]=MathClamp(r[t]+e[c]*i[t],0,n);c++}}getComponents(e){const t=this.bpc;if(8===t)return e;const a=this.width,r=this.height,i=this.nu\
mComps,n=a*r*i;let s,o=0;s=t<=8?new Uint8Array(n):t<=16?new Uint16Array(n):new Uint32Array(n);const c=a*i,l=(1<<t)-1;let h,u,d=0;if(1===t){let t,a,i;for(let n=0;n<r;n++){a=d+(-8&c);i=d+c;for(;d<a;){u=e[o++];s[d]=u>>7&1;s[d+1]=u>>6&1;s[d+2]=u>>5&1;s[d+3]=u>>4&1;s[d+4]=u>>3&1;s[d+5]=u>>2&1;s[d+6]=u>>1&1;s[d+7]=1&u;d+=8}if(d<i){u=e[o++];t=128;for(;d<i;){s[d++]=+!!(u&t);t>>=1}}}}else{let a=0;u=0;for(d=0,h=n;d<h;++d){if(d%c==0){u=0;a=0}for(;a<t;){u=u<<8|e[o++];a+=8}const r=a-t;let i=u>>r;i<0?i=0:i>l&\
&(i=l);s[d]=i;u&=(1<<r)-1;a=r}}return s}async fillOpacity(e,t,a,r,i){const n=this.smask,s=this.mask;let o,c,l,h,u,d;if(n){c=n.width;l=n.height;o=new Uint8ClampedArray(c*l);await n.fillGrayBuffer(o);c===t&&l===a||(o=resizeImageMask(o,n.bpc,c,l,t,a))}else if(s)if(s instanceof PDFImage){c=s.width;l=s.height;o=new Uint8ClampedArray(c*l);s.numComps=1;await s.fillGrayBuffer(o);for(h=0,u=c*l;h<u;++h)o[h]=255-o[h];c===t&&l===a||(o=resizeImageMask(o,s.bpc,c,l,t,a))}else{if(!Array.isArray(s))throw new For\
matError("Unknown mask format.");{o=new Uint8ClampedArray(t*a);const e=this.numComps;for(h=0,u=t*a;h<u;++h){let t=0;const a=h*e;for(d=0;d<e;++d){const e=i[a+d],r=2*d;if(e<s[r]||e>s[r+1]){t=255;break}}o[h]=t}}}if(o)for(h=0,d=3,u=t*r;h<u;++h,d+=4)e[d]=o[h];else for(h=0,d=3,u=t*r;h<u;++h,d+=4)e[d]=255}undoPreblend(e,t,a){const r=this.smask?.matte;if(!r)return;const i=this.colorSpace.getRgb(r,0),n=i[0],s=i[1],o=i[2],c=t*a*4;for(let t=0;t<c;t+=4){const a=e[t+3];if(0===a){e[t]=255;e[t+1]=255;e[t+2]=25\
5;continue}const r=255/a;e[t]=(e[t]-n)*r+n;e[t+1]=(e[t+1]-s)*r+s;e[t+2]=(e[t+2]-o)*r+o}}async createImageData(e=!1,t=!1){const a=this.drawWidth,r=this.drawHeight,i={width:a,height:r,interpolate:this.interpolate,kind:0,data:null},n=this.numComps,s=this.width,o=this.height,c=this.bpc,l=s*n*c+7>>3,h=t&&ImageResizer.needsToBeResized(a,r);if(!this.smask&&!this.mask&&"DeviceRGBA"===this.colorSpace.name){i.kind=v;const e=i.data=await this.getImageBytes(o*s*4,{});return t?h?ImageResizer.createImage(i,!1\
):this.createBitmap(v,a,r,e):i}if(!e){let e;"DeviceGray"===this.colorSpace.name&&1===c?e=k:"DeviceRGB"!==this.colorSpace.name||8!==c||this.needsDecode||(e=C);if(e&&!this.smask&&!this.mask&&a===s&&r===o){const n=await this.#$(s,o);if(n)return n;const c=await this.getImageBytes(o*l,{});if(t)return h?ImageResizer.createImage({data:c,kind:e,width:a,height:r,interpolate:this.interpolate},this.needsDecode):this.createBitmap(e,s,o,c);i.kind=e;i.data=c;if(this.needsDecode){assert(e===k,"PDFImage.createI\
mageData: The image must be grayscale.");const t=i.data;for(let e=0,a=t.length;e<a;e++)t[e]^=255}return i}if(this.image instanceof JpegStream&&!this.smask&&!this.mask&&!this.needsDecode){let e=o*l;if(t&&!h){let t=!1;switch(this.colorSpace.name){case"DeviceGray":e*=4;t=!0;break;case"DeviceRGB":e=e/3*4;t=!0;break;case"DeviceCMYK":t=!0}if(t){const t=await this.#$(a,r);if(t)return t;const i=await this.getImageBytes(e,{drawWidth:a,drawHeight:r,forceRGBA:!0});return this.createBitmap(v,a,r,i)}}else sw\
itch(this.colorSpace.name){case"DeviceGray":e*=3;case"DeviceRGB":case"DeviceCMYK":i.kind=C;i.data=await this.getImageBytes(e,{drawWidth:a,drawHeight:r,forceRGB:!0});return h?ImageResizer.createImage(i):i}}}const u=await this.getImageBytes(o*l,{internal:!0}),d=0|u.length/l*r/o,f=this.getComponents(u);let g,p,m,b,y,w;if(t&&!h){m=new OffscreenCanvas(a,r);b=m.getContext("2d");y=b.createImageData(a,r);w=y.data}i.kind=v;if(e||this.smask||this.mask){t&&!h||(w=new Uint8ClampedArray(a*r*4));g=1;p=!0;awai\
t this.fillOpacity(w,a,r,d,f)}else{if(!t||h){i.kind=C;w=new Uint8ClampedArray(a*r*3);g=0}else{new Uint32Array(w.buffer).fill(FeatureTest.isLittleEndian?4278190080:255);g=1}p=!1}this.needsDecode&&this.decodeBuffer(f);this.colorSpace.fillRgb(w,s,o,a,r,d,c,f,g);p&&this.undoPreblend(w,a,d);if(t&&!h){b.putImageData(y,0,0);return{data:null,width:a,height:r,bitmap:m.transferToImageBitmap(),interpolate:this.interpolate}}i.data=w;return h?ImageResizer.createImage(i):i}async fillGrayBuffer(e){const t=this\
.numComps;if(1!==t)throw new FormatError(`Reading gray scale from a color image: ${t}`);const a=this.width,r=this.height,i=this.bpc,n=a*t*i+7>>3,s=await this.getImageBytes(r*n,{internal:!0}),o=this.getComponents(s);let c,l;if(1===i){l=a*r;if(this.needsDecode)for(c=0;c<l;++c)e[c]=o[c]-1&255;else for(c=0;c<l;++c)e[c]=255&-o[c];return}this.needsDecode&&this.decodeBuffer(o);l=a*r;const h=255/((1<<i)-1);for(c=0;c<l;++c)e[c]=h*o[c]}createBitmap(e,t,a,r){const i=new OffscreenCanvas(t,a),n=i.getContext(\
"2d");let s;if(e===v)s=new ImageData(r,t,a);else{s=n.createImageData(t,a);convertToRGBA({kind:e,src:r,dest:new Uint32Array(s.data.buffer),width:t,height:a,inverseDecode:this.needsDecode})}n.putImageData(s,0,0);return{data:null,width:t,height:a,bitmap:i.transferToImageBitmap(),interpolate:this.interpolate}}async#$(e,t){const a=await this.image.getTransferableImage();return a?{data:null,width:e,height:t,bitmap:a,interpolate:this.interpolate}:null}async getImageBytes(e,{drawWidth:t,drawHeight:a,for\
ceRGBA:r=!1,forceRGB:i=!1,internal:n=!1}){this.image.reset();this.image.drawWidth=t||this.width;this.image.drawHeight=a||this.height;this.image.forceRGBA=!!r;this.image.forceRGB=!!i;const s=await this.image.getImageData(e,this.jpxDecoderOptions);if(n||this.image instanceof DecodeStream)return s;assert(s instanceof Uint8Array,\'PDFImage.getImageBytes: Unsupported "imageBytes" type.\');return new Uint8Array(s)}}const Bn=Object.freeze({maxImageSize:-1,disableFontFace:!1,ignoreErrors:!1,isEvalSupporte\
d:!0,isOffscreenCanvasSupported:!1,isImageDecoderSupported:!1,canvasMaxAreaInBytes:-1,fontExtraProperties:!1,useSystemFonts:!0,useWasm:!0,useWorkerFetch:!0,cMapUrl:null,iccUrl:null,standardFontDataUrl:null,wasmUrl:null}),Rn=1,Nn=2,En=Promise.resolve();function normalizeBlendMode(e,t=!1){if(Array.isArray(e)){for(const t of e){const e=normalizeBlendMode(t,!0);if(e)return e}warn(`Unsupported blend mode Array: ${e}`);return"source-over"}if(!(e instanceof Name))return t?null:"source-over";switch(e.na\
me){case"Normal":case"Compatible":return"source-over";case"Multiply":return"multiply";case"Screen":return"screen";case"Overlay":return"overlay";case"Darken":return"darken";case"Lighten":return"lighten";case"ColorDodge":return"color-dodge";case"ColorBurn":return"color-burn";case"HardLight":return"hard-light";case"SoftLight":return"soft-light";case"Difference":return"difference";case"Exclusion":return"exclusion";case"Hue":return"hue";case"Saturation":return"saturation";case"Color":return"color";ca\
se"Luminosity":return"luminosity"}if(t)return null;warn(`Unsupported blend mode: ${e.name}`);return"source-over"}function addCachedImageOps(e,{objId:t,fn:a,args:r,optionalContent:i,hasMask:n}){t&&e.addDependency(t);e.addImageOps(a,r,i,n);a===Vt&&r[0]?.count>0&&r[0].count++}class TimeSlotManager{static TIME_SLOT_DURATION_MS=20;static CHECK_TIME_EVERY=100;constructor(){this.reset()}check(){if(++this.checked<TimeSlotManager.CHECK_TIME_EVERY)return!1;this.checked=0;return this.endTime<=Date.now()}re\
set(){this.endTime=Date.now()+TimeSlotManager.TIME_SLOT_DURATION_MS;this.checked=0}}class PartialEvaluator{constructor({xref:e,handler:t,pageIndex:a,idFactory:r,fontCache:i,builtInCMapCache:n,standardFontDataCache:s,globalColorSpaceCache:o,globalImageCache:c,systemFontCache:l,options:h=null}){this.xref=e;this.handler=t;this.pageIndex=a;this.idFactory=r;this.fontCache=i;this.builtInCMapCache=n;this.standardFontDataCache=s;this.globalColorSpaceCache=o;this.globalImageCache=c;this.systemFontCache=l\
;this.options=h||Bn;this.type3FontRefs=null;this._regionalImageCache=new RegionalImageCache;this._fetchBuiltInCMapBound=this.fetchBuiltInCMap.bind(this)}get _pdfFunctionFactory(){return shadow(this,"_pdfFunctionFactory",new PDFFunctionFactory({xref:this.xref,isEvalSupported:this.options.isEvalSupported}))}get parsingType3Font(){return!!this.type3FontRefs}clone(e=null){const t=Object.create(this);t.options=Object.assign(Object.create(null),this.options,e);return t}hasBlendModes(e,t){if(!(e instan\
ceof Dict))return!1;if(e.objId&&t.has(e.objId))return!1;const a=new RefSet(t);e.objId&&a.put(e.objId);const r=[e],i=this.xref;for(;r.length;){const e=r.shift(),t=e.get("ExtGState");if(t instanceof Dict)for(let e of t.getRawValues()){if(e instanceof Ref){if(a.has(e))continue;try{e=i.fetch(e)}catch(t){a.put(e);info(`hasBlendModes - ignoring ExtGState: "${t}".`);continue}}if(!(e instanceof Dict))continue;e.objId&&a.put(e.objId);const t=e.get("BM");if(t instanceof Name){if("Normal"!==t.name)return!0\
}else if(void 0!==t&&Array.isArray(t))for(const e of t)if(e instanceof Name&&"Normal"!==e.name)return!0}const n=e.get("XObject");if(n instanceof Dict)for(let e of n.getRawValues()){if(e instanceof Ref){if(a.has(e))continue;try{e=i.fetch(e)}catch(t){a.put(e);info(`hasBlendModes - ignoring XObject: "${t}".`);continue}}if(!(e instanceof BaseStream))continue;e.dict.objId&&a.put(e.dict.objId);const t=e.dict.get("Resources");if(t instanceof Dict&&(!t.objId||!a.has(t.objId))){r.push(t);t.objId&&a.put(t\
.objId)}}}for(const e of a)t.put(e);return!1}async fetchBuiltInCMap(e){const t=this.builtInCMapCache.get(e);if(t)return t;let a;a=this.options.useWorkerFetch?{cMapData:await fetchBinaryData(`${this.options.cMapUrl}${e}.bcmap`),isCompressed:!0}:await this.handler.sendWithPromise("FetchBinaryData",{type:"cMapReaderFactory",name:e});this.builtInCMapCache.set(e,a);return a}async fetchStandardFontData(e){const t=this.standardFontDataCache.get(e);if(t)return new Stream(t);if(this.options.useSystemFont\
s&&"Symbol"!==e&&"ZapfDingbats"!==e)return null;const a=Yr()[e];let r;try{r=this.options.useWorkerFetch?await fetchBinaryData(`${this.options.standardFontDataUrl}${a}`):await this.handler.sendWithPromise("FetchBinaryData",{type:"standardFontDataFactory",filename:a})}catch(e){warn(e);return null}this.standardFontDataCache.set(e,r);return new Stream(r)}async buildFormXObject(e,t,a,r,i,n,s,o){const{dict:c}=t,l=lookupMatrix(c.getArray("Matrix"),null),h=lookupNormalRect(c.getArray("BBox"),null);let u\
,d;c.has("OC")&&(u=await this.parseMarkedContentProps(c.get("OC"),e));void 0!==u&&r.addOp(jt,["OC",u]);const f=c.get("Group");if(f){d={matrix:l,bbox:h,smask:a,isolated:!1,knockout:!1};let t=null;if(isName(f.get("S"),"Transparency")){d.isolated=f.get("I")||!1;d.knockout=f.get("K")||!1;if(f.has("CS")){const a=this._getColorSpace(f.getRaw("CS"),e,s);t=a instanceof ColorSpace?a:await this._handleColorSpace(a)}}if(a?.backdrop){t||=ColorSpaceUtils.rgb;a.backdrop=t.getRgbHex(a.backdrop,0)}r.addOp(Wt,[d\
])}const g=[l&&new Float32Array(l),!f&&h&&new Float32Array(h)||null];r.addOp(qt,g);const p=c.get("Resources");await this.getOperatorList({stream:t,task:i,resources:p instanceof Dict?p:e,operatorList:r,initialState:n,prevRefs:o});r.addOp(Ht,[]);f&&r.addOp(zt,[d]);void 0!==u&&r.addOp(_t,[])}_sendImgData(e,t,a=!1){const r=t?[t.bitmap||t.data.buffer]:null;return this.parsingType3Font||a?this.handler.send("commonobj",[e,"Image",t],r):this.handler.send("obj",[e,this.pageIndex,"Image",t],r)}async build\
PaintImageXObject({resources:e,image:t,isInline:a=!1,operatorList:r,cacheKey:i,localImageCache:n,localColorSpaceCache:s}){const{maxImageSize:o,ignoreErrors:c,isOffscreenCanvasSupported:l}=this.options,{dict:h}=t,u=h.objId,d=h.get("W","Width"),f=h.get("H","Height");if(!d||"number"!=typeof d||!f||"number"!=typeof f){warn("Image dimensions are missing, or not numbers.");return}if(-1!==o&&d*f>o){const e="Image exceeded maximum allowed size and was removed.";if(!c)throw new Error(e);warn(e);return}le\
t g;h.has("OC")&&(g=await this.parseMarkedContentProps(h.get("OC"),e));let p,m,b;if(h.get("IM","ImageMask")||!1){p=await PDFImage.createMask({image:t,isOffscreenCanvasSupported:l&&!this.parsingType3Font});if(p.isSingleOpaquePixel){m=ta;b=[];r.addImageOps(m,b,g);if(i){const e={fn:m,args:b,optionalContent:g};n.set(i,u,e);u&&this._regionalImageCache.set(null,u,e)}return}if(this.parsingType3Font){b=function compileType3Glyph({data:e,width:t,height:a}){if(t>1e3||a>1e3)return null;const r=new Uint8Arr\
ay([0,2,4,0,1,0,5,4,8,10,0,8,0,2,1,0]),i=t+1,n=new Uint8Array(i*(a+1));let s,o,c;const l=t+7&-8,h=new Uint8Array(l*a);let u=0;for(const t of e){let e=128;for(;e>0;){h[u++]=t&e?0:255;e>>=1}}let d=0;u=0;if(0!==h[u]){n[0]=1;++d}for(o=1;o<t;o++){if(h[u]!==h[u+1]){n[o]=h[u]?2:1;++d}u++}if(0!==h[u]){n[o]=2;++d}for(s=1;s<a;s++){u=s*l;c=s*i;if(h[u-l]!==h[u]){n[c]=h[u]?1:8;++d}let e=(h[u]?4:0)+(h[u-l]?8:0);for(o=1;o<t;o++){e=(e>>2)+(h[u+1]?4:0)+(h[u-l+1]?8:0);if(r[e]){n[c+o]=r[e];++d}u++}if(h[u-l]!==h[u]\
){n[c+o]=h[u]?2:4;++d}if(d>1e3)return null}u=l*(a-1);c=s*i;if(0!==h[u]){n[c]=8;++d}for(o=1;o<t;o++){if(h[u]!==h[u+1]){n[c+o]=h[u]?4:8;++d}u++}if(0!==h[u]){n[c+o]=4;++d}if(d>1e3)return null;const f=new Int32Array([0,i,-1,0,-i,0,0,0,1]),g=[],{a:p,b:m,c:b,d:y,e:w,f:x}=(new DOMMatrix).scaleSelf(1/t,-1/a).translateSelf(0,-a);for(s=0;d&&s<=a;s++){let e=s*i;const a=e+t;for(;e<a&&!n[e];)e++;if(e===a)continue;let r=e%i,o=s;g.push(sa,p*r+b*o+w,m*r+y*o+x);const c=e;let l=n[e];do{const t=f[l];do{e+=t}while(\
!n[e]);const a=n[e];if(5!==a&&10!==a){l=a;n[e]=0}else{l=a&51*l>>4;n[e]&=l>>2|l<<2}r=e%i;o=e/i|0;g.push(oa,p*r+b*o+w,m*r+y*o+x);n[e]||--d}while(c!==e);--s}return[na,[new Float32Array(g)],new Float32Array([0,0,t,a])]}(p);if(b){r.addImageOps(aa,b,g);return}warn("Cannot compile Type3 glyph.");r.addImageOps(Vt,[p],g);return}const e=`mask_${this.idFactory.createObjId()}`;r.addDependency(e);p.dataLen=p.bitmap?p.width*p.height*4:p.data.length;this._sendImgData(e,p);m=Vt;b=[{data:e,width:p.width,height:p\
.height,interpolate:p.interpolate,count:1}];r.addImageOps(m,b,g);if(i){const t={objId:e,fn:m,args:b,optionalContent:g};n.set(i,u,t);u&&this._regionalImageCache.set(null,u,t)}return}const y=h.has("SMask")||h.has("Mask");if(a&&d+f<200&&!y){try{const i=new PDFImage({xref:this.xref,res:e,image:t,isInline:a,pdfFunctionFactory:this._pdfFunctionFactory,globalColorSpaceCache:this.globalColorSpaceCache,localColorSpaceCache:s});p=await i.createImageData(!0,!1);r.addImageOps(Yt,[p],g)}catch(e){const t=`Una\
ble to decode inline image: "${e}".`;if(!c)throw new Error(t);warn(t)}return}let w=`img_${this.idFactory.createObjId()}`,x=!1,S=null;if(this.parsingType3Font)w=`${this.idFactory.getDocId()}_type3_${w}`;else if(i&&u){x=this.globalImageCache.shouldCache(u,this.pageIndex);if(x){assert(!a,"Cannot cache an inline image globally.");w=`${this.idFactory.getDocId()}_${w}`}}r.addDependency(w);m=Jt;b=[w,d,f];r.addImageOps(m,b,g,y);if(x){S={objId:w,fn:m,args:b,optionalContent:g,hasMask:y,byteSize:0};if(this\
.globalImageCache.hasDecodeFailed(u)){this.globalImageCache.setData(u,S);this._sendImgData(w,null,x);return}if(d*f>25e4||y){const e=await this.handler.sendWithPromise("commonobj",[w,"CopyLocalImage",{imageRef:u}]);if(e){this.globalImageCache.setData(u,S);this.globalImageCache.addByteSize(u,e);return}}}PDFImage.buildImage({xref:this.xref,res:e,image:t,isInline:a,pdfFunctionFactory:this._pdfFunctionFactory,globalColorSpaceCache:this.globalColorSpaceCache,localColorSpaceCache:s}).then((async e=>{p=\
await e.createImageData(!1,l);p.dataLen=p.bitmap?p.width*p.height*4:p.data.length;p.ref=u;x&&this.globalImageCache.addByteSize(u,p.dataLen);return this._sendImgData(w,p,x)})).catch((e=>{warn(`Unable to decode image "${w}": "${e}".`);u&&this.globalImageCache.addDecodeFailed(u);return this._sendImgData(w,null,x)}));if(i){const e={objId:w,fn:m,args:b,optionalContent:g,hasMask:y};n.set(i,u,e);if(u){this._regionalImageCache.set(null,u,e);if(x){assert(S,"The global cache-data must be available.");this\
.globalImageCache.setData(u,S)}}}}handleSMask(e,t,a,r,i,n,s){const o=e.get("G"),c={subtype:e.get("S").name,backdrop:e.get("BC")},l=e.get("TR");if(isPDFFunction(l)){const e=this._pdfFunctionFactory.create(l),t=new Uint8Array(256),a=new Float32Array(1);for(let r=0;r<256;r++){a[0]=r/255;e(a,0,a,0);t[r]=255*a[0]|0}c.transferMap=t}return this.buildFormXObject(t,o,c,a,r,i.state.clone({newPath:!0}),n,s)}handleTransferFunction(e){let t;if(Array.isArray(e))t=e;else{if(!isPDFFunction(e))return null;t=[e]}\
const a=[];let r=0,i=0;for(const e of t){const t=this.xref.fetchIfRef(e);r++;if(isName(t,"Identity")){a.push(null);continue}if(!isPDFFunction(t))return null;const n=this._pdfFunctionFactory.create(t),s=new Uint8Array(256),o=new Float32Array(1);for(let e=0;e<256;e++){o[0]=e/255;n(o,0,o,0);s[e]=255*o[0]|0}a.push(s);i++}return 1!==r&&4!==r||0===i?null:a}handleTilingType(e,t,a,r,i,n,s,o){const c=new OperatorList,l=Dict.merge({xref:this.xref,dictArray:[i.get("Resources"),a]});return this.getOperatorL\
ist({stream:r,task:s,resources:l,operatorList:c}).then((function(){const a=c.getIR(),r=getTilingPatternIR(a,i,t);n.addDependencies(c.dependencies);n.addOp(e,r);i.objId&&o.set(null,i.objId,{operatorListIR:a,dict:i})})).catch((e=>{if(!(e instanceof AbortException)){if(!this.options.ignoreErrors)throw e;warn(`handleTilingType - ignoring pattern: "${e}".`)}}))}async handleSetFont(e,t,a,r,i,n,s=null,o=null){const c=t?.[0]instanceof Name?t[0].name:null,l=await this.loadFont(c,a,e,i,s,o);l.font.isType3\
Font&&r.addDependencies(l.type3Dependencies);n.font=l.font;l.send(this.handler);return l.loadedName}handleText(e,t){const a=t.font,r=a.charsToGlyphs(e);if(a.data){(!!(t.textRenderingMode&S)||"Pattern"===t.fillColorSpace.name||a.disableFontFace)&&PartialEvaluator.buildFontPaths(a,r,this.handler,this.options)}return r}ensureStateFont(e){if(e.font)return;const t=new FormatError("Missing setFont (Tf) operator before text rendering operator.");if(!this.options.ignoreErrors)throw t;warn(`ensureStateFo\
nt: "${t}".`)}async setGState({resources:e,gState:t,operatorList:a,cacheKey:r,task:i,stateManager:n,localGStateCache:s,localColorSpaceCache:o,seenRefs:c}){const l=t.objId;let h=!0;const u=[];let d=Promise.resolve();for(const[r,s]of t)switch(r){case"Type":break;case"LW":if("number"!=typeof s){warn(`Invalid LW (line width): ${s}`);break}u.push([r,Math.abs(s)]);break;case"LC":case"LJ":case"ML":case"D":case"RI":case"FL":case"CA":case"ca":u.push([r,s]);break;case"Font":h=!1;d=d.then((()=>this.handleS\
etFont(e,null,s[0],a,i,n.state).then((function(e){a.addDependency(e);u.push([r,[e,s[1]]])}))));break;case"BM":u.push([r,normalizeBlendMode(s)]);break;case"SMask":if(isName(s,"None")){u.push([r,!1]);break}if(s instanceof Dict){h=!1;d=d.then((()=>this.handleSMask(s,e,a,i,n,o,c)));u.push([r,!0])}else warn("Unsupported SMask type");break;case"TR":const t=this.handleTransferFunction(s);u.push([r,t]);break;case"OP":case"op":case"OPM":case"BG":case"BG2":case"UCR":case"UCR2":case"TR2":case"HT":case"SM":\
case"SA":case"AIS":case"TK":info("graphic state operator "+r);break;default:info("Unknown graphic state operator "+r)}await d;u.length>0&&a.addOp(De,[u]);h&&s.set(r,l,u)}loadFont(e,t,a,r,i=null,n=null){const errorFont=async()=>new TranslatedFont({loadedName:"g_font_error",font:new ErrorFont(`Font "${e}" is not available.`),dict:t});let s;if(t)t instanceof Ref&&(s=t);else{const t=a.get("Font");t&&(s=t.getRaw(e))}if(s){if(this.type3FontRefs?.has(s))return errorFont();if(this.fontCache.has(s))retur\
n this.fontCache.get(s);try{t=this.xref.fetchIfRef(s)}catch(e){warn(`loadFont - lookup failed: "${e}".`)}}if(!(t instanceof Dict)){if(!this.options.ignoreErrors&&!this.parsingType3Font){warn(`Font "${e}" is not available.`);return errorFont()}warn(`Font "${e}" is not available -- attempting to fallback to a default font.`);t=i||PartialEvaluator.fallbackFontDict}if(t.cacheKey&&this.fontCache.has(t.cacheKey))return this.fontCache.get(t.cacheKey);const{promise:o,resolve:c}=Promise.withResolvers();l\
et l;try{l=this.preEvaluateFont(t);l.cssFontInfo=n}catch(e){warn(`loadFont - preEvaluateFont failed: "${e}".`);return errorFont()}const{descriptor:h,hash:u}=l,d=s instanceof Ref;let f;if(u&&h instanceof Dict){const e=h.fontAliases||=Object.create(null);if(e[u]){const t=e[u].aliasRef;if(d&&t&&this.fontCache.has(t)){this.fontCache.putAlias(s,t);return this.fontCache.get(s)}}else e[u]={fontID:this.idFactory.createFontId()};d&&(e[u].aliasRef=s);f=e[u].fontID}else f=this.idFactory.createFontId();asse\
rt(f?.startsWith("f"),\'The "fontID" must be (correctly) defined.\');if(d)this.fontCache.put(s,o);else{t.cacheKey=`cacheKey_${f}`;this.fontCache.put(t.cacheKey,o)}t.loadedName=`${this.idFactory.getDocId()}_${f}`;this.translateFont(l).then((async e=>{const i=new TranslatedFont({loadedName:t.loadedName,font:e,dict:t});if(e.isType3Font)try{await i.loadType3Data(this,a,r)}catch(e){throw new Error(`Type3 font load error: ${e}`)}c(i)})).catch((e=>{warn(`loadFont - translateFont failed: "${e}".`);c(new T\
ranslatedFont({loadedName:t.loadedName,font:new ErrorFont(e?.message),dict:t}))}));return o}buildPath(e,t,a){const{pathMinMax:r,pathBuffer:i}=a;switch(0|e){case Xe:{const e=a.currentPointX=t[0],n=a.currentPointY=t[1],s=t[2],o=t[3],c=e+s,l=n+o;0===s||0===o?i.push(sa,e,n,oa,c,l,la):i.push(sa,e,n,oa,c,n,oa,c,l,oa,e,l,la);Util.rectBoundingBox(e,n,c,l,r);break}case Ee:{const e=a.currentPointX=t[0],n=a.currentPointY=t[1];i.push(sa,e,n);Util.pointBoundingBox(e,n,r);break}case Pe:{const e=a.currentPoint\
X=t[0],n=a.currentPointY=t[1];i.push(oa,e,n);Util.pointBoundingBox(e,n,r);break}case Le:{const e=a.currentPointX,n=a.currentPointY,[s,o,c,l,h,u]=t;a.currentPointX=h;a.currentPointY=u;i.push(ca,s,o,c,l,h,u);Util.bezierBoundingBox(e,n,s,o,c,l,h,u,r);break}case je:{const e=a.currentPointX,n=a.currentPointY,[s,o,c,l]=t;a.currentPointX=c;a.currentPointY=l;i.push(ca,e,n,s,o,c,l);Util.bezierBoundingBox(e,n,e,n,s,o,c,l,r);break}case _e:{const e=a.currentPointX,n=a.currentPointY,[s,o,c,l]=t;a.currentPoin\
tX=c;a.currentPointY=l;i.push(ca,s,o,c,l,c,l);Util.bezierBoundingBox(e,n,s,o,c,l,c,l,r);break}case Ue:i.push(la)}}_getColorSpace(e,t,a){return ColorSpaceUtils.parse({cs:e,xref:this.xref,resources:t,pdfFunctionFactory:this._pdfFunctionFactory,globalColorSpaceCache:this.globalColorSpaceCache,localColorSpaceCache:a,asyncIfNotCached:!0})}async _handleColorSpace(e){try{return await e}catch(e){if(e instanceof AbortException)return null;if(this.options.ignoreErrors){warn(`_handleColorSpace - ignoring C\
olorSpace: "${e}".`);return null}throw e}}parseShading({shading:e,resources:t,localColorSpaceCache:a,localShadingPatternCache:r}){let i,n=r.get(e);if(n)return n;try{i=Pattern.parseShading(e,this.xref,t,this._pdfFunctionFactory,this.globalColorSpaceCache,a).getIR()}catch(t){if(t instanceof AbortException)return null;if(this.options.ignoreErrors){warn(`parseShading - ignoring shading: "${t}".`);r.set(e,null);return null}throw t}n=`pattern_${this.idFactory.createObjId()}`;this.parsingType3Font&&(n=\
`${this.idFactory.getDocId()}_type3_${n}`);r.set(e,n);this.parsingType3Font?this.handler.send("commonobj",[n,"Pattern",i]):this.handler.send("obj",[n,this.pageIndex,"Pattern",i]);return n}handleColorN(e,t,a,r,i,n,s,o,c,l){const h=a.pop();if(h instanceof Name){const u=i.getRaw(h.name),d=u instanceof Ref&&c.getByRef(u);if(d)try{const i=r.base?r.base.getRgbHex(a,0):null,n=getTilingPatternIR(d.operatorListIR,d.dict,i);e.addOp(t,n);return}catch{}const f=this.xref.fetchIfRef(u);if(f){const i=f instanc\
eof BaseStream?f.dict:f,h=i.get("PatternType");if(h===Rn){const o=r.base?r.base.getRgbHex(a,0):null;return this.handleTilingType(t,o,n,f,i,e,s,c)}if(h===Nn){const a=i.get("Shading"),r=this.parseShading({shading:a,resources:n,localColorSpaceCache:o,localShadingPatternCache:l});if(r){const a=lookupMatrix(i.getArray("Matrix"),null);e.addOp(t,["Shading",r,a])}return}throw new FormatError(`Unknown PatternType: ${h}`)}}throw new FormatError(`Unknown PatternName: ${h}`)}_parseVisibilityExpression(e,t,a\
){if(++t>10){warn("Visibility expression is too deeply nested");return}const r=e.length,i=this.xref.fetchIfRef(e[0]);if(!(r<2)&&i instanceof Name){switch(i.name){case"And":case"Or":case"Not":a.push(i.name);break;default:warn(`Invalid operator ${i.name} in visibility expression`);return}for(let i=1;i<r;i++){const r=e[i],n=this.xref.fetchIfRef(r);if(Array.isArray(n)){const e=[];a.push(e);this._parseVisibilityExpression(n,t,e)}else r instanceof Ref&&a.push(r.toString())}}else warn("Invalid visibili\
ty expression")}async parseMarkedContentProps(e,t){let a;if(e instanceof Name){a=t.get("Properties").get(e.name)}else{if(!(e instanceof Dict))throw new FormatError("Optional content properties malformed.");a=e}const r=a.get("Type")?.name;if("OCG"===r)return{type:r,id:a.objId};if("OCMD"===r){const e=a.get("VE");if(Array.isArray(e)){const t=[];this._parseVisibilityExpression(e,0,t);if(t.length>0)return{type:"OCMD",expression:t}}const t=a.get("OCGs");if(Array.isArray(t)||t instanceof Dict){const e=\
[];if(Array.isArray(t))for(const a of t)e.push(a.toString());else e.push(t.objId);return{type:r,ids:e,policy:a.get("P")instanceof Name?a.get("P").name:null,expression:null}}if(t instanceof Ref)return{type:r,id:t.toString()}}return null}getOperatorList({stream:e,task:t,resources:a,operatorList:r,initialState:i=null,fallbackFontDict:n=null,prevRefs:s=null}){const o=e.dict?.objId,c=new RefSet(s);if(o){if(s?.has(o))throw new Error(`getOperatorList - ignoring circular reference: ${o}`);c.put(o)}a||=D\
ict.empty;i||=new EvalState;if(!r)throw new Error(\'getOperatorList: missing "operatorList" parameter\');const l=this,h=this.xref,u=new LocalImageCache,d=new LocalColorSpaceCache,f=new LocalGStateCache,g=new LocalTilingPatternCache,p=new Map,m=a.get("XObject")||Dict.empty,b=a.get("Pattern")||Dict.empty,y=new StateManager(i),w=new EvaluatorPreprocessor(e,h,y),x=new TimeSlotManager;function closePendingRestoreOPS(e){for(let e=0,t=w.savedStatesDepth;e<t;e++)r.addOp(Re,[])}return new Promise((function\
 promiseBody(e,i){const next=function(t){Promise.all([t,r.ready]).then((function(){try{promiseBody(e,i)}catch(e){i(e)}}),i)};t.ensureNotTerminated();x.reset();const s={};let o,S,k,C,v,F;for(;!(o=x.check());){s.args=null;if(!w.read(s))break;let e=s.args,i=s.fn;switch(0|i){case Nt:F=e[0]instanceof Name;v=e[0].name;if(F){const t=u.getByName(v);if(t){addCachedImageOps(r,t);e=null;continue}}next(new Promise((function(e,i){if(!F)throw new FormatError("XObject must be referred to by name.");let n=m.get\
Raw(v);if(n instanceof Ref){const t=u.getByRef(n)||l._regionalImageCache.getByRef(n)||l.globalImageCache.getData(n,l.pageIndex);if(t){addCachedImageOps(r,t);e();return}n=h.fetch(n)}if(!(n instanceof BaseStream))throw new FormatError("XObject should be a stream");const s=n.dict.get("Subtype");if(!(s instanceof Name))throw new FormatError("XObject should have a Name subtype");if("Form"!==s.name)if("Image"!==s.name){if("PS"!==s.name)throw new FormatError(`Unhandled XObject subtype ${s.name}`);info(\
"Ignored XObject subtype PS");e()}else l.buildPaintImageXObject({resources:a,image:n,operatorList:r,cacheKey:v,localImageCache:u,localColorSpaceCache:d}).then(e,i);else{y.save();l.buildFormXObject(a,n,null,r,t,y.state.clone({newPath:!0}),d,c).then((function(){y.restore();e()}),i)}})).catch((function(e){if(!(e instanceof AbortException)){if(!l.options.ignoreErrors)throw e;warn(`getOperatorList - ignoring XObject: "${e}".`)}})));return;case nt:const s=e[1];next(l.handleSetFont(a,e,null,r,t,y.state\
,n).then((function(e){r.addDependency(e);r.addOp(nt,[e,s])})));return;case Rt:const o=e[0].cacheKey;if(o){const t=u.getByName(o);if(t){addCachedImageOps(r,t);e=null;continue}}next(l.buildPaintImageXObject({resources:a,image:e[0],isInline:!0,operatorList:r,cacheKey:o,localImageCache:u,localColorSpaceCache:d}));return;case dt:if(!y.state.font){l.ensureStateFont(y.state);continue}e[0]=l.handleText(e[0],y.state);break;case ft:if(!y.state.font){l.ensureStateFont(y.state);continue}const w=[],x=y.state\
;for(const t of e[0])"string"==typeof t?w.push(...l.handleText(t,x)):"number"==typeof t&&w.push(t);e[0]=w;i=dt;break;case gt:if(!y.state.font){l.ensureStateFont(y.state);continue}r.addOp(ut);e[0]=l.handleText(e[0],y.state);i=dt;break;case pt:if(!y.state.font){l.ensureStateFont(y.state);continue}r.addOp(ut);r.addOp(at,[e.shift()]);r.addOp(tt,[e.shift()]);e[0]=l.handleText(e[0],y.state);i=dt;break;case st:y.state.textRenderingMode=e[0];break;case wt:{const t=l._getColorSpace(e[0],a,d);if(t instanc\
eof ColorSpace){y.state.fillColorSpace=t;continue}next(l._handleColorSpace(t).then((e=>{y.state.fillColorSpace=e||ColorSpaceUtils.gray})));return}case yt:{const t=l._getColorSpace(e[0],a,d);if(t instanceof ColorSpace){y.state.strokeColorSpace=t;continue}next(l._handleColorSpace(t).then((e=>{y.state.strokeColorSpace=e||ColorSpaceUtils.gray})));return}case At:C=y.state.fillColorSpace;e=[C.getRgbHex(e,0)];i=It;break;case xt:C=y.state.strokeColorSpace;e=[C.getRgbHex(e,0)];i=Ft;break;case vt:y.state.\
fillColorSpace=ColorSpaceUtils.gray;e=[ColorSpaceUtils.gray.getRgbHex(e,0)];i=It;break;case Ct:y.state.strokeColorSpace=ColorSpaceUtils.gray;e=[ColorSpaceUtils.gray.getRgbHex(e,0)];i=Ft;break;case Ot:y.state.fillColorSpace=ColorSpaceUtils.cmyk;e=[ColorSpaceUtils.cmyk.getRgbHex(e,0)];i=It;break;case Tt:y.state.strokeColorSpace=ColorSpaceUtils.cmyk;e=[ColorSpaceUtils.cmyk.getRgbHex(e,0)];i=Ft;break;case It:y.state.fillColorSpace=ColorSpaceUtils.rgb;e=[ColorSpaceUtils.rgb.getRgbHex(e,0)];break;case\
 Ft:y.state.strokeColorSpace=ColorSpaceUtils.rgb;e=[ColorSpaceUtils.rgb.getRgbHex(e,0)];break;case kt:C=y.state.patternFillColorSpace;if(!C){if(isNumberArray(e,null)){e=[ColorSpaceUtils.gray.getRgbHex(e,0)];i=It;break}e=[];i=ia;break}if("Pattern"===C.name){next(l.handleColorN(r,kt,e,C,b,a,t,d,g,p));return}e=[C.getRgbHex(e,0)];i=It;break;case St:C=y.state.patternStrokeColorSpace;if(!C){if(isNumberArray(e,null)){e=[ColorSpaceUtils.gray.getRgbHex(e,0)];i=Ft;break}e=[];i=ra;break}if("Pattern"===C.na\
me){next(l.handleColorN(r,St,e,C,b,a,t,d,g,p));return}e=[C.getRgbHex(e,0)];i=Ft;break;case Mt:let T;try{const t=a.get("Shading");if(!t)throw new FormatError("No shading resource found");T=t.get(e[0].name);if(!T)throw new FormatError("No shading object found")}catch(e){if(e instanceof AbortException)continue;if(l.options.ignoreErrors){warn(`getOperatorList - ignoring Shading: "${e}".`);continue}throw e}const O=l.parseShading({shading:T,resources:a,localColorSpaceCache:d,localShadingPatternCache:p\
});if(!O)continue;e=[O];i=Mt;break;case De:F=e[0]instanceof Name;v=e[0].name;if(F){const t=f.getByName(v);if(t){t.length>0&&r.addOp(De,[t]);e=null;continue}}next(new Promise((function(e,i){if(!F)throw new FormatError("GState must be referred to by name.");const n=a.get("ExtGState");if(!(n instanceof Dict))throw new FormatError("ExtGState should be a dictionary.");const s=n.get(v);if(!(s instanceof Dict))throw new FormatError("GState should be a dictionary.");l.setGState({resources:a,gState:s,ope\
ratorList:r,cacheKey:v,task:t,stateManager:y,localGStateCache:f,localColorSpaceCache:d,seenRefs:c}).then(e,i)})).catch((function(e){if(!(e instanceof AbortException)){if(!l.options.ignoreErrors)throw e;warn(`getOperatorList - ignoring ExtGState: "${e}".`)}})));return;case Ce:{const[t]=e;if("number"!=typeof t){warn(`Invalid setLineWidth: ${t}`);continue}e[0]=Math.abs(t);break}case Ee:case Pe:case Le:case je:case _e:case Ue:case Xe:l.buildPath(i,e,y.state);continue;case qe:case He:case We:case ze:\
case $e:case Ge:case Ve:case Ke:case Je:{const{state:{pathBuffer:e,pathMinMax:t}}=y;i!==He&&i!==Ve&&i!==Ke||e.push(la);if(0===e.length)r.addOp(aa,[i,[null],null]);else{r.addOp(aa,[i,[new Float32Array(e)],t.slice()]);e.length=0;t.set([1/0,1/0,-1/0,-1/0],0)}continue}case ht:r.addOp(i,[new Float32Array(e)]);continue;case Et:case Pt:case Ut:case Xt:continue;case jt:if(!(e[0]instanceof Name)){warn(`Expected name for beginMarkedContentProps arg0=${e[0]}`);r.addOp(jt,["OC",null]);continue}if("OC"===e[0\
].name){next(l.parseMarkedContentProps(e[1],a).then((e=>{r.addOp(jt,["OC",e])})).catch((e=>{if(!(e instanceof AbortException)){if(!l.options.ignoreErrors)throw e;warn(`getOperatorList - ignoring beginMarkedContentProps: "${e}".`);r.addOp(jt,["OC",null])}})));return}e=[e[0].name,e[1]instanceof Dict?e[1].get("MCID"):null];break;default:if(null!==e){for(S=0,k=e.length;S<k&&!(e[S]instanceof Dict);S++);if(S<k){warn("getOperatorList - ignoring operator: "+i);continue}}}r.addOp(i,e)}if(o)next(En);else{\
closePendingRestoreOPS();e()}})).catch((e=>{if(!(e instanceof AbortException)){if(!this.options.ignoreErrors)throw e;warn(`getOperatorList - ignoring errors during "${t.name}" task: "${e}".`);closePendingRestoreOPS()}}))}getTextContent({stream:e,task:a,resources:r,stateManager:i=null,includeMarkedContent:n=!1,sink:s,seenStyles:o=new Set,viewBox:c,lang:l=null,markedContentData:h=null,disableNormalization:u=!1,keepWhiteSpace:d=!1,prevRefs:f=null,intersector:g=null}){const p=e.dict?.objId,m=new Ref\
Set(f);if(p){if(f?.has(p))throw new Error(`getTextContent - ignoring circular reference: ${p}`);m.put(p)}r||=Dict.empty;i||=new StateManager(new TextState);n&&(h||={level:0});const b={items:[],styles:Object.create(null),lang:l},y={initialized:!1,str:[],totalWidth:0,totalHeight:0,width:0,height:0,vertical:!1,prevTransform:null,textAdvanceScale:0,spaceInFlowMin:0,spaceInFlowMax:0,trackingSpaceMin:1/0,negativeSpaceMax:-1/0,notASpace:-1/0,transform:null,fontName:null,hasEOL:!1},w=[" "," "];let x=0;f\
unction saveLastChar(e){const t=(x+1)%2,a=" "!==w[x]&&" "===w[t];w[x]=e;x=t;return!d&&a}function shouldAddWhitepsace(){return!d&&" "!==w[x]&&" "===w[(x+1)%2]}function resetLastChars(){w[0]=w[1]=" ";x=0}const S=this,k=this.xref,C=[];let v=null;const F=new LocalImageCache,T=new LocalGStateCache,O=new EvaluatorPreprocessor(e,k,i);let M;function pushWhitespace({width:e=0,height:t=0,transform:a=y.prevTransform,fontName:r=y.fontName}){g?.addExtraChar(" ");b.items.push({str:" ",dir:"ltr",width:e,height\
:t,transform:a,fontName:r,hasEOL:!1})}function getCurrentTextTransform(){const e=M.font,a=[M.fontSize*M.textHScale,0,0,M.fontSize,0,M.textRise];if(e.isType3Font&&(M.fontSize<=1||e.isCharBBox)&&!isArrayEqual(M.fontMatrix,t)){const t=e.bbox[3]-e.bbox[1];t>0&&(a[3]*=t*M.fontMatrix[3])}return Util.transform(M.ctm,Util.transform(M.textMatrix,a))}function ensureTextContentItem(){if(y.initialized)return y;const{font:e,loadedName:t}=M;if(!o.has(t)){o.add(t);b.styles[t]={fontFamily:e.fallbackName,ascent:\
e.ascent,descent:e.descent,vertical:e.vertical};if(S.options.fontExtraProperties&&e.systemFontInfo){const a=b.styles[t];a.fontSubstitution=e.systemFontInfo.css;a.fontSubstitutionLoadedName=e.systemFontInfo.loadedName}}y.fontName=t;const a=y.transform=getCurrentTextTransform();if(e.vertical){y.width=y.totalWidth=Math.hypot(a[0],a[1]);y.height=y.totalHeight=0;y.vertical=!0}else{y.width=y.totalWidth=0;y.height=y.totalHeight=Math.hypot(a[2],a[3]);y.vertical=!1}const r=Math.hypot(M.textLineMatrix[0],\
M.textLineMatrix[1]),i=Math.hypot(M.ctm[0],M.ctm[1]);y.textAdvanceScale=i*r;const{fontSize:n}=M;y.trackingSpaceMin=.102*n;y.notASpace=.03*n;y.negativeSpaceMax=-.2*n;y.spaceInFlowMin=.102*n;y.spaceInFlowMax=.6*n;y.hasEOL=!1;y.initialized=!0;return y}function updateAdvanceScale(){if(!y.initialized)return;const e=Math.hypot(M.textLineMatrix[0],M.textLineMatrix[1]),t=Math.hypot(M.ctm[0],M.ctm[1])*e;if(t!==y.textAdvanceScale){if(y.vertical){y.totalHeight+=y.height*y.textAdvanceScale;y.height=0}else{y\
.totalWidth+=y.width*y.textAdvanceScale;y.width=0}y.textAdvanceScale=t}}function runBidiTransform(e){let t=e.str.join("");u||(t=function normalizeUnicode(e){if(!ma){ma=/([\\u00a0\\u00b5\\u037e\\u0eb3\\u2000-\\u200a\\u202f\\u2126\\ufb00-\\ufb04\\ufb06\\ufb20-\\ufb36\\ufb38-\\ufb3c\\ufb3e\\ufb40-\\ufb41\\ufb43-\\ufb44\\ufb46-\\ufba1\\ufba4-\\ufba9\\ufbae-\\ufbb1\\ufbd3-\\ufbdc\\ufbde-\\ufbe7\\ufbea-\\ufbf8\\ufbfc-\\ufbfd\\ufc00-\\ufc5d\\ufc64-\\ufcf1\\ufcf5-\\ufd3d\\ufd88\\ufdf4\\ufdfa-\\ufdfb\\ufe71\\ufe77\\ufe79\\ufe7b\\ufe7d]+)|(\\ufb05+)/gu;b\
a=new Map([["ﬅ","ſt"]])}return e.replaceAll(ma,((e,t,a)=>t?t.normalize("NFKC"):ba.get(a)))}(t));const a=bidi(t,-1,e.vertical);return{str:a.str,dir:a.dir,width:Math.abs(e.totalWidth),height:Math.abs(e.totalHeight),transform:e.transform,fontName:e.fontName,hasEOL:e.hasEOL}}async function handleSetFont(e,i){const n=await S.loadFont(e,i,r,a);M.loadedName=n.loadedName;M.font=n.font;M.fontMatrix=n.font.fontMatrix||t}function applyInverseRotation(e,t,a){const r=Math.hypot(a[0],a[1]);return[(a[0]*e+a[1]\
*t)/r,(a[2]*e+a[3]*t)/r]}function compareWithLastPosition(e){const t=getCurrentTextTransform();let a=t[4],r=t[5];if(M.font?.vertical){if(a<c[0]||a>c[2]||r+e<c[1]||r>c[3])return!1}else if(a+e<c[0]||a>c[2]||r<c[1]||r>c[3])return!1;if(!M.font||!y.prevTransform)return!0;let i=y.prevTransform[4],n=y.prevTransform[5];if(i===a&&n===r)return!0;let s=-1;t[0]&&0===t[1]&&0===t[2]?s=t[0]>0?0:180:t[1]&&0===t[0]&&0===t[3]&&(s=t[1]>0?90:270);switch(s){case 0:break;case 90:[a,r]=[r,a];[i,n]=[n,i];break;case 180\
:[a,r,i,n]=[-a,-r,-i,-n];break;case 270:[a,r]=[-r,-a];[i,n]=[-n,-i];break;default:[a,r]=applyInverseRotation(a,r,t);[i,n]=applyInverseRotation(i,n,y.prevTransform)}if(M.font.vertical){const e=(n-r)/y.textAdvanceScale,t=a-i,s=Math.sign(y.height);if(e<s*y.negativeSpaceMax){if(Math.abs(t)>.5*y.width){appendEOL();return!0}resetLastChars();flushTextContentItem();return!0}if(Math.abs(t)>y.width){appendEOL();return!0}e<=s*y.notASpace&&resetLastChars();if(e<=s*y.trackingSpaceMin)if(shouldAddWhitepsace()\
){resetLastChars();flushTextContentItem();pushWhitespace({height:Math.abs(e)})}else y.height+=e;else if(!addFakeSpaces(e,y.prevTransform,s))if(0===y.str.length){resetLastChars();pushWhitespace({height:Math.abs(e)})}else y.height+=e;Math.abs(t)>.25*y.width&&flushTextContentItem();return!0}const o=(a-i)/y.textAdvanceScale,l=r-n,h=Math.sign(y.width);if(o<h*y.negativeSpaceMax){if(Math.abs(l)>.5*y.height){appendEOL();return!0}resetLastChars();flushTextContentItem();return!0}if(Math.abs(l)>y.height){a\
ppendEOL();return!0}o<=h*y.notASpace&&resetLastChars();if(o<=h*y.trackingSpaceMin)if(shouldAddWhitepsace()){resetLastChars();flushTextContentItem();pushWhitespace({width:Math.abs(o)})}else y.width+=o;else if(!addFakeSpaces(o,y.prevTransform,h))if(0===y.str.length){resetLastChars();pushWhitespace({width:Math.abs(o)})}else y.width+=o;Math.abs(l)>.25*y.height&&flushTextContentItem();return!0}function buildTextContentItem({chars:e,extraSpacing:t}){const a=M.font;if(!e){const e=M.charSpacing+t;e&&(a.\
vertical?M.translateTextMatrix(0,-e):M.translateTextMatrix(e*M.textHScale,0));d&&compareWithLastPosition(0);return}const r=a.charsToGlyphs(e),i=M.fontMatrix[0]*M.fontSize;for(let e=0,n=r.length;e<n;e++){const s=r[e],{category:o}=s;if(o.isInvisibleFormatMark)continue;let c=M.charSpacing+(e+1===n?t:0),l=s.width;a.vertical&&(l=s.vmetric?s.vmetric[0]:-l);let h=l*i;if(!d&&o.isWhitespace){if(a.vertical){c+=-h+M.wordSpacing;M.translateTextMatrix(0,-c)}else{c+=h+M.wordSpacing;M.translateTextMatrix(c*M.t\
extHScale,0)}saveLastChar(" ");continue}if(!o.isZeroWidthDiacritic&&!compareWithLastPosition(h)){a.vertical?M.translateTextMatrix(0,h):M.translateTextMatrix(h*M.textHScale,0);continue}const u=ensureTextContentItem();o.isZeroWidthDiacritic&&(h=0);if(a.vertical){g?.addGlyph(getCurrentTextTransform(),0,h,s.unicode);M.translateTextMatrix(0,h);h=Math.abs(h);u.height+=h}else{h*=M.textHScale;g?.addGlyph(getCurrentTextTransform(),h,0,s.unicode);M.translateTextMatrix(h,0);u.width+=h}h&&(u.prevTransform=g\
etCurrentTextTransform());const f=s.unicode;if(saveLastChar(f)){u.str.push(" ");g?.addExtraChar(" ")}g||u.str.push(f);c&&(a.vertical?M.translateTextMatrix(0,-c):M.translateTextMatrix(c*M.textHScale,0))}}function appendEOL(){g?.addExtraChar("\\n");resetLastChars();if(y.initialized){y.hasEOL=!0;flushTextContentItem()}else b.items.push({str:"",dir:"ltr",width:0,height:0,transform:getCurrentTextTransform(),fontName:M.loadedName,hasEOL:!0})}function addFakeSpaces(e,t,a){if(a*y.spaceInFlowMin<=e&&e<=a*\
y.spaceInFlowMax){if(y.initialized){resetLastChars();y.str.push(" ");g?.addExtraChar(" ")}return!1}const r=y.fontName;let i=0;if(y.vertical){i=e;e=0}flushTextContentItem();resetLastChars();pushWhitespace({width:Math.abs(e),height:Math.abs(i),transform:t||getCurrentTextTransform(),fontName:r});return!0}function flushTextContentItem(){if(y.initialized&&y.str){y.vertical?y.totalHeight+=y.height*y.textAdvanceScale:y.totalWidth+=y.width*y.textAdvanceScale;b.items.push(runBidiTransform(y));y.initializ\
ed=!1;y.str.length=0}}function enqueueChunk(e=!1){const t=b.items.length;if(0!==t&&!(e&&t<10)){s?.enqueue(b,t);b.items=[];b.styles=Object.create(null)}}const D=new TimeSlotManager;return new Promise((function promiseBody(e,t){const next=function(a){enqueueChunk(!0);Promise.all([a,s?.ready]).then((function(){try{promiseBody(e,t)}catch(e){t(e)}}),t)};a.ensureNotTerminated();D.reset();const f={};let g,p,y,w=[];for(;!(g=D.check());){w.length=0;f.args=w;if(!O.read(f))break;const e=M;M=i.state;const t\
=f.fn;w=f.args;switch(0|t){case nt:const t=w[0].name,f=w[1];if(M.font&&t===M.fontName&&f===M.fontSize)break;flushTextContentItem();M.fontName=t;M.fontSize=f;next(handleSetFont(t,null));return;case ot:M.textRise=w[0];break;case rt:M.textHScale=w[0]/100;break;case it:M.leading=w[0];break;case ct:M.translateTextLineMatrix(w[0],w[1]);M.textMatrix=M.textLineMatrix.slice();break;case lt:M.leading=-w[1];M.translateTextLineMatrix(w[0],w[1]);M.textMatrix=M.textLineMatrix.slice();break;case ut:M.carriageR\
eturn();break;case ht:M.setTextMatrix(w[0],w[1],w[2],w[3],w[4],w[5]);M.setTextLineMatrix(w[0],w[1],w[2],w[3],w[4],w[5]);updateAdvanceScale();break;case tt:M.charSpacing=w[0];break;case at:M.wordSpacing=w[0];break;case Qe:M.textMatrix=Fa.slice();M.textLineMatrix=Fa.slice();break;case ft:if(!i.state.font){S.ensureStateFont(i.state);continue}const g=(M.font.vertical?1:-1)*M.fontSize/1e3,x=w[0];for(let e=0,t=x.length;e<t;e++){const t=x[e];if("string"==typeof t)C.push(t);else if("number"==typeof t&&0\
!==t){const e=C.join("");C.length=0;buildTextContentItem({chars:e,extraSpacing:t*g})}}if(C.length>0){const e=C.join("");C.length=0;buildTextContentItem({chars:e,extraSpacing:0})}break;case dt:if(!i.state.font){S.ensureStateFont(i.state);continue}buildTextContentItem({chars:w[0],extraSpacing:0});break;case gt:if(!i.state.font){S.ensureStateFont(i.state);continue}M.carriageReturn();buildTextContentItem({chars:w[0],extraSpacing:0});break;case pt:if(!i.state.font){S.ensureStateFont(i.state);continue\
}M.wordSpacing=w[0];M.charSpacing=w[1];M.carriageReturn();buildTextContentItem({chars:w[2],extraSpacing:0});break;case Nt:flushTextContentItem();v??=r.get("XObject")||Dict.empty;y=w[0]instanceof Name;p=w[0].name;if(y&&F.getByName(p))break;next(new Promise((function(e,t){if(!y)throw new FormatError("XObject must be referred to by name.");let f=v.getRaw(p);if(f instanceof Ref){if(F.getByRef(f)){e();return}if(S.globalImageCache.getData(f,S.pageIndex)){e();return}f=k.fetch(f)}if(!(f instanceof BaseS\
tream))throw new FormatError("XObject should be a stream");const{dict:g}=f,b=g.get("Subtype");if(!(b instanceof Name))throw new FormatError("XObject should have a Name subtype");if("Form"!==b.name){F.set(p,g.objId,!0);e();return}const w=i.state.clone(),x=new StateManager(w),C=lookupMatrix(g.getArray("Matrix"),null);C&&x.transform(C);const T=g.get("Resources");enqueueChunk();const O={enqueueInvoked:!1,enqueue(e,t){this.enqueueInvoked=!0;s.enqueue(e,t)},get desiredSize(){return s.desiredSize??0},g\
et ready(){return s.ready}};S.getTextContent({stream:f,task:a,resources:T instanceof Dict?T:r,stateManager:x,includeMarkedContent:n,sink:s&&O,seenStyles:o,viewBox:c,lang:l,markedContentData:h,disableNormalization:u,keepWhiteSpace:d,prevRefs:m}).then((function(){O.enqueueInvoked||F.set(p,g.objId,!0);e()}),t)})).catch((function(e){if(!(e instanceof AbortException)){if(!S.options.ignoreErrors)throw e;warn(`getTextContent - ignoring XObject: "${e}".`)}})));return;case De:y=w[0]instanceof Name;p=w[0]\
.name;if(y&&T.getByName(p))break;next(new Promise((function(e,t){if(!y)throw new FormatError("GState must be referred to by name.");const a=r.get("ExtGState");if(!(a instanceof Dict))throw new FormatError("ExtGState should be a dictionary.");const i=a.get(p);if(!(i instanceof Dict))throw new FormatError("GState should be a dictionary.");const n=i.get("Font");if(n){flushTextContentItem();M.fontName=null;M.fontSize=n[1];handleSetFont(null,n[0]).then(e,t)}else{T.set(p,i.objId,!0);e()}})).catch((fun\
ction(e){if(!(e instanceof AbortException)){if(!S.options.ignoreErrors)throw e;warn(`getTextContent - ignoring ExtGState: "${e}".`)}})));return;case Lt:flushTextContentItem();if(n){h.level++;b.items.push({type:"beginMarkedContent",tag:w[0]instanceof Name?w[0].name:null})}break;case jt:flushTextContentItem();if(n){h.level++;let e=null;w[1]instanceof Dict&&(e=w[1].get("MCID"));b.items.push({type:"beginMarkedContentProps",id:Number.isInteger(e)?`${S.idFactory.getPageObjId()}_mc${e}`:null,tag:w[0]in\
stanceof Name?w[0].name:null})}break;case _t:flushTextContentItem();if(n){if(0===h.level)break;h.level--;b.items.push({type:"endMarkedContent"})}break;case Re:!e||e.font===M.font&&e.fontSize===M.fontSize&&e.fontName===M.fontName||flushTextContentItem()}if(b.items.length>=(s?.desiredSize??1)){g=!0;break}}if(g)next(En);else{flushTextContentItem();enqueueChunk();e()}})).catch((e=>{if(!(e instanceof AbortException)){if(!this.options.ignoreErrors)throw e;warn(`getTextContent - ignoring errors during \
"${a.name}" task: "${e}".`);flushTextContentItem();enqueueChunk()}}))}async extractDataStructures(e,t){const a=this.xref;let r;const i=this.readToUnicode(t.toUnicode);if(t.composite){const a=e.get("CIDSystemInfo");a instanceof Dict&&(t.cidSystemInfo={registry:stringToPDFString(a.get("Registry")),ordering:stringToPDFString(a.get("Ordering")),supplement:a.get("Supplement")});try{const t=e.get("CIDToGIDMap");t instanceof BaseStream&&(r=t.getBytes())}catch(e){if(!this.options.ignoreErrors)throw e;wa\
rn(`extractDataStructures - ignoring CIDToGIDMap data: "${e}".`)}}const n=[];let s,o=null;if(e.has("Encoding")){s=e.get("Encoding");if(s instanceof Dict){o=s.get("BaseEncoding");o=o instanceof Name?o.name:null;if(s.has("Differences")){const e=s.get("Differences");let t=0;for(const r of e){const e=a.fetchIfRef(r);if("number"==typeof e)t=e;else{if(!(e instanceof Name))throw new FormatError(`Invalid entry in \'Differences\' array: ${e}`);n[t++]=e.name}}}}else if(s instanceof Name)o=s.name;else{const \
e="Encoding is not a Name nor a Dict";if(!this.options.ignoreErrors)throw new FormatError(e);warn(e)}"MacRomanEncoding"!==o&&"MacExpertEncoding"!==o&&"WinAnsiEncoding"!==o&&(o=null)}const c=!t.file||t.isInternalFont,l=ei()[t.name];o&&c&&l&&(o=null);if(o)t.defaultEncoding=getEncoding(o);else{const e=!!(t.flags&Pr),a=!!(t.flags&Lr);s=Ar;"TrueType"!==t.type||a||(s=kr);if(e||l){s=Sr;c&&(/Symbol/i.test(t.name)?s=Cr:/Dingbats/i.test(t.name)?s=vr:/Wingdings/i.test(t.name)&&(s=kr))}t.defaultEncoding=s}t\
.differences=n;t.baseEncodingName=o;t.hasEncoding=!!o||n.length>0;t.dict=e;t.toUnicode=await i;const h=await this.buildToUnicode(t);t.toUnicode=h;r&&(t.cidToGidMap=this.readCidToGidMap(r,h));return t}_simpleFontToUnicode(e,t=!1){assert(!e.composite,"Must be a simple font.");const a=[],r=e.defaultEncoding.slice(),i=e.baseEncodingName,n=e.differences;for(const e in n){const t=n[e];".notdef"!==t&&(r[e]=t)}const s=Fr();for(const n in r){let o=r[n];if(""===o)continue;let c=s[o];if(void 0!==c){a[n]=St\
ring.fromCharCode(c);continue}let l=0;switch(o[0]){case"G":3===o.length&&(l=parseInt(o.substring(1),16));break;case"g":5===o.length&&(l=parseInt(o.substring(1),16));break;case"C":case"c":if(o.length>=3&&o.length<=4){const a=o.substring(1);if(t){l=parseInt(a,16);break}l=+a;if(Number.isNaN(l)&&Number.isInteger(parseInt(a,16)))return this._simpleFontToUnicode(e,!0)}break;case"u":c=getUnicodeForGlyph(o,s);-1!==c&&(l=c);break;default:switch(o){case"f_h":case"f_t":case"T_h":a[n]=o.replaceAll("_","");c\
ontinue}}if(l>0&&l<=1114111&&Number.isInteger(l)){if(i&&l===+n){const e=getEncoding(i);if(e&&(o=e[n])){a[n]=String.fromCharCode(s[o]);continue}}a[n]=String.fromCodePoint(l)}}return a}async buildToUnicode(e){e.hasIncludedToUnicodeMap=e.toUnicode?.length>0;if(e.hasIncludedToUnicodeMap){!e.composite&&e.hasEncoding&&(e.fallbackToUnicode=this._simpleFontToUnicode(e));return e.toUnicode}if(!e.composite)return new ToUnicodeMap(this._simpleFontToUnicode(e));if(e.composite&&(e.cMap.builtInCMap&&!(e.cMap \
instanceof IdentityCMap)||"Adobe"===e.cidSystemInfo?.registry&&("GB1"===e.cidSystemInfo.ordering||"CNS1"===e.cidSystemInfo.ordering||"Japan1"===e.cidSystemInfo.ordering||"Korea1"===e.cidSystemInfo.ordering))){const{registry:t,ordering:a}=e.cidSystemInfo,r=Name.get(`${t}-${a}-UCS2`),i=await CMapFactory.create({encoding:r,fetchBuiltInCMap:this._fetchBuiltInCMapBound,useCMap:null}),n=[],s=[];e.cMap.forEach((function(e,t){if(t>65535)throw new FormatError("Max size of CID is 65,535");const a=i.lookup\
(t);if(a){s.length=0;for(let e=0,t=a.length;e<t;e+=2)s.push((a.charCodeAt(e)<<8)+a.charCodeAt(e+1));n[e]=String.fromCharCode(...s)}}));return new ToUnicodeMap(n)}return new IdentityToUnicodeMap(e.firstChar,e.lastChar)}async readToUnicode(e){if(!e)return null;if(e instanceof Name){const t=await CMapFactory.create({encoding:e,fetchBuiltInCMap:this._fetchBuiltInCMapBound,useCMap:null});return t instanceof IdentityCMap?new IdentityToUnicodeMap(0,65535):new ToUnicodeMap(t.getMap())}if(e instanceof Ba\
seStream)try{const t=await CMapFactory.create({encoding:e,fetchBuiltInCMap:this._fetchBuiltInCMapBound,useCMap:null});if(t instanceof IdentityCMap)return new IdentityToUnicodeMap(0,65535);const a=new Array(t.length);t.forEach((function(e,t){if("number"==typeof t){a[e]=String.fromCodePoint(t);return}t.length%2!=0&&(t="\\0"+t);const r=[];for(let e=0;e<t.length;e+=2){const a=t.charCodeAt(e)<<8|t.charCodeAt(e+1);if(55296!=(63488&a)){r.push(a);continue}e+=2;const i=t.charCodeAt(e)<<8|t.charCodeAt(e+1)\
;r.push(((1023&a)<<10)+(1023&i)+65536)}a[e]=String.fromCodePoint(...r)}));return new ToUnicodeMap(a)}catch(e){if(e instanceof AbortException)return null;if(this.options.ignoreErrors){warn(`readToUnicode - ignoring ToUnicode data: "${e}".`);return null}throw e}return null}readCidToGidMap(e,t){const a=[];for(let r=0,i=e.length;r<i;r++){const i=e[r++]<<8|e[r],n=r>>1;(0!==i||t.has(n))&&(a[n]=i)}return a}extractWidths(e,t,a){const r=this.xref;let i=[],n=0;const s=[];let o;if(a.composite){const t=e.ge\
t("DW");n="number"==typeof t?Math.ceil(t):1e3;const c=e.get("W");if(Array.isArray(c))for(let e=0,t=c.length;e<t;e++){let t=r.fetchIfRef(c[e++]);if(!Number.isInteger(t))break;const a=r.fetchIfRef(c[e]);if(Array.isArray(a))for(const e of a){const a=r.fetchIfRef(e);"number"==typeof a&&(i[t]=a);t++}else{if(!Number.isInteger(a))break;{const n=r.fetchIfRef(c[++e]);if("number"!=typeof n)continue;for(let e=t;e<=a;e++)i[e]=n}}}if(a.vertical){const t=e.getArray("DW2");let a=isNumberArray(t,2)?t:[880,-1e3]\
;o=[a[1],.5*n,a[0]];a=e.get("W2");if(Array.isArray(a))for(let e=0,t=a.length;e<t;e++){let t=r.fetchIfRef(a[e++]);if(!Number.isInteger(t))break;const i=r.fetchIfRef(a[e]);if(Array.isArray(i))for(let e=0,a=i.length;e<a;e++){const a=[r.fetchIfRef(i[e++]),r.fetchIfRef(i[e++]),r.fetchIfRef(i[e])];isNumberArray(a,null)&&(s[t]=a);t++}else{if(!Number.isInteger(i))break;{const n=[r.fetchIfRef(a[++e]),r.fetchIfRef(a[++e]),r.fetchIfRef(a[++e])];if(!isNumberArray(n,null))continue;for(let e=t;e<=i;e++)s[e]=n\
}}}}}else{const s=e.get("Widths");if(Array.isArray(s)){let e=a.firstChar;for(const t of s){const a=r.fetchIfRef(t);"number"==typeof a&&(i[e]=a);e++}const o=t.get("MissingWidth");n="number"==typeof o?o:0}else{const t=e.get("BaseFont");if(t instanceof Name){const e=this.getBaseFontMetrics(t.name);i=this.buildCharCodeToWidth(e.widths,a);n=e.defaultWidth}}}let c=!0,l=n;for(const e in i){const t=i[e];if(t)if(l){if(l!==t){c=!1;break}}else l=t}c?a.flags|=Nr:a.flags&=~Nr;a.defaultWidth=n;a.widths=i;a.de\
faultVMetrics=o;a.vmetrics=s}isSerifFont(e){const t=e.split("-",1)[0];return t in Qr()||/serif/gi.test(t)}getBaseFontMetrics(e){let t=0,a=Object.create(null),r=!1;let i=Jr()[e]||e;const n=ii();i in n||(i=this.isSerifFont(e)?"Times-Roman":"Helvetica");const s=n[i];if("number"==typeof s){t=s;r=!0}else a=s();return{defaultWidth:t,monospace:r,widths:a}}buildCharCodeToWidth(e,t){const a=Object.create(null),r=t.differences,i=t.defaultEncoding;for(let t=0;t<256;t++)t in r&&e[r[t]]?a[t]=e[r[t]]:t in i&&\
e[i[t]]&&(a[t]=e[i[t]]);return a}preEvaluateFont(e){const t=e;let a=e.get("Subtype");if(!(a instanceof Name))throw new FormatError("invalid font Subtype");let r,i=!1;if("Type0"===a.name){const t=e.get("DescendantFonts");if(!t)throw new FormatError("Descendant fonts are not specified");if(!((e=Array.isArray(t)?this.xref.fetchIfRef(t[0]):t)instanceof Dict))throw new FormatError("Descendant font is not a dictionary.");a=e.get("Subtype");if(!(a instanceof Name))throw new FormatError("invalid font Su\
btype");i=!0}let n=e.get("FirstChar");Number.isInteger(n)||(n=0);let s=e.get("LastChar");Number.isInteger(s)||(s=i?65535:255);const o=e.get("FontDescriptor"),c=e.get("ToUnicode")||t.get("ToUnicode");if(o){r=new MurmurHash3_64;const a=t.getRaw("Encoding");if(a instanceof Name)r.update(a.name);else if(a instanceof Ref)r.update(a.toString());else if(a instanceof Dict)for(const e of a.getRawValues())if(e instanceof Name)r.update(e.name);else if(e instanceof Ref)r.update(e.toString());else if(Array.i\
sArray(e)){const t=e.length,a=new Array(t);for(let r=0;r<t;r++){const t=e[r];t instanceof Name?a[r]=t.name:("number"==typeof t||t instanceof Ref)&&(a[r]=t.toString())}r.update(a.join())}r.update(`${n}-${s}`);if(c instanceof BaseStream){const e=c.str||c,t=e.buffer?new Uint8Array(e.buffer.buffer,0,e.bufferLength):new Uint8Array(e.bytes.buffer,e.start,e.end-e.start);r.update(t)}else c instanceof Name&&r.update(c.name);const o=e.get("Widths")||t.get("Widths");if(Array.isArray(o)){const e=[];for(cons\
t t of o)("number"==typeof t||t instanceof Ref)&&e.push(t.toString());r.update(e.join())}if(i){r.update("compositeFont");const a=e.get("W")||t.get("W");if(Array.isArray(a)){const e=[];for(const t of a)if("number"==typeof t||t instanceof Ref)e.push(t.toString());else if(Array.isArray(t)){const a=[];for(const e of t)("number"==typeof e||e instanceof Ref)&&a.push(e.toString());e.push(`[${a.join()}]`)}r.update(e.join())}const i=e.getRaw("CIDToGIDMap")||t.getRaw("CIDToGIDMap");i instanceof Name?r.upd\
ate(i.name):i instanceof Ref?r.update(i.toString()):i instanceof BaseStream&&r.update(i.peekBytes())}}return{descriptor:o,dict:e,baseDict:t,composite:i,type:a.name,firstChar:n,lastChar:s,toUnicode:c,hash:r?r.hexdigest():""}}async translateFont({descriptor:e,dict:a,baseDict:r,composite:i,type:n,firstChar:s,lastChar:o,toUnicode:c,cssFontInfo:l}){const h="Type3"===n;if(!e){if(!h){let e=a.get("BaseFont");if(!(e instanceof Name))throw new FormatError("Base font is not specified");e=e.name.replaceAll(\
/[,_]/g,"-");const t=this.getBaseFontMetrics(e),i=e.split("-",1)[0],l=(this.isSerifFont(i)?Er:0)|(t.monospace?Nr:0)|(ei()[i]?Pr:Lr),u={type:n,name:e,loadedName:r.loadedName,systemFontInfo:null,widths:t.widths,defaultWidth:t.defaultWidth,isSimulatedFlags:!0,flags:l,firstChar:s,lastChar:o,toUnicode:c,xHeight:0,capHeight:0,italicAngle:0,isType3Font:h},d=a.get("Widths"),f=getStandardFontName(e);let g=null;if(f){g=await this.fetchStandardFontData(f);u.isInternalFont=!!g}!u.isInternalFont&&this.option\
s.useSystemFonts&&(u.systemFontInfo=getFontSubstitution(this.systemFontCache,this.idFactory,this.options.standardFontDataUrl,e,f,n));const p=await this.extractDataStructures(a,u);if(Array.isArray(d)){const e=[];let t=s;for(const a of d){const r=this.xref.fetchIfRef(a);"number"==typeof r&&(e[t]=r);t++}p.widths=e}else p.widths=this.buildCharCodeToWidth(t.widths,p);return new Font(e,g,p,this.options)}e=Dict.empty}let u=e.get("FontName"),d=a.get("BaseFont");"string"==typeof u&&(u=Name.get(u));"strin\
g"==typeof d&&(d=Name.get(d));const f=u?.name,g=d?.name;if(h)f||(u=Name.get(n));else if(f!==g){info(`The FontDescriptor\'s FontName is "${f}" but should be the same as the Font\'s BaseFont "${g}".`);f&&g&&(g.startsWith(f)||!isKnownFontName(f)&&isKnownFontName(g))&&(u=null);u||=d}if(!(u instanceof Name))throw new FormatError("invalid font name");let p,m,b,y,w;try{p=e.get("FontFile","FontFile2","FontFile3");if(p){if(!(p instanceof BaseStream))throw new FormatError("FontFile should be a stream");if(p\
.isEmpty)throw new FormatError("FontFile is empty")}}catch(e){if(!this.options.ignoreErrors)throw e;warn(`translateFont - fetching "${u.name}" font file: "${e}".`);p=null}let x=!1,S=null,k=null;if(p){if(p.dict){const e=p.dict.get("Subtype");e instanceof Name&&(m=e.name);b=p.dict.get("Length1");y=p.dict.get("Length2");w=p.dict.get("Length3")}}else if(l){const e=getXfaFontName(u.name);if(e){l.fontFamily=`${l.fontFamily}-PdfJS-XFA`;l.metrics=e.metrics||null;S=e.factors||null;p=await this.fetchStand\
ardFontData(e.name);x=!!p;r=a=getXfaFontDict(u.name);i=!0}}else if(!h){const e=getStandardFontName(u.name);if(e){p=await this.fetchStandardFontData(e);x=!!p}!x&&this.options.useSystemFonts&&(k=getFontSubstitution(this.systemFontCache,this.idFactory,this.options.standardFontDataUrl,u.name,e,n))}const C=lookupMatrix(a.getArray("FontMatrix"),t),v=lookupNormalRect(e.getArray("FontBBox")||a.getArray("FontBBox"),h?[0,0,0,0]:void 0);let F=e.get("Ascent");"number"!=typeof F&&(F=void 0);let T=e.get("Desc\
ent");"number"!=typeof T&&(T=void 0);let O=e.get("XHeight");"number"!=typeof O&&(O=0);let M=e.get("CapHeight");"number"!=typeof M&&(M=0);let D=e.get("Flags");Number.isInteger(D)||(D=0);let R=e.get("ItalicAngle");"number"!=typeof R&&(R=0);const N={type:n,name:u.name,subtype:m,file:p,length1:b,length2:y,length3:w,isInternalFont:x,loadedName:r.loadedName,composite:i,fixedPitch:!1,fontMatrix:C,firstChar:s,lastChar:o,toUnicode:c,bbox:v,ascent:F,descent:T,xHeight:O,capHeight:M,flags:D,italicAngle:R,is\
Type3Font:h,cssFontInfo:l,scaleFactors:S,systemFontInfo:k};if(i){const e=r.get("Encoding");e instanceof Name&&(N.cidEncoding=e.name);const t=await CMapFactory.create({encoding:e,fetchBuiltInCMap:this._fetchBuiltInCMapBound,useCMap:null});N.cMap=t;N.vertical=N.cMap.vertical}const E=await this.extractDataStructures(a,N);this.extractWidths(a,e,E);return new Font(u.name,p,E,this.options)}static buildFontPaths(e,t,a,r){function buildPath(t){const i=`${e.loadedName}_path_${t}`;try{if(e.renderer.hasBui\
ltPath(t))return;a.send("commonobj",[i,"FontPath",e.renderer.getPathJs(t)])}catch(e){if(r.ignoreErrors){warn(`buildFontPaths - ignoring ${i} glyph: "${e}".`);return}throw e}}for(const e of t){buildPath(e.fontChar);const t=e.accent;t?.fontChar&&buildPath(t.fontChar)}}static get fallbackFontDict(){const e=new Dict;e.set("BaseFont",Name.get("Helvetica"));e.set("Type",Name.get("FallbackType"));e.set("Subtype",Name.get("FallbackType"));e.set("Encoding",Name.get("WinAnsiEncoding"));return shadow(this,\
"fallbackFontDict",e)}}class TranslatedFont{#G=!1;#V=null;constructor({loadedName:e,font:t,dict:a}){this.loadedName=e;this.font=t;this.dict=a;this.type3Dependencies=t.isType3Font?new Set:null}send(e){if(!this.#G){this.#G=!0;e.send("commonobj",[this.loadedName,"Font",this.font.exportData()])}}fallback(e,t){if(this.font.data){this.font.disableFontFace=!0;PartialEvaluator.buildFontPaths(this.font,this.font.glyphCacheValues,e,t)}}loadType3Data(e,t,a){if(this.#V)return this.#V;const{font:r,type3Depen\
dencies:i}=this;assert(r.isType3Font,"Must be a Type3 font.");const n=e.clone({ignoreErrors:!1}),s=new RefSet(e.type3FontRefs);this.dict.objId&&!s.has(this.dict.objId)&&s.put(this.dict.objId);n.type3FontRefs=s;let o=Promise.resolve();const c=this.dict.get("CharProcs"),l=this.dict.get("Resources")||t,h=Object.create(null),[u,d,f,g]=r.bbox,p=f-u,m=g-d,b=Math.hypot(p,m);for(const e of c.getKeys())o=o.then((()=>{const t=c.get(e),r=new OperatorList;return n.getOperatorList({stream:t,task:a,resources:\
l,operatorList:r}).then((()=>{switch(r.fnArray[0]){case bt:this.#K(r,b);break;case mt:b||this.#J(r)}h[e]=r.getIR();for(const e of r.dependencies)i.add(e)})).catch((function(t){warn(`Type3 font resource "${e}" is not available.`);const a=new OperatorList;h[e]=a.getIR()}))}));this.#V=o.then((()=>{r.charProcOperatorList=h;if(this._bbox){r.isCharBBox=!0;r.bbox=this._bbox}}));return this.#V}#K(e,t=NaN){const a=Util.normalizeRect(e.argsArray[0].slice(2)),r=a[2]-a[0],i=a[3]-a[1],n=Math.hypot(r,i);if(0=\
==r||0===i){e.fnArray.splice(0,1);e.argsArray.splice(0,1)}else if(0===t||Math.round(n/t)>=10){this._bbox??=[1/0,1/0,-1/0,-1/0];Util.rectBoundingBox(...a,this._bbox)}let s=0,o=e.length;for(;s<o;){switch(e.fnArray[s]){case bt:break;case yt:case wt:case xt:case St:case At:case kt:case Ct:case vt:case Ft:case It:case Tt:case Ot:case Mt:case Oe:e.fnArray.splice(s,1);e.argsArray.splice(s,1);o--;continue;case De:const[t]=e.argsArray[s];let a=0,r=t.length;for(;a<r;){const[e]=t[a];switch(e){case"TR":case\
"TR2":case"HT":case"BG":case"BG2":case"UCR":case"UCR2":t.splice(a,1);r--;continue}a++}}s++}}#J(e){let t=1;const a=e.length;for(;t<a;){if(e.fnArray[t]===aa){const a=e.argsArray[t][2];this._bbox??=[1/0,1/0,-1/0,-1/0];Util.rectBoundingBox(...a,this._bbox)}t++}}}class StateManager{constructor(e=new EvalState){this.state=e;this.stateStack=[]}save(){const e=this.state;this.stateStack.push(this.state);this.state=e.clone()}restore(){const e=this.stateStack.pop();e&&(this.state=e)}transform(e){this.state\
.ctm=Util.transform(this.state.ctm,e)}}class TextState{constructor(){this.ctm=new Float32Array(Fa);this.fontName=null;this.fontSize=0;this.loadedName=null;this.font=null;this.fontMatrix=t;this.textMatrix=Fa.slice();this.textLineMatrix=Fa.slice();this.charSpacing=0;this.wordSpacing=0;this.leading=0;this.textHScale=1;this.textRise=0}setTextMatrix(e,t,a,r,i,n){const s=this.textMatrix;s[0]=e;s[1]=t;s[2]=a;s[3]=r;s[4]=i;s[5]=n}setTextLineMatrix(e,t,a,r,i,n){const s=this.textLineMatrix;s[0]=e;s[1]=t;s\
[2]=a;s[3]=r;s[4]=i;s[5]=n}translateTextMatrix(e,t){const a=this.textMatrix;a[4]=a[0]*e+a[2]*t+a[4];a[5]=a[1]*e+a[3]*t+a[5]}translateTextLineMatrix(e,t){const a=this.textLineMatrix;a[4]=a[0]*e+a[2]*t+a[4];a[5]=a[1]*e+a[3]*t+a[5]}carriageReturn(){this.translateTextLineMatrix(0,-this.leading);this.textMatrix=this.textLineMatrix.slice()}clone(){const e=Object.create(this);e.textMatrix=this.textMatrix.slice();e.textLineMatrix=this.textLineMatrix.slice();e.fontMatrix=this.fontMatrix.slice();return e}\
}class EvalState{constructor(){this.ctm=new Float32Array(Fa);this.font=null;this.textRenderingMode=x;this._fillColorSpace=this._strokeColorSpace=ColorSpaceUtils.gray;this.patternFillColorSpace=null;this.patternStrokeColorSpace=null;this.currentPointX=this.currentPointY=0;this.pathMinMax=new Float32Array([1/0,1/0,-1/0,-1/0]);this.pathBuffer=[]}get fillColorSpace(){return this._fillColorSpace}set fillColorSpace(e){this._fillColorSpace=this.patternFillColorSpace=e}get strokeColorSpace(){return this\
._strokeColorSpace}set strokeColorSpace(e){this._strokeColorSpace=this.patternStrokeColorSpace=e}clone({newPath:e=!1}={}){const t=Object.create(this);if(e){t.pathBuffer=[];t.pathMinMax=new Float32Array([1/0,1/0,-1/0,-1/0])}return t}}class EvaluatorPreprocessor{static get opMap(){return shadow(this,"opMap",Object.assign(Object.create(null),{w:{id:Ce,numArgs:1,variableArgs:!1},J:{id:ve,numArgs:1,variableArgs:!1},j:{id:Fe,numArgs:1,variableArgs:!1},M:{id:Ie,numArgs:1,variableArgs:!1},d:{id:Te,numAr\
gs:2,variableArgs:!1},ri:{id:Oe,numArgs:1,variableArgs:!1},i:{id:Me,numArgs:1,variableArgs:!1},gs:{id:De,numArgs:1,variableArgs:!1},q:{id:Be,numArgs:0,variableArgs:!1},Q:{id:Re,numArgs:0,variableArgs:!1},cm:{id:Ne,numArgs:6,variableArgs:!1},m:{id:Ee,numArgs:2,variableArgs:!1},l:{id:Pe,numArgs:2,variableArgs:!1},c:{id:Le,numArgs:6,variableArgs:!1},v:{id:je,numArgs:4,variableArgs:!1},y:{id:_e,numArgs:4,variableArgs:!1},h:{id:Ue,numArgs:0,variableArgs:!1},re:{id:Xe,numArgs:4,variableArgs:!1},S:{id:\
qe,numArgs:0,variableArgs:!1},s:{id:He,numArgs:0,variableArgs:!1},f:{id:We,numArgs:0,variableArgs:!1},F:{id:We,numArgs:0,variableArgs:!1},"f*":{id:ze,numArgs:0,variableArgs:!1},B:{id:$e,numArgs:0,variableArgs:!1},"B*":{id:Ge,numArgs:0,variableArgs:!1},b:{id:Ve,numArgs:0,variableArgs:!1},"b*":{id:Ke,numArgs:0,variableArgs:!1},n:{id:Je,numArgs:0,variableArgs:!1},W:{id:Ye,numArgs:0,variableArgs:!1},"W*":{id:Ze,numArgs:0,variableArgs:!1},BT:{id:Qe,numArgs:0,variableArgs:!1},ET:{id:et,numArgs:0,varia\
bleArgs:!1},Tc:{id:tt,numArgs:1,variableArgs:!1},Tw:{id:at,numArgs:1,variableArgs:!1},Tz:{id:rt,numArgs:1,variableArgs:!1},TL:{id:it,numArgs:1,variableArgs:!1},Tf:{id:nt,numArgs:2,variableArgs:!1},Tr:{id:st,numArgs:1,variableArgs:!1},Ts:{id:ot,numArgs:1,variableArgs:!1},Td:{id:ct,numArgs:2,variableArgs:!1},TD:{id:lt,numArgs:2,variableArgs:!1},Tm:{id:ht,numArgs:6,variableArgs:!1},"T*":{id:ut,numArgs:0,variableArgs:!1},Tj:{id:dt,numArgs:1,variableArgs:!1},TJ:{id:ft,numArgs:1,variableArgs:!1},"\'":{\
id:gt,numArgs:1,variableArgs:!1},\'"\':{id:pt,numArgs:3,variableArgs:!1},d0:{id:mt,numArgs:2,variableArgs:!1},d1:{id:bt,numArgs:6,variableArgs:!1},CS:{id:yt,numArgs:1,variableArgs:!1},cs:{id:wt,numArgs:1,variableArgs:!1},SC:{id:xt,numArgs:4,variableArgs:!0},SCN:{id:St,numArgs:33,variableArgs:!0},sc:{id:At,numArgs:4,variableArgs:!0},scn:{id:kt,numArgs:33,variableArgs:!0},G:{id:Ct,numArgs:1,variableArgs:!1},g:{id:vt,numArgs:1,variableArgs:!1},RG:{id:Ft,numArgs:3,variableArgs:!1},rg:{id:It,numArgs:3,\
variableArgs:!1},K:{id:Tt,numArgs:4,variableArgs:!1},k:{id:Ot,numArgs:4,variableArgs:!1},sh:{id:Mt,numArgs:1,variableArgs:!1},BI:{id:Dt,numArgs:0,variableArgs:!1},ID:{id:Bt,numArgs:0,variableArgs:!1},EI:{id:Rt,numArgs:1,variableArgs:!1},Do:{id:Nt,numArgs:1,variableArgs:!1},MP:{id:Et,numArgs:1,variableArgs:!1},DP:{id:Pt,numArgs:2,variableArgs:!1},BMC:{id:Lt,numArgs:1,variableArgs:!1},BDC:{id:jt,numArgs:2,variableArgs:!1},EMC:{id:_t,numArgs:0,variableArgs:!1},BX:{id:Ut,numArgs:0,variableArgs:!1},E\
X:{id:Xt,numArgs:0,variableArgs:!1},BM:null,BD:null,true:null,fa:null,fal:null,fals:null,false:null,nu:null,nul:null,null:null}))}static MAX_INVALID_PATH_OPS=10;constructor(e,t,a=new StateManager){this.parser=new Parser({lexer:new Lexer(e,EvaluatorPreprocessor.opMap),xref:t});this.stateManager=a;this.nonProcessedArgs=[];this._isPathOp=!1;this._numInvalidPathOPS=0}get savedStatesDepth(){return this.stateManager.stateStack.length}read(e){let t=e.args;for(;;){const a=this.parser.getObj();if(a insta\
nceof Cmd){const r=a.cmd,i=EvaluatorPreprocessor.opMap[r];if(!i){warn(`Unknown command "${r}".`);continue}const n=i.id,s=i.numArgs;let o=null!==t?t.length:0;this._isPathOp||(this._numInvalidPathOPS=0);this._isPathOp=n>=Ee&&n<=Je;if(i.variableArgs)o>s&&info(`Command ${r}: expected [0, ${s}] args, but received ${o} args.`);else{if(o!==s){const e=this.nonProcessedArgs;for(;o>s;){e.push(t.shift());o--}for(;o<s&&0!==e.length;){null===t&&(t=[]);t.unshift(e.pop());o++}}if(o<s){const e=`command ${r}: ex\
pected ${s} args, but received ${o} args.`;if(this._isPathOp&&++this._numInvalidPathOPS>EvaluatorPreprocessor.MAX_INVALID_PATH_OPS)throw new FormatError(`Invalid ${e}`);warn(`Skipping ${e}`);null!==t&&(t.length=0);continue}}this.preprocessCommand(n,t);e.fn=n;e.args=t;return!0}if(a===wa)return!1;if(null!==a){null===t&&(t=[]);t.push(a);if(t.length>33)throw new FormatError("Too many arguments")}}}preprocessCommand(e,t){switch(0|e){case Be:this.stateManager.save();break;case Re:this.stateManager.res\
tore();break;case Ne:this.stateManager.transform(t)}}}class DefaultAppearanceEvaluator extends EvaluatorPreprocessor{constructor(e){super(new StringStream(e))}parse(){const e={fn:0,args:[]},t={fontSize:0,fontName:"",fontColor:new Uint8ClampedArray(3)};try{for(;;){e.args.length=0;if(!this.read(e))break;if(0!==this.savedStatesDepth)continue;const{fn:a,args:r}=e;switch(0|a){case nt:const[e,a]=r;e instanceof Name&&(t.fontName=e.name);"number"==typeof a&&a>0&&(t.fontSize=a);break;case It:ColorSpaceUt\
ils.rgb.getRgbItem(r,0,t.fontColor,0);break;case vt:ColorSpaceUtils.gray.getRgbItem(r,0,t.fontColor,0);break;case Ot:ColorSpaceUtils.cmyk.getRgbItem(r,0,t.fontColor,0)}}}catch(e){warn(`parseDefaultAppearance - ignoring errors: "${e}".`)}return t}}function parseDefaultAppearance(e){return new DefaultAppearanceEvaluator(e).parse()}class AppearanceStreamEvaluator extends EvaluatorPreprocessor{constructor(e,t,a,r){super(e);this.stream=e;this.evaluatorOptions=t;this.xref=a;this.globalColorSpaceCache=\
r;this.resources=e.dict?.get("Resources")}parse(){const e={fn:0,args:[]};let t={scaleFactor:1,fontSize:0,fontName:"",fontColor:new Uint8ClampedArray(3),fillColorSpace:ColorSpaceUtils.gray},a=!1;const r=[];try{for(;;){e.args.length=0;if(a||!this.read(e))break;const{fn:i,args:n}=e;switch(0|i){case Be:r.push({scaleFactor:t.scaleFactor,fontSize:t.fontSize,fontName:t.fontName,fontColor:t.fontColor.slice(),fillColorSpace:t.fillColorSpace});break;case Re:t=r.pop()||t;break;case ht:t.scaleFactor*=Math.h\
ypot(n[0],n[1]);break;case nt:const[e,i]=n;e instanceof Name&&(t.fontName=e.name);"number"==typeof i&&i>0&&(t.fontSize=i*t.scaleFactor);break;case wt:t.fillColorSpace=ColorSpaceUtils.parse({cs:n[0],xref:this.xref,resources:this.resources,pdfFunctionFactory:this._pdfFunctionFactory,globalColorSpaceCache:this.globalColorSpaceCache,localColorSpaceCache:this._localColorSpaceCache});break;case At:t.fillColorSpace.getRgbItem(n,0,t.fontColor,0);break;case It:ColorSpaceUtils.rgb.getRgbItem(n,0,t.fontCol\
or,0);break;case vt:ColorSpaceUtils.gray.getRgbItem(n,0,t.fontColor,0);break;case Ot:ColorSpaceUtils.cmyk.getRgbItem(n,0,t.fontColor,0);break;case dt:case ft:case gt:case pt:a=!0}}}catch(e){warn(`parseAppearanceStream - ignoring errors: "${e}".`)}this.stream.reset();delete t.scaleFactor;delete t.fillColorSpace;return t}get _localColorSpaceCache(){return shadow(this,"_localColorSpaceCache",new LocalColorSpaceCache)}get _pdfFunctionFactory(){return shadow(this,"_pdfFunctionFactory",new PDFFunction\
Factory({xref:this.xref,isEvalSupported:this.evaluatorOptions.isEvalSupported}))}}function getPdfColor(e,t){if(e[0]===e[1]&&e[1]===e[2]){return`${numberToString(e[0]/255)} ${t?"g":"G"}`}return Array.from(e,(e=>numberToString(e/255))).join(" ")+" "+(t?"rg":"RG")}class FakeUnicodeFont{constructor(e,t){this.xref=e;this.widths=null;this.firstChar=1/0;this.lastChar=-1/0;this.fontFamily=t;const a=new OffscreenCanvas(1,1);this.ctxMeasure=a.getContext("2d",{willReadFrequently:!0});FakeUnicodeFont._fontN\
ameId||(FakeUnicodeFont._fontNameId=1);this.fontName=Name.get(`InvalidPDFjsFont_${t}_${FakeUnicodeFont._fontNameId++}`)}get fontDescriptorRef(){if(!FakeUnicodeFont._fontDescriptorRef){const e=new Dict(this.xref);e.setIfName("Type","FontDescriptor");e.set("FontName",this.fontName);e.set("FontFamily","MyriadPro Regular");e.set("FontBBox",[0,0,0,0]);e.setIfName("FontStretch","Normal");e.set("FontWeight",400);e.set("ItalicAngle",0);FakeUnicodeFont._fontDescriptorRef=this.xref.getNewPersistentRef(e)}\
return FakeUnicodeFont._fontDescriptorRef}get descendantFontRef(){const e=new Dict(this.xref);e.set("BaseFont",this.fontName);e.setIfName("Type","Font");e.setIfName("Subtype","CIDFontType0");e.setIfName("CIDToGIDMap","Identity");e.set("FirstChar",this.firstChar);e.set("LastChar",this.lastChar);e.set("FontDescriptor",this.fontDescriptorRef);e.set("DW",1e3);const t=[],a=[...this.widths.entries()].sort();let r=null,i=null;for(const[e,n]of a)if(r)if(e===r+i.length)i.push(n);else{t.push(r,i);r=e;i=[n\
]}else{r=e;i=[n]}r&&t.push(r,i);e.set("W",t);const n=new Dict(this.xref);n.set("Ordering","Identity");n.set("Registry","Adobe");n.set("Supplement",0);e.set("CIDSystemInfo",n);return this.xref.getNewPersistentRef(e)}get baseFontRef(){const e=new Dict(this.xref);e.set("BaseFont",this.fontName);e.setIfName("Type","Font");e.setIfName("Subtype","Type0");e.setIfName("Encoding","Identity-H");e.set("DescendantFonts",[this.descendantFontRef]);e.setIfName("ToUnicode","Identity-H");return this.xref.getNewP\
ersistentRef(e)}get resources(){const e=new Dict(this.xref),t=new Dict(this.xref);t.set(this.fontName.name,this.baseFontRef);e.set("Font",t);return e}_createContext(){this.widths=new Map;this.ctxMeasure.font=`1000px ${this.fontFamily}`;return this.ctxMeasure}createFontResources(e){const t=this._createContext();for(const a of e.split(/\\r\\n?|\\n/))for(const e of a.split("")){const a=e.charCodeAt(0);if(this.widths.has(a))continue;const r=t.measureText(e),i=Math.ceil(r.width);this.widths.set(a,i);thi\
s.firstChar=Math.min(a,this.firstChar);this.lastChar=Math.max(a,this.lastChar)}return this.resources}static getFirstPositionInfo(e,t,i){const[n,s,o,c]=e;let l=o-n,h=c-s;t%180!=0&&([l,h]=[h,l]);const u=a*i;return{coords:[0,h+r*i-u],bbox:[0,0,l,h],matrix:0!==t?getRotationMatrix(t,h,u):void 0}}createAppearance(e,t,i,n,s,o){const c=this._createContext(),l=[];let h=-1/0;for(const t of e.split(/\\r\\n?|\\n/)){l.push(t);const e=c.measureText(t).width;h=Math.max(h,e);for(const e of codePointIter(t)){const \
t=String.fromCodePoint(e);let a=this.widths.get(e);if(void 0===a){const r=c.measureText(t);a=Math.ceil(r.width);this.widths.set(e,a);this.firstChar=Math.min(e,this.firstChar);this.lastChar=Math.max(e,this.lastChar)}}}h*=n/1e3;const[u,d,f,g]=t;let p=f-u,m=g-d;i%180!=0&&([p,m]=[m,p]);let b=1;h>p&&(b=p/h);let y=1;const w=a*n,x=r*n,S=w*l.length;S>m&&(y=m/S);const k=n*Math.min(b,y),C=["q",`0 0 ${numberToString(p)} ${numberToString(m)} re W n`,"BT",`1 0 0 1 0 ${numberToString(m+x)} Tm 0 Tc ${getPdfCol\
or(s,!0)}`,`/${this.fontName.name} ${numberToString(k)} Tf`],{resources:v}=this;if(1!==(o="number"==typeof o&&o>=0&&o<=1?o:1)){C.push("/R0 gs");const e=new Dict(this.xref),t=new Dict(this.xref);t.set("ca",o);t.set("CA",o);t.setIfName("Type","ExtGState");e.set("R0",t);v.set("ExtGState",e)}const F=numberToString(w);for(const e of l)C.push(`0 -${F} Td <${stringToUTF16HexString(e)}> Tj`);C.push("ET","Q");const T=C.join("\\n"),O=new Dict(this.xref);O.setIfName("Subtype","Form");O.setIfName("Type","XOb\
ject");O.set("BBox",[0,0,p,m]);O.set("Length",T.length);O.set("Resources",v);if(i){const e=getRotationMatrix(i,p,m);O.set("Matrix",e)}const M=new StringStream(T);M.dict=O;return M}}const Pn=["m/d","m/d/yy","mm/dd/yy","mm/yy","d-mmm","d-mmm-yy","dd-mmm-yy","yy-mm-dd","mmm-yy","mmmm-yy","mmm d, yyyy","mmmm d, yyyy","m/d/yy h:MM tt","m/d/yy HH:MM"],Ln=["HH:MM","h:MM tt","HH:MM:ss","h:MM:ss tt"];class NameOrNumberTree{constructor(e,t,a){this.root=e;this.xref=t;this._type=a}getAll(){const e=new Map;i\
f(!this.root)return e;const t=this.xref,a=new RefSet;a.put(this.root);const r=[this.root];for(;r.length>0;){const i=t.fetchIfRef(r.shift());if(!(i instanceof Dict))continue;if(i.has("Kids")){const e=i.get("Kids");if(!Array.isArray(e))continue;for(const t of e){if(a.has(t))throw new FormatError(`Duplicate entry in "${this._type}" tree.`);r.push(t);a.put(t)}continue}const n=i.get(this._type);if(Array.isArray(n))for(let a=0,r=n.length;a<r;a+=2)e.set(t.fetchIfRef(n[a]),t.fetchIfRef(n[a+1]))}return e\
}getRaw(e){if(!this.root)return null;const t=this.xref;let a=t.fetchIfRef(this.root),r=0;for(;a.has("Kids");){if(++r>10){warn(`Search depth limit reached for "${this._type}" tree.`);return null}const i=a.get("Kids");if(!Array.isArray(i))return null;let n=0,s=i.length-1;for(;n<=s;){const r=n+s>>1,o=t.fetchIfRef(i[r]),c=o.get("Limits");if(e<t.fetchIfRef(c[0]))s=r-1;else{if(!(e>t.fetchIfRef(c[1]))){a=o;break}n=r+1}}if(n>s)return null}const i=a.get(this._type);if(Array.isArray(i)){let a=0,r=i.length\
-2;for(;a<=r;){const n=a+r>>1,s=n+(1&n),o=t.fetchIfRef(i[s]);if(e<o)r=s-2;else{if(!(e>o))return i[s+1];a=s+2}}}return null}get(e){return this.xref.fetchIfRef(this.getRaw(e))}}class NameTree extends NameOrNumberTree{constructor(e,t){super(e,t,"Names")}}class NumberTree extends NameOrNumberTree{constructor(e,t){super(e,t,"Nums")}}function clearGlobalCaches(){!function clearPatternCaches(){Ii=Object.create(null)}();!function clearPrimitiveCaches(){xa=Object.create(null);Sa=Object.create(null);Aa=Ob\
ject.create(null)}();!function clearUnicodeCaches(){Dr.clear()}();JpxImage.cleanup()}function pickPlatformItem(e){return e instanceof Dict?e.has("UF")?e.get("UF"):e.has("F")?e.get("F"):e.has("Unix")?e.get("Unix"):e.has("Mac")?e.get("Mac"):e.has("DOS")?e.get("DOS"):null:null}class FileSpec{#Y=!1;constructor(e,t,a=!1){if(e instanceof Dict){this.xref=t;this.root=e;e.has("FS")&&(this.fs=e.get("FS"));e.has("RF")&&warn("Related file specifications are not supported");a||(e.has("EF")?this.#Y=!0:warn("N\
on-embedded file specifications are not supported"))}}get filename(){let e="";const t=pickPlatformItem(this.root);t&&"string"==typeof t&&(e=stringToPDFString(t,!0).replaceAll("\\\\\\\\","\\\\").replaceAll("\\\\/","/").replaceAll("\\\\","/"));return shadow(this,"filename",e||"unnamed")}get content(){if(!this.#Y)return null;this._contentRef||=pickPlatformItem(this.root?.get("EF"));let e=null;if(this._contentRef){const t=this.xref.fetchIfRef(this._contentRef);t instanceof BaseStream?e=t.getBytes():warn("Embe\
dded file specification points to non-existing/invalid content")}else warn("Embedded file specification does not have any content");return e}get description(){let e="";const t=this.root?.get("Desc");t&&"string"==typeof t&&(e=stringToPDFString(t));return shadow(this,"description",e)}get serializable(){return{rawFilename:this.filename,filename:(e=this.filename,e.substring(e.lastIndexOf("/")+1)),content:this.content,description:this.description};var e}}const jn=0,_n=-2,Un=-3,Xn=-4,qn=-5,Hn=-6,Wn=-9\
;function isWhitespace(e,t){const a=e[t];return" "===a||"\\n"===a||"\\r"===a||"\\t"===a}class XMLParserBase{_resolveEntities(e){return e.replaceAll(/&([^;]+);/g,((e,t)=>{if("#x"===t.substring(0,2))return String.fromCodePoint(parseInt(t.substring(2),16));if("#"===t.substring(0,1))return String.fromCodePoint(parseInt(t.substring(1),10));switch(t){case"lt":return"<";case"gt":return">";case"amp":return"&";case"quot":return\'"\';case"apos":return"\'"}return this.onResolveEntity(t)}))}_parseContent(e,t){con\
st a=[];let r=t;function skipWs(){for(;r<e.length&&isWhitespace(e,r);)++r}for(;r<e.length&&!isWhitespace(e,r)&&">"!==e[r]&&"/"!==e[r];)++r;const i=e.substring(t,r);skipWs();for(;r<e.length&&">"!==e[r]&&"/"!==e[r]&&"?"!==e[r];){skipWs();let t="",i="";for(;r<e.length&&!isWhitespace(e,r)&&"="!==e[r];){t+=e[r];++r}skipWs();if("="!==e[r])return null;++r;skipWs();const n=e[r];if(\'"\'!==n&&"\'"!==n)return null;const s=e.indexOf(n,++r);if(s<0)return null;i=e.substring(r,s);a.push({name:t,value:this._resol\
veEntities(i)});r=s+1;skipWs()}return{name:i,attributes:a,parsed:r-t}}_parseProcessingInstruction(e,t){let a=t;for(;a<e.length&&!isWhitespace(e,a)&&">"!==e[a]&&"?"!==e[a]&&"/"!==e[a];)++a;const r=e.substring(t,a);!function skipWs(){for(;a<e.length&&isWhitespace(e,a);)++a}();const i=a;for(;a<e.length&&("?"!==e[a]||">"!==e[a+1]);)++a;return{name:r,value:e.substring(i,a),parsed:a-t}}parseXml(e){let t=0;for(;t<e.length;){let a=t;if("<"===e[t]){++a;let t;switch(e[a]){case"/":++a;t=e.indexOf(">",a);if\
(t<0){this.onError(Wn);return}this.onEndElement(e.substring(a,t));a=t+1;break;case"?":++a;const r=this._parseProcessingInstruction(e,a);if("?>"!==e.substring(a+r.parsed,a+r.parsed+2)){this.onError(Un);return}this.onPi(r.name,r.value);a+=r.parsed+2;break;case"!":if("--"===e.substring(a+1,a+3)){t=e.indexOf("--\\x3e",a+3);if(t<0){this.onError(qn);return}this.onComment(e.substring(a+3,t));a=t+3}else if("[CDATA["===e.substring(a+1,a+8)){t=e.indexOf("]]>",a+8);if(t<0){this.onError(_n);return}this.onCda\
ta(e.substring(a+8,t));a=t+3}else{if("DOCTYPE"!==e.substring(a+1,a+8)){this.onError(Hn);return}{const r=e.indexOf("[",a+8);let i=!1;t=e.indexOf(">",a+8);if(t<0){this.onError(Xn);return}if(r>0&&t>r){t=e.indexOf("]>",a+8);if(t<0){this.onError(Xn);return}i=!0}const n=e.substring(a+8,t+(i?1:0));this.onDoctype(n);a=t+(i?2:1)}}break;default:const i=this._parseContent(e,a);if(null===i){this.onError(Hn);return}let n=!1;if("/>"===e.substring(a+i.parsed,a+i.parsed+2))n=!0;else if(">"!==e.substring(a+i.par\
sed,a+i.parsed+1)){this.onError(Wn);return}this.onBeginElement(i.name,i.attributes,n);a+=i.parsed+(n?2:1)}}else{for(;a<e.length&&"<"!==e[a];)a++;const r=e.substring(t,a);this.onText(this._resolveEntities(r))}t=a}}onResolveEntity(e){return`&${e};`}onPi(e,t){}onComment(e){}onCdata(e){}onDoctype(e){}onText(e){}onBeginElement(e,t,a){}onEndElement(e){}onError(e){}}class SimpleDOMNode{constructor(e,t){this.nodeName=e;this.nodeValue=t;Object.defineProperty(this,"parentNode",{value:null,writable:!0})}ge\
t firstChild(){return this.childNodes?.[0]}get nextSibling(){const e=this.parentNode.childNodes;if(!e)return;const t=e.indexOf(this);return-1!==t?e[t+1]:void 0}get textContent(){return this.childNodes?this.childNodes.map((e=>e.textContent)).join(""):this.nodeValue||""}get children(){return this.childNodes||[]}hasChildNodes(){return this.childNodes?.length>0}searchNode(e,t){if(t>=e.length)return this;const a=e[t];if(a.name.startsWith("#")&&t<e.length-1)return this.searchNode(e,t+1);const r=[];let\
 i=this;for(;;){if(a.name===i.nodeName){if(0!==a.pos){if(0===r.length)return null;{const[n]=r.pop();let s=0;for(const r of n.childNodes)if(a.name===r.nodeName){if(s===a.pos)return r.searchNode(e,t+1);s++}return i.searchNode(e,t+1)}}{const a=i.searchNode(e,t+1);if(null!==a)return a}}if(i.childNodes?.length>0){r.push([i,0]);i=i.childNodes[0]}else{if(0===r.length)return null;for(;0!==r.length;){const[e,t]=r.pop(),a=t+1;if(a<e.childNodes.length){r.push([e,a]);i=e.childNodes[a];break}}if(0===r.length\
)return null}}}dump(e){if("#text"!==this.nodeName){e.push(`<${this.nodeName}`);if(this.attributes)for(const t of this.attributes)e.push(` ${t.name}="${encodeToXmlString(t.value)}"`);if(this.hasChildNodes()){e.push(">");for(const t of this.childNodes)t.dump(e);e.push(`</${this.nodeName}>`)}else this.nodeValue?e.push(`>${encodeToXmlString(this.nodeValue)}</${this.nodeName}>`):e.push("/>")}else e.push(encodeToXmlString(this.nodeValue))}}class SimpleXMLParser extends XMLParserBase{constructor({hasAt\
tributes:e=!1,lowerCaseName:t=!1}){super();this._currentFragment=null;this._stack=null;this._errorCode=jn;this._hasAttributes=e;this._lowerCaseName=t}parseFromString(e){this._currentFragment=[];this._stack=[];this._errorCode=jn;this.parseXml(e);if(this._errorCode!==jn)return;const[t]=this._currentFragment;return t?{documentElement:t}:void 0}onText(e){if(function isWhitespaceString(e){for(let t=0,a=e.length;t<a;t++)if(!isWhitespace(e,t))return!1;return!0}(e))return;const t=new SimpleDOMNode("#tex\
t",e);this._currentFragment.push(t)}onCdata(e){const t=new SimpleDOMNode("#text",e);this._currentFragment.push(t)}onBeginElement(e,t,a){this._lowerCaseName&&(e=e.toLowerCase());const r=new SimpleDOMNode(e);r.childNodes=[];this._hasAttributes&&(r.attributes=t);this._currentFragment.push(r);if(!a){this._stack.push(this._currentFragment);this._currentFragment=r.childNodes}}onEndElement(e){this._currentFragment=this._stack.pop()||[];const t=this._currentFragment.at(-1);if(!t)return null;for(const e \
of t.childNodes)e.parentNode=t;return t}onError(e){this._errorCode=e}}class MetadataParser{constructor(e){e=this._repair(e);const t=new SimpleXMLParser({lowerCaseName:!0}).parseFromString(e);this._metadataMap=new Map;this._data=e;t&&this._parse(t)}_repair(e){return e.replace(/^[^<]+/,"").replaceAll(/>\\\\376\\\\377([^<]+)/g,(function(e,t){const a=t.replaceAll(/\\\\([0-3])([0-7])([0-7])/g,(function(e,t,a,r){return String.fromCharCode(64*t+8*a+1*r)})).replaceAll(/&(amp|apos|gt|lt|quot);/g,(function(e,t)\
{switch(t){case"amp":return"&";case"apos":return"\'";case"gt":return">";case"lt":return"<";case"quot":return\'"\'}throw new Error(`_repair: ${t} isn\'t defined.`)})),r=[">"];for(let e=0,t=a.length;e<t;e+=2){const t=256*a.charCodeAt(e)+a.charCodeAt(e+1);t>=32&&t<127&&60!==t&&62!==t&&38!==t?r.push(String.fromCharCode(t)):r.push("&#x"+(65536+t).toString(16).substring(1)+";")}return r.join("")}))}_getSequence(e){const t=e.nodeName;return"rdf:bag"!==t&&"rdf:seq"!==t&&"rdf:alt"!==t?null:e.childNodes.filte\
r((e=>"rdf:li"===e.nodeName))}_parseArray(e){if(!e.hasChildNodes())return;const[t]=e.childNodes,a=this._getSequence(t)||[];this._metadataMap.set(e.nodeName,a.map((e=>e.textContent.trim())))}_parse(e){let t=e.documentElement;if("rdf:rdf"!==t.nodeName){t=t.firstChild;for(;t&&"rdf:rdf"!==t.nodeName;)t=t.nextSibling}if(t&&"rdf:rdf"===t.nodeName&&t.hasChildNodes())for(const e of t.childNodes)if("rdf:description"===e.nodeName)for(const t of e.childNodes){const e=t.nodeName;switch(e){case"#text":contin\
ue;case"dc:creator":case"dc:subject":this._parseArray(t);continue}this._metadataMap.set(e,t.textContent.trim())}}get serializable(){return{parsedData:this._metadataMap,rawData:this._data}}}const zn=1,$n=2,Gn=3,Vn=4,Kn=5;class StructTreeRoot{constructor(e,t,a){this.xref=e;this.dict=t;this.ref=a instanceof Ref?a:null;this.roleMap=new Map;this.structParentIds=null}init(){this.readRoleMap()}#Z(e,t,a){if(!(e instanceof Ref)||t<0)return;this.structParentIds||=new RefSetCache;let r=this.structParentIds\
.get(e);if(!r){r=[];this.structParentIds.put(e,r)}r.push([t,a])}addAnnotationIdToPage(e,t){this.#Z(e,t,Vn)}readRoleMap(){const e=this.dict.get("RoleMap");if(e instanceof Dict)for(const[t,a]of e)a instanceof Name&&this.roleMap.set(t,a.name)}static async canCreateStructureTree({catalogRef:e,pdfManager:t,newAnnotationsByPage:a}){if(!(e instanceof Ref)){warn("Cannot save the struct tree: no catalog reference.");return!1}let r=0,i=!0;for(const[e,n]of a){const{ref:a}=await t.getPage(e);if(!(a instance\
of Ref)){warn(`Cannot save the struct tree: page ${e} has no ref.`);i=!0;break}for(const e of n)if(e.accessibilityData?.type){e.parentTreeId=r++;i=!1}}if(i){for(const e of a.values())for(const t of e)delete t.parentTreeId;return!1}return!0}static async createStructureTree({newAnnotationsByPage:e,xref:t,catalogRef:a,pdfManager:r,changes:i}){const n=await r.ensureCatalog("cloneDict"),s=new RefSetCache;s.put(a,n);const o=t.getNewTemporaryRef();n.set("StructTreeRoot",o);const c=new Dict(t);c.set("Ty\
pe",Name.get("StructTreeRoot"));const l=t.getNewTemporaryRef();c.set("ParentTree",l);const h=[];c.set("K",h);s.put(o,c);const u=new Dict(t),d=[];u.set("Nums",d);const f=await this.#Q({newAnnotationsByPage:e,structTreeRootRef:o,structTreeRoot:null,kids:h,nums:d,xref:t,pdfManager:r,changes:i,cache:s});c.set("ParentTreeNextKey",f);s.put(l,u);for(const[e,t]of s.items())i.put(e,{data:t})}async canUpdateStructTree({pdfManager:e,newAnnotationsByPage:t}){if(!this.ref){warn("Cannot update the struct tree\
: no root reference.");return!1}let a=this.dict.get("ParentTreeNextKey");if(!Number.isInteger(a)||a<0){warn("Cannot update the struct tree: invalid next key.");return!1}const r=this.dict.get("ParentTree");if(!(r instanceof Dict)){warn("Cannot update the struct tree: ParentTree isn\'t a dict.");return!1}const i=r.get("Nums");if(!Array.isArray(i)){warn("Cannot update the struct tree: nums isn\'t an array.");return!1}const n=new NumberTree(r,this.xref);for(const a of t.keys()){const{pageDict:t}=await\
 e.getPage(a);if(!t.has("StructParents"))continue;const r=t.get("StructParents");if(!Number.isInteger(r)||!Array.isArray(n.get(r))){warn(`Cannot save the struct tree: page ${a} has a wrong id.`);return!1}}let s=!0;for(const[r,i]of t){const{pageDict:t}=await e.getPage(r);StructTreeRoot.#ee({elements:i,xref:this.xref,pageDict:t,numberTree:n});for(const e of i)if(e.accessibilityData?.type){e.accessibilityData.structParent>=0||(e.parentTreeId=a++);s=!1}}if(s){for(const e of t.values())for(const t of\
 e){delete t.parentTreeId;delete t.structTreeParent}return!1}return!0}async updateStructureTree({newAnnotationsByPage:e,pdfManager:t,changes:a}){const{ref:r,xref:i}=this,n=this.dict.clone(),s=new RefSetCache;s.put(r,n);let o,c=n.getRaw("ParentTree");if(c instanceof Ref)o=i.fetch(c);else{o=c;c=i.getNewTemporaryRef();n.set("ParentTree",c)}o=o.clone();s.put(c,o);let l=o.getRaw("Nums"),h=null;if(l instanceof Ref){h=l;l=i.fetch(h)}l=l.slice();h||o.set("Nums",l);const u=await StructTreeRoot.#Q({newAnn\
otationsByPage:e,structTreeRootRef:r,structTreeRoot:this,kids:null,nums:l,xref:i,pdfManager:t,changes:a,cache:s});if(-1!==u){n.set("ParentTreeNextKey",u);h&&s.put(h,l);for(const[e,t]of s.items())a.put(e,{data:t})}}static async#Q({newAnnotationsByPage:e,structTreeRootRef:t,structTreeRoot:a,kids:r,nums:i,xref:n,pdfManager:s,changes:o,cache:c}){const l=Name.get("OBJR");let h,u=-1;for(const[d,f]of e){const e=await s.getPage(d),{ref:g}=e,p=g instanceof Ref;for(const{accessibilityData:s,ref:m,parentTr\
eeId:b,structTreeParent:y}of f){if(!s?.type)continue;const{structParent:f}=s;if(a&&Number.isInteger(f)&&f>=0){let t=(h||=new Map).get(d);if(void 0===t){t=new StructTreePage(a,e.pageDict).collectObjects(g);h.set(d,t)}const r=t?.get(f);if(r){const e=n.fetch(r).clone();StructTreeRoot.#te(e,s);o.put(r,{data:e});continue}}u=Math.max(u,b);const w=n.getNewTemporaryRef(),x=new Dict(n);StructTreeRoot.#te(x,s);await this.#ae({structTreeParent:y,tagDict:x,newTagRef:w,structTreeRootRef:t,fallbackKids:r,xref\
:n,cache:c});const S=new Dict(n);x.set("K",S);S.set("Type",l);p&&S.set("Pg",g);S.set("Obj",m);c.put(w,x);i.push(b,w)}}return u+1}static#te(e,{type:t,title:a,lang:r,alt:i,expanded:n,actualText:s}){e.set("S",Name.get(t));a&&e.set("T",stringToAsciiOrUTF16BE(a));r&&e.set("Lang",stringToAsciiOrUTF16BE(r));i&&e.set("Alt",stringToAsciiOrUTF16BE(i));n&&e.set("E",stringToAsciiOrUTF16BE(n));s&&e.set("ActualText",stringToAsciiOrUTF16BE(s))}static#ee({elements:e,xref:t,pageDict:a,numberTree:r}){const i=new \
Map;for(const t of e)if(t.structTreeParentId){const e=parseInt(t.structTreeParentId.split("_mc")[1],10);let a=i.get(e);if(!a){a=[];i.set(e,a)}a.push(t)}const n=a.get("StructParents");if(!Number.isInteger(n))return;const s=r.get(n),updateElement=(e,a,r)=>{const n=i.get(e);if(n){const e=a.getRaw("P"),i=t.fetchIfRef(e);if(e instanceof Ref&&i instanceof Dict){const e={ref:r,dict:a};for(const t of n)t.structTreeParent=e}return!0}return!1};for(const e of s){if(!(e instanceof Ref))continue;const a=t.fe\
tch(e),r=a.get("K");if(Number.isInteger(r))updateElement(r,a,e);else if(Array.isArray(r))for(let i of r){i=t.fetchIfRef(i);if(Number.isInteger(i)&&updateElement(i,a,e))break;if(!(i instanceof Dict))continue;if(!isName(i.get("Type"),"MCR"))break;const r=i.get("MCID");if(Number.isInteger(r)&&updateElement(r,a,e))break}}}static async#ae({structTreeParent:e,tagDict:t,newTagRef:a,structTreeRootRef:r,fallbackKids:i,xref:n,cache:s}){let o,c=null;if(e){({ref:c}=e);o=e.dict.getRaw("P")||r}else o=r;t.set(\
"P",o);const l=n.fetchIfRef(o);if(!l){i.push(a);return}let h=s.get(o);if(!h){h=l.clone();s.put(o,h)}const u=h.getRaw("K");let d=u instanceof Ref?s.get(u):null;if(!d){d=n.fetchIfRef(u);d=Array.isArray(d)?d.slice():[u];const e=n.getNewTemporaryRef();h.set("K",e);s.put(e,d)}const f=d.indexOf(c);d.splice(f>=0?f+1:d.length,0,a)}}class StructElementNode{constructor(e,t){this.tree=e;this.xref=e.xref;this.dict=t;this.kids=[];this.parseKids()}get role(){const e=this.dict.get("S"),t=e instanceof Name?e.na\
me:"",{root:a}=this.tree;return a.roleMap.get(t)??t}parseKids(){let e=null;const t=this.dict.getRaw("Pg");t instanceof Ref&&(e=t.toString());const a=this.dict.get("K");if(Array.isArray(a))for(const t of a){const a=this.parseKid(e,this.xref.fetchIfRef(t));a&&this.kids.push(a)}else{const t=this.parseKid(e,a);t&&this.kids.push(t)}}parseKid(e,t){if(Number.isInteger(t))return this.tree.pageDict.objId!==e?null:new StructElement({type:zn,mcid:t,pageObjId:e});if(!(t instanceof Dict))return null;const a=\
t.getRaw("Pg");a instanceof Ref&&(e=a.toString());const r=t.get("Type")instanceof Name?t.get("Type").name:null;if("MCR"===r){if(this.tree.pageDict.objId!==e)return null;const a=t.getRaw("Stm");return new StructElement({type:$n,refObjId:a instanceof Ref?a.toString():null,pageObjId:e,mcid:t.get("MCID")})}if("OBJR"===r){if(this.tree.pageDict.objId!==e)return null;const a=t.getRaw("Obj");return new StructElement({type:Gn,refObjId:a instanceof Ref?a.toString():null,pageObjId:e})}return new StructElem\
ent({type:Kn,dict:t})}}class StructElement{constructor({type:e,dict:t=null,mcid:a=null,pageObjId:r=null,refObjId:i=null}){this.type=e;this.dict=t;this.mcid=a;this.pageObjId=r;this.refObjId=i;this.parentNode=null}}class StructTreePage{constructor(e,t){this.root=e;this.xref=e?.xref??null;this.rootDict=e?.dict??null;this.pageDict=t;this.nodes=[]}collectObjects(e){if(!(this.root&&this.rootDict&&e instanceof Ref))return null;const t=this.rootDict.get("ParentTree");if(!t)return null;const a=this.root.\
structParentIds?.get(e);if(!a)return null;const r=new Map,i=new NumberTree(t,this.xref);for(const[e]of a){const t=i.getRaw(e);t instanceof Ref&&r.set(e,t)}return r}parse(e){if(!(this.root&&this.rootDict&&e instanceof Ref))return;const t=this.rootDict.get("ParentTree");if(!t)return;const a=this.pageDict.get("StructParents"),r=this.root.structParentIds?.get(e);if(!Number.isInteger(a)&&!r)return;const i=new Map,n=new NumberTree(t,this.xref);if(Number.isInteger(a)){const e=n.get(a);if(Array.isArray(\
e))for(const t of e)t instanceof Ref&&this.addNode(this.xref.fetch(t),i)}if(r)for(const[e,t]of r){const a=n.get(e);if(a){const e=this.addNode(this.xref.fetchIfRef(a),i);1===e?.kids?.length&&e.kids[0].type===Gn&&(e.kids[0].type=t)}}}addNode(e,t,a=0){if(a>40){warn("StructTree MAX_DEPTH reached.");return null}if(!(e instanceof Dict))return null;if(t.has(e))return t.get(e);const r=new StructElementNode(this,e);t.set(e,r);const i=e.get("P");if(!(i instanceof Dict)||isName(i.get("Type"),"StructTreeRoo\
t")){this.addTopLevelNode(e,r)||t.delete(e);return r}const n=this.addNode(i,t,a+1);if(!n)return r;let s=!1;for(const t of n.kids)if(t.type===Kn&&t.dict===e){t.parentNode=r;s=!0}s||t.delete(e);return r}addTopLevelNode(e,t){const a=this.rootDict.get("K");if(!a)return!1;if(a instanceof Dict){if(a.objId!==e.objId)return!1;this.nodes[0]=t;return!0}if(!Array.isArray(a))return!0;let r=!1;for(let i=0;i<a.length;i++){const n=a[i];if(n?.toString()===e.objId){this.nodes[i]=t;r=!0}}return r}get serializable\
(){function nodeToSerializable(e,t,a=0){if(a>40){warn("StructTree too deep to be fully serialized.");return}const r=Object.create(null);r.role=e.role;r.children=[];t.children.push(r);let i=e.dict.get("Alt");"string"!=typeof i&&(i=e.dict.get("ActualText"));"string"==typeof i&&(r.alt=stringToPDFString(i));const n=e.dict.get("A");if(n instanceof Dict){const e=lookupNormalRect(n.getArray("BBox"),null);if(e)r.bbox=e;else{const e=n.get("Width"),t=n.get("Height");"number"==typeof e&&e>0&&"number"==type\
of t&&t>0&&(r.bbox=[0,0,e,t])}}const s=e.dict.get("Lang");"string"==typeof s&&(r.lang=stringToPDFString(s));for(const t of e.kids){const e=t.type===Kn?t.parentNode:null;e?nodeToSerializable(e,r,a+1):t.type===zn||t.type===$n?r.children.push({type:"content",id:`p${t.pageObjId}_mc${t.mcid}`}):t.type===Gn?r.children.push({type:"object",id:t.refObjId}):t.type===Vn&&r.children.push({type:"annotation",id:`pdfjs_internal_id_${t.refObjId}`})}}const e=Object.create(null);e.children=[];e.role="Root";for(co\
nst t of this.nodes)t&&nodeToSerializable(t,e);return e}}const Jn=function _isValidExplicitDest(e,t,a){if(!Array.isArray(a)||a.length<2)return!1;const[r,i,...n]=a;if(!e(r)&&!Number.isInteger(r))return!1;if(!t(i))return!1;const s=n.length;let o=!0;switch(i.name){case"XYZ":if(s<2||s>3)return!1;break;case"Fit":case"FitB":return 0===s;case"FitH":case"FitBH":case"FitV":case"FitBV":if(s>1)return!1;break;case"FitR":if(4!==s)return!1;o=!1;break;default:return!1}for(const e of n)if(!("number"==typeof e||\
o&&null===e))return!1;return!0}.bind(null,(e=>e instanceof Ref),isName);function fetchDest(e){e instanceof Dict&&(e=e.get("D"));return Jn(e)?e:null}function fetchRemoteDest(e){let t=e.get("D");if(t){t instanceof Name&&(t=t.name);if("string"==typeof t)return stringToPDFString(t,!0);if(Jn(t))return JSON.stringify(t)}return null}class Catalog{#re=null;#ie=null;builtInCMapCache=new Map;fontCache=new RefSetCache;globalColorSpaceCache=new GlobalColorSpaceCache;globalImageCache=new GlobalImageCache;non\
BlendModesSet=new RefSet;pageDictCache=new RefSetCache;pageIndexCache=new RefSetCache;pageKidsCountCache=new RefSetCache;standardFontDataCache=new Map;systemFontCache=new Map;constructor(e,t){this.pdfManager=e;this.xref=t;this.#ie=t.getCatalogObj();if(!(this.#ie instanceof Dict))throw new FormatError("Catalog object is not a dictionary.");this.toplevelPagesDict}cloneDict(){return this.#ie.clone()}get version(){const e=this.#ie.get("Version");if(e instanceof Name){if(Ca.test(e.name))return shadow\
(this,"version",e.name);warn(`Invalid PDF catalog version: ${e.name}`)}return shadow(this,"version",null)}get lang(){const e=this.#ie.get("Lang");return shadow(this,"lang",e&&"string"==typeof e?stringToPDFString(e):null)}get needsRendering(){const e=this.#ie.get("NeedsRendering");return shadow(this,"needsRendering","boolean"==typeof e&&e)}get collection(){let e=null;try{const t=this.#ie.get("Collection");t instanceof Dict&&t.size>0&&(e=t)}catch(e){if(e instanceof MissingDataException)throw e;inf\
o("Cannot fetch Collection entry; assuming no collection is present.")}return shadow(this,"collection",e)}get acroForm(){let e=null;try{const t=this.#ie.get("AcroForm");t instanceof Dict&&t.size>0&&(e=t)}catch(e){if(e instanceof MissingDataException)throw e;info("Cannot fetch AcroForm entry; assuming no forms are present.")}return shadow(this,"acroForm",e)}get acroFormRef(){const e=this.#ie.getRaw("AcroForm");return shadow(this,"acroFormRef",e instanceof Ref?e:null)}get metadata(){const e=this.#\
ie.getRaw("Metadata");if(!(e instanceof Ref))return shadow(this,"metadata",null);let t=null;try{const a=this.xref.fetch(e,!this.xref.encrypt?.encryptMetadata);if(a instanceof BaseStream&&a.dict instanceof Dict){const e=a.dict.get("Type"),r=a.dict.get("Subtype");if(isName(e,"Metadata")&&isName(r,"XML")){const e=stringToUTF8String(a.getString());e&&(t=new MetadataParser(e).serializable)}}}catch(e){if(e instanceof MissingDataException)throw e;info(`Skipping invalid Metadata: "${e}".`)}return shadow\
(this,"metadata",t)}get markInfo(){let e=null;try{e=this.#ne()}catch(e){if(e instanceof MissingDataException)throw e;warn("Unable to read mark info.")}return shadow(this,"markInfo",e)}#ne(){const e=this.#ie.get("MarkInfo");if(!(e instanceof Dict))return null;const t={Marked:!1,UserProperties:!1,Suspects:!1};for(const a in t){const r=e.get(a);"boolean"==typeof r&&(t[a]=r)}return t}get structTreeRoot(){let e=null;try{e=this.#se()}catch(e){if(e instanceof MissingDataException)throw e;warn("Unable r\
ead to structTreeRoot info.")}return shadow(this,"structTreeRoot",e)}#se(){const e=this.#ie.getRaw("StructTreeRoot"),t=this.xref.fetchIfRef(e);if(!(t instanceof Dict))return null;const a=new StructTreeRoot(this.xref,t,e);a.init();return a}get toplevelPagesDict(){const e=this.#ie.get("Pages");if(!(e instanceof Dict))throw new FormatError("Invalid top-level pages dictionary.");return shadow(this,"toplevelPagesDict",e)}get documentOutline(){let e=null;try{e=this.#oe()}catch(e){if(e instanceof Missi\
ngDataException)throw e;warn("Unable to read document outline.")}return shadow(this,"documentOutline",e)}#oe(){let e=this.#ie.get("Outlines");if(!(e instanceof Dict))return null;e=e.getRaw("First");if(!(e instanceof Ref))return null;const t={items:[]},a=[{obj:e,parent:t}],r=new RefSet;r.put(e);const i=this.xref,n=new Uint8ClampedArray(3);for(;a.length>0;){const t=a.shift(),s=i.fetchIfRef(t.obj);if(null===s)continue;s.has("Title")||warn("Invalid outline item encountered.");const o={url:null,dest:\
null,action:null};Catalog.parseDestDictionary({destDict:s,resultObj:o,docBaseUrl:this.baseUrl,docAttachments:this.attachments});const c=s.get("Title"),l=s.get("F")||0,h=s.getArray("C"),u=s.get("Count");let d=n;!isNumberArray(h,3)||0===h[0]&&0===h[1]&&0===h[2]||(d=ColorSpaceUtils.rgb.getRgb(h,0));const f={action:o.action,attachment:o.attachment,dest:o.dest,url:o.url,unsafeUrl:o.unsafeUrl,newWindow:o.newWindow,setOCGState:o.setOCGState,title:"string"==typeof c?stringToPDFString(c):"",color:d,count\
:Number.isInteger(u)?u:void 0,bold:!!(2&l),italic:!!(1&l),items:[]};t.parent.items.push(f);e=s.getRaw("First");if(e instanceof Ref&&!r.has(e)){a.push({obj:e,parent:f});r.put(e)}e=s.getRaw("Next");if(e instanceof Ref&&!r.has(e)){a.push({obj:e,parent:t.parent});r.put(e)}}return t.items.length>0?t.items:null}get permissions(){let e=null;try{e=this.#ce()}catch(e){if(e instanceof MissingDataException)throw e;warn("Unable to read permissions.")}return shadow(this,"permissions",e)}#ce(){const e=this.xr\
ef.trailer.get("Encrypt");if(!(e instanceof Dict))return null;let t=e.get("P");if("number"!=typeof t)return null;t+=2**32;const a=[];for(const e in w){const r=w[e];t&r&&a.push(r)}return a}get optionalContentConfig(){let e=null;try{const t=this.#ie.get("OCProperties");if(!t)return shadow(this,"optionalContentConfig",null);const a=t.get("D");if(!a)return shadow(this,"optionalContentConfig",null);const r=t.get("OCGs");if(!Array.isArray(r))return shadow(this,"optionalContentConfig",null);const i=new\
 RefSetCache;for(const e of r)e instanceof Ref&&!i.has(e)&&i.put(e,this.#le(e));e=this.#he(a,i)}catch(e){if(e instanceof MissingDataException)throw e;warn(`Unable to read optional content config: ${e}`)}return shadow(this,"optionalContentConfig",e)}#le(e){const t=this.xref.fetch(e),a={id:e.toString(),name:null,intent:null,usage:{print:null,view:null},rbGroups:[]},r=t.get("Name");"string"==typeof r&&(a.name=stringToPDFString(r));let i=t.getArray("Intent");Array.isArray(i)||(i=[i]);i.every((e=>e i\
nstanceof Name))&&(a.intent=i.map((e=>e.name)));const n=t.get("Usage");if(!(n instanceof Dict))return a;const s=a.usage,o=n.get("Print");if(o instanceof Dict){const e=o.get("PrintState");if(e instanceof Name)switch(e.name){case"ON":case"OFF":s.print={printState:e.name}}}const c=n.get("View");if(c instanceof Dict){const e=c.get("ViewState");if(e instanceof Name)switch(e.name){case"ON":case"OFF":s.view={viewState:e.name}}}return a}#he(e,t){function parseOnOff(e){const a=[];if(Array.isArray(e))for(\
const r of e)r instanceof Ref&&t.has(r)&&a.push(r.toString());return a}function parseOrder(e,a=0){if(!Array.isArray(e))return null;const i=[];for(const n of e){if(n instanceof Ref&&t.has(n)){r.put(n);i.push(n.toString());continue}const e=parseNestedOrder(n,a);e&&i.push(e)}if(a>0)return i;const n=[];for(const[e]of t.items())r.has(e)||n.push(e.toString());n.length&&i.push({name:null,order:n});return i}function parseNestedOrder(e,t){if(++t>i){warn("parseNestedOrder - reached MAX_NESTED_LEVELS.");re\
turn null}const r=a.fetchIfRef(e);if(!Array.isArray(r))return null;const n=a.fetchIfRef(r[0]);if("string"!=typeof n)return null;const s=parseOrder(r.slice(1),t);return s?.length?{name:stringToPDFString(n),order:s}:null}const a=this.xref,r=new RefSet,i=10;!function parseRBGroups(e){if(Array.isArray(e))for(const r of e){const e=a.fetchIfRef(r);if(!Array.isArray(e)||!e.length)continue;const i=new Set;for(const a of e)if(a instanceof Ref&&t.has(a)&&!i.has(a.toString())){i.add(a.toString());t.get(a).\
rbGroups.push(i)}}}(e.get("RBGroups"));return{name:"string"==typeof e.get("Name")?stringToPDFString(e.get("Name")):null,creator:"string"==typeof e.get("Creator")?stringToPDFString(e.get("Creator")):null,baseState:e.get("BaseState")instanceof Name?e.get("BaseState").name:null,on:parseOnOff(e.get("ON")),off:parseOnOff(e.get("OFF")),order:parseOrder(e.get("Order")),groups:[...t]}}setActualNumPages(e=null){this.#re=e}get hasActualNumPages(){return null!==this.#re}get _pagesCount(){const e=this.tople\
velPagesDict.get("Count");if(!Number.isInteger(e))throw new FormatError("Page count in top-level pages dictionary is not an integer.");return shadow(this,"_pagesCount",e)}get numPages(){return this.#re??this._pagesCount}get destinations(){const e=this.#ue(),t=Object.create(null);for(const a of e)if(a instanceof NameTree)for(const[e,r]of a.getAll()){const a=fetchDest(r);a&&(t[stringToPDFString(e,!0)]=a)}else if(a instanceof Dict)for(const[e,r]of a){const a=fetchDest(r);a&&(t[stringToPDFString(e,!\
0)]||=a)}return shadow(this,"destinations",t)}getDestination(e){if(this.hasOwnProperty("destinations"))return this.destinations[e]??null;const t=this.#ue();for(const a of t)if(a instanceof NameTree||a instanceof Dict){const t=fetchDest(a.get(e));if(t)return t}if(t.length){const t=this.destinations[e];if(t)return t}return null}#ue(){const e=this.#ie.get("Names"),t=[];e?.has("Dests")&&t.push(new NameTree(e.getRaw("Dests"),this.xref));this.#ie.has("Dests")&&t.push(this.#ie.get("Dests"));return t}ge\
t pageLabels(){let e=null;try{e=this.#de()}catch(e){if(e instanceof MissingDataException)throw e;warn("Unable to read page labels.")}return shadow(this,"pageLabels",e)}#de(){const e=this.#ie.getRaw("PageLabels");if(!e)return null;const t=new Array(this.numPages);let a=null,r="";const i=new NumberTree(e,this.xref).getAll();let n="",s=1;for(let e=0,o=this.numPages;e<o;e++){const o=i.get(e);if(void 0!==o){if(!(o instanceof Dict))throw new FormatError("PageLabel is not a dictionary.");if(o.has("Type\
")&&!isName(o.get("Type"),"PageLabel"))throw new FormatError("Invalid type in PageLabel dictionary.");if(o.has("S")){const e=o.get("S");if(!(e instanceof Name))throw new FormatError("Invalid style in PageLabel dictionary.");a=e.name}else a=null;if(o.has("P")){const e=o.get("P");if("string"!=typeof e)throw new FormatError("Invalid prefix in PageLabel dictionary.");r=stringToPDFString(e)}else r="";if(o.has("St")){const e=o.get("St");if(!(Number.isInteger(e)&&e>=1))throw new FormatError("Invalid st\
art in PageLabel dictionary.");s=e}else s=1}switch(a){case"D":n=s;break;case"R":case"r":n=toRomanNumerals(s,"r"===a);break;case"A":case"a":const e=26,t="a"===a?97:65,r=s-1;n=String.fromCharCode(t+r%e).repeat(Math.floor(r/e)+1);break;default:if(a)throw new FormatError(`Invalid style "${a}" in PageLabel dictionary.`);n=""}t[e]=r+n;s++}return t}get pageLayout(){const e=this.#ie.get("PageLayout");let t="";if(e instanceof Name)switch(e.name){case"SinglePage":case"OneColumn":case"TwoColumnLeft":case"T\
woColumnRight":case"TwoPageLeft":case"TwoPageRight":t=e.name}return shadow(this,"pageLayout",t)}get pageMode(){const e=this.#ie.get("PageMode");let t="UseNone";if(e instanceof Name)switch(e.name){case"UseNone":case"UseOutlines":case"UseThumbs":case"FullScreen":case"UseOC":case"UseAttachments":t=e.name}return shadow(this,"pageMode",t)}get viewerPreferences(){const e=this.#ie.get("ViewerPreferences");if(!(e instanceof Dict))return shadow(this,"viewerPreferences",null);let t=null;for(const[a,r]of e\
){let e;switch(a){case"HideToolbar":case"HideMenubar":case"HideWindowUI":case"FitWindow":case"CenterWindow":case"DisplayDocTitle":case"PickTrayByPDFSize":"boolean"==typeof r&&(e=r);break;case"NonFullScreenPageMode":if(r instanceof Name)switch(r.name){case"UseNone":case"UseOutlines":case"UseThumbs":case"UseOC":e=r.name;break;default:e="UseNone"}break;case"Direction":if(r instanceof Name)switch(r.name){case"L2R":case"R2L":e=r.name;break;default:e="L2R"}break;case"ViewArea":case"ViewClip":case"Prin\
tArea":case"PrintClip":if(r instanceof Name)switch(r.name){case"MediaBox":case"CropBox":case"BleedBox":case"TrimBox":case"ArtBox":e=r.name;break;default:e="CropBox"}break;case"PrintScaling":if(r instanceof Name)switch(r.name){case"None":case"AppDefault":e=r.name;break;default:e="AppDefault"}break;case"Duplex":if(r instanceof Name)switch(r.name){case"Simplex":case"DuplexFlipShortEdge":case"DuplexFlipLongEdge":e=r.name;break;default:e="None"}break;case"PrintPageRange":if(Array.isArray(r)&&r.length\
%2==0){r.every(((e,t,a)=>Number.isInteger(e)&&e>0&&(0===t||e>=a[t-1])&&e<=this.numPages))&&(e=r)}break;case"NumCopies":Number.isInteger(r)&&r>0&&(e=r);break;default:warn(`Ignoring non-standard key in ViewerPreferences: ${a}.`);continue}if(void 0!==e){t??=Object.create(null);t[a]=e}else warn(`Bad value, for key "${a}", in ViewerPreferences: ${r}.`)}return shadow(this,"viewerPreferences",t)}get openAction(){const e=this.#ie.get("OpenAction"),t=Object.create(null);if(e instanceof Dict){const a=new \
Dict(this.xref);a.set("A",e);const r={url:null,dest:null,action:null};Catalog.parseDestDictionary({destDict:a,resultObj:r});Array.isArray(r.dest)?t.dest=r.dest:r.action&&(t.action=r.action)}else Jn(e)&&(t.dest=e);return shadow(this,"openAction",objectSize(t)>0?t:null)}get attachments(){const e=this.#ie.get("Names");let t=null;if(e instanceof Dict&&e.has("EmbeddedFiles")){const a=new NameTree(e.getRaw("EmbeddedFiles"),this.xref);for(const[e,r]of a.getAll()){const a=new FileSpec(r,this.xref);t??=O\
bject.create(null);t[stringToPDFString(e,!0)]=a.serializable}}return shadow(this,"attachments",t)}get xfaImages(){const e=this.#ie.get("Names");let t=null;if(e instanceof Dict&&e.has("XFAImages")){const a=new NameTree(e.getRaw("XFAImages"),this.xref);for(const[e,r]of a.getAll())if(r instanceof BaseStream){t??=new Map;t.set(stringToPDFString(e,!0),r.getBytes())}}return shadow(this,"xfaImages",t)}#fe(){const e=this.#ie.get("Names");let t=null;function appendIfJavaScriptDict(e,a){if(!(a instanceof \
Dict))return;if(!isName(a.get("S"),"JavaScript"))return;let r=a.get("JS");if(r instanceof BaseStream)r=r.getString();else if("string"!=typeof r)return;r=stringToPDFString(r,!0).replaceAll("\\0","");r&&(t||=new Map).set(e,r)}if(e instanceof Dict&&e.has("JavaScript")){const t=new NameTree(e.getRaw("JavaScript"),this.xref);for(const[e,a]of t.getAll())appendIfJavaScriptDict(stringToPDFString(e,!0),a)}const a=this.#ie.get("OpenAction");a&&appendIfJavaScriptDict("OpenAction",a);return t}get jsActions()\
{const e=this.#fe();let t=collectActions(this.xref,this.#ie,we);if(e){t||=Object.create(null);for(const[a,r]of e)a in t?t[a].push(r):t[a]=[r]}return shadow(this,"jsActions",t)}async cleanup(e=!1){clearGlobalCaches();this.globalColorSpaceCache.clear();this.globalImageCache.clear(e);this.pageKidsCountCache.clear();this.pageIndexCache.clear();this.pageDictCache.clear();this.nonBlendModesSet.clear();for(const{dict:e}of await Promise.all(this.fontCache))delete e.cacheKey;this.fontCache.clear();this.b\
uiltInCMapCache.clear();this.standardFontDataCache.clear();this.systemFontCache.clear()}async getPageDict(e){const t=[this.toplevelPagesDict],a=new RefSet,r=this.#ie.getRaw("Pages");r instanceof Ref&&a.put(r);const i=this.xref,n=this.pageKidsCountCache,s=this.pageIndexCache,o=this.pageDictCache;let c=0;for(;t.length;){const r=t.pop();if(r instanceof Ref){const l=n.get(r);if(l>=0&&c+l<=e){c+=l;continue}if(a.has(r))throw new FormatError("Pages tree contains circular reference.");a.put(r);const h=a\
wait(o.get(r)||i.fetchAsync(r));if(h instanceof Dict){let t=h.getRaw("Type");t instanceof Ref&&(t=await i.fetchAsync(t));if(isName(t,"Page")||!h.has("Kids")){n.has(r)||n.put(r,1);s.has(r)||s.put(r,c);if(c===e)return[h,r];c++;continue}}t.push(h);continue}if(!(r instanceof Dict))throw new FormatError("Page dictionary kid reference points to wrong type of object.");const{objId:l}=r;let h=r.getRaw("Count");h instanceof Ref&&(h=await i.fetchAsync(h));if(Number.isInteger(h)&&h>=0){l&&!n.has(l)&&n.put(\
l,h);if(c+h<=e){c+=h;continue}}let u=r.getRaw("Kids");u instanceof Ref&&(u=await i.fetchAsync(u));if(!Array.isArray(u)){let t=r.getRaw("Type");t instanceof Ref&&(t=await i.fetchAsync(t));if(isName(t,"Page")||!r.has("Kids")){if(c===e)return[r,null];c++;continue}throw new FormatError("Page dictionary kids object is not an array.")}for(let e=u.length-1;e>=0;e--){const a=u[e];t.push(a);r===this.toplevelPagesDict&&a instanceof Ref&&!o.has(a)&&o.put(a,i.fetchAsync(a))}}throw new Error(`Page index ${e}\
 not found.`)}async getAllPageDicts(e=!1){const{ignoreErrors:t}=this.pdfManager.evaluatorOptions,a=[{currentNode:this.toplevelPagesDict,posInKids:0}],r=new RefSet,i=this.#ie.getRaw("Pages");i instanceof Ref&&r.put(i);const n=new Map,s=this.xref,o=this.pageIndexCache;let c=0;function addPageDict(e,t){t&&!o.has(t)&&o.put(t,c);n.set(c++,[e,t])}function addPageError(a){if(a instanceof XRefEntryException&&!e)throw a;if(e&&t&&0===c){warn(`getAllPageDicts - Skipping invalid first page: "${a}".`);a=Dict\
.empty}n.set(c++,[a,null])}for(;a.length>0;){const e=a.at(-1),{currentNode:t,posInKids:i}=e;let n=t.getRaw("Kids");if(n instanceof Ref)try{n=await s.fetchAsync(n)}catch(e){addPageError(e);break}if(!Array.isArray(n)){addPageError(new FormatError("Page dictionary kids object is not an array."));break}if(i>=n.length){a.pop();continue}const o=n[i];let c;if(o instanceof Ref){if(r.has(o)){addPageError(new FormatError("Pages tree contains circular reference."));break}r.put(o);try{c=await s.fetchAsync(o\
)}catch(e){addPageError(e);break}}else c=o;if(!(c instanceof Dict)){addPageError(new FormatError("Page dictionary kid reference points to wrong type of object."));break}let l=c.getRaw("Type");if(l instanceof Ref)try{l=await s.fetchAsync(l)}catch(e){addPageError(e);break}isName(l,"Page")||!c.has("Kids")?addPageDict(c,o instanceof Ref?o:null):a.push({currentNode:c,posInKids:0});e.posInKids++}return n}getPageIndex(e){const t=this.pageIndexCache.get(e);if(void 0!==t)return Promise.resolve(t);const a\
=this.xref;let r=0;const next=t=>function pagesBeforeRef(t){let r,i=0;return a.fetchAsync(t).then((function(a){if(isRefsEqual(t,e)&&!isDict(a,"Page")&&!(a instanceof Dict&&!a.has("Type")&&a.has("Contents")))throw new FormatError("The reference does not point to a /Page dictionary.");if(!a)return null;if(!(a instanceof Dict))throw new FormatError("Node must be a dictionary.");r=a.getRaw("Parent");return a.getAsync("Parent")})).then((function(e){if(!e)return null;if(!(e instanceof Dict))throw new \
FormatError("Parent must be a dictionary.");return e.getAsync("Kids")})).then((function(e){if(!e)return null;const n=[];let s=!1;for(const r of e){if(!(r instanceof Ref))throw new FormatError("Kid must be a reference.");if(isRefsEqual(r,t)){s=!0;break}n.push(a.fetchAsync(r).then((function(e){if(!(e instanceof Dict))throw new FormatError("Kid node must be a dictionary.");e.has("Count")?i+=e.get("Count"):i++})))}if(!s)throw new FormatError("Kid reference not found in parent\'s kids.");return Promis\
e.all(n).then((()=>[i,r]))}))}(t).then((t=>{if(!t){this.pageIndexCache.put(e,r);return r}const[a,i]=t;r+=a;return next(i)}));return next(e)}get baseUrl(){const e=this.#ie.get("URI");if(e instanceof Dict){const t=e.get("Base");if("string"==typeof t){const e=createValidAbsoluteUrl(t,null,{tryConvertEncoding:!0});if(e)return shadow(this,"baseUrl",e.href)}}return shadow(this,"baseUrl",this.pdfManager.docBaseUrl)}static parseDestDictionary({destDict:e,resultObj:t,docBaseUrl:a=null,docAttachments:r=nu\
ll}){if(!(e instanceof Dict)){warn("parseDestDictionary: `destDict` must be a dictionary.");return}let i,n,s=e.get("A");if(!(s instanceof Dict))if(e.has("Dest"))s=e.get("Dest");else{s=e.get("AA");s instanceof Dict&&(s.has("D")?s=s.get("D"):s.has("U")&&(s=s.get("U")))}if(s instanceof Dict){const e=s.get("S");if(!(e instanceof Name)){warn("parseDestDictionary: Invalid type in Action dictionary.");return}const a=e.name;switch(a){case"ResetForm":const e=s.get("Flags"),o=!(1&("number"==typeof e?e:0))\
,c=[],l=[];for(const e of s.get("Fields")||[])e instanceof Ref?l.push(e.toString()):"string"==typeof e&&c.push(stringToPDFString(e));t.resetForm={fields:c,refs:l,include:o};break;case"URI":i=s.get("URI");i instanceof Name&&(i="/"+i.name);break;case"GoTo":n=s.get("D");break;case"Launch":case"GoToR":const h=s.get("F");if(h instanceof Dict){const e=new FileSpec(h,null,!0),{rawFilename:t}=e.serializable;i=t}else"string"==typeof h&&(i=h);const u=fetchRemoteDest(s);u&&"string"==typeof i&&(i=i.split("#\
",1)[0]+"#"+u);const d=s.get("NewWindow");"boolean"==typeof d&&(t.newWindow=d);break;case"GoToE":const f=s.get("T");let g;if(r&&f instanceof Dict){const e=f.get("R"),t=f.get("N");isName(e,"C")&&"string"==typeof t&&(g=r[stringToPDFString(t,!0)])}if(g){t.attachment=g;const e=fetchRemoteDest(s);e&&(t.attachmentDest=e)}else warn(\'parseDestDictionary - unimplemented "GoToE" action.\');break;case"Named":const p=s.get("N");p instanceof Name&&(t.action=p.name);break;case"SetOCGState":const m=s.get("State\
"),b=s.get("PreserveRB");if(!Array.isArray(m)||0===m.length)break;const y=[];for(const e of m)if(e instanceof Name)switch(e.name){case"ON":case"OFF":case"Toggle":y.push(e.name)}else e instanceof Ref&&y.push(e.toString());if(y.length!==m.length)break;t.setOCGState={state:y,preserveRB:"boolean"!=typeof b||b};break;case"JavaScript":const w=s.get("JS");let x;w instanceof BaseStream?x=w.getString():"string"==typeof w&&(x=w);const S=x&&recoverJsURL(stringToPDFString(x,!0));if(S){i=S.url;t.newWindow=S.\
newWindow;break}default:if("JavaScript"===a||"SubmitForm"===a)break;warn(`parseDestDictionary - unsupported action: "${a}".`)}}else e.has("Dest")&&(n=e.get("Dest"));if("string"==typeof i){const e=createValidAbsoluteUrl(i,a,{addDefaultProtocol:!0,tryConvertEncoding:!0});e&&(t.url=e.href);t.unsafeUrl=i}if(n){n instanceof Name&&(n=n.name);"string"==typeof n?t.dest=stringToPDFString(n,!0):Jn(n)&&(t.dest=n)}}}function addChildren(e,t){if(e instanceof Dict)e=e.getRawValues();else if(e instanceof BaseS\
tream)e=e.dict.getRawValues();else if(!Array.isArray(e))return;for(const r of e)((a=r)instanceof Ref||a instanceof Dict||a instanceof BaseStream||Array.isArray(a))&&t.push(r);var a}class ObjectLoader{refSet=new RefSet;constructor(e,t,a){this.dict=e;this.keys=t;this.xref=a}async load(){const{keys:e,dict:t}=this,a=[];for(const r of e){const e=t.getRaw(r);void 0!==e&&a.push(e)}await this.#ge(a);this.refSet=null}async#ge(e){const t=[],a=[];for(;e.length;){let r=e.pop();if(r instanceof Ref){if(this.r\
efSet.has(r))continue;try{this.refSet.put(r);r=this.xref.fetch(r)}catch(e){if(!(e instanceof MissingDataException)){warn(`ObjectLoader.#walk - requesting all data: "${e}".`);await this.xref.stream.manager.requestAllChunks();return}t.push(r);a.push({begin:e.begin,end:e.end})}}if(r instanceof BaseStream){const e=r.getBaseStreams();if(e){let i=!1;for(const t of e)if(!t.isDataLoaded){i=!0;a.push({begin:t.start,end:t.end})}i&&t.push(r)}}addChildren(r,e)}if(a.length){await this.xref.stream.manager.req\
uestRanges(a);for(const e of t)e instanceof Ref&&this.refSet.remove(e);await this.#ge(t)}}static async load(e,t,a){if(a.stream.isDataLoaded)return;const r=new ObjectLoader(e,t,a);await r.load()}}const Yn=Symbol(),Zn=Symbol(),Qn=Symbol(),es=Symbol(),ts=Symbol(),as=Symbol(),rs=Symbol(),is=Symbol(),ns=Symbol(),ss=Symbol("content"),os=Symbol("data"),cs=Symbol(),ls=Symbol("extra"),hs=Symbol(),us=Symbol(),ds=Symbol(),fs=Symbol(),gs=Symbol(),ps=Symbol(),ms=Symbol(),bs=Symbol(),ys=Symbol(),ws=Symbol(),x\
s=Symbol(),Ss=Symbol(),As=Symbol(),ks=Symbol(),Cs=Symbol(),vs=Symbol(),Fs=Symbol(),Is=Symbol(),Ts=Symbol(),Os=Symbol(),Ms=Symbol(),Ds=Symbol(),Bs=Symbol(),Rs=Symbol(),Ns=Symbol(),Es=Symbol(),Ls=Symbol(),js=Symbol(),_s=Symbol(),Us=Symbol(),Xs=Symbol(),qs=Symbol(),Hs=Symbol("namespaceId"),Ws=Symbol("nodeName"),zs=Symbol(),$s=Symbol(),Gs=Symbol(),Vs=Symbol(),Ks=Symbol(),Js=Symbol(),Ys=Symbol(),Zs=Symbol(),Qs=Symbol("root"),eo=Symbol(),to=Symbol(),ao=Symbol(),ro=Symbol(),io=Symbol(),no=Symbol(),so=S\
ymbol(),oo=Symbol(),co=Symbol(),lo=Symbol(),ho=Symbol(),uo=Symbol("uid"),fo=Symbol(),go={config:{id:0,check:e=>e.startsWith("http://www.xfa.org/schema/xci/")},connectionSet:{id:1,check:e=>e.startsWith("http://www.xfa.org/schema/xfa-connection-set/")},datasets:{id:2,check:e=>e.startsWith("http://www.xfa.org/schema/xfa-data/")},form:{id:3,check:e=>e.startsWith("http://www.xfa.org/schema/xfa-form/")},localeSet:{id:4,check:e=>e.startsWith("http://www.xfa.org/schema/xfa-locale-set/")},pdf:{id:5,check\
:e=>"http://ns.adobe.com/xdp/pdf/"===e},signature:{id:6,check:e=>"http://www.w3.org/2000/09/xmldsig#"===e},sourceSet:{id:7,check:e=>e.startsWith("http://www.xfa.org/schema/xfa-source-set/")},stylesheet:{id:8,check:e=>"http://www.w3.org/1999/XSL/Transform"===e},template:{id:9,check:e=>e.startsWith("http://www.xfa.org/schema/xfa-template/")},xdc:{id:10,check:e=>e.startsWith("http://www.xfa.org/schema/xdc/")},xdp:{id:11,check:e=>"http://ns.adobe.com/xdp/"===e},xfdf:{id:12,check:e=>"http://ns.adobe.\
com/xfdf/"===e},xhtml:{id:13,check:e=>"http://www.w3.org/1999/xhtml"===e},xmpmeta:{id:14,check:e=>"http://ns.adobe.com/xmpmeta/"===e}},po={pt:e=>e,cm:e=>e/2.54*72,mm:e=>e/25.4*72,in:e=>72*e,px:e=>e},mo=/([+-]?\\d+\\.?\\d*)(.*)/;function stripQuotes(e){return e.startsWith("\'")||e.startsWith(\'"\')?e.slice(1,-1):e}function getInteger({data:e,defaultValue:t,validate:a}){if(!e)return t;e=e.trim();const r=parseInt(e,10);return!isNaN(r)&&a(r)?r:t}function getFloat({data:e,defaultValue:t,validate:a}){if(!e)\
return t;e=e.trim();const r=parseFloat(e);return!isNaN(r)&&a(r)?r:t}function getKeyword({data:e,defaultValue:t,validate:a}){return e&&a(e=e.trim())?e:t}function getStringOption(e,t){return getKeyword({data:e,defaultValue:t[0],validate:e=>t.includes(e)})}function getMeasurement(e,t="0"){t||="0";if(!e)return getMeasurement(t);const a=e.trim().match(mo);if(!a)return getMeasurement(t);const[,r,i]=a,n=parseFloat(r);if(isNaN(n))return getMeasurement(t);if(0===n)return 0;const s=po[i];return s?s(n):n}f\
unction getRatio(e){if(!e)return{num:1,den:1};const t=e.split(":",2).map((e=>parseFloat(e.trim()))).filter((e=>!isNaN(e)));1===t.length&&t.push(1);if(0===t.length)return{num:1,den:1};const[a,r]=t;return{num:a,den:r}}function getRelevant(e){return e?e.trim().split(/\\s+/).map((e=>({excluded:"-"===e[0],viewname:e.substring(1)}))):[]}class HTMLResult{static get FAILURE(){return shadow(this,"FAILURE",new HTMLResult(!1,null,null,null))}static get EMPTY(){return shadow(this,"EMPTY",new HTMLResult(!0,nu\
ll,null,null))}constructor(e,t,a,r){this.success=e;this.html=t;this.bbox=a;this.breakNode=r}isBreak(){return!!this.breakNode}static breakNode(e){return new HTMLResult(!1,null,null,e)}static success(e,t=null){return new HTMLResult(!0,e,t,null)}}class FontFinder{constructor(e){this.fonts=new Map;this.cache=new Map;this.warned=new Set;this.defaultFont=null;this.add(e)}add(e,t=null){for(const t of e)this.addPdfFont(t);for(const e of this.fonts.values())e.regular||(e.regular=e.italic||e.bold||e.boldi\
talic);if(!t||0===t.size)return;const a=this.fonts.get("PdfJS-Fallback-PdfJS-XFA");for(const e of t)this.fonts.set(e,a)}addPdfFont(e){const t=e.cssFontInfo,a=t.fontFamily;let r=this.fonts.get(a);if(!r){r=Object.create(null);this.fonts.set(a,r);this.defaultFont||(this.defaultFont=r)}let i="";const n=parseFloat(t.fontWeight);0!==parseFloat(t.italicAngle)?i=n>=700?"bolditalic":"italic":n>=700&&(i="bold");if(!i){(e.name.includes("Bold")||e.psName?.includes("Bold"))&&(i="bold");(e.name.includes("Ital\
ic")||e.name.endsWith("It")||e.psName?.includes("Italic")||e.psName?.endsWith("It"))&&(i+="italic")}i||(i="regular");r[i]=e}getDefault(){return this.defaultFont}find(e,t=!0){let a=this.fonts.get(e)||this.cache.get(e);if(a)return a;const r=/,|-|_| |bolditalic|bold|italic|regular|it/gi;let i=e.replaceAll(r,"");a=this.fonts.get(i);if(a){this.cache.set(e,a);return a}i=i.toLowerCase();const n=[];for(const[e,t]of this.fonts.entries())e.replaceAll(r,"").toLowerCase().startsWith(i)&&n.push(t);if(0===n.l\
ength)for(const[,e]of this.fonts.entries())e.regular.name?.replaceAll(r,"").toLowerCase().startsWith(i)&&n.push(e);if(0===n.length){i=i.replaceAll(/psmt|mt/gi,"");for(const[e,t]of this.fonts.entries())e.replaceAll(r,"").toLowerCase().startsWith(i)&&n.push(t)}if(0===n.length)for(const e of this.fonts.values())e.regular.name?.replaceAll(r,"").toLowerCase().startsWith(i)&&n.push(e);if(n.length>=1){1!==n.length&&t&&warn(`XFA - Too many choices to guess the correct font: ${e}`);this.cache.set(e,n[0])\
;return n[0]}if(t&&!this.warned.has(e)){this.warned.add(e);warn(`XFA - Cannot find the font: ${e}`)}return null}}function selectFont(e,t){return"italic"===e.posture?"bold"===e.weight?t.bolditalic:t.italic:"bold"===e.weight?t.bold:t.regular}class FontInfo{constructor(e,t,a,r){this.lineHeight=a;this.paraMargin=t||{top:0,bottom:0,left:0,right:0};if(!e){[this.pdfFont,this.xfaFont]=this.defaultFont(r);return}this.xfaFont={typeface:e.typeface,posture:e.posture,weight:e.weight,size:e.size,letterSpacing\
:e.letterSpacing};const i=r.find(e.typeface);if(i){this.pdfFont=selectFont(e,i);this.pdfFont||([this.pdfFont,this.xfaFont]=this.defaultFont(r))}else[this.pdfFont,this.xfaFont]=this.defaultFont(r)}defaultFont(e){const t=e.find("Helvetica",!1)||e.find("Myriad Pro",!1)||e.find("Arial",!1)||e.getDefault();if(t?.regular){const e=t.regular;return[e,{typeface:e.cssFontInfo.fontFamily,posture:"normal",weight:"normal",size:10,letterSpacing:0}]}return[null,{typeface:"Courier",posture:"normal",weight:"norm\
al",size:10,letterSpacing:0}]}}class FontSelector{constructor(e,t,a,r){this.fontFinder=r;this.stack=[new FontInfo(e,t,a,r)]}pushData(e,t,a){const r=this.stack.at(-1);for(const t of["typeface","posture","weight","size","letterSpacing"])e[t]||(e[t]=r.xfaFont[t]);for(const e of["top","bottom","left","right"])isNaN(t[e])&&(t[e]=r.paraMargin[e]);const i=new FontInfo(e,t,a||r.lineHeight,this.fontFinder);i.pdfFont||(i.pdfFont=r.pdfFont);this.stack.push(i)}popFont(){this.stack.pop()}topFont(){return thi\
s.stack.at(-1)}}class TextMeasure{constructor(e,t,a,r){this.glyphs=[];this.fontSelector=new FontSelector(e,t,a,r);this.extraHeight=0}pushData(e,t,a){this.fontSelector.pushData(e,t,a)}popFont(e){return this.fontSelector.popFont()}addPara(){const e=this.fontSelector.topFont();this.extraHeight+=e.paraMargin.top+e.paraMargin.bottom}addString(e){if(!e)return;const t=this.fontSelector.topFont(),a=t.xfaFont.size;if(t.pdfFont){const r=t.xfaFont.letterSpacing,i=t.pdfFont,n=i.lineHeight||1.2,s=t.lineHeigh\
t||Math.max(1.2,n)*a,o=n-(void 0===i.lineGap?.2:i.lineGap),c=Math.max(1,o)*a,l=a/1e3,h=i.defaultWidth||i.charsToGlyphs(" ")[0].width;for(const t of e.split(/[\\u2029\\n]/)){const e=i.encodeString(t).join(""),a=i.charsToGlyphs(e);for(const e of a){const t=e.width||h;this.glyphs.push([t*l+r,s,c,e.unicode,!1])}this.glyphs.push([0,0,0,"\\n",!0])}this.glyphs.pop()}else{for(const t of e.split(/[\\u2029\\n]/)){for(const e of t.split(""))this.glyphs.push([a,1.2*a,a,e,!1]);this.glyphs.push([0,0,0,"\\n",!0])}th\
is.glyphs.pop()}}compute(e){let t=-1,a=0,r=0,i=0,n=0,s=0,o=!1,c=!0;for(let l=0,h=this.glyphs.length;l<h;l++){const[h,u,d,f,g]=this.glyphs[l],p=" "===f,m=c?d:u;if(g){r=Math.max(r,n);n=0;i+=s;s=m;t=-1;a=0;c=!1}else if(p)if(n+h>e){r=Math.max(r,n);n=0;i+=s;s=m;t=-1;a=0;o=!0;c=!1}else{s=Math.max(m,s);a=n;n+=h;t=l}else if(n+h>e){i+=s;s=m;if(-1!==t){l=t;r=Math.max(r,a);n=0;t=-1;a=0}else{r=Math.max(r,n);n=h}o=!0;c=!1}else{n+=h;s=Math.max(m,s)}}r=Math.max(r,n);i+=s+this.extraHeight;return{width:1.02*r,he\
ight:i,isBroken:o}}}const bo=/^[^.[]+/,yo=/^[^\\]]+/,wo=0,xo=1,So=2,Ao=3,ko=4,Co=new Map([["$data",(e,t)=>e.datasets?e.datasets.data:e],["$record",(e,t)=>(e.datasets?e.datasets.data:e)[Ss]()[0]],["$template",(e,t)=>e.template],["$connectionSet",(e,t)=>e.connectionSet],["$form",(e,t)=>e.form],["$layout",(e,t)=>e.layout],["$host",(e,t)=>e.host],["$dataWindow",(e,t)=>e.dataWindow],["$event",(e,t)=>e.event],["!",(e,t)=>e.datasets],["$xfa",(e,t)=>e],["xfa",(e,t)=>e],["$",(e,t)=>t]]),vo=new WeakMap;fun\
ction parseExpression(e,t,a=!0){let r=e.match(bo);if(!r)return null;let[i]=r;const n=[{name:i,cacheName:"."+i,index:0,js:null,formCalc:null,operator:wo}];let s=i.length;for(;s<e.length;){const c=s;if("["===e.charAt(s++)){r=e.slice(s).match(yo);if(!r){warn("XFA - Invalid index in SOM expression");return null}n.at(-1).index="*"===(o=(o=r[0]).trim())?1/0:parseInt(o,10)||0;s+=r[0].length+1;continue}let l;switch(e.charAt(s)){case".":if(!t)return null;s++;l=xo;break;case"#":s++;l=So;break;case"[":if(a\
){warn("XFA - SOM expression contains a FormCalc subexpression which is not supported for now.");return null}l=Ao;break;case"(":if(a){warn("XFA - SOM expression contains a JavaScript subexpression which is not supported for now.");return null}l=ko;break;default:l=wo}r=e.slice(s).match(bo);if(!r)break;[i]=r;s+=i.length;n.push({name:i,cacheName:e.slice(c,s),operator:l,index:0,js:null,formCalc:null})}var o;return n}function searchNode(e,t,a,r=!0,i=!0){const n=parseExpression(a,r);if(!n)return null;\
const s=Co.get(n[0].name);let o,c=0;if(s){o=!0;e=[s(e,t)];c=1}else{o=null===t;e=[t||e]}for(let a=n.length;c<a;c++){const{name:a,cacheName:r,operator:s,index:l}=n[c],h=[];for(const t of e){if(!t.isXFAObject)continue;let e,n;if(i){n=vo.get(t);if(!n){n=new Map;vo.set(t,n)}e=n.get(r)}if(!e){switch(s){case wo:e=t[ms](a,!1);break;case xo:e=t[ms](a,!0);break;case So:e=t[ps](a);e=e.isXFAObjectArray?e.children:[e]}i&&n.set(r,e)}e.length>0&&h.push(e)}if(0!==h.length||o||0!==c)e=isFinite(l)?h.filter((e=>l<\
e.length)).map((e=>e[l])):h.flat();else{const a=t[vs]();if(!(t=a))return null;c=-1;e=[t]}}return 0===e.length?null:e}function createDataNode(e,t,a){const r=parseExpression(a);if(!r)return null;if(r.some((e=>e.operator===xo)))return null;const i=Co.get(r[0].name);let n=0;if(i){e=i(e,t);n=1}else e=t||e;for(let t=r.length;n<t;n++){const{name:t,operator:a,index:i}=r[n];if(!isFinite(i)){r[n].index=0;return e.createNodes(r.slice(n))}let s;switch(a){case wo:s=e[ms](t,!1);break;case xo:s=e[ms](t,!0);bre\
ak;case So:s=e[ps](t);s=s.isXFAObjectArray?s.children:[s]}if(0===s.length)return e.createNodes(r.slice(n));if(!(i<s.length)){r[n].index=i-s.length;return e.createNodes(r.slice(n))}{const t=s[i];if(!t.isXFAObject){warn("XFA - Cannot create a node.");return null}e=t}}return null}const Fo=Symbol(),Io=Symbol(),Oo=Symbol(),Mo=Symbol("_children"),Do=Symbol(),Bo=Symbol(),Ro=Symbol(),No=Symbol(),Eo=Symbol(),Po=Symbol(),Lo=Symbol(),jo=Symbol(),_o=Symbol(),Uo=Symbol("parent"),Xo=Symbol(),qo=Symbol(),Ho=Sy\
mbol();let Wo=0;const zo=go.datasets.id;class XFAObject{constructor(e,t,a=!1){this[Hs]=e;this[Ws]=t;this[Lo]=a;this[Uo]=null;this[Mo]=[];this[uo]=`${t}${Wo++}`;this[Is]=null}get isXFAObject(){return!0}get isXFAObjectArray(){return!1}createNodes(e){let t=this,a=null;for(const{name:r,index:i}of e){for(let e=0,n=isFinite(i)?i:0;e<=n;e++){const e=t[Hs]===zo?-1:t[Hs];a=new XmlObject(e,r);t[Qn](a)}t=a}return a}[$s](e){if(!this[Lo]||!this[Gs](e))return!1;const t=e[Ws],a=this[t];if(!(a instanceof XFAObj\
ectArray)){null!==a&&this[Zs](a);this[t]=e;this[Qn](e);return!0}if(a.push(e)){this[Qn](e);return!0}let r="";this.id?r=` (id: ${this.id})`:this.name&&(r=` (name: ${this.name} ${this.h.value})`);warn(`XFA - node "${this[Ws]}"${r} has already enough "${t}"!`);return!1}[Gs](e){return this.hasOwnProperty(e[Ws])&&e[Hs]===this[Hs]}[Ls](){return!1}[Yn](){return!1}[Bs](){return!1}[Rs](){return!1}[Js](){this.para&&this[Fs]()[ls].paraStack.pop()}[Ys](){this[Fs]()[ls].paraStack.push(this.para)}[ao](e){this.\
id&&this[Hs]===go.template.id&&e.set(this.id,this)}[Fs](){return this[Is].template}[js](){return!1}[_s](){return!1}[Qn](e){e[Uo]=this;this[Mo].push(e);!e[Is]&&this[Is]&&(e[Is]=this[Is])}[Zs](e){const t=this[Mo].indexOf(e);this[Mo].splice(t,1)}[Ts](){return this.hasOwnProperty("value")}[io](e){}[Vs](e){}[hs](){}[ts](e){delete this[Lo];if(this[rs]){e.clean(this[rs]);delete this[rs]}}[Ms](e){return this[Mo].indexOf(e)}[Ds](e,t){t[Uo]=this;this[Mo].splice(e,0,t);!t[Is]&&this[Is]&&(t[Is]=this[Is])}[U\
s](){return!this.name}[qs](){return""}[so](){return 0===this[Mo].length?this[ss]:this[Mo].map((e=>e[so]())).join("")}get[Oo](){const e=Object.getPrototypeOf(this);if(!e._attributes){const t=e._attributes=new Set;for(const e of Object.getOwnPropertyNames(this)){if(null===this[e]||this[e]instanceof XFAObject||this[e]instanceof XFAObjectArray)break;t.add(e)}}return shadow(this,Oo,e._attributes)}[Es](e){let t=this;for(;t;){if(t===e)return!0;t=t[vs]()}return!1}[vs](){return this[Uo]}[Cs](){return thi\
s[vs]()}[Ss](e=null){return e?this[e]:this[Mo]}[cs](){const e=Object.create(null);this[ss]&&(e.$content=this[ss]);for(const t of Object.getOwnPropertyNames(this)){const a=this[t];null!==a&&(a instanceof XFAObject?e[t]=a[cs]():a instanceof XFAObjectArray?a.isEmpty()||(e[t]=a.dump()):e[t]=a)}return e}[ho](){return null}[co](){return HTMLResult.EMPTY}*[As](){for(const e of this[Ss]())yield e}*[No](e,t){for(const a of this[As]())if(!e||t===e.has(a[Ws])){const e=this[gs](),t=a[co](e);t.success||(this\
[ls].failingNode=a);yield t}}[us](){return null}[Zn](e,t){this[ls].children.push(e)}[gs](){}[es]({filter:e=null,include:t=!0}){if(this[ls].generator){const e=this[gs](),t=this[ls].failingNode[co](e);if(!t.success)return t;t.html&&this[Zn](t.html,t.bbox);delete this[ls].failingNode}else this[ls].generator=this[No](e,t);for(;;){const e=this[ls].generator.next();if(e.done)break;const t=e.value;if(!t.success)return t;t.html&&this[Zn](t.html,t.bbox)}this[ls].generator=null;return HTMLResult.EMPTY}[ro\
](e){this[qo]=new Set(Object.keys(e))}[Po](e){const t=this[Oo],a=this[qo];return[...e].filter((e=>t.has(e)&&!a.has(e)))}[eo](e,t=new Set){for(const a of this[Mo])a[Xo](e,t)}[Xo](e,t){const a=this[Eo](e,t);a?this[Fo](a,e,t):this[eo](e,t)}[Eo](e,t){const{use:a,usehref:r}=this;if(!a&&!r)return null;let i=null,n=null,s=null,o=a;if(r){o=r;r.startsWith("#som(")&&r.endsWith(")")?n=r.slice(5,-1):r.startsWith(".#som(")&&r.endsWith(")")?n=r.slice(6,-1):r.startsWith("#")?s=r.slice(1):r.startsWith(".#")&&(s\
=r.slice(2))}else a.startsWith("#")?s=a.slice(1):n=a;this.use=this.usehref="";if(s)i=e.get(s);else{i=searchNode(e.get(Qs),this,n,!0,!1);i&&(i=i[0])}if(!i){warn(`XFA - Invalid prototype reference: ${o}.`);return null}if(i[Ws]!==this[Ws]){warn(`XFA - Incompatible prototype: ${i[Ws]} !== ${this[Ws]}.`);return null}if(t.has(i)){warn("XFA - Cycle detected in prototypes use.");return null}t.add(i);const c=i[Eo](e,t);c&&i[Fo](c,e,t);i[eo](e,t);t.delete(i);return i}[Fo](e,t,a){if(a.has(e)){warn("XFA - C\
ycle detected in prototypes use.");return}!this[ss]&&e[ss]&&(this[ss]=e[ss]);new Set(a).add(e);for(const t of this[Po](e[qo])){this[t]=e[t];this[qo]&&this[qo].add(t)}for(const r of Object.getOwnPropertyNames(this)){if(this[Oo].has(r))continue;const i=this[r],n=e[r];if(i instanceof XFAObjectArray){for(const e of i[Mo])e[Xo](t,a);for(let r=i[Mo].length,s=n[Mo].length;r<s;r++){const n=e[Mo][r][is]();if(!i.push(n))break;n[Uo]=this;this[Mo].push(n);n[Xo](t,a)}}else if(null===i){if(null!==n){const e=n\
[is]();e[Uo]=this;this[r]=e;this[Mo].push(e);e[Xo](t,a)}}else{i[eo](t,a);n&&i[Fo](n,t,a)}}}static[Do](e){return Array.isArray(e)?e.map((e=>XFAObject[Do](e))):"object"==typeof e&&null!==e?Object.assign({},e):e}[is](){const e=Object.create(Object.getPrototypeOf(this));for(const t of Object.getOwnPropertySymbols(this))try{e[t]=this[t]}catch{shadow(e,t,this[t])}e[uo]=`${e[Ws]}${Wo++}`;e[Mo]=[];for(const t of Object.getOwnPropertyNames(this)){if(this[Oo].has(t)){e[t]=XFAObject[Do](this[t]);continue}c\
onst a=this[t];e[t]=a instanceof XFAObjectArray?new XFAObjectArray(a[jo]):null}for(const t of this[Mo]){const a=t[Ws],r=t[is]();e[Mo].push(r);r[Uo]=e;null===e[a]?e[a]=r:e[a][Mo].push(r)}return e}[Ss](e=null){return e?this[Mo].filter((t=>t[Ws]===e)):this[Mo]}[ps](e){return this[e]}[ms](e,t,a=!0){return Array.from(this[bs](e,t,a))}*[bs](e,t,a=!0){if("parent"!==e){for(const a of this[Mo]){a[Ws]===e&&(yield a);a.name===e&&(yield a);(t||a[Us]())&&(yield*a[bs](e,t,!1))}a&&this[Oo].has(e)&&(yield new X\
FAAttribute(this,e,this[e]))}else yield this[Uo]}}class XFAObjectArray{constructor(e=1/0){this[jo]=e;this[Mo]=[]}get isXFAObject(){return!1}get isXFAObjectArray(){return!0}push(e){if(this[Mo].length<=this[jo]){this[Mo].push(e);return!0}warn(`XFA - node "${e[Ws]}" accepts no more than ${this[jo]} children`);return!1}isEmpty(){return 0===this[Mo].length}dump(){return 1===this[Mo].length?this[Mo][0][cs]():this[Mo].map((e=>e[cs]()))}[is](){const e=new XFAObjectArray(this[jo]);e[Mo]=this[Mo].map((e=>\
e[is]()));return e}get children(){return this[Mo]}clear(){this[Mo].length=0}}class XFAAttribute{constructor(e,t,a){this[Uo]=e;this[Ws]=t;this[ss]=a;this[ns]=!1;this[uo]="attribute"+Wo++}[vs](){return this[Uo]}[Ns](){return!0}[ys](){return this[ss].trim()}[io](e){e=e.value||"";this[ss]=e.toString()}[so](){return this[ss]}[Es](e){return this[Uo]===e||this[Uo][Es](e)}}class XmlObject extends XFAObject{constructor(e,t,a={}){super(e,t);this[ss]="";this[Bo]=null;if("#text"!==t){const e=new Map;this[Io\
]=e;for(const[t,r]of Object.entries(a))e.set(t,new XFAAttribute(this,t,r));if(a.hasOwnProperty(zs)){const e=a[zs].xfa.dataNode;void 0!==e&&("dataGroup"===e?this[Bo]=!1:"dataValue"===e&&(this[Bo]=!0))}}this[ns]=!1}[lo](e){const t=this[Ws];if("#text"===t){e.push(encodeToXmlString(this[ss]));return}const a=utf8StringToString(t),r=this[Hs]===zo?"xfa:":"";e.push(`<${r}${a}`);for(const[t,a]of this[Io].entries()){const r=utf8StringToString(t);e.push(` ${r}="${encodeToXmlString(a[ss])}"`)}null!==this[Bo\
]&&(this[Bo]?e.push(\' xfa:dataNode="dataValue"\'):e.push(\' xfa:dataNode="dataGroup"\'));if(this[ss]||0!==this[Mo].length){e.push(">");if(this[ss])"string"==typeof this[ss]?e.push(encodeToXmlString(this[ss])):this[ss][lo](e);else for(const t of this[Mo])t[lo](e);e.push(`</${r}${a}>`)}else e.push("/>")}[$s](e){if(this[ss]){const e=new XmlObject(this[Hs],"#text");this[Qn](e);e[ss]=this[ss];this[ss]=""}this[Qn](e);return!0}[Vs](e){this[ss]+=e}[hs](){if(this[ss]&&this[Mo].length>0){const e=new XmlObjec\
t(this[Hs],"#text");this[Qn](e);e[ss]=this[ss];delete this[ss]}}[co](){return"#text"===this[Ws]?HTMLResult.success({name:"#text",value:this[ss]}):HTMLResult.EMPTY}[Ss](e=null){return e?this[Mo].filter((t=>t[Ws]===e)):this[Mo]}[fs](){return this[Io]}[ps](e){const t=this[Io].get(e);return void 0!==t?t:this[Ss](e)}*[bs](e,t){const a=this[Io].get(e);a&&(yield a);for(const a of this[Mo]){a[Ws]===e&&(yield a);t&&(yield*a[bs](e,t))}}*[ds](e,t){const a=this[Io].get(e);!a||t&&a[ns]||(yield a);for(const a\
 of this[Mo])yield*a[ds](e,t)}*[xs](e,t,a){for(const r of this[Mo]){r[Ws]!==e||a&&r[ns]||(yield r);t&&(yield*r[xs](e,t,a))}}[Ns](){return null===this[Bo]?0===this[Mo].length||this[Mo][0][Hs]===go.xhtml.id:this[Bo]}[ys](){return null===this[Bo]?0===this[Mo].length?this[ss].trim():this[Mo][0][Hs]===go.xhtml.id?this[Mo][0][so]().trim():null:this[ss].trim()}[io](e){e=e.value||"";this[ss]=e.toString()}[cs](e=!1){const t=Object.create(null);e&&(t.$ns=this[Hs]);this[ss]&&(t.$content=this[ss]);t.$name=t\
his[Ws];t.children=[];for(const a of this[Mo])t.children.push(a[cs](e));t.attributes=Object.create(null);for(const[e,a]of this[Io])t.attributes[e]=a[ss];return t}}class ContentObject extends XFAObject{constructor(e,t){super(e,t);this[ss]=""}[Vs](e){this[ss]+=e}[hs](){}}class OptionObject extends ContentObject{constructor(e,t,a){super(e,t);this[_o]=a}[hs](){this[ss]=getKeyword({data:this[ss],defaultValue:this[_o][0],validate:e=>this[_o].includes(e)})}[ts](e){super[ts](e);delete this[_o]}}class St\
ringObject extends ContentObject{[hs](){this[ss]=this[ss].trim()}}class IntegerObject extends ContentObject{constructor(e,t,a,r){super(e,t);this[Ro]=a;this[Ho]=r}[hs](){this[ss]=getInteger({data:this[ss],defaultValue:this[Ro],validate:this[Ho]})}[ts](e){super[ts](e);delete this[Ro];delete this[Ho]}}class Option01 extends IntegerObject{constructor(e,t){super(e,t,0,(e=>1===e))}}class Option10 extends IntegerObject{constructor(e,t){super(e,t,1,(e=>0===e))}}function measureToString(e){return"string"\
==typeof e?"0px":Number.isInteger(e)?`${e}px`:`${e.toFixed(2)}px`}const $o={anchorType(e,t){const a=e[Cs]();if(a&&(!a.layout||"position"===a.layout)){"transform"in t||(t.transform="");switch(e.anchorType){case"bottomCenter":t.transform+="translate(-50%, -100%)";break;case"bottomLeft":t.transform+="translate(0,-100%)";break;case"bottomRight":t.transform+="translate(-100%,-100%)";break;case"middleCenter":t.transform+="translate(-50%,-50%)";break;case"middleLeft":t.transform+="translate(0,-50%)";br\
eak;case"middleRight":t.transform+="translate(-100%,-50%)";break;case"topCenter":t.transform+="translate(-50%,0)";break;case"topRight":t.transform+="translate(-100%,0)"}}},dimensions(e,t){const a=e[Cs]();let r=e.w;const i=e.h;if(a.layout?.includes("row")){const t=a[ls],i=e.colSpan;let n;if(-1===i){n=Math.sumPrecise(t.columnWidths.slice(t.currentColumn));t.currentColumn=0}else{n=Math.sumPrecise(t.columnWidths.slice(t.currentColumn,t.currentColumn+i));t.currentColumn=(t.currentColumn+e.colSpan)%t.\
columnWidths.length}isNaN(n)||(r=e.w=n)}t.width=""!==r?measureToString(r):"auto";t.height=""!==i?measureToString(i):"auto"},position(e,t){const a=e[Cs]();if(!a?.layout||"position"===a.layout){t.position="absolute";t.left=measureToString(e.x);t.top=measureToString(e.y)}},rotate(e,t){if(e.rotate){"transform"in t||(t.transform="");t.transform+=`rotate(-${e.rotate}deg)`;t.transformOrigin="top left"}},presence(e,t){switch(e.presence){case"invisible":t.visibility="hidden";break;case"hidden":case"inact\
ive":t.display="none"}},hAlign(e,t){if("para"===e[Ws])switch(e.hAlign){case"justifyAll":t.textAlign="justify-all";break;case"radix":t.textAlign="left";break;default:t.textAlign=e.hAlign}else switch(e.hAlign){case"left":t.alignSelf="start";break;case"center":t.alignSelf="center";break;case"right":t.alignSelf="end"}},margin(e,t){e.margin&&(t.margin=e.margin[ho]().margin)}};function setMinMaxDimensions(e,t){if("position"===e[Cs]().layout){e.minW>0&&(t.minWidth=measureToString(e.minW));e.maxW>0&&(t.\
maxWidth=measureToString(e.maxW));e.minH>0&&(t.minHeight=measureToString(e.minH));e.maxH>0&&(t.maxHeight=measureToString(e.maxH))}}function layoutText(e,t,a,r,i,n){const s=new TextMeasure(t,a,r,i);"string"==typeof e?s.addString(e):e[Ks](s);return s.compute(n)}function layoutNode(e,t){let a=null,r=null,i=!1;if((!e.w||!e.h)&&e.value){let n=0,s=0;if(e.margin){n=e.margin.leftInset+e.margin.rightInset;s=e.margin.topInset+e.margin.bottomInset}let o=null,c=null;if(e.para){c=Object.create(null);o=""===e\
.para.lineHeight?null:e.para.lineHeight;c.top=""===e.para.spaceAbove?0:e.para.spaceAbove;c.bottom=""===e.para.spaceBelow?0:e.para.spaceBelow;c.left=""===e.para.marginLeft?0:e.para.marginLeft;c.right=""===e.para.marginRight?0:e.para.marginRight}let l=e.font;if(!l){const t=e[Fs]();let a=e[vs]();for(;a&&a!==t;){if(a.font){l=a.font;break}a=a[vs]()}}const h=(e.w||t.width)-n,u=e[Is].fontFinder;if(e.value.exData&&e.value.exData[ss]&&"text/html"===e.value.exData.contentType){const t=layoutText(e.value.e\
xData[ss],l,c,o,u,h);r=t.width;a=t.height;i=t.isBroken}else{const t=e.value[so]();if(t){const e=layoutText(t,l,c,o,u,h);r=e.width;a=e.height;i=e.isBroken}}null===r||e.w||(r+=n);null===a||e.h||(a+=s)}return{w:r,h:a,isBroken:i}}function computeBbox(e,t,a){let r;if(""!==e.w&&""!==e.h)r=[e.x,e.y,e.w,e.h];else{if(!a)return null;let i=e.w;if(""===i){if(0===e.maxW){const t=e[Cs]();i="position"===t.layout&&""!==t.w?0:e.minW}else i=Math.min(e.maxW,a.width);t.attributes.style.width=measureToString(i)}let \
n=e.h;if(""===n){if(0===e.maxH){const t=e[Cs]();n="position"===t.layout&&""!==t.h?0:e.minH}else n=Math.min(e.maxH,a.height);t.attributes.style.height=measureToString(n)}r=[e.x,e.y,i,n]}return r}function fixDimensions(e){const t=e[Cs]();if(t.layout?.includes("row")){const a=t[ls],r=e.colSpan;let i;i=-1===r?Math.sumPrecise(a.columnWidths.slice(a.currentColumn)):Math.sumPrecise(a.columnWidths.slice(a.currentColumn,a.currentColumn+r));isNaN(i)||(e.w=i)}t.layout&&"position"!==t.layout&&(e.x=e.y=0);"t\
able"===e.layout&&""===e.w&&Array.isArray(e.columnWidths)&&(e.w=Math.sumPrecise(e.columnWidths))}function layoutClass(e){switch(e.layout){case"position":default:return"xfaPosition";case"lr-tb":return"xfaLrTb";case"rl-row":return"xfaRlRow";case"rl-tb":return"xfaRlTb";case"row":return"xfaRow";case"table":return"xfaTable";case"tb":return"xfaTb"}}function toStyle(e,...t){const a=Object.create(null);for(const r of t){const t=e[r];if(null!==t)if($o.hasOwnProperty(r))$o[r](e,a);else if(t instanceof XFA\
Object){const e=t[ho]();e?Object.assign(a,e):warn(`(DEBUG) - XFA - style for ${r} not implemented yet`)}}return a}function createWrapper(e,t){const{attributes:a}=t,{style:r}=a,i={name:"div",attributes:{class:["xfaWrapper"],style:Object.create(null)},children:[]};a.class.push("xfaWrapped");if(e.border){const{widths:a,insets:n}=e.border[ls];let s,o,c=n[0],l=n[3];const h=n[0]+n[2],u=n[1]+n[3];switch(e.border.hand){case"even":c-=a[0]/2;l-=a[3]/2;s=`calc(100% + ${(a[1]+a[3])/2-u}px)`;o=`calc(100% + $\
{(a[0]+a[2])/2-h}px)`;break;case"left":c-=a[0];l-=a[3];s=`calc(100% + ${a[1]+a[3]-u}px)`;o=`calc(100% + ${a[0]+a[2]-h}px)`;break;case"right":s=u?`calc(100% - ${u}px)`:"100%";o=h?`calc(100% - ${h}px)`:"100%"}const d=["xfaBorder"];isPrintOnly(e.border)&&d.push("xfaPrintOnly");const f={name:"div",attributes:{class:d,style:{top:`${c}px`,left:`${l}px`,width:s,height:o}},children:[]};for(const e of["border","borderWidth","borderColor","borderRadius","borderStyle"])if(void 0!==r[e]){f.attributes.style[\
e]=r[e];delete r[e]}i.children.push(f,t)}else i.children.push(t);for(const e of["background","backgroundClip","top","left","width","height","minWidth","minHeight","maxWidth","maxHeight","transform","transformOrigin","visibility"])if(void 0!==r[e]){i.attributes.style[e]=r[e];delete r[e]}i.attributes.style.position="absolute"===r.position?"absolute":"relative";delete r.position;if(r.alignSelf){i.attributes.style.alignSelf=r.alignSelf;delete r.alignSelf}return i}function fixTextIndent(e){const t=ge\
tMeasurement(e.textIndent,"0px");if(t>=0)return;const a="padding"+("left"===("right"===e.textAlign?"right":"left")?"Left":"Right"),r=getMeasurement(e[a],"0px");e[a]=r-t+"px"}function setAccess(e,t){switch(e.access){case"nonInteractive":t.push("xfaNonInteractive");break;case"readOnly":t.push("xfaReadOnly");break;case"protected":t.push("xfaDisabled")}}function isPrintOnly(e){return e.relevant.length>0&&!e.relevant[0].excluded&&"print"===e.relevant[0].viewname}function getCurrentPara(e){const t=e[F\
s]()[ls].paraStack;return t.length?t.at(-1):null}function setPara(e,t,a){if(a.attributes.class?.includes("xfaRich")){if(t){""===e.h&&(t.height="auto");""===e.w&&(t.width="auto")}const r=getCurrentPara(e);if(r){const e=a.attributes.style;e.display="flex";e.flexDirection="column";switch(r.vAlign){case"top":e.justifyContent="start";break;case"bottom":e.justifyContent="end";break;case"middle":e.justifyContent="center"}const t=r[ho]();for(const[a,r]of Object.entries(t))a in e||(e[a]=r)}}}function set\
FontFamily(e,t,a,r){if(!a){delete r.fontFamily;return}const i=stripQuotes(e.typeface);r.fontFamily=`"${i}"`;const n=a.find(i);if(n){const{fontFamily:a}=n.regular.cssFontInfo;a!==i&&(r.fontFamily=`"${a}"`);const s=getCurrentPara(t);if(s&&""!==s.lineHeight)return;if(r.lineHeight)return;const o=selectFont(e,n);o&&(r.lineHeight=Math.max(1.2,o.lineHeight))}}function fixURL(e){const t=createValidAbsoluteUrl(e,null,{addDefaultProtocol:!0,tryConvertEncoding:!0});return t?t.href:null}function createLine(\
e,t){return{name:"div",attributes:{class:["lr-tb"===e.layout?"xfaLr":"xfaRl"]},children:t}}function flushHTML(e){if(!e[ls])return null;const t={name:"div",attributes:e[ls].attributes,children:e[ls].children};if(e[ls].failingNode){const a=e[ls].failingNode[us]();a&&(e.layout.endsWith("-tb")?t.children.push(createLine(e,[a])):t.children.push(a))}return 0===t.children.length?null:t}function addHTML(e,t,a){const r=e[ls],i=r.availableSpace,[n,s,o,c]=a;switch(e.layout){case"position":r.width=Math.max(\
r.width,n+o);r.height=Math.max(r.height,s+c);r.children.push(t);break;case"lr-tb":case"rl-tb":if(!r.line||1===r.attempt){r.line=createLine(e,[]);r.children.push(r.line);r.numberInLine=0}r.numberInLine+=1;r.line.children.push(t);if(0===r.attempt){r.currentWidth+=o;r.height=Math.max(r.height,r.prevHeight+c)}else{r.currentWidth=o;r.prevHeight=r.height;r.height+=c;r.attempt=0}r.width=Math.max(r.width,r.currentWidth);break;case"rl-row":case"row":{r.children.push(t);r.width+=o;r.height=Math.max(r.heig\
ht,c);const e=measureToString(r.height);for(const t of r.children)t.attributes.style.height=e;break}case"table":case"tb":r.width=MathClamp(o,r.width,i.width);r.height+=c;r.children.push(t)}}function getAvailableSpace(e){const t=e[ls].availableSpace,a=e.margin?e.margin.topInset+e.margin.bottomInset:0,r=e.margin?e.margin.leftInset+e.margin.rightInset:0;switch(e.layout){case"lr-tb":case"rl-tb":return 0===e[ls].attempt?{width:t.width-r-e[ls].currentWidth,height:t.height-a-e[ls].prevHeight}:{width:t.\
width-r,height:t.height-a-e[ls].height};case"rl-row":case"row":return{width:Math.sumPrecise(e[ls].columnWidths.slice(e[ls].currentColumn)),height:t.height-r};case"table":case"tb":return{width:t.width-r,height:t.height-a-e[ls].height};default:return t}}function checkDimensions(e,t){if(null===e[Fs]()[ls].firstUnsplittable)return!0;if(0===e.w||0===e.h)return!0;const a=e[Cs](),r=a[ls]?.attempt||0,[,i,n,s]=function getTransformedBBox(e){let t,a,r=""===e.w?NaN:e.w,i=""===e.h?NaN:e.h,[n,s]=[0,0];switch\
(e.anchorType||""){case"bottomCenter":[n,s]=[r/2,i];break;case"bottomLeft":[n,s]=[0,i];break;case"bottomRight":[n,s]=[r,i];break;case"middleCenter":[n,s]=[r/2,i/2];break;case"middleLeft":[n,s]=[0,i/2];break;case"middleRight":[n,s]=[r,i/2];break;case"topCenter":[n,s]=[r/2,0];break;case"topRight":[n,s]=[r,0]}switch(e.rotate||0){case 0:[t,a]=[-n,-s];break;case 90:[t,a]=[-s,n];[r,i]=[i,-r];break;case 180:[t,a]=[n,s];[r,i]=[-r,-i];break;case 270:[t,a]=[s,-n];[r,i]=[-i,r]}return[e.x+t+Math.min(0,r),e.\
y+a+Math.min(0,i),Math.abs(r),Math.abs(i)]}(e);switch(a.layout){case"lr-tb":case"rl-tb":return 0===r?e[Fs]()[ls].noLayoutFailure?""!==e.w?Math.round(n-t.width)<=2:t.width>2:!(""!==e.h&&Math.round(s-t.height)>2)&&(""!==e.w?Math.round(n-t.width)<=2||0===a[ls].numberInLine&&t.height>2:t.width>2):!!e[Fs]()[ls].noLayoutFailure||!(""!==e.h&&Math.round(s-t.height)>2)&&((""===e.w||Math.round(n-t.width)<=2||!a[_s]())&&t.height>2);case"table":case"tb":return!!e[Fs]()[ls].noLayoutFailure||(""===e.h||e[js](\
)?(""===e.w||Math.round(n-t.width)<=2||!a[_s]())&&t.height>2:Math.round(s-t.height)<=2);case"position":if(e[Fs]()[ls].noLayoutFailure)return!0;if(""===e.h||Math.round(s+i-t.height)<=2)return!0;return s+i>e[Fs]()[ls].currentContentArea.h;case"rl-row":case"row":return!!e[Fs]()[ls].noLayoutFailure||(""===e.h||Math.round(s-t.height)<=2);default:return!0}}const Go=go.template.id,Vo="http://www.w3.org/2000/svg",Ko=/^H(\\d+)$/,Jo=new Set(["image/gif","image/jpeg","image/jpg","image/pjpeg","image/png","i\
mage/apng","image/x-png","image/bmp","image/x-ms-bmp","image/tiff","image/tif","application/octet-stream"]),Yo=[[[66,77],"image/bmp"],[[255,216,255],"image/jpeg"],[[73,73,42,0],"image/tiff"],[[77,77,0,42],"image/tiff"],[[71,73,70,56,57,97],"image/gif"],[[137,80,78,71,13,10,26,10],"image/png"]];function getBorderDims(e){if(!e||!e.border)return{w:0,h:0};const t=e.border[ws]();return t?{w:t.widths[0]+t.widths[2]+t.insets[0]+t.insets[2],h:t.widths[1]+t.widths[3]+t.insets[1]+t.insets[3]}:{w:0,h:0}}fu\
nction hasMargin(e){return e.margin&&(e.margin.topInset||e.margin.rightInset||e.margin.bottomInset||e.margin.leftInset)}function _setValue(e,t){if(!e.value){const t=new Value({});e[Qn](t);e.value=t}e.value[io](t)}function*getContainedChildren(e){for(const t of e[Ss]())t instanceof SubformSet?yield*t[As]():yield t}function isRequired(e){return"error"===e.validate?.nullTest}function setTabIndex(e){for(;e;){if(!e.traversal){e[no]=e[vs]()[no];return}if(e[no])return;let t=null;for(const a of e.traver\
sal[Ss]())if("next"===a.operation){t=a;break}if(!t||!t.ref){e[no]=e[vs]()[no];return}const a=e[Fs]();e[no]=++a[no];const r=a[to](t.ref,e);if(!r)return;e=r[0]}}function applyAssist(e,t){const a=e.assist;if(a){const e=a[co]();e&&(t.title=e);const r=a.role.match(Ko);if(r){const e="heading",a=r[1];t.role=e;t["aria-level"]=a}}if("table"===e.layout)t.role="table";else if("row"===e.layout)t.role="row";else{const a=e[vs]();"row"===a.layout&&(t.role="TH"===a.assist?.role?"columnheader":"cell")}}function \
ariaLabel(e){if(!e.assist)return null;const t=e.assist;return t.speak&&""!==t.speak[ss]?t.speak[ss]:t.toolTip?t.toolTip[ss]:null}function valueToHtml(e){return HTMLResult.success({name:"div",attributes:{class:["xfaRich"],style:Object.create(null)},children:[{name:"span",attributes:{style:Object.create(null)},value:e}]})}function setFirstUnsplittable(e){const t=e[Fs]();if(null===t[ls].firstUnsplittable){t[ls].firstUnsplittable=e;t[ls].noLayoutFailure=!0}}function unsetFirstUnsplittable(e){const t\
=e[Fs]();t[ls].firstUnsplittable===e&&(t[ls].noLayoutFailure=!1)}function handleBreak(e){if(e[ls])return!1;e[ls]=Object.create(null);if("auto"===e.targetType)return!1;const t=e[Fs]();let a=null;if(e.target){a=t[to](e.target,e[vs]());if(!a)return!1;a=a[0]}const{currentPageArea:r,currentContentArea:i}=t[ls];if("pageArea"===e.targetType){a instanceof PageArea||(a=null);if(e.startNew){e[ls].target=a||r;return!0}if(a&&a!==r){e[ls].target=a;return!0}return!1}a instanceof ContentArea||(a=null);const n=\
a&&a[vs]();let s,o=n;if(e.startNew)if(a){const e=n.contentArea.children,t=e.indexOf(i),r=e.indexOf(a);-1!==t&&t<r&&(o=null);s=r-1}else s=r.contentArea.children.indexOf(i);else{if(!a||a===i)return!1;s=n.contentArea.children.indexOf(a)-1;o=n===r?null:n}e[ls].target=o;e[ls].index=s;return!0}function handleOverflow(e,t,a){const r=e[Fs](),i=r[ls].noLayoutFailure,n=t[Cs];t[Cs]=()=>e;r[ls].noLayoutFailure=!0;const s=t[co](a);e[Zn](s.html,s.bbox);r[ls].noLayoutFailure=i;t[Cs]=n}class AppearanceFilter ex\
tends StringObject{constructor(e){super(Go,"appearanceFilter");this.id=e.id||"";this.type=getStringOption(e.type,["optional","required"]);this.use=e.use||"";this.usehref=e.usehref||""}}class Arc extends XFAObject{constructor(e){super(Go,"arc",!0);this.circular=getInteger({data:e.circular,defaultValue:0,validate:e=>1===e});this.hand=getStringOption(e.hand,["even","left","right"]);this.id=e.id||"";this.startAngle=getFloat({data:e.startAngle,defaultValue:0,validate:e=>!0});this.sweepAngle=getFloat(\
{data:e.sweepAngle,defaultValue:360,validate:e=>!0});this.use=e.use||"";this.usehref=e.usehref||"";this.edge=null;this.fill=null}[co](){const e=this.edge||new Edge({}),t=e[ho](),a=Object.create(null);"visible"===this.fill?.presence?Object.assign(a,this.fill[ho]()):a.fill="transparent";a.strokeWidth=measureToString("visible"===e.presence?e.thickness:0);a.stroke=t.color;let r;const i={xmlns:Vo,style:{width:"100%",height:"100%",overflow:"visible"}};if(360===this.sweepAngle)r={name:"ellipse",attribu\
tes:{xmlns:Vo,cx:"50%",cy:"50%",rx:"50%",ry:"50%",style:a}};else{const e=this.startAngle*Math.PI/180,t=this.sweepAngle*Math.PI/180,n=this.sweepAngle>180?1:0,[s,o,c,l]=[50*(1+Math.cos(e)),50*(1-Math.sin(e)),50*(1+Math.cos(e+t)),50*(1-Math.sin(e+t))];r={name:"path",attributes:{xmlns:Vo,d:`M ${s} ${o} A 50 50 0 ${n} 0 ${c} ${l}`,vectorEffect:"non-scaling-stroke",style:a}};Object.assign(i,{viewBox:"0 0 100 100",preserveAspectRatio:"none"})}const n={name:"svg",children:[r],attributes:i};if(hasMargin(\
this[vs]()[vs]()))return HTMLResult.success({name:"div",attributes:{style:{display:"inline",width:"100%",height:"100%"}},children:[n]});n.attributes.style.position="absolute";return HTMLResult.success(n)}}class Area extends XFAObject{constructor(e){super(Go,"area",!0);this.colSpan=getInteger({data:e.colSpan,defaultValue:1,validate:e=>e>=1||-1===e});this.id=e.id||"";this.name=e.name||"";this.relevant=getRelevant(e.relevant);this.use=e.use||"";this.usehref=e.usehref||"";this.x=getMeasurement(e.x,"\
0pt");this.y=getMeasurement(e.y,"0pt");this.desc=null;this.extras=null;this.area=new XFAObjectArray;this.draw=new XFAObjectArray;this.exObject=new XFAObjectArray;this.exclGroup=new XFAObjectArray;this.field=new XFAObjectArray;this.subform=new XFAObjectArray;this.subformSet=new XFAObjectArray}*[As](){yield*getContainedChildren(this)}[Us](){return!0}[Rs](){return!0}[Zn](e,t){const[a,r,i,n]=t;this[ls].width=Math.max(this[ls].width,a+i);this[ls].height=Math.max(this[ls].height,r+n);this[ls].children\
.push(e)}[gs](){return this[ls].availableSpace}[co](e){const t=toStyle(this,"position"),a={style:t,id:this[uo],class:["xfaArea"]};isPrintOnly(this)&&a.class.push("xfaPrintOnly");this.name&&(a.xfaName=this.name);const r=[];this[ls]={children:r,width:0,height:0,availableSpace:e};const i=this[es]({filter:new Set(["area","draw","field","exclGroup","subform","subformSet"]),include:!0});if(!i.success){if(i.isBreak())return i;delete this[ls];return HTMLResult.FAILURE}t.width=measureToString(this[ls].wi\
dth);t.height=measureToString(this[ls].height);const n={name:"div",attributes:a,children:r},s=[this.x,this.y,this[ls].width,this[ls].height];delete this[ls];return HTMLResult.success(n,s)}}class Assist extends XFAObject{constructor(e){super(Go,"assist",!0);this.id=e.id||"";this.role=e.role||"";this.use=e.use||"";this.usehref=e.usehref||"";this.speak=null;this.toolTip=null}[co](){return this.toolTip?.[ss]||null}}class Barcode extends XFAObject{constructor(e){super(Go,"barcode",!0);this.charEncodi\
ng=getKeyword({data:e.charEncoding?e.charEncoding.toLowerCase():"",defaultValue:"",validate:e=>["utf-8","big-five","fontspecific","gbk","gb-18030","gb-2312","ksc-5601","none","shift-jis","ucs-2","utf-16"].includes(e)||e.match(/iso-8859-\\d{2}/)});this.checksum=getStringOption(e.checksum,["none","1mod10","1mod10_1mod11","2mod10","auto"]);this.dataColumnCount=getInteger({data:e.dataColumnCount,defaultValue:-1,validate:e=>e>=0});this.dataLength=getInteger({data:e.dataLength,defaultValue:-1,validate:\
e=>e>=0});this.dataPrep=getStringOption(e.dataPrep,["none","flateCompress"]);this.dataRowCount=getInteger({data:e.dataRowCount,defaultValue:-1,validate:e=>e>=0});this.endChar=e.endChar||"";this.errorCorrectionLevel=getInteger({data:e.errorCorrectionLevel,defaultValue:-1,validate:e=>e>=0&&e<=8});this.id=e.id||"";this.moduleHeight=getMeasurement(e.moduleHeight,"5mm");this.moduleWidth=getMeasurement(e.moduleWidth,"0.25mm");this.printCheckDigit=getInteger({data:e.printCheckDigit,defaultValue:0,valid\
ate:e=>1===e});this.rowColumnRatio=getRatio(e.rowColumnRatio);this.startChar=e.startChar||"";this.textLocation=getStringOption(e.textLocation,["below","above","aboveEmbedded","belowEmbedded","none"]);this.truncate=getInteger({data:e.truncate,defaultValue:0,validate:e=>1===e});this.type=getStringOption(e.type?e.type.toLowerCase():"",["aztec","codabar","code2of5industrial","code2of5interleaved","code2of5matrix","code2of5standard","code3of9","code3of9extended","code11","code49","code93","code128","\
code128a","code128b","code128c","code128sscc","datamatrix","ean8","ean8add2","ean8add5","ean13","ean13add2","ean13add5","ean13pwcd","fim","logmars","maxicode","msi","pdf417","pdf417macro","plessey","postauscust2","postauscust3","postausreplypaid","postausstandard","postukrm4scc","postusdpbc","postusimb","postusstandard","postus5zip","qrcode","rfid","rss14","rss14expanded","rss14limited","rss14stacked","rss14stackedomni","rss14truncated","telepen","ucc128","ucc128random","ucc128sscc","upca","upca\
add2","upcaadd5","upcapwcd","upce","upceadd2","upceadd5","upcean2","upcean5","upsmaxicode"]);this.upsMode=getStringOption(e.upsMode,["usCarrier","internationalCarrier","secureSymbol","standardSymbol"]);this.use=e.use||"";this.usehref=e.usehref||"";this.wideNarrowRatio=getRatio(e.wideNarrowRatio);this.encrypt=null;this.extras=null}}class Bind extends XFAObject{constructor(e){super(Go,"bind",!0);this.match=getStringOption(e.match,["once","dataRef","global","none"]);this.ref=e.ref||"";this.picture=\
null}}class BindItems extends XFAObject{constructor(e){super(Go,"bindItems");this.connection=e.connection||"";this.labelRef=e.labelRef||"";this.ref=e.ref||"";this.valueRef=e.valueRef||""}}class Bookend extends XFAObject{constructor(e){super(Go,"bookend");this.id=e.id||"";this.leader=e.leader||"";this.trailer=e.trailer||"";this.use=e.use||"";this.usehref=e.usehref||""}}class BooleanElement extends Option01{constructor(e){super(Go,"boolean");this.id=e.id||"";this.name=e.name||"";this.use=e.use||""\
;this.usehref=e.usehref||""}[co](e){return valueToHtml(1===this[ss]?"1":"0")}}class Border extends XFAObject{constructor(e){super(Go,"border",!0);this.break=getStringOption(e.break,["close","open"]);this.hand=getStringOption(e.hand,["even","left","right"]);this.id=e.id||"";this.presence=getStringOption(e.presence,["visible","hidden","inactive","invisible"]);this.relevant=getRelevant(e.relevant);this.use=e.use||"";this.usehref=e.usehref||"";this.corner=new XFAObjectArray(4);this.edge=new XFAObjec\
tArray(4);this.extras=null;this.fill=null;this.margin=null}[ws](){if(!this[ls]){const e=this.edge.children.slice();if(e.length<4){const t=e.at(-1)||new Edge({});for(let a=e.length;a<4;a++)e.push(t)}const t=e.map((e=>e.thickness)),a=[0,0,0,0];if(this.margin){a[0]=this.margin.topInset;a[1]=this.margin.rightInset;a[2]=this.margin.bottomInset;a[3]=this.margin.leftInset}this[ls]={widths:t,insets:a,edges:e}}return this[ls]}[ho](){const{edges:e}=this[ws](),t=e.map((e=>{const t=e[ho]();t.color||="#00000\
0";return t})),a=Object.create(null);this.margin&&Object.assign(a,this.margin[ho]());"visible"===this.fill?.presence&&Object.assign(a,this.fill[ho]());if(this.corner.children.some((e=>0!==e.radius))){const e=this.corner.children.map((e=>e[ho]()));if(2===e.length||3===e.length){const t=e.at(-1);for(let a=e.length;a<4;a++)e.push(t)}a.borderRadius=e.map((e=>e.radius)).join(" ")}switch(this.presence){case"invisible":case"hidden":a.borderStyle="";break;case"inactive":a.borderStyle="none";break;defaul\
t:a.borderStyle=t.map((e=>e.style)).join(" ")}a.borderWidth=t.map((e=>e.width)).join(" ");a.borderColor=t.map((e=>e.color)).join(" ");return a}}class Break extends XFAObject{constructor(e){super(Go,"break",!0);this.after=getStringOption(e.after,["auto","contentArea","pageArea","pageEven","pageOdd"]);this.afterTarget=e.afterTarget||"";this.before=getStringOption(e.before,["auto","contentArea","pageArea","pageEven","pageOdd"]);this.beforeTarget=e.beforeTarget||"";this.bookendLeader=e.bookendLeader\
||"";this.bookendTrailer=e.bookendTrailer||"";this.id=e.id||"";this.overflowLeader=e.overflowLeader||"";this.overflowTarget=e.overflowTarget||"";this.overflowTrailer=e.overflowTrailer||"";this.startNew=getInteger({data:e.startNew,defaultValue:0,validate:e=>1===e});this.use=e.use||"";this.usehref=e.usehref||"";this.extras=null}}class BreakAfter extends XFAObject{constructor(e){super(Go,"breakAfter",!0);this.id=e.id||"";this.leader=e.leader||"";this.startNew=getInteger({data:e.startNew,defaultValu\
e:0,validate:e=>1===e});this.target=e.target||"";this.targetType=getStringOption(e.targetType,["auto","contentArea","pageArea"]);this.trailer=e.trailer||"";this.use=e.use||"";this.usehref=e.usehref||"";this.script=null}}class BreakBefore extends XFAObject{constructor(e){super(Go,"breakBefore",!0);this.id=e.id||"";this.leader=e.leader||"";this.startNew=getInteger({data:e.startNew,defaultValue:0,validate:e=>1===e});this.target=e.target||"";this.targetType=getStringOption(e.targetType,["auto","cont\
entArea","pageArea"]);this.trailer=e.trailer||"";this.use=e.use||"";this.usehref=e.usehref||"";this.script=null}[co](e){this[ls]={};return HTMLResult.FAILURE}}class Button extends XFAObject{constructor(e){super(Go,"button",!0);this.highlight=getStringOption(e.highlight,["inverted","none","outline","push"]);this.id=e.id||"";this.use=e.use||"";this.usehref=e.usehref||"";this.extras=null}[co](e){const t=this[vs]()[vs](),a={name:"button",attributes:{id:this[uo],class:["xfaButton"],style:{}},children\
:[]};for(const e of t.event.children){if("click"!==e.activity||!e.script)continue;const t=recoverJsURL(e.script[ss]);if(!t)continue;const r=fixURL(t.url);r&&a.children.push({name:"a",attributes:{id:"link"+this[uo],href:r,newWindow:t.newWindow,class:["xfaLink"],style:{}},children:[]})}return HTMLResult.success(a)}}class Calculate extends XFAObject{constructor(e){super(Go,"calculate",!0);this.id=e.id||"";this.override=getStringOption(e.override,["disabled","error","ignore","warning"]);this.use=e.u\
se||"";this.usehref=e.usehref||"";this.extras=null;this.message=null;this.script=null}}class Caption extends XFAObject{constructor(e){super(Go,"caption",!0);this.id=e.id||"";this.placement=getStringOption(e.placement,["left","bottom","inline","right","top"]);this.presence=getStringOption(e.presence,["visible","hidden","inactive","invisible"]);this.reserve=Math.ceil(getMeasurement(e.reserve));this.use=e.use||"";this.usehref=e.usehref||"";this.extras=null;this.font=null;this.margin=null;this.para=\
null;this.value=null}[io](e){_setValue(this,e)}[ws](e){if(!this[ls]){let{width:t,height:a}=e;switch(this.placement){case"left":case"right":case"inline":t=this.reserve<=0?t:this.reserve;break;case"top":case"bottom":a=this.reserve<=0?a:this.reserve}this[ls]=layoutNode(this,{width:t,height:a})}return this[ls]}[co](e){if(!this.value)return HTMLResult.EMPTY;this[Ys]();const t=this.value[co](e).html;if(!t){this[Js]();return HTMLResult.EMPTY}const a=this.reserve;if(this.reserve<=0){const{w:t,h:a}=this[\
ws](e);switch(this.placement){case"left":case"right":case"inline":this.reserve=t;break;case"top":case"bottom":this.reserve=a}}const r=[];"string"==typeof t?r.push({name:"#text",value:t}):r.push(t);const i=toStyle(this,"font","margin","visibility");switch(this.placement){case"left":case"right":this.reserve>0&&(i.width=measureToString(this.reserve));break;case"top":case"bottom":this.reserve>0&&(i.height=measureToString(this.reserve))}setPara(this,null,t);this[Js]();this.reserve=a;return HTMLResult\
.success({name:"div",attributes:{style:i,class:["xfaCaption"]},children:r})}}class Certificate extends StringObject{constructor(e){super(Go,"certificate");this.id=e.id||"";this.name=e.name||"";this.use=e.use||"";this.usehref=e.usehref||""}}class Certificates extends XFAObject{constructor(e){super(Go,"certificates",!0);this.credentialServerPolicy=getStringOption(e.credentialServerPolicy,["optional","required"]);this.id=e.id||"";this.url=e.url||"";this.urlPolicy=e.urlPolicy||"";this.use=e.use||"";\
this.usehref=e.usehref||"";this.encryption=null;this.issuers=null;this.keyUsage=null;this.oids=null;this.signing=null;this.subjectDNs=null}}class CheckButton extends XFAObject{constructor(e){super(Go,"checkButton",!0);this.id=e.id||"";this.mark=getStringOption(e.mark,["default","check","circle","cross","diamond","square","star"]);this.shape=getStringOption(e.shape,["square","round"]);this.size=getMeasurement(e.size,"10pt");this.use=e.use||"";this.usehref=e.usehref||"";this.border=null;this.extra\
s=null;this.margin=null}[co](e){const t=toStyle(this,"margin"),a=measureToString(this.size);t.width=t.height=a;let r,i,n;const s=this[vs]()[vs](),o=s.items.children.length&&s.items.children[0][co]().html||[],c={on:(void 0!==o[0]?o[0]:"on").toString(),off:(void 0!==o[1]?o[1]:"off").toString()},l=(s.value?.[so]()||"off")===c.on||void 0,h=s[Cs](),u=s[uo];let d;if(h instanceof ExclGroup){n=h[uo];r="radio";i="xfaRadio";d=h[os]?.[uo]||h[uo]}else{r="checkbox";i="xfaCheckbox";d=s[os]?.[uo]||s[uo]}const \
f={name:"input",attributes:{class:[i],style:t,fieldId:u,dataId:d,type:r,checked:l,xfaOn:c.on,xfaOff:c.off,"aria-label":ariaLabel(s),"aria-required":!1}};n&&(f.attributes.name=n);if(isRequired(s)){f.attributes["aria-required"]=!0;f.attributes.required=!0}return HTMLResult.success({name:"label",attributes:{class:["xfaLabel"]},children:[f]})}}class ChoiceList extends XFAObject{constructor(e){super(Go,"choiceList",!0);this.commitOn=getStringOption(e.commitOn,["select","exit"]);this.id=e.id||"";this.\
open=getStringOption(e.open,["userControl","always","multiSelect","onEntry"]);this.textEntry=getInteger({data:e.textEntry,defaultValue:0,validate:e=>1===e});this.use=e.use||"";this.usehref=e.usehref||"";this.border=null;this.extras=null;this.margin=null}[co](e){const t=toStyle(this,"border","margin"),a=this[vs]()[vs](),r={fontSize:`calc(${a.font?.size||10}px * var(--total-scale-factor))`},i=[];if(a.items.children.length>0){const e=a.items;let t=0,n=0;if(2===e.children.length){t=e.children[0].sav\
e;n=1-t}const s=e.children[t][co]().html,o=e.children[n][co]().html;let c=!1;const l=a.value?.[so]()||"";for(let e=0,t=s.length;e<t;e++){const t={name:"option",attributes:{value:o[e]||s[e],style:r},value:s[e]};o[e]===l&&(t.attributes.selected=c=!0);i.push(t)}c||i.splice(0,0,{name:"option",attributes:{hidden:!0,selected:!0},value:" "})}const n={class:["xfaSelect"],fieldId:a[uo],dataId:a[os]?.[uo]||a[uo],style:t,"aria-label":ariaLabel(a),"aria-required":!1};if(isRequired(a)){n["aria-required"]=!0;\
n.required=!0}"multiSelect"===this.open&&(n.multiple=!0);return HTMLResult.success({name:"label",attributes:{class:["xfaLabel"]},children:[{name:"select",children:i,attributes:n}]})}}class Color extends XFAObject{constructor(e){super(Go,"color",!0);this.cSpace=getStringOption(e.cSpace,["SRGB"]);this.id=e.id||"";this.use=e.use||"";this.usehref=e.usehref||"";this.value=e.value?function getColor(e,t=[0,0,0]){let[a,r,i]=t;if(!e)return{r:a,g:r,b:i};const n=e.split(",",3).map((e=>MathClamp(parseInt(e.\
trim(),10),0,255))).map((e=>isNaN(e)?0:e));if(n.length<3)return{r:a,g:r,b:i};[a,r,i]=n;return{r:a,g:r,b:i}}(e.value):"";this.extras=null}[Ts](){return!1}[ho](){return this.value?Util.makeHexColor(this.value.r,this.value.g,this.value.b):null}}class Comb extends XFAObject{constructor(e){super(Go,"comb");this.id=e.id||"";this.numberOfCells=getInteger({data:e.numberOfCells,defaultValue:0,validate:e=>e>=0});this.use=e.use||"";this.usehref=e.usehref||""}}class Connect extends XFAObject{constructor(e){\
super(Go,"connect",!0);this.connection=e.connection||"";this.id=e.id||"";this.ref=e.ref||"";this.usage=getStringOption(e.usage,["exportAndImport","exportOnly","importOnly"]);this.use=e.use||"";this.usehref=e.usehref||"";this.picture=null}}class ContentArea extends XFAObject{constructor(e){super(Go,"contentArea",!0);this.h=getMeasurement(e.h);this.id=e.id||"";this.name=e.name||"";this.relevant=getRelevant(e.relevant);this.use=e.use||"";this.usehref=e.usehref||"";this.w=getMeasurement(e.w);this.x=\
getMeasurement(e.x,"0pt");this.y=getMeasurement(e.y,"0pt");this.desc=null;this.extras=null}[co](e){const t={left:measureToString(this.x),top:measureToString(this.y),width:measureToString(this.w),height:measureToString(this.h)},a=["xfaContentarea"];isPrintOnly(this)&&a.push("xfaPrintOnly");return HTMLResult.success({name:"div",children:[],attributes:{style:t,class:a,id:this[uo]}})}}class Corner extends XFAObject{constructor(e){super(Go,"corner",!0);this.id=e.id||"";this.inverted=getInteger({data:\
e.inverted,defaultValue:0,validate:e=>1===e});this.join=getStringOption(e.join,["square","round"]);this.presence=getStringOption(e.presence,["visible","hidden","inactive","invisible"]);this.radius=getMeasurement(e.radius);this.stroke=getStringOption(e.stroke,["solid","dashDot","dashDotDot","dashed","dotted","embossed","etched","lowered","raised"]);this.thickness=getMeasurement(e.thickness,"0.5pt");this.use=e.use||"";this.usehref=e.usehref||"";this.color=null;this.extras=null}[ho](){const e=toSty\
le(this,"visibility");e.radius=measureToString("square"===this.join?0:this.radius);return e}}class DateElement extends ContentObject{constructor(e){super(Go,"date");this.id=e.id||"";this.name=e.name||"";this.use=e.use||"";this.usehref=e.usehref||""}[hs](){const e=this[ss].trim();this[ss]=e?new Date(e):null}[co](e){return valueToHtml(this[ss]?this[ss].toString():"")}}class DateTime extends ContentObject{constructor(e){super(Go,"dateTime");this.id=e.id||"";this.name=e.name||"";this.use=e.use||"";t\
his.usehref=e.usehref||""}[hs](){const e=this[ss].trim();this[ss]=e?new Date(e):null}[co](e){return valueToHtml(this[ss]?this[ss].toString():"")}}class DateTimeEdit extends XFAObject{constructor(e){super(Go,"dateTimeEdit",!0);this.hScrollPolicy=getStringOption(e.hScrollPolicy,["auto","off","on"]);this.id=e.id||"";this.picker=getStringOption(e.picker,["host","none"]);this.use=e.use||"";this.usehref=e.usehref||"";this.border=null;this.comb=null;this.extras=null;this.margin=null}[co](e){const t=toS\
tyle(this,"border","font","margin"),a=this[vs]()[vs](),r={name:"input",attributes:{type:"text",fieldId:a[uo],dataId:a[os]?.[uo]||a[uo],class:["xfaTextfield"],style:t,"aria-label":ariaLabel(a),"aria-required":!1}};if(isRequired(a)){r.attributes["aria-required"]=!0;r.attributes.required=!0}return HTMLResult.success({name:"label",attributes:{class:["xfaLabel"]},children:[r]})}}class Decimal extends ContentObject{constructor(e){super(Go,"decimal");this.fracDigits=getInteger({data:e.fracDigits,defaul\
tValue:2,validate:e=>!0});this.id=e.id||"";this.leadDigits=getInteger({data:e.leadDigits,defaultValue:-1,validate:e=>!0});this.name=e.name||"";this.use=e.use||"";this.usehref=e.usehref||""}[hs](){const e=parseFloat(this[ss].trim());this[ss]=isNaN(e)?null:e}[co](e){return valueToHtml(null!==this[ss]?this[ss].toString():"")}}class DefaultUi extends XFAObject{constructor(e){super(Go,"defaultUi",!0);this.id=e.id||"";this.use=e.use||"";this.usehref=e.usehref||"";this.extras=null}}class Desc extends X\
FAObject{constructor(e){super(Go,"desc",!0);this.id=e.id||"";this.use=e.use||"";this.usehref=e.usehref||"";this.boolean=new XFAObjectArray;this.date=new XFAObjectArray;this.dateTime=new XFAObjectArray;this.decimal=new XFAObjectArray;this.exData=new XFAObjectArray;this.float=new XFAObjectArray;this.image=new XFAObjectArray;this.integer=new XFAObjectArray;this.text=new XFAObjectArray;this.time=new XFAObjectArray}}class DigestMethod extends OptionObject{constructor(e){super(Go,"digestMethod",["","S\
HA1","SHA256","SHA512","RIPEMD160"]);this.id=e.id||"";this.use=e.use||"";this.usehref=e.usehref||""}}class DigestMethods extends XFAObject{constructor(e){super(Go,"digestMethods",!0);this.id=e.id||"";this.type=getStringOption(e.type,["optional","required"]);this.use=e.use||"";this.usehref=e.usehref||"";this.digestMethod=new XFAObjectArray}}class Draw extends XFAObject{constructor(e){super(Go,"draw",!0);this.anchorType=getStringOption(e.anchorType,["topLeft","bottomCenter","bottomLeft","bottomRig\
ht","middleCenter","middleLeft","middleRight","topCenter","topRight"]);this.colSpan=getInteger({data:e.colSpan,defaultValue:1,validate:e=>e>=1||-1===e});this.h=e.h?getMeasurement(e.h):"";this.hAlign=getStringOption(e.hAlign,["left","center","justify","justifyAll","radix","right"]);this.id=e.id||"";this.locale=e.locale||"";this.maxH=getMeasurement(e.maxH,"0pt");this.maxW=getMeasurement(e.maxW,"0pt");this.minH=getMeasurement(e.minH,"0pt");this.minW=getMeasurement(e.minW,"0pt");this.name=e.name||""\
;this.presence=getStringOption(e.presence,["visible","hidden","inactive","invisible"]);this.relevant=getRelevant(e.relevant);this.rotate=getInteger({data:e.rotate,defaultValue:0,validate:e=>e%90==0});this.use=e.use||"";this.usehref=e.usehref||"";this.w=e.w?getMeasurement(e.w):"";this.x=getMeasurement(e.x,"0pt");this.y=getMeasurement(e.y,"0pt");this.assist=null;this.border=null;this.caption=null;this.desc=null;this.extras=null;this.font=null;this.keep=null;this.margin=null;this.para=null;this.tra\
versal=null;this.ui=null;this.value=null;this.setProperty=new XFAObjectArray}[io](e){_setValue(this,e)}[co](e){setTabIndex(this);if("hidden"===this.presence||"inactive"===this.presence)return HTMLResult.EMPTY;fixDimensions(this);this[Ys]();const t=this.w,a=this.h,{w:r,h:i,isBroken:n}=layoutNode(this,e);if(r&&""===this.w){if(n&&this[Cs]()[_s]()){this[Js]();return HTMLResult.FAILURE}this.w=r}i&&""===this.h&&(this.h=i);setFirstUnsplittable(this);if(!checkDimensions(this,e)){this.w=t;this.h=a;this[J\
s]();return HTMLResult.FAILURE}unsetFirstUnsplittable(this);const s=toStyle(this,"font","hAlign","dimensions","position","presence","rotate","anchorType","border","margin");setMinMaxDimensions(this,s);if(s.margin){s.padding=s.margin;delete s.margin}const o=["xfaDraw"];this.font&&o.push("xfaFont");isPrintOnly(this)&&o.push("xfaPrintOnly");const c={style:s,id:this[uo],class:o};this.name&&(c.xfaName=this.name);const l={name:"div",attributes:c,children:[]};applyAssist(this,c);const h=computeBbox(thi\
s,l,e),u=this.value?this.value[co](e).html:null;if(null===u){this.w=t;this.h=a;this[Js]();return HTMLResult.success(createWrapper(this,l),h)}l.children.push(u);setPara(this,s,u);this.w=t;this.h=a;this[Js]();return HTMLResult.success(createWrapper(this,l),h)}}class Edge extends XFAObject{constructor(e){super(Go,"edge",!0);this.cap=getStringOption(e.cap,["square","butt","round"]);this.id=e.id||"";this.presence=getStringOption(e.presence,["visible","hidden","inactive","invisible"]);this.stroke=getS\
tringOption(e.stroke,["solid","dashDot","dashDotDot","dashed","dotted","embossed","etched","lowered","raised"]);this.thickness=getMeasurement(e.thickness,"0.5pt");this.use=e.use||"";this.usehref=e.usehref||"";this.color=null;this.extras=null}[ho](){const e=toStyle(this,"visibility");Object.assign(e,{linecap:this.cap,width:measureToString(this.thickness),color:this.color?this.color[ho]():"#000000",style:""});if("visible"!==this.presence)e.style="none";else switch(this.stroke){case"solid":e.style=\
"solid";break;case"dashDot":case"dashDotDot":case"dashed":e.style="dashed";break;case"dotted":e.style="dotted";break;case"embossed":e.style="ridge";break;case"etched":e.style="groove";break;case"lowered":e.style="inset";break;case"raised":e.style="outset"}return e}}class Encoding extends OptionObject{constructor(e){super(Go,"encoding",["adbe.x509.rsa_sha1","adbe.pkcs7.detached","adbe.pkcs7.sha1"]);this.id=e.id||"";this.use=e.use||"";this.usehref=e.usehref||""}}class Encodings extends XFAObject{c\
onstructor(e){super(Go,"encodings",!0);this.id=e.id||"";this.type=getStringOption(e.type,["optional","required"]);this.use=e.use||"";this.usehref=e.usehref||"";this.encoding=new XFAObjectArray}}class Encrypt extends XFAObject{constructor(e){super(Go,"encrypt",!0);this.id=e.id||"";this.use=e.use||"";this.usehref=e.usehref||"";this.certificate=null}}class EncryptData extends XFAObject{constructor(e){super(Go,"encryptData",!0);this.id=e.id||"";this.operation=getStringOption(e.operation,["encrypt","\
decrypt"]);this.target=e.target||"";this.use=e.use||"";this.usehref=e.usehref||"";this.filter=null;this.manifest=null}}class Encryption extends XFAObject{constructor(e){super(Go,"encryption",!0);this.id=e.id||"";this.type=getStringOption(e.type,["optional","required"]);this.use=e.use||"";this.usehref=e.usehref||"";this.certificate=new XFAObjectArray}}class EncryptionMethod extends OptionObject{constructor(e){super(Go,"encryptionMethod",["","AES256-CBC","TRIPLEDES-CBC","AES128-CBC","AES192-CBC"])\
;this.id=e.id||"";this.use=e.use||"";this.usehref=e.usehref||""}}class EncryptionMethods extends XFAObject{constructor(e){super(Go,"encryptionMethods",!0);this.id=e.id||"";this.type=getStringOption(e.type,["optional","required"]);this.use=e.use||"";this.usehref=e.usehref||"";this.encryptionMethod=new XFAObjectArray}}class Event extends XFAObject{constructor(e){super(Go,"event",!0);this.activity=getStringOption(e.activity,["click","change","docClose","docReady","enter","exit","full","indexChange"\
,"initialize","mouseDown","mouseEnter","mouseExit","mouseUp","postExecute","postOpen","postPrint","postSave","postSign","postSubmit","preExecute","preOpen","prePrint","preSave","preSign","preSubmit","ready","validationState"]);this.id=e.id||"";this.listen=getStringOption(e.listen,["refOnly","refAndDescendents"]);this.name=e.name||"";this.ref=e.ref||"";this.use=e.use||"";this.usehref=e.usehref||"";this.extras=null;this.encryptData=null;this.execute=null;this.script=null;this.signData=null;this.su\
bmit=null}}class ExData extends ContentObject{constructor(e){super(Go,"exData");this.contentType=e.contentType||"";this.href=e.href||"";this.id=e.id||"";this.maxLength=getInteger({data:e.maxLength,defaultValue:-1,validate:e=>e>=-1});this.name=e.name||"";this.rid=e.rid||"";this.transferEncoding=getStringOption(e.transferEncoding,["none","base64","package"]);this.use=e.use||"";this.usehref=e.usehref||""}[Bs](){return"text/html"===this.contentType}[$s](e){if("text/html"===this.contentType&&e[Hs]===\
go.xhtml.id){this[ss]=e;return!0}if("text/xml"===this.contentType){this[ss]=e;return!0}return!1}[co](e){return"text/html"===this.contentType&&this[ss]?this[ss][co](e):HTMLResult.EMPTY}}class ExObject extends XFAObject{constructor(e){super(Go,"exObject",!0);this.archive=e.archive||"";this.classId=e.classId||"";this.codeBase=e.codeBase||"";this.codeType=e.codeType||"";this.id=e.id||"";this.name=e.name||"";this.use=e.use||"";this.usehref=e.usehref||"";this.extras=null;this.boolean=new XFAObjectArra\
y;this.date=new XFAObjectArray;this.dateTime=new XFAObjectArray;this.decimal=new XFAObjectArray;this.exData=new XFAObjectArray;this.exObject=new XFAObjectArray;this.float=new XFAObjectArray;this.image=new XFAObjectArray;this.integer=new XFAObjectArray;this.text=new XFAObjectArray;this.time=new XFAObjectArray}}class ExclGroup extends XFAObject{constructor(e){super(Go,"exclGroup",!0);this.access=getStringOption(e.access,["open","nonInteractive","protected","readOnly"]);this.accessKey=e.accessKey||\
"";this.anchorType=getStringOption(e.anchorType,["topLeft","bottomCenter","bottomLeft","bottomRight","middleCenter","middleLeft","middleRight","topCenter","topRight"]);this.colSpan=getInteger({data:e.colSpan,defaultValue:1,validate:e=>e>=1||-1===e});this.h=e.h?getMeasurement(e.h):"";this.hAlign=getStringOption(e.hAlign,["left","center","justify","justifyAll","radix","right"]);this.id=e.id||"";this.layout=getStringOption(e.layout,["position","lr-tb","rl-row","rl-tb","row","table","tb"]);this.maxH\
=getMeasurement(e.maxH,"0pt");this.maxW=getMeasurement(e.maxW,"0pt");this.minH=getMeasurement(e.minH,"0pt");this.minW=getMeasurement(e.minW,"0pt");this.name=e.name||"";this.presence=getStringOption(e.presence,["visible","hidden","inactive","invisible"]);this.relevant=getRelevant(e.relevant);this.use=e.use||"";this.usehref=e.usehref||"";this.w=e.w?getMeasurement(e.w):"";this.x=getMeasurement(e.x,"0pt");this.y=getMeasurement(e.y,"0pt");this.assist=null;this.bind=null;this.border=null;this.calculat\
e=null;this.caption=null;this.desc=null;this.extras=null;this.margin=null;this.para=null;this.traversal=null;this.validate=null;this.connect=new XFAObjectArray;this.event=new XFAObjectArray;this.field=new XFAObjectArray;this.setProperty=new XFAObjectArray}[Rs](){return!0}[Ts](){return!0}[io](e){for(const t of this.field.children){if(!t.value){const e=new Value({});t[Qn](e);t.value=e}t.value[io](e)}}[_s](){return this.layout.endsWith("-tb")&&0===this[ls].attempt&&this[ls].numberInLine>0||this[vs]\
()[_s]()}[js](){const e=this[Cs]();if(!e[js]())return!1;if(void 0!==this[ls]._isSplittable)return this[ls]._isSplittable;if("position"===this.layout||this.layout.includes("row")){this[ls]._isSplittable=!1;return!1}if(e.layout?.endsWith("-tb")&&0!==e[ls].numberInLine)return!1;this[ls]._isSplittable=!0;return!0}[us](){return flushHTML(this)}[Zn](e,t){addHTML(this,e,t)}[gs](){return getAvailableSpace(this)}[co](e){setTabIndex(this);if("hidden"===this.presence||"inactive"===this.presence||0===this.h\
||0===this.w)return HTMLResult.EMPTY;fixDimensions(this);const t=[],a={id:this[uo],class:[]};setAccess(this,a.class);this[ls]||=Object.create(null);Object.assign(this[ls],{children:t,attributes:a,attempt:0,line:null,numberInLine:0,availableSpace:{width:Math.min(this.w||1/0,e.width),height:Math.min(this.h||1/0,e.height)},width:0,height:0,prevHeight:0,currentWidth:0});const r=this[js]();r||setFirstUnsplittable(this);if(!checkDimensions(this,e))return HTMLResult.FAILURE;const i=new Set(["field"]);i\
f(this.layout.includes("row")){const e=this[Cs]().columnWidths;if(Array.isArray(e)&&e.length>0){this[ls].columnWidths=e;this[ls].currentColumn=0}}const n=toStyle(this,"anchorType","dimensions","position","presence","border","margin","hAlign"),s=["xfaExclgroup"],o=layoutClass(this);o&&s.push(o);isPrintOnly(this)&&s.push("xfaPrintOnly");a.style=n;a.class=s;this.name&&(a.xfaName=this.name);this[Ys]();const c="lr-tb"===this.layout||"rl-tb"===this.layout,l=c?2:1;for(;this[ls].attempt<l;this[ls].attem\
pt++){c&&1===this[ls].attempt&&(this[ls].numberInLine=0);const e=this[es]({filter:i,include:!0});if(e.success)break;if(e.isBreak()){this[Js]();return e}if(c&&0===this[ls].attempt&&0===this[ls].numberInLine&&!this[Fs]()[ls].noLayoutFailure){this[ls].attempt=l;break}}this[Js]();r||unsetFirstUnsplittable(this);if(this[ls].attempt===l){r||delete this[ls];return HTMLResult.FAILURE}let h=0,u=0;if(this.margin){h=this.margin.leftInset+this.margin.rightInset;u=this.margin.topInset+this.margin.bottomInset\
}const d=Math.max(this[ls].width+h,this.w||0),f=Math.max(this[ls].height+u,this.h||0),g=[this.x,this.y,d,f];""===this.w&&(n.width=measureToString(d));""===this.h&&(n.height=measureToString(f));const p={name:"div",attributes:a,children:t};applyAssist(this,a);delete this[ls];return HTMLResult.success(createWrapper(this,p),g)}}class Execute extends XFAObject{constructor(e){super(Go,"execute");this.connection=e.connection||"";this.executeType=getStringOption(e.executeType,["import","remerge"]);this.\
id=e.id||"";this.runAt=getStringOption(e.runAt,["client","both","server"]);this.use=e.use||"";this.usehref=e.usehref||""}}class Extras extends XFAObject{constructor(e){super(Go,"extras",!0);this.id=e.id||"";this.name=e.name||"";this.use=e.use||"";this.usehref=e.usehref||"";this.boolean=new XFAObjectArray;this.date=new XFAObjectArray;this.dateTime=new XFAObjectArray;this.decimal=new XFAObjectArray;this.exData=new XFAObjectArray;this.extras=new XFAObjectArray;this.float=new XFAObjectArray;this.ima\
ge=new XFAObjectArray;this.integer=new XFAObjectArray;this.text=new XFAObjectArray;this.time=new XFAObjectArray}}class Field extends XFAObject{constructor(e){super(Go,"field",!0);this.access=getStringOption(e.access,["open","nonInteractive","protected","readOnly"]);this.accessKey=e.accessKey||"";this.anchorType=getStringOption(e.anchorType,["topLeft","bottomCenter","bottomLeft","bottomRight","middleCenter","middleLeft","middleRight","topCenter","topRight"]);this.colSpan=getInteger({data:e.colSpa\
n,defaultValue:1,validate:e=>e>=1||-1===e});this.h=e.h?getMeasurement(e.h):"";this.hAlign=getStringOption(e.hAlign,["left","center","justify","justifyAll","radix","right"]);this.id=e.id||"";this.locale=e.locale||"";this.maxH=getMeasurement(e.maxH,"0pt");this.maxW=getMeasurement(e.maxW,"0pt");this.minH=getMeasurement(e.minH,"0pt");this.minW=getMeasurement(e.minW,"0pt");this.name=e.name||"";this.presence=getStringOption(e.presence,["visible","hidden","inactive","invisible"]);this.relevant=getRelev\
ant(e.relevant);this.rotate=getInteger({data:e.rotate,defaultValue:0,validate:e=>e%90==0});this.use=e.use||"";this.usehref=e.usehref||"";this.w=e.w?getMeasurement(e.w):"";this.x=getMeasurement(e.x,"0pt");this.y=getMeasurement(e.y,"0pt");this.assist=null;this.bind=null;this.border=null;this.calculate=null;this.caption=null;this.desc=null;this.extras=null;this.font=null;this.format=null;this.items=new XFAObjectArray(2);this.keep=null;this.margin=null;this.para=null;this.traversal=null;this.ui=null\
;this.validate=null;this.value=null;this.bindItems=new XFAObjectArray;this.connect=new XFAObjectArray;this.event=new XFAObjectArray;this.setProperty=new XFAObjectArray}[Rs](){return!0}[io](e){_setValue(this,e)}[co](e){setTabIndex(this);if(!this.ui){this.ui=new Ui({});this.ui[Is]=this[Is];this[Qn](this.ui);let e;switch(this.items.children.length){case 0:e=new TextEdit({});this.ui.textEdit=e;break;case 1:e=new CheckButton({});this.ui.checkButton=e;break;case 2:e=new ChoiceList({});this.ui.choiceLi\
st=e}this.ui[Qn](e)}if(!this.ui||"hidden"===this.presence||"inactive"===this.presence||0===this.h||0===this.w)return HTMLResult.EMPTY;this.caption&&delete this.caption[ls];this[Ys]();const t=this.caption?this.caption[co](e).html:null,a=this.w,r=this.h;let i=0,n=0;if(this.margin){i=this.margin.leftInset+this.margin.rightInset;n=this.margin.topInset+this.margin.bottomInset}let s=null;if(""===this.w||""===this.h){let t=null,a=null,r=0,o=0;if(this.ui.checkButton)r=o=this.ui.checkButton.size;else{con\
st{w:t,h:a}=layoutNode(this,e);if(null!==t){r=t;o=a}else o=function fonts_getMetrics(e,t=!1){let a=null;if(e){const t=stripQuotes(e.typeface),r=e[Is].fontFinder.find(t);a=selectFont(e,r)}if(!a)return{lineHeight:12,lineGap:2,lineNoGap:10};const r=e.size||10,i=a.lineHeight?Math.max(t?0:1.2,a.lineHeight):1.2,n=void 0===a.lineGap?.2:a.lineGap;return{lineHeight:i*r,lineGap:n*r,lineNoGap:Math.max(1,i-n)*r}}(this.font,!0).lineNoGap}s=getBorderDims(this.ui[ws]());r+=s.w;o+=s.h;if(this.caption){const{w:i\
,h:n,isBroken:s}=this.caption[ws](e);if(s&&this[Cs]()[_s]()){this[Js]();return HTMLResult.FAILURE}t=i;a=n;switch(this.caption.placement){case"left":case"right":case"inline":t+=r;break;case"top":case"bottom":a+=o}}else{t=r;a=o}if(t&&""===this.w){t+=i;this.w=Math.min(this.maxW<=0?1/0:this.maxW,this.minW+1<t?t:this.minW)}if(a&&""===this.h){a+=n;this.h=Math.min(this.maxH<=0?1/0:this.maxH,this.minH+1<a?a:this.minH)}}this[Js]();fixDimensions(this);setFirstUnsplittable(this);if(!checkDimensions(this,e)\
){this.w=a;this.h=r;this[Js]();return HTMLResult.FAILURE}unsetFirstUnsplittable(this);const o=toStyle(this,"font","dimensions","position","rotate","anchorType","presence","margin","hAlign");setMinMaxDimensions(this,o);const c=["xfaField"];this.font&&c.push("xfaFont");isPrintOnly(this)&&c.push("xfaPrintOnly");const l={style:o,id:this[uo],class:c};if(o.margin){o.padding=o.margin;delete o.margin}setAccess(this,c);this.name&&(l.xfaName=this.name);const h=[],u={name:"div",attributes:l,children:h};app\
lyAssist(this,l);const d=this.border?this.border[ho]():null,f=computeBbox(this,u,e),g=this.ui[co]().html;if(!g){Object.assign(o,d);return HTMLResult.success(createWrapper(this,u),f)}this[no]&&(g.children?.[0]?g.children[0].attributes.tabindex=this[no]:g.attributes.tabindex=this[no]);g.attributes.style||=Object.create(null);let p=null;if(this.ui.button){1===g.children.length&&([p]=g.children.splice(0,1));Object.assign(g.attributes.style,d)}else Object.assign(o,d);h.push(g);if(this.value)if(this.u\
i.imageEdit)g.children.push(this.value[co]().html);else if(!this.ui.button){let e="";if(this.value.exData)e=this.value.exData[so]();else if(this.value.text)e=this.value.text[ws]();else{const t=this.value[co]().html;null!==t&&(e=t.children[0].value)}this.ui.textEdit&&this.value.text?.maxChars&&(g.children[0].attributes.maxLength=this.value.text.maxChars);if(e){if(this.ui.numericEdit){e=parseFloat(e);e=isNaN(e)?"":e.toString()}"textarea"===g.children[0].name?g.children[0].attributes.textContent=e:\
g.children[0].attributes.value=e}}if(!this.ui.imageEdit&&g.children?.[0]&&this.h){s=s||getBorderDims(this.ui[ws]());let t=0;if(this.caption&&["top","bottom"].includes(this.caption.placement)){t=this.caption.reserve;t<=0&&(t=this.caption[ws](e).h);const a=this.h-t-n-s.h;g.children[0].attributes.style.height=measureToString(a)}else g.children[0].attributes.style.height="100%"}p&&g.children.push(p);if(!t){g.attributes.class&&g.attributes.class.push("xfaLeft");this.w=a;this.h=r;return HTMLResult.suc\
cess(createWrapper(this,u),f)}if(this.ui.button){o.padding&&delete o.padding;"div"===t.name&&(t.name="span");g.children.push(t);return HTMLResult.success(u,f)}this.ui.checkButton&&(t.attributes.class[0]="xfaCaptionForCheckButton");g.attributes.class||=[];g.children.splice(0,0,t);switch(this.caption.placement){case"left":case"inline":g.attributes.class.push("xfaLeft");break;case"right":g.attributes.class.push("xfaRight");break;case"top":g.attributes.class.push("xfaTop");break;case"bottom":g.attri\
butes.class.push("xfaBottom")}this.w=a;this.h=r;return HTMLResult.success(createWrapper(this,u),f)}}class Fill extends XFAObject{constructor(e){super(Go,"fill",!0);this.id=e.id||"";this.presence=getStringOption(e.presence,["visible","hidden","inactive","invisible"]);this.use=e.use||"";this.usehref=e.usehref||"";this.color=null;this.extras=null;this.linear=null;this.pattern=null;this.radial=null;this.solid=null;this.stipple=null}[ho](){const e=this[vs](),t=e[vs]()[vs](),a=Object.create(null);let \
r="color",i=r;if(e instanceof Border){r="background-color";i="background";t instanceof Ui&&(a.backgroundColor="white")}if(e instanceof Rectangle||e instanceof Arc){r=i="fill";a.fill="white"}for(const e of Object.getOwnPropertyNames(this)){if("extras"===e||"color"===e)continue;const t=this[e];if(!(t instanceof XFAObject))continue;const n=t[ho](this.color);n&&(a[n.startsWith("#")?r:i]=n);return a}if(this.color?.value){const e=this.color[ho]();a[e.startsWith("#")?r:i]=e}return a}}class Filter exten\
ds XFAObject{constructor(e){super(Go,"filter",!0);this.addRevocationInfo=getStringOption(e.addRevocationInfo,["","required","optional","none"]);this.id=e.id||"";this.name=e.name||"";this.use=e.use||"";this.usehref=e.usehref||"";this.version=getInteger({data:this.version,defaultValue:5,validate:e=>e>=1&&e<=5});this.appearanceFilter=null;this.certificates=null;this.digestMethods=null;this.encodings=null;this.encryptionMethods=null;this.handler=null;this.lockDocument=null;this.mdp=null;this.reasons\
=null;this.timeStamp=null}}class Float extends ContentObject{constructor(e){super(Go,"float");this.id=e.id||"";this.name=e.name||"";this.use=e.use||"";this.usehref=e.usehref||""}[hs](){const e=parseFloat(this[ss].trim());this[ss]=isNaN(e)?null:e}[co](e){return valueToHtml(null!==this[ss]?this[ss].toString():"")}}class template_Font extends XFAObject{constructor(e){super(Go,"font",!0);this.baselineShift=getMeasurement(e.baselineShift);this.fontHorizontalScale=getFloat({data:e.fontHorizontalScale,\
defaultValue:100,validate:e=>e>=0});this.fontVerticalScale=getFloat({data:e.fontVerticalScale,defaultValue:100,validate:e=>e>=0});this.id=e.id||"";this.kerningMode=getStringOption(e.kerningMode,["none","pair"]);this.letterSpacing=getMeasurement(e.letterSpacing,"0");this.lineThrough=getInteger({data:e.lineThrough,defaultValue:0,validate:e=>1===e||2===e});this.lineThroughPeriod=getStringOption(e.lineThroughPeriod,["all","word"]);this.overline=getInteger({data:e.overline,defaultValue:0,validate:e=>\
1===e||2===e});this.overlinePeriod=getStringOption(e.overlinePeriod,["all","word"]);this.posture=getStringOption(e.posture,["normal","italic"]);this.size=getMeasurement(e.size,"10pt");this.typeface=e.typeface||"Courier";this.underline=getInteger({data:e.underline,defaultValue:0,validate:e=>1===e||2===e});this.underlinePeriod=getStringOption(e.underlinePeriod,["all","word"]);this.use=e.use||"";this.usehref=e.usehref||"";this.weight=getStringOption(e.weight,["normal","bold"]);this.extras=null;this\
.fill=null}[ts](e){super[ts](e);this[Is].usedTypefaces.add(this.typeface)}[ho](){const e=toStyle(this,"fill"),t=e.color;if(t)if("#000000"===t)delete e.color;else if(!t.startsWith("#")){e.background=t;e.backgroundClip="text";e.color="transparent"}this.baselineShift&&(e.verticalAlign=measureToString(this.baselineShift));e.fontKerning="none"===this.kerningMode?"none":"normal";e.letterSpacing=measureToString(this.letterSpacing);if(0!==this.lineThrough){e.textDecoration="line-through";2===this.lineTh\
rough&&(e.textDecorationStyle="double")}if(0!==this.overline){e.textDecoration="overline";2===this.overline&&(e.textDecorationStyle="double")}e.fontStyle=this.posture;e.fontSize=measureToString(.99*this.size);setFontFamily(this,this,this[Is].fontFinder,e);if(0!==this.underline){e.textDecoration="underline";2===this.underline&&(e.textDecorationStyle="double")}e.fontWeight=this.weight;return e}}class Format extends XFAObject{constructor(e){super(Go,"format",!0);this.id=e.id||"";this.use=e.use||"";\
this.usehref=e.usehref||"";this.extras=null;this.picture=null}}class Handler extends StringObject{constructor(e){super(Go,"handler");this.id=e.id||"";this.type=getStringOption(e.type,["optional","required"]);this.use=e.use||"";this.usehref=e.usehref||""}}class Hyphenation extends XFAObject{constructor(e){super(Go,"hyphenation");this.excludeAllCaps=getInteger({data:e.excludeAllCaps,defaultValue:0,validate:e=>1===e});this.excludeInitialCap=getInteger({data:e.excludeInitialCap,defaultValue:0,valida\
te:e=>1===e});this.hyphenate=getInteger({data:e.hyphenate,defaultValue:0,validate:e=>1===e});this.id=e.id||"";this.pushCharacterCount=getInteger({data:e.pushCharacterCount,defaultValue:3,validate:e=>e>=0});this.remainCharacterCount=getInteger({data:e.remainCharacterCount,defaultValue:3,validate:e=>e>=0});this.use=e.use||"";this.usehref=e.usehref||"";this.wordCharacterCount=getInteger({data:e.wordCharacterCount,defaultValue:7,validate:e=>e>=0})}}class Image extends StringObject{constructor(e){sup\
er(Go,"image");this.aspect=getStringOption(e.aspect,["fit","actual","height","none","width"]);this.contentType=e.contentType||"";this.href=e.href||"";this.id=e.id||"";this.name=e.name||"";this.transferEncoding=getStringOption(e.transferEncoding,["base64","none","package"]);this.use=e.use||"";this.usehref=e.usehref||""}[co](){if(this.contentType&&!Jo.has(this.contentType.toLowerCase()))return HTMLResult.EMPTY;let e=this[Is].images?.get(this.href);if(!e&&(this.href||!this[ss]))return HTMLResult.EM\
PTY;e||"base64"!==this.transferEncoding||(e=function fromBase64Util(e){return Uint8Array.fromBase64?Uint8Array.fromBase64(e):stringToBytes(atob(e))}(this[ss]));if(!e)return HTMLResult.EMPTY;if(!this.contentType){for(const[t,a]of Yo)if(e.length>t.length&&t.every(((t,a)=>t===e[a]))){this.contentType=a;break}if(!this.contentType)return HTMLResult.EMPTY}const t=new Blob([e],{type:this.contentType});let a;switch(this.aspect){case"fit":case"actual":break;case"height":a={height:"100%",objectFit:"fill"}\
;break;case"none":a={width:"100%",height:"100%",objectFit:"fill"};break;case"width":a={width:"100%",objectFit:"fill"}}const r=this[vs]();return HTMLResult.success({name:"img",attributes:{class:["xfaImage"],style:a,src:URL.createObjectURL(t),alt:r?ariaLabel(r[vs]()):null}})}}class ImageEdit extends XFAObject{constructor(e){super(Go,"imageEdit",!0);this.data=getStringOption(e.data,["link","embed"]);this.id=e.id||"";this.use=e.use||"";this.usehref=e.usehref||"";this.border=null;this.extras=null;thi\
s.margin=null}[co](e){return"embed"===this.data?HTMLResult.success({name:"div",children:[],attributes:{}}):HTMLResult.EMPTY}}class Integer extends ContentObject{constructor(e){super(Go,"integer");this.id=e.id||"";this.name=e.name||"";this.use=e.use||"";this.usehref=e.usehref||""}[hs](){const e=parseInt(this[ss].trim(),10);this[ss]=isNaN(e)?null:e}[co](e){return valueToHtml(null!==this[ss]?this[ss].toString():"")}}class Issuers extends XFAObject{constructor(e){super(Go,"issuers",!0);this.id=e.id|\
|"";this.type=getStringOption(e.type,["optional","required"]);this.use=e.use||"";this.usehref=e.usehref||"";this.certificate=new XFAObjectArray}}class Items extends XFAObject{constructor(e){super(Go,"items",!0);this.id=e.id||"";this.name=e.name||"";this.presence=getStringOption(e.presence,["visible","hidden","inactive","invisible"]);this.ref=e.ref||"";this.save=getInteger({data:e.save,defaultValue:0,validate:e=>1===e});this.use=e.use||"";this.usehref=e.usehref||"";this.boolean=new XFAObjectArray\
;this.date=new XFAObjectArray;this.dateTime=new XFAObjectArray;this.decimal=new XFAObjectArray;this.exData=new XFAObjectArray;this.float=new XFAObjectArray;this.image=new XFAObjectArray;this.integer=new XFAObjectArray;this.text=new XFAObjectArray;this.time=new XFAObjectArray}[co](){const e=[];for(const t of this[Ss]())e.push(t[so]());return HTMLResult.success(e)}}class Keep extends XFAObject{constructor(e){super(Go,"keep",!0);this.id=e.id||"";const t=["none","contentArea","pageArea"];this.intact\
=getStringOption(e.intact,t);this.next=getStringOption(e.next,t);this.previous=getStringOption(e.previous,t);this.use=e.use||"";this.usehref=e.usehref||"";this.extras=null}}class KeyUsage extends XFAObject{constructor(e){super(Go,"keyUsage");const t=["","yes","no"];this.crlSign=getStringOption(e.crlSign,t);this.dataEncipherment=getStringOption(e.dataEncipherment,t);this.decipherOnly=getStringOption(e.decipherOnly,t);this.digitalSignature=getStringOption(e.digitalSignature,t);this.encipherOnly=ge\
tStringOption(e.encipherOnly,t);this.id=e.id||"";this.keyAgreement=getStringOption(e.keyAgreement,t);this.keyCertSign=getStringOption(e.keyCertSign,t);this.keyEncipherment=getStringOption(e.keyEncipherment,t);this.nonRepudiation=getStringOption(e.nonRepudiation,t);this.type=getStringOption(e.type,["optional","required"]);this.use=e.use||"";this.usehref=e.usehref||""}}class Line extends XFAObject{constructor(e){super(Go,"line",!0);this.hand=getStringOption(e.hand,["even","left","right"]);this.id=\
e.id||"";this.slope=getStringOption(e.slope,["\\\\","/"]);this.use=e.use||"";this.usehref=e.usehref||"";this.edge=null}[co](){const e=this[vs]()[vs](),t=this.edge||new Edge({}),a=t[ho](),r=Object.create(null),i="visible"===t.presence?t.thickness:0;r.strokeWidth=measureToString(i);r.stroke=a.color;let n,s,o,c,l="100%",h="100%";if(e.w<=i){[n,s,o,c]=["50%",0,"50%","100%"];l=r.strokeWidth}else if(e.h<=i){[n,s,o,c]=[0,"50%","100%","50%"];h=r.strokeWidth}else"\\\\"===this.slope?[n,s,o,c]=[0,0,"100%","100%\
"]:[n,s,o,c]=[0,"100%","100%",0];const u={name:"svg",children:[{name:"line",attributes:{xmlns:Vo,x1:n,y1:s,x2:o,y2:c,style:r}}],attributes:{xmlns:Vo,width:l,height:h,style:{overflow:"visible"}}};if(hasMargin(e))return HTMLResult.success({name:"div",attributes:{style:{display:"inline",width:"100%",height:"100%"}},children:[u]});u.attributes.style.position="absolute";return HTMLResult.success(u)}}class Linear extends XFAObject{constructor(e){super(Go,"linear",!0);this.id=e.id||"";this.type=getStri\
ngOption(e.type,["toRight","toBottom","toLeft","toTop"]);this.use=e.use||"";this.usehref=e.usehref||"";this.color=null;this.extras=null}[ho](e){e=e?e[ho]():"#FFFFFF";return`linear-gradient(${this.type.replace(/([RBLT])/," $1").toLowerCase()}, ${e}, ${this.color?this.color[ho]():"#000000"})`}}class LockDocument extends ContentObject{constructor(e){super(Go,"lockDocument");this.id=e.id||"";this.type=getStringOption(e.type,["optional","required"]);this.use=e.use||"";this.usehref=e.usehref||""}[hs](\
){this[ss]=getStringOption(this[ss],["auto","0","1"])}}class Manifest extends XFAObject{constructor(e){super(Go,"manifest",!0);this.action=getStringOption(e.action,["include","all","exclude"]);this.id=e.id||"";this.name=e.name||"";this.use=e.use||"";this.usehref=e.usehref||"";this.extras=null;this.ref=new XFAObjectArray}}class Margin extends XFAObject{constructor(e){super(Go,"margin",!0);this.bottomInset=getMeasurement(e.bottomInset,"0");this.id=e.id||"";this.leftInset=getMeasurement(e.leftInset\
,"0");this.rightInset=getMeasurement(e.rightInset,"0");this.topInset=getMeasurement(e.topInset,"0");this.use=e.use||"";this.usehref=e.usehref||"";this.extras=null}[ho](){return{margin:measureToString(this.topInset)+" "+measureToString(this.rightInset)+" "+measureToString(this.bottomInset)+" "+measureToString(this.leftInset)}}}class Mdp extends XFAObject{constructor(e){super(Go,"mdp");this.id=e.id||"";this.permissions=getInteger({data:e.permissions,defaultValue:2,validate:e=>1===e||3===e});this.s\
ignatureType=getStringOption(e.signatureType,["filler","author"]);this.use=e.use||"";this.usehref=e.usehref||""}}class Medium extends XFAObject{constructor(e){super(Go,"medium");this.id=e.id||"";this.imagingBBox=function getBBox(e){const t=-1;if(!e)return{x:t,y:t,width:t,height:t};const a=e.split(",",4).map((e=>getMeasurement(e.trim(),"-1")));if(a.length<4||a[2]<0||a[3]<0)return{x:t,y:t,width:t,height:t};const[r,i,n,s]=a;return{x:r,y:i,width:n,height:s}}(e.imagingBBox);this.long=getMeasurement(e\
.long);this.orientation=getStringOption(e.orientation,["portrait","landscape"]);this.short=getMeasurement(e.short);this.stock=e.stock||"";this.trayIn=getStringOption(e.trayIn,["auto","delegate","pageFront"]);this.trayOut=getStringOption(e.trayOut,["auto","delegate"]);this.use=e.use||"";this.usehref=e.usehref||""}}class Message extends XFAObject{constructor(e){super(Go,"message",!0);this.id=e.id||"";this.use=e.use||"";this.usehref=e.usehref||"";this.text=new XFAObjectArray}}class NumericEdit exte\
nds XFAObject{constructor(e){super(Go,"numericEdit",!0);this.hScrollPolicy=getStringOption(e.hScrollPolicy,["auto","off","on"]);this.id=e.id||"";this.use=e.use||"";this.usehref=e.usehref||"";this.border=null;this.comb=null;this.extras=null;this.margin=null}[co](e){const t=toStyle(this,"border","font","margin"),a=this[vs]()[vs](),r={name:"input",attributes:{type:"text",fieldId:a[uo],dataId:a[os]?.[uo]||a[uo],class:["xfaTextfield"],style:t,"aria-label":ariaLabel(a),"aria-required":!1}};if(isRequir\
ed(a)){r.attributes["aria-required"]=!0;r.attributes.required=!0}return HTMLResult.success({name:"label",attributes:{class:["xfaLabel"]},children:[r]})}}class Occur extends XFAObject{constructor(e){super(Go,"occur",!0);this.id=e.id||"";this.initial=""!==e.initial?getInteger({data:e.initial,defaultValue:"",validate:e=>!0}):"";this.max=""!==e.max?getInteger({data:e.max,defaultValue:1,validate:e=>!0}):"";this.min=""!==e.min?getInteger({data:e.min,defaultValue:1,validate:e=>!0}):"";this.use=e.use||"\
";this.usehref=e.usehref||"";this.extras=null}[ts](){const e=this[vs](),t=this.min;""===this.min&&(this.min=e instanceof PageArea||e instanceof PageSet?0:1);""===this.max&&(this.max=""===t?e instanceof PageArea||e instanceof PageSet?-1:1:this.min);-1!==this.max&&this.max<this.min&&(this.max=this.min);""===this.initial&&(this.initial=e instanceof Template?1:this.min)}}class Oid extends StringObject{constructor(e){super(Go,"oid");this.id=e.id||"";this.name=e.name||"";this.use=e.use||"";this.usehre\
f=e.usehref||""}}class Oids extends XFAObject{constructor(e){super(Go,"oids",!0);this.id=e.id||"";this.type=getStringOption(e.type,["optional","required"]);this.use=e.use||"";this.usehref=e.usehref||"";this.oid=new XFAObjectArray}}class Overflow extends XFAObject{constructor(e){super(Go,"overflow");this.id=e.id||"";this.leader=e.leader||"";this.target=e.target||"";this.trailer=e.trailer||"";this.use=e.use||"";this.usehref=e.usehref||""}[ws](){if(!this[ls]){const e=this[vs](),t=this[Fs](),a=t[to]\
(this.target,e),r=t[to](this.leader,e),i=t[to](this.trailer,e);this[ls]={target:a?.[0]||null,leader:r?.[0]||null,trailer:i?.[0]||null,addLeader:!1,addTrailer:!1}}return this[ls]}}class PageArea extends XFAObject{constructor(e){super(Go,"pageArea",!0);this.blankOrNotBlank=getStringOption(e.blankOrNotBlank,["any","blank","notBlank"]);this.id=e.id||"";this.initialNumber=getInteger({data:e.initialNumber,defaultValue:1,validate:e=>!0});this.name=e.name||"";this.numbered=getInteger({data:e.numbered,de\
faultValue:1,validate:e=>!0});this.oddOrEven=getStringOption(e.oddOrEven,["any","even","odd"]);this.pagePosition=getStringOption(e.pagePosition,["any","first","last","only","rest"]);this.relevant=getRelevant(e.relevant);this.use=e.use||"";this.usehref=e.usehref||"";this.desc=null;this.extras=null;this.medium=null;this.occur=null;this.area=new XFAObjectArray;this.contentArea=new XFAObjectArray;this.draw=new XFAObjectArray;this.exclGroup=new XFAObjectArray;this.field=new XFAObjectArray;this.subfor\
m=new XFAObjectArray}[Xs](){if(!this[ls]){this[ls]={numberOfUse:0};return!0}return!this.occur||-1===this.occur.max||this[ls].numberOfUse<this.occur.max}[as](){delete this[ls]}[ks](){this[ls]||={numberOfUse:0};const e=this[vs]();if("orderedOccurrence"===e.relation&&this[Xs]()){this[ls].numberOfUse+=1;return this}return e[ks]()}[gs](){return this[ls].space||{width:0,height:0}}[co](){this[ls]||={numberOfUse:1};const e=[];this[ls].children=e;const t=Object.create(null);if(this.medium&&this.medium.sh\
ort&&this.medium.long){t.width=measureToString(this.medium.short);t.height=measureToString(this.medium.long);this[ls].space={width:this.medium.short,height:this.medium.long};if("landscape"===this.medium.orientation){const e=t.width;t.width=t.height;t.height=e;this[ls].space={width:this.medium.long,height:this.medium.short}}}else warn("XFA - No medium specified in pageArea: please file a bug.");this[es]({filter:new Set(["area","draw","field","subform"]),include:!0});this[es]({filter:new Set(["con\
tentArea"]),include:!0});return HTMLResult.success({name:"div",children:e,attributes:{class:["xfaPage"],id:this[uo],style:t,xfaName:this.name}})}}class PageSet extends XFAObject{constructor(e){super(Go,"pageSet",!0);this.duplexImposition=getStringOption(e.duplexImposition,["longEdge","shortEdge"]);this.id=e.id||"";this.name=e.name||"";this.relation=getStringOption(e.relation,["orderedOccurrence","duplexPaginated","simplexPaginated"]);this.relevant=getRelevant(e.relevant);this.use=e.use||"";this.\
usehref=e.usehref||"";this.extras=null;this.occur=null;this.pageArea=new XFAObjectArray;this.pageSet=new XFAObjectArray}[as](){for(const e of this.pageArea.children)e[as]();for(const e of this.pageSet.children)e[as]()}[Xs](){return!this.occur||-1===this.occur.max||this[ls].numberOfUse<this.occur.max}[ks](){this[ls]||={numberOfUse:1,pageIndex:-1,pageSetIndex:-1};if("orderedOccurrence"===this.relation){if(this[ls].pageIndex+1<this.pageArea.children.length){this[ls].pageIndex+=1;return this.pageAre\
a.children[this[ls].pageIndex][ks]()}if(this[ls].pageSetIndex+1<this.pageSet.children.length){this[ls].pageSetIndex+=1;return this.pageSet.children[this[ls].pageSetIndex][ks]()}if(this[Xs]()){this[ls].numberOfUse+=1;this[ls].pageIndex=-1;this[ls].pageSetIndex=-1;return this[ks]()}const e=this[vs]();if(e instanceof PageSet)return e[ks]();this[as]();return this[ks]()}const e=this[Fs]()[ls].pageNumber,t=e%2==0?"even":"odd",a=0===e?"first":"rest";let r=this.pageArea.children.find((e=>e.oddOrEven===t\
&&e.pagePosition===a));if(r)return r;r=this.pageArea.children.find((e=>"any"===e.oddOrEven&&e.pagePosition===a));if(r)return r;r=this.pageArea.children.find((e=>"any"===e.oddOrEven&&"any"===e.pagePosition));return r||this.pageArea.children[0]}}class Para extends XFAObject{constructor(e){super(Go,"para",!0);this.hAlign=getStringOption(e.hAlign,["left","center","justify","justifyAll","radix","right"]);this.id=e.id||"";this.lineHeight=e.lineHeight?getMeasurement(e.lineHeight,"0pt"):"";this.marginLe\
ft=e.marginLeft?getMeasurement(e.marginLeft,"0pt"):"";this.marginRight=e.marginRight?getMeasurement(e.marginRight,"0pt"):"";this.orphans=getInteger({data:e.orphans,defaultValue:0,validate:e=>e>=0});this.preserve=e.preserve||"";this.radixOffset=e.radixOffset?getMeasurement(e.radixOffset,"0pt"):"";this.spaceAbove=e.spaceAbove?getMeasurement(e.spaceAbove,"0pt"):"";this.spaceBelow=e.spaceBelow?getMeasurement(e.spaceBelow,"0pt"):"";this.tabDefault=e.tabDefault?getMeasurement(this.tabDefault):"";this.\
tabStops=(e.tabStops||"").trim().split(/\\s+/).map(((e,t)=>t%2==1?getMeasurement(e):e));this.textIndent=e.textIndent?getMeasurement(e.textIndent,"0pt"):"";this.use=e.use||"";this.usehref=e.usehref||"";this.vAlign=getStringOption(e.vAlign,["top","bottom","middle"]);this.widows=getInteger({data:e.widows,defaultValue:0,validate:e=>e>=0});this.hyphenation=null}[ho](){const e=toStyle(this,"hAlign");""!==this.marginLeft&&(e.paddingLeft=measureToString(this.marginLeft));""!==this.marginRight&&(e.padding\
Right=measureToString(this.marginRight));""!==this.spaceAbove&&(e.paddingTop=measureToString(this.spaceAbove));""!==this.spaceBelow&&(e.paddingBottom=measureToString(this.spaceBelow));if(""!==this.textIndent){e.textIndent=measureToString(this.textIndent);fixTextIndent(e)}this.lineHeight>0&&(e.lineHeight=measureToString(this.lineHeight));""!==this.tabDefault&&(e.tabSize=measureToString(this.tabDefault));this.tabStops.length;this.hyphenatation&&Object.assign(e,this.hyphenatation[ho]());return e}}c\
lass PasswordEdit extends XFAObject{constructor(e){super(Go,"passwordEdit",!0);this.hScrollPolicy=getStringOption(e.hScrollPolicy,["auto","off","on"]);this.id=e.id||"";this.passwordChar=e.passwordChar||"*";this.use=e.use||"";this.usehref=e.usehref||"";this.border=null;this.extras=null;this.margin=null}}class template_Pattern extends XFAObject{constructor(e){super(Go,"pattern",!0);this.id=e.id||"";this.type=getStringOption(e.type,["crossHatch","crossDiagonal","diagonalLeft","diagonalRight","horiz\
ontal","vertical"]);this.use=e.use||"";this.usehref=e.usehref||"";this.color=null;this.extras=null}[ho](e){e=e?e[ho]():"#FFFFFF";const t=this.color?this.color[ho]():"#000000",a="repeating-linear-gradient",r=`${e},${e} 5px,${t} 5px,${t} 10px`;switch(this.type){case"crossHatch":return`${a}(to top,${r}) ${a}(to right,${r})`;case"crossDiagonal":return`${a}(45deg,${r}) ${a}(-45deg,${r})`;case"diagonalLeft":return`${a}(45deg,${r})`;case"diagonalRight":return`${a}(-45deg,${r})`;case"horizontal":return`\
${a}(to top,${r})`;case"vertical":return`${a}(to right,${r})`}return""}}class Picture extends StringObject{constructor(e){super(Go,"picture");this.id=e.id||"";this.use=e.use||"";this.usehref=e.usehref||""}}class Proto extends XFAObject{constructor(e){super(Go,"proto",!0);this.appearanceFilter=new XFAObjectArray;this.arc=new XFAObjectArray;this.area=new XFAObjectArray;this.assist=new XFAObjectArray;this.barcode=new XFAObjectArray;this.bindItems=new XFAObjectArray;this.bookend=new XFAObjectArray;t\
his.boolean=new XFAObjectArray;this.border=new XFAObjectArray;this.break=new XFAObjectArray;this.breakAfter=new XFAObjectArray;this.breakBefore=new XFAObjectArray;this.button=new XFAObjectArray;this.calculate=new XFAObjectArray;this.caption=new XFAObjectArray;this.certificate=new XFAObjectArray;this.certificates=new XFAObjectArray;this.checkButton=new XFAObjectArray;this.choiceList=new XFAObjectArray;this.color=new XFAObjectArray;this.comb=new XFAObjectArray;this.connect=new XFAObjectArray;this.\
contentArea=new XFAObjectArray;this.corner=new XFAObjectArray;this.date=new XFAObjectArray;this.dateTime=new XFAObjectArray;this.dateTimeEdit=new XFAObjectArray;this.decimal=new XFAObjectArray;this.defaultUi=new XFAObjectArray;this.desc=new XFAObjectArray;this.digestMethod=new XFAObjectArray;this.digestMethods=new XFAObjectArray;this.draw=new XFAObjectArray;this.edge=new XFAObjectArray;this.encoding=new XFAObjectArray;this.encodings=new XFAObjectArray;this.encrypt=new XFAObjectArray;this.encrypt\
Data=new XFAObjectArray;this.encryption=new XFAObjectArray;this.encryptionMethod=new XFAObjectArray;this.encryptionMethods=new XFAObjectArray;this.event=new XFAObjectArray;this.exData=new XFAObjectArray;this.exObject=new XFAObjectArray;this.exclGroup=new XFAObjectArray;this.execute=new XFAObjectArray;this.extras=new XFAObjectArray;this.field=new XFAObjectArray;this.fill=new XFAObjectArray;this.filter=new XFAObjectArray;this.float=new XFAObjectArray;this.font=new XFAObjectArray;this.format=new XF\
AObjectArray;this.handler=new XFAObjectArray;this.hyphenation=new XFAObjectArray;this.image=new XFAObjectArray;this.imageEdit=new XFAObjectArray;this.integer=new XFAObjectArray;this.issuers=new XFAObjectArray;this.items=new XFAObjectArray;this.keep=new XFAObjectArray;this.keyUsage=new XFAObjectArray;this.line=new XFAObjectArray;this.linear=new XFAObjectArray;this.lockDocument=new XFAObjectArray;this.manifest=new XFAObjectArray;this.margin=new XFAObjectArray;this.mdp=new XFAObjectArray;this.mediu\
m=new XFAObjectArray;this.message=new XFAObjectArray;this.numericEdit=new XFAObjectArray;this.occur=new XFAObjectArray;this.oid=new XFAObjectArray;this.oids=new XFAObjectArray;this.overflow=new XFAObjectArray;this.pageArea=new XFAObjectArray;this.pageSet=new XFAObjectArray;this.para=new XFAObjectArray;this.passwordEdit=new XFAObjectArray;this.pattern=new XFAObjectArray;this.picture=new XFAObjectArray;this.radial=new XFAObjectArray;this.reason=new XFAObjectArray;this.reasons=new XFAObjectArray;th\
is.rectangle=new XFAObjectArray;this.ref=new XFAObjectArray;this.script=new XFAObjectArray;this.setProperty=new XFAObjectArray;this.signData=new XFAObjectArray;this.signature=new XFAObjectArray;this.signing=new XFAObjectArray;this.solid=new XFAObjectArray;this.speak=new XFAObjectArray;this.stipple=new XFAObjectArray;this.subform=new XFAObjectArray;this.subformSet=new XFAObjectArray;this.subjectDN=new XFAObjectArray;this.subjectDNs=new XFAObjectArray;this.submit=new XFAObjectArray;this.text=new X\
FAObjectArray;this.textEdit=new XFAObjectArray;this.time=new XFAObjectArray;this.timeStamp=new XFAObjectArray;this.toolTip=new XFAObjectArray;this.traversal=new XFAObjectArray;this.traverse=new XFAObjectArray;this.ui=new XFAObjectArray;this.validate=new XFAObjectArray;this.value=new XFAObjectArray;this.variables=new XFAObjectArray}}class Radial extends XFAObject{constructor(e){super(Go,"radial",!0);this.id=e.id||"";this.type=getStringOption(e.type,["toEdge","toCenter"]);this.use=e.use||"";this.u\
sehref=e.usehref||"";this.color=null;this.extras=null}[ho](e){e=e?e[ho]():"#FFFFFF";const t=this.color?this.color[ho]():"#000000";return`radial-gradient(circle at center, ${"toEdge"===this.type?`${e},${t}`:`${t},${e}`})`}}class Reason extends StringObject{constructor(e){super(Go,"reason");this.id=e.id||"";this.name=e.name||"";this.use=e.use||"";this.usehref=e.usehref||""}}class Reasons extends XFAObject{constructor(e){super(Go,"reasons",!0);this.id=e.id||"";this.type=getStringOption(e.type,["opt\
ional","required"]);this.use=e.use||"";this.usehref=e.usehref||"";this.reason=new XFAObjectArray}}class Rectangle extends XFAObject{constructor(e){super(Go,"rectangle",!0);this.hand=getStringOption(e.hand,["even","left","right"]);this.id=e.id||"";this.use=e.use||"";this.usehref=e.usehref||"";this.corner=new XFAObjectArray(4);this.edge=new XFAObjectArray(4);this.fill=null}[co](){const e=this.edge.children.length?this.edge.children[0]:new Edge({}),t=e[ho](),a=Object.create(null);"visible"===this.f\
ill?.presence?Object.assign(a,this.fill[ho]()):a.fill="transparent";a.strokeWidth=measureToString("visible"===e.presence?e.thickness:0);a.stroke=t.color;const r=(this.corner.children.length?this.corner.children[0]:new Corner({}))[ho](),i={name:"svg",children:[{name:"rect",attributes:{xmlns:Vo,width:"100%",height:"100%",x:0,y:0,rx:r.radius,ry:r.radius,style:a}}],attributes:{xmlns:Vo,style:{overflow:"visible"},width:"100%",height:"100%"}};if(hasMargin(this[vs]()[vs]()))return HTMLResult.success({n\
ame:"div",attributes:{style:{display:"inline",width:"100%",height:"100%"}},children:[i]});i.attributes.style.position="absolute";return HTMLResult.success(i)}}class RefElement extends StringObject{constructor(e){super(Go,"ref");this.id=e.id||"";this.use=e.use||"";this.usehref=e.usehref||""}}class Script extends StringObject{constructor(e){super(Go,"script");this.binding=e.binding||"";this.contentType=e.contentType||"";this.id=e.id||"";this.name=e.name||"";this.runAt=getStringOption(e.runAt,["cli\
ent","both","server"]);this.use=e.use||"";this.usehref=e.usehref||""}}class SetProperty extends XFAObject{constructor(e){super(Go,"setProperty");this.connection=e.connection||"";this.ref=e.ref||"";this.target=e.target||""}}class SignData extends XFAObject{constructor(e){super(Go,"signData",!0);this.id=e.id||"";this.operation=getStringOption(e.operation,["sign","clear","verify"]);this.ref=e.ref||"";this.target=e.target||"";this.use=e.use||"";this.usehref=e.usehref||"";this.filter=null;this.manife\
st=null}}class Signature extends XFAObject{constructor(e){super(Go,"signature",!0);this.id=e.id||"";this.type=getStringOption(e.type,["PDF1.3","PDF1.6"]);this.use=e.use||"";this.usehref=e.usehref||"";this.border=null;this.extras=null;this.filter=null;this.manifest=null;this.margin=null}}class Signing extends XFAObject{constructor(e){super(Go,"signing",!0);this.id=e.id||"";this.type=getStringOption(e.type,["optional","required"]);this.use=e.use||"";this.usehref=e.usehref||"";this.certificate=new \
XFAObjectArray}}class Solid extends XFAObject{constructor(e){super(Go,"solid",!0);this.id=e.id||"";this.use=e.use||"";this.usehref=e.usehref||"";this.extras=null}[ho](e){return e?e[ho]():"#FFFFFF"}}class Speak extends StringObject{constructor(e){super(Go,"speak");this.disable=getInteger({data:e.disable,defaultValue:0,validate:e=>1===e});this.id=e.id||"";this.priority=getStringOption(e.priority,["custom","caption","name","toolTip"]);this.rid=e.rid||"";this.use=e.use||"";this.usehref=e.usehref||""\
}}class Stipple extends XFAObject{constructor(e){super(Go,"stipple",!0);this.id=e.id||"";this.rate=getInteger({data:e.rate,defaultValue:50,validate:e=>e>=0&&e<=100});this.use=e.use||"";this.usehref=e.usehref||"";this.color=null;this.extras=null}[ho](e){const t=this.rate/100;return Util.makeHexColor(Math.round(e.value.r*(1-t)+this.value.r*t),Math.round(e.value.g*(1-t)+this.value.g*t),Math.round(e.value.b*(1-t)+this.value.b*t))}}class Subform extends XFAObject{constructor(e){super(Go,"subform",!0)\
;this.access=getStringOption(e.access,["open","nonInteractive","protected","readOnly"]);this.allowMacro=getInteger({data:e.allowMacro,defaultValue:0,validate:e=>1===e});this.anchorType=getStringOption(e.anchorType,["topLeft","bottomCenter","bottomLeft","bottomRight","middleCenter","middleLeft","middleRight","topCenter","topRight"]);this.colSpan=getInteger({data:e.colSpan,defaultValue:1,validate:e=>e>=1||-1===e});this.columnWidths=(e.columnWidths||"").trim().split(/\\s+/).map((e=>"-1"===e?-1:getMe\
asurement(e)));this.h=e.h?getMeasurement(e.h):"";this.hAlign=getStringOption(e.hAlign,["left","center","justify","justifyAll","radix","right"]);this.id=e.id||"";this.layout=getStringOption(e.layout,["position","lr-tb","rl-row","rl-tb","row","table","tb"]);this.locale=e.locale||"";this.maxH=getMeasurement(e.maxH,"0pt");this.maxW=getMeasurement(e.maxW,"0pt");this.mergeMode=getStringOption(e.mergeMode,["consumeData","matchTemplate"]);this.minH=getMeasurement(e.minH,"0pt");this.minW=getMeasurement(e\
.minW,"0pt");this.name=e.name||"";this.presence=getStringOption(e.presence,["visible","hidden","inactive","invisible"]);this.relevant=getRelevant(e.relevant);this.restoreState=getStringOption(e.restoreState,["manual","auto"]);this.scope=getStringOption(e.scope,["name","none"]);this.use=e.use||"";this.usehref=e.usehref||"";this.w=e.w?getMeasurement(e.w):"";this.x=getMeasurement(e.x,"0pt");this.y=getMeasurement(e.y,"0pt");this.assist=null;this.bind=null;this.bookend=null;this.border=null;this.brea\
k=null;this.calculate=null;this.desc=null;this.extras=null;this.keep=null;this.margin=null;this.occur=null;this.overflow=null;this.pageSet=null;this.para=null;this.traversal=null;this.validate=null;this.variables=null;this.area=new XFAObjectArray;this.breakAfter=new XFAObjectArray;this.breakBefore=new XFAObjectArray;this.connect=new XFAObjectArray;this.draw=new XFAObjectArray;this.event=new XFAObjectArray;this.exObject=new XFAObjectArray;this.exclGroup=new XFAObjectArray;this.field=new XFAObject\
Array;this.proto=new XFAObjectArray;this.setProperty=new XFAObjectArray;this.subform=new XFAObjectArray;this.subformSet=new XFAObjectArray}[Cs](){const e=this[vs]();return e instanceof SubformSet?e[Cs]():e}[Rs](){return!0}[_s](){return this.layout.endsWith("-tb")&&0===this[ls].attempt&&this[ls].numberInLine>0||this[vs]()[_s]()}*[As](){yield*getContainedChildren(this)}[us](){return flushHTML(this)}[Zn](e,t){addHTML(this,e,t)}[gs](){return getAvailableSpace(this)}[js](){const e=this[Cs]();if(!e[js\
]())return!1;if(void 0!==this[ls]._isSplittable)return this[ls]._isSplittable;if("position"===this.layout||this.layout.includes("row")){this[ls]._isSplittable=!1;return!1}if(this.keep&&"none"!==this.keep.intact){this[ls]._isSplittable=!1;return!1}if(e.layout?.endsWith("-tb")&&0!==e[ls].numberInLine)return!1;this[ls]._isSplittable=!0;return!0}[co](e){setTabIndex(this);if(this.break){if("auto"!==this.break.after||""!==this.break.afterTarget){const e=new BreakAfter({targetType:this.break.after,targ\
et:this.break.afterTarget,startNew:this.break.startNew.toString()});e[Is]=this[Is];this[Qn](e);this.breakAfter.push(e)}if("auto"!==this.break.before||""!==this.break.beforeTarget){const e=new BreakBefore({targetType:this.break.before,target:this.break.beforeTarget,startNew:this.break.startNew.toString()});e[Is]=this[Is];this[Qn](e);this.breakBefore.push(e)}if(""!==this.break.overflowTarget){const e=new Overflow({target:this.break.overflowTarget,leader:this.break.overflowLeader,trailer:this.break\
.overflowTrailer});e[Is]=this[Is];this[Qn](e);this.overflow.push(e)}this[Zs](this.break);this.break=null}if("hidden"===this.presence||"inactive"===this.presence)return HTMLResult.EMPTY;(this.breakBefore.children.length>1||this.breakAfter.children.length>1)&&warn("XFA - Several breakBefore or breakAfter in subforms: please file a bug.");if(this.breakBefore.children.length>=1){const e=this.breakBefore.children[0];if(handleBreak(e))return HTMLResult.breakNode(e)}if(this[ls]?.afterBreakAfter)return \
HTMLResult.EMPTY;fixDimensions(this);const t=[],a={id:this[uo],class:[]};setAccess(this,a.class);this[ls]||=Object.create(null);Object.assign(this[ls],{children:t,line:null,attributes:a,attempt:0,numberInLine:0,availableSpace:{width:Math.min(this.w||1/0,e.width),height:Math.min(this.h||1/0,e.height)},width:0,height:0,prevHeight:0,currentWidth:0});const r=this[Fs](),i=r[ls].noLayoutFailure,n=this[js]();n||setFirstUnsplittable(this);if(!checkDimensions(this,e))return HTMLResult.FAILURE;const s=new\
 Set(["area","draw","exclGroup","field","subform","subformSet"]);if(this.layout.includes("row")){const e=this[Cs]().columnWidths;if(Array.isArray(e)&&e.length>0){this[ls].columnWidths=e;this[ls].currentColumn=0}}const o=toStyle(this,"anchorType","dimensions","position","presence","border","margin","hAlign"),c=["xfaSubform"],l=layoutClass(this);l&&c.push(l);a.style=o;a.class=c;this.name&&(a.xfaName=this.name);if(this.overflow){const t=this.overflow[ws]();if(t.addLeader){t.addLeader=!1;handleOverf\
low(this,t.leader,e)}}this[Ys]();const h="lr-tb"===this.layout||"rl-tb"===this.layout,u=h?2:1;for(;this[ls].attempt<u;this[ls].attempt++){h&&1===this[ls].attempt&&(this[ls].numberInLine=0);const e=this[es]({filter:s,include:!0});if(e.success)break;if(e.isBreak()){this[Js]();return e}if(h&&0===this[ls].attempt&&0===this[ls].numberInLine&&!r[ls].noLayoutFailure){this[ls].attempt=u;break}}this[Js]();n||unsetFirstUnsplittable(this);r[ls].noLayoutFailure=i;if(this[ls].attempt===u){this.overflow&&(thi\
s[Fs]()[ls].overflowNode=this.overflow);n||delete this[ls];return HTMLResult.FAILURE}if(this.overflow){const t=this.overflow[ws]();if(t.addTrailer){t.addTrailer=!1;handleOverflow(this,t.trailer,e)}}let d=0,f=0;if(this.margin){d=this.margin.leftInset+this.margin.rightInset;f=this.margin.topInset+this.margin.bottomInset}const g=Math.max(this[ls].width+d,this.w||0),p=Math.max(this[ls].height+f,this.h||0),m=[this.x,this.y,g,p];""===this.w&&(o.width=measureToString(g));""===this.h&&(o.height=measureT\
oString(p));if(("0px"===o.width||"0px"===o.height)&&0===t.length)return HTMLResult.EMPTY;const b={name:"div",attributes:a,children:t};applyAssist(this,a);const y=HTMLResult.success(createWrapper(this,b),m);if(this.breakAfter.children.length>=1){const e=this.breakAfter.children[0];if(handleBreak(e)){this[ls].afterBreakAfter=y;return HTMLResult.breakNode(e)}}delete this[ls];return y}}class SubformSet extends XFAObject{constructor(e){super(Go,"subformSet",!0);this.id=e.id||"";this.name=e.name||"";t\
his.relation=getStringOption(e.relation,["ordered","choice","unordered"]);this.relevant=getRelevant(e.relevant);this.use=e.use||"";this.usehref=e.usehref||"";this.bookend=null;this.break=null;this.desc=null;this.extras=null;this.occur=null;this.overflow=null;this.breakAfter=new XFAObjectArray;this.breakBefore=new XFAObjectArray;this.subform=new XFAObjectArray;this.subformSet=new XFAObjectArray}*[As](){yield*getContainedChildren(this)}[Cs](){let e=this[vs]();for(;!(e instanceof Subform);)e=e[vs](\
);return e}[Rs](){return!0}}class SubjectDN extends ContentObject{constructor(e){super(Go,"subjectDN");this.delimiter=e.delimiter||",";this.id=e.id||"";this.name=e.name||"";this.use=e.use||"";this.usehref=e.usehref||""}[hs](){this[ss]=new Map(this[ss].split(this.delimiter).map((e=>{(e=e.split("=",2))[0]=e[0].trim();return e})))}}class SubjectDNs extends XFAObject{constructor(e){super(Go,"subjectDNs",!0);this.id=e.id||"";this.type=getStringOption(e.type,["optional","required"]);this.use=e.use||""\
;this.usehref=e.usehref||"";this.subjectDN=new XFAObjectArray}}class Submit extends XFAObject{constructor(e){super(Go,"submit",!0);this.embedPDF=getInteger({data:e.embedPDF,defaultValue:0,validate:e=>1===e});this.format=getStringOption(e.format,["xdp","formdata","pdf","urlencoded","xfd","xml"]);this.id=e.id||"";this.target=e.target||"";this.textEncoding=getKeyword({data:e.textEncoding?e.textEncoding.toLowerCase():"",defaultValue:"",validate:e=>["utf-8","big-five","fontspecific","gbk","gb-18030",\
"gb-2312","ksc-5601","none","shift-jis","ucs-2","utf-16"].includes(e)||e.match(/iso-8859-\\d{2}/)});this.use=e.use||"";this.usehref=e.usehref||"";this.xdpContent=e.xdpContent||"";this.encrypt=null;this.encryptData=new XFAObjectArray;this.signData=new XFAObjectArray}}class Template extends XFAObject{constructor(e){super(Go,"template",!0);this.baseProfile=getStringOption(e.baseProfile,["full","interactiveForms"]);this.extras=null;this.subform=new XFAObjectArray}[hs](){0===this.subform.children.leng\
th&&warn("XFA - No subforms in template node.");this.subform.children.length>=2&&warn("XFA - Several subforms in template node: please file a bug.");this[no]=5e3}[js](){return!0}[to](e,t){return e.startsWith("#")?[this[Os].get(e.slice(1))]:searchNode(this,t,e,!0,!0)}*[oo](){if(!this.subform.children.length)return HTMLResult.success({name:"div",children:[]});this[ls]={overflowNode:null,firstUnsplittable:null,currentContentArea:null,currentPageArea:null,noLayoutFailure:!1,pageNumber:1,pagePosition\
:"first",oddOrEven:"odd",blankOrNotBlank:"nonBlank",paraStack:[]};const e=this.subform.children[0];e.pageSet[as]();const t=e.pageSet.pageArea.children,a={name:"div",children:[]};let r=null,i=null,n=null;if(e.breakBefore.children.length>=1){i=e.breakBefore.children[0];n=i.target}else if(e.subform.children.length>=1&&e.subform.children[0].breakBefore.children.length>=1){i=e.subform.children[0].breakBefore.children[0];n=i.target}else if(e.break?.beforeTarget){i=e.break;n=i.beforeTarget}else if(e.su\
bform.children.length>=1&&e.subform.children[0].break?.beforeTarget){i=e.subform.children[0].break;n=i.beforeTarget}if(i){const e=this[to](n,i[vs]());if(e instanceof PageArea){r=e;i[ls]={}}}r||=t[0];r[ls]={numberOfUse:1};const s=r[vs]();s[ls]={numberOfUse:1,pageIndex:s.pageArea.children.indexOf(r),pageSetIndex:0};let o,c=null,l=null,h=!0,u=0,d=0;for(;;){if(h)u=0;else{a.children.pop();if(3==++u){warn("XFA - Something goes wrong: please file a bug.");return a}}o=null;this[ls].currentPageArea=r;con\
st t=r[co]().html;a.children.push(t);if(c){this[ls].noLayoutFailure=!0;t.children.push(c[co](r[ls].space).html);c=null}if(l){this[ls].noLayoutFailure=!0;t.children.push(l[co](r[ls].space).html);l=null}const i=r.contentArea.children,n=t.children.filter((e=>e.attributes.class.includes("xfaContentarea")));h=!1;this[ls].firstUnsplittable=null;this[ls].noLayoutFailure=!1;const flush=t=>{const a=e[us]();if(a){h||=a.children?.length>0;n[t].children.push(a)}};for(let t=d,r=i.length;t<r;t++){const r=this\
[ls].currentContentArea=i[t],s={width:r.w,height:r.h};d=0;if(c){n[t].children.push(c[co](s).html);c=null}if(l){n[t].children.push(l[co](s).html);l=null}const u=e[co](s);if(u.success){if(u.html){h||=u.html.children?.length>0;n[t].children.push(u.html)}else!h&&a.children.length>1&&a.children.pop();return a}if(u.isBreak()){const e=u.breakNode;flush(t);if("auto"===e.targetType)continue;if(e.leader){c=this[to](e.leader,e[vs]());c=c?c[0]:null}if(e.trailer){l=this[to](e.trailer,e[vs]());l=l?l[0]:null}i\
f("pageArea"===e.targetType){o=e[ls].target;t=1/0}else if(e[ls].target){o=e[ls].target;d=e[ls].index+1;t=1/0}else t=e[ls].index}else if(this[ls].overflowNode){const e=this[ls].overflowNode;this[ls].overflowNode=null;const a=e[ws](),r=a.target;a.addLeader=null!==a.leader;a.addTrailer=null!==a.trailer;flush(t);const n=t;t=1/0;if(r instanceof PageArea)o=r;else if(r instanceof ContentArea){const e=i.indexOf(r);if(-1!==e)e>n?t=e-1:d=e;else{o=r[vs]();d=o.contentArea.children.indexOf(r)}}}else flush(t)\
}this[ls].pageNumber+=1;o&&(o[Xs]()?o[ls].numberOfUse+=1:o=null);r=o||r[ks]();yield null}}}class Text extends ContentObject{constructor(e){super(Go,"text");this.id=e.id||"";this.maxChars=getInteger({data:e.maxChars,defaultValue:0,validate:e=>e>=0});this.name=e.name||"";this.rid=e.rid||"";this.use=e.use||"";this.usehref=e.usehref||""}[Yn](){return!0}[$s](e){if(e[Hs]===go.xhtml.id){this[ss]=e;return!0}warn(`XFA - Invalid content in Text: ${e[Ws]}.`);return!1}[Vs](e){this[ss]instanceof XFAObject||s\
uper[Vs](e)}[hs](){"string"==typeof this[ss]&&(this[ss]=this[ss].replaceAll("\\r\\n","\\n"))}[ws](){return"string"==typeof this[ss]?this[ss].split(/[\\u2029\\u2028\\n]/).filter((e=>!!e)).join("\\n"):this[ss][so]()}[co](e){if("string"==typeof this[ss]){const e=valueToHtml(this[ss]).html;if(this[ss].includes("\\u2029")){e.name="div";e.children=[];this[ss].split("\\u2029").map((e=>e.split(/[\\u2028\\n]/).flatMap((e=>[{name:"span",value:e},{name:"br"}])))).forEach((t=>{e.children.push({name:"p",children:t})}))\
}else if(/[\\u2028\\n]/.test(this[ss])){e.name="div";e.children=[];this[ss].split(/[\\u2028\\n]/).forEach((t=>{e.children.push({name:"span",value:t},{name:"br"})}))}return HTMLResult.success(e)}return this[ss][co](e)}}class TextEdit extends XFAObject{constructor(e){super(Go,"textEdit",!0);this.allowRichText=getInteger({data:e.allowRichText,defaultValue:0,validate:e=>1===e});this.hScrollPolicy=getStringOption(e.hScrollPolicy,["auto","off","on"]);this.id=e.id||"";this.multiLine=getInteger({data:e.mult\
iLine,defaultValue:"",validate:e=>0===e||1===e});this.use=e.use||"";this.usehref=e.usehref||"";this.vScrollPolicy=getStringOption(e.vScrollPolicy,["auto","off","on"]);this.border=null;this.comb=null;this.extras=null;this.margin=null}[co](e){const t=toStyle(this,"border","font","margin");let a;const r=this[vs]()[vs]();""===this.multiLine&&(this.multiLine=r instanceof Draw?1:0);a=1===this.multiLine?{name:"textarea",attributes:{dataId:r[os]?.[uo]||r[uo],fieldId:r[uo],class:["xfaTextfield"],style:t,\
"aria-label":ariaLabel(r),"aria-required":!1}}:{name:"input",attributes:{type:"text",dataId:r[os]?.[uo]||r[uo],fieldId:r[uo],class:["xfaTextfield"],style:t,"aria-label":ariaLabel(r),"aria-required":!1}};if(isRequired(r)){a.attributes["aria-required"]=!0;a.attributes.required=!0}return HTMLResult.success({name:"label",attributes:{class:["xfaLabel"]},children:[a]})}}class Time extends StringObject{constructor(e){super(Go,"time");this.id=e.id||"";this.name=e.name||"";this.use=e.use||"";this.usehref\
=e.usehref||""}[hs](){const e=this[ss].trim();this[ss]=e?new Date(e):null}[co](e){return valueToHtml(this[ss]?this[ss].toString():"")}}class TimeStamp extends XFAObject{constructor(e){super(Go,"timeStamp");this.id=e.id||"";this.server=e.server||"";this.type=getStringOption(e.type,["optional","required"]);this.use=e.use||"";this.usehref=e.usehref||""}}class ToolTip extends StringObject{constructor(e){super(Go,"toolTip");this.id=e.id||"";this.rid=e.rid||"";this.use=e.use||"";this.usehref=e.usehref\
||""}}class Traversal extends XFAObject{constructor(e){super(Go,"traversal",!0);this.id=e.id||"";this.use=e.use||"";this.usehref=e.usehref||"";this.extras=null;this.traverse=new XFAObjectArray}}class Traverse extends XFAObject{constructor(e){super(Go,"traverse",!0);this.id=e.id||"";this.operation=getStringOption(e.operation,["next","back","down","first","left","right","up"]);this.ref=e.ref||"";this.use=e.use||"";this.usehref=e.usehref||"";this.extras=null;this.script=null}get name(){return this.\
operation}[Us](){return!1}}class Ui extends XFAObject{constructor(e){super(Go,"ui",!0);this.id=e.id||"";this.use=e.use||"";this.usehref=e.usehref||"";this.extras=null;this.picture=null;this.barcode=null;this.button=null;this.checkButton=null;this.choiceList=null;this.dateTimeEdit=null;this.defaultUi=null;this.imageEdit=null;this.numericEdit=null;this.passwordEdit=null;this.signature=null;this.textEdit=null}[ws](){if(void 0===this[ls]){for(const e of Object.getOwnPropertyNames(this)){if("extras"=\
==e||"picture"===e)continue;const t=this[e];if(t instanceof XFAObject){this[ls]=t;return t}}this[ls]=null}return this[ls]}[co](e){const t=this[ws]();return t?t[co](e):HTMLResult.EMPTY}}class Validate extends XFAObject{constructor(e){super(Go,"validate",!0);this.formatTest=getStringOption(e.formatTest,["warning","disabled","error"]);this.id=e.id||"";this.nullTest=getStringOption(e.nullTest,["disabled","error","warning"]);this.scriptTest=getStringOption(e.scriptTest,["error","disabled","warning"])\
;this.use=e.use||"";this.usehref=e.usehref||"";this.extras=null;this.message=null;this.picture=null;this.script=null}}class Value extends XFAObject{constructor(e){super(Go,"value",!0);this.id=e.id||"";this.override=getInteger({data:e.override,defaultValue:0,validate:e=>1===e});this.relevant=getRelevant(e.relevant);this.use=e.use||"";this.usehref=e.usehref||"";this.arc=null;this.boolean=null;this.date=null;this.dateTime=null;this.decimal=null;this.exData=null;this.float=null;this.image=null;this.\
integer=null;this.line=null;this.rectangle=null;this.text=null;this.time=null}[io](e){const t=this[vs]();if(t instanceof Field&&t.ui?.imageEdit){if(!this.image){this.image=new Image({});this[Qn](this.image)}this.image[ss]=e[ss];return}const a=e[Ws];if(null===this[a]){for(const e of Object.getOwnPropertyNames(this)){const t=this[e];if(t instanceof XFAObject){this[e]=null;this[Zs](t)}}this[e[Ws]]=e;this[Qn](e)}else this[a][ss]=e[ss]}[so](){if(this.exData)return"string"==typeof this.exData[ss]?this\
.exData[ss].trim():this.exData[ss][so]().trim();for(const e of Object.getOwnPropertyNames(this)){if("image"===e)continue;const t=this[e];if(t instanceof XFAObject)return(t[ss]||"").toString().trim()}return null}[co](e){for(const t of Object.getOwnPropertyNames(this)){const a=this[t];if(a instanceof XFAObject)return a[co](e)}return HTMLResult.EMPTY}}class Variables extends XFAObject{constructor(e){super(Go,"variables",!0);this.id=e.id||"";this.use=e.use||"";this.usehref=e.usehref||"";this.boolean\
=new XFAObjectArray;this.date=new XFAObjectArray;this.dateTime=new XFAObjectArray;this.decimal=new XFAObjectArray;this.exData=new XFAObjectArray;this.float=new XFAObjectArray;this.image=new XFAObjectArray;this.integer=new XFAObjectArray;this.manifest=new XFAObjectArray;this.script=new XFAObjectArray;this.text=new XFAObjectArray;this.time=new XFAObjectArray}[Us](){return!0}}class TemplateNamespace{static[fo](e,t){if(TemplateNamespace.hasOwnProperty(e)){const a=TemplateNamespace[e](t);a[ro](t);ret\
urn a}}static appearanceFilter(e){return new AppearanceFilter(e)}static arc(e){return new Arc(e)}static area(e){return new Area(e)}static assist(e){return new Assist(e)}static barcode(e){return new Barcode(e)}static bind(e){return new Bind(e)}static bindItems(e){return new BindItems(e)}static bookend(e){return new Bookend(e)}static boolean(e){return new BooleanElement(e)}static border(e){return new Border(e)}static break(e){return new Break(e)}static breakAfter(e){return new BreakAfter(e)}static\
 breakBefore(e){return new BreakBefore(e)}static button(e){return new Button(e)}static calculate(e){return new Calculate(e)}static caption(e){return new Caption(e)}static certificate(e){return new Certificate(e)}static certificates(e){return new Certificates(e)}static checkButton(e){return new CheckButton(e)}static choiceList(e){return new ChoiceList(e)}static color(e){return new Color(e)}static comb(e){return new Comb(e)}static connect(e){return new Connect(e)}static contentArea(e){return new C\
ontentArea(e)}static corner(e){return new Corner(e)}static date(e){return new DateElement(e)}static dateTime(e){return new DateTime(e)}static dateTimeEdit(e){return new DateTimeEdit(e)}static decimal(e){return new Decimal(e)}static defaultUi(e){return new DefaultUi(e)}static desc(e){return new Desc(e)}static digestMethod(e){return new DigestMethod(e)}static digestMethods(e){return new DigestMethods(e)}static draw(e){return new Draw(e)}static edge(e){return new Edge(e)}static encoding(e){return n\
ew Encoding(e)}static encodings(e){return new Encodings(e)}static encrypt(e){return new Encrypt(e)}static encryptData(e){return new EncryptData(e)}static encryption(e){return new Encryption(e)}static encryptionMethod(e){return new EncryptionMethod(e)}static encryptionMethods(e){return new EncryptionMethods(e)}static event(e){return new Event(e)}static exData(e){return new ExData(e)}static exObject(e){return new ExObject(e)}static exclGroup(e){return new ExclGroup(e)}static execute(e){return new \
Execute(e)}static extras(e){return new Extras(e)}static field(e){return new Field(e)}static fill(e){return new Fill(e)}static filter(e){return new Filter(e)}static float(e){return new Float(e)}static font(e){return new template_Font(e)}static format(e){return new Format(e)}static handler(e){return new Handler(e)}static hyphenation(e){return new Hyphenation(e)}static image(e){return new Image(e)}static imageEdit(e){return new ImageEdit(e)}static integer(e){return new Integer(e)}static issuers(e){\
return new Issuers(e)}static items(e){return new Items(e)}static keep(e){return new Keep(e)}static keyUsage(e){return new KeyUsage(e)}static line(e){return new Line(e)}static linear(e){return new Linear(e)}static lockDocument(e){return new LockDocument(e)}static manifest(e){return new Manifest(e)}static margin(e){return new Margin(e)}static mdp(e){return new Mdp(e)}static medium(e){return new Medium(e)}static message(e){return new Message(e)}static numericEdit(e){return new NumericEdit(e)}static\
 occur(e){return new Occur(e)}static oid(e){return new Oid(e)}static oids(e){return new Oids(e)}static overflow(e){return new Overflow(e)}static pageArea(e){return new PageArea(e)}static pageSet(e){return new PageSet(e)}static para(e){return new Para(e)}static passwordEdit(e){return new PasswordEdit(e)}static pattern(e){return new template_Pattern(e)}static picture(e){return new Picture(e)}static proto(e){return new Proto(e)}static radial(e){return new Radial(e)}static reason(e){return new Reaso\
n(e)}static reasons(e){return new Reasons(e)}static rectangle(e){return new Rectangle(e)}static ref(e){return new RefElement(e)}static script(e){return new Script(e)}static setProperty(e){return new SetProperty(e)}static signData(e){return new SignData(e)}static signature(e){return new Signature(e)}static signing(e){return new Signing(e)}static solid(e){return new Solid(e)}static speak(e){return new Speak(e)}static stipple(e){return new Stipple(e)}static subform(e){return new Subform(e)}static s\
ubformSet(e){return new SubformSet(e)}static subjectDN(e){return new SubjectDN(e)}static subjectDNs(e){return new SubjectDNs(e)}static submit(e){return new Submit(e)}static template(e){return new Template(e)}static text(e){return new Text(e)}static textEdit(e){return new TextEdit(e)}static time(e){return new Time(e)}static timeStamp(e){return new TimeStamp(e)}static toolTip(e){return new ToolTip(e)}static traversal(e){return new Traversal(e)}static traverse(e){return new Traverse(e)}static ui(e)\
{return new Ui(e)}static validate(e){return new Validate(e)}static value(e){return new Value(e)}static variables(e){return new Variables(e)}}const Zo=go.datasets.id;function createText(e){const t=new Text({});t[ss]=e;return t}class Binder{constructor(e){this.root=e;this.datasets=e.datasets;this.data=e.datasets?.data||new XmlObject(go.datasets.id,"data");this.emptyMerge=0===this.data[Ss]().length;this.root.form=this.form=e.template[is]()}_isConsumeData(){return!this.emptyMerge&&this._mergeMode}_i\
sMatchTemplate(){return!this._isConsumeData()}bind(){this._bindElement(this.form,this.data);return this.form}getData(){return this.data}_bindValue(e,t,a){e[os]=t;if(e[Ts]())if(t[Ns]()){const a=t[ys]();e[io](createText(a))}else if(e instanceof Field&&"multiSelect"===e.ui?.choiceList?.open){const a=t[Ss]().map((e=>e[ss].trim())).join("\\n");e[io](createText(a))}else this._isConsumeData()&&warn("XFA - Nodes haven\'t the same type.");else!t[Ns]()||this._isMatchTemplate()?this._bindElement(e,t):warn("X\
FA - Nodes haven\'t the same type.")}_findDataByNameToConsume(e,t,a,r){if(!e)return null;let i,n;for(let r=0;r<3;r++){i=a[xs](e,!1,!0);for(;;){n=i.next().value;if(!n)break;if(t===n[Ns]())return n}if(a[Hs]===go.datasets.id&&"data"===a[Ws])break;a=a[vs]()}if(!r)return null;i=this.data[xs](e,!0,!1);n=i.next().value;if(n)return n;i=this.data[ds](e,!0);n=i.next().value;return n?.[Ns]()?n:null}_setProperties(e,t){if(e.hasOwnProperty("setProperty"))for(const{ref:a,target:r,connection:i}of e.setProperty.\
children){if(i)continue;if(!a)continue;const n=searchNode(this.root,t,a,!1,!1);if(!n){warn(`XFA - Invalid reference: ${a}.`);continue}const[s]=n;if(!s[Es](this.data)){warn("XFA - Invalid node: must be a data node.");continue}const o=searchNode(this.root,e,r,!1,!1);if(!o){warn(`XFA - Invalid target: ${r}.`);continue}const[c]=o;if(!c[Es](e)){warn("XFA - Invalid target: must be a property or subproperty.");continue}const l=c[vs]();if(c instanceof SetProperty||l instanceof SetProperty){warn("XFA - I\
nvalid target: cannot be a setProperty or one of its properties.");continue}if(c instanceof BindItems||l instanceof BindItems){warn("XFA - Invalid target: cannot be a bindItems or one of its properties.");continue}const h=s[so](),u=c[Ws];if(c instanceof XFAAttribute){const e=Object.create(null);e[u]=h;const t=Reflect.construct(Object.getPrototypeOf(l).constructor,[e]);l[u]=t[u]}else if(c.hasOwnProperty(ss)){c[os]=s;c[ss]=h;c[hs]()}else warn("XFA - Invalid node to use in setProperty")}}_bindItems\
(e,t){if(!e.hasOwnProperty("items")||!e.hasOwnProperty("bindItems")||e.bindItems.isEmpty())return;for(const t of e.items.children)e[Zs](t);e.items.clear();const a=new Items({}),r=new Items({});e[Qn](a);e.items.push(a);e[Qn](r);e.items.push(r);for(const{ref:i,labelRef:n,valueRef:s,connection:o}of e.bindItems.children){if(o)continue;if(!i)continue;const e=searchNode(this.root,t,i,!1,!1);if(e)for(const t of e){if(!t[Es](this.datasets)){warn(`XFA - Invalid ref (${i}): must be a datasets child.`);con\
tinue}const e=searchNode(this.root,t,n,!0,!1);if(!e){warn(`XFA - Invalid label: ${n}.`);continue}const[o]=e;if(!o[Es](this.datasets)){warn("XFA - Invalid label: must be a datasets child.");continue}const c=searchNode(this.root,t,s,!0,!1);if(!c){warn(`XFA - Invalid value: ${s}.`);continue}const[l]=c;if(!l[Es](this.datasets)){warn("XFA - Invalid value: must be a datasets child.");continue}const h=createText(o[so]()),u=createText(l[so]());a[Qn](h);a.text.push(h);r[Qn](u);r.text.push(u)}else warn(`X\
FA - Invalid reference: ${i}.`)}}_bindOccurrences(e,t,a){let r;if(t.length>1){r=e[is]();r[Zs](r.occur);r.occur=null}this._bindValue(e,t[0],a);this._setProperties(e,t[0]);this._bindItems(e,t[0]);if(1===t.length)return;const i=e[vs](),n=e[Ws],s=i[Ms](e);for(let e=1,o=t.length;e<o;e++){const o=t[e],c=r[is]();i[n].push(c);i[Ds](s+e,c);this._bindValue(c,o,a);this._setProperties(c,o);this._bindItems(c,o)}}_createOccurrences(e){if(!this.emptyMerge)return;const{occur:t}=e;if(!t||t.initial<=1)return;cons\
t a=e[vs](),r=e[Ws];if(!(a[r]instanceof XFAObjectArray))return;let i;i=e.name?a[r].children.filter((t=>t.name===e.name)).length:a[r].children.length;const n=a[Ms](e)+1,s=t.initial-i;if(s){const t=e[is]();t[Zs](t.occur);t.occur=null;a[r].push(t);a[Ds](n,t);for(let e=1;e<s;e++){const i=t[is]();a[r].push(i);a[Ds](n+e,i)}}}_getOccurInfo(e){const{name:t,occur:a}=e;if(!a||!t)return[1,1];const r=-1===a.max?1/0:a.max;return[a.min,r]}_setAndBind(e,t){this._setProperties(e,t);this._bindItems(e,t);this._bi\
ndElement(e,t)}_bindElement(e,t){const a=[];this._createOccurrences(e);for(const r of e[Ss]()){if(r[os])continue;if(void 0===this._mergeMode&&"subform"===r[Ws]){this._mergeMode="consumeData"===r.mergeMode;const e=t[Ss]();if(e.length>0)this._bindOccurrences(r,[e[0]],null);else if(this.emptyMerge){const e=t[Hs]===Zo?-1:t[Hs],a=r[os]=new XmlObject(e,r.name||"root");t[Qn](a);this._bindElement(r,a)}continue}if(!r[Rs]())continue;let e=!1,i=null,n=null,s=null;if(r.bind){switch(r.bind.match){case"none":\
this._setAndBind(r,t);continue;case"global":e=!0;break;case"dataRef":if(!r.bind.ref){warn(`XFA - ref is empty in node ${r[Ws]}.`);this._setAndBind(r,t);continue}n=r.bind.ref}r.bind.picture&&(i=r.bind.picture[ss])}const[o,c]=this._getOccurInfo(r);if(n){s=searchNode(this.root,t,n,!0,!1);if(null===s){s=createDataNode(this.data,t,n);if(!s)continue;this._isConsumeData()&&(s[ns]=!0);this._setAndBind(r,s);continue}this._isConsumeData()&&(s=s.filter((e=>!e[ns])));s.length>c?s=s.slice(0,c):0===s.length&&\
(s=null);s&&this._isConsumeData()&&s.forEach((e=>{e[ns]=!0}))}else{if(!r.name){this._setAndBind(r,t);continue}if(this._isConsumeData()){const a=[];for(;a.length<c;){const i=this._findDataByNameToConsume(r.name,r[Ts](),t,e);if(!i)break;i[ns]=!0;a.push(i)}s=a.length>0?a:null}else{s=t[xs](r.name,!1,this.emptyMerge).next().value;if(!s){if(0===o){a.push(r);continue}const e=t[Hs]===Zo?-1:t[Hs];s=r[os]=new XmlObject(e,r.name);this.emptyMerge&&(s[ns]=!0);t[Qn](s);this._setAndBind(r,s);continue}this.empt\
yMerge&&(s[ns]=!0);s=[s]}}s?this._bindOccurrences(r,s,i):o>0?this._setAndBind(r,t):a.push(r)}a.forEach((e=>e[vs]()[Zs](e)))}}class DataHandler{constructor(e,t){this.data=t;this.dataset=e.datasets||null}serialize(e){const t=[[-1,this.data[Ss]()]];for(;t.length>0;){const a=t.at(-1),[r,i]=a;if(r+1===i.length){t.pop();continue}const n=i[++a[0]],s=e.get(n[uo]);if(s)n[io](s);else{const t=n[fs]();for(const a of t.values()){const t=e.get(a[uo]);if(t){a[io](t);break}}}const o=n[Ss]();o.length>0&&t.push([\
-1,o])}const a=[\'<xfa:datasets xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/">\'];if(this.dataset)for(const e of this.dataset[Ss]())"data"!==e[Ws]&&e[lo](a);this.data[lo](a);a.push("</xfa:datasets>");return a.join("")}}const Qo=go.config.id;class Acrobat extends XFAObject{constructor(e){super(Qo,"acrobat",!0);this.acrobat7=null;this.autoSave=null;this.common=null;this.validate=null;this.validateApprovalSignatures=null;this.submitUrl=new XFAObjectArray}}class Acrobat7 extends XFAObject{constr\
uctor(e){super(Qo,"acrobat7",!0);this.dynamicRender=null}}class ADBE_JSConsole extends OptionObject{constructor(e){super(Qo,"ADBE_JSConsole",["delegate","Enable","Disable"])}}class ADBE_JSDebugger extends OptionObject{constructor(e){super(Qo,"ADBE_JSDebugger",["delegate","Enable","Disable"])}}class AddSilentPrint extends Option01{constructor(e){super(Qo,"addSilentPrint")}}class AddViewerPreferences extends Option01{constructor(e){super(Qo,"addViewerPreferences")}}class AdjustData extends Option1\
0{constructor(e){super(Qo,"adjustData")}}class AdobeExtensionLevel extends IntegerObject{constructor(e){super(Qo,"adobeExtensionLevel",0,(e=>e>=1&&e<=8))}}class Agent extends XFAObject{constructor(e){super(Qo,"agent",!0);this.name=e.name?e.name.trim():"";this.common=new XFAObjectArray}}class AlwaysEmbed extends ContentObject{constructor(e){super(Qo,"alwaysEmbed")}}class Amd extends StringObject{constructor(e){super(Qo,"amd")}}class config_Area extends XFAObject{constructor(e){super(Qo,"area");th\
is.level=getInteger({data:e.level,defaultValue:0,validate:e=>e>=1&&e<=3});this.name=getStringOption(e.name,["","barcode","coreinit","deviceDriver","font","general","layout","merge","script","signature","sourceSet","templateCache"])}}class Attributes extends OptionObject{constructor(e){super(Qo,"attributes",["preserve","delegate","ignore"])}}class AutoSave extends OptionObject{constructor(e){super(Qo,"autoSave",["disabled","enabled"])}}class Base extends StringObject{constructor(e){super(Qo,"base\
")}}class BatchOutput extends XFAObject{constructor(e){super(Qo,"batchOutput");this.format=getStringOption(e.format,["none","concat","zip","zipCompress"])}}class BehaviorOverride extends ContentObject{constructor(e){super(Qo,"behaviorOverride")}[hs](){this[ss]=new Map(this[ss].trim().split(/\\s+/).filter((e=>e.includes(":"))).map((e=>e.split(":",2))))}}class Cache extends XFAObject{constructor(e){super(Qo,"cache",!0);this.templateCache=null}}class Change extends Option01{constructor(e){super(Qo,"\
change")}}class Common extends XFAObject{constructor(e){super(Qo,"common",!0);this.data=null;this.locale=null;this.localeSet=null;this.messaging=null;this.suppressBanner=null;this.template=null;this.validationMessaging=null;this.versionControl=null;this.log=new XFAObjectArray}}class Compress extends XFAObject{constructor(e){super(Qo,"compress");this.scope=getStringOption(e.scope,["imageOnly","document"])}}class CompressLogicalStructure extends Option01{constructor(e){super(Qo,"compressLogicalStr\
ucture")}}class CompressObjectStream extends Option10{constructor(e){super(Qo,"compressObjectStream")}}class Compression extends XFAObject{constructor(e){super(Qo,"compression",!0);this.compressLogicalStructure=null;this.compressObjectStream=null;this.level=null;this.type=null}}class Config extends XFAObject{constructor(e){super(Qo,"config",!0);this.acrobat=null;this.present=null;this.trace=null;this.agent=new XFAObjectArray}}class Conformance extends OptionObject{constructor(e){super(Qo,"confor\
mance",["A","B"])}}class ContentCopy extends Option01{constructor(e){super(Qo,"contentCopy")}}class Copies extends IntegerObject{constructor(e){super(Qo,"copies",1,(e=>e>=1))}}class Creator extends StringObject{constructor(e){super(Qo,"creator")}}class CurrentPage extends IntegerObject{constructor(e){super(Qo,"currentPage",0,(e=>e>=0))}}class Data extends XFAObject{constructor(e){super(Qo,"data",!0);this.adjustData=null;this.attributes=null;this.incrementalLoad=null;this.outputXSL=null;this.rang\
e=null;this.record=null;this.startNode=null;this.uri=null;this.window=null;this.xsl=null;this.excludeNS=new XFAObjectArray;this.transform=new XFAObjectArray}}class Debug extends XFAObject{constructor(e){super(Qo,"debug",!0);this.uri=null}}class DefaultTypeface extends ContentObject{constructor(e){super(Qo,"defaultTypeface");this.writingScript=getStringOption(e.writingScript,["*","Arabic","Cyrillic","EastEuropeanRoman","Greek","Hebrew","Japanese","Korean","Roman","SimplifiedChinese","Thai","Tradi\
tionalChinese","Vietnamese"])}}class Destination extends OptionObject{constructor(e){super(Qo,"destination",["pdf","pcl","ps","webClient","zpl"])}}class DocumentAssembly extends Option01{constructor(e){super(Qo,"documentAssembly")}}class Driver extends XFAObject{constructor(e){super(Qo,"driver",!0);this.name=e.name?e.name.trim():"";this.fontInfo=null;this.xdc=null}}class DuplexOption extends OptionObject{constructor(e){super(Qo,"duplexOption",["simplex","duplexFlipLongEdge","duplexFlipShortEdge"\
])}}class DynamicRender extends OptionObject{constructor(e){super(Qo,"dynamicRender",["forbidden","required"])}}class Embed extends Option01{constructor(e){super(Qo,"embed")}}class config_Encrypt extends Option01{constructor(e){super(Qo,"encrypt")}}class config_Encryption extends XFAObject{constructor(e){super(Qo,"encryption",!0);this.encrypt=null;this.encryptionLevel=null;this.permissions=null}}class EncryptionLevel extends OptionObject{constructor(e){super(Qo,"encryptionLevel",["40bit","128bit\
"])}}class Enforce extends StringObject{constructor(e){super(Qo,"enforce")}}class Equate extends XFAObject{constructor(e){super(Qo,"equate");this.force=getInteger({data:e.force,defaultValue:1,validate:e=>0===e});this.from=e.from||"";this.to=e.to||""}}class EquateRange extends XFAObject{constructor(e){super(Qo,"equateRange");this.from=e.from||"";this.to=e.to||"";this._unicodeRange=e.unicodeRange||""}get unicodeRange(){const e=[],t=/U\\+([0-9a-fA-F]+)/,a=this._unicodeRange;for(let r of a.split(",")\
.map((e=>e.trim())).filter((e=>!!e))){r=r.split("-",2).map((e=>{const a=e.match(t);return a?parseInt(a[1],16):0}));1===r.length&&r.push(r[0]);e.push(r)}return shadow(this,"unicodeRange",e)}}class Exclude extends ContentObject{constructor(e){super(Qo,"exclude")}[hs](){this[ss]=this[ss].trim().split(/\\s+/).filter((e=>e&&["calculate","close","enter","exit","initialize","ready","validate"].includes(e)))}}class ExcludeNS extends StringObject{constructor(e){super(Qo,"excludeNS")}}class FlipLabel exten\
ds OptionObject{constructor(e){super(Qo,"flipLabel",["usePrinterSetting","on","off"])}}class config_FontInfo extends XFAObject{constructor(e){super(Qo,"fontInfo",!0);this.embed=null;this.map=null;this.subsetBelow=null;this.alwaysEmbed=new XFAObjectArray;this.defaultTypeface=new XFAObjectArray;this.neverEmbed=new XFAObjectArray}}class FormFieldFilling extends Option01{constructor(e){super(Qo,"formFieldFilling")}}class GroupParent extends StringObject{constructor(e){super(Qo,"groupParent")}}class \
IfEmpty extends OptionObject{constructor(e){super(Qo,"ifEmpty",["dataValue","dataGroup","ignore","remove"])}}class IncludeXDPContent extends StringObject{constructor(e){super(Qo,"includeXDPContent")}}class IncrementalLoad extends OptionObject{constructor(e){super(Qo,"incrementalLoad",["none","forwardOnly"])}}class IncrementalMerge extends Option01{constructor(e){super(Qo,"incrementalMerge")}}class Interactive extends Option01{constructor(e){super(Qo,"interactive")}}class Jog extends OptionObject\
{constructor(e){super(Qo,"jog",["usePrinterSetting","none","pageSet"])}}class LabelPrinter extends XFAObject{constructor(e){super(Qo,"labelPrinter",!0);this.name=getStringOption(e.name,["zpl","dpl","ipl","tcpl"]);this.batchOutput=null;this.flipLabel=null;this.fontInfo=null;this.xdc=null}}class Layout extends OptionObject{constructor(e){super(Qo,"layout",["paginate","panel"])}}class Level extends IntegerObject{constructor(e){super(Qo,"level",0,(e=>e>0))}}class Linearized extends Option01{construc\
tor(e){super(Qo,"linearized")}}class Locale extends StringObject{constructor(e){super(Qo,"locale")}}class LocaleSet extends StringObject{constructor(e){super(Qo,"localeSet")}}class Log extends XFAObject{constructor(e){super(Qo,"log",!0);this.mode=null;this.threshold=null;this.to=null;this.uri=null}}class MapElement extends XFAObject{constructor(e){super(Qo,"map",!0);this.equate=new XFAObjectArray;this.equateRange=new XFAObjectArray}}class MediumInfo extends XFAObject{constructor(e){super(Qo,"med\
iumInfo",!0);this.map=null}}class config_Message extends XFAObject{constructor(e){super(Qo,"message",!0);this.msgId=null;this.severity=null}}class Messaging extends XFAObject{constructor(e){super(Qo,"messaging",!0);this.message=new XFAObjectArray}}class Mode extends OptionObject{constructor(e){super(Qo,"mode",["append","overwrite"])}}class ModifyAnnots extends Option01{constructor(e){super(Qo,"modifyAnnots")}}class MsgId extends IntegerObject{constructor(e){super(Qo,"msgId",1,(e=>e>=1))}}class N\
ameAttr extends StringObject{constructor(e){super(Qo,"nameAttr")}}class NeverEmbed extends ContentObject{constructor(e){super(Qo,"neverEmbed")}}class NumberOfCopies extends IntegerObject{constructor(e){super(Qo,"numberOfCopies",null,(e=>e>=2&&e<=5))}}class OpenAction extends XFAObject{constructor(e){super(Qo,"openAction",!0);this.destination=null}}class Output extends XFAObject{constructor(e){super(Qo,"output",!0);this.to=null;this.type=null;this.uri=null}}class OutputBin extends StringObject{co\
nstructor(e){super(Qo,"outputBin")}}class OutputXSL extends XFAObject{constructor(e){super(Qo,"outputXSL",!0);this.uri=null}}class Overprint extends OptionObject{constructor(e){super(Qo,"overprint",["none","both","draw","field"])}}class Packets extends StringObject{constructor(e){super(Qo,"packets")}[hs](){"*"!==this[ss]&&(this[ss]=this[ss].trim().split(/\\s+/).filter((e=>["config","datasets","template","xfdf","xslt"].includes(e))))}}class PageOffset extends XFAObject{constructor(e){super(Qo,"pag\
eOffset");this.x=getInteger({data:e.x,defaultValue:"useXDCSetting",validate:e=>!0});this.y=getInteger({data:e.y,defaultValue:"useXDCSetting",validate:e=>!0})}}class PageRange extends StringObject{constructor(e){super(Qo,"pageRange")}[hs](){const e=this[ss].trim().split(/\\s+/).map((e=>parseInt(e,10))),t=[];for(let a=0,r=e.length;a<r;a+=2)t.push(e.slice(a,a+2));this[ss]=t}}class Pagination extends OptionObject{constructor(e){super(Qo,"pagination",["simplex","duplexShortEdge","duplexLongEdge"])}}cl\
ass PaginationOverride extends OptionObject{constructor(e){super(Qo,"paginationOverride",["none","forceDuplex","forceDuplexLongEdge","forceDuplexShortEdge","forceSimplex"])}}class Part extends IntegerObject{constructor(e){super(Qo,"part",1,(e=>!1))}}class Pcl extends XFAObject{constructor(e){super(Qo,"pcl",!0);this.name=e.name||"";this.batchOutput=null;this.fontInfo=null;this.jog=null;this.mediumInfo=null;this.outputBin=null;this.pageOffset=null;this.staple=null;this.xdc=null}}class Pdf extends \
XFAObject{constructor(e){super(Qo,"pdf",!0);this.name=e.name||"";this.adobeExtensionLevel=null;this.batchOutput=null;this.compression=null;this.creator=null;this.encryption=null;this.fontInfo=null;this.interactive=null;this.linearized=null;this.openAction=null;this.pdfa=null;this.producer=null;this.renderPolicy=null;this.scriptModel=null;this.silentPrint=null;this.submitFormat=null;this.tagged=null;this.version=null;this.viewerPreferences=null;this.xdc=null}}class Pdfa extends XFAObject{construc\
tor(e){super(Qo,"pdfa",!0);this.amd=null;this.conformance=null;this.includeXDPContent=null;this.part=null}}class Permissions extends XFAObject{constructor(e){super(Qo,"permissions",!0);this.accessibleContent=null;this.change=null;this.contentCopy=null;this.documentAssembly=null;this.formFieldFilling=null;this.modifyAnnots=null;this.plaintextMetadata=null;this.print=null;this.printHighQuality=null}}class PickTrayByPDFSize extends Option01{constructor(e){super(Qo,"pickTrayByPDFSize")}}class config\
_Picture extends StringObject{constructor(e){super(Qo,"picture")}}class PlaintextMetadata extends Option01{constructor(e){super(Qo,"plaintextMetadata")}}class Presence extends OptionObject{constructor(e){super(Qo,"presence",["preserve","dissolve","dissolveStructure","ignore","remove"])}}class Present extends XFAObject{constructor(e){super(Qo,"present",!0);this.behaviorOverride=null;this.cache=null;this.common=null;this.copies=null;this.destination=null;this.incrementalMerge=null;this.layout=null\
;this.output=null;this.overprint=null;this.pagination=null;this.paginationOverride=null;this.script=null;this.validate=null;this.xdp=null;this.driver=new XFAObjectArray;this.labelPrinter=new XFAObjectArray;this.pcl=new XFAObjectArray;this.pdf=new XFAObjectArray;this.ps=new XFAObjectArray;this.submitUrl=new XFAObjectArray;this.webClient=new XFAObjectArray;this.zpl=new XFAObjectArray}}class Print extends Option01{constructor(e){super(Qo,"print")}}class PrintHighQuality extends Option01{constructor\
(e){super(Qo,"printHighQuality")}}class PrintScaling extends OptionObject{constructor(e){super(Qo,"printScaling",["appdefault","noScaling"])}}class PrinterName extends StringObject{constructor(e){super(Qo,"printerName")}}class Producer extends StringObject{constructor(e){super(Qo,"producer")}}class Ps extends XFAObject{constructor(e){super(Qo,"ps",!0);this.name=e.name||"";this.batchOutput=null;this.fontInfo=null;this.jog=null;this.mediumInfo=null;this.outputBin=null;this.staple=null;this.xdc=nul\
l}}class Range extends ContentObject{constructor(e){super(Qo,"range")}[hs](){this[ss]=this[ss].split(",",2).map((e=>e.split("-").map((e=>parseInt(e.trim(),10))))).filter((e=>e.every((e=>!isNaN(e))))).map((e=>{1===e.length&&e.push(e[0]);return e}))}}class Record extends ContentObject{constructor(e){super(Qo,"record")}[hs](){this[ss]=this[ss].trim();const e=parseInt(this[ss],10);!isNaN(e)&&e>=0&&(this[ss]=e)}}class Relevant extends ContentObject{constructor(e){super(Qo,"relevant")}[hs](){this[ss]=\
this[ss].trim().split(/\\s+/)}}class Rename extends ContentObject{constructor(e){super(Qo,"rename")}[hs](){this[ss]=this[ss].trim();(this[ss].toLowerCase().startsWith("xml")||new RegExp("[\\\\p{L}_][\\\\p{L}\\\\d._\\\\p{M}-]*","u").test(this[ss]))&&warn("XFA - Rename: invalid XFA name")}}class RenderPolicy extends OptionObject{constructor(e){super(Qo,"renderPolicy",["server","client"])}}class RunScripts extends OptionObject{constructor(e){super(Qo,"runScripts",["both","client","none","server"])}}class co\
nfig_Script extends XFAObject{constructor(e){super(Qo,"script",!0);this.currentPage=null;this.exclude=null;this.runScripts=null}}class ScriptModel extends OptionObject{constructor(e){super(Qo,"scriptModel",["XFA","none"])}}class Severity extends OptionObject{constructor(e){super(Qo,"severity",["ignore","error","information","trace","warning"])}}class SilentPrint extends XFAObject{constructor(e){super(Qo,"silentPrint",!0);this.addSilentPrint=null;this.printerName=null}}class Staple extends XFAObj\
ect{constructor(e){super(Qo,"staple");this.mode=getStringOption(e.mode,["usePrinterSetting","on","off"])}}class StartNode extends StringObject{constructor(e){super(Qo,"startNode")}}class StartPage extends IntegerObject{constructor(e){super(Qo,"startPage",0,(e=>!0))}}class SubmitFormat extends OptionObject{constructor(e){super(Qo,"submitFormat",["html","delegate","fdf","xml","pdf"])}}class SubmitUrl extends StringObject{constructor(e){super(Qo,"submitUrl")}}class SubsetBelow extends IntegerObject\
{constructor(e){super(Qo,"subsetBelow",100,(e=>e>=0&&e<=100))}}class SuppressBanner extends Option01{constructor(e){super(Qo,"suppressBanner")}}class Tagged extends Option01{constructor(e){super(Qo,"tagged")}}class config_Template extends XFAObject{constructor(e){super(Qo,"template",!0);this.base=null;this.relevant=null;this.startPage=null;this.uri=null;this.xsl=null}}class Threshold extends OptionObject{constructor(e){super(Qo,"threshold",["trace","error","information","warning"])}}class To ext\
ends OptionObject{constructor(e){super(Qo,"to",["null","memory","stderr","stdout","system","uri"])}}class TemplateCache extends XFAObject{constructor(e){super(Qo,"templateCache");this.maxEntries=getInteger({data:e.maxEntries,defaultValue:5,validate:e=>e>=0})}}class Trace extends XFAObject{constructor(e){super(Qo,"trace",!0);this.area=new XFAObjectArray}}class Transform extends XFAObject{constructor(e){super(Qo,"transform",!0);this.groupParent=null;this.ifEmpty=null;this.nameAttr=null;this.pictur\
e=null;this.presence=null;this.rename=null;this.whitespace=null}}class Type extends OptionObject{constructor(e){super(Qo,"type",["none","ascii85","asciiHex","ccittfax","flate","lzw","runLength","native","xdp","mergedXDP"])}}class Uri extends StringObject{constructor(e){super(Qo,"uri")}}class config_Validate extends OptionObject{constructor(e){super(Qo,"validate",["preSubmit","prePrint","preExecute","preSave"])}}class ValidateApprovalSignatures extends ContentObject{constructor(e){super(Qo,"valid\
ateApprovalSignatures")}[hs](){this[ss]=this[ss].trim().split(/\\s+/).filter((e=>["docReady","postSign"].includes(e)))}}class ValidationMessaging extends OptionObject{constructor(e){super(Qo,"validationMessaging",["allMessagesIndividually","allMessagesTogether","firstMessageOnly","noMessages"])}}class Version extends OptionObject{constructor(e){super(Qo,"version",["1.7","1.6","1.5","1.4","1.3","1.2"])}}class VersionControl extends XFAObject{constructor(e){super(Qo,"VersionControl");this.outputBel\
ow=getStringOption(e.outputBelow,["warn","error","update"]);this.sourceAbove=getStringOption(e.sourceAbove,["warn","error"]);this.sourceBelow=getStringOption(e.sourceBelow,["update","maintain"])}}class ViewerPreferences extends XFAObject{constructor(e){super(Qo,"viewerPreferences",!0);this.ADBE_JSConsole=null;this.ADBE_JSDebugger=null;this.addViewerPreferences=null;this.duplexOption=null;this.enforce=null;this.numberOfCopies=null;this.pageRange=null;this.pickTrayByPDFSize=null;this.printScaling=\
null}}class WebClient extends XFAObject{constructor(e){super(Qo,"webClient",!0);this.name=e.name?e.name.trim():"";this.fontInfo=null;this.xdc=null}}class Whitespace extends OptionObject{constructor(e){super(Qo,"whitespace",["preserve","ltrim","normalize","rtrim","trim"])}}class Window extends ContentObject{constructor(e){super(Qo,"window")}[hs](){const e=this[ss].split(",",2).map((e=>parseInt(e.trim(),10)));if(e.some((e=>isNaN(e))))this[ss]=[0,0];else{1===e.length&&e.push(e[0]);this[ss]=e}}}clas\
s Xdc extends XFAObject{constructor(e){super(Qo,"xdc",!0);this.uri=new XFAObjectArray;this.xsl=new XFAObjectArray}}class Xdp extends XFAObject{constructor(e){super(Qo,"xdp",!0);this.packets=null}}class Xsl extends XFAObject{constructor(e){super(Qo,"xsl",!0);this.debug=null;this.uri=null}}class Zpl extends XFAObject{constructor(e){super(Qo,"zpl",!0);this.name=e.name?e.name.trim():"";this.batchOutput=null;this.flipLabel=null;this.fontInfo=null;this.xdc=null}}class ConfigNamespace{static[fo](e,t){i\
f(ConfigNamespace.hasOwnProperty(e))return ConfigNamespace[e](t)}static acrobat(e){return new Acrobat(e)}static acrobat7(e){return new Acrobat7(e)}static ADBE_JSConsole(e){return new ADBE_JSConsole(e)}static ADBE_JSDebugger(e){return new ADBE_JSDebugger(e)}static addSilentPrint(e){return new AddSilentPrint(e)}static addViewerPreferences(e){return new AddViewerPreferences(e)}static adjustData(e){return new AdjustData(e)}static adobeExtensionLevel(e){return new AdobeExtensionLevel(e)}static agent(\
e){return new Agent(e)}static alwaysEmbed(e){return new AlwaysEmbed(e)}static amd(e){return new Amd(e)}static area(e){return new config_Area(e)}static attributes(e){return new Attributes(e)}static autoSave(e){return new AutoSave(e)}static base(e){return new Base(e)}static batchOutput(e){return new BatchOutput(e)}static behaviorOverride(e){return new BehaviorOverride(e)}static cache(e){return new Cache(e)}static change(e){return new Change(e)}static common(e){return new Common(e)}static compress(\
e){return new Compress(e)}static compressLogicalStructure(e){return new CompressLogicalStructure(e)}static compressObjectStream(e){return new CompressObjectStream(e)}static compression(e){return new Compression(e)}static config(e){return new Config(e)}static conformance(e){return new Conformance(e)}static contentCopy(e){return new ContentCopy(e)}static copies(e){return new Copies(e)}static creator(e){return new Creator(e)}static currentPage(e){return new CurrentPage(e)}static data(e){return new \
Data(e)}static debug(e){return new Debug(e)}static defaultTypeface(e){return new DefaultTypeface(e)}static destination(e){return new Destination(e)}static documentAssembly(e){return new DocumentAssembly(e)}static driver(e){return new Driver(e)}static duplexOption(e){return new DuplexOption(e)}static dynamicRender(e){return new DynamicRender(e)}static embed(e){return new Embed(e)}static encrypt(e){return new config_Encrypt(e)}static encryption(e){return new config_Encryption(e)}static encryptionL\
evel(e){return new EncryptionLevel(e)}static enforce(e){return new Enforce(e)}static equate(e){return new Equate(e)}static equateRange(e){return new EquateRange(e)}static exclude(e){return new Exclude(e)}static excludeNS(e){return new ExcludeNS(e)}static flipLabel(e){return new FlipLabel(e)}static fontInfo(e){return new config_FontInfo(e)}static formFieldFilling(e){return new FormFieldFilling(e)}static groupParent(e){return new GroupParent(e)}static ifEmpty(e){return new IfEmpty(e)}static includ\
eXDPContent(e){return new IncludeXDPContent(e)}static incrementalLoad(e){return new IncrementalLoad(e)}static incrementalMerge(e){return new IncrementalMerge(e)}static interactive(e){return new Interactive(e)}static jog(e){return new Jog(e)}static labelPrinter(e){return new LabelPrinter(e)}static layout(e){return new Layout(e)}static level(e){return new Level(e)}static linearized(e){return new Linearized(e)}static locale(e){return new Locale(e)}static localeSet(e){return new LocaleSet(e)}static \
log(e){return new Log(e)}static map(e){return new MapElement(e)}static mediumInfo(e){return new MediumInfo(e)}static message(e){return new config_Message(e)}static messaging(e){return new Messaging(e)}static mode(e){return new Mode(e)}static modifyAnnots(e){return new ModifyAnnots(e)}static msgId(e){return new MsgId(e)}static nameAttr(e){return new NameAttr(e)}static neverEmbed(e){return new NeverEmbed(e)}static numberOfCopies(e){return new NumberOfCopies(e)}static openAction(e){return new OpenA\
ction(e)}static output(e){return new Output(e)}static outputBin(e){return new OutputBin(e)}static outputXSL(e){return new OutputXSL(e)}static overprint(e){return new Overprint(e)}static packets(e){return new Packets(e)}static pageOffset(e){return new PageOffset(e)}static pageRange(e){return new PageRange(e)}static pagination(e){return new Pagination(e)}static paginationOverride(e){return new PaginationOverride(e)}static part(e){return new Part(e)}static pcl(e){return new Pcl(e)}static pdf(e){ret\
urn new Pdf(e)}static pdfa(e){return new Pdfa(e)}static permissions(e){return new Permissions(e)}static pickTrayByPDFSize(e){return new PickTrayByPDFSize(e)}static picture(e){return new config_Picture(e)}static plaintextMetadata(e){return new PlaintextMetadata(e)}static presence(e){return new Presence(e)}static present(e){return new Present(e)}static print(e){return new Print(e)}static printHighQuality(e){return new PrintHighQuality(e)}static printScaling(e){return new PrintScaling(e)}static pri\
nterName(e){return new PrinterName(e)}static producer(e){return new Producer(e)}static ps(e){return new Ps(e)}static range(e){return new Range(e)}static record(e){return new Record(e)}static relevant(e){return new Relevant(e)}static rename(e){return new Rename(e)}static renderPolicy(e){return new RenderPolicy(e)}static runScripts(e){return new RunScripts(e)}static script(e){return new config_Script(e)}static scriptModel(e){return new ScriptModel(e)}static severity(e){return new Severity(e)}stati\
c silentPrint(e){return new SilentPrint(e)}static staple(e){return new Staple(e)}static startNode(e){return new StartNode(e)}static startPage(e){return new StartPage(e)}static submitFormat(e){return new SubmitFormat(e)}static submitUrl(e){return new SubmitUrl(e)}static subsetBelow(e){return new SubsetBelow(e)}static suppressBanner(e){return new SuppressBanner(e)}static tagged(e){return new Tagged(e)}static template(e){return new config_Template(e)}static templateCache(e){return new TemplateCache\
(e)}static threshold(e){return new Threshold(e)}static to(e){return new To(e)}static trace(e){return new Trace(e)}static transform(e){return new Transform(e)}static type(e){return new Type(e)}static uri(e){return new Uri(e)}static validate(e){return new config_Validate(e)}static validateApprovalSignatures(e){return new ValidateApprovalSignatures(e)}static validationMessaging(e){return new ValidationMessaging(e)}static version(e){return new Version(e)}static versionControl(e){return new VersionCo\
ntrol(e)}static viewerPreferences(e){return new ViewerPreferences(e)}static webClient(e){return new WebClient(e)}static whitespace(e){return new Whitespace(e)}static window(e){return new Window(e)}static xdc(e){return new Xdc(e)}static xdp(e){return new Xdp(e)}static xsl(e){return new Xsl(e)}static zpl(e){return new Zpl(e)}}const ec=go.connectionSet.id;class ConnectionSet extends XFAObject{constructor(e){super(ec,"connectionSet",!0);this.wsdlConnection=new XFAObjectArray;this.xmlConnection=new X\
FAObjectArray;this.xsdConnection=new XFAObjectArray}}class EffectiveInputPolicy extends XFAObject{constructor(e){super(ec,"effectiveInputPolicy");this.id=e.id||"";this.name=e.name||"";this.use=e.use||"";this.usehref=e.usehref||""}}class EffectiveOutputPolicy extends XFAObject{constructor(e){super(ec,"effectiveOutputPolicy");this.id=e.id||"";this.name=e.name||"";this.use=e.use||"";this.usehref=e.usehref||""}}class Operation extends StringObject{constructor(e){super(ec,"operation");this.id=e.id||"\
";this.input=e.input||"";this.name=e.name||"";this.output=e.output||"";this.use=e.use||"";this.usehref=e.usehref||""}}class RootElement extends StringObject{constructor(e){super(ec,"rootElement");this.id=e.id||"";this.name=e.name||"";this.use=e.use||"";this.usehref=e.usehref||""}}class SoapAction extends StringObject{constructor(e){super(ec,"soapAction");this.id=e.id||"";this.name=e.name||"";this.use=e.use||"";this.usehref=e.usehref||""}}class SoapAddress extends StringObject{constructor(e){supe\
r(ec,"soapAddress");this.id=e.id||"";this.name=e.name||"";this.use=e.use||"";this.usehref=e.usehref||""}}class connection_set_Uri extends StringObject{constructor(e){super(ec,"uri");this.id=e.id||"";this.name=e.name||"";this.use=e.use||"";this.usehref=e.usehref||""}}class WsdlAddress extends StringObject{constructor(e){super(ec,"wsdlAddress");this.id=e.id||"";this.name=e.name||"";this.use=e.use||"";this.usehref=e.usehref||""}}class WsdlConnection extends XFAObject{constructor(e){super(ec,"wsdlCo\
nnection",!0);this.dataDescription=e.dataDescription||"";this.name=e.name||"";this.effectiveInputPolicy=null;this.effectiveOutputPolicy=null;this.operation=null;this.soapAction=null;this.soapAddress=null;this.wsdlAddress=null}}class XmlConnection extends XFAObject{constructor(e){super(ec,"xmlConnection",!0);this.dataDescription=e.dataDescription||"";this.name=e.name||"";this.uri=null}}class XsdConnection extends XFAObject{constructor(e){super(ec,"xsdConnection",!0);this.dataDescription=e.dataDes\
cription||"";this.name=e.name||"";this.rootElement=null;this.uri=null}}class ConnectionSetNamespace{static[fo](e,t){if(ConnectionSetNamespace.hasOwnProperty(e))return ConnectionSetNamespace[e](t)}static connectionSet(e){return new ConnectionSet(e)}static effectiveInputPolicy(e){return new EffectiveInputPolicy(e)}static effectiveOutputPolicy(e){return new EffectiveOutputPolicy(e)}static operation(e){return new Operation(e)}static rootElement(e){return new RootElement(e)}static soapAction(e){retur\
n new SoapAction(e)}static soapAddress(e){return new SoapAddress(e)}static uri(e){return new connection_set_Uri(e)}static wsdlAddress(e){return new WsdlAddress(e)}static wsdlConnection(e){return new WsdlConnection(e)}static xmlConnection(e){return new XmlConnection(e)}static xsdConnection(e){return new XsdConnection(e)}}const tc=go.datasets.id;class datasets_Data extends XmlObject{constructor(e){super(tc,"data",e)}[Ls](){return!0}}class Datasets extends XFAObject{constructor(e){super(tc,"dataset\
s",!0);this.data=null;this.Signature=null}[$s](e){const t=e[Ws];("data"===t&&e[Hs]===tc||"Signature"===t&&e[Hs]===go.signature.id)&&(this[t]=e);this[Qn](e)}}class DatasetsNamespace{static[fo](e,t){if(DatasetsNamespace.hasOwnProperty(e))return DatasetsNamespace[e](t)}static datasets(e){return new Datasets(e)}static data(e){return new datasets_Data(e)}}const ac=go.localeSet.id;class CalendarSymbols extends XFAObject{constructor(e){super(ac,"calendarSymbols",!0);this.name="gregorian";this.dayNames=\
new XFAObjectArray(2);this.eraNames=null;this.meridiemNames=null;this.monthNames=new XFAObjectArray(2)}}class CurrencySymbol extends StringObject{constructor(e){super(ac,"currencySymbol");this.name=getStringOption(e.name,["symbol","isoname","decimal"])}}class CurrencySymbols extends XFAObject{constructor(e){super(ac,"currencySymbols",!0);this.currencySymbol=new XFAObjectArray(3)}}class DatePattern extends StringObject{constructor(e){super(ac,"datePattern");this.name=getStringOption(e.name,["full\
","long","med","short"])}}class DatePatterns extends XFAObject{constructor(e){super(ac,"datePatterns",!0);this.datePattern=new XFAObjectArray(4)}}class DateTimeSymbols extends ContentObject{constructor(e){super(ac,"dateTimeSymbols")}}class Day extends StringObject{constructor(e){super(ac,"day")}}class DayNames extends XFAObject{constructor(e){super(ac,"dayNames",!0);this.abbr=getInteger({data:e.abbr,defaultValue:0,validate:e=>1===e});this.day=new XFAObjectArray(7)}}class Era extends StringObject\
{constructor(e){super(ac,"era")}}class EraNames extends XFAObject{constructor(e){super(ac,"eraNames",!0);this.era=new XFAObjectArray(2)}}class locale_set_Locale extends XFAObject{constructor(e){super(ac,"locale",!0);this.desc=e.desc||"";this.name="isoname";this.calendarSymbols=null;this.currencySymbols=null;this.datePatterns=null;this.dateTimeSymbols=null;this.numberPatterns=null;this.numberSymbols=null;this.timePatterns=null;this.typeFaces=null}}class locale_set_LocaleSet extends XFAObject{cons\
tructor(e){super(ac,"localeSet",!0);this.locale=new XFAObjectArray}}class Meridiem extends StringObject{constructor(e){super(ac,"meridiem")}}class MeridiemNames extends XFAObject{constructor(e){super(ac,"meridiemNames",!0);this.meridiem=new XFAObjectArray(2)}}class Month extends StringObject{constructor(e){super(ac,"month")}}class MonthNames extends XFAObject{constructor(e){super(ac,"monthNames",!0);this.abbr=getInteger({data:e.abbr,defaultValue:0,validate:e=>1===e});this.month=new XFAObjectArra\
y(12)}}class NumberPattern extends StringObject{constructor(e){super(ac,"numberPattern");this.name=getStringOption(e.name,["full","long","med","short"])}}class NumberPatterns extends XFAObject{constructor(e){super(ac,"numberPatterns",!0);this.numberPattern=new XFAObjectArray(4)}}class NumberSymbol extends StringObject{constructor(e){super(ac,"numberSymbol");this.name=getStringOption(e.name,["decimal","grouping","percent","minus","zero"])}}class NumberSymbols extends XFAObject{constructor(e){supe\
r(ac,"numberSymbols",!0);this.numberSymbol=new XFAObjectArray(5)}}class TimePattern extends StringObject{constructor(e){super(ac,"timePattern");this.name=getStringOption(e.name,["full","long","med","short"])}}class TimePatterns extends XFAObject{constructor(e){super(ac,"timePatterns",!0);this.timePattern=new XFAObjectArray(4)}}class TypeFace extends XFAObject{constructor(e){super(ac,"typeFace",!0);this.name=""|e.name}}class TypeFaces extends XFAObject{constructor(e){super(ac,"typeFaces",!0);this\
.typeFace=new XFAObjectArray}}class LocaleSetNamespace{static[fo](e,t){if(LocaleSetNamespace.hasOwnProperty(e))return LocaleSetNamespace[e](t)}static calendarSymbols(e){return new CalendarSymbols(e)}static currencySymbol(e){return new CurrencySymbol(e)}static currencySymbols(e){return new CurrencySymbols(e)}static datePattern(e){return new DatePattern(e)}static datePatterns(e){return new DatePatterns(e)}static dateTimeSymbols(e){return new DateTimeSymbols(e)}static day(e){return new Day(e)}stati\
c dayNames(e){return new DayNames(e)}static era(e){return new Era(e)}static eraNames(e){return new EraNames(e)}static locale(e){return new locale_set_Locale(e)}static localeSet(e){return new locale_set_LocaleSet(e)}static meridiem(e){return new Meridiem(e)}static meridiemNames(e){return new MeridiemNames(e)}static month(e){return new Month(e)}static monthNames(e){return new MonthNames(e)}static numberPattern(e){return new NumberPattern(e)}static numberPatterns(e){return new NumberPatterns(e)}sta\
tic numberSymbol(e){return new NumberSymbol(e)}static numberSymbols(e){return new NumberSymbols(e)}static timePattern(e){return new TimePattern(e)}static timePatterns(e){return new TimePatterns(e)}static typeFace(e){return new TypeFace(e)}static typeFaces(e){return new TypeFaces(e)}}const rc=go.signature.id;class signature_Signature extends XFAObject{constructor(e){super(rc,"signature",!0)}}class SignatureNamespace{static[fo](e,t){if(SignatureNamespace.hasOwnProperty(e))return SignatureNamespace\
[e](t)}static signature(e){return new signature_Signature(e)}}const ic=go.stylesheet.id;class Stylesheet extends XFAObject{constructor(e){super(ic,"stylesheet",!0)}}class StylesheetNamespace{static[fo](e,t){if(StylesheetNamespace.hasOwnProperty(e))return StylesheetNamespace[e](t)}static stylesheet(e){return new Stylesheet(e)}}const nc=go.xdp.id;class xdp_Xdp extends XFAObject{constructor(e){super(nc,"xdp",!0);this.uuid=e.uuid||"";this.timeStamp=e.timeStamp||"";this.config=null;this.connectionSet\
=null;this.datasets=null;this.localeSet=null;this.stylesheet=new XFAObjectArray;this.template=null}[Gs](e){const t=go[e[Ws]];return t&&e[Hs]===t.id}}class XdpNamespace{static[fo](e,t){if(XdpNamespace.hasOwnProperty(e))return XdpNamespace[e](t)}static xdp(e){return new xdp_Xdp(e)}}const sc=go.xhtml.id,oc=Symbol(),cc=new Set(["color","font","font-family","font-size","font-stretch","font-style","font-weight","margin","margin-bottom","margin-left","margin-right","margin-top","letter-spacing","line-h\
eight","orphans","page-break-after","page-break-before","page-break-inside","tab-interval","tab-stop","text-align","text-decoration","text-indent","vertical-align","widows","kerning-mode","xfa-font-horizontal-scale","xfa-font-vertical-scale","xfa-spacerun","xfa-tab-stops"]),lc=new Map([["page-break-after","breakAfter"],["page-break-before","breakBefore"],["page-break-inside","breakInside"],["kerning-mode",e=>"none"===e?"none":"normal"],["xfa-font-horizontal-scale",e=>`scaleX(${Math.max(0,parseIn\
t(e)/100).toFixed(2)})`],["xfa-font-vertical-scale",e=>`scaleY(${Math.max(0,parseInt(e)/100).toFixed(2)})`],["xfa-spacerun",""],["xfa-tab-stops",""],["font-size",(e,t)=>measureToString(.99*(e=t.fontSize=Math.abs(getMeasurement(e))))],["letter-spacing",e=>measureToString(getMeasurement(e))],["line-height",e=>measureToString(getMeasurement(e))],["margin",e=>measureToString(getMeasurement(e))],["margin-bottom",e=>measureToString(getMeasurement(e))],["margin-left",e=>measureToString(getMeasurement(e\
))],["margin-right",e=>measureToString(getMeasurement(e))],["margin-top",e=>measureToString(getMeasurement(e))],["text-indent",e=>measureToString(getMeasurement(e))],["font-family",e=>e],["vertical-align",e=>measureToString(getMeasurement(e))]]),hc=/\\s+/g,uc=/[\\r\\n]+/g,dc=/\\r\\n?/g;function mapStyle(e,t,a){const r=Object.create(null);if(!e)return r;const i=Object.create(null);for(const[t,a]of e.split(";").map((e=>e.split(":",2)))){const e=lc.get(t);if(""===e)continue;let n=a;e&&(n="string"==typeo\
f e?e:e(a,i));t.endsWith("scale")?r.transform=r.transform?`${r[t]} ${n}`:n:r[t.replaceAll(/-([a-zA-Z])/g,((e,t)=>t.toUpperCase()))]=n}r.fontFamily&&setFontFamily({typeface:r.fontFamily,weight:r.fontWeight||"normal",posture:r.fontStyle||"normal",size:i.fontSize||0},t,t[Is].fontFinder,r);if(a&&r.verticalAlign&&"0px"!==r.verticalAlign&&r.fontSize){const e=.583,t=.333,a=getMeasurement(r.fontSize);r.fontSize=measureToString(a*e);r.verticalAlign=measureToString(Math.sign(getMeasurement(r.verticalAlign\
))*a*t)}a&&r.fontSize&&(r.fontSize=`calc(${r.fontSize} * var(--total-scale-factor))`);fixTextIndent(r);return r}const fc=new Set(["body","html"]);class XhtmlObject extends XmlObject{constructor(e,t){super(sc,t);this[oc]=!1;this.style=e.style||""}[ts](e){super[ts](e);this.style=function checkStyle(e){return e.style?e.style.split(";").filter((e=>!!e.trim())).map((e=>e.split(":",2).map((e=>e.trim())))).filter((([t,a])=>{"font-family"===t&&e[Is].usedTypefaces.add(a);return cc.has(t)})).map((e=>e.joi\
n(":"))).join(";"):""}(this)}[Yn](){return!fc.has(this[Ws])}[Vs](e,t=!1){if(t)this[oc]=!0;else{e=e.replaceAll(uc,"");this.style.includes("xfa-spacerun:yes")||(e=e.replaceAll(hc," "))}e&&(this[ss]+=e)}[Ks](e,t=!0){const a=Object.create(null),r={top:NaN,bottom:NaN,left:NaN,right:NaN};let i=null;for(const[e,t]of this.style.split(";").map((e=>e.split(":",2))))switch(e){case"font-family":a.typeface=stripQuotes(t);break;case"font-size":a.size=getMeasurement(t);break;case"font-weight":a.weight=t;break;\
case"font-style":a.posture=t;break;case"letter-spacing":a.letterSpacing=getMeasurement(t);break;case"margin":const e=t.split(/ \\t/).map((e=>getMeasurement(e)));switch(e.length){case 1:r.top=r.bottom=r.left=r.right=e[0];break;case 2:r.top=r.bottom=e[0];r.left=r.right=e[1];break;case 3:r.top=e[0];r.bottom=e[2];r.left=r.right=e[1];break;case 4:r.top=e[0];r.left=e[1];r.bottom=e[2];r.right=e[3]}break;case"margin-top":r.top=getMeasurement(t);break;case"margin-bottom":r.bottom=getMeasurement(t);break;c\
ase"margin-left":r.left=getMeasurement(t);break;case"margin-right":r.right=getMeasurement(t);break;case"line-height":i=getMeasurement(t)}e.pushData(a,r,i);if(this[ss])e.addString(this[ss]);else for(const t of this[Ss]())"#text"!==t[Ws]?t[Ks](e):e.addString(t[ss]);t&&e.popFont()}[co](e){const t=[];this[ls]={children:t};this[es]({});if(0===t.length&&!this[ss])return HTMLResult.EMPTY;let a;a=this[oc]?this[ss]?this[ss].replaceAll(dc,"\\n"):void 0:this[ss]||void 0;return HTMLResult.success({name:this[\
Ws],attributes:{href:this.href,style:mapStyle(this.style,this,this[oc])},children:t,value:a})}}class A extends XhtmlObject{constructor(e){super(e,"a");this.href=fixURL(e.href)||""}}class B extends XhtmlObject{constructor(e){super(e,"b")}[Ks](e){e.pushFont({weight:"bold"});super[Ks](e);e.popFont()}}class Body extends XhtmlObject{constructor(e){super(e,"body")}[co](e){const t=super[co](e),{html:a}=t;if(!a)return HTMLResult.EMPTY;a.name="div";a.attributes.class=["xfaRich"];return t}}class Br extend\
s XhtmlObject{constructor(e){super(e,"br")}[so](){return"\\n"}[Ks](e){e.addString("\\n")}[co](e){return HTMLResult.success({name:"br"})}}class Html extends XhtmlObject{constructor(e){super(e,"html")}[co](e){const t=[];this[ls]={children:t};this[es]({});if(0===t.length)return HTMLResult.success({name:"div",attributes:{class:["xfaRich"],style:{}},value:this[ss]||""});if(1===t.length){const e=t[0];if(e.attributes?.class.includes("xfaRich"))return HTMLResult.success(e)}return HTMLResult.success({name:\
"div",attributes:{class:["xfaRich"],style:{}},children:t})}}class I extends XhtmlObject{constructor(e){super(e,"i")}[Ks](e){e.pushFont({posture:"italic"});super[Ks](e);e.popFont()}}class Li extends XhtmlObject{constructor(e){super(e,"li")}}class Ol extends XhtmlObject{constructor(e){super(e,"ol")}}class P extends XhtmlObject{constructor(e){super(e,"p")}[Ks](e){super[Ks](e,!1);e.addString("\\n");e.addPara();e.popFont()}[so](){return this[vs]()[Ss]().at(-1)===this?super[so]():super[so]()+"\\n"}}clas\
s Span extends XhtmlObject{constructor(e){super(e,"span")}}class Sub extends XhtmlObject{constructor(e){super(e,"sub")}}class Sup extends XhtmlObject{constructor(e){super(e,"sup")}}class Ul extends XhtmlObject{constructor(e){super(e,"ul")}}class XhtmlNamespace{static[fo](e,t){if(XhtmlNamespace.hasOwnProperty(e))return XhtmlNamespace[e](t)}static a(e){return new A(e)}static b(e){return new B(e)}static body(e){return new Body(e)}static br(e){return new Br(e)}static html(e){return new Html(e)}stati\
c i(e){return new I(e)}static li(e){return new Li(e)}static ol(e){return new Ol(e)}static p(e){return new P(e)}static span(e){return new Span(e)}static sub(e){return new Sub(e)}static sup(e){return new Sup(e)}static ul(e){return new Ul(e)}}const gc={config:ConfigNamespace,connection:ConnectionSetNamespace,datasets:DatasetsNamespace,localeSet:LocaleSetNamespace,signature:SignatureNamespace,stylesheet:StylesheetNamespace,template:TemplateNamespace,xdp:XdpNamespace,xhtml:XhtmlNamespace};class Unkno\
wnNamespace{constructor(e){this.namespaceId=e}[fo](e,t){return new XmlObject(this.namespaceId,e,t)}}class Root extends XFAObject{constructor(e){super(-1,"root",Object.create(null));this.element=null;this[Os]=e}[$s](e){this.element=e;return!0}[hs](){super[hs]();if(this.element.template instanceof Template){this[Os].set(Qs,this.element);this.element.template[eo](this[Os]);this.element.template[Os]=this[Os]}}}class Empty extends XFAObject{constructor(){super(-1,"",Object.create(null))}[$s](e){retur\
n!1}}class Builder{constructor(e=null){this._namespaceStack=[];this._nsAgnosticLevel=0;this._namespacePrefixes=new Map;this._namespaces=new Map;this._nextNsId=Math.max(...Object.values(go).map((({id:e})=>e)));this._currentNamespace=e||new UnknownNamespace(++this._nextNsId)}buildRoot(e){return new Root(e)}build({nsPrefix:e,name:t,attributes:a,namespace:r,prefixes:i}){const n=null!==r;if(n){this._namespaceStack.push(this._currentNamespace);this._currentNamespace=this._searchNamespace(r)}i&&this._a\
ddNamespacePrefix(i);if(a.hasOwnProperty(zs)){const e=gc.datasets,t=a[zs];let r=null;for(const[a,i]of Object.entries(t)){if(this._getNamespaceToUse(a)===e){r={xfa:i};break}}r?a[zs]=r:delete a[zs]}const s=this._getNamespaceToUse(e),o=s?.[fo](t,a)||new Empty;o[Ls]()&&this._nsAgnosticLevel++;(n||i||o[Ls]())&&(o[rs]={hasNamespace:n,prefixes:i,nsAgnostic:o[Ls]()});return o}isNsAgnostic(){return this._nsAgnosticLevel>0}_searchNamespace(e){let t=this._namespaces.get(e);if(t)return t;for(const[a,{check:\
r}]of Object.entries(go))if(r(e)){t=gc[a];if(t){this._namespaces.set(e,t);return t}break}t=new UnknownNamespace(++this._nextNsId);this._namespaces.set(e,t);return t}_addNamespacePrefix(e){for(const{prefix:t,value:a}of e){const e=this._searchNamespace(a);let r=this._namespacePrefixes.get(t);if(!r){r=[];this._namespacePrefixes.set(t,r)}r.push(e)}}_getNamespaceToUse(e){if(!e)return this._currentNamespace;const t=this._namespacePrefixes.get(e);if(t?.length>0)return t.at(-1);warn(`Unknown namespace p\
refix: ${e}.`);return null}clean(e){const{hasNamespace:t,prefixes:a,nsAgnostic:r}=e;t&&(this._currentNamespace=this._namespaceStack.pop());a&&a.forEach((({prefix:e})=>{this._namespacePrefixes.get(e).pop()}));r&&this._nsAgnosticLevel--}}class XFAParser extends XMLParserBase{constructor(e=null,t=!1){super();this._builder=new Builder(e);this._stack=[];this._globalData={usedTypefaces:new Set};this._ids=new Map;this._current=this._builder.buildRoot(this._ids);this._errorCode=jn;this._whiteRegex=/^\\s+\
$/;this._nbsps=/\\xa0+/g;this._richText=t}parse(e){this.parseXml(e);if(this._errorCode===jn){this._current[hs]();return this._current.element}}onText(e){e=e.replace(this._nbsps,(e=>e.slice(1)+" "));this._richText||this._current[Yn]()?this._current[Vs](e,this._richText):this._whiteRegex.test(e)||this._current[Vs](e.trim())}onCdata(e){this._current[Vs](e)}_mkAttributes(e,t){let a=null,r=null;const i=Object.create({});for(const{name:n,value:s}of e)if("xmlns"===n)a?warn(`XFA - multiple namespace defi\
nition in <${t}>`):a=s;else if(n.startsWith("xmlns:")){const e=n.substring(6);r??=[];r.push({prefix:e,value:s})}else{const e=n.indexOf(":");if(-1===e)i[n]=s;else{const t=i[zs]??=Object.create(null),[a,r]=[n.slice(0,e),n.slice(e+1)];(t[a]||=Object.create(null))[r]=s}}return[a,r,i]}_getNameAndPrefix(e,t){const a=e.indexOf(":");return-1===a?[e,null]:[e.substring(a+1),t?"":e.substring(0,a)]}onBeginElement(e,t,a){const[r,i,n]=this._mkAttributes(t,e),[s,o]=this._getNameAndPrefix(e,this._builder.isNsAg\
nostic()),c=this._builder.build({nsPrefix:o,name:s,attributes:n,namespace:r,prefixes:i});c[Is]=this._globalData;if(a){c[hs]();this._current[$s](c)&&c[ao](this._ids);c[ts](this._builder)}else{this._stack.push(this._current);this._current=c}}onEndElement(e){const t=this._current;if(t[Bs]()&&"string"==typeof t[ss]){const e=new XFAParser;e._globalData=this._globalData;const a=e.parse(t[ss]);t[ss]=null;t[$s](a)}t[hs]();this._current=this._stack.pop();this._current[$s](t)&&t[ao](this._ids);t[ts](this.\
_builder)}onError(e){this._errorCode=e}}class XFAFactory{constructor(e){try{this.root=(new XFAParser).parse(XFAFactory._createDocument(e));const t=new Binder(this.root);this.form=t.bind();this.dataHandler=new DataHandler(this.root,t.getData());this.form[Is].template=this.form}catch(e){warn(`XFA - an error occurred during parsing and binding: ${e}`)}}isValid(){return!(!this.root||!this.form)}_createPagesHelper(){const e=this.form[oo]();return new Promise(((t,a)=>{const nextIteration=()=>{try{cons\
t a=e.next();a.done?t(a.value):setTimeout(nextIteration,0)}catch(e){a(e)}};setTimeout(nextIteration,0)}))}async _createPages(){try{this.pages=await this._createPagesHelper();this.dims=this.pages.children.map((e=>{const{width:t,height:a}=e.attributes.style;return[0,0,parseInt(t),parseInt(a)]}))}catch(e){warn(`XFA - an error occurred during layout: ${e}`)}}getBoundingBox(e){return this.dims[e]}async getNumPages(){this.pages||await this._createPages();return this.dims.length}setImages(e){this.form[\
Is].images=e}setFonts(e){this.form[Is].fontFinder=new FontFinder(e);const t=[];for(let e of this.form[Is].usedTypefaces){e=stripQuotes(e);this.form[Is].fontFinder.find(e)||t.push(e)}return t.length>0?t:null}appendFonts(e,t){this.form[Is].fontFinder.add(e,t)}async getPages(){this.pages||await this._createPages();const e=this.pages;this.pages=null;return e}serializeData(e){return this.dataHandler.serialize(e)}static _createDocument(e){return e["/xdp:xdp"]?Object.values(e).join(""):e["xdp:xdp"]}sta\
tic getRichTextAsHtml(e){if(!e||"string"!=typeof e)return null;try{let t=new XFAParser(XhtmlNamespace,!0).parse(e);if(!["body","xhtml"].includes(t[Ws])){const e=XhtmlNamespace.body({});e[Qn](t);t=e}const a=t[co]();if(!a.success)return null;const{html:r}=a,{attributes:i}=r;if(i){i.class&&(i.class=i.class.filter((e=>!e.startsWith("xfa"))));i.dir="auto"}return{html:r,str:t[so]()}}catch(e){warn(`XFA - an error occurred during parsing of rich text: ${e}`)}return null}}class AnnotationFactory{static c\
reateGlobals(e){return Promise.all([e.ensureCatalog("acroForm"),e.ensureDoc("xfaDatasets"),e.ensureCatalog("structTreeRoot"),e.ensureCatalog("baseUrl"),e.ensureCatalog("attachments"),e.ensureCatalog("globalColorSpaceCache")]).then((([t,a,r,i,n,s])=>({pdfManager:e,acroForm:t instanceof Dict?t:Dict.empty,xfaDatasets:a,structTreeRoot:r,baseUrl:i,attachments:n,globalColorSpaceCache:s})),(e=>{warn(`createGlobals: "${e}".`);return null}))}static async create(e,t,a,r,i,n,s){const o=i?await this._getPag\
eIndex(e,t,a.pdfManager):null;return a.pdfManager.ensure(this,"_create",[e,t,a,r,i,n,o,s])}static _create(e,t,a,r,i=!1,n=null,s=null,o=null){const c=e.fetchIfRef(t);if(!(c instanceof Dict))return;const{acroForm:l,pdfManager:h}=a,u=t instanceof Ref?t.toString():`annot_${r.createObjId()}`;let d=c.get("Subtype");d=d instanceof Name?d.name:null;const f={xref:e,ref:t,dict:c,subtype:d,id:u,annotationGlobals:a,collectFields:i,orphanFields:n,needAppearances:!i&&!0===l.get("NeedAppearances"),pageIndex:s,\
evaluatorOptions:h.evaluatorOptions,pageRef:o};switch(d){case"Link":return new LinkAnnotation(f);case"Text":return new TextAnnotation(f);case"Widget":let e=getInheritableProperty({dict:c,key:"FT"});e=e instanceof Name?e.name:null;switch(e){case"Tx":return new TextWidgetAnnotation(f);case"Btn":return new ButtonWidgetAnnotation(f);case"Ch":return new ChoiceWidgetAnnotation(f);case"Sig":return new SignatureWidgetAnnotation(f)}warn(`Unimplemented widget field type "${e}", falling back to base field \
type.`);return new WidgetAnnotation(f);case"Popup":return new PopupAnnotation(f);case"FreeText":return new FreeTextAnnotation(f);case"Line":return new LineAnnotation(f);case"Square":return new SquareAnnotation(f);case"Circle":return new CircleAnnotation(f);case"PolyLine":return new PolylineAnnotation(f);case"Polygon":return new PolygonAnnotation(f);case"Caret":return new CaretAnnotation(f);case"Ink":return new InkAnnotation(f);case"Highlight":return new HighlightAnnotation(f);case"Underline":ret\
urn new UnderlineAnnotation(f);case"Squiggly":return new SquigglyAnnotation(f);case"StrikeOut":return new StrikeOutAnnotation(f);case"Stamp":return new StampAnnotation(f);case"FileAttachment":return new FileAttachmentAnnotation(f);default:i||warn(d?`Unimplemented annotation type "${d}", falling back to base annotation.`:"Annotation is missing the required /Subtype.");return new Annotation(f)}}static async _getPageIndex(e,t,a){try{const r=await e.fetchIfRefAsync(t);if(!(r instanceof Dict))return-\
1;const i=r.getRaw("P");if(i instanceof Ref)try{return await a.ensureCatalog("getPageIndex",[i])}catch(e){info(`_getPageIndex -- not a valid page reference: "${e}".`)}if(r.has("Kids"))return-1;const n=await a.ensureDoc("numPages");for(let e=0;e<n;e++){const r=await a.getPage(e),i=await a.ensure(r,"annotations");for(const a of i)if(a instanceof Ref&&isRefsEqual(a,t))return e}}catch(e){warn(`_getPageIndex: "${e}".`)}return-1}static generateImages(e,t,a){if(!a){warn("generateImages: OffscreenCanvas\
 is not supported, cannot save or print some annotations with images.");return null}let r;for(const{bitmapId:a,bitmap:i}of e)if(i){r||=new Map;r.set(a,StampAnnotation.createImage(i,t))}return r}static async saveNewAnnotations(e,t,a,r,i){const n=e.xref;let s;const o=[],{isOffscreenCanvasSupported:c}=e.options;for(const l of a)if(!l.deleted)switch(l.annotationType){case g:if(!s){const e=new Dict(n);e.setIfName("BaseFont","Helvetica");e.setIfName("Type","Font");e.setIfName("Subtype","Type1");e.setI\
fName("Encoding","WinAnsiEncoding");s=n.getNewTemporaryRef();i.put(s,{data:e})}o.push(FreeTextAnnotation.createNewAnnotation(n,l,i,{evaluator:e,task:t,baseFontRef:s}));break;case p:l.quadPoints?o.push(HighlightAnnotation.createNewAnnotation(n,l,i)):o.push(InkAnnotation.createNewAnnotation(n,l,i));break;case b:o.push(InkAnnotation.createNewAnnotation(n,l,i));break;case m:const a=c?await(r?.get(l.bitmapId)):null;if(a?.imageStream){const{imageStream:e,smaskStream:t}=a;if(t){const a=n.getNewTemporar\
yRef();i.put(a,{data:t});e.dict.set("SMask",a)}const r=a.imageRef=n.getNewTemporaryRef();i.put(r,{data:e});a.imageStream=a.smaskStream=null}o.push(StampAnnotation.createNewAnnotation(n,l,i,{image:a}));break;case y:o.push(StampAnnotation.createNewAnnotation(n,l,i,{}))}return{annotations:(await Promise.all(o)).flat()}}static async printNewAnnotations(e,t,a,r,i){if(!r)return null;const{options:n,xref:s}=t,o=[];for(const c of r)if(!c.deleted)switch(c.annotationType){case g:o.push(FreeTextAnnotation.\
createNewPrintAnnotation(e,s,c,{evaluator:t,task:a,evaluatorOptions:n}));break;case p:c.quadPoints?o.push(HighlightAnnotation.createNewPrintAnnotation(e,s,c,{evaluatorOptions:n})):o.push(InkAnnotation.createNewPrintAnnotation(e,s,c,{evaluatorOptions:n}));break;case b:o.push(InkAnnotation.createNewPrintAnnotation(e,s,c,{evaluatorOptions:n}));break;case m:const r=n.isOffscreenCanvasSupported?await(i?.get(c.bitmapId)):null;if(r?.imageStream){const{imageStream:e,smaskStream:t}=r;t&&e.dict.set("SMask\
",t);r.imageRef=new JpegStream(e,e.length);r.imageStream=r.smaskStream=null}o.push(StampAnnotation.createNewPrintAnnotation(e,s,c,{image:r,evaluatorOptions:n}));break;case y:o.push(StampAnnotation.createNewPrintAnnotation(e,s,c,{evaluatorOptions:n}))}return Promise.all(o)}}function getRgbColor(e,t=new Uint8ClampedArray(3)){if(!Array.isArray(e))return t;const a=t||new Uint8ClampedArray(3);switch(e.length){case 0:return null;case 1:ColorSpaceUtils.gray.getRgbItem(e,0,a,0);return a;case 3:ColorSpac\
eUtils.rgb.getRgbItem(e,0,a,0);return a;case 4:ColorSpaceUtils.cmyk.getRgbItem(e,0,a,0);return a;default:return t}}function getPdfColorArray(e,t=null){return e&&Array.from(e,(e=>e/255))||t}function getQuadPoints(e,t){const a=e.getArray("QuadPoints");if(!isNumberArray(a,null)||0===a.length||a.length%8>0)return null;const r=new Float32Array(a.length);for(let e=0,i=a.length;e<i;e+=8){const[i,n,s,o,c,l,h,u]=a.slice(e,e+8),d=Math.min(i,s,c,h),f=Math.max(i,s,c,h),g=Math.min(n,o,l,u),p=Math.max(n,o,l,u\
);if(null!==t&&(d<t[0]||f>t[2]||g<t[1]||p>t[3]))return null;r.set([d,p,f,p,d,g,f,g],e)}return r}function getTransformMatrix(e,t,a){const r=new Float32Array([1/0,1/0,-1/0,-1/0]);Util.axialAlignedBoundingBox(t,a,r);const[i,n,s,o]=r;if(i===s||n===o)return[1,0,0,1,e[0],e[1]];const c=(e[2]-e[0])/(s-i),l=(e[3]-e[1])/(o-n);return[c,0,0,l,e[0]-i*c,e[1]-n*l]}class Annotation{constructor(e){const{dict:t,xref:a,annotationGlobals:r,ref:i,orphanFields:n}=e,s=n?.get(i);s&&t.set("Parent",s);this.setTitle(t.get\
("T"));this.setContents(t.get("Contents"));this.setModificationDate(t.get("M"));this.setFlags(t.get("F"));this.setRectangle(t.getArray("Rect"));this.setColor(t.getArray("C"));this.setBorderStyle(t);this.setAppearance(t);this.setOptionalContent(t);const o=t.get("MK");this.setBorderAndBackgroundColors(o);this.setRotation(o,t);this.ref=e.ref instanceof Ref?e.ref:null;this._streams=[];this.appearance&&this._streams.push(this.appearance);const c=!!(this.flags&ee),l=!!(this.flags&te);this.data={annota\
tionFlags:this.flags,borderStyle:this.borderStyle,color:this.color,backgroundColor:this.backgroundColor,borderColor:this.borderColor,rotation:this.rotation,contentsObj:this._contents,hasAppearance:!!this.appearance,id:e.id,modificationDate:this.modificationDate,rect:this.rectangle,subtype:e.subtype,hasOwnCanvas:!1,noRotate:!!(this.flags&Z),noHTML:c&&l,isEditable:!1,structParent:-1};if(r.structTreeRoot){let a=t.get("StructParent");this.data.structParent=a=Number.isInteger(a)&&a>=0?a:-1;r.structTr\
eeRoot.addAnnotationIdToPage(e.pageRef,a)}if(e.collectFields){const r=t.get("Kids");if(Array.isArray(r)){const e=[];for(const t of r)t instanceof Ref&&e.push(t.toString());0!==e.length&&(this.data.kidIds=e)}this.data.actions=collectActions(a,t,ye);this.data.fieldName=this._constructFieldName(t);this.data.pageIndex=e.pageIndex}const h=t.get("IT");h instanceof Name&&(this.data.it=h.name);this._isOffscreenCanvasSupported=e.evaluatorOptions.isOffscreenCanvasSupported;this._fallbackFontDict=null;this\
._needAppearances=!1}_hasFlag(e,t){return!!(e&t)}_buildFlags(e,t){let{flags:a}=this;if(void 0===e){if(void 0===t)return;return t?a&~Y:a&~J|Y}if(e){a|=Y;return t?a&~Q|J:a&~J|Q}a&=~(J|Q);return t?a&~Y:a|Y}_isViewable(e){return!this._hasFlag(e,K)&&!this._hasFlag(e,Q)}_isPrintable(e){return this._hasFlag(e,Y)&&!this._hasFlag(e,J)&&!this._hasFlag(e,K)}mustBeViewed(e,t){const a=e?.get(this.data.id)?.noView;return void 0!==a?!a:this.viewable&&!this._hasFlag(this.flags,J)}mustBePrinted(e){const t=e?.get\
(this.data.id)?.noPrint;return void 0!==t?!t:this.printable}mustBeViewedWhenEditing(e,t=null){return e?!this.data.isEditable:!t?.has(this.data.id)}get viewable(){return null!==this.data.quadPoints&&(0===this.flags||this._isViewable(this.flags))}get printable(){return null!==this.data.quadPoints&&(0!==this.flags&&this._isPrintable(this.flags))}_parseStringHelper(e){const t="string"==typeof e?stringToPDFString(e):"";return{str:t,dir:t&&"rtl"===bidi(t).dir?"rtl":"ltr"}}setDefaultAppearance(e){const\
{dict:t,annotationGlobals:a}=e,r=getInheritableProperty({dict:t,key:"DA"})||a.acroForm.get("DA");this._defaultAppearance="string"==typeof r?r:"";this.data.defaultAppearanceData=parseDefaultAppearance(this._defaultAppearance)}setTitle(e){this._title=this._parseStringHelper(e)}setContents(e){this._contents=this._parseStringHelper(e)}setModificationDate(e){this.modificationDate="string"==typeof e?e:null}setFlags(e){this.flags=Number.isInteger(e)&&e>0?e:0;this.flags&K&&"Annotation"!==this.constructo\
r.name&&(this.flags^=K)}hasFlag(e){return this._hasFlag(this.flags,e)}setRectangle(e){this.rectangle=lookupNormalRect(e,[0,0,0,0])}setColor(e){this.color=getRgbColor(e)}setLineEndings(e){this.lineEndings=["None","None"];if(Array.isArray(e)&&2===e.length)for(let t=0;t<2;t++){const a=e[t];if(a instanceof Name)switch(a.name){case"None":continue;case"Square":case"Circle":case"Diamond":case"OpenArrow":case"ClosedArrow":case"Butt":case"ROpenArrow":case"RClosedArrow":case"Slash":this.lineEndings[t]=a.n\
ame;continue}warn(`Ignoring invalid lineEnding: ${a}`)}}setRotation(e,t){this.rotation=0;let a=e instanceof Dict?e.get("R")||0:t.get("Rotate")||0;if(Number.isInteger(a)&&0!==a){a%=360;a<0&&(a+=360);a%90==0&&(this.rotation=a)}}setBorderAndBackgroundColors(e){if(e instanceof Dict){this.borderColor=getRgbColor(e.getArray("BC"),null);this.backgroundColor=getRgbColor(e.getArray("BG"),null)}else this.borderColor=this.backgroundColor=null}setBorderStyle(e){this.borderStyle=new AnnotationBorderStyle;if(\
e instanceof Dict)if(e.has("BS")){const t=e.get("BS");if(t instanceof Dict){const e=t.get("Type");if(!e||isName(e,"Border")){this.borderStyle.setWidth(t.get("W"),this.rectangle);this.borderStyle.setStyle(t.get("S"));this.borderStyle.setDashArray(t.getArray("D"))}}}else if(e.has("Border")){const t=e.getArray("Border");if(Array.isArray(t)&&t.length>=3){this.borderStyle.setHorizontalCornerRadius(t[0]);this.borderStyle.setVerticalCornerRadius(t[1]);this.borderStyle.setWidth(t[2],this.rectangle);4===\
t.length&&this.borderStyle.setDashArray(t[3],!0)}}else this.borderStyle.setWidth(0)}setAppearance(e){this.appearance=null;const t=e.get("AP");if(!(t instanceof Dict))return;const a=t.get("N");if(a instanceof BaseStream){this.appearance=a;return}if(!(a instanceof Dict))return;const r=e.get("AS");if(!(r instanceof Name&&a.has(r.name)))return;const i=a.get(r.name);i instanceof BaseStream&&(this.appearance=i)}setOptionalContent(e){this.oc=null;const t=e.get("OC");t instanceof Name?warn("setOptionalC\
ontent: Support for /Name-entry is not implemented."):t instanceof Dict&&(this.oc=t)}async loadResources(e,t){const a=await t.dict.getAsync("Resources");a&&await ObjectLoader.load(a,e,a.xref);return a}async getOperatorList(e,t,a,r){const{hasOwnCanvas:i,id:n,rect:o}=this.data;let c=this.appearance;const l=!!(i&&a&s);if(l&&(0===this.width||0===this.height)){this.data.hasOwnCanvas=!1;return{opList:new OperatorList,separateForm:!1,separateCanvas:!1}}if(!c){if(!l)return{opList:new OperatorList,separa\
teForm:!1,separateCanvas:!1};c=new StringStream("");c.dict=new Dict}const h=c.dict,u=await this.loadResources(Ia,c),d=lookupRect(h.getArray("BBox"),[0,0,1,1]),f=lookupMatrix(h.getArray("Matrix"),Fa),g=getTransformMatrix(o,d,f),p=new OperatorList;let m;this.oc&&(m=await e.parseMarkedContentProps(this.oc,null));void 0!==m&&p.addOp(jt,["OC",m]);p.addOp($t,[n,o,g,f,l]);await e.getOperatorList({stream:c,task:t,resources:u,operatorList:p,fallbackFontDict:this._fallbackFontDict});p.addOp(Gt,[]);void 0!\
==m&&p.addOp(_t,[]);this.reset();return{opList:p,separateForm:!1,separateCanvas:l}}async save(e,t,a,r){return null}get overlaysTextContent(){return!1}get hasTextContent(){return!1}async extractTextContent(e,t,a){if(!this.appearance)return;const r=await this.loadResources(Ta,this.appearance),i=[],n=[];let s=null;const o={desiredSize:Math.Infinity,ready:!0,enqueue(e,t){for(const t of e.items)if(void 0!==t.str){s||=t.transform.slice(-2);n.push(t.str);if(t.hasEOL){i.push(n.join("").trimEnd());n.leng\
th=0}}}};await e.getTextContent({stream:this.appearance,task:t,resources:r,includeMarkedContent:!0,keepWhiteSpace:!0,sink:o,viewBox:a});this.reset();n.length&&i.push(n.join("").trimEnd());if(i.length>1||i[0]){const e=this.appearance.dict,t=lookupRect(e.getArray("BBox"),null),a=lookupMatrix(e.getArray("Matrix"),null);this.data.textPosition=this._transformPoint(s,t,a);this.data.textContent=i}}_transformPoint(e,t,a){const{rect:r}=this.data;t||=[0,0,1,1];a||=[1,0,0,1,0,0];const i=getTransformMatrix(\
r,t,a);i[4]-=r[0];i[5]-=r[1];const n=e.slice();Util.applyTransform(n,i);Util.applyTransform(n,a);return n}getFieldObject(){return this.data.kidIds?{id:this.data.id,actions:this.data.actions,name:this.data.fieldName,strokeColor:this.data.borderColor,fillColor:this.data.backgroundColor,type:"",kidIds:this.data.kidIds,page:this.data.pageIndex,rotation:this.rotation}:null}reset(){for(const e of this._streams)e.reset()}_constructFieldName(e){if(!e.has("T")&&!e.has("Parent")){warn("Unknown field name,\
 falling back to empty field name.");return""}if(!e.has("Parent"))return stringToPDFString(e.get("T"));const t=[];e.has("T")&&t.unshift(stringToPDFString(e.get("T")));let a=e;const r=new RefSet;e.objId&&r.put(e.objId);for(;a.has("Parent");){a=a.get("Parent");if(!(a instanceof Dict)||a.objId&&r.has(a.objId))break;a.objId&&r.put(a.objId);a.has("T")&&t.unshift(stringToPDFString(a.get("T")))}return t.join(".")}get width(){return this.data.rect[2]-this.data.rect[0]}get height(){return this.data.rect[\
3]-this.data.rect[1]}}class AnnotationBorderStyle{constructor(){this.width=1;this.rawWidth=1;this.style=fe;this.dashArray=[3];this.horizontalCornerRadius=0;this.verticalCornerRadius=0}setWidth(e,t=[0,0,0,0]){if(e instanceof Name)this.width=0;else if("number"==typeof e){if(e>0){this.rawWidth=e;const a=(t[2]-t[0])/2,r=(t[3]-t[1])/2;if(a>0&&r>0&&(e>a||e>r)){warn(`AnnotationBorderStyle.setWidth - ignoring width: ${e}`);e=1}}this.width=e}}setStyle(e){if(e instanceof Name)switch(e.name){case"S":this.s\
tyle=fe;break;case"D":this.style=ge;break;case"B":this.style=pe;break;case"I":this.style=me;break;case"U":this.style=be}}setDashArray(e,t=!1){if(Array.isArray(e)){let a=!0,r=!0;for(const t of e){if(!(+t>=0)){a=!1;break}t>0&&(r=!1)}if(0===e.length||a&&!r){this.dashArray=e;t&&this.setStyle(Name.get("D"))}else this.width=0}else e&&(this.width=0)}setHorizontalCornerRadius(e){Number.isInteger(e)&&(this.horizontalCornerRadius=e)}setVerticalCornerRadius(e){Number.isInteger(e)&&(this.verticalCornerRadiu\
s=e)}}class MarkupAnnotation extends Annotation{constructor(e){super(e);const{dict:t}=e;if(t.has("IRT")){const e=t.getRaw("IRT");this.data.inReplyTo=e instanceof Ref?e.toString():null;const a=t.get("RT");this.data.replyType=a instanceof Name?a.name:V}let a=null;if(this.data.replyType===G){const e=t.get("IRT");this.setTitle(e.get("T"));this.data.titleObj=this._title;this.setContents(e.get("Contents"));this.data.contentsObj=this._contents;if(e.has("CreationDate")){this.setCreationDate(e.get("Creat\
ionDate"));this.data.creationDate=this.creationDate}else this.data.creationDate=null;if(e.has("M")){this.setModificationDate(e.get("M"));this.data.modificationDate=this.modificationDate}else this.data.modificationDate=null;a=e.getRaw("Popup");if(e.has("C")){this.setColor(e.getArray("C"));this.data.color=this.color}else this.data.color=null}else{this.data.titleObj=this._title;this.setCreationDate(t.get("CreationDate"));this.data.creationDate=this.creationDate;a=t.getRaw("Popup");t.has("C")||(this\
.data.color=null)}this.data.popupRef=a instanceof Ref?a.toString():null;t.has("RC")&&(this.data.richText=XFAFactory.getRichTextAsHtml(t.get("RC")))}setCreationDate(e){this.creationDate="string"==typeof e?e:null}_setDefaultAppearance({xref:e,extra:t,strokeColor:a,fillColor:r,blendMode:i,strokeAlpha:n,fillAlpha:s,pointsCallback:o}){const c=this.data.rect=[1/0,1/0,-1/0,-1/0],l=["q"];t&&l.push(t);a&&l.push(`${a[0]} ${a[1]} ${a[2]} RG`);r&&l.push(`${r[0]} ${r[1]} ${r[2]} rg`);const h=this.data.quadPo\
ints||Float32Array.from([this.rectangle[0],this.rectangle[3],this.rectangle[2],this.rectangle[3],this.rectangle[0],this.rectangle[1],this.rectangle[2],this.rectangle[1]]);for(let e=0,t=h.length;e<t;e+=8){const t=o(l,h.subarray(e,e+8));Util.rectBoundingBox(...t,c)}l.push("Q");const u=new Dict(e),d=new Dict(e);d.setIfName("Subtype","Form");const f=new StringStream(l.join(" "));f.dict=d;u.set("Fm0",f);const g=new Dict(e);i&&g.setIfName("BM",i);g.setIfNumber("CA",n);g.setIfNumber("ca",s);const p=new\
 Dict(e);p.set("GS0",g);const m=new Dict(e);m.set("ExtGState",p);m.set("XObject",u);const b=new Dict(e);b.set("Resources",m);b.set("BBox",c);this.appearance=new StringStream("/GS0 gs /Fm0 Do");this.appearance.dict=b;this._streams.push(this.appearance,f)}static async createNewAnnotation(e,t,a,r){const i=t.ref||=e.getNewTemporaryRef(),n=await this.createNewAppearanceStream(t,e,r);let s;if(n){const r=e.getNewTemporaryRef();s=this.createNewDict(t,e,{apRef:r});a.put(r,{data:n})}else s=this.createNewD\
ict(t,e,{});Number.isInteger(t.parentTreeId)&&s.set("StructParent",t.parentTreeId);a.put(i,{data:s});const o={ref:i};if(t.popup){const r=t.popup;if(r.deleted){s.delete("Popup");s.delete("Contents");s.delete("RC");return o}const n=r.ref||=e.getNewTemporaryRef();r.parent=i;const c=PopupAnnotation.createNewDict(r,e);a.put(n,{data:c});s.setIfDefined("Contents",stringToAsciiOrUTF16BE(r.contents));s.set("Popup",n);return[o,{ref:n}]}return o}static async createNewPrintAnnotation(e,t,a,r){const i=await \
this.createNewAppearanceStream(a,t,r),n=this.createNewDict(a,t,i?{ap:i}:{}),s=new this.prototype.constructor({dict:n,xref:t,annotationGlobals:e,evaluatorOptions:r.evaluatorOptions});a.ref&&(s.ref=s.refToReplace=a.ref);return s}}class WidgetAnnotation extends Annotation{constructor(e){super(e);const{dict:t,xref:a,annotationGlobals:r}=e,i=this.data;this._needAppearances=e.needAppearances;i.annotationType=$;void 0===i.fieldName&&(i.fieldName=this._constructFieldName(t));void 0===i.actions&&(i.actio\
ns=collectActions(a,t,ye));let n=getInheritableProperty({dict:t,key:"V",getArray:!0});i.fieldValue=this._decodeFormValue(n);const s=getInheritableProperty({dict:t,key:"DV",getArray:!0});i.defaultFieldValue=this._decodeFormValue(s);if(void 0===n&&r.xfaDatasets){const e=this._title.str;if(e){this._hasValueFromXFA=!0;i.fieldValue=n=r.xfaDatasets.getValue(e)}}void 0===n&&null!==i.defaultFieldValue&&(i.fieldValue=i.defaultFieldValue);i.alternativeText=stringToPDFString(t.get("TU")||"");this.setDefaul\
tAppearance(e);i.hasAppearance||=this._needAppearances&&void 0!==i.fieldValue&&null!==i.fieldValue;const o=getInheritableProperty({dict:t,key:"FT"});i.fieldType=o instanceof Name?o.name:null;const c=getInheritableProperty({dict:t,key:"DR"}),l=r.acroForm.get("DR"),h=this.appearance?.dict.get("Resources");this._fieldResources={localResources:c,acroFormResources:l,appearanceResources:h,mergedResources:Dict.merge({xref:a,dictArray:[c,h,l],mergeSubDicts:!0})};i.fieldFlags=getInheritableProperty({dict\
:t,key:"Ff"});(!Number.isInteger(i.fieldFlags)||i.fieldFlags<0)&&(i.fieldFlags=0);i.password=this.hasFieldFlag(ne);i.readOnly=this.hasFieldFlag(ae);i.required=this.hasFieldFlag(re);i.hidden=this._hasFlag(i.annotationFlags,J)||this._hasFlag(i.annotationFlags,Q)}_decodeFormValue(e){return Array.isArray(e)?e.filter((e=>"string"==typeof e)).map((e=>stringToPDFString(e))):e instanceof Name?stringToPDFString(e.name):"string"==typeof e?stringToPDFString(e):null}hasFieldFlag(e){return!!(this.data.fieldF\
lags&e)}_isViewable(e){return!0}mustBeViewed(e,t){return t?this.viewable:super.mustBeViewed(e,t)&&!this._hasFlag(this.flags,Q)}getRotationMatrix(e){let t=e?.get(this.data.id)?.rotation;void 0===t&&(t=this.rotation);return 0===t?Fa:getRotationMatrix(t,this.width,this.height)}getBorderAndBackgroundAppearances(e){let t=e?.get(this.data.id)?.rotation;void 0===t&&(t=this.rotation);if(!this.backgroundColor&&!this.borderColor)return"";const a=0===t||180===t?`0 0 ${this.width} ${this.height} re`:`0 0 ${\
this.height} ${this.width} re`;let r="";this.backgroundColor&&(r=`${getPdfColor(this.backgroundColor,!0)} ${a} f `);if(this.borderColor){r+=`${this.borderStyle.width||1} w ${getPdfColor(this.borderColor,!1)} ${a} S `}return r}async getOperatorList(e,t,a,r){if(a&l&&!(this instanceof SignatureWidgetAnnotation)&&!this.data.noHTML&&!this.data.hasOwnCanvas)return{opList:new OperatorList,separateForm:!0,separateCanvas:!1};if(!this._hasText)return super.getOperatorList(e,t,a,r);const i=await this._getA\
ppearance(e,t,a,r);if(this.appearance&&null===i)return super.getOperatorList(e,t,a,r);const n=new OperatorList;if(!this._defaultAppearance||null===i)return{opList:n,separateForm:!1,separateCanvas:!1};const o=!!(this.data.hasOwnCanvas&&a&s),c=[0,0,this.width,this.height],h=getTransformMatrix(this.data.rect,c,[1,0,0,1,0,0]);let u;this.oc&&(u=await e.parseMarkedContentProps(this.oc,null));void 0!==u&&n.addOp(jt,["OC",u]);n.addOp($t,[this.data.id,this.data.rect,h,this.getRotationMatrix(r),o]);const \
d=new StringStream(i);await e.getOperatorList({stream:d,task:t,resources:this._fieldResources.mergedResources,operatorList:n});n.addOp(Gt,[]);void 0!==u&&n.addOp(_t,[]);return{opList:n,separateForm:!1,separateCanvas:o}}_getMKDict(e){const t=new Dict(null);e&&t.set("R",e);t.setIfArray("BC",getPdfColorArray(this.borderColor));t.setIfArray("BG",getPdfColorArray(this.backgroundColor));return t.size>0?t:null}amendSavedDict(e,t){}setValue(e,t,a,r){const{dict:i,ref:n}=function getParentToUpdate(e,t,a){\
const r=new RefSet,i=e,n={dict:null,ref:null};for(;e instanceof Dict&&!r.has(t);){r.put(t);if(e.has("T"))break;if(!((t=e.getRaw("Parent"))instanceof Ref))return n;e=a.fetch(t)}if(e instanceof Dict&&e!==i){n.dict=e;n.ref=t}return n}(e,this.ref,a);if(i){if(!r.has(n)){const e=i.clone();e.set("V",t);r.put(n,{data:e});return e}}else e.set("V",t);return null}async save(e,t,a,r){const i=a?.get(this.data.id),n=this._buildFlags(i?.noView,i?.noPrint);let s=i?.value,o=i?.rotation;if(s===this.data.fieldValu\
e||void 0===s){if(!this._hasValueFromXFA&&void 0===o&&void 0===n)return;s||=this.data.fieldValue}if(void 0===o&&!this._hasValueFromXFA&&Array.isArray(s)&&Array.isArray(this.data.fieldValue)&&isArrayEqual(s,this.data.fieldValue)&&void 0===n)return;void 0===o&&(o=this.rotation);let l=null;if(!this._needAppearances){l=await this._getAppearance(e,t,c,a);if(null===l&&void 0===n)return}let h=!1;if(l?.needAppearances){h=!0;l=null}const{xref:u}=e,d=u.fetchIfRef(this.ref);if(!(d instanceof Dict))return;c\
onst f=new Dict(u);for(const e of d.getKeys())"AP"!==e&&f.set(e,d.getRaw(e));if(void 0!==n){f.set("F",n);if(null===l&&!h){const e=d.getRaw("AP");e&&f.set("AP",e)}}const g={path:this.data.fieldName,value:s},p=this.setValue(f,Array.isArray(s)?s.map(stringToAsciiOrUTF16BE):stringToAsciiOrUTF16BE(s),u,r);this.amendSavedDict(a,p||f);const m=this._getMKDict(o);m&&f.set("MK",m);r.put(this.ref,{data:f,xfa:g,needAppearances:h});if(null!==l){const e=u.getNewTemporaryRef(),t=new Dict(u);f.set("AP",t);t.set\
("N",e);const i=this._getSaveFieldResources(u),n=new StringStream(l),s=n.dict=new Dict(u);s.setIfName("Subtype","Form");s.set("Resources",i);const c=o%180==0?[0,0,this.width,this.height]:[0,0,this.height,this.width];s.set("BBox",c);const h=this.getRotationMatrix(a);h!==Fa&&s.set("Matrix",h);r.put(e,{data:n,xfa:null,needAppearances:!1})}f.set("M",`D:${getModificationDate()}`)}async _getAppearance(e,t,a,r){if(this.data.password)return null;const n=r?.get(this.data.id);let s,o;if(n){s=n.formattedVa\
lue||n.value;o=n.rotation}if(void 0===o&&void 0===s&&!this._needAppearances&&(!this._hasValueFromXFA||this.appearance))return null;const l=this.getBorderAndBackgroundAppearances(r);if(void 0===s){s=this.data.fieldValue;if(!s)return`/Tx BMC q ${l}Q EMC`}Array.isArray(s)&&1===s.length&&(s=s[0]);assert("string"==typeof s,"Expected `value` to be a string.");s=s.trimEnd();if(this.data.combo){const e=this.data.options.find((({exportValue:e})=>s===e));s=e?.displayValue||s}if(""===s)return`/Tx BMC q ${l\
}Q EMC`;void 0===o&&(o=this.rotation);let h,u=-1;if(this.data.multiLine){h=s.split(/\\r\\n?|\\n/).map((e=>e.normalize("NFC")));u=h.length}else h=[s.replace(/\\r\\n?|\\n/,"").normalize("NFC")];let{width:d,height:f}=this;90!==o&&270!==o||([d,f]=[f,d]);this._defaultAppearance||(this.data.defaultAppearanceData=parseDefaultAppearance(this._defaultAppearance="/Helvetica 0 Tf 0 g"));let g,p,m,b=await WidgetAnnotation._getFontData(e,t,this.data.defaultAppearanceData,this._fieldResources.mergedResources);const\
 y=[];let w=!1;for(const e of h){const t=b.encodeString(e);t.length>1&&(w=!0);y.push(t.join(""))}if(w&&a&c)return{needAppearances:!0};if(w&&this._isOffscreenCanvasSupported){const a=this.data.comb?"monospace":"sans-serif",r=new FakeUnicodeFont(e.xref,a),i=r.createFontResources(h.join("")),n=i.getRaw("Font");if(this._fieldResources.mergedResources.has("Font")){const e=this._fieldResources.mergedResources.get("Font");for(const t of n.getKeys())e.set(t,n.getRaw(t))}else this._fieldResources.mergedR\
esources.set("Font",n);const o=r.fontName.name;b=await WidgetAnnotation._getFontData(e,t,{fontName:o,fontSize:0},i);for(let e=0,t=y.length;e<t;e++)y[e]=stringToUTF16String(h[e]);const c=Object.assign(Object.create(null),this.data.defaultAppearanceData);this.data.defaultAppearanceData.fontSize=0;this.data.defaultAppearanceData.fontName=o;[g,p,m]=this._computeFontSize(f-2,d-4,s,b,u);this.data.defaultAppearanceData=c}else{this._isOffscreenCanvasSupported||warn("_getAppearance: OffscreenCanvas is no\
t supported, annotation may not render correctly.");[g,p,m]=this._computeFontSize(f-2,d-4,s,b,u)}let x=b.descent;x=isNaN(x)?i*m:Math.max(i*m,Math.abs(x)*p);const S=Math.min(Math.floor((f-p)/2),1),k=this.data.textAlignment;if(this.data.multiLine)return this._getMultilineAppearance(g,y,b,p,d,f,k,2,S,x,m,r);if(this.data.comb)return this._getCombAppearance(g,b,y[0],p,d,f,2,S,x,m,r);const C=S+x;if(0===k||k>2)return`/Tx BMC q ${l}BT `+g+` 1 0 0 1 ${numberToString(2)} ${numberToString(C)} Tm (${escapeS\
tring(y[0])}) Tj ET Q EMC`;return`/Tx BMC q ${l}BT `+g+` 1 0 0 1 0 0 Tm ${this._renderText(y[0],b,p,d,k,{shift:0},2,C)} ET Q EMC`}static async _getFontData(e,t,a,r){const i=new OperatorList,n={font:null,clone(){return this}},{fontName:s,fontSize:o}=a;await e.handleSetFont(r,[s&&Name.get(s),o],null,i,t,n,null);return n.font}_getTextWidth(e,t){return Math.sumPrecise(t.charsToGlyphs(e).map((e=>e.width)))/1e3}_computeFontSize(e,t,r,i,n){let{fontSize:s}=this.data.defaultAppearanceData,o=(s||12)*a,c=M\
ath.round(e/o);if(!s){const roundWithTwoDigits=e=>Math.floor(100*e)/100;if(-1===n){const n=this._getTextWidth(r,i);s=roundWithTwoDigits(Math.min(e/a,t/n));c=1}else{const l=r.split(/\\r\\n?|\\n/),h=[];for(const e of l){const t=i.encodeString(e).join(""),a=i.charsToGlyphs(t),r=i.getCharPositions(t);h.push({line:t,glyphs:a,positions:r})}const isTooBig=a=>{let r=0;for(const n of h){r+=this._splitLine(null,i,a,t,n).length*a;if(r>e)return!0}return!1};c=Math.max(c,n);for(;;){o=e/c;s=roundWithTwoDigits(o/a\
);if(!isTooBig(s))break;c++}}const{fontName:l,fontColor:h}=this.data.defaultAppearanceData;this._defaultAppearance=function createDefaultAppearance({fontSize:e,fontName:t,fontColor:a}){return`/${escapePDFName(t)} ${e} Tf ${getPdfColor(a,!0)}`}({fontSize:s,fontName:l,fontColor:h})}return[this._defaultAppearance,s,e/c]}_renderText(e,t,a,r,i,n,s,o){let c;if(1===i){c=(r-this._getTextWidth(e,t)*a)/2}else if(2===i){c=r-this._getTextWidth(e,t)*a-s}else c=s;const l=numberToString(c-n.shift);n.shift=c;re\
turn`${l} ${o=numberToString(o)} Td (${escapeString(e)}) Tj`}_getSaveFieldResources(e){const{localResources:t,appearanceResources:a,acroFormResources:r}=this._fieldResources,i=this.data.defaultAppearanceData?.fontName;if(!i)return t||Dict.empty;for(const e of[t,a])if(e instanceof Dict){const t=e.get("Font");if(t instanceof Dict&&t.has(i))return e}if(r instanceof Dict){const a=r.get("Font");if(a instanceof Dict&&a.has(i)){const r=new Dict(e);r.set(i,a.getRaw(i));const n=new Dict(e);n.set("Font",r\
);return Dict.merge({xref:e,dictArray:[n,t],mergeSubDicts:!0})}}return t||Dict.empty}getFieldObject(){return null}}class TextWidgetAnnotation extends WidgetAnnotation{constructor(e){super(e);const{dict:t}=e;if(t.has("PMD")){this.flags|=J;this.data.hidden=!0;warn("Barcodes are not supported")}this.data.hasOwnCanvas=this.data.readOnly&&!this.data.noHTML;this._hasText=!0;"string"!=typeof this.data.fieldValue&&(this.data.fieldValue="");let a=getInheritableProperty({dict:t,key:"Q"});(!Number.isIntege\
r(a)||a<0||a>2)&&(a=null);this.data.textAlignment=a;let r=getInheritableProperty({dict:t,key:"MaxLen"});(!Number.isInteger(r)||r<0)&&(r=0);this.data.maxLen=r;this.data.multiLine=this.hasFieldFlag(ie);this.data.comb=this.hasFieldFlag(de)&&!this.data.multiLine&&!this.data.password&&!this.hasFieldFlag(le)&&0!==this.data.maxLen;this.data.doNotScroll=this.hasFieldFlag(ue);const{data:{actions:i}}=this;if(!i)return;const n=/^AF(Date|Time)_(?:Keystroke|Format)(?:Ex)?\\([\'"]?([^\'"]+)[\'"]?\\);$/;let s=!1;(1\
===i.Format?.length&&1===i.Keystroke?.length&&n.test(i.Format[0])&&n.test(i.Keystroke[0])||0===i.Format?.length&&1===i.Keystroke?.length&&n.test(i.Keystroke[0])||0===i.Keystroke?.length&&1===i.Format?.length&&n.test(i.Format[0]))&&(s=!0);const o=[];i.Format&&o.push(...i.Format);i.Keystroke&&o.push(...i.Keystroke);if(s){delete i.Keystroke;i.Format=o}for(const e of o){const t=e.match(n);if(!t)continue;const a="Date"===t[1];let r=t[2];const i=parseInt(r,10);isNaN(i)||Math.floor(Math.log10(i))+1!==t\
[2].length||(r=(a?Pn:Ln)[i]??r);this.data.datetimeFormat=r;if(!s)break;if(a){if(/HH|MM|ss|h/.test(r)){this.data.datetimeType="datetime-local";this.data.timeStep=/ss/.test(r)?1:60}else this.data.datetimeType="date";break}this.data.datetimeType="time";this.data.timeStep=/ss/.test(r)?1:60;break}}get hasTextContent(){return!!this.appearance&&!this._needAppearances}_getCombAppearance(e,t,a,r,i,n,s,o,c,l,h){const u=i/this.data.maxLen,d=this.getBorderAndBackgroundAppearances(h),f=[],g=t.getCharPosition\
s(a);for(const[e,t]of g)f.push(`(${escapeString(a.substring(e,t))}) Tj`);const p=f.join(` ${numberToString(u)} 0 Td `);return`/Tx BMC q ${d}BT `+e+` 1 0 0 1 ${numberToString(s)} ${numberToString(o+c)} Tm ${p} ET Q EMC`}_getMultilineAppearance(e,t,a,r,i,n,s,o,c,l,h,u){const d=[],f=i-2*o,g={shift:0};for(let e=0,n=t.length;e<n;e++){const n=t[e],u=this._splitLine(n,a,r,f);for(let t=0,n=u.length;t<n;t++){const n=u[t],f=0===e&&0===t?-c-(h-l):-h;d.push(this._renderText(n,a,r,i,s,g,o,f))}}const p=this.g\
etBorderAndBackgroundAppearances(u),m=d.join("\\n");return`/Tx BMC q ${p}BT `+e+` 1 0 0 1 0 ${numberToString(n)} Tm ${m} ET Q EMC`}_splitLine(e,t,a,r,i={}){e=i.line||e;const n=i.glyphs||t.charsToGlyphs(e);if(n.length<=1)return[e];const s=i.positions||t.getCharPositions(e),o=a/1e3,c=[];let l=-1,h=-1,u=-1,d=0,f=0;for(let t=0,a=n.length;t<a;t++){const[a,i]=s[t],g=n[t],p=g.width*o;if(" "===g.unicode)if(f+p>r){c.push(e.substring(d,a));d=a;f=p;l=-1;u=-1}else{f+=p;l=a;h=i;u=t}else if(f+p>r)if(-1!==l){c.\
push(e.substring(d,h));d=h;t=u+1;l=-1;f=0}else{c.push(e.substring(d,a));d=a;f=p}else f+=p}d<e.length&&c.push(e.substring(d,e.length));return c}async extractTextContent(e,t,a){await super.extractTextContent(e,t,a);const r=this.data.textContent;if(!r)return;const i=r.join("\\n");if(i===this.data.fieldValue)return;const n=i.replaceAll(/([.*+?^${}()|[\\]\\\\])|(\\s+)/g,((e,t)=>t?`\\\\${t}`:"\\\\s+"));new RegExp(`^\\\\s*${n}\\\\s*$`).test(this.data.fieldValue)&&(this.data.textContent=this.data.fieldValue.split("\\\
n"))}getFieldObject(){return{id:this.data.id,value:this.data.fieldValue,defaultValue:this.data.defaultFieldValue||"",multiline:this.data.multiLine,password:this.data.password,charLimit:this.data.maxLen,comb:this.data.comb,editable:!this.data.readOnly,hidden:this.data.hidden,name:this.data.fieldName,rect:this.data.rect,actions:this.data.actions,page:this.data.pageIndex,strokeColor:this.data.borderColor,fillColor:this.data.backgroundColor,rotation:this.rotation,datetimeFormat:this.data.datetimeFor\
mat,hasDatetimeHTML:!!this.data.datetimeType,type:"text"}}}class ButtonWidgetAnnotation extends WidgetAnnotation{constructor(e){super(e);this.checkedAppearance=null;this.uncheckedAppearance=null;const t=this.hasFieldFlag(se),a=this.hasFieldFlag(oe);this.data.checkBox=!t&&!a;this.data.radioButton=t&&!a;this.data.pushButton=a;this.data.isTooltipOnly=!1;if(this.data.checkBox)this._processCheckBox(e);else if(this.data.radioButton)this._processRadioButton(e);else if(this.data.pushButton){this.data.ha\
sOwnCanvas=!0;this.data.noHTML=!1;this._processPushButton(e)}else warn("Invalid field flags for button widget annotation")}async getOperatorList(e,t,a,r){if(this.data.pushButton)return super.getOperatorList(e,t,a,!1,r);let i=null,n=null;if(r){const e=r.get(this.data.id);i=e?e.value:null;n=e?e.rotation:null}if(null===i&&this.appearance)return super.getOperatorList(e,t,a,r);null==i&&(i=this.data.checkBox?this.data.fieldValue===this.data.exportValue:this.data.fieldValue===this.data.buttonValue);con\
st s=i?this.checkedAppearance:this.uncheckedAppearance;if(s){const i=this.appearance,o=lookupMatrix(s.dict.getArray("Matrix"),Fa);n&&s.dict.set("Matrix",this.getRotationMatrix(r));this.appearance=s;const c=super.getOperatorList(e,t,a,r);this.appearance=i;s.dict.set("Matrix",o);return c}return{opList:new OperatorList,separateForm:!1,separateCanvas:!1}}async save(e,t,a,r){this.data.checkBox?this._saveCheckbox(e,t,a,r):this.data.radioButton&&this._saveRadioButton(e,t,a,r)}async _saveCheckbox(e,t,a,\
r){if(!a)return;const i=a.get(this.data.id),n=this._buildFlags(i?.noView,i?.noPrint);let s=i?.rotation,o=i?.value;if(void 0===s&&void 0===n){if(void 0===o)return;if(this.data.fieldValue===this.data.exportValue===o)return}let c=e.xref.fetchIfRef(this.ref);if(!(c instanceof Dict))return;c=c.clone();void 0===s&&(s=this.rotation);void 0===o&&(o=this.data.fieldValue===this.data.exportValue);const l={path:this.data.fieldName,value:o?this.data.exportValue:""},h=Name.get(o?this.data.exportValue:"Off");t\
his.setValue(c,h,e.xref,r);c.set("AS",h);c.set("M",`D:${getModificationDate()}`);void 0!==n&&c.set("F",n);const u=this._getMKDict(s);u&&c.set("MK",u);r.put(this.ref,{data:c,xfa:l,needAppearances:!1})}async _saveRadioButton(e,t,a,r){if(!a)return;const i=a.get(this.data.id),n=this._buildFlags(i?.noView,i?.noPrint);let s=i?.rotation,o=i?.value;if(void 0===s&&void 0===n){if(void 0===o)return;if(this.data.fieldValue===this.data.buttonValue===o)return}let c=e.xref.fetchIfRef(this.ref);if(!(c instanceo\
f Dict))return;c=c.clone();void 0===o&&(o=this.data.fieldValue===this.data.buttonValue);void 0===s&&(s=this.rotation);const l={path:this.data.fieldName,value:o?this.data.buttonValue:""},h=Name.get(o?this.data.buttonValue:"Off");o&&this.setValue(c,h,e.xref,r);c.set("AS",h);c.set("M",`D:${getModificationDate()}`);void 0!==n&&c.set("F",n);const u=this._getMKDict(s);u&&c.set("MK",u);r.put(this.ref,{data:c,xfa:l,needAppearances:!1})}_getDefaultCheckedAppearance(e,t){const{width:a,height:r}=this,i=[0,\
0,a,r],n=.8*Math.min(a,r);let s,o;if("check"===t){s={width:.755*n,height:.705*n};o="3"}else if("disc"===t){s={width:.791*n,height:.705*n};o="l"}else unreachable(`_getDefaultCheckedAppearance - unsupported type: ${t}`);const c=`q BT /PdfJsZaDb ${n} Tf 0 g ${numberToString((a-s.width)/2)} ${numberToString((r-s.height)/2)} Td (${o}) Tj ET Q`,l=new Dict(e.xref);l.set("FormType",1);l.setIfName("Subtype","Form");l.setIfName("Type","XObject");l.set("BBox",i);l.set("Matrix",[1,0,0,1,0,0]);l.set("Length"\
,c.length);const h=new Dict(e.xref),u=new Dict(e.xref);u.set("PdfJsZaDb",this.fallbackFontDict);h.set("Font",u);l.set("Resources",h);this.checkedAppearance=new StringStream(c);this.checkedAppearance.dict=l;this._streams.push(this.checkedAppearance)}_processCheckBox(e){const t=e.dict.get("AP");if(!(t instanceof Dict))return;const a=t.get("N");if(!(a instanceof Dict))return;const r=this._decodeFormValue(e.dict.get("AS"));"string"==typeof r&&(this.data.fieldValue=r);const i=null!==this.data.fieldVa\
lue&&"Off"!==this.data.fieldValue?this.data.fieldValue:"Yes",n=this._decodeFormValue(a.getKeys());if(0===n.length)n.push("Off",i);else if(1===n.length)"Off"===n[0]?n.push(i):n.unshift("Off");else if(n.includes(i)){n.length=0;n.push("Off",i)}else{const e=n.find((e=>"Off"!==e));n.length=0;n.push("Off",e)}n.includes(this.data.fieldValue)||(this.data.fieldValue="Off");this.data.exportValue=n[1];const s=a.get(this.data.exportValue);this.checkedAppearance=s instanceof BaseStream?s:null;const o=a.get("\
Off");this.uncheckedAppearance=o instanceof BaseStream?o:null;this.checkedAppearance?this._streams.push(this.checkedAppearance):this._getDefaultCheckedAppearance(e,"check");this.uncheckedAppearance&&this._streams.push(this.uncheckedAppearance);this._fallbackFontDict=this.fallbackFontDict;null===this.data.defaultFieldValue&&(this.data.defaultFieldValue="Off")}_processRadioButton(e){this.data.buttonValue=null;const t=e.dict.get("Parent");if(t instanceof Dict){this.parent=e.dict.getRaw("Parent");co\
nst a=t.get("V");a instanceof Name&&(this.data.fieldValue=this._decodeFormValue(a))}const a=e.dict.get("AP");if(!(a instanceof Dict))return;const r=a.get("N");if(!(r instanceof Dict))return;for(const e of r.getKeys())if("Off"!==e){this.data.buttonValue=this._decodeFormValue(e);break}const i=r.get(this.data.buttonValue);this.checkedAppearance=i instanceof BaseStream?i:null;const n=r.get("Off");this.uncheckedAppearance=n instanceof BaseStream?n:null;this.checkedAppearance?this._streams.push(this.c\
heckedAppearance):this._getDefaultCheckedAppearance(e,"disc");this.uncheckedAppearance&&this._streams.push(this.uncheckedAppearance);this._fallbackFontDict=this.fallbackFontDict;null===this.data.defaultFieldValue&&(this.data.defaultFieldValue="Off")}_processPushButton(e){const{dict:t,annotationGlobals:a}=e;if(t.has("A")||t.has("AA")||this.data.alternativeText){this.data.isTooltipOnly=!t.has("A")&&!t.has("AA");Catalog.parseDestDictionary({destDict:t,resultObj:this.data,docBaseUrl:a.baseUrl,docAtt\
achments:a.attachments})}else warn("Push buttons without action dictionaries are not supported")}getFieldObject(){let e,t="button";if(this.data.checkBox){t="checkbox";e=this.data.exportValue}else if(this.data.radioButton){t="radiobutton";e=this.data.buttonValue}return{id:this.data.id,value:this.data.fieldValue||"Off",defaultValue:this.data.defaultFieldValue,exportValues:e,editable:!this.data.readOnly,name:this.data.fieldName,rect:this.data.rect,hidden:this.data.hidden,actions:this.data.actions,p\
age:this.data.pageIndex,strokeColor:this.data.borderColor,fillColor:this.data.backgroundColor,rotation:this.rotation,type:t}}get fallbackFontDict(){const e=new Dict;e.setIfName("BaseFont","ZapfDingbats");e.setIfName("Type","FallbackType");e.setIfName("Subtype","FallbackType");e.setIfName("Encoding","ZapfDingbatsEncoding");return shadow(this,"fallbackFontDict",e)}}class ChoiceWidgetAnnotation extends WidgetAnnotation{constructor(e){super(e);const{dict:t,xref:a}=e;this.indices=t.getArray("I");this\
.hasIndices=Array.isArray(this.indices)&&this.indices.length>0;this.data.options=[];const r=getInheritableProperty({dict:t,key:"Opt"});if(Array.isArray(r))for(let e=0,t=r.length;e<t;e++){const t=a.fetchIfRef(r[e]),i=Array.isArray(t);this.data.options[e]={exportValue:this._decodeFormValue(i?a.fetchIfRef(t[0]):t),displayValue:this._decodeFormValue(i?a.fetchIfRef(t[1]):t)}}if(this.hasIndices){this.data.fieldValue=[];const e=this.data.options.length;for(const t of this.indices)Number.isInteger(t)&&t\
>=0&&t<e&&this.data.fieldValue.push(this.data.options[t].exportValue)}else"string"==typeof this.data.fieldValue?this.data.fieldValue=[this.data.fieldValue]:this.data.fieldValue||=[];0===this.data.options.length&&this.data.fieldValue.length>0&&(this.data.options=this.data.fieldValue.map((e=>({exportValue:e,displayValue:e}))));this.data.combo=this.hasFieldFlag(ce);this.data.multiSelect=this.hasFieldFlag(he);this._hasText=!0}getFieldObject(){const e=this.data.combo?"combobox":"listbox",t=this.data.\
fieldValue.length>0?this.data.fieldValue[0]:null;return{id:this.data.id,value:t,defaultValue:this.data.defaultFieldValue,editable:!this.data.readOnly,name:this.data.fieldName,rect:this.data.rect,numItems:this.data.fieldValue.length,multipleSelection:this.data.multiSelect,hidden:this.data.hidden,actions:this.data.actions,items:this.data.options,page:this.data.pageIndex,strokeColor:this.data.borderColor,fillColor:this.data.backgroundColor,rotation:this.rotation,type:e}}amendSavedDict(e,t){if(!this\
.hasIndices)return;let a=e?.get(this.data.id)?.value;Array.isArray(a)||(a=[a]);const r=[],{options:i}=this.data;for(let e=0,t=0,n=i.length;e<n;e++)if(i[e].exportValue===a[t]){r.push(e);t+=1}t.set("I",r)}async _getAppearance(e,t,r,i){if(this.data.combo)return super._getAppearance(e,t,r,i);let n,s;const o=i?.get(this.data.id);if(o){s=o.rotation;n=o.value}if(void 0===s&&void 0===n&&!this._needAppearances)return null;void 0===n?n=this.data.fieldValue:Array.isArray(n)||(n=[n]);let{width:c,height:l}=t\
his;90!==s&&270!==s||([c,l]=[l,c]);const h=this.data.options.length,u=[];for(let e=0;e<h;e++){const{exportValue:t}=this.data.options[e];n.includes(t)&&u.push(e)}this._defaultAppearance||(this.data.defaultAppearanceData=parseDefaultAppearance(this._defaultAppearance="/Helvetica 0 Tf 0 g"));const d=await WidgetAnnotation._getFontData(e,t,this.data.defaultAppearanceData,this._fieldResources.mergedResources);let f,{fontSize:g}=this.data.defaultAppearanceData;if(g)f=this._defaultAppearance;else{const\
 e=(l-1)/h;let t,a=-1;for(const{displayValue:e}of this.data.options){const r=this._getTextWidth(e,d);if(r>a){a=r;t=e}}[f,g]=this._computeFontSize(e,c-4,t,d,-1)}const p=g*a,m=(p-g)/2,b=Math.floor(l/p);let y=0;if(u.length>0){const e=Math.min(...u),t=Math.max(...u);y=Math.max(0,t-b+1);y>e&&(y=e)}const w=Math.min(y+b+1,h),x=["/Tx BMC q",`1 1 ${c} ${l} re W n`];if(u.length){x.push("0.600006 0.756866 0.854904 rg");for(const e of u)y<=e&&e<w&&x.push(`1 ${l-(e-y+1)*p} ${c} ${p} re f`)}x.push("BT",f,`1 0\
 0 1 0 ${l} Tm`);const S={shift:0};for(let e=y;e<w;e++){const{displayValue:t}=this.data.options[e],a=e===y?m:0;x.push(this._renderText(t,d,g,c,0,S,2,-p+a))}x.push("ET Q EMC");return x.join("\\n")}}class SignatureWidgetAnnotation extends WidgetAnnotation{constructor(e){super(e);this.data.fieldValue=null;this.data.hasOwnCanvas=this.data.noRotate;this.data.noHTML=!this.data.hasOwnCanvas}getFieldObject(){return{id:this.data.id,value:null,page:this.data.pageIndex,type:"signature"}}}class TextAnnotatio\
n extends MarkupAnnotation{constructor(e){super(e);this.data.noRotate=!0;this.data.hasOwnCanvas=this.data.noRotate;this.data.noHTML=!1;const{dict:t}=e;this.data.annotationType=F;if(this.data.hasAppearance)this.data.name="NoIcon";else{this.data.rect[1]=this.data.rect[3]-22;this.data.rect[2]=this.data.rect[0]+22;this.data.name=t.has("Name")?t.get("Name").name:"Note"}if(t.has("State")){this.data.state=t.get("State")||null;this.data.stateModel=t.get("StateModel")||null}else{this.data.state=null;this\
.data.stateModel=null}}}class LinkAnnotation extends Annotation{constructor(e){super(e);const{dict:t,annotationGlobals:a}=e;this.data.annotationType=T;this.data.noHTML=!1;const r=getQuadPoints(t,this.rectangle);r&&(this.data.quadPoints=r);this.data.borderColor||=this.data.color;Catalog.parseDestDictionary({destDict:t,resultObj:this.data,docBaseUrl:a.baseUrl,docAttachments:a.attachments})}get overlaysTextContent(){return!0}}class PopupAnnotation extends Annotation{constructor(e){super(e);const{di\
ct:t}=e;this.data.annotationType=W;this.data.noHTML=!1;0!==this.width&&0!==this.height||(this.data.rect=null);let a=t.get("Parent");if(!a){warn("Popup annotation has a missing or invalid parent annotation.");return}this.data.parentRect=lookupNormalRect(a.getArray("Rect"),null);this.data.creationDate=a.get("CreationDate")||"";isName(a.get("RT"),G)&&(a=a.get("IRT"));if(a.has("M")){this.setModificationDate(a.get("M"));this.data.modificationDate=this.modificationDate}else this.data.modificationDate=\
null;if(a.has("C")){this.setColor(a.getArray("C"));this.data.color=this.color}else this.data.color=null;if(!this.viewable){const e=a.get("F");this._isViewable(e)&&this.setFlags(e)}this.setTitle(a.get("T"));this.data.titleObj=this._title;this.setContents(a.get("Contents"));this.data.contentsObj=this._contents;a.has("RC")&&(this.data.richText=XFAFactory.getRichTextAsHtml(a.get("RC")));this.data.open=!!t.get("Open")}static createNewDict(e,t,a){const{oldAnnotation:r,rect:i,parent:n}=e,s=r||new Dict(\
t);s.setIfNotExists("Type",Name.get("Annot"));s.setIfNotExists("Subtype",Name.get("Popup"));s.setIfNotExists("Open",!1);s.setIfArray("Rect",i);s.set("Parent",n);return s}static async createNewAppearanceStream(e,t,a){return null}}class FreeTextAnnotation extends MarkupAnnotation{constructor(e){super(e);this.data.hasOwnCanvas=this.data.noRotate;this.data.isEditable=!this.data.noHTML;this.data.noHTML=!1;const{annotationGlobals:t,evaluatorOptions:a,xref:r}=e;this.data.annotationType=O;this.setDefaul\
tAppearance(e);this._hasAppearance=!!this.appearance;if(this._hasAppearance){const{fontColor:e,fontSize:i}=function parseAppearanceStream(e,t,a,r){return new AppearanceStreamEvaluator(e,t,a,r).parse()}(this.appearance,a,r,t.globalColorSpaceCache);this.data.defaultAppearanceData.fontColor=e;this.data.defaultAppearanceData.fontSize=i||10}else{this.data.defaultAppearanceData.fontSize||=10;const{fontColor:t,fontSize:a}=this.data.defaultAppearanceData;if(this._contents.str){this.data.textContent=this\
._contents.str.split(/\\r\\n?|\\n/).map((e=>e.trimEnd()));const{coords:e,bbox:t,matrix:r}=FakeUnicodeFont.getFirstPositionInfo(this.rectangle,this.rotation,a);this.data.textPosition=this._transformPoint(e,t,r)}if(this._isOffscreenCanvasSupported){const i=e.dict.get("CA"),n=new FakeUnicodeFont(r,"sans-serif");this.appearance=n.createAppearance(this._contents.str,this.rectangle,this.rotation,a,t,i);this._streams.push(this.appearance)}else warn("FreeTextAnnotation: OffscreenCanvas is not supported, an\
notation may not render correctly.")}}get hasTextContent(){return this._hasAppearance}static createNewDict(e,t,{apRef:a,ap:r}){const{color:i,date:n,fontSize:s,oldAnnotation:o,rect:c,rotation:l,user:h,value:u}=e,d=o||new Dict(t);d.setIfNotExists("Type",Name.get("Annot"));d.setIfNotExists("Subtype",Name.get("FreeText"));d.set(o?"M":"CreationDate",`D:${getModificationDate(n)}`);o&&d.delete("RC");d.setIfArray("Rect",c);const f=`/Helv ${s} Tf ${getPdfColor(i,!0)}`;d.set("DA",f);d.setIfDefined("Conten\
ts",stringToAsciiOrUTF16BE(u));d.setIfNotExists("F",4);d.setIfNotExists("Border",[0,0,0]);d.setIfNumber("Rotate",l);d.setIfDefined("T",stringToAsciiOrUTF16BE(h));if(a||r){const e=new Dict(t);d.set("AP",e);e.set("N",a||r)}return d}static async createNewAppearanceStream(e,t,r){const{baseFontRef:i,evaluator:n,task:s}=r,{color:o,fontSize:c,rect:l,rotation:h,value:u}=e;if(!o)return null;const d=new Dict(t),f=new Dict(t);if(i)f.set("Helv",i);else{const e=new Dict(t);e.setIfName("BaseFont","Helvetica")\
;e.setIfName("Type","Font");e.setIfName("Subtype","Type1");e.setIfName("Encoding","WinAnsiEncoding");f.set("Helv",e)}d.set("Font",f);const g=await WidgetAnnotation._getFontData(n,s,{fontName:"Helv",fontSize:c},d),[p,m,b,y]=l;let w=b-p,x=y-m;h%180!=0&&([w,x]=[x,w]);const S=u.split("\\n"),k=c/1e3;let C=-1/0;const v=[];for(let e of S){const t=g.encodeString(e);if(t.length>1)return null;e=t.join("");v.push(e);let a=0;const r=g.charsToGlyphs(e);for(const e of r)a+=e.width*k;C=Math.max(C,a)}let F=1;C>w\
&&(F=w/C);let T=1;const O=a*c,M=1*c,D=O*S.length;D>x&&(T=x/D);const R=c*Math.min(F,T);let N,E,L;switch(h){case 0:L=[1,0,0,1];E=[l[0],l[1],w,x];N=[l[0],l[3]-M];break;case 90:L=[0,1,-1,0];E=[l[1],-l[2],w,x];N=[l[1],-l[0]-M];break;case 180:L=[-1,0,0,-1];E=[-l[2],-l[3],w,x];N=[-l[2],-l[1]-M];break;case 270:L=[0,-1,1,0];E=[-l[3],l[0],w,x];N=[-l[3],l[2]-M]}const j=["q",`${L.join(" ")} 0 0 cm`,`${E.join(" ")} re W n`,"BT",`${getPdfColor(o,!0)}`,`0 Tc /Helv ${numberToString(R)} Tf`];j.push(`${N.join(" "\
)} Td (${escapeString(v[0])}) Tj`);const _=numberToString(O);for(let e=1,t=v.length;e<t;e++){const t=v[e];j.push(`0 -${_} Td (${escapeString(t)}) Tj`)}j.push("ET","Q");const U=j.join("\\n"),X=new Dict(t);X.set("FormType",1);X.setIfName("Subtype","Form");X.setIfName("Type","XObject");X.set("BBox",l);X.set("Resources",d);X.set("Matrix",[1,0,0,1,-l[0],-l[1]]);const q=new StringStream(U);q.dict=X;return q}}class LineAnnotation extends MarkupAnnotation{constructor(e){super(e);const{dict:t,xref:a}=e;th\
is.data.annotationType=M;this.data.hasOwnCanvas=this.data.noRotate;this.data.noHTML=!1;const r=lookupRect(t.getArray("L"),[0,0,0,0]);this.data.lineCoordinates=Util.normalizeRect(r);this.setLineEndings(t.getArray("LE"));this.data.lineEndings=this.lineEndings;if(!this.appearance){const e=getPdfColorArray(this.color,[0,0,0]),i=t.get("CA"),n=getPdfColorArray(getRgbColor(t.getArray("IC"),null)),s=n?i:null,o=this.borderStyle.width||1,c=2*o,l=[this.data.lineCoordinates[0]-c,this.data.lineCoordinates[1]\
-c,this.data.lineCoordinates[2]+c,this.data.lineCoordinates[3]+c];Util.intersect(this.rectangle,l)||(this.rectangle=l);this._setDefaultAppearance({xref:a,extra:`${o} w`,strokeColor:e,fillColor:n,strokeAlpha:i,fillAlpha:s,pointsCallback:(e,t)=>{e.push(`${r[0]} ${r[1]} m`,`${r[2]} ${r[3]} l`,"S");return[t[0]-o,t[7]-o,t[2]+o,t[3]+o]}})}}}class SquareAnnotation extends MarkupAnnotation{constructor(e){super(e);const{dict:t,xref:a}=e;this.data.annotationType=D;this.data.hasOwnCanvas=this.data.noRotate\
;this.data.noHTML=!1;if(!this.appearance){const e=getPdfColorArray(this.color,[0,0,0]),r=t.get("CA"),i=getPdfColorArray(getRgbColor(t.getArray("IC"),null)),n=i?r:null;if(0===this.borderStyle.width&&!i)return;this._setDefaultAppearance({xref:a,extra:`${this.borderStyle.width} w`,strokeColor:e,fillColor:i,strokeAlpha:r,fillAlpha:n,pointsCallback:(e,t)=>{const a=t[4]+this.borderStyle.width/2,r=t[5]+this.borderStyle.width/2,n=t[6]-t[4]-this.borderStyle.width,s=t[3]-t[7]-this.borderStyle.width;e.push\
(`${a} ${r} ${n} ${s} re`);i?e.push("B"):e.push("S");return[t[0],t[7],t[2],t[3]]}})}}}class CircleAnnotation extends MarkupAnnotation{constructor(e){super(e);const{dict:t,xref:a}=e;this.data.annotationType=R;if(!this.appearance){const e=getPdfColorArray(this.color,[0,0,0]),r=t.get("CA"),i=getPdfColorArray(getRgbColor(t.getArray("IC"),null)),n=i?r:null;if(0===this.borderStyle.width&&!i)return;const s=4/3*Math.tan(Math.PI/8);this._setDefaultAppearance({xref:a,extra:`${this.borderStyle.width} w`,st\
rokeColor:e,fillColor:i,strokeAlpha:r,fillAlpha:n,pointsCallback:(e,t)=>{const a=t[0]+this.borderStyle.width/2,r=t[1]-this.borderStyle.width/2,n=t[6]-this.borderStyle.width/2,o=t[7]+this.borderStyle.width/2,c=a+(n-a)/2,l=r+(o-r)/2,h=(n-a)/2*s,u=(o-r)/2*s;e.push(`${c} ${o} m`,`${c+h} ${o} ${n} ${l+u} ${n} ${l} c`,`${n} ${l-u} ${c+h} ${r} ${c} ${r} c`,`${c-h} ${r} ${a} ${l-u} ${a} ${l} c`,`${a} ${l+u} ${c-h} ${o} ${c} ${o} c`,"h");i?e.push("B"):e.push("S");return[t[0],t[7],t[2],t[3]]}})}}}class Po\
lylineAnnotation extends MarkupAnnotation{constructor(e){super(e);const{dict:t,xref:a}=e;this.data.annotationType=E;this.data.hasOwnCanvas=this.data.noRotate;this.data.noHTML=!1;this.data.vertices=null;if(!(this instanceof PolygonAnnotation)){this.setLineEndings(t.getArray("LE"));this.data.lineEndings=this.lineEndings}const r=t.getArray("Vertices");if(!isNumberArray(r,null))return;const i=this.data.vertices=Float32Array.from(r);if(!this.appearance){const e=getPdfColorArray(this.color,[0,0,0]),r=\
t.get("CA");let n,s=getRgbColor(t.getArray("IC"),null);s&&(s=getPdfColorArray(s));n=s?this.color?s.every(((t,a)=>t===e[a]))?"f":"B":"f":"S";const o=this.borderStyle.width||1,c=2*o,l=[1/0,1/0,-1/0,-1/0];for(let e=0,t=i.length;e<t;e+=2)Util.rectBoundingBox(i[e]-c,i[e+1]-c,i[e]+c,i[e+1]+c,l);Util.intersect(this.rectangle,l)||(this.rectangle=l);this._setDefaultAppearance({xref:a,extra:`${o} w`,strokeColor:e,strokeAlpha:r,fillColor:s,fillAlpha:s?r:null,pointsCallback:(e,t)=>{for(let t=0,a=i.length;t<\
a;t+=2)e.push(`${i[t]} ${i[t+1]} ${0===t?"m":"l"}`);e.push(n);return[t[0],t[7],t[2],t[3]]}})}}}class PolygonAnnotation extends PolylineAnnotation{constructor(e){super(e);this.data.annotationType=N}}class CaretAnnotation extends MarkupAnnotation{constructor(e){super(e);this.data.annotationType=q}}class InkAnnotation extends MarkupAnnotation{constructor(e){super(e);this.data.hasOwnCanvas=this.data.noRotate;this.data.noHTML=!1;const{dict:t,xref:a}=e;this.data.annotationType=H;this.data.inkLists=[];\
this.data.isEditable=!this.data.noHTML;this.data.noHTML=!1;this.data.opacity=t.get("CA")||1;const r=t.getArray("InkList");if(Array.isArray(r)){for(let e=0,t=r.length;e<t;++e){if(!Array.isArray(r[e]))continue;const t=new Float32Array(r[e].length);this.data.inkLists.push(t);for(let i=0,n=r[e].length;i<n;i+=2){const n=a.fetchIfRef(r[e][i]),s=a.fetchIfRef(r[e][i+1]);if("number"==typeof n&&"number"==typeof s){t[i]=n;t[i+1]=s}}}if(!this.appearance){const e=getPdfColorArray(this.color,[0,0,0]),r=t.get(\
"CA"),i=this.borderStyle.width||1,n=2*i,s=[1/0,1/0,-1/0,-1/0];for(const e of this.data.inkLists)for(let t=0,a=e.length;t<a;t+=2)Util.rectBoundingBox(e[t]-n,e[t+1]-n,e[t]+n,e[t+1]+n,s);Util.intersect(this.rectangle,s)||(this.rectangle=s);this._setDefaultAppearance({xref:a,extra:`${i} w`,strokeColor:e,strokeAlpha:r,pointsCallback:(e,t)=>{for(const t of this.data.inkLists){for(let a=0,r=t.length;a<r;a+=2)e.push(`${t[a]} ${t[a+1]} ${0===a?"m":"l"}`);e.push("S")}return[t[0],t[7],t[2],t[3]]}})}}}stati\
c createNewDict(e,t,{apRef:a,ap:r}){const{oldAnnotation:i,color:n,date:s,opacity:o,paths:c,outlines:l,rect:h,rotation:u,thickness:d,user:f}=e,g=i||new Dict(t);g.setIfNotExists("Type",Name.get("Annot"));g.setIfNotExists("Subtype",Name.get("Ink"));g.set(i?"M":"CreationDate",`D:${getModificationDate(s)}`);g.setIfArray("Rect",h);g.setIfArray("InkList",l?.points||c?.points);g.setIfNotExists("F",4);g.setIfNumber("Rotate",u);g.setIfDefined("T",stringToAsciiOrUTF16BE(f));l&&g.setIfName("IT","InkHighligh\
t");if(d>0){const e=new Dict(t);g.set("BS",e);e.set("W",d)}g.setIfArray("C",getPdfColorArray(n));g.setIfNumber("CA",o);if(r||a){const e=new Dict(t);g.set("AP",e);e.set("N",a||r)}return g}static async createNewAppearanceStream(e,t,a){if(e.outlines)return this.createNewAppearanceStreamForHighlight(e,t,a);const{color:r,rect:i,paths:n,thickness:s,opacity:o}=e;if(!r)return null;const c=[`${s} w 1 J 1 j`,`${getPdfColor(r,!1)}`];1!==o&&c.push("/R0 gs");for(const e of n.lines){c.push(`${numberToString(e\
[4])} ${numberToString(e[5])} m`);for(let t=6,a=e.length;t<a;t+=6)if(isNaN(e[t]))c.push(`${numberToString(e[t+4])} ${numberToString(e[t+5])} l`);else{const[a,r,i,n,s,o]=e.slice(t,t+6);c.push([a,r,i,n,s,o].map(numberToString).join(" ")+" c")}6===e.length&&c.push(`${numberToString(e[4])} ${numberToString(e[5])} l`)}c.push("S");const l=c.join("\\n"),h=new Dict(t);h.set("FormType",1);h.setIfName("Subtype","Form");h.setIfName("Type","XObject");h.set("BBox",i);h.set("Length",l.length);if(1!==o){const e\
=new Dict(t),a=new Dict(t),r=new Dict(t);r.set("CA",o);r.setIfName("Type","ExtGState");a.set("R0",r);e.set("ExtGState",a);h.set("Resources",e)}const u=new StringStream(l);u.dict=h;return u}static async createNewAppearanceStreamForHighlight(e,t,a){const{color:r,rect:i,outlines:{outline:n},opacity:s}=e;if(!r)return null;const o=[`${getPdfColor(r,!0)}`,"/R0 gs"];o.push(`${numberToString(n[4])} ${numberToString(n[5])} m`);for(let e=6,t=n.length;e<t;e+=6)if(isNaN(n[e]))o.push(`${numberToString(n[e+4]\
)} ${numberToString(n[e+5])} l`);else{const[t,a,r,i,s,c]=n.slice(e,e+6);o.push([t,a,r,i,s,c].map(numberToString).join(" ")+" c")}o.push("h f");const c=o.join("\\n"),l=new Dict(t);l.set("FormType",1);l.setIfName("Subtype","Form");l.setIfName("Type","XObject");l.set("BBox",i);l.set("Length",c.length);const h=new Dict(t),u=new Dict(t);h.set("ExtGState",u);l.set("Resources",h);const d=new Dict(t);u.set("R0",d);d.setIfName("BM","Multiply");if(1!==s){d.set("ca",s);d.setIfName("Type","ExtGState")}const \
f=new StringStream(c);f.dict=l;return f}}class HighlightAnnotation extends MarkupAnnotation{constructor(e){super(e);const{dict:t,xref:a}=e;this.data.annotationType=L;this.data.isEditable=!this.data.noHTML;this.data.noHTML=!1;this.data.opacity=t.get("CA")||1;if(this.data.quadPoints=getQuadPoints(t,null)){const e=this.appearance?.dict.get("Resources");if(!this.appearance||!e?.has("ExtGState")){this.appearance&&warn("HighlightAnnotation - ignoring built-in appearance stream.");const e=getPdfColorAr\
ray(this.color,[1,1,0]),r=t.get("CA");this._setDefaultAppearance({xref:a,fillColor:e,blendMode:"Multiply",fillAlpha:r,pointsCallback:(e,t)=>{e.push(`${t[0]} ${t[1]} m`,`${t[2]} ${t[3]} l`,`${t[6]} ${t[7]} l`,`${t[4]} ${t[5]} l`,"f");return[t[0],t[7],t[2],t[3]]}})}}else this.data.popupRef=null}get overlaysTextContent(){return!0}static createNewDict(e,t,{apRef:a,ap:r}){const{color:i,date:n,oldAnnotation:s,opacity:o,rect:c,rotation:l,user:h,quadPoints:u}=e,d=s||new Dict(t);d.setIfNotExists("Type",N\
ame.get("Annot"));d.setIfNotExists("Subtype",Name.get("Highlight"));d.set(s?"M":"CreationDate",`D:${getModificationDate(n)}`);d.setIfArray("Rect",c);d.setIfNotExists("F",4);d.setIfNotExists("Border",[0,0,0]);d.setIfNumber("Rotate",l);d.setIfArray("QuadPoints",u);d.setIfArray("C",getPdfColorArray(i));d.setIfNumber("CA",o);d.setIfDefined("T",stringToAsciiOrUTF16BE(h));if(a||r){const e=new Dict(t);d.set("AP",e);e.set("N",a||r)}return d}static async createNewAppearanceStream(e,t,a){const{color:r,rec\
t:i,outlines:n,opacity:s}=e;if(!r)return null;const o=[`${getPdfColor(r,!0)}`,"/R0 gs"],c=[];for(const e of n){c.length=0;c.push(`${numberToString(e[0])} ${numberToString(e[1])} m`);for(let t=2,a=e.length;t<a;t+=2)c.push(`${numberToString(e[t])} ${numberToString(e[t+1])} l`);c.push("h");o.push(c.join("\\n"))}o.push("f*");const l=o.join("\\n"),h=new Dict(t);h.set("FormType",1);h.setIfName("Subtype","Form");h.setIfName("Type","XObject");h.set("BBox",i);h.set("Length",l.length);const u=new Dict(t),d=\
new Dict(t);u.set("ExtGState",d);h.set("Resources",u);const f=new Dict(t);d.set("R0",f);f.setIfName("BM","Multiply");if(1!==s){f.set("ca",s);f.setIfName("Type","ExtGState")}const g=new StringStream(l);g.dict=h;return g}}class UnderlineAnnotation extends MarkupAnnotation{constructor(e){super(e);const{dict:t,xref:a}=e;this.data.annotationType=j;if(this.data.quadPoints=getQuadPoints(t,null)){if(!this.appearance){const e=getPdfColorArray(this.color,[0,0,0]),r=t.get("CA");this._setDefaultAppearance({\
xref:a,extra:"[] 0 d 0.571 w",strokeColor:e,strokeAlpha:r,pointsCallback:(e,t)=>{e.push(`${t[4]} ${t[5]+1.3} m`,`${t[6]} ${t[7]+1.3} l`,"S");return[t[0],t[7],t[2],t[3]]}})}}else this.data.popupRef=null}get overlaysTextContent(){return!0}}class SquigglyAnnotation extends MarkupAnnotation{constructor(e){super(e);const{dict:t,xref:a}=e;this.data.annotationType=_;if(this.data.quadPoints=getQuadPoints(t,null)){if(!this.appearance){const e=getPdfColorArray(this.color,[0,0,0]),r=t.get("CA");this._setDe\
faultAppearance({xref:a,extra:"[] 0 d 1 w",strokeColor:e,strokeAlpha:r,pointsCallback:(e,t)=>{const a=(t[1]-t[5])/6;let r=a,i=t[4];const n=t[5],s=t[6];e.push(`${i} ${n+r} m`);do{i+=2;r=0===r?a:0;e.push(`${i} ${n+r} l`)}while(i<s);e.push("S");return[t[4],n-2*a,s,n+2*a]}})}}else this.data.popupRef=null}get overlaysTextContent(){return!0}}class StrikeOutAnnotation extends MarkupAnnotation{constructor(e){super(e);const{dict:t,xref:a}=e;this.data.annotationType=U;if(this.data.quadPoints=getQuadPoints\
(t,null)){if(!this.appearance){const e=getPdfColorArray(this.color,[0,0,0]),r=t.get("CA");this._setDefaultAppearance({xref:a,extra:"[] 0 d 1 w",strokeColor:e,strokeAlpha:r,pointsCallback:(e,t)=>{e.push((t[0]+t[4])/2+" "+(t[1]+t[5])/2+" m",(t[2]+t[6])/2+" "+(t[3]+t[7])/2+" l","S");return[t[0],t[7],t[2],t[3]]}})}}else this.data.popupRef=null}get overlaysTextContent(){return!0}}class StampAnnotation extends MarkupAnnotation{#pe=null;constructor(e){super(e);this.data.annotationType=X;this.data.hasOw\
nCanvas=this.data.noRotate;this.data.isEditable=!this.data.noHTML;this.data.noHTML=!1}mustBeViewedWhenEditing(e,t=null){if(e){if(!this.data.isEditable)return!0;this.#pe??=this.data.hasOwnCanvas;this.data.hasOwnCanvas=!0;return!0}if(null!==this.#pe){this.data.hasOwnCanvas=this.#pe;this.#pe=null}return!t?.has(this.data.id)}static async createImage(e,t){const{width:a,height:r}=e,i=new OffscreenCanvas(a,r),n=i.getContext("2d",{alpha:!0});n.drawImage(e,0,0);const s=n.getImageData(0,0,a,r).data,o=new \
Uint32Array(s.buffer),c=o.some(FeatureTest.isLittleEndian?e=>e>>>24!=255:e=>!!(255&~e));if(c){n.fillStyle="white";n.fillRect(0,0,a,r);n.drawImage(e,0,0)}const l=i.convertToBlob({type:"image/jpeg",quality:1}).then((e=>e.arrayBuffer())),h=Name.get("XObject"),u=Name.get("Image"),d=new Dict(t);d.set("Type",h);d.set("Subtype",u);d.set("BitsPerComponent",8);d.setIfName("ColorSpace","DeviceRGB");d.setIfName("Filter","DCTDecode");d.set("BBox",[0,0,a,r]);d.set("Width",a);d.set("Height",r);let f=null;if(c\
){const e=new Uint8Array(o.length);if(FeatureTest.isLittleEndian)for(let t=0,a=o.length;t<a;t++)e[t]=o[t]>>>24;else for(let t=0,a=o.length;t<a;t++)e[t]=255&o[t];const i=new Dict(t);i.set("Type",h);i.set("Subtype",u);i.set("BitsPerComponent",8);i.setIfName("ColorSpace","DeviceGray");i.set("Width",a);i.set("Height",r);f=new Stream(e,0,0,i)}return{imageStream:new Stream(await l,0,0,d),smaskStream:f,width:a,height:r}}static createNewDict(e,t,{apRef:a,ap:r}){const{date:i,oldAnnotation:n,rect:s,rotati\
on:o,user:c}=e,l=n||new Dict(t);l.setIfNotExists("Type",Name.get("Annot"));l.setIfNotExists("Subtype",Name.get("Stamp"));l.set(n?"M":"CreationDate",`D:${getModificationDate(i)}`);l.setIfArray("Rect",s);l.setIfNotExists("F",4);l.setIfNotExists("Border",[0,0,0]);l.setIfNumber("Rotate",o);l.setIfDefined("T",stringToAsciiOrUTF16BE(c));if(a||r){const e=new Dict(t);l.set("AP",e);e.set("N",a||r)}return l}static async#me(e,t){const{areContours:a,color:r,rect:i,lines:n,thickness:s}=e;if(!r)return null;co\
nst o=[`${s} w 1 J 1 j`,`${getPdfColor(r,a)}`];for(const e of n){o.push(`${numberToString(e[4])} ${numberToString(e[5])} m`);for(let t=6,a=e.length;t<a;t+=6)if(isNaN(e[t]))o.push(`${numberToString(e[t+4])} ${numberToString(e[t+5])} l`);else{const[a,r,i,n,s,c]=e.slice(t,t+6);o.push([a,r,i,n,s,c].map(numberToString).join(" ")+" c")}6===e.length&&o.push(`${numberToString(e[4])} ${numberToString(e[5])} l`)}o.push(a?"F":"S");const c=o.join("\\n"),l=new Dict(t);l.set("FormType",1);l.setIfName("Subtype"\
,"Form");l.setIfName("Type","XObject");l.set("BBox",i);l.set("Length",c.length);const h=new StringStream(c);h.dict=l;return h}static async createNewAppearanceStream(e,t,a){if(e.oldAnnotation)return null;if(e.isSignature)return this.#me(e,t);const{rotation:r}=e,{imageRef:i,width:n,height:s}=a.image,o=new Dict(t),c=new Dict(t);o.set("XObject",c);c.set("Im0",i);const l=`q ${n} 0 0 ${s} 0 0 cm /Im0 Do Q`,h=new Dict(t);h.set("FormType",1);h.setIfName("Subtype","Form");h.setIfName("Type","XObject");h.\
set("BBox",[0,0,n,s]);h.set("Resources",o);if(r){const e=getRotationMatrix(r,n,s);h.set("Matrix",e)}const u=new StringStream(l);u.dict=h;return u}}class FileAttachmentAnnotation extends MarkupAnnotation{constructor(e){super(e);const{dict:t,xref:a}=e,r=new FileSpec(t.get("FS"),a);this.data.annotationType=z;this.data.hasOwnCanvas=this.data.noRotate;this.data.noHTML=!1;this.data.file=r.serializable;const i=t.get("Name");this.data.name=i instanceof Name?stringToPDFString(i.name):"PushPin";const n=t.\
get("ca");this.data.fillAlpha="number"==typeof n&&n>=0&&n<=1?n:null}}const pc={get r(){return shadow(this,"r",new Uint8Array([7,12,17,22,7,12,17,22,7,12,17,22,7,12,17,22,5,9,14,20,5,9,14,20,5,9,14,20,5,9,14,20,4,11,16,23,4,11,16,23,4,11,16,23,4,11,16,23,6,10,15,21,6,10,15,21,6,10,15,21,6,10,15,21]))},get k(){return shadow(this,"k",new Int32Array([-680876936,-389564586,606105819,-1044525330,-176418897,1200080426,-1473231341,-45705983,1770035416,-1958414417,-42063,-1990404162,1804603682,-40341101,\
-1502002290,1236535329,-165796510,-1069501632,643717713,-373897302,-701558691,38016083,-660478335,-405537848,568446438,-1019803690,-187363961,1163531501,-1444681467,-51403784,1735328473,-1926607734,-378558,-2022574463,1839030562,-35309556,-1530992060,1272893353,-155497632,-1094730640,681279174,-358537222,-722521979,76029189,-640364487,-421815835,530742520,-995338651,-198630844,1126891415,-1416354905,-57434055,1700485571,-1894986606,-1051523,-2054922799,1873313359,-30611744,-1560198380,1309151649\
,-145523070,-1120210379,718787259,-343485551]))}};function calculateMD5(e,t,a){let r=1732584193,i=-271733879,n=-1732584194,s=271733878;const o=a+72&-64,c=new Uint8Array(o);let l,h;for(l=0;l<a;++l)c[l]=e[t++];c[l++]=128;const u=o-8;l<u&&(l=u);c[l++]=a<<3&255;c[l++]=a>>5&255;c[l++]=a>>13&255;c[l++]=a>>21&255;c[l++]=a>>>29&255;l+=3;const d=new Int32Array(16),{k:f,r:g}=pc;for(l=0;l<o;){for(h=0;h<16;++h,l+=4)d[h]=c[l]|c[l+1]<<8|c[l+2]<<16|c[l+3]<<24;let e,t,a=r,o=i,u=n,p=s;for(h=0;h<64;++h){if(h<16){\
e=o&u|~o&p;t=h}else if(h<32){e=p&o|~p&u;t=5*h+1&15}else if(h<48){e=o^u^p;t=3*h+5&15}else{e=u^(o|~p);t=7*h&15}const r=p,i=a+e+f[h]+d[t]|0,n=g[h];p=u;u=o;o=o+(i<<n|i>>>32-n)|0;a=r}r=r+a|0;i=i+o|0;n=n+u|0;s=s+p|0}return new Uint8Array([255&r,r>>8&255,r>>16&255,r>>>24&255,255&i,i>>8&255,i>>16&255,i>>>24&255,255&n,n>>8&255,n>>16&255,n>>>24&255,255&s,s>>8&255,s>>16&255,s>>>24&255])}function decodeString(e){try{return stringToUTF8String(e)}catch(t){warn(`UTF-8 decoding failed: "${t}".`);return e}}class\
 DatasetXMLParser extends SimpleXMLParser{constructor(e){super(e);this.node=null}onEndElement(e){const t=super.onEndElement(e);if(t&&"xfa:datasets"===e){this.node=t;throw new Error("Aborting DatasetXMLParser.")}}}class DatasetReader{constructor(e){if(e.datasets)this.node=new SimpleXMLParser({hasAttributes:!0}).parseFromString(e.datasets).documentElement;else{const t=new DatasetXMLParser({hasAttributes:!0});try{t.parseFromString(e["xdp:xdp"])}catch{}this.node=t.node}}getValue(e){if(!this.node||!e\
)return"";const t=this.node.searchNode(parseXFAPath(e),0);if(!t)return"";const a=t.firstChild;return"value"===a?.nodeName?t.children.map((e=>decodeString(e.textContent))):decodeString(t.textContent)}}class SingleIntersector{#be;#ye=1/0;#we=1/0;#xe=-1/0;#Se=-1/0;#Ae=null;#ke=[];#Ce=[];#ve=-1;#Fe=!1;constructor(e){this.#be=e;const t=e.data.quadPoints;if(t){for(let e=0,a=t.length;e<a;e+=8){this.#ye=Math.min(this.#ye,t[e]);this.#xe=Math.max(this.#xe,t[e+2]);this.#we=Math.min(this.#we,t[e+5]);this.#S\
e=Math.max(this.#Se,t[e+1])}t.length>8&&(this.#Ae=t)}else[this.#ye,this.#we,this.#xe,this.#Se]=e.data.rect}overlaps(e){return!(this.#ye>=e.#xe||this.#xe<=e.#ye||this.#we>=e.#Se||this.#Se<=e.#we)}#Ie(e,t){if(this.#ye>=e||this.#xe<=e||this.#we>=t||this.#Se<=t)return!1;const a=this.#Ae;if(!a)return!0;if(this.#ve>=0){const r=this.#ve;if(!(a[r]>=e||a[r+2]<=e||a[r+5]>=t||a[r+1]<=t))return!0;this.#ve=-1}for(let r=0,i=a.length;r<i;r+=8)if(!(a[r]>=e||a[r+2]<=e||a[r+5]>=t||a[r+1]<=t)){this.#ve=r;return!0}\
return!1}addGlyph(e,t,a){if(!this.#Ie(e,t)){this.disableExtraChars();return!1}if(this.#Ce.length>0){this.#ke.push(this.#Ce.join(""));this.#Ce.length=0}this.#ke.push(a);this.#Fe=!0;return!0}addExtraChar(e){this.#Fe&&this.#Ce.push(e)}disableExtraChars(){if(this.#Fe){this.#Fe=!1;this.#Ce.length=0}}setText(){this.#be.data.overlaidText=this.#ke.join("")}}class Intersector{#Te=new Map;constructor(e){for(const t of e){if(!t.data.quadPoints&&!t.data.rect)continue;const e=new SingleIntersector(t);for(con\
st[t,a]of this.#Te)t.overlaps(e)&&(a?a.add(e):this.#Te.set(t,new Set([e])));this.#Te.set(e,null)}}addGlyph(e,t,a,r){const i=e[4]+t/2,n=e[5]+a/2;let s;for(const[e,t]of this.#Te)s?s.has(e)?e.addGlyph(i,n,r):e.disableExtraChars():e.addGlyph(i,n,r)&&(s=t)}addExtraChar(e){for(const t of this.#Te.keys())t.addExtraChar(e)}setText(){for(const e of this.#Te.keys())e.setText()}}class Word64{constructor(e,t){this.high=0|e;this.low=0|t}and(e){this.high&=e.high;this.low&=e.low}xor(e){this.high^=e.high;this.l\
ow^=e.low}shiftRight(e){if(e>=32){this.low=this.high>>>e-32|0;this.high=0}else{this.low=this.low>>>e|this.high<<32-e;this.high=this.high>>>e|0}}rotateRight(e){let t,a;if(32&e){a=this.low;t=this.high}else{t=this.low;a=this.high}e&=31;this.low=t>>>e|a<<32-e;this.high=a>>>e|t<<32-e}not(){this.high=~this.high;this.low=~this.low}add(e){const t=(this.low>>>0)+(e.low>>>0);let a=(this.high>>>0)+(e.high>>>0);t>4294967295&&(a+=1);this.low=0|t;this.high=0|a}copyTo(e,t){e[t]=this.high>>>24&255;e[t+1]=this.h\
igh>>16&255;e[t+2]=this.high>>8&255;e[t+3]=255&this.high;e[t+4]=this.low>>>24&255;e[t+5]=this.low>>16&255;e[t+6]=this.low>>8&255;e[t+7]=255&this.low}assign(e){this.high=e.high;this.low=e.low}}const mc={get k(){return shadow(this,"k",[new Word64(1116352408,3609767458),new Word64(1899447441,602891725),new Word64(3049323471,3964484399),new Word64(3921009573,2173295548),new Word64(961987163,4081628472),new Word64(1508970993,3053834265),new Word64(2453635748,2937671579),new Word64(2870763221,36646095\
60),new Word64(3624381080,2734883394),new Word64(310598401,1164996542),new Word64(607225278,1323610764),new Word64(1426881987,3590304994),new Word64(1925078388,4068182383),new Word64(2162078206,991336113),new Word64(2614888103,633803317),new Word64(3248222580,3479774868),new Word64(3835390401,2666613458),new Word64(4022224774,944711139),new Word64(264347078,2341262773),new Word64(604807628,2007800933),new Word64(770255983,1495990901),new Word64(1249150122,1856431235),new Word64(1555081692,317521\
8132),new Word64(1996064986,2198950837),new Word64(2554220882,3999719339),new Word64(2821834349,766784016),new Word64(2952996808,2566594879),new Word64(3210313671,3203337956),new Word64(3336571891,1034457026),new Word64(3584528711,2466948901),new Word64(113926993,3758326383),new Word64(338241895,168717936),new Word64(666307205,1188179964),new Word64(773529912,1546045734),new Word64(1294757372,1522805485),new Word64(1396182291,2643833823),new Word64(1695183700,2343527390),new Word64(1986661051,10\
14477480),new Word64(2177026350,1206759142),new Word64(2456956037,344077627),new Word64(2730485921,1290863460),new Word64(2820302411,3158454273),new Word64(3259730800,3505952657),new Word64(3345764771,106217008),new Word64(3516065817,3606008344),new Word64(3600352804,1432725776),new Word64(4094571909,1467031594),new Word64(275423344,851169720),new Word64(430227734,3100823752),new Word64(506948616,1363258195),new Word64(659060556,3750685593),new Word64(883997877,3785050280),new Word64(958139571,3\
318307427),new Word64(1322822218,3812723403),new Word64(1537002063,2003034995),new Word64(1747873779,3602036899),new Word64(1955562222,1575990012),new Word64(2024104815,1125592928),new Word64(2227730452,2716904306),new Word64(2361852424,442776044),new Word64(2428436474,593698344),new Word64(2756734187,3733110249),new Word64(3204031479,2999351573),new Word64(3329325298,3815920427),new Word64(3391569614,3928383900),new Word64(3515267271,566280711),new Word64(3940187606,3454069534),new Word64(41186\
30271,4000239992),new Word64(116418474,1914138554),new Word64(174292421,2731055270),new Word64(289380356,3203993006),new Word64(460393269,320620315),new Word64(685471733,587496836),new Word64(852142971,1086792851),new Word64(1017036298,365543100),new Word64(1126000580,2618297676),new Word64(1288033470,3409855158),new Word64(1501505948,4234509866),new Word64(1607167915,987167468),new Word64(1816402316,1246189591)])}};function ch(e,t,a,r,i){e.assign(t);e.and(a);i.assign(t);i.not();i.and(r);e.xor(i\
)}function maj(e,t,a,r,i){e.assign(t);e.and(a);i.assign(t);i.and(r);e.xor(i);i.assign(a);i.and(r);e.xor(i)}function sigma(e,t,a){e.assign(t);e.rotateRight(28);a.assign(t);a.rotateRight(34);e.xor(a);a.assign(t);a.rotateRight(39);e.xor(a)}function sigmaPrime(e,t,a){e.assign(t);e.rotateRight(14);a.assign(t);a.rotateRight(18);e.xor(a);a.assign(t);a.rotateRight(41);e.xor(a)}function littleSigma(e,t,a){e.assign(t);e.rotateRight(1);a.assign(t);a.rotateRight(8);e.xor(a);a.assign(t);a.shiftRight(7);e.xor\
(a)}function littleSigmaPrime(e,t,a){e.assign(t);e.rotateRight(19);a.assign(t);a.rotateRight(61);e.xor(a);a.assign(t);a.shiftRight(6);e.xor(a)}function calculateSHA512(e,t,a,r=!1){let i,n,s,o,c,l,h,u;if(r){i=new Word64(3418070365,3238371032);n=new Word64(1654270250,914150663);s=new Word64(2438529370,812702999);o=new Word64(355462360,4144912697);c=new Word64(1731405415,4290775857);l=new Word64(2394180231,1750603025);h=new Word64(3675008525,1694076839);u=new Word64(1203062813,3204075428)}else{i=ne\
w Word64(1779033703,4089235720);n=new Word64(3144134277,2227873595);s=new Word64(1013904242,4271175723);o=new Word64(2773480762,1595750129);c=new Word64(1359893119,2917565137);l=new Word64(2600822924,725511199);h=new Word64(528734635,4215389547);u=new Word64(1541459225,327033209)}const d=128*Math.ceil((a+17)/128),f=new Uint8Array(d);let g,p;for(g=0;g<a;++g)f[g]=e[t++];f[g++]=128;const m=d-16;g<m&&(g=m);g+=11;f[g++]=a>>>29&255;f[g++]=a>>21&255;f[g++]=a>>13&255;f[g++]=a>>5&255;f[g++]=a<<3&255;cons\
t b=new Array(80);for(g=0;g<80;g++)b[g]=new Word64(0,0);const{k:y}=mc;let w=new Word64(0,0),x=new Word64(0,0),S=new Word64(0,0),k=new Word64(0,0),C=new Word64(0,0),v=new Word64(0,0),F=new Word64(0,0),T=new Word64(0,0);const O=new Word64(0,0),M=new Word64(0,0),D=new Word64(0,0),R=new Word64(0,0);let N,E;for(g=0;g<d;){for(p=0;p<16;++p){b[p].high=f[g]<<24|f[g+1]<<16|f[g+2]<<8|f[g+3];b[p].low=f[g+4]<<24|f[g+5]<<16|f[g+6]<<8|f[g+7];g+=8}for(p=16;p<80;++p){N=b[p];littleSigmaPrime(N,b[p-2],R);N.add(b[p\
-7]);littleSigma(D,b[p-15],R);N.add(D);N.add(b[p-16])}w.assign(i);x.assign(n);S.assign(s);k.assign(o);C.assign(c);v.assign(l);F.assign(h);T.assign(u);for(p=0;p<80;++p){O.assign(T);sigmaPrime(D,C,R);O.add(D);ch(D,C,v,F,R);O.add(D);O.add(y[p]);O.add(b[p]);sigma(M,w,R);maj(D,w,x,S,R);M.add(D);N=T;T=F;F=v;v=C;k.add(O);C=k;k=S;S=x;x=w;N.assign(O);N.add(M);w=N}i.add(w);n.add(x);s.add(S);o.add(k);c.add(C);l.add(v);h.add(F);u.add(T)}if(r){E=new Uint8Array(48);i.copyTo(E,0);n.copyTo(E,8);s.copyTo(E,16);o\
.copyTo(E,24);c.copyTo(E,32);l.copyTo(E,40)}else{E=new Uint8Array(64);i.copyTo(E,0);n.copyTo(E,8);s.copyTo(E,16);o.copyTo(E,24);c.copyTo(E,32);l.copyTo(E,40);h.copyTo(E,48);u.copyTo(E,56)}return E}const bc={get k(){return shadow(this,"k",[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,255\
4220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298])}};function rotr(e,t){return e>>>t|e<<32-t}function calculate_sha256_ch(\
e,t,a){return e&t^~e&a}function calculate_sha256_maj(e,t,a){return e&t^e&a^t&a}function calculate_sha256_sigma(e){return rotr(e,2)^rotr(e,13)^rotr(e,22)}function calculate_sha256_sigmaPrime(e){return rotr(e,6)^rotr(e,11)^rotr(e,25)}function calculate_sha256_littleSigma(e){return rotr(e,7)^rotr(e,18)^e>>>3}function calculateSHA256(e,t,a){let r=1779033703,i=3144134277,n=1013904242,s=2773480762,o=1359893119,c=2600822924,l=528734635,h=1541459225;const u=64*Math.ceil((a+9)/64),d=new Uint8Array(u);let\
 f,g;for(f=0;f<a;++f)d[f]=e[t++];d[f++]=128;const p=u-8;f<p&&(f=p);f+=3;d[f++]=a>>>29&255;d[f++]=a>>21&255;d[f++]=a>>13&255;d[f++]=a>>5&255;d[f++]=a<<3&255;const m=new Uint32Array(64),{k:b}=bc;for(f=0;f<u;){for(g=0;g<16;++g){m[g]=d[f]<<24|d[f+1]<<16|d[f+2]<<8|d[f+3];f+=4}for(g=16;g<64;++g)m[g]=(rotr(y=m[g-2],17)^rotr(y,19)^y>>>10)+m[g-7]+calculate_sha256_littleSigma(m[g-15])+m[g-16]|0;let e,t,a=r,u=i,p=n,w=s,x=o,S=c,k=l,C=h;for(g=0;g<64;++g){e=C+calculate_sha256_sigmaPrime(x)+calculate_sha256_ch\
(x,S,k)+b[g]+m[g];t=calculate_sha256_sigma(a)+calculate_sha256_maj(a,u,p);C=k;k=S;S=x;x=w+e|0;w=p;p=u;u=a;a=e+t|0}r=r+a|0;i=i+u|0;n=n+p|0;s=s+w|0;o=o+x|0;c=c+S|0;l=l+k|0;h=h+C|0}var y;return new Uint8Array([r>>24&255,r>>16&255,r>>8&255,255&r,i>>24&255,i>>16&255,i>>8&255,255&i,n>>24&255,n>>16&255,n>>8&255,255&n,s>>24&255,s>>16&255,s>>8&255,255&s,o>>24&255,o>>16&255,o>>8&255,255&o,c>>24&255,c>>16&255,c>>8&255,255&c,l>>24&255,l>>16&255,l>>8&255,255&l,h>>24&255,h>>16&255,h>>8&255,255&h])}class Decry\
ptStream extends DecodeStream{constructor(e,t,a){super(t);this.str=e;this.dict=e.dict;this.decrypt=a;this.nextChunk=null;this.initialized=!1}readBlock(){let e;if(this.initialized)e=this.nextChunk;else{e=this.str.getBytes(512);this.initialized=!0}if(!e?.length){this.eof=!0;return}this.nextChunk=this.str.getBytes(512);const t=this.nextChunk?.length>0;e=(0,this.decrypt)(e,!t);const a=this.bufferLength,r=a+e.length;this.ensureBuffer(r).set(e,a);this.bufferLength=r}}class ARCFourCipher{constructor(e)\
{this.a=0;this.b=0;const t=new Uint8Array(256),a=e.length;for(let e=0;e<256;++e)t[e]=e;for(let r=0,i=0;r<256;++r){const n=t[r];i=i+n+e[r%a]&255;t[r]=t[i];t[i]=n}this.s=t}encryptBlock(e){let t=this.a,a=this.b;const r=this.s,i=e.length,n=new Uint8Array(i);for(let s=0;s<i;++s){t=t+1&255;const i=r[t];a=a+i&255;const o=r[a];r[t]=o;r[a]=i;n[s]=e[s]^r[i+o&255]}this.a=t;this.b=a;return n}decryptBlock(e){return this.encryptBlock(e)}encrypt(e){return this.encryptBlock(e)}}class NullCipher{decryptBlock(e){\
return e}encrypt(e){return e}}class AESBaseCipher{_s=new Uint8Array([99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,\
182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22]);_inv_s=new Uint\
8Array([82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,2\
07,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125]);_mix=new Uint32Array([0,235474187,470948374,303765277,941896748,908933415,60\
7530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,5\
9727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,17846631\
95,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,29436\
82380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080\
725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,16755778\
80,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795]);_mixCol=new Uint8Array(256).map(((e,t)=>t<128?t<<1:t<<1^27));constructor(){this.buffer=new Uint8Array(16);this.bufferPosition=0}_expandKey(e){unreachable("Cannot call `_expandKey` on the base class")}_decrypt(e,t){let a,r,i;const n=new Uint8Array(16);n.set(e);for(let e=0,a=this._keySize;e<16;++e,++a)n[e]^=t\
[a];for(let e=this._cyclesOfRepetition-1;e>=1;--e){a=n[13];n[13]=n[9];n[9]=n[5];n[5]=n[1];n[1]=a;a=n[14];r=n[10];n[14]=n[6];n[10]=n[2];n[6]=a;n[2]=r;a=n[15];r=n[11];i=n[7];n[15]=n[3];n[11]=a;n[7]=r;n[3]=i;for(let e=0;e<16;++e)n[e]=this._inv_s[n[e]];for(let a=0,r=16*e;a<16;++a,++r)n[a]^=t[r];for(let e=0;e<16;e+=4){const t=this._mix[n[e]],r=this._mix[n[e+1]],i=this._mix[n[e+2]],s=this._mix[n[e+3]];a=t^r>>>8^r<<24^i>>>16^i<<16^s>>>24^s<<8;n[e]=a>>>24&255;n[e+1]=a>>16&255;n[e+2]=a>>8&255;n[e+3]=255&\
a}}a=n[13];n[13]=n[9];n[9]=n[5];n[5]=n[1];n[1]=a;a=n[14];r=n[10];n[14]=n[6];n[10]=n[2];n[6]=a;n[2]=r;a=n[15];r=n[11];i=n[7];n[15]=n[3];n[11]=a;n[7]=r;n[3]=i;for(let e=0;e<16;++e){n[e]=this._inv_s[n[e]];n[e]^=t[e]}return n}_encrypt(e,t){const a=this._s;let r,i,n;const s=new Uint8Array(16);s.set(e);for(let e=0;e<16;++e)s[e]^=t[e];for(let e=1;e<this._cyclesOfRepetition;e++){for(let e=0;e<16;++e)s[e]=a[s[e]];n=s[1];s[1]=s[5];s[5]=s[9];s[9]=s[13];s[13]=n;n=s[2];i=s[6];s[2]=s[10];s[6]=s[14];s[10]=n;s[\
14]=i;n=s[3];i=s[7];r=s[11];s[3]=s[15];s[7]=n;s[11]=i;s[15]=r;for(let e=0;e<16;e+=4){const t=s[e],a=s[e+1],i=s[e+2],n=s[e+3];r=t^a^i^n;s[e]^=r^this._mixCol[t^a];s[e+1]^=r^this._mixCol[a^i];s[e+2]^=r^this._mixCol[i^n];s[e+3]^=r^this._mixCol[n^t]}for(let a=0,r=16*e;a<16;++a,++r)s[a]^=t[r]}for(let e=0;e<16;++e)s[e]=a[s[e]];n=s[1];s[1]=s[5];s[5]=s[9];s[9]=s[13];s[13]=n;n=s[2];i=s[6];s[2]=s[10];s[6]=s[14];s[10]=n;s[14]=i;n=s[3];i=s[7];r=s[11];s[3]=s[15];s[7]=n;s[11]=i;s[15]=r;for(let e=0,a=this._keyS\
ize;e<16;++e,++a)s[e]^=t[a];return s}_decryptBlock2(e,t){const a=e.length;let r=this.buffer,i=this.bufferPosition;const n=[];let s=this.iv;for(let t=0;t<a;++t){r[i]=e[t];++i;if(i<16)continue;const a=this._decrypt(r,this._key);for(let e=0;e<16;++e)a[e]^=s[e];s=r;n.push(a);r=new Uint8Array(16);i=0}this.buffer=r;this.bufferLength=i;this.iv=s;if(0===n.length)return new Uint8Array(0);let o=16*n.length;if(t){const e=n.at(-1);let t=e[15];if(t<=16){for(let a=15,r=16-t;a>=r;--a)if(e[a]!==t){t=0;break}o-=\
t;n[n.length-1]=e.subarray(0,16-t)}}const c=new Uint8Array(o);for(let e=0,t=0,a=n.length;e<a;++e,t+=16)c.set(n[e],t);return c}decryptBlock(e,t,a=null){const r=e.length,i=this.buffer;let n=this.bufferPosition;if(a)this.iv=a;else{for(let t=0;n<16&&t<r;++t,++n)i[n]=e[t];if(n<16){this.bufferLength=n;return new Uint8Array(0)}this.iv=i;e=e.subarray(16)}this.buffer=new Uint8Array(16);this.bufferLength=0;this.decryptBlock=this._decryptBlock2;return this.decryptBlock(e,t)}encrypt(e,t){const a=e.length;le\
t r=this.buffer,i=this.bufferPosition;const n=[];t||=new Uint8Array(16);for(let s=0;s<a;++s){r[i]=e[s];++i;if(i<16)continue;for(let e=0;e<16;++e)r[e]^=t[e];const a=this._encrypt(r,this._key);t=a;n.push(a);r=new Uint8Array(16);i=0}this.buffer=r;this.bufferLength=i;this.iv=t;if(0===n.length)return new Uint8Array(0);const s=16*n.length,o=new Uint8Array(s);for(let e=0,t=0,a=n.length;e<a;++e,t+=16)o.set(n[e],t);return o}}class AES128Cipher extends AESBaseCipher{_rcon=new Uint8Array([141,1,2,4,8,16,32\
,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,13\
1,29,58,116,232,203,141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141,1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145,57,114,228,211,189,97,194,159,37,74,148,51,102,204,131,29,58,116,232,203,141]);constructor(e){super();this._cyclesOfRepetition=10;this._keySize=160;this._key=this._expandKey(e)}_expandKey(e){cons\
t t=this._s,a=this._rcon,r=new Uint8Array(176);r.set(e);for(let e=16,i=1;e<176;++i){let n=r[e-3],s=r[e-2],o=r[e-1],c=r[e-4];n=t[n];s=t[s];o=t[o];c=t[c];n^=a[i];for(let t=0;t<4;++t){r[e]=n^=r[e-16];e++;r[e]=s^=r[e-16];e++;r[e]=o^=r[e-16];e++;r[e]=c^=r[e-16];e++}}return r}}class AES256Cipher extends AESBaseCipher{constructor(e){super();this._cyclesOfRepetition=14;this._keySize=224;this._key=this._expandKey(e)}_expandKey(e){const t=this._s,a=new Uint8Array(240);a.set(e);let r,i,n,s,o=1;for(let e=32\
,c=1;e<240;++c){if(e%32==16){r=t[r];i=t[i];n=t[n];s=t[s]}else if(e%32==0){r=a[e-3];i=a[e-2];n=a[e-1];s=a[e-4];r=t[r];i=t[i];n=t[n];s=t[s];r^=o;(o<<=1)>=256&&(o=255&(27^o))}for(let t=0;t<4;++t){a[e]=r^=a[e-32];e++;a[e]=i^=a[e-32];e++;a[e]=n^=a[e-32];e++;a[e]=s^=a[e-32];e++}}return a}}class PDFBase{_hash(e,t,a){unreachable("Abstract method `_hash` called")}checkOwnerPassword(e,t,a,r){const i=new Uint8Array(e.length+56);i.set(e,0);i.set(t,e.length);i.set(a,e.length+t.length);return isArrayEqual(thi\
s._hash(e,i,a),r)}checkUserPassword(e,t,a){const r=new Uint8Array(e.length+8);r.set(e,0);r.set(t,e.length);return isArrayEqual(this._hash(e,r,[]),a)}getOwnerKey(e,t,a,r){const i=new Uint8Array(e.length+56);i.set(e,0);i.set(t,e.length);i.set(a,e.length+t.length);const n=this._hash(e,i,a);return new AES256Cipher(n).decryptBlock(r,!1,new Uint8Array(16))}getUserKey(e,t,a){const r=new Uint8Array(e.length+8);r.set(e,0);r.set(t,e.length);const i=this._hash(e,r,[]);return new AES256Cipher(i).decryptBloc\
k(a,!1,new Uint8Array(16))}}class PDF17 extends PDFBase{_hash(e,t,a){return calculateSHA256(t,0,t.length)}}class PDF20 extends PDFBase{_hash(e,t,a){let r=calculateSHA256(t,0,t.length).subarray(0,32),i=[0],n=0;for(;n<64||i.at(-1)>n-32;){const t=e.length+r.length+a.length,l=new Uint8Array(t);let h=0;l.set(e,h);h+=e.length;l.set(r,h);h+=r.length;l.set(a,h);const u=new Uint8Array(64*t);for(let e=0,a=0;e<64;e++,a+=t)u.set(l,a);i=new AES128Cipher(r.subarray(0,16)).encrypt(u,r.subarray(16,32));const d=\
Math.sumPrecise(i.slice(0,16))%3;0===d?r=calculateSHA256(i,0,i.length):1===d?r=(s=i,o=0,c=i.length,calculateSHA512(s,o,c,!0)):2===d&&(r=calculateSHA512(i,0,i.length));n++}var s,o,c;return r.subarray(0,32)}}class CipherTransform{constructor(e,t){this.StringCipherConstructor=e;this.StreamCipherConstructor=t}createStream(e,t){const a=new this.StreamCipherConstructor;return new DecryptStream(e,t,(function cipherTransformDecryptStream(e,t){return a.decryptBlock(e,t)}))}decryptString(e){const t=new th\
is.StringCipherConstructor;let a=stringToBytes(e);a=t.decryptBlock(a,!0);return bytesToString(a)}encryptString(e){const t=new this.StringCipherConstructor;if(t instanceof AESBaseCipher){const a=16-e.length%16;e+=String.fromCharCode(a).repeat(a);const r=new Uint8Array(16);crypto.getRandomValues(r);let i=stringToBytes(e);i=t.encrypt(i,r);const n=new Uint8Array(16+i.length);n.set(r);n.set(i,16);return bytesToString(n)}let a=stringToBytes(e);a=t.encrypt(a);return bytesToString(a)}}class CipherTransf\
ormFactory{static get _defaultPasswordBytes(){return shadow(this,"_defaultPasswordBytes",new Uint8Array([40,191,78,94,78,117,138,65,100,0,78,86,255,250,1,8,46,46,0,182,208,104,62,128,47,12,169,254,100,83,105,122]))}#Oe(e,t,a,r,i,n,s,o,c,l,h,u){if(t){const e=Math.min(127,t.length);t=t.subarray(0,e)}else t=[];const d=6===e?new PDF20:new PDF17;return d.checkUserPassword(t,o,s)?d.getUserKey(t,c,h):t.length&&d.checkOwnerPassword(t,r,n,a)?d.getOwnerKey(t,i,n,l):null}#Me(e,t,a,r,i,n,s,o){const c=40+a.l\
ength+e.length,l=new Uint8Array(c);let h,u,d=0;if(t){u=Math.min(32,t.length);for(;d<u;++d)l[d]=t[d]}h=0;for(;d<32;)l[d++]=CipherTransformFactory._defaultPasswordBytes[h++];l.set(a,d);d+=a.length;l[d++]=255&i;l[d++]=i>>8&255;l[d++]=i>>16&255;l[d++]=i>>>24&255;l.set(e,d);d+=e.length;if(n>=4&&!o){l.fill(255,d,d+4);d+=4}let f=calculateMD5(l,0,d);const g=s>>3;if(n>=3)for(h=0;h<50;++h)f=calculateMD5(f,0,g);const p=f.subarray(0,g);let m,b;if(n>=3){d=0;l.set(CipherTransformFactory._defaultPasswordBytes,\
d);d+=32;l.set(e,d);d+=e.length;m=new ARCFourCipher(p);b=m.encryptBlock(calculateMD5(l,0,d));u=p.length;const t=new Uint8Array(u);for(h=1;h<=19;++h){for(let e=0;e<u;++e)t[e]=p[e]^h;m=new ARCFourCipher(t);b=m.encryptBlock(b)}}else{m=new ARCFourCipher(p);b=m.encryptBlock(CipherTransformFactory._defaultPasswordBytes)}return b.every(((e,t)=>r[t]===e))?p:null}#De(e,t,a,r){const i=new Uint8Array(32);let n=0;const s=Math.min(32,e.length);for(;n<s;++n)i[n]=e[n];let o=0;for(;n<32;)i[n++]=CipherTransformF\
actory._defaultPasswordBytes[o++];let c=calculateMD5(i,0,n);const l=r>>3;if(a>=3)for(o=0;o<50;++o)c=calculateMD5(c,0,c.length);let h,u;if(a>=3){u=t;const e=new Uint8Array(l);for(o=19;o>=0;o--){for(let t=0;t<l;++t)e[t]=c[t]^o;h=new ARCFourCipher(e);u=h.encryptBlock(u)}}else{h=new ARCFourCipher(c.subarray(0,l));u=h.encryptBlock(t)}return u}#Be(e,t,a,r=!1){const i=a.length,n=new Uint8Array(i+9);n.set(a);let s=i;n[s++]=255&e;n[s++]=e>>8&255;n[s++]=e>>16&255;n[s++]=255&t;n[s++]=t>>8&255;if(r){n[s++]=\
115;n[s++]=65;n[s++]=108;n[s++]=84}return calculateMD5(n,0,s).subarray(0,Math.min(i+5,16))}#Re(e,t,a,r,i){if(!(t instanceof Name))throw new FormatError("Invalid crypt filter name.");const n=this,s=e.get(t.name),o=s?.get("CFM");if(!o||"None"===o.name)return function(){return new NullCipher};if("V2"===o.name)return function(){return new ARCFourCipher(n.#Be(a,r,i,!1))};if("AESV2"===o.name)return function(){return new AES128Cipher(n.#Be(a,r,i,!0))};if("AESV3"===o.name)return function(){return new AE\
S256Cipher(i)};throw new FormatError("Unknown crypto method")}constructor(e,t,a){const r=e.get("Filter");if(!isName(r,"Standard"))throw new FormatError("unknown encryption method");this.filterName=r.name;this.dict=e;const i=e.get("V");if(!Number.isInteger(i)||1!==i&&2!==i&&4!==i&&5!==i)throw new FormatError("unsupported encryption algorithm");this.algorithm=i;let n=e.get("Length");if(!n)if(i<=3)n=40;else{const t=e.get("CF"),a=e.get("StmF");if(t instanceof Dict&&a instanceof Name){t.suppressEncry\
ption=!0;const e=t.get(a.name);n=e?.get("Length")||128;n<40&&(n<<=3)}}if(!Number.isInteger(n)||n<40||n%8!=0)throw new FormatError("invalid key length");const s=stringToBytes(e.get("O")),o=stringToBytes(e.get("U")),c=s.subarray(0,32),l=o.subarray(0,32),h=e.get("P"),u=e.get("R"),d=(4===i||5===i)&&!1!==e.get("EncryptMetadata");this.encryptMetadata=d;const f=stringToBytes(t);let g,p;if(a){if(6===u)try{a=utf8StringToString(a)}catch{warn("CipherTransformFactory: Unable to convert UTF8 encoded password\
.")}g=stringToBytes(a)}if(5!==i)p=this.#Me(f,g,c,l,h,u,n,d);else{const t=s.subarray(32,40),a=s.subarray(40,48),r=o.subarray(0,48),i=o.subarray(32,40),n=o.subarray(40,48),h=stringToBytes(e.get("OE")),d=stringToBytes(e.get("UE")),f=stringToBytes(e.get("Perms"));p=this.#Oe(u,g,c,t,a,r,l,i,n,h,d,f)}if(!p){if(!a)throw new PasswordException("No password given",ha);const e=this.#De(g,c,u,n);p=this.#Me(f,e,c,l,h,u,n,d)}if(!p)throw new PasswordException("Incorrect Password",ua);if(4===i&&p.length<16){thi\
s.encryptionKey=new Uint8Array(16);this.encryptionKey.set(p)}else this.encryptionKey=p;if(i>=4){const t=e.get("CF");t instanceof Dict&&(t.suppressEncryption=!0);this.cf=t;this.stmf=e.get("StmF")||Name.get("Identity");this.strf=e.get("StrF")||Name.get("Identity");this.eff=e.get("EFF")||this.stmf}}createCipherTransform(e,t){if(4===this.algorithm||5===this.algorithm)return new CipherTransform(this.#Re(this.cf,this.strf,e,t,this.encryptionKey),this.#Re(this.cf,this.stmf,e,t,this.encryptionKey));cons\
t a=this.#Be(e,t,this.encryptionKey,!1),cipherConstructor=function(){return new ARCFourCipher(a)};return new CipherTransform(cipherConstructor,cipherConstructor)}}class XRef{#Ne=null;constructor(e,t){this.stream=e;this.pdfManager=t;this.entries=[];this._xrefStms=new Set;this._cacheMap=new Map;this._pendingRefs=new RefSet;this._newPersistentRefNum=null;this._newTemporaryRefNum=null;this._persistentRefsCache=null}getNewPersistentRef(e){null===this._newPersistentRefNum&&(this._newPersistentRefNum=t\
his.entries.length||1);const t=this._newPersistentRefNum++;this._cacheMap.set(t,e);return Ref.get(t,0)}getNewTemporaryRef(){if(null===this._newTemporaryRefNum){this._newTemporaryRefNum=this.entries.length||1;if(this._newPersistentRefNum){this._persistentRefsCache=new Map;for(let e=this._newTemporaryRefNum;e<this._newPersistentRefNum;e++){this._persistentRefsCache.set(e,this._cacheMap.get(e));this._cacheMap.delete(e)}}}return Ref.get(this._newTemporaryRefNum++,0)}resetNewTemporaryRef(){this._newT\
emporaryRefNum=null;if(this._persistentRefsCache)for(const[e,t]of this._persistentRefsCache)this._cacheMap.set(e,t);this._persistentRefsCache=null}setStartXRef(e){this.startXRefQueue=[e]}parse(e=!1){let t,a,r;if(e){warn("Indexing all PDF objects");t=this.indexObjects()}else t=this.readXRef();t.assignXref(this);this.trailer=t;try{a=t.get("Encrypt")}catch(e){if(e instanceof MissingDataException)throw e;warn(`XRef.parse - Invalid "Encrypt" reference: "${e}".`)}if(a instanceof Dict){const e=t.get("I\
D"),r=e?.length?e[0]:"";a.suppressEncryption=!0;this.encrypt=new CipherTransformFactory(a,r,this.pdfManager.password)}try{r=t.get("Root")}catch(e){if(e instanceof MissingDataException)throw e;warn(`XRef.parse - Invalid "Root" reference: "${e}".`)}if(r instanceof Dict)try{if(r.get("Pages")instanceof Dict){this.root=r;return}}catch(e){if(e instanceof MissingDataException)throw e;warn(`XRef.parse - Invalid "Pages" reference: "${e}".`)}if(!e)throw new XRefParseException;throw new InvalidPDFException\
("Invalid Root reference.")}processXRefTable(e){"tableState"in this||(this.tableState={entryNum:0,streamPos:e.lexer.stream.pos,parserBuf1:e.buf1,parserBuf2:e.buf2});if(!isCmd(this.readXRefTable(e),"trailer"))throw new FormatError("Invalid XRef table: could not find trailer dictionary");let t=e.getObj();t instanceof Dict||!t.dict||(t=t.dict);if(!(t instanceof Dict))throw new FormatError("Invalid XRef table: could not parse trailer dictionary");delete this.tableState;return t}readXRefTable(e){cons\
t t=e.lexer.stream,a=this.tableState;t.pos=a.streamPos;e.buf1=a.parserBuf1;e.buf2=a.parserBuf2;let r;for(;;){if(!("firstEntryNum"in a)||!("entryCount"in a)){if(isCmd(r=e.getObj(),"trailer"))break;a.firstEntryNum=r;a.entryCount=e.getObj()}let i=a.firstEntryNum;const n=a.entryCount;if(!Number.isInteger(i)||!Number.isInteger(n))throw new FormatError("Invalid XRef table: wrong types in subsection header");for(let r=a.entryNum;r<n;r++){a.streamPos=t.pos;a.entryNum=r;a.parserBuf1=e.buf1;a.parserBuf2=e\
.buf2;const s={};s.offset=e.getObj();s.gen=e.getObj();const o=e.getObj();if(o instanceof Cmd)switch(o.cmd){case"f":s.free=!0;break;case"n":s.uncompressed=!0}if(!Number.isInteger(s.offset)||!Number.isInteger(s.gen)||!s.free&&!s.uncompressed)throw new FormatError(`Invalid entry in XRef subsection: ${i}, ${n}`);0===r&&s.free&&1===i&&(i=0);this.entries[r+i]||(this.entries[r+i]=s)}a.entryNum=0;a.streamPos=t.pos;a.parserBuf1=e.buf1;a.parserBuf2=e.buf2;delete a.firstEntryNum;delete a.entryCount}if(this\
.entries[0]&&!this.entries[0].free)throw new FormatError("Invalid XRef table: unexpected first object");return r}processXRefStream(e){if(!("streamState"in this)){const{dict:t,pos:a}=e,r=t.get("W"),i=t.get("Index")||[0,t.get("Size")];this.streamState={entryRanges:i,byteWidths:r,entryNum:0,streamPos:a}}this.readXRefStream(e);delete this.streamState;return e.dict}readXRefStream(e){const t=this.streamState;e.pos=t.streamPos;const[a,r,i]=t.byteWidths,n=t.entryRanges;for(;n.length>0;){const[s,o]=n;if(\
!Number.isInteger(s)||!Number.isInteger(o))throw new FormatError(`Invalid XRef range fields: ${s}, ${o}`);if(!Number.isInteger(a)||!Number.isInteger(r)||!Number.isInteger(i))throw new FormatError(`Invalid XRef entry fields length: ${s}, ${o}`);for(let n=t.entryNum;n<o;++n){t.entryNum=n;t.streamPos=e.pos;let o=0,c=0,l=0;for(let t=0;t<a;++t){const t=e.getByte();if(-1===t)throw new FormatError("Invalid XRef byteWidths \'type\'.");o=o<<8|t}0===a&&(o=1);for(let t=0;t<r;++t){const t=e.getByte();if(-1===\
t)throw new FormatError("Invalid XRef byteWidths \'offset\'.");c=c<<8|t}for(let t=0;t<i;++t){const t=e.getByte();if(-1===t)throw new FormatError("Invalid XRef byteWidths \'generation\'.");l=l<<8|t}const h={};h.offset=c;h.gen=l;switch(o){case 0:h.free=!0;break;case 1:h.uncompressed=!0;break;case 2:break;default:throw new FormatError(`Invalid XRef entry type: ${o}`)}this.entries[s+n]||(this.entries[s+n]=h)}t.entryNum=0;t.streamPos=e.pos;n.splice(0,2)}}indexObjects(){function readToken(e,t){let a="",r=\
e[t];for(;10!==r&&13!==r&&60!==r&&!(++t>=e.length);){a+=String.fromCharCode(r);r=e[t]}return a}function skipUntil(e,t,a){const r=a.length,i=e.length;let n=0;for(;t<i;){let i=0;for(;i<r&&e[t+i]===a[i];)++i;if(i>=r)break;t++;n++}return n}const e=/\\b(endobj|\\d+\\s+\\d+\\s+obj|xref|trailer\\s*<<)\\b/g,t=/\\b(startxref|\\d+\\s+\\d+\\s+obj)\\b/g,a=/^(\\d+)\\s+(\\d+)\\s+obj\\b/,r=new Uint8Array([116,114,97,105,108,101,114]),i=new Uint8Array([115,116,97,114,116,120,114,101,102]),n=new Uint8Array([47,88,82,101,102]);thi\
s.entries.length=0;this._cacheMap.clear();const s=this.stream;s.pos=0;const o=s.getBytes(),c=bytesToString(o),l=o.length;let h=s.start;const u=[],d=[];for(;h<l;){let f=o[h];if(9===f||10===f||13===f||32===f){++h;continue}if(37===f){do{++h;if(h>=l)break;f=o[h]}while(10!==f&&13!==f);continue}const g=readToken(o,h);let p;if(g.startsWith("xref")&&(4===g.length||/\\s/.test(g[4]))){h+=skipUntil(o,h,r);u.push(h);h+=skipUntil(o,h,i)}else if(p=a.exec(g)){const t=0|p[1],a=0|p[2],r=h+g.length;let i,u=!1;if(t\
his.entries[t]){if(this.entries[t].gen===a)try{new Parser({lexer:new Lexer(s.makeSubStream(r))}).getObj();u=!0}catch(e){e instanceof ParserEOFException?warn(`indexObjects -- checking object (${g}): "${e}".`):u=!0}}else u=!0;u&&(this.entries[t]={offset:h-s.start,gen:a,uncompressed:!0});e.lastIndex=r;const f=e.exec(c);if(f){i=e.lastIndex+1-h;if("endobj"!==f[1]){warn(`indexObjects: Found "${f[1]}" inside of another "obj", caused by missing "endobj" -- trying to recover.`);i-=f[1].length+1}}else i=l\
-h;const m=o.subarray(h,h+i),b=skipUntil(m,0,n);if(b<i&&m[b+5]<64){d.push(h-s.start);this._xrefStms.add(h-s.start)}h+=i}else if(g.startsWith("trailer")&&(7===g.length||/\\s/.test(g[7]))){u.push(h);const e=h+g.length;let a;t.lastIndex=e;const r=t.exec(c);if(r){a=t.lastIndex+1-h;if("startxref"!==r[1]){warn(`indexObjects: Found "${r[1]}" after "trailer", caused by missing "startxref" -- trying to recover.`);a-=r[1].length+1}}else a=l-h;h+=a}else h+=g.length+1}for(const e of d){this.startXRefQueue.pu\
sh(e);this.readXRef(!0)}const f=[];let g,p,m=!1;for(const e of u){s.pos=e;const t=new Parser({lexer:new Lexer(s),xref:this,allowStreams:!0,recoveryMode:!0});if(!isCmd(t.getObj(),"trailer"))continue;const a=t.getObj();if(a instanceof Dict){f.push(a);a.has("Encrypt")&&(m=!0)}}for(const e of[...f,"genFallback",...f]){if("genFallback"===e){if(!p)break;this._generationFallback=!0;continue}let t=!1;try{const a=e.get("Root");if(!(a instanceof Dict))continue;const r=a.get("Pages");if(!(r instanceof Dict\
))continue;const i=r.get("Count");Number.isInteger(i)&&(t=!0)}catch(e){p=e;continue}if(t&&(!m||e.has("Encrypt"))&&e.has("ID"))return e;g=e}if(g)return g;if(this.topDict)return this.topDict;if(!f.length)for(const[e,t]of this.entries.entries()){if(!t)continue;const a=Ref.get(e,t.gen);let r;try{r=this.fetch(a)}catch{continue}r instanceof BaseStream&&(r=r.dict);if(r instanceof Dict&&r.has("Root"))return r}throw new InvalidPDFException("Invalid PDF structure.")}readXRef(e=!1){const t=this.stream,a=ne\
w Set;for(;this.startXRefQueue.length;){try{const e=this.startXRefQueue[0];if(a.has(e)){warn("readXRef - skipping XRef table since it was already parsed.");this.startXRefQueue.shift();continue}a.add(e);t.pos=e+t.start;const r=new Parser({lexer:new Lexer(t),xref:this,allowStreams:!0});let i,n=r.getObj();if(isCmd(n,"xref")){i=this.processXRefTable(r);this.topDict||(this.topDict=i);n=i.get("XRefStm");if(Number.isInteger(n)&&!this._xrefStms.has(n)){this._xrefStms.add(n);this.startXRefQueue.push(n);t\
his.#Ne??=n}}else{if(!Number.isInteger(n))throw new FormatError("Invalid XRef stream header");if(!(Number.isInteger(r.getObj())&&isCmd(r.getObj(),"obj")&&(n=r.getObj())instanceof BaseStream))throw new FormatError("Invalid XRef stream");i=this.processXRefStream(n);this.topDict||(this.topDict=i);if(!i)throw new FormatError("Failed to read XRef stream")}n=i.get("Prev");Number.isInteger(n)?this.startXRefQueue.push(n):n instanceof Ref&&this.startXRefQueue.push(n.num)}catch(e){if(e instanceof MissingD\
ataException)throw e;info("(while reading XRef): "+e)}this.startXRefQueue.shift()}if(this.topDict)return this.topDict;if(!e)throw new XRefParseException}get lastXRefStreamPos(){return this.#Ne??(this._xrefStms.size>0?Math.max(...this._xrefStms):null)}getEntry(e){const t=this.entries[e];return t&&!t.free&&t.offset?t:null}fetchIfRef(e,t=!1){return e instanceof Ref?this.fetch(e,t):e}fetch(e,t=!1){if(!(e instanceof Ref))throw new Error("ref object is not a reference");const a=e.num,r=this._cacheMap.\
get(a);if(void 0!==r){r instanceof Dict&&!r.objId&&(r.objId=e.toString());return r}let i=this.getEntry(a);if(null===i)return i;if(this._pendingRefs.has(e)){this._pendingRefs.remove(e);warn(`Ignoring circular reference: ${e}.`);return ya}this._pendingRefs.put(e);try{i=i.uncompressed?this.fetchUncompressed(e,i,t):this.fetchCompressed(e,i,t);this._pendingRefs.remove(e)}catch(t){this._pendingRefs.remove(e);throw t}i instanceof Dict?i.objId=e.toString():i instanceof BaseStream&&(i.dict.objId=e.toStri\
ng());return i}fetchUncompressed(e,t,a=!1){const r=e.gen;let i=e.num;if(t.gen!==r){const n=`Inconsistent generation in XRef: ${e}`;if(this._generationFallback&&t.gen<r){warn(n);return this.fetchUncompressed(Ref.get(i,t.gen),t,a)}throw new XRefEntryException(n)}const n=this.stream.makeSubStream(t.offset+this.stream.start),s=new Parser({lexer:new Lexer(n),xref:this,allowStreams:!0}),o=s.getObj(),c=s.getObj(),l=s.getObj();if(o!==i||c!==r||!(l instanceof Cmd))throw new XRefEntryException(`Bad (uncom\
pressed) XRef entry: ${e}`);if("obj"!==l.cmd){if(l.cmd.startsWith("obj")){i=parseInt(l.cmd.substring(3),10);if(!Number.isNaN(i))return i}throw new XRefEntryException(`Bad (uncompressed) XRef entry: ${e}`)}(t=this.encrypt&&!a?s.getObj(this.encrypt.createCipherTransform(i,r)):s.getObj())instanceof BaseStream||this._cacheMap.set(i,t);return t}fetchCompressed(e,t,a=!1){const r=t.offset,i=this.fetch(Ref.get(r,0));if(!(i instanceof BaseStream))throw new FormatError("bad ObjStm stream");const n=i.dict.\
get("First"),s=i.dict.get("N");if(!Number.isInteger(n)||!Number.isInteger(s))throw new FormatError("invalid first and n parameters for ObjStm stream");let o=new Parser({lexer:new Lexer(i),xref:this,allowStreams:!0});const c=new Array(s),l=new Array(s);for(let e=0;e<s;++e){const t=o.getObj();if(!Number.isInteger(t))throw new FormatError(`invalid object number in the ObjStm stream: ${t}`);const a=o.getObj();if(!Number.isInteger(a))throw new FormatError(`invalid object offset in the ObjStm stream: \
${a}`);c[e]=t;const i=this.getEntry(t);i?.offset===r&&i.gen!==e&&(i.gen=e);l[e]=a}const h=(i.start||0)+n,u=new Array(s);for(let e=0;e<s;++e){const t=e<s-1?l[e+1]-l[e]:void 0;if(t<0)throw new FormatError("Invalid offset in the ObjStm stream.");o=new Parser({lexer:new Lexer(i.makeSubStream(h+l[e],t,i.dict)),xref:this,allowStreams:!0});const a=o.getObj();u[e]=a;if(a instanceof BaseStream)continue;const n=c[e],d=this.entries[n];d&&d.offset===r&&d.gen===e&&this._cacheMap.set(n,a)}if(void 0===(t=u[t.g\
en]))throw new XRefEntryException(`Bad (compressed) XRef entry: ${e}`);return t}async fetchIfRefAsync(e,t){return e instanceof Ref?this.fetchAsync(e,t):e}async fetchAsync(e,t){try{return this.fetch(e,t)}catch(a){if(!(a instanceof MissingDataException))throw a;await this.pdfManager.requestRange(a.begin,a.end);return this.fetchAsync(e,t)}}getCatalogObj(){return this.root}}const yc=[0,0,612,792];class Page{#Ee=null;constructor({pdfManager:e,xref:t,pageIndex:a,pageDict:r,ref:i,globalIdFactory:n,font\
Cache:s,builtInCMapCache:o,standardFontDataCache:c,globalColorSpaceCache:l,globalImageCache:h,systemFontCache:u,nonBlendModesSet:d,xfaFactory:f}){this.pdfManager=e;this.pageIndex=a;this.pageDict=r;this.xref=t;this.ref=i;this.fontCache=s;this.builtInCMapCache=o;this.standardFontDataCache=c;this.globalColorSpaceCache=l;this.globalImageCache=h;this.systemFontCache=u;this.nonBlendModesSet=d;this.evaluatorOptions=e.evaluatorOptions;this.xfaFactory=f;const g={obj:0};this._localIdFactory=class extends \
n{static createObjId(){return`p${a}_${++g.obj}`}static getPageObjId(){return`p${i.toString()}`}}}#Pe(e){return new PartialEvaluator({xref:this.xref,handler:e,pageIndex:this.pageIndex,idFactory:this._localIdFactory,fontCache:this.fontCache,builtInCMapCache:this.builtInCMapCache,standardFontDataCache:this.standardFontDataCache,globalColorSpaceCache:this.globalColorSpaceCache,globalImageCache:this.globalImageCache,systemFontCache:this.systemFontCache,options:this.evaluatorOptions})}#Le(e,t=!1){cons\
t a=getInheritableProperty({dict:this.pageDict,key:e,getArray:t,stopWhenFound:!1});return Array.isArray(a)?1!==a.length&&a[0]instanceof Dict?Dict.merge({xref:this.xref,dictArray:a}):a[0]:a}get content(){return this.pageDict.getArray("Contents")}get resources(){const e=this.#Le("Resources");return shadow(this,"resources",e instanceof Dict?e:Dict.empty)}#je(e){if(this.xfaData)return this.xfaData.bbox;const t=lookupNormalRect(this.#Le(e,!0),null);if(t){if(t[2]-t[0]>0&&t[3]-t[1]>0)return t;warn(`Emp\
ty, or invalid, /${e} entry.`)}return null}get mediaBox(){return shadow(this,"mediaBox",this.#je("MediaBox")||yc)}get cropBox(){return shadow(this,"cropBox",this.#je("CropBox")||this.mediaBox)}get userUnit(){const e=this.pageDict.get("UserUnit");return shadow(this,"userUnit","number"==typeof e&&e>0?e:1)}get view(){const{cropBox:e,mediaBox:t}=this;if(e!==t&&!isArrayEqual(e,t)){const a=Util.intersect(e,t);if(a&&a[2]-a[0]>0&&a[3]-a[1]>0)return shadow(this,"view",a);warn("Empty /CropBox and /MediaBo\
x intersection.")}return shadow(this,"view",t)}get rotate(){let e=this.#Le("Rotate")||0;e%90!=0?e=0:e>=360?e%=360:e<0&&(e=(e%360+360)%360);return shadow(this,"rotate",e)}#_e(e,t){if(!this.evaluatorOptions.ignoreErrors)throw e;warn(`getContentStream - ignoring sub-stream (${t}): "${e}".`)}async getContentStream(){const e=await this.pdfManager.ensure(this,"content");return e instanceof BaseStream?e:Array.isArray(e)?new StreamsSequenceStream(e,this.#_e.bind(this)):new NullStream}get xfaData(){retur\
n shadow(this,"xfaData",this.xfaFactory?{bbox:this.xfaFactory.getBoundingBox(this.pageIndex)}:null)}async#Ue(e,t,a){const r=[];for(const i of e)if(i.id){const e=Ref.fromString(i.id);if(!e){warn(`A non-linked annotation cannot be modified: ${i.id}`);continue}if(i.deleted){t.put(e,e);if(i.popupRef){const e=Ref.fromString(i.popupRef);e&&t.put(e,e)}continue}if(i.popup?.deleted){const e=Ref.fromString(i.popupRef);e&&t.put(e,e)}a?.put(e);i.ref=e;r.push(this.xref.fetchAsync(e).then((e=>{e instanceof Di\
ct&&(i.oldAnnotation=e.clone())}),(()=>{warn(`Cannot fetch \\`oldAnnotation\\` for: ${e}.`)})));delete i.id}await Promise.all(r)}async saveNewAnnotations(e,t,a,r,i){if(this.xfaFactory)throw new Error("XFA: Cannot save new annotations.");const n=this.#Pe(e),s=new RefSetCache,o=new RefSet;await this.#Ue(a,s,o);const c=this.pageDict,l=this.annotations.filter((e=>!(e instanceof Ref&&s.has(e)))),h=await AnnotationFactory.saveNewAnnotations(n,t,a,r,i);for(const{ref:e}of h.annotations)e instanceof Ref&&!\
o.has(e)&&l.push(e);const u=c.clone();u.set("Annots",l);i.put(this.ref,{data:u});for(const e of s)i.put(e,{data:null})}async save(e,t,a,r){const i=this.#Pe(e),n=await this._parsedAnnotations,s=[];for(const e of n)s.push(e.save(i,t,a,r).catch((function(e){warn(`save - ignoring annotation data during "${t.name}" task: "${e}".`);return null})));return Promise.all(s)}async loadResources(e){await(this.#Ee??=this.pdfManager.ensure(this,"resources"));await ObjectLoader.load(this.resources,e,this.xref)}\
async#Xe(e,t){const a=e?.get("Resources");if(!(a instanceof Dict&&a.size))return this.resources;await ObjectLoader.load(a,t,this.xref);return Dict.merge({xref:this.xref,dictArray:[a,this.resources],mergeSubDicts:!0})}async getOperatorList({handler:e,sink:t,task:a,intent:r,cacheKey:i,annotationStorage:c=null,modifiedIds:d=null}){const g=this.getContentStream(),p=this.loadResources(Ia),m=this.#Pe(e),b=this.xfaFactory?null:getNewAnnotationsMap(c),y=b?.get(this.pageIndex);let w=Promise.resolve(null)\
,x=null;if(y){const e=this.pdfManager.ensureDoc("annotationGlobals");let t;const r=new Set;for(const{bitmapId:e,bitmap:t}of y)!e||t||r.has(e)||r.add(e);const{isOffscreenCanvasSupported:i}=this.evaluatorOptions;if(r.size>0){const e=y.slice();for(const[t,a]of c)t.startsWith(f)&&a.bitmap&&r.has(a.bitmapId)&&e.push(a);t=AnnotationFactory.generateImages(e,this.xref,i)}else t=AnnotationFactory.generateImages(y,this.xref,i);x=new RefSet;w=Promise.all([e,this.#Ue(y,x,null)]).then((([e])=>e?AnnotationFac\
tory.printNewAnnotations(e,m,a,y,t):null))}const S=Promise.all([g,p]).then((async([n])=>{const s=await this.#Xe(n.dict,Ia),o=new OperatorList(r,t);e.send("StartRenderPage",{transparency:m.hasBlendModes(s,this.nonBlendModesSet),pageIndex:this.pageIndex,cacheKey:i});await m.getOperatorList({stream:n,task:a,resources:s,operatorList:o});return o}));let[k,C,v]=await Promise.all([S,this._parsedAnnotations,w]);if(v){C=C.filter((e=>!(e.ref&&x.has(e.ref))));for(let e=0,t=v.length;e<t;e++){const a=v[e];if\
(a.refToReplace){const r=C.findIndex((e=>e.ref&&isRefsEqual(e.ref,a.refToReplace)));if(r>=0){C.splice(r,1,a);v.splice(e--,1);t--}}}C=C.concat(v)}if(0===C.length||r&h){k.flush(!0);return{length:k.totalLength}}const F=!!(r&l),T=!!(r&u),O=!!(r&n),M=!!(r&s),D=!!(r&o),R=[];for(const e of C)(O||M&&e.mustBeViewed(c,F)&&e.mustBeViewedWhenEditing(T,d)||D&&e.mustBePrinted(c))&&R.push(e.getOperatorList(m,a,r,c).catch((function(e){warn(`getOperatorList - ignoring annotation data during "${a.name}" task: "${\
e}".`);return{opList:null,separateForm:!1,separateCanvas:!1}})));const N=await Promise.all(R);let E=!1,L=!1;for(const{opList:e,separateForm:t,separateCanvas:a}of N){k.addOpList(e);E||=t;L||=a}k.flush(!0,{form:E,canvas:L});return{length:k.totalLength}}async extractTextContent({handler:e,task:t,includeMarkedContent:a,disableNormalization:r,sink:i,intersector:n=null}){const s=this.getContentStream(),o=this.loadResources(Ta),c=this.pdfManager.ensureCatalog("lang"),[l,,h]=await Promise.all([s,o,c]),u\
=await this.#Xe(l.dict,Ta);return this.#Pe(e).getTextContent({stream:l,task:t,resources:u,includeMarkedContent:a,disableNormalization:r,sink:i,viewBox:this.view,lang:h,intersector:n})}async getStructTree(){const e=await this.pdfManager.ensureCatalog("structTreeRoot");if(!e)return null;await this._parsedAnnotations;try{const t=await this.pdfManager.ensure(this,"_parseStructTree",[e]);return await this.pdfManager.ensure(t,"serializable")}catch(e){warn(`getStructTree: "${e}".`);return null}}_parseS\
tructTree(e){const t=new StructTreePage(e,this.pageDict);t.parse(this.ref);return t}async getAnnotationsData(e,t,a){const r=await this._parsedAnnotations;if(0===r.length)return r;const i=[],c=[];let l;const h=!!(a&n),u=!!(a&s),d=!!(a&o),f=[];for(const a of r){const r=h||u&&a.viewable;(r||d&&a.printable)&&i.push(a.data);if(a.hasTextContent&&r){l??=this.#Pe(e);c.push(a.extractTextContent(l,t,[-1/0,-1/0,1/0,1/0]).catch((function(e){warn(`getAnnotationsData - ignoring textContent during "${t.name}" \
task: "${e}".`)})))}else a.overlaysTextContent&&r&&f.push(a)}if(f.length>0){const a=new Intersector(f);c.push(this.extractTextContent({handler:e,task:t,includeMarkedContent:!1,disableNormalization:!1,sink:null,viewBox:this.view,lang:null,intersector:a}).then((()=>{a.setText()})))}await Promise.all(c);return i}get annotations(){const e=this.#Le("Annots");return shadow(this,"annotations",Array.isArray(e)?e:[])}get _parsedAnnotations(){return shadow(this,"_parsedAnnotations",this.pdfManager.ensure(\
this,"annotations").then((async e=>{if(0===e.length)return e;const[t,a]=await Promise.all([this.pdfManager.ensureDoc("annotationGlobals"),this.pdfManager.ensureDoc("fieldObjects")]);if(!t)return[];const r=a?.orphanFields,i=[];for(const a of e)i.push(AnnotationFactory.create(this.xref,a,t,this._localIdFactory,!1,r,this.ref).catch((function(e){warn(`_parsedAnnotations: "${e}".`);return null})));const n=[];let s,o;for(const e of await Promise.all(i))e&&(e instanceof WidgetAnnotation?(o||=[]).push(e\
):e instanceof PopupAnnotation?(s||=[]).push(e):n.push(e));o&&n.push(...o);s&&n.push(...s);return n})))}get jsActions(){return shadow(this,"jsActions",collectActions(this.xref,this.pageDict,xe))}}const wc=new Uint8Array([37,80,68,70,45]),xc=new Uint8Array([115,116,97,114,116,120,114,101,102]),Sc=new Uint8Array([101,110,100,111,98,106]);function find(e,t,a=1024,r=!1){const i=t.length,n=e.peekBytes(a),s=n.length-i;if(s<=0)return!1;if(r){const a=i-1;let r=n.length-1;for(;r>=a;){let s=0;for(;s<i&&n[\
r-s]===t[a-s];)s++;if(s>=i){e.pos+=r-a;return!0}r--}}else{let a=0;for(;a<=s;){let r=0;for(;r<i&&n[a+r]===t[r];)r++;if(r>=i){e.pos+=a;return!0}a++}}return!1}class PDFDocument{#qe=new Map;#He=null;constructor(e,t){if(t.length<=0)throw new InvalidPDFException("The PDF file is empty, i.e. its size is zero bytes.");this.pdfManager=e;this.stream=t;this.xref=new XRef(t,e);const a={font:0};this._globalIdFactory=class{static getDocId(){return`g_${e.docId}`}static createFontId(){return"f"+ ++a.font}static\
 createObjId(){unreachable("Abstract method `createObjId` called.")}static getPageObjId(){unreachable("Abstract method `getPageObjId` called.")}}}parse(e){this.xref.parse(e);this.catalog=new Catalog(this.pdfManager,this.xref)}get linearization(){let e=null;try{e=Linearization.create(this.stream)}catch(e){if(e instanceof MissingDataException)throw e;info(e)}return shadow(this,"linearization",e)}get startXRef(){const e=this.stream;let t=0;if(this.linearization){e.reset();if(find(e,Sc)){e.skip(6);l\
et a=e.peekByte();for(;isWhiteSpace(a);){e.pos++;a=e.peekByte()}t=e.pos-e.start}}else{const a=1024,r=xc.length;let i=!1,n=e.end;for(;!i&&n>0;){n-=a-r;n<0&&(n=0);e.pos=n;i=find(e,xc,a,!0)}if(i){e.skip(9);let a;do{a=e.getByte()}while(isWhiteSpace(a));let r="";for(;a>=32&&a<=57;){r+=String.fromCharCode(a);a=e.getByte()}t=parseInt(r,10);isNaN(t)&&(t=0)}}return shadow(this,"startXRef",t)}checkHeader(){const e=this.stream;e.reset();if(!find(e,wc))return;e.moveStart();e.skip(wc.length);let t,a="";for(;\
(t=e.getByte())>32&&a.length<7;)a+=String.fromCharCode(t);Ca.test(a)?this.#He=a:warn(`Invalid PDF header version: ${a}`)}parseStartXRef(){this.xref.setStartXRef(this.startXRef)}get numPages(){let e=0;e=this.catalog.hasActualNumPages?this.catalog.numPages:this.xfaFactory?this.xfaFactory.getNumPages():this.linearization?this.linearization.numPages:this.catalog.numPages;return shadow(this,"numPages",e)}#We(e,t=0){return!!Array.isArray(e)&&e.every((e=>{if(!((e=this.xref.fetchIfRef(e))instanceof Dict\
))return!1;if(e.has("Kids")){if(++t>10){warn("#hasOnlyDocumentSignatures: maximum recursion depth reached");return!1}return this.#We(e.get("Kids"),t)}const a=isName(e.get("FT"),"Sig"),r=e.get("Rect"),i=Array.isArray(r)&&r.every((e=>0===e));return a&&i}))}#ze(e,t,a=new RefSet){if(Array.isArray(e))for(let r of e){if(r instanceof Ref){if(a.has(r))continue;a.put(r)}r=this.xref.fetchIfRef(r);if(!(r instanceof Dict))continue;if(r.has("Kids")){this.#ze(r.get("Kids"),t,a);continue}if(!isName(r.get("FT")\
,"Sig"))continue;const e=r.get("V");if(!(e instanceof Dict))continue;const i=e.get("SubFilter");i instanceof Name&&t.add(i.name)}}get _xfaStreams(){const{acroForm:e}=this.catalog;if(!e)return null;const t=e.get("XFA"),a=new Map(["xdp:xdp","template","datasets","config","connectionSet","localeSet","stylesheet","/xdp:xdp"].map((e=>[e,null])));if(t instanceof BaseStream&&!t.isEmpty){a.set("xdp:xdp",t);return a}if(!Array.isArray(t)||0===t.length)return null;for(let e=0,r=t.length;e<r;e+=2){let i;i=0\
===e?"xdp:xdp":e===r-2?"/xdp:xdp":t[e];if(!a.has(i))continue;const n=this.xref.fetchIfRef(t[e+1]);n instanceof BaseStream&&!n.isEmpty&&a.set(i,n)}return a}get xfaDatasets(){const e=this._xfaStreams;if(!e)return shadow(this,"xfaDatasets",null);for(const t of["datasets","xdp:xdp"]){const a=e.get(t);if(a)try{const e=stringToUTF8String(a.getString());return shadow(this,"xfaDatasets",new DatasetReader({[t]:e}))}catch{warn("XFA - Invalid utf-8 string.");break}}return shadow(this,"xfaDatasets",null)}ge\
t xfaData(){const e=this._xfaStreams;if(!e)return null;const t=Object.create(null);for(const[a,r]of e)if(r)try{t[a]=stringToUTF8String(r.getString())}catch{warn("XFA - Invalid utf-8 string.");return null}return t}get xfaFactory(){let e;this.pdfManager.enableXfa&&this.catalog.needsRendering&&this.formInfo.hasXfa&&!this.formInfo.hasAcroForm&&(e=this.xfaData);return shadow(this,"xfaFactory",e?new XFAFactory(e):null)}get isPureXfa(){return!!this.xfaFactory&&this.xfaFactory.isValid()}get htmlForXfa()\
{return this.xfaFactory?this.xfaFactory.getPages():null}async#$e(){const e=await this.pdfManager.ensureCatalog("xfaImages");e&&this.xfaFactory.setImages(e)}async#Ge(e,t){const a=await this.pdfManager.ensureCatalog("acroForm");if(!a)return;const r=await a.getAsync("DR");if(!(r instanceof Dict))return;await ObjectLoader.load(r,["Font"],this.xref);const i=r.get("Font");if(!(i instanceof Dict))return;const n=Object.assign(Object.create(null),this.pdfManager.evaluatorOptions,{useSystemFonts:!1}),{bui\
ltInCMapCache:s,fontCache:o,standardFontDataCache:c}=this.catalog,l=new PartialEvaluator({xref:this.xref,handler:e,pageIndex:-1,idFactory:this._globalIdFactory,fontCache:o,builtInCMapCache:s,standardFontDataCache:c,options:n}),h=new OperatorList,u=[],d={get font(){return u.at(-1)},set font(e){u.push(e)},clone(){return this}},parseFont=(e,a,i)=>l.handleSetFont(r,[Name.get(e),1],null,h,t,d,a,i).catch((e=>{warn(`loadXfaFonts: "${e}".`);return null})),f=[];for(const[e,t]of i){const a=t.get("FontDesc\
riptor");if(!(a instanceof Dict))continue;let r=a.get("FontFamily");r=r.replaceAll(/[ ]+(\\d)/g,"$1");const i={fontFamily:r,fontWeight:a.get("FontWeight"),italicAngle:-a.get("ItalicAngle")};validateCSSFont(i)&&f.push(parseFont(e,null,i))}await Promise.all(f);const g=this.xfaFactory.setFonts(u);if(!g)return;n.ignoreErrors=!0;f.length=0;u.length=0;const p=new Set;for(const e of g)getXfaFontName(`${e}-Regular`)||p.add(e);p.size&&g.push("PdfJS-Fallback");for(const e of g)if(!p.has(e))for(const t of[{\
name:"Regular",fontWeight:400,italicAngle:0},{name:"Bold",fontWeight:700,italicAngle:0},{name:"Italic",fontWeight:400,italicAngle:12},{name:"BoldItalic",fontWeight:700,italicAngle:12}]){const a=`${e}-${t.name}`;f.push(parseFont(a,getXfaFontDict(a),{fontFamily:e,fontWeight:t.fontWeight,italicAngle:t.italicAngle}))}await Promise.all(f);this.xfaFactory.appendFonts(u,p)}loadXfaResources(e,t){return Promise.all([this.#Ge(e,t).catch((()=>{})),this.#$e()])}serializeXfaData(e){return this.xfaFactory?thi\
s.xfaFactory.serializeData(e):null}get version(){return this.catalog.version||this.#He}get formInfo(){const e={hasFields:!1,hasAcroForm:!1,hasXfa:!1,hasSignatures:!1},{acroForm:t}=this.catalog;if(!t)return shadow(this,"formInfo",e);try{const a=t.get("Fields"),r=Array.isArray(a)&&a.length>0;e.hasFields=r;const i=t.get("XFA");e.hasXfa=Array.isArray(i)&&i.length>0||i instanceof BaseStream&&!i.isEmpty;const n=!!(1&t.get("SigFlags")),s=n&&this.#We(a);e.hasAcroForm=r&&!s;e.hasSignatures=n}catch(e){if(\
e instanceof MissingDataException)throw e;warn(`Cannot fetch form information: "${e}".`)}return shadow(this,"formInfo",e)}get documentInfo(){const{catalog:e,formInfo:t,xref:a}=this,r={PDFFormatVersion:this.version,Language:e.lang,EncryptFilterName:a.encrypt?.filterName??null,IsLinearized:!!this.linearization,IsAcroFormPresent:t.hasAcroForm,IsXFAPresent:t.hasXfa,IsCollectionPresent:!!e.collection,IsSignaturesPresent:t.hasSignatures};let i;try{i=a.trailer.get("Info")}catch(e){if(e instanceof Missi\
ngDataException)throw e;info("The document information dictionary is invalid.")}if(!(i instanceof Dict))return shadow(this,"documentInfo",r);for(const[e,t]of i){switch(e){case"Title":case"Author":case"Subject":case"Keywords":case"Creator":case"Producer":case"CreationDate":case"ModDate":if("string"==typeof t){r[e]=stringToPDFString(t);continue}break;case"Trapped":if(t instanceof Name){r[e]=t;continue}break;default:let a;switch(typeof t){case"string":a=stringToPDFString(t);break;case"number":case"\
boolean":a=t;break;default:t instanceof Name&&(a=t)}if(void 0===a){warn(`Bad value, for custom key "${e}", in Info: ${t}.`);continue}r.Custom??=Object.create(null);r.Custom[e]=a;continue}warn(`Bad value, for key "${e}", in Info: ${t}.`)}return shadow(this,"documentInfo",r)}get fingerprints(){const e="\\0".repeat(16);function validate(t){return"string"==typeof t&&16===t.length&&t!==e}const t=this.xref.trailer.get("ID");let a,r;if(Array.isArray(t)&&validate(t[0])){a=stringToBytes(t[0]);t[1]!==t[0]&\
&validate(t[1])&&(r=stringToBytes(t[1]))}else a=calculateMD5(this.stream.getByteRange(0,1024),0,1024);return shadow(this,"fingerprints",[toHexUtil(a),r?toHexUtil(r):null])}async#Ve(e){const{catalog:t,linearization:a,xref:r}=this,i=Ref.get(a.objectNumberFirst,0);try{const e=await r.fetchAsync(i);if(e instanceof Dict){let a=e.getRaw("Type");a instanceof Ref&&(a=await r.fetchAsync(a));if(isName(a,"Page")||!e.has("Type")&&!e.has("Kids")&&e.has("Contents")){t.pageKidsCountCache.has(i)||t.pageKidsCoun\
tCache.put(i,1);t.pageIndexCache.has(i)||t.pageIndexCache.put(i,0);return[e,i]}}throw new FormatError("The Linearization dictionary doesn\'t point to a valid Page dictionary.")}catch(a){warn(`_getLinearizationPage: "${a.message}".`);return t.getPageDict(e)}}getPage(e){const t=this.#qe.get(e);if(t)return t;const{catalog:a,linearization:r,xfaFactory:i}=this;let n;n=i?Promise.resolve([Dict.empty,null]):r?.pageFirst===e?this.#Ve(e):a.getPageDict(e);n=n.then((([t,r])=>new Page({pdfManager:this.pdfMana\
ger,xref:this.xref,pageIndex:e,pageDict:t,ref:r,globalIdFactory:this._globalIdFactory,fontCache:a.fontCache,builtInCMapCache:a.builtInCMapCache,standardFontDataCache:a.standardFontDataCache,globalColorSpaceCache:a.globalColorSpaceCache,globalImageCache:a.globalImageCache,systemFontCache:a.systemFontCache,nonBlendModesSet:a.nonBlendModesSet,xfaFactory:i})));this.#qe.set(e,n);return n}async checkFirstPage(e=!1){if(!e)try{await this.getPage(0)}catch(e){if(e instanceof XRefEntryException){this.#qe.d\
elete(0);await this.cleanup();throw new XRefParseException}}}async checkLastPage(e=!1){const{catalog:t,pdfManager:a}=this;t.setActualNumPages();let r;try{await Promise.all([a.ensureDoc("xfaFactory"),a.ensureDoc("linearization"),a.ensureCatalog("numPages")]);if(this.xfaFactory)return;r=this.linearization?this.linearization.numPages:t.numPages;if(!Number.isInteger(r))throw new FormatError("Page count is not an integer.");if(r<=1)return;await this.getPage(r-1)}catch(i){this.#qe.delete(r-1);await th\
is.cleanup();if(i instanceof XRefEntryException&&!e)throw new XRefParseException;warn(`checkLastPage - invalid /Pages tree /Count: ${r}.`);let n;try{n=await t.getAllPageDicts(e)}catch(a){if(a instanceof XRefEntryException&&!e)throw new XRefParseException;t.setActualNumPages(1);return}for(const[e,[r,i]]of n){let n;if(r instanceof Error){n=Promise.reject(r);n.catch((()=>{}))}else n=Promise.resolve(new Page({pdfManager:a,xref:this.xref,pageIndex:e,pageDict:r,ref:i,globalIdFactory:this._globalIdFact\
ory,fontCache:t.fontCache,builtInCMapCache:t.builtInCMapCache,standardFontDataCache:t.standardFontDataCache,globalColorSpaceCache:this.globalColorSpaceCache,globalImageCache:t.globalImageCache,systemFontCache:t.systemFontCache,nonBlendModesSet:t.nonBlendModesSet,xfaFactory:null}));this.#qe.set(e,n)}t.setActualNumPages(n.size)}}async fontFallback(e,t){const{catalog:a,pdfManager:r}=this;for(const i of await Promise.all(a.fontCache))if(i.loadedName===e){i.fallback(t,r.evaluatorOptions);return}}asyn\
c cleanup(e=!1){return this.catalog?this.catalog.cleanup(e):clearGlobalCaches()}async#Ke(e,t,a,r,i,n,s){const{xref:o}=this;if(!(a instanceof Ref)||n.has(a))return;n.put(a);const c=await o.fetchAsync(a);if(!(c instanceof Dict))return;let l=await c.getAsync("Subtype");l=l instanceof Name?l.name:null;if("Link"===l)return;if(c.has("T")){const t=stringToPDFString(await c.getAsync("T"));e=""===e?t:`${e}.${t}`}else{let a=c;for(;;){a=a.getRaw("Parent")||t;if(a instanceof Ref){if(n.has(a))break;a=await o\
.fetchAsync(a)}if(!(a instanceof Dict))break;if(a.has("T")){const t=stringToPDFString(await a.getAsync("T"));e=""===e?t:`${e}.${t}`;break}}}t&&!c.has("Parent")&&isName(c.get("Subtype"),"Widget")&&s.put(a,t);r.has(e)||r.set(e,[]);r.get(e).push(AnnotationFactory.create(o,a,i,null,!0,s,null).then((e=>e?.getFieldObject())).catch((function(e){warn(`#collectFieldObjects: "${e}".`);return null})));if(!c.has("Kids"))return;const h=await c.getAsync("Kids");if(Array.isArray(h))for(const t of h)await this.\
#Ke(e,a,t,r,i,n,s)}get fieldObjects(){return shadow(this,"fieldObjects",this.pdfManager.ensureDoc("formInfo").then((async e=>{if(!e.hasFields)return null;const t=await this.annotationGlobals;if(!t)return null;const{acroForm:a}=t,r=new RefSet,i=Object.create(null),n=new Map,s=new RefSetCache;for(const e of a.get("Fields"))await this.#Ke("",null,e,n,t,r,s);const o=[];for(const[e,t]of n)o.push(Promise.all(t).then((t=>{(t=t.filter((e=>!!e))).length>0&&(i[e]=t)})));await Promise.all(o);return{allFiel\
ds:objectSize(i)>0?i:null,orphanFields:s}})))}get hasJSActions(){return shadow(this,"hasJSActions",this.pdfManager.ensureDoc("_parseHasJSActions"))}async _parseHasJSActions(){const[e,t]=await Promise.all([this.pdfManager.ensureCatalog("jsActions"),this.pdfManager.ensureDoc("fieldObjects")]);return!!e||!!t?.allFields&&Object.values(t.allFields).some((e=>e.some((e=>null!==e.actions))))}get calculationOrderIds(){const e=this.catalog.acroForm?.get("CO");if(!Array.isArray(e)||0===e.length)return shad\
ow(this,"calculationOrderIds",null);const t=[];for(const a of e)a instanceof Ref&&t.push(a.toString());return shadow(this,"calculationOrderIds",t.length?t:null)}get annotationGlobals(){return shadow(this,"annotationGlobals",AnnotationFactory.createGlobals(this.pdfManager))}}class BasePdfManager{constructor({docBaseUrl:e,docId:t,enableXfa:a,evaluatorOptions:r,handler:i,password:n}){this._docBaseUrl=function parseDocBaseUrl(e){if(e){const t=createValidAbsoluteUrl(e);if(t)return t.href;warn(`Invali\
d absolute docBaseUrl: "${e}".`)}return null}(e);this._docId=t;this._password=n;this.enableXfa=a;r.isOffscreenCanvasSupported&&=FeatureTest.isOffscreenCanvasSupported;r.isImageDecoderSupported&&=FeatureTest.isImageDecoderSupported;this.evaluatorOptions=Object.freeze(r);ImageResizer.setOptions(r);JpegStream.setOptions(r);OperatorList.setOptions(r);const s={...r,handler:i};JpxImage.setOptions(s);IccColorSpace.setOptions(s);CmykICCBasedCS.setOptions(s)}get docId(){return this._docId}get password(){\
return this._password}get docBaseUrl(){return this._docBaseUrl}ensureDoc(e,t){return this.ensure(this.pdfDocument,e,t)}ensureXRef(e,t){return this.ensure(this.pdfDocument.xref,e,t)}ensureCatalog(e,t){return this.ensure(this.pdfDocument.catalog,e,t)}getPage(e){return this.pdfDocument.getPage(e)}fontFallback(e,t){return this.pdfDocument.fontFallback(e,t)}cleanup(e=!1){return this.pdfDocument.cleanup(e)}async ensure(e,t,a){unreachable("Abstract method `ensure` called")}requestRange(e,t){unreachable\
("Abstract method `requestRange` called")}requestLoadedStream(e=!1){unreachable("Abstract method `requestLoadedStream` called")}sendProgressiveData(e){unreachable("Abstract method `sendProgressiveData` called")}updatePassword(e){this._password=e}terminate(e){unreachable("Abstract method `terminate` called")}}class LocalPdfManager extends BasePdfManager{constructor(e){super(e);const t=new Stream(e.source);this.pdfDocument=new PDFDocument(this,t);this._loadedStreamPromise=Promise.resolve(t)}async \
ensure(e,t,a){const r=e[t];return"function"==typeof r?r.apply(e,a):r}requestRange(e,t){return Promise.resolve()}requestLoadedStream(e=!1){return this._loadedStreamPromise}terminate(e){}}class NetworkPdfManager extends BasePdfManager{constructor(e){super(e);this.streamManager=new ChunkedStreamManager(e.source,{msgHandler:e.handler,length:e.length,disableAutoFetch:e.disableAutoFetch,rangeChunkSize:e.rangeChunkSize});this.pdfDocument=new PDFDocument(this,this.streamManager.getStream())}async ensure\
(e,t,a){try{const r=e[t];return"function"==typeof r?r.apply(e,a):r}catch(r){if(!(r instanceof MissingDataException))throw r;await this.requestRange(r.begin,r.end);return this.ensure(e,t,a)}}requestRange(e,t){return this.streamManager.requestRange(e,t)}requestLoadedStream(e=!1){return this.streamManager.requestAllChunks(e)}sendProgressiveData(e){this.streamManager.onReceiveData({chunk:e})}terminate(e){this.streamManager.abort(e)}}const Ac=1,kc=2,Cc=1,vc=2,Fc=3,Ic=4,Tc=5,Oc=6,Mc=7,Dc=8;function on\
Fn(){}function wrapReason(e){if(e instanceof AbortException||e instanceof InvalidPDFException||e instanceof PasswordException||e instanceof ResponseException||e instanceof UnknownErrorException)return e;e instanceof Error||"object"==typeof e&&null!==e||unreachable(\'wrapReason: Expected "reason" to be a (possibly cloned) Error.\');switch(e.name){case"AbortException":return new AbortException(e.message);case"InvalidPDFException":return new InvalidPDFException(e.message);case"PasswordException":retu\
rn new PasswordException(e.message,e.code);case"ResponseException":return new ResponseException(e.message,e.status,e.missing);case"UnknownErrorException":return new UnknownErrorException(e.message,e.details)}return new UnknownErrorException(e.message,e.toString())}class MessageHandler{#Je=new AbortController;constructor(e,t,a){this.sourceName=e;this.targetName=t;this.comObj=a;this.callbackId=1;this.streamId=1;this.streamSinks=Object.create(null);this.streamControllers=Object.create(null);this.ca\
llbackCapabilities=Object.create(null);this.actionHandler=Object.create(null);a.addEventListener("message",this.#Ye.bind(this),{signal:this.#Je.signal})}#Ye({data:e}){if(e.targetName!==this.sourceName)return;if(e.stream){this.#Ze(e);return}if(e.callback){const t=e.callbackId,a=this.callbackCapabilities[t];if(!a)throw new Error(`Cannot resolve callback ${t}`);delete this.callbackCapabilities[t];if(e.callback===Ac)a.resolve(e.data);else{if(e.callback!==kc)throw new Error("Unexpected callback case"\
);a.reject(wrapReason(e.reason))}return}const t=this.actionHandler[e.action];if(!t)throw new Error(`Unknown action from worker: ${e.action}`);if(e.callbackId){const a=this.sourceName,r=e.sourceName,i=this.comObj;Promise.try(t,e.data).then((function(t){i.postMessage({sourceName:a,targetName:r,callback:Ac,callbackId:e.callbackId,data:t})}),(function(t){i.postMessage({sourceName:a,targetName:r,callback:kc,callbackId:e.callbackId,reason:wrapReason(t)})}))}else e.streamId?this.#Qe(e):t(e.data)}on(e,t\
){const a=this.actionHandler;if(a[e])throw new Error(`There is already an actionName called "${e}"`);a[e]=t}send(e,t,a){this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,data:t},a)}sendWithPromise(e,t,a){const r=this.callbackId++,i=Promise.withResolvers();this.callbackCapabilities[r]=i;try{this.comObj.postMessage({sourceName:this.sourceName,targetName:this.targetName,action:e,callbackId:r,data:t},a)}catch(e){i.reject(e)}return i.promise}sendWithStream(e,t,a,\
r){const i=this.streamId++,n=this.sourceName,s=this.targetName,o=this.comObj;return new ReadableStream({start:a=>{const c=Promise.withResolvers();this.streamControllers[i]={controller:a,startCall:c,pullCall:null,cancelCall:null,isClosed:!1};o.postMessage({sourceName:n,targetName:s,action:e,streamId:i,data:t,desiredSize:a.desiredSize},r);return c.promise},pull:e=>{const t=Promise.withResolvers();this.streamControllers[i].pullCall=t;o.postMessage({sourceName:n,targetName:s,stream:Oc,streamId:i,des\
iredSize:e.desiredSize});return t.promise},cancel:e=>{assert(e instanceof Error,"cancel must have a valid reason");const t=Promise.withResolvers();this.streamControllers[i].cancelCall=t;this.streamControllers[i].isClosed=!0;o.postMessage({sourceName:n,targetName:s,stream:Cc,streamId:i,reason:wrapReason(e)});return t.promise}},a)}#Qe(e){const t=e.streamId,a=this.sourceName,r=e.sourceName,i=this.comObj,n=this,s=this.actionHandler[e.action],o={enqueue(e,n=1,s){if(this.isCancelled)return;const o=thi\
s.desiredSize;this.desiredSize-=n;if(o>0&&this.desiredSize<=0){this.sinkCapability=Promise.withResolvers();this.ready=this.sinkCapability.promise}i.postMessage({sourceName:a,targetName:r,stream:Ic,streamId:t,chunk:e},s)},close(){if(!this.isCancelled){this.isCancelled=!0;i.postMessage({sourceName:a,targetName:r,stream:Fc,streamId:t});delete n.streamSinks[t]}},error(e){assert(e instanceof Error,"error must have a valid reason");if(!this.isCancelled){this.isCancelled=!0;i.postMessage({sourceName:a,\
targetName:r,stream:Tc,streamId:t,reason:wrapReason(e)})}},sinkCapability:Promise.withResolvers(),onPull:null,onCancel:null,isCancelled:!1,desiredSize:e.desiredSize,ready:null};o.sinkCapability.resolve();o.ready=o.sinkCapability.promise;this.streamSinks[t]=o;Promise.try(s,e.data,o).then((function(){i.postMessage({sourceName:a,targetName:r,stream:Dc,streamId:t,success:!0})}),(function(e){i.postMessage({sourceName:a,targetName:r,stream:Dc,streamId:t,reason:wrapReason(e)})}))}#Ze(e){const t=e.strea\
mId,a=this.sourceName,r=e.sourceName,i=this.comObj,n=this.streamControllers[t],s=this.streamSinks[t];switch(e.stream){case Dc:e.success?n.startCall.resolve():n.startCall.reject(wrapReason(e.reason));break;case Mc:e.success?n.pullCall.resolve():n.pullCall.reject(wrapReason(e.reason));break;case Oc:if(!s){i.postMessage({sourceName:a,targetName:r,stream:Mc,streamId:t,success:!0});break}s.desiredSize<=0&&e.desiredSize>0&&s.sinkCapability.resolve();s.desiredSize=e.desiredSize;Promise.try(s.onPull||on\
Fn).then((function(){i.postMessage({sourceName:a,targetName:r,stream:Mc,streamId:t,success:!0})}),(function(e){i.postMessage({sourceName:a,targetName:r,stream:Mc,streamId:t,reason:wrapReason(e)})}));break;case Ic:assert(n,"enqueue should have stream controller");if(n.isClosed)break;n.controller.enqueue(e.chunk);break;case Fc:assert(n,"close should have stream controller");if(n.isClosed)break;n.isClosed=!0;n.controller.close();this.#et(n,t);break;case Tc:assert(n,"error should have stream control\
ler");n.controller.error(wrapReason(e.reason));this.#et(n,t);break;case vc:e.success?n.cancelCall.resolve():n.cancelCall.reject(wrapReason(e.reason));this.#et(n,t);break;case Cc:if(!s)break;const o=wrapReason(e.reason);Promise.try(s.onCancel||onFn,o).then((function(){i.postMessage({sourceName:a,targetName:r,stream:vc,streamId:t,success:!0})}),(function(e){i.postMessage({sourceName:a,targetName:r,stream:vc,streamId:t,reason:wrapReason(e)})}));s.sinkCapability.reject(o);s.isCancelled=!0;delete thi\
s.streamSinks[t];break;default:throw new Error("Unexpected stream case")}}async#et(e,t){await Promise.allSettled([e.startCall?.promise,e.pullCall?.promise,e.cancelCall?.promise]);delete this.streamControllers[t]}destroy(){this.#Je?.abort();this.#Je=null}}async function writeObject(e,t,a,{encrypt:r=null}){const i=r?.createCipherTransform(e.num,e.gen);a.push(`${e.num} ${e.gen} obj\\n`);t instanceof Dict?await writeDict(t,a,i):t instanceof BaseStream?await writeStream(t,a,i):(Array.isArray(t)||Array\
Buffer.isView(t))&&await writeArray(t,a,i);a.push("\\nendobj\\n")}async function writeDict(e,t,a){t.push("<<");for(const r of e.getKeys()){t.push(` /${escapePDFName(r)} `);await writeValue(e.getRaw(r),t,a)}t.push(">>")}async function writeStream(e,t,a){let r=e.getBytes();const{dict:i}=e,[n,s]=await Promise.all([i.getAsync("Filter"),i.getAsync("DecodeParms")]),o=isName(Array.isArray(n)?await i.xref.fetchIfRefAsync(n[0]):n,"FlateDecode");if(r.length>=256||o)try{const e=new CompressionStream("deflate\
"),t=e.writable.getWriter();await t.ready;t.write(r).then((async()=>{await t.ready;await t.close()})).catch((()=>{}));const a=await new Response(e.readable).arrayBuffer();r=new Uint8Array(a);let c,l;if(n){if(!o){c=Array.isArray(n)?[Name.get("FlateDecode"),...n]:[Name.get("FlateDecode"),n];s&&(l=Array.isArray(s)?[null,...s]:[null,s])}}else c=Name.get("FlateDecode");c&&i.set("Filter",c);l&&i.set("DecodeParms",l)}catch(e){info(`writeStream - cannot compress data: "${e}".`)}let c=bytesToString(r);a&\
&(c=a.encryptString(c));i.set("Length",c.length);await writeDict(i,t,a);t.push(" stream\\n",c,"\\nendstream")}async function writeArray(e,t,a){t.push("[");let r=!0;for(const i of e){r?r=!1:t.push(" ");await writeValue(i,t,a)}t.push("]")}async function writeValue(e,t,a){if(e instanceof Name)t.push(`/${escapePDFName(e.name)}`);else if(e instanceof Ref)t.push(`${e.num} ${e.gen} R`);else if(Array.isArray(e)||ArrayBuffer.isView(e))await writeArray(e,t,a);else if("string"==typeof e){a&&(e=a.encryptStrin\
g(e));t.push(`(${escapeString(e)})`)}else"number"==typeof e?t.push(numberToString(e)):"boolean"==typeof e?t.push(e.toString()):e instanceof Dict?await writeDict(e,t,a):e instanceof BaseStream?await writeStream(e,t,a):null===e?t.push("null"):warn(`Unhandled value in writer: ${typeof e}, please file a bug.`)}function writeInt(e,t,a,r){for(let i=t+a-1;i>a-1;i--){r[i]=255&e;e>>=8}return a+t}function writeString(e,t,a){const r=e.length;for(let i=0;i<r;i++)a[t+i]=255&e.charCodeAt(i);return t+r}functio\
n updateXFA({xfaData:e,xfaDatasetsRef:t,changes:a,xref:r}){if(null===e){e=function writeXFADataForAcroform(e,t){const a=new SimpleXMLParser({hasAttributes:!0}).parseFromString(e);for(const{xfa:e}of t){if(!e)continue;const{path:t,value:r}=e;if(!t)continue;const i=parseXFAPath(t);let n=a.documentElement.searchNode(i,0);!n&&i.length>1&&(n=a.documentElement.searchNode([i.at(-1)],0));n?n.childNodes=Array.isArray(r)?r.map((e=>new SimpleDOMNode("value",e))):[new SimpleDOMNode("#text",r)]:warn(`Node not\
 found for path: ${t}`)}const r=[];a.documentElement.dump(r);return r.join("")}(r.fetchIfRef(t).getString(),a)}const i=new StringStream(e);i.dict=new Dict(r);i.dict.setIfName("Type","EmbeddedFile");a.put(t,{data:i})}function getIndexes(e){const t=[];for(const{ref:a}of e)a.num===t.at(-2)+t.at(-1)?t[t.length-1]+=1:t.push(a.num,1);return t}function computeIDs(e,t,a){if(Array.isArray(t.fileIds)&&t.fileIds.length>0){const r=function computeMD5(e,t){const a=Math.floor(Date.now()/1e3),r=t.filename||"",\
i=[a.toString(),r,e.toString(),...t.infoMap.values()],n=Math.sumPrecise(i.map((e=>e.length))),s=new Uint8Array(n);let o=0;for(const e of i)o=writeString(e,o,s);return bytesToString(calculateMD5(s,0,s.length))}(e,t);a.set("ID",[t.fileIds[0],r])}}async function incrementalUpdate({originalData:e,xrefInfo:t,changes:a,xref:r=null,hasXfa:i=!1,xfaDatasetsRef:n=null,hasXfaDatasetsEntry:s=!1,needAppearances:o,acroFormRef:c=null,acroForm:l=null,xfaData:h=null,useXrefStream:u=!1}){await async function upda\
teAcroform({xref:e,acroForm:t,acroFormRef:a,hasXfa:r,hasXfaDatasetsEntry:i,xfaDatasetsRef:n,needAppearances:s,changes:o}){!r||i||n||warn("XFA - Cannot save it");if(!s&&(!r||!n||i))return;const c=t.clone();if(r&&!i){const e=t.get("XFA").slice();e.splice(2,0,"datasets");e.splice(3,0,n);c.set("XFA",e)}s&&c.set("NeedAppearances",!0);o.put(a,{data:c})}({xref:r,acroForm:l,acroFormRef:c,hasXfa:i,hasXfaDatasetsEntry:s,xfaDatasetsRef:n,needAppearances:o,changes:a});i&&updateXFA({xfaData:h,xfaDatasetsRef:\
n,changes:a,xref:r});const d=function getTrailerDict(e,t,a){const r=new Dict(null);r.set("Prev",e.startXRef);const i=e.newRef;if(a){t.put(i,{data:""});r.set("Size",i.num+1);r.setIfName("Type","XRef")}else r.set("Size",i.num);null!==e.rootRef&&r.set("Root",e.rootRef);null!==e.infoRef&&r.set("Info",e.infoRef);null!==e.encryptRef&&r.set("Encrypt",e.encryptRef);return r}(t,a,u),f=[],g=await async function writeChanges(e,t,a=[]){const r=[];for(const[i,{data:n}]of e.items())if(null!==n&&"string"!=type\
of n){await writeObject(i,n,a,t);r.push({ref:i,data:a.join("")});a.length=0}else r.push({ref:i,data:n});return r.sort(((e,t)=>e.ref.num-t.ref.num))}(a,r,f);let p=e.length;const m=e.at(-1);if(10!==m&&13!==m){f.push("\\n");p+=1}for(const{data:e}of g)null!==e&&f.push(e);await(u?async function getXRefStreamTable(e,t,a,r,i){const n=[];let s=0,o=0;for(const{ref:e,data:r}of a){let a;s=Math.max(s,t);if(null!==r){a=Math.min(e.gen,65535);n.push([1,t,a]);t+=r.length}else{a=Math.min(e.gen+1,65535);n.push([0,\
0,a])}o=Math.max(o,a)}r.set("Index",getIndexes(a));const c=[1,getSizeInBytes(s),getSizeInBytes(o)];r.set("W",c);computeIDs(t,e,r);const l=Math.sumPrecise(c),h=new Uint8Array(l*n.length),u=new Stream(h);u.dict=r;let d=0;for(const[e,t,a]of n){d=writeInt(e,c[0],d,h);d=writeInt(t,c[1],d,h);d=writeInt(a,c[2],d,h)}await writeObject(e.newRef,u,i,{});i.push("startxref\\n",t.toString(),"\\n%%EOF\\n")}(t,p,g,d,f):async function getXRefTable(e,t,a,r,i){i.push("xref\\n");const n=getIndexes(a);let s=0;for(const{\
ref:e,data:r}of a){if(e.num===n[s]){i.push(`${n[s]} ${n[s+1]}\\n`);s+=2}if(null!==r){i.push(`${t.toString().padStart(10,"0")} ${Math.min(e.gen,65535).toString().padStart(5,"0")} n\\r\\n`);t+=r.length}else i.push(`0000000000 ${Math.min(e.gen+1,65535).toString().padStart(5,"0")} f\\r\\n`)}computeIDs(t,e,r);i.push("trailer\\n");await writeDict(r,i);i.push("\\nstartxref\\n",t.toString(),"\\n%%EOF\\n")}(t,p,g,d,f));const b=e.length+Math.sumPrecise(f.map((e=>e.length))),y=new Uint8Array(b);y.set(e);let w=e.leng\
th;for(const e of f)w=writeString(e,w,y);return y}class PDFWorkerStream{constructor(e){this._msgHandler=e;this._contentLength=null;this._fullRequestReader=null;this._rangeRequestReaders=[]}getFullReader(){assert(!this._fullRequestReader,"PDFWorkerStream.getFullReader can only be called once.");this._fullRequestReader=new PDFWorkerStreamReader(this._msgHandler);return this._fullRequestReader}getRangeReader(e,t){const a=new PDFWorkerStreamRangeReader(e,t,this._msgHandler);this._rangeRequestReaders\
.push(a);return a}cancelAllRequests(e){this._fullRequestReader?.cancel(e);for(const t of this._rangeRequestReaders.slice(0))t.cancel(e)}}class PDFWorkerStreamReader{constructor(e){this._msgHandler=e;this.onProgress=null;this._contentLength=null;this._isRangeSupported=!1;this._isStreamingSupported=!1;const t=this._msgHandler.sendWithStream("GetReader");this._reader=t.getReader();this._headersReady=this._msgHandler.sendWithPromise("ReaderHeadersReady").then((e=>{this._isStreamingSupported=e.isStre\
amingSupported;this._isRangeSupported=e.isRangeSupported;this._contentLength=e.contentLength}))}get headersReady(){return this._headersReady}get contentLength(){return this._contentLength}get isStreamingSupported(){return this._isStreamingSupported}get isRangeSupported(){return this._isRangeSupported}async read(){const{value:e,done:t}=await this._reader.read();return t?{value:void 0,done:!0}:{value:e.buffer,done:!1}}cancel(e){this._reader.cancel(e)}}class PDFWorkerStreamRangeReader{constructor(e\
,t,a){this._msgHandler=a;this.onProgress=null;const r=this._msgHandler.sendWithStream("GetRangeReader",{begin:e,end:t});this._reader=r.getReader()}get isStreamingSupported(){return!1}async read(){const{value:e,done:t}=await this._reader.read();return t?{value:void 0,done:!0}:{value:e.buffer,done:!1}}cancel(e){this._reader.cancel(e)}}class WorkerTask{constructor(e){this.name=e;this.terminated=!1;this._capability=Promise.withResolvers()}get finished(){return this._capability.promise}finish(){this.\
_capability.resolve()}terminate(){this.terminated=!0}ensureNotTerminated(){if(this.terminated)throw new Error("Worker task was terminated")}}class WorkerMessageHandler{static{"undefined"==typeof window&&!e&&"undefined"!=typeof self&&"function"==typeof self.postMessage&&"onmessage"in self&&this.initializeFromPort(self)}static setup(e,t){let a=!1;e.on("test",(t=>{if(!a){a=!0;e.send("test",t instanceof Uint8Array)}}));e.on("configure",(e=>{!function setVerbosityLevel(e){Number.isInteger(e)&&(da=e)}\
(e.verbosity)}));e.on("GetDocRequest",(e=>this.createDocumentHandler(e,t)))}static createDocumentHandler(e,t){let a,r=!1,i=null;const n=new Set,s=getVerbosityLevel(),{docId:o,apiVersion:c}=e,l="5.4.54";if(c!==l)throw new Error(`The API version "${c}" does not match the Worker version "${l}".`);const buildMsg=(e,t)=>`The \\`${e}.prototype\\` contains unexpected enumerable property "${t}", thus breaking e.g. \\`for...in\\` iteration of ${e}s.`;for(const e in{})throw new Error(buildMsg("Object",e));for\
(const e in[])throw new Error(buildMsg("Array",e));const h=o+"_worker";let u=new MessageHandler(h,o,t);function ensureNotTerminated(){if(r)throw new Error("Worker was terminated")}function startWorkerTask(e){n.add(e)}function finishWorkerTask(e){e.finish();n.delete(e)}async function loadDocument(e){await a.ensureDoc("checkHeader");await a.ensureDoc("parseStartXRef");await a.ensureDoc("parse",[e]);await a.ensureDoc("checkFirstPage",[e]);await a.ensureDoc("checkLastPage",[e]);const t=await a.ensur\
eDoc("isPureXfa");if(t){const e=new WorkerTask("loadXfaResources");startWorkerTask(e);await a.ensureDoc("loadXfaResources",[u,e]);finishWorkerTask(e)}const[r,i]=await Promise.all([a.ensureDoc("numPages"),a.ensureDoc("fingerprints")]);return{numPages:r,fingerprints:i,htmlForXfa:t?await a.ensureDoc("htmlForXfa"):null}}function setupDoc(e){function onSuccess(e){ensureNotTerminated();u.send("GetDoc",{pdfInfo:e})}function onFailure(e){ensureNotTerminated();if(e instanceof PasswordException){const t=n\
ew WorkerTask(`PasswordException: response ${e.code}`);startWorkerTask(t);u.sendWithPromise("PasswordRequest",e).then((function({password:e}){finishWorkerTask(t);a.updatePassword(e);pdfManagerReady()})).catch((function(){finishWorkerTask(t);u.send("DocException",e)}))}else u.send("DocException",wrapReason(e))}function pdfManagerReady(){ensureNotTerminated();loadDocument(!1).then(onSuccess,(function(e){ensureNotTerminated();e instanceof XRefParseException?a.requestLoadedStream().then((function(){\
ensureNotTerminated();loadDocument(!0).then(onSuccess,onFailure)})):onFailure(e)}))}ensureNotTerminated();(async function getPdfManager({data:e,password:t,disableAutoFetch:a,rangeChunkSize:r,length:n,docBaseUrl:s,enableXfa:c,evaluatorOptions:l}){const h={source:null,disableAutoFetch:a,docBaseUrl:s,docId:o,enableXfa:c,evaluatorOptions:l,handler:u,length:n,password:t,rangeChunkSize:r};if(e){h.source=e;return new LocalPdfManager(h)}const d=new PDFWorkerStream(u),f=d.getFullReader(),g=Promise.withRe\
solvers();let p,m=[],b=0;f.headersReady.then((function(){if(f.isRangeSupported){h.source=d;h.length=f.contentLength;h.disableAutoFetch||=f.isStreamingSupported;p=new NetworkPdfManager(h);for(const e of m)p.sendProgressiveData(e);m=[];g.resolve(p);i=null}})).catch((function(e){g.reject(e);i=null}));new Promise((function(e,t){const readChunk=function({value:e,done:a}){try{ensureNotTerminated();if(a){if(!p){const e=arrayBuffersToBytes(m);m=[];n&&e.length!==n&&warn("reported HTTP length is different\
 from actual");h.source=e;p=new LocalPdfManager(h);g.resolve(p)}i=null;return}b+=e.byteLength;f.isStreamingSupported||u.send("DocProgress",{loaded:b,total:Math.max(b,f.contentLength||0)});p?p.sendProgressiveData(e):m.push(e);f.read().then(readChunk,t)}catch(e){t(e)}};f.read().then(readChunk,t)})).catch((function(e){g.reject(e);i=null}));i=e=>{d.cancelAllRequests(e)};return g.promise})(e).then((function(e){if(r){e.terminate(new AbortException("Worker was terminated."));throw new Error("Worker was\
 terminated")}a=e;a.requestLoadedStream(!0).then((e=>{u.send("DataLoaded",{length:e.bytes.byteLength})}))})).then(pdfManagerReady,onFailure)}u.on("GetPage",(function(e){return a.getPage(e.pageIndex).then((function(e){return Promise.all([a.ensure(e,"rotate"),a.ensure(e,"ref"),a.ensure(e,"userUnit"),a.ensure(e,"view")]).then((function([e,t,a,r]){return{rotate:e,ref:t,refStr:t?.toString()??null,userUnit:a,view:r}}))}))}));u.on("GetPageIndex",(function(e){const t=Ref.get(e.num,e.gen);return a.ensure\
Catalog("getPageIndex",[t])}));u.on("GetDestinations",(function(e){return a.ensureCatalog("destinations")}));u.on("GetDestination",(function(e){return a.ensureCatalog("getDestination",[e.id])}));u.on("GetPageLabels",(function(e){return a.ensureCatalog("pageLabels")}));u.on("GetPageLayout",(function(e){return a.ensureCatalog("pageLayout")}));u.on("GetPageMode",(function(e){return a.ensureCatalog("pageMode")}));u.on("GetViewerPreferences",(function(e){return a.ensureCatalog("viewerPreferences")}))\
;u.on("GetOpenAction",(function(e){return a.ensureCatalog("openAction")}));u.on("GetAttachments",(function(e){return a.ensureCatalog("attachments")}));u.on("GetDocJSActions",(function(e){return a.ensureCatalog("jsActions")}));u.on("GetPageJSActions",(function({pageIndex:e}){return a.getPage(e).then((e=>a.ensure(e,"jsActions")))}));u.on("GetOutline",(function(e){return a.ensureCatalog("documentOutline")}));u.on("GetOptionalContentConfig",(function(e){return a.ensureCatalog("optionalContentConfig"\
)}));u.on("GetPermissions",(function(e){return a.ensureCatalog("permissions")}));u.on("GetMetadata",(function(e){return Promise.all([a.ensureDoc("documentInfo"),a.ensureCatalog("metadata")])}));u.on("GetMarkInfo",(function(e){return a.ensureCatalog("markInfo")}));u.on("GetData",(function(e){return a.requestLoadedStream().then((e=>e.bytes))}));u.on("GetAnnotations",(function({pageIndex:e,intent:t}){return a.getPage(e).then((function(a){const r=new WorkerTask(`GetAnnotations: page ${e}`);startWork\
erTask(r);return a.getAnnotationsData(u,r,t).then((e=>{finishWorkerTask(r);return e}),(e=>{finishWorkerTask(r);throw e}))}))}));u.on("GetFieldObjects",(function(e){return a.ensureDoc("fieldObjects").then((e=>e?.allFields||null))}));u.on("HasJSActions",(function(e){return a.ensureDoc("hasJSActions")}));u.on("GetCalculationOrderIds",(function(e){return a.ensureDoc("calculationOrderIds")}));u.on("SaveDocument",(async function({isPureXfa:e,numPages:t,annotationStorage:r,filename:i}){const n=[a.reque\
stLoadedStream(),a.ensureCatalog("acroForm"),a.ensureCatalog("acroFormRef"),a.ensureDoc("startXRef"),a.ensureDoc("xref"),a.ensureDoc("linearization"),a.ensureCatalog("structTreeRoot")],s=new RefSetCache,o=[],c=e?null:getNewAnnotationsMap(r),[l,h,d,f,g,p,m]=await Promise.all(n),b=g.trailer.getRaw("Root")||null;let y;if(c){m?await m.canUpdateStructTree({pdfManager:a,newAnnotationsByPage:c})&&(y=m):await StructTreeRoot.canCreateStructureTree({catalogRef:b,pdfManager:a,newAnnotationsByPage:c})&&(y=n\
ull);const e=AnnotationFactory.generateImages(r.values(),g,a.evaluatorOptions.isOffscreenCanvasSupported),t=void 0===y?o:[];for(const[r,i]of c)t.push(a.getPage(r).then((t=>{const a=new WorkerTask(`Save (editor): page ${r}`);startWorkerTask(a);return t.saveNewAnnotations(u,a,i,e,s).finally((function(){finishWorkerTask(a)}))})));null===y?o.push(Promise.all(t).then((async()=>{await StructTreeRoot.createStructureTree({newAnnotationsByPage:c,xref:g,catalogRef:b,pdfManager:a,changes:s})}))):y&&o.push(\
Promise.all(t).then((async()=>{await y.updateStructureTree({newAnnotationsByPage:c,pdfManager:a,changes:s})})))}if(e)o.push(a.ensureDoc("serializeXfaData",[r]));else for(let e=0;e<t;e++)o.push(a.getPage(e).then((function(t){const a=new WorkerTask(`Save: page ${e}`);startWorkerTask(a);return t.save(u,a,r,s).finally((function(){finishWorkerTask(a)}))})));const w=await Promise.all(o);let x=null;if(e){x=w[0];if(!x)return l.bytes}else if(0===s.size)return l.bytes;const S=d&&h instanceof Dict&&s.value\
s().some((e=>e.needAppearances)),k=h instanceof Dict&&h.get("XFA")||null;let C=null,v=!1;if(Array.isArray(k)){for(let e=0,t=k.length;e<t;e+=2)if("datasets"===k[e]){C=k[e+1];v=!0}null===C&&(C=g.getNewTemporaryRef())}else k&&warn("Unsupported XFA type.");let F=Object.create(null);if(g.trailer){const e=new Map,t=g.trailer.get("Info")||null;if(t instanceof Dict)for(const[a,r]of t)"string"==typeof r&&e.set(a,stringToPDFString(r));F={rootRef:b,encryptRef:g.trailer.getRaw("Encrypt")||null,newRef:g.getN\
ewTemporaryRef(),infoRef:g.trailer.getRaw("Info")||null,infoMap:e,fileIds:g.trailer.get("ID")||null,startXRef:p?f:g.lastXRefStreamPos??f,filename:i}}return incrementalUpdate({originalData:l.bytes,xrefInfo:F,changes:s,xref:g,hasXfa:!!k,xfaDatasetsRef:C,hasXfaDatasetsEntry:v,needAppearances:S,acroFormRef:d,acroForm:h,xfaData:x,useXrefStream:isDict(g.topDict,"XRef")}).finally((()=>{g.resetNewTemporaryRef()}))}));u.on("GetOperatorList",(function(e,t){const r=e.pageIndex;a.getPage(r).then((function(a\
){const i=new WorkerTask(`GetOperatorList: page ${r}`);startWorkerTask(i);const n=s>=Ae?Date.now():0;a.getOperatorList({handler:u,sink:t,task:i,intent:e.intent,cacheKey:e.cacheKey,annotationStorage:e.annotationStorage,modifiedIds:e.modifiedIds}).then((function(e){finishWorkerTask(i);n&&info(`page=${r+1} - getOperatorList: time=${Date.now()-n}ms, len=${e.length}`);t.close()}),(function(e){finishWorkerTask(i);i.terminated||t.error(e)}))}))}));u.on("GetTextContent",(function(e,t){const{pageIndex:r,\
includeMarkedContent:i,disableNormalization:n}=e;a.getPage(r).then((function(e){const a=new WorkerTask("GetTextContent: page "+r);startWorkerTask(a);const o=s>=Ae?Date.now():0;e.extractTextContent({handler:u,task:a,sink:t,includeMarkedContent:i,disableNormalization:n}).then((function(){finishWorkerTask(a);o&&info(`page=${r+1} - getTextContent: time=`+(Date.now()-o)+"ms");t.close()}),(function(e){finishWorkerTask(a);a.terminated||t.error(e)}))}))}));u.on("GetStructTree",(function(e){return a.getP\
age(e.pageIndex).then((e=>a.ensure(e,"getStructTree")))}));u.on("FontFallback",(function(e){return a.fontFallback(e.id,u)}));u.on("Cleanup",(function(e){return a.cleanup(!0)}));u.on("Terminate",(function(e){r=!0;const t=[];if(a){a.terminate(new AbortException("Worker was terminated."));const e=a.cleanup();t.push(e);a=null}else clearGlobalCaches();i?.(new AbortException("Worker was terminated."));for(const e of n){t.push(e.finished);e.terminate()}return Promise.all(t).then((function(){u.destroy()\
;u=null}))}));u.on("Ready",(function(t){setupDoc(e);e=null}));return h}static initializeFromPort(e){const t=new MessageHandler("worker","main",e);this.setup(t,e);t.send("ready",null)}}globalThis.pdfjsWorker={WorkerMessageHandler};export{WorkerMessageHandler};',pdf_worker_min$1=Object.freeze(Object.defineProperty({__proto__:null,default:pdf_worker_min},Symbol.toStringTag,{value:"Module"}));export{app,start};
