"use strict";(globalThis.webpackChunkinfinity_hitab_client=globalThis.webpackChunkinfinity_hitab_client||[]).push([[3659,7780],{37780:(e,t,a)=>{a.r(t),a.d(t,{useCalcForceStore:()=>u});var n=a(57268),i=a(10435),r=a(14754);const u=(0,i.Q_)("calc-components-force",{state:()=>({unitItemsArr:[{name:"牛顿",unit:"N",base:!0,calcBase:!0,value:1},{name:"千牛",unit:"kN",getValue:e=>(0,r.uf)(e/1e3),reverseValue:e=>(0,r.uf)(1e3*e)},{name:"千克力",unit:"kgf",getValue:e=>(0,r.uf)(.1019716*e),reverseValue:e=>(0,r.uf)(e/.1019716)},{name:"克力",unit:"gf",getValue:e=>(0,r.uf)(101.971621*e),reverseValue:e=>(0,r.uf)(e/101.971621)},{name:"公吨力",unit:"tf",getValue:e=>(0,r.uf)(102e-6*e),reverseValue:e=>(0,r.uf)(e/102e-6)},{name:"磅力",unit:"ibf",getValue:e=>(0,r.uf)(.2248089*e),reverseValue:e=>(0,r.uf)(e/.2248089)},{name:"达因",unit:"dyn",getValue:e=>(0,r.uf)(1e5*e),reverseValue:e=>(0,r.uf)(e/1e5)},{name:"千磅力",unit:"kip",long:!0,getValue:e=>(0,r.uf)(2248e-7*e),reverseValue:e=>(0,r.uf)(e/2248e-7)}]}),getters:{getAllUnits(){return this.unitItemsArr},getBaseUnit(){return this.unitItemsArr.find((e=>e.base))},getPanelList(){return this.unitItemsArr.filter((e=>!e.base))},getCalcbase(){return this.unitItemsArr.find((e=>e.calcBase))}},actions:{changeBaseUnit(e){this.unitItemsArr=(0,r.vZ)(e,this.unitItemsArr)},changeBaseValue(e){this.getBaseUnit.value=e},calcUnitsArr(){this.unitItemsArr=(0,r.UC)(this.unitItemsArr)}}});(0,n.YP)((()=>{var e;return null===(e=u().unitItemsArr.find((e=>e.base)))||void 0===e?void 0:e.value}),(()=>{u().calcUnitsArr()}),{immediate:!0}),(0,n.YP)((()=>{var e;return null===(e=u().unitItemsArr.find((e=>e.base)))||void 0===e?void 0:e.name}),(()=>{u().calcUnitsArr()}))},3659:(e,t,a)=>{a.r(t),a.d(t,{useForecePanel:()=>r});var n=a(10435),i=a(37780);const r=()=>{const e=(0,i.useCalcForceStore)(),t=(0,n.Jk)(e);return{changeBaseUnit:t=>e.changeBaseUnit(t),changeBaseValue:t=>e.changeBaseValue(t),baseUnit:t.getBaseUnit,panelList:t.getPanelList}}},14754:(e,t,a)=>{a.d(t,{D:()=>f,Mb:()=>v,UC:()=>r,WS:()=>o,fS:()=>l,uf:()=>n,vZ:()=>i,zX:()=>u});const n=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5;if(!e)return 0;const n=Math.floor(Math.log(Math.abs(e))/Math.LN10);if(Math.abs(n)<=t)return Number(e.toFixed(a));{const t=e*Math.pow(10,-n);return Number(t.toFixed(a))+"e"+(n>0?"+"+n:n)}},i=(e,t)=>{const a=[...t],n=a.find((e=>e.base)),i=a.find((t=>t.name===e.name));return n.base=!1,i.base=!0,i.value=n.value,a},r=e=>{const t=[...e],a=e.find((e=>e.calcBase)),n=e.find((e=>e.base));var i;a.base?t.map((e=>{var t;e.base||e.calcBase||(e.value=null===(t=e.getValue)||void 0===t?void 0:t.call(null,Number(a.value)))})):(a.value=null===(i=n.reverseValue)||void 0===i?void 0:i.call(null,Number(n.value)),t.map((e=>{var t;e.base||e.calcBase||(e.value=null===(t=e.getValue)||void 0===t?void 0:t.call(null,Number(a.value)))})));return t},u=(e,t)=>{const a=String(e).split("."),n=a[1].split("");let i=0;for(let e=0;e<a[1].length;e++)i+=n[e]*Math.pow(t,-1*(e+1));return parseInt(a[0],t)+i},l=e=>Number(e||0).toFixed(2).replace(/\d+/,(e=>e.replace(/(\d)(?=(?:\d{3})+$)/g,"$1,"))),s=[{min:-1/0,max:36e3,rate:.03,deduction:0},{min:36e3,max:144e3,rate:.1,deduction:2520},{min:144e3,max:3e5,rate:.2,deduction:16920},{min:3e5,max:42e4,rate:.25,deduction:31920},{min:42e4,max:66e4,rate:.3,deduction:52920},{min:66e4,max:96e4,rate:.35,deduction:85920},{min:96e4,max:1/0,rate:.45,deduction:181920}],c=[{min:-1/0,max:3e3,rate:.03,deduction:0},{min:3e3,max:12e3,rate:.1,deduction:210},{min:12e3,max:25e3,rate:.2,deduction:1410},{min:25e3,max:35e3,rate:.25,deduction:2660},{min:35e3,max:55e3,rate:.3,deduction:4410},{min:55e3,max:8e4,rate:.35,deduction:7160},{min:8e4,max:1/0,rate:.45,deduction:15160}],m=[{min:-1/0,max:2e4,rate:.2,deduction:0},{min:2e4,max:5e4,rate:.3,deduction:2e3},{min:5e4,max:1/0,rate:.4,deduction:7e3}],d=(e,t)=>t.find((t=>e>t.min&&e<=t.max)),o=e=>d(e,s),v=e=>d(e,c),f=e=>d(e,m)}}]);