1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8488],{27375:(e,t,s)=>{"use strict";s.d(t,{A:()=>r});var l=s(37876),a=s(89099),n=s(91238),i=s.n(n);let r=function(e){let t=(0,a.useRouter)(),s=Number(Array.isArray(t.query.page)?t.query.page[0]:t.query.page),n=Number.isFinite(s)&&s>0?s:1;return e.items&&e.items.length>0&&e.totalPages>1&&t.query.page&&(0,l.jsx)(i(),{previousLabel:(0,l.jsx)("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M23.4 15.4L22 14L16 20L22 26L23.4 24.6L18.8 20L23.4 15.4Z",fill:"#979797"})}),nextLabel:(0,l.jsx)("svg",{width:"40",height:"40",viewBox:"0 0 40 40",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:(0,l.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M17.4 14L16 15.4L20.6 20L16 24.6L17.4 26L23.4 20L17.4 14Z",fill:"#979797"})}),breakLabel:"...",breakClassName:"break-me",pageCount:e.totalPages,marginPagesDisplayed:2,pageRangeDisplayed:5,onPageChange:e=>{let s=t.query;s.page=e.selected+1,t.push({pathname:t.pathname,query:s},void 0,{shallow:!0})},containerClassName:"pagination",activeClassName:"active",forcePage:n-1})}},32178:(e,t,s)=>{"use strict";s.d(t,{A:()=>n});var l=s(14232),a=s(89099);let n=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,t=(0,a.useRouter)();(0,l.useEffect)(()=>{if(t.isReady&&void 0===t.query.page){let{query:s}=t;s.page="1",t.push({pathname:e||t.pathname,query:s},void 0,{shallow:!0})}return()=>{}},[])}},41482:(e,t,s)=>{"use strict";s.d(t,{T:()=>n,u:()=>i});var l=s(26289);class a extends l.D{async getOrganizations(e){return this.axiosCall({method:"get",url:"apiProject/Poll/getorganizations",params:e})}async getOrganizationProjects(e,t,s){return this.axiosCall({method:"get",url:"apiProject/Poll/getorganizationprojects",params:{orgId:e,page:t,limit:s}})}async saveOrganizationsProjects(e){return this.axiosCall({method:"post",url:"apiProject/Poll",data:{projects:e}})}async getPollProjects(e){return this.axiosCall({method:"get",url:"api/apiProject/Poll"})}async getPollId(e){return this.axiosCall({method:"get",url:"api/apiProject/Poll/"+e})}async getQuestions(e){return this.axiosCall({method:"get",url:"api/apiProject/PollQuestions",params:e})}async getPollQuestions(){return this.axiosCall({method:"get",url:"api/apiProject/PollQuestions/getQuestions"})}async savePollQuestions(e){return this.axiosCall({method:"put",url:"api/apiProject/Poll",data:e})}async endPoll(e){return this.axiosCall({method:"put",url:"api/apiProject/Poll/endpoll",data:{pollId:e}})}async addQuestion(e){return this.axiosCall({method:"post",url:"api/apiProject/PollQuestions",data:e})}async editQuestion(e){return this.axiosCall({method:"put",url:"api/apiProject/PollQuestions",data:e})}async deleteQuestion(e){return this.axiosCall({method:"delete",url:"api/apiProject/PollQuestions",data:e})}}let n=new a,i={id:0,text:"",isRated:!0,isActive:!0,order:0}},55460:e=>{e.exports={stepsContainer:"documents_stepsContainer__3L2av",silver:"documents_silver__xXbew",steps:"documents_steps__Gj438",step:"documents_step__xuIdq",round:"documents_round__d5XaK",active:"documents_active__keNA_",number:"documents_number__XbBAI",exact:"documents_exact__1stBm",docSearch:"documents_docSearch__Ey1lH",smallText:"documents_smallText__ed_pf",select:"documents_select__3CLlZ",label:"documents_label__fTVff",selectBox:"documents_selectBox__NF92A",transparent:"documents_transparent__bMavM",docfilters:"documents_docfilters__Yus4M",column:"documents_column__DQh9f",monitoring:"documents_monitoring__TOzfR",docsContainer:"documents_docsContainer__X7zJu",mobileCard:"documents_mobileCard__HtQmq",index:"documents_index__lElFB",id:"documents_id__n6V1X",date:"documents_date__TAEdl",projectDetails:"documents_projectDetails__4Fxpp",docsChatStats:"documents_docsChatStats__VCeQi",tableName:"documents_tableName__PgHW0",tableTdAuto:"documents_tableTdAuto__rz_7g",Nis:"documents_Nis__2sWXa",nisTitle:"documents_nisTitle__Wutov",bgActive:"documents_bgActive__WYDoR",max1375:"documents_max1375__kw18n","monitoring-checkbox":"documents_monitoring-checkbox__nDHwZ",modal
1Number:"documents_modalNumber__uvpP4",modalCheckbox:"documents_modalCheckbox__KQOAm",searchForm:"documents_searchForm__POHwD","question-text":"documents_question-text__4b3jz",height200:"documents_height200__Tm3Le",element:"documents_element__VBm3z",linkContainer:"documents_linkContainer__Tw98_",line:"documents_line__cAqZg"}},55663:e=>{e.exports={breadcrumbs:"Breadcrumbs_breadcrumbs__C6qVk",active:"Breadcrumbs_active__gc3qd"}},63889:(e,t,s)=>{"use strict";s.r(t),s.d(t,{__N_SSG:()=>v,default:()=>y});var l=s(37876),a=s(14232),n=s(89099),i=s(14514),r=s(27375),o=s(83226),d=s(55460),c=s.n(d),u=s(28069),m=s(85599),h=s(4565),x=s(41482);let _=(e,t)=>{switch(t.type){case"UPDATE":return t.payload;case"UPDATE_FIELD":let s={...e};return s[t.payload.field]=t.payload.value,s;default:return e}};var p=s(32178),g=s(54587),j=s.n(g);let b=e=>{let{text:t,classNames:s,handleClick:a,height:n,width:i,radius:r,svg:o,imageWidth:d,imageHeight:c,imageAlt:u,imageMargin:m}=e;return(0,l.jsxs)("button",{className:s,onClick:a,style:{height:n,width:i,borderRadius:r},children:[o&&(0,l.jsx)(j(),{src:"/images/".concat(o),width:d,height:c,alt:u||t}),(0,l.jsx)("span",{style:{margin:m}}),t]})},f=()=>{let e=(0,n.useRouter)(),{t}=(0,i.Bd)(),s=[{id:1,name:t("Home"),link:"/"},{id:2,name:t("ÐпÑоÑ"),link:"/cabinet/poll"}],o=(0,a.useRef)(null),d=()=>{var e;null==(e=o.current)||e.close()},[g,j]=(0,a.useReducer)(_,x.u),f=(0,a.useMemo)(()=>({setInput:(e,t)=>{j({type:"UPDATE_FIELD",payload:{field:e,value:t}})}}),[]),[v,y]=(0,a.useState)("UPDATE"),[w,N]=(0,a.useState)(null),[C,P]=(0,a.useState)(0),A=async function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t.page=Number(e.query.page),t.limit=10;let[s,l]=await x.T.getQuestions(t);if(s)return;let a=null==l?void 0:l.data.items,n=null==l?void 0:l.data.totalPages;N(a),P(n),d()},E=(e,t)=>{var s;"CREATE"===e?j({type:"UPDATE",payload:x.u}):j({type:"UPDATE",payload:t}),y(e),null==(s=o.current)||s.open(),(0,h.T5)("focus")},T=e=>{"Enter"===e.key&&(e.preventDefault(),e.stopPropagation(),k())},k=()=>{"DELETE"===v?x.T.deleteQuestion(g):D()},D=async()=>{if("CREATE"===v){let[e,t]=await x.T.addQuestion(g);if(e)return;let s=t.data;f.setInput("id",s.id);let l={...g};l.id=s.id,N([...w,l])}else{await x.T.editQuestion(g);let e=[...w];e[w.indexOf(w.filter(e=>e.id===g.id)[0])]=g,N(e)}d()};return(0,p.A)(),(0,a.useMemo)(()=>{e.isReady&&e.query.page&&(A(),(0,h.eG)(0))},[e.query.page]),(0,l.jsx)(m.A,{breadcrumbs:s,top:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(u.A,{...{ref:o},handleClose:()=>{},children:(0,l.jsx)("div",{className:"radius-16 py-3 px-5",children:(0,l.jsx)("form",{onSubmit:e=>{e.preventDefault()},className:"flex items-center justify-between flex-col",children:"DELETE"!==v?(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("h2",{className:"text ff-medium text-left w-full",children:t("ÐобавиÑÑ Ð²Ð¾Ð¿ÑоÑ")}),(0,l.jsx)("textarea",{id:"focus",className:c()["question-text"]+" w-full box-shadow my-2",autoFocus:"CREATE"===v,onKeyDown:T,defaultValue:g.text,placeholder:t("SendText"),onChange:e=>f.setInput("text",e.target.value)}),"UPDATE"===v&&(0,l.jsx)("div",{className:"flex w-full items-center text-sm mb-2 justify-between ",children:(0,l.jsxs)("label",{htmlFor:"status",className:"flex items-center",children:[" ",(0,l.jsx)("input",{className:c().modalCheckbox,id:"status",type:"checkbox",defaultChecked:g.isActive,onChange:e=>f.setInput("isActive",!g.isActive)})," \xa0 ",t("ÐкÑивен")]})}),(0,l.jsxs)("div",{className:"flex items-center justify-between w-full mt-2",children:[(0,l.jsx)("button",{className:"bg-white border border-gray-500 rounded-lg py-1 px-2 hover:shadow-lg",onClick:d,children:t("Cancel")}),(0,l.jsx)("button",{className:"btn btn-primary ml-2 p-1",disabled:""===g.text,type:"submit",onClick:k,children:t("Confirm")})]})]}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)("h2",{className:"text ff-medium text-left w-full",children:[t("УдалиÑÑ ÑÑÐ¾Ñ Ð²Ð¾Ð¿ÑоÑ"),"?"]}),(0,l.jsx)("textarea",{className:c()["question-text"]+" w-full box-shadow my-2",disabled:!0,value:g.text,onKeyDown:T,placeholder:t("SendText")}),(0,l.jsxs)("div",{className:"flex items-center justify-between w-full mt-2",children:[(0,l.jsx)("button",{className:"bg-white border border-gray-500 rounded-lg py-1 px-2 hover:shadow-lg",onClick:d,children:t("Cancel")}),(0,l.jsx)("button",{id:"focus",className:"btn btn-primary ml-2 p-1",type:"submit",onClick:k,autoFocus:"DELETE"===v,children:t("Confirm")})]})]})})})}),(0,l.jsx)("span",{className:"ff-bold text-3xl text-dark",children:t("ÐпÑоÑ")}),(0,l.jsx)(b,{svg:"plus.svg",text:"ÐобавиÑÑ Ð²Ð¾Ð¿ÑоÑ",imageWidth:16,imageHeight:16,classNames:"bg-teal-500 hover:bg-teal-400 py-2 px-3 rounded-lg flex text-sm items-center text-white ff-bold",handleClick:()=>E("CREATE"),imageMargin:"0 0 0 5px"})]}),content:(0,l.jsxs)(l.Fragment,{children:[w&&w.length>0?(0,l.jsxs)("table",{className:c().docsChatStats,children:[(0,l.jsx)("thead",{children:(0,l.jsxs)("tr",{children:[(0,l.jsx)("th",{className:c().id,children:"ID"}),(0,l.jsx)("th",{className:c().tableName,children:t("ÐопÑоÑ")}),(0,l.jsx)("th",{children:t("ÐкÑивен")}),(0,l.jsx)("th",{children:t("Actions")})]})}),(0,l.jsx)("tbody",{children:w.map((e,s)=>(0,l.jsxs)("tr",{className:"text-sm",children:[(0,l.jsx)("td",{className:c().id,children:s+1}),(0,l.jsx)("td",{className:c().tableName,children:e.text}),(0,l.jsx)("td",{children:!0===e.isActive?(0,l.jsx)("span",{children:t("Yes")}):(0,l.jsx)("span",{children:t("No")})}),(0,l.jsx)("td",{children:(0,l.jsx)("a",{onClick:()=>E("UPDATE",e),children:(0,l.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",children:(0,l.jsx)("path",{d:"M18 14.45v6.55h-16v-12h6.743l1.978-2h-10.721v16h20v-10.573l-2 2.023zm1.473-10.615l1.707 1.707-9.281 9.378-2.23.472.512-2.169 9.292-9.388zm-.008-2.835l-11.104 11.216-1.361 5.784 5.898-1.248 11.103-11.218-4.536-4.534z",fill:"#2f80ed"})})})})]},"tr".concat(s)))})]}):(0,l.jsx)(l.Fragment,{children:w&&0==w.length?(0,l.jsx)("p",{className:c().errorText+" p-3 text-lg",children:t("NoData")}):(0,l.jsx)(l.Fragment,{children:(0,l.jsx)("div",{className:"positionCenter",children:(0,l.jsxs)("div",{className:"lds-facebook",children:[(0,l.jsx)("div",{}),(0,l.jsx)("div",{}),(0,l.jsx)("div",{})]})})})}),(0,l.jsx)(r.A,{items:w,totalPages:C})]})})};var v=!0;let y=f;f.getLayout=function(e){return(0,l.jsx)(o.A,{children:e})}},67973:(e,t,s)=>{"use strict";s.d(t,{A:()=>d});var l=s(37876),a=s(55663),n=s.n(a),i=s(48230),r=s.n(i),o=s(29053);let d=e=>{let{breadcrumbs:t}=e;return(0,l.jsx)("ul",{className:n().breadcrumbs+" p-2",children:t.map((e,s)=>
1s!==t.length-1&&(0,l.jsx)("li",{children:(0,l.jsxs)(r(),{href:e.link,children:[" ",e.name.length>100?e.name.slice(0,100)+"...":e.name," ",s!==t.length-1&&(0,l.jsx)(o.A,{})," "]})},"breadcrumb".concat(s))||s===t.length-1&&(0,l.jsxs)("li",{className:n().active,children:[e.name.length>100?e.name.slice(0,100)+"...":e.name,s!==t.length-1&&(0,l.jsx)(o.A,{})]},"breadcrubmlist".concat(s)))})}},72839:(e,t,s)=>{(window.__NEXT_P=window.__NEXT_P||[]).push(["/cabinet/poll",function(){return s(63889)}])},83226:(e,t,s)=>{"use strict";s.d(t,{A:()=>u});var l=s(37876),a=s(10859),n=s(35662),i=s(39726),r=s(14232),o=s(12498),d=s(47104),c=s(89099);let u=e=>{let{children:t,footerContact:s}=e;(0,c.useRouter)();let[u,m]=(0,r.useState)(null),{getCookie:h,getUser:x}=(0,d.l)();return(0,r.useEffect)(()=>{h("token")?m(x()):m(null)},[h("token")]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(i.A,{title:null,description:null,keywords:null}),(0,l.jsx)("div",{className:"relative",children:(0,l.jsxs)(o.A.Provider,{value:u,children:[(0,l.jsx)(a.A,{}),(0,l.jsx)("main",{children:t}),(0,l.jsx)(n.A,{footerContact:s})]})})]})}},85599:(e,t,s)=>{"use strict";s.d(t,{A:()=>c});var l=s(37876),a=s(82802),n=s(67973),i=s(74695),r=s(14232),o=s(89099),d=s(47104);let c=e=>{let{breadcrumbs:t,content:s,title:c,top:u,sidebar:m}=e,h=(0,o.useRouter)(),x=(0,i.wA)(),{getCookie:_}=(0,d.l)();return(0,r.useEffect)(()=>{_("token")?(x({type:"RESET_PASSPORT"}),x({type:"RESET_FILES"})):h.push("/401")},[]),(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)("div",{className:"container1696",children:[t&&(0,l.jsx)(n.A,{breadcrumbs:t}),(0,l.jsx)("div",{className:"flex justify-between items-center mt-9 mb-5",children:c?(0,l.jsx)("span",{className:"ff-bold text-3xl text-dark",children:c}):u}),(0,l.jsxs)("div",{className:"flex flex-wrap justify-between",children:[(0,l.jsxs)("div",{className:"right",children:[(0,l.jsx)(a.A,{}),m]}),(0,l.jsx)("div",{className:"left",children:(0,l.jsx)("div",{className:"box-shadow bg-white",children:s})})]}),(0,l.jsx)("br",{})]})})}}},e=>{e.O(0,[6758,8230,6613,4587,5073,2023,2802,636,6593,8792],()=>e(e.s=72839)),_N_E=e.O()}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.