1"use strict";(self.webpackChunkall_language_frontend=self.webpackChunkall_language_frontend||[]).push([[7335],{3002:function(e,t,n){n.d(t,{Z:function(){return c}});var a=n(1413),r=n(45987),s=(n(47313),n(89874)),o=n(60327),i=n(46417),l=["text","className","textStyle","onClick","disabled","loading","suggestion","style","type","logToActivityStream"],c=function(e){var t=e.text,n=e.className,c=e.textStyle,u=void 0===c?{}:c,d=e.onClick,h=e.disabled,v=void 0!==h&&h,p=e.loading,m=e.suggestion,g=e.style,x=void 0===g?{}:g,f=e.type,y=void 0===f?"button":f,b=e.logToActivityStream,k=void 0===b||b,w=(0,r.Z)(e,l),j=void 0!==p?p:v;return(0,i.jsx)(o.Z,{suggestion:null!==m&&void 0!==m?m:"",children:(0,i.jsx)("button",(0,a.Z)((0,a.Z)((0,a.Z)({style:x,onClick:function(){!d||j||v||d()},className:"buttonResouce ".concat(n),disabled:v||p,id:t,type:y},k?{"data-log":t}:{}),w),{},{children:j?(0,i.jsx)(s.Z,{}):(0,i.jsx)("div",{style:u,children:t})}))})}},2682:function(e,t,n){n.d(t,{Z:function(){return s}});var a=n(1413),r=n(46417),s=function(e){var t=e.text,n=e.color,s=e.numberId,o=e.margin,i=void 0!==o&&o,l=e.style,c=e.className,u=void 0===c?"":c;return(0,r.jsxs)("label",{htmlFor:t,className:"".concat(""!==n&&null!==n&&void 0!==n&&n.includes(t)?" text-danger labelText":" labelText"," ").concat(u),style:(0,a.Z)({marginTop:i?"1px":"16px"},l),id:t.toLowerCase().replace(/\s/g,"").replace(/[^a-zA-Z ]/g,""),children:[s&&(0,r.jsxs)("span",{className:"labelnumber",children:[s,"."]}),t]})}},60327:function(e,t,n){var a=n(1413),r=n(95668),s=n(18317),o=n(46417);t.Z=function(e){var t=e.children,n=e.suggestion,i=e.place,l=void 0===i?"top":i,c=e.className;return""!==n?(0,o.jsx)(s.Z,{placement:l,delay:{show:250,hide:100},overlay:function(e){return(0,o.jsx)(r.Z,(0,a.Z)((0,a.Z)({id:"button-tooltip",className:c},e),{},{children:n}))},trigger:["hover","hover"],children:t}):(0,o.jsx)(o.Fragment,{children:t})}},40932:function(e,t,n){n.d(t,{k:function(){return a}});var a=function(e){var t=document.querySelector("#".concat(e));t&&t.scrollIntoView({behavior:"smooth"})}},97335:function(e,t,n){n.r(t),n.d(t,{default:function(){return y}});var a=n(4942),r=n(1413),s=n(74165),o=n(15861),i=n(29439),l=n(3002),c=n(82902),u=n(47313),d=n(67911),h=n(85554),v=n(58467),p=n(85190),m=n(2682),g=n(40932),x=n(3815),f=n(46417),y=function(){var e=(0,h.v9)((function(e){return e.updateTranslations.updateTranslation})),t=(0,h.I0)(),n=(0,v.s0)(),y=(0,u.useState)({query1:"Write a text of 100 words in Spanish for a 6-year old beginner learner of Spanish on the topic of computer games using repetitive language.\n Conjugate verbs using both Present tense and Conditional tense and future tense (verb endings -ai, -as, -a, -ons, -ez, -ont) and 'Near future' tense (aller +infinitive).\n Do not include Imperfect tense. Do not include Perfect tense.\n Include lots of negatives. Include lots of time phrases. Include lots of third person conjugations. Include lots of third person plural. Justify your opinions using the phrase 'porque'. Include lots of opinions. Do not include modal verbs (deber, querer, saber, poder, soler).\n ",query2:"--\x3e-Translate the above text into English."}),b=(0,i.Z)(y,2),k=b[0],w=b[1],j=(0,u.useState)({native:(null===e||void 0===e?void 0:e.native)||"",target:(null===e||void 0===e?void 0:e.target)||""}),Z=(0,i.Z)(j,2),q=Z[0],_=Z[1],N=(0,h.v9)((function(e){return e.updateTranslations.updateTranslation})),C=N.paragraph_prompt_tokens,S=N.paragraph_completion_tokens,I=N.paragraph_total_tokens,T=((0,u.useRef)(null),(0,u.useState)([].concat(["\n--\x3e-Create a key with name 'chunks' which would be an object containing two keys 'target' and 'native', and insert the character '|' after each sentence. Insert '|' after every time phrase. Do not insert '|' in front of a comma. Insert '|' before each preposition. Insert '|' before the words y, pero, o, porque, tambien, con. Insert '|' after an infinitive. Do not make different keys just give the whole text in 'target' key and English version in 'native' key.","\n--\x3e-Create a key with name 'phrase' which would be an object containing two keys 'target' and 'native' which will be arrays.\n Select 5 short phrases from the above text. Insert the French version of phrases in 'target' array and English version in 'native' array.","\n--\x3e-Create a key with name 'statement' which would be an object c
1ontaining two keys 'target' and 'native'. Each key would be an array of objects. Each array object will have two keys 'question' , 'answer' ,\n create 5 statement questions based on above text where some answers are true, some are false and some questions cannot be answered by the information in the text. The answer will be 'True' if the statement is true, 'False' if the statement is false, 'Not in Text' if the information is not available in the text.\u201d Insert each question in the array object key 'question' and their corresponding answer in the array object key 'answer' and insert the French version of the questions set in 'target' key and English version in 'native' key.","\n--\x3e-Create a key with name 'comprehension' which would be an object containing two keys 'target' and 'native'. Each key would be an array of objects. Each array object will have two keys 'question' , 'answer' ,\n create 5 comprehension questions based on the above text. Insert each question in the array object key 'question' and their corresponding answer in the array object key 'answer' and insert the French version of the questions set in 'target' key and English version in 'native' key.","\n--\x3e-Create a key with name 'vocabulary' which would be an object containing two keys 'target' and 'native' which will be arrays.\n Identify key Vocabulary in the above text, including basic vocabulary and verbs. Insert the French version of the Vocabulary in 'target' array and English version in 'native' array."]))),E=(0,i.Z)(T,2),F=E[0],P=(E[1],(0,u.useState)(!1)),Q=(0,i.Z)(P,2),D=Q[0],R=Q[1],A=(0,u.useState)(""),H=(0,i.Z)(A,2),O=H[0],V=H[1],z=(0,u.useState)(""),J=(0,i.Z)(z,2),L=J[0],W=J[1],B=(0,u.useState)(!0),G=(0,i.Z)(B,2),K=G[0],M=G[1],U=(0,u.useState)(!1),X=(0,i.Z)(U,2),Y=X[0],$=X[1],ee=(0,u.useState)(""),te=(0,i.Z)(ee,2),ne=(te[0],te[1],function(){var e=(0,o.Z)((0,s.Z)().mark((function e(){var n,a,r,o;return(0,s.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t((0,p.OI)()),R(!0),V(""),k&&""!==k.query1&&""!==k.query2){e.next=6;break}return R(!1),e.abrupt("return",V("Paragraph query cannot be empty."));case 6:return $(!0),e.prev=7,e.next=10,d.e.post("/api_final_querry",{prompt:k.query1});case 10:if(n=e.sent,!(a=null===n||void 0===n?void 0:n.data.result)){e.next=22;break}return e.next=15,d.e.post("/api_final_querry",{target:a,questions:k.query2});case 15:r=e.sent,(o=null===r||void 0===r?void 0:r.data.result)&&(t((0,p.aH)({native:o,target:a,paragraph_total_tokens:(null===n||void 0===n?void 0:n.data.total_tokens)+(null===r||void 0===r?void 0:r.data.total_tokens),paragraph_completion_tokens:(null===n||void 0===n?void 0:n.data.completion_tokens)+(null===r||void 0===r?void 0:r.data.completion_tokens),paragraph_prompt_tokens:(null===n||void 0===n?void 0:n.data.prompt_tokens)+(null===r||void 0===r?void 0:r.data.prompt_tokens)})),_({native:o,target:a})),M(!1),$(!1),e.next=25;break;case 22:V("Something went wrong"),R(!1),$(!1);case 25:e.next=33;break;case 27:e.prev=27,e.t0=e.catch(7),V(e.t0.message),R(!1),$(!1),(0,x.Z)("error",e.t0.message);case 33:case"end":return e.stop()}}),e,null,[[7,27]])})));return function(){return e.apply(this,arguments)}}()),ae=function(){var e=(0,o.Z)((0,s.Z)().mark((function e(){var a,o,i,l,c,u,h,v;return(0,s.Z)().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(M(!0),W(""),o=(a=q||{}).native,i=a.target,o&&""!==o){e.next=6;break}return M(!1),e.abrupt("return",W("Native paragraph required to generate questions."));case 6:if(F&&null!==F){e.next=9;break}return M(!1),e.abrupt("return",W("Questions query cannot be empty."));case 9:if($(!0),t((0,p.aH)({native:o,target:i})),e.prev=11,!((l=F.map((function(e,t){return d.e.post("/api_final_querry",{target:i,questions:"Referring to the above text generate a json file with following query:"+e})}))).length>0)){e.next=27;break}return $(!1),c={},u=0,h=0,v=0,e.next=21,Promise.all(l);case 21:e.sent.forEach((function(e){var t=JSON.parse(e.data.result);return u+=e.data.total_tokens,h+=e.data.completion_tokens,v+=e.data.prompt_tokens,t.chunks?c.chunks=t.chunks:t.phrase?c.phrase=t.phrase:t.statement?c.statement=t.statement:t.comprehension?c.comprehension=t.comprehension:t.vocabulary?c.vocabulary=t.vocabulary:void 0})),t((0,p.aH)((0,r.Z)((0,r.Z)({},c),{},{question_total_tokens:u,question_completion_tokens:h,question_prompt_tokens:v}))),n("/activity_prompt"),e.next=30;break;case 27:M(!1),W("Something went wrong."),$(!1);case 30:e.next=38;break;case 32:e.prev=32,e.t0=e.catch(11),M(!1),W(e.t0.message),$(!1),(0,x.Z)("error",e.t0.message);case 38:n("/activity_prompt");case 39:case"end":return e.stop()}}),e,null,[[11,32]])})));return function(){return e.apply(this,arguments)}}(),re=function(e){var t=e.target.name,n=e.target.value;_((function(e){return(0,r.Z)((0,r.Z)({},e),{},(0,a.Z)({},t,n))}))};return(0,u.useEffect)((function(){(0,g.k)("main");var t=e.target,n=e.native;t&&n&&M(!1)}),[]),(0,f.jsxs)("div",{id:"main",children:[(0,f.jsx)(c.Z,{}),(0,f.jsxs)("div",{className:"container d-flex flex-column",children:[(0,f.jsxs)("div",{className:"contain d-flex flex-column",children:[(0,f.jsxs)("div",{className:"d-flex flex-row align-items-center justify-content-between",children:[(0,f.jsx)(m.Z,{text:"Paragraph Query:"}),(0,f.jsxs)("div",{className:"d-flex flex-row align-items-center justify-content-between ml-3 mr-3",children:[(0,f.jsx)(m.Z,{text:"Paragraph Query Tokens:"}),(0,f.jsxs)("div",{className:"para-query",children:[(0,f.jsxs)("div",{children:[(0,f.jsx)("h6",{children:(0,f.jsx)("strong",{children:"Prompt Tokens"})}),(0,f.jsx)("span",{className:"info",children:C})]}),(0,f.jsxs)("div",{children:[(0,f.jsx)("h6",{children:(0,f.jsx)("strong",{children:"Response Tokens"})}),(0,f.jsx)("span",{className:"info",children:S})]}),(0,f.jsxs)("div",{children:[(0,f.jsx)("h6",{children:(0,f.jsx)("strong",{children:"Total Tokens"})}),(0,f.jsx)("span",{className:"info",children:I})]})]})]})]}),(0,f.jsxs)("div",{className:"col prompt-query",children:[(0,f.jsx)("div",{className:"col-sm",children:(0,f.jsx)("textarea",{value:k.query1,style:{width:"270%"},rows:5,onChange:function(e){return w((function(t){return(0,r.Z)((0,r.Z)({},t),{},{query1:e.target.value})}))}})}),(0,f.jsx)("div",{className:"col-sm",children:(0,f.jsx)("textarea",{value:k.query2,style:{width:"270%"},rows:3,onChange:function(e){return w((function(t){return(0,r.Z)((0,r.Z)({},t),{},{query2:e.target.value})}))}})})]}),(0,f.jsx)(l.Z,{text:D&&Y?"loading...":"Submit to get Paragraphs",onClick:ne,className:"btn btn-dark mt-2",disabled:D}),(0,f.jsx)("p",{className:"warning",children:O||""!==O?O:""})]}),""!==q.target&&""!==q.native&&(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)("div",{className:"row",children:[(0,f.jsxs)("div",{style:{margin:"5px"},className:"col-sm",children:[(0,f.jsx)(m.Z,{text:"Target"}),(0,f.jsx)("textarea",{style:{width:"100%"},value:q.target,name:"target",rows:15,onChange:re})]}),(0,f.jsxs)("div",{style:{margin:"5px"},className:"col-sm",children:[(0,f.jsx)(m.Z,{text:"Native"}),(0,f.jsx)("textarea",{style:{width:"100%"},value:q.native,name:"native",rows:15,onChange:re})]})]}),(0,f.jsx)(l.Z,{className:"btn btn-dark",text:"Clear Response",onClick:function(){q.native="",q.target="",t((0,p.OI)())}})]}),(0,f.jsxs)("div",{className:"contain d-flex flex-column",children:[(0,f.jsx)(m.Z,{text:"Questions Query:"}),(0,f.jsx)(l.Z,{className:"btn btn-dark mt-3",onClick:ae,text:K&&Y?"loading...":"Create Questions",disabled:K}),(0,f.jsx)("p",{className:"warning",children:L||""!==L?L:""}),(0,f.jsx)(l.Z,{className:"btn btn-dark",onClick:function(){n("/activity_prompt")},text:"Skip",disabled:!1})]})]})]})}}}]);
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.