1"use strict";(globalThis["webpackChunkfrontend"]||=[]).push([[697],{39955(e,t,s){s.r(t),s.d(t,{default:()=>o});var a=function(){var e=this,t=e._self._c;return t("div",{staticClass:"container"},[t("textarea",{directives:[{name:"model",rawName:"v-model",value:e.inputData,expression:"inputData"}],staticClass:"debug-equation-input",domProps:{value:e.inputData},on:{input:function(t){t.target.composing||(e.inputData=t.target.value)}}}),e._v(" scope P: "),t("input",{directives:[{name:"model",rawName:"v-model",value:e.scope,expression:"scope"}],attrs:{type:"checkbox"},domProps:{checked:Array.isArray(e.scope)?e._i(e.scope,null)>-1:e.scope},on:{change:function(t){var s=e.scope,a=t.target,n=!!a.checked;if(Array.isArray(s)){var i=null,r=e._i(s,i);a.checked?r<0&&(e.scope=s.concat([i])):r>-1&&(e.scope=s.slice(0,r).concat(s.slice(r+1)))}else e.scope=n}}}),t("div",[e._v(e._s(e.parsedData))]),t("h2",[e._v("tests")]),e._l(e.tests,function(s,a){return t("div",{key:a},[t("h3",[e._v(e._s(s.name))]),t("p",[t("b",[e._v("source:")]),e._v(" "+e._s(s.value)+" "),t("b",[e._v("tranformed:")]),e._v(" "+e._s(e.parse(s.value,s.scope).code)+" "),t("b",[e._v(e._s(e.parse(s.value,s.scope).code===s.check))])])])})],2)},n=[],i=s(79743);const r={name:"DebugParse",async created(){await(0,i.rT)()},data(){return{inputData:"",scope:"",tests:[{name:"add this",value:"age",check:"this.age;"},{name:"support map",value:"personnes.map((it, index) => it.age > 24 && it.estEtudiant)",check:"this.personnes.map((it, index) => it.age > 24 && it.estEtudiant);"},{name:"support index",value:"personnes[0].age",check:"this.personnes[0].age;"},{name:"support some",value:"some(p.age > 24 & p.estEtudiant)",check:"this.personnes.some(p => p.age > 24 && p.estEtudiant);"},{name:"support sum",value:"sum(p.age > 24 ? p.age : 1)",check:"this.personnes.reduce((total, p) => total + (p.age > 24 ? p.age : 1), 0);"},{name:"ternary",value:"conditions_octroi ? max(0, depenses_reconnues-revenu_determinant) : 0",check:"this.conditions_octroi ? this.max(0, this.depenses_reconnues - this.revenu_determinant) : 0;"},{name:"support index array",value:"limites_rdu_max_ajuste[ nb_adulte_index ]",check:"this.limites_rdu_max_ajuste[this.nb_adulte_index];"},{name:"custom functions",value:"getIndex(rdu, limites_rdu_max_ajuste[nb_adulte_index])",check:"this.getIndex(this.rdu, this.limites_rdu_max_ajuste[this.nb_adulte_index]);"},{name:"multi-lines",value:"enfants_etudes.reduce((r, it, index) => {\n return r.map(it => it + supplements_enfants[min(index, supplements_enfants.length - 1)])\n}, classification_a_utiliser)",check:"this.enfants_etudes.reduce((r, it, index) => {\n return r.map(it => it + this.supplements_enfants[this.min(index, this.supplements_enfants.length - 1)]);\n}, this.classification_a_utiliser);"},{name:"all together",value:"some(p.age > age_limite & p.estEtudiant) + personnes.some((e, i) => e.test) + revenue",check:"this.personnes.some(p => p.age > this.age_limite && p.estEtudiant) + this.personnes.some((e, i) => e.test) + this.revenue;"},{name:"support personne scope with external",value:"p.age >= test",check:"this.age >= this.$parent.test;",scope:"P"},{name:"support personne scope with external",value:"p.age >= test + p.annee(p.age) - max(p.age, limite)",check:"this.age >= this.$parent.test + this.annee(this.age) - this.$parent.max(this.age, this.$parent.limite);",scope:"P"}]}},computed:{parsedData(){return this.parse(this.inputData,this.scope)}},methods:{parse(e,t){let s;try{s=t?(0,i.JC)(e):(0,i.qg)(e)}catch(a){return a.message}return s}}},p=r;var u=s(81656),c=(0,u.A)(p,a,n,!1,null,"736c260e",null);const o=c.exports}}]);
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.