(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[57181],{57181:(e,r,i)=>{"use strict";i.r(r),i.d(r,{default:()=>x});var a=i(67841),s=i(79477),n=i(44113),o=i(64833),t=i(22443),p=i(45700),m=i(74631),d=i(55158),l=i(62867),u=i(72080),c=i.n(u);let _=function(e){let{dividend:r,divisor:i,remainder:s}=e;return(0,a.jsxs)("p",{className:c().wrapper,children:[r," \xf7 ",i," = ",Math.floor(r/i),"number"==typeof s&&s>0&&(0,a.jsxs)("span",{className:c().remainderPhrase,children:[" ","(and"," ",(0,a.jsx)("span",{className:c().remainderDigit,children:s})," ","leftover)"]})]})};var f=i(64227),h=i.n(f);let v=(0,o.z)(l.Z)({name:"OutputWrapper",class:"ox33weu",propsAsIs:!0}),x=function(e){let{numOfItems:r=12,initialNumOfGroups:i=1,includeRemainderArea:o}=e,l=s.useId();return(0,a.jsx)(t.S,{children:(0,a.jsx)(d.ZP,{id:l,initialValues:{numOfGroups:i},controlPosition:"top",customGrid:{gridTemplateColumns:"1fr"},controls:[(0,a.jsx)(d.vn,{id:"numOfGroups",label:"Number of Groups",min:1,max:4,wrapperStyle:{maxWidth:350,width:"100%",margin:"0 auto"}},"numOfGroups")],outputWrapper:v,children:e=>{let{numOfGroups:i}=e,s=Math.floor(r/i),t=i*s,d=o?r%i:null,u=i<4?{gridTemplateColumns:"repeat(".concat(i,", 1fr)")}:{gridTemplateColumns:"1fr 1fr",gridTemplateRows:"1fr 1fr"};return(0,a.jsxs)("section",{className:h().wrapper,children:[(0,a.jsx)("div",{className:h().demoWrapper,children:(0,a.jsx)("div",{className:(0,n.Z)(h().demoArea),style:u,children:(0,m.w6)(i).map(e=>{let r=e*s;return(0,a.jsx)("div",{className:h().group,children:(0,m.w6)(r,r+s).map(e=>{let r="".concat(l,"-").concat(e);return(0,a.jsx)(p.E.div,{layoutId:r,className:h().item},r)})},e)})})}),o&&(0,a.jsxs)("div",{className:h().remainderArea,children:[(0,a.jsx)("p",{className:h().remainderHeading,children:"Remainder Area"}),(0,m.w6)(t,r).reverse().map(e=>{let r="".concat(l,"-").concat(e);return(0,a.jsx)(p.E.div,{layoutId:r,className:h().item},r)})]}),(0,a.jsx)(_,{dividend:r,divisor:i,remainder:d})]})}})})};i(14538)},14538:e=>{e.exports={ox33weu:"ox33weu"}},64227:e=>{e.exports={wrapper:"DivisionGroupsDemo_wrapper__wVFJc",header:"DivisionGroupsDemo_header__ANRmb",slider:"DivisionGroupsDemo_slider__8Vpv4",demoWrapper:"DivisionGroupsDemo_demoWrapper__QehYg",demoArea:"DivisionGroupsDemo_demoArea__EVZ7V",group:"DivisionGroupsDemo_group__sodJF",item:"DivisionGroupsDemo_item__T56Lh",remainderArea:"DivisionGroupsDemo_remainderArea__DqYuX",remainderHeading:"DivisionGroupsDemo_remainderHeading__4urZo"}},72080:e=>{e.exports={wrapper:"Equation_wrapper__PnHbH",remainderPhrase:"Equation_remainderPhrase__onnbM",remainderDigit:"Equation_remainderDigit__8BcBv"}},44113:(e,r,i)=>{"use strict";i.d(r,{Z:()=>a});let a=function(){for(var e,r,i=0,a="",s=arguments.length;i