1"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[1041],{4914:function(e,n,r){r.d(n,{P:function(){return O}});var t=r(64558),i=r(52903),a=r(74923),o=r(1102),s=function(e){var n=e.option,r=e.sectionOrder,i=e.onChange,s=(0,o.useId)(),c=(0,o.useCallback)(function(e){i({sectionOrder:r,answer:e.target.value,checked:e.target.checked})},[i,r]);return(0,t.jsxs)("li",{className:"com-questionnaires-QuestionnaireCheckboxListItem",children:[(0,t.jsx)(a.S,{value:n.order,designType:a.a.SMALL,onChange:c,id:s}),(0,t.jsx)("label",{className:"com-questionnaires-QuestionnaireCheckboxListItem__label",htmlFor:s,children:n.content})]})},c=function(e){var n=e.options,r=e.sectionOrder,i=e.onChange;return(0,t.jsx)("ul",{className:"com-questionnaires-QuestionnaireCheckboxList",children:n.map(function(e){return(0,t.jsx)(s,{option:e,onChange:i,sectionOrder:r},e.order)})})},u=r(15479),l=function(e){var n=e.options,r=e.onChange,i=e.sectionOrder,a=(0,o.useId)(),s=(0,o.useId)();return(0,t.jsx)("ul",{className:"com-questionnaires-QuestionnaireRadioList",children:n.map(function(e,n){return(0,t.jsxs)("li",{className:"com-questionnaires-QuestionnaireRadioList__item",children:[(0,t.jsxs)("div",{className:"com-questionnaires-QuestionnaireRadioList__input--wrapper",children:[(0,t.jsx)("input",{type:"radio",id:"".concat(s,"-").concat(n),value:e.order,name:a,className:"com-questionnaires-QuestionnaireRadioList__input",onChange:function(e){r({sectionOrder:i,answer:e.target.value,checked:e.target.checked})}}),(0,t.jsx)("span",{className:"com-questionnaires-QuestionnaireRadioList__icon__radio--off",children:(0,t.jsx)(u.x,{"aria-label":"","aria-hidden":!0,symbolType:u.B.ICONS_TOGGLE_RADIO_OFF})}),(0,t.jsx)("span",{className:"com-questionnaires-QuestionnaireRadioList__icon__radio--on",children:(0,t.jsx)(u.x,{"aria-label":"","aria-hidden":!0,symbolType:u.B.ICONS_TOGGLE_CHECKED_ON})})]}),(0,t.jsx)("label",{className:"com-questionnaires-QuestionnaireRadioList__label",htmlFor:"".concat(s,"-").concat(n),children:e.content})]},e.order)})})},d=r(54114),p=r(95885),_=r(42204),h=r(18616),f=r(94977),T=r(30395),m=r.n(T),E=function(e){var n=e.sectionOrder,r=e.onChangeQuestionnaireAnswerTextare,i=(0,o.useContext)(p.m)===_.b.MOBILE,a=(0,d._)((0,o.useState)(""),2),s=a[0],c=a[1],u=(0,d._)((0,o.useState)(200),2),l=u[0],T=u[1],E=(0,o.useCallback)(function(e){T((0,f.G$)(e.target.value,200)),c(e.target.value),r({sectionOrder:n,answer:e.target.value})},[r,n]);return(0,t.jsxs)("div",{className:m()("com-questionnaires-QuestionnaireTextArea",{"com-questionnaires-QuestionnaireTextArea--mobile":i}),children:[(0,t.jsx)("textarea",{className:"com-questionnaires-QuestionnaireTextArea__textarea",placeholder:h.u.subscription_cancellation_questionnaire_comment_placeholder,onChange:E,value:s,maxLength:200}),(0,t.jsx)("span",{className:"com-questionnaires-QuestionnaireTextArea__text-count",children:l})]})},O=function(e){var n=e.questionnaireSections,r=e.onChangeQuestionnaireAnswerCheckbox,a=e.onChangeQuestionnaireAnswerRadio,s=e.onChangeQuestionnaireAnswerTextare,u=o.useContext(p.m)===_.b.MOBILE;return(0,t.jsx)("ul",{className:m()("com-questionnaires-QuestionnaireSectionList",{"com-questionnaires-QuestionnaireSectionList--mobile":u}),children:n.map(function(e){return(0,t.jsxs)("li",{className:"com-questionnaires-QuestionnaireSectionList__item",children:[(0,t.jsx)("h3",{className:m()("com-questionnaires-QuestionnaireSectionList__title",{"com-questionnaires-QuestionnaireSectionList__title--mobile":u}),children:e.content}),e.answerType===i.lp.CHECK_BOX&&(0,t.jsx)(c,{options:e.options,sectionOrder:e.order,onChange:r}),e.answerType===i.lp.RADIO_BUTTON&&(0,t.jsx)(l,{options:e.options,sectionOrder:e.order,onChange:a}),e.answerType===i.lp.TEXTAREA&&(0,t.jsx)(E,{sectionOrder:e.order,onChangeQuestionnaireAnswerTextare:s})]},e.order)})})}},59779:function(e,n,r){var t=r(54114),i=r(6222),a=r(52903),o=r(1102),s=function(){var e=(0,t._)((0,o.useState)([]),2),n=e[0],r=e[1];return{questionnaireAnswers:n,handleChangeQuestionnaireAnswerCheckbox:(0,o.useCallback)(function(e){var n=e.sectionOrder,t=e.answer,o=e.checked;r(function(e){var r=e.findIndex(function(e){return e.order===n});if(-1===r&&o){var s={order:n,answerType:a.lp.CHECK_BOX,answer:[parseInt(t,10)]};return(0,i._)(e).concat([s])}var c=e[r];if(o){var u={order:n,answerType:a.lp.CHECK_BOX,answer:(0,i._)(c.answer).concat([parseInt(t,10)])};return(0,i._)(e.slice(0,r)).concat([u],(0,i._)(e.slice(r+1)))}if(1===c.answer.length)return(0,i._)(e.slice(0,r)).concat((0,i._)(e.slice(r+1)));var l={order:n,answerType:a.lp.CHECK_BOX,answer:c.answer.filter(function(e){return e!==parseInt(t,10)})};return(0,i._)(e.slice(0,r)).concat([l],(0,i._)(e.slice(r+1)))})},[]),handleChangeQuestionnaireAnswerRadio:(0,o.useCallback)(function(e){var n=e.sectionOrder,t=e.answer,o=e.checked;r(function(e){var r=e.findIndex(function(e){return e.order===n});if(-1===r){var s={order:n,answerType:a.lp.RADIO_BUTTON,answer:[parseInt(t,10)]};return(0,i._)(e).concat([s])}if(o){var c={order:n,answerType:a.lp.RADIO_BUTTON,answer:[parseInt(t,10)]};return(0,i._)(e.slice(0,r)).concat([c],(0,i._)(e.slice(r+1)))}return(0,i._)(e.slice(0,r)).concat((0,i._)(e.slice(r+1)))})},[]),handleChangeQuestionnaireAnswerTextarea:(0,o.useCallback)(function(e){var n=e.sectionOrder,t=e.answer;r(function(e){var r=e.findIndex(function(e){return e.order===n});if(-1===r&&""!==t){var o={order:n,answerType:a.lp.TEXTAREA,answer:t};return(0,i._)(e).concat([o])}if(-1!==r&&""===t)return(0,i._)(e.slice(0,r)).concat((0,i._)(e.slice(r+1)));if(-1!==r&&""!==t){var s={order:n,answerType:a.lp.TEXTAREA,answer:t};return(0,i._)(e.slice(0,r)).concat([s],(0,i._)(e.slice(r+1)))}return e})},[])}};r.d(n,{q:function(){return s}})},84572:function(e,n,r){r.d(n,{C:function(){return _},Y:function(){return h}});var t=r(80914),i=r(75730),a=r(13571),o=r(52903),s=r(43638),c=r(9355),u=r(89205),l=r(75630),d=r(45501),p=r(99536);function _(e){return(0,t._)(function(e){var n,r,t,_,h,f;return(0,a._)(this,function(a){switch(a.label){case 0:n=e.questionnaireId,a.label=1;case 1:return a.trys.push([1,5,,6]),r=(0,u.A)("/v1/questionnaires/:questionnaireId",{questionnaireId:n}),t=(0,s.K)({path:r,method:"GET"}),[4,(0,c.GO)(t)];case 2:if((_=a.sent()).status!==d.OK)return[3,4];return h=o.MC.fromJSON,[4,_.json()];case 3:return[2,p.TC.apply(void 0,[h.apply(o.MC,[a.sent()])])];case 4:return[2,(0,p.KC)(new l.j({url:_.url,status:_.status}))];case 5:return f=a.sent(),[2,(0,p.KC)((0,i._)(f,Error)?f:Error("Unexpected error: ".concat(f)))];case 6:return[2]}})}).apply(this,arguments)}function h(e){return(0,t._)(function(e){var n,r,t,_,h,f,T;return(0,a._)(this,function(a){switch(a.label){case 0:n=e.planId,a.label=1;case 1:return a.trys.push([1,5,,6]),r=(0,u.A)("/v1/questionnaires"),t={planId:n},_=(0,s.K)({path:r,method:"GET",params:t}),[4,(0,c.GO)(_)];case 2:if((h=a.sent()).status!==d.OK)return[3,4];return f=o.SS.fromJSON,[4,h.json()];case 3:return[2,p.TC.apply(void 0,[f.apply(o.SS,[a.sent()])])];case 4:return[2,(0,p.KC)(new l.j({url:h.url,status:h.status}))];case 5:return T=a.sent(),[2,(0,p.KC)((0,i._)(T,Error)?T:Error("Unexpected error: ".concat(T)))];case 6:return[2]}})}).apply(this,arguments)}},73366:function(e,n,r){function t(e){for(var n=arguments.length,r=Array(n>1?n-1:0),t=1;t<n;t++)r[t-1]=arguments[t];return 0===r.length?e:r.reduce(function(e,n,r){return e.replace("{".concat(r,"}"),n)},e)}r.d(n,{y:function(){return t}})},94977:function(e,n,r){function t(e,n){var r=e.substr(0,n);return{over:e.substr(n,e.length),under:r}}function i(e,n){return n-e.length}function a(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"â¦",t=function(e){var n=arguments.length>
11&&void 0!==arguments[1]?arguments[1]:46,r="",t=0;return Array.prototype.forEach.call(e,function(e){n<(t+=/^[^ -~。-ï¾]+$/.test(e)?2:1)||(r+=e)}),{over:e.replace(r,""),under:r}}(e,n),i=t.under;return t.over?"".concat(i.slice(0,-1).trimEnd()).concat(r):i}r.d(n,{G$:function(){return i},gO:function(){return a},lD:function(){return t}})},52903:function(e,n,r){var t={ANSWER_TYPE_UNSPECIFIED:"ANSWER_TYPE_UNSPECIFIED",CHECK_BOX:"CHECK_BOX",RADIO_BUTTON:"RADIO_BUTTON",TEXTAREA:"TEXTAREA",UNRECOGNIZED:"UNRECOGNIZED"};function i(e){switch(e){case t.ANSWER_TYPE_UNSPECIFIED:return 0;case t.CHECK_BOX:return 1;case t.RADIO_BUTTON:return 2;case t.TEXTAREA:return 3;case t.UNRECOGNIZED:default:return -1}}var a={fromJSON:function(e){return{id:u(e.id)?globalThis.String(e.id):"",title:u(e.title)?globalThis.String(e.title):"",description:u(e.description)?globalThis.String(e.description):"",sections:globalThis.Array.isArray(null==e?void 0:e.sections)?e.sections.map(function(e){return o.fromJSON(e)}):[],planIds:globalThis.Array.isArray(null==e?void 0:e.planIds)?e.planIds.map(function(e){return globalThis.String(e)}):[],published:!!u(e.published)&&globalThis.Boolean(e.published),createdAt:u(e.createdAt)?globalThis.Number(e.createdAt):0,updatedAt:u(e.updatedAt)?globalThis.Number(e.updatedAt):0,deleted:!!u(e.deleted)&&globalThis.Boolean(e.deleted)}},toJSON:function(e){var n,r,t={};return""!==e.id&&(t.id=e.id),""!==e.title&&(t.title=e.title),""!==e.description&&(t.description=e.description),(null==(n=e.sections)?void 0:n.length)&&(t.sections=e.sections.map(function(e){return o.toJSON(e)})),(null==(r=e.planIds)?void 0:r.length)&&(t.planIds=e.planIds),!1!==e.published&&(t.published=e.published),0!==e.createdAt&&(t.createdAt=Math.round(e.createdAt)),0!==e.updatedAt&&(t.updatedAt=Math.round(e.updatedAt)),!1!==e.deleted&&(t.deleted=e.deleted),t}},o={fromJSON:function(e){return{order:u(e.order)?globalThis.Number(e.order):0,content:u(e.content)?globalThis.String(e.content):"",answerType:u(e.answerType)?function(e){switch(e){case 0:case"ANSWER_TYPE_UNSPECIFIED":return t.ANSWER_TYPE_UNSPECIFIED;case 1:case"CHECK_BOX":return t.CHECK_BOX;case 2:case"RADIO_BUTTON":return t.RADIO_BUTTON;case 3:case"TEXTAREA":return t.TEXTAREA;default:return t.UNRECOGNIZED}}(e.answerType):t.ANSWER_TYPE_UNSPECIFIED,options:globalThis.Array.isArray(null==e?void 0:e.options)?e.options.map(function(e){return s.fromJSON(e)}):[]}},toJSON:function(e){var n,r={};return 0!==e.order&&(r.order=Math.round(e.order)),""!==e.content&&(r.content=e.content),e.answerType!==t.ANSWER_TYPE_UNSPECIFIED&&(r.answerType=i(e.answerType)),(null==(n=e.options)?void 0:n.length)&&(r.options=e.options.map(function(e){return s.toJSON(e)})),r}},s={fromJSON:function(e){return{order:u(e.order)?globalThis.Number(e.order):0,content:u(e.content)?globalThis.String(e.content):""}},toJSON:function(e){var n={};return 0!==e.order&&(n.order=Math.round(e.order)),""!==e.content&&(n.content=e.content),n}},c={fromJSON:function(e){return{questionnaires:globalThis.Array.isArray(null==e?void 0:e.questionnaires)?e.questionnaires.map(function(e){return a.fromJSON(e)}):[]}},toJSON:function(e){var n,r={};return(null==(n=e.questionnaires)?void 0:n.length)&&(r.questionnaires=e.questionnaires.map(function(e){return a.toJSON(e)})),r}};function u(e){return null!=e}r.d(n,{MC:function(){return a},SS:function(){return c},cl:function(){return i},lp:function(){return t}})}}]);
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.