iobroker.lovelace
Version:
With this adapter you can build visualization for ioBroker with Home Assistant Lovelace UI
1 lines • 49.8 kB
JavaScript
export const __rspack_esm_id=47313;export const __rspack_esm_ids=[47313];export const __webpack_modules__={93480(e,t,i){i.r(t),i.d(t,{EditorState:()=>l.$t,EditorView:()=>s.Lz,JINJA_FUNCTION_ARG_TYPES:()=>w,autocompletion:()=>u.yU,bracketMatching:()=>n.SG,closeBrackets:()=>u.wm,closeBracketsKeymap:()=>u.Bc,closeBracketsOverride:()=>B,closePercentBrace:()=>o.z0,closeSearchPanel:()=>f.jO,crosshairCursor:()=>s.HJ,defaultKeymap:()=>a.pw,drawSelection:()=>s.VH,dropCursor:()=>s.A,foldGutter:()=>n.Lv,haJinjaCompletionSource:()=>I,haJinjaHoverSource:()=>z,haSyntaxHighlighting:()=>oe,haTheme:()=>ae,highlightActiveLine:()=>s.dz,highlightSelectionMatches:()=>f.gN,highlightingFor:()=>n.GY,history:()=>a.b6,historyKeymap:()=>a.cL,hoverTooltip:()=>s.Ux,indentationMarkers:()=>m.h,keymap:()=>s.w4,langCompartment:()=>H,langs:()=>L,lineNumbers:()=>s.$K,linewrapCompartment:()=>O,lintGutter:()=>p.pJ,lintKeymap:()=>p.$w,openSearchPanel:()=>f.pi,readonlyCompartment:()=>U,rectangularSelection:()=>s.D4,search:()=>f.$P,searchKeymap:()=>f.Eo,selectedCompletion:()=>u.gC,setDiagnostics:()=>p.LH,syntaxTree:()=>n.mv,tabKeyBindings:()=>ie,tags:()=>c._A,tooltips:()=>s.vX,yamlLintCompartment:()=>P,yamlScalarHighlightStyle:()=>te,yamlScalarHighlighter:()=>ee});var a=i(9657),n=i(85745),o=i(71617),r=i(25478),l=i(18668),s=i(81329),c=i(53603),d=i(48992),u=i(28099),f=i(5507),p=i(17748),m=i(67715),b=(i(44114),i(18111),i(7588),i(61701),i(45367),i(92731),i(17642),i(58004),i(33853),i(45876),i(32475),i(15024),i(31698),i(62826)),h=i(5124),v=i(22441);i(67094);class g extends h.WF{render(){const e="string"==typeof this.completion.info?this.completion.info:void 0;return h.qy` <div class="header"> <div class="sig"> <strong>${this.completion.label}</strong> ${this.completion.detail?h.qy`<span class="detail">(${this.completion.detail})</span>`:h.s6} </div> ${this.docUrl?h.qy`<a class="doc-link" href="${this.docUrl}" target="_blank" rel="noreferrer" title="${this.openDocumentation}"><ha-svg-icon .path="${"M11,18H13V16H11V18M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,6A4,4 0 0,0 8,10H10A2,2 0 0,1 12,8A2,2 0 0,1 14,10C14,12 11,11.75 11,15H13C13,12.75 16,12.5 16,10A4,4 0 0,0 12,6Z"}"></ha-svg-icon></a>`:h.s6} </div> ${e?h.qy`<div class="desc">${e}</div>`:h.s6} `}constructor(...e){super(...e),this.openDocumentation="Open documentation"}}g.styles=h.AH`:host{display:block;padding:6px 10px;max-width:360px;line-height:1.5}.header{display:flex;align-items:center;gap:6px;margin-bottom:4px}.sig{font-family:var(--ha-font-family-code);font-size:.9em;flex:1;min-width:0}.detail{color:var(--secondary-text-color)}.doc-link{flex-shrink:0;display:inline-flex;align-items:center;color:var(--secondary-text-color);opacity:.7;line-height:1}.doc-link:hover{opacity:1;color:var(--primary-color)}.doc-link ha-svg-icon{width:16px;height:16px}.desc{font-size:.9em;color:var(--secondary-text-color)}`,(0,b.Cg)([(0,v.MZ)({attribute:!1})],g.prototype,"completion",void 0),(0,b.Cg)([(0,v.MZ)({attribute:!1})],g.prototype,"docUrl",void 0),(0,b.Cg)([(0,v.MZ)({attribute:!1})],g.prototype,"openDocumentation",void 0),g=(0,b.Cg)([(0,v.EM)("ha-code-editor-jinja-hover")],g);i(42653);class y extends h.WF{render(){return h.qy` ${this.heading?h.qy`<div class="heading">${this.heading}</div>`:h.s6} <ha-code-editor-completion-items .items="${this.items}"></ha-code-editor-completion-items> `}constructor(...e){super(...e),this.items=[]}}y.styles=h.AH`:host{display:block;padding:6px 10px;max-width:360px}.heading{font-weight:var(--ha-font-weight-bold);margin-bottom:4px}`,(0,b.Cg)([(0,v.MZ)({attribute:!1})],y.prototype,"heading",void 0),(0,b.Cg)([(0,v.MZ)({attribute:!1})],y.prototype,"items",void 0),y=(0,b.Cg)([(0,v.EM)("ha-code-editor-jinja-arg-hover")],y);const _=[{snippet:'states("${entity_id}")',detail:"entity_id, rounded?, with_unit?",info:"Returns the state of an entity as a string."},{snippet:'is_state("${entity_id}", "${value}")',detail:"entity_id, value",info:"Returns true if the entity state matches the given value (or one of the values in a list)."},{snippet:'state_attr("${entity_id}", "${attribute}")',detail:"entity_id, attribute",info:"Returns the value of the given attribute for the entity, or None if it doesn't exist."},{snippet:'is_state_attr("${entity_id}", "${attribute}", ${value})',detail:"entity_id, attribute, value",info:"Returns true if the entity attribute matches the given value."},{snippet:'state_attr_translated("${entity_id}", "${attribute}")',detail:"entity_id, attribute",info:"Returns the translated value of the given attribute for the entity."},{snippet:'state_translated("${entity_id}")',detail:"entity_id",info:"Returns the translated state of an entity."},{snippet:'expand("${entity_id}")',detail:"entity_id, ...",info:"Expands groups and returns a list of all entities in the group and their states."},{snippet:'area_id("${entity_id_or_name}")',detail:"entity_id or area name",info:"Returns the area ID for a given entity ID or area name."},{snippet:'area_name("${area_id_or_entity}")',detail:"area_id or entity_id",info:"Returns the area name for a given area ID or entity ID."},{snippet:'area_entities("${area_id_or_name}")',detail:"area_id or area name",info:"Returns a list of entity IDs that belong to the given area."},{snippet:'area_devices("${area_id_or_name}")',detail:"area_id or area name",info:"Returns a list of device IDs that belong to the given area."},{snippet:'device_id("${entity_id}")',detail:"entity_id",info:"Returns the device ID for the given entity ID."},{snippet:'device_name("${device_id_or_entity}")',detail:"device_id or entity_id",info:"Returns the device name for the given device ID or entity ID."},{snippet:'device_attr("${device_id_or_entity}", "${attribute}")',detail:"device_id or entity_id, attribute",info:"Returns the value of the given attribute for the device."},{snippet:'device_entities("${device_id}")',detail:"device_id",info:"Returns a list of entity IDs for the given device."},{snippet:'entity_name("${entity_id}")',detail:"entity_id",info:"Returns the name of the entity."},{snippet:'config_entry_id("${entity_id}")',detail:"entity_id",info:"Returns the config entry ID associated with the entity."},{snippet:'config_entry_attr("${entity_id}", "${attribute}")',detail:"entity_id, attribute",info:"Returns the value of the given config entry attribute for the entity."},{snippet:'integration_entities("${integration}")',detail:"integration",info:"Returns a list of entity IDs belonging to the given integration."},{snippet:'floor_id("${area_id_or_name}")',detail:"area_id or area name",info:"Returns the floor ID for a given area."},{snippet:'floor_name("${floor_id}")',detail:"floor_id",info:"Returns the floor name for the given floor ID."},{snippet:'floor_areas("${floor_id}")',detail:"floor_id",info:"Returns a list of area IDs that belong to the given floor."},{snippet:'floor_entities("${floor_id}")',detail:"floor_id",info:"Returns a list of entity IDs that belong to the given floor."},{snippet:'label_id("${label_name}")',detail:"label name",info:"Returns the label ID for the given label name."},{snippet:'label_name("${label_id}")',detail:"label_id",info:"Returns the label name for the given label ID."},{snippet:'label_description("${label_id}")',detail:"label_id",info:"Returns the description of the given label."},{snippet:'label_areas("${label_id}")',detail:"label_id",info:"Returns a list of area IDs that have the given label."},{snippet:'label_devices("${label_id}")',detail:"label_id",info:"Returns a list of device IDs that have the given label."},{snippet:'label_entities("${label_id}")',detail:"label_id",info:"Returns a list of entity IDs that have the given label."},{snippet:"now()",detail:"",info:"Returns the current local datetime."},{snippet:"utcnow()",detail:"",info:"Returns the current UTC datetime."},{snippet:'today_at("${time_str}")',detail:"time_str",info:'Returns a datetime object for the given time string (e.g. "08:00") today in local time.'},{snippet:"as_datetime(${value})",detail:"value",info:"Converts a timestamp or string to a datetime object."},{snippet:"as_local(${datetime})",detail:"datetime",info:"Converts a UTC datetime to the local timezone."},{snippet:'as_timedelta("${string}")',detail:"string",info:"Parses an ISO 8601 duration string into a timedelta object."},{snippet:"as_timestamp(${value})",detail:"value, default?",info:"Converts a datetime or string to a Unix timestamp."},{snippet:'strptime("${string}", "${format}")',detail:"string, format, default?",info:"Parses a date/time string using the given format."},{snippet:"timedelta(${days})",detail:"days?, seconds?, microseconds?, milliseconds?, minutes?, hours?, weeks?",info:"Creates a timedelta object."},{snippet:'timestamp_custom(${timestamp}, "${format}")',detail:"timestamp, format, local_time?",info:"Formats a Unix timestamp using a custom strftime format string."},{snippet:"timestamp_local(${timestamp})",detail:"timestamp, default?",info:"Converts a Unix timestamp to a local time string."},{snippet:"timestamp_utc(${timestamp})",detail:"timestamp, default?",info:"Converts a Unix timestamp to a UTC time string."},{snippet:"time_since(${datetime})",detail:"datetime",info:"Returns a human-readable string of how long ago the datetime was."},{snippet:"time_until(${datetime})",detail:"datetime",info:"Returns a human-readable string of how long until the datetime."},{snippet:"log(${value})",detail:"value, base?",info:"Returns the logarithm of value. Defaults to natural log; optionally specify base."},{snippet:"sin(${value})",detail:"value",info:"Returns the sine of value (in radians)."},{snippet:"cos(${value})",detail:"value",info:"Returns the cosine of value (in radians)."},{snippet:"tan(${value})",detail:"value",info:"Returns the tangent of value (in radians)."},{snippet:"asin(${value})",detail:"value",info:"Returns the arcsine of value in radians."},{snippet:"acos(${value})",detail:"value",info:"Returns the arccosine of value in radians."},{snippet:"atan(${value})",detail:"value",info:"Returns the arctangent of value in radians."},{snippet:"atan2(${y}, ${x})",detail:"y, x",info:"Returns atan(y/x) in radians."},{snippet:"sqrt(${value})",detail:"value",info:"Returns the square root of value."},{snippet:"average(${value}, ${default})",detail:"value, ...",info:"Returns the average of a list of numbers."},{snippet:"median(${value})",detail:"value, ...",info:"Returns the median of a list of numbers."},{snippet:"statistical_mode(${value})",detail:"value, ...",info:"Returns the statistical mode (most common value) of a list."},{snippet:"clamp(${value}, ${min}, ${max})",detail:"value, min, max",info:"Clamps value between min and max."},{snippet:"remap(${value}, ${in_min}, ${in_max}, ${out_min}, ${out_max})",detail:"value, in_min, in_max, out_min, out_max",info:"Re-maps a number from one range to another."},{snippet:"wrap(${value}, ${min}, ${max})",detail:"value, min, max",info:"Wraps value into the range [min, max)."},{snippet:"bitwise_and(${value}, ${mask})",detail:"value, mask",info:"Bitwise AND of two integers."},{snippet:"bitwise_or(${value}, ${mask})",detail:"value, mask",info:"Bitwise OR of two integers."},{snippet:"bitwise_xor(${value}, ${mask})",detail:"value, mask",info:"Bitwise XOR of two integers."},{snippet:"int(${value})",detail:"value, default?",info:"Converts value to integer. Returns default (0) on error."},{snippet:"float(${value})",detail:"value, default?",info:"Converts value to float. Returns default (0.0) on error."},{snippet:"bool(${value})",detail:"value, default?",info:"Converts value to boolean. Returns default on error."},{snippet:"is_number(${value})",detail:"value",info:"Returns true if value can be interpreted as a number."},{snippet:"typeof(${value})",detail:"value",info:"Returns a string representing the type of value."},{snippet:'regex_search("${pattern}", "${string}")',detail:"pattern, string, ignorecase?",info:"Returns true if pattern matches anywhere in string."},{snippet:'regex_match("${pattern}", "${string}")',detail:"pattern, string, ignorecase?",info:"Returns true if pattern matches at the start of string."},{snippet:'regex_replace("${pattern}", "${replacement}", "${string}")',detail:"pattern, replacement, string, ignorecase?",info:"Replaces all matches of pattern in string with replacement."},{snippet:'regex_findall("${pattern}", "${string}")',detail:"pattern, string, ignorecase?",info:"Returns a list of all non-overlapping matches of pattern in string."},{snippet:'regex_findall_index("${pattern}", "${string}", ${index})',detail:"pattern, string, index, ignorecase?",info:"Returns the match at the given group index from regex_findall."},{snippet:"combine(${dict1}, ${dict2})",detail:"dict, ..., recursive?, list_merge?",info:"Merges two or more dictionaries."},{snippet:"flatten(${list})",detail:"list, levels?",info:"Flattens a nested list."},{snippet:"intersect(${list1}, ${list2})",detail:"list1, list2",info:"Returns the intersection of two lists."},{snippet:"union(${list1}, ${list2})",detail:"list1, list2",info:"Returns the union of two lists."},{snippet:"difference(${list1}, ${list2})",detail:"list1, list2",info:"Returns elements in list1 that are not in list2."},{snippet:"symmetric_difference(${list1}, ${list2})",detail:"list1, list2",info:"Returns elements in either list but not both."},{snippet:'from_json("${string}")',detail:"string",info:"Parses a JSON string into a Python object."},{snippet:"to_json(${value})",detail:"value, ensure_ascii?, sort_keys?, indent?",info:"Serializes a value to a JSON string."},{snippet:"merge_response(${response1}, ${response2})",detail:"response, ...",info:"Merges multiple service response dictionaries."},{snippet:"shuffle(${list})",detail:"list",info:"Returns a copy of the list in a random order."},{snippet:'base64_encode("${string}")',detail:"string",info:"Encodes a string using Base64."},{snippet:'base64_decode("${string}")',detail:"string",info:"Decodes a Base64-encoded string."},{snippet:'from_hex("${string}")',detail:"string",info:"Converts a hex string to an integer."},{snippet:'md5("${string}")',detail:"string",info:"Returns the MD5 hash of a string."},{snippet:'sha1("${string}")',detail:"string",info:"Returns the SHA-1 hash of a string."},{snippet:'sha256("${string}")',detail:"string",info:"Returns the SHA-256 hash of a string."},{snippet:'sha512("${string}")',detail:"string",info:"Returns the SHA-512 hash of a string."},{snippet:'pack("${format}", ${value})',detail:"format, value, ...",info:"Packs values into a bytes object using struct.pack format."},{snippet:'unpack("${format}", ${bytes})',detail:"format, bytes, offset?",info:"Unpacks values from a bytes object using struct.unpack format."},{snippet:"iif(${condition}, ${if_true}, ${if_false})",detail:"condition, if_true, if_false?",info:"Inline if: returns if_true when condition is truthy, otherwise if_false."},{snippet:"as_function(${value})",detail:"value",info:"Converts a value to a callable template function."},{snippet:"apply(${function}, ${args})",detail:"function, args?, kwargs?",info:"Calls the given function with the provided arguments."},{snippet:"zip(${list1}, ${list2})",detail:"list1, list2, ...",info:"Returns a list of tuples pairing elements from each list."},{snippet:'ord("${character}")',detail:"character",info:"Returns the Unicode code point for the given character."},{snippet:"closest(${lat}, ${lon}, ${entities})",detail:"lat, lon, entities",info:"Returns the closest entity to the given coordinates."},{snippet:"distance(${lat1}, ${lon1}, ${lat2}, ${lon2})",detail:"lat1, lon1, lat2, lon2",info:"Returns the distance in kilometers between two points."}],x={"${entity_id}":"entity_id","${entity_id_or_name}":"entity_id","${area_id_or_name}":"area_id","${area_id_or_entity}":"area_id","${device_id}":"device_id","${device_id_or_entity}":"device_id","${floor_id}":"floor_id","${label_id}":"label_id","${integration}":"integration","${attribute}":"attribute"},w=new Map(_.flatMap(e=>{const t=e.snippet.split("(")[0],i=e.snippet.slice(e.snippet.indexOf("(")+1,e.snippet.lastIndexOf(")")).split(",").map(e=>e.trim()),a=new Map;return i.forEach((e,t)=>{const i=e.match(/\$\{[^}]+\}/);if(i){const e=x[i[0]];e&&a.set(t,e)}}),a.size>0?[[t,a]]:[]})),k=_.map(e=>(0,u.Gw)(e.snippet,{label:e.snippet.split("(")[0],detail:e.detail,info:e.info,type:"function"})),$=new Set(["now","utcnow"]),R=[{label:"abs",type:"function",info:"Returns the absolute value of a number."},{label:"attr",type:"function",detail:"name",info:"Returns an attribute of an object. Similar to getattr."},{label:"batch",type:"function",detail:"linecount, fill_with?",info:"Collects items into batches of a given size, optionally filled with a placeholder."},{label:"capitalize",type:"function",info:"Capitalizes the first character of a string and lowercases the rest."},{label:"center",type:"function",detail:"width=80",info:"Centers a string in a field of a given width."},{label:"count",type:"function",info:"Returns the number of items in a sequence or mapping. Alias for length."},{label:"default",type:"function",detail:"value, boolean=false",info:"Returns the value if it is defined and not empty, otherwise returns the provided default."},{label:"d",type:"function",detail:"value, boolean=false",info:"Shorthand alias for the default filter."},{label:"dictsort",type:"function",detail:"case_sensitive=false, by='key', reverse=false",info:"Sorts a dictionary by key or value and returns a list of (key, value) pairs."},{label:"e",type:"function",info:"Escapes HTML special characters. Shorthand alias for escape."},{label:"escape",type:"function",info:"Escapes HTML special characters (<, >, &, ', \") in a string."},{label:"filesizeformat",type:"function",detail:"binary=false",info:"Formats a byte count into a human-readable file size like '1.2 MB'."},{label:"first",type:"function",info:"Returns the first item of a sequence."},{label:"float",type:"function",detail:"default=0.0",info:"Converts a value to a floating-point number."},{label:"forceescape",type:"function",info:"Enforces HTML escaping even on values already marked safe."},{label:"format",type:"function",detail:"*args, **kwargs",info:"Applies Python's % string formatting using the given arguments."},{label:"groupby",type:"function",detail:"attribute, default?, case_sensitive=false",info:"Groups a sequence of objects by a common attribute."},{label:"indent",type:"function",detail:"width=4, first=false, blank=false",info:"Indents all lines of a string by the given number of spaces."},{label:"int",type:"function",detail:"default=0, base=10",info:"Converts a value to an integer."},{label:"items",type:"function",info:"Returns an iterable of (key, value) pairs for a dictionary."},{label:"join",type:"function",detail:"d='', attribute?",info:"Joins elements of a sequence into a string with an optional separator."},{label:"last",type:"function",info:"Returns the last item of a sequence."},{label:"length",type:"function",info:"Returns the number of items in a sequence or mapping."},{label:"list",type:"function",info:"Converts a value to a list. Useful to iterate over strings character by character."},{label:"tuple",type:"function",info:"Converts an iterable to a tuple. Similar to list, but the result is immutable."},{label:"lower",type:"function",info:"Converts a string to lowercase."},{label:"map",type:"function",detail:"attribute?, default?",info:"Applies a filter or looks up an attribute on each item of a sequence."},{label:"max",type:"function",detail:"attribute?",info:"Returns the largest item in a sequence."},{label:"min",type:"function",detail:"attribute?",info:"Returns the smallest item in a sequence."},{label:"pprint",type:"function",info:"Pretty-prints a variable for debugging purposes."},{label:"random",type:"function",info:"Returns a random item from a sequence."},{label:"reject",type:"function",detail:"test, *args",info:"Filters a sequence by rejecting items for which a test returns true."},{label:"rejectattr",type:"function",detail:"attribute, test?, *args",info:"Filters a sequence of objects by rejecting those where an attribute test passes."},{label:"replace",type:"function",detail:"old, new, count?",info:"Replaces occurrences of a substring. Optionally limits the number of replacements."},{label:"reverse",type:"function",info:"Reverses a sequence or string."},{label:"round",type:"function",detail:"precision=0, method='common'",info:"Rounds a number to a given precision. Method can be 'common', 'ceil', or 'floor'."},{label:"safe",type:"function",info:"Marks a string as safe HTML so it is not escaped on output."},{label:"select",type:"function",detail:"test, *args",info:"Filters a sequence to include only items for which a test returns true."},{label:"selectattr",type:"function",detail:"attribute, test?, *args",info:"Filters a sequence of objects to include only those where an attribute test passes."},{label:"slice",type:"function",detail:"slices, fill_with?",info:"Slices a sequence into a given number of parts."},{label:"sort",type:"function",detail:"reverse=false, case_sensitive=false, attribute?",info:"Sorts a sequence. Optionally in reverse, case-sensitive, or by an attribute."},{label:"string",type:"function",info:"Converts an object to a string."},{label:"striptags",type:"function",info:"Strips HTML/XML tags from a string and normalizes whitespace."},{label:"sum",type:"function",detail:"attribute?, start=0",info:"Returns the sum of a sequence of numbers, optionally summing an attribute."},{label:"title",type:"function",info:"Converts a string to title case."},{label:"tojson",type:"function",detail:"indent?",info:"Serializes an object to a JSON string. Safe to use inside HTML."},{label:"trim",type:"function",detail:"chars?",info:"Strips leading and trailing whitespace (or specified characters) from a string."},{label:"truncate",type:"function",detail:"length=255, killwords=false, end='...', leeway?",info:"Truncates a string to the given length, appending an ellipsis."},{label:"unique",type:"function",detail:"case_sensitive=false, attribute?",info:"Returns a sequence with duplicate items removed."},{label:"upper",type:"function",info:"Converts a string to uppercase."},{label:"urlencode",type:"function",info:"URL-encodes a string or a mapping."},{label:"urlize",type:"function",detail:"trim_url_limit?, nofollow?, target?, rel?, extra_schemes?",info:"Converts URLs in plain text into clickable HTML links."},{label:"wordcount",type:"function",info:"Counts the number of words in a string."},{label:"wordwrap",type:"function",detail:"width=79, break_long_words=true, wrapstring?",info:"Wraps words in a string at the given column width."},{label:"xmlattr",type:"function",detail:"autospace=true",info:"Builds an HTML attribute string from a dictionary of values."},...[{label:"is_defined",type:"function",info:"Returns true if the value is defined (not undefined or None)."},{label:"add",type:"function",detail:"amount, default?",info:"Adds the given amount to a numeric value. Returns the default if the value cannot be converted to a number."},{label:"multiply",type:"function",detail:"factor",info:"Multiplies the value by the given factor."},{label:"ordinal",type:"function",info:"Converts an integer to its ordinal string representation (e.g. 1 → '1st', 2 → '2nd')."},{label:"relative_time",type:"function",info:"Converts a datetime to a human-readable relative time string like '2 minutes ago'."},{label:"slugify",type:"function",detail:"separator='-'",info:"Converts a string to a URL-friendly slug."},{label:"version",type:"function",info:"Converts a version string to a comparable version object."},..._.filter(e=>{const t=e.snippet.split("(")[0];return!$.has(t)}).map(e=>({label:e.snippet.split("(")[0],type:"function",detail:e.detail||void 0,info:e.info}))]],A=[{label:"boolean",type:"function",info:"Test: returns true if the value is a boolean."},{label:"callable",type:"function",info:"Test: returns true if the value is callable (a function or macro)."},{label:"defined",type:"function",info:"Test: returns true if the variable is defined."},{label:"divisibleby",type:"function",detail:"number",info:"Test: returns true if the value is divisible by the given number."},{label:"eq",type:"function",detail:"other",info:"Test: returns true if the value equals other. Equivalent to ==."},{label:"escaped",type:"function",info:"Test: returns true if the value has been marked as safe (escaped)."},{label:"even",type:"function",info:"Test: returns true if the value is an even number."},{label:"filter",type:"function",detail:"name",info:"Test: returns true if a filter with the given name exists."},{label:"float",type:"function",info:"Test: returns true if the value is a float."},{label:"ge",type:"function",detail:"other",info:"Test: returns true if the value is greater than or equal to other."},{label:"gt",type:"function",detail:"other",info:"Test: returns true if the value is greater than other."},{label:"in",type:"function",detail:"sequence",info:"Test: returns true if the value is contained in the given sequence."},{label:"integer",type:"function",info:"Test: returns true if the value is an integer."},{label:"iterable",type:"function",info:"Test: returns true if the value can be iterated over."},{label:"le",type:"function",detail:"other",info:"Test: returns true if the value is less than or equal to other."},{label:"lower",type:"function",info:"Test: returns true if the value is a lowercase string."},{label:"lt",type:"function",detail:"other",info:"Test: returns true if the value is less than other."},{label:"mapping",type:"function",info:"Test: returns true if the value is a mapping (dictionary)."},{label:"ne",type:"function",detail:"other",info:"Test: returns true if the value is not equal to other."},{label:"none",type:"function",info:"Test: returns true if the value is None."},{label:"number",type:"function",info:"Test: returns true if the value is a number."},{label:"odd",type:"function",info:"Test: returns true if the value is an odd number."},{label:"sameas",type:"function",detail:"other",info:"Test: returns true if the value is the same object as other (identity check)."},{label:"sequence",type:"function",info:"Test: returns true if the value is a sequence (list, string, etc.)."},{label:"string",type:"function",info:"Test: returns true if the value is a string."},{label:"test",type:"function",detail:"name",info:"Test: returns true if a test with the given name exists."},{label:"undefined",type:"function",info:"Test: returns true if the variable is undefined."},{label:"upper",type:"function",info:"Test: returns true if the value is an uppercase string."},{label:"range",type:"function",detail:"start, stop?, step?",info:"Returns a list of numbers from start to stop (exclusive), similar to Python's range()."},{label:"lipsum",type:"function",detail:"n=5, html=true, min=20, max=100",info:"Generates n paragraphs of lorem ipsum placeholder text."},{label:"dict",type:"function",detail:"**kwargs",info:"Creates a dictionary from keyword arguments. Useful when key names are not valid identifiers."},{label:"cycler",type:"function",detail:"*items",info:"Creates an object that cycles through a sequence of values. Call .next() to advance, .current for the current value, .reset() to restart."},{label:"joiner",type:"function",detail:"sep=', '",info:"Returns an empty string the first time it is called, then the separator on subsequent calls. Useful for joining in loops."},{label:"namespace",type:"function",detail:"**kwargs",info:"Creates an object that allows variable assignment across scopes inside a loop."},{label:"loop",type:"variable",info:"Special variable inside a {% for %} block. Provides loop.index, loop.index0, loop.first, loop.last, loop.length, loop.depth, etc."},{label:"super",type:"function",info:"Renders the contents of the parent block inside a {% block %} override."},{label:"self",type:"variable",info:"Reference to the current template, allowing access to its block contents."},{label:"true",type:"keyword",info:"Boolean true literal."},{label:"false",type:"keyword",info:"Boolean false literal."},{label:"varargs",type:"variable",info:"Inside a macro, holds extra positional arguments not explicitly declared."},{label:"kwargs",type:"variable",info:"Inside a macro, holds extra keyword arguments not explicitly declared."},{label:"caller",type:"function",info:"Inside a macro called via {% call %}, renders the body of the call block."},{label:"name",type:"variable",info:"Inside a macro, holds the name of the macro itself."},{label:"arguments",type:"variable",info:"Inside a macro, holds the declared argument names."},{label:"catch_kwargs",type:"variable",info:"Inside a macro, indicates whether the macro accepts extra keyword arguments via kwargs."},{label:"catch_varargs",type:"variable",info:"Inside a macro, indicates whether the macro accepts extra positional arguments via varargs."},...k,{label:"areas",type:"variable",info:"A list of all area IDs in ioBroker."},{label:"floors",type:"variable",info:"A list of all floor IDs in ioBroker."},{label:"labels",type:"variable",info:"A list of all label IDs in ioBroker."},{label:"now",type:"variable",info:"The current local datetime object."},{label:"utcnow",type:"variable",info:"The current UTC datetime object."},{label:"e",type:"variable",info:"Euler's number (approximately 2.71828)."},{label:"pi",type:"variable",info:"The mathematical constant π (approximately 3.14159)."},{label:"tau",type:"variable",info:"The mathematical constant τ = 2π (approximately 6.28318)."},{label:"version",type:"variable",info:"The current ioBroker version as a string."},{label:"relative_time",type:"variable",info:"When used as a filter, converts a datetime to a human-readable relative string like '2 minutes ago'."},{label:"issue",type:"variable",info:"The current repair issue object, available inside repair issue templates."},{label:"issues",type:"variable",info:"A list of all active repair issues."},{label:"contains",type:"function",detail:"value",info:"Test: returns true if the sequence contains the given value."},{label:"false",type:"function",info:"Test: returns true if the value is boolean false."},{label:"has_value",type:"function",info:"Test: returns true if the entity exists and does not have an unknown or unavailable state."},{label:"is_device_attr",type:"function",detail:"device_id, attribute, value",info:"Test: returns true if the device attribute matches the given value."},{label:"is_hidden_entity",type:"function",info:"Test: returns true if the entity is hidden."},{label:"is_number",type:"function",info:"Test: returns true if the value can be interpreted as a number."},{label:"is_state",type:"function",detail:"entity_id, state",info:"Test: returns true if the entity's state matches the given value."},{label:"is_state_attr",type:"function",detail:"entity_id, attribute, value",info:"Test: returns true if the entity attribute matches the given value."},{label:"match",type:"function",detail:"pattern",info:"Test: returns true if the value matches the given regular expression pattern."},{label:"search",type:"function",detail:"pattern",info:"Test: returns true if the pattern is found anywhere in the value."},{label:"true",type:"function",info:"Test: returns true if the value is boolean true."}],C=[{label:"raw",type:"keyword",info:"Marks a block whose content is output as-is, without Jinja2 processing."},{label:"endraw",type:"keyword",info:"Ends a {% raw %} block."},{label:"filter",type:"keyword",detail:"filter_name",info:"Applies a filter to the content of the block."},{label:"endfilter",type:"keyword",info:"Ends a {% filter %} block."},{label:"trans",type:"keyword",info:"Marks a block for translation."},{label:"pluralize",type:"keyword",info:"Provides plural and singular forms inside a {% trans %} block."},{label:"endtrans",type:"keyword",info:"Ends a {% trans %} block."},{label:"with",type:"keyword",info:"Creates a new inner scope where variables can be set."},{label:"endwith",type:"keyword",info:"Ends a {% with %} block."},{label:"autoescape",type:"keyword",detail:"true|false",info:"Enables or disables HTML autoescaping for the block."},{label:"endautoescape",type:"keyword",info:"Ends an {% autoescape %} block."},{label:"if",type:"keyword",detail:"condition",info:"Renders the block only when the condition is true."},{label:"elif",type:"keyword",detail:"condition",info:"Alternative condition in an {% if %} block."},{label:"else",type:"keyword",info:"Fallback branch in an {% if %} or {% for %} block."},{label:"endif",type:"keyword",info:"Ends an {% if %} block."},{label:"for",type:"keyword",detail:"variable in iterable",info:"Iterates over a list or other iterable. Provides loop.index, loop.first, loop.last, etc."},{label:"endfor",type:"keyword",info:"Ends a {% for %} block."},{label:"call",type:"keyword",detail:"macro_name(args)",info:"Calls a macro and passes the call block's content as caller()."},{label:"endcall",type:"keyword",info:"Ends a {% call %} block."},{label:"block",type:"keyword",detail:"block_name",info:"Defines a named block that child templates can override."},{label:"endblock",type:"keyword",info:"Ends a {% block %} definition."},{label:"set",type:"keyword",detail:"variable = value",info:"Assigns a value to a variable in the current scope."},{label:"endset",type:"keyword",info:"Ends a block {% set %} that captures rendered content."},{label:"macro",type:"keyword",detail:"name(args)",info:"Defines a reusable template function (macro)."},{label:"endmacro",type:"keyword",info:"Ends a {% macro %} definition."},{label:"import",type:"keyword",detail:"template as name",info:"Imports macros from another template."},{label:"include",type:"keyword",detail:"template",info:"Inserts another template inline at this point."},{label:"break",type:"keyword",info:"Exits the current {% for %} loop early."},{label:"continue",type:"keyword",info:"Skips the rest of the current loop iteration and continues with the next."},{label:"debug",type:"keyword",info:"Dumps debug information about the current context."},{label:"do",type:"keyword",detail:"expression",info:"Evaluates an expression without printing its result."},{label:"extends",type:"keyword",detail:"template",info:"Makes the current template extend a parent template."}],T=/^[\w\u00c0-\uffff]*$/,S=new Set(["Interpolation","VariableName","MemberExpression","CallExpression","FilterExpression","BinaryExpression","NotExpression","ConditionalExpression","ArrayExpression","TupleExpression","ParenthesizedExpression","DictExpression","ArgumentList","NamedArgument","IfStatement","ForStatement","SetStatement","BlockStatement","MacroStatement","CallStatement","FilterStatement","WithStatement","TransStatement","AutoescapeStatement","Tag"]);function E(e){let t=e;for(;t;){if(S.has(t.name))return!0;t=t.parent}return!1}function I(e){const{state:t,pos:i}=e,a=(0,n.mv)(t).resolveInner(i,-1).enterUnfinishedNodesBefore(i),o=a.childBefore(i)?.name??a.name;if("FilterName"===a.name)return{options:R,from:a.from,validFor:T};if(e.explicit&&("FilterOp"===o||"filter"===o))return{options:R,from:i,validFor:T};if("TagName"===a.name)return{options:C,from:a.from,validFor:T};if(e.explicit&&"{%"===o)return{options:C,from:i,validFor:T};if("StringLiteral"===a.name||"StringLiteral"===a.parent?.name)return null;if("VariableName"===a.name)return{options:A,from:a.from,validFor:T};const r=e.matchBefore(/[\w\u00c0-\uffff]+$/);return r&&E(a)?{options:A,from:r.from,validFor:T}:null}const j=new Set(["abs","acos","add","add","apply","area_devices","area_entities","area_id","area_name","areas","as_datetime","as_function","as_local","as_timedelta","as_timestamp","asin","atan","atan2","attr","average","base64_decode","base64_encode","batch","bitwise_and","bitwise_or","bitwise_xor","bool","boolean","callable","capitalize","center","clamp","closest","combine","config_entry_attr","config_entry_id","contains","cos","cycler","default","defined","device_attr","device_entities","device_id","device_name","dict","dictsort","difference","distance","divisibleby","e","entity_name","eq","escape","even","expand","false","filesizeformat","first","flatten","float","floor_areas","floor_entities","floor_id","floor_name","floors","forceescape","format","from_hex","from_json","ge","groupby","gt","has_value","iif","in","indent","int","integer","integration_entities","intersect","is_defined","is_device_attr","is_hidden_entity","is_number","is_state","is_state_attr","issue","issues","items","iterable","join","joiner","label_areas","label_description","label_devices","label_entities","label_id","label_name","labels","last","le","length","lipsum","list","log","lower","lt","map","mapping","match","max","md5","median","merge_response","min","multiply","namespace","ne","none","now","number","odd","ord","ordinal","pack","pi","pprint","random","range","regex_findall","regex_findall_index","regex_match","regex_replace","regex_search","reject","rejectattr","relative_time","remap","replace","reverse","round","safe","sameas","search","select","selectattr","sequence","set","sha1","sha256","sha512","shuffle","sin","slice","slugify","sort","sqrt","state_attr","state_attr_translated","state_translated","states","statistical_mode","string","striptags","strptime","sum","symmetric_difference","tan","tau","time_since","time_until","timedelta","timestamp_custom","timestamp_local","timestamp_utc","title","to_json","today_at","tojson","trim","true","truncate","tuple","typeof","undefined","union","unique","unpack","upper","urlencode","urlize","utcnow","version","wordcount","wordwrap","wrap","xmlattr","zip"]),M=new Map(R.map(e=>[e.label,e])),q=new Map(C.map(e=>[e.label,e])),N=new Map(A.map(e=>[e.label,e]));const D=/[\w\u00c0-\uffff]+/;function z(e,t,i,a){const{state:o}=e;if(a){const e=function(e,t){const i=(0,n.mv)(e).resolveInner(t);if("StringLiteral"!==i.name)return null;const a=e.doc.sliceString(i.from,i.to);if(a.length<2)return null;const o=a.slice(1,-1);if(!o)return null;const r=i.from,l=i.to,s=i.parent;if("SubscriptExpression"===s?.name){const t=s.firstChild;if(t&&"states"===e.doc.sliceString(t.from,t.to))return{argType:"entity_id",value:o,from:r,to:l}}const c=i.parent;if("ArgumentList"!==c?.name)return null;const d=c.parent;if("CallExpression"!==d?.name)return null;const u=d.firstChild;if(!u)return null;const f=e.doc.sliceString(u.from,u.to),p=w.get(f);if(!p)return null;let m=0,b=c.firstChild?.nextSibling;for(;b&&")"!==b.name;){if(","!==b.name){if(b.from===i.from)break;m++}b=b.nextSibling}const h=p.get(m);if(!h)return null;if("attribute"===h){let t;for(const[e,i]of p)if("entity_id"===i){t=e;break}let i=null;if(void 0!==t){let a=0,n=c.firstChild?.nextSibling;for(;n&&")"!==n.name;){if(","!==n.name){if(a===t&&"StringLiteral"===n.name){i=e.doc.sliceString(n.from,n.to).slice(1,-1);break}a++}n=n.nextSibling}}return{argType:h,value:o,from:r,to:l,siblingEntityId:i}}return{argType:h,value:o,from:r,to:l}}(o,t);if(e){const t=function(e,t,i,a){let n;const o=[];if("entity_id"===e){const e=i.states[t];if(!e)return null;n=i.formatEntityName(t)??t;const a=i.formatEntityState(t);o.push({label:i.localize("ui.components.entity.entity-state-picker.state"),value:a,subValue:e.state===a?void 0:e.state});const r=i.entities[t];if(r){const e=r.device_id,t=e?i.devices[e]:void 0,a=t?(t.name_by_user||t.name)?.trim():void 0;a&&o.push({label:i.localize("ui.components.device-picker.device"),value:a});const n=r.area_id||t?.area_id||void 0,l=n?i.areas[n]:void 0;if(l?.name){o.push({label:i.localize("ui.components.area-picker.area"),value:l.name});const e=l.floor_id?i.floors[l.floor_id]:void 0;e?.name&&o.push({label:i.localize("ui.components.floor-picker.floor"),value:e.name})}}}else if("device_id"===e){const e=i.devices[t];if(!e)return null;if(n=(e.name_by_user||e.name)?.trim(),!n)return null;const a=e.area_id||void 0,r=a?i.areas[a]:void 0;if(r?.name){o.push({label:i.localize("ui.components.area-picker.area"),value:r.name});const e=r.floor_id?i.floors[r.floor_id]:void 0;e?.name&&o.push({label:i.localize("ui.components.floor-picker.floor"),value:e.name})}}else if("area_id"===e){const e=i.areas[t];if(!e?.name)return null;n=e.name;const a=e.floor_id?i.floors[e.floor_id]:void 0;a?.name&&o.push({label:i.localize("ui.components.floor-picker.floor"),value:a.name})}else if("floor_id"===e){const e=i.floors[t];if(!e?.name)return null;n=e.name}else if("label_id"===e){const e=i.labels[t];if(!e?.name)return null;n=e.name,e.description&&o.push({label:i.localize("ui.panel.config.labels.headers.description"),value:e.description})}else{if("attribute"!==e)return null;{if(!a)return null;const e=i.states[a];if(!e||!(t in e.attributes))return null;n=i.formatAttributeName(a,t);const r=i.formatAttributeValue(a,t),l=e.attributes[t],s=null!=l?String(l):void 0;o.push({label:i.localize("ui.components.entity.entity-state-picker.state"),value:r,subValue:void 0!==s&&s!==r?s:void 0})}}if(!n&&!o.length)return null;const r=document.createElement("ha-code-editor-jinja-arg-hover");return n&&(r.heading=n),r.items=o,r}(e.argType,e.value,a,e.siblingEntityId);if(t)return{pos:e.from,end:e.to,above:!0,create:()=>({dom:t})}}}const r=(0,n.mv)(o).resolveInner(t),l=o.doc.lineAt(t).text,s=o.doc.lineAt(t).from,c=t-s;let d=c,u=c;for(;d>0&&D.test(l[d-1]);)d--;for(;u<l.length&&D.test(l[u]);)u++;if(d===u)return null;const f=l.slice(d,u),p=s+d,m=s+u;let b,h=!1;if("FilterName"===r.name)b=M.get(f);else if("TagName"===r.name)b=q.get(f),h=!0;else if(E(r)){const e=o.doc.sliceString(Math.max(0,p-20),p);b=/\|\s*$/.test(e)?M.get(f):N.get(f)}if(!b)return null;const v=i&&!h&&j.has(b.label)?`${i}/template-functions/${b.label}/`:void 0,g=a?.localize("ui.components.codemirror.open_documentation"),y=function(e,t,i){if(!("string"==typeof e.info?e.info:void 0)&&!e.detail)return null;const a=document.createElement("ha-code-editor-jinja-hover");return a.completion=e,t&&(a.docUrl=t),i&&(a.openDocumentation=i),a}(b,v,g);return y?{pos:p,end:m,above:!0,create:()=>({dom:y})}:null}const F=(0,o.Rt)({base:(0,r.oQ)()}),L={jinja2:F,yaml:F},B=l.Nb.highest(l.$t.languageData.of(()=>[{closeBrackets:{brackets:["(","[","{","'",'"']}}])),H=new l.xx,U=new l.xx,O=new l.xx,P=new l.xx,W=s.NZ.mark({class:"yaml-bool"}),J=s.NZ.mark({class:"yaml-number"}),Z=s.NZ.mark({class:"yaml-null"}),K=s.NZ.mark({class:"yaml-string"}),V=/^(?:true|True|TRUE|false|False|FALSE|yes|Yes|YES|no|No|NO|on|On|ON|off|Off|OFF)$/,G=/^(?:~|null|Null|NULL)$/,Y=/^(?:[+-]?(?:0|[1-9][0-9]*)(?:_[0-9]+)*|0o[0-7]+|0x[0-9a-fA-F]+)$/,X=/^(?:[+-]?(?:[0-9][0-9_]*)?\.[0-9.]*(?:[eE][+-]?[0-9]+)?|[+-]?\.(?:inf|Inf|INF)|\.(?:nan|NaN|NAN))$/;function Q(e){const t=new l.vB,{doc:i}=e.state,a=(0,n.mv)(e.state);for(const{from:n,to:o}of e.visibleRanges)a.iterate({from:n,to:o,enter(e){if("Template"===e.name||"Text"===e.name){const a=e.node.tree,r=a?a.prop(d.uY.mounted):null;if(r){const a=e.from,l=Math.max(n,e.from)-a,s=Math.min(o,e.to)-a;r.tree.iterate({from:l,to:s,enter(e){if("Literal"!==e.name)return;if("Key"===e.node.parent?.name)return;const n=e.from+a,o=e.to+a,r=i.sliceString(n,o);let l;l=V.test(r)?W:G.test(r)?Z:Y.test(r)||X.test(r)?J:K,t.add(n,o,l)}})}return!1}if("Literal"!==e.name)return;if("Key"===e.node.parent?.name)return;const a=i.sliceString(e.from,e.to);let r;r=V.test(a)?W:G.test(a)?Z:Y.test(a)||X.test(a)?J:K,t.add(e.from,e.to,r)}});return t.finish()}const ee=s.Z9.fromClass(class{update(e){(e.docChanged||e.viewportChanged)&&(this.decorations=Q(e.view))}constructor(e){this.decorations=Q(e)}},{decorations:e=>e.decorations}),te=s.Lz.baseTheme({".yaml-bool":{color:"var(--codemirror-atom, #F90)"},".yaml-null":{color:"var(--codemirror-atom, #F90)"},".yaml-number":{color:"var(--codemirror-number, #ca7841)"},".yaml-string":{color:"var(--codemirror-string, #07a)"}}),ie=[{key:"Tab",run:a.UY},{key:"Shift-Tab",run:a.Mg}],ae=s.Lz.theme({"&":{color:"var(--primary-text-color)",backgroundColor:"var(--code-editor-background-color, var(--card-background-color))",borderRadius:"var(--mdc-shape-small, 4px) var(--mdc-shape-small, 4px) 0px 0px",caretColor:"var(--secondary-text-color)",height:"var(--code-mirror-height, auto)",maxHeight:"var(--code-mirror-max-height, unset)"},"&.cm-editor":{"--indent-marker-active-bg-color":"var(--divider-color)"},"&.cm-editor.cm-focused":{outline:"none"},"&.cm-focused .cm-cursor":{borderLeftColor:"var(--primary-color)"},".cm-dropCursor":{borderLeftColor:"var(--secondary-text-color)"},".cm-selectionBackground, ::selection":{backgroundColor:"rgba(var(--rgb-primary-color), 0.1)"},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{backgroundColor:"rgba(var(--rgb-primary-color), 0.2)"},".cm-activeLine":{backgroundColor:"rgba(var(--rgb-secondary-text-color), 0.1)"},".cm-scroller":{outline:"none"},".cm-content":{caretColor:"var(--secondary-text-color)",paddingTop:"16px",paddingBottom:"16px"},".cm-panels":{backgroundColor:"var(--primary-background-color)",color:"var(--primary-text-color)"},".cm-panels.top":{borderBottom:"1px solid var(--divider-color)"},".cm-panels.bottom":{borderTop:"1px solid var(--divider-color)"},".cm-button":{border:"1px solid var(--primary-color)",padding:"0px 16px",textTransform:"uppercase",margin:"4px",background:"none",color:"var(--primary-color)",fontFamily:"var(--mdc-typography-button-font-family, var(--mdc-typography-font-family, var(--ha-font-family-body)))",fontSize:"var(--mdc-typography-button-font-size, 0.875rem)",height:"36px",fontWeight:"var(--mdc-typography-button-font-weight, 500)",borderRadius:"4px",letterSpacing:"var(--mdc-typography-button-letter-spacing, 0.0892857em)"},".cm-textfield":{padding:"4px 0px 5px",borderRadius:"0",fontSize:"16px",color:"var(--primary-text-color)",border:"0",background:"none",fontFamily:"Roboto",borderBottom:"1px solid var(--secondary-text-color)",margin:"4px 4px 0","& ::placeholder":{color:"var(--secondary-text-color)"},"&:focus":{outline:"none",borderBottom:"2px solid var(--primary-color)",paddingBottom:"4px"}},".cm-tooltip":{color:"var(--primary-text-color)",backgroundColor:"var(--code-editor-background-color, var(--card-background-color))",border:"1px solid var(--divider-color)",borderRadius:"var(--mdc-shape-medium, 4px)",maxWidth:"min(420px, calc(var(--safe-width) - var(--ha-space-8)))",boxSizing:"border-box",boxShadow:"0px 5px 5px -3px rgb(0 0 0 / 20%), 0px 8px 10px 1px rgb(0 0 0 / 14%), 0px 3px 14px 2px rgb(0 0 0 / 12%)"},".cm-tooltip.cm-tooltip-autocomplete":{maxWidth:"min(420px, calc(var(--safe-width) - var(--ha-space-8)), calc(100% - var(--ha-space-2)))"},".cm-tooltip-autocomplete > ul":{maxWidth:"100%",boxSizing:"border-box"},"& .cm-tooltip.cm-tooltip-autocomplete > ul > li":{padding:"4px 8px"},"& .cm-tooltip-autocomplete ul li[aria-selected]":{background:"var(--primary-color)",color:"var(--text-primary-color)"},".cm-completionIcon":{display:"none"},".cm-completionDetail":{fontFamily:"Roboto",color:"var(--secondary-text-color)"},"li[aria-selected] .cm-completionDetail":{color:"var(--text-primary-color)"},".cm-selectionMatch":{backgroundColor:"rgba(var(--rgb-primary-color), 0.1)"},".cm-searchMatch":{backgroundColor:"rgba(var(--rgb-accent-color), .2)",outline:"1px solid rgba(var(--rgb-accent-color), .4)"},".cm-searchMatch.selected":{backgroundColor:"rgba(var(--rgb-accent-color), .4)",outline:"1px solid var(--accent-color)"},".cm-gutters":{backgroundColor:"var(--code-editor-gutter-color, var(--secondary-background-color, whitesmoke))",color:"var(--secondary-text-color)",border:"none",borderRight:"1px solid var(--secondary-text-color)",paddingRight:"1px"},"&.cm-focused .cm-gutters":{borderRight:"2px solid var(--primary-color)",paddingRight:"0"},".cm-gutterElement.lineNumber":{color:"inherit"},".cm-lint-marker-error":{color:"var(--error-color)"},".cm-lint-marker-warning":{color:"var(--warning-color)"},".cm-lint-marker-info":{color:"var(--info-color, var(--primary-color))"},".cm-diagnostic":{fontFamily:"var(--mdc-typography-font-family, var(--ha-font-family-body))"},".cm-diagnostic.cm-diagnostic-error":{borderLeft:"3px solid var(--error-color)"},".cm-diagnostic.cm-diagnostic-warning":{borderLeft:"3px solid var(--warning-color)"}}),ne=n.cr.define([{tag:c._A.keyword,color:"var(--codemirror-keyword, #6262FF)"},{tag:[c._A.name,c._A.deleted,c._A.character,c._A.propertyName,c._A.macroName],color:"var(--codemirror-property, #905)"},{tag:[c._A.function(c._A.variableName),c._A.labelName],color:"var(--codemirror-variable, #07a)"},{tag:[c._A.color,c._A.constant(c._A.name),c._A.standard(c._A.name)],color:"var(--codemirror-qualifier, #690)"},{tag:[c._A.definition(c._A.name),c._A.separator],color:"var(--codemirror-def, #8DA6CE)"},{tag:[c._A.typeName,c._A.className,c._A.number,c._A.changed,c._A.annotation,c._A.modifier,c._A.self,c._A.namespace],color:"var(--codemirror-number, #ca7841)"},{tag:[c._A.operator,c._A.operatorKeyword,c._A.url,c._A.escape,c._A.regexp,c._A.link,c._A.special(c._A.string)],color:"var(--codemirror-operator, #cda869)"},{tag:c._A.comment,color:"var(--codemirror-comment, #777)"},{tag:c._A.meta,color:"var(--codemirror-meta, var(--primary-text-color))"},{tag:c._A.strong,fontWeight:"bold"},{tag:c._A.emphasis,fontStyle:"italic"},{tag:c._A.link,color:"var(--primary-color)",textDecoration:"underline"},{tag:c._A.heading,fontWeight:"bold"},{tag:c._A.atom,color:"var(--codemirror-atom, #F90)"},{tag:c._A.bool,color:"var(--codemirror-atom, #F90)"},{tag:c._A.special(c._A.variableName),color:"var(--codemirror-variable-2, #690)"},{tag:c._A.processingInstruction,color:"var(--secondary-text-color)"},{tag:c._A.string,color:"var(--codemirror-string, #07a)"},{tag:c._A.inserted,color:"var(--codemirror-string2, #07a)"},{tag:c._A.invalid,color:"var(--error-color)"},{tag:[c._A.squareBracket,c._A.brace,c._A.punctuation],color:"var(--codemirror-def, #8DA6CE)"}]),oe=(0,n.y9)(ne)}};