import{n as e}from"./rolldown-runtime-BG2f4sTM.js";function t(e){return e&&e>0?e:m}function n(e){return Math.ceil(t(e))}function r(e,t){return e==null||e<=0?64:e*n(t)}function i(e,t){if(!Number.isFinite(e)||e<=0)return 0;let r=e/n(t);return Math.round(r*100)/100}function a(e){return(e==null||e===0?15:e)*96/72}function o(e){return Number.isFinite(e??0)?(e??0)*72/96:15}function s(e){let t=e>0?e:11;return{padLr:Math.max(_,Math.floor(t*h)),padTb:Math.max(v,Math.floor(t*g))}}function c(e){let t=``;for(e+=1;e;){let n=(e-1)%26;t=String.fromCharCode(65+n)+t,e=Math.floor((e-n)/26)}return t}function l(e){let t=e.match(/[A-Z]+/);if(!t)return 0;let n=0;for(let e of t[0])n=n*26+(e.charCodeAt(0)-64);return n-1}function u(e){let t=e.match(/\d+/);return t?parseInt(t[0],10)-1:0}function d(e){let t=e.replace(/^0x/i,``);return t.length===8?`rgba(${parseInt(t.slice(2,4),16)}, ${parseInt(t.slice(4,6),16)}, ${parseInt(t.slice(6,8),16)}, ${1 .toFixed(3)})`:t.length===6?`#${t}`:`#ffffff`}function f(e){if(e!=null)return e===64?`#000000`:`#000000.#FFFFFF.#FF0000.#00FF00.#0000FF.#FFFF00.#FF00FF.#00FFFF.#000000.#FFFFFF.#FF0000.#00FF00.#0000FF.#FFFF00.#FF00FF.#00FFFF.#800000.#008000.#000080.#808000.#800080.#008080.#C0C0C0.#808080.#9999FF.#993366.#FFFFCC.#CCFFFF.#660066.#FF8080.#0066CC.#CCCCFF.#000080.#FF00FF.#FFFF00.#00FFFF.#800080.#800000.#008080.#0000FF.#00CCFF.#CCFFFF.#CCFFCC.#FFFF99.#99CCFF.#FF99CC.#CC99FF.#FFCC99.#3366FF.#33CCCC.#99CC00.#FFCC00.#FF9900.#FF6600.#666699.#969696.#003366.#339966.#003300.#333300.#993300.#993366.#333399.#333333`.split(`.`)[e]}var p,m,h,g,_,v,y=e((()=>{p=8.43,m=7,h=.1,g=0,_=2,v=4/3}));function b(e){let t=C(e);if(!t)return null;let n=t.split(`:`),r=n[0];if(!r)return null;let i=n[1]??r,a=u(r),o=l(r),s=u(i),c=l(i),d={startRow:Math.min(a,s),startCol:Math.min(o,c),endRow:Math.max(a,s),endCol:Math.max(o,c)};return{ref:x(d),bounds:d}}function x(e){let t=S(e.startRow,e.startCol),n=S(e.endRow,e.endCol);return t===n?t:`${t}:${n}`}function S(e,t){return`${c(t)}${e+1}`}function C(e){let t=e.trim();return t?(t.includes(`!`)?t.slice(t.indexOf(`!`)+1):t).replace(/\$/g,``).toUpperCase():null}function w(e){return{rows:e.endRow-e.startRow+1,cols:e.endCol-e.startCol+1}}function T(e,t){return e.startRow<=t.endRow&&e.endRow>=t.startRow&&e.startCol<=t.endCol&&e.endCol>=t.startCol}function E(e){let t=e.startsWith(`=`)?e.slice(1):e,n=t.indexOf(`!`);if(n===-1)return{ref:b(t)?.ref??t};let r=t.slice(0,n),i=t.slice(n+1),a=b(i);return{sheetName:D(r),ref:a?.ref??i}}function D(e){return e.startsWith(`'`)&&e.endsWith(`'`)&&e.length>=2?e.slice(1,-1).replace(/''/g,`'`):e}var O=e((()=>{y()}));export{i as _,C as a,u as b,E as c,r as d,l as f,a as g,y as h,S as i,p as l,f as m,x as n,b as o,c as p,O as r,T as s,w as t,d as u,o as v,s as y};
//# sourceMappingURL=address-utils-xK0e4BjB.js.map