@coffer-org/web 7.2.1 → 7.3.1

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.
Files changed (126) hide show
  1. package/dist/assets/ChatWidget-vl_ApeDr.js +5 -0
  2. package/dist/assets/DiagnosticsPage-DVAqVVLa.js +1 -0
  3. package/dist/assets/{MarkdownEditor-0mNSwLu_.js → MarkdownEditor-CANj53YF.js} +3 -3
  4. package/dist/assets/NewRecordView-Y6PoWPB9.js +1 -0
  5. package/dist/assets/PluginSettingsPage-d0LhYfXE.js +1 -0
  6. package/dist/assets/ScanSummary-xxY2oZVM.js +1 -0
  7. package/dist/assets/SettingsForm-ChaqrcJM.js +1 -0
  8. package/dist/assets/SettingsPage-4_Gqty1-.js +3 -0
  9. package/dist/assets/ThemeSwitcher-eMEFNoJq.js +1 -0
  10. package/dist/assets/{api-COuWgOWV.js → api-QNHQU9to.js} +1 -1
  11. package/dist/assets/{auth-context-L2NSpevo.js → auth-context-CoCE5oPD.js} +1 -1
  12. package/dist/assets/condition-B5taAXkb.js +1 -0
  13. package/dist/assets/countries-CoGvAZ5u.js +1 -0
  14. package/dist/assets/{data-size-qpzofknI.js → data-size-BMG0D59K.js} +1 -1
  15. package/dist/assets/{development-olQNibq5.js → development-ChLInqDF.js} +1 -1
  16. package/dist/assets/{esm-BsLSfif3.js → esm-CX8ST5Fv.js} +1 -1
  17. package/dist/assets/esm-oGoWacTd.js +24 -0
  18. package/dist/assets/extend-yQ8zoqGc.js +1 -0
  19. package/dist/assets/fields-CV3RQg0Y.js +64 -0
  20. package/dist/assets/file-text-BdYRF4MO.js +1 -0
  21. package/dist/assets/{icons-BTbA1N7a.js → icons-0CjpO0K1.js} +1 -1
  22. package/dist/assets/ilamy-view-Bb5692yT.js +7 -0
  23. package/dist/assets/index-Brc5FUYA.css +2 -0
  24. package/dist/assets/index-C98p9ash.js +22 -0
  25. package/dist/assets/{input-tJjsdU1x.js → input-BFMNMo6y.js} +1 -1
  26. package/dist/assets/list-cache-DOhsI_p2.js +1 -0
  27. package/dist/assets/{markdown-vendor-CtaBI5gJ.js → markdown-vendor-WSL3P01P.js} +15 -15
  28. package/dist/assets/phone-input-3xV95mM6.js +1 -0
  29. package/dist/assets/phone-input-8QtHMHO_.js +21 -0
  30. package/dist/assets/plugin-Cjr7lgQH.js +1 -0
  31. package/dist/assets/{version-CtfLXkhy.js → plugin-label-CfdhA4_L.js} +1 -1
  32. package/dist/assets/popover-UkAmHo3Y.js +1 -0
  33. package/dist/assets/registration-BBxYynR4.js +1 -0
  34. package/dist/assets/settings-Bo5IOwVg.js +1 -0
  35. package/dist/assets/shelf-Cj_pNvd-.js +1 -0
  36. package/dist/assets/showcase-BeBnutzT.js +1 -0
  37. package/dist/assets/src-0TBpEeKK.js +1 -0
  38. package/dist/assets/src-4bmZI2h_.js +1 -0
  39. package/dist/assets/src-B0pL3dGf.js +7 -0
  40. package/dist/assets/src-B2aXBzDf.js +4 -0
  41. package/dist/assets/src-BHz-TcxU.js +1 -0
  42. package/dist/assets/src-BZK1QVol.js +1 -0
  43. package/dist/assets/src-Bhz_DXRd.js +1 -0
  44. package/dist/assets/src-Bl8rYgUt2.js +1 -0
  45. package/dist/assets/src-BmyfVP9z.js +1 -0
  46. package/dist/assets/src-BrHtOaqX.js +1 -0
  47. package/dist/assets/src-Bzgh6Ge5.js +1 -0
  48. package/dist/assets/src-C46sbhiF.js +2 -0
  49. package/dist/assets/src-CD1zBxk2.js +1 -0
  50. package/dist/assets/src-CE1TPDES.js +6 -0
  51. package/dist/assets/src-CQOQ3BNT.js +1 -0
  52. package/dist/assets/{src-IYiBUs1S.js → src-Cz38tTr3.js} +1 -1
  53. package/dist/assets/src-D14fQdLH.js +1 -0
  54. package/dist/assets/src-DgQcfYnz.js +1 -0
  55. package/dist/assets/src-DnN2GqEI.js +1 -0
  56. package/dist/assets/src-Dr_dOgc9.js +6 -0
  57. package/dist/assets/src-Ds6m7Evp2.js +1 -0
  58. package/dist/assets/src-Mln-mCD3.js +1 -0
  59. package/dist/assets/src-Q4BhkNtH.js +1 -0
  60. package/dist/assets/src-qJ0szNVM.js +1 -0
  61. package/dist/assets/src-rMuD7zD4.js +1 -0
  62. package/dist/assets/{src-DEcZTAam.js → src-tKMBP4Dv.js} +3 -3
  63. package/dist/assets/src-xh_qAK43.js +1 -0
  64. package/dist/assets/ui-3phlsSm1.js +2 -0
  65. package/dist/assets/ui-B21VM1St.js +2 -0
  66. package/dist/assets/ui-BfN7X5UB.js +2 -0
  67. package/dist/assets/ui-DxLuYjTk.js +2 -0
  68. package/dist/assets/ui-vendor-ByG3otld.js +44 -0
  69. package/dist/index.html +22 -22
  70. package/dist-vendor/web-ui.js +47431 -42112
  71. package/package.json +1 -1
  72. package/dist/assets/ChatWidget-ByBb2eNs.js +0 -31
  73. package/dist/assets/DiagnosticsPage-lKgGju82.js +0 -1
  74. package/dist/assets/NewRecordView-DJrRPNxT.js +0 -1
  75. package/dist/assets/PluginSettingsPage-BFsSZgTa.js +0 -1
  76. package/dist/assets/ScanSummary-CaG-s5qh.js +0 -1
  77. package/dist/assets/SettingsForm-C_K9RpFr.js +0 -1
  78. package/dist/assets/SettingsPage-CaPzeX50.js +0 -3
  79. package/dist/assets/ThemeSwitcher-BPuCvU1U.js +0 -1
  80. package/dist/assets/arrow-left-DDsxjRCq.js +0 -1
  81. package/dist/assets/esm-DJsKiDbH.js +0 -24
  82. package/dist/assets/extend-BMkkNVfm.js +0 -1
  83. package/dist/assets/fields-GPyF03tK.js +0 -64
  84. package/dist/assets/file-text-DI3tERhf.js +0 -1
  85. package/dist/assets/index-C5rNjIku.css +0 -2
  86. package/dist/assets/index-CdXz_Li2.js +0 -24
  87. package/dist/assets/lib-DU7Qh2A4.js +0 -1
  88. package/dist/assets/list-cache-B4i_A9fj.js +0 -1
  89. package/dist/assets/phone-input-BeYLRpyW.js +0 -1
  90. package/dist/assets/phone-input-CZF7hU3E.js +0 -21
  91. package/dist/assets/plugin-CFEkHH3f.js +0 -1
  92. package/dist/assets/plugin-ui-CKd6q8ec.js +0 -1
  93. package/dist/assets/popover-C2xHG6L3.js +0 -1
  94. package/dist/assets/settings-rQsBFoL2.js +0 -1
  95. package/dist/assets/shelf-CpE68_8d.js +0 -1
  96. package/dist/assets/showcase-CUDyXMb7.js +0 -1
  97. package/dist/assets/src-2QhdFJyH.js +0 -1
  98. package/dist/assets/src-BRA1s942.js +0 -1
  99. package/dist/assets/src-Bmc_xgWr.js +0 -1
  100. package/dist/assets/src-BnvKHmLu.js +0 -1
  101. package/dist/assets/src-Bv7IbF5F.js +0 -1
  102. package/dist/assets/src-C3X1cmlu.js +0 -1
  103. package/dist/assets/src-C3hdIsRT.js +0 -1
  104. package/dist/assets/src-CIrBx5O0.js +0 -1
  105. package/dist/assets/src-CTlBmB5n.js +0 -1
  106. package/dist/assets/src-Cp4yFztL.js +0 -4
  107. package/dist/assets/src-CvUhNHtO.js +0 -1
  108. package/dist/assets/src-D5pqHmdF.js +0 -1
  109. package/dist/assets/src-D9ZNj5Fi2.js +0 -1
  110. package/dist/assets/src-DAUYP87f2.js +0 -1
  111. package/dist/assets/src-DEqFDnFO.js +0 -1
  112. package/dist/assets/src-DXSkgVrX.js +0 -4
  113. package/dist/assets/src-DaHZILQZ.js +0 -1
  114. package/dist/assets/src-Dvbi--2I.js +0 -6
  115. package/dist/assets/src-Uu0k-CHA.js +0 -1
  116. package/dist/assets/src-WB1-7_Wh.js +0 -1
  117. package/dist/assets/src-dXlj2maQ.js +0 -1
  118. package/dist/assets/src-d_-Z83D-.js +0 -2
  119. package/dist/assets/src-eAsO2o4h2.js +0 -1
  120. package/dist/assets/src-uWOnIJWD.js +0 -6
  121. package/dist/assets/src-yL3q5Nfe.js +0 -1
  122. package/dist/assets/ui-A8aS2-NQ.js +0 -2
  123. package/dist/assets/ui-BK1F_c4b.js +0 -2
  124. package/dist/assets/ui-C9-epiVm.js +0 -2
  125. package/dist/assets/ui-kICtw37s.js +0 -1
  126. package/dist/assets/ui-vendor-BuwRGdK1.js +0 -44
