dsh-metaphysics 0.62.4 → 0.62.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- window.__ModuleLoader__.load({id:"dsh-metaphysics",chunk:"client.xiaoliuren.js",factory(pt){const v={};return v.fail=(function(){return{fail:(C,D)=>{const H=new Error(D);return H.code=C,H}}})(),v.bool=(function(){function P(s,$=!1){return s==null||s===""?$:s===!0||s===1||s==="true"||s==="1"?!0:s===!1||s===0||s==="false"||s==="0"?!1:$}const C={lateZi:!0,trueSolar:!0,dst:!0,isLeapMonth:!1,leapAsNext:!1,cross:!1,hourUnknown:!1,diff:!1,shadow:!1,trace:!1,rectify:!1,withInterpret:!1},D={lateZi:!0,trueSolar:!0,dst:!0,hourUnknown:!1};function H(s,$){let d=s;const f=(o,l)=>{Object.is(s[o],l)||(d===s&&(d={...s}),d[o]=l)},r=o=>{d===s&&(d={...s}),delete d[o]};for(const[o,l]of Object.entries($))if(s[o]!==void 0){if(typeof s[o]=="string"&&s[o].trim()===""){r(o);continue}f(o,P(s[o],l))}return d}function L(s){if(!s||typeof s!="object"||Array.isArray(s))return s;let $=s;for(const[d,f]of Object.entries(D)){if(s[d]===void 0)continue;if(typeof s[d]=="string"&&s[d].trim()===""){$===s&&($={...s}),delete $[d];continue}const r=P(s[d],f);Object.is(s[d],r)||($===s&&($={...s}),$[d]=r)}return $}function N(s){if(!s||typeof s!="object")return s;let $=H(s,C);for(const d of["partner","partner2"]){const f=$[d],r=L(f);r!==f&&($===s&&($={...s}),$[d]=r)}return $}const A=["hour","minute","longitude","verifyPast","seed","days","lunarYear","lunarMonth","lunarDay","num1","num2","num3","upper","lower","changing","count","toAge","fortuneYear","period","limit","sittingOffset","sittingDegree","facingOffset","facingDegree","year","month","day"],q=["lines","rectifyHours","answers"],z=["strokeOverrides","surnameStrokes"],p=/^[+-]?(\d+(\.\d*)?|\.\d+)([eE][+-]?\d+)?$/;function w(s){if(typeof s!="string")return s;const $=s.trim();if(!p.test($))return s;const d=Number($);return Number.isFinite(d)?d:s}function _(s){let $=!1;const d={};for(const[f,r]of Object.entries(s)){const o=r===null?null:w(r);Object.is(o,r)||($=!0),d[f]=o}return $?d:s}function k(s){if(!s||typeof s!="object")return s;let $=s;const d=(f,r)=>{Object.is(s[f],r)||($===s&&($={...s}),$[f]=r)};for(const f of A)if(s[f]!==void 0){if(typeof s[f]=="string"&&s[f].trim()===""){$===s&&($={...s}),delete $[f];continue}d(f,w(s[f]))}for(const f of q){const r=s[f];if(!Array.isArray(r))continue;let o=!1;const l=r.map(i=>{if(i===null)return null;if(typeof i=="string"&&i.trim()===""){o=!0;return}const u=w(i);return Object.is(u,i)||(o=!0),u});o&&d(f,l)}for(const f of z){const r=s[f];!r||typeof r!="object"||Array.isArray(r)||d(f,_(r))}return $}return{bool:P,FLAG_DEFAULTS:C,canonicalFlags:N,NUMERIC_KEYS:A,NUMERIC_ARRAY_KEYS:q,NUMERIC_MAP_KEYS:z,canonicalNumbers:k}})(),v.diff=(function(){const{bool:P}=v.bool||{},C=new Set(["summary","interpret","castAt","asOf","precision","disclaimer","note","trueSolarText","civilText","offsetMinutes","input","jd","juMethod","juMethodNote","lateZiHourMode","leapPolicy","schools","bodyMasterSchool","bodyMasterNote","handle","handleError","revision","brief","briefError"]),D=i=>i!==null&&typeof i=="object";function H(i,u,h="",y=[]){if(i===u)return y;if(!D(i)||!D(u))return y.push({path:h||"(root)",from:i,to:u}),y;const S=new Set([...Object.keys(i),...Object.keys(u)]);for(const x of S){if(C.has(x))continue;const b=h?`${h}.${x}`:x,G=i[x],I=u[x];D(G)&&D(I)?H(G,I,b,y):JSON.stringify(G)!==JSON.stringify(I)&&y.push({path:b,from:G,to:I})}return y}const L=[[/^pillars\.year\.ganzhi$/,"年柱"],[/^pillars\.month\.ganzhi$/,"月柱"],[/^pillars\.day\.ganzhi$/,"日柱"],[/^pillars\.hour\.ganzhi$/,"时柱"],[/^pillars\.\w+\.hidden/,"藏干"],[/^pillars\.\w+\.stemTenGod$/,"十神"],[/^pillars\.\w+\.kongwang/,"空亡"],[/^pillars\.\w+\.dishi$|^pillars\.\w+\.zizuo$/,"十二长生"],[/^pillars\.\w+\.nayin$/,"纳音"],[/^dayMaster\./,"日主"],[/^palaces\.(taiyuan|minggong|shengong)\./,"命身宫"],[/^palaces\.\d+\.(palace|branch|stem|ganzhi)$/,"宫位"],[/^palaces\.\d+\.stars\.\d+\.(name|brightness|type)$/,"星曜"],[/^palaces\.\d+\.shensha\./,"神煞"],[/^palaces\.\d+\.(daxian|xiaoxian)\./,"大限"],[/^palaces\.\d+\.sanfang\./,"三方四正"],[/^palaces\.\d+\./,"宫位"],[/^palaces\./,"命身宫"],[/^soul\./,"命宫"],[/^body\./,"身宫"],[/^doujun\./,"流年斗君"],[/^siZhu\.year$/,"年柱"],[/^siZhu\.month$/,"月柱"],[/^siZhu\.day$/,"日柱"],[/^siZhu\.time$/,"时柱"],[/^ju$|^juNumber$/,"局数"],[/^yuan$/,"三元"],[/^dun$/,"阴阳遁"],[/^daxian(List)?\./,"大限"],[/^fly(Chains|Composite)?\./,"飞星"],[/^pattern/,"格局"],[/^schools\./,"流派回显"],[/^dayun\.jiao\./,"起运"],[/^dayun\.toNextJieDays$/,"起运时间"],[/^dayun\.list\.(\d+)\.ganzhi$/,"大运干支"],[/^dayun\.startAge\./,"起运时间"],[/^dayun\./,"大运评分"],[/^liunian\./,"流年"],[/^jieqi\./,"节气边界"],[/^solarTime\./,"真太阳时"],[/^dayGanZhi$/,"日辰"],[/^hourZhi$/,"时支"],[/^yueJiang\./,"月将"],[/^xunKong$/,"旬空"],[/^lines\.(\d+)\./,"爻"],[/^shensha\./,"神煞"],[/^frame\./,"格局用神"],[/^strength\./,"旺衰"],[/^wuxing\./,"五行计数"],[/^relations\./,"干支关系"],[/^input\./,"输入回显"]],N=[[/^pillars\./,"四柱"],[/^shensha\./,"神煞"],[/^dayun\./,"大运"],[/^liunian\./,"流年"],[/^frame\./,"格局用神"],[/^strength\./,"旺衰"],[/^wuxing\./,"五行计数"],[/^dayMaster\./,"日主"],[/^relations\./,"干支关系"],[/^palaces\.(taiyuan|minggong|shengong)\./,"命身宫"],[/^palaces\.\d+\./,"宫位"],[/^palaces\./,"命身宫"],[/^soul\.|^body\.|^doujun\./,"命身宫"],[/^siZhu\./,"四柱"],[/^ju$|^juNumber$|^yuan$|^dun$/,"局数"],[/^daxian/,"大限"],[/^fly/,"飞星"],[/^pattern/,"格局"],[/^jieqi\./,"节气"],[/^solarTime\./,"真太阳时"],[/^input\./,"输入回显"],[/^lines\./,"爻"]],A=[[/^pillars\.(year|month|day|hour)\.ganzhi$/,"柱"],[/^palaces\.(minggong|shengong)\.ganzhi$/,"命身宫"],[/^soul\.ganzhi$/,"命宫"],[/^body\.branch$/,"身宫"],[/^siZhu\.(year|month|day|time)$/,"柱"],[/^dayun\.jiao\.at$/,"起运"],[/^dayGanZhi$/,"日辰"],[/^hourZhi$/,"时支"],[/^ju$|^juNumber$|^juName$/,"局数"],[/^dun$/,"阴阳遁"],[/^lines\.\d+\.(ganzhi|yinYang|name)$/,"爻"],[/^yueJiang\.(name|zhi)$/,"月将"]];function q(i){for(const[u,h]of L)if(u.test(i))return h;return z(i)||i}function z(i){for(const[u,h]of N)if(u.test(i))return h;return""}function p(i){for(const[u,h]of A)if(u.test(i))return h;return""}function w(i){return[...i].sort((u,h)=>u.path.localeCompare(h.path,"zh-Hans-CN",{numeric:!0}))}function _(i){if(!i.length)return"本盘不受此口径影响:所有字段一致。";const u=i.filter(x=>p(x.path)),h=[...new Set(i.map(x=>z(x.path)).filter(Boolean))],y=u.length?`根因 ${u.length} 处:`+u.slice(0,4).map(x=>`${q(x.path)} ${k(x.from)}→${k(x.to)}`).join("、")+(u.length>4?" 等":""):"无单一根因",S=h.length?`;连带影响 ${h.slice(0,6).join("、")}${h.length>6?" 等":""} ${h.length} 类,共 ${i.length} 处`:`;共 ${i.length} 处`;return y+S+"。"}const k=i=>i===void 0?"—":i===null?"null":typeof i=="string"?i:Array.isArray(i)?i.join("")||"[]":typeof i=="object"?JSON.stringify(i):String(i);function s(i,{title:u="",limit:h=12}={}){const y=[];if(u&&y.push(`【${u}】`),y.push(_(i)),!i.length)return y.join(`
1
+ window.__ModuleLoader__.load({id:"dsh-metaphysics",chunk:"client.xiaoliuren.js",factory(pt){const v={};return v.fail=(function(){return{fail:(C,D)=>{const H=new Error(D);return H.code=C,H}}})(),v.bool=(function(){function P(s,$=!1){return s==null||s===""?$:s===!0||s===1||s==="true"||s==="1"?!0:s===!1||s===0||s==="false"||s==="0"?!1:$}const C={lateZi:!0,trueSolar:!0,dst:!0,isLeapMonth:!1,leapAsNext:!1,cross:!1,hourUnknown:!1,diff:!1,shadow:!1,trace:!1,rectify:!1,withInterpret:!1},D={lateZi:!0,trueSolar:!0,dst:!0,hourUnknown:!1};function H(s,$){let d=s;const f=(o,l)=>{Object.is(s[o],l)||(d===s&&(d={...s}),d[o]=l)},r=o=>{d===s&&(d={...s}),delete d[o]};for(const[o,l]of Object.entries($))if(s[o]!==void 0){if(typeof s[o]=="string"&&s[o].trim()===""){r(o);continue}f(o,P(s[o],l))}return d}function L(s){if(!s||typeof s!="object"||Array.isArray(s))return s;let $=s;for(const[d,f]of Object.entries(D)){if(s[d]===void 0)continue;if(typeof s[d]=="string"&&s[d].trim()===""){$===s&&($={...s}),delete $[d];continue}const r=P(s[d],f);Object.is(s[d],r)||($===s&&($={...s}),$[d]=r)}return $}function N(s){if(!s||typeof s!="object")return s;let $=H(s,C);for(const d of["partner","partner2"]){const f=$[d],r=L(f);r!==f&&($===s&&($={...s}),$[d]=r)}return $}const A=["hour","minute","longitude","verifyPast","seed","days","lunarYear","lunarMonth","lunarDay","num1","num2","num3","upper","lower","changing","count","toAge","fortuneYear","period","limit","sittingOffset","sittingDegree","facingOffset","facingDegree","year","month","day"],q=["lines","rectifyHours","answers"],z=["strokeOverrides","surnameStrokes"],p=/^[+-]?(\d+(\.\d*)?|\.\d+)([eE][+-]?\d+)?$/;function w(s){if(typeof s!="string")return s;const $=s.trim();if(!p.test($))return s;const d=Number($);return Number.isFinite(d)?d:s}function _(s){let $=!1;const d={};for(const[f,r]of Object.entries(s)){const o=r===null?null:w(r);Object.is(o,r)||($=!0),d[f]=o}return $?d:s}function k(s){if(!s||typeof s!="object")return s;let $=s;const d=(f,r)=>{Object.is(s[f],r)||($===s&&($={...s}),$[f]=r)};for(const f of A)if(s[f]!==void 0){if(typeof s[f]=="string"&&s[f].trim()===""){$===s&&($={...s}),delete $[f];continue}d(f,w(s[f]))}for(const f of q){const r=s[f];if(!Array.isArray(r))continue;let o=!1;const l=r.map(i=>{if(i===null)return null;if(typeof i=="string"&&i.trim()===""){o=!0;return}const u=w(i);return Object.is(u,i)||(o=!0),u});o&&d(f,l)}for(const f of z){const r=s[f];!r||typeof r!="object"||Array.isArray(r)||d(f,_(r))}return $}return{bool:P,FLAG_DEFAULTS:C,canonicalFlags:N,NUMERIC_KEYS:A,NUMERIC_ARRAY_KEYS:q,NUMERIC_MAP_KEYS:z,canonicalNumbers:k}})(),v.diff=(function(){const{bool:P}=v.bool||{},C=new Set(["summary","interpret","castAt","asOf","precision","disclaimer","note","trueSolarText","civilText","offsetMinutes","input","jd","juMethod","juMethodNote","lateZiHourMode","leapPolicy","schools","bodyMasterSchool","bodyMasterNote","handle","handleError","revision","brief","briefError"]),D=i=>i!==null&&typeof i=="object";function H(i,u,h="",y=[]){if(i===u)return y;if(!D(i)||!D(u))return y.push({path:h||"(root)",from:i,to:u}),y;const S=new Set([...Object.keys(i),...Object.keys(u)]);for(const x of S){if(C.has(x))continue;const b=h?`${h}.${x}`:x,G=i[x],I=u[x];D(G)&&D(I)?H(G,I,b,y):JSON.stringify(G)!==JSON.stringify(I)&&y.push({path:b,from:G,to:I})}return y}const L=[[/^pillars\.year\.ganzhi$/,"年柱"],[/^pillars\.month\.ganzhi$/,"月柱"],[/^pillars\.day\.ganzhi$/,"日柱"],[/^pillars\.hour\.ganzhi$/,"时柱"],[/^pillars\.\w+\.hidden/,"藏干"],[/^pillars\.\w+\.stemTenGod$/,"十神"],[/^pillars\.\w+\.kongwang/,"空亡"],[/^pillars\.\w+\.dishi$|^pillars\.\w+\.zizuo$/,"十二长生"],[/^pillars\.\w+\.nayin$/,"纳音"],[/^dayMaster\./,"日主"],[/^palaces\.(taiyuan|minggong|shengong)\./,"命身宫"],[/^palaces\.\d+\.(palace|branch|stem|ganzhi)$/,"宫位"],[/^palaces\.\d+\.stars\.\d+\.(name|brightness|type)$/,"星曜"],[/^palaces\.\d+\.shensha\./,"神煞"],[/^palaces\.\d+\.(daxian|xiaoxian)\./,"大限"],[/^palaces\.\d+\.sanfang\./,"三方四正"],[/^palaces\.\d+\./,"宫位"],[/^palaces\./,"命身宫"],[/^soul\./,"命宫"],[/^body\./,"身宫"],[/^doujun\./,"流年斗君"],[/^siZhu\.year$/,"年柱"],[/^siZhu\.month$/,"月柱"],[/^siZhu\.day$/,"日柱"],[/^siZhu\.time$/,"时柱"],[/^ju$|^juNumber$/,"局数"],[/^yuan$/,"三元"],[/^dun$/,"阴阳遁"],[/^daxian(List)?\./,"大限"],[/^fly(Chains|Composite)?\./,"飞星"],[/^pattern/,"格局"],[/^schools\./,"流派回显"],[/^dayun\.jiao\./,"起运"],[/^dayun\.toNextJieDays$/,"起运时间"],[/^dayun\.list\.(\d+)\.ganzhi$/,"大运干支"],[/^dayun\.startAge(Exact)?\./,"起运时间"],[/^dayun\./,"大运评分"],[/^liunian\./,"流年"],[/^jieqi\./,"节气边界"],[/^solarTime\./,"真太阳时"],[/^dayGanZhi$/,"日辰"],[/^hourZhi$/,"时支"],[/^yueJiang\./,"月将"],[/^xunKong$/,"旬空"],[/^lines\.(\d+)\./,"爻"],[/^shensha\./,"神煞"],[/^frame\./,"格局用神"],[/^strength\./,"旺衰"],[/^wuxing\./,"五行计数"],[/^relations\./,"干支关系"],[/^input\./,"输入回显"]],N=[[/^pillars\./,"四柱"],[/^shensha\./,"神煞"],[/^dayun\./,"大运"],[/^liunian\./,"流年"],[/^frame\./,"格局用神"],[/^strength\./,"旺衰"],[/^wuxing\./,"五行计数"],[/^dayMaster\./,"日主"],[/^relations\./,"干支关系"],[/^palaces\.(taiyuan|minggong|shengong)\./,"命身宫"],[/^palaces\.\d+\./,"宫位"],[/^palaces\./,"命身宫"],[/^soul\.|^body\.|^doujun\./,"命身宫"],[/^siZhu\./,"四柱"],[/^ju$|^juNumber$|^yuan$|^dun$/,"局数"],[/^daxian/,"大限"],[/^fly/,"飞星"],[/^pattern/,"格局"],[/^jieqi\./,"节气"],[/^solarTime\./,"真太阳时"],[/^input\./,"输入回显"],[/^lines\./,"爻"]],A=[[/^pillars\.(year|month|day|hour)\.ganzhi$/,"柱"],[/^palaces\.(minggong|shengong)\.ganzhi$/,"命身宫"],[/^soul\.ganzhi$/,"命宫"],[/^body\.branch$/,"身宫"],[/^siZhu\.(year|month|day|time)$/,"柱"],[/^dayun\.jiao\.at$/,"起运"],[/^dayGanZhi$/,"日辰"],[/^hourZhi$/,"时支"],[/^ju$|^juNumber$|^juName$/,"局数"],[/^dun$/,"阴阳遁"],[/^lines\.\d+\.(ganzhi|yinYang|name)$/,"爻"],[/^yueJiang\.(name|zhi)$/,"月将"]];function q(i){for(const[u,h]of L)if(u.test(i))return h;return z(i)||i}function z(i){for(const[u,h]of N)if(u.test(i))return h;return""}function p(i){for(const[u,h]of A)if(u.test(i))return h;return""}function w(i){return[...i].sort((u,h)=>u.path.localeCompare(h.path,"zh-Hans-CN",{numeric:!0}))}function _(i){if(!i.length)return"本盘不受此口径影响:所有字段一致。";const u=i.filter(x=>p(x.path)),h=[...new Set(i.map(x=>z(x.path)).filter(Boolean))],y=u.length?`根因 ${u.length} 处:`+u.slice(0,4).map(x=>`${q(x.path)} ${k(x.from)}→${k(x.to)}`).join("、")+(u.length>4?" 等":""):"无单一根因",S=h.length?`;连带影响 ${h.slice(0,6).join("、")}${h.length>6?" 等":""} ${h.length} 类,共 ${i.length} 处`:`;共 ${i.length} 处`;return y+S+"。"}const k=i=>i===void 0?"—":i===null?"null":typeof i=="string"?i:Array.isArray(i)?i.join("")||"[]":typeof i=="object"?JSON.stringify(i):String(i);function s(i,{title:u="",limit:h=12}={}){const y=[];if(u&&y.push(`【${u}】`),y.push(_(i)),!i.length)return y.join(`
2
2
  `);const S=w(i.filter(b=>p(b.path))),x=w(i.filter(b=>!p(b.path)));if(S.length){y.push(""),y.push(" 根因(口径直接改动):");for(const b of S)y.push(` ${q(b.path).padEnd(6)} ${k(b.from)} → ${k(b.to)}`)}if(x.length){y.push(""),y.push(` 连带变化(${x.length} 处,展示前 ${Math.min(h,x.length)} 处):`);for(const b of x.slice(0,h))y.push(` ${q(b.path).padEnd(6)} ${k(b.from)} → ${k(b.to)}`);if(x.length>h){const b={};for(const G of x.slice(h)){const I=z(G.path)||"其他";b[I]=(b[I]||0)+1}y.push(" 其余:"+Object.entries(b).map(([G,I])=>`${G} ${I} 处`).join("、"))}}return y.join(`
3
3
  `)}const $=(i,u,h,y,S,x)=>({key:i,title:u,short:h,read:b=>{const G=b[i]!==void 0?b[i]:b.schools&&b.schools[i];return x[G]?G:y},alt:b=>b===S?y:S,label:b=>x[b]||b}),d={bazi:[{key:"lateZi",title:"晚子时:23:00 后是否换日",short:"晚子时",read:i=>P(i.lateZi,!0),alt:i=>!i,label:i=>i?"换日":"不换日"},{key:"trueSolar",title:"真太阳时:是否按出生地经度修正",short:"真太阳时",read:i=>P(i.trueSolar,!0),alt:i=>!i,label:i=>i?"修正":"不修正"}],ziwei:[{key:"leapMonth",title:"闰月归月:按日切分 / 整月归次月",short:"闰月归月",read:i=>i.leapMonth==="next"||i.leapMonth==="prev"?i.leapMonth:"split",alt:i=>i==="split"?"next":"split",label:i=>({split:"按日切分",next:"整月归次月",prev:"整月归本月"})[i]||i},{key:"trueSolar",title:"真太阳时:是否按出生地经度修正",short:"真太阳时",read:i=>P(i.trueSolar,!0),alt:i=>!i,label:i=>i?"修正":"不修正"},$("brightnessSchool","亮度表:默认 / QS 七档","亮度表","default","QS",{default:"默认",QS:"QS(七档)",XD1:"XD1(七档)",ZZ:"ZZ(五档)",XD2:"XD2(五档)"}),$("gengYearSihua","庚干四化:阳武阴同 / 同科阴忌","庚干四化","GYWYT","GYWTY",{GYWYT:"阳武阴同",GYWTY:"同科阴忌",GYWFT:"府科同忌",GYWFX:"府科相忌",GYWTX:"同科相忌"}),$("tianmaSchool","天马:按年支 / 按生月","天马","year-branch","month-branch",{"year-branch":"年支","month-branch":"生月"}),$("tiankongSchool","天空:不排 / 年支顺行","天空","off","normal",{off:"不排",normal:"年支顺行","shun-jia-shi":"加生时"}),$("jiekongSchool","截空旬空:不排 / 正副双星","截空旬空","off","double",{off:"不排",single:"单星",double:"正副双星",zhanyan:"占验派"}),$("kuiyueSchool","魁钺:qs1 / qs2","魁钺","qs1","qs2",{qs1:"qs1",qs2:"qs2","zhong-yiming":"中一鸣"}),$("tianshiTianshang","天伤天使:常规 / 中州互换","天伤天使","normal","zhongzhou",{normal:"常规",zhongzhou:"中州(阴男阳女互换)"}),$("changshengSchool","长生:阴阳顺逆 / 火土起寅","长生","yin-yang-shun-ni","huo-tu",{"yin-yang-shun-ni":"阴阳顺逆","shui-tu":"水二","huo-tu":"火土(土五局起寅)"}),$("lateZishi","晚子时:归当日 / 归次日","晚子时","current-day","next-day",{"current-day":"归当日","next-day":"归次日","all-current":"全归当日","day-cur-time-next":"日归当日·时归次日"}),$("shenzhuSchool","身主:子午皆火星 / 子铃午火","身主","common","verse",{common:"子午皆火星",verse:"子铃午火(安身主诀逐字)"}),$("zuoyaoSchool","杂曜:49 颗简盘 / 61 颗全表","杂曜全表","minimal","full",{minimal:"49 颗(简盘)",full:"61 颗(加十二颗杂曜)"})],qimen:[{key:"juMethod",title:"取局流派:拆补 / 超神接气 / 置闰",short:"取局流派",read:i=>["chaibu","chaoshen","zhirun"].includes(i.juMethod)?i.juMethod:"chaibu",alt:i=>i==="chaibu"?"zhirun":"chaibu",label:i=>({chaibu:"拆补法",chaoshen:"超神接气",zhirun:"置闰法"})[i]||i},{key:"lateZiHourMode",title:"晚子时:23:00 后归当日 / 次日",short:"晚子时归日",read:i=>i.lateZiHourMode==="next-day"?"next-day":"same-day",alt:i=>i==="next-day"?"same-day":"next-day",label:i=>i==="next-day"?"归次日":"归当日"}]},f={bazi:[{path:"pillars.day.ganzhi",label:"日柱"},{path:"pillars.hour.ganzhi",label:"时柱"},{path:"strength.level",label:"旺衰"},{path:"frame.primaryName",label:"格局"},{path:"frame.yongshen.favor",label:"喜用"},{path:"dayun.jiao.at",label:"起运"}],ziwei:[{path:"soul.ganzhi",label:"命宫"},{path:"body.branch",label:"身宫支"},{path:"bureau.name",label:"五行局"},{path:"bodyMaster",label:"身主"},{path:"daxianList.0.ages",label:"起大限"}],qimen:[{path:"siZhu.day",label:"日柱"},{path:"ju",label:"局数"},{path:"zhiFu.star",label:"值符"},{path:"zhiShi.gate",label:"值使"}]};function r(i,u){let h=i;for(const y of String(u).split(".")){if(h==null)return;h=h[y]}return h}function o(i){return i==null?"—":Array.isArray(i)?i.join("、"):typeof i=="object"?"—":String(i)}function l(i,u,h){return(f[i]||[]).map(S=>{const x=o(r(u,S.path)),b=o(r(h,S.path));return{key:S.path,label:S.label,current:x,alt:b,changed:x!==b}})}return{diffObjects:H,labelOf:q,categoryOf:z,rootOf:p,sortDiffs:w,summarize:_,formatValue:k,renderDiff:s,CALIBER_SWITCHES:d,CALIBER_VIEWS:f,viewCell:o,viewRows:l}})(),v.fingerprint=(function(){const P="0123456789ABCDEFGHJKMNPQRSTVWXYZ";function C(N){return JSON.stringify(D(N))}function D(N){if(N===null)return null;const A=typeof N;if(A==="string")return typeof N.normalize=="function"?N.normalize("NFC"):N;if(A==="number")return Number.isFinite(N)?Object.is(N,-0)?0:N:null;if(A==="boolean")return N;if(Array.isArray(N))return N.map(D);if(A==="object"){const q=Object.create(null);for(const z of Object.keys(N).sort()){const p=N[z];p===void 0||typeof p=="function"||typeof p=="symbol"||(q[z]=D(p))}return q}return null}function H(N){const A=String(N);let q=2166136261,z=2654435769;for(let _=0;_<A.length;_+=1){const k=A.charCodeAt(_);for(const s of[k&255,k>>>8])q=Math.imul(q^s,16777619),z=Math.imul(z^s,2246822507)}let p=(q>>>0)*8+(z>>>29),w="";for(let _=0;_<7;_+=1)w=P[p%32]+w,p=Math.floor(p/32);return w}function L(N={}){const A=String(N.system||""),q=String(N.version||"dev"),z=N.seed===void 0||N.seed===null||N.seed===""?null:Number(N.seed),p=N.asOf?String(N.asOf):null,w=N.params&&typeof N.params=="object"?N.params:{},_=C({system:A,params:w,seed:z,asOf:p}),k=C({base:_,version:q});return{id:`LY-${H(k)}`,baseId:`LY-${H(_)}`,version:q,system:A,payload:_}}return{canonicalJson:C,shortHash:H,fingerprintOf:L}})(),v.validate=(function(){const{fail:P}=v.fail||{},C=1600,D=2400;function H(w){return w%4===0&&w%100!==0||w%400===0}function L(w,_){return _===2?H(w)?29:28:[31,28,31,30,31,30,31,31,30,31,30,31][_-1]||0}const N=w=>typeof w=="string"?`「${w}」`:String(w),A="引擎只接受解析好的公历字段 { year, month, day, hour?, minute? };字符串请先交给宿主层的 parseDateTime 解析";function q(w,_=""){const k=_?`${_} 的`:"";if(!w||typeof w!="object"||Array.isArray(w)){const f=w===null?"null":Array.isArray(w)?"数组":typeof w;throw P("E_INPUT",`${k}入参必须是对象(收到 ${f});${A}`)}const s=w.hour===void 0?0:w.hour,$=w.minute===void 0?0:w.minute;for(const[f,r]of[["year",w.year],["month",w.month],["day",w.day],["hour",s],["minute",$]])if(!Number.isInteger(r))throw P("E_INPUT",`${k}${f} 必须是整数(收到 ${N(r)});${A}`);if(w.year<C||w.year>D)throw P("E_INPUT",`${k}year 超出支持范围 ${C}–${D}(收到 ${w.year});更早的年份时区与历法口径不可靠`);if(w.month<1||w.month>12)throw P("E_INPUT",`${k}month 超出范围 1–12(收到 ${w.month})`);const d=L(w.year,w.month);if(w.day<1||w.day>d)throw P("E_INPUT",`${k}日期不存在:${w.year}-${w.month}-${w.day}(${w.year} 年 ${w.month} 月只有 ${d} 天)`);if(s<0||s>23)throw P("E_INPUT",`${k}hour 超出范围 0–23(收到 ${s})`);if($<0||$>59)throw P("E_INPUT",`${k}minute 超出范围 0–59(收到 ${$})`);return w}function z(w,_,k){if(!w||typeof w!="object"||Array.isArray(w)){const s=w===null?"null":w===void 0?"undefined":Array.isArray(w)?"数组":typeof w;throw P("E_INPUT",`${_} 必须是对象(收到 ${s});${k}`)}return w}function p(w,_=""){const k=_?`${_}:`:"";if(w.year<C||w.year>D)throw P("E_RANGE",`${k}晚子时按次日归后落到 ${w.year}-${String(w.month).padStart(2,"0")}-${String(w.day).padStart(2,"0")},超出可计算范围 ${C}–${D};请把时刻挪到 23 点前,或换一天起课`);return w}return{MIN_YEAR:C,MAX_YEAR:D,isLeapYear:H,daysInMonth:L,assertCivil:q,assertObject:z,assertShifted:p}})(),v.datetime=(function(){const{fail:P}=v.fail||{},{MIN_YEAR:C,MAX_YEAR:D}=v.validate||{};function H(A,q){return q===2?A%4===0&&A%100!==0||A%400===0?29:28:[31,28,31,30,31,30,31,31,30,31,30,31][q-1]}function L(A,q=""){const z=String(A??"").trim(),p=/^(\d{4})-(\d{1,2})-(\d{1,2})$/.exec(z);if(!p)return null;const w=Number(p[1]),_=Number(p[2]),k=Number(p[3]);if(_<1||_>12||k<1||k>H(w,_))return null;if(w<C||w>D){const s=q?`${q} `:"";throw P("E_RANGE",`${s}「${p[0]}」的年份超出可计算范围(${C}–${D},收到 ${w} 年);农历与节气表不覆盖之外的年份`)}return{year:w,month:_,day:k}}function N(A){if(typeof A!="string"||!A.trim())throw P("E_INPUT","缺少 datetime(公历日期时间),例如 1990-05-12T14:30");const q=A.trim().match(/^(\d{4})-(\d{1,2})-(\d{1,2})(?:[T\s](\d{1,2}):(\d{1,2})(?::(\d{1,2}))?)?$/);if(!q)throw P("E_INPUT",`无法解析 datetime:「${A}」,请用 1990-05-12T14:30 这种格式`);if(q[6]!==void 0&&Number(q[6])>59)throw P("E_INPUT",`秒超出范围:${q[6]}`);const z={year:Number(q[1]),month:Number(q[2]),day:Number(q[3]),hour:Number(q[4]??0),minute:Number(q[5]??0)};if(z.month<1||z.month>12)throw P("E_INPUT",`月份超出范围:${z.month}`);const p=H(z.year,z.month);if(z.day<1||z.day>p)throw P("E_INPUT",`日期不存在:${z.year}-${z.month}-${z.day}(${z.year} 年 ${z.month} 月只有 ${p} 天)`);if(z.hour>23||z.minute>59)throw P("E_INPUT",`时间超出范围:${z.hour}:${z.minute}`);if(z.year<C||z.year>D)throw P("E_RANGE",`年份 ${z.year} 超出可计算范围(${C}–${D})`);return(z.year<1900||z.year>2100)&&(z.precision={level:"approx",note:`ΔT 模型仅覆盖 1900–2100,${z.year} 年按端点值外推,节气与朔望时刻可能有分钟级偏差,月柱在交节前后需复核`}),z}return{daysInMonth:H,parseYmd:L,parseDateTime:N}})(),v.lru=(function(){function P({max:C=64,ttlMs:D=0,name:H="lru",now:L=()=>Date.now()}={}){const N=new Map,A={name:H,hits:0,misses:0,evictions:0,expirations:0},q=z=>D>0&&L()-z.at>D;return{name:H,max:C,ttlMs:D,get(z){const p=N.get(z);if(!p||q(p)){p&&(N.delete(z),A.expirations+=1),A.misses+=1;return}return N.delete(z),N.set(z,p),A.hits+=1,p.value},set(z,p){for(N.has(z)&&N.delete(z),N.set(z,{value:p,at:L()});N.size>C;)N.delete(N.keys().next().value),A.evictions+=1;return p},has(z){const p=N.get(z);return p?q(p)?(N.delete(z),A.expirations+=1,!1):!0:!1},delete(z){return N.delete(z)},clear(){N.clear()},get size(){return N.size},stats(){const z=A.hits+A.misses;return{name:H,size:N.size,max:C,hits:A.hits,misses:A.misses,evictions:A.evictions,expirations:A.expirations,hitRate:z?A.hits/z:0}}}}return{createLru:P}})(),v.nayin=(function(){const P=["海中金","炉中火","大林木","路旁土","剑锋金","山头火","涧下水","城头土","白蜡金","杨柳木","泉中水","屋上土","霹雳火","松柏木","长流水","沙中金","山下火","平地木","壁上土","金箔金","覆灯火","天河水","大驿土","钗钏金","桑柘木","大溪水","沙中土","天上火","石榴木","大海水"];function C(D){const H=(Number(D)%60+60)%60,L=P[Math.floor(H/2)];return{name:L,element:L[2]}}return{NAYIN_NAMES:P,nayinOf:C}})(),v.sanhe=(function(){const P=[{branches:["申","子","辰"],element:"水"},{branches:["亥","卯","未"],element:"木"},{branches:["寅","午","戌"],element:"火"},{branches:["巳","酉","丑"],element:"金"}],C=Object.fromEntries(P.map(L=>[L.branches.join(""),L.element])),D=Object.fromEntries(P.flatMap(L=>L.branches.map(N=>[N,L.element])));function H(L){return P.find(N=>N.branches.includes(L))||null}return{SANHE_GROUPS:P,SANHE:C,SANHE_ELEMENT:D,sanheGroupOf:H}})(),v["vsop-earth"]=(function(){const P=[[1.75347045673,0,0],[.03341656453,4.66925680415,6283.0758499914],[.00034894275,4.62610242189,12566.1516999828],[3417572e-11,2.82886579754,3.523118349],[3497056e-11,2.74411783405,5753.3848848968],[3135899e-11,3.62767041756,77713.7714681205],[2676218e-11,4.41808345438,7860.4193924392],[2342691e-11,6.13516214446,3930.2096962196],[1273165e-11,2.03709657878,529.6909650946],[1324294e-11,.74246341673,11506.7697697936],[901854e-11,2.04505446477,26.2983197998],[1199167e-11,1.10962946234,1577.3435424478],[857223e-11,3.50849152283,398.1490034082],[779786e-11,1.17882681962,5223.6939198022],[99025e-10,5.23268072088,5884.9268465832],[753141e-11,2.53339052847,5507.5532386674],[505267e-11,4.58292599973,18849.2275499742],[492392e-11,4.20505711826,775.522611324],[356672e-11,2.91954114478,.0673103028],[284125e-11,1.89869240932,796.2980068164],[242879e-11,.34481445893,5486.777843175],[317087e-11,5.84901948512,11790.6290886588],[271112e-11,.31486255375,10977.078804699],[206217e-11,4.80646631478,2544.3144198834],[205478e-11,1.86953770281,5573.1428014331],[202318e-11,2.45767790232,6069.7767545534],[126225e-11,1.08295459501,20.7753954924],[155516e-11,.83306084617,213.299095438],[115132e-11,.64544911683,.9803210682],[102851e-11,.63599845579,4694.0029547076],[101724e-11,4.2667980198,7.1135470008],[99206e-11,6.20992926918,2146.1654164752],[132212e-11,3.41118292683,2942.4634232916],[97607e-11,.68101342359,155.4203994342],[85128e-11,1.29870764804,6275.9623029906],[74651e-11,1.755089133,5088.6288397668],[101895e-11,.97569280312,15720.8387848784],[84711e-11,3.67080093031,71430.69561812909],[73547e-11,4.67926633877,801.8209311238],[73874e-11,3.50319414955,3154.6870848956],[78757e-11,3.03697458703,12036.4607348882],[79637e-11,1.80791287082,17260.1546546904],[85803e-11,5.9832263126,161000.6857376741],[56963e-11,2.78430458592,6286.5989683404],[61148e-11,1.81839892984,7084.8967811152],[69627e-11,.83297621398,9437.762934887],[56116e-11,4.38694865354,14143.4952424306],[62449e-11,3.97763912806,8827.3902698748],[51145e-11,.28306832879,5856.4776591154],[55577e-11,3.47006059924,6279.5527316424],[41036e-11,5.36817592855,8429.2412664666],[51605e-11,1.33282739866,1748.016413067],[51992e-11,.18914947184,12139.5535091068],[49e-8,.48735014197,1194.4470102246],[392e-9,6.16833020996,10447.3878396044],[3557e-10,1.775968892,6812.766815086],[3677e-10,6.04133863162,10213.285546211],[36596e-11,2.56957481827,1059.3819301892],[33296e-11,.59310278598,17789.845619785],[35954e-11,1.70875808777,2352.8661537718],[40938e-11,2.39850938714,19651.048481098],[30047e-11,2.73975124088,1349.8674096588],[30412e-11,.44294464169,83996.84731811189],[23663e-11,.48473622521,8031.0922630584],[23574e-11,2.06528133162,3340.6124266998],[21089e-11,4.14825468851,951.7184062506],[24738e-11,.21484762138,3.5904286518],[25352e-11,3.16470891653,4690.4798363586],[22823e-11,5.22195230819,4705.7323075436],[21419e-11,1.42563910473,16730.4636895958],[21891e-11,5.55594302779,553.5694028424],[203e-9,.37133792946,283.8593188652]],C=[[6283.0758499914,0,0],[.00206058863,2.67823455808,6283.0758499914],[4303419e-11,2.63512233481,12566.1516999828],[425264e-11,1.59046982018,3.523118349],[109017e-11,2.96631010675,1577.3435424478],[93479e-11,2.59211109542,18849.2275499742],[119305e-11,5.79555765566,26.2983197998],[72121e-11,1.13840581212,529.6909650946],[67784e-11,1.87453300345,398.1490034082],[6735e-10,4.40932832004,5507.5532386674],[59045e-11,2.88815790631,5223.6939198022],[55976e-11,2.17471740035,155.4203994342],[45411e-11,.39799502896,796.2980068164],[36298e-11,.46875437227,775.522611324],[28962e-11,2.64732254645,7.1135470008],[20844e-11,5.34138275149,.9803210682]],D=[[8721859e-11,1.07253635559,6283.0758499914],[99099e-10,3.14159265359,0],[294833e-11,.43717350256,12566.1516999828],[27338e-11,.05295636147,3.523118349],[16333e-11,5.18820215724,26.2983197998],[15745e-11,3.68504712183,155.4203994342],[9425e-11,.29667114694,18849.2275499742],[8938e-11,2.05706319592,77713.7714681205],[694e-10,.82691541038,775.522611324],[5061e-11,4.6624323168,1577.3435424478]],H=[[289058e-11,5.84173149732,6283.0758499914],[20712e-11,6.0498393902,12566.1516999828],[2962e-11,5.1956057957,155.4203994342],[2527e-11,3.14159265359,0],[1288e-11,4.7219761197,3.523118349]],L=[[7714e-11,4.14117321449,6283.0758499914],[1016e-11,3.27573644241,12566.1516999828]];function N(A){let q=0;for(const[p,w,_]of P)q+=p*Math.cos(w+_*A);let z=1;for(const p of[C,D,H,L]){z*=A;for(const[w,_,k]of p)q+=w*z*Math.cos(_+k*A)}return q}return{earthL:N}})(),v.calendar=(function(){const{earthL:P}=v["vsop-earth"]||{},{createLru:C}=v.lru||{},{bool:D}=v.bool||{},H=["甲","乙","丙","丁","戊","己","庚","辛","壬","癸"],L=["子","丑","寅","卯","辰","巳","午","未","申","酉","戌","亥"],N=["小寒","大寒","立春","雨水","惊蛰","春分","清明","谷雨","立夏","小满","芒种","夏至","小暑","大暑","立秋","处暑","白露","秋分","寒露","霜降","立冬","小雪","大雪","冬至"];function A(R){return(285+15*R)%360}function q(R,Y,U){const ie=Math.floor((14-Y)/12),Q=R+4800-ie,F=Y+12*ie-3;return U+Math.floor((153*F+2)/5)+365*Q+Math.floor(Q/4)-Math.floor(Q/100)+Math.floor(Q/400)-32045}function z(R){const Y=R+32044,U=Math.floor((4*Y+3)/146097),ie=Y-Math.floor(146097*U/4),Q=Math.floor((4*ie+3)/1461),F=ie-Math.floor(1461*Q/4),J=Math.floor((5*F+2)/153);return{year:100*U+Q-4800+Math.floor(J/10),month:J+3-12*Math.floor(J/10),day:F-Math.floor((153*J+2)/5)+1}}function p(R,Y){for(let U=0;U<60;U++)if(U%10===R&&U%12===Y)return U;return-1}function w(R){const Y=(R%60+60)%60;return{index:Y,stem:H[Y%10],branch:L[Y%12],name:H[Y%10]+L[Y%12]}}function _(R){return((R+49)%60+60)%60}function k(R){const Y=R-2451545,U=Y/36525,ie=Y/365250;let Q=P(ie)*180/Math.PI+180;Q=(Q%360+360)%360;const F=(5029.0966*U+1.11113*U*U-6e-6*U*U*U)/3600;Q+=F,Q-=.09033/3600;const J=(125.04452-1934.136261*U)*Math.PI/180,le=(280.4665+36000.7698*U)*Math.PI/180,oe=(218.3165+481267.8813*U)*Math.PI/180,ke=(-17.2*Math.sin(J)-1.32*Math.sin(2*le)-.23*Math.sin(2*oe)+.21*Math.sin(2*J))/3600;Q+=ke;const ne=(357.52911+35999.05029*U-1537e-7*U*U)*Math.PI/180,pe=.016708634-42037e-9*U-1267e-10*U*U,Le=1.000001018*(1-pe*pe)/(1+pe*Math.cos(ne+(1.914602-.004817*U)*(Math.PI/180)*Math.sin(ne)));return Q-=20.4898/3600/(Le||1),(Q%360+360)%360}function s(R){if(R<1900){const J=R;if(J<1600)return 120;if(J<1700){const oe=J-1600;return 120-.9808*oe-.01532*oe*oe+oe*oe*oe/7129}if(J<1800){const oe=J-1700;return 8.83+.1603*oe-.0059285*oe*oe+13336e-8*oe*oe*oe-oe**4/1174e3}if(J<1860){const oe=J-1800;return 13.72-.332447*oe+.0068612*oe*oe+.0041116*oe**3-37436e-8*oe**4+121272e-10*oe**5-1699e-10*oe**6+875e-12*oe**7}const le=J-1860;return 7.62+.5737*le-.251754*le*le+.01680668*le**3-.0004473624*le**4+le**5/233174}const Y=[[1900,-2.8],[1920,21.2],[1940,24.3],[1950,29.1],[1960,33.2],[1970,40.2],[1980,50.5],[1990,56.9],[2e3,63.8],[2010,66.1],[2020,69.4],[2030,72],[2050,80],[2100,110]];if(R<=Y[0][0])return Y[0][1];for(let J=1;J<Y.length;J++)if(R<=Y[J][0]){const[le,oe]=Y[J-1],[ke,ne]=Y[J];return oe+(ne-oe)*(R-le)/(ke-le)}const[U,ie]=Y[Y.length-1],Q=(U-1820)/100,F=(R-1820)/100;return ie+32*(F*F-Q*Q)}const $=8/24,d=7.7611/24,f=2425612+4/24;function r(R){return R<f?d:$}const o=C({max:4096,name:"termInstant"}),l=1e-5,i=new Map,u=365.2422;function h(R,Y){const U=A(Y),ie=q(R,1,5)-.5+Y*15.2184,Q=i.get(Y);let F=Q!==void 0?Q+u:ie;Math.abs(F-ie)>20&&(F=ie);for(let le=0;le<12;le++){let oe=U-k(F);if(oe=((oe+180)%360+360)%360-180,F+=oe/.98564736,Math.abs(oe)<l)break}i.set(Y,F);const J=F-s(R)/86400;return J+r(J)}function y(R,Y){const U=R*24+Y,ie=o.get(U);if(ie!==void 0)return ie;const Q=h(R,Y);return o.set(U,Q),Q}function S(R){const Y=Math.floor(R+.5),U=R+.5-Y,ie=Math.min(1439,Math.floor(Math.round(U*86400)/60)),{year:Q,month:F,day:J}=z(Y);return{year:Q,month:F,day:J,hour:Math.floor(ie/60),minute:ie%60}}function x({year:R,month:Y,day:U,hour:ie=0,minute:Q=0}){return q(R,Y,U)-.5+(ie*60+Q)/1440}function b(R,Y,U){const ie=q(R,Y,U)-q(R,1,1)+1,Q=2*Math.PI*(ie-81)/364;return 9.87*Math.sin(2*Q)-7.53*Math.cos(Q)-1.5*Math.sin(Q)}const G=C({max:8,name:"termWindow"}),I=C({max:32,name:"termYear"}),$e=Array.from({length:24},(R,Y)=>Y),we=$e.filter(R=>R%2===0);function c(R,Y){const U=Y?`${R}|jie`:`${R}|all`,ie=I.get(U);if(ie)return ie;if(Y){const F=I.get(`${R}|all`);if(F){const J=F.filter(le=>le.index%2===0);return I.set(U,J),J}}const Q=[];for(const F of Y?we:$e)Q.push({year:R,index:F,name:N[F],jd:y(R,F)});return Q.sort((F,J)=>F.jd-J.jd),I.set(U,Q),Q}function M(R,Y={}){const U=D(Y.jieOnly),ie=U?`${R}|jie`:R,Q=G.get(ie);if(Q)return Q;const F=[...c(R-1,U),...c(R,U),...c(R+1,U)];return F.sort((J,le)=>J.jd-le.jd),G.set(ie,F),F}function X(R){if(typeof R!="string"||R.length<2)return[];const Y=H.indexOf(R[0]),U=L.indexOf(R[1]);if(Y<0||U<0)return[];const ie=p(Y,U);if(ie<0)return[];const Q=Math.floor(ie/10)*10;return[L[(Q+10)%12],L[(Q+11)%12]]}function te(R,Y){let U=null;for(const ie of R)if(ie.index%2===0)if(ie.jd<=Y)U=ie;else break;return U}function K(R,Y){for(const U of R)if(U.index%2===0&&U.jd>Y)return U;return null}function ee(R){const Y=S(R),U=ie=>String(ie).padStart(2,"0");return`${Y.year}-${U(Y.month)}-${U(Y.day)} ${U(Y.hour)}:${U(Y.minute)}`}function re(){return[o.stats(),I.stats(),G.stats()]}return{STEMS:H,BRANCHES:L,TERM_NAMES:N,termLongitude:A,toJDN:q,fromJDN:z,sexagenaryIndex:p,ganzhiName:w,dayGanzhiIndex:_,sunLongitude:k,deltaTSeconds:s,OFFSET_MODERN:$,OFFSET_BEIJING_LOCAL:d,CUTOVER_JD:f,localOffsetFor:r,termInstantJd:y,jdToParts:S,partsToJd:x,equationOfTime:b,termWindow:M,xunKongOf:X,previousJie:te,nextJie:K,formatJd:ee,cacheMetrics:re}})(),v.lunar=(function(){const{toJDN:P,jdToParts:C,termInstantJd:D,deltaTSeconds:H,localOffsetFor:L}=v.calendar||{},N=29.530588861,A=245155009766e-5,q=Math.PI/180;function z(s){const $=s/1236.85,d=A+N*s+15437e-8*$*$-15e-8*$*$*$+73e-11*$*$*$*$,f=1-.002516*$-74e-7*$*$,r=(2.5534+29.1053567*s-14e-7*$*$-11e-8*$*$*$)*q,o=(201.5643+385.81693528*s+.0107582*$*$+1238e-8*$*$*$-58e-9*$*$*$*$)*q,l=(160.7108+390.67050284*s-.0016118*$*$-227e-8*$*$*$+11e-9*$*$*$*$)*q,i=(124.7746-1.56375588*s+.0020672*$*$+215e-8*$*$*$)*q,u=-.4072*Math.sin(o)+.17241*f*Math.sin(r)+.01608*Math.sin(2*o)+.01039*Math.sin(2*l)+.00739*f*Math.sin(o-r)-.00514*f*Math.sin(o+r)+.00208*f*f*Math.sin(2*r)-.00111*Math.sin(o-2*l)-57e-5*Math.sin(o+2*l)+56e-5*f*Math.sin(2*o+r)-42e-5*Math.sin(3*o)+42e-5*f*Math.sin(r+2*l)+38e-5*f*Math.sin(r-2*l)-24e-5*f*Math.sin(2*o-r)-17e-5*Math.sin(i)-7e-5*Math.sin(o+2*r)+4e-5*Math.sin(2*o-2*l)+4e-5*Math.sin(3*r)+3e-5*Math.sin(o+r-2*l)+3e-5*Math.sin(2*o+2*l)-3e-5*Math.sin(o+r+2*l)+3e-5*Math.sin(o-r+2*l)-2e-5*Math.sin(o-r-2*l)-2e-5*Math.sin(3*o+r)+2e-5*Math.sin(4*o),h=d+u-H(2e3+$*100)/86400;return h+L(h)}function p(s){return Math.floor(s+.5)}function w(s){return Math.round((s+.5-A)/N)}function _(s,$,d){for(let f=s-1;f<=s+1;f++)for(let r=1;r<24;r+=2){const o=D(f,r),l=p(o);if(l>=$&&l<d)return{index:r,jd:o}}return null}function k(s,$,d){const f=P(s,$,d),r=p(D(s,23)),o=f<r?s-1:s,l=p(D(o,23));let i=w(l);for(;p(z(i))>l;)i--;for(;p(z(i+1))<=l;)i++;const u=p(D(o+1,23));let h=i;for(;p(z(h+1))<=u;)h++;const y=h-i;let S=-1;if(y===13)for(let G=1;G<=y;G++){const I=p(z(i+G-1)),$e=p(z(i+G));if(!_(o,I,$e)){S=G;break}}let x=11,b=!1;for(let G=1;G<=15;G++){const I=p(z(i+G-1)),$e=p(z(i+G)),we=_(o,I,$e),c=G===S;if(f>=I&&f<$e){const M=C(z(i+G-1)),X=c?(x+10)%12+1:x;return{year:o,lunarYear:b?o+1:o,month:X,day:f-I+1,isLeap:c,monthStart:`${M.year}-${String(M.month).padStart(2,"0")}-${String(M.day).padStart(2,"0")}`,hasZhongQi:!!we}}c||(x=x%12+1,x===1&&(b=!0))}throw new Error(`农历换算失败:${s}-${$}-${d}`)}return{SYNODIC:N,newMoonJd:z,dayNumberOf:p,solarToLunar:k}})(),v.geo=(function(){const{bool:P}=v.bool||{},C=`
4
4
  北京 116.41 39.90;上海 121.47 31.23;天津 117.20 39.13;重庆 106.55 29.56
package/client.zeri.js CHANGED
@@ -1,4 +1,4 @@
1
- window.__ModuleLoader__.load({id:"dsh-metaphysics",chunk:"client.zeri.js",factory(pt){const P={};return P.fail=(function(){return{fail:(W,V)=>{const ee=new Error(V);return ee.code=W,ee}}})(),P.bool=(function(){function G(r,d=!1){return r==null||r===""?d:r===!0||r===1||r==="true"||r==="1"?!0:r===!1||r===0||r==="false"||r==="0"?!1:d}const W={lateZi:!0,trueSolar:!0,dst:!0,isLeapMonth:!1,leapAsNext:!1,cross:!1,hourUnknown:!1,diff:!1,shadow:!1,trace:!1,rectify:!1,withInterpret:!1},V={lateZi:!0,trueSolar:!0,dst:!0,hourUnknown:!1};function ee(r,d){let l=r;const O=(g,p)=>{Object.is(r[g],p)||(l===r&&(l={...r}),l[g]=p)},S=g=>{l===r&&(l={...r}),delete l[g]};for(const[g,p]of Object.entries(d))if(r[g]!==void 0){if(typeof r[g]=="string"&&r[g].trim()===""){S(g);continue}O(g,G(r[g],p))}return l}function Z(r){if(!r||typeof r!="object"||Array.isArray(r))return r;let d=r;for(const[l,O]of Object.entries(V)){if(r[l]===void 0)continue;if(typeof r[l]=="string"&&r[l].trim()===""){d===r&&(d={...r}),delete d[l];continue}const S=G(r[l],O);Object.is(r[l],S)||(d===r&&(d={...r}),d[l]=S)}return d}function j(r){if(!r||typeof r!="object")return r;let d=ee(r,W);for(const l of["partner","partner2"]){const O=d[l],S=Z(O);S!==O&&(d===r&&(d={...r}),d[l]=S)}return d}const E=["hour","minute","longitude","verifyPast","seed","days","lunarYear","lunarMonth","lunarDay","num1","num2","num3","upper","lower","changing","count","toAge","fortuneYear","period","limit","sittingOffset","sittingDegree","facingOffset","facingDegree","year","month","day"],Y=["lines","rectifyHours","answers"],N=["strokeOverrides","surnameStrokes"],$=/^[+-]?(\d+(\.\d*)?|\.\d+)([eE][+-]?\d+)?$/;function f(r){if(typeof r!="string")return r;const d=r.trim();if(!$.test(d))return r;const l=Number(d);return Number.isFinite(l)?l:r}function D(r){let d=!1;const l={};for(const[O,S]of Object.entries(r)){const g=S===null?null:f(S);Object.is(g,S)||(d=!0),l[O]=g}return d?l:r}function w(r){if(!r||typeof r!="object")return r;let d=r;const l=(O,S)=>{Object.is(r[O],S)||(d===r&&(d={...r}),d[O]=S)};for(const O of E)if(r[O]!==void 0){if(typeof r[O]=="string"&&r[O].trim()===""){d===r&&(d={...r}),delete d[O];continue}l(O,f(r[O]))}for(const O of Y){const S=r[O];if(!Array.isArray(S))continue;let g=!1;const p=S.map(o=>{if(o===null)return null;if(typeof o=="string"&&o.trim()===""){g=!0;return}const s=f(o);return Object.is(s,o)||(g=!0),s});g&&l(O,p)}for(const O of N){const S=r[O];!S||typeof S!="object"||Array.isArray(S)||l(O,D(S))}return d}return{bool:G,FLAG_DEFAULTS:W,canonicalFlags:j,NUMERIC_KEYS:E,NUMERIC_ARRAY_KEYS:Y,NUMERIC_MAP_KEYS:N,canonicalNumbers:w}})(),P.diff=(function(){const{bool:G}=P.bool||{},W=new Set(["summary","interpret","castAt","asOf","precision","disclaimer","note","trueSolarText","civilText","offsetMinutes","input","jd","juMethod","juMethodNote","lateZiHourMode","leapPolicy","schools","bodyMasterSchool","bodyMasterNote","handle","handleError","revision","brief","briefError"]),V=o=>o!==null&&typeof o=="object";function ee(o,s,u="",m=[]){if(o===s)return m;if(!V(o)||!V(s))return m.push({path:u||"(root)",from:o,to:s}),m;const y=new Set([...Object.keys(o),...Object.keys(s)]);for(const A of y){if(W.has(A))continue;const x=u?`${u}.${A}`:A,B=o[A],q=s[A];V(B)&&V(q)?ee(B,q,x,m):JSON.stringify(B)!==JSON.stringify(q)&&m.push({path:x,from:B,to:q})}return m}const Z=[[/^pillars\.year\.ganzhi$/,"年柱"],[/^pillars\.month\.ganzhi$/,"月柱"],[/^pillars\.day\.ganzhi$/,"日柱"],[/^pillars\.hour\.ganzhi$/,"时柱"],[/^pillars\.\w+\.hidden/,"藏干"],[/^pillars\.\w+\.stemTenGod$/,"十神"],[/^pillars\.\w+\.kongwang/,"空亡"],[/^pillars\.\w+\.dishi$|^pillars\.\w+\.zizuo$/,"十二长生"],[/^pillars\.\w+\.nayin$/,"纳音"],[/^dayMaster\./,"日主"],[/^palaces\.(taiyuan|minggong|shengong)\./,"命身宫"],[/^palaces\.\d+\.(palace|branch|stem|ganzhi)$/,"宫位"],[/^palaces\.\d+\.stars\.\d+\.(name|brightness|type)$/,"星曜"],[/^palaces\.\d+\.shensha\./,"神煞"],[/^palaces\.\d+\.(daxian|xiaoxian)\./,"大限"],[/^palaces\.\d+\.sanfang\./,"三方四正"],[/^palaces\.\d+\./,"宫位"],[/^palaces\./,"命身宫"],[/^soul\./,"命宫"],[/^body\./,"身宫"],[/^doujun\./,"流年斗君"],[/^siZhu\.year$/,"年柱"],[/^siZhu\.month$/,"月柱"],[/^siZhu\.day$/,"日柱"],[/^siZhu\.time$/,"时柱"],[/^ju$|^juNumber$/,"局数"],[/^yuan$/,"三元"],[/^dun$/,"阴阳遁"],[/^daxian(List)?\./,"大限"],[/^fly(Chains|Composite)?\./,"飞星"],[/^pattern/,"格局"],[/^schools\./,"流派回显"],[/^dayun\.jiao\./,"起运"],[/^dayun\.toNextJieDays$/,"起运时间"],[/^dayun\.list\.(\d+)\.ganzhi$/,"大运干支"],[/^dayun\.startAge\./,"起运时间"],[/^dayun\./,"大运评分"],[/^liunian\./,"流年"],[/^jieqi\./,"节气边界"],[/^solarTime\./,"真太阳时"],[/^dayGanZhi$/,"日辰"],[/^hourZhi$/,"时支"],[/^yueJiang\./,"月将"],[/^xunKong$/,"旬空"],[/^lines\.(\d+)\./,"爻"],[/^shensha\./,"神煞"],[/^frame\./,"格局用神"],[/^strength\./,"旺衰"],[/^wuxing\./,"五行计数"],[/^relations\./,"干支关系"],[/^input\./,"输入回显"]],j=[[/^pillars\./,"四柱"],[/^shensha\./,"神煞"],[/^dayun\./,"大运"],[/^liunian\./,"流年"],[/^frame\./,"格局用神"],[/^strength\./,"旺衰"],[/^wuxing\./,"五行计数"],[/^dayMaster\./,"日主"],[/^relations\./,"干支关系"],[/^palaces\.(taiyuan|minggong|shengong)\./,"命身宫"],[/^palaces\.\d+\./,"宫位"],[/^palaces\./,"命身宫"],[/^soul\.|^body\.|^doujun\./,"命身宫"],[/^siZhu\./,"四柱"],[/^ju$|^juNumber$|^yuan$|^dun$/,"局数"],[/^daxian/,"大限"],[/^fly/,"飞星"],[/^pattern/,"格局"],[/^jieqi\./,"节气"],[/^solarTime\./,"真太阳时"],[/^input\./,"输入回显"],[/^lines\./,"爻"]],E=[[/^pillars\.(year|month|day|hour)\.ganzhi$/,"柱"],[/^palaces\.(minggong|shengong)\.ganzhi$/,"命身宫"],[/^soul\.ganzhi$/,"命宫"],[/^body\.branch$/,"身宫"],[/^siZhu\.(year|month|day|time)$/,"柱"],[/^dayun\.jiao\.at$/,"起运"],[/^dayGanZhi$/,"日辰"],[/^hourZhi$/,"时支"],[/^ju$|^juNumber$|^juName$/,"局数"],[/^dun$/,"阴阳遁"],[/^lines\.\d+\.(ganzhi|yinYang|name)$/,"爻"],[/^yueJiang\.(name|zhi)$/,"月将"]];function Y(o){for(const[s,u]of Z)if(s.test(o))return u;return N(o)||o}function N(o){for(const[s,u]of j)if(s.test(o))return u;return""}function $(o){for(const[s,u]of E)if(s.test(o))return u;return""}function f(o){return[...o].sort((s,u)=>s.path.localeCompare(u.path,"zh-Hans-CN",{numeric:!0}))}function D(o){if(!o.length)return"本盘不受此口径影响:所有字段一致。";const s=o.filter(A=>$(A.path)),u=[...new Set(o.map(A=>N(A.path)).filter(Boolean))],m=s.length?`根因 ${s.length} 处:`+s.slice(0,4).map(A=>`${Y(A.path)} ${w(A.from)}→${w(A.to)}`).join("、")+(s.length>4?" 等":""):"无单一根因",y=u.length?`;连带影响 ${u.slice(0,6).join("、")}${u.length>6?" 等":""} ${u.length} 类,共 ${o.length} 处`:`;共 ${o.length} 处`;return m+y+"。"}const w=o=>o===void 0?"—":o===null?"null":typeof o=="string"?o:Array.isArray(o)?o.join("")||"[]":typeof o=="object"?JSON.stringify(o):String(o);function r(o,{title:s="",limit:u=12}={}){const m=[];if(s&&m.push(`【${s}】`),m.push(D(o)),!o.length)return m.join(`
1
+ window.__ModuleLoader__.load({id:"dsh-metaphysics",chunk:"client.zeri.js",factory(pt){const P={};return P.fail=(function(){return{fail:(W,V)=>{const ee=new Error(V);return ee.code=W,ee}}})(),P.bool=(function(){function G(r,d=!1){return r==null||r===""?d:r===!0||r===1||r==="true"||r==="1"?!0:r===!1||r===0||r==="false"||r==="0"?!1:d}const W={lateZi:!0,trueSolar:!0,dst:!0,isLeapMonth:!1,leapAsNext:!1,cross:!1,hourUnknown:!1,diff:!1,shadow:!1,trace:!1,rectify:!1,withInterpret:!1},V={lateZi:!0,trueSolar:!0,dst:!0,hourUnknown:!1};function ee(r,d){let l=r;const O=(g,p)=>{Object.is(r[g],p)||(l===r&&(l={...r}),l[g]=p)},S=g=>{l===r&&(l={...r}),delete l[g]};for(const[g,p]of Object.entries(d))if(r[g]!==void 0){if(typeof r[g]=="string"&&r[g].trim()===""){S(g);continue}O(g,G(r[g],p))}return l}function Z(r){if(!r||typeof r!="object"||Array.isArray(r))return r;let d=r;for(const[l,O]of Object.entries(V)){if(r[l]===void 0)continue;if(typeof r[l]=="string"&&r[l].trim()===""){d===r&&(d={...r}),delete d[l];continue}const S=G(r[l],O);Object.is(r[l],S)||(d===r&&(d={...r}),d[l]=S)}return d}function j(r){if(!r||typeof r!="object")return r;let d=ee(r,W);for(const l of["partner","partner2"]){const O=d[l],S=Z(O);S!==O&&(d===r&&(d={...r}),d[l]=S)}return d}const E=["hour","minute","longitude","verifyPast","seed","days","lunarYear","lunarMonth","lunarDay","num1","num2","num3","upper","lower","changing","count","toAge","fortuneYear","period","limit","sittingOffset","sittingDegree","facingOffset","facingDegree","year","month","day"],Y=["lines","rectifyHours","answers"],N=["strokeOverrides","surnameStrokes"],$=/^[+-]?(\d+(\.\d*)?|\.\d+)([eE][+-]?\d+)?$/;function f(r){if(typeof r!="string")return r;const d=r.trim();if(!$.test(d))return r;const l=Number(d);return Number.isFinite(l)?l:r}function D(r){let d=!1;const l={};for(const[O,S]of Object.entries(r)){const g=S===null?null:f(S);Object.is(g,S)||(d=!0),l[O]=g}return d?l:r}function w(r){if(!r||typeof r!="object")return r;let d=r;const l=(O,S)=>{Object.is(r[O],S)||(d===r&&(d={...r}),d[O]=S)};for(const O of E)if(r[O]!==void 0){if(typeof r[O]=="string"&&r[O].trim()===""){d===r&&(d={...r}),delete d[O];continue}l(O,f(r[O]))}for(const O of Y){const S=r[O];if(!Array.isArray(S))continue;let g=!1;const p=S.map(o=>{if(o===null)return null;if(typeof o=="string"&&o.trim()===""){g=!0;return}const s=f(o);return Object.is(s,o)||(g=!0),s});g&&l(O,p)}for(const O of N){const S=r[O];!S||typeof S!="object"||Array.isArray(S)||l(O,D(S))}return d}return{bool:G,FLAG_DEFAULTS:W,canonicalFlags:j,NUMERIC_KEYS:E,NUMERIC_ARRAY_KEYS:Y,NUMERIC_MAP_KEYS:N,canonicalNumbers:w}})(),P.diff=(function(){const{bool:G}=P.bool||{},W=new Set(["summary","interpret","castAt","asOf","precision","disclaimer","note","trueSolarText","civilText","offsetMinutes","input","jd","juMethod","juMethodNote","lateZiHourMode","leapPolicy","schools","bodyMasterSchool","bodyMasterNote","handle","handleError","revision","brief","briefError"]),V=o=>o!==null&&typeof o=="object";function ee(o,s,u="",m=[]){if(o===s)return m;if(!V(o)||!V(s))return m.push({path:u||"(root)",from:o,to:s}),m;const y=new Set([...Object.keys(o),...Object.keys(s)]);for(const A of y){if(W.has(A))continue;const x=u?`${u}.${A}`:A,B=o[A],q=s[A];V(B)&&V(q)?ee(B,q,x,m):JSON.stringify(B)!==JSON.stringify(q)&&m.push({path:x,from:B,to:q})}return m}const Z=[[/^pillars\.year\.ganzhi$/,"年柱"],[/^pillars\.month\.ganzhi$/,"月柱"],[/^pillars\.day\.ganzhi$/,"日柱"],[/^pillars\.hour\.ganzhi$/,"时柱"],[/^pillars\.\w+\.hidden/,"藏干"],[/^pillars\.\w+\.stemTenGod$/,"十神"],[/^pillars\.\w+\.kongwang/,"空亡"],[/^pillars\.\w+\.dishi$|^pillars\.\w+\.zizuo$/,"十二长生"],[/^pillars\.\w+\.nayin$/,"纳音"],[/^dayMaster\./,"日主"],[/^palaces\.(taiyuan|minggong|shengong)\./,"命身宫"],[/^palaces\.\d+\.(palace|branch|stem|ganzhi)$/,"宫位"],[/^palaces\.\d+\.stars\.\d+\.(name|brightness|type)$/,"星曜"],[/^palaces\.\d+\.shensha\./,"神煞"],[/^palaces\.\d+\.(daxian|xiaoxian)\./,"大限"],[/^palaces\.\d+\.sanfang\./,"三方四正"],[/^palaces\.\d+\./,"宫位"],[/^palaces\./,"命身宫"],[/^soul\./,"命宫"],[/^body\./,"身宫"],[/^doujun\./,"流年斗君"],[/^siZhu\.year$/,"年柱"],[/^siZhu\.month$/,"月柱"],[/^siZhu\.day$/,"日柱"],[/^siZhu\.time$/,"时柱"],[/^ju$|^juNumber$/,"局数"],[/^yuan$/,"三元"],[/^dun$/,"阴阳遁"],[/^daxian(List)?\./,"大限"],[/^fly(Chains|Composite)?\./,"飞星"],[/^pattern/,"格局"],[/^schools\./,"流派回显"],[/^dayun\.jiao\./,"起运"],[/^dayun\.toNextJieDays$/,"起运时间"],[/^dayun\.list\.(\d+)\.ganzhi$/,"大运干支"],[/^dayun\.startAge(Exact)?\./,"起运时间"],[/^dayun\./,"大运评分"],[/^liunian\./,"流年"],[/^jieqi\./,"节气边界"],[/^solarTime\./,"真太阳时"],[/^dayGanZhi$/,"日辰"],[/^hourZhi$/,"时支"],[/^yueJiang\./,"月将"],[/^xunKong$/,"旬空"],[/^lines\.(\d+)\./,"爻"],[/^shensha\./,"神煞"],[/^frame\./,"格局用神"],[/^strength\./,"旺衰"],[/^wuxing\./,"五行计数"],[/^relations\./,"干支关系"],[/^input\./,"输入回显"]],j=[[/^pillars\./,"四柱"],[/^shensha\./,"神煞"],[/^dayun\./,"大运"],[/^liunian\./,"流年"],[/^frame\./,"格局用神"],[/^strength\./,"旺衰"],[/^wuxing\./,"五行计数"],[/^dayMaster\./,"日主"],[/^relations\./,"干支关系"],[/^palaces\.(taiyuan|minggong|shengong)\./,"命身宫"],[/^palaces\.\d+\./,"宫位"],[/^palaces\./,"命身宫"],[/^soul\.|^body\.|^doujun\./,"命身宫"],[/^siZhu\./,"四柱"],[/^ju$|^juNumber$|^yuan$|^dun$/,"局数"],[/^daxian/,"大限"],[/^fly/,"飞星"],[/^pattern/,"格局"],[/^jieqi\./,"节气"],[/^solarTime\./,"真太阳时"],[/^input\./,"输入回显"],[/^lines\./,"爻"]],E=[[/^pillars\.(year|month|day|hour)\.ganzhi$/,"柱"],[/^palaces\.(minggong|shengong)\.ganzhi$/,"命身宫"],[/^soul\.ganzhi$/,"命宫"],[/^body\.branch$/,"身宫"],[/^siZhu\.(year|month|day|time)$/,"柱"],[/^dayun\.jiao\.at$/,"起运"],[/^dayGanZhi$/,"日辰"],[/^hourZhi$/,"时支"],[/^ju$|^juNumber$|^juName$/,"局数"],[/^dun$/,"阴阳遁"],[/^lines\.\d+\.(ganzhi|yinYang|name)$/,"爻"],[/^yueJiang\.(name|zhi)$/,"月将"]];function Y(o){for(const[s,u]of Z)if(s.test(o))return u;return N(o)||o}function N(o){for(const[s,u]of j)if(s.test(o))return u;return""}function $(o){for(const[s,u]of E)if(s.test(o))return u;return""}function f(o){return[...o].sort((s,u)=>s.path.localeCompare(u.path,"zh-Hans-CN",{numeric:!0}))}function D(o){if(!o.length)return"本盘不受此口径影响:所有字段一致。";const s=o.filter(A=>$(A.path)),u=[...new Set(o.map(A=>N(A.path)).filter(Boolean))],m=s.length?`根因 ${s.length} 处:`+s.slice(0,4).map(A=>`${Y(A.path)} ${w(A.from)}→${w(A.to)}`).join("、")+(s.length>4?" 等":""):"无单一根因",y=u.length?`;连带影响 ${u.slice(0,6).join("、")}${u.length>6?" 等":""} ${u.length} 类,共 ${o.length} 处`:`;共 ${o.length} 处`;return m+y+"。"}const w=o=>o===void 0?"—":o===null?"null":typeof o=="string"?o:Array.isArray(o)?o.join("")||"[]":typeof o=="object"?JSON.stringify(o):String(o);function r(o,{title:s="",limit:u=12}={}){const m=[];if(s&&m.push(`【${s}】`),m.push(D(o)),!o.length)return m.join(`
2
2
  `);const y=f(o.filter(x=>$(x.path))),A=f(o.filter(x=>!$(x.path)));if(y.length){m.push(""),m.push(" 根因(口径直接改动):");for(const x of y)m.push(` ${Y(x.path).padEnd(6)} ${w(x.from)} → ${w(x.to)}`)}if(A.length){m.push(""),m.push(` 连带变化(${A.length} 处,展示前 ${Math.min(u,A.length)} 处):`);for(const x of A.slice(0,u))m.push(` ${Y(x.path).padEnd(6)} ${w(x.from)} → ${w(x.to)}`);if(A.length>u){const x={};for(const B of A.slice(u)){const q=N(B.path)||"其他";x[q]=(x[q]||0)+1}m.push(" 其余:"+Object.entries(x).map(([B,q])=>`${B} ${q} 处`).join("、"))}}return m.join(`
3
3
  `)}const d=(o,s,u,m,y,A)=>({key:o,title:s,short:u,read:x=>{const B=x[o]!==void 0?x[o]:x.schools&&x.schools[o];return A[B]?B:m},alt:x=>x===y?m:y,label:x=>A[x]||x}),l={bazi:[{key:"lateZi",title:"晚子时:23:00 后是否换日",short:"晚子时",read:o=>G(o.lateZi,!0),alt:o=>!o,label:o=>o?"换日":"不换日"},{key:"trueSolar",title:"真太阳时:是否按出生地经度修正",short:"真太阳时",read:o=>G(o.trueSolar,!0),alt:o=>!o,label:o=>o?"修正":"不修正"}],ziwei:[{key:"leapMonth",title:"闰月归月:按日切分 / 整月归次月",short:"闰月归月",read:o=>o.leapMonth==="next"||o.leapMonth==="prev"?o.leapMonth:"split",alt:o=>o==="split"?"next":"split",label:o=>({split:"按日切分",next:"整月归次月",prev:"整月归本月"})[o]||o},{key:"trueSolar",title:"真太阳时:是否按出生地经度修正",short:"真太阳时",read:o=>G(o.trueSolar,!0),alt:o=>!o,label:o=>o?"修正":"不修正"},d("brightnessSchool","亮度表:默认 / QS 七档","亮度表","default","QS",{default:"默认",QS:"QS(七档)",XD1:"XD1(七档)",ZZ:"ZZ(五档)",XD2:"XD2(五档)"}),d("gengYearSihua","庚干四化:阳武阴同 / 同科阴忌","庚干四化","GYWYT","GYWTY",{GYWYT:"阳武阴同",GYWTY:"同科阴忌",GYWFT:"府科同忌",GYWFX:"府科相忌",GYWTX:"同科相忌"}),d("tianmaSchool","天马:按年支 / 按生月","天马","year-branch","month-branch",{"year-branch":"年支","month-branch":"生月"}),d("tiankongSchool","天空:不排 / 年支顺行","天空","off","normal",{off:"不排",normal:"年支顺行","shun-jia-shi":"加生时"}),d("jiekongSchool","截空旬空:不排 / 正副双星","截空旬空","off","double",{off:"不排",single:"单星",double:"正副双星",zhanyan:"占验派"}),d("kuiyueSchool","魁钺:qs1 / qs2","魁钺","qs1","qs2",{qs1:"qs1",qs2:"qs2","zhong-yiming":"中一鸣"}),d("tianshiTianshang","天伤天使:常规 / 中州互换","天伤天使","normal","zhongzhou",{normal:"常规",zhongzhou:"中州(阴男阳女互换)"}),d("changshengSchool","长生:阴阳顺逆 / 火土起寅","长生","yin-yang-shun-ni","huo-tu",{"yin-yang-shun-ni":"阴阳顺逆","shui-tu":"水二","huo-tu":"火土(土五局起寅)"}),d("lateZishi","晚子时:归当日 / 归次日","晚子时","current-day","next-day",{"current-day":"归当日","next-day":"归次日","all-current":"全归当日","day-cur-time-next":"日归当日·时归次日"}),d("shenzhuSchool","身主:子午皆火星 / 子铃午火","身主","common","verse",{common:"子午皆火星",verse:"子铃午火(安身主诀逐字)"}),d("zuoyaoSchool","杂曜:49 颗简盘 / 61 颗全表","杂曜全表","minimal","full",{minimal:"49 颗(简盘)",full:"61 颗(加十二颗杂曜)"})],qimen:[{key:"juMethod",title:"取局流派:拆补 / 超神接气 / 置闰",short:"取局流派",read:o=>["chaibu","chaoshen","zhirun"].includes(o.juMethod)?o.juMethod:"chaibu",alt:o=>o==="chaibu"?"zhirun":"chaibu",label:o=>({chaibu:"拆补法",chaoshen:"超神接气",zhirun:"置闰法"})[o]||o},{key:"lateZiHourMode",title:"晚子时:23:00 后归当日 / 次日",short:"晚子时归日",read:o=>o.lateZiHourMode==="next-day"?"next-day":"same-day",alt:o=>o==="next-day"?"same-day":"next-day",label:o=>o==="next-day"?"归次日":"归当日"}]},O={bazi:[{path:"pillars.day.ganzhi",label:"日柱"},{path:"pillars.hour.ganzhi",label:"时柱"},{path:"strength.level",label:"旺衰"},{path:"frame.primaryName",label:"格局"},{path:"frame.yongshen.favor",label:"喜用"},{path:"dayun.jiao.at",label:"起运"}],ziwei:[{path:"soul.ganzhi",label:"命宫"},{path:"body.branch",label:"身宫支"},{path:"bureau.name",label:"五行局"},{path:"bodyMaster",label:"身主"},{path:"daxianList.0.ages",label:"起大限"}],qimen:[{path:"siZhu.day",label:"日柱"},{path:"ju",label:"局数"},{path:"zhiFu.star",label:"值符"},{path:"zhiShi.gate",label:"值使"}]};function S(o,s){let u=o;for(const m of String(s).split(".")){if(u==null)return;u=u[m]}return u}function g(o){return o==null?"—":Array.isArray(o)?o.join("、"):typeof o=="object"?"—":String(o)}function p(o,s,u){return(O[o]||[]).map(y=>{const A=g(S(s,y.path)),x=g(S(u,y.path));return{key:y.path,label:y.label,current:A,alt:x,changed:A!==x}})}return{diffObjects:ee,labelOf:Y,categoryOf:N,rootOf:$,sortDiffs:f,summarize:D,formatValue:w,renderDiff:r,CALIBER_SWITCHES:l,CALIBER_VIEWS:O,viewCell:g,viewRows:p}})(),P.fingerprint=(function(){const G="0123456789ABCDEFGHJKMNPQRSTVWXYZ";function W(j){return JSON.stringify(V(j))}function V(j){if(j===null)return null;const E=typeof j;if(E==="string")return typeof j.normalize=="function"?j.normalize("NFC"):j;if(E==="number")return Number.isFinite(j)?Object.is(j,-0)?0:j:null;if(E==="boolean")return j;if(Array.isArray(j))return j.map(V);if(E==="object"){const Y=Object.create(null);for(const N of Object.keys(j).sort()){const $=j[N];$===void 0||typeof $=="function"||typeof $=="symbol"||(Y[N]=V($))}return Y}return null}function ee(j){const E=String(j);let Y=2166136261,N=2654435769;for(let D=0;D<E.length;D+=1){const w=E.charCodeAt(D);for(const r of[w&255,w>>>8])Y=Math.imul(Y^r,16777619),N=Math.imul(N^r,2246822507)}let $=(Y>>>0)*8+(N>>>29),f="";for(let D=0;D<7;D+=1)f=G[$%32]+f,$=Math.floor($/32);return f}function Z(j={}){const E=String(j.system||""),Y=String(j.version||"dev"),N=j.seed===void 0||j.seed===null||j.seed===""?null:Number(j.seed),$=j.asOf?String(j.asOf):null,f=j.params&&typeof j.params=="object"?j.params:{},D=W({system:E,params:f,seed:N,asOf:$}),w=W({base:D,version:Y});return{id:`LY-${ee(w)}`,baseId:`LY-${ee(D)}`,version:Y,system:E,payload:D}}return{canonicalJson:W,shortHash:ee,fingerprintOf:Z}})(),P.validate=(function(){const{fail:G}=P.fail||{},W=1600,V=2400;function ee(f){return f%4===0&&f%100!==0||f%400===0}function Z(f,D){return D===2?ee(f)?29:28:[31,28,31,30,31,30,31,31,30,31,30,31][D-1]||0}const j=f=>typeof f=="string"?`「${f}」`:String(f),E="引擎只接受解析好的公历字段 { year, month, day, hour?, minute? };字符串请先交给宿主层的 parseDateTime 解析";function Y(f,D=""){const w=D?`${D} 的`:"";if(!f||typeof f!="object"||Array.isArray(f)){const O=f===null?"null":Array.isArray(f)?"数组":typeof f;throw G("E_INPUT",`${w}入参必须是对象(收到 ${O});${E}`)}const r=f.hour===void 0?0:f.hour,d=f.minute===void 0?0:f.minute;for(const[O,S]of[["year",f.year],["month",f.month],["day",f.day],["hour",r],["minute",d]])if(!Number.isInteger(S))throw G("E_INPUT",`${w}${O} 必须是整数(收到 ${j(S)});${E}`);if(f.year<W||f.year>V)throw G("E_INPUT",`${w}year 超出支持范围 ${W}–${V}(收到 ${f.year});更早的年份时区与历法口径不可靠`);if(f.month<1||f.month>12)throw G("E_INPUT",`${w}month 超出范围 1–12(收到 ${f.month})`);const l=Z(f.year,f.month);if(f.day<1||f.day>l)throw G("E_INPUT",`${w}日期不存在:${f.year}-${f.month}-${f.day}(${f.year} 年 ${f.month} 月只有 ${l} 天)`);if(r<0||r>23)throw G("E_INPUT",`${w}hour 超出范围 0–23(收到 ${r})`);if(d<0||d>59)throw G("E_INPUT",`${w}minute 超出范围 0–59(收到 ${d})`);return f}function N(f,D,w){if(!f||typeof f!="object"||Array.isArray(f)){const r=f===null?"null":f===void 0?"undefined":Array.isArray(f)?"数组":typeof f;throw G("E_INPUT",`${D} 必须是对象(收到 ${r});${w}`)}return f}function $(f,D=""){const w=D?`${D}:`:"";if(f.year<W||f.year>V)throw G("E_RANGE",`${w}晚子时按次日归后落到 ${f.year}-${String(f.month).padStart(2,"0")}-${String(f.day).padStart(2,"0")},超出可计算范围 ${W}–${V};请把时刻挪到 23 点前,或换一天起课`);return f}return{MIN_YEAR:W,MAX_YEAR:V,isLeapYear:ee,daysInMonth:Z,assertCivil:Y,assertObject:N,assertShifted:$}})(),P.datetime=(function(){const{fail:G}=P.fail||{},{MIN_YEAR:W,MAX_YEAR:V}=P.validate||{};function ee(E,Y){return Y===2?E%4===0&&E%100!==0||E%400===0?29:28:[31,28,31,30,31,30,31,31,30,31,30,31][Y-1]}function Z(E,Y=""){const N=String(E??"").trim(),$=/^(\d{4})-(\d{1,2})-(\d{1,2})$/.exec(N);if(!$)return null;const f=Number($[1]),D=Number($[2]),w=Number($[3]);if(D<1||D>12||w<1||w>ee(f,D))return null;if(f<W||f>V){const r=Y?`${Y} `:"";throw G("E_RANGE",`${r}「${$[0]}」的年份超出可计算范围(${W}–${V},收到 ${f} 年);农历与节气表不覆盖之外的年份`)}return{year:f,month:D,day:w}}function j(E){if(typeof E!="string"||!E.trim())throw G("E_INPUT","缺少 datetime(公历日期时间),例如 1990-05-12T14:30");const Y=E.trim().match(/^(\d{4})-(\d{1,2})-(\d{1,2})(?:[T\s](\d{1,2}):(\d{1,2})(?::(\d{1,2}))?)?$/);if(!Y)throw G("E_INPUT",`无法解析 datetime:「${E}」,请用 1990-05-12T14:30 这种格式`);if(Y[6]!==void 0&&Number(Y[6])>59)throw G("E_INPUT",`秒超出范围:${Y[6]}`);const N={year:Number(Y[1]),month:Number(Y[2]),day:Number(Y[3]),hour:Number(Y[4]??0),minute:Number(Y[5]??0)};if(N.month<1||N.month>12)throw G("E_INPUT",`月份超出范围:${N.month}`);const $=ee(N.year,N.month);if(N.day<1||N.day>$)throw G("E_INPUT",`日期不存在:${N.year}-${N.month}-${N.day}(${N.year} 年 ${N.month} 月只有 ${$} 天)`);if(N.hour>23||N.minute>59)throw G("E_INPUT",`时间超出范围:${N.hour}:${N.minute}`);if(N.year<W||N.year>V)throw G("E_RANGE",`年份 ${N.year} 超出可计算范围(${W}–${V})`);return(N.year<1900||N.year>2100)&&(N.precision={level:"approx",note:`ΔT 模型仅覆盖 1900–2100,${N.year} 年按端点值外推,节气与朔望时刻可能有分钟级偏差,月柱在交节前后需复核`}),N}return{daysInMonth:ee,parseYmd:Z,parseDateTime:j}})(),P.lru=(function(){function G({max:W=64,ttlMs:V=0,name:ee="lru",now:Z=()=>Date.now()}={}){const j=new Map,E={name:ee,hits:0,misses:0,evictions:0,expirations:0},Y=N=>V>0&&Z()-N.at>V;return{name:ee,max:W,ttlMs:V,get(N){const $=j.get(N);if(!$||Y($)){$&&(j.delete(N),E.expirations+=1),E.misses+=1;return}return j.delete(N),j.set(N,$),E.hits+=1,$.value},set(N,$){for(j.has(N)&&j.delete(N),j.set(N,{value:$,at:Z()});j.size>W;)j.delete(j.keys().next().value),E.evictions+=1;return $},has(N){const $=j.get(N);return $?Y($)?(j.delete(N),E.expirations+=1,!1):!0:!1},delete(N){return j.delete(N)},clear(){j.clear()},get size(){return j.size},stats(){const N=E.hits+E.misses;return{name:ee,size:j.size,max:W,hits:E.hits,misses:E.misses,evictions:E.evictions,expirations:E.expirations,hitRate:N?E.hits/N:0}}}}return{createLru:G}})(),P.nayin=(function(){const G=["海中金","炉中火","大林木","路旁土","剑锋金","山头火","涧下水","城头土","白蜡金","杨柳木","泉中水","屋上土","霹雳火","松柏木","长流水","沙中金","山下火","平地木","壁上土","金箔金","覆灯火","天河水","大驿土","钗钏金","桑柘木","大溪水","沙中土","天上火","石榴木","大海水"];function W(V){const ee=(Number(V)%60+60)%60,Z=G[Math.floor(ee/2)];return{name:Z,element:Z[2]}}return{NAYIN_NAMES:G,nayinOf:W}})(),P.sanhe=(function(){const G=[{branches:["申","子","辰"],element:"水"},{branches:["亥","卯","未"],element:"木"},{branches:["寅","午","戌"],element:"火"},{branches:["巳","酉","丑"],element:"金"}],W=Object.fromEntries(G.map(Z=>[Z.branches.join(""),Z.element])),V=Object.fromEntries(G.flatMap(Z=>Z.branches.map(j=>[j,Z.element])));function ee(Z){return G.find(j=>j.branches.includes(Z))||null}return{SANHE_GROUPS:G,SANHE:W,SANHE_ELEMENT:V,sanheGroupOf:ee}})(),P["vsop-earth"]=(function(){const G=[[1.75347045673,0,0],[.03341656453,4.66925680415,6283.0758499914],[.00034894275,4.62610242189,12566.1516999828],[3417572e-11,2.82886579754,3.523118349],[3497056e-11,2.74411783405,5753.3848848968],[3135899e-11,3.62767041756,77713.7714681205],[2676218e-11,4.41808345438,7860.4193924392],[2342691e-11,6.13516214446,3930.2096962196],[1273165e-11,2.03709657878,529.6909650946],[1324294e-11,.74246341673,11506.7697697936],[901854e-11,2.04505446477,26.2983197998],[1199167e-11,1.10962946234,1577.3435424478],[857223e-11,3.50849152283,398.1490034082],[779786e-11,1.17882681962,5223.6939198022],[99025e-10,5.23268072088,5884.9268465832],[753141e-11,2.53339052847,5507.5532386674],[505267e-11,4.58292599973,18849.2275499742],[492392e-11,4.20505711826,775.522611324],[356672e-11,2.91954114478,.0673103028],[284125e-11,1.89869240932,796.2980068164],[242879e-11,.34481445893,5486.777843175],[317087e-11,5.84901948512,11790.6290886588],[271112e-11,.31486255375,10977.078804699],[206217e-11,4.80646631478,2544.3144198834],[205478e-11,1.86953770281,5573.1428014331],[202318e-11,2.45767790232,6069.7767545534],[126225e-11,1.08295459501,20.7753954924],[155516e-11,.83306084617,213.299095438],[115132e-11,.64544911683,.9803210682],[102851e-11,.63599845579,4694.0029547076],[101724e-11,4.2667980198,7.1135470008],[99206e-11,6.20992926918,2146.1654164752],[132212e-11,3.41118292683,2942.4634232916],[97607e-11,.68101342359,155.4203994342],[85128e-11,1.29870764804,6275.9623029906],[74651e-11,1.755089133,5088.6288397668],[101895e-11,.97569280312,15720.8387848784],[84711e-11,3.67080093031,71430.69561812909],[73547e-11,4.67926633877,801.8209311238],[73874e-11,3.50319414955,3154.6870848956],[78757e-11,3.03697458703,12036.4607348882],[79637e-11,1.80791287082,17260.1546546904],[85803e-11,5.9832263126,161000.6857376741],[56963e-11,2.78430458592,6286.5989683404],[61148e-11,1.81839892984,7084.8967811152],[69627e-11,.83297621398,9437.762934887],[56116e-11,4.38694865354,14143.4952424306],[62449e-11,3.97763912806,8827.3902698748],[51145e-11,.28306832879,5856.4776591154],[55577e-11,3.47006059924,6279.5527316424],[41036e-11,5.36817592855,8429.2412664666],[51605e-11,1.33282739866,1748.016413067],[51992e-11,.18914947184,12139.5535091068],[49e-8,.48735014197,1194.4470102246],[392e-9,6.16833020996,10447.3878396044],[3557e-10,1.775968892,6812.766815086],[3677e-10,6.04133863162,10213.285546211],[36596e-11,2.56957481827,1059.3819301892],[33296e-11,.59310278598,17789.845619785],[35954e-11,1.70875808777,2352.8661537718],[40938e-11,2.39850938714,19651.048481098],[30047e-11,2.73975124088,1349.8674096588],[30412e-11,.44294464169,83996.84731811189],[23663e-11,.48473622521,8031.0922630584],[23574e-11,2.06528133162,3340.6124266998],[21089e-11,4.14825468851,951.7184062506],[24738e-11,.21484762138,3.5904286518],[25352e-11,3.16470891653,4690.4798363586],[22823e-11,5.22195230819,4705.7323075436],[21419e-11,1.42563910473,16730.4636895958],[21891e-11,5.55594302779,553.5694028424],[203e-9,.37133792946,283.8593188652]],W=[[6283.0758499914,0,0],[.00206058863,2.67823455808,6283.0758499914],[4303419e-11,2.63512233481,12566.1516999828],[425264e-11,1.59046982018,3.523118349],[109017e-11,2.96631010675,1577.3435424478],[93479e-11,2.59211109542,18849.2275499742],[119305e-11,5.79555765566,26.2983197998],[72121e-11,1.13840581212,529.6909650946],[67784e-11,1.87453300345,398.1490034082],[6735e-10,4.40932832004,5507.5532386674],[59045e-11,2.88815790631,5223.6939198022],[55976e-11,2.17471740035,155.4203994342],[45411e-11,.39799502896,796.2980068164],[36298e-11,.46875437227,775.522611324],[28962e-11,2.64732254645,7.1135470008],[20844e-11,5.34138275149,.9803210682]],V=[[8721859e-11,1.07253635559,6283.0758499914],[99099e-10,3.14159265359,0],[294833e-11,.43717350256,12566.1516999828],[27338e-11,.05295636147,3.523118349],[16333e-11,5.18820215724,26.2983197998],[15745e-11,3.68504712183,155.4203994342],[9425e-11,.29667114694,18849.2275499742],[8938e-11,2.05706319592,77713.7714681205],[694e-10,.82691541038,775.522611324],[5061e-11,4.6624323168,1577.3435424478]],ee=[[289058e-11,5.84173149732,6283.0758499914],[20712e-11,6.0498393902,12566.1516999828],[2962e-11,5.1956057957,155.4203994342],[2527e-11,3.14159265359,0],[1288e-11,4.7219761197,3.523118349]],Z=[[7714e-11,4.14117321449,6283.0758499914],[1016e-11,3.27573644241,12566.1516999828]];function j(E){let Y=0;for(const[$,f,D]of G)Y+=$*Math.cos(f+D*E);let N=1;for(const $ of[W,V,ee,Z]){N*=E;for(const[f,D,w]of $)Y+=f*N*Math.cos(D+w*E)}return Y}return{earthL:j}})(),P.calendar=(function(){const{earthL:G}=P["vsop-earth"]||{},{createLru:W}=P.lru||{},{bool:V}=P.bool||{},ee=["甲","乙","丙","丁","戊","己","庚","辛","壬","癸"],Z=["子","丑","寅","卯","辰","巳","午","未","申","酉","戌","亥"],j=["小寒","大寒","立春","雨水","惊蛰","春分","清明","谷雨","立夏","小满","芒种","夏至","小暑","大暑","立秋","处暑","白露","秋分","寒露","霜降","立冬","小雪","大雪","冬至"];function E(T){return(285+15*T)%360}function Y(T,R,L){const C=Math.floor((14-R)/12),ae=T+4800-C,Q=R+12*C-3;return L+Math.floor((153*Q+2)/5)+365*ae+Math.floor(ae/4)-Math.floor(ae/100)+Math.floor(ae/400)-32045}function N(T){const R=T+32044,L=Math.floor((4*R+3)/146097),C=R-Math.floor(146097*L/4),ae=Math.floor((4*C+3)/1461),Q=C-Math.floor(1461*ae/4),F=Math.floor((5*Q+2)/153);return{year:100*L+ae-4800+Math.floor(F/10),month:F+3-12*Math.floor(F/10),day:Q-Math.floor((153*F+2)/5)+1}}function $(T,R){for(let L=0;L<60;L++)if(L%10===T&&L%12===R)return L;return-1}function f(T){const R=(T%60+60)%60;return{index:R,stem:ee[R%10],branch:Z[R%12],name:ee[R%10]+Z[R%12]}}function D(T){return((T+49)%60+60)%60}function w(T){const R=T-2451545,L=R/36525,C=R/365250;let ae=G(C)*180/Math.PI+180;ae=(ae%360+360)%360;const Q=(5029.0966*L+1.11113*L*L-6e-6*L*L*L)/3600;ae+=Q,ae-=.09033/3600;const F=(125.04452-1934.136261*L)*Math.PI/180,de=(280.4665+36000.7698*L)*Math.PI/180,ue=(218.3165+481267.8813*L)*Math.PI/180,_e=(-17.2*Math.sin(F)-1.32*Math.sin(2*de)-.23*Math.sin(2*ue)+.21*Math.sin(2*F))/3600;ae+=_e;const X=(357.52911+35999.05029*L-1537e-7*L*L)*Math.PI/180,Oe=.016708634-42037e-9*L-1267e-10*L*L,on=1.000001018*(1-Oe*Oe)/(1+Oe*Math.cos(X+(1.914602-.004817*L)*(Math.PI/180)*Math.sin(X)));return ae-=20.4898/3600/(on||1),(ae%360+360)%360}function r(T){if(T<1900){const F=T;if(F<1600)return 120;if(F<1700){const ue=F-1600;return 120-.9808*ue-.01532*ue*ue+ue*ue*ue/7129}if(F<1800){const ue=F-1700;return 8.83+.1603*ue-.0059285*ue*ue+13336e-8*ue*ue*ue-ue**4/1174e3}if(F<1860){const ue=F-1800;return 13.72-.332447*ue+.0068612*ue*ue+.0041116*ue**3-37436e-8*ue**4+121272e-10*ue**5-1699e-10*ue**6+875e-12*ue**7}const de=F-1860;return 7.62+.5737*de-.251754*de*de+.01680668*de**3-.0004473624*de**4+de**5/233174}const R=[[1900,-2.8],[1920,21.2],[1940,24.3],[1950,29.1],[1960,33.2],[1970,40.2],[1980,50.5],[1990,56.9],[2e3,63.8],[2010,66.1],[2020,69.4],[2030,72],[2050,80],[2100,110]];if(T<=R[0][0])return R[0][1];for(let F=1;F<R.length;F++)if(T<=R[F][0]){const[de,ue]=R[F-1],[_e,X]=R[F];return ue+(X-ue)*(T-de)/(_e-de)}const[L,C]=R[R.length-1],ae=(L-1820)/100,Q=(T-1820)/100;return C+32*(Q*Q-ae*ae)}const d=8/24,l=7.7611/24,O=2425612+4/24;function S(T){return T<O?l:d}const g=W({max:4096,name:"termInstant"}),p=1e-5,o=new Map,s=365.2422;function u(T,R){const L=E(R),C=Y(T,1,5)-.5+R*15.2184,ae=o.get(R);let Q=ae!==void 0?ae+s:C;Math.abs(Q-C)>20&&(Q=C);for(let de=0;de<12;de++){let ue=L-w(Q);if(ue=((ue+180)%360+360)%360-180,Q+=ue/.98564736,Math.abs(ue)<p)break}o.set(R,Q);const F=Q-r(T)/86400;return F+S(F)}function m(T,R){const L=T*24+R,C=g.get(L);if(C!==void 0)return C;const ae=u(T,R);return g.set(L,ae),ae}function y(T){const R=Math.floor(T+.5),L=T+.5-R,C=Math.min(1439,Math.floor(Math.round(L*86400)/60)),{year:ae,month:Q,day:F}=N(R);return{year:ae,month:Q,day:F,hour:Math.floor(C/60),minute:C%60}}function A({year:T,month:R,day:L,hour:C=0,minute:ae=0}){return Y(T,R,L)-.5+(C*60+ae)/1440}function x(T,R,L){const C=Y(T,R,L)-Y(T,1,1)+1,ae=2*Math.PI*(C-81)/364;return 9.87*Math.sin(2*ae)-7.53*Math.cos(ae)-1.5*Math.sin(ae)}const B=W({max:8,name:"termWindow"}),q=W({max:32,name:"termYear"}),xe=Array.from({length:24},(T,R)=>R),Te=xe.filter(T=>T%2===0);function a(T,R){const L=R?`${T}|jie`:`${T}|all`,C=q.get(L);if(C)return C;if(R){const Q=q.get(`${T}|all`);if(Q){const F=Q.filter(de=>de.index%2===0);return q.set(L,F),F}}const ae=[];for(const Q of R?Te:xe)ae.push({year:T,index:Q,name:j[Q],jd:m(T,Q)});return ae.sort((Q,F)=>Q.jd-F.jd),q.set(L,ae),ae}function v(T,R={}){const L=V(R.jieOnly),C=L?`${T}|jie`:T,ae=B.get(C);if(ae)return ae;const Q=[...a(T-1,L),...a(T,L),...a(T+1,L)];return Q.sort((F,de)=>F.jd-de.jd),B.set(C,Q),Q}function ne(T){if(typeof T!="string"||T.length<2)return[];const R=ee.indexOf(T[0]),L=Z.indexOf(T[1]);if(R<0||L<0)return[];const C=$(R,L);if(C<0)return[];const ae=Math.floor(C/10)*10;return[Z[(ae+10)%12],Z[(ae+11)%12]]}function re(T,R){let L=null;for(const C of T)if(C.index%2===0)if(C.jd<=R)L=C;else break;return L}function te(T,R){for(const L of T)if(L.index%2===0&&L.jd>R)return L;return null}function I(T){const R=y(T),L=C=>String(C).padStart(2,"0");return`${R.year}-${L(R.month)}-${L(R.day)} ${L(R.hour)}:${L(R.minute)}`}function K(){return[g.stats(),q.stats(),B.stats()]}return{STEMS:ee,BRANCHES:Z,TERM_NAMES:j,termLongitude:E,toJDN:Y,fromJDN:N,sexagenaryIndex:$,ganzhiName:f,dayGanzhiIndex:D,sunLongitude:w,deltaTSeconds:r,OFFSET_MODERN:d,OFFSET_BEIJING_LOCAL:l,CUTOVER_JD:O,localOffsetFor:S,termInstantJd:m,jdToParts:y,partsToJd:A,equationOfTime:x,termWindow:v,xunKongOf:ne,previousJie:re,nextJie:te,formatJd:I,cacheMetrics:K}})(),P.lunar=(function(){const{toJDN:G,jdToParts:W,termInstantJd:V,deltaTSeconds:ee,localOffsetFor:Z}=P.calendar||{},j=29.530588861,E=245155009766e-5,Y=Math.PI/180;function N(r){const d=r/1236.85,l=E+j*r+15437e-8*d*d-15e-8*d*d*d+73e-11*d*d*d*d,O=1-.002516*d-74e-7*d*d,S=(2.5534+29.1053567*r-14e-7*d*d-11e-8*d*d*d)*Y,g=(201.5643+385.81693528*r+.0107582*d*d+1238e-8*d*d*d-58e-9*d*d*d*d)*Y,p=(160.7108+390.67050284*r-.0016118*d*d-227e-8*d*d*d+11e-9*d*d*d*d)*Y,o=(124.7746-1.56375588*r+.0020672*d*d+215e-8*d*d*d)*Y,s=-.4072*Math.sin(g)+.17241*O*Math.sin(S)+.01608*Math.sin(2*g)+.01039*Math.sin(2*p)+.00739*O*Math.sin(g-S)-.00514*O*Math.sin(g+S)+.00208*O*O*Math.sin(2*S)-.00111*Math.sin(g-2*p)-57e-5*Math.sin(g+2*p)+56e-5*O*Math.sin(2*g+S)-42e-5*Math.sin(3*g)+42e-5*O*Math.sin(S+2*p)+38e-5*O*Math.sin(S-2*p)-24e-5*O*Math.sin(2*g-S)-17e-5*Math.sin(o)-7e-5*Math.sin(g+2*S)+4e-5*Math.sin(2*g-2*p)+4e-5*Math.sin(3*S)+3e-5*Math.sin(g+S-2*p)+3e-5*Math.sin(2*g+2*p)-3e-5*Math.sin(g+S+2*p)+3e-5*Math.sin(g-S+2*p)-2e-5*Math.sin(g-S-2*p)-2e-5*Math.sin(3*g+S)+2e-5*Math.sin(4*g),u=l+s-ee(2e3+d*100)/86400;return u+Z(u)}function $(r){return Math.floor(r+.5)}function f(r){return Math.round((r+.5-E)/j)}function D(r,d,l){for(let O=r-1;O<=r+1;O++)for(let S=1;S<24;S+=2){const g=V(O,S),p=$(g);if(p>=d&&p<l)return{index:S,jd:g}}return null}function w(r,d,l){const O=G(r,d,l),S=$(V(r,23)),g=O<S?r-1:r,p=$(V(g,23));let o=f(p);for(;$(N(o))>p;)o--;for(;$(N(o+1))<=p;)o++;const s=$(V(g+1,23));let u=o;for(;$(N(u+1))<=s;)u++;const m=u-o;let y=-1;if(m===13)for(let B=1;B<=m;B++){const q=$(N(o+B-1)),xe=$(N(o+B));if(!D(g,q,xe)){y=B;break}}let A=11,x=!1;for(let B=1;B<=15;B++){const q=$(N(o+B-1)),xe=$(N(o+B)),Te=D(g,q,xe),a=B===y;if(O>=q&&O<xe){const v=W(N(o+B-1)),ne=a?(A+10)%12+1:A;return{year:g,lunarYear:x?g+1:g,month:ne,day:O-q+1,isLeap:a,monthStart:`${v.year}-${String(v.month).padStart(2,"0")}-${String(v.day).padStart(2,"0")}`,hasZhongQi:!!Te}}a||(A=A%12+1,A===1&&(x=!0))}throw new Error(`农历换算失败:${r}-${d}-${l}`)}return{SYNODIC:j,newMoonJd:N,dayNumberOf:$,solarToLunar:w}})(),P.geo=(function(){const{bool:G}=P.bool||{},W=`
4
4
  北京 116.41 39.90;上海 121.47 31.23;天津 117.20 39.13;重庆 106.55 29.56