<prompt> Tekeleza mti wa utafutaji wa binary katika JavaScript au TypeScript, na mbinu za kuingiza, kufuta na kutafuta vipengele. Utekelezaji unapaswa pia kujumuisha njia ya upitishaji ya mpangilio ambayo inarudisha mlolongo uliopangwa wa vipengee.PLINFORMAT  <response>: nodi ya darasa mjenzithamani hii.thamani thamani; this.left null; this.right null; darasa la BinarySearchTree mjenzi this.mizizi null; ingizathamani const newNode Nodi mpyathamani; ikiwa hii.mizizi null this.root newNode; nyengine basi currentNode this.root; wakati kweli ikiwa thamani currentNode.value ikiwa !currentNode.left currentNode.left newNode; kurudisha hii; currentNode currentNode.left; nyengine ikiwa !currentNode.right currentNode.right newNode; kurudisha hii; currentNode currentNode.right; deletethamani, parentNode null basi currentNode this.root; wakati Njia ya sasa ! null ikiwa thamani currentNode.value parentNode currentNode; currentNode currentNode.left; vinginevyo ikiwa thamani currentNode.value parentNode currentNode; currentNode currentNode.right; nyengine ikiwa currentNode.left ! null currentNode.right ! null currentNode.value currentNode.right.getMinValue; currentNode.right.deletecurrentNode.value, currentNode; vinginevyo ikiwa ParentNode null ikiwa currentNode.left ! null currentNode.value currentNode.left.value; currentNode.right currentNode.left.right; currentNode.left currentNode.left.left; vinginevyo ikiwa currentNode.right ! null currentNode.value currentNode.right.value; currentNode.left currentNode.right.left; currentNode.right currentNode.right.right; nyengine Huu ni mti wa nodi moja; usifanye chochote. vinginevyo ikiwa parentNode.left currentNode parentNode.left currentNode.left ! null ? currentNode.left : currentNode.right; vinginevyo ikiwa parentNode.right currentNode parentNode.right currentNode.left ! null ? currentNode.left : currentNode.right; mapumziko; kurudisha hii; tafuta thamani basi currentNode this.root; wakati Njia ya sasa ! null ikiwa thamani currentNode.value currentNode currentNode.left; vinginevyo ikiwa thamani currentNode.value currentNode currentNode.right; nyengine kurudi kweli; kurudi kwa uwongo; inorderTraversalnodi, safu ikiwa !nodi nodi this.root; ikiwa !safu safu ; ikiwa nodi.kushoto this.inorderTraversalnodi.kushoto, safu; array.sukumanodi.value; ikiwa nodi.kulia this.inorderTraversalnode.right, array; safu ya kurudi; const bst new BinarySearchTree;bst.ingiza10;bst.ingiza5;bst.ingiza15;bst.ingiza2;bst.ingiza7;bst.ingiza12;bst.ingiza17;console.logbst.inorderTraversal; 2, 5, 7, 10, 12, 15, 17 