@@ -1 +0,0 @@
1
- function e(e){return e}function t(e){return{id:e,label:e,icon:`lucide:folder`}}function n(e){let n=new Map;for(let t of e)for(let e of t.libraries??[])n.has(e.meta.id)||n.set(e.meta.id,{...e.meta});let r=[];for(let t of e){for(let e of t.libraries??[])r.push(...e.shelves);r.push(...t.libraryShelves??[])}return{libraries:[...new Set([...n.keys(),...r.map(e=>e.library)])].map(e=>({meta:n.get(e)??t(e),shelves:r.filter(t=>t.library===e)})),shelves:r,extends_:e.flatMap(e=>e.extends_??[])}}function r(e){if(!e.id)throw Error(`[plugin] missing id`);return e.version||console.warn(`[plugin] ${e.id}: missing version`),e}function i(e){let t=new Map(e.map(e=>[e.id,e]));for(let n of e)for(let e of n.dependsOn)if(!t.has(e))throw Error(`[plugin] ${n.id}: dependency '${e}' is not registered`);let n=[],r=new Map,i=(e,a)=>{let o=r.get(e.id);if(o!==`done`){if(o===`visiting`)throw Error(`[plugin] dependency cycle: ${[...a,e.id].join(` → `)}`);r.set(e.id,`visiting`);for(let n of e.dependsOn)i(t.get(n),[...a,e.id]);r.set(e.id,`done`),n.push(e)}};for(let t of e)i(t,[]);return n}function a(e){let t=i(e),{libraries:r,shelves:a,extends_:o}=n(t);return{order:t,libraries:r,shelves:a,extends_:o}}export{r as n,e as r,a as t};
@@ -1 +0,0 @@
1
- function e(e){return e}var t=new Map,n=new Map,r=new Map;function i(e){for(let n of e.slots??[]){let e=t.get(n.slot);e||(e=new Map,t.set(n.slot,e)),e.set(n.id,n)}for(let t of e.routes??[])n.set(t.path,t);for(let t of e.nav??[])r.set(t.to,t)}function a(e){return(t,n)=>(t.order??0)-(n.order??0)||e(t).localeCompare(e(n))}function o(e){return[...t.get(e)?.values()??[]].sort(a(e=>e.id))}function s(){return[...n.values()]}function c(){return[...r.values()].sort(a(e=>e.to))}export{o as a,s as i,e as n,c as r,i as t};
@@ -1 +0,0 @@
1
- import"./rolldown-runtime-QTnfLwEv.js";import{a as e}from"./i18n-vendor-T6EnJ_TL.js";import{t}from"./react-vendor-CzSUaSLk.js";import{i as n,r}from"./input-tJjsdU1x.js";import{at as i,ct as a,it as o,ot as s,rt as c,st as l}from"./ui-vendor-BuwRGdK1.js";var u=r(`code`,[[`path`,{d:`m16 18 6-6-6-6`,key:`eg8j8`}],[`path`,{d:`m8 6-6 6 6 6`,key:`ppft3o`}]]),d=r(`link`,[[`path`,{d:`M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71`,key:`1cjeqo`}],[`path`,{d:`M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71`,key:`19qd67`}]]),f=r(`list-checks`,[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`path`,{d:`m3 7 2 2 4-4`,key:`1obspn`}]]),p=r(`list`,[[`path`,{d:`M3 5h.01`,key:`18ugdj`}],[`path`,{d:`M3 12h.01`,key:`nlz23k`}],[`path`,{d:`M3 19h.01`,key:`noohij`}],[`path`,{d:`M8 5h13`,key:`1pao27`}],[`path`,{d:`M8 12h13`,key:`1za7za`}],[`path`,{d:`M8 19h13`,key:`m83p4d`}]]),m=r(`minus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]),h=r(`rows-3`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M21 9H3`,key:`1338ky`}],[`path`,{d:`M21 15H3`,key:`9uk58r`}]]);e();var g=t(),_=`/home/grigorii/Projects/GitHub/grigorii-horos/coffer/packages/web-ui/src/components/ui/popover.tsx`;function v({...e}){return(0,g.jsxDEV)(l,{"data-slot":`popover`,...e},void 0,!1,{fileName:_,lineNumber:7,columnNumber:10},this)}function y({...e}){return(0,g.jsxDEV)(a,{"data-slot":`popover-trigger`,...e},void 0,!1,{fileName:_,lineNumber:11,columnNumber:10},this)}function b({className:e,align:t=`center`,sideOffset:r=4,...a}){return(0,g.jsxDEV)(s,{children:(0,g.jsxDEV)(i,{"data-slot":`popover-content`,align:t,sideOffset:r,className:n(`z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-xl border border-border bg-surface p-4 text-text shadow-xl outline-hidden data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95`,e),...a},void 0,!1,{fileName:_,lineNumber:22,columnNumber:7},this)},void 0,!1,{fileName:_,lineNumber:21,columnNumber:5},this)}function x({...e}){return(0,g.jsxDEV)(c,{"data-slot":`popover-anchor`,...e},void 0,!1,{fileName:_,lineNumber:37,columnNumber:10},this)}function S({className:e,...t}){return(0,g.jsxDEV)(o,{asChild:!0,width:16,height:8,...t,children:(0,g.jsxDEV)(`span`,{"data-slot":`popover-arrow`,className:n(`relative block h-2 w-4`,e),children:[(0,g.jsxDEV)(`span`,{className:`absolute inset-0 bg-border [clip-path:polygon(50%_100%,0_0,100%_0)]`},void 0,!1,{fileName:_,lineNumber:46,columnNumber:9},this),(0,g.jsxDEV)(`span`,{className:`absolute inset-x-px top-0 bottom-px bg-surface [clip-path:polygon(50%_100%,0_0,100%_0)]`},void 0,!1,{fileName:_,lineNumber:47,columnNumber:9},this)]},void 0,!0,{fileName:_,lineNumber:45,columnNumber:7},this)},void 0,!1,{fileName:_,lineNumber:44,columnNumber:5},this)}export{y as a,p as c,u as d,b as i,f as l,x as n,h as o,S as r,m as s,v as t,d as u};
@@ -1 +0,0 @@
1
- import{C as e}from"./fields-GPyF03tK.js";function t(t){return e(t)}export{t};
@@ -1 +0,0 @@
1
- import{B as e,C as t,H as n,L as r,P as i,S as a,T as o,U as s,a as c,c as l,d as u,i as d,l as f,o as ee,p as te,v as ne,y as re}from"./fields-GPyF03tK.js";var ie=/^[a-z][a-z0-9+.-]*:\/\//i;function p(e){let t=e.trim();if(!t)return null;let n=ie.test(t),r;try{r=new URL(n?t:`http://${t}`)}catch{return{host:t}}let i={};return n&&(i.scheme=r.protocol.replace(/:$/,``)),r.username&&(i.username=r.username),r.password&&(i.password=r.password),r.hostname&&(i.host=r.hostname),r.port&&(i.port=Number(r.port)),r.pathname&&r.pathname!==`/`&&(i.path=r.pathname),r.search&&(i.query=r.search.slice(1)),r.hash&&(i.hash=r.hash.slice(1)),i}function m(e){return e?`${e.scheme?`${e.scheme}://`:``}${e.username?`${e.username}${e.password?`:${e.password}`:``}@`:``}${e.host??``}${e.port==null?``:`:${e.port}`}${e.path??``}${e.query?`?${e.query}`:``}${e.hash?`#${e.hash}`:``}`:``}function ae(e){return!e||!m(e)?``:e.scheme?m(e):`https://${m(e)}`}var h=function(e,t){return h=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},h(e,t)};function g(e,t){if(typeof t!=`function`&&t!==null)throw TypeError(`Class extends value `+String(t)+` is not a constructor or null`);h(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}var _=function(e){var t=`[object `+e+`]`;return function(e){return oe(e)===t}},oe=function(e){return Object.prototype.toString.call(e)},v=function(e){return e instanceof Date?e.getTime():y(e)?e.map(v):e&&typeof e.toJSON==`function`?e.toJSON():e},se=function(e){return e??null},y=_(`Array`),ce=_(`Object`),b=_(`Function`),le=function(e,t){return e.hasOwnProperty(t)&&!b(e[t])},ue=function(e){return e&&(e.constructor===Object||e.constructor===Array||e.constructor.toString()===`function Object() { [native code] }`||e.constructor.toString()===`function Array() { [native code] }`)&&!e.toJSON},x=function(e,t){if(e==null&&e==t||e===t)return!0;if(Object.prototype.toString.call(e)!==Object.prototype.toString.call(t))return!1;if(y(e)){if(e.length!==t.length)return!1;for(var n=0,r=e.length;n<r;n++)if(!x(e[n],t[n]))return!1;return!0}else if(ce(e)){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(var i in e)if(!x(e[i],t[i]))return!1;return!0}return!1},S=function(e,t,n,r,i,a){var o=t[r];if(y(e)&&isNaN(Number(o))&&!le(e,o)){for(var s=0,c=e.length;s<c;s++)if(!S(e[s],t,n,r,s,e))return!1}return r===t.length||e==null?n(e,i,a,r===0,r===t.length):S(e[o],t,n,r+1,o,e)},C=function(){function e(e,t,n,r){this.params=e,this.owneryQuery=t,this.options=n,this.name=r,this.init()}return e.prototype.init=function(){},e.prototype.reset=function(){this.done=!1,this.keep=!1},e}(),w=function(e){g(t,e);function t(t,n,r,i){var a=e.call(this,t,n,r)||this;return a.children=i,a}return t.prototype.reset=function(){this.keep=!1,this.done=!1;for(var e=0,t=this.children.length;e<t;e++)this.children[e].reset()},t.prototype.childrenNext=function(e,t,n,r,i){for(var a=!0,o=!0,s=0,c=this.children.length;s<c;s++){var l=this.children[s];if(l.done||l.next(e,t,n,r,i),l.keep||(o=!1),l.done){if(!l.keep)break}else a=!1}this.done=a,this.keep=o},t}(C),de=function(e){g(t,e);function t(t,n,r,i,a){var o=e.call(this,t,n,r,i)||this;return o.name=a,o}return t}(w),fe=function(e){g(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.propop=!0,t}return t.prototype.next=function(e,t,n,r){this.childrenNext(e,t,n,r)},t}(w),T=function(e){g(t,e);function t(t,n,r,i,a){var o=e.call(this,n,r,i,a)||this;return o.keyPath=t,o.propop=!0,o._nextNestedValue=function(e,t,n,r,i){return o.childrenNext(e,t,n,r,i),!o.done},o}return t.prototype.next=function(e,t,n){S(e,this.keyPath,this._nextNestedValue,0,t,n)},t}(w),E=function(e,t){if(e instanceof Function)return e;if(e instanceof RegExp)return function(t){var n=typeof t==`string`&&e.test(t);return e.lastIndex=0,n};var n=v(e);return function(e){return t(n,v(e))}},D=function(e){g(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.propop=!0,t}return t.prototype.init=function(){this._test=E(this.params,this.options.compare)},t.prototype.next=function(e,t,n){(!Array.isArray(n)||n.hasOwnProperty(t))&&this._test(e,t,n)&&(this.done=!0,this.keep=!0)},t}(C),pe=function(e){return function(t,n,r,i){return e(t,n,r,i)}},O=function(e){return pe(function(t,n,r,i){var a=typeof v(t),o=e(t);return new D(function(e){var t=se(e);return typeof v(t)===a&&o(t)},n,r,i)})},me=function(e,t,n,r){var i=r.operations[e];return i||k(e),i(t,n,r,e)},k=function(e){throw Error(`Unsupported operation: ${e}`)},A=function(e,t){for(var n in e)if(t.operations.hasOwnProperty(n)||n.charAt(0)===`$`)return!0;return!1},he=function(e,t,n,r,i){if(A(t,i)){var a=ge(t,n,i),o=a[0];if(a[1].length)throw Error(`Property queries must contain only operations, or exact objects.`);return new T(e,t,r,i,o)}return new T(e,t,r,i,[new D(t,r,i)])},j=function(e,t,n){t===void 0&&(t=null);var r=n===void 0?{}:n,i=r.compare,a=r.operations,o={compare:i||x,operations:Object.assign({},a||{})},s=ge(e,null,o),c=s[0],l=s[1],u=[];return c.length&&u.push(new T([],e,t,o,c)),u.push.apply(u,l),u.length===1?u[0]:new fe(e,t,o,u)},ge=function(e,t,n){var r=[],i=[];if(!ue(e))return r.push(new D(e,e,n)),[r,i];for(var a in e)if(n.operations.hasOwnProperty(a)){var o=me(a,e[a],e,n);if(o&&!o.propop&&t&&!n.operations[t])throw Error(`Malformed query. ${a} cannot be matched against property.`);o!=null&&r.push(o)}else a.charAt(0)===`$`?k(a):i.push(he(a.split(`.`),e[a],a,e,n));return[r,i]},_e=function(e){return function(t,n,r){return e.reset(),e.next(t,n,r),e.keep}},ve=function(e){g(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.propop=!0,t}return t.prototype.init=function(){this._test=E(this.params,this.options.compare)},t.prototype.reset=function(){e.prototype.reset.call(this),this.keep=!0},t.prototype.next=function(e){this._test(e)&&(this.done=!0,this.keep=!1)},t}(C),ye=function(e){g(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.propop=!0,t}return t.prototype.init=function(){if(!this.params||typeof this.params!=`object`)throw Error(`Malformed query. $elemMatch must by an object.`);this._queryOperation=j(this.params,this.owneryQuery,this.options)},t.prototype.reset=function(){e.prototype.reset.call(this),this._queryOperation.reset()},t.prototype.next=function(e){if(y(e)){for(var t=0,n=e.length;t<n;t++){this._queryOperation.reset();var r=e[t];this._queryOperation.next(r,t,e,!1),this.keep=this.keep||this._queryOperation.keep}this.done=!0}else this.done=!1,this.keep=!1},t}(C),be=function(e){g(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.propop=!0,t}return t.prototype.init=function(){this._queryOperation=j(this.params,this.owneryQuery,this.options)},t.prototype.reset=function(){e.prototype.reset.call(this),this._queryOperation.reset()},t.prototype.next=function(e,t,n,r){this._queryOperation.next(e,t,n,r),this.done=this._queryOperation.done,this.keep=!this._queryOperation.keep},t}(C),xe=function(e){g(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.propop=!0,t}return t.prototype.init=function(){},t.prototype.next=function(e){y(e)&&e.length===this.params&&(this.done=!0,this.keep=!0)},t}(C),Se=function(e){if(e.length===0)throw Error(`$and/$or/$nor must be a nonempty array`)},M=function(e){g(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.propop=!1,t}return t.prototype.init=function(){var e=this;Se(this.params),this._ops=this.params.map(function(t){return j(t,null,e.options)})},t.prototype.reset=function(){this.done=!1,this.keep=!1;for(var e=0,t=this._ops.length;e<t;e++)this._ops[e].reset()},t.prototype.next=function(e,t,n){for(var r=!1,i=!1,a=0,o=this._ops.length;a<o;a++){var s=this._ops[a];if(s.next(e,t,n),s.keep){r=!0,i=s.keep;break}}this.keep=i,this.done=r},t}(C),Ce=function(e){g(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.propop=!1,t}return t.prototype.next=function(t,n,r){e.prototype.next.call(this,t,n,r),this.keep=!this.keep},t}(M),N=function(e){g(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.propop=!0,t}return t.prototype.init=function(){var e=this,t=Array.isArray(this.params)?this.params:[this.params];this._testers=t.map(function(t){if(A(t,e.options))throw Error(`cannot nest \$ under ${e.name.toLowerCase()}`);return E(t,e.options.compare)})},t.prototype.next=function(e,t,n){for(var r=!1,i=!1,a=0,o=this._testers.length;a<o;a++){var s=this._testers[a];if(s(e)){r=!0,i=!0;break}}this.keep=i,this.done=r},t}(C),we=function(e){g(t,e);function t(t,n,r,i){var a=e.call(this,t,n,r,i)||this;return a.propop=!0,a._in=new N(t,n,r,i),a}return t.prototype.next=function(e,t,n,r){this._in.next(e,t,n),y(n)&&!r?this._in.keep?(this.keep=!1,this.done=!0):t==n.length-1&&(this.keep=!0,this.done=!0):(this.keep=!this._in.keep,this.done=!0)},t.prototype.reset=function(){e.prototype.reset.call(this),this._in.reset()},t}(C),Te=function(e){g(t,e);function t(){var t=e!==null&&e.apply(this,arguments)||this;return t.propop=!0,t}return t.prototype.next=function(e,t,n,r,i){i?n.hasOwnProperty(t)===this.params&&(this.done=!0,this.keep=!0):(this.done=!0,this.keep=!this.params)},t}(C),Ee=function(e){g(t,e);function t(t,n,r,i){var a=e.call(this,t,n,r,t.map(function(e){return j(e,n,r)}),i)||this;return a.propop=!1,Se(t),a}return t.prototype.next=function(e,t,n,r){this.childrenNext(e,t,n,r)},t}(de),De=function(e){g(t,e);function t(t,n,r,i){var a=e.call(this,t,n,r,t.map(function(e){return j(e,n,r)}),i)||this;return a.propop=!0,a}return t.prototype.next=function(e,t,n,r){this.childrenNext(e,t,n,r)},t}(de),Oe=function(e,t,n){return new D(e,t,n)},ke=function(e,t,n,r){return new ve(e,t,n,r)},Ae=function(e,t,n,r){return new M(e,t,n,r)},je=function(e,t,n,r){return new Ce(e,t,n,r)},Me=function(e,t,n,r){return new ye(e,t,n,r)},Ne=function(e,t,n,r){return new we(e,t,n,r)},Pe=function(e,t,n,r){return new N(e,t,n,r)},Fe=O(function(e){return function(t){return t!=null&&t<e}}),Ie=O(function(e){return function(t){return t===e||t<=e}}),Le=O(function(e){return function(t){return t!=null&&t>e}}),Re=O(function(e){return function(t){return t===e||t>=e}}),ze=function(e,t,n){var r=e[0],i=e[1];return new D(function(e){return v(e)%r===i},t,n)},Be=function(e,t,n,r){return new Te(e,t,n,r)},Ve=function(e,t,n){return new D(new RegExp(e,t.$options),t,n)},He=function(e,t,n,r){return new be(e,t,n,r)},P={number:function(e){return typeof e==`number`},string:function(e){return typeof e==`string`},bool:function(e){return typeof e==`boolean`},array:function(e){return Array.isArray(e)},null:function(e){return e===null},timestamp:function(e){return e instanceof Date}},Ue=Object.freeze({__proto__:null,$Size:xe,$all:function(e,t,n,r){return new De(e,t,n,r)},$and:function(e,t,n,r){return new Ee(e,t,n,r)},$elemMatch:Me,$eq:Oe,$exists:Be,$gt:Le,$gte:Re,$in:Pe,$lt:Fe,$lte:Ie,$mod:ze,$ne:ke,$nin:Ne,$nor:je,$not:He,$options:function(){return null},$or:Ae,$regex:Ve,$size:function(e,t,n){return new xe(e,t,n,`$size`)},$type:function(e,t,n){return new D(function(t){if(typeof e==`string`){if(!P[e])throw Error(`Type alias does not exist`);return P[e](t)}return t==null?!1:t instanceof e||t.constructor===e},t,n)},$where:function(e,t,n){var r;if(b(e))r=e;else if(!{}.CSP_ENABLED)r=Function(`obj`,`return `+e);else throw Error(`In CSP mode, sift does not support strings in "$where" condition`);return new D(function(e){return r.bind(e)(e)},t,n)}}),We=function(e,t,n){var r=n===void 0?{}:n,i=r.compare,a=r.operations;return j(e,t,{compare:i,operations:Object.assign({},Ue,a||{})})},F=function(e,t){return t===void 0&&(t={}),_e(We(e,null,t))},Ge=new Set([`$eq`,`$ne`,`$gt`,`$gte`,`$lt`,`$lte`]),Ke=new Set([`$in`,`$nin`]),qe=new Set([`$contains`]),Je=F.createEqualsOperation,Ye=e=>typeof e==`string`||typeof e==`number`||typeof e==`boolean`,Xe=(e,t)=>String(e)===String(t),Ze={$contains(e,t,n){return Je(t=>Array.isArray(t)&&t.some(t=>Xe(t,e)),t,n)}};function I(e,t){if(!e)return!0;try{return F(e,{operations:Ze})(t)}catch{return!1}}function L(e,t){return typeof e==`boolean`?e:e?I(e,t):!1}function Qe(e,t,n){if(Ye(t))return[`${e} = ${n(t)}`];let r=[];for(let[i,a]of Object.entries(t))if(a!==void 0)switch(i){case`$eq`:r.push(`${e} = ${n(a)}`);break;case`$ne`:r.push(`${e} ≠ ${n(a)}`);break;case`$gt`:r.push(`${e} > ${String(a)}`);break;case`$lt`:r.push(`${e} < ${String(a)}`);break;case`$gte`:r.push(`${e} ≥ ${String(a)}`);break;case`$lte`:r.push(`${e} ≤ ${String(a)}`);break;case`$in`:r.push(`${e} ∈ {${a.map(n).join(`, `)}}`);break;case`$nin`:r.push(`${e} ∉ {${a.map(n).join(`, `)}}`);break;case`$contains`:r.push(`${e} contains ${n(a)}`);break;default:break}return r}function R(e){if(!e)return[];let t=[];for(let[n,r]of Object.entries(e))if(r!==void 0){if(n===`$and`||n===`$or`){for(let e of r)t.push(...R(e));continue}t.push(n)}return[...new Set(t)]}function z(e,t){if(!e)return[];let n=[];for(let[r,i]of Object.entries(e))if(i!==void 0){if(r===`$and`||r===`$or`){for(let e of i)n.push(...z(e,t));continue}r===t&&(typeof i==`object`&&i&&!Array.isArray(i)?n.push(...Object.keys(i)):n.push(`$eq`))}return[...new Set(n)]}function $e(e,t,n){let r=n===void 0?void 0:new Set(Array.isArray(n)?n:[n]);return e.filter(e=>r!==void 0&&e.value!==void 0&&r.has(e.value)||!e.when||I(e.when,t))}function B(e,t,n){if(!e)return[];let r=[];for(let[i,a]of Object.entries(e))if(a!==void 0){if(i===`$and`){for(let e of a)r.push(...B(e,t,n));continue}if(i===`$or`){let e=a.map(e=>B(e,t,n)).filter(e=>e.length>0).map(e=>e.length>1?`(${e.join(` and `)})`:e[0]);e.length&&r.push(e.join(` or `));continue}r.push(...Qe(t(i),a,e=>n?n(i,e):String(e)))}return r}function V(e){let t=[];for(let n of e){let e=o(n)?a(n):n;if(u(e))t.push([e.key,e.type]);else if(d(e)){if(l(e))continue;let n=f(e)?`${e.key}__`:``;for(let[r,i]of V(e.fields))t.push([n+r,i])}}return t}function et(e,t){return t.columns?Object.entries(t.columns).map(([t,n])=>[`${e}__${t}`,n]):[[e,t.column]]}function H(e,t,n,r){let i={},a=!1;for(let o of e.parts??[]){let e=`${t}__${o.key}`;if(o.meta.parts){let t=H(o.meta,e,n,r);t!==void 0&&(i[o.key]=t,a=!0);continue}if(!(e in n))continue;let s=n[e];r?.(e),i[o.key]=s,s!=null&&s!==``&&(a=!0)}return a?i:void 0}function tt(e,t,n){return!e.columns||n[t]!==void 0?n[t]:H(e,t,n)}function nt(e){if(e.columns)return Object.keys(e.columns)[0]}function rt(e,t){let n=e;for(let e of t.split(`__`)){if(typeof n!=`object`||!n||Array.isArray(n))return;n=n[e]}return n}function it(e,t,n){let r=e=>e&&typeof e==`object`&&!Array.isArray(e)?{...e}:{},i=t.split(`__`),a=r(e),o=a;for(let e of i.slice(0,-1))o[e]=r(o[e]),o=o[e];return o[i[i.length-1]]=n,a}function U(e){let t=[];for(let n of e){let e=o(n)?a(n):n;d(e)&&(l(e)?t.push({key:e.key,group:e}):t.push(...U(e.fields)))}return t}var W=new WeakMap;function G(e){let t=W.get(e);return t||(t=Object.fromEntries(V(e)),W.set(e,t)),t}function at(e,t){for(let n of e){if(`value`in n&&typeof n.value==`function`)throw Error(`${t}: computed element needs a key — the server computes it and needs a name to return it under`);d(n)&&at(n.fields,t)}}function ot(e,t,n=``){for(let r of e){if(d(r)){ot(r.fields,t,te(r)?`${n}${r.key}.`:n);continue}if(!(ee(r)&&r.key!==void 0)||!r.type.parts)continue;let e=re(r.type.parts);if(!e)continue;let i=ne(r.type.required,r.type.parts);i.length&&console.warn(`${t}: composite '${n}${r.key}' mandates a client-owned stored part (${i.join(`, `)}) and mixes it with a server-owned stored part (${e.server.join(`, `)}) — a mandated part is the client's to declare, so the write path does NOT materialize this composite and the computed part stays absent until a client sends the field. Either drop \`required\` (from the field or from the ${i.join(`/`)} filling), or give every stored part a \`value\` (the composite becomes fully server-owned).`)}}function st(e,t){at(e,t),ot(e,t)}function ct(e){let n=t(e),r=V(n.fields).map(([e])=>e),i=r.find((e,t)=>r.indexOf(e)!==t);if(i)throw Error(`[shelf] ${n.library}/${n.shelf}: duplicate key '${i}'`);if(n.single&&!n.agent)throw Error(`[shelf] ${n.library}/${n.shelf}: single shelf requires \`agent\` — the agent cannot find it otherwise`);if(n.views?.list!==void 0&&!Array.isArray(n.views.list))throw Error(`[shelf] ${n.library}/${n.shelf}: views.list is a flat array of field keys — the { kind, fields } form is gone; use views.list: [...] plus views.listKind`);if(n.standalone!==!1&&!n.single&&!n.views?.list?.length&&console.warn(`[shelf] ${n.library}/${n.shelf}: standalone shelf without an explicit views.list`),n.views?.title&&!K(n.fields).some(([e])=>e===n.views.title))throw Error(`[shelf] ${n.library}/${n.shelf}: views.title '${n.views.title}' is not a field`);n.views?.list?.includes(q(n))&&console.warn(`[shelf] ${n.library}/${n.shelf}: views.list repeats the title '${q(n)}' — the title is declared separately`);let a=K(n.fields).filter(([,e])=>e.kind===`title`);return a.length>1&&console.warn(`[shelf] ${n.library}/${n.shelf}: ${a.length} title fields (${a.map(([e])=>e).join(`, `)}) — '${a[0][0]}' wins`),n.standalone!==!1&&!n.single&&q(n)===`id`&&console.warn(`[shelf] ${n.library}/${n.shelf}: no title declared (field.title() or views.title) — the record renders no heading`),st(n.fields,`[shelf] ${n.library}/${n.shelf}`),n}function K(e){let t=[];for(let n of e)u(n)?t.push([n.key,n.type]):d(n)&&!l(n)&&!f(n)&&t.push(...K(n.fields));return t}function q(e){if(e.views?.title)return e.views.title;let t=K(e.fields).find(([,e])=>e.kind===`title`);return t?t[0]:`id`}function lt(e,t){return String(t[q(e)]??t.id??``)}function J(e,t){let n=G(e.fields);return t.filter(e=>n[e])}var ut=new Set([`image`,`media`,`avatar`,`cover`]),Y=e=>ut.has(e);function X(e){let t=e.views?.inline?.length?J(e,e.views.inline):[];return t.length?t:[q(e)]}function dt(e){let t=G(e.fields);return X(e).find(e=>t[e]&&Y(t[e].kind))}function ft(e,t){let n=G(e.fields);return X(e).reduce((e,r)=>{if(!n[r]||!Y(n[r].kind)){let n=t[r];n!=null&&n!==``&&e.push(String(n))}return e},[]).join(` `).trim()||lt(e,t)}function pt(e){let t=q(e);return[t,...e.views?.list?.length?J(e,e.views.list.filter(e=>e!==t)):[]]}function mt(e){return e.views?.listKind??`table`}var ht=new Set([`checkbox`,`relation`]),gt=new Set([`tag`]);function Z(e){return e.views?.groupBy?.length?J(e,e.views.groupBy):V(e.fields).filter(([,e])=>ht.has(e.prim)||gt.has(e.kind)||c(e)).map(([e])=>e)}function _t(e){let t=e.views?.defaultGroupBy;return t&&G(e.fields)[t]?t:Z(e)[0]}function vt(e){return V(e.fields).find(([,e])=>e.kind===`cover`)?.[0]}function yt(e){let t=G(e.fields),n=[],r=e=>{!e||e===`id`||n.includes(e)||t[e]&&n.push(e)};r(q(e)),pt(e).forEach(r),Z(e).forEach(r),X(e).forEach(r),r(dt(e)),r(vt(e));let i=e.views?.select;return i&&(r(i.icon),(Array.isArray(i.title)?i.title:[i.title]).forEach(r),r(i.subtitle)),[`id`,...n]}function Q(t,a){let o={};for(let c of t)if(u(c)){if(c.type.compute){o[c.key]=e({error:()=>i(`derived`)}).optional();continue}o[c.key]=a?c.type.zod.optional():c.type.zod}else if(d(c))if(l(c)){let e=r(n(Q(c.fields,a)).passthrough());o[c.key]=a?e.optional():c.required?e:e.optional()}else if(f(c)){let e=n(Q(c.fields,a)).passthrough();c.kind===`url`&&(e=s(e=>typeof e==`string`?p(e)??{}:e,e)),o[c.key]=a?e.optional():c.required?e:e.optional()}else Object.assign(o,Q(c.fields,a));return o}var bt=e=>e==null||e===``||Array.isArray(e)&&e.length===0;function $(e,t,n){return e.superRefine((e,r)=>{for(let[i,a]of V(t.fields))i.includes(`__`)||n&&!(i in e)||a.required!==!0&&L(a.required,e)&&bt(e[i])&&r.addIssue({code:`custom`,path:[i],message:JSON.stringify({code:`required`})})})}function xt(e){return $(n(Q(e.fields,!1)),e,!1)}function St(e){return $(n(Q(e.fields,!0)),e,!0)}export{L as A,Ke as C,z as D,R as E,m as M,ae as N,B as O,p as P,it as S,Ge as T,lt as _,U as a,q as b,V as c,dt as d,ft as f,nt as g,mt as h,st as i,$e as j,I as k,G as l,yt as m,St as n,_t as o,Y as p,tt as r,ct as s,xt as t,Z as u,et as v,qe as w,pt as x,rt as y};
@@ -1 +0,0 @@
1
- import{C as e,T as t,w as n}from"./shelf-CpE68_8d.js";var r=new Set([...t,...e,...n]);function i(e,t){for(let[n,a]of Object.entries(e))if(a!==void 0){if(n===`$and`||n===`$or`){for(let e of a)i(e,t);continue}if(typeof a==`object`&&a){for(let e of Object.keys(a))if(!r.has(e))throw Error(`[showcase] ${t}: operator '${e}' on '${n}' does not compile to SQL`)}}}function a(e){if(!e.id)throw Error(`[showcase] missing id`);if(!e.library)throw Error(`[showcase] ${e.id}: missing library`);if(!e.source?.library||!e.source?.shelf)throw Error(`[showcase] ${e.id}: missing source library/shelf`);if(!e.columns?.length)throw Error(`[showcase] ${e.id}: columns must not be empty`);if(!e.filter||Object.keys(e.filter).length===0)throw Error(`[showcase] ${e.id}: filter must not be empty — an unfiltered showcase is the shelf itself`);return i(e.filter,e.id),e}export{a as t};
@@ -1 +0,0 @@
1
- import{n as e,r as t,t as n}from"./src-DEcZTAam.js";export{e as default,n as fin,t as iban};
@@ -1 +0,0 @@
1
- import{n as e,r as t}from"./fields-GPyF03tK.js";import{s as n}from"./shelf-CpE68_8d.js";import{t as r}from"./extend-BMkkNVfm.js";import{n as i,r as a}from"./plugin-CFEkHH3f.js";import{t as o}from"./showcase-CUDyXMb7.js";var s=r({id:`drone`,label:`drone.drone.label`,icon:`tb:drone`,attachTo:[{library:`things`,shelf:`item`}],showWhen:{type:`drone`,subtype:{$in:[`aircraft`,`rtf`]}},agent:{description:`FPV drone technical characteristics. frame_size — frame size (e.g. 3.5"). motors — motors. firmware — firmware (Betaflight/INAV). camera/flight_controller/vtx/gps_module link to things/item[type=drone] records of the matching subtype. A drone whose parts cannot be separate records is subtype='rtf' instead, and carries the component extends directly.`,instructions:`drone references the components; specs live in each module's fields. When you replace a component or update the firmware — update the relevant fields via update_record.`},fields:{bento:e.bento({fields:{group:{span:`2x1`,el:e.group({scope:`hoist`,fields:{motors:e.string({label:`drone.drone.fields.motors`,rules:{max:150}}),props:e.string({label:`drone.drone.fields.props`,rules:{max:80}}),camera:e.relation({label:`drone.drone.fields.camera`,options:t({library:`things`,shelf:`item`,filter:{type:`drone`,subtype:`camera`}})})}})},group2:e.group({scope:`hoist`,fields:{power_module:e.string({label:`drone.drone.fields.power_module`,rules:{max:60}}),vtx:e.relation({label:`drone.drone.fields.vtx`,options:t({library:`things`,shelf:`item`,filter:{type:`drone`,subtype:`vtx`}})})}}),group3:e.group({scope:`hoist`,fields:{flight_time:e.string({label:`drone.drone.fields.flight_time`,rules:{max:60}}),firmware:e.string({label:`drone.drone.fields.firmware`,options:`drone-firmware`,strict:!0,noSearch:!0}),firmware_version:e.string({label:`drone.drone.fields.firmware_version`,rules:{max:40}}),firmware_target:e.string({label:`drone.drone.fields.firmware_target`,rules:{max:80}})}}),group4:e.group({scope:`hoist`,fields:{frame_size:e.string({label:`drone.drone.fields.frame_size`,rules:{max:40}}),purpose:e.string({label:`drone.drone.fields.purpose`,rules:{max:200}})}}),group5:e.group({scope:`hoist`,fields:{flight_controller:e.relation({label:`drone.drone.fields.flight_controller`,options:t({library:`things`,shelf:`item`,filter:{type:`drone`,subtype:`flight_controller`}})}),gps_module:e.relation({label:`drone.drone.fields.gps_module`,options:t({library:`things`,shelf:`item`,filter:{type:`drone`,subtype:`gps`}})})}}),group6:e.group({scope:`hoist`,fields:{radio_link:e.string({label:`drone.drone.fields.radio_link`,options:`drone-radio-links`,multiple:!0,strict:!0,noSearch:!0}),receiver:e.string({label:`drone.drone.fields.receiver`,rules:{max:80}}),video_system:e.string({label:`drone.drone.fields.video_system`,options:`drone-video-systems`,strict:!0,noSearch:!0})}})}}),snippets:e.group({scope:`nest`,label:`drone.drone.groups.snippets`,icon:`lucide:terminal`,multiple:!0,fields:{title:e.string({label:`drone.drone.fields.snippet_title`,required:!0,rules:{max:100}}),summary:e.text({label:`drone.drone.fields.snippet_summary`,rules:{max:500}}),snippet:e.source({label:`drone.drone.fields.snippet`,rules:{ext:`md`}})}}),flights:e.backrefs({label:`drone.drone.fields.flights`,from:{library:`drone`,shelf:`flight`,field:`aircraft`}}),notes:e.text({label:`drone.drone.fields.notes`,rules:{max:2e3}})}}),c=r({id:`drone_battery`,label:`drone.drone_battery.label`,icon:`lucide:battery-full`,attachTo:[{library:`things`,shelf:`item`}],showWhen:{type:`drone`,subtype:{$in:[`battery`,`rtf`]}},agent:`FPV drone battery characteristics. cells — number of cells (1S/3S/4S). capacity — capacity in mAh. c_rate — discharge current. auw — all-up weight of the assembly in flight.`,fields:{charger:e.string({label:`drone.drone_battery.fields.charger`,rules:{max:100}}),cells:e.string({label:`drone.drone_battery.fields.cells`,options:`drone-cells`,strict:!0,noSearch:!0}),capacity:e.measured({label:`drone.drone_battery.fields.capacity`,units:`energy`}),c_rate:e.string({label:`drone.drone_battery.fields.c_rate`,rules:{max:20}}),auw:e.string({label:`drone.drone_battery.fields.auw`,rules:{max:40}}),flights:e.backrefs({label:`drone.drone_battery.fields.flights`,from:{library:`drone`,shelf:`flight`,field:`batteries`}}),notes:e.text({label:`drone.drone_battery.fields.notes`,rules:{max:2e3}})}}),l=r({id:`drone_vtx`,label:`drone.drone_vtx.label`,icon:`lucide:radio-tower`,attachTo:[{library:`things`,shelf:`item`}],showWhen:{type:`drone`,subtype:{$in:[`vtx`,`rtf`]}},agent:`FPV video transmitter characteristics. input_voltage — input voltage. protocol — control protocols, codes from the drone-vtx-protocols list. frequency_groups — Betaflight band letters. channel_count — number of channels.`,fields:{input_voltage:e.string({label:`drone.drone_vtx.fields.input_voltage`,rules:{max:40}}),protocol:e.string({label:`drone.drone_vtx.fields.protocol`,options:`drone-vtx-protocols`,multiple:!0,strict:!0,noSearch:!0}),antenna_interface:e.string({label:`drone.drone_vtx.fields.antenna_interface`,options:`drone-rf-connectors`,strict:!0,noSearch:!0}),channel_count:e.int({label:`drone.drone_vtx.fields.channel_count`,rules:{min:0}}),mounting:e.string({label:`drone.drone_vtx.fields.mounting`,options:`drone-mounting`,multiple:!0,strict:!0,noSearch:!0}),built_in_microphone:e.boolean({label:`drone.drone_vtx.fields.built_in_microphone`}),frequency_groups:e.string({label:`drone.drone_vtx.fields.frequency_groups`,options:`drone-bands`,multiple:!0,strict:!0,noSearch:!0}),power_levels:e.keyed({label:`drone.drone_vtx.groups.power_levels`,icon:`lucide:zap`,container:e.row,fields:{level:e.string({label:`drone.drone_vtx.fields.power_level`,options:`drone-vtx-power`,strict:!0,noSearch:!0}),current_ma:e.int({label:`drone.drone_vtx.fields.current_ma`,rules:{min:0}}),dbm:e.real({label:`drone.drone_vtx.fields.dbm`})},by:`level`}),notes:e.text({label:`drone.drone_vtx.fields.notes`,rules:{max:2e3}})}}),u=r({id:`drone_gps`,label:`drone.drone_gps.label`,icon:`lucide:satellite`,attachTo:[{library:`things`,shelf:`item`}],showWhen:{type:`drone`,subtype:{$in:[`gps`,`rtf`]}},agent:`FPV drone GPS module characteristics. gnss_chip — chipset. compass_chip — magnetometer. satellite_systems — supported satellite systems.`,fields:{gnss_chip:e.string({label:`drone.drone_gps.fields.gnss_chip`,rules:{max:80}}),compass_chip:e.string({label:`drone.drone_gps.fields.compass_chip`,rules:{max:60}}),barometer:e.boolean({label:`drone.drone_gps.fields.barometer`}),interface:e.string({label:`drone.drone_gps.fields.interface`,options:`drone-serial-interfaces`,multiple:!0,strict:!0,noSearch:!0}),input_voltage:e.string({label:`drone.drone_gps.fields.input_voltage`,rules:{max:40}}),update_rate_hz:e.int({label:`drone.drone_gps.fields.update_rate_hz`,rules:{min:0}}),receiving_channels:e.int({label:`drone.drone_gps.fields.receiving_channels`,rules:{min:0}}),supported_protocols:e.string({label:`drone.drone_gps.fields.supported_protocols`,options:`drone-gnss-protocols`,multiple:!0,strict:!0,noSearch:!0}),baud_rates:e.string({label:`drone.drone_gps.fields.baud_rates`,options:`drone-baud-rates`,multiple:!0,strict:!0,noSearch:!0}),satellite_systems:e.string({label:`drone.drone_gps.fields.satellite_systems`,options:`drone-gnss-systems`,multiple:!0,strict:!0,noSearch:!0}),notes:e.text({label:`drone.drone_gps.fields.notes`,rules:{max:2e3}})}}),d=r({id:`drone_flight_controller`,label:`drone.drone_flight_controller.label`,icon:`lucide:sliders-horizontal`,attachTo:[{library:`things`,shelf:`item`}],showWhen:{type:`drone`,subtype:{$in:[`flight_controller`,`rtf`]}},agent:`FPV drone flight controller characteristics. mcu — processor (STM32F411/F405). gyro — gyroscope. supported_firmware — compatible firmware (Betaflight, INAV).`,fields:{mcu:e.string({label:`drone.drone_flight_controller.fields.mcu`,options:`drone-fc-mcu`,strict:!0,noSearch:!0}),gyro:e.string({label:`drone.drone_flight_controller.fields.gyro`,options:`drone-gyro`,multiple:!0,strict:!0,noSearch:!0}),barometer:e.boolean({label:`drone.drone_flight_controller.fields.barometer`}),osd_chip:e.string({label:`drone.drone_flight_controller.fields.osd_chip`,options:`drone-osd-chip`,strict:!0,noSearch:!0}),blackbox:e.string({label:`drone.drone_flight_controller.fields.blackbox`,options:`drone-blackbox`,strict:!0,noSearch:!0}),bluetooth:e.boolean({label:`drone.drone_flight_controller.fields.bluetooth`}),wifi:e.boolean({label:`drone.drone_flight_controller.fields.wifi`}),current_sensor_input:e.boolean({label:`drone.drone_flight_controller.fields.current_sensor_input`}),power_input:e.string({label:`drone.drone_flight_controller.fields.power_input`,rules:{max:40}}),constant_current:e.string({label:`drone.drone_flight_controller.fields.constant_current`,rules:{max:20}}),peak_current:e.string({label:`drone.drone_flight_controller.fields.peak_current`,rules:{max:20}}),bec_5v:e.string({label:`drone.drone_flight_controller.fields.bec_5v`,rules:{max:20}}),bec_9v:e.string({label:`drone.drone_flight_controller.fields.bec_9v`,rules:{max:20}}),mounting:e.string({label:`drone.drone_flight_controller.fields.mounting`,options:`drone-mounting`,multiple:!0,strict:!0,noSearch:!0}),uart_count:e.int({label:`drone.drone_flight_controller.fields.uart_count`,rules:{min:0}}),supported_firmware:e.string({label:`drone.drone_flight_controller.fields.supported_firmware`,options:`drone-firmware`,multiple:!0,strict:!0,noSearch:!0}),firmware_target:e.string({label:`drone.drone_flight_controller.fields.firmware_target`,rules:{max:80}}),build_role:e.string({label:`drone.drone_flight_controller.fields.build_role`,rules:{max:200}}),notes:e.text({label:`drone.drone_flight_controller.fields.notes`,rules:{max:2e3}})}}),f=r({id:`drone_goggles`,label:`drone.drone_goggles.label`,icon:`lucide:glasses`,attachTo:[{library:`things`,shelf:`item`}],showWhen:{type:`drone`,subtype:`goggles`},agent:`FPV goggles characteristics. display_size — display diagonal. frequency_bands — supported radio bands. battery_life — runtime on battery.`,fields:{display_size:e.string({label:`drone.drone_goggles.fields.display_size`,rules:{max:20}}),display_resolution:e.string({label:`drone.drone_goggles.fields.display_resolution`,rules:{max:40}}),display_brightness:e.string({label:`drone.drone_goggles.fields.display_brightness`,rules:{max:30}}),view_angle:e.string({label:`drone.drone_goggles.fields.view_angle`,rules:{max:20}}),antenna:e.string({label:`drone.drone_goggles.fields.antenna`,rules:{max:80}}),frequency_bands:e.string({label:`drone.drone_goggles.fields.frequency_bands`,options:`drone-bands`,multiple:!0,strict:!0,noSearch:!0}),battery:e.string({label:`drone.drone_goggles.fields.battery`,rules:{max:60}}),battery_life:e.string({label:`drone.drone_goggles.fields.battery_life`,rules:{max:40}}),charging:e.string({label:`drone.drone_goggles.fields.charging`,rules:{max:60}}),band_channels:e.keyed({label:`drone.drone_goggles.groups.band_channels`,icon:`lucide:radio`,container:e.row,fields:{band:e.string({label:`drone.drone_goggles.fields.band`,options:`drone-bands`,strict:!0,noSearch:!0}),channels:e.int({label:`drone.drone_goggles.fields.channels`,multiple:!0})},by:`band`}),notes:e.text({label:`drone.drone_goggles.fields.notes`,rules:{max:2e3}})}}),p=r({id:`drone_antenna`,label:`drone.drone_antenna.label`,icon:`lucide:radio`,attachTo:[{library:`things`,shelf:`item`}],showWhen:{type:`drone`,subtype:{$in:[`antenna`,`rtf`]}},agent:`FPV antenna characteristics. rf_band — the bands it covers, codes from drone-rf-bands. polarization — RHCP/LHCP/linear; a video link needs the SAME polarization on both ends. antenna_type — the radiating structure. connector — one model often ships in several connector variants.`,fields:{rf_band:e.string({label:`drone.drone_antenna.fields.rf_band`,options:`drone-rf-bands`,multiple:!0,strict:!0,noSearch:!0}),polarization:e.string({label:`drone.drone_antenna.fields.polarization`,options:`drone-polarization`,strict:!0,noSearch:!0}),antenna_type:e.string({label:`drone.drone_antenna.fields.antenna_type`,options:`drone-antenna-types`,strict:!0,noSearch:!0}),connector:e.string({label:`drone.drone_antenna.fields.connector`,options:`drone-rf-connectors`,multiple:!0,strict:!0,noSearch:!0}),gain_dbi:e.real({label:`drone.drone_antenna.fields.gain_dbi`}),cable_length:e.int({label:`drone.drone_antenna.fields.cable_length`,rules:{min:0}}),notes:e.text({label:`drone.drone_antenna.fields.notes`,rules:{max:2e3}})}}),m=r({id:`drone_receiver`,label:`drone.drone_receiver.label`,icon:`lucide:antenna`,attachTo:[{library:`things`,shelf:`item`}],showWhen:{type:`drone`,subtype:{$in:[`receiver`,`rtf`]}},agent:`RC receiver characteristics. radio_link — the protocol it binds with (ExpressLRS, Crossfire…). output_protocol — how it talks to the flight controller (CRSF, SBUS…). diversity — two antennas with active switching.`,fields:{radio_link:e.string({label:`drone.drone_receiver.fields.radio_link`,options:`drone-radio-links`,strict:!0,noSearch:!0}),rf_band:e.string({label:`drone.drone_receiver.fields.rf_band`,options:`drone-rf-bands`,multiple:!0,strict:!0,noSearch:!0}),output_protocol:e.string({label:`drone.drone_receiver.fields.output_protocol`,options:`drone-rx-outputs`,multiple:!0,strict:!0,noSearch:!0}),antenna_connector:e.string({label:`drone.drone_receiver.fields.antenna_connector`,options:`drone-rf-connectors`,strict:!0,noSearch:!0}),antenna_count:e.int({label:`drone.drone_receiver.fields.antenna_count`,rules:{min:0}}),telemetry:e.boolean({label:`drone.drone_receiver.fields.telemetry`}),diversity:e.boolean({label:`drone.drone_receiver.fields.diversity`}),input_voltage:e.string({label:`drone.drone_receiver.fields.input_voltage`,rules:{max:40}}),firmware_version:e.string({label:`drone.drone_receiver.fields.firmware_version`,rules:{max:40}}),notes:e.text({label:`drone.drone_receiver.fields.notes`,rules:{max:2e3}})}}),h=r({id:`drone_camera`,label:`drone.drone_camera.label`,icon:`lucide:camera`,attachTo:[{library:`things`,shelf:`item`}],showWhen:{type:`drone`,subtype:{$in:[`camera`,`rtf`]}},agent:`FPV camera characteristics. sensor — the sensor model (free text, e.g. Sony Super HAD II). resolution_tvl — analog horizontal resolution in TVL. aspect_ratio — 4:3 / 16:9 / switchable. output — the video signal it produces (analog CVBS or a digital HD system).`,fields:{sensor:e.string({label:`drone.drone_camera.fields.sensor`,rules:{max:100}}),resolution_tvl:e.int({label:`drone.drone_camera.fields.resolution_tvl`,rules:{min:0}}),aspect_ratio:e.string({label:`drone.drone_camera.fields.aspect_ratio`,options:`drone-camera-aspect`,strict:!0,noSearch:!0}),lens_mm:e.real({label:`drone.drone_camera.fields.lens_mm`}),fov_deg:e.int({label:`drone.drone_camera.fields.fov_deg`,rules:{min:0}}),output:e.string({label:`drone.drone_camera.fields.output`,options:`drone-camera-output`,strict:!0,noSearch:!0}),camera_size:e.string({label:`drone.drone_camera.fields.camera_size`,options:`drone-camera-sizes`,strict:!0,noSearch:!0}),input_voltage:e.string({label:`drone.drone_camera.fields.input_voltage`,rules:{max:40}}),notes:e.text({label:`drone.drone_camera.fields.notes`,rules:{max:2e3}})}}),g=[`ok`,`low_voltage`,`crash`,`lost`],_=[{value:`ok`,title:`drone.options.outcome.ok`,tone:`success`},{value:`low_voltage`,title:`drone.options.outcome.low_voltage`,tone:`warning`},{value:`crash`,title:`drone.options.outcome.crash`,tone:`danger`},{value:`lost`,title:`drone.options.outcome.lost`,tone:`danger`}],v=e=>Array.isArray(e)?e.filter(e=>e&&typeof e==`object`):[];function y(e,t){let n=[];for(let r of v(e)){let e=r[t];if(e==null||e===``)continue;let i=Number(e);Number.isFinite(i)&&(n.includes(i)||n.push(i))}return n}function b(e,t=`outcome`){let n=-1;for(let r of v(e)){let e=g.indexOf(r[t]);e>n&&(n=e)}return n<0?null:g[n]}var x=n({shelf:`flight`,library:`drone`,label:`drone.flight.label`,icon:`lucide:plane-takeoff`,agent:"A flying session, not a single sortie: one record is one outing — date, place, aircraft — and each battery pack flown is a row of `packs` (battery, duration in seconds, outcome, notes). `batteries` and `outcome` are SERVER-OWNED derivations over those rows and are rejected if sent: `batteries` indexes the distinct batteries used, `outcome` is the worst row outcome. Record a crash by setting that pack's outcome and listing the broken parts in `damage`, not by prose in `notes`. The `aircraft` picker only offers things/item[subtype='aircraft'] — a ready-to-fly kit (subtype='rtf') cannot be selected there today, so log its flights against an 'aircraft'-subtype record instead.",views:{title:`date`,listKind:`map`,list:[`aircraft`,`place`,`outcome`],inline:[`date`,`aircraft`]},fields:{date:e.date({label:`drone.flight.fields.date`,required:!0,rules:{min:`2000-01-01`,max:`today`},ui:{span:4}}),description:e.text({label:`drone.flight.fields.description`,rules:{max:1e3}}),place:e.geo({label:`drone.flight.fields.place`}),aircraft:e.relation({label:`drone.flight.fields.aircraft`,options:t({library:`things`,shelf:`item`,filter:{type:`drone`,subtype:`aircraft`}})}),batteries:e.relation({label:`drone.flight.fields.batteries`,multiple:!0,options:t({library:`things`,shelf:`item`,filter:{type:`drone`,subtype:`battery`}}),value:({record:e})=>y(e.packs,`battery`)}),weather:e.group({scope:`hoist`,label:`drone.flight.groups.weather`,icon:`lucide:cloud-sun`,fields:{temp:e.measured({label:`drone.flight.fields.temp`,units:`temperature`,ui:{span:4}}),wind:e.measured({label:`drone.flight.fields.wind`,units:`speed`,ui:{span:4}}),sky:e.string({label:`drone.flight.fields.sky`,options:`drone-sky`,strict:!0,noSearch:!0})}}),packs:e.row({scope:`nest`,multiple:!0,label:`drone.flight.fields.packs`,icon:`lucide:battery-charging`,fields:{battery:e.relation({label:`drone.flight.fields.battery`,options:t({library:`things`,shelf:`item`,filter:{type:`drone`,subtype:`battery`}}),mutate:[`batteries`]}),duration:e.duration({label:`drone.flight.fields.duration`}),outcome:e.string({label:`drone.flight.fields.pack_outcome`,options:`drone-outcomes`,strict:!0,noSearch:!0,mutate:[`outcome`]}),notes:e.text({label:`drone.flight.fields.pack_notes`,rules:{max:500}})}}),outcome:e.string({label:`drone.flight.fields.outcome`,options:`drone-outcomes`,strict:!0,noSearch:!0,value:({record:e})=>b(e.packs)}),setup:e.group({scope:`hoist`,label:`drone.flight.groups.setup`,icon:`lucide:sliders-horizontal`,fields:{firmware_version:e.string({label:`drone.flight.fields.firmware_version`,rules:{max:40}}),tune:e.text({label:`drone.flight.fields.tune`,rules:{max:2e3}})}}),damage:e.relation({label:`drone.flight.fields.damage`,multiple:!0,options:t({library:`things`,shelf:`item`,filter:{type:`drone`}})}),video:e.video({label:`drone.flight.fields.video`,multiple:!0}),photos:e.image({label:`drone.flight.fields.photos`,multiple:!0}),edit_link:e.link({label:`drone.flight.fields.edit_link`}),tags:e.tags({label:`drone.flight.fields.tags`}),notes:e.text({label:`drone.flight.fields.notes`,rules:{max:2e3}})}}),S=i({id:`drone`,version:`1.0.0`,dependsOn:[`things`,`geo`],libraries:[{meta:a({id:`drone`,label:`drone.library.label`,icon:`tb:drone`,agent:`FPV drones and their components. A component is a things/item row with type=drone — this library owns no table for those. A FLIGHT is different: it is an event, not a thing, and it is this library's one table (flight): one record per outing, with the battery packs flown as rows inside it.`}),shelves:[x]}],extends_:[s,c,l,u,d,f,p,m,h],showcases:[o({id:`fleet`,library:`drone`,label:`drone.fleet.label`,icon:`lucide:plane`,source:{library:`things`,shelf:`item`},filter:{type:`drone`},columns:[`subtype`,`brand`,`model`,`location`,`condition`],defaultGroupBy:`subtype`,createDefaults:{type:`drone`}})],optionLists:[{name:`drone-bands`,options:[{value:`A`,title:`A`},{value:`B`,title:`B`},{value:`E`,title:`E`},{value:`F`,title:`F`},{value:`R`,title:`R`},{value:`L`,title:`L`},{value:`U`,title:`U`},{value:`O`,title:`O`},{value:`H`,title:`H`}]},{name:`drone-vtx-power`,options:[{value:`pit`,title:`PIT`},{value:`25mw`,title:`25 mW`},{value:`100mw`,title:`100 mW`},{value:`200mw`,title:`200 mW`},{value:`350mw`,title:`350 mW`},{value:`400mw`,title:`400 mW`},{value:`600mw`,title:`600 mW`},{value:`800mw`,title:`800 mW`},{value:`1000mw`,title:`1 W`},{value:`1600mw`,title:`1.6 W`},{value:`2500mw`,title:`2.5 W`}]},{name:`drone-vtx-protocols`,options:[{value:`smartaudio_1_0`,title:`SmartAudio 1.0`},{value:`smartaudio_2_0`,title:`SmartAudio 2.0`},{value:`smartaudio_2_1`,title:`SmartAudio 2.1`},{value:`tramp`,title:`IRC Tramp`},{value:`msp_displayport`,title:`MSP DisplayPort`},{value:`none`,title:`drone.options.none`}]},{name:`drone-rf-connectors`,options:[{value:`ipex_mhf1`,title:`IPEX / MHF1 (U.FL)`},{value:`ipex_mhf3`,title:`IPEX MHF3`},{value:`mmcx`,title:`MMCX`},{value:`sma`,title:`SMA`},{value:`rp_sma`,title:`RP-SMA`},{value:`ufl_solder`,title:`U.FL (soldered)`}]},{name:`drone-mounting`,options:[{value:`16x16_m2`,title:`16×16 mm M2`},{value:`20x20_m2`,title:`20×20 mm M2`},{value:`20x20_m3`,title:`20×20 mm M3`},{value:`25.5x25.5_m2`,title:`25.5×25.5 mm M2`},{value:`30.5x30.5_m3`,title:`30.5×30.5 mm M3`},{value:`adhesive`,title:`drone.options.adhesive`}]},{name:`drone-firmware`,options:[{value:`betaflight`,title:`Betaflight`},{value:`inav`,title:`INAV`},{value:`ardupilot`,title:`ArduPilot`},{value:`emuflight`,title:`EmuFlight`},{value:`rotorflight`,title:`Rotorflight`},{value:`kiss`,title:`KISS`},{value:`cleanflight`,title:`Cleanflight`}]},{name:`drone-fc-mcu`,options:[{value:`stm32f411`,title:`STM32F411`},{value:`stm32f405`,title:`STM32F405`},{value:`stm32f722`,title:`STM32F722`},{value:`stm32f745`,title:`STM32F745`},{value:`stm32f765`,title:`STM32F765`},{value:`stm32h743`,title:`STM32H743`},{value:`stm32h750`,title:`STM32H750`},{value:`at32f435`,title:`AT32F435`},{value:`gd32f405`,title:`GD32F405`}]},{name:`drone-gyro`,options:[{value:`mpu6000`,title:`MPU6000`},{value:`mpu6500`,title:`MPU6500`},{value:`icm20602`,title:`ICM20602`},{value:`icm20689`,title:`ICM20689`},{value:`icm42688p`,title:`ICM42688-P`},{value:`icm42605`,title:`ICM42605`},{value:`bmi270`,title:`BMI270`},{value:`bmi160`,title:`BMI160`}]},{name:`drone-osd-chip`,options:[{value:`at7456e`,title:`AT7456E`},{value:`max7456`,title:`MAX7456`},{value:`msp_displayport`,title:`MSP DisplayPort`},{value:`none`,title:`drone.options.none`}]},{name:`drone-blackbox`,options:[{value:`none`,title:`drone.options.none`},{value:`flash_8mb`,title:`Flash 8 MB`},{value:`flash_16mb`,title:`Flash 16 MB`},{value:`flash_32mb`,title:`Flash 32 MB`},{value:`sd_card`,title:`microSD`}]},{name:`drone-gnss-systems`,options:[{value:`gps`,title:`GPS`},{value:`glonass`,title:`GLONASS`},{value:`galileo`,title:`Galileo`},{value:`beidou`,title:`BeiDou`},{value:`qzss`,title:`QZSS`},{value:`sbas`,title:`SBAS`},{value:`navic`,title:`NavIC`}]},{name:`drone-gnss-protocols`,options:[{value:`ubx`,title:`UBX`},{value:`nmea`,title:`NMEA`},{value:`rtcm3`,title:`RTCM3`},{value:`msp`,title:`MSP`}]},{name:`drone-baud-rates`,options:[{value:`4800`,title:`4800`},{value:`9600`,title:`9600`},{value:`19200`,title:`19200`},{value:`38400`,title:`38400`},{value:`57600`,title:`57600`},{value:`115200`,title:`115200`},{value:`230400`,title:`230400`},{value:`460800`,title:`460800`},{value:`921600`,title:`921600`}]},{name:`drone-serial-interfaces`,options:[{value:`uart`,title:`UART`},{value:`i2c`,title:`I2C`},{value:`spi`,title:`SPI`},{value:`can`,title:`CAN`}]},{name:`drone-video-systems`,options:[{value:`analog_5_8`,title:`drone.options.videoSystems.analog_5_8`},{value:`dji_v1_v2`,title:`DJI V1/V2`},{value:`dji_o3`,title:`DJI O3`},{value:`dji_o4`,title:`DJI O4`},{value:`walksnail_avatar`,title:`Walksnail Avatar`},{value:`hdzero`,title:`HDZero`}]},{name:`drone-radio-links`,options:[{value:`elrs_2_4`,title:`ExpressLRS 2.4 GHz`},{value:`elrs_900`,title:`ExpressLRS 868/915 MHz`},{value:`crossfire`,title:`TBS Crossfire`},{value:`tracer`,title:`TBS Tracer`},{value:`ghost`,title:`ImmersionRC Ghost`},{value:`frsky_d16`,title:`FrSky D16`},{value:`frsky_d8`,title:`FrSky D8`},{value:`dsmx`,title:`Spektrum DSMX`},{value:`dji`,title:`DJI`}]},{name:`drone-rf-bands`,options:[{value:`5_8ghz`,title:`5.8 GHz`},{value:`2_4ghz`,title:`2.4 GHz`},{value:`1_2ghz`,title:`1.2 GHz`},{value:`900mhz`,title:`868/915 MHz`},{value:`433mhz`,title:`433 MHz`}]},{name:`drone-polarization`,options:[{value:`rhcp`,title:`drone.options.polarization.rhcp`},{value:`lhcp`,title:`drone.options.polarization.lhcp`},{value:`linear`,title:`drone.options.polarization.linear`}]},{name:`drone-antenna-types`,options:[{value:`omni`,title:`drone.options.antennaTypes.omni`},{value:`patch`,title:`drone.options.antennaTypes.patch`},{value:`helical`,title:`drone.options.antennaTypes.helical`},{value:`pagoda`,title:`drone.options.antennaTypes.pagoda`},{value:`cloverleaf`,title:`drone.options.antennaTypes.cloverleaf`},{value:`monopole`,title:`drone.options.antennaTypes.monopole`},{value:`whip`,title:`drone.options.antennaTypes.whip`}]},{name:`drone-cells`,options:[{value:`1s`,title:`1S`},{value:`2s`,title:`2S`},{value:`3s`,title:`3S`},{value:`4s`,title:`4S`},{value:`5s`,title:`5S`},{value:`6s`,title:`6S`},{value:`7s`,title:`7S`},{value:`8s`,title:`8S`},{value:`12s`,title:`12S`}]},{name:`drone-rx-outputs`,options:[{value:`crsf`,title:`CRSF`},{value:`sbus`,title:`SBUS`},{value:`ibus`,title:`IBUS`},{value:`ppm`,title:`PPM`},{value:`pwm`,title:`PWM`},{value:`spektrum`,title:`Spektrum`},{value:`ghst`,title:`GHST`}]},{name:`drone-camera-aspect`,options:[{value:`4_3`,title:`4:3`},{value:`16_9`,title:`16:9`},{value:`switchable`,title:`drone.options.cameraAspect.switchable`}]},{name:`drone-camera-output`,options:[{value:`analog_cvbs`,title:`drone.options.cameraOutput.analog_cvbs`},{value:`dji`,title:`DJI`},{value:`walksnail`,title:`Walksnail`},{value:`hdzero`,title:`HDZero`}]},{name:`drone-camera-sizes`,options:[{value:`nano`,title:`Nano`},{value:`micro`,title:`Micro`},{value:`mini`,title:`Mini`},{value:`full`,title:`Full-size`},{value:`whoop`,title:`Whoop`}]},{name:`drone-outcomes`,options:[..._]},{name:`drone-sky`,options:[{value:`clear`,title:`drone.options.sky.clear`},{value:`cloudy`,title:`drone.options.sky.cloudy`},{value:`overcast`,title:`drone.options.sky.overcast`},{value:`fog`,title:`drone.options.sky.fog`},{value:`rain`,title:`drone.options.sky.rain`},{value:`snow`,title:`drone.options.sky.snow`}]}],fieldContribs:[{library:`things`,shelf:`item`,field:`type`,options:[{value:`drone`,title:`drone.drone.label`}]},{library:`things`,shelf:`item`,field:`subtype`,options:[{value:`aircraft`,title:`drone.contrib.subtype.aircraft`,when:{type:`drone`}},{value:`battery`,title:`drone.drone_battery.label`,when:{type:`drone`}},{value:`vtx`,title:`drone.drone_vtx.label`,when:{type:`drone`}},{value:`gps`,title:`drone.drone_gps.label`,when:{type:`drone`}},{value:`flight_controller`,title:`drone.drone_flight_controller.label`,when:{type:`drone`}},{value:`goggles`,title:`drone.drone_goggles.label`,when:{type:`drone`}},{value:`radio`,title:`drone.contrib.subtype.radio`,when:{type:`drone`}},{value:`camera`,title:`drone.drone_camera.label`,when:{type:`drone`}},{value:`antenna`,title:`drone.drone_antenna.label`,when:{type:`drone`}},{value:`receiver`,title:`drone.drone_receiver.label`,when:{type:`drone`}},{value:`frame`,title:`drone.contrib.subtype.frame`,when:{type:`drone`}},{value:`rtf`,title:`drone.contrib.subtype.rtf`,when:{type:`drone`}},{value:`accessory`,title:`drone.contrib.subtype.accessory`,when:{type:`drone`}}]}]});export{S as default};
@@ -1 +0,0 @@
1
- import{n as e}from"./fields-GPyF03tK.js";import{n as t}from"./plugin-CFEkHH3f.js";import{t as n}from"./settings-rQsBFoL2.js";var r=1800,i=32e3,a=64e3,o={tools:!0,reasoning:!0},s={tools:!0,reasoning:!1};function c(e){return{labelKey:`claude-agent.models.${e}.label`,titleKey:`claude-agent.models.${e}.title`,hintKey:`claude-agent.models.${e}.hint`}}var l=[{value:`haiku`,id:`claude-haiku-4-5`,effort:``,quality:1,time:1,maxOutput:a,...c(`haiku`),capabilities:s},{value:`sonnet-medium`,id:`claude-sonnet-5`,effort:`medium`,quality:2,time:2,maxOutput:i,...c(`sonnet-medium`),capabilities:o},{value:`sonnet-high`,id:`claude-sonnet-5`,effort:`high`,quality:3,time:3,maxOutput:i,...c(`sonnet-high`),capabilities:o},{value:`opus-medium`,id:`claude-opus-5`,effort:`medium`,quality:4,time:4,maxOutput:i,...c(`opus-medium`),capabilities:o},{value:`opus-high`,id:`claude-opus-5`,effort:`high`,quality:5,time:5,maxOutput:i,...c(`opus-high`),capabilities:o}],u=t({id:`claude-agent`,version:`1.0.0`,dependsOn:[],fieldContribs:[{library:`_settings`,shelf:`system`,field:`agent_id`,options:[{value:`claude-agent`,title:`claude-agent.plugin.label`}]}],settings:n({label:`claude-agent.settings.label`,fields:{group:e.group({label:`claude-agent.settings.groups.runtime`,icon:`lucide:bot`,scope:`hoist`,fields:{auth_mode:e.string({label:`claude-agent.settings.auth_mode`,default:`subscription`,strict:!0,noSearch:!0,options:[{value:`subscription`,title:`claude-agent.settings.auth_mode_subscription`},{value:`api_key`,title:`claude-agent.settings.auth_mode_api_key`}]}),anthropic_api_key:e.password({label:`claude-agent.settings.anthropic_api_key`,ui:{hidden:{auth_mode:{$ne:`api_key`}}}}),claude_model:e.string({label:`claude-agent.settings.claude_model`,default:`haiku`,strict:!0,noSearch:!0,options:l.map(e=>({value:e.value,title:e.labelKey}))}),thinking_enabled:e.boolean({label:`claude-agent.settings.thinking_enabled`,default:!1}),skip_permissions:e.boolean({label:`claude-agent.settings.skip_permissions`,default:!0}),response_timeout:e.int({label:`claude-agent.settings.response_timeout`,default:r})}}),group2:e.group({label:`claude-agent.settings.groups.rag`,icon:`lucide:search`,scope:`hoist`,fields:{rag_enabled:e.boolean({label:`claude-agent.settings.rag_enabled`,default:!0}),openai_api_key:e.password({label:`claude-agent.settings.openai_api_key`})}}),group3:e.group({label:`claude-agent.settings.groups.langfuse`,icon:`lucide:activity`,scope:`hoist`,fields:{tracing_enabled:e.boolean({label:`claude-agent.settings.tracing_enabled`}),langfuse_base_url:e.string({label:`claude-agent.settings.langfuse_base_url`}),langfuse_public_key:e.password({label:`claude-agent.settings.langfuse_public_key`}),langfuse_secret_key:e.password({label:`claude-agent.settings.langfuse_secret_key`})}})}})});export{u as default};
@@ -1 +0,0 @@
1
- import{n as e}from"./fields-GPyF03tK.js";import{n as t}from"./plugin-CFEkHH3f.js";import{t as n}from"./settings-rQsBFoL2.js";var r=t({id:`telegram`,version:`1.0.0`,dependsOn:[],settings:n({label:`telegram.settings.label`,fields:{api_id:e.int({label:`telegram.settings.api_id`}),api_hash:e.password({label:`telegram.settings.api_hash`}),bot_token:e.password({label:`telegram.settings.bot_token`}),phone:e.tel({label:`telegram.settings.phone`}),reasoning_display:e.string({label:`telegram.settings.reasoning_display`,default:`collapsible`,strict:!0,noSearch:!0,options:[{value:`off`,title:`telegram.settings.reasoning_display_off`},{value:`collapsible`,title:`telegram.settings.reasoning_display_collapsible`},{value:`separate`,title:`telegram.settings.reasoning_display_separate`}]})}})});export{r as default};
@@ -1 +0,0 @@
1
- import{_ as e,n as t,r as n}from"./fields-GPyF03tK.js";import{s as r}from"./shelf-CpE68_8d.js";import{t as i}from"./extend-BMkkNVfm.js";import{n as a,r as o}from"./plugin-CFEkHH3f.js";import{t as s}from"./settings-rQsBFoL2.js";var c=new Map(e.map((e,t)=>[e.value,t])),l=864e5,u=7;function d(e){let t=[0,0,0,0,0,0,0];if(!Array.isArray(e))return t;for(let n of e){let e=n?.value;if(Array.isArray(e))for(let n of e){let e=n,r=typeof e?.day==`string`?c.get(e.day):void 0;if(r===void 0)continue;let i=Number(e?.value);Number.isFinite(i)&&i>0&&(t[r]=t[r]+i)}}return t}function f(){return new Date().toISOString().slice(0,10)}var p=e=>String(e).padStart(2,`0`);function m(e){let t=e instanceof Date?`${e.getFullYear()}-${p(e.getMonth()+1)}-${p(e.getDate())}`:typeof e==`string`?e.slice(0,10):null;if(t===null||!/^\d{4}-\d{2}-\d{2}$/.test(t))return null;let n=Date.parse(t);return Number.isNaN(n)?null:n}function h(e,t,n){let r=Math.round((n-t)/l);if(!Number.isFinite(r)||r<=0)return 0;let i=e.reduce((e,t)=>e+t,0),a=Math.floor(r/u)*i,o=(new Date(t).getUTCDay()+6)%u;for(let t=1;t<=r%u;t++)a+=e[(o+t)%u];return a}function g(e,t,n,r){let i=Number(e);if(!Number.isFinite(i))return null;let a=d(t),o=a.reduce((e,t)=>e+t,0);if(o<=0)return null;let s=m(n),c=m(r),l=s===null||c===null?0:h(a,s,c),f=Math.max(0,i-l);return Math.floor(f/(o/u))}function _(e){return typeof e!=`number`||!Number.isFinite(e)?null:e<=0?`out`:e<7?`low`:`enough`}var v=({record:e})=>g(e.quantity,e.dose,e.quantityCheckedAt,f()),y=r({shelf:`medicine`,library:`health`,label:`health.medicine.label`,icon:`lucide:pill`,views:{list:[`type`,`form`,`quantity`]},fields:{name:t.title({label:`core.fields.name`}),about:t.illustrated({label:`health.medicine.fields.about`,fields:{image:t.image({}),text:t.text({rules:{max:1e3}})}}),photos:t.image({label:`health.medicine.fields.photos`,multiple:!0}),quantity:t.int({label:`health.medicine.fields.quantity`,rules:{min:0,max:1e5},mutate:[`daysLeft`,`quantityCheckedAt`],ui:{span:6}}),countdown:t.countdown({source:{quantityCheckedAt:t.date({label:`health.medicine.fields.quantityCheckedAt`,value:e=>e.now.slice(0,10),mutate:[`daysLeft`],ui:{span:6}})},caption:`units.days`}),dose:t.keyed({label:`health.medicine.fields.dose`,icon:`lucide:pill`,fields:{person:t.relation({label:`health.medicine.fields.dose_person`,options:n({library:`people`,shelf:`person`})}),value:t.perWeekday({label:`health.medicine.fields.dose_value`,rules:{min:0,max:20,step:.5},mutate:[`daysLeft`]})},by:`person`}),meter:t.meter({source:{daysLeft:t.int({label:`health.medicine.fields.daysLeft`,value:v,cache:3600,mutate:[`supply_state`],ui:{span:6}})},min:0,max:30}),status:t.status({source:{supply_state:t.string({label:`health.medicine.fields.supply_state`,options:[{value:`enough`,title:`health.medicine.options.supply_state.enough`,icon:{kind:`icon`,value:`lucide:check`},tone:`success`},{value:`low`,title:`health.medicine.options.supply_state.low`,icon:{kind:`icon`,value:`lucide:minus`},tone:`warning`},{value:`out`,title:`health.medicine.options.supply_state.out`,icon:{kind:`icon`,value:`lucide:x`},tone:`danger`}],value:e=>_(v(e)),cache:3600,strict:!0,noSearch:!0,ui:{span:6}})}}),intakeTimes:t.string({label:`health.medicine.fields.intakeTimes`,options:`day-periods`,multiple:!0,strict:!0,noSearch:!0}),intakePeriods:t.period({label:`health.medicine.fields.intakePeriods`,multiple:!0}),properties:t.properties({columns:2,fields:{type:t.string({label:`core.fields.type`,required:!0,strict:!0,noSearch:!0,ui:{span:6},options:[{value:`vitamin`,title:`health.medicine.options.type.vitamin`},{value:`supplement`,title:`health.medicine.options.type.supplement`},{value:`medication`,title:`health.medicine.options.type.medication`},{value:`antibiotic`,title:`health.medicine.options.type.antibiotic`},{value:`hormone`,title:`health.medicine.options.type.hormone`},{value:`painkiller`,title:`health.medicine.options.type.painkiller`},{value:`homeopathy`,title:`health.medicine.options.type.homeopathy`},{value:`herbal`,title:`health.medicine.options.type.herbal`}]}),form:t.string({label:`health.medicine.fields.form`,strict:!0,noSearch:!0,ui:{span:6},options:[{value:`tablet`,title:`health.medicine.options.form.tablet`},{value:`capsule`,title:`health.medicine.options.form.capsule`},{value:`syrup`,title:`health.medicine.options.form.syrup`},{value:`drops`,title:`health.medicine.options.form.drops`},{value:`ointment`,title:`health.medicine.options.form.ointment`},{value:`gel`,title:`health.medicine.options.form.gel`},{value:`spray`,title:`health.medicine.options.form.spray`},{value:`injection`,title:`health.medicine.options.form.injection`},{value:`powder`,title:`health.medicine.options.form.powder`},{value:`suppository`,title:`health.medicine.options.form.suppository`}]})}}),purchase:t.group({label:`health.medicine.groups.purchase`,icon:`lucide:shopping-cart`,scope:`hoist`,fields:{link:t.link({label:`health.medicine.fields.link`,ui:{span:12}}),store:t.relation({label:`health.medicine.fields.store`,options:n({library:`things`,shelf:`store`}),ui:{span:6}}),orderNumber:t.string({label:`health.medicine.fields.orderNumber`,rules:{max:100},ui:{span:6}}),purchaseDate:t.date({label:`health.medicine.fields.purchaseDate`,ui:{span:4}}),purchasePrice:t.money({label:`health.medicine.fields.purchasePrice`,ui:{span:4}}),currency:t.currency({label:`core.fields.currency`,default:`UAH`,ui:{span:4}})}}),notes:t.text({label:`health.medicine.fields.notes`,rules:{max:2e3}})}}),b=r({shelf:`health_visit`,library:`health`,label:`health.health_visit.label`,icon:`lucide:stethoscope`,views:{list:[`date`,`person`,`specialty`]},fields:{name:t.title({label:`core.fields.name`}),description:t.text({label:`health.health_visit.fields.description`,rules:{max:1e3}}),timeline:t.timeline({fields:{date:t.date({label:`health.health_visit.fields.date`}),nextVisit:t.reminder({label:`health.health_visit.fields.nextVisit`,rules:{lead:14}})}}),reason:t.text({label:`health.health_visit.fields.reason`,rules:{max:1e3}}),result:t.text({label:`health.health_visit.fields.result`,rules:{max:2e3}}),next_step:t.text({label:`health.health_visit.fields.next_step`,rules:{max:1e3}}),specialist:t.string({label:`health.health_visit.fields.specialist`,rules:{max:200},ui:{span:4}}),specialty:t.string({label:`health.health_visit.fields.specialty`,rules:{max:100},ui:{span:4}}),clinic:t.string({label:`health.health_visit.fields.clinic`,rules:{max:200},ui:{span:4}}),cost:t.money({label:`health.health_visit.fields.cost`,ui:{span:3}}),currency:t.currency({label:`core.fields.currency`,default:`UAH`,ui:{span:3}}),medicines:t.relation({label:`health.health_visit.fields.medicines`,options:n({library:`health`,shelf:`medicine`}),multiple:!0,ui:{span:6}}),people:t.people({source:{person:t.relation({label:`health.health_visit.fields.person`,options:n({library:`people`,shelf:`person`})})}}),files:t.file({label:`health.health_visit.fields.files`,multiple:!0}),photos:t.image({label:`health.health_visit.fields.photos`,multiple:!0}),notes:t.text({label:`health.health_visit.fields.notes`,rules:{max:2e3}})}}),x=r({shelf:`health_test`,library:`health`,label:`health.health_test.label`,icon:`lucide:flask-conical`,views:{list:[`date`,`person`,`status`]},fields:{name:t.title({label:`core.fields.name`}),description:t.text({label:`health.health_test.fields.description`,rules:{max:1e3}}),date:t.date({label:`health.health_test.fields.date`,ui:{span:4}}),clinic:t.string({label:`health.health_test.fields.clinic`,rules:{max:200},ui:{span:4}}),person:t.relation({label:`health.health_test.fields.person`,options:n({library:`people`,shelf:`person`}),ui:{span:4}}),indicators:t.assay({label:`health.health_test.fields.indicators`,icon:`lucide:activity`,analyte:`analyte`,value:`value`,unit:`unit`,low:`low`,high:`high`,source:{indicators:t.group({scope:`nest`,multiple:!0,fields:{analyte:t.string({label:`health.health_test.fields.analyte`,rules:{max:100}}),value:t.real({label:`health.health_test.fields.value`}),unit:t.string({label:`health.health_test.fields.unit`,rules:{max:20}}),low:t.real({label:`health.health_test.fields.low`}),high:t.real({label:`health.health_test.fields.high`})}})}}),result:t.text({label:`health.health_test.fields.result`,rules:{max:5e3}}),attachments:t.image({label:`health.health_test.fields.attachments`,multiple:!0}),properties:t.properties({columns:2,fields:{status:t.string({label:`health.health_test.fields.status`,strict:!0,noSearch:!0,ui:{span:6},options:[{value:`ordered`,title:`health.health_test.options.status.ordered`},{value:`completed`,title:`health.health_test.options.status.completed`},{value:`cancelled`,title:`health.health_test.options.status.cancelled`}]}),test_type:t.string({label:`health.health_test.fields.test_type`,strict:!0,noSearch:!0,ui:{span:6},options:[{value:`blood`,title:`health.health_test.options.test_type.blood`},{value:`urine`,title:`health.health_test.options.test_type.urine`},{value:`ultrasound`,title:`health.health_test.options.test_type.ultrasound`},{value:`xray`,title:`health.health_test.options.test_type.xray`},{value:`mri`,title:`health.health_test.options.test_type.mri`},{value:`other`,title:`health.health_test.options.test_type.other`}]})}}),notes:t.text({label:`health.health_test.fields.notes`,rules:{max:2e3}})}}),S=i({id:`person_body`,label:`health.person_body.label`,icon:`lucide:ruler`,attachTo:[{library:`people`,shelf:`person`}],agent:`Person's body measurements. weightKg — weight in kg. heightCm — height in cm. bloodGroup — ABO/Rh blood type. allergies — list of allergens.`,fields:{weightKg:t.real({label:`health.person_body.fields.weightKg`,rules:{min:1,max:500}}),heightCm:t.int({label:`health.person_body.fields.heightCm`,rules:{min:50,max:250}}),bloodGroup:t.string({label:`health.person_body.fields.bloodGroup`,strict:!0,noSearch:!0,options:[`O-`,`O+`,`A-`,`A+`,`B-`,`B+`,`AB-`,`AB+`]}),allergies:t.string({label:`health.person_body.fields.allergies`,multiple:!0})}}),C=[{value:`any`,title:`health.dayPeriods.any`},{value:`before_breakfast`,title:`health.dayPeriods.before_breakfast`},{value:`with_breakfast`,title:`health.dayPeriods.with_breakfast`},{value:`after_breakfast`,title:`health.dayPeriods.after_breakfast`},{value:`with_food`,title:`health.dayPeriods.with_food`},{value:`after_lunch`,title:`health.dayPeriods.after_lunch`},{value:`evening`,title:`health.dayPeriods.evening`},{value:`before_bed`,title:`health.dayPeriods.before_bed`},{value:`as_needed`,title:`health.dayPeriods.as_needed`}],w=a({id:`health`,version:`1.0.0`,dependsOn:[`people`,`things`],optionLists:[{name:`day-periods`,options:[...C]}],libraries:[{meta:o({id:`health`,label:`health.library.label`,icon:`lucide:hospital`,agent:{description:`Medical tests, doctor visits, and medicines — each linked to a person.`,instructions:`Records link to a person (relation to people). Count upcoming/overdue visits by the date field. medicine.quantity is a SNAPSHOT dated by medicine.quantityCheckedAt ("this many as of that date"), and daysLeft subtracts everything the dose schedule has consumed since it — so when a medicine is taken or restocked, ALWAYS write quantityCheckedAt (today) in the same update_record call as quantity. Writing quantity alone dates the new count to the old checkpoint and can immediately report the pack as out. After a visit — result/nextVisit.`},starterHint:`appointments coming up, or test results worth revisiting`}),shelves:[y,b,x]}],extends_:[S],settings:s({label:`health.settings.label`,fields:{caldav_calendar:t.string({label:`health.settings.caldav_calendar`}),caldav_url:t.string({label:`health.settings.caldav_url`}),caldav_username:t.string({label:`health.settings.caldav_username`}),caldav_password:t.password({label:`health.settings.caldav_password`}),...Object.fromEntries(C.filter(e=>e.value!==`as_needed`).map(e=>[`time_${e.value}`,t.time({label:`health.settings.time_${e.value}`,rules:{granularity:`minute`}})]))}})});export{w as default};
@@ -1 +0,0 @@
1
- import{n as e}from"./fields-GPyF03tK.js";import{n as t}from"./plugin-CFEkHH3f.js";import{t as n}from"./settings-rQsBFoL2.js";var r=t({id:`webchat`,version:`1.0.0`,dependsOn:[],settings:n({label:`webchat.settings.label`,fields:{reasoning_display:e.string({label:`webchat.settings.reasoning_display`,default:`live`,strict:!0,noSearch:!0,options:[{value:`live`,title:`webchat.settings.reasoning_display_live`},{value:`off`,title:`webchat.settings.reasoning_display_off`}]})}})});export{r as default};
@@ -1 +0,0 @@
1
- import{n as e}from"./fields-GPyF03tK.js";import{n as t}from"./plugin-CFEkHH3f.js";import{t as n}from"./settings-rQsBFoL2.js";var r=t({id:`webexport`,version:`1.0.0`,dependsOn:[],libraries:[],settings:n({label:`webexport.settings.label`,icon:`lucide:folder-output`,fields:{output_dir:e.localDir({label:`webexport.settings.output_dir`,required:!0})}})});export{r as default};
@@ -1 +0,0 @@
1
- import{D as e,E as t,G as n,H as r,I as i,K as a,M as o,P as s,R as c,V as l,W as u,j as d,k as f,n as p,r as m,z as h}from"./fields-GPyF03tK.js";import{s as g}from"./shelf-CpE68_8d.js";import{t as _}from"./extend-BMkkNVfm.js";import{n as v,r as y}from"./plugin-CFEkHH3f.js";import{t as b}from"./settings-rQsBFoL2.js";import{i as x,r as S,s as C}from"./data-size-qpzofknI.js";import{t as w}from"./showcase-CUDyXMb7.js";var T=(e,t)=>a().superRefine((n,r)=>{e.safeParse(d(n)).success||r.addIssue({code:i.custom,message:s(t)})}),E=()=>l().int().min(0).max(255),D=()=>l().int().min(0).max(65535),O=n([E(),E(),E(),E()]),k=n([D(),D(),D(),D(),D(),D(),D(),D()]),A=r({v:h(4),a:O}),j=r({v:h(6),a:k}),M=c(`v`,[A,j]);function N(n){let r=t(n),i=r.required??!1,a=T(M,`ip_structure`);return f(void 0,r,e({kind:`ip`,label:r.label??``,required:i,prim:`ip`,column:`text`,hints:{},zod:o(a,i)},r.multiple??!1))}var P=/^([0-9A-Fa-f]{2}[:-]){5}[0-9A-Fa-f]{2}$/;function F(n){let r=t(n),i=r.required??!1,a=u().regex(P,{message:s(`pattern`,{messageKey:`core.presets.mac`})});return f(void 0,r,e({kind:`text`,label:r.label??``,required:i,prim:`text`,column:`text`,hints:{mask:`macAddress`,voice:`data`},zod:o(a,i)},r.multiple??!1))}var I=/^[A-Za-z0-9_]([A-Za-z0-9_-]{0,61}[A-Za-z0-9_])?(\.[A-Za-z0-9_]([A-Za-z0-9_-]{0,61}[A-Za-z0-9_])?)*$/;function L(n){let r=t(n),i=r.required??!1,a=u().regex(I,{message:s(`pattern`,{messageKey:`core.presets.hostname`})});return f(void 0,r,e({kind:`text`,label:r.label??``,required:i,prim:`text`,column:`text`,hints:{voice:`data`},zod:o(a,i)},r.multiple??!1))}var R=/^\d{15}$/;function z(e){let t=0,n=!1;for(let r=e.length-1;r>=0;r--){let i=e.charCodeAt(r)-48;n&&(i*=2,i>9&&(i-=9)),t+=i,n=!n}return t%10==0}function B(n){let r=t(n),i=r.required??!1,a=u().regex(R,{message:s(`pattern`,{messageKey:`core.presets.imei`})}).refine(z,{message:s(`pattern`,{messageKey:`core.presets.imei`})});return f(void 0,r,e({kind:`text`,label:r.label??``,required:i,prim:`text`,column:`text`,hints:{voice:`data`},zod:o(a,i)},r.multiple??!1))}var V=c(`v`,[A.extend({p:l().int().min(0).max(32)}),j.extend({p:l().int().min(0).max(128)})]);function H(n){let r=t(n),i=r.required??!1,a=T(V,`cidr_structure`);return f(void 0,r,e({kind:`cidr`,label:r.label??``,required:i,prim:`cidr`,column:`text`,hints:{},zod:o(a,i)},r.multiple??!1))}var U=g({shelf:`network`,library:`devices`,label:`devices.network.label`,icon:`lucide:globe`,agent:`A network segment. subnet — CIDR. gateway — the gateway. domain — the segment's DNS suffix (e.g. lan → host FQDN = hostname.lan).`,views:{list:[`subnet`,`gateway`,`dnsPrimary`]},fields:{name:p.title({label:`core.fields.name`}),description:p.text({label:`devices.network.fields.description`,rules:{max:1e3}}),facets:p.facets({fields:{vlan:p.int({label:`devices.network.fields.vlan`,rules:{min:1,max:4094}}),domain:L({label:`devices.network.fields.domain`})}}),ledger:p.ledger({fields:{subnet:H({label:`devices.network.fields.subnet`}),gateway:N({label:`devices.network.fields.gateway`}),dnsPrimary:N({label:`devices.network.fields.dnsPrimary`}),dnsFallback:N({label:`devices.network.fields.dnsFallback`}),poolStart:N({label:`devices.network.fields.poolStart`}),poolEnd:N({label:`devices.network.fields.poolEnd`})}}),notes:p.text({label:`devices.network.fields.notes`,rules:{max:2e3}})}}),W=[`access`,`infra`,`monitoring`,`database`,`automation`,`network`,`media`,`lighting`,`files`,`backup`,`downloads`,`finance`,`calendars`,`communication`,`web`,`ai`,`devices`,`other`].map(e=>({value:e,title:`devices.service.cat.${e}`})),G=[{value:`http`,title:`devices.accessTypes.http`},{value:`https`,title:`devices.accessTypes.https`},{value:`ssh`,title:`devices.accessTypes.ssh`},{value:`mysql`,title:`devices.accessTypes.mysql`},{value:`mqtt`,title:`devices.accessTypes.mqtt`},{value:`ws`,title:`devices.accessTypes.ws`},{value:`dns`,title:`devices.accessTypes.dns`},{value:`other`,title:`devices.accessTypes.other`}],K={http:`http`,https:`https`,ssh:`ssh`,mysql:`mysql`,mqtt:`mqtt`,ws:`ws`,wss:`ws`,dns:`dns`},q=g({shelf:`service`,library:`devices`,label:`devices.service_catalog.label`,icon:`lucide:layers`,agent:`Catalog of network service types. name — human-readable name (custom, not translated). code — slug (auto-link key from the scanner). category — tag slugs (multi; SERVICE_CATEGORIES as hints). description_mode — description source: 'key' (i18n key in the description field) or 'own' (free text in the description_text field). SERVICE_META defaults → 'key' + devices.service.desc.<code>; user records are usually 'own'.`,views:{list:[`code`,`category`]},fields:{name:p.title({label:`core.fields.name`}),description_mode:p.string({label:`devices.service.description_mode`,options:[{value:`key`,title:`devices.service.description_mode_key`},{value:`own`,title:`devices.service.description_mode_own`}],default:`key`,strict:!0,noSearch:!0}),description:p.i18n({label:`devices.service.description`,rules:{max:1e3},ui:{hidden:{description_mode:{$ne:`key`}}}}),description_text:p.text({label:`devices.service.description`,rules:{max:1e3},ui:{hidden:{description_mode:{$ne:`own`}}}}),code:p.string({label:`devices.service.code`,rules:{max:60}}),category:p.string({label:`devices.service.category`,options:[...W],multiple:!0,strict:!0,noSearch:!0})}}),J=(e,t)=>{let n=e?.[t];return typeof n==`number`&&Number.isFinite(n)&&n>=0?n:null},Y=({parent:e})=>{let t=J(e,`used`),n=J(e,`free`);return t==null||n==null||t+n===0?null:Math.round(t/(t+n)*1e3)/10},X=80,Z=95,Q=_({id:`device_info`,label:`devices.device_info.label`,icon:`lucide:monitor`,attachTo:[{library:`things`,shelf:`item`}],showWhen:{type:`device`},agent:{description:`Network and technical specs of a device. hostname — FQDN on the LAN. addresses[] — network addresses (ip/mac, multi-NIC). group — human-friendly. services[] — inline services (type/title/links[]/secrets[]). disks_usage[] — disk usage (SSH).`,instructions:`Find a host via list_records things/item with filters: { type: "device" } — network fields live under _extends.device_info on each returned record. When the software/address/location changes — update via update_record.`},fields:{facets:p.facets({fields:{group:p.string({label:`devices.device_info.fields.group`,options:`device-groups`,strict:!0,noSearch:!0}),arch:p.string({label:`devices.device_info.fields.arch`,rules:{max:30}})}}),ledger:p.ledger({fields:{hostname:p.string({label:`devices.device_info.fields.hostname`,rules:{max:120}}),vendor:p.string({label:`devices.device_info.fields.vendor`,rules:{max:80}}),model:p.string({label:`devices.device_info.fields.model`,rules:{max:120}}),os:p.string({label:`devices.device_info.fields.os`,rules:{max:100}}),kernel:p.string({label:`devices.device_info.fields.kernel`,rules:{max:100}}),cpu:p.string({label:`devices.device_info.fields.cpu`,rules:{max:150}}),gpu:p.string({label:`devices.device_info.fields.gpu`,rules:{max:150}}),ram:C({label:`devices.device_info.fields.ram`})}}),addresses:p.row({scope:`nest`,multiple:!0,label:`devices.device_info.fields.addresses`,icon:`lucide:network`,fields:{ip:N({label:`devices.device_info.fields.ip`}),mac:F({label:`devices.device_info.fields.mac`})}}),disks_usage:p.group({scope:`nest`,label:`devices.device_info.fields.disks_usage`,icon:`lucide:hard-drive`,multiple:!0,fields:{mount:p.string({label:`devices.device_info.disk.mount`,rules:{max:255}}),size:S({label:`devices.device_info.disk.size`,system:`binary`,unit:`GiB`}),used:S({label:`devices.device_info.disk.used`,system:`binary`,unit:`GiB`,mutate:[`.usage`]}),free:S({label:`devices.device_info.disk.free`,system:`binary`,unit:`GiB`,mutate:[`.usage`]}),usage:p.real({label:`devices.device_info.disk.usage`,rules:{min:0,max:100},value:Y,mutate:[`.state`]}),state:p.string({label:`devices.device_info.disk.state`,options:[{value:`ok`,title:`devices.device_info.disk_state.ok`,icon:{kind:`icon`,value:`lucide:check`}},{value:`warn`,title:`devices.device_info.disk_state.warn`,icon:{kind:`icon`,value:`lucide:minus`}},{value:`full`,title:`devices.device_info.disk_state.full`,icon:{kind:`icon`,value:`lucide:x`}}],value:e=>{let t=Y(e);return typeof t==`number`?t>=Z?`full`:t>=X?`warn`:`ok`:null},strict:!0,noSearch:!0})}}),services:p.keyed({label:`devices.device_info.fields.services`,icon:`lucide:server`,fields:{service:p.relation({label:`devices.service.type`,options:m({library:`devices`,shelf:`service`})}),description:p.smallText({label:`devices.service.description`,rules:{max:500}}),hide:p.boolean({label:`devices.service.hide`}),links:p.row({scope:`nest`,multiple:!0,label:`devices.service.links`,icon:`lucide:link`,fields:{url:p.url({label:`devices.service.url`}),access:p.string({label:`devices.service.access`,options:`access-types`,strict:!0,noSearch:!0}),visibility:p.string({label:`devices.service.visibility`,options:`visibility-types`,strict:!0,noSearch:!0})}}),secrets:p.keyValue({label:`devices.service.secrets`,fields:{value:p.password({})},multiple:!0,ui:{keyLabel:`devices.service.secretName`,valueLabel:`devices.service.secretValue`}})},by:`service`})}}),$={ssh_config_path:`~/.ssh/config`,pihole_conf_path:``,syncthing_ini_path:`~/.config/syncthingtray.ini`,gtk_bookmarks_path:`~/.config/gtk-3.0/bookmarks`,kodi_sources_path:`~/.local/share/kodi/userdata/sources.xml`,krdc_bookmarks_path:`~/.local/share/krdc/bookmarks.xml`,rclone_config_path:`~/.config/rclone/rclone.conf`,remmina_dir:`~/.local/share/remmina`,remoteview_dir:`~/.local/share/remoteview`,delfin_config_path:`~/.config/delfin/config.toml`},ee=`docker compose exec pihole pihole reloaddns`,te={ip:N,cidr:H,mac:F,hostname:L,imei:B,dataSize:S,ram:C,diskSize:x},ne=v({id:`devices`,version:`1.0.0`,dependsOn:[`things`],settings:b({label:`devices.settings.label`,icon:`lucide:radar`,fields:{info:p.info(`devices.settings.scan_info`),button:p.button({label:`devices.settings.scan_button`,value:`devices.runScan`,icon:`lucide:radar`}),info2:p.info(`devices.settings.secrets_help`),info3:p.info(`devices.settings.sync_targets_info`),ssh_config_path:p.localFile({label:`devices.settings.ssh_config_path`,default:$.ssh_config_path}),pihole_conf_path:p.localFile({label:`devices.settings.pihole_conf_path`,default:$.pihole_conf_path}),pihole_reload_cmd:p.string({label:`devices.settings.pihole_reload_cmd`,default:ee}),syncthing_ini_path:p.localFile({label:`devices.settings.syncthing_ini_path`,default:$.syncthing_ini_path}),gtk_bookmarks_path:p.localFile({label:`devices.settings.gtk_bookmarks_path`,default:$.gtk_bookmarks_path}),kodi_sources_path:p.localFile({label:`devices.settings.kodi_sources_path`,default:$.kodi_sources_path}),krdc_bookmarks_path:p.localFile({label:`devices.settings.krdc_bookmarks_path`,default:$.krdc_bookmarks_path}),rclone_config_path:p.localFile({label:`devices.settings.rclone_config_path`,default:$.rclone_config_path}),remmina_dir:p.localDir({label:`devices.settings.remmina_dir`,default:$.remmina_dir}),remoteview_dir:p.localDir({label:`devices.settings.remoteview_dir`,default:$.remoteview_dir}),delfin_config_path:p.localFile({label:`devices.settings.delfin_config_path`,default:$.delfin_config_path})}}),libraries:[{meta:y({id:`devices`,label:`devices.library.label`,icon:`lucide:globe`,agent:`Network subnets and the service catalog (network, service).`}),shelves:[U,q]},{meta:y({id:`hardware`,label:`devices.hardware.label`,icon:`lucide:monitor`,agent:`All owned devices (a view over things/item where type=device). No shelves of its own.`}),shelves:[]}],extends_:[Q],showcases:[w({id:`fleet`,library:`devices`,label:`devices.fleet.label`,icon:`lucide:server`,source:{library:`things`,shelf:`item`},filter:{type:`device`,tags:{$contains:`network`}},columns:[`subtype`,`brand`,`model`,`location`,`condition`],createDefaults:{type:`device`}}),w({id:`all`,library:`hardware`,label:`devices.all.label`,icon:`lucide:monitor`,source:{library:`things`,shelf:`item`},filter:{type:`device`},columns:[`subtype`,`brand`,`model`,`location`,`condition`],createDefaults:{type:`device`}})],fieldContribs:[{library:`things`,shelf:`item`,field:`type`,options:[{value:`device`,title:`devices.device_info.label`}]},{library:`things`,shelf:`item`,field:`subtype`,options:[{value:`pc`,title:`devices.deviceGroups.pc`,when:{type:`device`}},{value:`server`,title:`devices.deviceGroups.server`,when:{type:`device`}},{value:`mobile`,title:`devices.deviceGroups.mobile`,when:{type:`device`}},{value:`tv`,title:`devices.deviceGroups.tv`,when:{type:`device`}},{value:`printer`,title:`devices.deviceGroups.printer`,when:{type:`device`}},{value:`iot`,title:`devices.deviceGroups.iot`,when:{type:`device`}},{value:`network`,title:`devices.deviceGroups.network`,when:{type:`device`}},{value:`other`,title:`devices.deviceGroups.other`,when:{type:`device`}}]}],optionLists:[{name:`access-types`,options:[...G]},{name:`visibility-types`,options:[{value:`lan`,title:`devices.visibilityTypes.lan`},{value:`public`,title:`devices.visibilityTypes.public`},{value:`other`,title:`devices.visibilityTypes.other`}]},{name:`device-groups`,options:[{value:`pc`,title:`devices.deviceGroups.pc`},{value:`server`,title:`devices.deviceGroups.server`},{value:`mobile`,title:`devices.deviceGroups.mobile`},{value:`tv`,title:`devices.deviceGroups.tv`},{value:`printer`,title:`devices.deviceGroups.printer`},{value:`iot`,title:`devices.deviceGroups.iot`},{value:`network`,title:`devices.deviceGroups.network`},{value:`other`,title:`devices.deviceGroups.other`}]}]});export{L as a,F as c,H as i,ne as n,B as o,K as r,N as s,te as t};
@@ -1 +0,0 @@
1
- import{E as e,I as t,M as n,P as r,W as i,k as a,n as o,r as s}from"./fields-GPyF03tK.js";import{s as c}from"./shelf-CpE68_8d.js";import{t as l}from"./extend-BMkkNVfm.js";import{n as u,r as d}from"./plugin-CFEkHH3f.js";import{i as f}from"./ical-FRtCagm-.js";function p(o){if(o.multiple)throw Error("cal.recurrence: `multiple` is not supported — a record holds one series");let s=e(o),c=s.required??!1,l=i().superRefine((e,n)=>{f(e)&&n.addIssue({code:t.custom,message:r(`pattern`,{messageKey:`calendar.validation.rrule`})})});return a(void 0,s,{kind:`recurrence`,label:s.label??``,required:c,prim:`recurrence`,column:`text`,hints:{...o.exdates?{exdates:o.exdates}:{},...o.overrides?{overrides:o.overrides}:{},...o.allDay?{allDay:o.allDay}:{}},zod:n(l,c)})}var m={recurrence:p},h=c({shelf:`entry`,library:`calendar`,label:`calendar.entry.label`,icon:`lucide:calendar-days`,agent:"An event or a task on the household calendar. `type` decides which: an event has a start and an end in `when`; a task has its due date in `when.until` and priority/percent/completed in its task_details extend. Recurrence is an RRULE in `recurrence` with exceptions in `exdates`; a per-instance change is a separate record with `master` = the series and `recurrenceId` = the instance it replaces. The shelf is served to phones over CalDAV at /dav/calendars/entry/. Leave `uid` and `ics` alone: they belong to the sync.",views:{listKind:`calendar`,list:[`when`,`type`,`location`,`status`],inline:[`summary`,`when`],groupBy:[`type`,`status`],defaultGroupBy:`type`},fields:{summary:o.title({label:`calendar.entry.fields.summary`}),description:o.text({label:`calendar.entry.fields.description`,rules:{max:5e3}}),when:o.period({label:`calendar.entry.fields.when`,required:!0,rules:{granularity:`datetime`}}),allDay:o.boolean({label:`calendar.entry.fields.allDay`}),location:o.string({label:`calendar.entry.fields.location`,rules:{max:300}}),recurrence:m.recurrence({label:`calendar.entry.fields.recurrence`,exdates:`exdates`,overrides:{master:`master`,at:`recurrenceId`},allDay:`allDay`}),exdates:o.datetime({label:`calendar.entry.fields.exdates`,multiple:!0}),master:o.relation({label:`calendar.entry.fields.master`,options:s({library:`calendar`,shelf:`entry`})}),recurrenceId:o.datetime({label:`calendar.entry.fields.recurrenceId`}),type:o.string({label:`core.fields.type`,strict:!0,noSearch:!0,default:`event`,options:[{value:`event`,title:`calendar.entry.options.type.event`},{value:`task`,title:`calendar.entry.options.type.task`}]}),status:o.string({label:`calendar.entry.fields.status`,strict:!0,noSearch:!0,options:[{value:`tentative`,title:`calendar.entry.options.status.tentative`,when:{type:`event`}},{value:`confirmed`,title:`calendar.entry.options.status.confirmed`,when:{type:`event`}},{value:`needs-action`,title:`calendar.entry.options.status.needs_action`,when:{type:`task`}},{value:`in-process`,title:`calendar.entry.options.status.in_process`,when:{type:`task`}},{value:`completed`,title:`calendar.entry.options.status.completed`,when:{type:`task`}},{value:`cancelled`,title:`calendar.entry.options.status.cancelled`}]}),uid:o.string({label:`calendar.entry.fields.uid`,rules:{max:255},ui:{emphasis:`muted`}}),ics:o.source({label:`calendar.entry.fields.ics`,rules:{ext:`ics`},ui:{emphasis:`muted`}}),tags:o.tags({label:`calendar.entry.fields.tags`}),notes:o.text({label:`calendar.entry.fields.notes`,rules:{max:2e3}})}}),g=l({id:`task_details`,label:`calendar.task_details.label`,icon:`lucide:check-square`,attachTo:[{library:`calendar`,shelf:`entry`}],showWhen:{type:`task`},fields:{priority:o.int({label:`calendar.task_details.fields.priority`,rules:{min:0,max:9}}),percent:o.percent({label:`calendar.task_details.fields.percent`}),completed:o.datetime({label:`calendar.task_details.fields.completed`})}}),_=u({id:`calendar`,version:`1.0.0`,dependsOn:[`dav`],libraries:[{meta:d({id:`calendar`,label:`calendar.library.label`,icon:`lucide:calendar-days`,agent:`The household calendar: events and tasks, also served to phones over CalDAV.`}),shelves:[h]}],extends_:[g]});export{m as n,p as r,_ as t};