function e(e,t){return t?Math.max(2,e):1}function t(e,t={}){let n=e.question.trim();if(!n)throw Error(`Poll question is required`);let r=(e.options??[]).map(e=>e.trim()).filter(Boolean);if(r.length<2)throw Error(`Poll requires at least 2 options`);if(t.maxOptions!==void 0&&r.length>t.maxOptions)throw Error(`Poll supports at most ${t.maxOptions} options`);let i=e.maxSelections,a=typeof i==`number`&&Number.isFinite(i)?Math.floor(i):1;if(a<1)throw Error(`maxSelections must be at least 1`);if(a>r.length)throw Error(`maxSelections cannot exceed option count`);let o=e.durationSeconds,s=typeof o==`number`&&Number.isFinite(o)?Math.floor(o):void 0;if(s!==void 0&&s<1)throw Error(`durationSeconds must be at least 1`);let c=e.durationHours,l=typeof c==`number`&&Number.isFinite(c)?Math.floor(c):void 0;if(l!==void 0&&l<1)throw Error(`durationHours must be at least 1`);if(s!==void 0&&l!==void 0)throw Error(`durationSeconds and durationHours are mutually exclusive`);return{question:n,options:r,maxSelections:a,durationSeconds:s,durationHours:l}}function n(e,t){let n=typeof e==`number`&&Number.isFinite(e)?Math.floor(e):t.defaultHours;return Math.min(Math.max(n,1),t.maxHours)}Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return t}}),Object.defineProperty(exports,`r`,{enumerable:!0,get:function(){return e}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return n}});
